From d9840d4bb5fc9d9e9a19b7278ea6d34eead13bd3 Mon Sep 17 00:00:00 2001 From: Robin Salen Date: Tue, 16 Jul 2024 10:23:48 -0400 Subject: [PATCH] Remove unrelated changes --- Cargo.lock | 1 - .../src/cpu/kernel/asm/core/access_lists.asm | 1 - .../src/cpu/kernel/asm/core/nonce.asm | 3 +-- .../src/cpu/kernel/asm/core/process_txn.asm | 3 +-- .../src/cpu/kernel/asm/journal/account_destroyed.asm | 5 +++-- evm_arithmetization/src/cpu/kernel/asm/main.asm | 12 ++++-------- .../src/cpu/kernel/asm/mpt/delete/delete.asm | 1 - .../src/cpu/kernel/asm/mpt/hash/hash.asm | 1 - .../src/cpu/kernel/asm/mpt/storage/storage_read.asm | 8 -------- .../cpu/kernel/asm/transactions/common_decoding.asm | 3 +-- evm_arithmetization/tests/erc721.rs | 1 - trace_decoder/Cargo.toml | 3 --- 12 files changed, 10 insertions(+), 32 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cb62deaf7..4c1f122b0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5109,7 +5109,6 @@ dependencies = [ "keccak-hash 0.10.0", "log", "mpt_trie", - "plonky2", "pretty_env_logger", "rlp", "serde", diff --git a/evm_arithmetization/src/cpu/kernel/asm/core/access_lists.asm b/evm_arithmetization/src/cpu/kernel/asm/core/access_lists.asm index fea9c2ebf..552cbc7d8 100644 --- a/evm_arithmetization/src/cpu/kernel/asm/core/access_lists.asm +++ b/evm_arithmetization/src/cpu/kernel/asm/core/access_lists.asm @@ -274,7 +274,6 @@ global insert_accessed_storage_keys: %jump_neq_const(@U256_MAX, storage_key_found) // The storage key is not in the list. PANIC - storage_key_found: // The address was already in the list // stack: pred_ptr, addr, key, retdest diff --git a/evm_arithmetization/src/cpu/kernel/asm/core/nonce.asm b/evm_arithmetization/src/cpu/kernel/asm/core/nonce.asm index dd763f08f..48486be9e 100644 --- a/evm_arithmetization/src/cpu/kernel/asm/core/nonce.asm +++ b/evm_arithmetization/src/cpu/kernel/asm/core/nonce.asm @@ -27,8 +27,7 @@ global increment_nonce: // stack: account_ptr, address, retdest DUP1 ISZERO %jumpi(increment_nonce_no_such_account) // stack: nonce_ptr, address, retdest - DUP1 - %mload_trie_data + DUP1 %mload_trie_data // stack: nonce, nonce_ptr, address, retdest DUP1 DUP4 %journal_add_nonce_change // stack: nonce, nonce_ptr, address, retdest diff --git a/evm_arithmetization/src/cpu/kernel/asm/core/process_txn.asm b/evm_arithmetization/src/cpu/kernel/asm/core/process_txn.asm index 28932f80b..e457c34b1 100644 --- a/evm_arithmetization/src/cpu/kernel/asm/core/process_txn.asm +++ b/evm_arithmetization/src/cpu/kernel/asm/core/process_txn.asm @@ -36,8 +36,7 @@ global process_normalized_txn: // stack: sender, retdest // Assert sender has no code. - DUP1 %ext_code_empty - %assert_nonzero(invalid_txn_1) + DUP1 %ext_code_empty %assert_nonzero(invalid_txn_1) // stack: sender, retdest // Assert sender balance >= gas_limit * gas_price + value. diff --git a/evm_arithmetization/src/cpu/kernel/asm/journal/account_destroyed.asm b/evm_arithmetization/src/cpu/kernel/asm/journal/account_destroyed.asm index d5dd70f81..63679455b 100644 --- a/evm_arithmetization/src/cpu/kernel/asm/journal/account_destroyed.asm +++ b/evm_arithmetization/src/cpu/kernel/asm/journal/account_destroyed.asm @@ -22,7 +22,8 @@ revert_account_destroyed_contd: %assert_nonzero %add_const(1) // stack: target_balance_ptr, address, prev_balance, retdest - DUP3 DUP2 %mload_trie_data + DUP3 + DUP2 %mload_trie_data // stack: target_balance, prev_balance, target_balance_ptr, address, prev_balance, retdest SUB SWAP1 %mstore_trie_data // stack: address, prev_balance, retdest @@ -33,4 +34,4 @@ revert_account_destroyed_contd: // stack: account_balance_payload_ptr, prev_balance, retdest %mstore_trie_data JUMP - + diff --git a/evm_arithmetization/src/cpu/kernel/asm/main.asm b/evm_arithmetization/src/cpu/kernel/asm/main.asm index a03050fe0..6bb3d94af 100644 --- a/evm_arithmetization/src/cpu/kernel/asm/main.asm +++ b/evm_arithmetization/src/cpu/kernel/asm/main.asm @@ -157,12 +157,9 @@ global execute_withdrawals: global perform_final_checks: // stack: cum_gas, txn_counter, num_nibbles, txn_nb // Check that we end up with the correct `cum_gas`, `txn_nb` and bloom filter. - %mload_global_metadata(@GLOBAL_METADATA_BLOCK_GAS_USED_AFTER) - %assert_eq - - - DUP3 %mload_global_metadata(@GLOBAL_METADATA_TXN_NUMBER_AFTER) - %assert_eq + %mload_global_metadata(@GLOBAL_METADATA_BLOCK_GAS_USED_AFTER) %assert_eq + DUP3 + %mload_global_metadata(@GLOBAL_METADATA_TXN_NUMBER_AFTER) %assert_eq %pop3 PROVER_INPUT(trie_ptr::state) @@ -180,8 +177,7 @@ global perform_final_checks: global check_state_trie: %set_final_tries - %mpt_hash_state_trie %mload_global_metadata(@GLOBAL_METADATA_STATE_TRIE_DIGEST_AFTER) - %assert_eq + %mpt_hash_state_trie %mload_global_metadata(@GLOBAL_METADATA_STATE_TRIE_DIGEST_AFTER) %assert_eq global check_txn_trie: %mpt_hash_txn_trie %mload_global_metadata(@GLOBAL_METADATA_TXN_TRIE_DIGEST_AFTER) %assert_eq global check_receipt_trie: diff --git a/evm_arithmetization/src/cpu/kernel/asm/mpt/delete/delete.asm b/evm_arithmetization/src/cpu/kernel/asm/mpt/delete/delete.asm index 6fb4f4162..ffef18bbf 100644 --- a/evm_arithmetization/src/cpu/kernel/asm/mpt/delete/delete.asm +++ b/evm_arithmetization/src/cpu/kernel/asm/mpt/delete/delete.asm @@ -15,7 +15,6 @@ global mpt_delete: DUP1 %eq_const(@MPT_NODE_EXTENSION) %jumpi(mpt_delete_extension) DUP1 %eq_const(@MPT_NODE_LEAF) %jumpi(mpt_delete_leaf) %eq_const(@MPT_NODE_EMPTY) %jumpi(panic) // This should never happen. - PANIC mpt_delete_leaf: diff --git a/evm_arithmetization/src/cpu/kernel/asm/mpt/hash/hash.asm b/evm_arithmetization/src/cpu/kernel/asm/mpt/hash/hash.asm index 652b9f22f..e2c460d1a 100644 --- a/evm_arithmetization/src/cpu/kernel/asm/mpt/hash/hash.asm +++ b/evm_arithmetization/src/cpu/kernel/asm/mpt/hash/hash.asm @@ -74,7 +74,6 @@ global encode_or_hash_node: SWAP2 %add_const(2) %stack (cur_len, encode_value, hash, retdest) -> (retdest, hash, 32, cur_len) JUMP - encode_or_hash_concrete_node: %stack (node_type, node_ptr, encode_value, cur_len) -> (node_type, node_ptr, encode_value, cur_len, maybe_hash_node) %jump(encode_node) diff --git a/evm_arithmetization/src/cpu/kernel/asm/mpt/storage/storage_read.asm b/evm_arithmetization/src/cpu/kernel/asm/mpt/storage/storage_read.asm index 983b2ac43..d4a7ca36a 100644 --- a/evm_arithmetization/src/cpu/kernel/asm/mpt/storage/storage_read.asm +++ b/evm_arithmetization/src/cpu/kernel/asm/mpt/storage/storage_read.asm @@ -12,14 +12,6 @@ global sload_current: // Storage key not found. Return default value_ptr = 0, // which derefs to 0 since @SEGMENT_TRIE_DATA[0] = 0. %stack (value_ptr, retdest) -> (retdest, 0) - - JUMP - -storage_key_exists: - // stack: value_ptr, retdest - %mload_trie_data - // stack: value, retdest - SWAP1 JUMP // Read a word from the current account's storage trie. diff --git a/evm_arithmetization/src/cpu/kernel/asm/transactions/common_decoding.asm b/evm_arithmetization/src/cpu/kernel/asm/transactions/common_decoding.asm index c9ce645d4..49caffe87 100644 --- a/evm_arithmetization/src/cpu/kernel/asm/transactions/common_decoding.asm +++ b/evm_arithmetization/src/cpu/kernel/asm/transactions/common_decoding.asm @@ -253,10 +253,9 @@ sload_with_addr: // Storage key not found. Return default value_ptr = 0, // which derefs to 0 since @SEGMENT_TRIE_DATA[0] = 0. %stack (value_ptr, retdest) -> (retdest, 0) - JUMP -storage_key_exists: +global storage_key_exists: // stack: value_ptr, retdest %mload_trie_data // stack: value, retdest diff --git a/evm_arithmetization/tests/erc721.rs b/evm_arithmetization/tests/erc721.rs index 49df40747..53a05e365 100644 --- a/evm_arithmetization/tests/erc721.rs +++ b/evm_arithmetization/tests/erc721.rs @@ -177,7 +177,6 @@ fn test_erc721() -> anyhow::Result<()> { }; let max_cpu_len_log = 20; - let mut timing = TimingTree::new("prove", log::Level::Debug); let proofs = prove_all_segments::( diff --git a/trace_decoder/Cargo.toml b/trace_decoder/Cargo.toml index 75d21b804..0155e8126 100644 --- a/trace_decoder/Cargo.toml +++ b/trace_decoder/Cargo.toml @@ -21,9 +21,6 @@ rlp = { workspace = true } serde = { workspace = true } serde_with = { workspace = true } thiserror = { workspace = true } -serde_json = { workspace = true } -plonky2 = { workspace = true } - # Local dependencies mpt_trie = { workspace = true }