diff --git a/.github/actions/install-zisk/action.yml b/.github/actions/install-zisk/action.yml new file mode 100644 index 0000000..f75b6b9 --- /dev/null +++ b/.github/actions/install-zisk/action.yml @@ -0,0 +1,14 @@ +name: "Install ZisK" +description: "Install ZisK Toolchain" + +runs: + using: "composite" + steps: + - name: Install ZisK + shell: bash + env: + GH_RUNNER: 1 + run: | + sudo apt-get update + sudo apt-get install -y xz-utils jq curl build-essential qemu-system libomp-dev libgmp-dev nlohmann-json3-dev protobuf-compiler uuid-dev libgrpc++-dev libsecp256k1-dev libsodium-dev libpqxx-dev nasm libopenmpi-dev openmpi-bin openmpi-common libclang-dev clang gcc-riscv64-unknown-elf + curl https://raw.githubusercontent.com/0xPolygonHermez/zisk/main/ziskup/install.sh | bash diff --git a/.github/actions/setup-rust/action.yml b/.github/actions/setup-rust/action.yml index 33ff62d..c3edf32 100644 --- a/.github/actions/setup-rust/action.yml +++ b/.github/actions/setup-rust/action.yml @@ -4,7 +4,7 @@ inputs: components: description: "Rust components to install (e.g., rustfmt, clippy)" required: false - type: string + default: "" runs: using: "composite" steps: @@ -24,4 +24,4 @@ runs: components: ${{ inputs.components }} - name: Add Rust Cache - uses: Swatinem/rust-cache@v2 \ No newline at end of file + uses: Swatinem/rust-cache@v2 diff --git a/.github/workflows/pr-main.yaml b/.github/workflows/pr-main.yaml index e88c308..2a29379 100644 --- a/.github/workflows/pr-main.yaml +++ b/.github/workflows/pr-main.yaml @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: false matrix: - features: ["", "l2", "l2,sp1", "l2,risc0", "sp1", "risc0"] + features: ["", "l2", "l2,sp1", "l2,risc0", "l2,zisk", "sp1", "risc0", "zisk"] steps: - name: Checkout sources uses: actions/checkout@v4 @@ -44,6 +44,10 @@ jobs: if: contains(matrix.features, 'sp1') uses: ./.github/actions/install-sp1 + - name: Install ZisK + if: contains(matrix.features, 'zisk') + uses: ./.github/actions/install-zisk + - name: cargo fmt --check --all if: matrix.features == '' # Run only without features because it's redundant to run it on all jobs run: cargo fmt --check --all @@ -56,7 +60,7 @@ jobs: set -euxo pipefail args=(--release --no-default-features) if [ -n "${FEATURE_ARGS}" ]; then - args+=("--features" "${FEATURE_ARGS}") + args+=("--features" "${FEATURE_ARGS},ci") fi cargo check "${args[@]}" @@ -68,7 +72,7 @@ jobs: set -euxo pipefail args=(--release --no-default-features) if [ -n "${FEATURE_ARGS}" ]; then - args+=("--features" "${FEATURE_ARGS}") + args+=("--features" "${FEATURE_ARGS},ci") fi cargo clippy "${args[@]}" -- -D warnings diff --git a/.gitignore b/.gitignore index cac6a4b..b93fe26 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ target # Default replay cache directory (JIC) replay_cache/ +generated_inputs/ # asdf .tool-versions diff --git a/Cargo.lock b/Cargo.lock index ba7aaf3..c4591d6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -142,8 +142,8 @@ dependencies = [ "cfg-if 1.0.4", "const-hex", "derive_more 2.0.1", - "hashbrown 0.16.0", - "indexmap 2.12.0", + "hashbrown 0.16.1", + "indexmap 2.12.1", "itoa", "k256", "paste", @@ -213,22 +213,22 @@ dependencies = [ [[package]] name = "anstyle-query" -version = "1.1.4" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e231f6134f61b71076a3eab506c379d4f36122f2af15a9ff04415ea4c3339e2" +checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" dependencies = [ - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] name = "anstyle-wincon" -version = "3.0.10" +version = "3.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e0633414522a32ffaac8ac6cc8f748e090c5717661fddeea04219e2344f5f2a" +checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" dependencies = [ "anstyle", "once_cell_polyfill", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -300,7 +300,7 @@ checksum = "e7e89fe77d1f0f4fe5b96dfc940923d88d17b6a773808124f21e764dfb063c6a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -409,7 +409,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62945a2f7e6de02a31fe400aa489f0e0f5b2502e69f95f853adb82a96c7a6b60" dependencies = [ "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -447,7 +447,7 @@ dependencies = [ "num-traits", "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -551,7 +551,7 @@ checksum = "213888f660fddcca0d257e88e54ac05bca01885f258ccdf695bafd77031bb69d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -642,7 +642,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -653,7 +653,7 @@ checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -690,7 +690,7 @@ checksum = "ffdcb70bdbc4d478427380519163274ac86e52916e10f0a8889adf0f96d3fee7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -709,10 +709,10 @@ dependencies = [ "axum-core 0.4.5", "bytes", "futures-util", - "http 1.3.1", + "http 1.4.0", "http-body 1.0.1", "http-body-util", - "hyper 1.7.0", + "hyper 1.8.1", "hyper-util", "itoa", "matchit 0.7.3", @@ -735,19 +735,19 @@ dependencies = [ [[package]] name = "axum" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18ed336352031311f4e0b4dd2ff392d4fbb370777c9d18d7fc9d7359f73871" +checksum = "5b098575ebe77cb6d14fc7f32749631a6e44edbef6b796f89b020e99ba20d425" dependencies = [ "axum-core 0.5.5", "base64 0.22.1", "bytes", "form_urlencoded", "futures-util", - "http 1.3.1", + "http 1.4.0", "http-body 1.0.1", "http-body-util", - "hyper 1.7.0", + "hyper 1.8.1", "hyper-util", "itoa", "matchit 0.8.4", @@ -778,7 +778,7 @@ dependencies = [ "async-trait", "bytes", "futures-util", - "http 1.3.1", + "http 1.4.0", "http-body 1.0.1", "http-body-util", "mime", @@ -798,7 +798,7 @@ checksum = "59446ce19cd142f8833f856eb31f3eb097812d1479ab224f54d72428ca21ea22" dependencies = [ "bytes", "futures-core", - "http 1.3.1", + "http 1.4.0", "http-body 1.0.1", "http-body-util", "mime", @@ -815,12 +815,12 @@ version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9963ff19f40c6102c76756ef0a46004c0d58957d87259fc9208ff8441c12ab96" dependencies = [ - "axum 0.8.6", + "axum 0.8.7", "axum-core 0.5.5", "bytes", "futures-util", "headers", - "http 1.3.1", + "http 1.4.0", "http-body 1.0.1", "http-body-util", "mime", @@ -859,7 +859,7 @@ dependencies = [ "object 0.37.3", "rustc-demangle", "serde", - "windows-link 0.2.1", + "windows-link", ] [[package]] @@ -935,7 +935,7 @@ dependencies = [ "regex", "rustc-hash 1.1.0", "shlex", - "syn 2.0.108", + "syn 2.0.111", "which 4.4.2", ] @@ -956,7 +956,7 @@ dependencies = [ "regex", "rustc-hash 1.1.0", "shlex", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -976,7 +976,7 @@ dependencies = [ "regex", "rustc-hash 2.1.1", "shlex", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -1100,7 +1100,7 @@ version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ - "generic-array 0.14.9", + "generic-array 0.14.7", ] [[package]] @@ -1165,9 +1165,9 @@ dependencies = [ [[package]] name = "borsh" -version = "1.5.7" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad8646f98db542e39fc66e68a20b2144f6a732636df7c2354e74645faaa433ce" +checksum = "d1da5ab77c1437701eeff7c88d968729e7766172279eab0676857b3d63af7a6f" dependencies = [ "borsh-derive", "cfg_aliases", @@ -1175,15 +1175,15 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "1.5.7" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdd1d3c0c2f5833f22386f252fe8ed005c7f59fdcddeef025c01b4c3b9fd9ac3" +checksum = "0686c856aa6aac0c4498f936d7d6a02df690f614c03e4d906d1018062b5c5e2c" dependencies = [ "once_cell", "proc-macro-crate 3.4.0", "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -1228,7 +1228,7 @@ checksum = "89385e82b5d1821d2219e0b095efa2cc1f246cbf99080f3be46a1a85c0d392d9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -1248,7 +1248,7 @@ checksum = "f9abbd1bc6865053c427f7198e6af43bfdedc55ab791faed4fbd361d789575ff" dependencies = [ "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -1259,9 +1259,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.10.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" +checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" dependencies = [ "serde", ] @@ -1370,22 +1370,22 @@ checksum = "3fce8dd7fcfcbf3a0a87d8f515194b49d6135acab73e18bd380d1d93bb1a15eb" dependencies = [ "clap", "heck 0.4.1", - "indexmap 2.12.0", + "indexmap 2.12.1", "log", "proc-macro2", "quote", "serde", "serde_json", - "syn 2.0.108", + "syn 2.0.111", "tempfile", "toml", ] [[package]] name = "cc" -version = "1.2.44" +version = "1.2.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37521ac7aabe3d13122dc382493e20c9416f299d2ccd5b3a5340a2570cdeb0f3" +checksum = "cd405d82c84ff7f35739f175f67d8b9fb7687a0e84ccdc78bd3568839827cf07" dependencies = [ "find-msvc-tools", "jobserver", @@ -1446,7 +1446,7 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-link 0.2.1", + "windows-link", ] [[package]] @@ -1528,9 +1528,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.51" +version = "4.5.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c26d721170e0295f191a69bd9a1f93efcdb0aff38684b61ab5750468972e5f5" +checksum = "c9e340e012a1bf4935f5282ed1436d1489548e8f72308207ea5df0e23d2d03f8" dependencies = [ "clap_builder", "clap_derive", @@ -1538,9 +1538,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.51" +version = "4.5.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75835f0c7bf681bfd05abe44e965760fea999a5286c6eb2d59883634fd02011a" +checksum = "d76b5d13eaa18c901fd2f7fca939fefe3a0727a953561fefdf3b2922b8569d00" dependencies = [ "anstream", "anstyle", @@ -1557,7 +1557,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -1617,7 +1617,7 @@ dependencies = [ "bech32", "bs58", "digest 0.10.7", - "generic-array 0.14.9", + "generic-array 0.14.7", "hex", "ripemd", "serde", @@ -2030,7 +2030,7 @@ version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ - "generic-array 0.14.9", + "generic-array 0.14.7", "rand_core 0.6.4", "subtle", "zeroize", @@ -2038,11 +2038,11 @@ dependencies = [ [[package]] name = "crypto-common" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" dependencies = [ - "generic-array 0.14.9", + "generic-array 0.14.7", "typenum", ] @@ -2143,7 +2143,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -2157,7 +2157,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -2168,7 +2168,7 @@ checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" dependencies = [ "darling_core 0.20.11", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -2179,7 +2179,7 @@ checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" dependencies = [ "darling_core 0.21.3", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -2343,7 +2343,7 @@ dependencies = [ "quote", "strum 0.25.0", "strum_macros 0.25.3", - "syn 2.0.108", + "syn 2.0.111", "thiserror 1.0.69", ] @@ -2398,7 +2398,7 @@ checksum = "1e567bd82dcff979e4b03460c307b3cdc9e96fde3d73bed1496d2bc75d9dd62a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -2419,7 +2419,7 @@ dependencies = [ "darling 0.20.11", "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -2429,7 +2429,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" dependencies = [ "derive_builder_core", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -2459,7 +2459,7 @@ dependencies = [ "convert_case 0.6.0", "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", "unicode-xid", ] @@ -2472,7 +2472,7 @@ dependencies = [ "convert_case 0.7.1", "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", "unicode-xid", ] @@ -2495,7 +2495,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "generic-array 0.14.9", + "generic-array 0.14.7", ] [[package]] @@ -2611,7 +2611,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -2696,7 +2696,7 @@ dependencies = [ "enum-ordinalize", "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -2721,7 +2721,7 @@ dependencies = [ "crypto-bigint", "digest 0.10.7", "ff 0.13.1", - "generic-array 0.14.9", + "generic-array 0.14.7", "group 0.13.0", "pem-rfc7468", "pkcs8", @@ -2804,7 +2804,7 @@ checksum = "f282cfdfe92516eb26c2af8589c274c7c17681f5ecc03c18255fe741c6aa64eb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -2824,7 +2824,7 @@ checksum = "8ca9601fb2d62598ee17836250842873a413586e5d7ed88b356e38ddbb0ec631" dependencies = [ "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -2854,9 +2854,9 @@ checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "erased-serde" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "259d404d09818dec19332e31d94558aeb442fea04c817006456c24b5460bbd4b" +checksum = "89e8918065695684b2b0702da20382d5ae6065cf3327bc2d6436bd49a71ce9f3" dependencies = [ "serde", "serde_core", @@ -3042,7 +3042,7 @@ dependencies = [ "reqwest 0.11.27", "serde", "serde_json", - "syn 2.0.108", + "syn 2.0.111", "toml", "walkdir", ] @@ -3060,7 +3060,7 @@ dependencies = [ "proc-macro2", "quote", "serde_json", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -3076,7 +3076,7 @@ dependencies = [ "const-hex", "elliptic-curve", "ethabi", - "generic-array 0.14.9", + "generic-array 0.14.7", "k256", "num_enum 0.7.5", "once_cell", @@ -3086,7 +3086,7 @@ dependencies = [ "serde", "serde_json", "strum 0.26.3", - "syn 2.0.108", + "syn 2.0.111", "tempfile", "thiserror 1.0.69", "tiny-keccak", @@ -3228,7 +3228,7 @@ dependencies = [ [[package]] name = "ethrex-blockchain" version = "7.0.0" -source = "git+https://github.com/lambdaclass/ethrex?tag=v7.0.0#f7cae770c6a8d78f355cb2f0afdcadfd75b14eba" +source = "git+https://github.com/lambdaclass/ethrex?branch=main#c68e76d6b569c60a667a1240a91e637bf2ea0d0b" dependencies = [ "bytes", "ethrex-common", @@ -3240,7 +3240,6 @@ dependencies = [ "ethrex-vm", "hex", "rustc-hash 2.1.1", - "secp256k1", "thiserror 2.0.17", "tokio", "tokio-util", @@ -3250,7 +3249,7 @@ dependencies = [ [[package]] name = "ethrex-common" version = "7.0.0" -source = "git+https://github.com/lambdaclass/ethrex?tag=v7.0.0#f7cae770c6a8d78f355cb2f0afdcadfd75b14eba" +source = "git+https://github.com/lambdaclass/ethrex?branch=main#c68e76d6b569c60a667a1240a91e637bf2ea0d0b" dependencies = [ "bytes", "crc32fast", @@ -3259,6 +3258,7 @@ dependencies = [ "ethrex-rlp", "ethrex-trie", "hex", + "k256", "kzg-rs", "lazy_static", "libc", @@ -3270,6 +3270,7 @@ dependencies = [ "serde", "serde_json", "sha2", + "sha3", "thiserror 2.0.17", "tinyvec", "tracing", @@ -3279,7 +3280,7 @@ dependencies = [ [[package]] name = "ethrex-config" version = "7.0.0" -source = "git+https://github.com/lambdaclass/ethrex?tag=v7.0.0#f7cae770c6a8d78f355cb2f0afdcadfd75b14eba" +source = "git+https://github.com/lambdaclass/ethrex?branch=main#c68e76d6b569c60a667a1240a91e637bf2ea0d0b" dependencies = [ "ethrex-common", "ethrex-p2p", @@ -3291,7 +3292,7 @@ dependencies = [ [[package]] name = "ethrex-crypto" version = "7.0.0" -source = "git+https://github.com/lambdaclass/ethrex?tag=v7.0.0#f7cae770c6a8d78f355cb2f0afdcadfd75b14eba" +source = "git+https://github.com/lambdaclass/ethrex?branch=main#c68e76d6b569c60a667a1240a91e637bf2ea0d0b" dependencies = [ "c-kzg", "kzg-rs", @@ -3302,7 +3303,7 @@ dependencies = [ [[package]] name = "ethrex-dev" version = "7.0.0" -source = "git+https://github.com/lambdaclass/ethrex?tag=v7.0.0#f7cae770c6a8d78f355cb2f0afdcadfd75b14eba" +source = "git+https://github.com/lambdaclass/ethrex?branch=main#c68e76d6b569c60a667a1240a91e637bf2ea0d0b" dependencies = [ "bytes", "envy", @@ -3322,10 +3323,10 @@ dependencies = [ [[package]] name = "ethrex-l2" version = "7.0.0" -source = "git+https://github.com/lambdaclass/ethrex?tag=v7.0.0#f7cae770c6a8d78f355cb2f0afdcadfd75b14eba" +source = "git+https://github.com/lambdaclass/ethrex?branch=main#c68e76d6b569c60a667a1240a91e637bf2ea0d0b" dependencies = [ "aligned-sdk", - "axum 0.8.6", + "axum 0.8.7", "bincode", "bytes", "chrono", @@ -3380,7 +3381,7 @@ dependencies = [ [[package]] name = "ethrex-l2-common" version = "7.0.0" -source = "git+https://github.com/lambdaclass/ethrex?tag=v7.0.0#f7cae770c6a8d78f355cb2f0afdcadfd75b14eba" +source = "git+https://github.com/lambdaclass/ethrex?branch=main#c68e76d6b569c60a667a1240a91e637bf2ea0d0b" dependencies = [ "bytes", "ethereum-types 0.15.1", @@ -3391,20 +3392,22 @@ dependencies = [ "ethrex-trie", "ethrex-vm", "hex", + "k256", "lambdaworks-crypto 0.13.0", "rkyv", "secp256k1", "serde", "serde_with", + "sha3", "thiserror 2.0.17", ] [[package]] name = "ethrex-l2-rpc" version = "7.0.0" -source = "git+https://github.com/lambdaclass/ethrex?tag=v7.0.0#f7cae770c6a8d78f355cb2f0afdcadfd75b14eba" +source = "git+https://github.com/lambdaclass/ethrex?branch=main#c68e76d6b569c60a667a1240a91e637bf2ea0d0b" dependencies = [ - "axum 0.8.6", + "axum 0.8.7", "bytes", "ethereum-types 0.15.1", "ethrex-blockchain", @@ -3425,14 +3428,14 @@ dependencies = [ "tokio", "tower-http", "tracing", - "tracing-subscriber 0.3.20", + "tracing-subscriber 0.3.21", "url", ] [[package]] name = "ethrex-levm" version = "7.0.0" -source = "git+https://github.com/lambdaclass/ethrex?tag=v7.0.0#f7cae770c6a8d78f355cb2f0afdcadfd75b14eba" +source = "git+https://github.com/lambdaclass/ethrex?branch=main#c68e76d6b569c60a667a1240a91e637bf2ea0d0b" dependencies = [ "ark-bn254", "ark-ec", @@ -3456,7 +3459,9 @@ dependencies = [ "serde", "serde_json", "sha2", + "sha3", "strum 0.27.2", + "substrate-bn", "thiserror 2.0.17", "walkdir", ] @@ -3464,9 +3469,9 @@ dependencies = [ [[package]] name = "ethrex-metrics" version = "7.0.0" -source = "git+https://github.com/lambdaclass/ethrex?tag=v7.0.0#f7cae770c6a8d78f355cb2f0afdcadfd75b14eba" +source = "git+https://github.com/lambdaclass/ethrex?branch=main#c68e76d6b569c60a667a1240a91e637bf2ea0d0b" dependencies = [ - "axum 0.8.6", + "axum 0.8.7", "ethrex-common", "prometheus 0.13.4", "serde", @@ -3474,13 +3479,13 @@ dependencies = [ "thiserror 2.0.17", "tokio", "tracing", - "tracing-subscriber 0.3.20", + "tracing-subscriber 0.3.21", ] [[package]] name = "ethrex-p2p" version = "7.0.0" -source = "git+https://github.com/lambdaclass/ethrex?tag=v7.0.0#f7cae770c6a8d78f355cb2f0afdcadfd75b14eba" +source = "git+https://github.com/lambdaclass/ethrex?branch=main#c68e76d6b569c60a667a1240a91e637bf2ea0d0b" dependencies = [ "aes", "async-trait", @@ -3500,7 +3505,7 @@ dependencies = [ "futures", "hex", "hmac", - "indexmap 2.12.0", + "indexmap 2.12.1", "lazy_static", "prometheus 0.14.0", "rand 0.8.5", @@ -3522,7 +3527,7 @@ dependencies = [ [[package]] name = "ethrex-prover" version = "7.0.0" -source = "git+https://github.com/lambdaclass/ethrex?tag=v7.0.0#f7cae770c6a8d78f355cb2f0afdcadfd75b14eba" +source = "git+https://github.com/lambdaclass/ethrex?branch=main#c68e76d6b569c60a667a1240a91e637bf2ea0d0b" dependencies = [ "anyhow", "bincode", @@ -3551,7 +3556,7 @@ dependencies = [ "tokio", "tokio-util", "tracing", - "tracing-subscriber 0.3.20", + "tracing-subscriber 0.3.21", "url", ] @@ -3586,6 +3591,7 @@ dependencies = [ "hex", "lazy_static", "reqwest 0.12.24", + "rkyv", "serde", "serde_json", "serde_with", @@ -3593,13 +3599,13 @@ dependencies = [ "tikv-jemallocator", "tokio", "tracing", - "tracing-subscriber 0.3.20", + "tracing-subscriber 0.3.21", ] [[package]] name = "ethrex-rlp" version = "7.0.0" -source = "git+https://github.com/lambdaclass/ethrex?tag=v7.0.0#f7cae770c6a8d78f355cb2f0afdcadfd75b14eba" +source = "git+https://github.com/lambdaclass/ethrex?branch=main#c68e76d6b569c60a667a1240a91e637bf2ea0d0b" dependencies = [ "bytes", "ethereum-types 0.15.1", @@ -3613,9 +3619,9 @@ dependencies = [ [[package]] name = "ethrex-rpc" version = "7.0.0" -source = "git+https://github.com/lambdaclass/ethrex?tag=v7.0.0#f7cae770c6a8d78f355cb2f0afdcadfd75b14eba" +source = "git+https://github.com/lambdaclass/ethrex?branch=main#c68e76d6b569c60a667a1240a91e637bf2ea0d0b" dependencies = [ - "axum 0.8.6", + "axum 0.8.7", "axum-extra", "bytes", "envy", @@ -3645,14 +3651,14 @@ dependencies = [ "tokio-util", "tower-http", "tracing", - "tracing-subscriber 0.3.20", + "tracing-subscriber 0.3.21", "uuid 1.18.1", ] [[package]] name = "ethrex-sdk" version = "7.0.0" -source = "git+https://github.com/lambdaclass/ethrex?tag=v7.0.0#f7cae770c6a8d78f355cb2f0afdcadfd75b14eba" +source = "git+https://github.com/lambdaclass/ethrex?branch=main#c68e76d6b569c60a667a1240a91e637bf2ea0d0b" dependencies = [ "bytes", "ethereum-types 0.15.1", @@ -3678,7 +3684,7 @@ dependencies = [ [[package]] name = "ethrex-sdk-contract-utils" version = "7.0.0" -source = "git+https://github.com/lambdaclass/ethrex?tag=v7.0.0#f7cae770c6a8d78f355cb2f0afdcadfd75b14eba" +source = "git+https://github.com/lambdaclass/ethrex?branch=main#c68e76d6b569c60a667a1240a91e637bf2ea0d0b" dependencies = [ "thiserror 2.0.17", "tracing", @@ -3687,7 +3693,7 @@ dependencies = [ [[package]] name = "ethrex-storage" version = "7.0.0" -source = "git+https://github.com/lambdaclass/ethrex?tag=v7.0.0#f7cae770c6a8d78f355cb2f0afdcadfd75b14eba" +source = "git+https://github.com/lambdaclass/ethrex?branch=main#c68e76d6b569c60a667a1240a91e637bf2ea0d0b" dependencies = [ "anyhow", "async-trait", @@ -3699,6 +3705,7 @@ dependencies = [ "ethrex-rlp", "ethrex-trie", "hex", + "lru 0.16.2", "qfilter", "rayon", "rustc-hash 2.1.1", @@ -3711,7 +3718,7 @@ dependencies = [ [[package]] name = "ethrex-storage-rollup" version = "7.0.0" -source = "git+https://github.com/lambdaclass/ethrex?tag=v7.0.0#f7cae770c6a8d78f355cb2f0afdcadfd75b14eba" +source = "git+https://github.com/lambdaclass/ethrex?branch=main#c68e76d6b569c60a667a1240a91e637bf2ea0d0b" dependencies = [ "anyhow", "async-trait", @@ -3731,7 +3738,7 @@ dependencies = [ [[package]] name = "ethrex-threadpool" version = "0.1.0" -source = "git+https://github.com/lambdaclass/ethrex?tag=v7.0.0#f7cae770c6a8d78f355cb2f0afdcadfd75b14eba" +source = "git+https://github.com/lambdaclass/ethrex?branch=main#c68e76d6b569c60a667a1240a91e637bf2ea0d0b" dependencies = [ "crossbeam 0.8.4", ] @@ -3739,7 +3746,7 @@ dependencies = [ [[package]] name = "ethrex-trie" version = "7.0.0" -source = "git+https://github.com/lambdaclass/ethrex?tag=v7.0.0#f7cae770c6a8d78f355cb2f0afdcadfd75b14eba" +source = "git+https://github.com/lambdaclass/ethrex?branch=main#c68e76d6b569c60a667a1240a91e637bf2ea0d0b" dependencies = [ "anyhow", "bytes", @@ -3751,6 +3758,7 @@ dependencies = [ "ethrex-threadpool", "hex", "lazy_static", + "rkyv", "rustc-hash 2.1.1", "serde", "serde_json", @@ -3762,7 +3770,7 @@ dependencies = [ [[package]] name = "ethrex-vm" version = "7.0.0" -source = "git+https://github.com/lambdaclass/ethrex?tag=v7.0.0#f7cae770c6a8d78f355cb2f0afdcadfd75b14eba" +source = "git+https://github.com/lambdaclass/ethrex?branch=main#c68e76d6b569c60a667a1240a91e637bf2ea0d0b" dependencies = [ "bincode", "bytes", @@ -3794,9 +3802,9 @@ dependencies = [ [[package]] name = "exr" -version = "1.73.0" +version = "1.74.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f83197f59927b46c04a183a619b7c29df34e63e63c7869320862268c0ef687e0" +checksum = "4300e043a56aa2cb633c01af81ca8f699a321879a7854d3896a0ba89056363be" dependencies = [ "bit_field", "half", @@ -3912,9 +3920,9 @@ dependencies = [ [[package]] name = "find-msvc-tools" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52051878f80a721bb68ebfbc930e07b65ba72f2da88968ea5c06fd6ca3d3a127" +checksum = "3a3076410a55c90011c298b04d0cfa770b00fa04e1e3c97d3f6c9de105a03844" [[package]] name = "find_cuda_helper" @@ -4039,7 +4047,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -4155,7 +4163,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -4256,9 +4264,9 @@ checksum = "304de19db7028420975a296ab0fcbbc8e69438c4ed254a1e41e2a7f37d5f0e0a" [[package]] name = "generic-array" -version = "0.14.9" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bb6743198531e02858aeaea5398fcc883e71851fcbcb5a2f773e2fb6cb1edf2" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", @@ -4340,7 +4348,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" dependencies = [ "fallible-iterator", - "indexmap 2.12.0", + "indexmap 2.12.1", "stable_deref_trait", ] @@ -4427,7 +4435,7 @@ dependencies = [ [[package]] name = "guest_program" version = "7.0.0" -source = "git+https://github.com/lambdaclass/ethrex?tag=v7.0.0#f7cae770c6a8d78f355cb2f0afdcadfd75b14eba" +source = "git+https://github.com/lambdaclass/ethrex?branch=main#c68e76d6b569c60a667a1240a91e637bf2ea0d0b" dependencies = [ "bytes", "ethrex-blockchain", @@ -4471,7 +4479,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.12.0", + "indexmap 2.12.1", "slab", "tokio", "tokio-util", @@ -4489,8 +4497,8 @@ dependencies = [ "fnv", "futures-core", "futures-sink", - "http 1.3.1", - "indexmap 2.12.0", + "http 1.4.0", + "indexmap 2.12.1", "slab", "tokio", "tokio-util", @@ -4584,12 +4592,15 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.16.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" dependencies = [ + "allocator-api2", + "equivalent", "foldhash 0.2.0", "serde", + "serde_core", ] [[package]] @@ -4619,7 +4630,7 @@ dependencies = [ "base64 0.22.1", "bytes", "headers-core", - "http 1.3.1", + "http 1.4.0", "httpdate", "mime", "sha1", @@ -4631,7 +4642,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54b4a22553d4242c49fddb9ba998a99962b5cc6f22cb5a3482bec22522403ce4" dependencies = [ - "http 1.3.1", + "http 1.4.0", ] [[package]] @@ -4718,12 +4729,11 @@ dependencies = [ [[package]] name = "http" -version = "1.3.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" +checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" dependencies = [ "bytes", - "fnv", "itoa", ] @@ -4745,7 +4755,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", - "http 1.3.1", + "http 1.4.0", ] [[package]] @@ -4756,7 +4766,7 @@ checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" dependencies = [ "bytes", "futures-core", - "http 1.3.1", + "http 1.4.0", "http-body 1.0.1", "pin-project-lite", ] @@ -4799,16 +4809,16 @@ dependencies = [ [[package]] name = "hyper" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3aa54a13a0dfe7fbe3a59e0c76093041720fdc77b110cc0fc260fafb4dc51e" +checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11" dependencies = [ "atomic-waker", "bytes", "futures-channel", "futures-core", "h2 0.4.12", - "http 1.3.1", + "http 1.4.0", "http-body 1.0.1", "httparse", "httpdate", @@ -4840,8 +4850,8 @@ version = "0.27.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" dependencies = [ - "http 1.3.1", - "hyper 1.7.0", + "http 1.4.0", + "hyper 1.8.1", "hyper-util", "rustls 0.23.35", "rustls-pki-types", @@ -4857,7 +4867,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" dependencies = [ - "hyper 1.7.0", + "hyper 1.8.1", "hyper-util", "pin-project-lite", "tokio", @@ -4872,7 +4882,7 @@ checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", "http-body-util", - "hyper 1.7.0", + "hyper 1.8.1", "hyper-util", "native-tls", "tokio", @@ -4882,18 +4892,18 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.17" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c6995591a8f1380fcb4ba966a252a4b29188d51d2b89e3a252f5305be65aea8" +checksum = "52e9a2a24dc5c6821e71a7030e1e14b7b632acac55c40e9d2e082c621261bb56" dependencies = [ "base64 0.22.1", "bytes", "futures-channel", "futures-core", "futures-util", - "http 1.3.1", + "http 1.4.0", "http-body 1.0.1", - "hyper 1.7.0", + "hyper 1.8.1", "ipnet", "libc", "percent-encoding", @@ -5130,7 +5140,7 @@ checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -5158,12 +5168,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.12.0" +version = "2.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6717a8d2a5a929a1a2eb43a12812498ed141a0bcfb7e8f7844fbdbe4303bba9f" +checksum = "0ad4bb2b565bca0645f4d68c5c9af97fba094e9791da685bf83cb5f3ce74acf2" dependencies = [ "equivalent", - "hashbrown 0.16.0", + "hashbrown 0.16.1", "serde", "serde_core", ] @@ -5196,7 +5206,7 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" dependencies = [ - "generic-array 0.14.9", + "generic-array 0.14.7", ] [[package]] @@ -5209,7 +5219,7 @@ dependencies = [ "indoc", "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -5525,7 +5535,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -5574,7 +5584,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" dependencies = [ "cfg-if 1.0.4", - "windows-link 0.2.1", + "windows-link", ] [[package]] @@ -5627,9 +5637,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.22" +version = "1.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b70e7a7df205e92a1a4cd9aaae7898dac0aa555503cc0a649494d0d60e7651d" +checksum = "15d118bbf3771060e7311cc7bb0545b01d08a8b4a7de949198dec1fa0ca1c0f7" dependencies = [ "cc", "libc", @@ -5685,6 +5695,15 @@ dependencies = [ "hashbrown 0.15.5", ] +[[package]] +name = "lru" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96051b46fc183dc9cd4a223960ef37b9af631b55191852a8274bfef064cda20f" +dependencies = [ + "hashbrown 0.16.1", +] + [[package]] name = "lru-slab" version = "0.1.2" @@ -5849,7 +5868,7 @@ checksum = "5cf92c10c7e361d6b99666ec1c6f9805b0bea2c3bd8c78dc6fe98ac5bd78db11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -6015,7 +6034,7 @@ checksum = "4568f25ccbd45ab5d5603dc34318c1ec56b117531781260002151b8530a9f931" dependencies = [ "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -6147,9 +6166,9 @@ dependencies = [ [[package]] name = "num-bigint-dig" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82c79c15c05d4bf82b6f5ef163104cc81a760d8e874d38ac50ab67c8877b647b" +checksum = "e661dda6640fad38e827a6d4a310ff4763082116fe217f279885c97f511bb0b7" dependencies = [ "lazy_static", "libm", @@ -6184,7 +6203,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -6293,7 +6312,7 @@ dependencies = [ "proc-macro-crate 3.4.0", "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -6403,9 +6422,9 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.74" +version = "0.10.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24ad14dd45412269e1a30f52ad8f0664f0f4f4a89ee8fe28c3b3527021ebb654" +checksum = "08838db121398ad17ab8531ce9de97b244589089e290a384c900cb9ff7434328" dependencies = [ "bitflags 2.10.0", "cfg-if 1.0.4", @@ -6424,7 +6443,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -6435,9 +6454,9 @@ checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" [[package]] name = "openssl-sys" -version = "0.9.110" +version = "0.9.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a9f0075ba3c21b09f8e8b2026584b1d18d49388648f2fbbf3c97ea8deced8e2" +checksum = "82cab2d520aa75e3c58898289429321eb788c3106963d0dc886ec7a5f4adc321" dependencies = [ "cc", "libc", @@ -6766,7 +6785,7 @@ dependencies = [ "proc-macro-crate 3.4.0", "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -6814,7 +6833,7 @@ dependencies = [ "libc", "redox_syscall 0.5.18", "smallvec", - "windows-link 0.2.1", + "windows-link", ] [[package]] @@ -6934,9 +6953,9 @@ checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "pest" -version = "2.8.3" +version = "2.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "989e7521a040efde50c3ab6bbadafbe15ab6dc042686926be59ac35d74607df4" +checksum = "cbcfd20a6d4eeba40179f05735784ad32bdaef05ce8e8af05f180d45bb3e7e22" dependencies = [ "memchr", "ucd-trie", @@ -6944,9 +6963,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.8.3" +version = "2.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "187da9a3030dbafabbbfb20cb323b976dc7b7ce91fcd84f2f74d6e31d378e2de" +checksum = "51f72981ade67b1ca6adc26ec221be9f463f2b5839c7508998daa17c23d94d7f" dependencies = [ "pest", "pest_generator", @@ -6954,22 +6973,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.8.3" +version = "2.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49b401d98f5757ebe97a26085998d6c0eecec4995cad6ab7fc30ffdf4b052843" +checksum = "dee9efd8cdb50d719a80088b76f81aec7c41ed6d522ee750178f83883d271625" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] name = "pest_meta" -version = "2.8.3" +version = "2.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72f27a2cfee9f9039c4d86faa5af122a0ac3851441a34865b8a043b46be0065a" +checksum = "bf1d70880e76bdc13ba52eafa6239ce793d85c8e43896507e43dd8984ff05b82" dependencies = [ "pest", "sha2", @@ -6982,7 +7001,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset 0.4.2", - "indexmap 2.12.0", + "indexmap 2.12.1", ] [[package]] @@ -6992,7 +7011,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3672b37090dbd86368a4145bc067582552b29c27377cad4e0a306c97f9bd7772" dependencies = [ "fixedbitset 0.5.7", - "indexmap 2.12.0", + "indexmap 2.12.1", ] [[package]] @@ -7035,7 +7054,7 @@ dependencies = [ "phf_shared", "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -7070,7 +7089,7 @@ checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" dependencies = [ "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -7196,7 +7215,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" dependencies = [ "proc-macro2", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -7262,7 +7281,7 @@ checksum = "07c277e4e643ef00c1233393c673f655e3672cf7eb3ba08a00bdd0ea59139b5f" dependencies = [ "proc-macro-rules-macros", "proc-macro2", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -7274,7 +7293,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -7294,7 +7313,7 @@ checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", "version_check", ] @@ -7394,7 +7413,7 @@ dependencies = [ "prost", "prost-types", "regex", - "syn 2.0.108", + "syn 2.0.111", "tempfile", ] @@ -7408,7 +7427,7 @@ dependencies = [ "itertools 0.14.0", "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -7463,7 +7482,7 @@ checksum = "7347867d0a7e1208d93b46767be83e2b8f978c3dad35f775ac8d8847551d6fe1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -7555,9 +7574,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.41" +version = "1.0.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce25767e7b499d1b604768e7cde645d14cc8584231ea6b295e9c9eb22c02e1d1" +checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" dependencies = [ "proc-macro2", ] @@ -7719,7 +7738,7 @@ dependencies = [ "indoc", "instability", "itertools 0.13.0", - "lru", + "lru 0.12.5", "paste", "strum 0.26.3", "unicode-segmentation", @@ -7825,7 +7844,7 @@ checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da" dependencies = [ "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -7920,10 +7939,10 @@ dependencies = [ "futures-core", "futures-util", "h2 0.4.12", - "http 1.3.1", + "http 1.4.0", "http-body 1.0.1", "http-body-util", - "hyper 1.7.0", + "hyper 1.8.1", "hyper-rustls 0.27.7", "hyper-tls", "hyper-util", @@ -7963,7 +7982,7 @@ checksum = "562ceb5a604d3f7c885a792d42c199fd8af239d0a51b2fa6a78aafa092452b04" dependencies = [ "anyhow", "async-trait", - "http 1.3.1", + "http 1.4.0", "reqwest 0.12.24", "serde", "thiserror 1.0.69", @@ -8306,9 +8325,9 @@ dependencies = [ [[package]] name = "risc0-zkos-v1compat" -version = "2.2.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "840c2228803557a8b7dc035a8f196516b6fd68c9dc6ac092f0c86241b5b1bafb" +checksum = "faf1f35f2ef61d8d86fdd06288c11d2f3bbf08f1af66b24ca0a1976ecbf324a1" dependencies = [ "include_bytes_aligned", "no_std_strings", @@ -8422,7 +8441,7 @@ dependencies = [ "bytecheck", "bytes", "hashbrown 0.15.5", - "indexmap 2.12.0", + "indexmap 2.12.1", "munge", "ptr_meta", "rancor", @@ -8440,7 +8459,7 @@ checksum = "bd83f5f173ff41e00337d97f6572e416d022ef8a19f371817259ae960324c482" dependencies = [ "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -8513,9 +8532,9 @@ dependencies = [ [[package]] name = "rsa" -version = "0.9.8" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78928ac1ed176a5ca1d17e578a1825f3d81ca54cf41053a592584b020cfd691b" +checksum = "40a0376c50d0358279d9d643e4bf7b7be212f1f4ff1da9070a7b54d22ef75c88" dependencies = [ "const-oid", "digest 0.10.7", @@ -8835,7 +8854,7 @@ dependencies = [ "proc-macro-crate 3.4.0", "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -8870,9 +8889,9 @@ dependencies = [ [[package]] name = "schemars" -version = "1.0.5" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1317c3bf3e7df961da95b0a56a172a02abead31276215a0497241a7624b487ce" +checksum = "9558e172d4e8533736ba97870c4b2cd63f84b382a3d6eb063da41b91cce17289" dependencies = [ "dyn-clone", "ref-cast", @@ -8903,7 +8922,7 @@ checksum = "1783eabc414609e28a5ba76aee5ddd52199f7107a0b24c2e9746a1ecc34a683d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -8942,7 +8961,7 @@ checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ "base16ct", "der", - "generic-array 0.14.9", + "generic-array 0.14.7", "pkcs8", "serdect", "subtle", @@ -9106,7 +9125,7 @@ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -9115,7 +9134,7 @@ version = "1.0.145" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" dependencies = [ - "indexmap 2.12.0", + "indexmap 2.12.1", "itoa", "memchr", "ryu", @@ -9142,7 +9161,7 @@ checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -9181,17 +9200,17 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.15.1" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa66c845eee442168b2c8134fec70ac50dc20e760769c8ba0ad1319ca1959b04" +checksum = "10574371d41b0d9b2cff89418eda27da52bcaff2cc8741db26382a77c29131f1" dependencies = [ "base64 0.22.1", "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.12.0", + "indexmap 2.12.1", "schemars 0.9.0", - "schemars 1.0.5", + "schemars 1.1.0", "serde_core", "serde_json", "serde_with_macros", @@ -9200,14 +9219,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.15.1" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91a903660542fced4e99881aa481bdbaec1634568ee02e0b8bd57c64cb38955" +checksum = "08a72d8216842fdd57820dc78d840bef99248e35fb2554ff923319e60f2d686b" dependencies = [ "darling 0.21.3", "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -9242,7 +9261,7 @@ checksum = "5d69265a08751de7844521fd15003ae0a888e035773ba05695c5c759a6f89eef" dependencies = [ "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -9321,9 +9340,9 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.4.6" +version = "1.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2a4719bff48cee6b39d12c020eeb490953ad2443b7055bd0b21fca26bd8c28b" +checksum = "7664a098b8e616bdfcc2dc0e9ac44eb231eedf41db4e9fe95d8d32ec728dedad" dependencies = [ "libc", ] @@ -9504,9 +9523,9 @@ dependencies = [ [[package]] name = "sp1-core-executor" -version = "5.2.2" +version = "5.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "117e991e137c9121eac26b2fd06daaa8f9e7c118a167d9a977e0048ac2142fac" +checksum = "3fb8bc70057a88164e479e367e2f83f7e7fba52d66acfbeef3b2174dc98c3627" dependencies = [ "bincode", "bytemuck", @@ -9547,9 +9566,9 @@ dependencies = [ [[package]] name = "sp1-core-machine" -version = "5.2.2" +version = "5.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b70e76953d1c4d507136b373bc198df0271d011c9acaa9b1eb8614dd65a0e04" +checksum = "fe446bea36feb189af83cda6ea5420150e877764e2ed4ab4cb2ee5cd3e20355c" dependencies = [ "bincode", "cbindgen", @@ -9596,7 +9615,7 @@ dependencies = [ "thiserror 1.0.69", "tracing", "tracing-forest", - "tracing-subscriber 0.3.20", + "tracing-subscriber 0.3.21", "typenum", "web-time", ] @@ -9620,9 +9639,9 @@ dependencies = [ [[package]] name = "sp1-curves" -version = "5.2.2" +version = "5.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e29cb79716167e58c0719d572e686880172f1816cd85e0acab74ea0ff3c795e" +checksum = "a6a7ce14c504360349f3eda564a0c9de286c35e1dfbcc979921a3384db02ae82" dependencies = [ "cfg-if 1.0.4", "dashu", @@ -9642,9 +9661,9 @@ dependencies = [ [[package]] name = "sp1-derive" -version = "5.2.2" +version = "5.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ac59616976c008e862f99d26fd0c1c037d464df33d9ca548be88f938f0b1bcf" +checksum = "9e1144840e0b75e988f3b8d24ffd015bc5fd76599f7864bfd994f3eaf2eb261a" dependencies = [ "quote", "syn 1.0.109", @@ -9652,9 +9671,9 @@ dependencies = [ [[package]] name = "sp1-lib" -version = "5.2.2" +version = "5.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fce8ad0f153443d09d398eccb650a0b2dcbf829470e394e4bf60ec4379c7af93" +checksum = "eb1a9935d58cb1dcd757a1b10d727090f5b718f1f03b512d48f0c1952e6ead00" dependencies = [ "bincode", "serde", @@ -9663,9 +9682,9 @@ dependencies = [ [[package]] name = "sp1-primitives" -version = "5.2.2" +version = "5.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0244dee3a7a0f88cf71c3edf518f4fc97794ae870a107cbe7c810ac3fbf879cb" +checksum = "a7d2a6187e394c30097ea7a975a4832f172918690dc89a979f0fad67422d3a8b" dependencies = [ "bincode", "blake3", @@ -9697,7 +9716,7 @@ dependencies = [ "hashbrown 0.14.5", "hex", "itertools 0.13.0", - "lru", + "lru 0.12.5", "num-bigint 0.4.6", "p3-baby-bear", "p3-bn254-fr", @@ -9723,14 +9742,14 @@ dependencies = [ "thiserror 1.0.69", "tracing", "tracing-appender", - "tracing-subscriber 0.3.20", + "tracing-subscriber 0.3.21", ] [[package]] name = "sp1-recursion-circuit" -version = "5.2.2" +version = "5.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dac2a5bd8b39ebf83160a13595e5197f3f194ddcc6d77af01a14b02a4e7bed12" +checksum = "44f16af7722bb0f7adabbfc0e60b7fe71ca546959d251c450afb79daaa589c56" dependencies = [ "hashbrown 0.14.5", "itertools 0.13.0", @@ -9763,9 +9782,9 @@ dependencies = [ [[package]] name = "sp1-recursion-compiler" -version = "5.2.2" +version = "5.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5611ead360e9875f426c5add60ce8082bfee28302a5c7dbfa39cad02e9178f88" +checksum = "7c83564beb23361e0b93d64f3b8d4a503eac8ced246648f727d44b0827165014" dependencies = [ "backtrace", "itertools 0.13.0", @@ -9785,9 +9804,9 @@ dependencies = [ [[package]] name = "sp1-recursion-core" -version = "5.2.2" +version = "5.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79029408bee7a503394ab9d738432e709475976034348d5107a1d1a0b06dc287" +checksum = "8c209fa6e384ff56ea7761ccc65426da08516d72ae55b6d8e4021b58bd4022f8" dependencies = [ "backtrace", "cbindgen", @@ -9828,9 +9847,9 @@ dependencies = [ [[package]] name = "sp1-recursion-derive" -version = "5.2.2" +version = "5.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "632f557f5bbfc8bc21b2bc319d3a375b46ea4522c00b875f02d73e4c0709b023" +checksum = "6a8ca2e82fea312a406f4ad4cba1a11812da4cea806607c56ec1670fd55b2ea6" dependencies = [ "quote", "syn 1.0.109", @@ -9838,9 +9857,9 @@ dependencies = [ [[package]] name = "sp1-recursion-gnark-ffi" -version = "5.2.2" +version = "5.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae30a1148f569a2bd133b5c666654132e0088c1762b826141cca7209106bfb23" +checksum = "5e146d24ce91c08e36b270a73de9817b9847e759a3d66923b009c67f24a3b9b2" dependencies = [ "anyhow", "bincode", @@ -9909,9 +9928,9 @@ dependencies = [ [[package]] name = "sp1-stark" -version = "5.2.2" +version = "5.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f0cdde80366245a374d29fecdde2881286002a6e3f51b84f54b86560ed026e5" +checksum = "40477690a0bb6d7102322947407439a8f1d05aecd535f0081db05e9a31f808f2" dependencies = [ "arrayref", "hashbrown 0.14.5", @@ -9980,7 +9999,7 @@ dependencies = [ "tokio-stream", "tokio-util", "tracing", - "tracing-subscriber 0.3.20", + "tracing-subscriber 0.3.21", ] [[package]] @@ -10025,7 +10044,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d904e7009df136af5297832a3ace3370cd14ff1546a232f4f185036c2736fcac" dependencies = [ "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -10104,7 +10123,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -10117,7 +10136,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -10129,7 +10148,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -10141,7 +10160,20 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", +] + +[[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 0.8.5", + "rustc-hex", ] [[package]] @@ -10193,9 +10225,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.108" +version = "2.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da58917d35242480a05c2897064da0a80589a2a0476c9a3f2fdc83b53502e917" +checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87" dependencies = [ "proc-macro2", "quote", @@ -10225,7 +10257,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -10350,7 +10382,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -10361,7 +10393,7 @@ checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" dependencies = [ "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -10531,7 +10563,7 @@ checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -10667,7 +10699,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.12.0", + "indexmap 2.12.1", "toml_datetime 0.6.11", "winnow 0.5.40", ] @@ -10678,7 +10710,7 @@ version = "0.22.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" dependencies = [ - "indexmap 2.12.0", + "indexmap 2.12.1", "serde", "serde_spanned", "toml_datetime 0.6.11", @@ -10692,7 +10724,7 @@ version = "0.23.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6485ef6d0d9b5d0ec17244ff7eb05310113c3f316f2d14200d4de56b3cb98f8d" dependencies = [ - "indexmap 2.12.0", + "indexmap 2.12.1", "toml_datetime 0.7.3", "toml_parser", "winnow 0.7.13", @@ -10725,10 +10757,10 @@ dependencies = [ "base64 0.22.1", "bytes", "h2 0.4.12", - "http 1.3.1", + "http 1.4.0", "http-body 1.0.1", "http-body-util", - "hyper 1.7.0", + "hyper 1.8.1", "hyper-timeout", "hyper-util", "percent-encoding", @@ -10784,14 +10816,14 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.6.6" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" +checksum = "9cf146f99d442e8e68e585f5d798ccd3cad9a7835b917e09728880a862706456" dependencies = [ "bitflags 2.10.0", "bytes", "futures-util", - "http 1.3.1", + "http 1.4.0", "http-body 1.0.1", "iri-string", "pin-project-lite", @@ -10814,9 +10846,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.41" +version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +checksum = "8eb41cbdb933e23b7929f47bb577710643157d7602ef3a2ebd3902b13ac5eda6" dependencies = [ "log", "pin-project-lite", @@ -10826,32 +10858,32 @@ dependencies = [ [[package]] name = "tracing-appender" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3566e8ce28cc0a3fe42519fc80e6b4c943cc4c8cef275620eb8dac2d3d4e06cf" +checksum = "786d480bce6247ab75f005b14ae1624ad978d3029d9113f0a22fa1ac773faeaf" dependencies = [ "crossbeam-channel 0.5.15", - "thiserror 1.0.69", + "thiserror 2.0.17", "time", - "tracing-subscriber 0.3.20", + "tracing-subscriber 0.3.21", ] [[package]] name = "tracing-attributes" -version = "0.1.30" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" dependencies = [ "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] name = "tracing-core" -version = "0.1.34" +version = "0.1.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" +checksum = "7a04e24fab5c89c6a36eb8558c9656f30d81de51dfa4d3b45f26b21d61fa0a6c" dependencies = [ "once_cell", "valuable", @@ -10864,7 +10896,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b1581020d7a273442f5b45074a6a57d5757ad0a47dac0e9f0bd57b81936f3db" dependencies = [ "tracing", - "tracing-subscriber 0.3.20", + "tracing-subscriber 0.3.21", ] [[package]] @@ -10877,7 +10909,7 @@ dependencies = [ "smallvec", "thiserror 1.0.69", "tracing", - "tracing-subscriber 0.3.20", + "tracing-subscriber 0.3.21", ] [[package]] @@ -10912,9 +10944,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.20" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2054a14f5307d601f88daf0553e1cbf472acc4f2c51afab632431cdcd72124d5" +checksum = "bee4bf13715d00789f2a099fd05d127c012bddc5c6628f2c8968374c1820c01d" dependencies = [ "matchers", "nu-ansi-term", @@ -10965,7 +10997,7 @@ dependencies = [ "parking_lot 0.12.5", "ratatui", "tracing", - "tracing-subscriber 0.3.20", + "tracing-subscriber 0.3.21", "unicode-segmentation", ] @@ -11008,7 +11040,7 @@ dependencies = [ "byteorder", "bytes", "data-encoding", - "http 1.3.1", + "http 1.4.0", "httparse", "log", "native-tls", @@ -11026,7 +11058,7 @@ checksum = "8628dcc84e5a09eb3d8423d6cb682965dea9133204e8fb3efee74c2a0c259442" dependencies = [ "bytes", "data-encoding", - "http 1.3.1", + "http 1.4.0", "httparse", "log", "rand 0.9.2", @@ -11044,9 +11076,9 @@ dependencies = [ "async-trait", "axum 0.7.9", "futures", - "http 1.3.1", + "http 1.4.0", "http-body-util", - "hyper 1.7.0", + "hyper 1.8.1", "prost", "reqwest 0.12.24", "serde", @@ -11106,7 +11138,7 @@ checksum = "27a7a9b72ba121f6f1f6c3632b85604cac41aedb5ddc70accbebb6cac83de846" dependencies = [ "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -11531,7 +11563,7 @@ dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", "wasm-bindgen-shared", ] @@ -11609,9 +11641,9 @@ dependencies = [ [[package]] name = "weezl" -version = "0.1.10" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a751b3277700db47d3e574514de2eced5e54dc8a5436a3bf7a0b248b2cee16f3" +checksum = "a28ac98ddc8b9274cb41bb4d9d4d5c425b6020c50c46f25559911905610b4a88" [[package]] name = "which" @@ -11705,9 +11737,9 @@ checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" dependencies = [ "windows-implement", "windows-interface", - "windows-link 0.2.1", - "windows-result 0.4.1", - "windows-strings 0.5.1", + "windows-link", + "windows-result", + "windows-strings", ] [[package]] @@ -11718,7 +11750,7 @@ checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -11729,15 +11761,9 @@ checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" dependencies = [ "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] -[[package]] -name = "windows-link" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" - [[package]] name = "windows-link" version = "0.2.1" @@ -11746,22 +11772,13 @@ checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" [[package]] name = "windows-registry" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a9ed28765efc97bbc954883f4e6796c33a06546ebafacbabee9696967499e" -dependencies = [ - "windows-link 0.1.3", - "windows-result 0.3.4", - "windows-strings 0.4.2", -] - -[[package]] -name = "windows-result" -version = "0.3.4" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +checksum = "02752bf7fbdcce7f2a27a742f798510f3e5ad88dbe84871e5168e2120c3d5720" dependencies = [ - "windows-link 0.1.3", + "windows-link", + "windows-result", + "windows-strings", ] [[package]] @@ -11770,16 +11787,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" dependencies = [ - "windows-link 0.2.1", -] - -[[package]] -name = "windows-strings" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" -dependencies = [ - "windows-link 0.1.3", + "windows-link", ] [[package]] @@ -11788,7 +11796,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" dependencies = [ - "windows-link 0.2.1", + "windows-link", ] [[package]] @@ -11833,7 +11841,7 @@ version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" dependencies = [ - "windows-link 0.2.1", + "windows-link", ] [[package]] @@ -11873,7 +11881,7 @@ version = "0.53.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" dependencies = [ - "windows-link 0.2.1", + "windows-link", "windows_aarch64_gnullvm 0.53.1", "windows_aarch64_msvc 0.53.1", "windows_i686_gnu 0.53.1", @@ -12159,28 +12167,28 @@ checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", "synstructure", ] [[package]] name = "zerocopy" -version = "0.8.27" +version = "0.8.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0894878a5fa3edfd6da3f88c4805f4c8558e2b996227a3d864f47fe11e38282c" +checksum = "4ea879c944afe8a2b25fef16bb4ba234f47c694565e97383b36f3a878219065c" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.27" +version = "0.8.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831" +checksum = "cf955aa904d6040f70dc8e9384444cb1030aed272ba3cb09bbc4ab9e7c1f34f5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -12200,7 +12208,7 @@ checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", "synstructure", ] @@ -12221,7 +12229,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -12254,7 +12262,7 @@ checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.111", ] [[package]] @@ -12288,7 +12296,7 @@ dependencies = [ "crossbeam-utils 0.8.21", "displaydoc", "flate2", - "indexmap 2.12.0", + "indexmap 2.12.1", "memchr", "thiserror 2.0.17", "zopfli", diff --git a/Cargo.toml b/Cargo.toml index 4446d9b..5732536 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,24 +4,33 @@ edition = "2024" authors = ["LambdaClass"] version = "7.0.0" +[profile.release] +opt-level = 3 +lto = "thin" +codegen-units = 1 + +[profile.release-with-debug] +inherits = "release" +debug = 2 + [dependencies] -ethrex-config = { git = "https://github.com/lambdaclass/ethrex", package = "ethrex-config", tag = "v7.0.0" } -ethrex-storage = { git = "https://github.com/lambdaclass/ethrex", package = "ethrex-storage", tag = "v7.0.0" } -ethrex-common = { git = "https://github.com/lambdaclass/ethrex", package = "ethrex-common", tag = "v7.0.0" } -ethrex-vm = { git = "https://github.com/lambdaclass/ethrex", package = "ethrex-vm", tag = "v7.0.0" } -ethrex-levm = { git = "https://github.com/lambdaclass/ethrex", package = "ethrex-levm", tag = "v7.0.0" } -ethrex-rpc = { git = "https://github.com/lambdaclass/ethrex", package = "ethrex-rpc", tag = "v7.0.0" } -ethrex-p2p = { git = "https://github.com/lambdaclass/ethrex", package = "ethrex-p2p", tag = "v7.0.0" } -ethrex-trie = { git = "https://github.com/lambdaclass/ethrex", package = "ethrex-trie", tag = "v7.0.0" } -ethrex-rlp = { git = "https://github.com/lambdaclass/ethrex", package = "ethrex-rlp", tag = "v7.0.0" } -ethrex-blockchain = { git = "https://github.com/lambdaclass/ethrex", package = "ethrex-blockchain", tag = "v7.0.0" } -ethrex-l2 = { git = "https://github.com/lambdaclass/ethrex", package = "ethrex-l2", tag = "v7.0.0", optional = true } -ethrex-l2-common = { git = "https://github.com/lambdaclass/ethrex", package = "ethrex-l2-common", tag = "v7.0.0" } -ethrex-storage-rollup = { git = "https://github.com/lambdaclass/ethrex", package = "ethrex-storage-rollup", tag = "v7.0.0", optional = true } -ethrex-sdk = { git = "https://github.com/lambdaclass/ethrex", package = "ethrex-sdk", tag = "v7.0.0" } -ethrex-l2-rpc = { git = "https://github.com/lambdaclass/ethrex", package = "ethrex-l2-rpc", tag = "v7.0.0" } -ethrex-prover = { git = "https://github.com/lambdaclass/ethrex", package = "ethrex-prover", tag = "v7.0.0", default-features = false } -guest_program = { git = "https://github.com/lambdaclass/ethrex", package = "guest_program", tag = "v7.0.0", default-features = false } +ethrex-config = { git = "https://github.com/lambdaclass/ethrex", package = "ethrex-config", branch = "main" } +ethrex-storage = { git = "https://github.com/lambdaclass/ethrex", package = "ethrex-storage", branch = "main" } +ethrex-common = { git = "https://github.com/lambdaclass/ethrex", package = "ethrex-common", branch = "main" } +ethrex-vm = { git = "https://github.com/lambdaclass/ethrex", package = "ethrex-vm", branch = "main" } +ethrex-levm = { git = "https://github.com/lambdaclass/ethrex", package = "ethrex-levm", branch = "main" } +ethrex-rpc = { git = "https://github.com/lambdaclass/ethrex", package = "ethrex-rpc", branch = "main" } +ethrex-p2p = { git = "https://github.com/lambdaclass/ethrex", package = "ethrex-p2p", branch = "main" } +ethrex-trie = { git = "https://github.com/lambdaclass/ethrex", package = "ethrex-trie", branch = "main" } +ethrex-rlp = { git = "https://github.com/lambdaclass/ethrex", package = "ethrex-rlp", branch = "main" } +ethrex-blockchain = { git = "https://github.com/lambdaclass/ethrex", package = "ethrex-blockchain", branch = "main" } +ethrex-l2 = { git = "https://github.com/lambdaclass/ethrex", package = "ethrex-l2", branch = "main", optional = true } +ethrex-l2-common = { git = "https://github.com/lambdaclass/ethrex", package = "ethrex-l2-common", branch = "main" } +ethrex-storage-rollup = { git = "https://github.com/lambdaclass/ethrex", package = "ethrex-storage-rollup", branch = "main", optional = true } +ethrex-sdk = { git = "https://github.com/lambdaclass/ethrex", package = "ethrex-sdk", branch = "main" } +ethrex-l2-rpc = { git = "https://github.com/lambdaclass/ethrex", package = "ethrex-l2-rpc", branch = "main" } +ethrex-prover = { git = "https://github.com/lambdaclass/ethrex", package = "ethrex-prover", branch = "main", default-features = false } +guest_program = { git = "https://github.com/lambdaclass/ethrex", package = "guest_program", branch = "main", default-features = false } serde = { version = "1.0.203", features = ["derive"] } hex = "0.4.3" @@ -41,10 +50,12 @@ futures-util = "0.3.31" futures = "0.3.31" sha3 = "0.10.8" tikv-jemallocator = { version = "0.6.0", optional = true } +rkyv = { version = "0.8.10", features = ["std", "unaligned"] } [features] risc0 = ["guest_program/risc0", "ethrex-prover/risc0"] sp1 = ["guest_program/sp1", "ethrex-prover/sp1"] +zisk = ["guest_program/zisk", "ethrex-prover/zisk"] gpu = ["ethrex-prover/gpu"] l2 = [ "guest_program/l2", @@ -52,5 +63,6 @@ l2 = [ "ethrex-l2/l2", "ethrex-storage-rollup/l2", ] +ci = ["guest_program/ci", "ethrex-prover/ci"] profiling = ["ethrex-prover/profiling"] jemalloc = ["dep:tikv-jemallocator"] diff --git a/README.md b/README.md index 92be3a0..bc7b3bf 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ A tool for executing and proving Ethereum blocks, transactions, and L2 batches | `ethrex-replay custom` | Build your block before to replay it. | | `ethrex-replay transaction` | Replay a single transaction of a block. | | `ethrex-replay cache` | Generate witness data prior to block replay (see `ethrex-replay cache --help`) | +| `ethrex-replay generate-input` | Generate binary input for the guest program to invoke the zkVM directly (see [Generate Input](#generate-input)) | ### L2 @@ -61,7 +62,7 @@ Execution of some particular blocks with the `eth_getProof` method won't work wi ### Dependencies -These dependencies are optional, install them only if you want to run with the features `risc0` or `sp1` respectively. +These dependencies are optional, install them only if you want to run with the features `risc0` or `sp1` respectively. Make sure to use the correct versions of these. #### [RISC0](https://dev.risczero.com/api/zkvm/install) @@ -187,6 +188,7 @@ The following table lists the available features for `ethrex-replay`. To enable - [Prove an L2 batch](#prove-an-l2-batch) - [Execute a transaction](#execute-a-transaction) - [Plot block composition](#plot-block-composition) +- [Generate input](#generate-input) > [!IMPORTANT] > The following instructions assume that you've installed `ethrex-replay` as described in the [Getting Started](#getting-started) section. @@ -252,6 +254,28 @@ ethrex-replay l2 transaction --execute --rpc-url ethrex-replay block-composition --start-block --end-block --rpc-url --network ``` +### Generate input + +Generate the binary input for the guest program so you can generate a proof without using `ethrex-replay`, by invoking the zkVM directly. This is useful when you want to pass the guest ELF file (which you can download in the [ethrex](https://github.com/lambdaclass/ethrex) releases) and the input (generated with this command) directly to the zkVM prover. + +> [!NOTE] +> +> 1. You can specify a single block with `--block`, a list of blocks with `--blocks`, or a range with `--from` and `--to`. +> 2. If `--to` is not specified when using `--from`, the latest block will be used. +> 3. The output files are named `ethrex___input.bin` and stored in the specified output directory. +> 4. The `generate-input` command is only available for L1 (not available with the `l2` feature). + +``` +# Generate input for a single block +ethrex-replay generate-input --block --rpc-url + +# Generate input for a range of blocks +ethrex-replay generate-input --from --to --rpc-url + +# Generate input for specific blocks with a custom output directory +ethrex-replay generate-input --blocks ,, --output-dir ./my_inputs --rpc-url +``` + --- ## Benchmarking & Profiling diff --git a/src/cli.rs b/src/cli.rs index c117d48..a926050 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -9,6 +9,7 @@ use ethrex_trie::{EMPTY_TRIE_HASH, InMemoryTrieDB}; use eyre::OptionExt; use std::{ cmp::max, + collections::BTreeMap, fmt::Display, path::PathBuf, sync::Arc, @@ -24,9 +25,10 @@ use ethrex_blockchain::{ use ethrex_common::{ Address, H256, types::{ - AccountState, AccountUpdate, Block, Code, DEFAULT_BUILDER_GAS_CEIL, ELASTICITY_MULTIPLIER, - Receipt, block_execution_witness::GuestProgramState, + AccountState, AccountUpdate, Block, BlockHeader, Code, DEFAULT_BUILDER_GAS_CEIL, + ELASTICITY_MULTIPLIER, Receipt, block_execution_witness::GuestProgramState, }, + utils::keccak, }; use ethrex_prover::backend::Backend; #[cfg(not(feature = "l2"))] @@ -90,6 +92,9 @@ pub enum EthrexReplayCommand { #[command(subcommand, about = "Replay a custom block or batch")] Custom(CustomSubcommand), #[cfg(not(feature = "l2"))] + #[command(about = "Generate binary input for ethrex guest")] + GenerateInput(GenerateInputOptions), + #[cfg(not(feature = "l2"))] #[command(about = "Replay a single transaction")] Transaction(TransactionOpts), #[cfg(feature = "l2")] @@ -127,20 +132,15 @@ pub enum CustomSubcommand { Batch(CustomBatchOptions), } -#[derive(Parser, Clone)] +#[derive(Parser, Clone, Default)] pub struct CommonOptions { - #[arg( - long, - value_enum, - help_heading = "Replay Options", - conflicts_with = "no_zkvm" - )] + #[arg(long, value_enum, help_heading = "Replay Options")] pub zkvm: Option, #[arg(long, value_enum, default_value_t = Resource::default(), help_heading = "Replay Options")] pub resource: Resource, #[arg(long, value_enum, default_value_t = Action::default(), help_heading = "Replay Options")] pub action: Action, - #[arg(long = "proof", value_enum, default_value_t = ProofType::default(), help_heading = "Replay Options", conflicts_with_all = ["no_zkvm"])] + #[arg(long = "proof", value_enum, default_value_t = ProofType::default(), help_heading = "Replay Options")] pub proof_type: ProofType, #[arg( long, @@ -197,7 +197,7 @@ pub struct EthrexReplayOptions { long, help = "Execute with `Blockchain::add_block`, without using zkvm as backend", help_heading = "Replay Options", - conflicts_with = "zkvm" + conflicts_with_all = ["zkvm", "proof_type"] )] pub no_zkvm: bool, // CAUTION @@ -437,6 +437,49 @@ pub enum TxVariant { ERC20Transfer, } +#[derive(Parser)] +#[command(group(ArgGroup::new("block_list").required(true).multiple(true).args(["block", "blocks", "from"])))] +pub struct GenerateInputOptions { + #[arg( + long, + conflicts_with_all = ["blocks", "from", "to"], + help = "Block to generate input for", + help_heading = "Command Options" + )] + block: Option, + #[arg(long, help = "List of blocks to execute.", num_args = 1.., value_delimiter = ',', conflicts_with_all = ["block", "from", "to"], help_heading = "Command Options")] + blocks: Vec, + #[arg( + long, + conflicts_with_all = ["blocks", "block"], + help = "Starting block. (Inclusive)", + help_heading = "Command Options" + )] + from: Option, + #[arg( + long, + conflicts_with_all = ["blocks", "block"], + help = "Ending block. (Inclusive)", + requires = "from", + help_heading = "Command Options" + )] + to: Option, + #[arg( + long, + help = "Directory to store the generated input", + value_parser, + default_value = "./generated_inputs", + help_heading = "Replay Options" + )] + output_dir: PathBuf, + #[arg( + long, + help = "RPC provider to fetch data from", + help_heading = "Replay Options" + )] + rpc_url: Url, +} + impl EthrexReplayCommand { pub async fn run(self) -> eyre::Result<()> { match self { @@ -652,6 +695,75 @@ impl EthrexReplayCommand { plot(&blocks).await?; } + #[cfg(not(feature = "l2"))] + Self::GenerateInput(GenerateInputOptions { + block, + blocks, + from, + to, + output_dir, + rpc_url, + }) => { + let opts = EthrexReplayOptions { + common: CommonOptions::default(), + rpc_url: Some(rpc_url.clone()), + cached: false, + network: None, + cache_dir: PathBuf::from("./replay_cache"), + cache_level: CacheLevel::Off, + slack_webhook_url: None, + no_zkvm: false, + bench: false, + notification_level: NotificationLevel::Off, + }; + + if !output_dir.exists() { + std::fs::create_dir_all(&output_dir)?; + } + + let blocks_to_process: Vec = if !blocks.is_empty() { + blocks + } else if let Some(block) = block { + vec![block] + } else { + let from = from.ok_or_else(|| { + eyre::eyre!("Either block, blocks, or from must be specified") + })?; + let to = match to { + Some(to) => to, + None => fetch_latest_block_number(rpc_url.clone(), false).await?, + }; + (from..=to).collect() + }; + + for block in &blocks_to_process { + let (cache, network) = get_blockdata(opts.clone(), Some(*block)).await?; + + let program_input = crate::run::get_l1_input(cache)?; + + let serialized_program_input = + rkyv::to_bytes::(&program_input)?; + + let input_output_path = + output_dir.join(format!("ethrex_{network}_{block}_input.bin")); + + std::fs::write(input_output_path, serialized_program_input.as_slice())?; + } + + if blocks_to_process.len() == 1 { + info!( + "Generated input for block {} in directory {}", + blocks_to_process[0], + output_dir.display() + ); + } else { + info!( + "Generated inputs for {} blocks in directory {}", + blocks_to_process.len(), + output_dir.display() + ); + } + } #[cfg(feature = "l2")] Self::L2(L2Subcommand::Transaction(TransactionOpts { tx_hash, @@ -757,10 +869,30 @@ async fn replay_no_zkvm(cache: Cache, opts: &EthrexReplayOptions) -> eyre::Resul let chain_config = cache.get_chain_config()?; let block = cache.blocks[0].clone(); + let first_block_number = cache.get_first_block_number()?; + let headers = cache + .witness + .headers + .iter() + .map(|h| { + BlockHeader::decode(h).map_err(|_| eyre::Error::msg("Failed to decode block header")) + }) + .collect::, _>>()?; + let Some(parent_block_header) = headers.into_iter().find_map(|header| { + if header.number == first_block_number - 1 { + Some(header) + } else { + None + } + }) else { + eyre::bail!("No parent block header"); + }; + let witness = execution_witness_from_rpc_chain_config( cache.witness.clone(), chain_config, cache.get_first_block_number()?, + parent_block_header.state_root, )?; let network = &cache.network; @@ -770,13 +902,26 @@ async fn replay_no_zkvm(cache: Cache, opts: &EthrexReplayOptions) -> eyre::Resul // For the code hashes that we don't have we'll fill it with let mut all_codes_hashed = guest_program.codes_hashed.clone(); - let all_nodes = &guest_program.nodes_hashed; let mut store = Store::new("nothing", EngineType::InMemory)?; // - Set up state trie nodes let state_root = guest_program.parent_block_header.state_root; - let state_trie = InMemoryTrieDB::from_nodes(state_root, all_nodes)?; + let all_nodes: BTreeMap> = cache + .witness + .state + .iter() + .filter_map(|b| { + if b.as_ref() == [0x80] { + return None; + } // skip nulls + let h = keccak(b); + Some((h, b.clone().to_vec())) + }) + .collect(); + + let state_trie = InMemoryTrieDB::from_nodes(state_root, &all_nodes)?; + let state_trie_nodes = get_trie_nodes_with_dummies(state_trie); let trie = store.open_direct_state_trie(*EMPTY_TRIE_HASH)?; @@ -795,12 +940,7 @@ async fn replay_no_zkvm(cache: Cache, opts: &EthrexReplayOptions) -> eyre::Resul let hashed_address = hash_address(address); // Account state may not be in the state trie - let Some(account_state_rlp) = guest_program - .state_trie - .as_ref() - .unwrap() - .get(&hashed_address)? - else { + let Some(account_state_rlp) = guest_program.state_trie.get(&hashed_address)? else { continue; }; @@ -811,7 +951,7 @@ async fn replay_no_zkvm(cache: Cache, opts: &EthrexReplayOptions) -> eyre::Resul all_codes_hashed.entry(code_hash).or_insert(Code::default()); let storage_root = account_state.storage_root; - let Ok(storage_trie) = InMemoryTrieDB::from_nodes(storage_root, all_nodes) else { + let Ok(storage_trie) = InMemoryTrieDB::from_nodes(storage_root, &all_nodes) else { continue; }; @@ -977,16 +1117,22 @@ pub fn backend(zkvm: &Option) -> eyre::Result { #[cfg(feature = "sp1")] return Ok(Backend::SP1); #[cfg(not(feature = "sp1"))] - return Err(eyre::Error::msg("SP1 feature not enabled")); + return Err(eyre::Error::msg("sp1 feature not enabled")); } Some(ZKVM::Risc0) => { #[cfg(feature = "risc0")] return Ok(Backend::RISC0); #[cfg(not(feature = "risc0"))] - return Err(eyre::Error::msg("RISC0 feature not enabled")); + return Err(eyre::Error::msg("risc0 feature not enabled")); + } + Some(ZKVM::Zisk) => { + #[cfg(feature = "zisk")] + return Ok(Backend::ZisK); + #[cfg(not(feature = "zisk"))] + return Err(eyre::Error::msg("zisk feature not enabled")); } Some(_other) => Err(eyre::Error::msg( - "Only SP1 and RISC0 backends are supported currently", + "Only SP1, Risc0, and ZisK backends are supported currently", )), None => Ok(Backend::Exec), } @@ -1097,7 +1243,7 @@ pub async fn replay_custom_l1_blocks( let cache = Cache::new( blocks, - RpcExecutionWitness::from(execution_witness), + RpcExecutionWitness::try_from(execution_witness)?, chain_config, opts.cache_dir, ); @@ -1298,7 +1444,7 @@ pub async fn replay_custom_l2_blocks(n_blocks: u64, opts: EthrexReplayOptions) - let cache = Cache::new( blocks, - RpcExecutionWitness::from(execution_witness), + RpcExecutionWitness::try_from(execution_witness)?, genesis.config, opts.cache_dir.clone(), ); diff --git a/src/rpc/db.rs b/src/rpc/db.rs index 8bd3d84..ac60a8f 100644 --- a/src/rpc/db.rs +++ b/src/rpc/db.rs @@ -584,15 +584,13 @@ impl LevmDatabase for RpcDB { /// calculate all possible child nodes. pub fn get_potential_child_nodes(proof: &[NodeRLP], key: &PathRLP) -> Option> { let mut state_nodes = BTreeMap::new(); - for node in proof.iter().skip(1) { + for node in proof.iter() { let hash = Keccak256::digest(node); - state_nodes.insert(H256::from_slice(&hash), node.clone()); + state_nodes.insert(H256::from_slice(&hash), Node::decode(node).ok()?); } let hash = if let Some(root) = proof.first() { - let hash = H256::from_slice(&Keccak256::digest(root)); - state_nodes.insert(hash, root.clone()); - hash + H256::from_slice(&Keccak256::digest(root)) } else { *EMPTY_KECCACK_HASH }; diff --git a/src/rpc/mod.rs b/src/rpc/mod.rs index a65efc7..318f540 100644 --- a/src/rpc/mod.rs +++ b/src/rpc/mod.rs @@ -6,9 +6,10 @@ use again::{RetryPolicy, Task}; use bytes::Bytes; use ethrex_common::{Address, H256, U256, constants::EMPTY_KECCACK_HASH, types::AccountState}; +use ethrex_rlp::decode::RLPDecode; use ethrex_rpc::types::block::RpcBlock; use ethrex_storage::hash_address; -use ethrex_trie::Trie; +use ethrex_trie::{Node, Trie}; use serde::Deserialize; use serde::de::DeserializeOwned; @@ -151,7 +152,8 @@ pub async fn get_account( let mut state_nodes = BTreeMap::new(); for node in &account_proof { let hash = sha3::Keccak256::digest(node); - state_nodes.insert(H256::from_slice(&hash), node.clone()); + let decoded_node = Node::decode(node).map_err(|_| eyre::eyre!("Failed to decode node"))?; + state_nodes.insert(H256::from_slice(&hash), decoded_node); } let hash = H256::from_slice(&sha3::Keccak256::digest(root)); diff --git a/src/run.rs b/src/run.rs index ea0d756..208b916 100644 --- a/src/run.rs +++ b/src/run.rs @@ -4,11 +4,13 @@ use ethrex_common::types::fee_config::FeeConfig; use ethrex_common::{ H256, types::{ - AccountUpdate, ELASTICITY_MULTIPLIER, Receipt, block_execution_witness::GuestProgramState, + AccountUpdate, BlockHeader, ELASTICITY_MULTIPLIER, Receipt, + block_execution_witness::GuestProgramState, }, }; use ethrex_levm::{db::gen_db::GeneralizedDatabase, vm::VMType}; use ethrex_prover::backend::Backend; +use ethrex_rlp::decode::RLPDecode; use ethrex_rpc::debug::execution_witness::execution_witness_from_rpc_chain_config; use ethrex_vm::{DynVmDatabase, Evm, GuestProgramStateWrapper, backends::levm::LEVM}; use eyre::Context; @@ -97,10 +99,29 @@ pub async fn run_tx(cache: Cache, tx_hash: H256) -> eyre::Result<(Receipt, Vec, _>>()? + .into_iter() + .find(|h| h.number == first_block_number - 1) + .map(|h| h.state_root) + .ok_or_else(|| eyre::eyre!("Initial state root not found"))?; + let execution_witness = execution_witness_from_rpc_chain_config( execution_witness, chain_config, block.header.number, + initial_state_root, ) .wrap_err("Failed to convert execution witness")?; @@ -142,7 +163,10 @@ pub async fn run_tx(cache: Cache, tx_hash: H256) -> eyre::Result<(Receipt, Vec eyre::Result { +pub fn get_l1_input(cache: Cache) -> eyre::Result { + use ethrex_common::types::BlockHeader; + use ethrex_rlp::decode::RLPDecode; + let Cache { blocks, witness: db, @@ -168,9 +192,24 @@ fn get_l1_input(cache: Cache) -> eyre::Result { .header .number; - let execution_witness = - execution_witness_from_rpc_chain_config(db, chain_config, first_block_number) - .wrap_err("Failed to convert execution witness")?; + let initial_state_root = db + .headers + .iter() + .map(|h| { + BlockHeader::decode(h).map_err(|_| eyre::Error::msg("Failed to decode block header")) + }) + .collect::, _>>()? + .into_iter() + .find(|h| h.number == first_block_number - 1) + .map(|h| h.state_root) + .ok_or_else(|| eyre::eyre!("Initial state root not found"))?; + + let execution_witness = execution_witness_from_rpc_chain_config( + db, + chain_config, + first_block_number, + initial_state_root, + )?; Ok(ProgramInput { blocks, @@ -193,7 +232,9 @@ fn extract_panic_message(panic_info: &Box) -> String { #[cfg(feature = "l2")] fn get_l2_input(cache: Cache) -> eyre::Result { + use ethrex_common::types::BlockHeader; use ethrex_common::types::fee_config::FeeConfig; + use ethrex_rlp::decode::RLPDecode; let Cache { blocks, @@ -211,9 +252,26 @@ fn get_l2_input(cache: Cache) -> eyre::Result { .ok_or_else(|| eyre::eyre!("No blocks in cache"))? .header .number; - let execution_witness = - execution_witness_from_rpc_chain_config(db, chain_config, first_block_number) - .wrap_err("Failed to convert execution witness")?; + + let initial_state_root = db + .headers + .iter() + .map(|h| { + BlockHeader::decode(h).map_err(|_| eyre::Error::msg("Failed to decode block header")) + }) + .collect::, _>>()? + .into_iter() + .find(|h| h.number == first_block_number - 1) + .map(|h| h.state_root) + .ok_or_else(|| eyre::eyre!("Initial state root not found"))?; + + let execution_witness = execution_witness_from_rpc_chain_config( + db, + chain_config, + first_block_number, + initial_state_root, + ) + .wrap_err("Failed to convert execution witness")?; Ok(ProgramInput { blocks,