Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
sai-deng committed Oct 8, 2024
1 parent 46c0684 commit a4715b7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion evm_arithmetization/src/fixed_recursive_verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3181,7 +3181,7 @@ mod tests {
all_circuits.prove_segment(
&all_stark,
&config,
payload.trim(),
payload,
&mut segment_data,
timing,
None,
Expand Down
11 changes: 7 additions & 4 deletions evm_arithmetization/src/testing_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use plonky2::field::goldilocks_field::GoldilocksField;

pub use crate::cpu::kernel::cancun_constants::*;
pub use crate::cpu::kernel::constants::global_exit_root::*;
use crate::generation::TrieInputs;
use crate::generation::{TrieInputs, TrimmedGenerationInputs};
use crate::proof::TrieRoots;
use crate::witness::operation::Operation;
use crate::{
Expand Down Expand Up @@ -219,15 +219,18 @@ fn empty_payload() -> Result<GenerationInputs> {
Ok(inputs)
}

pub fn segment_without_keccak() -> Result<(GenerationInputs, GenerationSegmentData)> {
pub fn segment_without_keccak() -> Result<(
TrimmedGenerationInputs<GoldilocksField>,
GenerationSegmentData,
)> {
let payload = empty_payload()?;
let max_cpu_len_log = Some(7);
let mut segment_iterator =
SegmentDataIterator::<GoldilocksField>::new(&payload, max_cpu_len_log);
let (_, segment_data) = segment_iterator.next().unwrap()?;
let (trimmed_inputs, segment_data) = segment_iterator.next().unwrap()?;

let opcode_counts = &segment_data.opcode_counts;
assert!(!opcode_counts.contains_key(&Operation::KeccakGeneral));

Ok((payload, segment_data))
Ok((trimmed_inputs, segment_data))
}
6 changes: 3 additions & 3 deletions evm_arithmetization/tests/add11_yml.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ fn get_generation_inputs() -> GenerationInputs {
block_metadata.block_timestamp,
block_metadata.parent_beacon_block_root,
)
.unwrap();
.unwrap();
let beacon_roots_account =
beacon_roots_contract_from_storage(&beacon_roots_account_storage);

Expand All @@ -131,7 +131,7 @@ fn get_generation_inputs() -> GenerationInputs {
nibbles: Nibbles::from_h256_be(keccak([0u8; 32])),
value: vec![2],
})
.hash(),
.hash(),
..AccountRlp::default()
};

Expand Down Expand Up @@ -174,7 +174,7 @@ fn get_generation_inputs() -> GenerationInputs {
nibbles: Nibbles::from_str("0x80").unwrap(),
value: txn.to_vec(),
}
.into();
.into();

let trie_roots_after = TrieRoots {
state_root: expected_state_trie_after.hash(),
Expand Down
2 changes: 1 addition & 1 deletion evm_arithmetization/tests/empty_tables.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ fn empty_tables() -> anyhow::Result<()> {
let proof = prove::<F, C, D>(
&all_stark,
&config,
payload.trim(),
payload,
&mut segment_data,
&mut timing,
None,
Expand Down

0 comments on commit a4715b7

Please sign in to comment.