diff --git a/evm_arithmetization/src/fixed_recursive_verifier.rs b/evm_arithmetization/src/fixed_recursive_verifier.rs index a5e884572..a3ef1e1c5 100644 --- a/evm_arithmetization/src/fixed_recursive_verifier.rs +++ b/evm_arithmetization/src/fixed_recursive_verifier.rs @@ -46,15 +46,15 @@ use crate::get_challenges::observe_public_values_target; use crate::memory::segments::Segment; use crate::proof::{ AllProof, BlockHashesTarget, BlockMetadataTarget, ExtraBlockData, ExtraBlockDataTarget, - FinalPublicValues, MemCapTarget, PublicValues, PublicValuesTarget, RegistersDataTarget, - TrieRoots, TrieRootsTarget, TARGET_HASH_SIZE, + FinalPublicValues, FinalPublicValuesTarget, MemCapTarget, PublicValues, PublicValuesTarget, + RegistersDataTarget, TrieRoots, TrieRootsTarget, TARGET_HASH_SIZE, }; use crate::prover::testing::prove_all_segments; use crate::prover::{check_abort_signal, prove, GenerationSegmentData, SegmentDataIterator}; use crate::recursive_verifier::{ - add_common_recursion_gates, add_virtual_public_values, get_memory_extra_looking_sum_circuit, - recursive_stark_circuit, set_public_value_targets, PlonkWrapperCircuit, PublicInputs, - StarkWrapperCircuit, + add_common_recursion_gates, add_virtual_final_public_values, add_virtual_public_values, + get_memory_extra_looking_sum_circuit, recursive_stark_circuit, set_final_public_value_targets, + set_public_value_targets, PlonkWrapperCircuit, PublicInputs, StarkWrapperCircuit, }; use crate::util::{h160_limbs, h256_limbs, u256_limbs}; use crate::verifier::initial_memory_merkle_cap; @@ -388,7 +388,7 @@ where has_parent_block: BoolTarget, parent_block_proof: ProofWithPublicInputsTarget, agg_root_proof: ProofWithPublicInputsTarget, - public_values: PublicValuesTarget, + public_values: FinalPublicValuesTarget, cyclic_vk: VerifierCircuitTarget, } @@ -421,7 +421,7 @@ where let has_parent_block = buffer.read_target_bool()?; let parent_block_proof = buffer.read_target_proof_with_public_inputs()?; let agg_root_proof = buffer.read_target_proof_with_public_inputs()?; - let public_values = PublicValuesTarget::from_buffer(buffer)?; + let public_values = FinalPublicValuesTarget::from_buffer(buffer)?; let cyclic_vk = buffer.read_target_verifier_circuit()?; Ok(Self { circuit, @@ -1214,7 +1214,7 @@ where has_parent_block, parent_block_proof, agg_root_proof, - public_values, + public_values: public_values.into(), cyclic_vk, } } @@ -2140,9 +2140,10 @@ where .map(|p| TrieRoots::from_public_inputs(&p.public_inputs[0..TrieRootsTarget::SIZE])) .unwrap_or(public_values.trie_roots_before), ..public_values - }; + } + .into(); - set_public_value_targets( + set_final_public_value_targets( &mut block_inputs, &self.block.public_values, &block_public_values, @@ -2152,7 +2153,7 @@ where })?; let block_proof = self.block.circuit.prove(block_inputs)?; - Ok((block_proof, block_public_values.into())) + Ok((block_proof, block_public_values)) } pub fn verify_block(&self, block_proof: &ProofWithPublicInputs) -> anyhow::Result<()> { diff --git a/evm_arithmetization/src/proof.rs b/evm_arithmetization/src/proof.rs index d43f1071d..7daa697f7 100644 --- a/evm_arithmetization/src/proof.rs +++ b/evm_arithmetization/src/proof.rs @@ -190,6 +190,12 @@ impl From for FinalPublicValues { } } +impl<'a> From<&'a PublicValues> for FinalPublicValues { + fn from(value: &'a PublicValues) -> Self { + value.clone().into() + } +} + /// Trie hashes. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub struct TrieRoots { @@ -448,7 +454,7 @@ impl MemCap { /// Memory values which are public. /// Note: All the larger integers are encoded with 32-bit limbs in little-endian /// order. -#[derive(Eq, PartialEq, Debug)] +#[derive(Clone, Eq, PartialEq, Debug)] pub struct PublicValuesTarget { /// Trie hashes before the execution of the local state transition. pub trie_roots_before: TrieRootsTarget, @@ -473,69 +479,8 @@ pub struct PublicValuesTarget { impl PublicValuesTarget { /// Serializes public value targets. pub(crate) fn to_buffer(&self, buffer: &mut Vec) -> IoResult<()> { - let TrieRootsTarget { - state_root: state_root_before, - transactions_root: transactions_root_before, - receipts_root: receipts_root_before, - } = self.trie_roots_before; - - buffer.write_target_array(&state_root_before)?; - buffer.write_target_array(&transactions_root_before)?; - buffer.write_target_array(&receipts_root_before)?; - - let TrieRootsTarget { - state_root: state_root_after, - transactions_root: transactions_root_after, - receipts_root: receipts_root_after, - } = self.trie_roots_after; - - buffer.write_target_array(&state_root_after)?; - buffer.write_target_array(&transactions_root_after)?; - buffer.write_target_array(&receipts_root_after)?; - - let BlockMetadataTarget { - block_beneficiary, - block_timestamp, - block_number, - block_difficulty, - block_random, - block_gaslimit, - block_chain_id, - block_base_fee, - block_gas_used, - block_bloom, - } = self.block_metadata; - - buffer.write_target_array(&block_beneficiary)?; - buffer.write_target(block_timestamp)?; - buffer.write_target(block_number)?; - buffer.write_target(block_difficulty)?; - buffer.write_target_array(&block_random)?; - buffer.write_target(block_gaslimit)?; - buffer.write_target(block_chain_id)?; - buffer.write_target_array(&block_base_fee)?; - buffer.write_target(block_gas_used)?; - buffer.write_target_array(&block_bloom)?; + FinalPublicValuesTarget::from(self).to_buffer(buffer)?; - let BlockHashesTarget { - prev_hashes, - cur_hash, - } = self.block_hashes; - buffer.write_target_array(&prev_hashes)?; - buffer.write_target_array(&cur_hash)?; - - let ExtraBlockDataTarget { - checkpoint_state_trie_root, - txn_number_before, - txn_number_after, - gas_used_before, - gas_used_after, - } = self.extra_block_data; - buffer.write_target_array(&checkpoint_state_trie_root)?; - buffer.write_target(txn_number_before)?; - buffer.write_target(txn_number_after)?; - buffer.write_target(gas_used_before)?; - buffer.write_target(gas_used_after)?; let RegistersDataTarget { program_counter: program_counter_before, is_kernel: is_kernel_before, @@ -550,6 +495,7 @@ impl PublicValuesTarget { buffer.write_target_array(&stack_top_before)?; buffer.write_target(context_before)?; buffer.write_target(gas_used_before)?; + let RegistersDataTarget { program_counter: program_counter_after, is_kernel: is_kernel_after, @@ -573,43 +519,13 @@ impl PublicValuesTarget { /// Deserializes public value targets. pub(crate) fn from_buffer(buffer: &mut Buffer) -> IoResult { - let trie_roots_before = TrieRootsTarget { - state_root: buffer.read_target_array()?, - transactions_root: buffer.read_target_array()?, - receipts_root: buffer.read_target_array()?, - }; - - let trie_roots_after = TrieRootsTarget { - state_root: buffer.read_target_array()?, - transactions_root: buffer.read_target_array()?, - receipts_root: buffer.read_target_array()?, - }; - - let block_metadata = BlockMetadataTarget { - block_beneficiary: buffer.read_target_array()?, - block_timestamp: buffer.read_target()?, - block_number: buffer.read_target()?, - block_difficulty: buffer.read_target()?, - block_random: buffer.read_target_array()?, - block_gaslimit: buffer.read_target()?, - block_chain_id: buffer.read_target()?, - block_base_fee: buffer.read_target_array()?, - block_gas_used: buffer.read_target()?, - block_bloom: buffer.read_target_array()?, - }; - - let block_hashes = BlockHashesTarget { - prev_hashes: buffer.read_target_array()?, - cur_hash: buffer.read_target_array()?, - }; - - let extra_block_data = ExtraBlockDataTarget { - checkpoint_state_trie_root: buffer.read_target_array()?, - txn_number_before: buffer.read_target()?, - txn_number_after: buffer.read_target()?, - gas_used_before: buffer.read_target()?, - gas_used_after: buffer.read_target()?, - }; + let FinalPublicValuesTarget { + trie_roots_before, + trie_roots_after, + block_metadata, + block_hashes, + extra_block_data, + } = FinalPublicValuesTarget::from_buffer(buffer)?; let registers_before = RegistersDataTarget { program_counter: buffer.read_target()?, @@ -654,86 +570,42 @@ impl PublicValuesTarget { pub(crate) fn from_public_inputs(pis: &[Target], len_mem_cap: usize) -> Self { assert!( pis.len() - > TrieRootsTarget::SIZE * 2 - + BlockMetadataTarget::SIZE - + BlockHashesTarget::SIZE - + ExtraBlockDataTarget::SIZE - - 1 + >= FinalPublicValuesTarget::SIZE + + RegistersDataTarget::SIZE * 2 + + NUM_HASH_OUT_ELTS * len_mem_cap * 2 ); + let FinalPublicValuesTarget { + trie_roots_before, + trie_roots_after, + block_metadata, + block_hashes, + extra_block_data, + } = FinalPublicValuesTarget::from_public_inputs(pis); + + let pis = &pis[FinalPublicValuesTarget::SIZE..]; + Self { - trie_roots_before: TrieRootsTarget::from_public_inputs(&pis[0..TrieRootsTarget::SIZE]), - trie_roots_after: TrieRootsTarget::from_public_inputs( - &pis[TrieRootsTarget::SIZE..TrieRootsTarget::SIZE * 2], - ), - block_metadata: BlockMetadataTarget::from_public_inputs( - &pis[TrieRootsTarget::SIZE * 2 - ..TrieRootsTarget::SIZE * 2 + BlockMetadataTarget::SIZE], - ), - block_hashes: BlockHashesTarget::from_public_inputs( - &pis[TrieRootsTarget::SIZE * 2 + BlockMetadataTarget::SIZE - ..TrieRootsTarget::SIZE * 2 - + BlockMetadataTarget::SIZE - + BlockHashesTarget::SIZE], - ), - extra_block_data: ExtraBlockDataTarget::from_public_inputs( - &pis[TrieRootsTarget::SIZE * 2 + BlockMetadataTarget::SIZE + BlockHashesTarget::SIZE - ..TrieRootsTarget::SIZE * 2 - + BlockMetadataTarget::SIZE - + BlockHashesTarget::SIZE - + ExtraBlockDataTarget::SIZE], - ), + trie_roots_before, + trie_roots_after, + block_metadata, + block_hashes, + extra_block_data, registers_before: RegistersDataTarget::from_public_inputs( - &pis[TrieRootsTarget::SIZE * 2 - + BlockMetadataTarget::SIZE - + BlockHashesTarget::SIZE - + ExtraBlockDataTarget::SIZE - ..TrieRootsTarget::SIZE * 2 - + BlockMetadataTarget::SIZE - + BlockHashesTarget::SIZE - + ExtraBlockDataTarget::SIZE - + RegistersDataTarget::SIZE], + &pis[..RegistersDataTarget::SIZE], ), registers_after: RegistersDataTarget::from_public_inputs( - &pis[TrieRootsTarget::SIZE * 2 - + BlockMetadataTarget::SIZE - + BlockHashesTarget::SIZE - + ExtraBlockDataTarget::SIZE - + RegistersDataTarget::SIZE - ..TrieRootsTarget::SIZE * 2 - + BlockMetadataTarget::SIZE - + BlockHashesTarget::SIZE - + ExtraBlockDataTarget::SIZE - + RegistersDataTarget::SIZE * 2], + &pis[RegistersDataTarget::SIZE..RegistersDataTarget::SIZE * 2], ), mem_before: MemCapTarget::from_public_inputs( - &pis[TrieRootsTarget::SIZE * 2 - + BlockMetadataTarget::SIZE - + BlockHashesTarget::SIZE - + ExtraBlockDataTarget::SIZE - + RegistersDataTarget::SIZE * 2 - ..TrieRootsTarget::SIZE * 2 - + BlockMetadataTarget::SIZE - + BlockHashesTarget::SIZE - + ExtraBlockDataTarget::SIZE - + RegistersDataTarget::SIZE * 2 - + len_mem_cap * NUM_HASH_OUT_ELTS], + &pis[RegistersDataTarget::SIZE * 2 + ..RegistersDataTarget::SIZE * 2 + len_mem_cap * NUM_HASH_OUT_ELTS], len_mem_cap, ), mem_after: MemCapTarget::from_public_inputs( - &pis[TrieRootsTarget::SIZE * 2 - + BlockMetadataTarget::SIZE - + BlockHashesTarget::SIZE - + ExtraBlockDataTarget::SIZE - + RegistersDataTarget::SIZE * 2 - + len_mem_cap * NUM_HASH_OUT_ELTS - ..TrieRootsTarget::SIZE * 2 - + BlockMetadataTarget::SIZE - + BlockHashesTarget::SIZE - + ExtraBlockDataTarget::SIZE - + RegistersDataTarget::SIZE * 2 - + 2 * len_mem_cap * NUM_HASH_OUT_ELTS], + &pis[RegistersDataTarget::SIZE * 2 + len_mem_cap * NUM_HASH_OUT_ELTS + ..RegistersDataTarget::SIZE * 2 + 2 * len_mem_cap * NUM_HASH_OUT_ELTS], len_mem_cap, ), } @@ -796,6 +668,197 @@ impl PublicValuesTarget { } } +/// Memory values which are public. +/// Note: All the larger integers are encoded with 32-bit limbs in little-endian +/// order. +#[derive(Eq, PartialEq, Debug)] +pub struct FinalPublicValuesTarget { + /// Trie hashes before the execution of the local state transition. + pub trie_roots_before: TrieRootsTarget, + /// Trie hashes after the execution of the local state transition. + pub trie_roots_after: TrieRootsTarget, + /// Block metadata: it remains unchanged within a block. + pub block_metadata: BlockMetadataTarget, + /// 256 previous block hashes and current block's hash. + pub block_hashes: BlockHashesTarget, + /// Extra block data that is specific to the current proof. + pub extra_block_data: ExtraBlockDataTarget, +} + +impl From for FinalPublicValuesTarget { + fn from(value: PublicValuesTarget) -> Self { + Self { + trie_roots_before: value.trie_roots_before, + trie_roots_after: value.trie_roots_after, + block_metadata: value.block_metadata, + block_hashes: value.block_hashes, + extra_block_data: value.extra_block_data, + } + } +} + +impl<'a> From<&'a PublicValuesTarget> for FinalPublicValuesTarget { + fn from(value: &'a PublicValuesTarget) -> Self { + value.clone().into() + } +} + +impl FinalPublicValuesTarget { + const SIZE: usize = TrieRootsTarget::SIZE * 2 + + BlockMetadataTarget::SIZE + + BlockHashesTarget::SIZE + + ExtraBlockDataTarget::SIZE; + + /// Serializes final public value targets. + pub(crate) fn to_buffer(&self, buffer: &mut Vec) -> IoResult<()> { + let TrieRootsTarget { + state_root: state_root_before, + transactions_root: transactions_root_before, + receipts_root: receipts_root_before, + } = self.trie_roots_before; + + buffer.write_target_array(&state_root_before)?; + buffer.write_target_array(&transactions_root_before)?; + buffer.write_target_array(&receipts_root_before)?; + + let TrieRootsTarget { + state_root: state_root_after, + transactions_root: transactions_root_after, + receipts_root: receipts_root_after, + } = self.trie_roots_after; + + buffer.write_target_array(&state_root_after)?; + buffer.write_target_array(&transactions_root_after)?; + buffer.write_target_array(&receipts_root_after)?; + + let BlockMetadataTarget { + block_beneficiary, + block_timestamp, + block_number, + block_difficulty, + block_random, + block_gaslimit, + block_chain_id, + block_base_fee, + block_gas_used, + block_bloom, + } = self.block_metadata; + + buffer.write_target_array(&block_beneficiary)?; + buffer.write_target(block_timestamp)?; + buffer.write_target(block_number)?; + buffer.write_target(block_difficulty)?; + buffer.write_target_array(&block_random)?; + buffer.write_target(block_gaslimit)?; + buffer.write_target(block_chain_id)?; + buffer.write_target_array(&block_base_fee)?; + buffer.write_target(block_gas_used)?; + buffer.write_target_array(&block_bloom)?; + + let BlockHashesTarget { + prev_hashes, + cur_hash, + } = self.block_hashes; + buffer.write_target_array(&prev_hashes)?; + buffer.write_target_array(&cur_hash)?; + + let ExtraBlockDataTarget { + checkpoint_state_trie_root, + txn_number_before, + txn_number_after, + gas_used_before, + gas_used_after, + } = self.extra_block_data; + buffer.write_target_array(&checkpoint_state_trie_root)?; + buffer.write_target(txn_number_before)?; + buffer.write_target(txn_number_after)?; + buffer.write_target(gas_used_before)?; + buffer.write_target(gas_used_after)?; + + Ok(()) + } + + /// Deserializes final public value targets. + pub(crate) fn from_buffer(buffer: &mut Buffer) -> IoResult { + let trie_roots_before = TrieRootsTarget { + state_root: buffer.read_target_array()?, + transactions_root: buffer.read_target_array()?, + receipts_root: buffer.read_target_array()?, + }; + + let trie_roots_after = TrieRootsTarget { + state_root: buffer.read_target_array()?, + transactions_root: buffer.read_target_array()?, + receipts_root: buffer.read_target_array()?, + }; + + let block_metadata = BlockMetadataTarget { + block_beneficiary: buffer.read_target_array()?, + block_timestamp: buffer.read_target()?, + block_number: buffer.read_target()?, + block_difficulty: buffer.read_target()?, + block_random: buffer.read_target_array()?, + block_gaslimit: buffer.read_target()?, + block_chain_id: buffer.read_target()?, + block_base_fee: buffer.read_target_array()?, + block_gas_used: buffer.read_target()?, + block_bloom: buffer.read_target_array()?, + }; + + let block_hashes = BlockHashesTarget { + prev_hashes: buffer.read_target_array()?, + cur_hash: buffer.read_target_array()?, + }; + + let extra_block_data = ExtraBlockDataTarget { + checkpoint_state_trie_root: buffer.read_target_array()?, + txn_number_before: buffer.read_target()?, + txn_number_after: buffer.read_target()?, + gas_used_before: buffer.read_target()?, + gas_used_after: buffer.read_target()?, + }; + + Ok(Self { + trie_roots_before, + trie_roots_after, + block_metadata, + block_hashes, + extra_block_data, + }) + } + + /// Extracts final public value `Target`s from the given public input + /// `Target`s. Final public values are always the first public inputs + /// added to the circuit, so we can start extracting at index 0. + pub(crate) fn from_public_inputs(pis: &[Target]) -> Self { + assert!(pis.len() >= Self::SIZE); + + Self { + trie_roots_before: TrieRootsTarget::from_public_inputs(&pis[0..TrieRootsTarget::SIZE]), + trie_roots_after: TrieRootsTarget::from_public_inputs( + &pis[TrieRootsTarget::SIZE..TrieRootsTarget::SIZE * 2], + ), + block_metadata: BlockMetadataTarget::from_public_inputs( + &pis[TrieRootsTarget::SIZE * 2 + ..TrieRootsTarget::SIZE * 2 + BlockMetadataTarget::SIZE], + ), + block_hashes: BlockHashesTarget::from_public_inputs( + &pis[TrieRootsTarget::SIZE * 2 + BlockMetadataTarget::SIZE + ..TrieRootsTarget::SIZE * 2 + + BlockMetadataTarget::SIZE + + BlockHashesTarget::SIZE], + ), + extra_block_data: ExtraBlockDataTarget::from_public_inputs( + &pis[TrieRootsTarget::SIZE * 2 + BlockMetadataTarget::SIZE + BlockHashesTarget::SIZE + ..TrieRootsTarget::SIZE * 2 + + BlockMetadataTarget::SIZE + + BlockHashesTarget::SIZE + + ExtraBlockDataTarget::SIZE], + ), + } + } +} + /// Circuit version of `TrieRoots`. /// `Target`s for trie hashes. Since a `Target` holds a 32-bit limb, each hash /// requires 8 `Target`s. diff --git a/evm_arithmetization/src/recursive_verifier.rs b/evm_arithmetization/src/recursive_verifier.rs index fa9b389c3..70612cf9b 100644 --- a/evm_arithmetization/src/recursive_verifier.rs +++ b/evm_arithmetization/src/recursive_verifier.rs @@ -36,8 +36,9 @@ use crate::memory::segments::Segment; use crate::memory::VALUE_LIMBS; use crate::proof::{ BlockHashes, BlockHashesTarget, BlockMetadata, BlockMetadataTarget, ExtraBlockData, - ExtraBlockDataTarget, MemCap, MemCapTarget, PublicValues, PublicValuesTarget, RegistersData, - RegistersDataTarget, TrieRoots, TrieRootsTarget, + ExtraBlockDataTarget, FinalPublicValues, FinalPublicValuesTarget, MemCap, MemCapTarget, + PublicValues, PublicValuesTarget, RegistersData, RegistersDataTarget, TrieRoots, + TrieRootsTarget, }; use crate::util::{h256_limbs, u256_limbs, u256_to_u32, u256_to_u64}; use crate::witness::errors::ProgramError; @@ -600,11 +601,14 @@ pub(crate) fn add_virtual_public_values, const D: u builder: &mut CircuitBuilder, len_mem_cap: usize, ) -> PublicValuesTarget { - let trie_roots_before = add_virtual_trie_roots(builder); - let trie_roots_after = add_virtual_trie_roots(builder); - let block_metadata = add_virtual_block_metadata(builder); - let block_hashes = add_virtual_block_hashes(builder); - let extra_block_data = add_virtual_extra_block_data(builder); + let FinalPublicValuesTarget { + trie_roots_before, + trie_roots_after, + block_metadata, + block_hashes, + extra_block_data, + } = add_virtual_final_public_values(builder); + let registers_before = add_virtual_registers_data(builder); let registers_after = add_virtual_registers_data(builder); @@ -628,6 +632,24 @@ pub(crate) fn add_virtual_public_values, const D: u } } +pub(crate) fn add_virtual_final_public_values, const D: usize>( + builder: &mut CircuitBuilder, +) -> FinalPublicValuesTarget { + let trie_roots_before = add_virtual_trie_roots(builder); + let trie_roots_after = add_virtual_trie_roots(builder); + let block_metadata = add_virtual_block_metadata(builder); + let block_hashes = add_virtual_block_hashes(builder); + let extra_block_data = add_virtual_extra_block_data(builder); + + FinalPublicValuesTarget { + trie_roots_before, + trie_roots_after, + block_metadata, + block_hashes, + extra_block_data, + } +} + pub(crate) fn add_virtual_trie_roots, const D: usize>( builder: &mut CircuitBuilder, ) -> TrieRootsTarget { @@ -714,18 +736,6 @@ pub(crate) fn add_virtual_registers_data, const D: } } -pub(crate) fn debug_public_values(public_values: &PublicValues) { - log::debug!("Public Values:"); - log::debug!( - " Trie Roots Before: {:?}", - &public_values.trie_roots_before - ); - log::debug!(" Trie Roots After: {:?}", &public_values.trie_roots_after); - log::debug!(" Block Metadata: {:?}", &public_values.block_metadata); - log::debug!(" Block Hashes: {:?}", &public_values.block_hashes); - log::debug!(" Extra Block Data: {:?}", &public_values.extra_block_data); -} - pub fn set_public_value_targets( witness: &mut W, public_values_target: &PublicValuesTarget, @@ -735,8 +745,41 @@ where F: RichField + Extendable, W: Witness, { - debug_public_values(public_values); + set_final_public_value_targets(witness, &public_values_target.into(), &public_values.into())?; + set_registers_target( + witness, + &public_values_target.registers_before, + &public_values.registers_before, + )?; + set_registers_target( + witness, + &public_values_target.registers_after, + &public_values.registers_after, + )?; + set_mem_cap_target( + witness, + &public_values_target.mem_before, + &public_values.mem_before, + )?; + set_mem_cap_target( + witness, + &public_values_target.mem_after, + &public_values.mem_after, + )?; + + Ok(()) +} + +pub fn set_final_public_value_targets( + witness: &mut W, + public_values_target: &FinalPublicValuesTarget, + public_values: &FinalPublicValues, +) -> Result<(), ProgramError> +where + F: RichField + Extendable, + W: Witness, +{ set_trie_roots_target( witness, &public_values_target.trie_roots_before, @@ -761,30 +804,7 @@ where witness, &public_values_target.extra_block_data, &public_values.extra_block_data, - )?; - set_registers_target( - witness, - &public_values_target.registers_before, - &public_values.registers_before, - )?; - set_registers_target( - witness, - &public_values_target.registers_after, - &public_values.registers_after, - )?; - - set_mem_cap_target( - witness, - &public_values_target.mem_before, - &public_values.mem_before, - )?; - set_mem_cap_target( - witness, - &public_values_target.mem_after, - &public_values.mem_after, - )?; - - Ok(()) + ) } pub(crate) fn set_trie_roots_target(