diff --git a/Cargo.lock b/Cargo.lock index ec7b008..5d15e29 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -78,57 +78,31 @@ checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" [[package]] name = "alloy-chains" -version = "0.2.23" +version = "0.2.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35d744058a9daa51a8cf22a3009607498fcf82d3cf4c5444dd8056cdf651f471" +checksum = "b163ff4acf0eac29af05a911397cc418a76e153467b859398adc26cb9335a611" dependencies = [ "alloy-primitives", "alloy-rlp", - "num_enum 0.7.5", + "num_enum", "serde", "strum 0.27.2", ] [[package]] name = "alloy-consensus" -version = "0.14.0" -source = "git+https://github.com/ziren-patches/alloy?branch=patch-0.14.0#c5e571d372aaa8c2caea9672dfd4cd195e5c50f2" +version = "1.0.41" +source = "git+https://github.com/ziren-patches/alloy?branch=patch-1.0.41#6e100c7f3487b4e00f41eaf64558e55e3ebec984" dependencies = [ - "alloy-eips 0.14.0", + "alloy-eips", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.14.0", - "alloy-trie 0.8.1", - "auto_impl", - "bytes", - "c-kzg", - "derive_more 2.1.0", - "either", - "k256", - "once_cell", - "rand 0.8.5", - "serde", - "serde_json", - "serde_with", - "thiserror 2.0.17", -] - -[[package]] -name = "alloy-consensus" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e318e25fb719e747a7e8db1654170fc185024f3ed5b10f86c08d448a912f6e2" -dependencies = [ - "alloy-eips 1.1.3", - "alloy-primitives", - "alloy-rlp", - "alloy-serde 1.1.3", - "alloy-trie 0.9.1", + "alloy-serde", + "alloy-trie 0.9.2", "alloy-tx-macros", "auto_impl", - "borsh", "c-kzg", - "derive_more 2.1.0", + "derive_more 2.1.1", "either", "k256", "once_cell", @@ -142,28 +116,14 @@ dependencies = [ [[package]] name = "alloy-consensus-any" -version = "0.14.0" -source = "git+https://github.com/ziren-patches/alloy?branch=patch-0.14.0#c5e571d372aaa8c2caea9672dfd4cd195e5c50f2" -dependencies = [ - "alloy-consensus 0.14.0", - "alloy-eips 0.14.0", - "alloy-primitives", - "alloy-rlp", - "alloy-serde 0.14.0", - "serde", -] - -[[package]] -name = "alloy-consensus-any" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "364380a845193a317bcb7a5398fc86cdb66c47ebe010771dde05f6869bf9e64a" +version = "1.0.41" +source = "git+https://github.com/ziren-patches/alloy?branch=patch-1.0.41#6e100c7f3487b4e00f41eaf64558e55e3ebec984" dependencies = [ - "alloy-consensus 1.1.3", - "alloy-eips 1.1.3", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", - "alloy-serde 1.1.3", + "alloy-serde", "serde", ] @@ -209,39 +169,18 @@ dependencies = [ [[package]] name = "alloy-eips" -version = "0.14.0" -source = "git+https://github.com/ziren-patches/alloy?branch=patch-0.14.0#c5e571d372aaa8c2caea9672dfd4cd195e5c50f2" +version = "1.0.41" +source = "git+https://github.com/ziren-patches/alloy?branch=patch-1.0.41#6e100c7f3487b4e00f41eaf64558e55e3ebec984" dependencies = [ "alloy-eip2124", "alloy-eip2930", "alloy-eip7702", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.14.0", + "alloy-serde", "auto_impl", "c-kzg", - "derive_more 2.1.0", - "either", - "serde", - "sha2", -] - -[[package]] -name = "alloy-eips" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c4d7c5839d9f3a467900c625416b24328450c65702eb3d8caff8813e4d1d33" -dependencies = [ - "alloy-eip2124", - "alloy-eip2930", - "alloy-eip7702", - "alloy-primitives", - "alloy-rlp", - "alloy-serde 1.1.3", - "auto_impl", - "borsh", - "c-kzg", - "derive_more 2.1.0", + "derive_more 2.1.1", "either", "serde", "serde_with", @@ -251,17 +190,18 @@ dependencies = [ [[package]] name = "alloy-evm" -version = "0.4.0" -source = "git+https://github.com/ziren-patches/evm?branch=patch-0.4.0#57b583d7a27668c1b4fb1f2a655675e1be6b497e" +version = "0.23.0" +source = "git+https://github.com/ziren-patches/evm?branch=patch-0.23.0#bf2c1b5816835b4a581b509598555d7dd01df17d" dependencies = [ - "alloy-consensus 0.14.0", - "alloy-eips 0.14.0", + "alloy-consensus", + "alloy-eips", "alloy-hardforks", + "alloy-op-hardforks", "alloy-primitives", "alloy-sol-types", "anyhow", "auto_impl", - "derive_more 2.1.0", + "derive_more 2.1.1", "op-alloy-consensus", "op-revm", "revm", @@ -270,21 +210,22 @@ dependencies = [ [[package]] name = "alloy-genesis" -version = "0.14.0" -source = "git+https://github.com/ziren-patches/alloy?branch=patch-0.14.0#c5e571d372aaa8c2caea9672dfd4cd195e5c50f2" +version = "1.0.41" +source = "git+https://github.com/ziren-patches/alloy?branch=patch-1.0.41#6e100c7f3487b4e00f41eaf64558e55e3ebec984" dependencies = [ - "alloy-eips 0.14.0", + "alloy-eips", "alloy-primitives", - "alloy-serde 0.14.0", - "alloy-trie 0.8.1", + "alloy-serde", + "alloy-trie 0.9.2", "serde", + "serde_with", ] [[package]] name = "alloy-hardforks" -version = "0.2.13" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3165210652f71dfc094b051602bafd691f506c54050a174b1cba18fb5ef706a3" +checksum = "2d9a33550fc21fd77a3f8b63e99969d17660eec8dcc50a95a80f7c9964f7680b" dependencies = [ "alloy-chains", "alloy-eip2124", @@ -307,22 +248,8 @@ dependencies = [ [[package]] name = "alloy-json-rpc" -version = "0.14.0" -source = "git+https://github.com/ziren-patches/alloy?branch=patch-0.14.0#c5e571d372aaa8c2caea9672dfd4cd195e5c50f2" -dependencies = [ - "alloy-primitives", - "alloy-sol-types", - "serde", - "serde_json", - "thiserror 2.0.17", - "tracing", -] - -[[package]] -name = "alloy-json-rpc" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f72cf87cda808e593381fb9f005ffa4d2475552b7a6c5ac33d087bf77d82abd0" +version = "1.0.41" +source = "git+https://github.com/ziren-patches/alloy?branch=patch-1.0.41#6e100c7f3487b4e00f41eaf64558e55e3ebec984" dependencies = [ "alloy-primitives", "alloy-sol-types", @@ -335,49 +262,23 @@ dependencies = [ [[package]] name = "alloy-network" -version = "0.14.0" -source = "git+https://github.com/ziren-patches/alloy?branch=patch-0.14.0#c5e571d372aaa8c2caea9672dfd4cd195e5c50f2" -dependencies = [ - "alloy-consensus 0.14.0", - "alloy-consensus-any 0.14.0", - "alloy-eips 0.14.0", - "alloy-json-rpc 0.14.0", - "alloy-network-primitives 0.14.0", - "alloy-primitives", - "alloy-rpc-types-any 0.14.0", - "alloy-rpc-types-eth 0.14.0", - "alloy-serde 0.14.0", - "alloy-signer 0.14.0", - "alloy-sol-types", - "async-trait", - "auto_impl", - "derive_more 2.1.0", - "futures-utils-wasm", - "serde", - "serde_json", - "thiserror 2.0.17", -] - -[[package]] -name = "alloy-network" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12aeb37b6f2e61b93b1c3d34d01ee720207c76fe447e2a2c217e433ac75b17f5" -dependencies = [ - "alloy-consensus 1.1.3", - "alloy-consensus-any 1.1.3", - "alloy-eips 1.1.3", - "alloy-json-rpc 1.1.3", - "alloy-network-primitives 1.1.3", +version = "1.0.41" +source = "git+https://github.com/ziren-patches/alloy?branch=patch-1.0.41#6e100c7f3487b4e00f41eaf64558e55e3ebec984" +dependencies = [ + "alloy-consensus", + "alloy-consensus-any", + "alloy-eips", + "alloy-json-rpc", + "alloy-network-primitives", "alloy-primitives", - "alloy-rpc-types-any 1.1.3", - "alloy-rpc-types-eth 1.1.3", - "alloy-serde 1.1.3", - "alloy-signer 1.1.3", + "alloy-rpc-types-any", + "alloy-rpc-types-eth", + "alloy-serde", + "alloy-signer 1.0.41", "alloy-sol-types", "async-trait", "auto_impl", - "derive_more 2.1.0", + "derive_more 2.1.1", "futures-utils-wasm", "serde", "serde_json", @@ -386,36 +287,23 @@ dependencies = [ [[package]] name = "alloy-network-primitives" -version = "0.14.0" -source = "git+https://github.com/ziren-patches/alloy?branch=patch-0.14.0#c5e571d372aaa8c2caea9672dfd4cd195e5c50f2" -dependencies = [ - "alloy-consensus 0.14.0", - "alloy-eips 0.14.0", - "alloy-primitives", - "alloy-serde 0.14.0", - "serde", -] - -[[package]] -name = "alloy-network-primitives" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abd29ace62872083e30929cd9b282d82723196d196db589f3ceda67edcc05552" +version = "1.0.41" +source = "git+https://github.com/ziren-patches/alloy?branch=patch-1.0.41#6e100c7f3487b4e00f41eaf64558e55e3ebec984" dependencies = [ - "alloy-consensus 1.1.3", - "alloy-eips 1.1.3", + "alloy-consensus", + "alloy-eips", "alloy-primitives", - "alloy-serde 1.1.3", + "alloy-serde", "serde", ] [[package]] name = "alloy-op-evm" -version = "0.4.0" -source = "git+https://github.com/ziren-patches/evm?branch=patch-0.4.0#57b583d7a27668c1b4fb1f2a655675e1be6b497e" +version = "0.23.0" +source = "git+https://github.com/ziren-patches/evm?branch=patch-0.23.0#bf2c1b5816835b4a581b509598555d7dd01df17d" dependencies = [ - "alloy-consensus 0.14.0", - "alloy-eips 0.14.0", + "alloy-consensus", + "alloy-eips", "alloy-evm", "alloy-op-hardforks", "alloy-primitives", @@ -423,30 +311,31 @@ dependencies = [ "op-alloy-consensus", "op-revm", "revm", + "thiserror 2.0.17", ] [[package]] name = "alloy-op-hardforks" -version = "0.2.13" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3417f4187eaf7f7fb0d7556f0197bca26f0b23c4bb3aca0c9d566dc1c5d727a2" +checksum = "f96fb2fce4024ada5b2c11d4076acf778a0d3e4f011c6dfd2ffce6d0fcf84ee9" dependencies = [ "alloy-chains", "alloy-hardforks", + "alloy-primitives", "auto_impl", ] [[package]] name = "alloy-primitives" version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "355bf68a433e0fd7f7d33d5a9fc2583fde70bf5c530f63b80845f8da5505cf28" +source = "git+https://github.com/ziren-patches/core.git?branch=patch-alloy-primitives-1.4.1#59313700f710f1373a5b4cdc05c51dc3227d8064" dependencies = [ "alloy-rlp", "bytes", "cfg-if", "const-hex", - "derive_more 2.1.0", + "derive_more 2.1.1", "foldhash 0.2.0", "hashbrown 0.16.1", "indexmap 2.12.1", @@ -461,24 +350,27 @@ dependencies = [ "serde", "sha3", "tiny-keccak", + "zkm-zkvm", ] [[package]] name = "alloy-provider" -version = "0.14.0" -source = "git+https://github.com/ziren-patches/alloy?branch=patch-0.14.0#c5e571d372aaa8c2caea9672dfd4cd195e5c50f2" +version = "1.0.41" +source = "git+https://github.com/ziren-patches/alloy?branch=patch-1.0.41#6e100c7f3487b4e00f41eaf64558e55e3ebec984" dependencies = [ "alloy-chains", - "alloy-consensus 0.14.0", - "alloy-eips 0.14.0", - "alloy-json-rpc 0.14.0", - "alloy-network 0.14.0", - "alloy-network-primitives 0.14.0", + "alloy-consensus", + "alloy-eips", + "alloy-json-rpc", + "alloy-network", + "alloy-network-primitives", "alloy-primitives", "alloy-pubsub", "alloy-rpc-client", - "alloy-rpc-types-eth 0.14.0", - "alloy-signer 0.14.0", + "alloy-rpc-types-debug", + "alloy-rpc-types-eth", + "alloy-rpc-types-trace", + "alloy-signer 1.0.41", "alloy-sol-types", "alloy-transport", "alloy-transport-http", @@ -493,7 +385,7 @@ dependencies = [ "lru 0.13.0", "parking_lot 0.12.5", "pin-project", - "reqwest 0.12.25", + "reqwest 0.12.28", "serde", "serde_json", "thiserror 2.0.17", @@ -505,12 +397,13 @@ dependencies = [ [[package]] name = "alloy-pubsub" -version = "0.14.0" -source = "git+https://github.com/ziren-patches/alloy?branch=patch-0.14.0#c5e571d372aaa8c2caea9672dfd4cd195e5c50f2" +version = "1.0.41" +source = "git+https://github.com/ziren-patches/alloy?branch=patch-1.0.41#6e100c7f3487b4e00f41eaf64558e55e3ebec984" dependencies = [ - "alloy-json-rpc 0.14.0", + "alloy-json-rpc", "alloy-primitives", "alloy-transport", + "auto_impl", "bimap", "futures", "parking_lot 0.12.5", @@ -547,107 +440,85 @@ dependencies = [ [[package]] name = "alloy-rpc-client" -version = "0.14.0" -source = "git+https://github.com/ziren-patches/alloy?branch=patch-0.14.0#c5e571d372aaa8c2caea9672dfd4cd195e5c50f2" +version = "1.0.41" +source = "git+https://github.com/ziren-patches/alloy?branch=patch-1.0.41#6e100c7f3487b4e00f41eaf64558e55e3ebec984" dependencies = [ - "alloy-json-rpc 0.14.0", + "alloy-json-rpc", "alloy-primitives", "alloy-pubsub", "alloy-transport", "alloy-transport-http", "alloy-transport-ws", - "async-stream", "futures", "pin-project", - "reqwest 0.12.25", + "reqwest 0.12.28", "serde", "serde_json", "tokio", "tokio-stream", "tower 0.5.2", "tracing", - "tracing-futures", "url", "wasmtimer", ] [[package]] name = "alloy-rpc-types" -version = "0.14.0" -source = "git+https://github.com/ziren-patches/alloy?branch=patch-0.14.0#c5e571d372aaa8c2caea9672dfd4cd195e5c50f2" +version = "1.0.41" +source = "git+https://github.com/ziren-patches/alloy?branch=patch-1.0.41#6e100c7f3487b4e00f41eaf64558e55e3ebec984" dependencies = [ "alloy-primitives", - "alloy-rpc-types-eth 0.14.0", - "alloy-serde 0.14.0", + "alloy-rpc-types-eth", + "alloy-serde", "serde", ] [[package]] name = "alloy-rpc-types-any" -version = "0.14.0" -source = "git+https://github.com/ziren-patches/alloy?branch=patch-0.14.0#c5e571d372aaa8c2caea9672dfd4cd195e5c50f2" +version = "1.0.41" +source = "git+https://github.com/ziren-patches/alloy?branch=patch-1.0.41#6e100c7f3487b4e00f41eaf64558e55e3ebec984" dependencies = [ - "alloy-consensus-any 0.14.0", - "alloy-rpc-types-eth 0.14.0", - "alloy-serde 0.14.0", + "alloy-consensus-any", + "alloy-rpc-types-eth", + "alloy-serde", ] [[package]] -name = "alloy-rpc-types-any" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a63fb40ed24e4c92505f488f9dd256e2afaed17faa1b7a221086ebba74f4122" +name = "alloy-rpc-types-debug" +version = "1.0.41" +source = "git+https://github.com/ziren-patches/alloy?branch=patch-1.0.41#6e100c7f3487b4e00f41eaf64558e55e3ebec984" dependencies = [ - "alloy-consensus-any 1.1.3", - "alloy-rpc-types-eth 1.1.3", - "alloy-serde 1.1.3", + "alloy-primitives", + "derive_more 2.1.1", + "serde", + "serde_with", ] [[package]] name = "alloy-rpc-types-engine" -version = "0.14.0" -source = "git+https://github.com/ziren-patches/alloy?branch=patch-0.14.0#c5e571d372aaa8c2caea9672dfd4cd195e5c50f2" +version = "1.0.41" +source = "git+https://github.com/ziren-patches/alloy?branch=patch-1.0.41#6e100c7f3487b4e00f41eaf64558e55e3ebec984" dependencies = [ - "alloy-consensus 0.14.0", - "alloy-eips 0.14.0", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", - "derive_more 2.1.0", + "derive_more 2.1.1", "strum 0.27.2", ] [[package]] name = "alloy-rpc-types-eth" -version = "0.14.0" -source = "git+https://github.com/ziren-patches/alloy?branch=patch-0.14.0#c5e571d372aaa8c2caea9672dfd4cd195e5c50f2" -dependencies = [ - "alloy-consensus 0.14.0", - "alloy-consensus-any 0.14.0", - "alloy-eips 0.14.0", - "alloy-network-primitives 0.14.0", - "alloy-primitives", - "alloy-rlp", - "alloy-serde 0.14.0", - "alloy-sol-types", - "itertools 0.14.0", - "serde", - "serde_json", - "thiserror 2.0.17", -] - -[[package]] -name = "alloy-rpc-types-eth" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eae0c7c40da20684548cbc8577b6b7447f7bf4ddbac363df95e3da220e41e72" +version = "1.0.41" +source = "git+https://github.com/ziren-patches/alloy?branch=patch-1.0.41#6e100c7f3487b4e00f41eaf64558e55e3ebec984" dependencies = [ - "alloy-consensus 1.1.3", - "alloy-consensus-any 1.1.3", - "alloy-eips 1.1.3", - "alloy-network-primitives 1.1.3", + "alloy-consensus", + "alloy-consensus-any", + "alloy-eips", + "alloy-network-primitives", "alloy-primitives", "alloy-rlp", - "alloy-serde 1.1.3", + "alloy-serde", "alloy-sol-types", "itertools 0.14.0", "serde", @@ -657,20 +528,22 @@ dependencies = [ ] [[package]] -name = "alloy-serde" -version = "0.14.0" -source = "git+https://github.com/ziren-patches/alloy?branch=patch-0.14.0#c5e571d372aaa8c2caea9672dfd4cd195e5c50f2" +name = "alloy-rpc-types-trace" +version = "1.0.41" +source = "git+https://github.com/ziren-patches/alloy?branch=patch-1.0.41#6e100c7f3487b4e00f41eaf64558e55e3ebec984" dependencies = [ "alloy-primitives", + "alloy-rpc-types-eth", + "alloy-serde", "serde", "serde_json", + "thiserror 2.0.17", ] [[package]] name = "alloy-serde" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0df1987ed0ff2d0159d76b52e7ddfc4e4fbddacc54d2fbee765e0d14d7c01b5" +version = "1.0.41" +source = "git+https://github.com/ziren-patches/alloy?branch=patch-1.0.41#6e100c7f3487b4e00f41eaf64558e55e3ebec984" dependencies = [ "alloy-primitives", "serde", @@ -679,8 +552,8 @@ dependencies = [ [[package]] name = "alloy-signer" -version = "0.14.0" -source = "git+https://github.com/ziren-patches/alloy?branch=patch-0.14.0#c5e571d372aaa8c2caea9672dfd4cd195e5c50f2" +version = "1.0.41" +source = "git+https://github.com/ziren-patches/alloy?branch=patch-1.0.41#6e100c7f3487b4e00f41eaf64558e55e3ebec984" dependencies = [ "alloy-primitives", "async-trait", @@ -693,9 +566,9 @@ dependencies = [ [[package]] name = "alloy-signer" -version = "1.1.3" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ff69deedee7232d7ce5330259025b868c5e6a52fa8dffda2c861fb3a5889b24" +checksum = "acff6b251740ef473932386d3b71657d3825daebf2217fb41a7ef676229225d4" dependencies = [ "alloy-primitives", "async-trait", @@ -706,27 +579,11 @@ dependencies = [ "thiserror 2.0.17", ] -[[package]] -name = "alloy-signer-local" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72cfe0be3ec5a8c1a46b2e5a7047ed41121d360d97f4405bb7c1c784880c86cb" -dependencies = [ - "alloy-consensus 1.1.3", - "alloy-network 1.1.3", - "alloy-primitives", - "alloy-signer 1.1.3", - "async-trait", - "k256", - "rand 0.8.5", - "thiserror 2.0.17", -] - [[package]] name = "alloy-sol-macro" -version = "1.4.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3ce480400051b5217f19d6e9a82d9010cdde20f1ae9c00d53591e4a1afbb312" +checksum = "09eb18ce0df92b4277291bbaa0ed70545d78b02948df756bbd3d6214bf39a218" dependencies = [ "alloy-sol-macro-expander", "alloy-sol-macro-input", @@ -738,9 +595,9 @@ dependencies = [ [[package]] name = "alloy-sol-macro-expander" -version = "1.4.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d792e205ed3b72f795a8044c52877d2e6b6e9b1d13f431478121d8d4eaa9028" +checksum = "95d9fa2daf21f59aa546d549943f10b5cce1ae59986774019fbedae834ffe01b" dependencies = [ "alloy-sol-macro-input", "const-hex", @@ -756,9 +613,9 @@ dependencies = [ [[package]] name = "alloy-sol-macro-input" -version = "1.4.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bd1247a8f90b465ef3f1207627547ec16940c35597875cdc09c49d58b19693c" +checksum = "9396007fe69c26ee118a19f4dee1f5d1d6be186ea75b3881adf16d87f8444686" dependencies = [ "const-hex", "dunce", @@ -772,12 +629,12 @@ dependencies = [ [[package]] name = "alloy-sol-type-parser" -version = "1.4.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "954d1b2533b9b2c7959652df3076954ecb1122a28cc740aa84e7b0a49f6ac0a9" +checksum = "af67a0b0dcebe14244fc92002cd8d96ecbf65db4639d479f5fcd5805755a4c27" dependencies = [ "serde", - "winnow 0.7.14", + "winnow", ] [[package]] @@ -794,12 +651,14 @@ dependencies = [ [[package]] name = "alloy-transport" -version = "0.14.0" -source = "git+https://github.com/ziren-patches/alloy?branch=patch-0.14.0#c5e571d372aaa8c2caea9672dfd4cd195e5c50f2" +version = "1.0.41" +source = "git+https://github.com/ziren-patches/alloy?branch=patch-1.0.41#6e100c7f3487b4e00f41eaf64558e55e3ebec984" dependencies = [ - "alloy-json-rpc 0.14.0", + "alloy-json-rpc", + "alloy-primitives", + "auto_impl", "base64 0.22.1", - "derive_more 2.1.0", + "derive_more 2.1.1", "futures", "futures-utils-wasm", "parking_lot 0.12.5", @@ -815,12 +674,12 @@ dependencies = [ [[package]] name = "alloy-transport-http" -version = "0.14.0" -source = "git+https://github.com/ziren-patches/alloy?branch=patch-0.14.0#c5e571d372aaa8c2caea9672dfd4cd195e5c50f2" +version = "1.0.41" +source = "git+https://github.com/ziren-patches/alloy?branch=patch-1.0.41#6e100c7f3487b4e00f41eaf64558e55e3ebec984" dependencies = [ - "alloy-json-rpc 0.14.0", + "alloy-json-rpc", "alloy-transport", - "reqwest 0.12.25", + "reqwest 0.12.28", "serde_json", "tower 0.5.2", "tracing", @@ -829,8 +688,8 @@ dependencies = [ [[package]] name = "alloy-transport-ws" -version = "0.14.0" -source = "git+https://github.com/ziren-patches/alloy?branch=patch-0.14.0#c5e571d372aaa8c2caea9672dfd4cd195e5c50f2" +version = "1.0.41" +source = "git+https://github.com/ziren-patches/alloy?branch=patch-1.0.41#6e100c7f3487b4e00f41eaf64558e55e3ebec984" dependencies = [ "alloy-pubsub", "alloy-transport", @@ -853,7 +712,7 @@ dependencies = [ "alloy-primitives", "alloy-rlp", "arrayvec", - "derive_more 2.1.0", + "derive_more 2.1.1", "nybbles 0.3.4", "serde", "smallvec", @@ -862,14 +721,14 @@ dependencies = [ [[package]] name = "alloy-trie" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3412d52bb97c6c6cc27ccc28d4e6e8cf605469101193b50b0bd5813b1f990b5" +checksum = "2b77b56af09ead281337d06b1d036c88e2dc8a2e45da512a532476dbee94912b" dependencies = [ "alloy-primitives", "alloy-rlp", "arrayvec", - "derive_more 2.1.0", + "derive_more 2.1.1", "nybbles 0.4.6", "serde", "smallvec", @@ -878,10 +737,10 @@ dependencies = [ [[package]] name = "alloy-tx-macros" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "333544408503f42d7d3792bfc0f7218b643d968a03d2c0ed383ae558fb4a76d0" +version = "1.0.41" +source = "git+https://github.com/ziren-patches/alloy?branch=patch-1.0.41#6e100c7f3487b4e00f41eaf64558e55e3ebec984" dependencies = [ + "alloy-primitives", "darling", "proc-macro2", "quote", @@ -1678,7 +1537,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0686c856aa6aac0c4498f936d7d6a02df690f614c03e4d906d1018062b5c5e2c" dependencies = [ "once_cell", - "proc-macro-crate 3.4.0", + "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.111", @@ -1696,9 +1555,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.19.0" +version = "3.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" +checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" [[package]] name = "byte-slice-cast" @@ -1793,9 +1652,9 @@ dependencies = [ [[package]] name = "camino" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "276a59bf2b2c967788139340c9f0c5b12d7fd6630315c15c217e559de85d2609" +checksum = "e629a66d692cb9ff1a1c664e41771b3dcaf961985a9774c0eb0bd1b51cf60a48" dependencies = [ "serde_core", ] @@ -1823,30 +1682,11 @@ dependencies = [ "thiserror 1.0.69", ] -[[package]] -name = "cbindgen" -version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fce8dd7fcfcbf3a0a87d8f515194b49d6135acab73e18bd380d1d93bb1a15eb" -dependencies = [ - "clap", - "heck 0.4.1", - "indexmap 2.12.1", - "log", - "proc-macro2", - "quote", - "serde", - "serde_json", - "syn 2.0.111", - "tempfile", - "toml", -] - [[package]] name = "cc" -version = "1.2.49" +version = "1.2.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90583009037521a116abf44494efecd645ba48b6622457080f080b85544e2215" +checksum = "9f50d563227a1c37cc0a263f64eca3334388c01c5e4c4861a9def205c614383c" dependencies = [ "find-msvc-tools", "jobserver", @@ -1882,10 +1722,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2" dependencies = [ "iana-time-zone", - "js-sys", "num-traits", "serde", - "wasm-bindgen", "windows-link", ] @@ -2080,15 +1918,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" -[[package]] -name = "convert_case" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb402b8d4c85569410425650ce3eddc7d698ed96d39a73f941b08fb63082f1e7" -dependencies = [ - "unicode-segmentation", -] - [[package]] name = "convert_case" version = "0.10.0" @@ -2153,15 +1982,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" -[[package]] -name = "crossbeam-channel" -version = "0.5.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" -dependencies = [ - "crossbeam-utils", -] - [[package]] name = "crossbeam-deque" version = "0.8.6" @@ -2470,11 +2290,11 @@ dependencies = [ [[package]] name = "derive_more" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10b768e943bed7bf2cab53df09f4bc34bfd217cdb57d971e769874c9a6710618" +checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134" dependencies = [ - "derive_more-impl 2.1.0", + "derive_more-impl 2.1.1", ] [[package]] @@ -2490,11 +2310,11 @@ dependencies = [ [[package]] name = "derive_more-impl" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d286bfdaf75e988b4a78e013ecd79c581e06399ab53fbacd2d916c2f904f30b" +checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb" dependencies = [ - "convert_case 0.10.0", + "convert_case", "proc-macro2", "quote", "rustc_version 0.4.1", @@ -2606,12 +2426,6 @@ version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" -[[package]] -name = "downcast-rs" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" - [[package]] name = "dunce" version = "1.0.5" @@ -2782,40 +2596,6 @@ dependencies = [ "syn 2.0.111", ] -[[package]] -name = "enumn" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f9ed6b3789237c8a0c1c505af1c7eb2c560df6186f01b098c3a1064ea532f38" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.111", -] - -[[package]] -name = "env_filter" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bf3c259d255ca70051b30e2e95b5446cdb8949ac4cd22c0d7fd634d89f568e2" -dependencies = [ - "log", - "regex", -] - -[[package]] -name = "env_logger" -version = "0.11.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13c863f0904021b108aa8b2f55046443e6b1ebde8fd4a15c399893aae4fa069f" -dependencies = [ - "anstream", - "anstyle", - "env_filter", - "jiff", - "log", -] - [[package]] name = "equivalent" version = "1.0.2" @@ -2872,7 +2652,7 @@ dependencies = [ "host-executor", "primitives", "provider", - "reqwest 0.12.25", + "reqwest 0.12.28", "reqwest-middleware", "reqwest-retry", "serde", @@ -3036,7 +2816,7 @@ dependencies = [ "ethabi", "generic-array 0.14.7", "k256", - "num_enum 0.7.5", + "num_enum", "once_cell", "open-fastrlp", "rand 0.8.5", @@ -3606,19 +3386,21 @@ dependencies = [ name = "guest-executor" version = "0.1.0" dependencies = [ - "alloy-consensus 0.14.0", + "alloy-consensus", "alloy-evm", - "alloy-network 0.14.0", + "alloy-network", "alloy-primitives", "alloy-rpc-types", "bincode", "itertools 0.13.0", + "kzg-rs", "mpt", "op-alloy-network", "op-alloy-rpc-types", "primitives", "reth-chainspec", "reth-consensus", + "reth-consensus-common", "reth-errors", "reth-ethereum-consensus", "reth-ethereum-primitives", @@ -3911,8 +3693,8 @@ name = "host" version = "0.1.0" dependencies = [ "alloy-chains", - "alloy-consensus 0.14.0", - "alloy-network 0.14.0", + "alloy-consensus", + "alloy-network", "alloy-primitives", "alloy-provider", "clap", @@ -3940,10 +3722,10 @@ name = "host-executor" version = "0.1.0" dependencies = [ "alloy-chains", - "alloy-consensus 0.14.0", - "alloy-eips 0.14.0", + "alloy-consensus", + "alloy-eips", "alloy-evm", - "alloy-network 0.14.0", + "alloy-network", "alloy-primitives", "alloy-provider", "alloy-rpc-types", @@ -3960,7 +3742,7 @@ dependencies = [ "mpt", "op-alloy-network", "primitives", - "reqwest 0.12.25", + "reqwest 0.12.28", "reth-chainspec", "reth-errors", "reth-ethereum-primitives", @@ -4261,9 +4043,9 @@ checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" [[package]] name = "icu_properties" -version = "2.1.1" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e93fcd3157766c0c8da2f8cff6ce651a31f0810eaa1c51ec363ef790bbb5fb99" +checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" dependencies = [ "icu_collections", "icu_locale_core", @@ -4275,9 +4057,9 @@ dependencies = [ [[package]] name = "icu_properties_data" -version = "2.1.1" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02845b3647bb045f1100ecd6480ff52f34c35f82d9880e029d329c21d1054899" +checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" [[package]] name = "icu_provider" @@ -4494,33 +4276,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.15" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" - -[[package]] -name = "jiff" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49cce2b81f2098e7e3efc35bc2e0a6b7abec9d34128283d7a26fa8f32a6dbb35" -dependencies = [ - "jiff-static", - "log", - "portable-atomic", - "portable-atomic-util", - "serde_core", -] - -[[package]] -name = "jiff-static" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "980af8b43c3ad5d8d349ace167ec8170839f753a42d233ba19e08afe1850fa69" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.111", -] +checksum = "7ee5b5339afb4c41626dde77b7a611bd4f2c202b897852b4bcf5d03eddc61010" [[package]] name = "jobserver" @@ -4693,9 +4451,9 @@ checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" [[package]] name = "libredox" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "416f7e718bdb06000964960ffa43b4335ad4012ae8b99060261aa4a8088d5ccb" +checksum = "df15f6eac291ed1cf25865b1ee60399f57e7c227e7f51bdbd4c5270396a9ed50" dependencies = [ "bitflags 2.10.0", "libc", @@ -4855,28 +4613,6 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d97bbf43eb4f088f8ca469930cde17fa036207c9a5e02ccc5107c4e8b17c964" -[[package]] -name = "metrics" -version = "0.24.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d5312e9ba3771cfa961b585728215e3d972c950a3eed9252aa093d6301277e8" -dependencies = [ - "ahash", - "portable-atomic", -] - -[[package]] -name = "metrics-derive" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3dbdd96ed57d565ec744cba02862d707acf373c5772d152abae6ec5c4e24f6c" -dependencies = [ - "proc-macro2", - "quote", - "regex", - "syn 2.0.111", -] - [[package]] name = "mime" version = "0.3.17" @@ -4937,6 +4673,8 @@ version = "0.1.0" dependencies = [ "alloy-primitives", "alloy-rlp", + "alloy-rpc-types", + "alloy-rpc-types-debug", "hex-literal", "mpt", "reth-trie", @@ -5010,9 +4748,9 @@ dependencies = [ [[package]] name = "ntapi" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8a3895c6391c39d7fe7ebc444a87eb2991b2a0bc718fdabd071eec617fc68e4" +checksum = "c70f219e21142367c70c0b30c6a9e3a14d55b4d12a204d897fbec83a0363f081" dependencies = [ "winapi", ] @@ -5143,44 +4881,23 @@ dependencies = [ "libc", ] -[[package]] -name = "num_enum" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" -dependencies = [ - "num_enum_derive 0.5.11", -] - [[package]] name = "num_enum" version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1207a7e20ad57b847bbddc6776b968420d38292bbfe2089accff5e19e82454c" dependencies = [ - "num_enum_derive 0.7.5", + "num_enum_derive", "rustversion", ] -[[package]] -name = "num_enum_derive" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" -dependencies = [ - "proc-macro-crate 1.3.1", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "num_enum_derive" version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff32365de1b6743cb203b710788263c44a03de03802daf96092f2da4fe6ba4d7" dependencies = [ - "proc-macro-crate 3.4.0", + "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.111", @@ -5282,15 +4999,17 @@ checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" [[package]] name = "op-alloy-consensus" -version = "0.13.0" -source = "git+https://github.com/ziren-patches/op-alloy?branch=patch-0.13.0#d0ee5a615eccbb23c3d610a297508bf26d2b6629" +version = "0.22.0" +source = "git+https://github.com/ziren-patches/op-alloy?branch=patch-0.22.0#20048eaa105b1c06ca4fca6108a047a2fda0c494" dependencies = [ - "alloy-consensus 0.14.0", - "alloy-eips 0.14.0", + "alloy-consensus", + "alloy-eips", + "alloy-network", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.14.0", - "derive_more 2.1.0", + "alloy-rpc-types-eth", + "alloy-serde", + "derive_more 2.1.1", "serde", "serde_with", "thiserror 2.0.17", @@ -5298,44 +5017,59 @@ dependencies = [ [[package]] name = "op-alloy-network" -version = "0.13.0" -source = "git+https://github.com/ziren-patches/op-alloy?branch=patch-0.13.0#d0ee5a615eccbb23c3d610a297508bf26d2b6629" +version = "0.22.0" +source = "git+https://github.com/ziren-patches/op-alloy?branch=patch-0.22.0#20048eaa105b1c06ca4fca6108a047a2fda0c494" dependencies = [ - "alloy-consensus 0.14.0", - "alloy-network 0.14.0", + "alloy-consensus", + "alloy-network", "alloy-primitives", - "alloy-rpc-types-eth 0.14.0", - "alloy-signer 0.14.0", + "alloy-provider", + "alloy-rpc-types-eth", + "alloy-signer 1.0.41", "op-alloy-consensus", "op-alloy-rpc-types", ] [[package]] name = "op-alloy-rpc-types" -version = "0.13.0" -source = "git+https://github.com/ziren-patches/op-alloy?branch=patch-0.13.0#d0ee5a615eccbb23c3d610a297508bf26d2b6629" +version = "0.22.0" +source = "git+https://github.com/ziren-patches/op-alloy?branch=patch-0.22.0#20048eaa105b1c06ca4fca6108a047a2fda0c494" dependencies = [ - "alloy-consensus 0.14.0", - "alloy-eips 0.14.0", - "alloy-network-primitives 0.14.0", + "alloy-consensus", + "alloy-eips", + "alloy-network-primitives", "alloy-primitives", - "alloy-rpc-types-eth 0.14.0", - "alloy-serde 0.14.0", - "derive_more 2.1.0", + "alloy-rpc-types-eth", + "alloy-serde", + "derive_more 2.1.1", "op-alloy-consensus", "serde", "serde_json", + "thiserror 2.0.17", +] + +[[package]] +name = "op-alloy-rpc-types-engine" +version = "0.22.0" +source = "git+https://github.com/ziren-patches/op-alloy?branch=patch-0.22.0#20048eaa105b1c06ca4fca6108a047a2fda0c494" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "alloy-rpc-types-engine", + "derive_more 2.1.1", + "op-alloy-consensus", + "thiserror 2.0.17", ] [[package]] name = "op-revm" -version = "3.0.1" -source = "git+https://github.com/ziren-patches/revm?branch=patch-22.0.0#ea223141ce8bd77714cbdf7ac302f82b0ba81437" +version = "12.0.2" +source = "git+https://github.com/ziren-patches/revm?branch=patch-31.0.2#bff54bca9f9b64845c255fe6b94a58c136e846c1" dependencies = [ "auto_impl", - "once_cell", "revm", - "serde", ] [[package]] @@ -5779,7 +5513,7 @@ version = "3.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34b4653168b563151153c9e4c08ebed57fb8262bebfa79711552fa983c623e7a" dependencies = [ - "proc-macro-crate 3.4.0", + "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.111", @@ -5883,16 +5617,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] -name = "path-slash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e91099d4268b0e11973f036e885d652fb0b21fedcf69738c627f94db6a44f42" - -[[package]] -name = "pathdiff" -version = "0.2.3" +name = "path-slash" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3" +checksum = "1e91099d4268b0e11973f036e885d652fb0b21fedcf69738c627f94db6a44f42" [[package]] name = "pbkdf2" @@ -5986,8 +5714,18 @@ version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" dependencies = [ - "phf_macros", - "phf_shared", + "phf_macros 0.11.3", + "phf_shared 0.11.3", +] + +[[package]] +name = "phf" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf" +dependencies = [ + "phf_macros 0.13.1", + "phf_shared 0.13.1", "serde", ] @@ -5997,18 +5735,41 @@ version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" dependencies = [ - "phf_shared", + "phf_shared 0.11.3", "rand 0.8.5", ] +[[package]] +name = "phf_generator" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "135ace3a761e564ec88c03a77317a7c6b80bb7f7135ef2544dbe054243b89737" +dependencies = [ + "fastrand", + "phf_shared 0.13.1", +] + [[package]] name = "phf_macros" version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216" dependencies = [ - "phf_generator", - "phf_shared", + "phf_generator 0.11.3", + "phf_shared 0.11.3", + "proc-macro2", + "quote", + "syn 2.0.111", +] + +[[package]] +name = "phf_macros" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "812f032b54b1e759ccd5f8b6677695d5268c588701effba24601f6932f8269ef" +dependencies = [ + "phf_generator 0.13.1", + "phf_shared 0.13.1", "proc-macro2", "quote", "syn 2.0.111", @@ -6023,6 +5784,15 @@ dependencies = [ "siphasher", ] +[[package]] +name = "phf_shared" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266" +dependencies = [ + "siphasher", +] + [[package]] name = "pin-project" version = "1.1.10" @@ -6073,18 +5843,9 @@ checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" [[package]] name = "portable-atomic" -version = "1.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" - -[[package]] -name = "portable-atomic-util" -version = "0.2.4" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507" -dependencies = [ - "portable-atomic", -] +checksum = "f59e70c4aef1e55797c2e8fd94a4f2a973fc972cfde0e0b05f683667b0cd39dd" [[package]] name = "potential_utf" @@ -6162,6 +5923,7 @@ dependencies = [ name = "primitives" version = "0.1.0" dependencies = [ + "alloy-eips", "alloy-genesis", "alloy-rpc-types", "eyre", @@ -6174,23 +5936,13 @@ dependencies = [ "serde_json", ] -[[package]] -name = "proc-macro-crate" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" -dependencies = [ - "once_cell", - "toml_edit 0.19.15", -] - [[package]] name = "proc-macro-crate" version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "219cb19e96be00ab2e37d6e299658a0cfa83e52429179969b0f0121b4ac46983" dependencies = [ - "toml_edit 0.23.9", + "toml_edit 0.23.10+spec-1.0.0", ] [[package]] @@ -6353,7 +6105,7 @@ dependencies = [ name = "provider" version = "0.1.0" dependencies = [ - "alloy-json-rpc 0.14.0", + "alloy-json-rpc", "alloy-provider", "alloy-rpc-client", "alloy-transport", @@ -6676,9 +6428,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.12.25" +version = "0.12.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6eff9328d40131d43bd911d42d79eb6a47312002a4daefc9e37f17e74a7701a" +checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" dependencies = [ "base64 0.22.1", "bytes", @@ -6727,7 +6479,7 @@ dependencies = [ "anyhow", "async-trait", "http 1.4.0", - "reqwest 0.12.25", + "reqwest 0.12.28", "serde", "thiserror 1.0.69", "tower-service", @@ -6746,7 +6498,7 @@ dependencies = [ "http 1.4.0", "hyper 1.8.1", "parking_lot 0.11.2", - "reqwest 0.12.25", + "reqwest 0.12.28", "reqwest-middleware", "retry-policies", "tokio", @@ -6762,18 +6514,18 @@ checksum = "1e061d1b48cb8d38042de4ae0a7a6401009d6143dc80d2e2d6f31f0bdd6470c7" [[package]] name = "reth-chainspec" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ "alloy-chains", - "alloy-consensus 0.14.0", - "alloy-eips 0.14.0", + "alloy-consensus", + "alloy-eips", "alloy-evm", "alloy-genesis", "alloy-primitives", - "alloy-trie 0.8.1", + "alloy-trie 0.9.2", "auto_impl", - "derive_more 2.1.0", + "derive_more 2.1.1", "reth-ethereum-forks", "reth-network-peers", "reth-primitives-traits", @@ -6782,14 +6534,14 @@ dependencies = [ [[package]] name = "reth-codecs" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ - "alloy-consensus 0.14.0", - "alloy-eips 0.14.0", + "alloy-consensus", + "alloy-eips", "alloy-genesis", "alloy-primitives", - "alloy-trie 0.8.1", + "alloy-trie 0.9.2", "bytes", "modular-bitfield", "op-alloy-consensus", @@ -6800,10 +6552,9 @@ dependencies = [ [[package]] name = "reth-codecs-derive" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ - "convert_case 0.7.1", "proc-macro2", "quote", "syn 2.0.111", @@ -6811,10 +6562,10 @@ dependencies = [ [[package]] name = "reth-consensus" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ - "alloy-consensus 0.14.0", + "alloy-consensus", "alloy-primitives", "auto_impl", "reth-execution-types", @@ -6824,11 +6575,11 @@ dependencies = [ [[package]] name = "reth-consensus-common" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ - "alloy-consensus 0.14.0", - "alloy-eips 0.14.0", + "alloy-consensus", + "alloy-eips", "reth-chainspec", "reth-consensus", "reth-primitives-traits", @@ -6836,33 +6587,32 @@ dependencies = [ [[package]] name = "reth-db-models" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ - "alloy-eips 0.14.0", + "alloy-eips", "alloy-primitives", "reth-primitives-traits", ] [[package]] name = "reth-errors" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ "reth-consensus", "reth-execution-errors", - "reth-fs-util", "reth-storage-errors", "thiserror 2.0.17", ] [[package]] name = "reth-ethereum-consensus" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ - "alloy-consensus 0.14.0", - "alloy-eips 0.14.0", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "reth-chainspec", "reth-consensus", @@ -6874,8 +6624,8 @@ dependencies = [ [[package]] name = "reth-ethereum-forks" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ "alloy-eip2124", "alloy-hardforks", @@ -6886,39 +6636,34 @@ dependencies = [ [[package]] name = "reth-ethereum-primitives" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ - "alloy-consensus 0.14.0", - "alloy-eips 0.14.0", - "alloy-evm", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", - "alloy-rpc-types-eth 0.14.0", - "derive_more 2.1.0", - "rand 0.8.5", + "alloy-rpc-types-eth", + "alloy-serde", "reth-codecs", "reth-primitives-traits", - "revm-context", - "secp256k1", "serde", "serde_with", ] [[package]] name = "reth-evm" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ - "alloy-consensus 0.14.0", - "alloy-eips 0.14.0", + "alloy-consensus", + "alloy-eips", "alloy-evm", "alloy-primitives", "anyhow", "auto_impl", - "derive_more 2.1.0", + "derive_more 2.1.1", "futures-util", - "op-revm", "reth-execution-errors", "reth-execution-types", "reth-primitives-traits", @@ -6931,74 +6676,57 @@ dependencies = [ [[package]] name = "reth-evm-ethereum" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ - "alloy-consensus 0.14.0", - "alloy-eips 0.14.0", + "alloy-consensus", + "alloy-eips", "alloy-evm", "alloy-primitives", + "alloy-rpc-types-engine", "reth-chainspec", "reth-ethereum-forks", "reth-ethereum-primitives", "reth-evm", "reth-execution-types", "reth-primitives-traits", + "reth-storage-errors", "revm", ] [[package]] name = "reth-execution-errors" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ "alloy-evm", "alloy-primitives", "alloy-rlp", - "nybbles 0.3.4", + "nybbles 0.4.6", "reth-storage-errors", "thiserror 2.0.17", ] [[package]] name = "reth-execution-types" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ - "alloy-consensus 0.14.0", - "alloy-eips 0.14.0", + "alloy-consensus", + "alloy-eips", "alloy-evm", "alloy-primitives", - "derive_more 2.1.0", + "derive_more 2.1.1", "reth-ethereum-primitives", "reth-primitives-traits", "reth-trie-common", "revm", ] -[[package]] -name = "reth-fs-util" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" -dependencies = [ - "serde", - "serde_json", - "thiserror 2.0.17", -] - -[[package]] -name = "reth-metrics" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" -dependencies = [ - "metrics", - "metrics-derive", -] - [[package]] name = "reth-network-peers" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -7009,16 +6737,17 @@ dependencies = [ [[package]] name = "reth-optimism-chainspec" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ "alloy-chains", - "alloy-consensus 0.14.0", - "alloy-eips 0.14.0", + "alloy-consensus", + "alloy-eips", "alloy-genesis", "alloy-hardforks", "alloy-primitives", - "derive_more 2.1.0", + "derive_more 2.1.1", + "op-alloy-consensus", "op-alloy-rpc-types", "reth-chainspec", "reth-ethereum-forks", @@ -7031,18 +6760,18 @@ dependencies = [ [[package]] name = "reth-optimism-consensus" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ - "alloy-consensus 0.14.0", - "alloy-eips 0.14.0", + "alloy-consensus", + "alloy-eips", "alloy-primitives", - "alloy-trie 0.8.1", - "op-alloy-consensus", + "alloy-trie 0.9.2", "reth-chainspec", "reth-consensus", "reth-consensus-common", "reth-execution-types", + "reth-optimism-chainspec", "reth-optimism-forks", "reth-optimism-primitives", "reth-primitives-traits", @@ -7056,15 +6785,16 @@ dependencies = [ [[package]] name = "reth-optimism-evm" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ - "alloy-consensus 0.14.0", - "alloy-eips 0.14.0", + "alloy-consensus", + "alloy-eips", "alloy-evm", "alloy-op-evm", "alloy-primitives", "op-alloy-consensus", + "op-alloy-rpc-types-engine", "op-revm", "reth-chainspec", "reth-evm", @@ -7075,14 +6805,15 @@ dependencies = [ "reth-optimism-forks", "reth-optimism-primitives", "reth-primitives-traits", + "reth-storage-errors", "revm", "thiserror 2.0.17", ] [[package]] name = "reth-optimism-forks" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ "alloy-op-hardforks", "alloy-primitives", @@ -7092,43 +6823,36 @@ dependencies = [ [[package]] name = "reth-optimism-primitives" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ - "alloy-consensus 0.14.0", - "alloy-eips 0.14.0", - "alloy-evm", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", - "alloy-rpc-types-eth 0.14.0", "bytes", - "derive_more 2.1.0", "op-alloy-consensus", - "op-revm", - "rand 0.8.5", "reth-codecs", "reth-primitives-traits", - "revm-context", - "secp256k1", "serde", "serde_with", ] [[package]] name = "reth-primitives-traits" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ - "alloy-consensus 0.14.0", - "alloy-eips 0.14.0", + "alloy-consensus", + "alloy-eips", "alloy-genesis", "alloy-primitives", "alloy-rlp", - "alloy-trie 0.8.1", + "alloy-rpc-types-eth", + "alloy-trie 0.9.2", "auto_impl", "bytes", - "derive_more 2.1.0", - "k256", + "derive_more 2.1.1", "once_cell", "op-alloy-consensus", "reth-codecs", @@ -7143,18 +6867,19 @@ dependencies = [ [[package]] name = "reth-prune-types" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ "alloy-primitives", - "derive_more 2.1.0", + "derive_more 2.1.1", + "strum 0.27.2", "thiserror 2.0.17", ] [[package]] name = "reth-stages-types" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ "alloy-primitives", "reth-trie-common", @@ -7162,22 +6887,22 @@ dependencies = [ [[package]] name = "reth-static-file-types" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ "alloy-primitives", - "derive_more 2.1.0", + "derive_more 2.1.1", "serde", "strum 0.27.2", ] [[package]] name = "reth-storage-api" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ - "alloy-consensus 0.14.0", - "alloy-eips 0.14.0", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rpc-types-engine", "auto_impl", @@ -7195,13 +6920,13 @@ dependencies = [ [[package]] name = "reth-storage-errors" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ - "alloy-eips 0.14.0", + "alloy-eips", "alloy-primitives", "alloy-rlp", - "derive_more 2.1.0", + "derive_more 2.1.1", "reth-primitives-traits", "reth-prune-types", "reth-static-file-types", @@ -7209,31 +6934,16 @@ dependencies = [ "thiserror 2.0.17", ] -[[package]] -name = "reth-tracing" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" -dependencies = [ - "clap", - "eyre", - "rolling-file", - "tracing", - "tracing-appender", - "tracing-journald", - "tracing-logfmt", - "tracing-subscriber", -] - [[package]] name = "reth-trie" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ - "alloy-consensus 0.14.0", - "alloy-eips 0.14.0", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", - "alloy-trie 0.8.1", + "alloy-trie 0.9.2", "auto_impl", "itertools 0.14.0", "reth-execution-errors", @@ -7248,16 +6958,16 @@ dependencies = [ [[package]] name = "reth-trie-common" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ - "alloy-consensus 0.14.0", + "alloy-consensus", "alloy-primitives", "alloy-rlp", - "alloy-trie 0.8.1", - "derive_more 2.1.0", + "alloy-trie 0.9.2", + "derive_more 2.1.1", "itertools 0.14.0", - "nybbles 0.3.4", + "nybbles 0.4.6", "rayon", "reth-primitives-traits", "revm-database", @@ -7265,25 +6975,24 @@ dependencies = [ [[package]] name = "reth-trie-sparse" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ "alloy-primitives", "alloy-rlp", + "alloy-trie 0.9.2", "auto_impl", - "metrics", "reth-execution-errors", - "reth-metrics", "reth-primitives-traits", - "reth-tracing", "reth-trie-common", "smallvec", + "tracing", ] [[package]] name = "reth-zstd-compressors" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ "zstd 0.13.3", ] @@ -7299,8 +7008,8 @@ dependencies = [ [[package]] name = "revm" -version = "22.0.0" -source = "git+https://github.com/ziren-patches/revm?branch=patch-22.0.0#ea223141ce8bd77714cbdf7ac302f82b0ba81437" +version = "31.0.2" +source = "git+https://github.com/ziren-patches/revm?branch=patch-31.0.2#bff54bca9f9b64845c255fe6b94a58c136e846c1" dependencies = [ "revm-bytecode", "revm-context", @@ -7317,21 +7026,22 @@ dependencies = [ [[package]] name = "revm-bytecode" -version = "3.0.0" -source = "git+https://github.com/ziren-patches/revm?branch=patch-22.0.0#ea223141ce8bd77714cbdf7ac302f82b0ba81437" +version = "7.1.1" +source = "git+https://github.com/ziren-patches/revm?branch=patch-31.0.2#bff54bca9f9b64845c255fe6b94a58c136e846c1" dependencies = [ "bitvec", - "phf", + "phf 0.13.1", "revm-primitives", "serde", ] [[package]] name = "revm-context" -version = "3.0.0" -source = "git+https://github.com/ziren-patches/revm?branch=patch-22.0.0#ea223141ce8bd77714cbdf7ac302f82b0ba81437" +version = "11.0.2" +source = "git+https://github.com/ziren-patches/revm?branch=patch-31.0.2#bff54bca9f9b64845c255fe6b94a58c136e846c1" dependencies = [ - "alloy-consensus 0.14.0", + "alloy-consensus", + "bitvec", "cfg-if", "derive-where", "revm-bytecode", @@ -7344,13 +7054,14 @@ dependencies = [ [[package]] name = "revm-context-interface" -version = "3.0.0" -source = "git+https://github.com/ziren-patches/revm?branch=patch-22.0.0#ea223141ce8bd77714cbdf7ac302f82b0ba81437" +version = "12.0.1" +source = "git+https://github.com/ziren-patches/revm?branch=patch-31.0.2#bff54bca9f9b64845c255fe6b94a58c136e846c1" dependencies = [ - "alloy-consensus 0.14.0", + "alloy-consensus", "alloy-eip2930", "alloy-eip7702", "auto_impl", + "either", "revm-database-interface", "revm-primitives", "revm-state", @@ -7359,10 +7070,10 @@ dependencies = [ [[package]] name = "revm-database" -version = "3.0.0" -source = "git+https://github.com/ziren-patches/revm?branch=patch-22.0.0#ea223141ce8bd77714cbdf7ac302f82b0ba81437" +version = "9.0.5" +source = "git+https://github.com/ziren-patches/revm?branch=patch-31.0.2#bff54bca9f9b64845c255fe6b94a58c136e846c1" dependencies = [ - "alloy-eips 0.14.0", + "alloy-eips", "revm-bytecode", "revm-database-interface", "revm-primitives", @@ -7372,10 +7083,11 @@ dependencies = [ [[package]] name = "revm-database-interface" -version = "3.0.0" -source = "git+https://github.com/ziren-patches/revm?branch=patch-22.0.0#ea223141ce8bd77714cbdf7ac302f82b0ba81437" +version = "8.0.5" +source = "git+https://github.com/ziren-patches/revm?branch=patch-31.0.2#bff54bca9f9b64845c255fe6b94a58c136e846c1" dependencies = [ "auto_impl", + "either", "revm-primitives", "revm-state", "serde", @@ -7383,10 +7095,11 @@ dependencies = [ [[package]] name = "revm-handler" -version = "3.0.0" -source = "git+https://github.com/ziren-patches/revm?branch=patch-22.0.0#ea223141ce8bd77714cbdf7ac302f82b0ba81437" +version = "12.0.2" +source = "git+https://github.com/ziren-patches/revm?branch=patch-31.0.2#bff54bca9f9b64845c255fe6b94a58c136e846c1" dependencies = [ "auto_impl", + "derive-where", "revm-bytecode", "revm-context", "revm-context-interface", @@ -7400,10 +7113,11 @@ dependencies = [ [[package]] name = "revm-inspector" -version = "3.0.0" -source = "git+https://github.com/ziren-patches/revm?branch=patch-22.0.0#ea223141ce8bd77714cbdf7ac302f82b0ba81437" +version = "12.0.2" +source = "git+https://github.com/ziren-patches/revm?branch=patch-31.0.2#bff54bca9f9b64845c255fe6b94a58c136e846c1" dependencies = [ "auto_impl", + "either", "revm-context", "revm-database-interface", "revm-handler", @@ -7415,30 +7129,30 @@ dependencies = [ [[package]] name = "revm-interpreter" -version = "18.0.0" -source = "git+https://github.com/ziren-patches/revm?branch=patch-22.0.0#ea223141ce8bd77714cbdf7ac302f82b0ba81437" +version = "29.0.1" +source = "git+https://github.com/ziren-patches/revm?branch=patch-31.0.2#bff54bca9f9b64845c255fe6b94a58c136e846c1" dependencies = [ "revm-bytecode", "revm-context-interface", "revm-primitives", + "revm-state", "serde", ] [[package]] name = "revm-precompile" -version = "19.0.0" -source = "git+https://github.com/ziren-patches/revm?branch=patch-22.0.0#ea223141ce8bd77714cbdf7ac302f82b0ba81437" +version = "29.0.1" +source = "git+https://github.com/ziren-patches/revm?branch=patch-31.0.2#bff54bca9f9b64845c255fe6b94a58c136e846c1" dependencies = [ "ark-bls12-381", "ark-bn254", "ark-ec", "ark-ff 0.5.0", "ark-serialize 0.5.0", + "arrayref", "aurora-engine-modexp", "cfg-if", "k256", - "kzg-rs", - "once_cell", "p256", "revm-primitives", "ripemd", @@ -7448,18 +7162,19 @@ dependencies = [ [[package]] name = "revm-primitives" -version = "18.0.0" -source = "git+https://github.com/ziren-patches/revm?branch=patch-22.0.0#ea223141ce8bd77714cbdf7ac302f82b0ba81437" +version = "21.0.2" +source = "git+https://github.com/ziren-patches/revm?branch=patch-31.0.2#bff54bca9f9b64845c255fe6b94a58c136e846c1" dependencies = [ "alloy-primitives", - "enumn", + "num_enum", + "once_cell", "serde", ] [[package]] name = "revm-state" -version = "3.0.0" -source = "git+https://github.com/ziren-patches/revm?branch=patch-22.0.0#ea223141ce8bd77714cbdf7ac302f82b0ba81437" +version = "8.1.1" +source = "git+https://github.com/ziren-patches/revm?branch=patch-31.0.2#bff54bca9f9b64845c255fe6b94a58c136e846c1" dependencies = [ "bitflags 2.10.0", "revm-bytecode", @@ -7536,45 +7251,29 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "rolling-file" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8395b4f860856b740f20a296ea2cd4d823e81a2658cf05ef61be22916026a906" -dependencies = [ - "chrono", -] - [[package]] name = "rpc-db" version = "0.1.0" dependencies = [ + "alloy-consensus", "alloy-primitives", "alloy-provider", - "alloy-rpc-types", - "indexmap 2.12.1", + "alloy-rlp", + "alloy-transport", + "alloy-trie 0.8.1", + "async-trait", + "mpt", + "primitives", "reth-storage-errors", + "revm-database", "revm-database-interface", "revm-primitives", "revm-state", - "serde", - "serde_json", "thiserror 1.0.69", "tokio", "tracing", ] -[[package]] -name = "rrs-succinct" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3372685893a9f67d18e98e792d690017287fd17379a83d798d958e517d380fa9" -dependencies = [ - "downcast-rs", - "num_enum 0.5.11", - "paste", -] - [[package]] name = "ruint" version = "1.17.0" @@ -7666,9 +7365,9 @@ dependencies = [ [[package]] name = "rustix" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e" +checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34" dependencies = [ "bitflags 2.10.0", "errno", @@ -7738,9 +7437,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.13.1" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "708c0f9d5f54ba0272468c1d306a52c495b31fa155e91bc25371e6df7996908c" +checksum = "21e6f2ab2928ca4291b86736a8bd920a277a399bba1589409d72154ff87c1282" dependencies = [ "web-time", "zeroize", @@ -7787,9 +7486,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.20" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" +checksum = "62049b2877bf12821e8f9ad256ee38fdc31db7387ec2d3b3f403024de2034aea" [[package]] name = "salsa20" @@ -7827,7 +7526,7 @@ version = "2.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6630024bf739e2179b91fb424b28898baf819414262c5d376677dbff1fe7ebf" dependencies = [ - "proc-macro-crate 3.4.0", + "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.111", @@ -8058,15 +7757,15 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.145" +version = "1.0.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" +checksum = "6af14725505314343e673e9ecb7cd7e8a36aa9791eb936235a3567cc31447ae4" dependencies = [ "itoa", "memchr", - "ryu", "serde", "serde_core", + "zmij", ] [[package]] @@ -8192,8 +7891,8 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.8" -source = "git+https://github.com/ziren-patches/RustCrypto-hashes?branch=patch-sha2-0.10.8#62d9223ba171ef6d5b637b275c4b982f56d0a949" +version = "0.10.9" +source = "git+https://github.com/ziren-patches/RustCrypto-hashes?branch=patch-sha2-0.10.9#dbfdbd088ac7b55e03c0b9eb192278efe35d67dc" dependencies = [ "cfg-if", "cpufeatures", @@ -8338,7 +8037,7 @@ dependencies = [ "itertools 0.11.0", "lalrpop", "lalrpop-util", - "phf", + "phf 0.11.3", "thiserror 1.0.69", "unicode-xid", ] @@ -8391,7 +8090,7 @@ checksum = "bf776ba3fa74f83bf4b63c3dcbbf82173db2632ed8452cb2d891d33f459de70f" dependencies = [ "new_debug_unreachable", "parking_lot 0.12.5", - "phf_shared", + "phf_shared 0.11.3", "precomputed-hash", ] @@ -8516,9 +8215,9 @@ dependencies = [ [[package]] name = "syn-solidity" -version = "1.4.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff790eb176cc81bb8936aed0f7b9f14fc4670069a2d371b3e3b0ecce908b2cb3" +checksum = "5f92d01b5de07eaf324f7fca61cc6bd3d82bbc1de5b6c963e6fe79e86f36580d" dependencies = [ "paste", "proc-macro2", @@ -8617,14 +8316,14 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.23.0" +version = "3.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d31c77bdf42a745371d260a26ca7163f1e0924b64afa0b688e61b5a9fa02f16" +checksum = "655da9c7eb6305c55742045d5a8d2037996d61d8de95806335c7c86ce0f82e9c" dependencies = [ "fastrand", "getrandom 0.3.4", "once_cell", - "rustix 1.1.2", + "rustix 1.1.3", "windows-sys 0.61.2", ] @@ -8928,24 +8627,13 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.7.3" +version = "0.7.5+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2cdb639ebbc97961c51720f858597f7f24c4fc295327923af55b74c3c724533" +checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" dependencies = [ "serde_core", ] -[[package]] -name = "toml_edit" -version = "0.19.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" -dependencies = [ - "indexmap 2.12.1", - "toml_datetime 0.6.11", - "winnow 0.5.40", -] - [[package]] name = "toml_edit" version = "0.22.27" @@ -8957,28 +8645,28 @@ dependencies = [ "serde_spanned", "toml_datetime 0.6.11", "toml_write", - "winnow 0.7.14", + "winnow", ] [[package]] name = "toml_edit" -version = "0.23.9" +version = "0.23.10+spec-1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d7cbc3b4b49633d57a0509303158ca50de80ae32c265093b24c414705807832" +checksum = "84c8b9f757e028cee9fa244aea147aab2a9ec09d5325a9b01e0a49730c2b5269" dependencies = [ "indexmap 2.12.1", - "toml_datetime 0.7.3", + "toml_datetime 0.7.5+spec-1.1.0", "toml_parser", - "winnow 0.7.14", + "winnow", ] [[package]] name = "toml_parser" -version = "1.0.4" +version = "1.0.6+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0cbe268d35bdb4bb5a56a2de88d0ad0eb70af5384a99d648cd4b3d04039800e" +checksum = "a3198b4b0a8e11f09dd03e133c0280504d0801269e9afa46362ffde1cbeebf44" dependencies = [ - "winnow 0.7.14", + "winnow", ] [[package]] @@ -9103,9 +8791,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.43" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d15d90a0b5c19378952d479dc858407149d7bb45a14de0142f6c534b16fc647" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" dependencies = [ "log", "pin-project-lite", @@ -9113,18 +8801,6 @@ dependencies = [ "tracing-core", ] -[[package]] -name = "tracing-appender" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "786d480bce6247ab75f005b14ae1624ad978d3029d9113f0a22fa1ac773faeaf" -dependencies = [ - "crossbeam-channel", - "thiserror 2.0.17", - "time", - "tracing-subscriber", -] - [[package]] name = "tracing-attributes" version = "0.1.31" @@ -9138,9 +8814,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.35" +version = "0.1.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a04e24fab5c89c6a36eb8558c9656f30d81de51dfa4d3b45f26b21d61fa0a6c" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" dependencies = [ "once_cell", "valuable", @@ -9165,23 +8841,10 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" dependencies = [ - "futures", - "futures-task", "pin-project", "tracing", ] -[[package]] -name = "tracing-journald" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3a81ed245bfb62592b1e2bc153e77656d94ee6a0497683a65a12ccaf2438d0" -dependencies = [ - "libc", - "tracing-core", - "tracing-subscriber", -] - [[package]] name = "tracing-log" version = "0.2.0" @@ -9193,28 +8856,6 @@ dependencies = [ "tracing-core", ] -[[package]] -name = "tracing-logfmt" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b1f47d22deb79c3f59fcf2a1f00f60cbdc05462bf17d1cd356c1fefa3f444bd" -dependencies = [ - "time", - "tracing", - "tracing-core", - "tracing-subscriber", -] - -[[package]] -name = "tracing-serde" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "704b1aeb7be0d0a84fc9828cae51dab5970fee5088f83d1dd7ee6f6246fc6ff1" -dependencies = [ - "serde", - "tracing-core", -] - [[package]] name = "tracing-subscriber" version = "0.3.22" @@ -9225,15 +8866,12 @@ dependencies = [ "nu-ansi-term", "once_cell", "regex-automata", - "serde", - "serde_json", "sharded-slab", "smallvec", "thread_local", "tracing", "tracing-core", "tracing-log", - "tracing-serde", ] [[package]] @@ -9313,7 +8951,7 @@ dependencies = [ "http-body-util", "hyper 1.8.1", "prost 0.13.5", - "reqwest 0.12.25", + "reqwest 0.12.28", "serde", "serde_json", "thiserror 1.0.69", @@ -10068,15 +9706,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" -[[package]] -name = "winnow" -version = "0.5.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" -dependencies = [ - "memchr", -] - [[package]] name = "winnow" version = "0.7.14" @@ -10330,26 +9959,24 @@ dependencies = [ [[package]] name = "zkm-build" version = "1.2.3" -source = "git+https://github.com/ProjectZKM/Ziren#be43a854e4be21c11fb87304f9794dc9137b492d" +source = "git+https://github.com/ProjectZKM/Ziren#03e3cef63e04e5d8b1d7e41a784dd4c3fbc3dfd4" dependencies = [ "anyhow", "cargo_metadata", "chrono", "clap", - "dirs", ] [[package]] name = "zkm-core-executor" version = "1.2.3" -source = "git+https://github.com/ProjectZKM/Ziren#be43a854e4be21c11fb87304f9794dc9137b492d" +source = "git+https://github.com/ProjectZKM/Ziren#03e3cef63e04e5d8b1d7e41a784dd4c3fbc3dfd4" dependencies = [ "anyhow", "bincode", "bytemuck", "elf", "enum-map", - "env_logger", "eyre", "hashbrown 0.14.5", "hex", @@ -10363,7 +9990,6 @@ dependencies = [ "p3-symmetric", "rand 0.8.5", "rayon-scan", - "rrs-succinct", "serde", "serde_json", "sha2", @@ -10372,7 +9998,6 @@ dependencies = [ "thiserror 1.0.69", "tiny-keccak", "tracing", - "tracing-subscriber", "typenum", "vec_map", "zkm-curves", @@ -10383,15 +10008,12 @@ dependencies = [ [[package]] name = "zkm-core-machine" version = "1.2.3" -source = "git+https://github.com/ProjectZKM/Ziren#be43a854e4be21c11fb87304f9794dc9137b492d" +source = "git+https://github.com/ProjectZKM/Ziren#03e3cef63e04e5d8b1d7e41a784dd4c3fbc3dfd4" dependencies = [ "bincode", - "cbindgen", - "cc", "cfg-if", "elliptic-curve", "generic-array 1.3.5", - "glob", "hashbrown 0.14.5", "hex", "itertools 0.13.0", @@ -10410,7 +10032,6 @@ dependencies = [ "p3-poseidon2", "p3-uni-stark", "p3-util", - "pathdiff", "rand 0.8.5", "rayon", "rayon-scan", @@ -10439,7 +10060,7 @@ dependencies = [ [[package]] name = "zkm-cuda" version = "1.2.3" -source = "git+https://github.com/ProjectZKM/Ziren#be43a854e4be21c11fb87304f9794dc9137b492d" +source = "git+https://github.com/ProjectZKM/Ziren#03e3cef63e04e5d8b1d7e41a784dd4c3fbc3dfd4" dependencies = [ "bincode", "ctrlc", @@ -10457,7 +10078,7 @@ dependencies = [ [[package]] name = "zkm-curves" version = "1.2.3" -source = "git+https://github.com/ProjectZKM/Ziren#be43a854e4be21c11fb87304f9794dc9137b492d" +source = "git+https://github.com/ProjectZKM/Ziren#03e3cef63e04e5d8b1d7e41a784dd4c3fbc3dfd4" dependencies = [ "cfg-if", "curve25519-dalek", @@ -10471,6 +10092,8 @@ dependencies = [ "p3-field", "serde", "snowbridge-amcl", + "thiserror 1.0.69", + "tracing", "typenum", "zkm-primitives", "zkm-stark", @@ -10479,7 +10102,7 @@ dependencies = [ [[package]] name = "zkm-derive" version = "1.2.3" -source = "git+https://github.com/ProjectZKM/Ziren#be43a854e4be21c11fb87304f9794dc9137b492d" +source = "git+https://github.com/ProjectZKM/Ziren#03e3cef63e04e5d8b1d7e41a784dd4c3fbc3dfd4" dependencies = [ "quote", "syn 1.0.109", @@ -10488,7 +10111,7 @@ dependencies = [ [[package]] name = "zkm-lib" version = "1.2.3" -source = "git+https://github.com/ProjectZKM/Ziren#be43a854e4be21c11fb87304f9794dc9137b492d" +source = "git+https://github.com/ProjectZKM/Ziren#03e3cef63e04e5d8b1d7e41a784dd4c3fbc3dfd4" dependencies = [ "bincode", "cfg-if", @@ -10501,7 +10124,7 @@ dependencies = [ [[package]] name = "zkm-primitives" version = "1.2.3" -source = "git+https://github.com/ProjectZKM/Ziren#be43a854e4be21c11fb87304f9794dc9137b492d" +source = "git+https://github.com/ProjectZKM/Ziren#03e3cef63e04e5d8b1d7e41a784dd4c3fbc3dfd4" dependencies = [ "bincode", "hex", @@ -10519,7 +10142,7 @@ dependencies = [ [[package]] name = "zkm-prover" version = "1.2.3" -source = "git+https://github.com/ProjectZKM/Ziren#be43a854e4be21c11fb87304f9794dc9137b492d" +source = "git+https://github.com/ProjectZKM/Ziren#03e3cef63e04e5d8b1d7e41a784dd4c3fbc3dfd4" dependencies = [ "anyhow", "bincode", @@ -10543,7 +10166,6 @@ dependencies = [ "serial_test", "thiserror 1.0.69", "tracing", - "tracing-appender", "tracing-subscriber", "zkm-core-executor", "zkm-core-machine", @@ -10558,7 +10180,7 @@ dependencies = [ [[package]] name = "zkm-recursion-circuit" version = "1.2.3" -source = "git+https://github.com/ProjectZKM/Ziren#be43a854e4be21c11fb87304f9794dc9137b492d" +source = "git+https://github.com/ProjectZKM/Ziren#03e3cef63e04e5d8b1d7e41a784dd4c3fbc3dfd4" dependencies = [ "hashbrown 0.14.5", "itertools 0.13.0", @@ -10591,7 +10213,7 @@ dependencies = [ [[package]] name = "zkm-recursion-compiler" version = "1.2.3" -source = "git+https://github.com/ProjectZKM/Ziren#be43a854e4be21c11fb87304f9794dc9137b492d" +source = "git+https://github.com/ProjectZKM/Ziren#03e3cef63e04e5d8b1d7e41a784dd4c3fbc3dfd4" dependencies = [ "backtrace", "itertools 0.13.0", @@ -10612,13 +10234,10 @@ dependencies = [ [[package]] name = "zkm-recursion-core" version = "1.2.3" -source = "git+https://github.com/ProjectZKM/Ziren#be43a854e4be21c11fb87304f9794dc9137b492d" +source = "git+https://github.com/ProjectZKM/Ziren#03e3cef63e04e5d8b1d7e41a784dd4c3fbc3dfd4" dependencies = [ "backtrace", - "cbindgen", - "cc", "ff 0.13.1", - "glob", "hashbrown 0.14.5", "itertools 0.13.0", "p3-air", @@ -10636,7 +10255,6 @@ dependencies = [ "p3-poseidon2", "p3-symmetric", "p3-util", - "pathdiff", "rand 0.8.5", "serde", "static_assertions", @@ -10653,7 +10271,7 @@ dependencies = [ [[package]] name = "zkm-recursion-derive" version = "1.2.3" -source = "git+https://github.com/ProjectZKM/Ziren#be43a854e4be21c11fb87304f9794dc9137b492d" +source = "git+https://github.com/ProjectZKM/Ziren#03e3cef63e04e5d8b1d7e41a784dd4c3fbc3dfd4" dependencies = [ "quote", "syn 1.0.109", @@ -10662,12 +10280,11 @@ dependencies = [ [[package]] name = "zkm-recursion-gnark-ffi" version = "1.2.3" -source = "git+https://github.com/ProjectZKM/Ziren#be43a854e4be21c11fb87304f9794dc9137b492d" +source = "git+https://github.com/ProjectZKM/Ziren#03e3cef63e04e5d8b1d7e41a784dd4c3fbc3dfd4" dependencies = [ "anyhow", "bincode", "bindgen", - "cc", "cfg-if", "hex", "log", @@ -10687,11 +10304,10 @@ dependencies = [ [[package]] name = "zkm-sdk" version = "1.2.3" -source = "git+https://github.com/ProjectZKM/Ziren#be43a854e4be21c11fb87304f9794dc9137b492d" +source = "git+https://github.com/ProjectZKM/Ziren#03e3cef63e04e5d8b1d7e41a784dd4c3fbc3dfd4" dependencies = [ - "alloy-signer 1.1.3", - "alloy-signer-local", - "alloy-sol-types", + "alloy-primitives", + "alloy-signer 1.2.1", "anyhow", "async-trait", "bincode", @@ -10735,7 +10351,7 @@ dependencies = [ [[package]] name = "zkm-stark" version = "1.2.3" -source = "git+https://github.com/ProjectZKM/Ziren#be43a854e4be21c11fb87304f9794dc9137b492d" +source = "git+https://github.com/ProjectZKM/Ziren#03e3cef63e04e5d8b1d7e41a784dd4c3fbc3dfd4" dependencies = [ "arrayref", "hashbrown 0.14.5", @@ -10777,12 +10393,13 @@ dependencies = [ [[package]] name = "zkm-zkvm" version = "1.2.3" -source = "git+https://github.com/ProjectZKM/Ziren#be43a854e4be21c11fb87304f9794dc9137b492d" +source = "git+https://github.com/ProjectZKM/Ziren#03e3cef63e04e5d8b1d7e41a784dd4c3fbc3dfd4" dependencies = [ "bincode", "cfg-if", "getrandom 0.2.16", "lazy_static", + "libm", "rand 0.8.5", "serde", "sha2", @@ -10790,6 +10407,12 @@ dependencies = [ "zkm-primitives", ] +[[package]] +name = "zmij" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e404bcd8afdaf006e529269d3e85a743f9480c3cef60034d77860d02964f3ba" + [[package]] name = "zstd" version = "0.11.2+zstd.1.5.2" @@ -10836,8 +10459,3 @@ dependencies = [ "cc", "pkg-config", ] - -[[patch.unused]] -name = "alloy-primitives" -version = "1.1.2" -source = "git+https://github.com/ziren-patches/core.git?branch=patch-alloy-primitives-1.1.2#288a6856fc6e4160e85903f2af1c4af92ed4ccf9" diff --git a/Cargo.toml b/Cargo.toml index 7a730b7..157c07b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -57,27 +57,29 @@ zkm-sdk = { git = "https://github.com/ProjectZKM/Ziren" } # zkm-prover = { path = "../Ziren/crates/prover" } # zkm-sdk = { path = "../Ziren/crates/sdk" } -# reth goat -reth-primitives-traits = { git = "https://github.com/ziren-patches/reth", branch = "patch-1.3.10", default-features = false } -reth-consensus = { git = "https://github.com/ziren-patches/reth", branch = "patch-1.3.10", default-features = false } -reth-evm = { git = "https://github.com/ziren-patches/reth", branch = "patch-1.3.10", default-features = false } -reth-evm-ethereum = { git = "https://github.com/ziren-patches/reth", branch = "patch-1.3.10", default-features = false } -reth-optimism-evm = { git = "https://github.com/ziren-patches/reth", branch = "patch-1.3.10", default-features = false } -reth-optimism-primitives = { git = "https://github.com/ziren-patches/reth", branch = "patch-1.3.10", default-features = false } -reth-storage-errors = { git = "https://github.com/ziren-patches/reth", branch = "patch-1.3.10", default-features = false } -reth-trie = { git = "https://github.com/ziren-patches/reth", branch = "patch-1.3.10", default-features = false } -reth-chainspec = { git = "https://github.com/ziren-patches/reth", branch = "patch-1.3.10", default-features = false } -reth-optimism-chainspec = { git = "https://github.com/ziren-patches/reth", branch = "patch-1.3.10", default-features = false } -reth-execution-types = { git = "https://github.com/ziren-patches/reth", branch = "patch-1.3.10", default-features = false } -reth-errors = { git = "https://github.com/ziren-patches/reth", branch = "patch-1.3.10", default-features = false } -reth-ethereum-consensus = { git = "https://github.com/ziren-patches/reth", branch = "patch-1.3.10", default-features = false } -reth-ethereum-primitives = { git = "https://github.com/ziren-patches/reth", branch = "patch-1.3.10", default-features = false, features = ["serde"] } -reth-optimism-consensus = { git = "https://github.com/ziren-patches/reth", branch = "patch-1.3.10", default-features = false } -reth-optimism-forks = { git = "https://github.com/ziren-patches/reth", branch = "patch-1.3.10", default-features = false } +# reth +reth-primitives-traits = { git = "https://github.com/ziren-patches/reth", branch = "patch-1.9.3", default-features = false } +reth-consensus = { git = "https://github.com/ziren-patches/reth", branch = "patch-1.9.3", default-features = false } +reth-consensus-common = { git = "https://github.com/ziren-patches/reth", branch = "patch-1.9.3", default-features = false } +reth-evm = { git = "https://github.com/ziren-patches/reth", branch = "patch-1.9.3", default-features = false } +reth-evm-ethereum = { git = "https://github.com/ziren-patches/reth", branch = "patch-1.9.3", default-features = false } +reth-optimism-evm = { git = "https://github.com/ziren-patches/reth", branch = "patch-1.9.3", default-features = false } +reth-optimism-primitives = { git = "https://github.com/ziren-patches/reth", branch = "patch-1.9.3", default-features = false } +reth-storage-errors = { git = "https://github.com/ziren-patches/reth", branch = "patch-1.9.3", default-features = false } +reth-trie = { git = "https://github.com/ziren-patches/reth", branch = "patch-1.9.3", default-features = false } +reth-chainspec = { git = "https://github.com/ziren-patches/reth", branch = "patch-1.9.3", default-features = false } +reth-optimism-chainspec = { git = "https://github.com/ziren-patches/reth", branch = "patch-1.9.3", default-features = false } +reth-execution-types = { git = "https://github.com/ziren-patches/reth", branch = "patch-1.9.3", default-features = false } +reth-errors = { git = "https://github.com/ziren-patches/reth", branch = "patch-1.9.3", default-features = false } +reth-ethereum-consensus = { git = "https://github.com/ziren-patches/reth", branch = "patch-1.9.3", default-features = false } +reth-ethereum-primitives = { git = "https://github.com/ziren-patches/reth", branch = "patch-1.9.3", default-features = false, features = ["serde"] } +reth-optimism-consensus = { git = "https://github.com/ziren-patches/reth", branch = "patch-1.9.3", default-features = false } +reth-optimism-forks = { git = "https://github.com/ziren-patches/reth", branch = "patch-1.9.3", default-features = false } # reth-primitives-traits = { path = "../patch/reth/crates/primitives-traits", default-features = false } # reth-consensus = { path = "../patch/reth/crates/consensus/consensus", default-features = false } -# reth-evm = { path = "../patch/reth/crates/evm", default-features = false } +# reth-consensus-common = { path = "../patch/reth/crates/consensus/common", default-features = false } +# reth-evm = { path = "../patch/reth/crates/evm/evm", default-features = false } # reth-evm-ethereum = { path = "../patch/reth/crates/ethereum/evm", default-features = false } # reth-optimism-evm = { path = "../patch/reth/crates/optimism/evm", default-features = false } # reth-optimism-primitives = { path = "../patch/reth/crates/optimism/primitives", default-features = false } @@ -92,26 +94,26 @@ reth-optimism-forks = { git = "https://github.com/ziren-patches/reth", branch = # reth-optimism-consensus = { path = "../patch/reth/crates/optimism/consensus", default-features = false } # reth-optimism-forks = { path = "../patch/reth/crates/optimism/hardforks", default-features = false } -# revm goat -revm = { git = "https://github.com/ziren-patches/revm", branch = "patch-22.0.0", features = [ +# revm +revm = { git = "https://github.com/ziren-patches/revm", branch = "patch-31.0.2", features = [ "serde", - "kzg-rs", "bn", ], default-features = false } -revm-bytecode = { git = "https://github.com/ziren-patches/revm", branch = "patch-22.0.0", default-features = false } -revm-state = { git = "https://github.com/ziren-patches/revm", branch = "patch-22.0.0", default-features = false } -revm-primitives = { git = "https://github.com/ziren-patches/revm", branch = "patch-22.0.0", features = [ +revm-bytecode = { git = "https://github.com/ziren-patches/revm", branch = "patch-31.0.2", default-features = false } +revm-state = { git = "https://github.com/ziren-patches/revm", branch = "patch-31.0.2", default-features = false } +revm-primitives = { git = "https://github.com/ziren-patches/revm", branch = "patch-31.0.2", features = [ "serde", ], default-features = false } -revm-interpreter = { git = "https://github.com/ziren-patches/revm", branch = "patch-22.0.0", default-features = false } -revm-precompile = { git = "https://github.com/ziren-patches/revm", branch = "patch-22.0.0", default-features = false } -revm-database-interface = { git = "https://github.com/ziren-patches/revm", branch = "patch-22.0.0", default-features = false } -op-revm = { git = "https://github.com/ziren-patches/revm", branch = "patch-22.0.0", default-features = false } -revm-inspectors = { git = "https://github.com/ziren-patches/revm-inspectors", branch = "patch-0.19.0" } +revm-interpreter = { git = "https://github.com/ziren-patches/revm", branch = "patch-31.0.2", default-features = false } +revm-precompile = { git = "https://github.com/ziren-patches/revm", branch = "patch-31.0.2", default-features = false } +revm-database = { git = "https://github.com/ziren-patches/revm", branch = "patch-31.0.2", default-features = false } +revm-database-interface = { git = "https://github.com/ziren-patches/revm", branch = "patch-31.0.2", default-features = false } +op-revm = { git = "https://github.com/ziren-patches/revm", branch = "patch-31.0.2", default-features = false } +revm-inspectors = { git = "https://github.com/ziren-patches/revm-inspectors", branch = "patch-0.32.0" } # revm = { path = "../patch/revm/crates/revm", features = [ # "serde", -# "kzg-rs", +# "bn", # ], default-features = false } # revm-bytecode = { path = "../patch/revm/crates/bytecode", default-features = false } # revm-state = { path = "../patch/revm/crates/state", default-features = false } @@ -120,6 +122,7 @@ revm-inspectors = { git = "https://github.com/ziren-patches/revm-inspectors", br # ], default-features = false } # revm-interpreter = { path = "../patch/revm/crates/interpreter", default-features = false } # revm-precompile = { path = "../patch/revm/crates/precompile", default-features = false } +# revm-database = { path = "../patch/revm/crates/database", default-features = false } # revm-database-interface = { path = "../patch/revm/crates/database/interface", default-features = false } # op-revm = { path = "../patch/revm/crates/optimism", default-features = false } # revm-inspectors = { path = "../patch/revm-inspectors" } @@ -130,26 +133,27 @@ alloy-primitives = { version = "1.0.0", default-features = false, features = ["s alloy-rlp = "0.3.10" alloy-trie = "0.8.1" -# alloy goat -alloy-evm = { git = "https://github.com/ziren-patches/evm", branch = "patch-0.4.0", default-features = false } -alloy-provider = { git = "https://github.com/ziren-patches/alloy", branch = "patch-0.14.0", default-features = false, features = [ +# alloy +alloy-evm = { git = "https://github.com/ziren-patches/evm", branch = "patch-0.23.0", default-features = false } +alloy-provider = { git = "https://github.com/ziren-patches/alloy", branch = "patch-1.0.41", default-features = false, features = [ "reqwest", "reqwest-rustls-tls", ] } -alloy-rpc-types = { git = "https://github.com/ziren-patches/alloy", branch = "patch-0.14.0", default-features = false, features = [ +alloy-rpc-types = { git = "https://github.com/ziren-patches/alloy", branch = "patch-1.0.41", default-features = false, features = [ "eth", ] } -alloy-json-rpc = { git = "https://github.com/ziren-patches/alloy", branch = "patch-0.14.0", default-features = false } -alloy-genesis = { git = "https://github.com/ziren-patches/alloy", branch = "patch-0.14.0", default-features = false } -alloy-consensus = { git = "https://github.com/ziren-patches/alloy", branch = "patch-0.14.0", default-features = false, features = ["serde", "serde-bincode-compat"] } -alloy-network = { git = "https://github.com/ziren-patches/alloy", branch = "patch-0.14.0", default-features = false } -alloy-transport = { git = "https://github.com/ziren-patches/alloy", branch = "patch-0.14.0", default-features = false } -alloy-transport-http = { git = "https://github.com/ziren-patches/alloy", branch = "patch-0.14.0", features = [ +alloy-rpc-types-debug = { git = "https://github.com/ziren-patches/alloy", branch = "patch-1.0.41", default-features = false } +alloy-json-rpc = { git = "https://github.com/ziren-patches/alloy", branch = "patch-1.0.41", default-features = false } +alloy-genesis = { git = "https://github.com/ziren-patches/alloy", branch = "patch-1.0.41", default-features = false } +alloy-consensus = { git = "https://github.com/ziren-patches/alloy", branch = "patch-1.0.41", default-features = false, features = ["serde", "serde-bincode-compat"] } +alloy-network = { git = "https://github.com/ziren-patches/alloy", branch = "patch-1.0.41", default-features = false } +alloy-transport = { git = "https://github.com/ziren-patches/alloy", branch = "patch-1.0.41", default-features = false } +alloy-transport-http = { git = "https://github.com/ziren-patches/alloy", branch = "patch-1.0.41", features = [ "reqwest-rustls-tls", ], default-features = false } -alloy-transport-ws = { git = "https://github.com/ziren-patches/alloy", branch = "patch-0.14.0" } -alloy-rpc-client = { git = "https://github.com/ziren-patches/alloy", branch = "patch-0.14.0", default-features = false } -alloy-eips = { git = "https://github.com/ziren-patches/alloy", branch = "patch-0.14.0", default-features = false } +alloy-transport-ws = { git = "https://github.com/ziren-patches/alloy", branch = "patch-1.0.41" } +alloy-rpc-client = { git = "https://github.com/ziren-patches/alloy", branch = "patch-1.0.41", default-features = false } +alloy-eips = { git = "https://github.com/ziren-patches/alloy", branch = "patch-1.0.41", default-features = false } # alloy-evm = { path = "../patch/evm/crates/evm", default-features = false } # alloy-provider = { path = "../patch/alloy/crates/provider", default-features = false, features = [ @@ -159,6 +163,7 @@ alloy-eips = { git = "https://github.com/ziren-patches/alloy", branch = "patch-0 # alloy-rpc-types = { path = "../patch/alloy/crates/rpc-types", default-features = false, features = [ # "eth", # ] } +# alloy-rpc-types-debug = { path = "../patch/alloy/crates/rpc-types-debug", default-features = false} # alloy-json-rpc = { path = "../patch/alloy/crates/json-rpc", default-features = false } # alloy-genesis = { path = "../patch/alloy/crates/genesis", default-features = false } # alloy-consensus = { path = "../patch/alloy/crates/consensus", default-features = false, features = ["serde", "serde-bincode-compat"] } @@ -172,16 +177,18 @@ alloy-eips = { git = "https://github.com/ziren-patches/alloy", branch = "patch-0 # alloy-eips = { path = "../patch/alloy/crates/eips", default-features = false } # op goat -alloy-op-evm = { git = "https://github.com/ziren-patches/evm", branch = "patch-0.4.0", default-features = false } -op-alloy-consensus = { git = "https://github.com/ziren-patches/op-alloy", branch = "patch-0.13.0" } -op-alloy-network = { git = "https://github.com/ziren-patches/op-alloy", branch = "patch-0.13.0" } -op-alloy-rpc-types = { git = "https://github.com/ziren-patches/op-alloy", branch = "patch-0.13.0" } +alloy-op-evm = { git = "https://github.com/ziren-patches/evm", branch = "patch-0.23.0", default-features = false } +op-alloy-consensus = { git = "https://github.com/ziren-patches/op-alloy", branch = "patch-0.22.0" } +op-alloy-network = { git = "https://github.com/ziren-patches/op-alloy", branch = "patch-0.22.0" } +op-alloy-rpc-types = { git = "https://github.com/ziren-patches/op-alloy", branch = "patch-0.22.0" } # alloy-op-evm = { path = "../patch/evm/crates/evm", default-features = false } # op-alloy-consensus = { path = "../patch/op-alloy/crates/consensus" } # op-alloy-network = { path = "../patch/op-alloy/crates/network" } # op-alloy-rpc-types = { path = "../patch/op-alloy/crates/rpc-types" } +kzg-rs = { git = "https://github.com/ziren-patches/kzg-rs", branch = "ziren" } + [workspace.lints] rust.missing_debug_implementations = "warn" rust.unreachable_pub = "warn" @@ -191,8 +198,8 @@ rustdoc.all = "warn" [patch.crates-io] # Precompile patches -sha2 = { git = "https://github.com/ziren-patches/RustCrypto-hashes", branch = "patch-sha2-0.10.8", package = "sha2" } +sha2 = { git = "https://github.com/ziren-patches/RustCrypto-hashes", branch = "patch-sha2-0.10.9", package = "sha2" } bn = { git = "https://github.com/ziren-patches/bn", branch = "patch-0.6.0", package = "substrate-bn" } k256 = { git = "https://github.com/ziren-patches/elliptic-curves", branch = "patch-k256-0.13.4" } p256 = { git = "https://github.com/ziren-patches/elliptic-curves", branch = "patch-p256-0.13.2" } -alloy-primitives-v1-1-2 = { git = "https://github.com/ziren-patches/core.git", package = "alloy-primitives", branch = "patch-alloy-primitives-1.1.2" } +alloy-primitives-v1-4-1 = { git = "https://github.com/ziren-patches/core.git", package = "alloy-primitives", branch = "patch-alloy-primitives-1.4.1" } diff --git a/README.md b/README.md index 356208a..72ee6e1 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ The client input (witness) generated by executing against RPC can be cached to s cargo run -r --bin host -- --block-number --chain-id --cache-dir /path/to/cache # eg. -cargo run -r --bin host -- --block-number 18884864 --chain-id 1 --cache-dir ./bin/host +cargo run -r --bin host -- --block-number 9831027 --chain-id 48816 --cache-dir ./bin/host ``` Note that even when utilizing a cached input, the host still needs access to the chain ID to identify the network type, either through `--rpc-url` or `--chain-id`. To run the host completely offline, use `--chain-id` for this. diff --git a/bin/eth-proofs/src/main.rs b/bin/eth-proofs/src/main.rs index 46d4ae5..6871a11 100644 --- a/bin/eth-proofs/src/main.rs +++ b/bin/eth-proofs/src/main.rs @@ -55,7 +55,7 @@ async fn main() -> eyre::Result<()> { let alerting_client = args.pager_duty_integration_key.map(AlertingClient::new); let ws = WsConnect::new(args.ws_rpc_url); - let ws_provider = ProviderBuilder::new().on_ws(ws).await?; + let ws_provider = ProviderBuilder::new().connect_ws(ws).await?; let http_provider = create_provider(args.http_rpc_url); let debug_http_provider = create_provider(args.debug_http_rpc_url); diff --git a/bin/guest/Cargo.lock b/bin/guest/Cargo.lock index 3ab79c3..0c5b93e 100644 --- a/bin/guest/Cargo.lock +++ b/bin/guest/Cargo.lock @@ -25,15 +25,6 @@ dependencies = [ "zerocopy", ] -[[package]] -name = "aho-corasick" -version = "1.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" -dependencies = [ - "memchr", -] - [[package]] name = "allocator-api2" version = "0.2.21" @@ -42,9 +33,9 @@ checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" [[package]] name = "alloy-chains" -version = "0.2.23" +version = "0.2.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35d744058a9daa51a8cf22a3009607498fcf82d3cf4c5444dd8056cdf651f471" +checksum = "b163ff4acf0eac29af05a911397cc418a76e153467b859398adc26cb9335a611" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -55,22 +46,23 @@ dependencies = [ [[package]] name = "alloy-consensus" -version = "0.14.0" -source = "git+https://github.com/ziren-patches/alloy?branch=patch-0.14.0#c5e571d372aaa8c2caea9672dfd4cd195e5c50f2" +version = "1.0.41" +source = "git+https://github.com/ziren-patches/alloy?branch=patch-1.0.41#6e100c7f3487b4e00f41eaf64558e55e3ebec984" dependencies = [ "alloy-eips", "alloy-primitives", "alloy-rlp", "alloy-serde", "alloy-trie", + "alloy-tx-macros", "auto_impl", - "bytes", "c-kzg", "derive_more", "either", "k256", "once_cell", "rand 0.8.5", + "secp256k1", "serde", "serde_json", "serde_with", @@ -79,8 +71,8 @@ dependencies = [ [[package]] name = "alloy-consensus-any" -version = "0.14.0" -source = "git+https://github.com/ziren-patches/alloy?branch=patch-0.14.0#c5e571d372aaa8c2caea9672dfd4cd195e5c50f2" +version = "1.0.41" +source = "git+https://github.com/ziren-patches/alloy?branch=patch-1.0.41#6e100c7f3487b4e00f41eaf64558e55e3ebec984" dependencies = [ "alloy-consensus", "alloy-eips", @@ -132,8 +124,8 @@ dependencies = [ [[package]] name = "alloy-eips" -version = "0.14.0" -source = "git+https://github.com/ziren-patches/alloy?branch=patch-0.14.0#c5e571d372aaa8c2caea9672dfd4cd195e5c50f2" +version = "1.0.41" +source = "git+https://github.com/ziren-patches/alloy?branch=patch-1.0.41#6e100c7f3487b4e00f41eaf64558e55e3ebec984" dependencies = [ "alloy-eip2124", "alloy-eip2930", @@ -146,13 +138,15 @@ dependencies = [ "derive_more", "either", "serde", + "serde_with", "sha2", + "thiserror 2.0.17", ] [[package]] name = "alloy-evm" -version = "0.4.0" -source = "git+https://github.com/ziren-patches/evm?branch=patch-0.4.0#57b583d7a27668c1b4fb1f2a655675e1be6b497e" +version = "0.23.0" +source = "git+https://github.com/ziren-patches/evm?branch=patch-0.23.0#bf2c1b5816835b4a581b509598555d7dd01df17d" dependencies = [ "alloy-consensus", "alloy-eips", @@ -168,21 +162,22 @@ dependencies = [ [[package]] name = "alloy-genesis" -version = "0.14.0" -source = "git+https://github.com/ziren-patches/alloy?branch=patch-0.14.0#c5e571d372aaa8c2caea9672dfd4cd195e5c50f2" +version = "1.0.41" +source = "git+https://github.com/ziren-patches/alloy?branch=patch-1.0.41#6e100c7f3487b4e00f41eaf64558e55e3ebec984" dependencies = [ "alloy-eips", "alloy-primitives", "alloy-serde", "alloy-trie", "serde", + "serde_with", ] [[package]] name = "alloy-hardforks" -version = "0.2.13" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3165210652f71dfc094b051602bafd691f506c54050a174b1cba18fb5ef706a3" +checksum = "2d9a33550fc21fd77a3f8b63e99969d17660eec8dcc50a95a80f7c9964f7680b" dependencies = [ "alloy-chains", "alloy-eip2124", @@ -205,11 +200,12 @@ dependencies = [ [[package]] name = "alloy-json-rpc" -version = "0.14.0" -source = "git+https://github.com/ziren-patches/alloy?branch=patch-0.14.0#c5e571d372aaa8c2caea9672dfd4cd195e5c50f2" +version = "1.0.41" +source = "git+https://github.com/ziren-patches/alloy?branch=patch-1.0.41#6e100c7f3487b4e00f41eaf64558e55e3ebec984" dependencies = [ "alloy-primitives", "alloy-sol-types", + "http", "serde", "serde_json", "thiserror 2.0.17", @@ -218,8 +214,8 @@ dependencies = [ [[package]] name = "alloy-network" -version = "0.14.0" -source = "git+https://github.com/ziren-patches/alloy?branch=patch-0.14.0#c5e571d372aaa8c2caea9672dfd4cd195e5c50f2" +version = "1.0.41" +source = "git+https://github.com/ziren-patches/alloy?branch=patch-1.0.41#6e100c7f3487b4e00f41eaf64558e55e3ebec984" dependencies = [ "alloy-consensus", "alloy-consensus-any", @@ -243,8 +239,8 @@ dependencies = [ [[package]] name = "alloy-network-primitives" -version = "0.14.0" -source = "git+https://github.com/ziren-patches/alloy?branch=patch-0.14.0#c5e571d372aaa8c2caea9672dfd4cd195e5c50f2" +version = "1.0.41" +source = "git+https://github.com/ziren-patches/alloy?branch=patch-1.0.41#6e100c7f3487b4e00f41eaf64558e55e3ebec984" dependencies = [ "alloy-consensus", "alloy-eips", @@ -304,8 +300,8 @@ dependencies = [ [[package]] name = "alloy-rpc-types" -version = "0.14.0" -source = "git+https://github.com/ziren-patches/alloy?branch=patch-0.14.0#c5e571d372aaa8c2caea9672dfd4cd195e5c50f2" +version = "1.0.41" +source = "git+https://github.com/ziren-patches/alloy?branch=patch-1.0.41#6e100c7f3487b4e00f41eaf64558e55e3ebec984" dependencies = [ "alloy-primitives", "alloy-rpc-types-eth", @@ -315,18 +311,29 @@ dependencies = [ [[package]] name = "alloy-rpc-types-any" -version = "0.14.0" -source = "git+https://github.com/ziren-patches/alloy?branch=patch-0.14.0#c5e571d372aaa8c2caea9672dfd4cd195e5c50f2" +version = "1.0.41" +source = "git+https://github.com/ziren-patches/alloy?branch=patch-1.0.41#6e100c7f3487b4e00f41eaf64558e55e3ebec984" dependencies = [ "alloy-consensus-any", "alloy-rpc-types-eth", "alloy-serde", ] +[[package]] +name = "alloy-rpc-types-debug" +version = "1.0.41" +source = "git+https://github.com/ziren-patches/alloy?branch=patch-1.0.41#6e100c7f3487b4e00f41eaf64558e55e3ebec984" +dependencies = [ + "alloy-primitives", + "derive_more", + "serde", + "serde_with", +] + [[package]] name = "alloy-rpc-types-engine" -version = "0.14.0" -source = "git+https://github.com/ziren-patches/alloy?branch=patch-0.14.0#c5e571d372aaa8c2caea9672dfd4cd195e5c50f2" +version = "1.0.41" +source = "git+https://github.com/ziren-patches/alloy?branch=patch-1.0.41#6e100c7f3487b4e00f41eaf64558e55e3ebec984" dependencies = [ "alloy-consensus", "alloy-eips", @@ -338,8 +345,8 @@ dependencies = [ [[package]] name = "alloy-rpc-types-eth" -version = "0.14.0" -source = "git+https://github.com/ziren-patches/alloy?branch=patch-0.14.0#c5e571d372aaa8c2caea9672dfd4cd195e5c50f2" +version = "1.0.41" +source = "git+https://github.com/ziren-patches/alloy?branch=patch-1.0.41#6e100c7f3487b4e00f41eaf64558e55e3ebec984" dependencies = [ "alloy-consensus", "alloy-consensus-any", @@ -352,13 +359,14 @@ dependencies = [ "itertools 0.14.0", "serde", "serde_json", + "serde_with", "thiserror 2.0.17", ] [[package]] name = "alloy-serde" -version = "0.14.0" -source = "git+https://github.com/ziren-patches/alloy?branch=patch-0.14.0#c5e571d372aaa8c2caea9672dfd4cd195e5c50f2" +version = "1.0.41" +source = "git+https://github.com/ziren-patches/alloy?branch=patch-1.0.41#6e100c7f3487b4e00f41eaf64558e55e3ebec984" dependencies = [ "alloy-primitives", "serde", @@ -367,8 +375,8 @@ dependencies = [ [[package]] name = "alloy-signer" -version = "0.14.0" -source = "git+https://github.com/ziren-patches/alloy?branch=patch-0.14.0#c5e571d372aaa8c2caea9672dfd4cd195e5c50f2" +version = "1.0.41" +source = "git+https://github.com/ziren-patches/alloy?branch=patch-1.0.41#6e100c7f3487b4e00f41eaf64558e55e3ebec984" dependencies = [ "alloy-primitives", "async-trait", @@ -381,9 +389,9 @@ dependencies = [ [[package]] name = "alloy-sol-macro" -version = "1.4.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3ce480400051b5217f19d6e9a82d9010cdde20f1ae9c00d53591e4a1afbb312" +checksum = "09eb18ce0df92b4277291bbaa0ed70545d78b02948df756bbd3d6214bf39a218" dependencies = [ "alloy-sol-macro-expander", "alloy-sol-macro-input", @@ -395,9 +403,9 @@ dependencies = [ [[package]] name = "alloy-sol-macro-expander" -version = "1.4.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d792e205ed3b72f795a8044c52877d2e6b6e9b1d13f431478121d8d4eaa9028" +checksum = "95d9fa2daf21f59aa546d549943f10b5cce1ae59986774019fbedae834ffe01b" dependencies = [ "alloy-sol-macro-input", "const-hex", @@ -413,9 +421,9 @@ dependencies = [ [[package]] name = "alloy-sol-macro-input" -version = "1.4.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bd1247a8f90b465ef3f1207627547ec16940c35597875cdc09c49d58b19693c" +checksum = "9396007fe69c26ee118a19f4dee1f5d1d6be186ea75b3881adf16d87f8444686" dependencies = [ "const-hex", "dunce", @@ -429,9 +437,9 @@ dependencies = [ [[package]] name = "alloy-sol-type-parser" -version = "1.4.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "954d1b2533b9b2c7959652df3076954ecb1122a28cc740aa84e7b0a49f6ac0a9" +checksum = "af67a0b0dcebe14244fc92002cd8d96ecbf65db4639d479f5fcd5805755a4c27" dependencies = [ "serde", "winnow", @@ -451,9 +459,9 @@ dependencies = [ [[package]] name = "alloy-trie" -version = "0.8.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "983d99aa81f586cef9dae38443245e585840fcf0fc58b09aee0b1f27aed1d500" +checksum = "2b77b56af09ead281337d06b1d036c88e2dc8a2e45da512a532476dbee94912b" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -466,62 +474,24 @@ dependencies = [ ] [[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - -[[package]] -name = "anstream" -version = "0.6.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "is_terminal_polyfill", - "utf8parse", -] - -[[package]] -name = "anstyle" -version = "1.0.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" - -[[package]] -name = "anstyle-parse" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" +name = "alloy-tx-macros" +version = "1.0.41" +source = "git+https://github.com/ziren-patches/alloy?branch=patch-1.0.41#6e100c7f3487b4e00f41eaf64558e55e3ebec984" dependencies = [ - "windows-sys", + "alloy-primitives", + "darling", + "proc-macro2", + "quote", + "syn 2.0.111", ] [[package]] -name = "anstyle-wincon" -version = "3.0.11" +name = "android_system_properties" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" dependencies = [ - "anstyle", - "once_cell_polyfill", - "windows-sys", + "libc", ] [[package]] @@ -790,6 +760,12 @@ dependencies = [ "rand 0.8.5", ] +[[package]] +name = "arrayref" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" + [[package]] name = "arrayvec" version = "0.7.6" @@ -977,9 +953,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.19.0" +version = "3.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" +checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" [[package]] name = "byte-slice-cast" @@ -1039,9 +1015,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.49" +version = "1.2.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90583009037521a116abf44494efecd645ba48b6622457080f080b85544e2215" +checksum = "9f50d563227a1c37cc0a263f64eca3334388c01c5e4c4861a9def205c614383c" dependencies = [ "find-msvc-tools", "jobserver", @@ -1068,59 +1044,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2" dependencies = [ "iana-time-zone", - "js-sys", "num-traits", "serde", - "wasm-bindgen", "windows-link", ] -[[package]] -name = "clap" -version = "4.5.53" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9e340e012a1bf4935f5282ed1436d1489548e8f72308207ea5df0e23d2d03f8" -dependencies = [ - "clap_builder", - "clap_derive", -] - -[[package]] -name = "clap_builder" -version = "4.5.53" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76b5d13eaa18c901fd2f7fca939fefe3a0727a953561fefdf3b2922b8569d00" -dependencies = [ - "anstream", - "anstyle", - "clap_lex", - "strsim", -] - -[[package]] -name = "clap_derive" -version = "4.5.49" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0b5487afeab2deb2ff4e03a807ad1a03ac532ff5a2cee5d86884440c7f7671" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn 2.0.111", -] - -[[package]] -name = "clap_lex" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d" - -[[package]] -name = "colorchoice" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" - [[package]] name = "const-hex" version = "1.17.0" @@ -1159,15 +1087,6 @@ dependencies = [ "unicode-xid", ] -[[package]] -name = "convert_case" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb402b8d4c85569410425650ce3eddc7d698ed96d39a73f941b08fb63082f1e7" -dependencies = [ - "unicode-segmentation", -] - [[package]] name = "convert_case" version = "0.10.0" @@ -1213,15 +1132,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" -[[package]] -name = "crossbeam-channel" -version = "0.5.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" -dependencies = [ - "crossbeam-utils", -] - [[package]] name = "crossbeam-deque" version = "0.8.6" @@ -1295,6 +1205,7 @@ dependencies = [ "ident_case", "proc-macro2", "quote", + "serde", "strsim", "syn 2.0.111", ] @@ -1354,20 +1265,20 @@ dependencies = [ [[package]] name = "derive_more" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10b768e943bed7bf2cab53df09f4bc34bfd217cdb57d971e769874c9a6710618" +checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134" dependencies = [ "derive_more-impl", ] [[package]] name = "derive_more-impl" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d286bfdaf75e988b4a78e013ecd79c581e06399ab53fbacd2d916c2f904f30b" +checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb" dependencies = [ - "convert_case 0.10.0", + "convert_case", "proc-macro2", "quote", "rustc_version 0.4.1", @@ -1495,17 +1406,6 @@ dependencies = [ "syn 2.0.111", ] -[[package]] -name = "enumn" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f9ed6b3789237c8a0c1c505af1c7eb2c560df6186f01b098c3a1064ea532f38" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.111", -] - [[package]] name = "equivalent" version = "1.0.2" @@ -1730,10 +1630,12 @@ dependencies = [ "alloy-rpc-types", "bincode", "itertools 0.13.0", + "kzg-rs", "mpt", "primitives", "reth-chainspec", "reth-consensus", + "reth-consensus-common", "reth-errors", "reth-ethereum-consensus", "reth-ethereum-primitives", @@ -1821,6 +1723,16 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "http" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" +dependencies = [ + "bytes", + "itoa", +] + [[package]] name = "iana-time-zone" version = "0.1.64" @@ -1893,9 +1805,9 @@ checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" [[package]] name = "icu_properties" -version = "2.1.1" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e93fcd3157766c0c8da2f8cff6ce651a31f0810eaa1c51ec363ef790bbb5fb99" +checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" dependencies = [ "icu_collections", "icu_locale_core", @@ -1907,9 +1819,9 @@ dependencies = [ [[package]] name = "icu_properties_data" -version = "2.1.1" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02845b3647bb045f1100ecd6480ff52f34c35f82d9880e029d329c21d1054899" +checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" [[package]] name = "icu_provider" @@ -2002,12 +1914,6 @@ dependencies = [ "serde_core", ] -[[package]] -name = "is_terminal_polyfill" -version = "1.70.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" - [[package]] name = "itertools" version = "0.10.5" @@ -2037,9 +1943,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.15" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" +checksum = "7ee5b5339afb4c41626dde77b7a611bd4f2c202b897852b4bcf5d03eddc61010" [[package]] name = "jobserver" @@ -2167,43 +2073,12 @@ dependencies = [ "syn 2.0.111", ] -[[package]] -name = "matchers" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9" -dependencies = [ - "regex-automata", -] - [[package]] name = "memchr" version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" -[[package]] -name = "metrics" -version = "0.24.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d5312e9ba3771cfa961b585728215e3d972c950a3eed9252aa093d6301277e8" -dependencies = [ - "ahash", - "portable-atomic", -] - -[[package]] -name = "metrics-derive" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3dbdd96ed57d565ec744cba02862d707acf373c5772d152abae6ec5c4e24f6c" -dependencies = [ - "proc-macro2", - "quote", - "regex", - "syn 2.0.111", -] - [[package]] name = "modular-bitfield" version = "0.11.2" @@ -2231,21 +2106,14 @@ version = "0.1.0" dependencies = [ "alloy-primitives", "alloy-rlp", + "alloy-rpc-types", + "alloy-rpc-types-debug", "reth-trie", "rlp", "serde", "thiserror 1.0.69", ] -[[package]] -name = "nu-ansi-term" -version = "0.50.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" -dependencies = [ - "windows-sys", -] - [[package]] name = "num" version = "0.4.3" @@ -2383,13 +2251,14 @@ dependencies = [ [[package]] name = "nybbles" -version = "0.3.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8983bb634df7248924ee0c4c3a749609b5abcb082c28fffe3254b3eb3602b307" +checksum = "2c4b5ecbd0beec843101bffe848217f770e8b8da81d8355b7d6e226f2199b3dc" dependencies = [ "alloy-rlp", - "const-hex", + "cfg-if", "proptest", + "ruint", "serde", "smallvec", ] @@ -2404,16 +2273,10 @@ dependencies = [ "portable-atomic", ] -[[package]] -name = "once_cell_polyfill" -version = "1.70.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" - [[package]] name = "op-alloy-consensus" -version = "0.13.0" -source = "git+https://github.com/ziren-patches/op-alloy?branch=patch-0.13.0#d0ee5a615eccbb23c3d610a297508bf26d2b6629" +version = "0.22.0" +source = "git+https://github.com/ziren-patches/op-alloy?branch=patch-0.22.0#20048eaa105b1c06ca4fca6108a047a2fda0c494" dependencies = [ "alloy-consensus", "alloy-eips", @@ -2426,6 +2289,19 @@ dependencies = [ "thiserror 2.0.17", ] +[[package]] +name = "p256" +version = "0.13.2" +source = "git+https://github.com/ziren-patches/elliptic-curves?branch=patch-p256-0.13.2#a6f1a1fb07020d00f627725a20dc336983be3946" +dependencies = [ + "ecdsa", + "elliptic-curve", + "hex", + "primeorder", + "sha2", + "zkm-lib", +] + [[package]] name = "p3-dft" version = "0.1.0" @@ -2619,9 +2495,9 @@ dependencies = [ [[package]] name = "phf" -version = "0.11.3" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" +checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf" dependencies = [ "phf_macros", "phf_shared", @@ -2630,19 +2506,19 @@ dependencies = [ [[package]] name = "phf_generator" -version = "0.11.3" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" +checksum = "135ace3a761e564ec88c03a77317a7c6b80bb7f7135ef2544dbe054243b89737" dependencies = [ + "fastrand", "phf_shared", - "rand 0.8.5", ] [[package]] name = "phf_macros" -version = "0.11.3" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216" +checksum = "812f032b54b1e759ccd5f8b6677695d5268c588701effba24601f6932f8269ef" dependencies = [ "phf_generator", "phf_shared", @@ -2653,9 +2529,9 @@ dependencies = [ [[package]] name = "phf_shared" -version = "0.11.3" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" +checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266" dependencies = [ "siphasher", ] @@ -2690,9 +2566,9 @@ checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" [[package]] name = "portable-atomic" -version = "1.11.1" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" +checksum = "f59e70c4aef1e55797c2e8fd94a4f2a973fc972cfde0e0b05f683667b0cd39dd" [[package]] name = "potential_utf" @@ -2718,6 +2594,14 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "primeorder" +version = "0.13.1" +source = "git+https://github.com/ziren-patches/elliptic-curves?branch=patch-p256-0.13.2#a6f1a1fb07020d00f627725a20dc336983be3946" +dependencies = [ + "elliptic-curve", +] + [[package]] name = "primitive-types" version = "0.12.2" @@ -2733,6 +2617,7 @@ dependencies = [ name = "primitives" version = "0.1.0" dependencies = [ + "alloy-eips", "alloy-genesis", "alloy-rpc-types", "eyre", @@ -2940,29 +2825,6 @@ dependencies = [ "syn 2.0.111", ] -[[package]] -name = "regex" -version = "1.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - [[package]] name = "regex-syntax" version = "0.8.8" @@ -2982,8 +2844,8 @@ dependencies = [ [[package]] name = "reth-chainspec" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ "alloy-chains", "alloy-consensus", @@ -3002,8 +2864,8 @@ dependencies = [ [[package]] name = "reth-codecs" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ "alloy-consensus", "alloy-eips", @@ -3020,10 +2882,9 @@ dependencies = [ [[package]] name = "reth-codecs-derive" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ - "convert_case 0.7.1", "proc-macro2", "quote", "syn 2.0.111", @@ -3031,8 +2892,8 @@ dependencies = [ [[package]] name = "reth-consensus" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -3044,8 +2905,8 @@ dependencies = [ [[package]] name = "reth-consensus-common" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ "alloy-consensus", "alloy-eips", @@ -3056,8 +2917,8 @@ dependencies = [ [[package]] name = "reth-db-models" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ "alloy-eips", "alloy-primitives", @@ -3066,20 +2927,19 @@ dependencies = [ [[package]] name = "reth-errors" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ "reth-consensus", "reth-execution-errors", - "reth-fs-util", "reth-storage-errors", "thiserror 2.0.17", ] [[package]] name = "reth-ethereum-consensus" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ "alloy-consensus", "alloy-eips", @@ -3094,8 +2954,8 @@ dependencies = [ [[package]] name = "reth-ethereum-forks" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ "alloy-eip2124", "alloy-hardforks", @@ -3106,29 +2966,25 @@ dependencies = [ [[package]] name = "reth-ethereum-primitives" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ "alloy-consensus", "alloy-eips", - "alloy-evm", "alloy-primitives", "alloy-rlp", "alloy-rpc-types-eth", - "derive_more", - "rand 0.8.5", + "alloy-serde", "reth-codecs", "reth-primitives-traits", - "revm-context", - "secp256k1", "serde", "serde_with", ] [[package]] name = "reth-evm" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ "alloy-consensus", "alloy-eips", @@ -3150,26 +3006,28 @@ dependencies = [ [[package]] name = "reth-evm-ethereum" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ "alloy-consensus", "alloy-eips", "alloy-evm", "alloy-primitives", + "alloy-rpc-types-engine", "reth-chainspec", "reth-ethereum-forks", "reth-ethereum-primitives", "reth-evm", "reth-execution-types", "reth-primitives-traits", + "reth-storage-errors", "revm", ] [[package]] name = "reth-execution-errors" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ "alloy-evm", "alloy-primitives", @@ -3181,8 +3039,8 @@ dependencies = [ [[package]] name = "reth-execution-types" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ "alloy-consensus", "alloy-eips", @@ -3195,29 +3053,10 @@ dependencies = [ "revm", ] -[[package]] -name = "reth-fs-util" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" -dependencies = [ - "serde", - "serde_json", - "thiserror 2.0.17", -] - -[[package]] -name = "reth-metrics" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" -dependencies = [ - "metrics", - "metrics-derive", -] - [[package]] name = "reth-network-peers" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -3228,19 +3067,19 @@ dependencies = [ [[package]] name = "reth-primitives-traits" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ "alloy-consensus", "alloy-eips", "alloy-genesis", "alloy-primitives", "alloy-rlp", + "alloy-rpc-types-eth", "alloy-trie", "auto_impl", "bytes", "derive_more", - "k256", "once_cell", "op-alloy-consensus", "reth-codecs", @@ -3255,18 +3094,19 @@ dependencies = [ [[package]] name = "reth-prune-types" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ "alloy-primitives", "derive_more", + "strum", "thiserror 2.0.17", ] [[package]] name = "reth-stages-types" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ "alloy-primitives", "reth-trie-common", @@ -3274,8 +3114,8 @@ dependencies = [ [[package]] name = "reth-static-file-types" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ "alloy-primitives", "derive_more", @@ -3285,8 +3125,8 @@ dependencies = [ [[package]] name = "reth-storage-api" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ "alloy-consensus", "alloy-eips", @@ -3307,8 +3147,8 @@ dependencies = [ [[package]] name = "reth-storage-errors" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ "alloy-eips", "alloy-primitives", @@ -3321,25 +3161,10 @@ dependencies = [ "thiserror 2.0.17", ] -[[package]] -name = "reth-tracing" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" -dependencies = [ - "clap", - "eyre", - "rolling-file", - "tracing", - "tracing-appender", - "tracing-journald", - "tracing-logfmt", - "tracing-subscriber", -] - [[package]] name = "reth-trie" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ "alloy-consensus", "alloy-eips", @@ -3360,8 +3185,8 @@ dependencies = [ [[package]] name = "reth-trie-common" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -3377,33 +3202,32 @@ dependencies = [ [[package]] name = "reth-trie-sparse" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ "alloy-primitives", "alloy-rlp", + "alloy-trie", "auto_impl", - "metrics", "reth-execution-errors", - "reth-metrics", "reth-primitives-traits", - "reth-tracing", "reth-trie-common", "smallvec", + "tracing", ] [[package]] name = "reth-zstd-compressors" -version = "1.3.10" -source = "git+https://github.com/ziren-patches/reth?branch=patch-1.3.10#961eee5d02d811a181fc3c058ba0218e3b756f22" +version = "1.9.3" +source = "git+https://github.com/ziren-patches/reth?branch=patch-1.9.3#1be69c885f5c0be8aeedfd58e97c395a2d24dc1a" dependencies = [ "zstd", ] [[package]] name = "revm" -version = "22.0.0" -source = "git+https://github.com/ziren-patches/revm?branch=patch-22.0.0#ea223141ce8bd77714cbdf7ac302f82b0ba81437" +version = "31.0.2" +source = "git+https://github.com/ziren-patches/revm?branch=patch-31.0.2#bff54bca9f9b64845c255fe6b94a58c136e846c1" dependencies = [ "revm-bytecode", "revm-context", @@ -3420,8 +3244,8 @@ dependencies = [ [[package]] name = "revm-bytecode" -version = "3.0.0" -source = "git+https://github.com/ziren-patches/revm?branch=patch-22.0.0#ea223141ce8bd77714cbdf7ac302f82b0ba81437" +version = "7.1.1" +source = "git+https://github.com/ziren-patches/revm?branch=patch-31.0.2#bff54bca9f9b64845c255fe6b94a58c136e846c1" dependencies = [ "bitvec", "phf", @@ -3431,10 +3255,11 @@ dependencies = [ [[package]] name = "revm-context" -version = "3.0.0" -source = "git+https://github.com/ziren-patches/revm?branch=patch-22.0.0#ea223141ce8bd77714cbdf7ac302f82b0ba81437" +version = "11.0.2" +source = "git+https://github.com/ziren-patches/revm?branch=patch-31.0.2#bff54bca9f9b64845c255fe6b94a58c136e846c1" dependencies = [ "alloy-consensus", + "bitvec", "cfg-if", "derive-where", "revm-bytecode", @@ -3447,13 +3272,14 @@ dependencies = [ [[package]] name = "revm-context-interface" -version = "3.0.0" -source = "git+https://github.com/ziren-patches/revm?branch=patch-22.0.0#ea223141ce8bd77714cbdf7ac302f82b0ba81437" +version = "12.0.1" +source = "git+https://github.com/ziren-patches/revm?branch=patch-31.0.2#bff54bca9f9b64845c255fe6b94a58c136e846c1" dependencies = [ "alloy-consensus", "alloy-eip2930", "alloy-eip7702", "auto_impl", + "either", "revm-database-interface", "revm-primitives", "revm-state", @@ -3462,8 +3288,8 @@ dependencies = [ [[package]] name = "revm-database" -version = "3.0.0" -source = "git+https://github.com/ziren-patches/revm?branch=patch-22.0.0#ea223141ce8bd77714cbdf7ac302f82b0ba81437" +version = "9.0.5" +source = "git+https://github.com/ziren-patches/revm?branch=patch-31.0.2#bff54bca9f9b64845c255fe6b94a58c136e846c1" dependencies = [ "alloy-eips", "revm-bytecode", @@ -3475,10 +3301,11 @@ dependencies = [ [[package]] name = "revm-database-interface" -version = "3.0.0" -source = "git+https://github.com/ziren-patches/revm?branch=patch-22.0.0#ea223141ce8bd77714cbdf7ac302f82b0ba81437" +version = "8.0.5" +source = "git+https://github.com/ziren-patches/revm?branch=patch-31.0.2#bff54bca9f9b64845c255fe6b94a58c136e846c1" dependencies = [ "auto_impl", + "either", "revm-primitives", "revm-state", "serde", @@ -3486,10 +3313,11 @@ dependencies = [ [[package]] name = "revm-handler" -version = "3.0.0" -source = "git+https://github.com/ziren-patches/revm?branch=patch-22.0.0#ea223141ce8bd77714cbdf7ac302f82b0ba81437" +version = "12.0.2" +source = "git+https://github.com/ziren-patches/revm?branch=patch-31.0.2#bff54bca9f9b64845c255fe6b94a58c136e846c1" dependencies = [ "auto_impl", + "derive-where", "revm-bytecode", "revm-context", "revm-context-interface", @@ -3503,10 +3331,11 @@ dependencies = [ [[package]] name = "revm-inspector" -version = "3.0.0" -source = "git+https://github.com/ziren-patches/revm?branch=patch-22.0.0#ea223141ce8bd77714cbdf7ac302f82b0ba81437" +version = "12.0.2" +source = "git+https://github.com/ziren-patches/revm?branch=patch-31.0.2#bff54bca9f9b64845c255fe6b94a58c136e846c1" dependencies = [ "auto_impl", + "either", "revm-context", "revm-database-interface", "revm-handler", @@ -3518,30 +3347,31 @@ dependencies = [ [[package]] name = "revm-interpreter" -version = "18.0.0" -source = "git+https://github.com/ziren-patches/revm?branch=patch-22.0.0#ea223141ce8bd77714cbdf7ac302f82b0ba81437" +version = "29.0.1" +source = "git+https://github.com/ziren-patches/revm?branch=patch-31.0.2#bff54bca9f9b64845c255fe6b94a58c136e846c1" dependencies = [ "revm-bytecode", "revm-context-interface", "revm-primitives", + "revm-state", "serde", ] [[package]] name = "revm-precompile" -version = "19.0.0" -source = "git+https://github.com/ziren-patches/revm?branch=patch-22.0.0#ea223141ce8bd77714cbdf7ac302f82b0ba81437" +version = "29.0.1" +source = "git+https://github.com/ziren-patches/revm?branch=patch-31.0.2#bff54bca9f9b64845c255fe6b94a58c136e846c1" dependencies = [ "ark-bls12-381", "ark-bn254", "ark-ec", "ark-ff 0.5.0", "ark-serialize 0.5.0", + "arrayref", "aurora-engine-modexp", "cfg-if", "k256", - "kzg-rs", - "once_cell", + "p256", "revm-primitives", "ripemd", "sha2", @@ -3550,18 +3380,19 @@ dependencies = [ [[package]] name = "revm-primitives" -version = "18.0.0" -source = "git+https://github.com/ziren-patches/revm?branch=patch-22.0.0#ea223141ce8bd77714cbdf7ac302f82b0ba81437" +version = "21.0.2" +source = "git+https://github.com/ziren-patches/revm?branch=patch-31.0.2#bff54bca9f9b64845c255fe6b94a58c136e846c1" dependencies = [ "alloy-primitives", - "enumn", + "num_enum", + "once_cell", "serde", ] [[package]] name = "revm-state" -version = "3.0.0" -source = "git+https://github.com/ziren-patches/revm?branch=patch-22.0.0#ea223141ce8bd77714cbdf7ac302f82b0ba81437" +version = "8.1.1" +source = "git+https://github.com/ziren-patches/revm?branch=patch-31.0.2#bff54bca9f9b64845c255fe6b94a58c136e846c1" dependencies = [ "bitflags", "revm-bytecode", @@ -3597,15 +3428,6 @@ dependencies = [ "rustc-hex", ] -[[package]] -name = "rolling-file" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8395b4f860856b740f20a296ea2cd4d823e81a2658cf05ef61be22916026a906" -dependencies = [ - "chrono", -] - [[package]] name = "ruint" version = "1.17.0" @@ -3672,9 +3494,9 @@ dependencies = [ [[package]] name = "rustix" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e" +checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34" dependencies = [ "bitflags", "errno", @@ -3701,12 +3523,6 @@ dependencies = [ "wait-timeout", ] -[[package]] -name = "ryu" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" - [[package]] name = "schemars" version = "0.9.0" @@ -3838,15 +3654,15 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.145" +version = "1.0.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" +checksum = "6af14725505314343e673e9ecb7cd7e8a36aa9791eb936235a3567cc31447ae4" dependencies = [ "itoa", "memchr", - "ryu", "serde", "serde_core", + "zmij", ] [[package]] @@ -3892,8 +3708,8 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.8" -source = "git+https://github.com/ziren-patches/RustCrypto-hashes?branch=patch-sha2-0.10.8#62d9223ba171ef6d5b637b275c4b982f56d0a949" +version = "0.10.9" +source = "git+https://github.com/ziren-patches/RustCrypto-hashes?branch=patch-sha2-0.10.9#dbfdbd088ac7b55e03c0b9eb192278efe35d67dc" dependencies = [ "cfg-if", "cpufeatures", @@ -3920,15 +3736,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "sharded-slab" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" -dependencies = [ - "lazy_static", -] - [[package]] name = "shlex" version = "1.3.0" @@ -4067,9 +3874,9 @@ dependencies = [ [[package]] name = "syn-solidity" -version = "1.4.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff790eb176cc81bb8936aed0f7b9f14fc4670069a2d371b3e3b0ecce908b2cb3" +checksum = "5f92d01b5de07eaf324f7fca61cc6bd3d82bbc1de5b6c963e6fe79e86f36580d" dependencies = [ "paste", "proc-macro2", @@ -4096,9 +3903,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.23.0" +version = "3.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d31c77bdf42a745371d260a26ca7163f1e0924b64afa0b688e61b5a9fa02f16" +checksum = "655da9c7eb6305c55742045d5a8d2037996d61d8de95806335c7c86ce0f82e9c" dependencies = [ "fastrand", "getrandom 0.3.4", @@ -4147,15 +3954,6 @@ dependencies = [ "syn 2.0.111", ] -[[package]] -name = "thread_local" -version = "1.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" -dependencies = [ - "cfg-if", -] - [[package]] name = "threadpool" version = "1.8.1" @@ -4217,18 +4015,18 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.7.3" +version = "0.7.5+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2cdb639ebbc97961c51720f858597f7f24c4fc295327923af55b74c3c724533" +checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" dependencies = [ "serde_core", ] [[package]] name = "toml_edit" -version = "0.23.9" +version = "0.23.10+spec-1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d7cbc3b4b49633d57a0509303158ca50de80ae32c265093b24c414705807832" +checksum = "84c8b9f757e028cee9fa244aea147aab2a9ec09d5325a9b01e0a49730c2b5269" dependencies = [ "indexmap 2.12.1", "toml_datetime", @@ -4238,36 +4036,24 @@ dependencies = [ [[package]] name = "toml_parser" -version = "1.0.4" +version = "1.0.6+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0cbe268d35bdb4bb5a56a2de88d0ad0eb70af5384a99d648cd4b3d04039800e" +checksum = "a3198b4b0a8e11f09dd03e133c0280504d0801269e9afa46362ffde1cbeebf44" dependencies = [ "winnow", ] [[package]] name = "tracing" -version = "0.1.43" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d15d90a0b5c19378952d479dc858407149d7bb45a14de0142f6c534b16fc647" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" dependencies = [ "pin-project-lite", "tracing-attributes", "tracing-core", ] -[[package]] -name = "tracing-appender" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "786d480bce6247ab75f005b14ae1624ad978d3029d9113f0a22fa1ac773faeaf" -dependencies = [ - "crossbeam-channel", - "thiserror 2.0.17", - "time", - "tracing-subscriber", -] - [[package]] name = "tracing-attributes" version = "0.1.31" @@ -4281,64 +4067,11 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.35" +version = "0.1.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a04e24fab5c89c6a36eb8558c9656f30d81de51dfa4d3b45f26b21d61fa0a6c" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" dependencies = [ "once_cell", - "valuable", -] - -[[package]] -name = "tracing-journald" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3a81ed245bfb62592b1e2bc153e77656d94ee6a0497683a65a12ccaf2438d0" -dependencies = [ - "libc", - "tracing-core", - "tracing-subscriber", -] - -[[package]] -name = "tracing-logfmt" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b1f47d22deb79c3f59fcf2a1f00f60cbdc05462bf17d1cd356c1fefa3f444bd" -dependencies = [ - "time", - "tracing", - "tracing-core", - "tracing-subscriber", -] - -[[package]] -name = "tracing-serde" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "704b1aeb7be0d0a84fc9828cae51dab5970fee5088f83d1dd7ee6f6246fc6ff1" -dependencies = [ - "serde", - "tracing-core", -] - -[[package]] -name = "tracing-subscriber" -version = "0.3.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e" -dependencies = [ - "matchers", - "nu-ansi-term", - "once_cell", - "regex-automata", - "serde", - "serde_json", - "sharded-slab", - "thread_local", - "tracing", - "tracing-core", - "tracing-serde", ] [[package]] @@ -4416,12 +4149,6 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" -[[package]] -name = "utf8parse" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" - [[package]] name = "valuable" version = "0.1.1" @@ -4721,7 +4448,7 @@ dependencies = [ [[package]] name = "zkm-lib" version = "1.2.3" -source = "git+https://github.com/ProjectZKM/Ziren#be43a854e4be21c11fb87304f9794dc9137b492d" +source = "git+https://github.com/ProjectZKM/Ziren#03e3cef63e04e5d8b1d7e41a784dd4c3fbc3dfd4" dependencies = [ "bincode", "cfg-if", @@ -4734,7 +4461,7 @@ dependencies = [ [[package]] name = "zkm-primitives" version = "1.2.3" -source = "git+https://github.com/ProjectZKM/Ziren#be43a854e4be21c11fb87304f9794dc9137b492d" +source = "git+https://github.com/ProjectZKM/Ziren#03e3cef63e04e5d8b1d7e41a784dd4c3fbc3dfd4" dependencies = [ "bincode", "hex", @@ -4752,7 +4479,7 @@ dependencies = [ [[package]] name = "zkm-zkvm" version = "1.2.3" -source = "git+https://github.com/ProjectZKM/Ziren#be43a854e4be21c11fb87304f9794dc9137b492d" +source = "git+https://github.com/ProjectZKM/Ziren#03e3cef63e04e5d8b1d7e41a784dd4c3fbc3dfd4" dependencies = [ "bincode", "cfg-if", @@ -4766,6 +4493,12 @@ dependencies = [ "zkm-primitives", ] +[[package]] +name = "zmij" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e404bcd8afdaf006e529269d3e85a743f9480c3cef60034d77860d02964f3ba" + [[package]] name = "zstd" version = "0.13.3" @@ -4793,8 +4526,3 @@ dependencies = [ "cc", "pkg-config", ] - -[[patch.unused]] -name = "p256" -version = "0.13.2" -source = "git+https://github.com/ziren-patches/elliptic-curves?branch=patch-p256-0.13.2#a6f1a1fb07020d00f627725a20dc336983be3946" diff --git a/bin/guest/Cargo.toml b/bin/guest/Cargo.toml index 3a7d058..c4ddad3 100644 --- a/bin/guest/Cargo.toml +++ b/bin/guest/Cargo.toml @@ -27,7 +27,7 @@ tracing = { version = "0.1", features = ["max_level_off", "release_max_level_off [patch.crates-io] # Precompile patches -sha2 = { git = "https://github.com/ziren-patches/RustCrypto-hashes", branch = "patch-sha2-0.10.8", package = "sha2" } +sha2 = { git = "https://github.com/ziren-patches/RustCrypto-hashes", branch = "patch-sha2-0.10.9", package = "sha2" } bn = { git = "https://github.com/ziren-patches/bn", branch = "patch-0.6.0", package = "substrate-bn" } k256 = { git = "https://github.com/ziren-patches/elliptic-curves", branch = "patch-k256-0.13.4" } p256 = { git = "https://github.com/ziren-patches/elliptic-curves", branch = "patch-p256-0.13.2" } diff --git a/bin/host/Cargo.toml b/bin/host/Cargo.toml index 5807582..9abfa53 100644 --- a/bin/host/Cargo.toml +++ b/bin/host/Cargo.toml @@ -38,3 +38,6 @@ reth-primitives-traits.workspace = true [build-dependencies] zkm-build.workspace = true + +[features] +execution-witness = ["host-executor/execution-witness"] diff --git a/bin/host/input/48816/9831027.bin b/bin/host/input/48816/9831027.bin new file mode 100644 index 0000000..c1775e2 Binary files /dev/null and b/bin/host/input/48816/9831027.bin differ diff --git a/crates/executor/guest/Cargo.toml b/crates/executor/guest/Cargo.toml index 1d3a252..20d2e0b 100644 --- a/crates/executor/guest/Cargo.toml +++ b/crates/executor/guest/Cargo.toml @@ -21,6 +21,7 @@ primitives.workspace = true # reth reth-consensus.workspace = true +reth-consensus-common.workspace = true reth-ethereum-consensus.workspace = true reth-ethereum-primitives = { workspace = true, features = ["serde-bincode-compat"] } reth-execution-types.workspace = true @@ -38,6 +39,7 @@ reth-chainspec.workspace = true # revm revm.workspace = true revm-primitives.workspace = true +kzg-rs.workspace = true # alloy alloy-evm.workspace = true diff --git a/crates/executor/guest/src/custom.rs b/crates/executor/guest/src/custom.rs index 206a774..f3150a0 100644 --- a/crates/executor/guest/src/custom.rs +++ b/crates/executor/guest/src/custom.rs @@ -5,124 +5,47 @@ //! The [CustomEvmConfig] type implements the [ConfigureEvm] and [ConfigureEvmEnv] traits, //! configuring the custom CustomEvmConfig precompiles and instructions. -use alloy_evm::{EthEvm, EthEvmFactory}; -use reth_evm::{Database, EvmEnv, EvmFactory}; +use alloy_evm::EthEvm; +use kzg_rs::{Bytes32, Bytes48, KzgProof, KzgSettings}; +use reth_evm::{eth::EthEvmBuilder, precompiles::PrecompilesMap, Database, EvmEnv, EvmFactory}; use revm::{ bytecode::opcode::OpCode, context::{ result::{EVMError, HaltReason}, - BlockEnv, Cfg, CfgEnv, ContextTr, TxEnv, + BlockEnv, CfgEnv, TxEnv, }, - handler::{EthPrecompiles, PrecompileProvider}, - inspector::NoOpInspector, interpreter::{ interpreter_types::{Jumps, LoopControl}, - InputsImpl, InstructionResult, Interpreter, InterpreterResult, InterpreterTypes, + Interpreter, InterpreterTypes, }, - precompile::u64_to_address, - Context, Inspector, MainBuilder, MainContext, + precompile::{Crypto, PrecompileError, PrecompileSpecId, Precompiles}, + Context, Inspector, }; use revm_primitives::{hardfork::SpecId, Address}; -use std::{collections::HashMap, fmt::Debug, marker::PhantomData}; - -#[derive(Clone)] -pub struct CustomPrecompiles { - pub precompiles: EthPrecompiles, - addresses_to_names: HashMap, -} - -impl Debug for CustomPrecompiles { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - f.debug_struct("CustomPrecompiles") - .field("addresses_to_names", &self.addresses_to_names) - .finish() - } -} - -impl Default for CustomPrecompiles { - fn default() -> Self { - Self { - precompiles: EthPrecompiles::default(), - // Addresses from https://www.evm.codes/precompiled - addresses_to_names: HashMap::from([ - (u64_to_address(1), "ecrecover".to_string()), - (u64_to_address(2), "sha256".to_string()), - (u64_to_address(3), "ripemd160".to_string()), - (u64_to_address(4), "identity".to_string()), - (u64_to_address(5), "modexp".to_string()), - (u64_to_address(6), "bn-add".to_string()), - (u64_to_address(7), "bn-mul".to_string()), - (u64_to_address(8), "bn-pair".to_string()), - (u64_to_address(9), "blake2f".to_string()), - (u64_to_address(10), "kzg-point-evaluation".to_string()), - ]), - } - } -} - -impl PrecompileProvider for CustomPrecompiles { - type Output = InterpreterResult; - - fn set_spec(&mut self, spec: ::Spec) -> bool { - >::set_spec(&mut self.precompiles, spec) - } - - fn run( - &mut self, - context: &mut CTX, - address: &Address, - inputs: &InputsImpl, - is_static: bool, - gas_limit: u64, - ) -> Result, String> { - if self.precompiles.contains(address) { - #[cfg(target_os = "zkvm")] - let name = self.addresses_to_names.get(address).cloned().unwrap_or(address.to_string()); - - #[cfg(target_os = "zkvm")] - println!("cycle-tracker-report-start: precompile-{name}"); - let result = self.precompiles.run(context, address, inputs, is_static, gas_limit); - #[cfg(target_os = "zkvm")] - println!("cycle-tracker-report-end: precompile-{name}"); - - result - } else { - Ok(None) - } - } - - fn warm_addresses(&self) -> Box> { - self.precompiles.warm_addresses() - } - - fn contains(&self, address: &Address) -> bool { - self.precompiles.contains(address) - } -} +use std::fmt::Debug; #[derive(Debug, Clone)] -pub struct CustomEvmFactory { +pub struct CustomEvmFactory { // Some chains uses Clique consensus, which is not implemented in Reth. // The main difference for execution is the block beneficiary: Reth will // credit the block reward to the beneficiary address, whereas in Clique, // the reward is credited to the signer. custom_beneficiary: Option
, - - phantom: PhantomData, } -impl CustomEvmFactory { +impl CustomEvmFactory { pub fn new(custom_beneficiary: Option
) -> Self { - Self { custom_beneficiary, phantom: PhantomData } + Self { custom_beneficiary } } } -impl EvmFactory for CustomEvmFactory { - type Evm>> = - EthEvm; +impl EvmFactory for CustomEvmFactory { + type Evm>> = EthEvm; type Context = Context; + type BlockEnv = BlockEnv; + type Tx = TxEnv; type Error = EVMError; @@ -131,6 +54,8 @@ impl EvmFactory for CustomEvmFactory { type Spec = SpecId; + type Precompiles = PrecompilesMap; + fn create_evm( &self, db: DB, @@ -140,14 +65,52 @@ impl EvmFactory for CustomEvmFactory { input.block_env.beneficiary = custom_beneficiary; } - let evm = Context::mainnet() - .with_db(db) - .with_cfg(input.cfg_env) - .with_block(input.block_env) - .build_mainnet_with_inspector(NoOpInspector {}) - .with_precompiles(CustomPrecompiles::default()); + #[allow(unused_mut)] + let mut precompiles = PrecompilesMap::from_static(Precompiles::new( + PrecompileSpecId::from_spec_id(input.cfg_env.spec), + )); - EthEvm::new(evm, false) + #[cfg(target_os = "zkvm")] + precompiles.map_precompiles(|address, p| { + use alloy_evm::precompiles::Precompile; + use reth_evm::precompiles::PrecompileInput; + use revm::precompile::u64_to_address; + use std::collections::HashMap; + + let addresses_to_names = HashMap::from([ + (u64_to_address(1), "ecrecover"), + (u64_to_address(2), "sha256"), + (u64_to_address(3), "ripemd160"), + (u64_to_address(4), "identity"), + (u64_to_address(5), "modexp"), + (u64_to_address(6), "bn-add"), + (u64_to_address(7), "bn-mul"), + (u64_to_address(8), "bn-pair"), + (u64_to_address(9), "blake2f"), + (u64_to_address(10), "kzg-point-evaluation"), + (u64_to_address(11), "bls-g1add"), + (u64_to_address(12), "bls-g1msm"), + (u64_to_address(13), "bls-g2add"), + (u64_to_address(14), "bls-g2msm"), + (u64_to_address(15), "bls-pairing"), + (u64_to_address(16), "bls-map-fp-to-g1"), + (u64_to_address(17), "bls-map-fp2-to-g2"), + (u64_to_address(256), "p256-verify"), + ]); + + let name = addresses_to_names.get(address).cloned().unwrap_or("unknown"); + + let precompile = move |input: PrecompileInput<'_>| { + println!("cycle-tracker-report-start: precompile-{name}"); + let result = p.call(input); + println!("cycle-tracker-report-end: precompile-{name}"); + + result + }; + precompile.into() + }); + + EthEvmBuilder::new(db, input).precompiles(precompiles).build() } fn create_evm_with_inspector>>( @@ -174,7 +137,7 @@ impl Inspector for OpCodeTrackingInspect fn step(&mut self, interp: &mut Interpreter, context: &mut CTX) { let _ = context; - if interp.control.instruction_result() != InstructionResult::Continue { + if interp.bytecode.instruction_result().is_some() { return; } @@ -193,3 +156,38 @@ impl Inspector for OpCodeTrackingInspect println!("cycle-tracker-report-end: opcode-{}", self.current); } } + +#[derive(Debug)] +pub struct CustomCrypto { + kzg_settings: KzgSettings, +} + +impl Default for CustomCrypto { + fn default() -> Self { + Self { kzg_settings: KzgSettings::load_trusted_setup_file().unwrap() } + } +} + +impl Crypto for CustomCrypto { + fn verify_kzg_proof( + &self, + z: &[u8; 32], + y: &[u8; 32], + commitment: &[u8; 48], + proof: &[u8; 48], + ) -> Result<(), PrecompileError> { + if !KzgProof::verify_kzg_proof( + &Bytes48(*commitment), + &Bytes32(*z), + &Bytes32(*y), + &Bytes48(*proof), + &self.kzg_settings, + ) + .map_err(|err| PrecompileError::other(err.to_string()))? + { + return Err(PrecompileError::BlobVerifyKzgProofFailed); + } + + Ok(()) + } +} diff --git a/crates/executor/guest/src/executor.rs b/crates/executor/guest/src/executor.rs index 7620ee9..d8e9972 100644 --- a/crates/executor/guest/src/executor.rs +++ b/crates/executor/guest/src/executor.rs @@ -1,8 +1,8 @@ use std::sync::Arc; -use alloy_consensus::{BlockHeader, Header, TxReceipt}; -use alloy_evm::EthEvmFactory; -use alloy_primitives::{Bloom, B256}; +use alloy_consensus::{BlockHeader, Header}; +use alloy_primitives::B256; +use itertools::Itertools; use reth_chainspec::ChainSpec; use reth_errors::BlockExecutionError; use reth_evm::{ @@ -13,55 +13,59 @@ use reth_evm_ethereum::EthEvmConfig; use reth_execution_types::ExecutionOutcome; use reth_primitives_traits::Block; use reth_trie::KeccakKeyHasher; -use revm::database::WrapDatabaseRef; +use revm::{database::WrapDatabaseRef, install_crypto}; use revm_primitives::Address; use crate::{ - custom::CustomEvmFactory, + custom::{CustomCrypto, CustomEvmFactory}, error::ClientError, into_primitives::FromInput, - io::{ClientExecutorInput, TrieDB}, + io::{ClientExecutorInput, TrieDB, WitnessInput}, tracking::OpCodesTrackingBlockExecutor, - ValidateBlockPostExecution, + BlockValidator, }; pub const DESERIALZE_INPUTS: &str = "deserialize inputs"; pub const INIT_WITNESS_DB: &str = "initialize witness db"; pub const RECOVER_SENDERS: &str = "recover senders"; pub const BLOCK_EXECUTION: &str = "block execution"; +pub const VALIDATE_HEADER: &str = "validate header"; pub const VALIDATE_EXECUTION: &str = "validate block post-execution"; -pub const ACCRUE_LOG_BLOOM: &str = "accrue logs bloom"; pub const COMPUTE_STATE_ROOT: &str = "compute state root"; -pub type EthClientExecutor = ClientExecutor>>; +pub type EthClientExecutor = ClientExecutor, ChainSpec>; #[cfg(feature = "optimism")] -pub type OpClientExecutor = ClientExecutor; +pub type OpClientExecutor = + ClientExecutor; /// An executor that executes a block inside a zkVM. #[derive(Debug, Clone)] -pub struct ClientExecutor { +pub struct ClientExecutor { evm_config: C, + chain_spec: Arc, } -impl ClientExecutor +impl ClientExecutor where C: ConfigureEvm, - C::Primitives: FromInput + ValidateBlockPostExecution, + C::Primitives: FromInput + BlockValidator, { pub fn execute( &self, mut input: ClientExecutorInput, ) -> Result<(Header, B256), ClientError> { + let chain_id: u64 = (&input.genesis).try_into().expect("convert chain id err"); + + let sealed_headers = input.sealed_headers().collect::>(); + // Initialize the witnessed database with verified storage proofs. let db = profile_report!(INIT_WITNESS_DB, { - let trie_db = input.witness_db().unwrap(); + let trie_db = input.witness_db(&sealed_headers).unwrap(); WrapDatabaseRef(trie_db) }); - let chain_id: u64 = (&input.genesis).try_into().expect("convert chain id err"); - - let block_executor = + let block_executor: BlockExecutor<'_, C> = BlockExecutor::new(self.evm_config.clone(), db, input.opcode_tracking, chain_id); let block = profile_report!(RECOVER_SENDERS, { @@ -70,22 +74,36 @@ where .map_err(|_| ClientError::SignatureRecoveryFailed) })?; + // Validate the blocks. + profile_report!(VALIDATE_HEADER, { + C::Primitives::validate_block(&block, self.chain_spec.clone()) + .expect("The block is invalid"); + + for (header, parent) in sealed_headers.iter().tuple_windows() { + C::Primitives::validate_header(parent, self.chain_spec.clone()) + .expect("A parent header is invalid"); + + C::Primitives::validate_header_against_parent( + header, + parent, + self.chain_spec.clone(), + ) + .expect("The header is invalid against its parent"); + } + }); + let execution_output = profile_report!(BLOCK_EXECUTION, { block_executor.execute(&block) })?; // Validate the block post execution. profile_report!(VALIDATE_EXECUTION, { - C::Primitives::validate_block_post_execution(&block, &input.genesis, &execution_output) + C::Primitives::validate_block_post_execution( + &block, + self.chain_spec.clone(), + &execution_output, + ) })?; - // Accumulate the logs bloom. - let mut logs_bloom = Bloom::default(); - profile_report!(ACCRUE_LOG_BLOOM, { - execution_output.result.receipts.iter().for_each(|r| { - logs_bloom.accrue_bloom(&r.bloom()); - }) - }); - // Convert the output to an execution outcome. let executor_outcome = ExecutionOutcome::new( execution_output.state, @@ -115,7 +133,7 @@ where state_root, transactions_root: input.current_block.header().transactions_root(), receipts_root: input.current_block.header().receipts_root(), - logs_bloom, + logs_bloom: input.current_block.logs_bloom, difficulty: input.current_block.header().difficulty(), number: input.current_block.header().number(), gas_limit: input.current_block.header().gas_limit(), @@ -138,11 +156,14 @@ where impl EthClientExecutor { pub fn eth(chain_spec: Arc, custom_beneficiary: Option
) -> Self { + install_crypto(CustomCrypto::default()); + Self { evm_config: EthEvmConfig::new_with_evm_factory( - chain_spec, - CustomEvmFactory::::new(custom_beneficiary), + chain_spec.clone(), + CustomEvmFactory::new(custom_beneficiary), ), + chain_spec, } } } @@ -150,7 +171,12 @@ impl EthClientExecutor { #[cfg(feature = "optimism")] impl OpClientExecutor { pub fn optimism(chain_spec: Arc) -> Self { - Self { evm_config: reth_optimism_evm::OpEvmConfig::optimism(chain_spec) } + install_crypto(CustomCrypto::default()); + + Self { + evm_config: reth_optimism_evm::OpEvmConfig::optimism(chain_spec.clone()), + chain_spec, + } } } diff --git a/crates/executor/guest/src/into_primitives.rs b/crates/executor/guest/src/into_primitives.rs index 4123ca8..d074190 100644 --- a/crates/executor/guest/src/into_primitives.rs +++ b/crates/executor/guest/src/into_primitives.rs @@ -1,16 +1,20 @@ +use std::sync::Arc; + use alloy_consensus::{Block, Header, TxEnvelope}; use alloy_network::{Ethereum, Network}; -use primitives::genesis::Genesis; -use reth_chainspec::ChainSpec; +use reth_chainspec::{ChainSpec, EthChainSpec, NamedChain}; +use reth_consensus::HeaderValidator; +use reth_consensus_common::validation::validate_body_against_header; use reth_errors::ConsensusError; +use reth_ethereum_consensus::EthBeaconConsensus; use reth_ethereum_primitives::EthPrimitives; use reth_execution_types::BlockExecutionOutput; -use reth_primitives_traits::{NodePrimitives, RecoveredBlock}; +use reth_primitives_traits::{NodePrimitives, RecoveredBlock, SealedHeader}; pub trait IntoPrimitives: NodePrimitives { fn into_primitive_block(block: N::BlockResponse) -> Self::Block; - fn into_primitive_header(block: N::BlockResponse) -> Header; + fn into_consensus_header(header: N::HeaderResponse) -> Header; } pub trait FromInput: NodePrimitives { @@ -21,10 +25,23 @@ pub trait IntoInput: NodePrimitives { fn into_input_block(block: Self::Block) -> Block; } -pub trait ValidateBlockPostExecution: NodePrimitives { +pub trait BlockValidator: NodePrimitives { + fn validate_header(header: &SealedHeader, chain_spec: Arc) -> Result<(), ConsensusError>; + + fn validate_block( + block: &RecoveredBlock, + chain_spec: Arc, + ) -> Result<(), ConsensusError>; + + fn validate_header_against_parent( + header: &SealedHeader, + parent: &SealedHeader, + chain_spec: Arc, + ) -> Result<(), ConsensusError>; + fn validate_block_post_execution( block: &RecoveredBlock, - genesis: &Genesis, + chain_spec: Arc, execution_output: &BlockExecutionOutput, ) -> Result<(), ConsensusError>; } @@ -35,8 +52,8 @@ impl IntoPrimitives for EthPrimitives { block.into_consensus() } - fn into_primitive_header(block: alloy_rpc_types::Block) -> Header { - block.header.into() + fn into_consensus_header(header: alloy_rpc_types::Header) -> Header { + header.into() } } @@ -52,13 +69,42 @@ impl IntoInput for EthPrimitives { } } -impl ValidateBlockPostExecution for EthPrimitives { +impl BlockValidator for EthPrimitives { + fn validate_header( + header: &SealedHeader, + chain_spec: Arc, + ) -> Result<(), ConsensusError> { + let validator = EthBeaconConsensus::new(chain_spec.clone()); + + handle_custom_chains(validator.validate_header(header), chain_spec) + } + + fn validate_block( + recovered: &RecoveredBlock, + chain_spec: Arc, + ) -> Result<(), ConsensusError> { + Self::validate_header(recovered.sealed_header(), chain_spec.clone())?; + + validate_body_against_header(recovered.body(), recovered.header())?; + + Ok(()) + } + + fn validate_header_against_parent( + header: &SealedHeader, + parent: &SealedHeader, + chain_spec: Arc, + ) -> Result<(), ConsensusError> { + let validator = EthBeaconConsensus::new(chain_spec); + + validator.validate_header_against_parent(header, parent) + } + fn validate_block_post_execution( block: &RecoveredBlock, - genesis: &Genesis, + chain_spec: Arc, execution_output: &BlockExecutionOutput, ) -> Result<(), ConsensusError> { - let chain_spec = ChainSpec::try_from(genesis).unwrap(); reth_ethereum_consensus::validate_block_post_execution( block, &chain_spec, @@ -73,14 +119,12 @@ impl IntoPrimitives for reth_optimism_primitives::Op fn into_primitive_block( block: alloy_rpc_types::Block, ) -> Self::Block { - let block = block.map_transactions(|tx| tx.inner.inner.into_inner().into()); + let block = block.map_transactions(|tx| tx.inner.inner.into_inner()); block.into_consensus() } - fn into_primitive_header( - block: alloy_rpc_types::Block, - ) -> Header { - block.header.into() + fn into_consensus_header(header: alloy_rpc_types::Header) -> Header { + header.into() } } @@ -99,17 +143,81 @@ impl IntoInput for reth_optimism_primitives::OpPrimitives { } #[cfg(feature = "optimism")] -impl ValidateBlockPostExecution for reth_optimism_primitives::OpPrimitives { +impl BlockValidator + for reth_optimism_primitives::OpPrimitives +{ + fn validate_header( + header: &SealedHeader, + chain_spec: Arc, + ) -> Result<(), ConsensusError> { + let validator = reth_optimism_consensus::OpBeaconConsensus::new(chain_spec); + + validator.validate_header(header) + } + + fn validate_block( + recovered: &RecoveredBlock, + chain_spec: Arc, + ) -> Result<(), ConsensusError> { + Self::validate_header(recovered.sealed_header(), chain_spec.clone())?; + + reth_optimism_consensus::validation::validate_body_against_header_op( + chain_spec, + recovered.body(), + recovered.header(), + )?; + + Ok(()) + } + + fn validate_header_against_parent( + header: &SealedHeader, + parent: &SealedHeader, + chain_spec: Arc, + ) -> Result<(), ConsensusError> { + let validator = reth_optimism_consensus::OpBeaconConsensus::new(chain_spec); + + validator.validate_header_against_parent(header, parent) + } + fn validate_block_post_execution( block: &RecoveredBlock, - genesis: &Genesis, + chain_spec: Arc, execution_output: &BlockExecutionOutput, ) -> Result<(), ConsensusError> { - let chain_spec = reth_optimism_chainspec::OpChainSpec::try_from(genesis).unwrap(); reth_optimism_consensus::validate_block_post_execution( block.header(), &chain_spec, - &execution_output.result.receipts, + &execution_output.result, ) } } + +fn handle_custom_chains( + result: Result<(), ConsensusError>, + chain_spec: Arc, +) -> Result<(), ConsensusError> { + let err = if let Err(err) = result { err } else { return Ok(()) }; + + let chain = if let Ok(chain) = NamedChain::try_from(chain_spec.chain_id()) { + chain + } else { + return Err(err) + }; + + match chain { + NamedChain::Linea | NamedChain::LineaSepolia | NamedChain::LineaGoerli => { + // Skip extra data and Merge difficulty checks for Linea chains + if matches!( + err, + ConsensusError::ExtraDataExceedsMax { .. } | + ConsensusError::TheMergeDifficultyIsNotZero + ) { + Ok(()) + } else { + Err(err) + } + } + _ => Err(err), + } +} diff --git a/crates/executor/guest/src/io.rs b/crates/executor/guest/src/io.rs index b4d78ba..63a4ccc 100644 --- a/crates/executor/guest/src/io.rs +++ b/crates/executor/guest/src/io.rs @@ -7,7 +7,7 @@ use mpt::EthereumState; use primitives::genesis::Genesis; use reth_errors::ProviderError; use reth_ethereum_primitives::EthPrimitives; -use reth_primitives_traits::NodePrimitives; +use reth_primitives_traits::{NodePrimitives, SealedHeader}; use reth_trie::{TrieAccount, EMPTY_ROOT_HASH}; use revm::{ state::{AccountInfo, Bytecode}, @@ -43,8 +43,6 @@ pub struct ClientExecutorInput { pub ancestor_headers: Vec
, /// Network state as of the parent block. pub parent_state: EthereumState, - /// Requests to account state and storage slots. - pub state_requests: HashMap>, /// Account bytecodes. pub bytecodes: Vec, /// The genesis block, as a json string. @@ -63,8 +61,8 @@ impl ClientExecutorInput

{ } /// Creates a [`WitnessDb`]. - pub fn witness_db(&self) -> Result, ClientError> { - ::witness_db(self) + pub fn witness_db(&self, sealed_headers: &[SealedHeader]) -> Result, ClientError> { + ::witness_db(self, sealed_headers) } } @@ -79,19 +77,29 @@ impl WitnessInput for ClientExecutorInput

{ self.parent_header().state_root() } - #[inline(always)] - fn state_requests(&self) -> impl Iterator)> { - self.state_requests.iter() - } - #[inline(always)] fn bytecodes(&self) -> impl Iterator { self.bytecodes.iter() } #[inline(always)] - fn headers(&self) -> impl Iterator { - once(&self.current_block.header).chain(self.ancestor_headers.iter()) + fn sealed_headers(&self) -> impl Iterator { + once(SealedHeader::seal_slow(self.current_block.header.clone())) + .chain(self.ancestor_headers.iter().map(|h| SealedHeader::seal_slow(h.clone()))) + } +} + +// The headed committed at the end of execution +#[serde_as] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +pub struct CommittedHeader { + #[serde_as(as = "alloy_consensus::serde_bincode_compat::Header")] + pub header: Header, +} + +impl From

for CommittedHeader { + fn from(header: Header) -> Self { + CommittedHeader { header } } } @@ -173,17 +181,12 @@ pub trait WitnessInput { /// [state()](trait.WitnessInput#tymethod.state) must conform to. fn state_anchor(&self) -> B256; - /// Gets an iterator over address state requests. For each request, the account info and storage - /// slots are loaded from the relevant tries in the state returned by - /// [state()](trait.WitnessInput#tymethod.state). - fn state_requests(&self) -> impl Iterator)>; - /// Gets an iterator over account bytecodes. fn bytecodes(&self) -> impl Iterator; /// Gets an iterator over references to a consecutive, reverse-chronological block headers /// starting from the current block header. - fn headers(&self) -> impl Iterator; + fn sealed_headers(&self) -> impl Iterator; /// Creates a [`WitnessDb`] from a [`WitnessInput`] implementation. To do so, it verifies the /// state root, ancestor headers and account bytecodes, and constructs the account and @@ -193,7 +196,7 @@ pub trait WitnessInput { /// implementing this trait causes a zkVM run to cost over 5M cycles more. To avoid this, define /// a method inside the type that calls this trait method instead. #[inline(always)] - fn witness_db(&self) -> Result, ClientError> { + fn witness_db(&self, sealed_headers: &[SealedHeader]) -> Result, ClientError> { let state = self.state(); if self.state_anchor() != state.state_root() { @@ -214,7 +217,7 @@ pub trait WitnessInput { // Verify and build block hashes let mut block_hashes: HashMap = HashMap::with_hasher(Default::default()); - for (child_header, parent_header) in self.headers().tuple_windows() { + for (child_header, parent_header) in sealed_headers.iter().tuple_windows() { if parent_header.number() != child_header.number() - 1 { return Err(ClientError::InvalidHeaderBlockNumber( parent_header.number() + 1, @@ -222,7 +225,7 @@ pub trait WitnessInput { )); } - let parent_header_hash = parent_header.hash_slow(); + let parent_header_hash = parent_header.hash(); if parent_header_hash != child_header.parent_hash() { return Err(ClientError::InvalidHeaderParentHash( parent_header_hash, diff --git a/crates/executor/guest/src/lib.rs b/crates/executor/guest/src/lib.rs index 9509b8f..bb754b7 100644 --- a/crates/executor/guest/src/lib.rs +++ b/crates/executor/guest/src/lib.rs @@ -10,7 +10,7 @@ pub mod executor; pub mod tracking; mod into_primitives; -pub use into_primitives::{FromInput, IntoInput, IntoPrimitives, ValidateBlockPostExecution}; +pub use into_primitives::{BlockValidator, FromInput, IntoInput, IntoPrimitives}; use alloy_primitives::B256; use executor::{EthClientExecutor, DESERIALZE_INPUTS}; diff --git a/crates/executor/guest/src/tracking/block_executor.rs b/crates/executor/guest/src/tracking/block_executor.rs index f81b6e9..48cf220 100644 --- a/crates/executor/guest/src/tracking/block_executor.rs +++ b/crates/executor/guest/src/tracking/block_executor.rs @@ -39,13 +39,14 @@ where block: &RecoveredBlock<::Block>, ) -> Result::Receipt>, Self::Error> { - let evm_env = self.evm_config.evm_env(block.header()); + let evm_env = + self.evm_config.evm_env(block.header()).map_err(BlockExecutionError::other)?; let evm = self.evm_config.evm_with_env_and_inspector( &mut self.db, evm_env, OpCodeTrackingInspector::default(), ); - let ctx = self.evm_config.context_for_block(block); + let ctx = self.evm_config.context_for_block(block).map_err(BlockExecutionError::other)?; let mut strategy = self.evm_config.create_executor(evm, ctx); strategy.apply_pre_execution_changes()?; @@ -70,6 +71,7 @@ where let mut strategy = self .evm_config .executor_for_block(&mut self.db, block) + .map_err(BlockExecutionError::other)? .with_state_hook(Some(Box::new(state_hook))); strategy.apply_pre_execution_changes()?; diff --git a/crates/executor/guest/src/utils.rs b/crates/executor/guest/src/utils.rs index 19aeee3..893a9dd 100644 --- a/crates/executor/guest/src/utils.rs +++ b/crates/executor/guest/src/utils.rs @@ -1,5 +1,5 @@ /// Profile the given code block cycle count. -#[allow(unused_macros)] +#[macro_export] macro_rules! profile { ($name:expr, $block:block) => {{ #[cfg(target_os = "zkvm")] @@ -18,6 +18,7 @@ macro_rules! profile { } /// Profile the given code block and add the cycle count to the execution report. +#[macro_export] macro_rules! profile_report { ($name:expr, $block:block) => {{ #[cfg(target_os = "zkvm")] diff --git a/crates/executor/host/Cargo.toml b/crates/executor/host/Cargo.toml index 24f54c1..0a318d5 100644 --- a/crates/executor/host/Cargo.toml +++ b/crates/executor/host/Cargo.toml @@ -26,7 +26,7 @@ hex = "0.4.3" # workspace rpc-db.workspace = true guest-executor = { workspace = true, features = ["optimism"] } -mpt = { workspace = true, features = ["preimage_context"] } +mpt = { workspace = true } primitives = { workspace = true, features = ["optimism"] } # Ziren @@ -79,3 +79,7 @@ dotenv = "0.15.0" [features] alerting = ["dep:reqwest"] +execution-witness = [ + "mpt/execution-witness", + "rpc-db/execution-witness", +] diff --git a/crates/executor/host/src/bins/persist_report_hook.rs b/crates/executor/host/src/bins/persist_report_hook.rs index 56bd531..41ad8e6 100644 --- a/crates/executor/host/src/bins/persist_report_hook.rs +++ b/crates/executor/host/src/bins/persist_report_hook.rs @@ -6,8 +6,8 @@ use std::{ use alloy_consensus::{Block, BlockHeader}; use csv::{Writer, WriterBuilder}; use guest_executor::executor::{ - ACCRUE_LOG_BLOOM, BLOCK_EXECUTION, COMPUTE_STATE_ROOT, DESERIALZE_INPUTS, INIT_WITNESS_DB, - RECOVER_SENDERS, VALIDATE_EXECUTION, + BLOCK_EXECUTION, COMPUTE_STATE_ROOT, DESERIALZE_INPUTS, INIT_WITNESS_DB, RECOVER_SENDERS, + VALIDATE_EXECUTION, }; use reth_primitives_traits::{BlockBody, NodePrimitives}; use revm_bytecode::opcode::OPCODE_INFO; @@ -32,6 +32,7 @@ const PRECOMPILES: [&str; 10] = [ ]; #[derive(Serialize, Deserialize)] +#[allow(dead_code)] struct ExecutionReportData { chain_id: u64, block_number: u64, @@ -154,9 +155,6 @@ impl PersistExecutionReport { record.push( execution_report.cycle_tracker.get(VALIDATE_EXECUTION).unwrap_or(&0).to_string(), ); - record.push( - execution_report.cycle_tracker.get(ACCRUE_LOG_BLOOM).unwrap_or(&0).to_string(), - ); record.push( execution_report.cycle_tracker.get(COMPUTE_STATE_ROOT).unwrap_or(&0).to_string(), ); diff --git a/crates/executor/host/src/error.rs b/crates/executor/host/src/error.rs index 49a3489..0ef008a 100644 --- a/crates/executor/host/src/error.rs +++ b/crates/executor/host/src/error.rs @@ -3,6 +3,7 @@ use alloy_transport::{RpcError, TransportError, TransportErrorKind}; use mpt::FromProofError; use reth_errors::BlockExecutionError; use revm_primitives::B256; +use rpc_db::RpcDbError; #[derive(Debug, thiserror::Error)] pub enum Error { @@ -26,11 +27,14 @@ pub enum Error { StateRootMismatch(B256, B256), #[error("Failed to read the genesis file: {}", .0)] FailedToReadGenesisFile(#[from] std::io::Error), + #[error("RPC error: {}", 0)] + RpcDbError(#[from] RpcDbError), #[error("custom error: {0}")] Custom(String), } #[derive(Debug, thiserror::Error)] +#[allow(dead_code)] pub(crate) enum SpawnedTaskError { #[error("rpc error: {0}")] Rpc(#[from] RpcError), diff --git a/crates/executor/host/src/executor_components.rs b/crates/executor/host/src/executor_components.rs index 8affca7..02d88bb 100644 --- a/crates/executor/host/src/executor_components.rs +++ b/crates/executor/host/src/executor_components.rs @@ -1,15 +1,16 @@ use std::marker::PhantomData; -use alloy_evm::EthEvmFactory; use alloy_network::Ethereum; use alloy_provider::Network; -use guest_executor::{ - custom::CustomEvmFactory, IntoInput, IntoPrimitives, ValidateBlockPostExecution, -}; +use eyre::Ok; +use guest_executor::{custom::CustomEvmFactory, BlockValidator, IntoInput, IntoPrimitives}; use op_alloy_network::Optimism; +use primitives::genesis::Genesis; +use reth_chainspec::ChainSpec; use reth_ethereum_primitives::EthPrimitives; use reth_evm::ConfigureEvm; use reth_evm_ethereum::EthEvmConfig; +use reth_optimism_chainspec::OpChainSpec; use reth_optimism_evm::OpEvmConfig; use reth_optimism_primitives::OpPrimitives; use reth_primitives_traits::NodePrimitives; @@ -28,11 +29,15 @@ pub trait ExecutorComponents { + DeserializeOwned + IntoPrimitives + IntoInput - + ValidateBlockPostExecution; + + BlockValidator; type EvmConfig: ConfigureEvm; + type ChainSpec; + type Hooks: ExecutionHooks; + + fn try_into_chain_spec(genesis: &Genesis) -> eyre::Result; } #[derive(Debug, Default)] @@ -51,9 +56,16 @@ where type Primitives = EthPrimitives; - type EvmConfig = EthEvmConfig>; + type EvmConfig = EthEvmConfig; + + type ChainSpec = ChainSpec; type Hooks = H; + + fn try_into_chain_spec(genesis: &Genesis) -> eyre::Result { + let spec = genesis.try_into()?; + Ok(spec) + } } #[derive(Debug, Default)] @@ -74,5 +86,12 @@ where type EvmConfig = OpEvmConfig; + type ChainSpec = OpChainSpec; + type Hooks = H; + + fn try_into_chain_spec(genesis: &Genesis) -> eyre::Result { + let spec = genesis.try_into()?; + Ok(spec) + } } diff --git a/crates/executor/host/src/full_executor.rs b/crates/executor/host/src/full_executor.rs index 4d3e383..907a52d 100644 --- a/crates/executor/host/src/full_executor.rs +++ b/crates/executor/host/src/full_executor.rs @@ -12,7 +12,6 @@ use eyre::bail; use guest_executor::io::ClientExecutorInput; use reth_primitives_traits::NodePrimitives; use revm_primitives::B256; -use rpc_db::RpcDb; use serde::de::DeserializeOwned; use sha2::{Digest, Sha256}; use tokio::{task, time::sleep}; @@ -38,7 +37,7 @@ pub async fn build_executor( ) -> eyre::Result> where C: ExecutorComponents, - P: Provider + Clone, + P: Provider + Clone + std::fmt::Debug, { if let Some(provider) = provider { let debug_provider = debug_provider.unwrap_or(provider.clone()); @@ -158,7 +157,7 @@ pub trait BlockExecutor { impl BlockExecutor for EitherExecutor where C: ExecutorComponents, - P: Provider + Clone + 'static, + P: Provider + Clone + std::fmt::Debug, { async fn execute(&self, block_number: u64) -> eyre::Result<()> { match self { @@ -192,11 +191,11 @@ where pub struct FullExecutor where C: ExecutorComponents, - P: Provider + Clone, + P: Provider + Clone + std::fmt::Debug, { provider: P, debug_provider: P, - host_executor: HostExecutor, + host_executor: HostExecutor, client: Arc, pk: Arc, vk: Arc, @@ -207,7 +206,7 @@ where impl FullExecutor where C: ExecutorComponents, - P: Provider + Clone, + P: Provider + Clone + std::fmt::Debug, { pub async fn try_new( provider: P, @@ -232,7 +231,10 @@ where Ok(Self { provider, debug_provider, - host_executor: HostExecutor::new(evm_config), + host_executor: HostExecutor::new( + evm_config, + Arc::new(C::try_into_chain_spec(&config.genesis)?), + ), client, pk: Arc::new(pk), vk: Arc::new(vk), @@ -254,7 +256,7 @@ where impl BlockExecutor for FullExecutor where C: ExecutorComponents, - P: Provider + Clone + 'static, + P: Provider + Clone + std::fmt::Debug, { async fn execute(&self, block_number: u64) -> eyre::Result<()> { self.hooks.on_execution_start(block_number).await?; @@ -281,19 +283,13 @@ where client_input_from_cache } None => { - let rpc_db = RpcDb::new( - self.provider.clone(), - self.debug_provider.clone(), - block_number - 1, - ); - // Execute the host. let client_input = self .host_executor .execute( block_number, - &rpc_db, &self.provider, + &self.debug_provider, self.config.genesis.clone(), self.config.custom_beneficiary, self.config.opcode_tracking, @@ -338,7 +334,7 @@ where impl Debug for FullExecutor where C: ExecutorComponents, - P: Provider + Clone, + P: Provider + Clone + std::fmt::Debug, { fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { f.debug_struct("FullExecutor").field("config", &self.config).finish() diff --git a/crates/executor/host/src/host_executor.rs b/crates/executor/host/src/host_executor.rs index c1ced5d..38aad56 100644 --- a/crates/executor/host/src/host_executor.rs +++ b/crates/executor/host/src/host_executor.rs @@ -1,92 +1,90 @@ -use std::{collections::BTreeSet, sync::Arc}; +use std::sync::Arc; -use futures::future::try_join_all; -use tokio::sync::Semaphore; - -use crate::{error::SpawnedTaskError, HostError}; +use crate::HostError; use alloy_consensus::{BlockHeader, Header, TxReceipt}; -use alloy_evm::EthEvmFactory; +use alloy_network::BlockResponse; use alloy_primitives::{Bloom, Sealable}; use alloy_provider::{Network, Provider}; use guest_executor::{ - custom::CustomEvmFactory, io::ClientExecutorInput, IntoInput, IntoPrimitives, - ValidateBlockPostExecution, + custom::CustomEvmFactory, io::ClientExecutorInput, BlockValidator, IntoInput, IntoPrimitives, }; -use mpt::EthereumState; -use primitives::{account_proof::eip1186_proof_to_account_proof, genesis::Genesis}; +use primitives::genesis::Genesis; use reth_chainspec::ChainSpec; use reth_evm::{ execute::{BasicBlockExecutor, Executor}, ConfigureEvm, }; use reth_evm_ethereum::EthEvmConfig; -use reth_execution_types::ExecutionOutcome; +use reth_optimism_chainspec::OpChainSpec; use reth_optimism_evm::OpEvmConfig; -use reth_primitives_traits::{Block, BlockBody}; -use reth_trie::KeccakKeyHasher; +use reth_primitives_traits::{Block, BlockBody, SealedHeader}; +use reth_trie::{HashedPostState, KeccakKeyHasher}; use revm::database::CacheDB; -use revm_primitives::{Address, B256}; +use revm_primitives::Address; use rpc_db::RpcDb; -pub type EthHostExecutor = HostExecutor>>; +pub type EthHostExecutor = HostExecutor, ChainSpec>; -pub type OpHostExecutor = HostExecutor; +pub type OpHostExecutor = HostExecutor; /// An executor that fetches data from a [Provider] to execute blocks in the [ClientExecutor]. #[derive(Debug, Clone)] -pub struct HostExecutor { +pub struct HostExecutor { evm_config: C, + chain_spec: Arc, } impl EthHostExecutor { pub fn eth(chain_spec: Arc, custom_beneficiary: Option
) -> Self { Self { evm_config: EthEvmConfig::new_with_evm_factory( - chain_spec, - CustomEvmFactory::::new(custom_beneficiary), + chain_spec.clone(), + CustomEvmFactory::new(custom_beneficiary), ), + chain_spec, } } } impl OpHostExecutor { - pub fn optimism(chain_spec: Arc) -> Self { - Self { evm_config: OpEvmConfig::optimism(chain_spec) } + pub fn optimism(chain_spec: Arc) -> Self { + Self { evm_config: OpEvmConfig::optimism(chain_spec.clone()), chain_spec } } } -impl HostExecutor { +impl HostExecutor { /// Creates a new [HostExecutor]. - pub fn new(evm_config: C) -> Self { - Self { evm_config } + pub fn new(evm_config: C, chain_spec: Arc) -> Self { + Self { evm_config, chain_spec } } /// Executes the block with the given block number. pub async fn execute( &self, block_number: u64, - rpc_db: &RpcDb, provider: &P, + debug_provider: &P, genesis: Genesis, custom_beneficiary: Option
, opcode_tracking: bool, ) -> Result, HostError> where - C::Primitives: IntoPrimitives + IntoInput + ValidateBlockPostExecution, - P: Provider + Clone + 'static, + C::Primitives: IntoPrimitives + IntoInput + BlockValidator, + P: Provider + Clone + std::fmt::Debug, N: Network, { let chain_id: u64 = (&genesis).try_into().unwrap(); tracing::debug!("chain id: {}", chain_id); // Fetch the current block and the previous block from the provider. - tracing::info!("fetching the current block and the previous block"); - let current_block = provider + tracing::info!("[{}] fetching the current block and the previous block", block_number); + let rpc_block = provider .get_block_by_number(block_number.into()) .full() .await? - .ok_or(HostError::ExpectedBlock(block_number)) - .map(C::Primitives::into_primitive_block)?; + .ok_or(HostError::ExpectedBlock(block_number))?; + + let current_block = C::Primitives::into_primitive_block(rpc_block.clone()); let previous_block = provider .get_block_by_number((block_number - 1).into()) @@ -95,143 +93,76 @@ impl HostExecutor { .ok_or(HostError::ExpectedBlock(block_number)) .map(C::Primitives::into_primitive_block)?; - // Setup the database for the block executor. - tracing::info!("setting up the database for the block executor"); - let now = std::time::Instant::now(); - // rpc_db.preload_accounts_and_storage().await.map_err(|e| { - // HostError::Custom(format!("Failed to preload accounts and storage: {e}")) - // })?; - tracing::info!("preloaded accounts and storage took {:?}", now.elapsed()); - let cache_db = CacheDB::new(rpc_db); + tracing::info!("[{}] create rpc db", block_number); + #[cfg(not(feature = "execution-witness"))] + let rpc_db = rpc_db::BasicRpcDb::new( + debug_provider, + block_number - 1, + previous_block.header().state_root(), + ); + #[cfg(feature = "execution-witness")] + let rpc_db = rpc_db::ExecutionWitnessRpcDb::new( + debug_provider, + block_number - 1, + previous_block.header().state_root(), + ) + .await + .map_err(HostError::RpcDbError)?; + tracing::info!("[{}] create rpc db done", block_number); + + let cache_db = CacheDB::new(&rpc_db); - let block = current_block - .clone() - .try_into_recovered() - .map_err(|_| HostError::FailedToRecoverSenders) - .unwrap(); let block_executor = BasicBlockExecutor::new(self.evm_config.clone(), cache_db, Some(chain_id)); - // Execute the block and fetch all the necessary data along the way. tracing::info!( "executing the block with rpc db: block_number={}, transaction_count={}", block_number, current_block.body().transactions().len() ); + let block = current_block + .clone() + .try_into_recovered() + .map_err(|_| HostError::FailedToRecoverSenders)?; + + // Validate the block header. + C::Primitives::validate_header( + &SealedHeader::seal_slow(C::Primitives::into_consensus_header( + rpc_block.header().clone(), + )), + self.chain_spec.clone(), + )?; + + tracing::info!("[{}] execute block", block_number); let now = std::time::Instant::now(); let execution_output = block_executor.execute(&block)?; - tracing::info!("block execution took {:?}", now.elapsed()); + tracing::info!("[{}] block execution took {:?}", block_number, now.elapsed()); // Validate the block post execution. - tracing::info!("validating the block post execution"); - C::Primitives::validate_block_post_execution(&block, &genesis, &execution_output)?; + tracing::info!("[{}] validating the block post execution", block_number); + C::Primitives::validate_block_post_execution( + &block, + self.chain_spec.clone(), + &execution_output, + )?; // Accumulate the logs bloom. - tracing::info!("accumulating the logs bloom"); + tracing::info!("[{}] accumulating the logs bloom", block_number); let mut logs_bloom = Bloom::default(); execution_output.result.receipts.iter().for_each(|r| { logs_bloom.accrue_bloom(&r.bloom()); }); - // Convert the output to an execution outcome. - let executor_outcome = ExecutionOutcome::new( - execution_output.state, - vec![execution_output.result.receipts], - current_block.header().number(), - vec![execution_output.result.requests], - ); - - let state_requests = rpc_db.get_state_requests(); - - // For every account we touched, fetch the storage proofs for all the slots we touched. - tracing::info!("fetching storage proofs"); - - // max_concurrency - // TODO: use configurable concurrency limit - let semaphore = Arc::new(Semaphore::new(32)); - - let before_tasks = state_requests.iter().map(|(address, used_keys)| { - let permit = semaphore.clone().acquire_owned(); - let provider = provider.clone(); - let address = *address; - - let keys = { - let modified_keys = executor_outcome - .state() - .state - .get(&address) - .map(|account| { - account.storage.keys().map(|k| B256::from(*k)).collect::>() - }) - .unwrap_or_default(); - - used_keys - .iter() - .map(|k| B256::from(*k)) - .chain(modified_keys.into_iter()) - .collect::>() - .into_iter() - .collect::>() - }; - - tokio::spawn(async move { - let _permit = permit.await; - let proof = - provider.get_proof(address, keys).block_id((block_number - 1).into()).await?; - let converted = eip1186_proof_to_account_proof(proof); - Ok::<_, SpawnedTaskError>(converted) - }) - }); - - let after_tasks = state_requests.keys().map(|address| { - let permit = semaphore.clone().acquire_owned(); - let provider = provider.clone(); - let address = *address; - - let modified_keys = executor_outcome - .state() - .state - .get(&address) - .map(|account| account.storage.keys().map(|k| B256::from(*k)).collect::>()) - .unwrap_or_default(); - - tokio::spawn(async move { - let _permit = permit.await; - let proof = provider - .get_proof(address, modified_keys) - .block_id(block_number.into()) - .await?; - let converted = eip1186_proof_to_account_proof(proof); - Ok::<_, SpawnedTaskError>(converted) - }) - }); - - let before_storage_proofs = try_join_all(before_tasks) - .await - .map_err(|e| HostError::Custom(format!("join error: {e}")))? - .into_iter() - .map(|res| res.map_err(|e| HostError::Custom(format!("task error: {e}")))) - .collect::, _>>()?; - let after_storage_proofs = try_join_all(after_tasks) - .await - .map_err(|e| HostError::Custom(format!("join error: {e}")))? - .into_iter() - .map(|res| res.map_err(|e| HostError::Custom(format!("task error: {e}")))) - .collect::, _>>()?; - - tracing::info!("Building Ethereum state from storage proofs"); - let state = EthereumState::from_transition_proofs( - previous_block.header().state_root(), - &before_storage_proofs.iter().map(|item| (item.address, item.clone())).collect(), - &after_storage_proofs.iter().map(|item| (item.address, item.clone())).collect(), - )?; + let state = rpc_db.state(&execution_output.state).await.map_err(HostError::RpcDbError)?; // Verify the state root. - tracing::info!("verifying the state root"); + tracing::info!("[{}] verifying the state root", block_number); let state_root = { let mut mutated_state = state.clone(); - mutated_state.update(&executor_outcome.hash_state_slow::()); + mutated_state.update(&HashedPostState::from_bundle_state::( + &execution_output.state.state, + )); mutated_state.state_root() }; if state_root != current_block.header().state_root() { @@ -268,6 +199,8 @@ impl HostExecutor { requests_hash: current_block.header().requests_hash(), }; + let ancestor_headers = rpc_db.ancestor_headers().await.map_err(HostError::RpcDbError)?; + // Assert the derived header is correct. let constructed_header_hash = header.hash_slow(); let target_hash = current_block.header().hash_slow(); @@ -283,31 +216,17 @@ impl HostExecutor { state_root ); - // Fetch the parent headers needed to constrain the BLOCKHASH opcode. - let oldest_ancestor = *rpc_db.oldest_ancestor.read().unwrap(); - let mut ancestor_headers = vec![]; - tracing::info!("fetching {} ancestor headers", block_number - oldest_ancestor); - for height in (oldest_ancestor..=(block_number - 1)).rev() { - let block = provider - .get_block_by_number(height.into()) - .await? - .ok_or(HostError::ExpectedBlock(height))?; - - ancestor_headers.push(C::Primitives::into_primitive_header(block)) - } - // Create the client input. let client_input = ClientExecutorInput { current_block: C::Primitives::into_input_block(current_block), ancestor_headers, parent_state: state, - state_requests, - bytecodes: rpc_db.get_bytecodes(), + bytecodes: rpc_db.bytecodes(), genesis, custom_beneficiary, opcode_tracking, }; - tracing::info!("successfully generated client input"); + tracing::info!("[{}] successfully generated client input", block_number); Ok(client_input) } diff --git a/crates/executor/host/src/lib.rs b/crates/executor/host/src/lib.rs index 82cb2d9..c7a2515 100644 --- a/crates/executor/host/src/lib.rs +++ b/crates/executor/host/src/lib.rs @@ -1,7 +1,6 @@ #![cfg_attr(not(test), allow(unused_crate_dependencies))] use alloy_chains::Chain; -use alloy_evm::EthEvmFactory; pub use error::Error as HostError; use guest_executor::custom::CustomEvmFactory; use primitives::genesis::Genesis; @@ -38,13 +37,10 @@ mod utils; pub fn create_eth_block_execution_strategy_factory( genesis: &Genesis, custom_beneficiary: Option
, -) -> EthEvmConfig> { +) -> EthEvmConfig { let chain_spec: Arc = Arc::new(genesis.try_into().unwrap()); - EthEvmConfig::new_with_evm_factory( - chain_spec, - CustomEvmFactory::::new(custom_beneficiary), - ) + EthEvmConfig::new_with_evm_factory(chain_spec, CustomEvmFactory::new(custom_beneficiary)) } pub fn create_op_block_execution_strategy_factory(genesis: &Genesis) -> OpEvmConfig { @@ -52,6 +48,7 @@ pub fn create_op_block_execution_strategy_factory(genesis: &Genesis) -> OpEvmCon OpEvmConfig::optimism(chain_spec) } + #[derive(Debug)] pub struct Config { pub chain: Chain, diff --git a/crates/executor/host/tests/integration.rs b/crates/executor/host/tests/integration.rs index 23d0679..b246c31 100644 --- a/crates/executor/host/tests/integration.rs +++ b/crates/executor/host/tests/integration.rs @@ -4,7 +4,7 @@ use alloy_provider::{network::Ethereum, Network, RootProvider}; use guest_executor::{ executor::{ClientExecutor, EthClientExecutor}, io::ClientExecutorInput, - FromInput, IntoInput, IntoPrimitives, ValidateBlockPostExecution, + BlockValidator, FromInput, IntoInput, IntoPrimitives, }; use host_executor::{EthHostExecutor, HostExecutor}; use primitives::genesis::Genesis; @@ -12,7 +12,6 @@ use reth_chainspec::ChainSpec; use reth_evm::ConfigureEvm; use reth_optimism_chainspec::OpChainSpec; use revm_primitives::{address, Address}; -use rpc_db::RpcDb; use serde::{de::DeserializeOwned, Serialize}; use tracing_subscriber::{ fmt, prelude::__tracing_subscriber_SubscriberExt, util::SubscriberInitExt, EnvFilter, @@ -34,7 +33,7 @@ async fn test_e2e_optimism() { // Setup the client executor. let guest_executor = guest_executor::executor::OpClientExecutor::optimism(chain_spec); - run_e2e::<_, op_alloy_network::Optimism>( + run_e2e::<_, OpChainSpec, op_alloy_network::Optimism>( host_executor, guest_executor, "RPC_10", @@ -75,7 +74,7 @@ async fn run_eth_e2e( // Setup the client executor. let guest_executor = EthClientExecutor::eth(chain_spec, custom_beneficiary); - run_e2e::<_, Ethereum>( + run_e2e::<_, ChainSpec, Ethereum>( host_executor, guest_executor, env_var_key, @@ -86,9 +85,9 @@ async fn run_eth_e2e( .await; } -async fn run_e2e( - host_executor: HostExecutor, - guest_executor: ClientExecutor, +async fn run_e2e( + host_executor: HostExecutor, + client_executor: ClientExecutor, env_var_key: &str, block_number: u64, genesis: &Genesis, @@ -98,7 +97,7 @@ async fn run_e2e( C::Primitives: FromInput + IntoPrimitives + IntoInput - + ValidateBlockPostExecution + + BlockValidator + Serialize + DeserializeOwned, N: Network, @@ -117,16 +116,14 @@ async fn run_e2e( Url::parse(std::env::var(env_var_key).unwrap().as_str()).expect("invalid rpc url"); let provider = RootProvider::::new_http(rpc_url); - let rpc_db = RpcDb::new(provider.clone(), provider.clone(), block_number - 1); - // Execute the host. let client_input = host_executor - .execute(block_number, &rpc_db, &provider, genesis.clone(), custom_beneficiary, false) + .execute(block_number, &provider, &provider, genesis.clone(), custom_beneficiary, false) .await .expect("failed to execute host"); // Execute the client. - guest_executor.execute(client_input.clone()).expect("failed to execute client"); + client_executor.execute(client_input.clone()).expect("failed to execute client"); // Save the client input to a buffer. let buffer = bincode::serialize(&client_input).unwrap(); diff --git a/crates/mpt/Cargo.toml b/crates/mpt/Cargo.toml index dccff12..528a91e 100644 --- a/crates/mpt/Cargo.toml +++ b/crates/mpt/Cargo.toml @@ -18,12 +18,14 @@ reth-trie.workspace = true # alloy alloy-primitives.workspace = true alloy-rlp.workspace = true +alloy-rpc-types.workspace = true +alloy-rpc-types-debug = {workspace = true, optional = true } [dev-dependencies] hex-literal.workspace = true -mpt = { path = ".", features = ["preimage_context"] } +mpt = { path = "." } [features] -default = [] -preimage_context = [] +default = ["execution-witness"] +execution-witness = ["dep:alloy-rpc-types-debug"] diff --git a/crates/mpt/src/execution_witness.rs b/crates/mpt/src/execution_witness.rs new file mode 100644 index 0000000..48cb0d1 --- /dev/null +++ b/crates/mpt/src/execution_witness.rs @@ -0,0 +1,106 @@ +use alloy_primitives::{keccak256, map::HashMap, B256}; +use alloy_rlp::Decodable; +use alloy_rpc_types_debug::ExecutionWitness; +use reth_trie::TrieAccount; + +use crate::mpt::{resolve_nodes, MptNode, MptNodeData, MptNodeReference}; + +// Builds tries from the witness state. +// +// NOTE: This method should be called outside zkVM! In general you construct tries, then +// validate them inside zkVM. +pub(crate) fn build_validated_tries( + witness: &ExecutionWitness, + pre_state_root: B256, +) -> Result<(MptNode, HashMap), String> { + // Step 1: Decode all RLP-encoded trie nodes and index by hash + // IMPORTANT: Witness state contains both *state trie* nodes and *storage tries* nodes! + let mut node_map: HashMap = HashMap::default(); + let mut node_by_hash: HashMap = HashMap::default(); + let mut root_node: Option = None; + + for encoded in &witness.state { + let node = MptNode::decode(encoded).expect("Valid MPT node in witness"); + let hash = keccak256(encoded); + if hash == pre_state_root { + root_node = Some(node.clone()); + } + node_by_hash.insert(hash, node.clone()); + node_map.insert(node.reference(), node); + } + + // Step 2: Use root_node or fallback to Digest + let root = root_node.unwrap_or_else(|| MptNodeData::Digest(pre_state_root).into()); + + // Build state trie. + let mut raw_storage_tries = vec![]; + let state_trie = resolve_nodes(&root, &node_map); + + state_trie.for_each_leaves(|key, mut value| { + let account = TrieAccount::decode(&mut value).unwrap(); + let hashed_address = B256::from_slice(key); + raw_storage_tries.push((hashed_address, account.storage_root)); + }); + + // Step 3: Build storage tries per account efficiently + let mut storage_tries: HashMap = HashMap::default(); + + for (hashed_address, storage_root) in raw_storage_tries { + let root_node = match node_by_hash.get(&storage_root).cloned() { + Some(node) => node, + None => { + // An execution witness can include an account leaf (with non-empty storageRoot), + // but omit its entire storage trie when that account's storage was + // NOT touched during the block. + continue; + } + }; + let storage_trie = resolve_nodes(&root_node, &node_map); + + if storage_trie.is_digest() { + panic!("Could not resolve storage trie for {storage_root}"); + } + + // Insert resolved storage trie. + storage_tries.insert(hashed_address, storage_trie); + } + + // Step 3a: Verify that state_trie was built correctly - confirm tree hash with pre state root. + validate_state_trie(&state_trie, pre_state_root); + + // Step 3b: Verify that each storage trie matches the declared storage_root in the state trie. + validate_storage_tries(&state_trie, &storage_tries)?; + + Ok((state_trie, storage_tries)) +} + +// Validate that state_trie was built correctly - confirm tree hash with pre state root. +fn validate_state_trie(state_trie: &MptNode, pre_state_root: B256) { + if state_trie.hash() != pre_state_root { + panic!("Computed state root does not match pre_state_root"); + } +} + +// Validates that each storage trie matches the declared storage_root in the state trie. +fn validate_storage_tries( + state_trie: &MptNode, + storage_tries: &HashMap, +) -> Result<(), String> { + for (hashed_address, storage_trie) in storage_tries.iter() { + let account = state_trie + .get_rlp::(hashed_address.as_slice()) + .map_err(|_| "Failed to decode account from state trie")? + .ok_or("Account not found in state trie")?; + + let storage_root = account.storage_root; + let actual_hash = storage_trie.hash(); + + if storage_root != actual_hash { + return Err(format!( + "Mismatched storage root for address hash {hashed_address:?}: expected {storage_root:?}, got {actual_hash:?}", + )); + } + } + + Ok(()) +} diff --git a/crates/mpt/src/lib.rs b/crates/mpt/src/lib.rs index 63fd4b4..97642df 100644 --- a/crates/mpt/src/lib.rs +++ b/crates/mpt/src/lib.rs @@ -1,16 +1,23 @@ #![cfg_attr(not(test), warn(unused_crate_dependencies))] -use alloy_primitives::{map::HashMap, Address, B256}; +use alloy_primitives::{keccak256, map::HashMap, Address, B256}; +use alloy_rpc_types::EIP1186AccountProofResponse; use reth_trie::{AccountProof, HashedPostState, HashedStorage, TrieAccount}; use serde::{Deserialize, Serialize}; +#[cfg(feature = "execution-witness")] +mod execution_witness; + /// Module containing MPT code adapted from `zeth`. mod mpt; pub use mpt::Error; -use mpt::{proofs_to_tries, transition_proofs_to_tries, MptNode}; +use mpt::{ + mpt_from_proof, parse_proof, proofs_to_tries, resolve_nodes, transition_proofs_to_tries, + MptNode, +}; /// Ethereum state trie and account storage tries. -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[derive(Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct EthereumState { pub state_trie: MptNode, pub storage_tries: HashMap, @@ -34,11 +41,51 @@ impl EthereumState { proofs_to_tries(state_root, proofs) } + /// Builds Ethereum state tries from a EIP-1186 proof. + pub fn from_account_proof(proof: EIP1186AccountProofResponse) -> Result { + let mut storage_tries = HashMap::with_hasher(Default::default()); + let mut storage_nodes = HashMap::with_hasher(Default::default()); + let mut storage_root_node = MptNode::default(); + + for storage_proof in &proof.storage_proof { + let proof_nodes = parse_proof(&storage_proof.proof)?; + mpt_from_proof(&proof_nodes)?; + + // the first node in the proof is the root + if let Some(node) = proof_nodes.first() { + storage_root_node = node.clone(); + } + + proof_nodes.into_iter().for_each(|node| { + storage_nodes.insert(node.reference(), node); + }); + } + + storage_tries + .insert(keccak256(proof.address), resolve_nodes(&storage_root_node, &storage_nodes)); + + let state = EthereumState { + state_trie: MptNode::from_account_proof(&proof.account_proof)?, + storage_tries, + }; + + Ok(state) + } + + #[cfg(feature = "execution-witness")] + pub fn from_execution_witness( + witness: &alloy_rpc_types_debug::ExecutionWitness, + pre_state_root: B256, + ) -> Self { + let (state_trie, storage_tries) = + execution_witness::build_validated_tries(witness, pre_state_root).unwrap(); + + Self { state_trie, storage_tries } + } + /// Mutates state based on diffs provided in [`HashedPostState`]. pub fn update(&mut self, post_state: &HashedPostState) { for (hashed_address, account) in post_state.accounts.iter() { - let hashed_address = hashed_address.as_slice(); - match account { Some(account) => { let state_storage = &post_state @@ -47,7 +94,7 @@ impl EthereumState { .cloned() .unwrap_or_else(|| HashedStorage::new(false)); let storage_root = { - let storage_trie = self.storage_tries.get_mut(hashed_address).unwrap(); + let storage_trie = self.storage_tries.entry(*hashed_address).or_default(); if state_storage.wiped { storage_trie.clear(); @@ -71,10 +118,10 @@ impl EthereumState { storage_root, code_hash: account.get_bytecode_hash(), }; - self.state_trie.insert_rlp(hashed_address, state_account).unwrap(); + self.state_trie.insert_rlp(hashed_address.as_slice(), state_account).unwrap(); } None => { - self.state_trie.delete(hashed_address).unwrap(); + self.state_trie.delete(hashed_address.as_slice()).unwrap(); } } } @@ -86,6 +133,18 @@ impl EthereumState { } } +impl core::fmt::Debug for EthereumState { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("EthereumState"); + ds.field("state_trie", &self.state_trie); + + // Use BTreeMap for stable ordering when printing + let ordered: std::collections::BTreeMap<_, _> = self.storage_tries.iter().collect(); + ds.field("storage_tries", &ordered); + ds.finish() + } +} + #[derive(Debug, thiserror::Error)] pub enum FromProofError { #[error("Node {} is not found by hash", .0)] @@ -96,7 +155,7 @@ pub enum FromProofError { NodeCannotHaveChildren(usize), #[error("Found mismatched storage root after reconstruction \n account {}, found {}, expected {}", .0, .1, .2)] MismatchedStorageRoot(Address, B256, B256), - #[error("Found mismatched staet root after reconstruction \n found {}, expected {}", .0, .1)] + #[error("Found mismatched state root after reconstruction \n found {}, expected {}", .0, .1)] MismatchedStateRoot(B256, B256), // todo: Should decode return a decoder error? #[error("Error decoding proofs from bytes, {}", .0)] diff --git a/crates/mpt/src/mpt.rs b/crates/mpt/src/mpt.rs index aae32f7..9fb7b35 100644 --- a/crates/mpt/src/mpt.rs +++ b/crates/mpt/src/mpt.rs @@ -23,12 +23,12 @@ use alloc::boxed::Box; use alloy_primitives::{b256, map::HashMap, B256}; use alloy_rlp::Encodable; use core::{ - cell::RefCell, cmp, fmt::{Debug, Write}, iter, mem, }; -use reth_trie::AccountProof; +use reth_trie::{AccountProof, Nibbles}; +use std::sync::Mutex; use rlp::{Decodable, DecoderError, Prototype, Rlp}; use serde::{Deserialize, Serialize}; @@ -91,14 +91,43 @@ pub fn keccak(data: impl AsRef<[u8]>) -> [u8; 32] { /// optimizing storage. However, operations targeting a truncated part will fail and /// return an error. Another distinction of this implementation is that branches cannot /// store values, aligning with the construction of MPTs in Ethereum. -#[derive(Clone, Debug, Default, PartialEq, Eq, Ord, PartialOrd, Serialize, Deserialize)] +#[derive(Default, Serialize, Deserialize)] pub struct MptNode { /// The type and data of the node. data: MptNodeData, /// Cache for a previously computed reference of this node. This is skipped during /// serialization. #[serde(skip)] - cached_reference: RefCell>, + cached_reference: Mutex>, +} + +impl Ord for MptNode { + fn cmp(&self, other: &Self) -> cmp::Ordering { + self.data.cmp(&other.data) + } +} + +impl PartialOrd for MptNode { + fn partial_cmp(&self, other: &Self) -> Option { + Some(self.cmp(other)) + } +} + +impl Eq for MptNode {} + +impl PartialEq for MptNode { + fn eq(&self, other: &Self) -> bool { + self.data == other.data + } +} + +impl Clone for MptNode { + fn clone(&self) -> Self { + Self { + data: self.data.clone(), + cached_reference: Mutex::new(self.cached_reference.lock().unwrap().clone()), + } + } } /// Represents custom error types for the sparse Merkle Patricia Trie (MPT). @@ -131,7 +160,7 @@ pub enum Error { /// Each node in the trie can be of one of several types, each with its own specific data /// structure. This enum provides a clear and type-safe way to represent the data /// associated with each node type. -#[derive(Clone, Debug, Default, PartialEq, Eq, Ord, PartialOrd, Serialize, Deserialize)] +#[derive(Clone, Default, PartialEq, Eq, Ord, PartialOrd, Serialize, Deserialize)] pub enum MptNodeData { /// Represents an empty trie node. #[default] @@ -154,7 +183,7 @@ pub enum MptNodeData { /// Nodes in the MPT can reference other nodes either directly through their byte /// representation or indirectly through a hash of their encoding. This enum provides a /// clear and type-safe way to represent these references. -#[derive(Clone, Debug, PartialEq, Eq, Hash, Ord, PartialOrd, Serialize, Deserialize)] +#[derive(Clone, PartialEq, Eq, Hash, Ord, PartialOrd, Serialize, Deserialize)] pub enum MptNodeReference { /// Represents a direct reference to another node using its byte encoding. Typically /// used for short encodings that are less than 32 bytes in length. @@ -171,7 +200,62 @@ pub enum MptNodeReference { /// `cached_reference` field to `None`. impl From for MptNode { fn from(value: MptNodeData) -> Self { - Self { data: value, cached_reference: RefCell::new(None) } + Self { data: value, cached_reference: Mutex::new(None) } + } +} + +impl core::fmt::Debug for MptNodeReference { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + match self { + MptNodeReference::Bytes(b) => { + write!(f, "Ref::Bytes({})", alloy_primitives::hex::encode(b)) + } + MptNodeReference::Digest(h) => { + write!(f, "Ref::Digest({})", alloy_primitives::hex::encode(h.as_slice())) + } + } + } +} + +impl core::fmt::Debug for MptNodeData { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + match self { + MptNodeData::Null => write!(f, "Null"), + MptNodeData::Leaf(k, v) => write!( + f, + "Leaf(key={}, value={})", + alloy_primitives::hex::encode(k), + alloy_primitives::hex::encode(v) + ), + MptNodeData::Extension(k, child) => f + .debug_struct("Extension") + .field("key", &alloy_primitives::hex::encode(k)) + .field("child", child) + .finish(), + MptNodeData::Digest(h) => write!(f, "Digest({})", alloy_primitives::hex::encode(h)), + MptNodeData::Branch(children) => { + let mut ds = f.debug_struct("Branch"); + for (i, child) in children.iter().enumerate() { + if let Some(c) = child { + ds.field(&format!("child_{i}"), c); + } + } + ds.finish() + } + } + } +} + +impl core::fmt::Debug for MptNode { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("MptNode"); + ds.field("data", &self.data); + if let Ok(guard) = self.cached_reference.lock() { + if let Some(reference) = guard.as_ref() { + ds.field("cached_reference", reference); + } + } + ds.finish() } } @@ -287,6 +371,12 @@ impl Decodable for MptNode { /// and retrieving values, as well as utility methods for encoding, decoding, and /// debugging. impl MptNode { + /// Creates a Merkle Patricia trie from an EIP-1186 proof. + pub fn from_account_proof(account_proof: &[impl AsRef<[u8]>]) -> Result { + let nodes = parse_proof(account_proof)?; + mpt_from_proof(&nodes) + } + /// Clears the trie, replacing its data with an empty node, [MptNodeData::Null]. /// /// This method effectively removes all key-value pairs from the trie. @@ -320,7 +410,36 @@ impl MptNode { /// storage or transmission purposes. #[inline] pub fn reference(&self) -> MptNodeReference { - self.cached_reference.borrow_mut().get_or_insert_with(|| self.calc_reference()).clone() + self.cached_reference.lock().unwrap().get_or_insert_with(|| self.calc_reference()).clone() + } + + pub fn for_each_leaves(&self, mut f: F) { + let mut stack = vec![(self, Nibbles::default())]; + + while let Some((node, path)) = stack.pop() { + match node.as_data() { + MptNodeData::Null | MptNodeData::Digest(_) => (), + MptNodeData::Branch(branch) => { + for (i, n) in + branch.iter().enumerate().filter_map(|(i, n)| n.as_ref().map(|n| (i, n))) + { + let mut new_path = path; + new_path.push(i as u8); + stack.push((n, new_path)); + } + } + MptNodeData::Leaf(prefix, value) => { + let mut full_path = path; + full_path.extend(&Nibbles::from_nibbles(prefix_nibs(prefix))); + f(&full_path.pack(), value) + } + MptNodeData::Extension(prefix, node) => { + let mut new_path = path; + new_path.extend(&Nibbles::from_nibbles(prefix_nibs(prefix))); + stack.push((node, new_path)); + } + } + } } /// Computes and returns the 256-bit hash of the node. @@ -330,12 +449,8 @@ impl MptNode { pub fn hash(&self) -> B256 { match self.data { MptNodeData::Null => EMPTY_ROOT, - _ => match self - .cached_reference - .borrow_mut() - .get_or_insert_with(|| self.calc_reference()) - { - MptNodeReference::Digest(digest) => *digest, + _ => match self.reference() { + MptNodeReference::Digest(digest) => digest, MptNodeReference::Bytes(bytes) => keccak(bytes).into(), }, } @@ -343,9 +458,9 @@ impl MptNode { /// Encodes the [MptNodeReference] of this node into the `out` buffer. fn reference_encode(&self, out: &mut dyn alloy_rlp::BufMut) { - match self.cached_reference.borrow_mut().get_or_insert_with(|| self.calc_reference()) { + match self.reference() { // if the reference is an RLP-encoded byte slice, copy it directly - MptNodeReference::Bytes(bytes) => out.put_slice(bytes), + MptNodeReference::Bytes(bytes) => out.put_slice(&bytes), // if the reference is a digest, RLP-encode it with its fixed known length MptNodeReference::Digest(digest) => { out.put_u8(alloy_rlp::EMPTY_STRING_CODE + 32); @@ -356,7 +471,7 @@ impl MptNode { /// Returns the length of the encoded [MptNodeReference] of this node. fn reference_length(&self) -> usize { - match self.cached_reference.borrow_mut().get_or_insert_with(|| self.calc_reference()) { + match self.reference() { MptNodeReference::Bytes(bytes) => bytes.len(), MptNodeReference::Digest(_) => 1 + 32, } @@ -711,7 +826,7 @@ impl MptNode { } fn invalidate_ref_cache(&mut self) { - self.cached_reference.borrow_mut().take(); + self.cached_reference.lock().unwrap().take(); } /// Returns the number of traversable nodes in the trie. @@ -1284,6 +1399,18 @@ mod tests { trie.get(b"a0").unwrap_err(); } + #[test] + pub fn test_for_each_leaves() { + let mut trie = MptNode::default(); + trie.insert(b"dog", b"puppy".to_vec()).unwrap(); + trie.insert(b"dock", b"boat".to_vec()).unwrap(); + + trie.for_each_leaves(|k, v| { + println!("key: {k:?}"); + println!("value: {v:?}"); + }); + } + #[test] pub fn test_branch_value() { let mut trie = MptNode::default(); diff --git a/crates/primitives/Cargo.toml b/crates/primitives/Cargo.toml index c5682f3..b2ae76d 100644 --- a/crates/primitives/Cargo.toml +++ b/crates/primitives/Cargo.toml @@ -17,6 +17,7 @@ reth-optimism-forks = { workspace = true, optional = true } reth-trie.workspace = true # alloy +alloy-eips.workspace = true alloy-genesis.workspace = true alloy-rpc-types.workspace = true diff --git a/crates/primitives/src/genesis.rs b/crates/primitives/src/genesis.rs index 06f7648..72e4c6b 100644 --- a/crates/primitives/src/genesis.rs +++ b/crates/primitives/src/genesis.rs @@ -1,5 +1,11 @@ +use alloy_eips::{eip7840::BlobParams, BlobScheduleBlobParams}; use eyre::eyre; -use reth_chainspec::{BaseFeeParams, BaseFeeParamsKind, Chain, ChainSpec, EthereumHardfork}; +use reth_chainspec::{ + mainnet::{MAINNET_BPO1_TIMESTAMP, MAINNET_BPO2_TIMESTAMP}, + sepolia::{SEPOLIA_BPO1_TIMESTAMP, SEPOLIA_BPO2_TIMESTAMP}, + BaseFeeParams, BaseFeeParamsKind, Chain, ChainSpec, EthereumHardfork, + MAINNET_PRUNE_DELETE_LIMIT, +}; use serde::{Deserialize, Serialize}; pub const LINEA_GENESIS_JSON: &str = include_str!("./genesis/59144.json"); @@ -70,8 +76,11 @@ impl TryFrom<&Genesis> for ChainSpec { hardforks: EthereumHardfork::mainnet().into(), deposit_contract: Default::default(), base_fee_params: BaseFeeParamsKind::Constant(BaseFeeParams::ethereum()), - prune_delete_limit: 20000, - blob_params: Default::default(), + prune_delete_limit: MAINNET_PRUNE_DELETE_LIMIT, + blob_params: BlobScheduleBlobParams::default().with_scheduled([ + (MAINNET_BPO1_TIMESTAMP, BlobParams::bpo1()), + (MAINNET_BPO2_TIMESTAMP, BlobParams::bpo2()), + ]), }; Ok(mainnet) @@ -86,7 +95,10 @@ impl TryFrom<&Genesis> for ChainSpec { deposit_contract: Default::default(), base_fee_params: BaseFeeParamsKind::Constant(BaseFeeParams::ethereum()), prune_delete_limit: 10000, - blob_params: Default::default(), + blob_params: BlobScheduleBlobParams::default().with_scheduled([ + (SEPOLIA_BPO1_TIMESTAMP, BlobParams::bpo1()), + (SEPOLIA_BPO2_TIMESTAMP, BlobParams::bpo2()), + ]), }; Ok(sepolia) } diff --git a/crates/primitives/src/genesis/2345.json b/crates/primitives/src/genesis/2345.json index cba561f..ade5ced 100644 --- a/crates/primitives/src/genesis/2345.json +++ b/crates/primitives/src/genesis/2345.json @@ -17,6 +17,7 @@ "shanghaiTime": 0, "cancunTime": 0, "pragueTime": 1753149600, + "osakaTime": 1766160000, "terminalTotalDifficulty": 0, "goat": {} }, diff --git a/crates/primitives/src/genesis/48816.json b/crates/primitives/src/genesis/48816.json index 6c61a6d..f765abc 100644 --- a/crates/primitives/src/genesis/48816.json +++ b/crates/primitives/src/genesis/48816.json @@ -17,6 +17,7 @@ "shanghaiTime": 0, "cancunTime": 0, "pragueTime": 1752544800, + "osakaTime": 1765810800, "terminalTotalDifficulty": 0, "goat": {} }, diff --git a/crates/storage/rpc-db/Cargo.toml b/crates/storage/rpc-db/Cargo.toml index 2ebf09e..4780e6c 100644 --- a/crates/storage/rpc-db/Cargo.toml +++ b/crates/storage/rpc-db/Cargo.toml @@ -5,23 +5,36 @@ version.workspace = true edition.workspace = true [dependencies] +async-trait.workspace = true tokio.workspace = true thiserror.workspace = true tracing.workspace = true +mpt.workspace = true +primitives.workspace = true + # reth reth-storage-errors.workspace = true # revm +revm-database.workspace = true revm-database-interface.workspace = true revm-primitives.workspace = true revm-state.workspace = true # alloy +alloy-consensus = { workspace = true, optional = true } alloy-primitives.workspace = true alloy-provider.workspace = true -alloy-rpc-types.workspace = true +alloy-transport.workspace = true +alloy-rlp = { workspace = true, optional = true } +alloy-trie = { workspace = true, optional = true, features = ["ethereum"] } -serde.workspace = true -serde_json.workspace = true -indexmap = { version = "2.9.0", features = ["serde"] } \ No newline at end of file +[features] +default = ["execution-witness"] +execution-witness = [ + "dep:alloy-consensus", + "dep:alloy-rlp", + "dep:alloy-trie", + "alloy-provider/debug-api" +] diff --git a/crates/storage/rpc-db/src/basic.rs b/crates/storage/rpc-db/src/basic.rs new file mode 100644 index 0000000..7d48991 --- /dev/null +++ b/crates/storage/rpc-db/src/basic.rs @@ -0,0 +1,311 @@ +use std::{ + collections::{BTreeMap, BTreeSet}, + marker::PhantomData, + sync::{Arc, RwLock}, +}; + +use alloy_consensus::{BlockHeader, Header}; +use alloy_primitives::{map::HashMap, U256}; +use alloy_provider::{ + network::{primitives::HeaderResponse, BlockResponse}, + Network, Provider, +}; +use async_trait::async_trait; +use mpt::EthereumState; +use primitives::account_proof::eip1186_proof_to_account_proof; +use reth_storage_errors::{db::DatabaseError, provider::ProviderError}; +use revm_database::BundleState; +use revm_database_interface::DatabaseRef; +use revm_primitives::{Address, B256, KECCAK_EMPTY}; +use revm_state::{AccountInfo, Bytecode}; +use tracing::debug; + +use crate::{error::RpcDbError, RpcDb}; + +/// A database that fetches data from a [Provider] over a [Transport]. +#[derive(Debug, Clone)] +pub struct BasicRpcDb { + /// The provider which fetches data. + pub provider: P, + /// The block to fetch data from. + pub block_number: u64, + ///The state root to fetch data from. + pub state_root: B256, + /// The cached accounts. + pub accounts: Arc>>, + /// The cached storage values. + pub storage: Arc>>>, + /// The oldest block whose header/hash has been requested. + pub oldest_ancestor: Arc>, + + phantom: PhantomData, +} + +impl + Clone, N: Network> BasicRpcDb { + /// Create a new [`BasicRpcDb`]. + pub fn new(provider: P, block_number: u64, state_root: B256) -> Self { + Self { + provider, + block_number, + state_root, + accounts: Arc::new(RwLock::new(HashMap::with_hasher(Default::default()))), + storage: Arc::new(RwLock::new(HashMap::with_hasher(Default::default()))), + oldest_ancestor: Arc::new(RwLock::new(block_number)), + phantom: PhantomData, + } + } + + /// Fetch the [AccountInfo] for an [Address]. + pub async fn fetch_account_info(&self, address: Address) -> Result { + debug!("fetching account info for address: {}", address); + + // Fetch the proof for the account. + let proof = self + .provider + .get_proof(address, vec![]) + .number(self.block_number) + .await + .map_err(|e| RpcDbError::GetProofError(address, e.to_string()))?; + + // Fetch the code of the account. + let code = self + .provider + .get_code_at(address) + .number(self.block_number) + .await + .map_err(|e| RpcDbError::GetCodeError(address, e.to_string()))?; + + // Construct the account info & write it to the log. + let bytecode = Bytecode::new_raw(code); + + // Normalize code_hash for REVM compatibility: + // RPC response for getProof method for non-existing (unused) EOAs may contain B256::ZERO + // for code_hash, but REVM expects KECCAK_EMPTY + let code_hash = if proof.code_hash == B256::ZERO { KECCAK_EMPTY } else { proof.code_hash }; + + let account_info = AccountInfo { + nonce: proof.nonce, + balance: proof.balance, + code_hash, + code: Some(bytecode.clone()), + }; + + // Record the account info to the state. + self.accounts + .write() + .map_err(|_| RpcDbError::Poisoned)? + .insert(address, account_info.clone()); + + Ok(account_info) + } + + /// Fetch the storage value at an [Address] and [U256] index. + pub async fn fetch_storage_at( + &self, + address: Address, + index: U256, + ) -> Result { + debug!("fetching storage value at address: {}, index: {}", address, index); + + // Fetch the storage value. + let value = self + .provider + .get_storage_at(address, index) + .number(self.block_number) + .await + .map_err(|e| RpcDbError::GetStorageError(address, index, e.to_string()))?; + + // Record the storage value to the state. + let mut storage_values = self.storage.write().map_err(|_| RpcDbError::Poisoned)?; + let entry = storage_values.entry(address).or_default(); + entry.insert(index, value); + + Ok(value) + } + + /// Fetch the block hash for a block number. + pub async fn fetch_block_hash(&self, number: u64) -> Result { + debug!("fetching block hash for block number: {}", number); + + // Fetch the block. + let block = self + .provider + .get_block_by_number(number.into()) + .await + .map_err(|e| RpcDbError::GetBlockError(number, e.to_string()))?; + + // Record the block hash to the state. + let block = block.ok_or(RpcDbError::BlockNotFound(number))?; + let hash = block.header().hash(); + + let mut oldest_ancestor = self.oldest_ancestor.write().map_err(|_| RpcDbError::Poisoned)?; + *oldest_ancestor = number.min(*oldest_ancestor); + + Ok(hash) + } + + /// Gets all the state keys used. The client uses this to read the actual state data from tries. + pub fn get_state_requests(&self) -> HashMap> { + let accounts = self.accounts.read().unwrap(); + let storage = self.storage.read().unwrap(); + + accounts + .keys() + .chain(storage.keys()) + .map(|&address| { + let storage_keys_for_address: BTreeSet = storage + .get(&address) + .map(|storage_map| storage_map.keys().cloned().collect()) + .unwrap_or_default(); + + (address, storage_keys_for_address.into_iter().collect()) + }) + .collect() + } +} + +impl + Clone, N: Network> DatabaseRef for BasicRpcDb { + type Error = ProviderError; + + fn basic_ref(&self, address: Address) -> Result, Self::Error> { + let handle = tokio::runtime::Handle::try_current().map_err(|_| { + ProviderError::Database(DatabaseError::Other("no tokio runtime found".to_string())) + })?; + let result = + tokio::task::block_in_place(|| handle.block_on(self.fetch_account_info(address))); + let account_info = + result.map_err(|e| ProviderError::Database(DatabaseError::Other(e.to_string())))?; + Ok(Some(account_info)) + } + + fn code_by_hash_ref(&self, _code_hash: B256) -> Result { + unimplemented!() + } + + fn storage_ref(&self, address: Address, index: U256) -> Result { + let handle = tokio::runtime::Handle::try_current().map_err(|_| { + ProviderError::Database(DatabaseError::Other("no tokio runtime found".to_string())) + })?; + let result = + tokio::task::block_in_place(|| handle.block_on(self.fetch_storage_at(address, index))); + let value = + result.map_err(|e| ProviderError::Database(DatabaseError::Other(e.to_string())))?; + Ok(value) + } + + fn block_hash_ref(&self, number: u64) -> Result { + let handle = tokio::runtime::Handle::try_current().map_err(|_| { + ProviderError::Database(DatabaseError::Other("no tokio runtime found".to_string())) + })?; + let result = tokio::task::block_in_place(|| handle.block_on(self.fetch_block_hash(number))); + let value = + result.map_err(|e| ProviderError::Database(DatabaseError::Other(e.to_string())))?; + Ok(value) + } +} + +#[async_trait] +impl RpcDb for BasicRpcDb +where + P: Provider + Clone, + N: Network, +{ + async fn state(&self, bundle_state: &BundleState) -> Result { + let state_requests = self.get_state_requests(); + + // For every account we touched, fetch the storage proofs for all the slots we touched. + tracing::info!("fetching storage proofs"); + let mut before_storage_proofs = Vec::new(); + let mut after_storage_proofs = Vec::new(); + + for (address, used_keys) in state_requests.iter() { + let modified_keys = bundle_state + .state + .get(address) + .map(|account| { + account.storage.keys().map(|key| B256::from(*key)).collect::>() + }) + .unwrap_or_default() + .into_iter() + .collect::>(); + + let keys = used_keys + .iter() + .map(|key| B256::from(*key)) + .chain(modified_keys.clone().into_iter()) + .collect::>() + .into_iter() + .collect::>(); + + let storage_proof = + self.provider.get_proof(*address, keys.clone()).number(self.block_number).await?; + before_storage_proofs.push(eip1186_proof_to_account_proof(storage_proof)); + + let storage_proof = self + .provider + .get_proof(*address, modified_keys) + .number(self.block_number + 1) + .await?; + after_storage_proofs.push(eip1186_proof_to_account_proof(storage_proof)); + } + + let state = EthereumState::from_transition_proofs( + self.state_root, + &before_storage_proofs.iter().map(|item| (item.address, item.clone())).collect(), + &after_storage_proofs.iter().map(|item| (item.address, item.clone())).collect(), + )?; + + Ok(state) + } + + fn bytecodes(&self) -> Vec { + let accounts = self.accounts.read().unwrap(); + + accounts + .values() + .flat_map(|account| account.code.clone()) + .map(|code| (code.hash_slow(), code)) + .collect::>() + .into_values() + .collect::>() + } + + async fn ancestor_headers(&self) -> Result, RpcDbError> { + let oldest_ancestor = *self.oldest_ancestor.read().unwrap(); + let mut ancestor_headers = vec![]; + tracing::info!("fetching {} ancestor headers", (self.block_number + 1) - oldest_ancestor); + for height in (oldest_ancestor..=(self.block_number)).rev() { + let block = self + .provider + .get_block_by_number(height.into()) + .await? + .ok_or(RpcDbError::BlockNotFound(height))?; + + ancestor_headers.push(Header { + parent_hash: block.header().parent_hash(), + ommers_hash: block.header().ommers_hash(), + beneficiary: block.header().beneficiary(), + state_root: block.header().state_root(), + transactions_root: block.header().transactions_root(), + receipts_root: block.header().receipts_root(), + logs_bloom: block.header().logs_bloom(), + difficulty: block.header().difficulty(), + number: block.header().number(), + gas_limit: block.header().gas_limit(), + gas_used: block.header().gas_used(), + timestamp: block.header().timestamp(), + extra_data: block.header().extra_data().clone(), + mix_hash: block.header().mix_hash().unwrap_or_default(), + nonce: block.header().nonce().unwrap_or_default(), + base_fee_per_gas: block.header().base_fee_per_gas(), + withdrawals_root: block.header().withdrawals_root(), + blob_gas_used: block.header().blob_gas_used(), + excess_blob_gas: block.header().excess_blob_gas(), + parent_beacon_block_root: block.header().parent_beacon_block_root(), + requests_hash: block.header().requests_hash(), + }); + } + + Ok(ancestor_headers) + } +} diff --git a/crates/storage/rpc-db/src/error.rs b/crates/storage/rpc-db/src/error.rs new file mode 100644 index 0000000..b62dc7c --- /dev/null +++ b/crates/storage/rpc-db/src/error.rs @@ -0,0 +1,26 @@ +use alloy_transport::TransportError; +use mpt::FromProofError; +use revm_primitives::{Address, U256}; + +/// Errors that can occur when interacting with the [RpcDb]. +#[derive(Debug, thiserror::Error)] +pub enum RpcDbError { + #[error("Transport Error: {}", .0)] + Transport(#[from] TransportError), + #[error("From proof Error: {}", .0)] + FromProof(#[from] FromProofError), + #[error("failed fetch proof at {0}: {1}")] + GetProofError(Address, String), + #[error("failed to fetch code at {0}: {1}")] + GetCodeError(Address, String), + #[error("failed to fetch storage at {0}, index {1}: {2}")] + GetStorageError(Address, U256, String), + #[error("failed to fetch block {0}: {1}")] + GetBlockError(u64, String), + #[error("failed to find block {0}")] + BlockNotFound(u64), + #[error("failed to find trie node preimage")] + PreimageNotFound, + #[error("poisoned lock")] + Poisoned, +} diff --git a/crates/storage/rpc-db/src/execution_witness.rs b/crates/storage/rpc-db/src/execution_witness.rs new file mode 100644 index 0000000..b7e5105 --- /dev/null +++ b/crates/storage/rpc-db/src/execution_witness.rs @@ -0,0 +1,139 @@ +use std::marker::PhantomData; + +use alloy_consensus::Header; +use alloy_primitives::{map::HashMap, Address, B256}; +use alloy_provider::{ext::DebugApi, Network, Provider}; +use alloy_rlp::Decodable; +use alloy_trie::TrieAccount; +use async_trait::async_trait; +use mpt::EthereumState; +use reth_storage_errors::ProviderError; +use revm_database::{BundleState, DatabaseRef}; +use revm_primitives::{keccak256, ruint::aliases::U256, StorageKey, StorageValue}; +use revm_state::{AccountInfo, Bytecode}; + +use crate::{RpcDb, RpcDbError}; + +#[derive(Debug)] +pub struct ExecutionWitnessRpcDb { + /// The provider which fetches data. + pub provider: P, + /// The cached state. + pub state: EthereumState, + /// The cached bytecodes. + pub codes: HashMap, + + pub ancestor_headers: HashMap, + + phantom: PhantomData, +} + +impl + Clone, N: Network> ExecutionWitnessRpcDb { + /// Create a new [`ExecutionWitnessRpcDb`]. + pub async fn new(provider: P, block_number: u64, state_root: B256) -> Result { + let execution_witness = provider.debug_execution_witness((block_number + 1).into()).await?; + + let state = EthereumState::from_execution_witness(&execution_witness, state_root); + + let codes = execution_witness + .codes + .iter() + .map(|encoded| (keccak256(encoded), Bytecode::new_raw(encoded.clone()))) + .collect(); + + let ancestor_headers = execution_witness + .headers + .iter() + .map(|encoded| Header::decode(&mut encoded.as_ref()).unwrap()) + .map(|h| (h.number, h)) + .collect(); + + let db = Self { provider, state, codes, ancestor_headers, phantom: PhantomData }; + + Ok(db) + } +} + +impl + Clone, N: Network> DatabaseRef for ExecutionWitnessRpcDb { + type Error = ProviderError; + + fn basic_ref(&self, address: Address) -> Result, Self::Error> { + let hash = keccak256(address); + if let Some(mut bytes) = self + .state + .state_trie + .get(hash.as_ref()) + .map_err(|err| ProviderError::TrieWitnessError(err.to_string()))? + { + let account = TrieAccount::decode(&mut bytes)?; + let account_info = AccountInfo { + balance: account.balance, + nonce: account.nonce, + code_hash: account.code_hash, + code: None, + }; + + Ok(Some(account_info)) + } else { + Ok(None) + } + } + + fn code_by_hash_ref(&self, code_hash: B256) -> Result { + self.codes + .get(&code_hash) + .ok_or_else(|| { + ProviderError::TrieWitnessError(format!("Code not found for {code_hash}")) + }) + .cloned() + } + + fn storage_ref( + &self, + address: Address, + index: StorageKey, + ) -> Result { + let slot = B256::from(index); + let hashed_address = keccak256(address); + let hashed_slot = keccak256(slot); + if let Some(mut value) = self + .state + .storage_tries + .get(&hashed_address) + .and_then(|storage_trie| storage_trie.get(hashed_slot.as_slice()).unwrap()) + { + Ok(U256::decode(&mut value)?) + } else { + Ok(U256::ZERO) + } + } + + fn block_hash_ref(&self, number: u64) -> Result { + let header = self.ancestor_headers.get(&number).ok_or_else(|| { + ProviderError::TrieWitnessError(format!("Header {number} not found in the ancestors")) + })?; + + Ok(header.hash_slow()) + } +} + +#[async_trait] +impl RpcDb for ExecutionWitnessRpcDb +where + P: Provider + Clone, + N: Network, +{ + async fn state(&self, _bundle_state: &BundleState) -> Result { + Ok(self.state.clone()) + } + + fn bytecodes(&self) -> Vec { + self.codes.values().cloned().collect() + } + + async fn ancestor_headers(&self) -> Result, RpcDbError> { + let mut ancestor_headers: Vec
= self.ancestor_headers.values().cloned().collect(); + ancestor_headers.sort_by(|a, b| b.number.cmp(&a.number)); + Ok(ancestor_headers) + } +} diff --git a/crates/storage/rpc-db/src/lib.rs b/crates/storage/rpc-db/src/lib.rs index e757a23..74ad858 100644 --- a/crates/storage/rpc-db/src/lib.rs +++ b/crates/storage/rpc-db/src/lib.rs @@ -1,352 +1,30 @@ #![cfg_attr(not(test), warn(unused_crate_dependencies))] -use std::sync::{Arc, RwLock}; -use alloy_primitives::{map::HashMap, private::serde::Deserialize, Bytes, U256}; -use alloy_provider::{ - network::{primitives::HeaderResponse, BlockResponse}, - Network, Provider, -}; -use alloy_rpc_types::BlockId; -use indexmap::IndexMap; -use reth_storage_errors::{db::DatabaseError, provider::ProviderError}; -use revm_database_interface::DatabaseRef; -use revm_primitives::{Address, B256}; -use revm_state::{AccountInfo, Bytecode}; -use std::{ - collections::{BTreeMap, BTreeSet}, - marker::PhantomData, -}; -use tracing::{debug, info}; +use alloy_consensus::Header; +use alloy_provider::Network; +use async_trait::async_trait; +use mpt::EthereumState; +use revm_database::{BundleState, DatabaseRef}; +use revm_state::Bytecode; -/// A database that fetches data from a [Provider] over a [Transport]. -#[derive(Debug, Clone)] -pub struct RpcDb { - /// The provider which fetches data. - pub provider: P, - /// The provider which fetches debug info. - pub debug_provider: P, - /// The block to fetch data from. - pub block: BlockId, - /// The cached accounts. - pub accounts: Arc>>, - /// The cached storage values. - pub storage: Arc>>>, - /// The oldest block whose header/hash has been requested. - pub oldest_ancestor: Arc>, +mod basic; +pub use basic::BasicRpcDb; - phantom: std::marker::PhantomData, -} - -/// Top-level RPC response from debug_traceBlockByNumber with prestate enabled -#[derive(Debug, Clone, Deserialize)] -pub struct PrestateTraceRpcResponse(pub Vec); - -/// A single transaction's trace prestate result -#[derive(Debug, Clone, Deserialize)] -pub struct PrestateTxTrace { - /// Transaction hash - #[serde(rename = "txHash")] - pub tx_hash: B256, - - /// Mapping of address -> account info (preserves insertion order) - pub result: IndexMap, -} - -/// An account's state at the start of the transaction execution -#[derive(Debug, Clone, Deserialize)] -pub struct PrestateAccount { - /// Account balance - pub balance: Option, - - /// Account nonce - pub nonce: Option, - - /// Account code, if present - pub code: Option, - - /// Optional storage slot mapping - pub storage: Option>, -} - -/// Errors that can occur when interacting with the [RpcDb]. -#[derive(Debug, Clone, thiserror::Error)] -pub enum RpcDbError { - #[error("failed fetch proof at {0}: {1}")] - GetProofError(Address, String), - #[error("failed to fetch code at {0}: {1}")] - GetCodeError(Address, String), - #[error("failed to fetch storage at {0}, index {1}: {2}")] - GetStorageError(Address, U256, String), - #[error("failed to fetch block {0}: {1}")] - GetBlockError(u64, String), - #[error("failed to find block")] - BlockNotFound, - #[error("failed to find trie node preimage")] - PreimageNotFound, - #[error("poisoned lock")] - Poisoned, -} - -impl + Clone, N: Network> RpcDb { - /// Create a new [`RpcDb`]. - pub fn new(provider: P, debug_provider: P, block: u64) -> Self { - RpcDb { - provider, - debug_provider, - block: block.into(), - accounts: Arc::new(RwLock::new(HashMap::with_hasher(Default::default()))), - storage: Arc::new(RwLock::new(HashMap::with_hasher(Default::default()))), - oldest_ancestor: Arc::new(RwLock::new(block)), - phantom: PhantomData, - } - } - - /// Fetch the [AccountInfo] for an [Address]. - pub async fn fetch_account_info(&self, address: Address) -> Result { - debug!("fetching account info for address: {}", address); - if let Some(account_info) = - self.accounts.read().map_err(|_| RpcDbError::Poisoned)?.get(&address).cloned() - { - debug!("fetching account info from cache for address: {}", address); - return Ok(account_info); - } - - // Fetch the proof for the account. - let proof = self - .provider - .get_proof(address, vec![]) - .block_id(self.block) - .await - .map_err(|e| RpcDbError::GetProofError(address, e.to_string()))?; - - // Fetch the code of the account. - let code = self - .provider - .get_code_at(address) - .block_id(self.block) - .await - .map_err(|e| RpcDbError::GetCodeError(address, e.to_string()))?; - - // Construct the account info & write it to the log. - let bytecode = Bytecode::new_raw(code); - let account_info = AccountInfo { - nonce: proof.nonce, - balance: proof.balance, - code_hash: proof.code_hash, - code: Some(bytecode.clone()), - }; - debug!( - "[fetch_account_info]fetching basic account info for address: {}, balance: {:?}, nonce: {:?}, code_hash: {:?}", - address, account_info.balance, account_info.nonce, account_info.code_hash - ); - - // Record the account info to the state. - self.accounts - .write() - .map_err(|_| RpcDbError::Poisoned)? - .insert(address, account_info.clone()); - - Ok(account_info) - } - - /// Fetch the storage value at an [Address] and [U256] index. - pub async fn fetch_storage_at( - &self, - address: Address, - index: U256, - ) -> Result { - debug!("fetching storage value at address: {}, index: {}", address, index); - if let Some(value) = self - .storage - .read() - .map_err(|_| RpcDbError::Poisoned)? - .get(&address) - .and_then(|inner| inner.get(&index).copied()) - { - debug!( - "fetching account info from cache for address {}, index {:x}, value {}", - address, index, value - ); - return Ok(value); - } - - // Fetch the storage value. - let value = self - .provider - .get_storage_at(address, index) - .block_id(self.block) - .await - .map_err(|e| RpcDbError::GetStorageError(address, index, e.to_string()))?; - debug!( - "[fetch_storage_at] fetching storage value at address: {}, index: {}, value {}", - address, index, value - ); - - // Record the storage value to the state. - let mut storage_values = self.storage.write().map_err(|_| RpcDbError::Poisoned)?; - let entry = storage_values.entry(address).or_default(); - entry.insert(index, value); +#[cfg(feature = "execution-witness")] +mod execution_witness; +#[cfg(feature = "execution-witness")] +pub use execution_witness::ExecutionWitnessRpcDb; - Ok(value) - } +mod error; +pub use error::RpcDbError; - /// Fetch the block hash for a block number. - pub async fn fetch_block_hash(&self, number: u64) -> Result { - debug!("fetching block hash for block number: {}", number); - - // Fetch the block. - let block = self - .provider - .get_block_by_number(number.into()) - .await - .map_err(|e| RpcDbError::GetBlockError(number, e.to_string()))?; - - // Record the block hash to the state. - let block = block.ok_or(RpcDbError::BlockNotFound)?; - let hash = block.header().hash(); - - let mut oldest_ancestor = self.oldest_ancestor.write().map_err(|_| RpcDbError::Poisoned)?; - *oldest_ancestor = number.min(*oldest_ancestor); - - Ok(hash) - } - - /// Preloads accounts and storage for the current block. - /// We use debug_provider. - pub async fn preload_accounts_and_storage(&self) -> Result<(), RpcDbError> { - info!("Preloading accounts and storage for block: {}", self.block); - let current_block = self.block.as_u64().unwrap() + 1; - let params = ( - format!("0x{current_block:x}"), - serde_json::json!({ - "disableStorage": false, - "disableMemory": true, - "disableStack": true, - "tracer": "prestateTracer" - }), - ); - - let now = std::time::Instant::now(); - // TODO: use debug_traceTransaction in parallel instead of debug_traceBlockByNumber - let prestate: PrestateTraceRpcResponse = self - .debug_provider - .raw_request("debug_traceBlockByNumber".into(), params) - .await - .map_err(|e| RpcDbError::GetBlockError(current_block, e.to_string()))?; - info!("rpc request took: {:?}, got {} txs", now.elapsed(), prestate.0.len()); - - for tx_trace in prestate.0 { - for (address, account) in tx_trace.result { - // Fix error "TransferError::CreateCollision" in revm. - if account.nonce == Some(1) { - continue; - } - - if !self.accounts.read().map_err(|_| RpcDbError::Poisoned)?.contains_key(&address) { - let bytecode = account.code.clone().map(Bytecode::new_raw); - // Some RPC will return incorrect code and nonce for accounts with EIP-7702, - // we will ignore these accounts. - // This is a temporary fix - if bytecode.as_ref().is_some_and(|bc| bc.is_eip7702()) { - continue; - } - - let account_info = AccountInfo::from_bytecode(bytecode.unwrap_or_default()) - .with_balance(account.balance.unwrap_or_default()) - .with_nonce(account.nonce.unwrap_or_default()); - - self.accounts - .write() - .map_err(|_| RpcDbError::Poisoned)? - .entry(address) - .or_insert(account_info); - } - - if let Some(storage_map) = account.storage { - let mut storage_lock = - self.storage.write().map_err(|_| RpcDbError::Poisoned)?; - let account_storage = storage_lock - .entry(address) - .or_insert_with(|| HashMap::with_hasher(Default::default())); - - for (slot, value) in storage_map { - account_storage.entry(slot).or_insert(value); - } - } - } - } - Ok(()) - } - - /// Gets all the state keys used. The client uses this to read the actual state data from tries. - pub fn get_state_requests(&self) -> HashMap> { - let accounts = self.accounts.read().unwrap(); - let storage = self.storage.read().unwrap(); - - accounts - .keys() - .chain(storage.keys()) - .map(|&address| { - let storage_keys_for_address: BTreeSet = storage - .get(&address) - .map(|storage_map| storage_map.keys().cloned().collect()) - .unwrap_or_default(); - - (address, storage_keys_for_address.into_iter().collect()) - }) - .collect() - } +#[async_trait] +pub trait RpcDb: DatabaseRef { + async fn state(&self, bundle_state: &BundleState) -> Result; /// Gets all account bytecodes. - pub fn get_bytecodes(&self) -> Vec { - let accounts = self.accounts.read().unwrap(); - - accounts - .values() - .flat_map(|account| account.code.clone()) - .map(|code| (code.hash_slow(), code)) - .collect::>() - .into_values() - .collect::>() - } -} - -impl + Clone, N: Network> DatabaseRef for RpcDb { - type Error = ProviderError; - - fn basic_ref(&self, address: Address) -> Result, Self::Error> { - let handle = tokio::runtime::Handle::try_current().map_err(|_| { - ProviderError::Database(DatabaseError::Other("no tokio runtime found".to_string())) - })?; - let result = - tokio::task::block_in_place(|| handle.block_on(self.fetch_account_info(address))); - let account_info = - result.map_err(|e| ProviderError::Database(DatabaseError::Other(e.to_string())))?; - Ok(Some(account_info)) - } - - fn code_by_hash_ref(&self, _code_hash: B256) -> Result { - unimplemented!() - } - - fn storage_ref(&self, address: Address, index: U256) -> Result { - let handle = tokio::runtime::Handle::try_current().map_err(|_| { - ProviderError::Database(DatabaseError::Other("no tokio runtime found".to_string())) - })?; - let result = - tokio::task::block_in_place(|| handle.block_on(self.fetch_storage_at(address, index))); - let value = - result.map_err(|e| ProviderError::Database(DatabaseError::Other(e.to_string())))?; - Ok(value) - } + fn bytecodes(&self) -> Vec; - fn block_hash_ref(&self, number: u64) -> Result { - let handle = tokio::runtime::Handle::try_current().map_err(|_| { - ProviderError::Database(DatabaseError::Other("no tokio runtime found".to_string())) - })?; - let result = tokio::task::block_in_place(|| handle.block_on(self.fetch_block_hash(number))); - let value = - result.map_err(|e| ProviderError::Database(DatabaseError::Other(e.to_string())))?; - Ok(value) - } + // Fetches the parent headers needed to constrain the BLOCKHASH opcode. + async fn ancestor_headers(&self) -> Result, RpcDbError>; } diff --git a/crates/storage/witness-db/Cargo.toml b/crates/storage/witness-db/Cargo.toml index 9362d81..ee0b9af 100644 --- a/crates/storage/witness-db/Cargo.toml +++ b/crates/storage/witness-db/Cargo.toml @@ -16,4 +16,4 @@ reth-storage-errors.workspace = true # revm revm-database-interface.workspace = true revm-primitives.workspace = true -revm-state = { workspace = true, features = ["serde"] } \ No newline at end of file +revm-state = { workspace = true, features = ["serde"] }