From 2dce7952c2a02f4010ab00f8f092b3fb774f1430 Mon Sep 17 00:00:00 2001 From: Wolfgang Welz Date: Wed, 11 Dec 2024 08:43:59 +0100 Subject: [PATCH] chore: Enable Ethereum Execution Tests (#122) * Make providers resettable * Re-add eth execution tests * Use HashMap::default() instead of new() to also work with newer alloy versions * run in CI * fix CI * fix fmt * add missing files * quote version * fix env name * fix CI * add validate * fix test provider --------- Co-authored-by: Rami Khalil --- .github/actions/risczero/action.yml | 32 + .github/workflows/ci.yml | 45 +- .gitmodules | 3 + Cargo.lock | 100 +- Cargo.toml | 2 + crates/core/src/stateless/initialize.rs | 8 +- crates/preflight/src/client.rs | 23 +- .../preflight/src/provider/cache_provider.rs | 4 + .../preflight/src/provider/file_provider.rs | 6 +- crates/preflight/src/provider/mod.rs | 3 +- crates/preflight/src/provider/rpc_provider.rs | 4 + crates/preflight/src/trie.rs | 21 +- justfile | 4 + testing/ef-tests/Cargo.toml | 32 +- testing/ef-tests/build.rs | 17 - testing/ef-tests/src/driver.rs | 246 ++ testing/ef-tests/src/ethers.rs | 217 - testing/ef-tests/src/ethtests.rs | 60 - testing/ef-tests/src/lib.rs | 408 +- testing/ef-tests/src/provider.rs | 303 ++ testing/ef-tests/testdata | 1 + testing/ef-tests/testguest/Cargo.lock | 3888 ----------------- testing/ef-tests/testguest/Cargo.toml | 16 - testing/ef-tests/testguest/src/main.rs | 42 - testing/ef-tests/tests/evm.rs | 98 +- testing/ef-tests/tests/executor.rs | 97 - 26 files changed, 897 insertions(+), 4783 deletions(-) create mode 100644 .github/actions/risczero/action.yml delete mode 100644 testing/ef-tests/build.rs create mode 100644 testing/ef-tests/src/driver.rs delete mode 100644 testing/ef-tests/src/ethers.rs delete mode 100644 testing/ef-tests/src/ethtests.rs create mode 100644 testing/ef-tests/src/provider.rs create mode 160000 testing/ef-tests/testdata delete mode 100644 testing/ef-tests/testguest/Cargo.lock delete mode 100644 testing/ef-tests/testguest/Cargo.toml delete mode 100644 testing/ef-tests/testguest/src/main.rs delete mode 100644 testing/ef-tests/tests/executor.rs diff --git a/.github/actions/risczero/action.yml b/.github/actions/risczero/action.yml new file mode 100644 index 00000000..c49c2fd3 --- /dev/null +++ b/.github/actions/risczero/action.yml @@ -0,0 +1,32 @@ +name: risczero toolchain install +description: Install risczero toolchain + +inputs: + version: + description: 'Version of the RISC Zero to install' + required: true + type: string + toolchain-version: + description: 'Version of the RISC Zero toolchains to install' + required: false + default: '' + type: string + +runs: + using: composite + steps: + - uses: risc0/cargo-install@v3 + with: + crate: cargo-binstall + version: '=1.6' + locked: true + + - run: cargo binstall -y --force cargo-risczero@${{ inputs.version }} + shell: bash + + - run: cargo risczero install ${{ inputs.toolchain-version != '' && format('--version {0}', inputs.toolchain-version) || '' }} + shell: bash + + - name: test risczero + shell: bash + run: cargo risczero --version diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b6110c7e..489ffac9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,29 +17,44 @@ permissions: env: CARGO_TERM_COLOR: always GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + RISC0_VERSION: "1.1.3" + RISC0_TOOLCHAIN_VERSION: "r0.1.81.0" jobs: test: - name: test + name: cargo test runs-on: ubuntu-latest timeout-minutes: 60 steps: - uses: actions/checkout@v4 + - uses: risc0/risc0/.github/actions/rustup@main + - uses: risc0/risc0/.github/actions/sccache@main + - uses: ./.github/actions/risczero with: - submodules: recursive - - uses: risc0/risc0/.github/actions/rustup@v1.1.3 - - uses: risc0/risc0/.github/actions/sccache@v1.1.3 - - uses: risc0/cargo-install@v1 - with: - crate: cargo-binstall - - run: cargo binstall -y --force cargo-risczero@1.1.3 - - run: cargo risczero install + version: ${{ env.RISC0_VERSION }} + toolchain-version: ${{ env.RISC0_TOOLCHAIN_VERSION }} - run: cargo test --all-targets -p zeth-core -p zeth-guests -p zeth-preflight -p zeth -p zeth-benchmark -F debug-guest-build - run: cargo test --all-targets -p zeth-core-ethereum -p zeth-preflight-ethereum -p zeth-ethereum -F debug-guest-build - run: cargo test --all-targets -p zeth-core-optimism -p zeth-preflight-optimism -p zeth-optimism -F debug-guest-build + ef-tests: + name: Ethereum execution tests + runs-on: ubuntu-latest + timeout-minutes: 60 + steps: + - uses: actions/checkout@v4 + with: + submodules: true + - uses: risc0/risc0/.github/actions/rustup@main + - uses: risc0/risc0/.github/actions/sccache@main + - uses: ./.github/actions/risczero + with: + version: ${{ env.RISC0_VERSION }} + toolchain-version: ${{ env.RISC0_TOOLCHAIN_VERSION }} + - run: cargo test --all-targets -p zeth-testeth -F ef-tests + clippy: - name: clippy + name: cargo clippy runs-on: [self-hosted, prod, "${{ matrix.os }}"] strategy: fail-fast: false @@ -60,9 +75,9 @@ jobs: steps: - uses: actions/checkout@v4 - if: matrix.feature == 'cuda' - uses: risc0/risc0/.github/actions/cuda@v1.1.3 - - uses: risc0/risc0/.github/actions/rustup@v1.1.3 - - uses: risc0/risc0/.github/actions/sccache@v1.1.3 + uses: risc0/risc0/.github/actions/cuda@main + - uses: risc0/risc0/.github/actions/rustup@main + - uses: risc0/risc0/.github/actions/sccache@main - uses: risc0/clippy-action@main with: reporter: 'github-pr-check' @@ -70,10 +85,10 @@ jobs: clippy_flags: -F $FEATURE --workspace --all-targets -- -Dwarnings fmt: - name: fmt + name: cargo fmt runs-on: ubuntu-latest timeout-minutes: 10 steps: - uses: actions/checkout@v4 - - uses: risc0/risc0/.github/actions/rustup@v1.1.3 + - uses: risc0/risc0/.github/actions/rustup@main - run: cargo fmt --all --check diff --git a/.gitmodules b/.gitmodules index e69de29b..50b3eff5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "testing/ef-tests/testdata"] + path = testing/ef-tests/testdata + url = https://github.com/ethereum/tests.git diff --git a/Cargo.lock b/Cargo.lock index de08e88a..e19827ad 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -833,7 +833,7 @@ dependencies = [ "num-bigint 0.4.4", "num-traits", "paste", - "rustc_version 0.4.0", + "rustc_version 0.4.1", "zeroize", ] @@ -1034,7 +1034,7 @@ checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c" dependencies = [ "futures", "pharos", - "rustc_version 0.4.0", + "rustc_version 0.4.1", ] [[package]] @@ -2238,6 +2238,12 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +[[package]] +name = "futures-timer" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" + [[package]] name = "futures-util" version = "0.3.30" @@ -3356,7 +3362,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414" dependencies = [ "futures", - "rustc_version 0.4.0", + "rustc_version 0.4.1", ] [[package]] @@ -3651,9 +3657,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -3758,9 +3764,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.4" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", @@ -3770,9 +3776,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", @@ -3781,9 +3787,15 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.2" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" + +[[package]] +name = "relative-path" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +checksum = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2" [[package]] name = "reqwest" @@ -4709,6 +4721,36 @@ dependencies = [ "paste", ] +[[package]] +name = "rstest" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a2c585be59b6b5dd66a9d2084aa1d8bd52fbdb806eafdeffb52791147862035" +dependencies = [ + "futures", + "futures-timer", + "rstest_macros", + "rustc_version 0.4.1", +] + +[[package]] +name = "rstest_macros" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "825ea780781b15345a146be27eaefb05085e337e869bff01b4306a4fd4a9ad5a" +dependencies = [ + "cfg-if", + "glob", + "proc-macro-crate 3.2.0", + "proc-macro2", + "quote", + "regex", + "relative-path", + "rustc_version 0.4.1", + "syn 2.0.87", + "unicode-ident", +] + [[package]] name = "ruint" version = "1.12.3" @@ -4771,9 +4813,9 @@ dependencies = [ [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver 1.0.22", ] @@ -5746,9 +5788,9 @@ checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" [[package]] name = "unicode-normalization" @@ -5821,7 +5863,7 @@ dependencies = [ "approx", "num-integer", "num-traits", - "rustc_version 0.4.0", + "rustc_version 0.4.1", ] [[package]] @@ -6204,7 +6246,7 @@ dependencies = [ "js-sys", "log", "pharos", - "rustc_version 0.4.0", + "rustc_version 0.4.1", "send_wrapper", "thiserror", "wasm-bindgen", @@ -6464,6 +6506,30 @@ dependencies = [ "zeth-preflight", ] +[[package]] +name = "zeth-testeth" +version = "0.1.0" +dependencies = [ + "alloy", + "alloy-trie", + "anyhow", + "env_logger", + "log", + "nybbles", + "reth-chainspec", + "reth-primitives", + "reth-revm", + "reth-storage-errors", + "rstest", + "serde", + "serde_json", + "serde_with", + "zeth-core", + "zeth-core-ethereum", + "zeth-preflight", + "zeth-preflight-ethereum", +] + [[package]] name = "zip" version = "2.1.1" diff --git a/Cargo.toml b/Cargo.toml index beffa7d6..c7895237 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,6 +4,7 @@ members = [ "bin/*", "crates/*", "guests", + "testing/ef-tests", ] # Always optimize; building and running the guest takes much longer without optimization. @@ -83,6 +84,7 @@ flate2 = "1.0.34" pot = "3.0.1" serde = { version = "1.0.210", features = ["derive"] } serde_json = { version = "1.0.128", features = ["alloc"] } +serde_with = "3.7.0" thiserror = "1.0.64" tiny-keccak = "2.0.2" tokio = { version = "1.40.0", features = ["full"] } diff --git a/crates/core/src/stateless/initialize.rs b/crates/core/src/stateless/initialize.rs index 6d11baf3..7bf4901f 100644 --- a/crates/core/src/stateless/initialize.rs +++ b/crates/core/src/stateless/initialize.rs @@ -26,6 +26,7 @@ use reth_primitives::revm_primitives::Bytecode; use reth_primitives::KECCAK_EMPTY; use reth_revm::db::{AccountState, DbAccount}; use reth_revm::primitives::AccountInfo; +use std::default::Default; pub trait InitializationStrategy { fn initialize_database( @@ -63,7 +64,8 @@ impl InitializationStrategy for MemoryDbSt .collect(); // Load account data into db - let mut accounts = HashMap::with_capacity(storage_tries.len()); + let mut accounts = + HashMap::with_capacity_and_hasher(storage_tries.len(), Default::default()); for (address, (storage_trie, slots)) in storage_tries { // consume the slots, as they are no longer needed afterward let slots = take(slots); @@ -93,7 +95,7 @@ impl InitializationStrategy for MemoryDbSt }; // load storage reads - let mut storage = HashMap::with_capacity(slots.len()); + let mut storage = HashMap::with_capacity_and_hasher(slots.len(), Default::default()); for slot in slots { let value: U256 = storage_trie .get_rlp(&keccak(slot.to_be_bytes::<32>()))? @@ -117,7 +119,7 @@ impl InitializationStrategy for MemoryDbSt // prepare block hash history let mut block_hashes: HashMap = - HashMap::with_capacity(ancestor_headers.len() + 1); + HashMap::with_capacity_and_hasher(ancestor_headers.len() + 1, Default::default()); block_hashes.insert( U256::from(Driver::block_number(parent_header)), Driver::header_hash(parent_header), diff --git a/crates/preflight/src/client.rs b/crates/preflight/src/client.rs index 1621b237..de0b7d1d 100644 --- a/crates/preflight/src/client.rs +++ b/crates/preflight/src/client.rs @@ -15,15 +15,17 @@ use crate::db::PreflightDB; use crate::driver::PreflightDriver; use crate::provider::db::ProviderDB; -use crate::provider::new_provider; use crate::provider::query::{BlockQuery, UncleQuery}; +use crate::provider::{new_provider, Provider}; use crate::trie::extend_proof_tries; use alloy::network::Network; use alloy::primitives::map::HashMap; use anyhow::Context; use log::{debug, info, warn}; +use std::cell::RefCell; use std::iter::zip; use std::path::PathBuf; +use std::rc::Rc; use zeth_core::db::into_plain_state; use zeth_core::driver::CoreDriver; use zeth_core::mpt::{ @@ -51,6 +53,14 @@ where block_count: u64, ) -> anyhow::Result> { let provider = new_provider::(cache_dir.clone(), block_no, rpc_url.clone(), chain_id)?; + Self::preflight_with_provider(provider, block_no, block_count) + } + + fn preflight_with_provider( + provider: Rc>>, + block_no: u64, + block_count: u64, + ) -> anyhow::Result> { let mut provider_mut = provider.borrow_mut(); let chain = provider_mut.get_chain()?; let chain_spec = R::chain_spec(&chain).expect("Unsupported chain"); @@ -105,10 +115,10 @@ where ommers.reverse(); // Create the provider DB with a fresh provider to reset block_no - let provider_db = ProviderDB::::new( - new_provider::(cache_dir, block_no, rpc_url, chain_id)?, - R::block_number(&core_parent_header), - ); + provider_mut.reset(block_no)?; + drop(provider_mut); + let provider_db = + ProviderDB::::new(provider, R::block_number(&core_parent_header)); let preflight_db = PreflightDB::from(provider_db); // Create the input data @@ -230,7 +240,8 @@ where &mut storage_tries, initial_proofs, latest_proofs, - )?; + ) + .context("failed to extend proof tries")?; // resolve potential orphans let orphan_resolves = preflight_db.resolve_orphans(block_count as u64, &state_orphans, &storage_orphans); diff --git a/crates/preflight/src/provider/cache_provider.rs b/crates/preflight/src/provider/cache_provider.rs index 60dcfa33..10f27a4a 100644 --- a/crates/preflight/src/provider/cache_provider.rs +++ b/crates/preflight/src/provider/cache_provider.rs @@ -49,6 +49,10 @@ impl Provider for CachedRpcProvider { self.cache.advance() } + fn reset(&mut self, block_no: u64) -> anyhow::Result<()> { + self.cache.reset(block_no) + } + fn get_client_version(&mut self) -> anyhow::Result { if let Ok(cache_out) = self.cache.get_client_version() { if !cache_out.is_empty() { diff --git a/crates/preflight/src/provider/file_provider.rs b/crates/preflight/src/provider/file_provider.rs index 58661e13..546088bf 100644 --- a/crates/preflight/src/provider/file_provider.rs +++ b/crates/preflight/src/provider/file_provider.rs @@ -142,9 +142,13 @@ impl Provider for FileProvider { } fn advance(&mut self) -> anyhow::Result<()> { + self.reset(self.block_no + 1) + } + + fn reset(&mut self, block_no: u64) -> anyhow::Result<()> { drop(replace( self, - FileProvider::new(self.dir_path.clone(), self.block_no + 1, self.chain_id)?, + FileProvider::new(self.dir_path.clone(), block_no, self.chain_id)?, )); Ok(()) } diff --git a/crates/preflight/src/provider/mod.rs b/crates/preflight/src/provider/mod.rs index 611b7c8d..05c4f66e 100644 --- a/crates/preflight/src/provider/mod.rs +++ b/crates/preflight/src/provider/mod.rs @@ -82,6 +82,7 @@ pub fn new_provider( pub trait Provider: Send { fn save(&self) -> anyhow::Result<()>; fn advance(&mut self) -> anyhow::Result<()>; + fn reset(&mut self, block_number: u64) -> anyhow::Result<()>; fn get_client_version(&mut self) -> anyhow::Result; fn get_chain(&mut self) -> anyhow::Result; @@ -120,7 +121,7 @@ pub fn get_proofs( block_no: u64, storage_keys: HashMap>, ) -> Result, anyhow::Error> { - let mut out = HashMap::new(); + let mut out = HashMap::default(); for (address, indices) in storage_keys { let proof = { diff --git a/crates/preflight/src/provider/rpc_provider.rs b/crates/preflight/src/provider/rpc_provider.rs index 8a1db39b..f10cf295 100644 --- a/crates/preflight/src/provider/rpc_provider.rs +++ b/crates/preflight/src/provider/rpc_provider.rs @@ -47,6 +47,10 @@ impl Provider for RpcProvider { Ok(()) } + fn reset(&mut self, _block_number: u64) -> anyhow::Result<()> { + Ok(()) + } + fn get_client_version(&mut self) -> anyhow::Result { debug!("Getting rpc client version"); diff --git a/crates/preflight/src/trie.rs b/crates/preflight/src/trie.rs index fde634e2..556e2e76 100644 --- a/crates/preflight/src/trie.rs +++ b/crates/preflight/src/trie.rs @@ -37,7 +37,7 @@ pub fn extend_proof_tries( let mut state_orphans = Vec::new(); let mut storage_orphans = Vec::new(); // storage for encountered trie data - let mut state_nodes = HashMap::new(); + let mut state_nodes = HashMap::default(); for (address, initialization_proof) in initialization_proofs { // Create individual nodes from proof let proof_nodes = parse_proof(&initialization_proof.account_proof) @@ -54,7 +54,7 @@ pub fn extend_proof_tries( e.insert((initialization_proof.storage_hash.into(), vec![])); } // storage for encountered storage trie data - let mut storage_nodes = HashMap::new(); + let mut storage_nodes = HashMap::default(); for storage_proof in &initialization_proof.storage_proof { let proof_nodes = parse_proof(&storage_proof.proof) .context("extend_proof_tries/parse storage proof")?; @@ -77,9 +77,10 @@ pub fn extend_proof_tries( // ensure that trie orphans are loaded let finalization_proof = finalization_proofs .get(&address) - .with_context(|| format!("missing finalization proof for address {:#}", &address))?; + .with_context(|| format!("missing finalization proof for address {}", &address))?; if let Some(state_orphan) = - add_orphaned_nodes(address, &finalization_proof.account_proof, &mut state_nodes)? + add_orphaned_nodes(address, &finalization_proof.account_proof, &mut state_nodes) + .with_context(|| format!("failed to add orphaned nodes for address {}", &address))? { state_orphans.push(state_orphan); } @@ -90,7 +91,9 @@ pub fn extend_proof_tries( storage_proof.key.0, &storage_proof.proof, &mut storage_nodes, - )? { + ) + .context("failed to add orphaned nodes")? + { potential_storage_orphans.push(storage_orphan); } } @@ -132,13 +135,13 @@ pub fn proofs_to_tries( ) -> anyhow::Result<(MptNode, HashMap)> { // if no addresses are provided, return the trie only consisting of the state root if initialization_proofs.is_empty() { - return Ok((state_root.into(), HashMap::new())); + return Ok((state_root.into(), HashMap::default())); } let mut storage: HashMap = - HashMap::with_capacity(initialization_proofs.len()); + HashMap::with_capacity_and_hasher(initialization_proofs.len(), Default::default()); - let mut state_nodes = HashMap::new(); + let mut state_nodes = HashMap::default(); let mut state_root_node = MptNode::default(); for (address, initialization_proof) in initialization_proofs { let proof_nodes = parse_proof(&initialization_proof.account_proof) @@ -167,7 +170,7 @@ pub fn proofs_to_tries( continue; } - let mut storage_nodes = HashMap::new(); + let mut storage_nodes = HashMap::default(); let mut storage_root_node = MptNode::default(); for storage_proof in &initialization_proof.storage_proof { let proof_nodes = parse_proof(&storage_proof.proof).context("proofs_to_tries")?; diff --git a/justfile b/justfile index d96cbdb1..cd0b53f6 100644 --- a/justfile +++ b/justfile @@ -28,6 +28,8 @@ clippy: RISC0_SKIP_BUILD=1 cargo clippy -p zeth-benchmark + RISC0_SKIP_BUILD=1 cargo clippy -p zeth-testeth + test: cargo test --all-targets -p zeth-core -p zeth-preflight -p zeth-guests -p zeth -p zeth-benchmark -F debug-guest-build @@ -35,6 +37,8 @@ test: cargo test --all-targets -p zeth-core-optimism -p zeth-preflight-optimism -p zeth-optimism -F debug-guest-build + cargo test --all-targets -p zeth-testeth -F ef-tests + just test-cache-eth test-cache-eth: (build "") diff --git a/testing/ef-tests/Cargo.toml b/testing/ef-tests/Cargo.toml index 6c14ec29..34a33d2c 100644 --- a/testing/ef-tests/Cargo.toml +++ b/testing/ef-tests/Cargo.toml @@ -9,26 +9,26 @@ cuda = [] metal = [] [dependencies] -anyhow = "1.0" -ethers-core = { version = "2.0", features = ["optimism"] } -hashbrown = { workspace = true } -revm = { workspace = true } -serde = "1.0" -serde_json = "1.0" -serde_with = "3.1" -zeth-lib = { path = "../../lib" } -zeth-primitives = { path = "../../primitives" } +alloy = { workspace = true, features = ["full","serde","rlp"] } +alloy-trie = "0.6" +anyhow = { workspace = true } +nybbles = "0.2" +reth-chainspec = { workspace = true } +reth-primitives = { workspace = true } +reth-revm = { workspace = true } +reth-storage-errors = { workspace = true } +serde = { workspace = true } +serde_json = { workspace = true } +serde_with = { workspace = true } +zeth-core = { workspace = true } +zeth-core-ethereum = { workspace = true } +zeth-preflight ={ workspace = true } +zeth-preflight-ethereum ={ workspace = true } [dev-dependencies] -diff = "0.1" env_logger = "0.11" log = "0.4" -risc0-zkvm = { workspace = true, features = ["prove"] } -rstest = "0.18" -tempfile = "3.6" - -[build-dependencies] -risc0-build = { workspace = true } +rstest = "0.23" [package.metadata.risc0] methods = ["testguest"] diff --git a/testing/ef-tests/build.rs b/testing/ef-tests/build.rs deleted file mode 100644 index 42c6db8e..00000000 --- a/testing/ef-tests/build.rs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2023 RISC Zero, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -fn main() { - risc0_build::embed_methods(); -} diff --git a/testing/ef-tests/src/driver.rs b/testing/ef-tests/src/driver.rs new file mode 100644 index 00000000..0c56417a --- /dev/null +++ b/testing/ef-tests/src/driver.rs @@ -0,0 +1,246 @@ +use alloy::{ + eips::eip1559::BaseFeeParams, + network::{Ethereum, Network}, + primitives::{BlockNumber, B256, U256}, +}; +use reth_chainspec::{ + BaseFeeParamsKind, Chain, ChainHardforks, ChainSpec, EthereumHardfork, ForkCondition, + NamedChain, +}; +use std::{fmt::Display, sync::Arc}; +use zeth_core::{ + db::MemoryDB, + driver::CoreDriver, + stateless::{ + client::StatelessClient, data::StatelessClientData, execute::ExecutionStrategy, + finalize::RethFinalizationStrategy, initialize::MemoryDbStrategy, + validate::ValidationStrategy, + }, +}; +use zeth_core_ethereum::{ + RethCoreDriver, RethExecutionStrategy, RethStatelessClient, RethValidationStrategy, +}; +use zeth_preflight::{client::PreflightClient, driver::PreflightDriver, BlockBuilder}; +use zeth_preflight_ethereum::{RethBlockBuilder, RethPreflightClient, RethPreflightDriver}; + +#[derive(Default, Copy, Clone, Debug)] +pub struct TestCoreDriver; + +impl CoreDriver for TestCoreDriver { + type ChainSpec = ChainSpec; + type Block = reth_primitives::Block; + type Header = reth_primitives::Header; + type Receipt = reth_primitives::Receipt; + type Transaction = reth_primitives::TransactionSigned; + + fn chain_spec(chain: &NamedChain) -> Option> { + let spec = ChainSpec { + chain: Chain::from_named(chain.clone()), + paris_block_and_final_difficulty: Some((0, U256::from(0))), + hardforks: ChainHardforks::new(vec![ + (EthereumHardfork::Frontier.boxed(), ForkCondition::Block(0)), + (EthereumHardfork::Homestead.boxed(), ForkCondition::Block(0)), + (EthereumHardfork::Dao.boxed(), ForkCondition::Block(0)), + (EthereumHardfork::Tangerine.boxed(), ForkCondition::Block(0)), + ( + EthereumHardfork::SpuriousDragon.boxed(), + ForkCondition::Block(0), + ), + (EthereumHardfork::Byzantium.boxed(), ForkCondition::Block(0)), + ( + EthereumHardfork::Constantinople.boxed(), + ForkCondition::Block(0), + ), + ( + EthereumHardfork::Petersburg.boxed(), + ForkCondition::Block(0), + ), + (EthereumHardfork::Istanbul.boxed(), ForkCondition::Block(0)), + (EthereumHardfork::Berlin.boxed(), ForkCondition::Block(0)), + (EthereumHardfork::London.boxed(), ForkCondition::Block(0)), + ( + EthereumHardfork::Paris.boxed(), + ForkCondition::TTD { + fork_block: None, + total_difficulty: U256::ZERO, + }, + ), + ( + EthereumHardfork::Shanghai.boxed(), + ForkCondition::Timestamp(0), + ), + ( + EthereumHardfork::Cancun.boxed(), + ForkCondition::Timestamp(0), + ), + ]), + base_fee_params: BaseFeeParamsKind::Constant(BaseFeeParams::ethereum()), + ..Default::default() + }; + Some(spec.into()) + } + + fn parent_hash(header: &Self::Header) -> B256 { + RethCoreDriver::parent_hash(header) + } + + fn header_hash(header: &Self::Header) -> B256 { + RethCoreDriver::header_hash(header) + } + + fn state_root(header: &Self::Header) -> B256 { + RethCoreDriver::state_root(header) + } + + fn block_number(header: &Self::Header) -> BlockNumber { + RethCoreDriver::block_number(header) + } + + fn block_header(block: &Self::Block) -> &Self::Header { + RethCoreDriver::block_header(block) + } + + fn block_to_header(block: Self::Block) -> Self::Header { + RethCoreDriver::block_to_header(block) + } + + fn accumulate_difficulty(total_difficulty: U256, header: &Self::Header) -> U256 { + RethCoreDriver::accumulate_difficulty(total_difficulty, header) + } + + fn final_difficulty( + block: BlockNumber, + total_difficulty: U256, + chain_spec: &Self::ChainSpec, + ) -> U256 { + RethCoreDriver::final_difficulty(block, total_difficulty, chain_spec) + } +} + +impl BlockBuilder for RethBlockBuilder { + type PreflightClient = RethPreflightClient; + type StatelessClient = RethStatelessClient; +} + +impl PreflightClient for RethPreflightClient { + type Validation = RethValidationStrategy; + type Execution = RethExecutionStrategy; +} + +impl StatelessClient for RethStatelessClient { + type Initialization = MemoryDbStrategy; + type Validation = RethValidationStrategy; + type Execution = RethExecutionStrategy; + type Finalization = RethFinalizationStrategy; +} + +impl ValidationStrategy + for zeth_core_ethereum::RethValidationStrategy +where + Database: 'static, +{ + fn validate_header( + chain_spec: Arc, + block: &mut reth_primitives::Block, + parent_header: &mut alloy::consensus::Header, + total_difficulty: &mut U256, + ) -> anyhow::Result<()> { + >::validate_header( + chain_spec, + block, + parent_header, + total_difficulty, + ) + } +} + +impl ExecutionStrategy + for RethExecutionStrategy +where + Database: 'static, + ::Error: + Into + Display, +{ + fn execute_transactions( + chain_spec: Arc, + block: &mut reth_primitives::Block, + total_difficulty: &mut U256, + db: &mut Option, + ) -> anyhow::Result { + >::execute_transactions( + chain_spec, + block, + total_difficulty, + db, + ) + } +} + +impl PreflightDriver for RethPreflightDriver { + fn total_difficulty(header: &::HeaderResponse) -> Option { + >::total_difficulty(header) + } + + fn count_transactions(block: &::BlockResponse) -> usize { + >::count_transactions( + block, + ) + } + + fn derive_transaction( + transaction: ::TransactionResponse, + ) -> ::Transaction { + >::derive_transaction( + transaction, + ) + } + + fn derive_header(header: ::HeaderResponse) -> alloy::consensus::Header { + >::derive_header(header) + } + + fn derive_block( + block: ::BlockResponse, + ommers: Vec<::HeaderResponse>, + ) -> reth_primitives::Block { + >::derive_block( + block, ommers, + ) + } + + fn derive_header_response( + block: ::BlockResponse, + ) -> ::HeaderResponse { + >::derive_header_response( + block, + ) + } + + fn header_response( + block: &::BlockResponse, + ) -> &::HeaderResponse { + >::header_response(block) + } + + fn uncles(block: &::BlockResponse) -> &Vec { + >::uncles(block) + } + + fn derive_receipt( + receipt: ::ReceiptResponse, + ) -> ::Receipt { + >::derive_receipt(receipt) + } + + fn derive_data( + data: StatelessClientData< + ::BlockResponse, + ::HeaderResponse, + >, + ommers: Vec::HeaderResponse>>, + ) -> StatelessClientData { + >::derive_data( + data, ommers, + ) + } +} diff --git a/testing/ef-tests/src/ethers.rs b/testing/ef-tests/src/ethers.rs deleted file mode 100644 index df9a3e36..00000000 --- a/testing/ef-tests/src/ethers.rs +++ /dev/null @@ -1,217 +0,0 @@ -// Copyright 2023 RISC Zero, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -use std::collections::BTreeSet; - -use ethers_core::types::{ - Block, Bloom, Bytes, EIP1186ProofResponse, StorageProof, Transaction, TransactionReceipt, H256, - U256, -}; -use zeth_primitives::U256 as LibU256; - -use super::*; - -/// Provider that always returns the default if not contained in the state. -pub struct TestProvider { - pub state: TestState, - pub header: Header, - pub post: TestState, -} - -impl Provider for TestProvider { - fn save(&self) -> Result<(), anyhow::Error> { - unimplemented!() - } - - fn get_full_block(&mut self, _: &BlockQuery) -> Result, anyhow::Error> { - unimplemented!() - } - - fn get_partial_block(&mut self, query: &BlockQuery) -> Result, anyhow::Error> { - if query.block_no != self.header.number { - bail!("block {} not found", query.block_no); - } - - Ok(Block:: { - parent_hash: self.header.parent_hash.0.into(), - uncles_hash: self.header.ommers_hash.0.into(), - author: Some(self.header.beneficiary.into_array().into()), - state_root: self.header.state_root.0.into(), - transactions_root: self.header.transactions_root.0.into(), - receipts_root: self.header.receipts_root.0.into(), - logs_bloom: Some(Bloom::from_slice(self.header.logs_bloom.as_slice())), - difficulty: self.header.difficulty.to_be_bytes().into(), - number: Some(self.header.number.into()), - gas_limit: self.header.gas_limit.to_be_bytes().into(), - gas_used: self.header.gas_used.to_be_bytes().into(), - timestamp: self.header.timestamp.to_be_bytes().into(), - extra_data: self.header.extra_data.0.clone().into(), - mix_hash: Some(self.header.mix_hash.0.into()), - nonce: Some(self.header.nonce.0.into()), - base_fee_per_gas: Some(self.header.base_fee_per_gas.to_be_bytes().into()), - withdrawals_root: self.header.withdrawals_root.map(|r| r.0.into()), - hash: Some(self.header.hash().0.into()), - ..Default::default() - }) - } - - fn get_block_receipts( - &mut self, - _query: &BlockQuery, - ) -> anyhow::Result> { - unimplemented!() - } - - fn get_proof(&mut self, query: &ProofQuery) -> Result { - let indices = query - .indices - .iter() - .map(|idx| LibU256::from_be_bytes(idx.0)); - - if query.block_no == self.header.number { - get_proof(from_ethers_h160(query.address), indices, &self.state) - } else if query.block_no == self.header.number + 1 { - get_proof(from_ethers_h160(query.address), indices, &self.post) - } else { - panic!("invalid block number: {}", query.block_no) - } - } - - fn get_transaction_count(&mut self, query: &AccountQuery) -> Result { - assert_eq!(query.block_no, self.header.number); - - let nonce: u64 = self - .state - .0 - .get(&from_ethers_h160(query.address)) - .map(|account| account.nonce.try_into().unwrap()) - .unwrap_or_default(); - Ok(U256::from(nonce)) - } - - fn get_balance(&mut self, query: &AccountQuery) -> Result { - assert_eq!(query.block_no, self.header.number); - - let balance = self - .state - .0 - .get(&from_ethers_h160(query.address)) - .map(|account| account.balance) - .unwrap_or_default(); - Ok(balance.to_be_bytes().into()) - } - - fn get_code(&mut self, query: &AccountQuery) -> Result { - assert_eq!(query.block_no, self.header.number); - - let code = self - .state - .0 - .get(&from_ethers_h160(query.address)) - .map(|account| account.code.clone()) - .unwrap_or_default(); - Ok(code.0.into()) - } - - fn get_storage(&mut self, query: &StorageQuery) -> Result { - assert_eq!(query.block_no, self.header.number); - - match self.state.0.get(&from_ethers_h160(query.address)) { - Some(account) => { - let value = account - .storage - .get(&LibU256::from_be_bytes(query.index.0)) - .cloned() - .unwrap_or_default(); - Ok(value.to_be_bytes().into()) - } - None => Ok(H256::zero()), - } - } -} - -/// Builds the state trie and storage tries from the test state. -pub fn build_tries(state: &TestState) -> (MptNode, HashMap) { - let mut state_trie = MptNode::default(); - let mut storage_tries = HashMap::new(); - for (address, account) in &state.0 { - let mut storage_trie = MptNode::default(); - for (slot, value) in &account.storage { - if *value != LibU256::ZERO { - storage_trie - .insert_rlp(&keccak(slot.to_be_bytes::<32>()), *value) - .unwrap(); - } - } - - state_trie - .insert_rlp( - &keccak(address), - StateAccount { - nonce: account.nonce.try_into().unwrap(), - balance: account.balance, - storage_root: storage_trie.hash(), - code_hash: keccak(account.code.clone()).into(), - }, - ) - .unwrap(); - storage_tries.insert(*address, storage_trie); - } - - (state_trie, storage_tries) -} - -fn get_proof( - address: Address, - indices: impl IntoIterator, - state: &TestState, -) -> Result { - let account = state.0.get(&address).cloned().unwrap_or_default(); - let (state_trie, mut storage_tries) = build_tries(state); - let storage_trie = storage_tries.remove(&address).unwrap_or_default(); - - let account_proof = mpt_proof(&state_trie, keccak(address))? - .into_iter() - .map(|p| p.into()) - .collect(); - let mut storage_proof = vec![]; - let index_set = indices.into_iter().collect::>(); - for index in index_set { - let proof = StorageProof { - key: index.to_be_bytes().into(), - proof: mpt_proof(&storage_trie, keccak(index.to_be_bytes::<32>()))? - .into_iter() - .map(|p| p.into()) - .collect(), - value: account - .storage - .get(&index) - .cloned() - .unwrap_or_default() - .to_be_bytes() - .into(), - }; - storage_proof.push(proof); - } - - Ok(EIP1186ProofResponse { - address: address.into_array().into(), - balance: account.balance.to_be_bytes().into(), - code_hash: keccak(account.code).into(), - nonce: account.nonce.to_be_bytes().into(), - storage_hash: storage_trie.hash().0.into(), - account_proof, - storage_proof, - }) -} diff --git a/testing/ef-tests/src/ethtests.rs b/testing/ef-tests/src/ethtests.rs deleted file mode 100644 index bcb84a3b..00000000 --- a/testing/ef-tests/src/ethtests.rs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2024 RISC Zero, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -use std::{fs::File, io::BufReader, path::PathBuf}; - -use revm::primitives::SpecId; -use serde_json::Value; -use zeth_lib::consts::{ChainSpec, ETH_MAINNET_EIP1559_CONSTANTS}; -use zeth_primitives::block::Header; - -use crate::TestJson; - -pub struct EthTestCase { - pub json: TestJson, - pub genesis: Header, - pub chain_spec: ChainSpec, -} - -pub fn read_eth_test(path: PathBuf) -> Vec { - println!("Using file: {}", path.display()); - let f = File::open(path).unwrap(); - let mut root: Value = serde_json::from_reader(BufReader::new(f)).unwrap(); - - root.as_object_mut() - .unwrap() - .into_iter() - .filter_map(|(name, test)| { - println!("test '{}'", name); - let json: TestJson = serde_json::from_value(test.take()).unwrap(); - - let spec: SpecId = json.network.as_str().into(); - // skip tests with an unsupported network version - if spec < SpecId::MERGE || spec > SpecId::SHANGHAI { - println!("skipping ({})", json.network); - return None; - } - let chain_spec = ChainSpec::new_single(1, spec, ETH_MAINNET_EIP1559_CONSTANTS); - - let genesis: Header = json.genesis.clone().into(); - assert_eq!(genesis.hash(), json.genesis.hash); - - Some(EthTestCase { - json, - genesis, - chain_spec, - }) - }) - .collect() -} diff --git a/testing/ef-tests/src/lib.rs b/testing/ef-tests/src/lib.rs index 1bf8a69a..b530d80a 100644 --- a/testing/ef-tests/src/lib.rs +++ b/testing/ef-tests/src/lib.rs @@ -14,364 +14,144 @@ #![cfg(feature = "ef-tests")] -use anyhow::bail; -use hashbrown::HashMap; -use serde::{Deserialize, Serialize}; -use serde_with::{serde_as, NoneAsEmptyString}; -use zeth_lib::{ - builder::{BlockBuilder, BlockBuilderStrategy, EthereumStrategy}, - consts::ChainSpec, - host::{ - preflight::Data, - provider::{AccountQuery, BlockQuery, ProofQuery, Provider, StorageQuery}, - provider_db::ProviderDb, - }, - input::{BlockBuildInput, StateInput}, - mem_db::{AccountState, DbAccount, MemDb}, +use alloy::{ + primitives::{Address, Bytes, B256, U256}, + rpc::types::{Header, Transaction, Withdrawal}, }; -use zeth_primitives::{ - access_list::{AccessList, AccessListItem}, - alloy_rlp, - block::Header, - ethers::from_ethers_h160, - keccak::keccak, - transactions::{ - ethereum::{ - EthereumTxEssence, TransactionKind, TxEssenceEip1559, TxEssenceEip2930, TxEssenceLegacy, - }, - signature::TxSignature, - EthereumTransaction, - }, - trie::{self, MptNode, MptNodeData, StateAccount}, - withdrawal::Withdrawal, - Address, Bloom, Bytes, StorageKey, B256, B64, U256, U64, -}; - -use crate::ethers::TestProvider; +use serde::Deserialize; +use serde_with::{serde_as, TryFromInto}; +use std::{collections::HashMap, default::Default, fs::File, io::BufReader, path::PathBuf}; -pub mod ethers; -pub mod ethtests; +mod driver; +mod provider; -pub mod guests { - include!(concat!(env!("OUT_DIR"), "/methods.rs")); -} +pub use driver::TestCoreDriver; +pub use provider::TestProvider; -#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde_as] +#[derive(Debug, Clone, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct TestJson { - pub blocks: Vec, - #[serde(rename = "genesisBlockHeader")] - pub genesis: TestHeader, +pub struct Test { + #[serde_as(as = "TryFromInto")] + pub genesis_block_header: Header, #[serde(rename = "genesisRLP")] pub genesis_rlp: Bytes, + pub blocks: Vec, pub network: String, pub pre: TestState, - #[serde(rename = "postState")] - pub post: Option, + pub post_state: Option, } -#[derive(Debug, Clone, Serialize, Deserialize)] +#[derive(Debug, Clone, Deserialize)] +#[serde(transparent)] +pub struct TestHeader(serde_json::Map); + +#[serde_as] +#[derive(Debug, Clone, Deserialize)] #[serde(rename_all = "camelCase")] pub struct TestBlock { - pub block_header: Option, + #[serde_as(as = "Option>")] + pub block_header: Option
, pub expect_exception: Option, pub rlp: Bytes, #[serde(default)] - pub transactions: Vec, + #[serde_as(as = "Vec>")] + pub transactions: Vec, #[serde(default)] - pub uncle_headers: Vec, + #[serde_as(as = "Vec>")] + pub uncle_headers: Vec
, pub withdrawals: Option>, } -#[derive(Debug, Clone, Default, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Deserialize)] +#[serde(transparent)] +pub struct TestTransaction(serde_json::Map); + +#[derive(Debug, Clone, Default, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct TestState(HashMap); + +#[derive(Debug, Clone, Default, Deserialize)] #[serde(rename_all = "camelCase")] pub struct TestAccount { pub balance: U256, - pub nonce: U64, - pub code: Bytes, + #[serde(with = "alloy::serde::quantity")] + pub nonce: u64, pub storage: HashMap, + pub code: Bytes, } -impl From for TestAccount { - fn from(account: DbAccount) -> Self { - TestAccount { - balance: account.info.balance, - nonce: U64::from(account.info.nonce), - code: account.info.code.unwrap().bytecode, - storage: account.storage.into_iter().collect(), - } - } -} - -#[derive(Debug, Clone, Default, Serialize, Deserialize, PartialEq, Eq)] -#[serde(rename_all = "camelCase")] -pub struct TestState(pub HashMap); - -impl From<&MemDb> for TestState { - fn from(db: &MemDb) -> Self { - TestState( - db.accounts - .iter() - .filter(|(_, account)| account.state != AccountState::Deleted) - .map(|(addr, account)| (*addr, account.clone().into())) - .collect(), - ) - } -} - -impl From<&ProviderDb> for TestState { - fn from(db: &ProviderDb) -> Self { - (&db.latest_db).into() - } -} - -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct TestHeader { - pub base_fee_per_gas: Option, - pub bloom: Bloom, - pub coinbase: Address, - pub extra_data: Bytes, - pub difficulty: U256, - pub gas_limit: U256, - pub gas_used: U256, - pub hash: B256, - pub mix_hash: B256, - pub nonce: B64, - pub number: U64, - pub parent_hash: B256, - pub receipt_trie: B256, - pub state_root: B256, - pub timestamp: U256, - pub transactions_trie: B256, - pub uncle_hash: B256, - pub withdrawals_root: Option, -} +impl TryFrom for Header { + type Error = serde_json::Error; -impl From for Header { - fn from(header: TestHeader) -> Self { - Header { - parent_hash: header.parent_hash, - ommers_hash: header.uncle_hash, - beneficiary: header.coinbase, - state_root: header.state_root, - transactions_root: header.transactions_trie, - receipts_root: header.receipt_trie, - logs_bloom: header.bloom, - difficulty: header.difficulty, - number: header.number.try_into().unwrap(), - gas_limit: header.gas_limit, - gas_used: header.gas_used, - timestamp: header.timestamp, - extra_data: header.extra_data, - mix_hash: header.mix_hash, - nonce: header.nonce, - base_fee_per_gas: header.base_fee_per_gas.unwrap(), - withdrawals_root: header.withdrawals_root, - } - } -} + fn try_from(h: TestHeader) -> Result { + let mut map = h.0; -#[serde_as] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct TestTransaction { - pub data: Bytes, - pub access_list: Option, - pub gas_limit: U256, - pub gas_price: Option, - pub max_fee_per_gas: Option, - pub max_priority_fee_per_gas: Option, - pub value: U256, - #[serde_as(as = "NoneAsEmptyString")] - pub to: Option
, - pub nonce: U64, - pub v: U64, - pub r: U256, - pub s: U256, -} + // rename some fields + map.remove("uncleHash") + .map(|v| map.insert("sha3Uncles".to_string(), v)); + map.remove("coinbase") + .map(|v| map.insert("miner".to_string(), v)); + map.remove("transactionsTrie") + .map(|v| map.insert("transactionsRoot".to_string(), v)); + map.remove("receiptTrie") + .map(|v| map.insert("receiptsRoot".to_string(), v)); + map.remove("bloom") + .map(|v| map.insert("logsBloom".to_string(), v)); -impl From for EthereumTransaction { - fn from(tx: TestTransaction) -> Self { - let signature = TxSignature { - v: tx.v.try_into().unwrap(), - r: tx.r, - s: tx.s, - }; - let essence = if tx.access_list.is_none() { - EthereumTxEssence::Legacy(TxEssenceLegacy { - chain_id: None, - nonce: tx.nonce.try_into().unwrap(), - gas_price: tx.gas_price.unwrap(), - gas_limit: tx.gas_limit, - to: match tx.to { - Some(addr) => TransactionKind::Call(addr), - None => TransactionKind::Create, - }, - value: tx.value, - data: tx.data, - }) - } else if tx.max_fee_per_gas.is_none() { - EthereumTxEssence::Eip2930(TxEssenceEip2930 { - chain_id: 1, - nonce: tx.nonce.try_into().unwrap(), - gas_price: tx.gas_price.unwrap(), - gas_limit: tx.gas_limit, - to: match tx.to { - Some(addr) => TransactionKind::Call(addr), - None => TransactionKind::Create, - }, - value: tx.value, - data: tx.data, - access_list: tx.access_list.unwrap().into(), - }) - } else { - EthereumTxEssence::Eip1559(TxEssenceEip1559 { - chain_id: 1, - nonce: tx.nonce.try_into().unwrap(), - max_priority_fee_per_gas: tx.max_priority_fee_per_gas.unwrap(), - max_fee_per_gas: tx.max_fee_per_gas.unwrap(), - gas_limit: tx.gas_limit, - to: match tx.to { - Some(addr) => TransactionKind::Call(addr), - None => TransactionKind::Create, - }, - value: tx.value, - data: tx.data, - access_list: tx.access_list.unwrap().into(), - }) - }; - EthereumTransaction { essence, signature } + serde_json::from_value(map.into()) } } -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct TestAccessList(pub Vec); +impl TryFrom for Transaction { + type Error = serde_json::Error; -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct TestAccessListItem { - pub address: Address, - pub storage_keys: Vec, -} + fn try_from(tx: TestTransaction) -> Result { + let mut map = tx.0; -impl From for AccessList { - fn from(list: TestAccessList) -> Self { - AccessList( - list.0 - .into_iter() - .map(|item| AccessListItem { - address: item.address, - storage_keys: item.storage_keys, - }) - .collect(), - ) - } -} - -/// Computes the Merkle proof for the given key in the trie. -pub fn mpt_proof(root: &MptNode, key: impl AsRef<[u8]>) -> Result>, anyhow::Error> { - let mut path = proof_internal(root, &trie::to_nibs(key.as_ref()))?; - path.reverse(); - Ok(path) -} + // rename some fields + map.remove("data") + .map(|v| map.insert("input".to_string(), v)); + map.remove("gasLimit") + .map(|v| map.insert("gas".to_string(), v)); -fn proof_internal(node: &MptNode, key_nibs: &[u8]) -> Result>, anyhow::Error> { - if key_nibs.is_empty() { - return Ok(vec![alloy_rlp::encode(node)]); - } + // add defaults for missing fields + map.entry("hash") + .or_insert_with(|| serde_json::to_value(B256::default()).unwrap()); + map.entry("from") + .or_insert_with(|| serde_json::to_value(Address::default()).unwrap()); - let mut path: Vec> = match node.as_data() { - MptNodeData::Null | MptNodeData::Leaf(_, _) => vec![], - MptNodeData::Branch(children) => { - let (i, tail) = key_nibs.split_first().unwrap(); - match &children[*i as usize] { - Some(child) => proof_internal(child, tail)?, - None => vec![], + // it seems that for pre-EIP-155 txs, the chain ID is sometimes incorrectly set to 0 + if let serde_json::map::Entry::Occupied(entry) = map.entry("chainId") { + if entry.get().as_str() == Some("0x00") { + entry.remove(); } } - MptNodeData::Extension(_, child) => { - if let Some(tail) = key_nibs.strip_prefix(node.nibs().as_slice()) { - proof_internal(child, tail)? - } else { - vec![] + // recipient field should be missing instead of empty + if let serde_json::map::Entry::Occupied(entry) = map.entry("to") { + if entry.get().as_str() == Some("") { + entry.remove(); } } - MptNodeData::Digest(_) => bail!("Cannot descend pointer!"), - }; - path.push(alloy_rlp::encode(node)); - Ok(path) + serde_json::from_value(map.into()) + } } -/// The size of the stack to use for the EVM. -pub const BIG_STACK_SIZE: usize = 8 * 1024 * 1024; +pub fn read_eth_execution_tests(path: PathBuf) -> impl Iterator { + println!("Using file: {}", path.display()); + let f = File::open(path).unwrap(); -pub fn create_input( - chain_spec: &ChainSpec, - parent_header: Header, - parent_state: TestState, - header: Header, - transactions: Vec, - withdrawals: Vec, - state: TestState, -) -> BlockBuildInput { - // create the provider DB - let provider_db = ProviderDb::new( - Box::new(TestProvider { - state: parent_state, - header: parent_header.clone(), - post: state, - }), - parent_header.number, - ); + let tests: HashMap = serde_json::from_reader(BufReader::new(f)).unwrap(); + tests.into_iter().filter_map(|(name, test)| { + println!("test '{}'", name); - let transactions: Vec = transactions - .into_iter() - .map(EthereumTransaction::from) - .collect(); - let input = BlockBuildInput { - state_input: StateInput { - beneficiary: header.beneficiary, - gas_limit: header.gas_limit, - timestamp: header.timestamp, - extra_data: header.extra_data.clone(), - mix_hash: header.mix_hash, - transactions: transactions.clone(), - withdrawals: withdrawals.clone(), - parent_header: parent_header.clone(), - }, - parent_state_trie: Default::default(), - parent_storage: Default::default(), - contracts: vec![], - - ancestor_headers: vec![], - }; - - // create and run the block builder once to create the initial DB - let mut builder = BlockBuilder::new(chain_spec, input, None) - .with_db(provider_db) - .prepare_header::<::HeaderPrepStrategy>() - .unwrap() - .execute_transactions::<::TxExecStrategy>() - .unwrap(); - let provider_db = builder.mut_db().unwrap(); - - let parent_proofs = provider_db.get_initial_proofs().unwrap(); - let proofs = provider_db.get_latest_proofs().unwrap(); - let ancestor_headers = provider_db.get_ancestor_headers().unwrap(); - - let preflight_data = Data { - db: provider_db.get_initial_db().clone(), - parent_header, - parent_proofs, - header: Some(header), - transactions, - withdrawals, - proofs, - ancestor_headers, - }; + // skip tests with an unsupported network version + if test.network.as_str() != "Cancun" { + println!("skipping ({})", test.network); + return None; + } - preflight_data.try_into().unwrap() + Some(test) + }) } diff --git a/testing/ef-tests/src/provider.rs b/testing/ef-tests/src/provider.rs new file mode 100644 index 00000000..c9f85df7 --- /dev/null +++ b/testing/ef-tests/src/provider.rs @@ -0,0 +1,303 @@ +use crate::{TestBlock, TestState}; +use alloy::{ + consensus::Account, + network::{Ethereum, Network}, + primitives::{keccak256, Address, Bytes, B256, U256}, + rpc::types::{ + Block, BlockTransactions, EIP1186AccountProofResponse, EIP1186StorageProof, Header, + }, +}; +use alloy_trie::proof::ProofRetainer; +use anyhow::anyhow; +use nybbles::Nibbles; +use reth_chainspec::NamedChain; +use std::{ + collections::{ + BTreeMap, + Bound::{Excluded, Unbounded}, + }, + iter, vec, +}; +use zeth_preflight::provider::{ + query::{ + AccountQuery, AccountRangeQuery, BlockQuery, PreimageQuery, ProofQuery, StorageQuery, + StorageRangeQuery, UncleQuery, + }, + Provider, +}; + +/// Provider that always returns the default if not contained in the state. +pub struct TestProvider { + genesis: Header, + block: TestBlock, + pre: ProviderState, + post: ProviderState, +} + +struct ProviderState(BTreeMap); + +struct ProviderAccount { + address: Address, + storage: BTreeMap, + code: Bytes, + acc: Account, +} + +impl TestProvider { + pub fn new(genesis: Header, block: TestBlock, pre: TestState, post: TestState) -> Self { + TestProvider { + genesis, + block, + pre: pre.into(), + post: post.into(), + } + } +} + +impl Provider for TestProvider { + fn save(&self) -> anyhow::Result<()> { + Ok(()) + } + + fn advance(&mut self) -> anyhow::Result<()> { + Ok(()) + } + + fn reset(&mut self, _block_number: u64) -> anyhow::Result<()> { + Ok(()) + } + + fn get_client_version(&mut self) -> anyhow::Result { + unimplemented!("get_client_version") + } + + fn get_chain(&mut self) -> anyhow::Result { + Ok(NamedChain::Mainnet) + } + + fn get_full_block( + &mut self, + query: &BlockQuery, + ) -> anyhow::Result<::BlockResponse> { + if query.block_no == 0 { + return Ok(Block { + header: self.genesis.clone(), + uncles: vec![], + transactions: BlockTransactions::Full(vec![]), + size: None, + withdrawals: None, + }); + } + + assert_eq!(query.block_no, 1); + let block = self.block.clone(); + Ok(Block { + header: block.block_header.unwrap(), + uncles: block.uncle_headers.iter().map(|h| h.hash).collect(), + transactions: BlockTransactions::Full(block.transactions), + size: None, + withdrawals: block.withdrawals, + }) + } + + fn get_uncle_block( + &mut self, + query: &UncleQuery, + ) -> anyhow::Result<::BlockResponse> { + assert_eq!(query.block_no, 1); + let uncle = self.block.uncle_headers[query.uncle_index as usize].clone(); + Ok(Block { + header: uncle, + uncles: vec![], + transactions: BlockTransactions::Uncle, + size: None, + withdrawals: None, + }) + } + + fn get_block_receipts( + &mut self, + _: &BlockQuery, + ) -> anyhow::Result::ReceiptResponse>> { + unimplemented!("get_block_receipts") + } + + fn get_proof(&mut self, query: &ProofQuery) -> anyhow::Result { + match query.block_no { + 0 => Ok(self.pre.get_proof(query.address, &query.indices)), + 1 => Ok(self.post.get_proof(query.address, &query.indices)), + block_no => Err(anyhow!("no state for block: {block_no}")), + } + } + + fn get_transaction_count(&mut self, query: &AccountQuery) -> anyhow::Result { + assert_eq!(query.block_no, 0); + let nonce = self.pre.get_nonce(&query.address).unwrap_or_default(); + Ok(U256::from(nonce)) + } + + fn get_balance(&mut self, query: &AccountQuery) -> anyhow::Result { + assert_eq!(query.block_no, 0); + let balance = self.pre.get_balance(&query.address); + Ok(balance.unwrap_or_default()) + } + + fn get_code(&mut self, query: &AccountQuery) -> anyhow::Result { + assert_eq!(query.block_no, 0); + let code = self.pre.get_code(&query.address); + Ok(code.unwrap_or_default()) + } + + fn get_storage(&mut self, query: &StorageQuery) -> anyhow::Result { + assert_eq!(query.block_no, 0); + let value = self.pre.get_storage(&query.address, query.index); + Ok(value.unwrap_or_default()) + } + + fn get_preimage(&mut self, _query: &PreimageQuery) -> anyhow::Result { + unimplemented!("get_preimage") + } + + fn get_next_account(&mut self, query: &AccountRangeQuery) -> anyhow::Result
{ + assert_eq!(query.block_no, 0); + self.pre + .get_next_account(query.start) + .ok_or(anyhow!("no next account")) + } + + fn get_next_slot(&mut self, query: &StorageRangeQuery) -> anyhow::Result { + assert_eq!(query.block_no, 0); + let next = self + .pre + .get_next_slot(query.address, query.start) + .ok_or(anyhow!("no next slot"))?; + Ok(next.into()) + } +} + +impl ProviderState { + fn get_proof<'a>( + &self, + address: Address, + indices: impl IntoIterator, + ) -> EIP1186AccountProofResponse { + let key = keccak256(&address); + let account = self.0.get(&key); + + let mut storage_proof = Vec::new(); + let storage = account.map(|a| &a.storage).cloned().unwrap_or_default(); + for index in indices { + let key = keccak256(index); + let (_, proof) = mpt_proof(storage.iter().map(|(k, v)| (k, v.1)), iter::once(&key)); + storage_proof.push(EIP1186StorageProof { + key: (*index).into(), + value: storage.get(&key).map(|v| v.1).unwrap_or_default(), + proof, + }) + } + + let account = account.map(|a| a.acc.clone()).unwrap_or_default(); + let (_, account_proof) = mpt_proof( + self.0.iter().map(|(addr, acc)| (addr, acc.acc)), + iter::once(&key), + ); + + EIP1186AccountProofResponse { + address, + balance: account.balance, + code_hash: account.code_hash, + nonce: account.nonce, + storage_hash: account.storage_root, + account_proof, + storage_proof, + } + } + + fn get_nonce(&self, address: &Address) -> Option { + self.0.get(&keccak256(address)).map(|a| a.acc.nonce) + } + + fn get_balance(&self, address: &Address) -> Option { + self.0.get(&keccak256(address)).map(|a| a.acc.balance) + } + + fn get_code(&self, address: &Address) -> Option { + self.0.get(&keccak256(address)).map(|a| a.code.clone()) + } + + fn get_storage(&self, address: &Address, index: impl Into) -> Option { + let account = self.0.get(&keccak256(address)); + let key = keccak256(index.into()); + account.and_then(|a| a.storage.get(&key)).map(|v| v.1) + } + + fn get_next_account(&self, start: B256) -> Option
{ + let next = self.0.range((Excluded(start), Unbounded)).next(); + next.map(|(_, v)| v.address) + } + + fn get_next_slot(&self, address: Address, start: B256) -> Option { + let Some(account) = self.0.get(&keccak256(address)) else { + return None; + }; + let next = account.storage.range((Excluded(start), Unbounded)).next(); + next.map(|(_, v)| v.0) + } +} + +impl From for ProviderState { + fn from(test_state: TestState) -> Self { + let mut state = BTreeMap::new(); + for (address, test_account) in test_state.0 { + let key = keccak256(address); + let storage: BTreeMap = test_account + .storage + .into_iter() + .map(|(k, v)| (keccak256(B256::from(k)), (B256::from(k), v))) + .collect(); + let (storage_root, _) = mpt_proof(storage.iter().map(|(k, v)| (k, v.1)), iter::empty()); + let code = test_account.code; + let acc = Account { + nonce: test_account.nonce, + balance: test_account.balance, + storage_root, + code_hash: keccak256(&code), + }; + + state.insert( + key, + ProviderAccount { + address, + storage, + code, + acc, + }, + ); + } + + ProviderState(state) + } +} + +fn mpt_proof, V: alloy::rlp::Encodable>( + leaves: impl IntoIterator, + targets: impl IntoIterator, +) -> (B256, Vec) { + let mut hasher = alloy_trie::HashBuilder::default(); + let targets: Vec<_> = targets.into_iter().map(|t| Nibbles::unpack(t)).collect(); + if targets.len() > 0 { + hasher = hasher.with_proof_retainer(ProofRetainer::new(targets)); + } + for (key, value) in leaves { + hasher.add_leaf(Nibbles::unpack(key), alloy::rlp::encode(value).as_slice()) + } + let root = hasher.root(); + let proof = hasher + .take_proof_nodes() + .into_nodes_sorted() + .into_iter() + .map(|(_, b)| b) + .collect(); + + (root, proof) +} diff --git a/testing/ef-tests/testdata b/testing/ef-tests/testdata new file mode 160000 index 00000000..92010754 --- /dev/null +++ b/testing/ef-tests/testdata @@ -0,0 +1 @@ +Subproject commit 9201075490807f58811078e9bb5ec895b4ac01a5 diff --git a/testing/ef-tests/testguest/Cargo.lock b/testing/ef-tests/testguest/Cargo.lock deleted file mode 100644 index c1eac21c..00000000 --- a/testing/ef-tests/testguest/Cargo.lock +++ /dev/null @@ -1,3888 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "addr2line" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "adler32" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" - -[[package]] -name = "ahash" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" -dependencies = [ - "cfg-if", - "once_cell", - "version_check", - "zerocopy", -] - -[[package]] -name = "aho-corasick" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" -dependencies = [ - "memchr", -] - -[[package]] -name = "allocator-api2" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" - -[[package]] -name = "alloy-primitives" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4b6fb2b432ff223d513db7f908937f63c252bee0af9b82bfd25b0a5dd1eb0d8" -dependencies = [ - "alloy-rlp", - "bytes", - "cfg-if", - "const-hex", - "derive_more", - "hex-literal", - "itoa", - "k256", - "keccak-asm", - "proptest", - "rand", - "ruint", - "serde", - "tiny-keccak", -] - -[[package]] -name = "alloy-rlp" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d58d9f5da7b40e9bfff0b7e7816700be4019db97d4b6359fe7f94a9e22e42ac" -dependencies = [ - "arrayvec", - "bytes", -] - -[[package]] -name = "alloy-rlp-derive" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a047897373be4bbb0224c1afdabca92648dc57a9c9ef6e7b0be3aff7a859c83" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "alloy-sol-macro" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b0b5ab0cb07c21adf9d72e988b34e8200ce648c2bba8d009183bb1c50fb1216" -dependencies = [ - "const-hex", - "dunce", - "heck", - "indexmap", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 2.0.48", - "syn-solidity", - "tiny-keccak", -] - -[[package]] -name = "alloy-sol-types" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c08f62ded7ce03513bfb60ef5cad4fff5d4f67eac6feb4df80426b7b9ffb06e" -dependencies = [ - "alloy-primitives", - "alloy-sol-macro", - "const-hex", - "serde", -] - -[[package]] -name = "anyhow" -version = "1.0.79" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" - -[[package]] -name = "ark-bn254" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a22f4561524cd949590d78d7d4c5df8f592430d221f7f3c9497bbafd8972120f" -dependencies = [ - "ark-ec", - "ark-ff 0.4.2", - "ark-std 0.4.0", -] - -[[package]] -name = "ark-crypto-primitives" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3a13b34da09176a8baba701233fdffbaa7c1b1192ce031a3da4e55ce1f1a56" -dependencies = [ - "ark-ec", - "ark-ff 0.4.2", - "ark-relations", - "ark-serialize 0.4.2", - "ark-snark", - "ark-std 0.4.0", - "blake2", - "derivative", - "digest 0.10.7", - "sha2", -] - -[[package]] -name = "ark-ec" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" -dependencies = [ - "ark-ff 0.4.2", - "ark-poly", - "ark-serialize 0.4.2", - "ark-std 0.4.0", - "derivative", - "hashbrown 0.13.2", - "itertools", - "num-traits", - "zeroize", -] - -[[package]] -name = "ark-ff" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b3235cc41ee7a12aaaf2c575a2ad7b46713a8a50bda2fc3b003a04845c05dd6" -dependencies = [ - "ark-ff-asm 0.3.0", - "ark-ff-macros 0.3.0", - "ark-serialize 0.3.0", - "ark-std 0.3.0", - "derivative", - "num-bigint", - "num-traits", - "paste", - "rustc_version 0.3.3", - "zeroize", -] - -[[package]] -name = "ark-ff" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" -dependencies = [ - "ark-ff-asm 0.4.2", - "ark-ff-macros 0.4.2", - "ark-serialize 0.4.2", - "ark-std 0.4.0", - "derivative", - "digest 0.10.7", - "itertools", - "num-bigint", - "num-traits", - "paste", - "rustc_version 0.4.0", - "zeroize", -] - -[[package]] -name = "ark-ff-asm" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" -dependencies = [ - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-ff-asm" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" -dependencies = [ - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-ff-macros" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" -dependencies = [ - "num-bigint", - "num-traits", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-ff-macros" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" -dependencies = [ - "num-bigint", - "num-traits", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-groth16" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20ceafa83848c3e390f1cbf124bc3193b3e639b3f02009e0e290809a501b95fc" -dependencies = [ - "ark-crypto-primitives", - "ark-ec", - "ark-ff 0.4.2", - "ark-poly", - "ark-relations", - "ark-serialize 0.4.2", - "ark-std 0.4.0", -] - -[[package]] -name = "ark-poly" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" -dependencies = [ - "ark-ff 0.4.2", - "ark-serialize 0.4.2", - "ark-std 0.4.0", - "derivative", - "hashbrown 0.13.2", -] - -[[package]] -name = "ark-relations" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00796b6efc05a3f48225e59cb6a2cda78881e7c390872d5786aaf112f31fb4f0" -dependencies = [ - "ark-ff 0.4.2", - "ark-std 0.4.0", - "tracing", - "tracing-subscriber", -] - -[[package]] -name = "ark-serialize" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671" -dependencies = [ - "ark-std 0.3.0", - "digest 0.9.0", -] - -[[package]] -name = "ark-serialize" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" -dependencies = [ - "ark-serialize-derive", - "ark-std 0.4.0", - "digest 0.10.7", - "num-bigint", -] - -[[package]] -name = "ark-serialize-derive" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-snark" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84d3cc6833a335bb8a600241889ead68ee89a3cf8448081fb7694c0fe503da63" -dependencies = [ - "ark-ff 0.4.2", - "ark-relations", - "ark-serialize 0.4.2", - "ark-std 0.4.0", -] - -[[package]] -name = "ark-std" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" -dependencies = [ - "num-traits", - "rand", -] - -[[package]] -name = "ark-std" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" -dependencies = [ - "num-traits", - "rand", -] - -[[package]] -name = "arrayvec" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" - -[[package]] -name = "async-trait" -version = "0.1.77" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "async_io_stream" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c" -dependencies = [ - "futures", - "pharos", - "rustc_version 0.4.0", -] - -[[package]] -name = "aurora-engine-modexp" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfacad86e9e138fca0670949eb8ed4ffdf73a55bded8887efe0863cd1a3a6f70" -dependencies = [ - "hex", - "num", -] - -[[package]] -name = "auto_impl" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "823b8bb275161044e2ac7a25879cb3e2480cb403e3943022c7c769c599b756aa" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "backtrace" -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" -dependencies = [ - "addr2line", - "cc", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", -] - -[[package]] -name = "base16ct" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" - -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - -[[package]] -name = "base64ct" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" - -[[package]] -name = "bit-set" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" -dependencies = [ - "bit-vec", -] - -[[package]] -name = "bit-vec" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" -dependencies = [ - "serde", -] - -[[package]] -name = "bitvec" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" -dependencies = [ - "funty", - "radium", - "serde", - "tap", - "wyz", -] - -[[package]] -name = "blake2" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" -dependencies = [ - "digest 0.10.7", -] - -[[package]] -name = "block" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - -[[package]] -name = "blst" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c94087b935a822949d3291a9989ad2b2051ea141eda0fd4e478a75f6aa3e604b" -dependencies = [ - "cc", - "glob", - "threadpool", - "zeroize", -] - -[[package]] -name = "borsh" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6362ed55def622cddc70a4746a68554d7b687713770de539e59a739b249f8ed" -dependencies = [ - "borsh-derive", - "cfg_aliases", -] - -[[package]] -name = "borsh-derive" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3ef8005764f53cd4dca619f5bf64cafd4664dada50ece25e4d81de54c80cc0b" -dependencies = [ - "once_cell", - "proc-macro-crate 3.1.0", - "proc-macro2", - "quote", - "syn 2.0.48", - "syn_derive", -] - -[[package]] -name = "bumpalo" -version = "3.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" - -[[package]] -name = "byte-slice-cast" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" - -[[package]] -name = "bytemuck" -version = "1.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2ef034f05691a48569bd920a96c81b9d91bbad1ab5ac7c4616c1f6ef36cb79f" -dependencies = [ - "bytemuck_derive", -] - -[[package]] -name = "bytemuck_derive" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "bytes" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" -dependencies = [ - "serde", -] - -[[package]] -name = "c-kzg" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9d8c306be83ec04bf5f73710badd8edf56dea23f2f0d8b7f9fe4644d371c758" -dependencies = [ - "blst", - "cc", - "glob", - "hex", - "libc", - "serde", -] - -[[package]] -name = "cc" -version = "1.0.85" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b918671670962b48bc23753aef0c51d072dca6f52f01f800854ada6ddb7f7d3" - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "cfg_aliases" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" - -[[package]] -name = "chrono" -version = "0.4.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bc015644b92d5890fab7489e49d21f879d5c990186827d42ec511919404f38b" -dependencies = [ - "num-traits", -] - -[[package]] -name = "const-hex" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18d59688ad0945eaf6b84cb44fedbe93484c81b48970e98f09db8a22832d7961" -dependencies = [ - "cfg-if", - "cpufeatures", - "hex", - "proptest", - "serde", -] - -[[package]] -name = "const-oid" -version = "0.9.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" - -[[package]] -name = "convert_case" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" - -[[package]] -name = "core-foundation" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" - -[[package]] -name = "core-graphics-types" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "libc", -] - -[[package]] -name = "core2" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b49ba7ef1ad6107f8824dbe97de947cbaac53c44e7f9756a1fba0d37c1eec505" -dependencies = [ - "memchr", -] - -[[package]] -name = "cpufeatures" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" -dependencies = [ - "libc", -] - -[[package]] -name = "crc32fast" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crunchy" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" - -[[package]] -name = "crypto-bigint" -version = "0.5.5" -source = "git+https://github.com/risc0/RustCrypto-crypto-bigint?tag=v0.5.5-risczero.0#3ab63a6f1048833f7047d5a50532e4a4cc789384" -dependencies = [ - "generic-array", - "getrandom", - "rand_core", - "subtle", - "zeroize", -] - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "dary_heap" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7762d17f1241643615821a8455a0b2c3e803784b058693d990b11f2dce25a0ca" - -[[package]] -name = "data-encoding" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" - -[[package]] -name = "der" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" -dependencies = [ - "const-oid", - "zeroize", -] - -[[package]] -name = "deranged" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" -dependencies = [ - "powerfmt", -] - -[[package]] -name = "derivative" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "derive_more" -version = "0.99.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" -dependencies = [ - "convert_case", - "proc-macro2", - "quote", - "rustc_version 0.4.0", - "syn 1.0.109", -] - -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array", -] - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer", - "const-oid", - "crypto-common", - "subtle", -] - -[[package]] -name = "downcast-rs" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" - -[[package]] -name = "dunce" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" - -[[package]] -name = "ecdsa" -version = "0.16.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" -dependencies = [ - "der", - "digest 0.10.7", - "elliptic-curve", - "rfc6979", - "signature", - "spki", -] - -[[package]] -name = "either" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" - -[[package]] -name = "elf" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4445909572dbd556c457c849c4ca58623d84b27c8fff1e74b0b4227d8b90d17b" - -[[package]] -name = "elliptic-curve" -version = "0.13.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" -dependencies = [ - "base16ct", - "crypto-bigint", - "digest 0.10.7", - "ff", - "generic-array", - "group", - "pkcs8", - "rand_core", - "sec1", - "subtle", - "zeroize", -] - -[[package]] -name = "encoding_rs" -version = "0.8.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "enr" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe81b5c06ecfdbc71dd845216f225f53b62a10cb8a16c946836a3467f701d05b" -dependencies = [ - "base64 0.21.7", - "bytes", - "hex", - "k256", - "log", - "rand", - "rlp", - "serde", - "sha3", - "zeroize", -] - -[[package]] -name = "enumn" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fd000fd6988e73bbe993ea3db9b1aa64906ab88766d654973924340c8cddb42" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - -[[package]] -name = "errno" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "ethabi" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7413c5f74cc903ea37386a8965a936cbeb334bd270862fdece542c1b2dcbc898" -dependencies = [ - "ethereum-types", - "hex", - "once_cell", - "regex", - "serde", - "serde_json", - "sha3", - "thiserror", - "uint", -] - -[[package]] -name = "ethbloom" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" -dependencies = [ - "crunchy", - "fixed-hash", - "impl-codec", - "impl-rlp", - "impl-serde", - "scale-info", - "tiny-keccak", -] - -[[package]] -name = "ethereum-types" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" -dependencies = [ - "ethbloom", - "fixed-hash", - "impl-codec", - "impl-rlp", - "impl-serde", - "primitive-types", - "scale-info", - "uint", -] - -[[package]] -name = "ethers-core" -version = "2.0.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aab3cef6cc1c9fd7f787043c81ad3052eff2b96a3878ef1526aa446311bdbfc9" -dependencies = [ - "arrayvec", - "bytes", - "chrono", - "const-hex", - "elliptic-curve", - "ethabi", - "generic-array", - "k256", - "num_enum", - "open-fastrlp", - "rand", - "rlp", - "serde", - "serde_json", - "strum", - "tempfile", - "thiserror", - "tiny-keccak", - "unicode-xid", -] - -[[package]] -name = "ethers-providers" -version = "2.0.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb6b15393996e3b8a78ef1332d6483c11d839042c17be58decc92fa8b1c3508a" -dependencies = [ - "async-trait", - "auto_impl", - "base64 0.21.7", - "bytes", - "const-hex", - "enr", - "ethers-core", - "futures-channel", - "futures-core", - "futures-timer", - "futures-util", - "hashers", - "http", - "instant", - "jsonwebtoken", - "once_cell", - "pin-project", - "reqwest", - "serde", - "serde_json", - "thiserror", - "tokio", - "tokio-tungstenite", - "tracing", - "tracing-futures", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "ws_stream_wasm", -] - -[[package]] -name = "fastrand" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" - -[[package]] -name = "fastrlp" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" -dependencies = [ - "arrayvec", - "auto_impl", - "bytes", -] - -[[package]] -name = "ff" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" -dependencies = [ - "rand_core", - "subtle", -] - -[[package]] -name = "fixed-hash" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" -dependencies = [ - "byteorder", - "rand", - "rustc-hex", - "static_assertions", -] - -[[package]] -name = "flate2" -version = "1.0.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "foreign-types" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" -dependencies = [ - "foreign-types-macros", - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-macros" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "foreign-types-shared" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" - -[[package]] -name = "form_urlencoded" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "funty" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" - -[[package]] -name = "futures" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[package]] -name = "futures-core" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" - -[[package]] -name = "futures-executor" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-io" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" - -[[package]] -name = "futures-macro" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "futures-sink" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" - -[[package]] -name = "futures-task" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" - -[[package]] -name = "futures-timer" -version = "3.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" -dependencies = [ - "gloo-timers", - "send_wrapper 0.4.0", -] - -[[package]] -name = "futures-util" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "fxhash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", - "zeroize", -] - -[[package]] -name = "getrandom" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - -[[package]] -name = "gimli" -version = "0.28.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" - -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - -[[package]] -name = "gloo-timers" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" -dependencies = [ - "futures-channel", - "futures-core", - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "group" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" -dependencies = [ - "ff", - "rand_core", - "subtle", -] - -[[package]] -name = "h2" -version = "0.3.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "hashbrown" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" -dependencies = [ - "ahash", -] - -[[package]] -name = "hashbrown" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" -dependencies = [ - "ahash", - "allocator-api2", - "serde", -] - -[[package]] -name = "hashers" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2bca93b15ea5a746f220e56587f71e73c6165eab783df9e26590069953e3c30" -dependencies = [ - "fxhash", -] - -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - -[[package]] -name = "hermit-abi" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0c62115964e08cb8039170eb33c1d0e2388a256930279edca206fff675f82c3" - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -dependencies = [ - "serde", -] - -[[package]] -name = "hex-literal" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" - -[[package]] -name = "hmac" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" -dependencies = [ - "digest 0.10.7", -] - -[[package]] -name = "http" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" -dependencies = [ - "bytes", - "http", - "pin-project-lite", -] - -[[package]] -name = "httparse" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" - -[[package]] -name = "httpdate" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" - -[[package]] -name = "hyper" -version = "0.14.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", - "want", -] - -[[package]] -name = "hyper-rustls" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" -dependencies = [ - "futures-util", - "http", - "hyper", - "rustls", - "tokio", - "tokio-rustls", -] - -[[package]] -name = "idna" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "impl-codec" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" -dependencies = [ - "parity-scale-codec", -] - -[[package]] -name = "impl-rlp" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808" -dependencies = [ - "rlp", -] - -[[package]] -name = "impl-serde" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" -dependencies = [ - "serde", -] - -[[package]] -name = "impl-trait-for-tuples" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "indexmap" -version = "2.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233cf39063f058ea2caae4091bf4a3ef70a653afbc026f5c4a4135d114e3c177" -dependencies = [ - "equivalent", - "hashbrown 0.14.3", -] - -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "ipnet" -version = "2.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" - -[[package]] -name = "itertools" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" - -[[package]] -name = "js-sys" -version = "0.3.68" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "406cda4b368d531c842222cf9d2600a9a4acce8d29423695379c6868a143a9ee" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "jsonwebtoken" -version = "8.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" -dependencies = [ - "base64 0.21.7", - "pem", - "ring 0.16.20", - "serde", - "serde_json", - "simple_asn1", -] - -[[package]] -name = "k256" -version = "0.13.3" -source = "git+https://github.com/risc0/RustCrypto-elliptic-curves?tag=k256/v0.13.3-risczero.0#d4f457a04410397cbb652a67c168b6cd6e9757c4" -dependencies = [ - "cfg-if", - "ecdsa", - "elliptic-curve", - "once_cell", - "sha2", - "signature", -] - -[[package]] -name = "keccak" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" -dependencies = [ - "cpufeatures", -] - -[[package]] -name = "keccak-asm" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb8515fff80ed850aea4a1595f2e519c003e2a00a82fe168ebf5269196caf444" -dependencies = [ - "digest 0.10.7", - "sha3-asm", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -dependencies = [ - "spin 0.5.2", -] - -[[package]] -name = "libc" -version = "0.2.153" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" - -[[package]] -name = "libflate" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7d5654ae1795afc7ff76f4365c2c8791b0feb18e8996a96adad8ffd7c3b2bf" -dependencies = [ - "adler32", - "core2", - "crc32fast", - "dary_heap", - "libflate_lz77", -] - -[[package]] -name = "libflate_lz77" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be5f52fb8c451576ec6b79d3f4deb327398bc05bbdbd99021a6e77a4c855d524" -dependencies = [ - "core2", - "hashbrown 0.13.2", - "rle-decode-fast", -] - -[[package]] -name = "libm" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" - -[[package]] -name = "linux-raw-sys" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" - -[[package]] -name = "lock_api" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" - -[[package]] -name = "malloc_buf" -version = "0.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" -dependencies = [ - "libc", -] - -[[package]] -name = "memchr" -version = "2.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" - -[[package]] -name = "metal" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ecfd3296f8c56b7c1f6fbac3c71cefa9d78ce009850c45000015f206dc7fa21" -dependencies = [ - "bitflags 2.4.2", - "block", - "core-graphics-types", - "foreign-types", - "log", - "objc", - "paste", -] - -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - -[[package]] -name = "miniz_oxide" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" -dependencies = [ - "adler", -] - -[[package]] -name = "mio" -version = "0.8.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" -dependencies = [ - "libc", - "wasi", - "windows-sys 0.48.0", -] - -[[package]] -name = "num" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b05180d69e3da0e530ba2a1dae5110317e49e3b7f3d41be227dc5f92e49ee7af" -dependencies = [ - "num-bigint", - "num-complex", - "num-integer", - "num-iter", - "num-rational", - "num-traits", -] - -[[package]] -name = "num-bigint" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-complex" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23c6602fda94a57c990fe0df199a035d83576b496aa29f4e634a8ac6004e68a6" -dependencies = [ - "num-traits", -] - -[[package]] -name = "num-conv" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" - -[[package]] -name = "num-integer" -version = "0.1.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" -dependencies = [ - "num-traits", -] - -[[package]] -name = "num-iter" -version = "0.1.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" -dependencies = [ - "autocfg", - "num-bigint", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" -dependencies = [ - "autocfg", - "libm", -] - -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi", - "libc", -] - -[[package]] -name = "num_enum" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" -dependencies = [ - "num_enum_derive", -] - -[[package]] -name = "num_enum_derive" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" -dependencies = [ - "proc-macro-crate 3.1.0", - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "objc" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" -dependencies = [ - "malloc_buf", -] - -[[package]] -name = "object" -version = "0.32.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" -dependencies = [ - "memchr", -] - -[[package]] -name = "once_cell" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" - -[[package]] -name = "open-fastrlp" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "786393f80485445794f6043fd3138854dd109cc6c4bd1a6383db304c9ce9b9ce" -dependencies = [ - "arrayvec", - "auto_impl", - "bytes", - "ethereum-types", - "open-fastrlp-derive", -] - -[[package]] -name = "open-fastrlp-derive" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "003b2be5c6c53c1cfeb0a238b8a1c3915cd410feb684457a36c10038f764bb1c" -dependencies = [ - "bytes", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "parity-scale-codec" -version = "3.6.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" -dependencies = [ - "arrayvec", - "bitvec", - "byte-slice-cast", - "impl-trait-for-tuples", - "parity-scale-codec-derive", - "serde", -] - -[[package]] -name = "parity-scale-codec-derive" -version = "3.6.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" -dependencies = [ - "proc-macro-crate 2.0.0", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "parking_lot" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-targets 0.48.5", -] - -[[package]] -name = "paste" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" - -[[package]] -name = "pem" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" -dependencies = [ - "base64 0.13.1", -] - -[[package]] -name = "percent-encoding" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" - -[[package]] -name = "pest" -version = "2.7.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "219c0dcc30b6a27553f9cc242972b67f75b60eb0db71f0b5462f38b058c41546" -dependencies = [ - "memchr", - "thiserror", - "ucd-trie", -] - -[[package]] -name = "pharos" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414" -dependencies = [ - "futures", - "rustc_version 0.4.0", -] - -[[package]] -name = "pin-project" -version = "1.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0302c4a0442c456bd56f841aee5c3bfd17967563f6fadc9ceb9f9c23cf3807e0" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkcs8" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" -dependencies = [ - "der", - "spki", -] - -[[package]] -name = "powerfmt" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" - -[[package]] -name = "ppv-lite86" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" - -[[package]] -name = "primitive-types" -version = "0.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" -dependencies = [ - "fixed-hash", - "impl-codec", - "impl-rlp", - "impl-serde", - "scale-info", - "uint", -] - -[[package]] -name = "proc-macro-crate" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" -dependencies = [ - "once_cell", - "toml_edit 0.19.15", -] - -[[package]] -name = "proc-macro-crate" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" -dependencies = [ - "toml_edit 0.20.7", -] - -[[package]] -name = "proc-macro-crate" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" -dependencies = [ - "toml_edit 0.21.1", -] - -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn 1.0.109", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - -[[package]] -name = "proc-macro2" -version = "1.0.78" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "proptest" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" -dependencies = [ - "bit-set", - "bit-vec", - "bitflags 2.4.2", - "lazy_static", - "num-traits", - "rand", - "rand_chacha", - "rand_xorshift", - "regex-syntax", - "rusty-fork", - "tempfile", - "unarray", -] - -[[package]] -name = "quick-error" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" - -[[package]] -name = "quote" -version = "1.0.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "radium" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha", - "rand_core", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom", -] - -[[package]] -name = "rand_xorshift" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" -dependencies = [ - "rand_core", -] - -[[package]] -name = "redox_syscall" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "regex" -version = "1.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" - -[[package]] -name = "reqwest" -version = "0.11.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6920094eb85afde5e4a138be3f2de8bbdf28000f0029e72c45025a56b042251" -dependencies = [ - "base64 0.21.7", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "hyper", - "hyper-rustls", - "ipnet", - "js-sys", - "log", - "mime", - "once_cell", - "percent-encoding", - "pin-project-lite", - "rustls", - "rustls-pemfile", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper", - "system-configuration", - "tokio", - "tokio-rustls", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "webpki-roots", - "winreg", -] - -[[package]] -name = "revm" -version = "5.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266f86bdefa6dac07d92e2f5c37d7d183f2575b2f9e0ee9cba9402dfde912524" -dependencies = [ - "auto_impl", - "cfg-if", - "revm-interpreter", - "revm-precompile", - "serde", - "serde_json", -] - -[[package]] -name = "revm-interpreter" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a80b516cc706630e604e2fd47c281501d2fb222712be4328921361388b7d2df" -dependencies = [ - "revm-primitives", - "serde", -] - -[[package]] -name = "revm-precompile" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6912fafe7f70a264ec5895875ce2f2d0621a39263844280c9ee7f85e35bbb9e" -dependencies = [ - "aurora-engine-modexp", - "c-kzg", - "k256", - "once_cell", - "revm-primitives", - "ripemd", - "secp256k1", - "sha2", - "substrate-bn", -] - -[[package]] -name = "revm-primitives" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b3683a40f1e94e7389c8e81e5f26bb5d30875ed0b48ab07985ec32eb6d6c712" -dependencies = [ - "alloy-primitives", - "auto_impl", - "bitflags 2.4.2", - "bitvec", - "c-kzg", - "cfg-if", - "enumn", - "hashbrown 0.14.3", - "hex", - "serde", -] - -[[package]] -name = "rfc6979" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" -dependencies = [ - "hmac", - "subtle", -] - -[[package]] -name = "ring" -version = "0.16.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" -dependencies = [ - "cc", - "libc", - "once_cell", - "spin 0.5.2", - "untrusted 0.7.1", - "web-sys", - "winapi", -] - -[[package]] -name = "ring" -version = "0.17.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" -dependencies = [ - "cc", - "getrandom", - "libc", - "spin 0.9.8", - "untrusted 0.9.0", - "windows-sys 0.48.0", -] - -[[package]] -name = "ripemd" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" -dependencies = [ - "digest 0.10.7", -] - -[[package]] -name = "risc0-binfmt" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "543230f7117ce0e6b92b4797fbb3da722575973258cc38a48e28af8d3cf3a26d" -dependencies = [ - "anyhow", - "borsh", - "elf", - "risc0-zkp", - "risc0-zkvm-platform", - "serde", - "tracing", -] - -[[package]] -name = "risc0-circuit-recursion" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436c762db677faf2cd616c55a69012d6b4f46c426b7d553c1b3d717e0c7e9438" -dependencies = [ - "anyhow", - "bytemuck", - "hex", - "metal", - "risc0-core", - "risc0-zkp", - "tracing", -] - -[[package]] -name = "risc0-circuit-rv32im" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21f81638d4349eb5a816f3fd6ea12b314007572fc63d45cdb83891bed64e2a2a" -dependencies = [ - "anyhow", - "metal", - "risc0-binfmt", - "risc0-core", - "risc0-zkp", - "risc0-zkvm-platform", - "serde", - "tracing", -] - -[[package]] -name = "risc0-core" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1714b8968a5e4583a15018dc2ae95878c76f4cdbc643268a34670fde5b08252a" -dependencies = [ - "bytemuck", - "rand_core", -] - -[[package]] -name = "risc0-groth16" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5f11beecdcabeac264fb868e0b5db22c7e2db5fa2ce68fd482d8ab9ffb88e5d" -dependencies = [ - "anyhow", - "ark-bn254", - "ark-ec", - "ark-groth16", - "ark-serialize 0.4.2", - "bytemuck", - "hex", - "num-bigint", - "num-traits", - "risc0-binfmt", - "risc0-zkp", - "serde", -] - -[[package]] -name = "risc0-zkp" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "285aa3993827b4a646d70e68240e138f71574680a02d2e97ad30b1db80efda80" -dependencies = [ - "anyhow", - "blake2", - "borsh", - "bytemuck", - "cfg-if", - "digest 0.10.7", - "hex", - "hex-literal", - "metal", - "paste", - "rand_core", - "risc0-core", - "risc0-zkvm-platform", - "serde", - "sha2", - "tracing", -] - -[[package]] -name = "risc0-zkvm" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614fad8046130321e3be9ca3a36d9edad6ff4c538549ae191ec4d82576bb3893" -dependencies = [ - "anyhow", - "borsh", - "bytemuck", - "getrandom", - "hex", - "risc0-binfmt", - "risc0-circuit-recursion", - "risc0-circuit-rv32im", - "risc0-core", - "risc0-groth16", - "risc0-zkp", - "risc0-zkvm-platform", - "rrs-lib", - "semver 1.0.21", - "serde", - "sha2", - "stability", - "tracing", -] - -[[package]] -name = "risc0-zkvm-platform" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6acf0b0d7a55578f892e0460ed1f2ca06d0380e32440531d80ca82530d41272" -dependencies = [ - "bytemuck", - "getrandom", - "libm", - "stability", -] - -[[package]] -name = "rle-decode-fast" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3582f63211428f83597b51b2ddb88e2a91a9d52d12831f9d08f5e624e8977422" - -[[package]] -name = "rlp" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" -dependencies = [ - "bytes", - "rlp-derive", - "rustc-hex", -] - -[[package]] -name = "rlp-derive" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "rrs-lib" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4382d3af3a4ebdae7f64ba6edd9114fff92c89808004c4943b393377a25d001" -dependencies = [ - "downcast-rs", - "paste", -] - -[[package]] -name = "ruint" -version = "1.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608a5726529f2f0ef81b8fde9873c4bb829d6b5b5ca6be4d97345ddf0749c825" -dependencies = [ - "alloy-rlp", - "ark-ff 0.3.0", - "ark-ff 0.4.2", - "bytes", - "fastrlp", - "num-bigint", - "num-traits", - "parity-scale-codec", - "primitive-types", - "proptest", - "rand", - "rlp", - "ruint-macro", - "serde", - "valuable", - "zeroize", -] - -[[package]] -name = "ruint-macro" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e666a5496a0b2186dbcd0ff6106e29e093c15591bde62c20d3842007c6978a09" - -[[package]] -name = "rustc-demangle" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" - -[[package]] -name = "rustc-hex" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" - -[[package]] -name = "rustc_version" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" -dependencies = [ - "semver 0.11.0", -] - -[[package]] -name = "rustc_version" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" -dependencies = [ - "semver 1.0.21", -] - -[[package]] -name = "rustix" -version = "0.38.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" -dependencies = [ - "bitflags 2.4.2", - "errno", - "libc", - "linux-raw-sys", - "windows-sys 0.52.0", -] - -[[package]] -name = "rustls" -version = "0.21.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" -dependencies = [ - "log", - "ring 0.17.7", - "rustls-webpki", - "sct", -] - -[[package]] -name = "rustls-pemfile" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" -dependencies = [ - "base64 0.21.7", -] - -[[package]] -name = "rustls-webpki" -version = "0.101.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" -dependencies = [ - "ring 0.17.7", - "untrusted 0.9.0", -] - -[[package]] -name = "rustversion" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" - -[[package]] -name = "rusty-fork" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" -dependencies = [ - "fnv", - "quick-error", - "tempfile", - "wait-timeout", -] - -[[package]] -name = "ryu" -version = "1.0.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" - -[[package]] -name = "scale-info" -version = "2.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7d66a1128282b7ef025a8ead62a4a9fcf017382ec53b8ffbf4d7bf77bd3c60" -dependencies = [ - "cfg-if", - "derive_more", - "parity-scale-codec", - "scale-info-derive", -] - -[[package]] -name = "scale-info-derive" -version = "2.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abf2c68b89cafb3b8d918dd07b42be0da66ff202cf1155c5739a4e0c1ea0dc19" -dependencies = [ - "proc-macro-crate 1.3.1", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "sct" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" -dependencies = [ - "ring 0.17.7", - "untrusted 0.9.0", -] - -[[package]] -name = "sec1" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" -dependencies = [ - "base16ct", - "der", - "generic-array", - "pkcs8", - "subtle", - "zeroize", -] - -[[package]] -name = "secp256k1" -version = "0.28.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d24b59d129cdadea20aea4fb2352fa053712e5d713eee47d700cd4b2bc002f10" -dependencies = [ - "secp256k1-sys", -] - -[[package]] -name = "secp256k1-sys" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d1746aae42c19d583c3c1a8c646bfad910498e2051c551a7f2e3c0c9fbb7eb" -dependencies = [ - "cc", -] - -[[package]] -name = "semver" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" -dependencies = [ - "semver-parser", -] - -[[package]] -name = "semver" -version = "1.0.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" - -[[package]] -name = "semver-parser" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" -dependencies = [ - "pest", -] - -[[package]] -name = "send_wrapper" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" - -[[package]] -name = "send_wrapper" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" - -[[package]] -name = "serde" -version = "1.0.196" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.196" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "serde_json" -version = "1.0.113" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" -dependencies = [ - "indexmap", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "sha1" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.7", -] - -[[package]] -name = "sha2" -version = "0.10.6" -source = "git+https://github.com/risc0/RustCrypto-hashes?tag=sha2-v0.10.6-risczero.0#7fd6900c4f637bd15ee2642dfa77110f8f1ad065" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.7", -] - -[[package]] -name = "sha3" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" -dependencies = [ - "digest 0.10.7", - "keccak", -] - -[[package]] -name = "sha3-asm" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bac61da6b35ad76b195eb4771210f947734321a8d81d7738e1580d953bc7a15e" -dependencies = [ - "cc", - "cfg-if", -] - -[[package]] -name = "signal-hook-registry" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" -dependencies = [ - "libc", -] - -[[package]] -name = "signature" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" -dependencies = [ - "digest 0.10.7", - "rand_core", -] - -[[package]] -name = "simple_asn1" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" -dependencies = [ - "num-bigint", - "num-traits", - "thiserror", - "time", -] - -[[package]] -name = "slab" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] - -[[package]] -name = "smallvec" -version = "1.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" - -[[package]] -name = "socket2" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" -dependencies = [ - "libc", - "windows-sys 0.48.0", -] - -[[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" - -[[package]] -name = "spki" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" -dependencies = [ - "base64ct", - "der", -] - -[[package]] -name = "stability" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d904e7009df136af5297832a3ace3370cd14ff1546a232f4f185036c2736fcac" -dependencies = [ - "quote", - "syn 2.0.48", -] - -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[package]] -name = "strum" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" -dependencies = [ - "strum_macros", -] - -[[package]] -name = "strum_macros" -version = "0.25.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "rustversion", - "syn 2.0.48", -] - -[[package]] -name = "substrate-bn" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b5bbfa79abbae15dd642ea8176a21a635ff3c00059961d1ea27ad04e5b441c" -dependencies = [ - "byteorder", - "crunchy", - "lazy_static", - "rand", - "rustc-hex", -] - -[[package]] -name = "subtle" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.48" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn-solidity" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63bef2e2c735acbc06874eca3a8506f02a3c4700e6e748afc92cc2e4220e8a03" -dependencies = [ - "paste", - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "syn_derive" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b" -dependencies = [ - "proc-macro-error", - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "sync_wrapper" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" - -[[package]] -name = "system-configuration" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "system-configuration-sys", -] - -[[package]] -name = "system-configuration-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "tap" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" - -[[package]] -name = "tempfile" -version = "3.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a365e8cd18e44762ef95d87f284f4b5cd04107fec2ff3052bd6a3e6069669e67" -dependencies = [ - "cfg-if", - "fastrand", - "rustix", - "windows-sys 0.52.0", -] - -[[package]] -name = "test-guest" -version = "0.1.0" -dependencies = [ - "risc0-zkvm", - "zeth-lib", -] - -[[package]] -name = "thiserror" -version = "1.0.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "threadpool" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" -dependencies = [ - "num_cpus", -] - -[[package]] -name = "time" -version = "0.3.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" -dependencies = [ - "deranged", - "itoa", - "num-conv", - "powerfmt", - "serde", - "time-core", - "time-macros", -] - -[[package]] -name = "time-core" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" - -[[package]] -name = "time-macros" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" -dependencies = [ - "num-conv", - "time-core", -] - -[[package]] -name = "tiny-keccak" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" -dependencies = [ - "crunchy", -] - -[[package]] -name = "tinyvec" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - -[[package]] -name = "tokio" -version = "1.36.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" -dependencies = [ - "backtrace", - "bytes", - "libc", - "mio", - "num_cpus", - "parking_lot", - "pin-project-lite", - "signal-hook-registry", - "socket2", - "tokio-macros", - "windows-sys 0.48.0", -] - -[[package]] -name = "tokio-macros" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "tokio-rustls" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" -dependencies = [ - "rustls", - "tokio", -] - -[[package]] -name = "tokio-tungstenite" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" -dependencies = [ - "futures-util", - "log", - "rustls", - "tokio", - "tokio-rustls", - "tungstenite", - "webpki-roots", -] - -[[package]] -name = "tokio-util" -version = "0.7.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", - "tracing", -] - -[[package]] -name = "toml_datetime" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" - -[[package]] -name = "toml_edit" -version = "0.19.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" -dependencies = [ - "indexmap", - "toml_datetime", - "winnow", -] - -[[package]] -name = "toml_edit" -version = "0.20.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" -dependencies = [ - "indexmap", - "toml_datetime", - "winnow", -] - -[[package]] -name = "toml_edit" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" -dependencies = [ - "indexmap", - "toml_datetime", - "winnow", -] - -[[package]] -name = "tower-service" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" - -[[package]] -name = "tracing" -version = "0.1.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" -dependencies = [ - "log", - "pin-project-lite", - "tracing-attributes", - "tracing-core", -] - -[[package]] -name = "tracing-attributes" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "tracing-core" -version = "0.1.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" -dependencies = [ - "once_cell", - "valuable", -] - -[[package]] -name = "tracing-futures" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" -dependencies = [ - "pin-project", - "tracing", -] - -[[package]] -name = "tracing-subscriber" -version = "0.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e0d2eaa99c3c2e41547cfa109e910a68ea03823cccad4a0525dcbc9b01e8c71" -dependencies = [ - "tracing-core", -] - -[[package]] -name = "try-lock" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" - -[[package]] -name = "tungstenite" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" -dependencies = [ - "byteorder", - "bytes", - "data-encoding", - "http", - "httparse", - "log", - "rand", - "rustls", - "sha1", - "thiserror", - "url", - "utf-8", -] - -[[package]] -name = "typenum" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" - -[[package]] -name = "ucd-trie" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" - -[[package]] -name = "uint" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" -dependencies = [ - "byteorder", - "crunchy", - "hex", - "static_assertions", -] - -[[package]] -name = "unarray" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" - -[[package]] -name = "unicode-bidi" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" - -[[package]] -name = "unicode-ident" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "unicode-normalization" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "unicode-xid" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" - -[[package]] -name = "untrusted" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" - -[[package]] -name = "untrusted" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" - -[[package]] -name = "url" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", -] - -[[package]] -name = "utf-8" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" - -[[package]] -name = "valuable" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "wait-timeout" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" -dependencies = [ - "libc", -] - -[[package]] -name = "want" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" -dependencies = [ - "try-lock", -] - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasm-bindgen" -version = "0.2.91" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1e124130aee3fb58c5bdd6b639a0509486b0338acaaae0c84a5124b0f588b7f" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.91" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9e7e1900c352b609c8488ad12639a311045f40a35491fb69ba8c12f758af70b" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn 2.0.48", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.41" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877b9c3f61ceea0e56331985743b13f3d25c406a7098d45180fb5f09bc19ed97" -dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.91" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b30af9e2d358182b5c7449424f017eba305ed32a7010509ede96cdc4696c46ed" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.91" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.91" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838" - -[[package]] -name = "web-sys" -version = "0.3.68" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96565907687f7aceb35bc5fc03770a8a0471d82e479f25832f54a0e3f4b28446" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "webpki-roots" -version = "0.25.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets 0.52.0", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - -[[package]] -name = "windows-targets" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" -dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" - -[[package]] -name = "winnow" -version = "0.5.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" -dependencies = [ - "memchr", -] - -[[package]] -name = "winreg" -version = "0.50.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - -[[package]] -name = "ws_stream_wasm" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7999f5f4217fe3818726b66257a4475f71e74ffd190776ad053fa159e50737f5" -dependencies = [ - "async_io_stream", - "futures", - "js-sys", - "log", - "pharos", - "rustc_version 0.4.0", - "send_wrapper 0.6.0", - "thiserror", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - -[[package]] -name = "wyz" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" -dependencies = [ - "tap", -] - -[[package]] -name = "zerocopy" -version = "0.7.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" -dependencies = [ - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.7.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "zeroize" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" -dependencies = [ - "zeroize_derive", -] - -[[package]] -name = "zeroize_derive" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "zeth-lib" -version = "0.1.0" -dependencies = [ - "alloy-rlp", - "alloy-rlp-derive", - "alloy-sol-types", - "anyhow", - "bytes", - "chrono", - "ethers-core", - "ethers-providers", - "flate2", - "hashbrown 0.14.3", - "libflate", - "log", - "once_cell", - "revm", - "risc0-zkvm", - "ruint", - "serde", - "serde_json", - "thiserror", - "tokio", - "zeth-primitives", -] - -[[package]] -name = "zeth-primitives" -version = "0.1.0" -dependencies = [ - "alloy-primitives", - "alloy-rlp", - "alloy-rlp-derive", - "anyhow", - "bytes", - "ethers-core", - "k256", - "log", - "revm-primitives", - "rlp", - "serde", - "sha2", - "sha3", - "thiserror", - "tiny-keccak", -] diff --git a/testing/ef-tests/testguest/Cargo.toml b/testing/ef-tests/testguest/Cargo.toml deleted file mode 100644 index d4d7c324..00000000 --- a/testing/ef-tests/testguest/Cargo.toml +++ /dev/null @@ -1,16 +0,0 @@ -[package] -name = "test-guest" -version = "0.1.0" -edition = "2021" - -[workspace] - -[dependencies] -risc0-zkvm = { version = "1.1.3", default-features = false, features = ['std'] } -zeth-lib = { path = "../../../lib", default-features = false } - -[patch.crates-io] -# use optimized risc0 circuit -crypto-bigint = { git = "https://github.com/risc0/RustCrypto-crypto-bigint", tag = "v0.5.5-risczero.0" } -k256 = { git = "https://github.com/risc0/RustCrypto-elliptic-curves", tag = "k256/v0.13.3-risczero.0" } -sha2 = { git = "https://github.com/risc0/RustCrypto-hashes", tag = "sha2-v0.10.6-risczero.0" } diff --git a/testing/ef-tests/testguest/src/main.rs b/testing/ef-tests/testguest/src/main.rs deleted file mode 100644 index 2c31f89d..00000000 --- a/testing/ef-tests/testguest/src/main.rs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2024 RISC Zero, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#![no_main] - -use risc0_zkvm::guest::env; -use zeth_lib::{ - builder::{BlockBuilderStrategy, EthereumStrategy}, - consts::ChainSpec, -}; - -risc0_zkvm::guest::entry!(main); - -pub fn main() { - // Read the test block's chain specification - let chain_spec: ChainSpec = env::read(); - // Read the input previous block and transaction data - let input = env::read(); - // Build the resulting block - let mut output = EthereumStrategy::build_from(&chain_spec, input) - .expect("Failed to build the resulting block"); - // Abridge successful construction results - if let Some(replaced_state) = output.replace_state_with_hash() { - // Leak memory, save cycles - core::mem::forget(replaced_state); - } - // Output the construction result - env::commit(&output); - // Leak memory, save cycles - core::mem::forget(output); -} diff --git a/testing/ef-tests/tests/evm.rs b/testing/ef-tests/tests/evm.rs index 9d68a475..532f142e 100644 --- a/testing/ef-tests/tests/evm.rs +++ b/testing/ef-tests/tests/evm.rs @@ -14,24 +14,20 @@ #![cfg(feature = "ef-tests")] -use std::path::PathBuf; - +use alloy::{network::Ethereum, primitives::BlockHash}; use rstest::rstest; -use zeth_lib::{ - builder::{BlockBuilderStrategy, EthereumStrategy}, - output::BlockBuildOutput, -}; -use zeth_primitives::{block::Header, trie::StateAccount}; -use zeth_testeth::{ - create_input, ethers, - ethtests::{read_eth_test, EthTestCase}, -}; +use std::{cell::RefCell, path::PathBuf, rc::Rc}; +use zeth_core::{db::MemoryDB, stateless::client::StatelessClient}; +use zeth_preflight::{client::PreflightClient, provider::Provider, BlockBuilder, Witness}; +use zeth_preflight_ethereum::{RethBlockBuilder, RethPreflightDriver}; +use zeth_testeth::{read_eth_execution_tests, TestCoreDriver, TestProvider}; #[rstest] fn evm( #[files("testdata/BlockchainTests/GeneralStateTests/**/*.json")] #[exclude("RevertPrecompiledTouch_storage.json|RevertPrecompiledTouch.json")] // precompiles having storage is not possible - #[exclude("stTimeConsuming")] // exclude only the time consuming tests + #[exclude("RevertInCreateInInit_Paris.json|RevertInCreateInInit.json|dynamicAccountOverwriteEmpty.json|dynamicAccountOverwriteEmpty_Paris.json|RevertInCreateInInitCreate2Paris.json|create2collisionStorage.json|RevertInCreateInInitCreate2.json|create2collisionStorageParis.json|InitCollision.json|InitCollisionParis.json")] // Test with some storage check + #[exclude("stTimeConsuming")] // exclude only the time-consuming tests path: PathBuf, ) { let _ = env_logger::builder() @@ -39,73 +35,47 @@ fn evm( .is_test(true) .try_init(); - for EthTestCase { - mut json, - genesis, - chain_spec, - } in read_eth_test(path) - { + for mut json in read_eth_execution_tests(path) { // only one block supported for now - assert_eq!(json.blocks.len(), 1); + if json.blocks.len() > 1 { + println!("skipping (multiple blocks)"); + continue; + }; let block = json.blocks.pop().unwrap(); // skip failing tests for now if let Some(message) = block.expect_exception { println!("skipping ({})", message); - break; + continue; } - let block_header = block.block_header.unwrap(); - let expected_header: Header = block_header.clone().into(); - assert_eq!(&expected_header.hash(), &block_header.hash); + let expected_header = block.block_header.as_ref().expect("Missing block header"); + let expected_hash = expected_header.hash; // using the empty/default state for the input prepares all accounts for deletion // this leads to larger input, but can never fail - let post_state = json.post.clone().unwrap_or_default(); + let post_state = json.post_state.clone().unwrap_or_default(); - let input = create_input( - &chain_spec, - genesis, - json.pre, - expected_header.clone(), - block.transactions, - block.withdrawals.unwrap_or_default(), - post_state, - ); - let input_state_input_hash = input.state_input.hash(); + let provider = TestProvider::new(json.genesis_block_header, block, json.pre, post_state); - let output = EthereumStrategy::build_from(&chain_spec, input).unwrap(); + run::(Rc::new(RefCell::new(provider)), expected_hash); + } +} - let BlockBuildOutput::SUCCESS { - hash: new_block_hash, - head: new_block_head, - state: new_block_state, - state_input_hash, - } = output - else { - panic!("Invalid block") - }; +fn run(provider: Rc>>, expected_hash: BlockHash) +where + R: BlockBuilder, +{ + let preflight_data = R::PreflightClient::preflight_with_provider(provider.clone(), 1, 1) + .expect("Preflight failed"); + let build_result = Witness::driver_from::(&preflight_data); - if let Some(post) = json.post { - let (exp_state, _) = ethers::build_tries(&post); + // The header should match. + assert_eq!(build_result.validated_tip_hash, expected_hash); - println!("diffing state trie:"); - for diff in diff::slice( - &new_block_state.debug_rlp::(), - &exp_state.debug_rlp::(), - ) { - match diff { - diff::Result::Left(l) => println!("✗{}", l), - diff::Result::Right(r) => println!("✓{}", r), - diff::Result::Both(l, _) => println!(" {}", l), - } - } - assert_eq!(new_block_state.hash(), exp_state.hash()); - } + let deserialized_preflight_data = + R::StatelessClient::deserialize_data(build_result.encoded_input.as_slice()) + .expect("Input deserialization failed"); - // the headers should match - assert_eq!(new_block_head, expected_header); - assert_eq!(new_block_hash, expected_header.hash()); - assert_eq!(input_state_input_hash, state_input_hash); - } + R::StatelessClient::validate(deserialized_preflight_data).expect("Block validation failed"); } diff --git a/testing/ef-tests/tests/executor.rs b/testing/ef-tests/tests/executor.rs deleted file mode 100644 index 6e743c1b..00000000 --- a/testing/ef-tests/tests/executor.rs +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright 2024 RISC Zero, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#![cfg(feature = "ef-tests")] - -use std::path::PathBuf; - -use risc0_zkvm::{ExecutorEnv, ExecutorImpl}; -use rstest::rstest; -use zeth_lib::output::BlockBuildOutput; -use zeth_primitives::block::Header; -use zeth_testeth::{ - create_input, - ethtests::{read_eth_test, EthTestCase}, - guests::TEST_GUEST_ELF, -}; - -const SEGMENT_LIMIT_PO2: u32 = 21; - -#[rstest] -fn executor( - // execute only the deep stack tests - #[files("testdata/BlockchainTests/GeneralStateTests/**/*Call1024BalanceTooLow.json")] - path: PathBuf, -) { - let _ = env_logger::builder() - .filter_level(log::LevelFilter::Debug) - .filter_module("risc0_zkvm", log::LevelFilter::Info) // reduce noise - .is_test(true) - .try_init(); - - for EthTestCase { - json, - genesis, - chain_spec, - } in read_eth_test(path) - { - // only one block - assert_eq!(json.blocks.len(), 1usize); - let block = json.blocks.first().unwrap().clone(); - - // skip failing tests for now - if let Some(message) = block.expect_exception { - println!("skipping ({})", message); - break; - } - - let block_header = block.block_header.unwrap(); - let expected_header: Header = block_header.clone().into(); - assert_eq!(&expected_header.hash(), &block_header.hash); - - let input = create_input( - &chain_spec, - genesis, - json.pre, - expected_header.clone(), - block.transactions, - block.withdrawals.unwrap_or_default(), - json.post.unwrap(), - ); - - let env = ExecutorEnv::builder() - .session_limit(None) - .segment_limit_po2(SEGMENT_LIMIT_PO2) - .write(&chain_spec) - .unwrap() - .write(&input) - .unwrap() - .build() - .unwrap(); - let mut exec = ExecutorImpl::from_elf(env, TEST_GUEST_ELF).unwrap(); - let session = exec.run().unwrap(); - println!("Generated {} segments", session.segments.len()); - - let build_output: BlockBuildOutput = session.journal.unwrap().decode().unwrap(); - let BlockBuildOutput::SUCCESS { - hash: new_block_hash, - .. - } = build_output - else { - panic!("Block build failed!") - }; - println!("Block hash (from executor): {}", new_block_hash); - assert_eq!(new_block_hash, expected_header.hash()); - } -}