diff --git a/Makefile b/Makefile index 25dce43de..5adc8a44f 100644 --- a/Makefile +++ b/Makefile @@ -307,8 +307,12 @@ test-rust: compile-programs-rust # measured cost. ETHREX_REAL_BLOCK_NETWORK := mainnet ETHREX_REAL_BLOCK := 25368371 -ETHREX_REAL_BLOCK_FIXTURE_URL := https://github.com/yetanotherco/lambda_vm/releases/download/bench-fixtures-v1/ethrex_mainnet_25368371.bin -ETHREX_REAL_BLOCK_FIXTURE_SHA256 := 61eba49b6b254f4a05def5a47b08a21ae3eee56f0d37bcd7b3a24b0cc1e4a300 +# The asset name carries the ethrex rev because the bytes are a function of it: the +# archived ProgramInput layout moves with the pin, so one block has one fixture per rev. +# Uploading under a new name rather than replacing the old one keeps `main` — which still +# expects the pre-bump sha256 — fetching its own artifact while this branch is open. +ETHREX_REAL_BLOCK_FIXTURE_URL := https://github.com/yetanotherco/lambda_vm/releases/download/bench-fixtures-v1/ethrex_mainnet_25368371_4f658c2b.bin +ETHREX_REAL_BLOCK_FIXTURE_SHA256 := 0a301731b84515260c2ad7779fef3e4ef8b2424fbcc055ee2f5a224bc88120ab # The block's source cache, hosted in the same release. Only `regen-real-block-fixture` # reads it — the converter's TESTS use a different, upstream-pinned cache (below). ETHREX_REAL_BLOCK_CACHE_URL := https://github.com/yetanotherco/lambda_vm/releases/download/bench-fixtures-v1/cache_mainnet_25368371.json @@ -499,7 +503,8 @@ regen-ethrex-fixtures: cd tooling/ethrex-fixtures && \ cargo run --release -- 0 ../../executor/tests/ethrex_empty_block.bin && \ cargo run --release -- 1 ../../executor/tests/ethrex_simple_tx.bin && \ - cargo run --release -- 10 ../../executor/tests/ethrex_10_transfers.bin + cargo run --release -- 10 ../../executor/tests/ethrex_10_transfers.bin && \ + cargo run --release -- 4 ../../executor/tests/ethrex_bench_4.bin distinct $(MAKE) update-ethrex-fixture-checksums update-ethrex-fixture-checksums: diff --git a/crypto/ethrex-crypto/Cargo.lock b/crypto/ethrex-crypto/Cargo.lock index ec809fff9..8747b05a0 100644 --- a/crypto/ethrex-crypto/Cargo.lock +++ b/crypto/ethrex-crypto/Cargo.lock @@ -168,18 +168,6 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" -[[package]] -name = "bitvec" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddcec3d12c579d40898fe0a9a358a803c23e9c52ca3c425707f81c9436211837" -dependencies = [ - "funty", - "radium", - "tap", - "wyz", -] - [[package]] name = "block-buffer" version = "0.10.4" @@ -189,19 +177,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "bls12_381" -version = "0.8.0" -source = "git+https://github.com/lambdaclass/bls12_381?branch=expose-affine-constructors#78cad0378b17fc3157b83f514be192bf46edf9a1" -dependencies = [ - "digest", - "ff", - "group", - "pairing", - "rand_core 0.6.4", - "subtle", -] - [[package]] name = "byteorder" version = "1.5.0" @@ -391,15 +366,13 @@ dependencies = [ [[package]] name = "ethrex-crypto" -version = "13.0.0" -source = "git+https://github.com/lambdaclass/ethrex.git?rev=156cb8d6a3974f411d71622eecd1b249ee37ff1c#156cb8d6a3974f411d71622eecd1b249ee37ff1c" +version = "22.0.0" +source = "git+https://github.com/lambdaclass/ethrex.git?rev=4f658c2b3d10e3f21d35ce546870f55ca3f940fc#4f658c2b3d10e3f21d35ce546870f55ca3f940fc" dependencies = [ "ark-bn254", "ark-ec", "ark-ff", - "bls12_381", "ethereum-types", - "ff", "hex-literal", "k256", "num-bigint", @@ -416,7 +389,6 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393" dependencies = [ - "bitvec", "rand_core 0.6.4", "subtle", ] @@ -438,12 +410,6 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" -[[package]] -name = "funty" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" - [[package]] name = "generic-array" version = "0.14.9" @@ -636,15 +602,6 @@ dependencies = [ "sha2", ] -[[package]] -name = "pairing" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fec4625e73cf41ef4bb6846cafa6d44736525f442ba45e407c4a000a13996f" -dependencies = [ - "group", -] - [[package]] name = "paste" version = "1.0.15" @@ -703,12 +660,6 @@ version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" -[[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.6" @@ -919,12 +870,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "tap" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" - [[package]] name = "thiserror" version = "1.0.69" @@ -1031,15 +976,6 @@ version = "0.57.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" -[[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.8.52" diff --git a/crypto/ethrex-crypto/Cargo.toml b/crypto/ethrex-crypto/Cargo.toml index ea6c91074..5310c00b0 100644 --- a/crypto/ethrex-crypto/Cargo.toml +++ b/crypto/ethrex-crypto/Cargo.toml @@ -18,7 +18,7 @@ license = "MIT OR Apache-2.0" # Defines the `Crypto` trait, `CryptoError`, and `keccak::keccak_hash`. Same rev # + `default-features = false` as the guest's ethrex-crypto, so feature # unification adds nothing to the guest build (no C secp256k1 / malachite / kzg). -ethrex-crypto = { git = "https://github.com/lambdaclass/ethrex.git", rev = "156cb8d6a3974f411d71622eecd1b249ee37ff1c", package = "ethrex-crypto", default-features = false } +ethrex-crypto = { git = "https://github.com/lambdaclass/ethrex.git", rev = "4f658c2b3d10e3f21d35ce546870f55ca3f940fc", package = "ethrex-crypto", default-features = false } # Pinned to the exact 0.13.4 ethrex uses so the guest resolves a single k256 # (a version split would make `FieldElement`/`Scalar` incompatible types). # `expose-field` is required by the x-only reconstruction. diff --git a/executor/programs/rust/ethrex/Cargo.lock b/executor/programs/rust/ethrex/Cargo.lock index e1674f74f..df0a1bb6f 100644 --- a/executor/programs/rust/ethrex/Cargo.lock +++ b/executor/programs/rust/ethrex/Cargo.lock @@ -721,8 +721,8 @@ dependencies = [ [[package]] name = "ethrex-common" -version = "13.0.0" -source = "git+https://github.com/lambdaclass/ethrex.git?rev=156cb8d6a3974f411d71622eecd1b249ee37ff1c#156cb8d6a3974f411d71622eecd1b249ee37ff1c" +version = "22.0.0" +source = "git+https://github.com/lambdaclass/ethrex.git?rev=4f658c2b3d10e3f21d35ce546870f55ca3f940fc#4f658c2b3d10e3f21d35ce546870f55ca3f940fc" dependencies = [ "bytes", "crc32fast", @@ -749,17 +749,16 @@ dependencies = [ [[package]] name = "ethrex-crypto" -version = "13.0.0" -source = "git+https://github.com/lambdaclass/ethrex.git?rev=156cb8d6a3974f411d71622eecd1b249ee37ff1c#156cb8d6a3974f411d71622eecd1b249ee37ff1c" +version = "22.0.0" +source = "git+https://github.com/lambdaclass/ethrex.git?rev=4f658c2b3d10e3f21d35ce546870f55ca3f940fc#4f658c2b3d10e3f21d35ce546870f55ca3f940fc" dependencies = [ "ark-bn254", "ark-ec", "ark-ff", - "bls12_381", "ethereum-types", - "ff", "hex-literal", "k256", + "malachite", "num-bigint", "p256", "ripemd", @@ -770,9 +769,10 @@ dependencies = [ [[package]] name = "ethrex-guest-program" -version = "13.0.0" -source = "git+https://github.com/lambdaclass/ethrex.git?rev=156cb8d6a3974f411d71622eecd1b249ee37ff1c#156cb8d6a3974f411d71622eecd1b249ee37ff1c" +version = "22.0.0" +source = "git+https://github.com/lambdaclass/ethrex.git?rev=4f658c2b3d10e3f21d35ce546870f55ca3f940fc#4f658c2b3d10e3f21d35ce546870f55ca3f940fc" dependencies = [ + "bls12_381", "bytes", "ethereum-types", "ethrex-common", @@ -780,6 +780,7 @@ dependencies = [ "ethrex-l2-common", "ethrex-rlp", "ethrex-vm", + "ff", "hex", "k256", "lambda-vm-syscalls", @@ -791,8 +792,8 @@ dependencies = [ [[package]] name = "ethrex-l2-common" -version = "13.0.0" -source = "git+https://github.com/lambdaclass/ethrex.git?rev=156cb8d6a3974f411d71622eecd1b249ee37ff1c#156cb8d6a3974f411d71622eecd1b249ee37ff1c" +version = "22.0.0" +source = "git+https://github.com/lambdaclass/ethrex.git?rev=4f658c2b3d10e3f21d35ce546870f55ca3f940fc#4f658c2b3d10e3f21d35ce546870f55ca3f940fc" dependencies = [ "bytes", "ethereum-types", @@ -810,8 +811,8 @@ dependencies = [ [[package]] name = "ethrex-levm" -version = "13.0.0" -source = "git+https://github.com/lambdaclass/ethrex.git?rev=156cb8d6a3974f411d71622eecd1b249ee37ff1c#156cb8d6a3974f411d71622eecd1b249ee37ff1c" +version = "22.0.0" +source = "git+https://github.com/lambdaclass/ethrex.git?rev=4f658c2b3d10e3f21d35ce546870f55ca3f940fc#4f658c2b3d10e3f21d35ce546870f55ca3f940fc" dependencies = [ "bytes", "derive_more", @@ -827,8 +828,8 @@ dependencies = [ [[package]] name = "ethrex-rlp" -version = "13.0.0" -source = "git+https://github.com/lambdaclass/ethrex.git?rev=156cb8d6a3974f411d71622eecd1b249ee37ff1c#156cb8d6a3974f411d71622eecd1b249ee37ff1c" +version = "22.0.0" +source = "git+https://github.com/lambdaclass/ethrex.git?rev=4f658c2b3d10e3f21d35ce546870f55ca3f940fc#4f658c2b3d10e3f21d35ce546870f55ca3f940fc" dependencies = [ "bytes", "ethereum-types", @@ -837,8 +838,8 @@ dependencies = [ [[package]] name = "ethrex-trie" -version = "13.0.0" -source = "git+https://github.com/lambdaclass/ethrex.git?rev=156cb8d6a3974f411d71622eecd1b249ee37ff1c#156cb8d6a3974f411d71622eecd1b249ee37ff1c" +version = "22.0.0" +source = "git+https://github.com/lambdaclass/ethrex.git?rev=4f658c2b3d10e3f21d35ce546870f55ca3f940fc#4f658c2b3d10e3f21d35ce546870f55ca3f940fc" dependencies = [ "anyhow", "bytes", @@ -846,18 +847,19 @@ dependencies = [ "ethereum-types", "ethrex-crypto", "ethrex-rlp", - "lazy_static", + "hashbrown 0.15.5", "rayon", "rkyv", "rustc-hash", "serde", + "spin", "thiserror 2.0.18", ] [[package]] name = "ethrex-vm" -version = "13.0.0" -source = "git+https://github.com/lambdaclass/ethrex.git?rev=156cb8d6a3974f411d71622eecd1b249ee37ff1c#156cb8d6a3974f411d71622eecd1b249ee37ff1c" +version = "22.0.0" +source = "git+https://github.com/lambdaclass/ethrex.git?rev=4f658c2b3d10e3f21d35ce546870f55ca3f940fc#4f658c2b3d10e3f21d35ce546870f55ca3f940fc" dependencies = [ "bytes", "derive_more", @@ -2047,6 +2049,12 @@ version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" +[[package]] +name = "spin" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3763264f6b73151db08c50ff20d7d8a0b8796e021cdea7ceedad07b80155fa0e" + [[package]] name = "spki" version = "0.7.3" diff --git a/executor/programs/rust/ethrex/Cargo.toml b/executor/programs/rust/ethrex/Cargo.toml index 4922712dd..58d63cd5f 100644 --- a/executor/programs/rust/ethrex/Cargo.toml +++ b/executor/programs/rust/ethrex/Cargo.toml @@ -25,13 +25,16 @@ lambda-vm-ethrex-crypto = { path = "../../../../crypto/ethrex-crypto" } # crypto defaults); ethrex's own `LambdaVmCrypto` compiles unused — we inject our # own. KZG is NOT linked under this feature, so the point-evaluation precompile # (0x0a) is unsupported — see src/main.rs. -ethrex-guest-program = { git = "https://github.com/lambdaclass/ethrex.git", rev = "156cb8d6a3974f411d71622eecd1b249ee37ff1c", package = "ethrex-guest-program", default-features = false, features = ["lambdavm"] } +ethrex-guest-program = { git = "https://github.com/lambdaclass/ethrex.git", rev = "4f658c2b3d10e3f21d35ce546870f55ca3f940fc", package = "ethrex-guest-program", default-features = false, features = ["lambdavm"] } # Exact pin: must match the fixture writer (tooling/ethrex-fixtures) and the # executor test reader so the rkyv ProgramInput layout stays consistent. rkyv = { version = "=0.8.16", features = ["std", "unaligned"] } -# `ethrex-guest-program`'s `lambdavm` feature pins `lambda-vm-syscalls` to an -# older commit. Override it with our working-tree copy so the guest links our -# current syscalls (keccak_permute + the Print-ecall no-op fix). +# `ethrex-guest-program`'s `lambdavm` feature git-deps `lambda-vm-syscalls` at a +# pinned commit of THIS repo, which upstream bumps on its own schedule. Override it +# with the working-tree copy so the guest always links the same syscalls as the rest +# of the repo — including uncommitted local edits — rather than whatever commit +# ethrex last pinned. (At the current ethrex rev the two happen to coincide; this +# override is what keeps that coincidence from being load-bearing.) [patch."https://github.com/yetanotherco/lambda_vm.git"] lambda-vm-syscalls = { path = "../../../../syscalls" } diff --git a/executor/tests/README.md b/executor/tests/README.md index fdbf47bcb..ae35e6135 100644 --- a/executor/tests/README.md +++ b/executor/tests/README.md @@ -15,7 +15,7 @@ merges to `main`): ```text https://github.com/lambdaclass/ethrex.git -156cb8d6a3974f411d71622eecd1b249ee37ff1c +4f658c2b3d10e3f21d35ce546870f55ca3f940fc ``` ### Generation @@ -30,8 +30,15 @@ cd tooling/ethrex-fixtures cargo run --release -- 0 ../../executor/tests/ethrex_empty_block.bin # empty block cargo run --release -- 1 ../../executor/tests/ethrex_simple_tx.bin # 1 transfer cargo run --release -- 10 ../../executor/tests/ethrex_10_transfers.bin # 10 transfers +cargo run --release -- 4 ../../executor/tests/ethrex_bench_4.bin distinct # recursion profile ``` +`ethrex_bench_4.bin` is the odd one out: `distinct` mode, and it is read by the +recursion profile target rather than the executor tests (see the Makefile's +`recursion-profile-block-input`). It is committed like the rest, so it is +regenerated and checksummed with them — a rev bump makes every one of these +undecodable, not just the three the executor reads. + To regenerate after an ethrex rev bump, update the `rev` in `tooling/ethrex-fixtures/Cargo.toml` (and the guest's), then run `make regen-ethrex-fixtures` from the repo root. The target rebuilds the @@ -41,16 +48,21 @@ Known fixtures: ```text ethrex_empty_block.bin - sha256: d3e594f07cc74e4ddc9db9e9db220a65a2d2e578b619fc3ce06e346007b3ca43 + sha256: ca7454142f13db5d04356366e3917d264cbea709ddd1b5e6526720dbaa12064d contents: stateless ethrex empty block ProgramInput (0 transactions) ethrex_simple_tx.bin - sha256: 15e3b3efa434186682537755d828ac8bbdde4be3fc7cbe34f26687b618a6c6ab + sha256: 29c1607297d21d88accb33767c8e03eb6536d746e6b2399930afdc9d67f1fe3f contents: stateless ethrex block with one plain ETH transfer transaction ethrex_10_transfers.bin - sha256: 38901ee4d40b99cf0aa7f642a92f0fc8db76d974bf43033a1673839020c3c28e + sha256: d04cfed35bd16c8248ab8ebf2f3ca2ff01c08269271b17e5d5db3b1f22ea03ad contents: stateless ethrex block with ten plain ETH transfer transactions + +ethrex_bench_4.bin + sha256: bb26e6d6595f537c2fd57bfd59da6abe82241bd92690a21c2225da94d5cf507a + contents: stateless ethrex block with four plain ETH transfers, `distinct` mode + (N senders -> N recipients); read by the recursion profile target ``` ## Real-block fixtures @@ -58,7 +70,7 @@ ethrex_10_transfers.bin The blocks above are synthetic (N plain ETH transfers over a small genesis). For a representative workload — real contract execution, real trie depth, real bytecode — `make ethrex-real-block-fixture` downloads -`ethrex_mainnet_25368371.bin` (1,110,156 B) from the `bench-fixtures-v1` release +`ethrex_mainnet_25368371.bin` (1,110,165 B) from the `bench-fixtures-v1` release and verifies it against `ETHREX_REAL_BLOCK_FIXTURE_SHA256` in the Makefile before moving it into place. It is gitignored rather than committed, so the checksum lives next to the URL in the Makefile rather than in the table above (the checksum diff --git a/executor/tests/ethrex_10_transfers.bin b/executor/tests/ethrex_10_transfers.bin index 8b6c89182..dd9303cfe 100644 Binary files a/executor/tests/ethrex_10_transfers.bin and b/executor/tests/ethrex_10_transfers.bin differ diff --git a/executor/tests/ethrex_bench_4.bin b/executor/tests/ethrex_bench_4.bin index 45fe93038..6b716bfc9 100644 Binary files a/executor/tests/ethrex_bench_4.bin and b/executor/tests/ethrex_bench_4.bin differ diff --git a/executor/tests/ethrex_empty_block.bin b/executor/tests/ethrex_empty_block.bin index e942b0c78..3fcb87a3d 100644 Binary files a/executor/tests/ethrex_empty_block.bin and b/executor/tests/ethrex_empty_block.bin differ diff --git a/executor/tests/ethrex_simple_tx.bin b/executor/tests/ethrex_simple_tx.bin index 5a528b661..3c1af589a 100644 Binary files a/executor/tests/ethrex_simple_tx.bin and b/executor/tests/ethrex_simple_tx.bin differ diff --git a/tooling/ethrex-block-converter/Cargo.lock b/tooling/ethrex-block-converter/Cargo.lock index a8268a857..ca8f6b2cc 100644 --- a/tooling/ethrex-block-converter/Cargo.lock +++ b/tooling/ethrex-block-converter/Cargo.lock @@ -883,6 +883,7 @@ version = "0.1.0" dependencies = [ "ethrex-common", "ethrex-config", + "ethrex-crypto", "ethrex-guest-program", "k256", "lambda-vm-ethrex-crypto", @@ -894,8 +895,8 @@ dependencies = [ [[package]] name = "ethrex-blockchain" -version = "13.0.0" -source = "git+https://github.com/lambdaclass/ethrex.git?rev=156cb8d6a3974f411d71622eecd1b249ee37ff1c#156cb8d6a3974f411d71622eecd1b249ee37ff1c" +version = "22.0.0" +source = "git+https://github.com/lambdaclass/ethrex.git?rev=4f658c2b3d10e3f21d35ce546870f55ca3f940fc#4f658c2b3d10e3f21d35ce546870f55ca3f940fc" dependencies = [ "bytes", "crossbeam", @@ -916,8 +917,8 @@ dependencies = [ [[package]] name = "ethrex-common" -version = "13.0.0" -source = "git+https://github.com/lambdaclass/ethrex.git?rev=156cb8d6a3974f411d71622eecd1b249ee37ff1c#156cb8d6a3974f411d71622eecd1b249ee37ff1c" +version = "22.0.0" +source = "git+https://github.com/lambdaclass/ethrex.git?rev=4f658c2b3d10e3f21d35ce546870f55ca3f940fc#4f658c2b3d10e3f21d35ce546870f55ca3f940fc" dependencies = [ "bytes", "crc32fast", @@ -944,8 +945,8 @@ dependencies = [ [[package]] name = "ethrex-config" -version = "13.0.0" -source = "git+https://github.com/lambdaclass/ethrex.git?rev=156cb8d6a3974f411d71622eecd1b249ee37ff1c#156cb8d6a3974f411d71622eecd1b249ee37ff1c" +version = "22.0.0" +source = "git+https://github.com/lambdaclass/ethrex.git?rev=4f658c2b3d10e3f21d35ce546870f55ca3f940fc#4f658c2b3d10e3f21d35ce546870f55ca3f940fc" dependencies = [ "ethrex-common", "ethrex-p2p", @@ -956,16 +957,14 @@ dependencies = [ [[package]] name = "ethrex-crypto" -version = "13.0.0" -source = "git+https://github.com/lambdaclass/ethrex.git?rev=156cb8d6a3974f411d71622eecd1b249ee37ff1c#156cb8d6a3974f411d71622eecd1b249ee37ff1c" +version = "22.0.0" +source = "git+https://github.com/lambdaclass/ethrex.git?rev=4f658c2b3d10e3f21d35ce546870f55ca3f940fc#4f658c2b3d10e3f21d35ce546870f55ca3f940fc" dependencies = [ "ark-bn254", "ark-ec", "ark-ff", - "bls12_381", "c-kzg", "ethereum-types", - "ff", "hex-literal", "k256", "malachite", @@ -979,9 +978,10 @@ dependencies = [ [[package]] name = "ethrex-guest-program" -version = "13.0.0" -source = "git+https://github.com/lambdaclass/ethrex.git?rev=156cb8d6a3974f411d71622eecd1b249ee37ff1c#156cb8d6a3974f411d71622eecd1b249ee37ff1c" +version = "22.0.0" +source = "git+https://github.com/lambdaclass/ethrex.git?rev=4f658c2b3d10e3f21d35ce546870f55ca3f940fc#4f658c2b3d10e3f21d35ce546870f55ca3f940fc" dependencies = [ + "bls12_381", "bytes", "ethereum-types", "ethrex-common", @@ -989,6 +989,7 @@ dependencies = [ "ethrex-l2-common", "ethrex-rlp", "ethrex-vm", + "ff", "hex", "k256", "lambda-vm-syscalls", @@ -1000,8 +1001,8 @@ dependencies = [ [[package]] name = "ethrex-l2-common" -version = "13.0.0" -source = "git+https://github.com/lambdaclass/ethrex.git?rev=156cb8d6a3974f411d71622eecd1b249ee37ff1c#156cb8d6a3974f411d71622eecd1b249ee37ff1c" +version = "22.0.0" +source = "git+https://github.com/lambdaclass/ethrex.git?rev=4f658c2b3d10e3f21d35ce546870f55ca3f940fc#4f658c2b3d10e3f21d35ce546870f55ca3f940fc" dependencies = [ "bytes", "ethereum-types", @@ -1019,8 +1020,8 @@ dependencies = [ [[package]] name = "ethrex-levm" -version = "13.0.0" -source = "git+https://github.com/lambdaclass/ethrex.git?rev=156cb8d6a3974f411d71622eecd1b249ee37ff1c#156cb8d6a3974f411d71622eecd1b249ee37ff1c" +version = "22.0.0" +source = "git+https://github.com/lambdaclass/ethrex.git?rev=4f658c2b3d10e3f21d35ce546870f55ca3f940fc#4f658c2b3d10e3f21d35ce546870f55ca3f940fc" dependencies = [ "bytes", "derive_more", @@ -1036,8 +1037,8 @@ dependencies = [ [[package]] name = "ethrex-metrics" -version = "13.0.0" -source = "git+https://github.com/lambdaclass/ethrex.git?rev=156cb8d6a3974f411d71622eecd1b249ee37ff1c#156cb8d6a3974f411d71622eecd1b249ee37ff1c" +version = "22.0.0" +source = "git+https://github.com/lambdaclass/ethrex.git?rev=4f658c2b3d10e3f21d35ce546870f55ca3f940fc#4f658c2b3d10e3f21d35ce546870f55ca3f940fc" dependencies = [ "ethrex-common", "serde", @@ -1048,8 +1049,8 @@ dependencies = [ [[package]] name = "ethrex-p2p" -version = "13.0.0" -source = "git+https://github.com/lambdaclass/ethrex.git?rev=156cb8d6a3974f411d71622eecd1b249ee37ff1c#156cb8d6a3974f411d71622eecd1b249ee37ff1c" +version = "22.0.0" +source = "git+https://github.com/lambdaclass/ethrex.git?rev=4f658c2b3d10e3f21d35ce546870f55ca3f940fc#4f658c2b3d10e3f21d35ce546870f55ca3f940fc" dependencies = [ "aes", "aes-gcm", @@ -1090,8 +1091,8 @@ dependencies = [ [[package]] name = "ethrex-rlp" -version = "13.0.0" -source = "git+https://github.com/lambdaclass/ethrex.git?rev=156cb8d6a3974f411d71622eecd1b249ee37ff1c#156cb8d6a3974f411d71622eecd1b249ee37ff1c" +version = "22.0.0" +source = "git+https://github.com/lambdaclass/ethrex.git?rev=4f658c2b3d10e3f21d35ce546870f55ca3f940fc#4f658c2b3d10e3f21d35ce546870f55ca3f940fc" dependencies = [ "bytes", "ethereum-types", @@ -1100,8 +1101,8 @@ dependencies = [ [[package]] name = "ethrex-storage" -version = "13.0.0" -source = "git+https://github.com/lambdaclass/ethrex.git?rev=156cb8d6a3974f411d71622eecd1b249ee37ff1c#156cb8d6a3974f411d71622eecd1b249ee37ff1c" +version = "22.0.0" +source = "git+https://github.com/lambdaclass/ethrex.git?rev=4f658c2b3d10e3f21d35ce546870f55ca3f940fc#4f658c2b3d10e3f21d35ce546870f55ca3f940fc" dependencies = [ "anyhow", "bytes", @@ -1122,8 +1123,8 @@ dependencies = [ [[package]] name = "ethrex-trie" -version = "13.0.0" -source = "git+https://github.com/lambdaclass/ethrex.git?rev=156cb8d6a3974f411d71622eecd1b249ee37ff1c#156cb8d6a3974f411d71622eecd1b249ee37ff1c" +version = "22.0.0" +source = "git+https://github.com/lambdaclass/ethrex.git?rev=4f658c2b3d10e3f21d35ce546870f55ca3f940fc#4f658c2b3d10e3f21d35ce546870f55ca3f940fc" dependencies = [ "anyhow", "bytes", @@ -1131,18 +1132,19 @@ dependencies = [ "ethereum-types", "ethrex-crypto", "ethrex-rlp", - "lazy_static", + "hashbrown 0.15.5", "rayon", "rkyv", "rustc-hash", "serde", + "spin", "thiserror 2.0.19", ] [[package]] name = "ethrex-vm" -version = "13.0.0" -source = "git+https://github.com/lambdaclass/ethrex.git?rev=156cb8d6a3974f411d71622eecd1b249ee37ff1c#156cb8d6a3974f411d71622eecd1b249ee37ff1c" +version = "22.0.0" +source = "git+https://github.com/lambdaclass/ethrex.git?rev=4f658c2b3d10e3f21d35ce546870f55ca3f940fc#4f658c2b3d10e3f21d35ce546870f55ca3f940fc" dependencies = [ "bytes", "derive_more", @@ -2725,6 +2727,12 @@ dependencies = [ "tracing-subscriber", ] +[[package]] +name = "spin" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3763264f6b73151db08c50ff20d7d8a0b8796e021cdea7ceedad07b80155fa0e" + [[package]] name = "spki" version = "0.7.3" diff --git a/tooling/ethrex-block-converter/Cargo.toml b/tooling/ethrex-block-converter/Cargo.toml index f61e68a68..87550cd8a 100644 --- a/tooling/ethrex-block-converter/Cargo.toml +++ b/tooling/ethrex-block-converter/Cargo.toml @@ -9,8 +9,13 @@ edition = "2024" [dependencies] # Pinned to the SAME ethrex rev as the guest (open LambdaVM-backend PR branch) # so the generated ProgramInput rkyv layout matches what the guest deserializes. -ethrex-common = { git = "https://github.com/lambdaclass/ethrex.git", rev = "156cb8d6a3974f411d71622eecd1b249ee37ff1c", package = "ethrex-common", default-features = false } -ethrex-config = { git = "https://github.com/lambdaclass/ethrex.git", rev = "156cb8d6a3974f411d71622eecd1b249ee37ff1c", package = "ethrex-config", default-features = false } +ethrex-common = { git = "https://github.com/lambdaclass/ethrex.git", rev = "4f658c2b3d10e3f21d35ce546870f55ca3f940fc", package = "ethrex-common", default-features = false } +ethrex-config = { git = "https://github.com/lambdaclass/ethrex.git", rev = "4f658c2b3d10e3f21d35ce546870f55ca3f940fc", package = "ethrex-config", default-features = false } +# Only for `NativeCrypto`, the host `Crypto` impl that `into_execution_witness` +# now takes. Nothing re-exports it, and this crate's own guest-crypto impl is a +# dev-dependency, so the bin build needs its own line. Already in the graph via +# `ethrex-config` → `ethrex-p2p`, so this adds no compilation. +ethrex-crypto = { git = "https://github.com/lambdaclass/ethrex.git", rev = "4f658c2b3d10e3f21d35ce546870f55ca3f940fc", package = "ethrex-crypto", default-features = false } # Matches the guest's own declaration (executor/programs/rust/ethrex/Cargo.toml). # # CAVEAT: this line alone does NOT reproduce the guest's precompile surface. The @@ -21,7 +26,7 @@ ethrex-config = { git = "https://github.com/lambdaclass/ethrex.git", rev = "156c # `ark-ff/asm` BN254) that the guest does not have; verify with # `cargo tree -e features -i ethrex-crypto`. Closing that gap means dropping # `ethrex-config` and sourcing `ChainConfig` another way — see the README. -ethrex-guest-program = { git = "https://github.com/lambdaclass/ethrex.git", rev = "156cb8d6a3974f411d71622eecd1b249ee37ff1c", package = "ethrex-guest-program", default-features = false, features = ["lambdavm"] } +ethrex-guest-program = { git = "https://github.com/lambdaclass/ethrex.git", rev = "4f658c2b3d10e3f21d35ce546870f55ca3f940fc", package = "ethrex-guest-program", default-features = false, features = ["lambdavm"] } # Exact pin: the fixture writer and the guest/executor readers must agree on the # rkyv layout. Keep this in sync with the guest @@ -55,7 +60,8 @@ lambda-vm-ethrex-crypto = { path = "../../crypto/ethrex-crypto" } # one can stay a dev-dependency without forcing the rebuild described above. sha2 = "0.10" -# `ethrex-guest-program`'s `lambdavm` feature pins `lambda-vm-syscalls` to an -# older commit; override it with our working-tree copy, as the guest does. +# `ethrex-guest-program`'s `lambdavm` feature git-deps `lambda-vm-syscalls` at a +# pinned commit of this repo; override it with the working-tree copy, as the guest +# does, so both resolve the same syscalls. [patch."https://github.com/yetanotherco/lambda_vm.git"] lambda-vm-syscalls = { path = "../../syscalls" } diff --git a/tooling/ethrex-block-converter/README.md b/tooling/ethrex-block-converter/README.md index 17cf8a2f8..268d6a0fb 100644 --- a/tooling/ethrex-block-converter/README.md +++ b/tooling/ethrex-block-converter/README.md @@ -88,11 +88,18 @@ Artifacts live in the **[`bench-fixtures-v1`][release]** release on | asset | sha256 | read by | |---|---|---| -| `ethrex_mainnet_25368371.bin` | `61eba49b…` | every benchmark (**current default**) | +| `ethrex_mainnet_25368371.bin` | `0a301731…` | every benchmark (**current default**) | | `cache_mainnet_25368371.json` | `7aa88a5f…` | `regen-real-block-fixture` | | `ethrex_mainnet_25453112.bin` | `0298663d…` | alternate candidate | | `cache_mainnet_25453112.json` | `20ffbbc1…` | alternate candidate | +> **Re-upload pending.** The `0a301731…` above is what the Makefile verifies against +> after the ethrex `4f658c2b` bump, which moved the rkyv layout and so changed the +> fixture bytes. The hosted asset still carries the pre-bump `61eba49b…` until it is +> replaced in the release, so `make ethrex-real-block-fixture` fails its checksum on a +> clean checkout in the meantime — loudly, which is the designed failure mode. Only the +> `.bin` is stale; the caches are inputs and are unaffected. + Each block has two assets: the fixture and the **cache** it was converted from (`make ethrex-real-block-cache`, ~2 MB, same verify-then-move contract). Only `regen-real-block-fixture` reads the cache. Note it is *not* the cache the @@ -130,12 +137,15 @@ cargo run --release -- Output is deterministic for a given cache file: ```text -wrote ../../executor/tests/ethrex_mainnet_25368371.bin (1110156 bytes): 1 block(s) \ +wrote ../../executor/tests/ethrex_mainnet_25368371.bin (1110165 bytes): 1 block(s) \ from mainnet starting at #25368371, 29 transaction(s), 2428684 gas ``` -Verified: regenerating from the hosted cache reproduces `61eba49b…` byte for byte, -which is what proves the hosted `.bin` and the hosted cache describe the same block. +Verified at the current ethrex rev: regenerating from the hosted cache reproduces +`0a301731…` byte for byte, and the result passes `test_ethrex_real_block_native` — +which is what proves the hosted cache and the fixture the Makefile expects describe +the same block. (Byte count and digest are both rev-dependent: the `4f658c2b` bump +moved them from 1,110,156 B / `61eba49b…`, the bytes still hosted in the release.) The converter's `conversion_is_reproducible` test enforces the same property, but against its own pinned block rather than this one — see [Validation](#validation). @@ -350,6 +360,15 @@ current default), so sizing a candidate from its gas mispredicts cost. **Current default — main-vintage (merge `fdb92f67`, main @ `9ccdaf2`):** +These figures were measured on the pre-bump fixture (`61eba49b…`, 1,110,156 B) and are +left as measured rather than restamped. The ethrex `4f658c2b` bump changed the fixture +bytes, so they are a baseline for a workload that no longer exists byte-for-byte. + +Post-bump CPU counterparts, measured ABBA on `vm-benchmarks-1` at the same epoch 2^22 +(see `ETHREX_BUMP_CYCLE_RESULTS.md`): **45,074,552 cycles** (−11.24%), **142.37 s** CPU +prove (−10.87%), **936.7 MB** proof (−12.22%), peak RSS flat at ~48 GB. The GPU column +has no post-bump counterpart yet. + | block | gas | cycles | GPU prove (RTX 5090) | CPU prove | proof | fixture | |---|---|---|---|---|---|---| | **mainnet 25368371** | 2.43M | **50,781,557** (clang 21)
50,713,534 (clang 18) | **59.87 s** @ epoch 2^22 | **158.8 s** @ epoch 2^22 (2.65x the GPU wall) | 1.15 GB CPU / 1.12 GB GPU | 1,110,156 B, `61eba49b…` | @@ -452,10 +471,16 @@ first run after a repoint reports one-sided numbers until main republishes. ## Why the JSON and not ethrex-replay's own `.bin` `ethrex-replay` can already emit a rkyv `ProgramInput`, but it tracks ethrex -`main`, where the type has diverged from the rev our guest pins -(`156cb8d6…`): `main` has an extra `fee_configs` field, moved the type from -`l1::` to `input::`, and uses rkyv 0.8.10 against our exact `=0.8.16`. Its -binary would not deserialize in our guest. +`main` while we pin a branch off it, and the type has diverged between the two +before: against the previously pinned rev (`156cb8d6…`) `main` carried an extra +`fee_configs` field and had moved the type from `l1::` to `input::`, so replay's +binary would not deserialize in our guest at all. + +At the currently pinned rev (`4f658c2b…`, rebased onto recent `main`) the +`ProgramInput` definition matches `main`'s again, and that gap has closed for +now. What has not closed: replay resolves rkyv itself from ethrex's `^0.8.10` +rather than our exact `=0.8.16`, `main` has no `lambdavm` feature to build the +guest side against, and the next bump can reopen the type gap without warning. The cache JSON carries only `blocks` + `witness` + `network` as plain serde, so it survives that drift. This tool re-reads it with **our** pinned ethrex types diff --git a/tooling/ethrex-block-converter/src/main.rs b/tooling/ethrex-block-converter/src/main.rs index f96b03f24..545c7cc6e 100644 --- a/tooling/ethrex-block-converter/src/main.rs +++ b/tooling/ethrex-block-converter/src/main.rs @@ -5,18 +5,23 @@ //! cargo run --release -- use ethrex_common::types::Block; -use ethrex_common::types::block_execution_witness::RpcExecutionWitness; +use ethrex_common::types::block_execution_witness::{RpcExecutionWitness, decode_witness_headers}; use ethrex_config::networks::Network; +use ethrex_crypto::NativeCrypto; use ethrex_guest_program::l1::ProgramInput; use serde::Deserialize; /// The subset of `ethrex-replay`'s on-disk cache that a `ProgramInput` needs. /// /// Deliberately deserialized with *our* pinned ethrex types rather than by -/// depending on `ethrex-replay`: it tracks ethrex `main`, where `ProgramInput` -/// has diverged (extra `fee_configs` field, different module path, rkyv 0.8.10 -/// vs our `=0.8.16`), so its own `.bin` output would not deserialize in our -/// guest. This JSON is the version-tolerant interface between the two. +/// depending on `ethrex-replay`: it tracks ethrex `main`, we pin a branch off it, +/// and `ProgramInput` has diverged between the two before (it once carried an +/// extra `fee_configs` field and lived at a different module path). At the +/// currently pinned rev the type happens to match `main`'s again, but replay +/// still resolves rkyv itself from ethrex's `^0.8.10` against our exact `=0.8.16`, +/// and nothing stops the type drifting apart on the next bump. This JSON carries +/// only `blocks` + `witness` + `network` as plain serde, so it is the +/// version-tolerant interface between the two regardless. /// /// Extra fields in the file (L2 blob data, custom `chain_config`) are ignored. #[derive(Deserialize)] @@ -70,10 +75,19 @@ fn program_input_from_cache( // `into_execution_witness` rebuilds the trie structures from the flat node // list and needs the parent header, which the cache carries inside `witness`. + // Those headers are now decoded by the caller rather than inside the call, and + // the `Crypto` argument is what recomputes the block hashes the parent lookup + // matches on. `NativeCrypto` is keccak-only here, so it produces the same bytes + // as the `LambdaVmEcsmCrypto` the guest injects (whose host path is also + // software keccak) — the fixture does not depend on which one converts it. let chain_config = cache.network.get_genesis()?.config; - let witness = cache - .witness - .into_execution_witness(chain_config, summary.first_block_number)?; + let decoded_headers = decode_witness_headers(&cache.witness.headers)?; + let witness = cache.witness.into_execution_witness( + chain_config, + summary.first_block_number, + &decoded_headers, + &NativeCrypto, + )?; Ok((ProgramInput::new(cache.blocks, witness), summary)) } @@ -216,7 +230,7 @@ mod tests { .map(|b| format!("{b:02x}")) .collect(); assert_eq!( - digest, "1f7d4c4cdf9bd52472d9ebafdb4038f57a88c3c92d65c96fd86d7e323db87142", + digest, "6ffc80b25ec9ed3c203c35bdb8a4a05aff08d98b1a9c71648447bc199a552dc9", "fixture bytes changed — regenerate it and update the README checksum", ); } diff --git a/tooling/ethrex-fixtures/Cargo.lock b/tooling/ethrex-fixtures/Cargo.lock index 8d671d94c..1702880a9 100644 --- a/tooling/ethrex-fixtures/Cargo.lock +++ b/tooling/ethrex-fixtures/Cargo.lock @@ -389,19 +389,6 @@ dependencies = [ "objc2", ] -[[package]] -name = "bls12_381" -version = "0.8.0" -source = "git+https://github.com/lambdaclass/bls12_381?branch=expose-affine-constructors#78cad0378b17fc3157b83f514be192bf46edf9a1" -dependencies = [ - "digest", - "ff", - "group", - "pairing", - "rand_core 0.6.4", - "subtle", -] - [[package]] name = "blst" version = "0.3.16" @@ -481,9 +468,9 @@ dependencies = [ [[package]] name = "c-kzg" -version = "2.1.7" +version = "2.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6648ed1e4ea8e8a1a4a2c78e1cda29a3fd500bc622899c340d8525ea9a76b24a" +checksum = "38d04308254695569fdb9bfe3bacc1c91837a670d0806605eb82d63748fbd3a6" dependencies = [ "blst", "cc", @@ -988,8 +975,8 @@ dependencies = [ [[package]] name = "ethrex-blockchain" -version = "13.0.0" -source = "git+https://github.com/lambdaclass/ethrex.git?rev=156cb8d6a3974f411d71622eecd1b249ee37ff1c#156cb8d6a3974f411d71622eecd1b249ee37ff1c" +version = "22.0.0" +source = "git+https://github.com/lambdaclass/ethrex.git?rev=4f658c2b3d10e3f21d35ce546870f55ca3f940fc#4f658c2b3d10e3f21d35ce546870f55ca3f940fc" dependencies = [ "bytes", "crossbeam", @@ -1010,8 +997,8 @@ dependencies = [ [[package]] name = "ethrex-common" -version = "13.0.0" -source = "git+https://github.com/lambdaclass/ethrex.git?rev=156cb8d6a3974f411d71622eecd1b249ee37ff1c#156cb8d6a3974f411d71622eecd1b249ee37ff1c" +version = "22.0.0" +source = "git+https://github.com/lambdaclass/ethrex.git?rev=4f658c2b3d10e3f21d35ce546870f55ca3f940fc#4f658c2b3d10e3f21d35ce546870f55ca3f940fc" dependencies = [ "bytes", "crc32fast", @@ -1040,16 +1027,14 @@ dependencies = [ [[package]] name = "ethrex-crypto" -version = "13.0.0" -source = "git+https://github.com/lambdaclass/ethrex.git?rev=156cb8d6a3974f411d71622eecd1b249ee37ff1c#156cb8d6a3974f411d71622eecd1b249ee37ff1c" +version = "22.0.0" +source = "git+https://github.com/lambdaclass/ethrex.git?rev=4f658c2b3d10e3f21d35ce546870f55ca3f940fc#4f658c2b3d10e3f21d35ce546870f55ca3f940fc" dependencies = [ "ark-bn254", "ark-ec", "ark-ff", - "bls12_381", "c-kzg", "ethereum-types", - "ff", "hex-literal", "k256", "malachite", @@ -1081,8 +1066,8 @@ dependencies = [ [[package]] name = "ethrex-guest-program" -version = "13.0.0" -source = "git+https://github.com/lambdaclass/ethrex.git?rev=156cb8d6a3974f411d71622eecd1b249ee37ff1c#156cb8d6a3974f411d71622eecd1b249ee37ff1c" +version = "22.0.0" +source = "git+https://github.com/lambdaclass/ethrex.git?rev=4f658c2b3d10e3f21d35ce546870f55ca3f940fc#4f658c2b3d10e3f21d35ce546870f55ca3f940fc" dependencies = [ "bytes", "ethereum-types", @@ -1100,8 +1085,8 @@ dependencies = [ [[package]] name = "ethrex-l2-common" -version = "13.0.0" -source = "git+https://github.com/lambdaclass/ethrex.git?rev=156cb8d6a3974f411d71622eecd1b249ee37ff1c#156cb8d6a3974f411d71622eecd1b249ee37ff1c" +version = "22.0.0" +source = "git+https://github.com/lambdaclass/ethrex.git?rev=4f658c2b3d10e3f21d35ce546870f55ca3f940fc#4f658c2b3d10e3f21d35ce546870f55ca3f940fc" dependencies = [ "bytes", "ethereum-types", @@ -1119,8 +1104,8 @@ dependencies = [ [[package]] name = "ethrex-l2-rpc" -version = "13.0.0" -source = "git+https://github.com/lambdaclass/ethrex.git?rev=156cb8d6a3974f411d71622eecd1b249ee37ff1c#156cb8d6a3974f411d71622eecd1b249ee37ff1c" +version = "22.0.0" +source = "git+https://github.com/lambdaclass/ethrex.git?rev=4f658c2b3d10e3f21d35ce546870f55ca3f940fc#4f658c2b3d10e3f21d35ce546870f55ca3f940fc" dependencies = [ "axum", "bytes", @@ -1142,6 +1127,7 @@ dependencies = [ "serde_json", "thiserror 2.0.18", "tokio", + "tokio-util", "tower-http", "tracing", "tracing-subscriber", @@ -1150,8 +1136,8 @@ dependencies = [ [[package]] name = "ethrex-levm" -version = "13.0.0" -source = "git+https://github.com/lambdaclass/ethrex.git?rev=156cb8d6a3974f411d71622eecd1b249ee37ff1c#156cb8d6a3974f411d71622eecd1b249ee37ff1c" +version = "22.0.0" +source = "git+https://github.com/lambdaclass/ethrex.git?rev=4f658c2b3d10e3f21d35ce546870f55ca3f940fc#4f658c2b3d10e3f21d35ce546870f55ca3f940fc" dependencies = [ "bytes", "derive_more", @@ -1168,8 +1154,8 @@ dependencies = [ [[package]] name = "ethrex-metrics" -version = "13.0.0" -source = "git+https://github.com/lambdaclass/ethrex.git?rev=156cb8d6a3974f411d71622eecd1b249ee37ff1c#156cb8d6a3974f411d71622eecd1b249ee37ff1c" +version = "22.0.0" +source = "git+https://github.com/lambdaclass/ethrex.git?rev=4f658c2b3d10e3f21d35ce546870f55ca3f940fc#4f658c2b3d10e3f21d35ce546870f55ca3f940fc" dependencies = [ "axum", "ethrex-common", @@ -1184,8 +1170,8 @@ dependencies = [ [[package]] name = "ethrex-p2p" -version = "13.0.0" -source = "git+https://github.com/lambdaclass/ethrex.git?rev=156cb8d6a3974f411d71622eecd1b249ee37ff1c#156cb8d6a3974f411d71622eecd1b249ee37ff1c" +version = "22.0.0" +source = "git+https://github.com/lambdaclass/ethrex.git?rev=4f658c2b3d10e3f21d35ce546870f55ca3f940fc#4f658c2b3d10e3f21d35ce546870f55ca3f940fc" dependencies = [ "aes", "aes-gcm", @@ -1228,8 +1214,8 @@ dependencies = [ [[package]] name = "ethrex-rlp" -version = "13.0.0" -source = "git+https://github.com/lambdaclass/ethrex.git?rev=156cb8d6a3974f411d71622eecd1b249ee37ff1c#156cb8d6a3974f411d71622eecd1b249ee37ff1c" +version = "22.0.0" +source = "git+https://github.com/lambdaclass/ethrex.git?rev=4f658c2b3d10e3f21d35ce546870f55ca3f940fc#4f658c2b3d10e3f21d35ce546870f55ca3f940fc" dependencies = [ "bytes", "ethereum-types", @@ -1238,8 +1224,8 @@ dependencies = [ [[package]] name = "ethrex-rpc" -version = "13.0.0" -source = "git+https://github.com/lambdaclass/ethrex.git?rev=156cb8d6a3974f411d71622eecd1b249ee37ff1c#156cb8d6a3974f411d71622eecd1b249ee37ff1c" +version = "22.0.0" +source = "git+https://github.com/lambdaclass/ethrex.git?rev=4f658c2b3d10e3f21d35ce546870f55ca3f940fc#4f658c2b3d10e3f21d35ce546870f55ca3f940fc" dependencies = [ "axum", "axum-extra", @@ -1259,6 +1245,7 @@ dependencies = [ "hex-literal", "jsonwebtoken", "rand 0.8.6", + "rayon", "reqwest", "secp256k1", "serde", @@ -1277,8 +1264,8 @@ dependencies = [ [[package]] name = "ethrex-storage" -version = "13.0.0" -source = "git+https://github.com/lambdaclass/ethrex.git?rev=156cb8d6a3974f411d71622eecd1b249ee37ff1c#156cb8d6a3974f411d71622eecd1b249ee37ff1c" +version = "22.0.0" +source = "git+https://github.com/lambdaclass/ethrex.git?rev=4f658c2b3d10e3f21d35ce546870f55ca3f940fc#4f658c2b3d10e3f21d35ce546870f55ca3f940fc" dependencies = [ "anyhow", "bytes", @@ -1299,8 +1286,8 @@ dependencies = [ [[package]] name = "ethrex-storage-rollup" -version = "13.0.0" -source = "git+https://github.com/lambdaclass/ethrex.git?rev=156cb8d6a3974f411d71622eecd1b249ee37ff1c#156cb8d6a3974f411d71622eecd1b249ee37ff1c" +version = "22.0.0" +source = "git+https://github.com/lambdaclass/ethrex.git?rev=4f658c2b3d10e3f21d35ce546870f55ca3f940fc#4f658c2b3d10e3f21d35ce546870f55ca3f940fc" dependencies = [ "async-trait", "bincode", @@ -1315,8 +1302,8 @@ dependencies = [ [[package]] name = "ethrex-trie" -version = "13.0.0" -source = "git+https://github.com/lambdaclass/ethrex.git?rev=156cb8d6a3974f411d71622eecd1b249ee37ff1c#156cb8d6a3974f411d71622eecd1b249ee37ff1c" +version = "22.0.0" +source = "git+https://github.com/lambdaclass/ethrex.git?rev=4f658c2b3d10e3f21d35ce546870f55ca3f940fc#4f658c2b3d10e3f21d35ce546870f55ca3f940fc" dependencies = [ "anyhow", "bytes", @@ -1324,18 +1311,19 @@ dependencies = [ "ethereum-types", "ethrex-crypto", "ethrex-rlp", - "lazy_static", + "hashbrown 0.15.5", "rayon", "rkyv", "rustc-hash", "serde", + "spin", "thiserror 2.0.18", ] [[package]] name = "ethrex-vm" -version = "13.0.0" -source = "git+https://github.com/lambdaclass/ethrex.git?rev=156cb8d6a3974f411d71622eecd1b249ee37ff1c#156cb8d6a3974f411d71622eecd1b249ee37ff1c" +version = "22.0.0" +source = "git+https://github.com/lambdaclass/ethrex.git?rev=4f658c2b3d10e3f21d35ce546870f55ca3f940fc#4f658c2b3d10e3f21d35ce546870f55ca3f940fc" dependencies = [ "bytes", "derive_more", @@ -1375,7 +1363,6 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393" dependencies = [ - "bitvec", "rand_core 0.6.4", "subtle", ] @@ -2541,15 +2528,6 @@ dependencies = [ "sha2", ] -[[package]] -name = "pairing" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fec4625e73cf41ef4bb6846cafa6d44736525f442ba45e407c4a000a13996f" -dependencies = [ - "group", -] - [[package]] name = "parity-scale-codec" version = "3.7.5" @@ -3543,6 +3521,12 @@ dependencies = [ "tracing-subscriber", ] +[[package]] +name = "spin" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3763264f6b73151db08c50ff20d7d8a0b8796e021cdea7ceedad07b80155fa0e" + [[package]] name = "spki" version = "0.7.3" diff --git a/tooling/ethrex-fixtures/Cargo.toml b/tooling/ethrex-fixtures/Cargo.toml index 5e99f37d3..3320ba25b 100644 --- a/tooling/ethrex-fixtures/Cargo.toml +++ b/tooling/ethrex-fixtures/Cargo.toml @@ -9,11 +9,11 @@ edition = "2024" [dependencies] # Pinned to the SAME ethrex rev as the guest (open LambdaVM-backend PR branch) # so the generated ProgramInput rkyv layout matches what the guest deserializes. -ethrex-blockchain = { git = "https://github.com/lambdaclass/ethrex.git", rev = "156cb8d6a3974f411d71622eecd1b249ee37ff1c", package = "ethrex-blockchain" } -ethrex-storage = { git = "https://github.com/lambdaclass/ethrex.git", rev = "156cb8d6a3974f411d71622eecd1b249ee37ff1c", package = "ethrex-storage" } -ethrex-common = { git = "https://github.com/lambdaclass/ethrex.git", rev = "156cb8d6a3974f411d71622eecd1b249ee37ff1c", package = "ethrex-common" } -ethrex-guest-program = { git = "https://github.com/lambdaclass/ethrex.git", rev = "156cb8d6a3974f411d71622eecd1b249ee37ff1c", package = "ethrex-guest-program" } -ethrex-l2-rpc = { git = "https://github.com/lambdaclass/ethrex.git", rev = "156cb8d6a3974f411d71622eecd1b249ee37ff1c", package = "ethrex-l2-rpc" } +ethrex-blockchain = { git = "https://github.com/lambdaclass/ethrex.git", rev = "4f658c2b3d10e3f21d35ce546870f55ca3f940fc", package = "ethrex-blockchain" } +ethrex-storage = { git = "https://github.com/lambdaclass/ethrex.git", rev = "4f658c2b3d10e3f21d35ce546870f55ca3f940fc", package = "ethrex-storage" } +ethrex-common = { git = "https://github.com/lambdaclass/ethrex.git", rev = "4f658c2b3d10e3f21d35ce546870f55ca3f940fc", package = "ethrex-common" } +ethrex-guest-program = { git = "https://github.com/lambdaclass/ethrex.git", rev = "4f658c2b3d10e3f21d35ce546870f55ca3f940fc", package = "ethrex-guest-program" } +ethrex-l2-rpc = { git = "https://github.com/lambdaclass/ethrex.git", rev = "4f658c2b3d10e3f21d35ce546870f55ca3f940fc", package = "ethrex-l2-rpc" } tokio = { version = "1", features = ["rt-multi-thread", "macros"] } # Exact pin: the fixture writer and the guest/executor readers must agree on the diff --git a/tooling/ethrex-fixtures/update_readme_checksums.py b/tooling/ethrex-fixtures/update_readme_checksums.py index 76997dbe1..f9fbee7fb 100644 --- a/tooling/ethrex-fixtures/update_readme_checksums.py +++ b/tooling/ethrex-fixtures/update_readme_checksums.py @@ -12,6 +12,10 @@ "ethrex_empty_block.bin", "ethrex_simple_tx.bin", "ethrex_10_transfers.bin", + # Committed like the three above, but generated in `distinct` mode and read by + # the recursion profile target rather than the executor tests. Omitting it left + # a committed fixture that a rev bump silently staled with nothing to catch it. + "ethrex_bench_4.bin", ) diff --git a/tooling/ethrex-tests/Cargo.lock b/tooling/ethrex-tests/Cargo.lock index 250e2411f..eafb4bdff 100644 --- a/tooling/ethrex-tests/Cargo.lock +++ b/tooling/ethrex-tests/Cargo.lock @@ -247,19 +247,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "bls12_381" -version = "0.8.0" -source = "git+https://github.com/lambdaclass/bls12_381?branch=expose-affine-constructors#78cad0378b17fc3157b83f514be192bf46edf9a1" -dependencies = [ - "digest", - "ff", - "group", - "pairing", - "rand_core", - "subtle", -] - [[package]] name = "bs58" version = "0.5.1" @@ -706,8 +693,8 @@ dependencies = [ [[package]] name = "ethrex-common" -version = "13.0.0" -source = "git+https://github.com/lambdaclass/ethrex.git?rev=156cb8d6a3974f411d71622eecd1b249ee37ff1c#156cb8d6a3974f411d71622eecd1b249ee37ff1c" +version = "22.0.0" +source = "git+https://github.com/lambdaclass/ethrex.git?rev=4f658c2b3d10e3f21d35ce546870f55ca3f940fc#4f658c2b3d10e3f21d35ce546870f55ca3f940fc" dependencies = [ "bytes", "crc32fast", @@ -736,15 +723,13 @@ dependencies = [ [[package]] name = "ethrex-crypto" -version = "13.0.0" -source = "git+https://github.com/lambdaclass/ethrex.git?rev=156cb8d6a3974f411d71622eecd1b249ee37ff1c#156cb8d6a3974f411d71622eecd1b249ee37ff1c" +version = "22.0.0" +source = "git+https://github.com/lambdaclass/ethrex.git?rev=4f658c2b3d10e3f21d35ce546870f55ca3f940fc#4f658c2b3d10e3f21d35ce546870f55ca3f940fc" dependencies = [ "ark-bn254", "ark-ec", "ark-ff", - "bls12_381", "ethereum-types", - "ff", "hex-literal", "k256", "malachite", @@ -759,8 +744,8 @@ dependencies = [ [[package]] name = "ethrex-guest-program" -version = "13.0.0" -source = "git+https://github.com/lambdaclass/ethrex.git?rev=156cb8d6a3974f411d71622eecd1b249ee37ff1c#156cb8d6a3974f411d71622eecd1b249ee37ff1c" +version = "22.0.0" +source = "git+https://github.com/lambdaclass/ethrex.git?rev=4f658c2b3d10e3f21d35ce546870f55ca3f940fc#4f658c2b3d10e3f21d35ce546870f55ca3f940fc" dependencies = [ "bytes", "ethereum-types", @@ -778,8 +763,8 @@ dependencies = [ [[package]] name = "ethrex-l2-common" -version = "13.0.0" -source = "git+https://github.com/lambdaclass/ethrex.git?rev=156cb8d6a3974f411d71622eecd1b249ee37ff1c#156cb8d6a3974f411d71622eecd1b249ee37ff1c" +version = "22.0.0" +source = "git+https://github.com/lambdaclass/ethrex.git?rev=4f658c2b3d10e3f21d35ce546870f55ca3f940fc#4f658c2b3d10e3f21d35ce546870f55ca3f940fc" dependencies = [ "bytes", "ethereum-types", @@ -797,8 +782,8 @@ dependencies = [ [[package]] name = "ethrex-levm" -version = "13.0.0" -source = "git+https://github.com/lambdaclass/ethrex.git?rev=156cb8d6a3974f411d71622eecd1b249ee37ff1c#156cb8d6a3974f411d71622eecd1b249ee37ff1c" +version = "22.0.0" +source = "git+https://github.com/lambdaclass/ethrex.git?rev=4f658c2b3d10e3f21d35ce546870f55ca3f940fc#4f658c2b3d10e3f21d35ce546870f55ca3f940fc" dependencies = [ "bytes", "derive_more", @@ -815,8 +800,8 @@ dependencies = [ [[package]] name = "ethrex-rlp" -version = "13.0.0" -source = "git+https://github.com/lambdaclass/ethrex.git?rev=156cb8d6a3974f411d71622eecd1b249ee37ff1c#156cb8d6a3974f411d71622eecd1b249ee37ff1c" +version = "22.0.0" +source = "git+https://github.com/lambdaclass/ethrex.git?rev=4f658c2b3d10e3f21d35ce546870f55ca3f940fc#4f658c2b3d10e3f21d35ce546870f55ca3f940fc" dependencies = [ "bytes", "ethereum-types", @@ -834,8 +819,8 @@ dependencies = [ [[package]] name = "ethrex-trie" -version = "13.0.0" -source = "git+https://github.com/lambdaclass/ethrex.git?rev=156cb8d6a3974f411d71622eecd1b249ee37ff1c#156cb8d6a3974f411d71622eecd1b249ee37ff1c" +version = "22.0.0" +source = "git+https://github.com/lambdaclass/ethrex.git?rev=4f658c2b3d10e3f21d35ce546870f55ca3f940fc#4f658c2b3d10e3f21d35ce546870f55ca3f940fc" dependencies = [ "anyhow", "bytes", @@ -843,18 +828,19 @@ dependencies = [ "ethereum-types", "ethrex-crypto", "ethrex-rlp", - "lazy_static", + "hashbrown 0.15.5", "rayon", "rkyv", "rustc-hash", "serde", + "spin", "thiserror 2.0.18", ] [[package]] name = "ethrex-vm" -version = "13.0.0" -source = "git+https://github.com/lambdaclass/ethrex.git?rev=156cb8d6a3974f411d71622eecd1b249ee37ff1c#156cb8d6a3974f411d71622eecd1b249ee37ff1c" +version = "22.0.0" +source = "git+https://github.com/lambdaclass/ethrex.git?rev=4f658c2b3d10e3f21d35ce546870f55ca3f940fc#4f658c2b3d10e3f21d35ce546870f55ca3f940fc" dependencies = [ "bytes", "derive_more", @@ -885,7 +871,6 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393" dependencies = [ - "bitvec", "rand_core", "subtle", ] @@ -1434,15 +1419,6 @@ dependencies = [ "sha2", ] -[[package]] -name = "pairing" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fec4625e73cf41ef4bb6846cafa6d44736525f442ba45e407c4a000a13996f" -dependencies = [ - "group", -] - [[package]] name = "parity-scale-codec" version = "3.7.5" @@ -1951,6 +1927,12 @@ version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" +[[package]] +name = "spin" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3763264f6b73151db08c50ff20d7d8a0b8796e021cdea7ceedad07b80155fa0e" + [[package]] name = "spki" version = "0.7.3" diff --git a/tooling/ethrex-tests/Cargo.toml b/tooling/ethrex-tests/Cargo.toml index f4774278d..5ff8ef39f 100644 --- a/tooling/ethrex-tests/Cargo.toml +++ b/tooling/ethrex-tests/Cargo.toml @@ -12,7 +12,7 @@ edition = "2024" executor = { path = "../../executor" } # Pinned to the SAME ethrex rev as the guest (open LambdaVM-backend PR branch) # so the native reference reads the same ProgramInput rkyv layout. -ethrex-guest-program = { git = "https://github.com/lambdaclass/ethrex.git", rev = "156cb8d6a3974f411d71622eecd1b249ee37ff1c", package = "ethrex-guest-program" } +ethrex-guest-program = { git = "https://github.com/lambdaclass/ethrex.git", rev = "4f658c2b3d10e3f21d35ce546870f55ca3f940fc", package = "ethrex-guest-program" } # Exact pin: the fixture writer and the guest/executor readers must agree on the # rkyv layout. Keep this in sync with tooling/ethrex-fixtures and # executor/programs/rust/ethrex/Cargo.toml. diff --git a/tooling/ethrex-tests/tests/ethrex.rs b/tooling/ethrex-tests/tests/ethrex.rs index 6374f2f43..9ad1ee786 100644 --- a/tooling/ethrex-tests/tests/ethrex.rs +++ b/tooling/ethrex-tests/tests/ethrex.rs @@ -127,11 +127,13 @@ fn test_ethrex_real_block_native() { /// backend too (invalid G1 encoding), and both paths surface as /// `CryptoError::Other`, so the variant can't tell them apart. The string comes /// from `ethrex-crypto`'s `KzgError::Unimplemented`; if upstream rewords it this -/// test goes red, which is the safe direction. +/// test goes red, which is the safe direction — and it has: the 4f658c2b rev bump +/// dropped `openvm-kzg` from the sentence, so the expected text moved with it. /// /// Worth knowing why this can regress: `ethrex-crypto`'s own default feature set -/// is `["std", "kzg-rs", "secp256k1"]`, so any future dependency pulling it in -/// with defaults on restores a backend and silently removes the screen. +/// is `["std", "kzg-rs", "secp256k1", "aws-lc-rs", "blst"]`, so any future +/// dependency pulling it in with defaults on restores a backend and silently +/// removes the screen. #[test] fn no_kzg_backend_linked() { use ethrex_guest_program::crypto::{Crypto, NativeCrypto}; @@ -141,7 +143,7 @@ fn no_kzg_backend_linked() { Err(err) => format!("{err:?}"), }; assert!( - message.contains("One of features c-kzg, openvm-kzg or kzg-rs should be active"), + message.contains("One of features c-kzg or kzg-rs should be active"), "a KZG backend is linked into ethrex-tests, so test_ethrex_real_block_native no \ longer screens precompile 0x0a: {message}" );