Skip to content

Commit

Permalink
review: make offsets explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
einar-polygon committed Jul 8, 2024
1 parent 308f71f commit 27b6b22
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions evm_arithmetization/src/fixed_recursive_verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T>(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<T>(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.")
}
Expand Down

0 comments on commit 27b6b22

Please sign in to comment.