diff --git a/evm_arithmetization/src/cpu/kernel/asm/main.asm b/evm_arithmetization/src/cpu/kernel/asm/main.asm index 4ab55d456..e72c20ee6 100644 --- a/evm_arithmetization/src/cpu/kernel/asm/main.asm +++ b/evm_arithmetization/src/cpu/kernel/asm/main.asm @@ -220,18 +220,14 @@ global check_state_trie: %mstore_global_metadata(@GLOBAL_METADATA_STATE_TRIE_ROOT) PROVER_INPUT(trie_ptr::trie_data_size) -global debug_setting_the_trie_data_size: %mstore_global_metadata(@GLOBAL_METADATA_TRIE_DATA_SIZE) // stack: trie_data_len %set_initial_state_trie - // stack: delta_trie_data_len, trie_data_len -global debug_la_delta: - POP + // stack: trie_data_len PUSH @INITIAL_RLP_ADDR // stack: rlp_start, trie_data_len -global debug_trie_data_len: %mpt_hash_state_trie // stack: init_state_hash, trie_data_len @@ -239,8 +235,7 @@ global debug_trie_data_len: %mload_global_metadata(@GLOBAL_METADATA_STATE_TRIE_DIGEST_BEFORE) %assert_eq // Check that the stored trie data length is correct. - %mload_global_metadata(@GLOBAL_METADATA_TRIE_DATA_SIZE) -global debug_me_equivoque_en_el_trie_data_size: + %mload_global_metadata(@GLOBAL_METADATA_TRIE_DATA_SIZE) %assert_eq // We set a dummy value as an initial trie data length, diff --git a/evm_arithmetization/src/cpu/kernel/asm/mpt/linked_list/initial_tries.asm b/evm_arithmetization/src/cpu/kernel/asm/mpt/linked_list/initial_tries.asm index 9691c3248..be6b2c4dd 100644 --- a/evm_arithmetization/src/cpu/kernel/asm/mpt/linked_list/initial_tries.asm +++ b/evm_arithmetization/src/cpu/kernel/asm/mpt/linked_list/initial_tries.asm @@ -1,18 +1,13 @@ global set_initial_state_trie: - %get_trie_data_size PUSH set_initial_state_trie_after %first_initial_slot // Skip the first node. %mload_global_metadata(@GLOBAL_METADATA_STATE_TRIE_ROOT) %first_initial_account // Skip the first node. %jump(insert_all_initial_accounts) set_initial_state_trie_after: - //stack: new_state_root, trie_data_size + //stack: new_state_root %mstore_global_metadata(@GLOBAL_METADATA_STATE_TRIE_ROOT) - %get_trie_data_size - SUB -global debug_cuanta_mas_trie_data: - SWAP1 JUMP %macro set_initial_state_trie @@ -26,7 +21,7 @@ global debug_cuanta_mas_trie_data: // the accounts_linked_list starting at `account_ptr_ptr` as well as the // respective initial storage slots in `storage_ptr_ptr`. // Pre stack: account_ptr_ptr, root_ptr, storage_ptr_ptr, retdest -// Post stack: new_root_ptr. // shouldn't change +// Post stack: new_root_ptr. // The value of new_root_ptr shouldn't change global insert_all_initial_accounts: // stack: account_ptr_ptr, root_ptr, storage_ptr_ptr, retdest SWAP2 @@ -42,6 +37,7 @@ global insert_all_initial_accounts: DUP2 PUSH 64 DUP6 + // stack: root_ptr, nibbles, key, after_mpt_read, key, storage_ptr_ptr, root_ptr, account_ptr_ptr, retdest %jump(mpt_read) after_mpt_read: //stack: trie_account_ptr_ptr, key, storage_ptr_ptr, root_ptr, account_ptr_ptr, retdest @@ -114,15 +110,19 @@ insert_next_slot: // If the value is 0, then payload_ptr = 0, and we don't need to insert a value in the `TrieData` segment. DUP1 ISZERO %jumpi(insert_with_payload_ptr) %get_trie_data_size // payload_ptr - SWAP1 %append_to_trie_data // append the value to the trie data segment + SWAP1 + %append_to_trie_data // append the value to the trie data segment insert_with_payload_ptr: - %stack (payload_ptr, key, addr, storage_ptr_ptr, root_ptr) -> (root_ptr, 64, key, payload_ptr, after_insert_slot, storage_ptr_ptr, addr) - %jump(mpt_insert) + %stack + (payload_ptr, key, addr, storage_ptr_ptr, root_ptr) -> + (root_ptr, 64, key, after_insert_slot, payload_ptr, storage_ptr_ptr, addr, root_ptr) + %jump(mpt_read) after_insert_slot: - // stack: root_ptr', storage_ptr_ptr, addr, retdest - SWAP1 + // stack: slot_ptr_ptr, payload_ptr, storage_ptr_ptr, addr, root_ptr, retdest + %mstore_trie_data + // stack: storage_ptr_ptr, addr, root_ptr, retdest %next_initial_slot - // stack: storage_ptr_ptr', root_ptr', addr - %stack (storage_ptr_ptr_p, root_ptr_p, addr) -> (addr, storage_ptr_ptr_p, root_ptr_p) + // stack: storage_ptr_ptr', addr, root_ptr, retdest + SWAP1 %jump(insert_all_initial_slots) diff --git a/trace_decoder/tests/simulate-execution.rs b/trace_decoder/tests/simulate-execution.rs index 33cc0208a..080a02c62 100644 --- a/trace_decoder/tests/simulate-execution.rs +++ b/trace_decoder/tests/simulate-execution.rs @@ -6,7 +6,6 @@ mod common; use anyhow::Context as _; use common::{cases, Case}; -use evm_arithmetization::testing_utils::init_logger; use libtest_mimic::{Arguments, Trial}; use plonky2::field::goldilocks_field::GoldilocksField; @@ -24,19 +23,16 @@ fn main() -> anyhow::Result<()> { format!("error in `trace_decoder` for {name} at batch size {batch_size}"), )?; for (ix, gi) in gen_inputs.into_iter().enumerate() { - if ix == 0 && batch_size == 1 && name == "b19807080_main" { - trials.push(Trial::test( - format!("{name}@{batch_size}/{ix}"), - move || { - init_logger(); - evm_arithmetization::prover::testing::simulate_execution_all_segments::< + trials.push(Trial::test( + format!("{name}@{batch_size}/{ix}"), + move || { + evm_arithmetization::prover::testing::simulate_execution_all_segments::< GoldilocksField, >(gi, 19) .map_err(|e| format!("{e:?}"))?; // get the full error chain - Ok(()) - }, - )) - } + Ok(()) + }, + )) } } }