From 27b6b22d3ec8f184a44249c1e4f608ee1cfa42f5 Mon Sep 17 00:00:00 2001 From: Einar Rasmussen Date: Mon, 8 Jul 2024 18:37:39 +0800 Subject: [PATCH] review: make offsets explicit --- evm_arithmetization/src/fixed_recursive_verifier.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/evm_arithmetization/src/fixed_recursive_verifier.rs b/evm_arithmetization/src/fixed_recursive_verifier.rs index fd18a103d..60862d4d3 100644 --- a/evm_arithmetization/src/fixed_recursive_verifier.rs +++ b/evm_arithmetization/src/fixed_recursive_verifier.rs @@ -1999,14 +1999,18 @@ fn shrinking_config() -> CircuitConfig { /// Extracts the two-to-one block aggregation hash from a predefined location. pub fn extract_two_to_one_block_hash(public_inputs: &[T]) -> &[T; NUM_HASH_OUT_ELTS] { - public_inputs[0..NUM_HASH_OUT_ELTS] + const PV_HASH_INDEX_START: usize = 0; + const PV_HASH_INDEX_END: usize = PV_HASH_INDEX_START + NUM_HASH_OUT_ELTS; + public_inputs[PV_HASH_INDEX_START..PV_HASH_INDEX_END] .try_into() .expect("Public inputs vector was malformed.") } /// Extracts the two-to-one block aggregation hash from a predefined location. pub fn extract_block_public_values(public_inputs: &[T]) -> &[T; PublicValuesTarget::SIZE] { - public_inputs[0..PublicValuesTarget::SIZE] + const PV_INDEX_START: usize = 0; + const PV_INDEX_END: usize = PV_INDEX_START + PublicValuesTarget::SIZE; + public_inputs[PV_INDEX_START..PV_INDEX_END] .try_into() .expect("Public inputs vector was malformed.") }