diff --git a/ethereum/circuits/lib/src/account_int_test.nr b/ethereum/circuits/lib/src/account_int_test.nr index 8714f64b..571c63c0 100644 --- a/ethereum/circuits/lib/src/account_int_test.nr +++ b/ethereum/circuits/lib/src/account_int_test.nr @@ -4,13 +4,13 @@ use crate::fixtures::mainnet::{ paris::{ usdc_circle::{ header::{number, state_root, block_header_partial, block_header_rlp}, account::{account, address}, - state_proof_new::proof_input_serialized as state_proof_input_serialized + state_proof::proof_input_serialized as state_proof_input_serialized } }, london::vitalik_balance::{ account::{account as account_from_different_header, address as address_from_different_header}, header::state_root as state_root_from_different_header, - state_proof_new::proof_input_serialized as state_proof_input_from_different_header_serialized + state_proof::proof_input_serialized as state_proof_input_from_different_header_serialized } }; use dep::std::test::OracleMock; diff --git a/ethereum/circuits/lib/src/account_with_storage_int_test.nr b/ethereum/circuits/lib/src/account_with_storage_int_test.nr index c98b742f..482ce775 100644 --- a/ethereum/circuits/lib/src/account_with_storage_int_test.nr +++ b/ethereum/circuits/lib/src/account_with_storage_int_test.nr @@ -5,8 +5,8 @@ use crate::fixtures::mainnet::{ paris::{ usdc_circle::{ header::{number, block_header_partial, block_header_rlp}, account::{account, address}, - state_proof_new::proof_input_serialized as state_proof_input_serialized, - storage_proof_new::proofs_serialized, storage::{values, keys as storage_keys} + state_proof::proof_input_serialized as state_proof_input_serialized, + storage_proof::proofs_serialized, storage::{values, keys as storage_keys} }, usdc_uniswap::{storage::keys as usdc_uniswap_storage_keys} }, @@ -17,7 +17,7 @@ use crate::fixtures::mainnet::{ block_header_rlp as crypto_punks_block_header_rlp, number as crypto_punks_number }, account::{address as crypto_punks_address, account as crypto_punks_account}, - state_proof_new::proof_input_serialized as crypto_punks_state_proof_input_serialized + state_proof::proof_input_serialized as crypto_punks_state_proof_input_serialized } } }; diff --git a/ethereum/circuits/lib/src/fixtures/mainnet/cancun/approve.nr b/ethereum/circuits/lib/src/fixtures/mainnet/cancun/approve.nr index 8e33599d..8ef15d87 100644 --- a/ethereum/circuits/lib/src/fixtures/mainnet/cancun/approve.nr +++ b/ethereum/circuits/lib/src/fixtures/mainnet/cancun/approve.nr @@ -1,6 +1,6 @@ mod header; -mod receipt_proof_new; +mod receipt_proof; mod receipt; mod transaction; -mod transaction_proof_new; +mod transaction_proof; mod log; diff --git a/ethereum/circuits/lib/src/fixtures/mainnet/cancun/approve/receipt_proof_new.nr b/ethereum/circuits/lib/src/fixtures/mainnet/cancun/approve/receipt_proof.nr similarity index 100% rename from ethereum/circuits/lib/src/fixtures/mainnet/cancun/approve/receipt_proof_new.nr rename to ethereum/circuits/lib/src/fixtures/mainnet/cancun/approve/receipt_proof.nr diff --git a/ethereum/circuits/lib/src/fixtures/mainnet/cancun/approve/transaction_proof_new.nr b/ethereum/circuits/lib/src/fixtures/mainnet/cancun/approve/transaction_proof.nr similarity index 100% rename from ethereum/circuits/lib/src/fixtures/mainnet/cancun/approve/transaction_proof_new.nr rename to ethereum/circuits/lib/src/fixtures/mainnet/cancun/approve/transaction_proof.nr diff --git a/ethereum/circuits/lib/src/fixtures/mainnet/cancun/small_block.nr b/ethereum/circuits/lib/src/fixtures/mainnet/cancun/small_block.nr index 8e33599d..8ef15d87 100644 --- a/ethereum/circuits/lib/src/fixtures/mainnet/cancun/small_block.nr +++ b/ethereum/circuits/lib/src/fixtures/mainnet/cancun/small_block.nr @@ -1,6 +1,6 @@ mod header; -mod receipt_proof_new; +mod receipt_proof; mod receipt; mod transaction; -mod transaction_proof_new; +mod transaction_proof; mod log; diff --git a/ethereum/circuits/lib/src/fixtures/mainnet/cancun/small_block/receipt_proof_new.nr b/ethereum/circuits/lib/src/fixtures/mainnet/cancun/small_block/receipt_proof.nr similarity index 100% rename from ethereum/circuits/lib/src/fixtures/mainnet/cancun/small_block/receipt_proof_new.nr rename to ethereum/circuits/lib/src/fixtures/mainnet/cancun/small_block/receipt_proof.nr diff --git a/ethereum/circuits/lib/src/fixtures/mainnet/cancun/small_block/transaction_proof_new.nr b/ethereum/circuits/lib/src/fixtures/mainnet/cancun/small_block/transaction_proof.nr similarity index 100% rename from ethereum/circuits/lib/src/fixtures/mainnet/cancun/small_block/transaction_proof_new.nr rename to ethereum/circuits/lib/src/fixtures/mainnet/cancun/small_block/transaction_proof.nr diff --git a/ethereum/circuits/lib/src/fixtures/mainnet/cancun/transfer.nr b/ethereum/circuits/lib/src/fixtures/mainnet/cancun/transfer.nr index 1cfc0d2c..6549b333 100644 --- a/ethereum/circuits/lib/src/fixtures/mainnet/cancun/transfer.nr +++ b/ethereum/circuits/lib/src/fixtures/mainnet/cancun/transfer.nr @@ -1,4 +1,4 @@ -mod receipt_proof_new; +mod receipt_proof; mod receipt; mod transaction; -mod transaction_proof_new; +mod transaction_proof; diff --git a/ethereum/circuits/lib/src/fixtures/mainnet/cancun/transfer/receipt_proof_new.nr b/ethereum/circuits/lib/src/fixtures/mainnet/cancun/transfer/receipt_proof.nr similarity index 100% rename from ethereum/circuits/lib/src/fixtures/mainnet/cancun/transfer/receipt_proof_new.nr rename to ethereum/circuits/lib/src/fixtures/mainnet/cancun/transfer/receipt_proof.nr diff --git a/ethereum/circuits/lib/src/fixtures/mainnet/cancun/transfer/transaction_proof_new.nr b/ethereum/circuits/lib/src/fixtures/mainnet/cancun/transfer/transaction_proof.nr similarity index 100% rename from ethereum/circuits/lib/src/fixtures/mainnet/cancun/transfer/transaction_proof_new.nr rename to ethereum/circuits/lib/src/fixtures/mainnet/cancun/transfer/transaction_proof.nr diff --git a/ethereum/circuits/lib/src/fixtures/mainnet/frontier/first.nr b/ethereum/circuits/lib/src/fixtures/mainnet/frontier/first.nr index 0f7a3291..f9b385bb 100644 --- a/ethereum/circuits/lib/src/fixtures/mainnet/frontier/first.nr +++ b/ethereum/circuits/lib/src/fixtures/mainnet/frontier/first.nr @@ -1,3 +1,3 @@ mod header; mod account; -mod state_proof_new; +mod state_proof; diff --git a/ethereum/circuits/lib/src/fixtures/mainnet/frontier/first/state_proof_new.nr b/ethereum/circuits/lib/src/fixtures/mainnet/frontier/first/state_proof.nr similarity index 100% rename from ethereum/circuits/lib/src/fixtures/mainnet/frontier/first/state_proof_new.nr rename to ethereum/circuits/lib/src/fixtures/mainnet/frontier/first/state_proof.nr diff --git a/ethereum/circuits/lib/src/fixtures/mainnet/frontier/zero.nr b/ethereum/circuits/lib/src/fixtures/mainnet/frontier/zero.nr index 0f7a3291..f9b385bb 100644 --- a/ethereum/circuits/lib/src/fixtures/mainnet/frontier/zero.nr +++ b/ethereum/circuits/lib/src/fixtures/mainnet/frontier/zero.nr @@ -1,3 +1,3 @@ mod header; mod account; -mod state_proof_new; +mod state_proof; diff --git a/ethereum/circuits/lib/src/fixtures/mainnet/frontier/zero/state_proof_new.nr b/ethereum/circuits/lib/src/fixtures/mainnet/frontier/zero/state_proof.nr similarity index 100% rename from ethereum/circuits/lib/src/fixtures/mainnet/frontier/zero/state_proof_new.nr rename to ethereum/circuits/lib/src/fixtures/mainnet/frontier/zero/state_proof.nr diff --git a/ethereum/circuits/lib/src/fixtures/mainnet/homestead/fork.nr b/ethereum/circuits/lib/src/fixtures/mainnet/homestead/fork.nr index 00a6e3d0..a657b648 100644 --- a/ethereum/circuits/lib/src/fixtures/mainnet/homestead/fork.nr +++ b/ethereum/circuits/lib/src/fixtures/mainnet/homestead/fork.nr @@ -1,5 +1,5 @@ mod header; -mod receipt_proof_new; +mod receipt_proof; mod receipt; mod transaction; -mod transaction_proof_new; +mod transaction_proof; diff --git a/ethereum/circuits/lib/src/fixtures/mainnet/homestead/fork/receipt_proof_new.nr b/ethereum/circuits/lib/src/fixtures/mainnet/homestead/fork/receipt_proof.nr similarity index 100% rename from ethereum/circuits/lib/src/fixtures/mainnet/homestead/fork/receipt_proof_new.nr rename to ethereum/circuits/lib/src/fixtures/mainnet/homestead/fork/receipt_proof.nr diff --git a/ethereum/circuits/lib/src/fixtures/mainnet/homestead/fork/transaction_proof_new.nr b/ethereum/circuits/lib/src/fixtures/mainnet/homestead/fork/transaction_proof.nr similarity index 100% rename from ethereum/circuits/lib/src/fixtures/mainnet/homestead/fork/transaction_proof_new.nr rename to ethereum/circuits/lib/src/fixtures/mainnet/homestead/fork/transaction_proof.nr diff --git a/ethereum/circuits/lib/src/fixtures/mainnet/london/crypto_punks.nr b/ethereum/circuits/lib/src/fixtures/mainnet/london/crypto_punks.nr index 665f885b..6ad90f0e 100644 --- a/ethereum/circuits/lib/src/fixtures/mainnet/london/crypto_punks.nr +++ b/ethereum/circuits/lib/src/fixtures/mainnet/london/crypto_punks.nr @@ -1,5 +1,5 @@ mod header; mod account; -mod state_proof_new; +mod state_proof; mod storage; -mod storage_proof_new; +mod storage_proof; diff --git a/ethereum/circuits/lib/src/fixtures/mainnet/london/crypto_punks/state_proof_new.nr b/ethereum/circuits/lib/src/fixtures/mainnet/london/crypto_punks/state_proof.nr similarity index 100% rename from ethereum/circuits/lib/src/fixtures/mainnet/london/crypto_punks/state_proof_new.nr rename to ethereum/circuits/lib/src/fixtures/mainnet/london/crypto_punks/state_proof.nr diff --git a/ethereum/circuits/lib/src/fixtures/mainnet/london/crypto_punks/storage_proof_new.nr b/ethereum/circuits/lib/src/fixtures/mainnet/london/crypto_punks/storage_proof.nr similarity index 100% rename from ethereum/circuits/lib/src/fixtures/mainnet/london/crypto_punks/storage_proof_new.nr rename to ethereum/circuits/lib/src/fixtures/mainnet/london/crypto_punks/storage_proof.nr diff --git a/ethereum/circuits/lib/src/fixtures/mainnet/london/vitalik_balance.nr b/ethereum/circuits/lib/src/fixtures/mainnet/london/vitalik_balance.nr index 0f7a3291..f9b385bb 100644 --- a/ethereum/circuits/lib/src/fixtures/mainnet/london/vitalik_balance.nr +++ b/ethereum/circuits/lib/src/fixtures/mainnet/london/vitalik_balance.nr @@ -1,3 +1,3 @@ mod header; mod account; -mod state_proof_new; +mod state_proof; diff --git a/ethereum/circuits/lib/src/fixtures/mainnet/london/vitalik_balance/state_proof_new.nr b/ethereum/circuits/lib/src/fixtures/mainnet/london/vitalik_balance/state_proof.nr similarity index 100% rename from ethereum/circuits/lib/src/fixtures/mainnet/london/vitalik_balance/state_proof_new.nr rename to ethereum/circuits/lib/src/fixtures/mainnet/london/vitalik_balance/state_proof.nr diff --git a/ethereum/circuits/lib/src/fixtures/mainnet/paris/bored_ape_yacht_club.nr b/ethereum/circuits/lib/src/fixtures/mainnet/paris/bored_ape_yacht_club.nr index 665f885b..6ad90f0e 100644 --- a/ethereum/circuits/lib/src/fixtures/mainnet/paris/bored_ape_yacht_club.nr +++ b/ethereum/circuits/lib/src/fixtures/mainnet/paris/bored_ape_yacht_club.nr @@ -1,5 +1,5 @@ mod header; mod account; -mod state_proof_new; +mod state_proof; mod storage; -mod storage_proof_new; +mod storage_proof; diff --git a/ethereum/circuits/lib/src/fixtures/mainnet/paris/bored_ape_yacht_club/state_proof_new.nr b/ethereum/circuits/lib/src/fixtures/mainnet/paris/bored_ape_yacht_club/state_proof.nr similarity index 100% rename from ethereum/circuits/lib/src/fixtures/mainnet/paris/bored_ape_yacht_club/state_proof_new.nr rename to ethereum/circuits/lib/src/fixtures/mainnet/paris/bored_ape_yacht_club/state_proof.nr diff --git a/ethereum/circuits/lib/src/fixtures/mainnet/paris/bored_ape_yacht_club/storage_proof_new.nr b/ethereum/circuits/lib/src/fixtures/mainnet/paris/bored_ape_yacht_club/storage_proof.nr similarity index 100% rename from ethereum/circuits/lib/src/fixtures/mainnet/paris/bored_ape_yacht_club/storage_proof_new.nr rename to ethereum/circuits/lib/src/fixtures/mainnet/paris/bored_ape_yacht_club/storage_proof.nr diff --git a/ethereum/circuits/lib/src/fixtures/mainnet/paris/nouns.nr b/ethereum/circuits/lib/src/fixtures/mainnet/paris/nouns.nr index 665f885b..6ad90f0e 100644 --- a/ethereum/circuits/lib/src/fixtures/mainnet/paris/nouns.nr +++ b/ethereum/circuits/lib/src/fixtures/mainnet/paris/nouns.nr @@ -1,5 +1,5 @@ mod header; mod account; -mod state_proof_new; +mod state_proof; mod storage; -mod storage_proof_new; +mod storage_proof; diff --git a/ethereum/circuits/lib/src/fixtures/mainnet/paris/nouns/state_proof_new.nr b/ethereum/circuits/lib/src/fixtures/mainnet/paris/nouns/state_proof.nr similarity index 100% rename from ethereum/circuits/lib/src/fixtures/mainnet/paris/nouns/state_proof_new.nr rename to ethereum/circuits/lib/src/fixtures/mainnet/paris/nouns/state_proof.nr diff --git a/ethereum/circuits/lib/src/fixtures/mainnet/paris/nouns/storage_proof_new.nr b/ethereum/circuits/lib/src/fixtures/mainnet/paris/nouns/storage_proof.nr similarity index 100% rename from ethereum/circuits/lib/src/fixtures/mainnet/paris/nouns/storage_proof_new.nr rename to ethereum/circuits/lib/src/fixtures/mainnet/paris/nouns/storage_proof.nr diff --git a/ethereum/circuits/lib/src/fixtures/mainnet/paris/usdc_circle.nr b/ethereum/circuits/lib/src/fixtures/mainnet/paris/usdc_circle.nr index 665f885b..6ad90f0e 100644 --- a/ethereum/circuits/lib/src/fixtures/mainnet/paris/usdc_circle.nr +++ b/ethereum/circuits/lib/src/fixtures/mainnet/paris/usdc_circle.nr @@ -1,5 +1,5 @@ mod header; mod account; -mod state_proof_new; +mod state_proof; mod storage; -mod storage_proof_new; +mod storage_proof; diff --git a/ethereum/circuits/lib/src/fixtures/mainnet/paris/usdc_circle/state_proof_new.nr b/ethereum/circuits/lib/src/fixtures/mainnet/paris/usdc_circle/state_proof.nr similarity index 100% rename from ethereum/circuits/lib/src/fixtures/mainnet/paris/usdc_circle/state_proof_new.nr rename to ethereum/circuits/lib/src/fixtures/mainnet/paris/usdc_circle/state_proof.nr diff --git a/ethereum/circuits/lib/src/fixtures/mainnet/paris/usdc_circle/storage_proof_new.nr b/ethereum/circuits/lib/src/fixtures/mainnet/paris/usdc_circle/storage_proof.nr similarity index 100% rename from ethereum/circuits/lib/src/fixtures/mainnet/paris/usdc_circle/storage_proof_new.nr rename to ethereum/circuits/lib/src/fixtures/mainnet/paris/usdc_circle/storage_proof.nr diff --git a/ethereum/circuits/lib/src/fixtures/mainnet/paris/usdc_uniswap.nr b/ethereum/circuits/lib/src/fixtures/mainnet/paris/usdc_uniswap.nr index f35aa9d5..fbc68137 100644 --- a/ethereum/circuits/lib/src/fixtures/mainnet/paris/usdc_uniswap.nr +++ b/ethereum/circuits/lib/src/fixtures/mainnet/paris/usdc_uniswap.nr @@ -1,4 +1,4 @@ mod account; -mod state_proof_new; +mod state_proof; mod storage; -mod storage_proof_new; +mod storage_proof; diff --git a/ethereum/circuits/lib/src/fixtures/mainnet/paris/usdc_uniswap/state_proof_new.nr b/ethereum/circuits/lib/src/fixtures/mainnet/paris/usdc_uniswap/state_proof.nr similarity index 100% rename from ethereum/circuits/lib/src/fixtures/mainnet/paris/usdc_uniswap/state_proof_new.nr rename to ethereum/circuits/lib/src/fixtures/mainnet/paris/usdc_uniswap/state_proof.nr diff --git a/ethereum/circuits/lib/src/fixtures/mainnet/paris/usdc_uniswap/storage_proof_new.nr b/ethereum/circuits/lib/src/fixtures/mainnet/paris/usdc_uniswap/storage_proof.nr similarity index 100% rename from ethereum/circuits/lib/src/fixtures/mainnet/paris/usdc_uniswap/storage_proof_new.nr rename to ethereum/circuits/lib/src/fixtures/mainnet/paris/usdc_uniswap/storage_proof.nr diff --git a/ethereum/circuits/lib/src/log_int_test.nr b/ethereum/circuits/lib/src/log_int_test.nr index a30a6bf2..79999efe 100644 --- a/ethereum/circuits/lib/src/log_int_test.nr +++ b/ethereum/circuits/lib/src/log_int_test.nr @@ -7,7 +7,7 @@ use crate::{ small_block::{ header::{number, block_header_partial, block_header_rlp, hash}, receipt::{tx_type, foreign_call_receipt}, transaction::tx_idx, - receipt_proof_new::proof_input_serialized, log::{log_idx, log} + receipt_proof::proof_input_serialized, log::{log_idx, log} }, approve::header::{block_header_partial as another_block_header_partial, block_header_rlp as another_block_header_rlp} } diff --git a/ethereum/circuits/lib/src/merkle_patricia_proofs/proof_test.nr b/ethereum/circuits/lib/src/merkle_patricia_proofs/proof_test.nr index 15749aaa..7d5100ef 100644 --- a/ethereum/circuits/lib/src/merkle_patricia_proofs/proof_test.nr +++ b/ethereum/circuits/lib/src/merkle_patricia_proofs/proof_test.nr @@ -355,24 +355,24 @@ mod verify_merkle_proof { use crate::fixtures::mainnet::{ homestead::fork::{ header::receipts_root as homestead_receipts_root, - receipt_proof_new::proof_input as homestead_receipt_proof_input, + receipt_proof::proof_input as homestead_receipt_proof_input, header::transactions_root as homestead_transactions_root, - transaction_proof_new::proof_input as homestead_transaction_proof_input + transaction_proof::proof_input as homestead_transaction_proof_input }, cancun::small_block::{ header::receipts_root as cancun_receipts_root, - receipt_proof_new::proof_input as cancun_receipt_proof_input, + receipt_proof::proof_input as cancun_receipt_proof_input, header::transactions_root as cancun_transactions_root, - transaction_proof_new::proof_input as cancun_transaction_proof_input + transaction_proof::proof_input as cancun_transaction_proof_input }, - london::crypto_punks::{state_proof_new::proof_input as london_state_proof_input, header::state_root as london_state_root}, - paris::bored_ape_yacht_club::{state_proof_new::proof_input as paris_state_proof_input, header::state_root as paris_state_root}, + london::crypto_punks::{state_proof::proof_input as london_state_proof_input, header::state_root as london_state_root}, + paris::bored_ape_yacht_club::{state_proof::proof_input as paris_state_proof_input, header::state_root as paris_state_root}, paris::usdc_circle::{ - storage_proof_new::proofs as paris_circle_storage_proof_inputs, + storage_proof::proofs as paris_circle_storage_proof_inputs, account::storage_root as paris_circle_storage_root }, paris::usdc_uniswap::{ - storage_proof_new::proofs as paris_uniswap_storage_proof_inputs, + storage_proof::proofs as paris_uniswap_storage_proof_inputs, account::storage_root as paris_uniswap_storage_root } }; diff --git a/ethereum/circuits/lib/src/receipt_int_test.nr b/ethereum/circuits/lib/src/receipt_int_test.nr index bbd8a94b..9d4aa6f3 100644 --- a/ethereum/circuits/lib/src/receipt_int_test.nr +++ b/ethereum/circuits/lib/src/receipt_int_test.nr @@ -3,7 +3,7 @@ use crate::fixtures::mainnet::{ cancun::small_block::{ header::{number, block_header_partial, block_header_rlp}, receipt::{tx_type, receipt, foreign_call_receipt}, transaction::tx_idx, - receipt_proof_new::proof_input_serialized + receipt_proof::proof_input_serialized }, cancun::approve::{ header::{ @@ -15,7 +15,7 @@ use crate::fixtures::mainnet::{ foreign_call_receipt as another_foreign_call_receipt }, transaction::tx_idx as another_tx_idx, - receipt_proof_new::proof_input_serialized as another_proof_input_serialized + receipt_proof::proof_input_serialized as another_proof_input_serialized } }; use dep::std::test::OracleMock; diff --git a/ethereum/circuits/lib/src/serde_test.nr b/ethereum/circuits/lib/src/serde_test.nr index 49c7b27b..fd672cf7 100644 --- a/ethereum/circuits/lib/src/serde_test.nr +++ b/ethereum/circuits/lib/src/serde_test.nr @@ -102,7 +102,7 @@ mod account_within_block { mod storage_within_block { use crate::serde::{STORAGE_BLOCK_LEN, ACCOUNT_LEN}; use crate::account_with_storage::StorageWithinBlock; - use crate::fixtures::mainnet::paris::usdc_circle::{account::account, header::hash, storage_proof_new::proofs, storage::values}; + use crate::fixtures::mainnet::paris::usdc_circle::{account::account, header::hash, storage_proof::proofs, storage::values}; use crate::misc::{types::BYTES32_LENGTH, arrays::sub_array_equals}; #[test] @@ -130,7 +130,7 @@ mod storage_within_block { } mod nodes { - use crate::fixtures::mainnet::cancun::small_block::receipt_proof_new::proof_input; + use crate::fixtures::mainnet::cancun::small_block::receipt_proof::proof_input; use crate::merkle_patricia_proofs::proof::MAX_NODE_LEN; use crate::misc::arrays::sub_array_equals; use crate::serde::{deserialize_receipt_nodes, serialize_receipt_nodes}; @@ -153,7 +153,7 @@ mod nodes { } mod proof { - use crate::fixtures::mainnet::cancun::small_block::receipt_proof_new::proof_input; + use crate::fixtures::mainnet::cancun::small_block::receipt_proof::proof_input; use crate::receipt::MAX_DEPTH_NO_LEAF as RECEIPT_MAX_DEPTH_NO_LEAF; use crate::serde::{Serde, serialize_receipt_nodes, RECEIPT_MAX_LEAF_LEN_M, RECEIPT_NODES_LEN}; use crate::merkle_patricia_proofs::proof::Proof; @@ -174,7 +174,7 @@ mod proof { } mod proof_input { - use crate::fixtures::mainnet::cancun::small_block::receipt_proof_new::proof_input; + use crate::fixtures::mainnet::cancun::small_block::receipt_proof::proof_input; use crate::receipt::{MAX_DEPTH_NO_LEAF as RECEIPT_MAX_DEPTH_NO_LEAF, MAX_LEAF_LEN_M as RECEIPT_MAX_LEAF_LEN_M}; use crate::serde::{Serde, RECEIPT_MAX_PREFIXED_KEY_NIBBLE_LEN, RECEIPT_MAX_VALUE_LEN_M}; use crate::misc::arrays::sub_array_equals; diff --git a/ethereum/circuits/lib/src/transaction_int_test.nr b/ethereum/circuits/lib/src/transaction_int_test.nr index 38144041..f5e634b3 100644 --- a/ethereum/circuits/lib/src/transaction_int_test.nr +++ b/ethereum/circuits/lib/src/transaction_int_test.nr @@ -3,7 +3,7 @@ use crate::fixtures::mainnet::{ cancun::small_block::{ header::{number, block_header_partial, block_header_rlp}, transaction::{tx_idx, tx_type, transaction, foreign_call_transaction}, - transaction_proof_new::proof_input_serialized + transaction_proof::proof_input_serialized }, homestead::fork::{ header::{ @@ -14,7 +14,7 @@ use crate::fixtures::mainnet::{ tx_idx as another_tx_idx, tx_type as another_tx_type, foreign_call_transaction as another_foreign_call_transaction }, - transaction_proof_new::proof_input_serialized as another_proof_input_serialized + transaction_proof::proof_input_serialized as another_proof_input_serialized } }; use dep::std::test::OracleMock; diff --git a/ethereum/circuits/lib/src/verifiers/account_test.nr b/ethereum/circuits/lib/src/verifiers/account_test.nr index d222e10b..13982e14 100644 --- a/ethereum/circuits/lib/src/verifiers/account_test.nr +++ b/ethereum/circuits/lib/src/verifiers/account_test.nr @@ -3,7 +3,7 @@ use crate::fixtures::{ mainnet::london::{ crypto_punks::{ account::{rlp_encoded_left_padded_account, account, address, balance, storage_root, code_hash, nonce}, - header::state_root, state_proof_new::proof_input as state_proof_input + header::state_root, state_proof::proof_input as state_proof_input } } }; diff --git a/ethereum/circuits/lib/src/verifiers/receipt_test.nr b/ethereum/circuits/lib/src/verifiers/receipt_test.nr index 7a87bf39..4b3d5c4d 100644 --- a/ethereum/circuits/lib/src/verifiers/receipt_test.nr +++ b/ethereum/circuits/lib/src/verifiers/receipt_test.nr @@ -2,7 +2,7 @@ use crate::fixtures::mainnet::{ cancun::{ small_block::{ receipt::{encoded_receipt, receipt, tx_type}, header::{number as block_number, receipts_root}, - receipt_proof_new::proof_input, transaction::tx_idx + receipt_proof::proof_input, transaction::tx_idx }, access_list::header::receipts_root as access_list_receipts_root }, @@ -12,7 +12,7 @@ use crate::fixtures::mainnet::{ receipt as pre_byzantium_receipt }, header::{number as pre_byzantium_block_number, receipts_root as pre_byzantium_receipt_root}, - receipt_proof_new::proof_input as pre_byzantium_receipt_proof_input + receipt_proof::proof_input as pre_byzantium_receipt_proof_input } }; use crate::verifiers::receipt::{BYZANTIUM_BLOCK_NUM, assert_receipt_equals, assert_receipt_rlp_equals, verify_receipt}; diff --git a/ethereum/circuits/lib/src/verifiers/storage_test.nr b/ethereum/circuits/lib/src/verifiers/storage_test.nr index 454fb7c0..6dd8618e 100644 --- a/ethereum/circuits/lib/src/verifiers/storage_test.nr +++ b/ethereum/circuits/lib/src/verifiers/storage_test.nr @@ -1,4 +1,4 @@ -use crate::fixtures::mainnet::paris::usdc_circle::{storage_proof_new::proofs, account::storage_root}; +use crate::fixtures::mainnet::paris::usdc_circle::{storage_proof::proofs, account::storage_root}; use crate::verifiers::storage::verify_storage_values; #[test] diff --git a/ethereum/circuits/lib/src/verifiers/transaction_test.nr b/ethereum/circuits/lib/src/verifiers/transaction_test.nr index 570db092..1c927a8f 100644 --- a/ethereum/circuits/lib/src/verifiers/transaction_test.nr +++ b/ethereum/circuits/lib/src/verifiers/transaction_test.nr @@ -32,7 +32,7 @@ mod verify_tx { use crate::misc::arrays::alter_array; use crate::fixtures::mainnet::{ cancun::small_block::{ - transaction::{transaction, encoded_tx, tx_type, tx_idx}, transaction_proof_new::proof_input, + transaction::{transaction, encoded_tx, tx_type, tx_idx}, transaction_proof::proof_input, header::transactions_root }, homestead::fork::{ @@ -40,7 +40,7 @@ mod verify_tx { transaction as legacy_transaction, encoded_tx as legacy_encoded_tx, tx_type as legacy_tx_type, tx_idx as legacy_tx_idx }, - transaction_proof_new::proof_input as legacy_proof_input, + transaction_proof::proof_input as legacy_proof_input, header::transactions_root as legacy_transactions_root } }; diff --git a/ethereum/oracles/src/script/noir_fixtures/new_proof.ts b/ethereum/oracles/src/script/noir_fixtures/new_proof.ts deleted file mode 100644 index 0ccba3c5..00000000 --- a/ethereum/oracles/src/script/noir_fixtures/new_proof.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { encodeHex } from '../../noir/oracles/common/encode.js'; -import { indentBlock, joinArray, joinArrayVertical } from '../../noir/noir_js/encode.js'; -import { padArray } from '../../util/array.js'; -import { MAX_TRIE_NODE_LEN, ZERO_PAD_VALUE } from '../../noir/oracles/common/const.js'; -import { Proof } from '../../ethereum/proof.js'; -import { Hex, padHex } from 'viem'; -import { ProofConfig } from '../../noir/oracles/rpc/common/proofConfig.js'; - -export function createNewTopLevelProofFixtureWithRoot(proof: Proof, root: Hex[], config: ProofConfig): string { - return `use crate::merkle_patricia_proofs::proof::{Proof, ProofInput}; - -global root = ${joinArray(root)}; - -global proof_input = ${createNewProofInputFixture(proof, config)}; -`; -} - -export function createNewTopLevelProofFixture(proof: Proof, config: ProofConfig): string { - return `use crate::merkle_patricia_proofs::proof::{Proof, ProofInput}; - -global proof_input = ${createNewProofInputFixture(proof, config)}; - -global proof_input_serialized = proof_input.serialize(); -`; -} - -export function createNewProofInputFixture(proof: Proof, config: ProofConfig): string { - const paddedKey = padHex(proof.key, { size: config.maxPrefixedKeyNibbleLen, dir: 'left' }); - const key = encodeHex(paddedKey); - const paddedValue = padHex(proof.value, { size: config.maxValueLen, dir: 'left' }); - const value = encodeHex(paddedValue); - - return `ProofInput {\n - key: ${indentBlock(joinArray(key), 1)}, - value: ${indentBlock(joinArray(value), 1)}, - - proof: ${indentBlock(createProofFixture(proof, config.maxProofDepth, config.maxLeafLen), 1)} -}`; -} - -function createProofFixture(proof: Proof, maxDepth: number, maxLeafLen: number): string { - const paddedNodes = padArray(proof.proof.slice(0, proof.proof.length - 1), maxDepth - 1, ZERO_PAD_VALUE); - const nodes = paddedNodes.map((node) => joinArray(padArray(encodeHex(node), MAX_TRIE_NODE_LEN, ZERO_PAD_VALUE))); - const leaf = padArray(encodeHex(proof.proof[proof.proof.length - 1]), maxLeafLen, ZERO_PAD_VALUE); - const depth = proof.proof.length; - - return `Proof { - nodes: ${indentBlock(joinArrayVertical(nodes), 1)}, - leaf: ${indentBlock(joinArray(leaf), 1)}, - depth: ${depth} -}`; -} diff --git a/ethereum/oracles/src/script/noir_fixtures/new_receipt_proof.ts b/ethereum/oracles/src/script/noir_fixtures/new_receipt_proof.ts deleted file mode 100644 index ef7652a7..00000000 --- a/ethereum/oracles/src/script/noir_fixtures/new_receipt_proof.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Proof } from '../../ethereum/proof.js'; -import { receiptProofConfigM } from '../../noir/oracles/rpc/common/proofConfig/receipt.js'; -import { createNewTopLevelProofFixture } from './new_proof.js'; - -export function createNewReceiptProofFixture(proof: Proof): string { - return createNewTopLevelProofFixture(proof, receiptProofConfigM); -} diff --git a/ethereum/oracles/src/script/noir_fixtures/new_state_proof.ts b/ethereum/oracles/src/script/noir_fixtures/new_state_proof.ts deleted file mode 100644 index cf048eb2..00000000 --- a/ethereum/oracles/src/script/noir_fixtures/new_state_proof.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { GetProofReturnType, keccak256 } from 'viem'; - -import { getValue } from '../../noir/oracles/rpc/accountOracle/encode.js'; -import { createNewTopLevelProofFixture } from './new_proof.js'; -import { accountProofConfig } from '../../noir/oracles/rpc/common/proofConfig/account.js'; - -export function createNewStateProofFixture(stateProof: GetProofReturnType): string { - return createNewTopLevelProofFixture( - { key: keccak256(stateProof.address), value: getValue(stateProof.accountProof), proof: stateProof.accountProof }, - accountProofConfig - ); -} diff --git a/ethereum/oracles/src/script/noir_fixtures/new_storage_proof.ts b/ethereum/oracles/src/script/noir_fixtures/new_storage_proof.ts deleted file mode 100644 index 0d1afe6a..00000000 --- a/ethereum/oracles/src/script/noir_fixtures/new_storage_proof.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Hex, keccak256, toRlp } from 'viem'; -import { createNewProofInputFixture } from './new_proof.js'; -import { joinArrayVertical } from '../../noir/noir_js/encode.js'; -import { toHexString } from '../../ethereum/blockHeader.js'; -import { storageProofConfig } from '../../noir/oracles/rpc/common/proofConfig/storage.js'; - -interface StorageProof { - key: Hex; - proof: Hex[]; - value: bigint; -} - -export function createNewStorageProofFixture(storageProofs: StorageProof[]): string { - const storageProofsNoir = storageProofs.map(createSingleStorageProofFixture); - return `use crate::merkle_patricia_proofs::proof::{Proof, ProofInput}; -use crate::account_with_storage::{MAX_PREFIXED_KEY_NIBBLE_LEN, MAX_STORAGE_DEPTH_NO_LEAF_M, MAX_STORAGE_VALUE_LEN, MAX_STORAGE_LEAF_LEN}; - -global proofs = ${joinArrayVertical(storageProofsNoir)}; - -global proofs_serialized = proofs.map(|proof: ProofInput| proof.serialize()); -`; -} - -function createSingleStorageProofFixture(storageProof: StorageProof): string { - return createNewProofInputFixture( - { key: keccak256(storageProof.key), value: toRlp(toHexString(storageProof.value)), proof: storageProof.proof }, - storageProofConfig - ); -} diff --git a/ethereum/oracles/src/script/noir_fixtures/new_transaction_proof.ts b/ethereum/oracles/src/script/noir_fixtures/new_transaction_proof.ts deleted file mode 100644 index 8711b594..00000000 --- a/ethereum/oracles/src/script/noir_fixtures/new_transaction_proof.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Proof } from '../../ethereum/proof.js'; -import { txProofConfigM } from '../../noir/oracles/rpc/common/proofConfig/tx.js'; -import { createNewTopLevelProofFixture } from './new_proof.js'; - -export function createNewTransactionProofFixture(proof: Proof): string { - return createNewTopLevelProofFixture(proof, txProofConfigM); -} diff --git a/ethereum/oracles/src/script/noir_fixtures/proof.ts b/ethereum/oracles/src/script/noir_fixtures/proof.ts index ff346c27..40b380a4 100644 --- a/ethereum/oracles/src/script/noir_fixtures/proof.ts +++ b/ethereum/oracles/src/script/noir_fixtures/proof.ts @@ -1,31 +1,52 @@ -import { padHex } from 'viem'; -import { Proof } from '../../ethereum/proof.js'; -import { encodeHexString, indentBlock, joinArray } from '../../noir/noir_js/encode.js'; -import { ZERO_PAD_VALUE } from '../../noir/oracles/common/const.js'; -import { encodeHex, encodeProof } from '../../noir/oracles/common/encode.js'; +import { encodeHex } from '../../noir/oracles/common/encode.js'; +import { indentBlock, joinArray, joinArrayVertical } from '../../noir/noir_js/encode.js'; import { padArray } from '../../util/array.js'; -import { BYTE_HEX_LEN } from '../../util/const.js'; - -export function createProofFixture( - proof: Proof, - maxTreeDepth: number, - maxValueLen: number, - maxProofLen: number, - crateImport: string, - proofNoirType: string -): string { - const paddedKey = padHex(proof.key, { size: maxTreeDepth / BYTE_HEX_LEN, dir: 'left' }); +import { MAX_TRIE_NODE_LEN, ZERO_PAD_VALUE } from '../../noir/oracles/common/const.js'; +import { Proof } from '../../ethereum/proof.js'; +import { Hex, padHex } from 'viem'; +import { ProofConfig } from '../../noir/oracles/rpc/common/proofConfig.js'; + +export function createTopLevelProofFixtureWithRoot(proof: Proof, root: Hex[], config: ProofConfig): string { + return `use crate::merkle_patricia_proofs::proof::{Proof, ProofInput}; + +global root = ${joinArray(root)}; + +global proof_input = ${createProofInputFixture(proof, config)}; +`; +} + +export function createTopLevelProofFixture(proof: Proof, config: ProofConfig): string { + return `use crate::merkle_patricia_proofs::proof::{Proof, ProofInput}; + +global proof_input = ${createProofInputFixture(proof, config)}; + +global proof_input_serialized = proof_input.serialize(); +`; +} + +export function createProofInputFixture(proof: Proof, config: ProofConfig): string { + const paddedKey = padHex(proof.key, { size: config.maxPrefixedKeyNibbleLen, dir: 'left' }); const key = encodeHex(paddedKey); - const value = padArray(encodeHexString(proof.value), maxValueLen, ZERO_PAD_VALUE, 'left'); - const encodedProof = encodeProof(proof.proof, maxProofLen); - const depth = proof.proof.length; - return `use ${crateImport}; + const paddedValue = padHex(proof.value, { size: config.maxValueLen, dir: 'left' }); + const value = encodeHex(paddedValue); -global proof = ${proofNoirType} { + return `ProofInput {\n key: ${indentBlock(joinArray(key), 1)}, value: ${indentBlock(joinArray(value), 1)}, - proof: ${indentBlock(joinArray(encodedProof), 1)}, + + proof: ${indentBlock(createProofFixture(proof, config.maxProofDepth, config.maxLeafLen), 1)} +}`; +} + +function createProofFixture(proof: Proof, maxDepth: number, maxLeafLen: number): string { + const paddedNodes = padArray(proof.proof.slice(0, proof.proof.length - 1), maxDepth - 1, ZERO_PAD_VALUE); + const nodes = paddedNodes.map((node) => joinArray(padArray(encodeHex(node), MAX_TRIE_NODE_LEN, ZERO_PAD_VALUE))); + const leaf = padArray(encodeHex(proof.proof[proof.proof.length - 1]), maxLeafLen, ZERO_PAD_VALUE); + const depth = proof.proof.length; + + return `Proof { + nodes: ${indentBlock(joinArrayVertical(nodes), 1)}, + leaf: ${indentBlock(joinArray(leaf), 1)}, depth: ${depth} -}; -`; +}`; } diff --git a/ethereum/oracles/src/script/noir_fixtures/receipt_proof.ts b/ethereum/oracles/src/script/noir_fixtures/receipt_proof.ts index 5e9014e7..d1456cac 100644 --- a/ethereum/oracles/src/script/noir_fixtures/receipt_proof.ts +++ b/ethereum/oracles/src/script/noir_fixtures/receipt_proof.ts @@ -1,18 +1,7 @@ import { Proof } from '../../ethereum/proof.js'; -import { - LEGACY_MAX_RECEIPT_ENCODED_LEN, - receiptProofConfigM -} from '../../noir/oracles/rpc/common/proofConfig/receipt.js'; -import { BYTE_HEX_LEN } from '../../util/const.js'; -import { createProofFixture } from './proof.js'; +import { receiptProofConfigM } from '../../noir/oracles/rpc/common/proofConfig/receipt.js'; +import { createTopLevelProofFixture } from './proof.js'; export function createReceiptProofFixture(proof: Proof): string { - return createProofFixture( - proof, - receiptProofConfigM.maxKeyLen * BYTE_HEX_LEN, - LEGACY_MAX_RECEIPT_ENCODED_LEN, - receiptProofConfigM.maxProofLen, - 'dep::proof::trie_proof::TrieProof', - 'TrieProof' - ); + return createTopLevelProofFixture(proof, receiptProofConfigM); } diff --git a/ethereum/oracles/src/script/noir_fixtures/state_proof.ts b/ethereum/oracles/src/script/noir_fixtures/state_proof.ts index be43f177..a75156f5 100644 --- a/ethereum/oracles/src/script/noir_fixtures/state_proof.ts +++ b/ethereum/oracles/src/script/noir_fixtures/state_proof.ts @@ -1,22 +1,12 @@ -import { GetProofReturnType } from 'viem'; -import { encodeHexString, indentBlock, joinArray } from '../../noir/noir_js/encode.js'; -import { encodeProof } from '../../noir/oracles/common/encode.js'; -import { encodeValue } from '../../noir/oracles/rpc/accountOracle/encode.js'; +import { GetProofReturnType, keccak256 } from 'viem'; + +import { getValue } from '../../noir/oracles/rpc/accountOracle/encode.js'; +import { createTopLevelProofFixture } from './proof.js'; import { accountProofConfig } from '../../noir/oracles/rpc/common/proofConfig/account.js'; export function createStateProofFixture(stateProof: GetProofReturnType): string { - const key = encodeHexString(stateProof.address); - const value = encodeValue(stateProof.accountProof); - const proof = encodeProof(stateProof.accountProof, accountProofConfig.maxProofLen); - const depth = stateProof.accountProof.length; - const stateProofFixture = `use crate::account::LegacyStateProof; - -global state_proof = LegacyStateProof { - key: ${indentBlock(joinArray(key), 1)}, - value: ${indentBlock(joinArray(value), 1)}, - proof: ${indentBlock(joinArray(proof), 1)}, - depth: ${depth}, -}; -`; - return stateProofFixture; + return createTopLevelProofFixture( + { key: keccak256(stateProof.address), value: getValue(stateProof.accountProof), proof: stateProof.accountProof }, + accountProofConfig + ); } diff --git a/ethereum/oracles/src/script/noir_fixtures/storage_proof.ts b/ethereum/oracles/src/script/noir_fixtures/storage_proof.ts index 71a733b8..835e5bba 100644 --- a/ethereum/oracles/src/script/noir_fixtures/storage_proof.ts +++ b/ethereum/oracles/src/script/noir_fixtures/storage_proof.ts @@ -1,32 +1,29 @@ -import { Hash } from 'viem'; -import { encodeHexString, indentBlock, joinArray } from '../../noir/noir_js/encode.js'; -import { encodeBytes32, encodeProof } from '../../noir/oracles/common/encode.js'; +import { Hex, keccak256, toRlp } from 'viem'; +import { createProofInputFixture } from './proof.js'; +import { joinArrayVertical } from '../../noir/noir_js/encode.js'; +import { toHexString } from '../../ethereum/blockHeader.js'; import { storageProofConfig } from '../../noir/oracles/rpc/common/proofConfig/storage.js'; interface StorageProof { - key: Hash; - proof: Hash[]; + key: Hex; + proof: Hex[]; value: bigint; } export function createStorageProofFixture(storageProofs: StorageProof[]): string { const storageProofsNoir = storageProofs.map(createSingleStorageProofFixture); - return `use crate::account_with_storage::LegacyStorageProof; + return `use crate::merkle_patricia_proofs::proof::{Proof, ProofInput}; +use crate::account_with_storage::{MAX_PREFIXED_KEY_NIBBLE_LEN, MAX_STORAGE_DEPTH_NO_LEAF_M, MAX_STORAGE_VALUE_LEN, MAX_STORAGE_LEAF_LEN}; -global proofs = ${joinArray(storageProofsNoir)}; +global proofs = ${joinArrayVertical(storageProofsNoir)}; + +global proofs_serialized = proofs.map(|proof: ProofInput| proof.serialize()); `; } function createSingleStorageProofFixture(storageProof: StorageProof): string { - const key = encodeHexString(storageProof.key); - const value = encodeBytes32(storageProof.value); - const proof = encodeProof(storageProof.proof, storageProofConfig.maxProofLen); - const depth = storageProof.proof.length; - const storageProofFixture = `LegacyStorageProof { - key: ${indentBlock(joinArray(key), 1)}, - value: ${indentBlock(joinArray(value), 1)}, - proof: ${indentBlock(joinArray(proof), 1)}, - depth: ${depth} -}`; - return indentBlock(storageProofFixture, 1); + return createProofInputFixture( + { key: keccak256(storageProof.key), value: toRlp(toHexString(storageProof.value)), proof: storageProof.proof }, + storageProofConfig + ); } diff --git a/ethereum/oracles/src/script/noir_fixtures/transaction_proof.ts b/ethereum/oracles/src/script/noir_fixtures/transaction_proof.ts index 9ea15ce7..2eedd32f 100644 --- a/ethereum/oracles/src/script/noir_fixtures/transaction_proof.ts +++ b/ethereum/oracles/src/script/noir_fixtures/transaction_proof.ts @@ -1,15 +1,7 @@ import { Proof } from '../../ethereum/proof.js'; -import { LEGACY_MAX_TX_ENCODED_LEN, txProofConfigM } from '../../noir/oracles/rpc/common/proofConfig/tx.js'; -import { BYTE_HEX_LEN } from '../../util/const.js'; -import { createProofFixture } from './proof.js'; +import { txProofConfigM } from '../../noir/oracles/rpc/common/proofConfig/tx.js'; +import { createTopLevelProofFixture } from './proof.js'; export function createTransactionProofFixture(proof: Proof): string { - return createProofFixture( - proof, - txProofConfigM.maxKeyLen * BYTE_HEX_LEN, - LEGACY_MAX_TX_ENCODED_LEN, - txProofConfigM.maxProofLen, - 'dep::proof::trie_proof::TrieProof', - 'TrieProof' - ); + return createTopLevelProofFixture(proof, txProofConfigM); } diff --git a/ethereum/oracles/src/script/prepareMerkleProofFixtures.ts b/ethereum/oracles/src/script/prepareMerkleProofFixtures.ts index 72b5870c..28a5b147 100644 --- a/ethereum/oracles/src/script/prepareMerkleProofFixtures.ts +++ b/ethereum/oracles/src/script/prepareMerkleProofFixtures.ts @@ -4,7 +4,7 @@ import { PROOF_FIXTURES } from '../fixtures/merkleProofsConfig.js'; import { assert, encodeHexStringToArray } from '../main.js'; import { hasDuplicates } from '../util/array.js'; import { bytesToHex } from 'viem'; -import { createNewTopLevelProofFixtureWithRoot } from './noir_fixtures/new_proof.js'; +import { createTopLevelProofFixtureWithRoot } from './noir_fixtures/proof.js'; import { getProofConfig } from '../noir/oracles/rpc/common/proofConfig.js'; import { BYTE_HEX_LEN } from '../util/const.js'; import { encodeUint8Array } from '../noir/oracles/common/encode.js'; @@ -45,7 +45,7 @@ for (const fixtureName in PROOF_FIXTURES) { const config = getProofConfig(maxKeyLen, MAX_VALUE_LEN, MAX_DEPTH); await writeFile( `${NOIR_PROOF_FIXTURES_DIRECTORY}/${fixtureName}.nr`, - createNewTopLevelProofFixtureWithRoot(proofFixture, root, config) + createTopLevelProofFixtureWithRoot(proofFixture, root, config) ); fixtureModule += `mod ${fixtureName};\n`; diff --git a/ethereum/oracles/src/script/prepareNoirHistoryAPIFixtures.ts b/ethereum/oracles/src/script/prepareNoirHistoryAPIFixtures.ts index 080150cf..f0e35f3f 100644 --- a/ethereum/oracles/src/script/prepareNoirHistoryAPIFixtures.ts +++ b/ethereum/oracles/src/script/prepareNoirHistoryAPIFixtures.ts @@ -12,10 +12,10 @@ import { createTransactionFixture } from './noir_fixtures/transaction.js'; import { getTxProof } from '../ethereum/txProof.js'; import { createReceiptFixture } from './noir_fixtures/receipt.js'; import { createLogFixture } from './noir_fixtures/log.js'; -import { createNewReceiptProofFixture } from './noir_fixtures/new_receipt_proof.js'; -import { createNewTransactionProofFixture } from './noir_fixtures/new_transaction_proof.js'; -import { createNewStateProofFixture } from './noir_fixtures/new_state_proof.js'; -import { createNewStorageProofFixture } from './noir_fixtures/new_storage_proof.js'; +import { createReceiptProofFixture } from './noir_fixtures/receipt_proof.js'; +import { createTransactionProofFixture } from './noir_fixtures/transaction_proof.js'; +import { createStateProofFixture } from './noir_fixtures/state_proof.js'; +import { createStorageProofFixture } from './noir_fixtures/storage_proof.js'; import { createStorageFixture } from './noir_fixtures/storage.js'; const INDEX_NOT_FOUND = -1; @@ -59,15 +59,12 @@ for (const chain in HISTORY_API_FIXTURES) { }); await writeFile(join(modulePath, 'account.nr'), createAccountFixture(stateProof)); - await writeFile(join(modulePath, 'state_proof_new.nr'), createNewStateProofFixture(stateProof)); - fixtureModules.push('account', 'state_proof_new'); + await writeFile(join(modulePath, 'state_proof.nr'), createStateProofFixture(stateProof)); + fixtureModules.push('account', 'state_proof'); if (storageKeys) { await writeFile(join(modulePath, 'storage.nr'), createStorageFixture(stateProof)); - await writeFile( - join(modulePath, 'storage_proof_new.nr'), - createNewStorageProofFixture(stateProof.storageProof) - ); - fixtureModules.push('storage', 'storage_proof_new'); + await writeFile(join(modulePath, 'storage_proof.nr'), createStorageProofFixture(stateProof.storageProof)); + fixtureModules.push('storage', 'storage_proof'); } } @@ -78,8 +75,8 @@ for (const chain in HISTORY_API_FIXTURES) { const receipt = blockReceipts[txIdx]; const txReceiptProof = await getReceiptProof(block, blockReceipts, txIdx); await writeFile(join(modulePath, 'receipt.nr'), createReceiptFixture(receipt)); - await writeFile(join(modulePath, 'receipt_proof_new.nr'), createNewReceiptProofFixture(txReceiptProof)); - fixtureModules.push('receipt_proof_new', 'receipt'); + await writeFile(join(modulePath, 'receipt_proof.nr'), createReceiptProofFixture(txReceiptProof)); + fixtureModules.push('receipt_proof', 'receipt'); const tx = await client.getTransaction({ hash: transactionHash }); await writeFile(join(modulePath, 'transaction.nr'), createTransactionFixture(tx)); @@ -90,8 +87,8 @@ for (const chain in HISTORY_API_FIXTURES) { blockWithTransactions.transactionsRoot, txIdx ); - await writeFile(join(modulePath, 'transaction_proof_new.nr'), createNewTransactionProofFixture(txProof)); - fixtureModules.push('transaction_proof_new'); + await writeFile(join(modulePath, 'transaction_proof.nr'), createTransactionProofFixture(txProof)); + fixtureModules.push('transaction_proof'); if (logIdx !== undefined) { const log = receipt.logs[logIdx]; await writeFile(join(modulePath, 'log.nr'), createLogFixture(log, logIdx)); diff --git a/vlayer/ethereum/circuits/lib/src/token_int_test.nr b/vlayer/ethereum/circuits/lib/src/token_int_test.nr index dbdef260..00a6d8ca 100644 --- a/vlayer/ethereum/circuits/lib/src/token_int_test.nr +++ b/vlayer/ethereum/circuits/lib/src/token_int_test.nr @@ -5,8 +5,8 @@ mod test_ERC20Token { paris::usdc_circle::header::{block_header_partial as paris_block_header_partial, block_header_rlp as paris_block_header_rlp}, paris::usdc_circle::header::{hash, number, state_root, transactions_root, receipts_root}, paris::usdc_circle::account::account, - paris::usdc_circle::state_proof_new::proof_input_serialized as state_proof_input_serialized, - paris::usdc_circle::storage_proof_new::proofs_serialized + paris::usdc_circle::state_proof::proof_input_serialized as state_proof_input_serialized, + paris::usdc_circle::storage_proof::proofs_serialized }; use crate::chain_id::MAINNET; diff --git a/vlayer/examples/circuits/is_ape_owner/src/main_test.nr b/vlayer/examples/circuits/is_ape_owner/src/main_test.nr index c4c42c4f..51b84818 100644 --- a/vlayer/examples/circuits/is_ape_owner/src/main_test.nr +++ b/vlayer/examples/circuits/is_ape_owner/src/main_test.nr @@ -3,8 +3,8 @@ mod is_ape_owner_main { use dep::ethereum::{ fixtures::mainnet::paris::bored_ape_yacht_club::{ header::{block_header_partial as paris_block_header_partial, block_header_rlp as paris_block_header_rlp}, - account::account, state_proof_new::proof_input_serialized as state_proof_input_serialized, - storage_proof_new::proofs_serialized + account::account, state_proof::proof_input_serialized as state_proof_input_serialized, + storage_proof::proofs_serialized }, misc::arrays::alter_array }; diff --git a/vlayer/examples/circuits/is_crypto_punk_owner/src/main_test.nr b/vlayer/examples/circuits/is_crypto_punk_owner/src/main_test.nr index b194a0b5..9e71c87e 100644 --- a/vlayer/examples/circuits/is_crypto_punk_owner/src/main_test.nr +++ b/vlayer/examples/circuits/is_crypto_punk_owner/src/main_test.nr @@ -3,8 +3,8 @@ mod is_crypto_punk_owner_main { use dep::ethereum::{ fixtures::mainnet::london::crypto_punks::{ header::{block_header_partial as london_block_header_partial, block_header_rlp as london_block_header_rlp}, - account::account, state_proof_new::proof_input_serialized as state_proof_input_serialized, - storage_proof_new::proofs_serialized + account::account, state_proof::proof_input_serialized as state_proof_input_serialized, + storage_proof::proofs_serialized }, misc::arrays::alter_array }; diff --git a/vlayer/examples/circuits/is_dao_worthy/src/main_test.nr b/vlayer/examples/circuits/is_dao_worthy/src/main_test.nr index 0fa1e52e..6059bf11 100644 --- a/vlayer/examples/circuits/is_dao_worthy/src/main_test.nr +++ b/vlayer/examples/circuits/is_dao_worthy/src/main_test.nr @@ -3,8 +3,8 @@ mod is_dao_worthy_main { use dep::ethereum::fixtures::mainnet::{ paris::usdc_circle::header::{block_header_partial as paris_block_header_partial, block_header_rlp as paris_block_header_rlp}, paris::usdc_circle::account::account, - paris::usdc_circle::state_proof_new::proof_input_serialized as state_proof_input_serialized, - paris::usdc_circle::storage_proof_new::proofs_serialized + paris::usdc_circle::state_proof::proof_input_serialized as state_proof_input_serialized, + paris::usdc_circle::storage_proof::proofs_serialized }; use crate::main;