From 58b966f5fdfc2990aedadd140ff407bea5e94ea3 Mon Sep 17 00:00:00 2001 From: 0xOsiris Date: Mon, 28 Oct 2024 11:44:05 -0700 Subject: [PATCH 01/13] chore: tx envelope spec --- world-chain-builder/docs/PbhEnvelope.md | 83 +++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 world-chain-builder/docs/PbhEnvelope.md diff --git a/world-chain-builder/docs/PbhEnvelope.md b/world-chain-builder/docs/PbhEnvelope.md new file mode 100644 index 0000000..c6b3e8e --- /dev/null +++ b/world-chain-builder/docs/PbhEnvelope.md @@ -0,0 +1,83 @@ +# World Chain Builder API Spec + +### **Transaction Envelope** + +The PBH transaction envelope consists of an EIP 2718 RLP encoded transaction envelope concatenated with the RLP encoded `PbhPayload` + +References: +- [Pbh Payload](https://github.com/worldcoin/world-chain/blob/8d60a1e79dbb3be68db075d49b3d0a8a67e45b3e/world-chain-builder/src/pbh/payload.rs#L50) +- [Pooled Transaction](https://github.com/worldcoin/world-chain/blob/8d60a1e79dbb3be68db075d49b3d0a8a67e45b3e/world-chain-builder/src/primitives.rs#L14) + +```rust +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct WorldChainPooledTransactionsElement { + pub inner: PooledTransactionsElement, + pub pbh_payload: Option, +} + +/// The payload of a PBH transaction +/// +/// Contains the semaphore proof and relevent metadata +/// required to to verify the pbh transaction. +#[derive(Clone, Debug, RlpEncodable, RlpDecodable, PartialEq, Eq, Default)] +pub struct PbhPayload { + /// A string containing a prefix, the date marker, and the pbh nonce + pub external_nullifier: String, + /// A nullifier hash used to keep track of + /// previously used pbh transactions + pub nullifier_hash: Field, + /// The root of the merkle tree for which this proof + /// was generated + pub root: Field, + /// The actual semaphore proof verifying that the sender + /// is included in the set of orb verified users + pub proof: Proof, +} + +#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize)] +pub struct Proof(pub semaphore::protocol::Proof); + +// Raw Transaction Envelope encoding +impl WorldChainPooledTransactionsElement { + pub fn encode_enveloped(&self, out: &mut dyn alloy_rlp::BufMut) { + self.inner.encode_enveloped(out); + if let Some(pbh_payload) = &self.pbh_payload { + pbh_payload.encode(out); + } + } +} + +``` + +**External Nullifier** + +Schema: `vv-mmyyyy-nn` + +Version Prefix: `v1` +> Validation: Version matches current version. + +Date: `01-2025` +> Validation: Month/Year matches current Month Year + +PBH Nonce: `u16`: +> Validation: PBH Nonce must be ≤ 30 by default. It is used to rate limit the amount of PBH transactions that can be sent in any given month. This value should reset at the beginning of each month monotonically increasing from 0→ `num_pbh_txs` . Any nonce > `num_pbh_txs` set on launch of the builder will be invalidated and not be inserted into the transaction pool. + +**Nullifier Hash** + +> Validation: Must be unique at the time of transaction validation. + +**Root** + +> Validation: Must be identical to the `latestRoot` in storage of the `OpWorldId` contract on L2. + +Additional Considerations: If a root has not yet been synchronized with l1. There is a window in which a valid proof will be seen as invalid in the transaction validator. A robust approach would be to read the root on l2, and assert it matches the root on l1 prior to sending the transaction to prevent a transaction validation error response. + +### **Builder API** + +The custom PBH transaction envelope must be sent to the builder’s public rpc through a `eth_sendRawTransaction` JSON RPC request. + +Additional References: + +[**Building a Raw PBH Transaction Envelope from ORB Sequencer Reference**](https://github.com/worldcoin/world-chain/blob/8d60a1e79dbb3be68db075d49b3d0a8a67e45b3e/world-chain-builder/crates/toolkit/README.md) + +[**Sending a Raw PBH Transaction to the Builder Reference:**](ttps://github.com/worldcoin/world-chain/blob/8d60a1e79dbb3be68db075d49b3d0a8a67e45b3e/world-chain-builder/crates/assertor/src/main.rs#L119) From c9fb54c60c6cecc7c25709814b43acdd28a609d6 Mon Sep 17 00:00:00 2001 From: 0xOsiris Date: Mon, 28 Oct 2024 16:38:46 -0700 Subject: [PATCH 02/13] bump Reth + fix a bunch of EthApi changes --- world-chain-builder/Cargo.lock | 1652 +++++++++++------- world-chain-builder/Cargo.toml | 88 +- world-chain-builder/src/node/test_utils.rs | 24 +- world-chain-builder/src/payload/builder.rs | 2 +- world-chain-builder/src/rpc/block.rs | 38 +- world-chain-builder/src/rpc/call.rs | 19 +- world-chain-builder/src/rpc/mod.rs | 176 +- world-chain-builder/src/rpc/pending_block.rs | 36 +- world-chain-builder/src/rpc/receipt.rs | 12 +- world-chain-builder/src/rpc/transaction.rs | 50 +- 10 files changed, 1258 insertions(+), 839 deletions(-) diff --git a/world-chain-builder/Cargo.lock b/world-chain-builder/Cargo.lock index 497510c..7d71bf3 100644 --- a/world-chain-builder/Cargo.lock +++ b/world-chain-builder/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "addr2line" @@ -119,7 +119,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94c225801d42099570d0674701dddd4142f0ef715282aeb5985042e2ec962df7" dependencies = [ "alloy-rlp", + "arbitrary", "num_enum 0.7.3", + "proptest", "serde", "strum", ] @@ -148,6 +150,22 @@ dependencies = [ "alloy-primitives", "alloy-rlp", "alloy-serde 0.4.2", + "auto_impl", + "c-kzg", + "derive_more 1.0.0", + "serde", +] + +[[package]] +name = "alloy-consensus" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41ed961a48297c732a5d97ee321aa8bb5009ecadbcb077d8bec90cb54e651629" +dependencies = [ + "alloy-eips 0.5.4", + "alloy-primitives", + "alloy-rlp", + "alloy-serde 0.5.4", "arbitrary", "auto_impl", "c-kzg", @@ -192,10 +210,23 @@ name = "alloy-eip7702" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea59dc42102bc9a1905dc57901edc6dd48b9f38115df86c7d252acba70d71d04" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "k256", + "serde", +] + +[[package]] +name = "alloy-eip7702" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64ffc577390ce50234e02d841214b3dc0bea6aaaae8e04bbf3cb82e9a45da9eb" dependencies = [ "alloy-primitives", "alloy-rlp", "arbitrary", + "derive_more 1.0.0", "k256", "rand", "serde", @@ -209,7 +240,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f923dd5fca5f67a43d81ed3ebad0880bd41f6dd0ada930030353ac356c54cd0f" dependencies = [ "alloy-eip2930", - "alloy-eip7702", + "alloy-eip7702 0.1.1", "alloy-primitives", "alloy-rlp", "alloy-serde 0.3.6", @@ -227,13 +258,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ffb906284a1e1f63c4607da2068c8197458a352d0b3e9796e67353d72a9be85" dependencies = [ "alloy-eip2930", - "alloy-eip7702", + "alloy-eip7702 0.1.1", "alloy-primitives", "alloy-rlp", "alloy-serde 0.4.2", + "c-kzg", + "derive_more 1.0.0", + "once_cell", + "serde", + "sha2 0.10.8", +] + +[[package]] +name = "alloy-eips" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b69e06cf9c37be824b9d26d6d101114fdde6af0c87de2828b414c05c4b3daa71" +dependencies = [ + "alloy-eip2930", + "alloy-eip7702 0.3.2", + "alloy-primitives", + "alloy-rlp", + "alloy-serde 0.5.4", "arbitrary", "c-kzg", "derive_more 1.0.0", + "ethereum_ssz", + "ethereum_ssz_derive", "once_cell", "serde", "sha2 0.10.8", @@ -241,12 +292,12 @@ dependencies = [ [[package]] name = "alloy-genesis" -version = "0.4.2" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8429cf4554eed9b40feec7f4451113e76596086447550275e3def933faf47ce3" +checksum = "dde15e14944a88bd6a57d325e9a49b75558746fe16aaccc79713ae50a6a9574c" dependencies = [ "alloy-primitives", - "alloy-serde 0.4.2", + "alloy-serde 0.5.4", "serde", ] @@ -290,6 +341,20 @@ dependencies = [ "tracing", ] +[[package]] +name = "alloy-json-rpc" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af5979e0d5a7bf9c7eb79749121e8256e59021af611322aee56e77e20776b4b3" +dependencies = [ + "alloy-primitives", + "alloy-sol-types", + "serde", + "serde_json", + "thiserror", + "tracing", +] + [[package]] name = "alloy-network" version = "0.3.6" @@ -332,6 +397,27 @@ dependencies = [ "thiserror", ] +[[package]] +name = "alloy-network" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "204237129086ce5dc17a58025e93739b01b45313841f98fa339eb1d780511e57" +dependencies = [ + "alloy-consensus 0.5.4", + "alloy-eips 0.5.4", + "alloy-json-rpc 0.5.4", + "alloy-network-primitives 0.5.4", + "alloy-primitives", + "alloy-rpc-types-eth 0.5.4", + "alloy-serde 0.5.4", + "alloy-signer 0.5.4", + "alloy-sol-types", + "async-trait", + "auto_impl", + "futures-utils-wasm", + "thiserror", +] + [[package]] name = "alloy-network-primitives" version = "0.3.6" @@ -357,11 +443,24 @@ dependencies = [ "serde", ] +[[package]] +name = "alloy-network-primitives" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "514f70ee2a953db21631cd817b13a1571474ec77ddc03d47616d5e8203489fde" +dependencies = [ + "alloy-consensus 0.5.4", + "alloy-eips 0.5.4", + "alloy-primitives", + "alloy-serde 0.5.4", + "serde", +] + [[package]] name = "alloy-primitives" -version = "0.8.6" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a289ffd7448036f2f436b377f981c79ce0b2090877bad938d43387dc09931877" +checksum = "8edae627382349b56cd6a7a2106f4fd69b243a9233e560c55c2e03cabb7e1d3c" dependencies = [ "alloy-rlp", "arbitrary", @@ -402,11 +501,45 @@ dependencies = [ "alloy-network 0.4.2", "alloy-network-primitives 0.4.2", "alloy-primitives", - "alloy-pubsub", - "alloy-rpc-client", + "alloy-rpc-client 0.4.2", "alloy-rpc-types-eth 0.4.2", - "alloy-transport", - "alloy-transport-http", + "alloy-transport 0.4.2", + "alloy-transport-http 0.4.2", + "async-stream", + "async-trait", + "auto_impl", + "dashmap 6.1.0", + "futures", + "futures-utils-wasm", + "lru", + "pin-project", + "reqwest 0.12.8", + "serde", + "serde_json", + "thiserror", + "tokio", + "tracing", + "url", +] + +[[package]] +name = "alloy-provider" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4814d141ede360bb6cd1b4b064f1aab9de391e7c4d0d4d50ac89ea4bc1e25fbd" +dependencies = [ + "alloy-chains", + "alloy-consensus 0.5.4", + "alloy-eips 0.5.4", + "alloy-json-rpc 0.5.4", + "alloy-network 0.5.4", + "alloy-network-primitives 0.5.4", + "alloy-primitives", + "alloy-pubsub", + "alloy-rpc-client 0.5.4", + "alloy-rpc-types-eth 0.5.4", + "alloy-transport 0.5.4", + "alloy-transport-http 0.5.4", "alloy-transport-ws", "async-stream", "async-trait", @@ -415,25 +548,28 @@ dependencies = [ "futures", "futures-utils-wasm", "lru", + "parking_lot", "pin-project", "reqwest 0.12.8", + "schnellru", "serde", "serde_json", "thiserror", "tokio", "tracing", "url", + "wasmtimer", ] [[package]] name = "alloy-pubsub" -version = "0.4.2" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f32cef487122ae75c91eb50154c70801d71fabdb976fec6c49e0af5e6486ab15" +checksum = "96ba46eb69ddf7a9925b81f15229cb74658e6eebe5dd30a5b74e2cd040380573" dependencies = [ - "alloy-json-rpc 0.4.2", + "alloy-json-rpc 0.5.4", "alloy-primitives", - "alloy-transport", + "alloy-transport 0.5.4", "bimap", "futures", "serde", @@ -474,9 +610,31 @@ checksum = "370143ed581aace6e663342d21d209c6b2e34ee6142f7d6675adb518deeaf0dc" dependencies = [ "alloy-json-rpc 0.4.2", "alloy-primitives", + "alloy-transport 0.4.2", + "alloy-transport-http 0.4.2", + "futures", + "pin-project", + "reqwest 0.12.8", + "serde", + "serde_json", + "tokio", + "tokio-stream", + "tower 0.5.1", + "tracing", + "url", +] + +[[package]] +name = "alloy-rpc-client" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fc2bd1e7403463a5f2c61e955bcc9d3072b63aa177442b0f9aa6a6d22a941e3" +dependencies = [ + "alloy-json-rpc 0.5.4", + "alloy-primitives", "alloy-pubsub", - "alloy-transport", - "alloy-transport-http", + "alloy-transport 0.5.4", + "alloy-transport-http 0.5.4", "alloy-transport-ws", "futures", "pin-project", @@ -488,26 +646,27 @@ dependencies = [ "tower 0.5.1", "tracing", "url", + "wasmtimer", ] [[package]] name = "alloy-rpc-types" -version = "0.4.2" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ffc534b7919e18f35e3aa1f507b6f3d9d92ec298463a9f6beaac112809d8d06" +checksum = "eea9bf1abdd506f985a53533f5ac01296bcd6102c5e139bbc5d40bc468d2c916" dependencies = [ "alloy-primitives", "alloy-rpc-types-engine", - "alloy-rpc-types-eth 0.4.2", - "alloy-serde 0.4.2", + "alloy-rpc-types-eth 0.5.4", + "alloy-serde 0.5.4", "serde", ] [[package]] name = "alloy-rpc-types-admin" -version = "0.4.2" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb520ed46cc5b7d8c014a73fdd77b6a310383a2a5c0a5ae3c9b8055881f062b7" +checksum = "ea02c25541fb19eaac4278aa5c41d2d7e0245898887e54a74bfc0f3103e99415" dependencies = [ "alloy-genesis", "alloy-primitives", @@ -517,22 +676,22 @@ dependencies = [ [[package]] name = "alloy-rpc-types-anvil" -version = "0.4.2" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d780adaa5d95b07ad92006b2feb68ecfa7e2015f7d5976ceaac4c906c73ebd07" +checksum = "2382fc63fb0cf3e02818d547b80cb66cc49a31f8803d0c328402b2008bc13650" dependencies = [ "alloy-primitives", - "alloy-serde 0.4.2", + "alloy-serde 0.5.4", "serde", ] [[package]] name = "alloy-rpc-types-beacon" -version = "0.4.2" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a8dc5980fe30203d698627cddb5f0cedc57f900c8b5e1229c8b9448e37acb4a" +checksum = "45357a642081c8ce235c0ad990c4e9279f5f18a723545076b38cfcc05cc25234" dependencies = [ - "alloy-eips 0.4.2", + "alloy-eips 0.5.4", "alloy-primitives", "alloy-rpc-types-engine", "serde", @@ -542,9 +701,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-debug" -version = "0.4.2" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59d8f8c5bfb160081a772f1f68eb9a37e8929c4ef74e5d01f5b78c2b645a5c5e" +checksum = "a5afe3ab1038f90faf56304aa0adf1e6a8c9844615d8f83967f932f3a70390b1" dependencies = [ "alloy-primitives", "serde", @@ -552,16 +711,18 @@ dependencies = [ [[package]] name = "alloy-rpc-types-engine" -version = "0.4.2" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0285c4c09f838ab830048b780d7f4a4f460f309aa1194bb049843309524c64c" +checksum = "886d22d41992287a235af2f3af4299b5ced2bcafb81eb835572ad35747476946" dependencies = [ - "alloy-consensus 0.4.2", - "alloy-eips 0.4.2", + "alloy-consensus 0.5.4", + "alloy-eips 0.5.4", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.4.2", + "alloy-serde 0.5.4", "derive_more 1.0.0", + "ethereum_ssz", + "ethereum_ssz_derive", "jsonrpsee-types", "jsonwebtoken", "rand", @@ -605,6 +766,26 @@ dependencies = [ "alloy-sol-types", "derive_more 1.0.0", "itertools 0.13.0", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-rpc-types-eth" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b034779a4850b4b03f5be5ea674a1cf7d746b2da762b34d1860ab45e48ca27" +dependencies = [ + "alloy-consensus 0.5.4", + "alloy-eips 0.5.4", + "alloy-network-primitives 0.5.4", + "alloy-primitives", + "alloy-rlp", + "alloy-serde 0.5.4", + "alloy-sol-types", + "arbitrary", + "derive_more 1.0.0", + "itertools 0.13.0", "jsonrpsee-types", "serde", "serde_json", @@ -612,26 +793,26 @@ dependencies = [ [[package]] name = "alloy-rpc-types-mev" -version = "0.4.2" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cec23ce56c869eec5f6b6fd6a8a92b5aa0cfaf8d7be3a96502e537554dc7430" +checksum = "3246948dfa5f5060a9abe04233d741ea656ef076b12958f3242416ce9f375058" dependencies = [ - "alloy-eips 0.4.2", + "alloy-eips 0.5.4", "alloy-primitives", - "alloy-serde 0.4.2", + "alloy-serde 0.5.4", "serde", "serde_json", ] [[package]] name = "alloy-rpc-types-trace" -version = "0.4.2" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "017cad3e5793c5613588c1f9732bcbad77e820ba7d0feaba3527749f856fdbc5" +checksum = "4e5fb6c5c401321f802f69dcdb95b932f30f8158f6798793f914baac5995628e" dependencies = [ "alloy-primitives", - "alloy-rpc-types-eth 0.4.2", - "alloy-serde 0.4.2", + "alloy-rpc-types-eth 0.5.4", + "alloy-serde 0.5.4", "serde", "serde_json", "thiserror", @@ -639,13 +820,13 @@ dependencies = [ [[package]] name = "alloy-rpc-types-txpool" -version = "0.4.2" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b230e321c416be7f50530159392b4c41a45596d40d97e185575bcd0b545e521" +checksum = "9ad066b49c3b1b5f64cdd2399177a19926a6a15db2dbf11e2098de621f9e7480" dependencies = [ "alloy-primitives", - "alloy-rpc-types-eth 0.4.2", - "alloy-serde 0.4.2", + "alloy-rpc-types-eth 0.5.4", + "alloy-serde 0.5.4", "serde", ] @@ -665,6 +846,17 @@ name = "alloy-serde" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9dff0ab1cdd43ca001e324dc27ee0e8606bd2161d6623c63e0e0b8c4dfc13600" +dependencies = [ + "alloy-primitives", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-serde" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "028e72eaa9703e4882344983cfe7636ce06d8cce104a78ea62fd19b46659efc4" dependencies = [ "alloy-primitives", "arbitrary", @@ -700,6 +892,20 @@ dependencies = [ "thiserror", ] +[[package]] +name = "alloy-signer" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "592c185d7100258c041afac51877660c7bf6213447999787197db4842f0e938e" +dependencies = [ + "alloy-primitives", + "async-trait", + "auto_impl", + "elliptic-curve", + "k256", + "thiserror", +] + [[package]] name = "alloy-signer-local" version = "0.4.2" @@ -711,6 +917,22 @@ dependencies = [ "alloy-primitives", "alloy-signer 0.4.2", "async-trait", + "k256", + "rand", + "thiserror", +] + +[[package]] +name = "alloy-signer-local" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6614f02fc1d5b079b2a4a5320018317b506fd0a6d67c1fd5542a71201724986c" +dependencies = [ + "alloy-consensus 0.5.4", + "alloy-network 0.5.4", + "alloy-primitives", + "alloy-signer 0.5.4", + "async-trait", "coins-bip32", "coins-bip39", "k256", @@ -807,6 +1029,26 @@ dependencies = [ "url", ] +[[package]] +name = "alloy-transport" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be77579633ebbc1266ae6fd7694f75c408beb1aeb6865d0b18f22893c265a061" +dependencies = [ + "alloy-json-rpc 0.5.4", + "base64 0.22.1", + "futures-util", + "futures-utils-wasm", + "serde", + "serde_json", + "thiserror", + "tokio", + "tower 0.5.1", + "tracing", + "url", + "wasmtimer", +] + [[package]] name = "alloy-transport-http" version = "0.4.2" @@ -814,7 +1056,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b367dcccada5b28987c2296717ee04b9a5637aacd78eacb1726ef211678b5212" dependencies = [ "alloy-json-rpc 0.4.2", - "alloy-transport", + "alloy-transport 0.4.2", + "reqwest 0.12.8", + "serde_json", + "tower 0.5.1", + "tracing", + "url", +] + +[[package]] +name = "alloy-transport-http" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91fd1a5d0827939847983b46f2f79510361f901dc82f8e3c38ac7397af142c6e" +dependencies = [ + "alloy-json-rpc 0.5.4", + "alloy-transport 0.5.4", "reqwest 0.12.8", "serde_json", "tower 0.5.1", @@ -824,12 +1081,12 @@ dependencies = [ [[package]] name = "alloy-transport-ws" -version = "0.4.2" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7153b88690de6a50bba81c11e1d706bc41dbb90126d607404d60b763f6a3947f" +checksum = "61f27837bb4a1d6c83a28231c94493e814882f0e9058648a97e908a5f3fc9fcf" dependencies = [ "alloy-pubsub", - "alloy-transport", + "alloy-transport 0.5.4", "futures", "http 1.1.0", "rustls", @@ -842,13 +1099,14 @@ dependencies = [ [[package]] name = "alloy-trie" -version = "0.6.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9703ce68b97f8faae6f7739d1e003fc97621b856953cbcdbb2b515743f23288" +checksum = "cdd7f8b3a7c65ca09b3c7bdd7c7d72d7423d026f5247eda96af53d24e58315c1" dependencies = [ "alloy-primitives", "alloy-rlp", "arbitrary", + "arrayvec", "derive_arbitrary", "derive_more 1.0.0", "nybbles", @@ -943,13 +1201,13 @@ checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" [[package]] name = "aquamarine" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21cc1548309245035eb18aa7f0967da6bc65587005170c56e6ef2788a4cf3f4e" +checksum = "0f50776554130342de4836ba542aa85a4ddb361690d7e8df13774d7284c3d5c2" dependencies = [ "include_dir", "itertools 0.10.5", - "proc-macro-error", + "proc-macro-error2", "proc-macro2", "quote", "syn 2.0.79", @@ -1262,6 +1520,9 @@ name = "arrayvec" version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" +dependencies = [ + "serde", +] [[package]] name = "asn1_der" @@ -1275,9 +1536,9 @@ version = "0.1.0" dependencies = [ "alloy-network 0.4.2", "alloy-primitives", - "alloy-provider", + "alloy-provider 0.4.2", "alloy-rpc-types-eth 0.4.2", - "alloy-transport", + "alloy-transport 0.4.2", "clap 4.5.19", "color-eyre", "futures", @@ -1791,6 +2052,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40723b8fb387abc38f4f4a37c09073622e41dd12327033091ef8950659e6dc0c" dependencies = [ "memchr", + "regex-automata 0.4.8", "serde", ] @@ -2590,7 +2852,7 @@ dependencies = [ "bitflags 2.6.0", "crossterm_winapi", "libc", - "parking_lot 0.12.3", + "parking_lot", "winapi", ] @@ -2603,7 +2865,7 @@ dependencies = [ "bitflags 2.6.0", "crossterm_winapi", "mio 1.0.2", - "parking_lot 0.12.3", + "parking_lot", "rustix", "signal-hook", "signal-hook-mio", @@ -2839,7 +3101,7 @@ dependencies = [ "hashbrown 0.14.5", "lock_api", "once_cell", - "parking_lot_core 0.9.10", + "parking_lot_core", ] [[package]] @@ -2853,7 +3115,8 @@ dependencies = [ "hashbrown 0.14.5", "lock_api", "once_cell", - "parking_lot_core 0.9.10", + "parking_lot_core", + "serde", ] [[package]] @@ -2890,11 +3153,12 @@ checksum = "f578e8e2c440e7297e008bb5486a3a8a194775224bbc23729b0dbdfaeebf162e" [[package]] name = "delay_map" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4355c25cbf99edcb6b4a0e906f6bdc6956eda149e84455bea49696429b2f8e8" +checksum = "df941644b671f05f59433e481ba0d31ac10e3667de725236a4c0d587c496fba1" dependencies = [ "futures", + "tokio", "tokio-util", ] @@ -3086,9 +3350,9 @@ dependencies = [ [[package]] name = "discv5" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f569b8c367554666c8652305621e8bae3634a2ff5c6378081d5bd8c399c99f23" +checksum = "23e6b70634e26c909d1edbb3142b3eaf3b89da0e52f284f00ca7c80d9901ad9e" dependencies = [ "aes", "aes-gcm", @@ -3107,13 +3371,13 @@ dependencies = [ "lru", "more-asserts 0.3.1", "multiaddr", - "parking_lot 0.11.2", + "parking_lot", "rand", "smallvec", - "socket2 0.4.10", + "socket2 0.5.7", "tokio", "tracing", - "uint", + "uint 0.10.0", "zeroize", ] @@ -3366,7 +3630,7 @@ dependencies = [ "serde_json", "sha3", "thiserror", - "uint", + "uint 0.9.5", ] [[package]] @@ -3397,31 +3661,72 @@ dependencies = [ "impl-serde", "primitive-types", "scale-info", - "uint", + "uint 0.9.5", ] [[package]] -name = "ethers-core" -version = "2.0.14" +name = "ethereum_serde_utils" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82d80cc6ad30b14a48ab786523af33b37f28a8623fc06afd55324816ef18fb1f" +checksum = "70cbccfccf81d67bff0ab36e591fa536c8a935b078a7b0e58c1d00d418332fc9" dependencies = [ - "arrayvec", - "bytes", - "chrono", - "const-hex", - "elliptic-curve", - "ethabi", - "generic-array", - "k256", - "num_enum 0.7.3", - "open-fastrlp", - "rand", - "rlp", + "alloy-primitives", + "hex", "serde", + "serde_derive", "serde_json", - "strum", - "tempfile", +] + +[[package]] +name = "ethereum_ssz" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfbba28f4f3f32d92c06a64f5bf6c4537b5d4e21f28c689bd2bbaecfea4e0d3e" +dependencies = [ + "alloy-primitives", + "derivative", + "ethereum_serde_utils", + "itertools 0.13.0", + "serde", + "serde_derive", + "smallvec", + "typenum", +] + +[[package]] +name = "ethereum_ssz_derive" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d37845ba7c16bf4be8be4b5786f03a2ba5f2fda0d7f9e7cb2282f69cff420d7" +dependencies = [ + "darling 0.20.10", + "proc-macro2", + "quote", + "syn 2.0.79", +] + +[[package]] +name = "ethers-core" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82d80cc6ad30b14a48ab786523af33b37f28a8623fc06afd55324816ef18fb1f" +dependencies = [ + "arrayvec", + "bytes", + "chrono", + "const-hex", + "elliptic-curve", + "ethabi", + "generic-array", + "k256", + "num_enum 0.7.3", + "open-fastrlp", + "rand", + "rlp", + "serde", + "serde_json", + "strum", + "tempfile", "thiserror", "tiny-keccak", "unicode-xid", @@ -3759,6 +4064,7 @@ version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ + "serde", "typenum", "version_check", "zeroize", @@ -4000,9 +4306,9 @@ dependencies = [ [[package]] name = "hashlink" -version = "0.8.4" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" +checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" dependencies = [ "hashbrown 0.14.5", ] @@ -4665,15 +4971,6 @@ dependencies = [ "syn 2.0.79", ] -[[package]] -name = "instant" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" -dependencies = [ - "cfg-if", -] - [[package]] name = "interprocess" version = "2.2.1" @@ -4862,7 +5159,7 @@ dependencies = [ "http-body 1.0.1", "http-body-util", "jsonrpsee-types", - "parking_lot 0.12.3", + "parking_lot", "pin-project", "rand", "rustc-hash 2.0.0", @@ -5231,6 +5528,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "47186c6da4d81ca383c7c47c1bfc80f4b95f4720514d860a5407aaf4233f9588" dependencies = [ "linked-hash-map", + "serde", ] [[package]] @@ -5259,6 +5557,7 @@ checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ "autocfg", "scopeguard", + "serde", ] [[package]] @@ -5385,6 +5684,16 @@ dependencies = [ "portable-atomic", ] +[[package]] +name = "metrics" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ae428771d17306715c5091d446327d1cfdedc82185c65ba8423ab404e45bf10" +dependencies = [ + "ahash 0.8.11", + "portable-atomic", +] + [[package]] name = "metrics-derive" version = "0.1.0" @@ -5399,13 +5708,13 @@ dependencies = [ [[package]] name = "metrics-exporter-prometheus" -version = "0.15.3" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4f0c8427b39666bf970460908b213ec09b3b350f20c0c2eabcbba51704a08e6" +checksum = "85b6f8152da6d7892ff1b7a1c0fa3f435e92b5918ad67035c3bb432111d9a29b" dependencies = [ "base64 0.22.1", "indexmap 2.6.0", - "metrics", + "metrics 0.24.0", "metrics-util", "quanta", "thiserror", @@ -5419,7 +5728,7 @@ checksum = "cb524e5438255eaa8aa74214d5a62713b77b2c3c6e3c0bbeee65cfd9a58948ba" dependencies = [ "libproc", "mach2", - "metrics", + "metrics 0.23.0", "once_cell", "procfs", "rlimit", @@ -5428,15 +5737,14 @@ dependencies = [ [[package]] name = "metrics-util" -version = "0.17.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4259040465c955f9f2f1a4a8a16dc46726169bca0f88e8fb2dbeced487c3e828" +checksum = "15b482df36c13dd1869d73d14d28cd4855fbd6cfc32294bee109908a9f4a4ed7" dependencies = [ "crossbeam-epoch", "crossbeam-utils", - "hashbrown 0.14.5", - "metrics", - "num_cpus", + "hashbrown 0.15.0", + "metrics 0.24.0", "quanta", "sketches-ddsketch", ] @@ -5650,6 +5958,7 @@ dependencies = [ "libc", "log", "mio 0.8.11", + "serde", "walkdir", "windows-sys 0.48.0", ] @@ -5844,6 +6153,10 @@ name = "once_cell" version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" +dependencies = [ + "critical-section", + "portable-atomic", +] [[package]] name = "oorandom" @@ -5853,15 +6166,15 @@ checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9" [[package]] name = "op-alloy-consensus" -version = "0.3.3" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4f7f318f885db6e1455370ca91f74b7faed152c8142f6418f0936d606e582ff" +checksum = "ba7c98055fd048073738df0cc6d6537e992a0d8828f39d99a469e870db126dbd" dependencies = [ - "alloy-consensus 0.4.2", - "alloy-eips 0.4.2", + "alloy-consensus 0.5.4", + "alloy-eips 0.5.4", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.4.2", + "alloy-serde 0.5.4", "arbitrary", "derive_more 1.0.0", "serde", @@ -5871,12 +6184,12 @@ dependencies = [ [[package]] name = "op-alloy-genesis" -version = "0.3.3" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8215c87b74d2fbbaff0fd2887868a8341df33a3c495ee01f813e5ddd5be9c46" +checksum = "d631e8113cf88d30e621022677209caa148a9ca3ccb590fd34bbd1c731e3aff3" dependencies = [ - "alloy-consensus 0.4.2", - "alloy-eips 0.4.2", + "alloy-consensus 0.5.4", + "alloy-eips 0.5.4", "alloy-primitives", "alloy-sol-types", "serde", @@ -5885,29 +6198,29 @@ dependencies = [ [[package]] name = "op-alloy-network" -version = "0.3.3" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cd514c4ccd0b3c69fa3e7050cde77db842d4c308ae48f9a3e1ce263e823e45e" +checksum = "1eabe7683d7e19c7cc5171d664e49fc449176cf1334ffff82808e2a7eea5933a" dependencies = [ - "alloy-consensus 0.4.2", - "alloy-network 0.4.2", + "alloy-consensus 0.5.4", + "alloy-network 0.5.4", "alloy-primitives", - "alloy-rpc-types-eth 0.4.2", + "alloy-rpc-types-eth 0.5.4", "op-alloy-consensus", "op-alloy-rpc-types", ] [[package]] name = "op-alloy-protocol" -version = "0.3.3" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa5c397fbe35e07f9c95a571440ca2e90df754e198496d82ff4127de00b89dd9" +checksum = "9b39574acb1873315e6bd89df174f6223e897188fb87eeea2ad1eda04f7d28eb" dependencies = [ - "alloy-consensus 0.4.2", - "alloy-eips 0.4.2", + "alloy-consensus 0.5.4", + "alloy-eips 0.5.4", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.4.2", + "alloy-serde 0.5.4", "derive_more 1.0.0", "op-alloy-consensus", "op-alloy-genesis", @@ -5916,16 +6229,17 @@ dependencies = [ [[package]] name = "op-alloy-rpc-types" -version = "0.3.3" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "547d29c5ab957ff32e14edddb93652dad748d2ef6cbe4b0fe8615ce06b0a3ddb" +checksum = "919e9b69212d61f3c8932bfb717c7ad458ea3fc52072b3433d99994f8223d555" dependencies = [ - "alloy-consensus 0.4.2", - "alloy-eips 0.4.2", - "alloy-network-primitives 0.4.2", + "alloy-consensus 0.5.4", + "alloy-eips 0.5.4", + "alloy-network-primitives 0.5.4", "alloy-primitives", - "alloy-rpc-types-eth 0.4.2", - "alloy-serde 0.4.2", + "alloy-rpc-types-eth 0.5.4", + "alloy-serde 0.5.4", + "arbitrary", "op-alloy-consensus", "serde", "serde_json", @@ -5933,16 +6247,18 @@ dependencies = [ [[package]] name = "op-alloy-rpc-types-engine" -version = "0.3.3" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5041122e20b76644cc690bba688671eecdc4626e6384a76eb740535d6ddcef14" +checksum = "0e3a47ea24cee189b4351be247fd138c68571704ee57060cf5a722502f44412c" dependencies = [ "alloy-primitives", "alloy-rpc-types-engine", - "alloy-serde 0.4.2", + "alloy-serde 0.5.4", "derive_more 1.0.0", + "ethereum_ssz", "op-alloy-protocol", "serde", + "snap", ] [[package]] @@ -6066,6 +6382,7 @@ version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" dependencies = [ + "arbitrary", "arrayvec", "bitvec", "byte-slice-cast", @@ -6087,17 +6404,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core 0.8.6", -] - [[package]] name = "parking_lot" version = "0.12.3" @@ -6105,21 +6411,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", - "parking_lot_core 0.9.10", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" -dependencies = [ - "cfg-if", - "instant", - "libc", - "redox_syscall 0.2.16", - "smallvec", - "winapi", + "parking_lot_core", ] [[package]] @@ -6424,7 +6716,7 @@ dependencies = [ "impl-rlp", "impl-serde", "scale-info", - "uint", + "uint 0.9.5", ] [[package]] @@ -6794,15 +7086,6 @@ version = "0.1.57" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" -[[package]] -name = "redox_syscall" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags 1.3.2", -] - [[package]] name = "redox_syscall" version = "0.5.7" @@ -7021,11 +7304,11 @@ dependencies = [ [[package]] name = "reth" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ - "alloy-consensus 0.4.2", - "alloy-eips 0.4.2", + "alloy-consensus 0.5.4", + "alloy-eips 0.5.4", "alloy-primitives", "alloy-rlp", "alloy-rpc-types", @@ -7093,9 +7376,10 @@ dependencies = [ [[package]] name = "reth-auto-seal-consensus" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ + "alloy-eips 0.5.4", "alloy-primitives", "alloy-rpc-types-engine", "futures-util", @@ -7116,7 +7400,7 @@ dependencies = [ "reth-tokio-util", "reth-transaction-pool", "reth-trie", - "revm-primitives", + "revm-primitives 13.0.0", "tokio", "tokio-stream", "tracing", @@ -7124,21 +7408,23 @@ dependencies = [ [[package]] name = "reth-basic-payload-builder" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ + "alloy-consensus 0.5.4", + "alloy-eips 0.5.4", "alloy-primitives", "alloy-rlp", "futures-core", "futures-util", - "metrics", + "metrics 0.24.0", "reth-chainspec", + "reth-evm", "reth-metrics", "reth-payload-builder", "reth-payload-primitives", "reth-primitives", "reth-provider", - "reth-revm", "reth-tasks", "reth-transaction-pool", "revm", @@ -7148,14 +7434,15 @@ dependencies = [ [[package]] name = "reth-beacon-consensus" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ + "alloy-eips 0.5.4", "alloy-primitives", "alloy-rpc-types-engine", "futures", "itertools 0.13.0", - "metrics", + "metrics 0.24.0", "reth-blockchain-tree-api", "reth-chainspec", "reth-engine-primitives", @@ -7183,15 +7470,15 @@ dependencies = [ [[package]] name = "reth-blockchain-tree" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ - "alloy-eips 0.4.2", + "alloy-eips 0.5.4", "alloy-primitives", "aquamarine", "linked_hash_set", - "metrics", - "parking_lot 0.12.3", + "metrics 0.24.0", + "parking_lot", "reth-blockchain-tree-api", "reth-consensus", "reth-db", @@ -7216,8 +7503,8 @@ dependencies = [ [[package]] name = "reth-blockchain-tree-api" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "alloy-primitives", "reth-consensus", @@ -7229,18 +7516,18 @@ dependencies = [ [[package]] name = "reth-chain-state" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ - "alloy-consensus 0.4.2", - "alloy-eips 0.4.2", + "alloy-consensus 0.5.4", + "alloy-eips 0.5.4", "alloy-primitives", - "alloy-signer 0.4.2", - "alloy-signer-local", + "alloy-signer 0.5.4", + "alloy-signer-local 0.5.4", "auto_impl", "derive_more 1.0.0", - "metrics", - "parking_lot 0.12.3", + "metrics 0.24.0", + "parking_lot", "pin-project", "rand", "reth-chainspec", @@ -7258,20 +7545,19 @@ dependencies = [ [[package]] name = "reth-chainspec" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "alloy-chains", - "alloy-eips 0.4.2", + "alloy-consensus 0.5.4", + "alloy-eips 0.5.4", "alloy-genesis", "alloy-primitives", - "alloy-trie", "auto_impl", "derive_more 1.0.0", "once_cell", "reth-ethereum-forks", "reth-network-peers", - "reth-optimism-forks", "reth-primitives-traits", "reth-trie-common", "serde_json", @@ -7279,24 +7565,25 @@ dependencies = [ [[package]] name = "reth-cli" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "alloy-genesis", "clap 4.5.19", "eyre", "reth-cli-runner", + "reth-db", "serde_json", "shellexpand", ] [[package]] name = "reth-cli-commands" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "ahash 0.8.11", - "alloy-eips 0.4.2", + "alloy-eips 0.5.4", "alloy-primitives", "backon", "clap 4.5.19", @@ -7350,8 +7637,8 @@ dependencies = [ [[package]] name = "reth-cli-runner" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "reth-tasks", "tokio", @@ -7360,10 +7647,10 @@ dependencies = [ [[package]] name = "reth-cli-util" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ - "alloy-eips 0.4.2", + "alloy-eips 0.5.4", "alloy-primitives", "cfg-if", "eyre", @@ -7377,24 +7664,27 @@ dependencies = [ [[package]] name = "reth-codecs" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ - "alloy-consensus 0.4.2", - "alloy-eips 0.4.2", + "alloy-consensus 0.5.4", + "alloy-eips 0.5.4", "alloy-genesis", "alloy-primitives", "alloy-trie", + "arbitrary", "bytes", "modular-bitfield", "op-alloy-consensus", "reth-codecs-derive", + "serde", + "visibility", ] [[package]] name = "reth-codecs-derive" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "convert_case", "proc-macro2", @@ -7404,8 +7694,8 @@ dependencies = [ [[package]] name = "reth-config" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "eyre", "humantime-serde", @@ -7418,9 +7708,10 @@ dependencies = [ [[package]] name = "reth-consensus" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ + "alloy-eips 0.5.4", "alloy-primitives", "auto_impl", "derive_more 1.0.0", @@ -7429,25 +7720,27 @@ dependencies = [ [[package]] name = "reth-consensus-common" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ + "alloy-consensus 0.5.4", + "alloy-eips 0.5.4", "alloy-primitives", "reth-chainspec", "reth-consensus", "reth-primitives", - "revm-primitives", + "revm-primitives 13.0.0", ] [[package]] name = "reth-consensus-debug-client" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ - "alloy-consensus 0.4.2", - "alloy-eips 0.4.2", + "alloy-consensus 0.5.4", + "alloy-eips 0.5.4", "alloy-primitives", - "alloy-provider", + "alloy-provider 0.5.4", "alloy-rpc-types", "alloy-rpc-types-engine", "auto_impl", @@ -7465,16 +7758,16 @@ dependencies = [ [[package]] name = "reth-db" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "alloy-primitives", "bytes", "derive_more 1.0.0", "eyre", - "metrics", + "metrics 0.24.0", "page_size", - "parking_lot 0.12.3", + "parking_lot", "paste", "reth-db-api", "reth-fs-util", @@ -7498,15 +7791,15 @@ dependencies = [ [[package]] name = "reth-db-api" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "alloy-genesis", "alloy-primitives", "arbitrary", "bytes", "derive_more 1.0.0", - "metrics", + "metrics 0.24.0", "modular-bitfield", "parity-scale-codec", "proptest", @@ -7523,8 +7816,8 @@ dependencies = [ [[package]] name = "reth-db-common" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "alloy-genesis", "alloy-primitives", @@ -7551,8 +7844,8 @@ dependencies = [ [[package]] name = "reth-db-models" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "alloy-primitives", "arbitrary", @@ -7566,15 +7859,16 @@ dependencies = [ [[package]] name = "reth-discv4" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "alloy-primitives", "alloy-rlp", "discv5", "enr", "generic-array", - "parking_lot 0.12.3", + "parking_lot", + "rand", "reth-ethereum-forks", "reth-net-banlist", "reth-net-nat", @@ -7590,8 +7884,8 @@ dependencies = [ [[package]] name = "reth-discv5" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -7600,7 +7894,7 @@ dependencies = [ "enr", "futures", "itertools 0.13.0", - "metrics", + "metrics 0.24.0", "rand", "reth-chainspec", "reth-ethereum-forks", @@ -7614,19 +7908,21 @@ dependencies = [ [[package]] name = "reth-dns-discovery" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "alloy-primitives", "data-encoding", "enr", "linked_hash_set", - "parking_lot 0.12.3", + "parking_lot", "reth-ethereum-forks", "reth-network-peers", "reth-tokio-util", "schnellru", "secp256k1", + "serde", + "serde_with", "thiserror", "tokio", "tokio-stream", @@ -7636,26 +7932,30 @@ dependencies = [ [[package]] name = "reth-downloaders" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ - "alloy-eips 0.4.2", + "alloy-eips 0.5.4", "alloy-primitives", "alloy-rlp", "futures", "futures-util", "itertools 0.13.0", - "metrics", + "metrics 0.24.0", "pin-project", "rayon", "reth-config", "reth-consensus", + "reth-db", + "reth-db-api", "reth-metrics", "reth-network-p2p", "reth-network-peers", "reth-primitives", "reth-storage-api", "reth-tasks", + "reth-testing-utils", + "tempfile", "thiserror", "tokio", "tokio-stream", @@ -7665,34 +7965,31 @@ dependencies = [ [[package]] name = "reth-e2e-test-utils" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ - "alloy-consensus 0.4.2", - "alloy-eips 0.4.2", - "alloy-network 0.4.2", + "alloy-consensus 0.5.4", + "alloy-eips 0.5.4", + "alloy-network 0.5.4", "alloy-primitives", "alloy-rpc-types", - "alloy-signer 0.4.2", - "alloy-signer-local", + "alloy-signer 0.5.4", + "alloy-signer-local 0.5.4", + "derive_more 1.0.0", "eyre", "futures-util", "jsonrpsee", - "jsonrpsee-types", "op-alloy-rpc-types-engine", "reth", "reth-chainspec", "reth-db", + "reth-engine-local", "reth-network-peers", "reth-node-builder", - "reth-node-ethereum", "reth-payload-builder", "reth-payload-primitives", - "reth-primitives", "reth-provider", - "reth-rpc", "reth-rpc-layer", - "reth-rpc-types-compat", "reth-stages-types", "reth-tokio-util", "reth-tracing", @@ -7700,12 +7997,13 @@ dependencies = [ "tokio", "tokio-stream", "tracing", + "url", ] [[package]] name = "reth-ecies" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "aes", "alloy-primitives", @@ -7733,10 +8031,41 @@ dependencies = [ "typenum", ] +[[package]] +name = "reth-engine-local" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" +dependencies = [ + "alloy-primitives", + "alloy-rpc-types-engine", + "eyre", + "futures-util", + "op-alloy-rpc-types-engine", + "reth-beacon-consensus", + "reth-chainspec", + "reth-consensus", + "reth-engine-primitives", + "reth-engine-service", + "reth-engine-tree", + "reth-ethereum-engine-primitives", + "reth-evm", + "reth-payload-builder", + "reth-payload-primitives", + "reth-payload-validator", + "reth-provider", + "reth-prune", + "reth-rpc-types-compat", + "reth-stages-api", + "reth-transaction-pool", + "tokio", + "tokio-stream", + "tracing", +] + [[package]] name = "reth-engine-primitives" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "alloy-primitives", "reth-execution-types", @@ -7748,12 +8077,13 @@ dependencies = [ [[package]] name = "reth-engine-service" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "futures", "pin-project", "reth-beacon-consensus", + "reth-chainspec", "reth-consensus", "reth-engine-tree", "reth-evm", @@ -7770,14 +8100,14 @@ dependencies = [ [[package]] name = "reth-engine-tree" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ - "alloy-eips 0.4.2", + "alloy-eips 0.5.4", "alloy-primitives", "alloy-rpc-types-engine", "futures", - "metrics", + "metrics 0.24.0", "reth-beacon-consensus", "reth-blockchain-tree", "reth-blockchain-tree-api", @@ -7795,9 +8125,13 @@ dependencies = [ "reth-primitives", "reth-provider", "reth-prune", + "reth-prune-types", "reth-revm", + "reth-stages", "reth-stages-api", + "reth-static-file", "reth-tasks", + "reth-tracing", "reth-trie", "reth-trie-parallel", "thiserror", @@ -7807,9 +8141,11 @@ dependencies = [ [[package]] name = "reth-engine-util" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ + "alloy-consensus 0.5.4", + "alloy-eips 0.5.4", "alloy-primitives", "alloy-rpc-types-engine", "eyre", @@ -7828,7 +8164,7 @@ dependencies = [ "reth-revm", "reth-rpc-types-compat", "reth-trie", - "revm-primitives", + "revm-primitives 13.0.0", "serde", "serde_json", "tokio", @@ -7838,8 +8174,8 @@ dependencies = [ [[package]] name = "reth-errors" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "reth-blockchain-tree-api", "reth-consensus", @@ -7851,8 +8187,8 @@ dependencies = [ [[package]] name = "reth-eth-wire" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -7867,6 +8203,7 @@ dependencies = [ "reth-metrics", "reth-network-peers", "reth-primitives", + "serde", "snap", "thiserror", "tokio", @@ -7877,11 +8214,11 @@ dependencies = [ [[package]] name = "reth-eth-wire-types" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "alloy-chains", - "alloy-eips 0.4.2", + "alloy-eips 0.5.4", "alloy-primitives", "alloy-rlp", "bytes", @@ -7889,13 +8226,14 @@ dependencies = [ "reth-chainspec", "reth-codecs-derive", "reth-primitives", + "serde", "thiserror", ] [[package]] name = "reth-ethereum-cli" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "eyre", "reth-chainspec", @@ -7904,9 +8242,11 @@ dependencies = [ [[package]] name = "reth-ethereum-consensus" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ + "alloy-consensus 0.5.4", + "alloy-eips 0.5.4", "alloy-primitives", "reth-chainspec", "reth-consensus", @@ -7917,10 +8257,10 @@ dependencies = [ [[package]] name = "reth-ethereum-engine-primitives" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ - "alloy-eips 0.4.2", + "alloy-eips 0.5.4", "alloy-primitives", "alloy-rlp", "alloy-rpc-types-engine", @@ -7936,8 +8276,8 @@ dependencies = [ [[package]] name = "reth-ethereum-forks" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "alloy-chains", "alloy-primitives", @@ -7956,9 +8296,11 @@ dependencies = [ [[package]] name = "reth-ethereum-payload-builder" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ + "alloy-consensus 0.5.4", + "alloy-eips 0.5.4", "alloy-primitives", "reth-basic-payload-builder", "reth-chain-state", @@ -7975,14 +8317,14 @@ dependencies = [ "reth-transaction-pool", "reth-trie", "revm", - "revm-primitives", + "revm-primitives 13.0.0", "tracing", ] [[package]] name = "reth-etl" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "rayon", "reth-db-api", @@ -7991,51 +8333,55 @@ dependencies = [ [[package]] name = "reth-evm" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ - "alloy-eips 0.4.2", + "alloy-eips 0.5.4", "alloy-primitives", "auto_impl", "futures-util", - "metrics", + "metrics 0.24.0", + "parking_lot", "reth-chainspec", + "reth-consensus", + "reth-consensus-common", "reth-execution-errors", "reth-execution-types", "reth-metrics", "reth-primitives", "reth-primitives-traits", "reth-prune-types", + "reth-revm", "reth-storage-errors", "revm", - "revm-primitives", + "revm-primitives 13.0.0", ] [[package]] name = "reth-evm-ethereum" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ - "alloy-eips 0.4.2", + "alloy-consensus 0.5.4", + "alloy-eips 0.5.4", "alloy-primitives", "alloy-sol-types", "reth-chainspec", + "reth-consensus", "reth-ethereum-consensus", "reth-ethereum-forks", "reth-evm", - "reth-execution-types", "reth-primitives", - "reth-prune-types", "reth-revm", - "revm-primitives", + "revm-primitives 13.0.0", ] [[package]] name = "reth-execution-errors" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ - "alloy-eips 0.4.2", + "alloy-eips 0.5.4", "alloy-primitives", "alloy-rlp", "derive_more 1.0.0", @@ -8043,15 +8389,15 @@ dependencies = [ "reth-consensus", "reth-prune-types", "reth-storage-errors", - "revm-primitives", + "revm-primitives 13.0.0", ] [[package]] name = "reth-execution-types" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ - "alloy-eips 0.4.2", + "alloy-eips 0.5.4", "alloy-primitives", "reth-execution-errors", "reth-primitives", @@ -8063,16 +8409,16 @@ dependencies = [ [[package]] name = "reth-exex" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ - "alloy-eips 0.4.2", + "alloy-eips 0.5.4", "alloy-primitives", "eyre", "futures", "itertools 0.13.0", - "metrics", - "parking_lot 0.12.3", + "metrics 0.24.0", + "parking_lot", "reth-chain-state", "reth-chainspec", "reth-config", @@ -8099,10 +8445,10 @@ dependencies = [ [[package]] name = "reth-exex-types" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ - "alloy-eips 0.4.2", + "alloy-eips 0.5.4", "alloy-primitives", "reth-chain-state", "reth-execution-types", @@ -8112,8 +8458,8 @@ dependencies = [ [[package]] name = "reth-fs-util" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "serde", "serde_json", @@ -8122,8 +8468,8 @@ dependencies = [ [[package]] name = "reth-invalid-block-hooks" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -8147,8 +8493,8 @@ dependencies = [ [[package]] name = "reth-ipc" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "async-trait", "bytes", @@ -8168,15 +8514,15 @@ dependencies = [ [[package]] name = "reth-libmdbx" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "bitflags 2.6.0", "byteorder", "dashmap 6.1.0", "derive_more 1.0.0", "indexmap 2.6.0", - "parking_lot 0.12.3", + "parking_lot", "reth-mdbx-sys", "smallvec", "thiserror", @@ -8185,8 +8531,8 @@ dependencies = [ [[package]] name = "reth-mdbx-sys" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "bindgen", "cc", @@ -8194,11 +8540,11 @@ dependencies = [ [[package]] name = "reth-metrics" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "futures", - "metrics", + "metrics 0.24.0", "metrics-derive", "tokio", "tokio-util", @@ -8206,16 +8552,16 @@ dependencies = [ [[package]] name = "reth-net-banlist" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "alloy-primitives", ] [[package]] name = "reth-net-nat" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "futures-util", "if-addrs", @@ -8228,10 +8574,10 @@ dependencies = [ [[package]] name = "reth-network" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ - "alloy-eips 0.4.2", + "alloy-eips 0.5.4", "alloy-primitives", "alloy-rlp", "aquamarine", @@ -8241,8 +8587,8 @@ dependencies = [ "enr", "futures", "itertools 0.13.0", - "metrics", - "parking_lot 0.12.3", + "metrics 0.24.0", + "parking_lot", "pin-project", "rand", "reth-chainspec", @@ -8260,6 +8606,7 @@ dependencies = [ "reth-network-peers", "reth-network-types", "reth-primitives", + "reth-provider", "reth-storage-api", "reth-tasks", "reth-tokio-util", @@ -8269,6 +8616,7 @@ dependencies = [ "secp256k1", "serde", "smallvec", + "tempfile", "thiserror", "tokio", "tokio-stream", @@ -8278,8 +8626,8 @@ dependencies = [ [[package]] name = "reth-network-api" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "alloy-primitives", "alloy-rpc-types-admin", @@ -8301,14 +8649,15 @@ dependencies = [ [[package]] name = "reth-network-p2p" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ - "alloy-eips 0.4.2", + "alloy-eips 0.5.4", "alloy-primitives", "auto_impl", "derive_more 1.0.0", "futures", + "parking_lot", "reth-consensus", "reth-eth-wire-types", "reth-network-peers", @@ -8321,8 +8670,8 @@ dependencies = [ [[package]] name = "reth-network-peers" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -8336,8 +8685,8 @@ dependencies = [ [[package]] name = "reth-network-types" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "humantime-serde", "reth-ethereum-forks", @@ -8350,8 +8699,8 @@ dependencies = [ [[package]] name = "reth-nippy-jar" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "anyhow", "bincode", @@ -8367,26 +8716,30 @@ dependencies = [ [[package]] name = "reth-node-api" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ + "alloy-rpc-types-engine", + "eyre", + "reth-beacon-consensus", + "reth-consensus", "reth-engine-primitives", "reth-evm", "reth-network-api", + "reth-node-core", "reth-node-types", "reth-payload-builder", "reth-payload-primitives", "reth-primitives", "reth-provider", - "reth-rpc-eth-api", "reth-tasks", "reth-transaction-pool", ] [[package]] name = "reth-node-builder" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "alloy-primitives", "alloy-rpc-types", @@ -8409,6 +8762,7 @@ dependencies = [ "reth-db-api", "reth-db-common", "reth-downloaders", + "reth-engine-local", "reth-engine-service", "reth-engine-tree", "reth-engine-util", @@ -8449,9 +8803,11 @@ dependencies = [ [[package]] name = "reth-node-core" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ + "alloy-consensus 0.5.4", + "alloy-eips 0.5.4", "alloy-primitives", "alloy-rpc-types-engine", "clap 4.5.19", @@ -8475,8 +8831,6 @@ dependencies = [ "reth-network-peers", "reth-primitives", "reth-prune-types", - "reth-rpc-api", - "reth-rpc-eth-api", "reth-rpc-eth-types", "reth-rpc-server-types", "reth-rpc-types-compat", @@ -8497,8 +8851,8 @@ dependencies = [ [[package]] name = "reth-node-ethereum" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "eyre", "reth-auto-seal-consensus", @@ -8508,6 +8862,7 @@ dependencies = [ "reth-consensus", "reth-ethereum-engine-primitives", "reth-ethereum-payload-builder", + "reth-evm", "reth-evm-ethereum", "reth-network", "reth-node-api", @@ -8515,16 +8870,20 @@ dependencies = [ "reth-payload-builder", "reth-primitives", "reth-provider", + "reth-revm", "reth-rpc", "reth-tracing", "reth-transaction-pool", + "revm", ] [[package]] name = "reth-node-events" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ + "alloy-consensus 0.5.4", + "alloy-eips 0.5.4", "alloy-primitives", "alloy-rpc-types-engine", "futures", @@ -8533,7 +8892,6 @@ dependencies = [ "reth-beacon-consensus", "reth-network", "reth-network-api", - "reth-primitives", "reth-primitives-traits", "reth-provider", "reth-prune", @@ -8545,13 +8903,13 @@ dependencies = [ [[package]] name = "reth-node-metrics" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "eyre", "http 1.1.0", "jsonrpsee", - "metrics", + "metrics 0.24.0", "metrics-exporter-prometheus", "metrics-process", "metrics-util", @@ -8569,20 +8927,24 @@ dependencies = [ [[package]] name = "reth-node-types" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "reth-chainspec", "reth-db-api", "reth-engine-primitives", + "reth-primitives", + "reth-primitives-traits", ] [[package]] name = "reth-optimism-chainspec" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "alloy-chains", + "alloy-consensus 0.5.4", + "alloy-eips 0.5.4", "alloy-genesis", "alloy-primitives", "derive_more 1.0.0", @@ -8598,8 +8960,8 @@ dependencies = [ [[package]] name = "reth-optimism-cli" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -8642,9 +9004,10 @@ dependencies = [ [[package]] name = "reth-optimism-consensus" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ + "alloy-consensus 0.5.4", "alloy-primitives", "reth-chainspec", "reth-consensus", @@ -8658,12 +9021,16 @@ dependencies = [ [[package]] name = "reth-optimism-evm" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ + "alloy-consensus 0.5.4", + "alloy-eips 0.5.4", "alloy-primitives", + "derive_more 1.0.0", "op-alloy-consensus", "reth-chainspec", + "reth-consensus", "reth-ethereum-forks", "reth-evm", "reth-execution-errors", @@ -8675,44 +9042,40 @@ dependencies = [ "reth-prune-types", "reth-revm", "revm", - "revm-primitives", - "thiserror", + "revm-primitives 13.0.0", "tracing", ] [[package]] name = "reth-optimism-forks" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "alloy-chains", "alloy-primitives", "once_cell", "reth-ethereum-forks", + "serde", ] [[package]] name = "reth-optimism-node" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ - "alloy-eips 0.4.2", + "alloy-eips 0.5.4", "alloy-primitives", "alloy-rpc-types-engine", - "async-trait", "clap 4.5.19", "eyre", - "jsonrpsee", - "jsonrpsee-types", "op-alloy-rpc-types-engine", - "parking_lot 0.12.3", - "reqwest 0.12.8", + "parking_lot", "reth-auto-seal-consensus", "reth-basic-payload-builder", "reth-beacon-consensus", "reth-chainspec", "reth-consensus", - "reth-discv5", + "reth-engine-local", "reth-evm", "reth-network", "reth-node-api", @@ -8727,24 +9090,20 @@ dependencies = [ "reth-primitives", "reth-provider", "reth-revm", - "reth-rpc", - "reth-rpc-eth-api", - "reth-rpc-eth-types", - "reth-rpc-types-compat", "reth-tracing", "reth-transaction-pool", + "revm", "serde", "serde_json", - "thiserror", - "tracing", ] [[package]] name = "reth-optimism-payload-builder" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ - "alloy-eips 0.4.2", + "alloy-consensus 0.5.4", + "alloy-eips 0.5.4", "alloy-primitives", "alloy-rlp", "alloy-rpc-types-engine", @@ -8767,7 +9126,6 @@ dependencies = [ "reth-transaction-pool", "reth-trie", "revm", - "revm-primitives", "sha2 0.10.8", "thiserror", "tracing", @@ -8775,29 +9133,30 @@ dependencies = [ [[package]] name = "reth-optimism-primitives" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ + "alloy-consensus 0.5.4", "alloy-primitives", "reth-primitives", - "reth-primitives-traits", ] [[package]] name = "reth-optimism-rpc" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ - "alloy-eips 0.4.2", + "alloy-consensus 0.5.4", + "alloy-eips 0.5.4", "alloy-primitives", "alloy-rpc-types", - "alloy-rpc-types-eth 0.4.2", + "alloy-rpc-types-eth 0.5.4", "derive_more 1.0.0", "jsonrpsee-types", "op-alloy-consensus", "op-alloy-network", "op-alloy-rpc-types", - "parking_lot 0.12.3", + "parking_lot", "reqwest 0.12.8", "reth-chainspec", "reth-evm", @@ -8825,14 +9184,14 @@ dependencies = [ [[package]] name = "reth-payload-builder" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "alloy-primitives", "alloy-rpc-types", "async-trait", "futures-util", - "metrics", + "metrics 0.24.0", "reth-chain-state", "reth-ethereum-engine-primitives", "reth-metrics", @@ -8846,9 +9205,10 @@ dependencies = [ [[package]] name = "reth-payload-primitives" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ + "alloy-eips 0.5.4", "alloy-primitives", "alloy-rpc-types", "async-trait", @@ -8868,8 +9228,8 @@ dependencies = [ [[package]] name = "reth-payload-validator" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "alloy-rpc-types", "reth-chainspec", @@ -8879,15 +9239,15 @@ dependencies = [ [[package]] name = "reth-primitives" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ - "alloy-consensus 0.4.2", - "alloy-eips 0.4.2", + "alloy-consensus 0.5.4", + "alloy-eips 0.5.4", "alloy-primitives", "alloy-rlp", "alloy-rpc-types", - "alloy-serde 0.4.2", + "alloy-serde 0.5.4", "arbitrary", "bytes", "c-kzg", @@ -8897,16 +9257,14 @@ dependencies = [ "once_cell", "op-alloy-consensus", "op-alloy-rpc-types", - "proptest", "rand", "rayon", "reth-codecs", "reth-ethereum-forks", - "reth-optimism-chainspec", "reth-primitives-traits", "reth-static-file-types", "reth-trie-common", - "revm-primitives", + "revm-primitives 13.0.0", "secp256k1", "serde", "serde_with", @@ -8915,11 +9273,11 @@ dependencies = [ [[package]] name = "reth-primitives-traits" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ - "alloy-consensus 0.4.2", - "alloy-eips 0.4.2", + "alloy-consensus 0.5.4", + "alloy-eips 0.5.4", "alloy-genesis", "alloy-primitives", "alloy-rlp", @@ -8931,7 +9289,7 @@ dependencies = [ "proptest", "proptest-arbitrary-interop", "reth-codecs", - "revm-primitives", + "revm-primitives 13.0.0", "roaring", "serde", "serde_with", @@ -8939,20 +9297,19 @@ dependencies = [ [[package]] name = "reth-provider" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ - "alloy-consensus 0.4.2", - "alloy-eips 0.4.2", + "alloy-consensus 0.5.4", + "alloy-eips 0.5.4", "alloy-primitives", "alloy-rpc-types-engine", "auto_impl", "dashmap 6.1.0", "itertools 0.13.0", - "metrics", + "metrics 0.24.0", "notify", - "once_cell", - "parking_lot 0.12.3", + "parking_lot", "rayon", "reth-blockchain-tree-api", "reth-chain-state", @@ -8985,12 +9342,12 @@ dependencies = [ [[package]] name = "reth-prune" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "alloy-primitives", "itertools 0.13.0", - "metrics", + "metrics 0.24.0", "rayon", "reth-chainspec", "reth-config", @@ -9011,10 +9368,11 @@ dependencies = [ [[package]] name = "reth-prune-types" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "alloy-primitives", + "arbitrary", "bytes", "derive_more 1.0.0", "modular-bitfield", @@ -9025,42 +9383,43 @@ dependencies = [ [[package]] name = "reth-revm" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ + "alloy-eips 0.5.4", "alloy-primitives", - "reth-chainspec", - "reth-consensus-common", "reth-execution-errors", "reth-primitives", "reth-prune-types", "reth-storage-api", "reth-storage-errors", + "reth-trie", "revm", ] [[package]] name = "reth-rpc" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ - "alloy-consensus 0.4.2", + "alloy-consensus 0.5.4", "alloy-dyn-abi", - "alloy-eips 0.4.2", + "alloy-eips 0.5.4", "alloy-genesis", - "alloy-network 0.4.2", + "alloy-network 0.5.4", "alloy-primitives", "alloy-rlp", "alloy-rpc-types", "alloy-rpc-types-admin", + "alloy-rpc-types-beacon", "alloy-rpc-types-debug", - "alloy-rpc-types-eth 0.4.2", + "alloy-rpc-types-eth 0.5.4", "alloy-rpc-types-mev", "alloy-rpc-types-trace", "alloy-rpc-types-txpool", - "alloy-serde 0.4.2", - "alloy-signer 0.4.2", - "alloy-signer-local", + "alloy-serde 0.5.4", + "alloy-signer 0.5.4", + "alloy-signer-local 0.5.4", "async-trait", "derive_more 1.0.0", "futures", @@ -9069,7 +9428,7 @@ dependencies = [ "hyper 1.4.1", "jsonrpsee", "jsonwebtoken", - "parking_lot 0.12.3", + "parking_lot", "pin-project", "rand", "reth-chainspec", @@ -9079,7 +9438,6 @@ dependencies = [ "reth-network-api", "reth-network-peers", "reth-network-types", - "reth-node-api", "reth-primitives", "reth-provider", "reth-revm", @@ -9094,7 +9452,7 @@ dependencies = [ "reth-trie", "revm", "revm-inspectors", - "revm-primitives", + "revm-primitives 13.0.0", "serde", "serde_json", "thiserror", @@ -9107,11 +9465,11 @@ dependencies = [ [[package]] name = "reth-rpc-api" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ - "alloy-eips 0.4.2", - "alloy-json-rpc 0.4.2", + "alloy-eips 0.5.4", + "alloy-json-rpc 0.5.4", "alloy-primitives", "alloy-rpc-types", "alloy-rpc-types-admin", @@ -9119,11 +9477,11 @@ dependencies = [ "alloy-rpc-types-beacon", "alloy-rpc-types-debug", "alloy-rpc-types-engine", - "alloy-rpc-types-eth 0.4.2", + "alloy-rpc-types-eth 0.5.4", "alloy-rpc-types-mev", "alloy-rpc-types-trace", "alloy-rpc-types-txpool", - "alloy-serde 0.4.2", + "alloy-serde 0.5.4", "jsonrpsee", "reth-engine-primitives", "reth-network-peers", @@ -9133,15 +9491,15 @@ dependencies = [ [[package]] name = "reth-rpc-builder" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ - "alloy-network 0.4.2", + "alloy-network 0.5.4", "alloy-rpc-types", - "alloy-serde 0.4.2", + "alloy-serde 0.5.4", "http 1.1.0", "jsonrpsee", - "metrics", + "metrics 0.24.0", "pin-project", "reth-chainspec", "reth-engine-primitives", @@ -9162,6 +9520,8 @@ dependencies = [ "reth-transaction-pool", "serde", "thiserror", + "tokio", + "tokio-util", "tower 0.4.13", "tower-http", "tracing", @@ -9169,16 +9529,16 @@ dependencies = [ [[package]] name = "reth-rpc-engine-api" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ - "alloy-eips 0.4.2", + "alloy-eips 0.5.4", "alloy-primitives", "alloy-rpc-types-engine", "async-trait", "jsonrpsee-core", "jsonrpsee-types", - "metrics", + "metrics 0.24.0", "reth-beacon-consensus", "reth-chainspec", "reth-engine-primitives", @@ -9200,16 +9560,17 @@ dependencies = [ [[package]] name = "reth-rpc-eth-api" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ + "alloy-consensus 0.5.4", "alloy-dyn-abi", - "alloy-eips 0.4.2", - "alloy-json-rpc 0.4.2", - "alloy-network 0.4.2", + "alloy-eips 0.5.4", + "alloy-json-rpc 0.5.4", + "alloy-network 0.5.4", "alloy-primitives", "alloy-rpc-types", - "alloy-rpc-types-eth 0.4.2", + "alloy-rpc-types-eth 0.5.4", "alloy-rpc-types-mev", "async-trait", "auto_impl", @@ -9217,12 +9578,13 @@ dependencies = [ "futures", "jsonrpsee", "jsonrpsee-types", - "parking_lot 0.12.3", + "parking_lot", "reth-chainspec", "reth-errors", "reth-evm", "reth-execution-types", "reth-network-api", + "reth-node-api", "reth-primitives", "reth-provider", "reth-revm", @@ -9234,28 +9596,29 @@ dependencies = [ "reth-trie", "revm", "revm-inspectors", - "revm-primitives", + "revm-primitives 13.0.0", "tokio", "tracing", ] [[package]] name = "reth-rpc-eth-types" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ - "alloy-consensus 0.4.2", - "alloy-eips 0.4.2", + "alloy-consensus 0.5.4", + "alloy-eips 0.5.4", "alloy-primitives", "alloy-rpc-types", - "alloy-rpc-types-eth 0.4.2", - "alloy-serde 0.4.2", + "alloy-rpc-types-eth 0.5.4", + "alloy-serde 0.5.4", "alloy-sol-types", "derive_more 1.0.0", "futures", + "itertools 0.13.0", "jsonrpsee-core", "jsonrpsee-types", - "metrics", + "metrics 0.24.0", "rand", "reth-chain-state", "reth-chainspec", @@ -9273,7 +9636,7 @@ dependencies = [ "reth-trie", "revm", "revm-inspectors", - "revm-primitives", + "revm-primitives 13.0.0", "schnellru", "serde", "thiserror", @@ -9284,8 +9647,8 @@ dependencies = [ [[package]] name = "reth-rpc-layer" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "alloy-rpc-types-engine", "http 1.1.0", @@ -9297,8 +9660,8 @@ dependencies = [ [[package]] name = "reth-rpc-server-types" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "alloy-primitives", "alloy-rpc-types-engine", @@ -9313,24 +9676,26 @@ dependencies = [ [[package]] name = "reth-rpc-types-compat" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ - "alloy-eips 0.4.2", + "alloy-consensus 0.5.4", + "alloy-eips 0.5.4", "alloy-primitives", "alloy-rlp", "alloy-rpc-types", "alloy-rpc-types-engine", - "alloy-rpc-types-eth 0.4.2", - "alloy-serde 0.4.2", + "alloy-rpc-types-eth 0.5.4", + "alloy-serde 0.5.4", "reth-primitives", "reth-trie-common", + "serde", ] [[package]] name = "reth-stages" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "alloy-primitives", "bincode", @@ -9338,6 +9703,7 @@ dependencies = [ "itertools 0.13.0", "num-traits", "rayon", + "reth-chainspec", "reth-codecs", "reth-config", "reth-consensus", @@ -9356,8 +9722,10 @@ dependencies = [ "reth-revm", "reth-stages-api", "reth-storage-errors", + "reth-testing-utils", "reth-trie", "reth-trie-db", + "tempfile", "thiserror", "tokio", "tracing", @@ -9365,14 +9733,14 @@ dependencies = [ [[package]] name = "reth-stages-api" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "alloy-primitives", "aquamarine", "auto_impl", "futures-util", - "metrics", + "metrics 0.24.0", "reth-consensus", "reth-errors", "reth-metrics", @@ -9391,10 +9759,11 @@ dependencies = [ [[package]] name = "reth-stages-types" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "alloy-primitives", + "arbitrary", "bytes", "modular-bitfield", "reth-codecs", @@ -9404,17 +9773,14 @@ dependencies = [ [[package]] name = "reth-static-file" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "alloy-primitives", - "parking_lot 0.12.3", + "parking_lot", "rayon", - "reth-chainspec", "reth-db", "reth-db-api", - "reth-nippy-jar", - "reth-node-types", "reth-provider", "reth-prune-types", "reth-stages-types", @@ -9426,8 +9792,8 @@ dependencies = [ [[package]] name = "reth-static-file-types" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "alloy-primitives", "clap 4.5.19", @@ -9438,10 +9804,11 @@ dependencies = [ [[package]] name = "reth-storage-api" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ - "alloy-eips 0.4.2", + "alloy-consensus 0.5.4", + "alloy-eips 0.5.4", "alloy-primitives", "auto_impl", "reth-chainspec", @@ -9457,10 +9824,10 @@ dependencies = [ [[package]] name = "reth-storage-errors" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ - "alloy-eips 0.4.2", + "alloy-eips 0.5.4", "alloy-primitives", "alloy-rlp", "derive_more 1.0.0", @@ -9470,13 +9837,13 @@ dependencies = [ [[package]] name = "reth-tasks" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "auto_impl", "dyn-clone", "futures-util", - "metrics", + "metrics 0.24.0", "pin-project", "rayon", "reth-metrics", @@ -9486,10 +9853,23 @@ dependencies = [ "tracing-futures", ] +[[package]] +name = "reth-testing-utils" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" +dependencies = [ + "alloy-consensus 0.5.4", + "alloy-genesis", + "alloy-primitives", + "rand", + "reth-primitives", + "secp256k1", +] + [[package]] name = "reth-tokio-util" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "tokio", "tokio-stream", @@ -9498,8 +9878,8 @@ dependencies = [ [[package]] name = "reth-tracing" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "clap 4.5.19", "eyre", @@ -9513,18 +9893,21 @@ dependencies = [ [[package]] name = "reth-transaction-pool" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ - "alloy-eips 0.4.2", + "alloy-consensus 0.5.4", + "alloy-eips 0.5.4", "alloy-primitives", "alloy-rlp", "aquamarine", "auto_impl", "bitflags 2.6.0", "futures-util", - "metrics", - "parking_lot 0.12.3", + "metrics 0.24.0", + "parking_lot", + "paste", + "rand", "reth-chain-state", "reth-chainspec", "reth-eth-wire-types", @@ -9547,15 +9930,15 @@ dependencies = [ [[package]] name = "reth-trie" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ + "alloy-consensus 0.5.4", "alloy-primitives", "alloy-rlp", "auto_impl", - "derive_more 1.0.0", "itertools 0.13.0", - "metrics", + "metrics 0.24.0", "rayon", "reth-execution-errors", "reth-metrics", @@ -9572,10 +9955,10 @@ dependencies = [ [[package]] name = "reth-trie-common" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ - "alloy-consensus 0.4.2", + "alloy-consensus 0.5.4", "alloy-genesis", "alloy-primitives", "alloy-rlp", @@ -9589,48 +9972,45 @@ dependencies = [ "plain_hasher", "reth-codecs", "reth-primitives-traits", - "revm-primitives", + "revm-primitives 13.0.0", "serde", ] [[package]] name = "reth-trie-db" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "alloy-primitives", "alloy-rlp", - "auto_impl", "derive_more 1.0.0", - "itertools 0.13.0", - "metrics", - "rayon", + "metrics 0.24.0", "reth-db", "reth-db-api", "reth-execution-errors", "reth-metrics", "reth-primitives", - "reth-stages-types", "reth-storage-errors", "reth-trie", "reth-trie-common", "revm", + "serde", "tracing", + "triehash", ] [[package]] name = "reth-trie-parallel" -version = "1.0.8" -source = "git+https://github.com/paradigmxyz/reth?rev=c35b8be#c35b8beb35594bb3192caec7d4335ca567d45539" +version = "1.1.0" +source = "git+https://github.com/paradigmxyz/reth?rev=ddc9bda#ddc9bda315c0815369794f51bc232dff0ac9f43e" dependencies = [ "alloy-primitives", "alloy-rlp", "derive_more 1.0.0", "itertools 0.13.0", - "metrics", + "metrics 0.24.0", "rayon", "reth-db", - "reth-db-api", "reth-execution-errors", "reth-metrics", "reth-primitives", @@ -9643,27 +10023,27 @@ dependencies = [ [[package]] name = "revm" -version = "14.0.3" +version = "17.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "641702b12847f9ed418d552f4fcabe536d867a2c980e96b6e7e25d7b992f929f" +checksum = "055bee6a81aaeee8c2389ae31f0d4de87f44df24f4444a1116f9755fd87a76ad" dependencies = [ "auto_impl", "cfg-if", "dyn-clone", - "revm-interpreter", - "revm-precompile", + "revm-interpreter 13.0.0", + "revm-precompile 14.0.0", "serde", "serde_json", ] [[package]] name = "revm-inspectors" -version = "0.8.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43c44af0bf801f48d25f7baf25cf72aff4c02d610f83b428175228162fef0246" +checksum = "1e29c662f7887f3b659d4b0fd234673419a8fcbeaa1ecc29bf7034c0a75cc8ea" dependencies = [ "alloy-primitives", - "alloy-rpc-types-eth 0.4.2", + "alloy-rpc-types-eth 0.5.4", "alloy-rpc-types-trace", "alloy-sol-types", "anstyle", @@ -9683,7 +10063,17 @@ checksum = "2e5e14002afae20b5bf1566f22316122f42f57517000e559c55b25bf7a49cba2" dependencies = [ "paste", "phf", - "revm-primitives", + "revm-primitives 10.0.0", + "serde", +] + +[[package]] +name = "revm-interpreter" +version = "13.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fac2034454f8bc69dc7d3c94cdb1b57559e27f5ef0518771f1787de543d7d6a1" +dependencies = [ + "revm-primitives 13.0.0", "serde", ] @@ -9692,6 +10082,25 @@ name = "revm-precompile" version = "11.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3198c06247e8d4ad0d1312591edf049b0de4ddffa9fecb625c318fd67db8639b" +dependencies = [ + "aurora-engine-modexp", + "blst", + "c-kzg", + "cfg-if", + "k256", + "once_cell", + "revm-primitives 10.0.0", + "ripemd", + "secp256k1", + "sha2 0.10.8", + "substrate-bn", +] + +[[package]] +name = "revm-precompile" +version = "14.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a88c8c7c5f9b988a9e65fc0990c6ce859cdb74114db705bd118a96d22d08027" dependencies = [ "aurora-engine-modexp", "blst", @@ -9700,7 +10109,7 @@ dependencies = [ "k256", "once_cell", "p256", - "revm-primitives", + "revm-primitives 13.0.0", "ripemd", "secp256k1", "sha2 0.10.8", @@ -9714,7 +10123,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f1525851a03aff9a9d6a1d018b414d76252d6802ab54695b27093ecd7e7a101" dependencies = [ "alloy-eip2930", - "alloy-eip7702", + "alloy-eip7702 0.1.1", + "alloy-primitives", + "auto_impl", + "bitflags 2.6.0", + "bitvec", + "c-kzg", + "cfg-if", + "dyn-clone", + "enumn", + "hex", + "serde", +] + +[[package]] +name = "revm-primitives" +version = "13.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d11fa1e195b0bebaf3fb18596f314a13ba3a4cb1fdd16d3465934d812fd921e" +dependencies = [ + "alloy-eip2930", + "alloy-eip7702 0.3.2", "alloy-primitives", "auto_impl", "bitflags 2.6.0", @@ -10534,7 +10963,7 @@ dependencies = [ "futures", "log", "once_cell", - "parking_lot 0.12.3", + "parking_lot", "scc", "serial_test_derive", ] @@ -10690,6 +11119,10 @@ name = "similar" version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1de1d4f81173b03af4c0cbed3c898f6bff5b870e4a7f5d6f4057d62a7a4b686e" +dependencies = [ + "bstr", + "unicode-segmentation", +] [[package]] name = "similar-asserts" @@ -10698,6 +11131,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfe85670573cd6f0fa97940f26e7e6601213c3b0555246c24234131f88c5709e" dependencies = [ "console", + "serde", "similar", ] @@ -10721,9 +11155,9 @@ checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] name = "sketches-ddsketch" -version = "0.2.2" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85636c14b73d81f541e525f585c0a2109e6744e1565b5c1668e31c70c10ed65c" +checksum = "c1e9a774a6c28142ac54bb25d25562e6bcf957493a184f15ad4eebccb23e410a" [[package]] name = "slab" @@ -11334,7 +11768,7 @@ dependencies = [ "bytes", "libc", "mio 1.0.2", - "parking_lot 0.12.3", + "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2 0.5.7", @@ -11789,9 +12223,10 @@ dependencies = [ "ipconfig", "lru-cache", "once_cell", - "parking_lot 0.12.3", + "parking_lot", "rand", "resolv-conf", + "serde", "smallvec", "thiserror", "tokio", @@ -11859,6 +12294,18 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "uint" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "909988d098b2f738727b161a106cfc7cab00c539c2687a8836f8e565976fb53e" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + [[package]] name = "unarray" version = "0.1.4" @@ -12114,6 +12561,17 @@ dependencies = [ "virtual-mio", ] +[[package]] +name = "visibility" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d674d135b4a8c1d7e813e2f8d1c9a58308aee4a680323066025e53132218bd91" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", +] + [[package]] name = "wai-bindgen-gen-core" version = "0.2.3" @@ -12599,6 +13057,20 @@ dependencies = [ "semver 1.0.23", ] +[[package]] +name = "wasmtimer" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7ed9d8b15c7fb594d72bfb4b5a276f3d2029333cd93a932f376f5937f6f80ee" +dependencies = [ + "futures", + "js-sys", + "parking_lot", + "pin-utils", + "slab", + "wasm-bindgen", +] + [[package]] name = "wast" version = "64.0.0" @@ -13060,16 +13532,16 @@ dependencies = [ name = "world-chain-builder" version = "0.1.0" dependencies = [ - "alloy-consensus 0.4.2", - "alloy-eips 0.4.2", + "alloy-consensus 0.5.4", + "alloy-eips 0.5.4", "alloy-genesis", - "alloy-network 0.4.2", + "alloy-network 0.5.4", "alloy-primitives", "alloy-rlp", "alloy-rpc-types", - "alloy-rpc-types-eth 0.4.2", + "alloy-rpc-types-eth 0.5.4", "alloy-signer 0.4.2", - "alloy-signer-local", + "alloy-signer-local 0.4.2", "bytemuck", "bytes", "chrono", @@ -13084,7 +13556,7 @@ dependencies = [ "op-alloy-consensus", "op-alloy-network", "op-alloy-rpc-types", - "parking_lot 0.12.3", + "parking_lot", "rand", "reth", "reth-basic-payload-builder", @@ -13112,9 +13584,9 @@ dependencies = [ "reth-trie", "revm", "revm-inspectors", - "revm-interpreter", - "revm-precompile", - "revm-primitives", + "revm-interpreter 10.0.3", + "revm-precompile 11.0.3", + "revm-primitives 13.0.0", "semaphore", "serde", "serde_json", diff --git a/world-chain-builder/Cargo.toml b/world-chain-builder/Cargo.toml index fce45bf..b3a7434 100644 --- a/world-chain-builder/Cargo.toml +++ b/world-chain-builder/Cargo.toml @@ -10,65 +10,68 @@ members = ["crates/*"] [dependencies] # reth -reth = { git = "https://github.com/paradigmxyz/reth", rev = "c35b8be" } -reth-cli-util = { git = "https://github.com/paradigmxyz/reth", rev = "c35b8be" } -reth-evm = { git = "https://github.com/paradigmxyz/reth", rev = "c35b8be" } -reth-db = { git = "https://github.com/paradigmxyz/reth", rev = "c35b8be" } -reth-provider = { git = "https://github.com/paradigmxyz/reth", rev = "c35b8be", features = [ +reth = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda" } +reth-cli-util = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda" } +reth-evm = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda" } +reth-db = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda" } +reth-provider = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda", features = [ "test-utils", ] } -reth-basic-payload-builder = { git = "https://github.com/paradigmxyz/reth", rev = "c35b8be" } -reth-prune-types = { git = "https://github.com/paradigmxyz/reth", rev = "c35b8be" } -reth-trie = { git = "https://github.com/paradigmxyz/reth", rev = "c35b8be" } -reth-chain-state = { git = "https://github.com/paradigmxyz/reth", rev = "c35b8be" } -reth-eth-wire-types = { git = "https://github.com/paradigmxyz/reth", rev = "c35b8be" } -reth-stages-types = { git = "https://github.com/paradigmxyz/reth", rev = "c35b8be" } +reth-basic-payload-builder = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda" } +reth-prune-types = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda" } +reth-trie = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda" } +reth-chain-state = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda" } +reth-eth-wire-types = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda" } +reth-stages-types = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda" } # reth-optimism -reth-primitives = { git = "https://github.com/paradigmxyz/reth", rev = "c35b8be", features = [ +reth-primitives = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda", features = [ "optimism", ] } -reth-optimism-evm = { git = "https://github.com/paradigmxyz/reth", rev = "c35b8be", features = [ +reth-optimism-evm = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda", features = [ "optimism", ] } -reth-optimism-node = { git = "https://github.com/paradigmxyz/reth", rev = "c35b8be", features = [ +reth-optimism-node = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda", features = [ "optimism", ] } -reth-optimism-cli = { git = "https://github.com/paradigmxyz/reth", rev = "c35b8be", features = [ +reth-optimism-cli = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda", features = [ "optimism", ] } -reth-optimism-rpc = { git = "https://github.com/paradigmxyz/reth", rev = "c35b8be", features = [ +reth-optimism-rpc = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda", features = [ "optimism", ] } -reth-optimism-consensus = { git = "https://github.com/paradigmxyz/reth", rev = "c35b8be", features = [ +reth-optimism-consensus = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda", features = [ "optimism", ] } -reth-optimism-chainspec = { git = "https://github.com/paradigmxyz/reth", rev = "c35b8be" } -reth-optimism-payload-builder = { git = "https://github.com/paradigmxyz/reth", rev = "c35b8be" } -reth-optimism-forks = { git = "https://github.com/paradigmxyz/reth", rev = "c35b8be" } +reth-optimism-chainspec = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda" } +reth-optimism-payload-builder = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda" } +reth-optimism-forks = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda" } # alloy -op-alloy-consensus = "0.3" -op-alloy-rpc-types = "0.3" -op-alloy-network = "0.3" -alloy-consensus = "0.4" -alloy-network = "0.4" -alloy-primitives = "0.8" -# alloy-provider = "0.3" -alloy-rpc-types-eth = "0.4" -alloy-rpc-types = "0.4" -alloy-rlp = "0.3" -alloy-eips = "0.4" -alloy-genesis = "0.4" +op-alloy-consensus = "0.5" +op-alloy-rpc-types = "0.5" +op-alloy-network = "0.5" +alloy-consensus = { version = "0.5.4", default-features = false } +alloy-network = { version = "0.5.4", default-features = false } +alloy-primitives = { version = "0.8.9", default-features = false } +alloy-rpc-types-eth = { version = "0.5.4", default-features = false } +alloy-rpc-types = { version = "0.5.4", features = [ + "eth", +], default-features = false } +alloy-rlp = "0.3.4" +alloy-eips = { version = "0.5.4", default-features = false } +alloy-genesis = { version = "0.5.4", default-features = false } # revm -revm = "14" +# revm +revm = { version = "17.0.0", features = ["std"], default-features = false } +revm-inspectors = "0.10.0" +revm-primitives = { version = "13.0.0", features = [ + "std", +], default-features = false } revm-interpreter = "10" -revm-inspectors = "0.8" revm-precompile = "11" -revm-primitives = { version = "10", default-features = false, features = [ - "std", -] } + # 3rd party tokio = { version = "1", features = ["full"] } @@ -98,16 +101,13 @@ criterion = { version = "0.5", features = ["async_tokio"] } serial_test = "3" test-case = "3" ethers-core = { git = "https://github.com/gakonst/ethers-rs", default-features = false } -reth-provider = { git = "https://github.com/paradigmxyz/reth", rev = "c35b8be", features = [ - "test-utils", -] } alloy-primitives = "0.8" serde_json = "1" rand = "0.8" -reth-e2e-test-utils = { git = "https://github.com/paradigmxyz/reth", rev = "c35b8be" } -reth-consensus = { git = "https://github.com/paradigmxyz/reth", rev = "c35b8be" } -reth-node-core = { git = "https://github.com/paradigmxyz/reth", rev = "c35b8be" } -reth-tracing = { git = "https://github.com/paradigmxyz/reth", rev = "c35b8be" } +reth-e2e-test-utils = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda" } +reth-consensus = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda" } +reth-node-core = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda" } +reth-tracing = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda" } alloy-signer = "0.4" alloy-signer-local = "0.4" diff --git a/world-chain-builder/src/node/test_utils.rs b/world-chain-builder/src/node/test_utils.rs index f9c3075..ef01cc4 100644 --- a/world-chain-builder/src/node/test_utils.rs +++ b/world-chain-builder/src/node/test_utils.rs @@ -25,13 +25,14 @@ use reth_provider::{ providers::StaticFileProvider, AccountReader, BlockHashReader, BlockIdReader, BlockNumReader, BlockReader, BlockReaderIdExt, BlockSource, ChainSpecProvider, ChangeSetReader, EvmEnvProvider, HeaderProvider, ProviderError, ProviderResult, PruneCheckpointReader, ReceiptProvider, - ReceiptProviderIdExt, RequestsProvider, StateProofProvider, StateProvider, StateProviderBox, + ReceiptProviderIdExt, StateProofProvider, StateProvider, StateProviderBox, StateProviderFactory, StateRootProvider, StaticFileProviderFactory, StorageRootProvider, TransactionVariant, TransactionsProvider, WithdrawalsProvider, }; use reth_prune_types::{PruneCheckpoint, PruneSegment}; use reth_trie::{ - updates::TrieUpdates, AccountProof, HashedPostState, HashedStorage, MultiProof, TrieInput, + updates::TrieUpdates, AccountProof, HashedPostState, HashedStorage, MultiProof, StorageProof, + TrieInput, }; use revm::primitives::{BlockEnv, CfgEnvWithHandlerCfg}; use std::{ @@ -361,6 +362,15 @@ impl StorageRootProvider for WorldChainNoopProvider { ) -> ProviderResult { Ok(B256::default()) } + + fn storage_proof( + &self, + address: Address, + slot: B256, + hashed_storage: HashedStorage, + ) -> ProviderResult { + Ok(StorageProof::default()) + } } impl StateProofProvider for WorldChainNoopProvider { @@ -524,16 +534,6 @@ impl WithdrawalsProvider for WorldChainNoopProvider { } } -impl RequestsProvider for WorldChainNoopProvider { - fn requests_by_block( - &self, - _id: BlockHashOrNumber, - _timestamp: u64, - ) -> ProviderResult> { - Ok(None) - } -} - impl PruneCheckpointReader for WorldChainNoopProvider { fn get_prune_checkpoint( &self, diff --git a/world-chain-builder/src/payload/builder.rs b/world-chain-builder/src/payload/builder.rs index 64e74c9..20bb559 100644 --- a/world-chain-builder/src/payload/builder.rs +++ b/world-chain-builder/src/payload/builder.rs @@ -609,7 +609,7 @@ where parent_beacon_block_root: attributes.payload_attributes.parent_beacon_block_root, blob_gas_used, excess_blob_gas, - requests_root: None, + requests_hash: None, }; let body = BlockBody { diff --git a/world-chain-builder/src/rpc/block.rs b/world-chain-builder/src/rpc/block.rs index ad198ed..c22ea22 100644 --- a/world-chain-builder/src/rpc/block.rs +++ b/world-chain-builder/src/rpc/block.rs @@ -3,14 +3,15 @@ use crate::rpc::WorldChainEthApi; use alloy_network::Network; use op_alloy_rpc_types::OpTransactionReceipt; -use reth::api::{FullNodeComponents, NodeTypes}; -use reth::core::rpc::eth::helpers::{EthBlocks, LoadBlock, LoadPendingBlock, LoadReceipt}; -use reth::core::rpc::eth::RpcReceipt; -use reth::rpc::server_types::eth::EthStateCache; +use reth::rpc::api::eth::helpers::{ + EthBlocks, LoadBlock, LoadPendingBlock, LoadReceipt, SpawnBlocking, +}; +use reth::rpc::api::eth::RpcReceipt; +use reth::rpc::eth::RpcNodeCore; use reth_optimism_chainspec::OpChainSpec; use reth_optimism_rpc::{OpEthApi, OpEthApiError}; use reth_primitives::BlockId; -use reth_provider::{BlockReaderIdExt, HeaderProvider}; +use reth_provider::{ChainSpecProvider, HeaderProvider}; impl EthBlocks for WorldChainEthApi where @@ -18,13 +19,13 @@ where Error = OpEthApiError, NetworkTypes: Network, >, - N: FullNodeComponents>, + OpEthApi: EthBlocks + + LoadBlock< + Error = OpEthApiError, + NetworkTypes: Network, + > + LoadReceipt, + N: RpcNodeCore + HeaderProvider>, { - #[inline] - fn provider(&self) -> impl HeaderProvider { - EthBlocks::provider(&self.inner) - } - async fn block_receipts( &self, block_id: BlockId, @@ -38,17 +39,8 @@ where impl LoadBlock for WorldChainEthApi where - Self: LoadPendingBlock, - OpEthApi: LoadPendingBlock, - N: FullNodeComponents, + OpEthApi: LoadPendingBlock + SpawnBlocking, + Self: LoadPendingBlock + SpawnBlocking, + N: RpcNodeCore, { - #[inline] - fn provider(&self) -> impl BlockReaderIdExt { - LoadBlock::provider(&self.inner) - } - - #[inline] - fn cache(&self) -> &EthStateCache { - LoadBlock::cache(&self.inner) - } } diff --git a/world-chain-builder/src/rpc/call.rs b/world-chain-builder/src/rpc/call.rs index 36cbc0c..039ea13 100644 --- a/world-chain-builder/src/rpc/call.rs +++ b/world-chain-builder/src/rpc/call.rs @@ -1,9 +1,8 @@ use crate::rpc::WorldChainEthApi; use alloy_rpc_types::TransactionRequest; use reth::api::ConfigureEvm; -use reth::api::{EthApiTypes, FullNodeComponents, NodeTypes}; -use reth::core::rpc::eth::helpers::{Call, EthCall, LoadState, SpawnBlocking}; -use reth_optimism_chainspec::OpChainSpec; +use reth::rpc::api::eth::helpers::{Call, EthCall, LoadPendingBlock, LoadState, SpawnBlocking}; +use reth::rpc::eth::{EthApiTypes, RpcNodeCore}; use reth_optimism_rpc::OpEthApi; use reth_primitives::{ revm_primitives::{BlockEnv, TxEnv}, @@ -12,18 +11,17 @@ use reth_primitives::{ impl EthCall for WorldChainEthApi where - Self: Call, - N: FullNodeComponents>, - Self::Error: From< as EthApiTypes>::Error>, + Self: Call + LoadPendingBlock, + N: RpcNodeCore, { } impl Call for WorldChainEthApi where - Self: LoadState + SpawnBlocking, - N: FullNodeComponents, + Self: LoadState> + SpawnBlocking, OpEthApi: Call, Self::Error: From< as EthApiTypes>::Error>, + N: RpcNodeCore, { #[inline] fn call_gas_limit(&self) -> u64 { @@ -35,11 +33,6 @@ where self.inner.max_simulate_blocks() } - #[inline] - fn evm_config(&self) -> &impl ConfigureEvm
{ - self.inner.evm_config() - } - fn create_txn_env( &self, block_env: &BlockEnv, diff --git a/world-chain-builder/src/rpc/mod.rs b/world-chain-builder/src/rpc/mod.rs index 9d6faa5..3219256 100644 --- a/world-chain-builder/src/rpc/mod.rs +++ b/world-chain-builder/src/rpc/mod.rs @@ -9,25 +9,27 @@ mod pending_block; use alloy_primitives::U256; use derive_more::derive::Deref; use op_alloy_network::Optimism; -use reth::api::{BuilderProvider, FullNodeComponents, NodeTypes}; -use reth::api::{ConfigureEvm, EthApiTypes}; +use reth::api::ConfigureEvm; use reth::builder::EthApiBuilderCtx; -use reth::chainspec::EthereumHardforks; -use reth::core::rpc::eth::helpers::{ - AddDevSigners, EthApiSpec, EthFees, EthSigner, EthState, LoadBlock, LoadFee, LoadState, - SpawnBlocking, Trace, -}; +use reth::chainspec::{EthChainSpec, EthereumHardforks}; + use reth::network::NetworkInfo; +use reth::rpc::api::eth::helpers::{ + AddDevSigners, EthApiSpec, EthFees, EthState, LoadBlock, LoadFee, LoadState, SpawnBlocking, + Trace, +}; +use reth::rpc::api::eth::RpcNodeCoreExt; +use reth::rpc::eth::{EthApiTypes, RpcNodeCore}; use reth::rpc::server_types::eth::{EthStateCache, FeeHistoryCache, GasPriceOracle}; use reth::tasks::{ pool::{BlockingTaskGuard, BlockingTaskPool}, TaskSpawner, }; use reth::transaction_pool::TransactionPool; -use reth_optimism_rpc::{OpEthApi, OpEthApiError, OpTxBuilder}; +use reth_optimism_rpc::{OpEthApi, OpEthApiError}; use reth_primitives::Header; use reth_provider::{ - BlockIdReader, BlockNumReader, BlockReaderIdExt, ChainSpecProvider, HeaderProvider, + BlockNumReader, BlockReaderIdExt, CanonStateSubscriptions, ChainSpecProvider, EvmEnvProvider, StageCheckpointReader, StateProviderFactory, }; use std::fmt; @@ -43,16 +45,21 @@ use std::fmt; /// This type implements the [`FullEthApi`](reth_rpc_eth_api::helpers::FullEthApi) by implemented /// all the `Eth` helper traits and prerequisite traits. #[derive(Clone, Deref)] -pub struct WorldChainEthApi { +pub struct WorldChainEthApi { #[deref] inner: OpEthApi, } -impl WorldChainEthApi { +impl WorldChainEthApi +where + N: RpcNodeCore< + Provider: BlockReaderIdExt + ChainSpecProvider + CanonStateSubscriptions + Clone + 'static, + >, +{ /// Creates a new instance for given context. #[allow(clippy::type_complexity)] - pub fn with_spawner(ctx: &EthApiBuilderCtx) -> Self { - let op_builder_ctx = EthApiBuilderCtx::> { + pub fn new(ctx: &EthApiBuilderCtx, sequencer_http: Option) -> Self { + let op_builder_ctx = EthApiBuilderCtx:: { provider: ctx.provider.clone(), pool: ctx.pool.clone(), network: ctx.network.clone(), @@ -61,10 +68,9 @@ impl WorldChainEthApi { executor: ctx.executor.clone(), events: ctx.events.clone(), cache: ctx.cache.clone(), - _rpc_ty_builders: std::marker::PhantomData, }; - let inner = OpEthApi::with_spawner(&op_builder_ctx); + let inner = OpEthApi::new(&op_builder_ctx, sequencer_http); Self { inner } } } @@ -72,46 +78,73 @@ impl WorldChainEthApi { impl EthApiTypes for WorldChainEthApi where Self: Send + Sync, - N: FullNodeComponents, + N: RpcNodeCore, { type Error = OpEthApiError; type NetworkTypes = Optimism; - type TransactionCompat = OpTxBuilder; + type TransactionCompat = OpEthApi; + + fn tx_resp_builder(&self) -> &Self::TransactionCompat { + self + } } impl EthApiSpec for WorldChainEthApi where - Self: Send + Sync, - N: FullNodeComponents>, + N: RpcNodeCore< + Provider: ChainSpecProvider + + BlockNumReader + + StageCheckpointReader, + Network: NetworkInfo, + >, { #[inline] - fn provider( + fn starting_block(&self) -> U256 { + self.inner.starting_block() + } + + #[inline] + fn signers( &self, - ) -> impl ChainSpecProvider + BlockNumReader + StageCheckpointReader - { - EthApiSpec::provider(&self.inner) + ) -> &parking_lot::RwLock>> { + self.inner.signers() } +} + +impl RpcNodeCore for WorldChainEthApi +where + N: RpcNodeCore, +{ + type Provider = N::Provider; + type Pool = N::Pool; + type Network = ::Network; + type Evm = ::Evm; #[inline] - fn network(&self) -> impl NetworkInfo { - self.inner.network() + fn pool(&self) -> &Self::Pool { + self.inner.pool() } #[inline] - fn starting_block(&self) -> U256 { - self.inner.starting_block() + fn evm_config(&self) -> &Self::Evm { + self.inner.evm_config() } #[inline] - fn signers(&self) -> &parking_lot::RwLock>> { - self.inner.signers() + fn network(&self) -> &Self::Network { + self.inner.network() + } + + #[inline] + fn provider(&self) -> &Self::Provider { + self.inner.provider() } } impl SpawnBlocking for WorldChainEthApi where Self: Send + Sync + Clone + 'static, - N: FullNodeComponents, + N: RpcNodeCore, { #[inline] fn io_task_spawner(&self) -> impl TaskSpawner { @@ -131,23 +164,16 @@ where impl LoadFee for WorldChainEthApi where - Self: LoadBlock, - N: FullNodeComponents>, + Self: LoadBlock, + N: RpcNodeCore< + Provider: BlockReaderIdExt + + EvmEnvProvider + + ChainSpecProvider + + StateProviderFactory, + >, { #[inline] - fn provider( - &self, - ) -> impl BlockIdReader + HeaderProvider + ChainSpecProvider { - LoadFee::provider(&self.inner) - } - - #[inline] - fn cache(&self) -> &EthStateCache { - LoadFee::cache(&self.inner) - } - - #[inline] - fn gas_oracle(&self) -> &GasPriceOracle { + fn gas_oracle(&self) -> &GasPriceOracle { self.inner.gas_oracle() } @@ -157,34 +183,19 @@ where } } -impl LoadState for WorldChainEthApi -where - Self: Send + Sync, - N: FullNodeComponents>, +impl LoadState for WorldChainEthApi where + N: RpcNodeCore< + Provider: StateProviderFactory + ChainSpecProvider, + Pool: TransactionPool, + > { - #[inline] - fn provider( - &self, - ) -> impl StateProviderFactory + ChainSpecProvider { - LoadState::provider(&self.inner) - } - - #[inline] - fn cache(&self) -> &EthStateCache { - LoadState::cache(&self.inner) - } - - #[inline] - fn pool(&self) -> impl TransactionPool { - self.inner.pool() - } } impl EthState for WorldChainEthApi where - Self: LoadState, - OpEthApi: LoadState, - N: FullNodeComponents, + Self: LoadState + SpawnBlocking, + OpEthApi: LoadState + SpawnBlocking, + N: RpcNodeCore, { #[inline] fn max_proof_window(&self) -> u64 { @@ -195,45 +206,38 @@ where impl EthFees for WorldChainEthApi where Self: LoadFee, - N: FullNodeComponents, + N: RpcNodeCore, { } impl Trace for WorldChainEthApi where - Self: LoadState, - OpEthApi: LoadState, - N: FullNodeComponents, + Self: LoadState>, + N: RpcNodeCore, { - #[inline] - fn evm_config(&self) -> &impl ConfigureEvm
{ - self.inner.evm_config() - } } impl AddDevSigners for WorldChainEthApi where - N: FullNodeComponents>, + N: RpcNodeCore, { fn with_dev_accounts(&self) { self.inner.with_dev_accounts() } } -impl BuilderProvider for WorldChainEthApi +impl RpcNodeCoreExt for WorldChainEthApi where - Self: Send, - N: FullNodeComponents, + N: RpcNodeCore, { - type Ctx<'a> = &'a EthApiBuilderCtx; - - fn builder() -> Box Fn(Self::Ctx<'a>) -> Self + Send> { - Box::new(Self::with_spawner) + #[inline] + fn cache(&self) -> &EthStateCache { + self.inner.cache() } } -impl fmt::Debug for WorldChainEthApi { +impl fmt::Debug for WorldChainEthApi { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("OpEthApi").finish_non_exhaustive() + f.debug_struct("WorldChainEthApi").finish_non_exhaustive() } } diff --git a/world-chain-builder/src/rpc/pending_block.rs b/world-chain-builder/src/rpc/pending_block.rs index d0f0502..dbdfa1c 100644 --- a/world-chain-builder/src/rpc/pending_block.rs +++ b/world-chain-builder/src/rpc/pending_block.rs @@ -3,12 +3,11 @@ use crate::rpc::WorldChainEthApi; use alloy_primitives::{BlockNumber, B256}; use reth::api::ConfigureEvm; -use reth::api::{EthApiTypes, FullNodeComponents, NodeTypes}; -use reth::chainspec::EthereumHardforks; -use reth::core::rpc::eth::helpers::{LoadPendingBlock, SpawnBlocking}; +use reth::chainspec::{EthChainSpec, EthereumHardforks}; +use reth::rpc::api::eth::helpers::{LoadPendingBlock, SpawnBlocking}; +use reth::rpc::eth::{EthApiTypes, RpcNodeCore}; use reth::rpc::server_types::eth::PendingBlock; use reth::transaction_pool::TransactionPool; -use reth_optimism_chainspec::OpChainSpec; use reth_optimism_rpc::OpEthApi; use reth_primitives::{revm_primitives::BlockEnv, Header, Receipt, SealedBlockWithSenders}; use reth_provider::{ @@ -18,34 +17,21 @@ use reth_provider::{ impl LoadPendingBlock for WorldChainEthApi where Self: SpawnBlocking, - N: FullNodeComponents>, + N: RpcNodeCore< + Provider: BlockReaderIdExt + + EvmEnvProvider + + ChainSpecProvider + + StateProviderFactory, + Pool: TransactionPool, + Evm: ConfigureEvm
, + >, Self::Error: From< as EthApiTypes>::Error>, { - #[inline] - fn provider( - &self, - ) -> impl BlockReaderIdExt - + EvmEnvProvider - + ChainSpecProvider - + StateProviderFactory { - self.inner.provider() - } - - #[inline] - fn pool(&self) -> impl TransactionPool { - self.inner.pool() - } - #[inline] fn pending_block(&self) -> &tokio::sync::Mutex> { self.inner.pending_block() } - #[inline] - fn evm_config(&self) -> &impl ConfigureEvm
{ - self.inner.evm_config() - } - /// Returns the locally built pending block async fn local_pending_block( &self, diff --git a/world-chain-builder/src/rpc/receipt.rs b/world-chain-builder/src/rpc/receipt.rs index 7be49be..93e7211 100644 --- a/world-chain-builder/src/rpc/receipt.rs +++ b/world-chain-builder/src/rpc/receipt.rs @@ -1,9 +1,10 @@ //! Loads and formats OP receipt RPC response. use crate::rpc::WorldChainEthApi; -use reth::api::{FullNodeComponents, NodeTypes}; -use reth::core::rpc::eth::helpers::LoadReceipt; -use reth::{core::rpc::eth::RpcReceipt, rpc::server_types::eth::EthStateCache}; +use reth::{ + api::{FullNodeComponents, NodeTypes}, + rpc::api::eth::{helpers::LoadReceipt, RpcReceipt}, +}; use reth_optimism_chainspec::OpChainSpec; use reth_primitives::{Receipt, TransactionMeta, TransactionSigned}; @@ -12,11 +13,6 @@ where Self: Send + Sync, N: FullNodeComponents>, { - #[inline] - fn cache(&self) -> &EthStateCache { - LoadReceipt::cache(&self.inner) - } - async fn build_transaction_receipt( &self, tx: TransactionSigned, diff --git a/world-chain-builder/src/rpc/transaction.rs b/world-chain-builder/src/rpc/transaction.rs index 65cd81e..95550bc 100644 --- a/world-chain-builder/src/rpc/transaction.rs +++ b/world-chain-builder/src/rpc/transaction.rs @@ -1,27 +1,24 @@ //! Loads and formats OP transaction RPC response. -use crate::{ - pool::tx::WorldChainPooledTransaction, primitives::recover_raw_transaction, - rpc::WorldChainEthApi, -}; +use crate::pool::tx::WorldChainPooledTransaction; +use crate::{primitives::recover_raw_transaction, rpc::WorldChainEthApi}; + use alloy_primitives::{Bytes, B256}; -use reth::api::FullNodeComponents; -use reth::core::rpc::eth::helpers::{EthSigner, EthTransactions, LoadTransaction, SpawnBlocking}; -use reth::core::rpc::eth::FromEthApiError; +use reth::rpc::api::eth::helpers::{EthSigner, EthTransactions, LoadTransaction, SpawnBlocking}; +use reth::rpc::api::eth::{FromEthApiError, FullEthApiTypes}; +use reth::rpc::eth::RpcNodeCore; use reth::transaction_pool::{PoolTransaction, TransactionOrigin, TransactionPool}; -use reth::{core::rpc::eth::FullEthApiTypes, rpc::server_types::eth::EthStateCache}; use reth_optimism_rpc::SequencerClient; use reth_provider::{BlockReaderIdExt, TransactionsProvider}; impl EthTransactions for WorldChainEthApi where - Self: LoadTransaction>, - N: FullNodeComponents, + Self: LoadTransaction< + Pool: TransactionPool, + Provider: BlockReaderIdExt, + >, + N: RpcNodeCore, { - fn provider(&self) -> impl BlockReaderIdExt { - EthTransactions::provider(&self.inner) - } - fn signers(&self) -> &parking_lot::RwLock>> { self.inner.signers() } @@ -59,35 +56,14 @@ where impl LoadTransaction for WorldChainEthApi where Self: SpawnBlocking + FullEthApiTypes, - N: FullNodeComponents, + N: RpcNodeCore, { - type Pool = N::Pool; - - fn provider(&self) -> impl TransactionsProvider { - LoadTransaction::provider(&self.inner) - } - - fn cache(&self) -> &EthStateCache { - self.inner.cache() - } - - fn pool(&self) -> &Self::Pool { - self.inner.pool() - } } impl WorldChainEthApi where - N: FullNodeComponents, + N: RpcNodeCore, { - /// Sets a [`SequencerClient`] for `eth_sendRawTransaction` to forward transactions to. - pub fn set_sequencer_client( - &self, - sequencer_client: SequencerClient, - ) -> Result<(), tokio::sync::SetError> { - self.inner.set_sequencer_client(sequencer_client) - } - /// Returns the [`SequencerClient`] if one is set. pub fn raw_tx_forwarder(&self) -> Option { self.inner.raw_tx_forwarder() From b7e20a6a115fee639f6c87aefabddeec106e986c Mon Sep 17 00:00:00 2001 From: 0xOsiris Date: Mon, 28 Oct 2024 17:34:48 -0700 Subject: [PATCH 03/13] checkpoint --- world-chain-builder/Cargo.lock | 26 +- world-chain-builder/Cargo.toml | 4 +- world-chain-builder/src/node/builder.rs | 69 +- world-chain-builder/src/node/test_utils.rs | 6 +- world-chain-builder/src/payload/builder.rs | 27 +- world-chain-builder/src/pool/noop.rs | 36 + world-chain-builder/src/primitives.rs | 5 +- world-chain-builder/src/test/e2e/mod.rs | 794 +++++++++++---------- world-chain-builder/src/test/mod.rs | 3 +- 9 files changed, 519 insertions(+), 451 deletions(-) diff --git a/world-chain-builder/Cargo.lock b/world-chain-builder/Cargo.lock index 7d71bf3..a0bd327 100644 --- a/world-chain-builder/Cargo.lock +++ b/world-chain-builder/Cargo.lock @@ -906,22 +906,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "alloy-signer-local" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "494e0a256f3e99f2426f994bcd1be312c02cb8f88260088dacb33a8b8936475f" -dependencies = [ - "alloy-consensus 0.4.2", - "alloy-network 0.4.2", - "alloy-primitives", - "alloy-signer 0.4.2", - "async-trait", - "k256", - "rand", - "thiserror", -] - [[package]] name = "alloy-signer-local" version = "0.5.4" @@ -7523,7 +7507,7 @@ dependencies = [ "alloy-eips 0.5.4", "alloy-primitives", "alloy-signer 0.5.4", - "alloy-signer-local 0.5.4", + "alloy-signer-local", "auto_impl", "derive_more 1.0.0", "metrics 0.24.0", @@ -7974,7 +7958,7 @@ dependencies = [ "alloy-primitives", "alloy-rpc-types", "alloy-signer 0.5.4", - "alloy-signer-local 0.5.4", + "alloy-signer-local", "derive_more 1.0.0", "eyre", "futures-util", @@ -9419,7 +9403,7 @@ dependencies = [ "alloy-rpc-types-txpool", "alloy-serde 0.5.4", "alloy-signer 0.5.4", - "alloy-signer-local 0.5.4", + "alloy-signer-local", "async-trait", "derive_more 1.0.0", "futures", @@ -13540,8 +13524,8 @@ dependencies = [ "alloy-rlp", "alloy-rpc-types", "alloy-rpc-types-eth 0.5.4", - "alloy-signer 0.4.2", - "alloy-signer-local 0.4.2", + "alloy-signer 0.5.4", + "alloy-signer-local", "bytemuck", "bytes", "chrono", diff --git a/world-chain-builder/Cargo.toml b/world-chain-builder/Cargo.toml index b3a7434..0a88413 100644 --- a/world-chain-builder/Cargo.toml +++ b/world-chain-builder/Cargo.toml @@ -108,8 +108,8 @@ reth-e2e-test-utils = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9 reth-consensus = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda" } reth-node-core = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda" } reth-tracing = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda" } -alloy-signer = "0.4" -alloy-signer-local = "0.4" +alloy-signer = { version = "0.5.4", default-features = false } +alloy-signer-local = { version = "0.5.4", default-features = false } [features] jemalloc = ["tikv-jemallocator"] diff --git a/world-chain-builder/src/node/builder.rs b/world-chain-builder/src/node/builder.rs index 6d1be34..74430ef 100644 --- a/world-chain-builder/src/node/builder.rs +++ b/world-chain-builder/src/node/builder.rs @@ -1,24 +1,29 @@ use std::{path::Path, sync::Arc}; use eyre::eyre::Result; -use reth::api::{FullNodeComponents, NodeAddOns}; +use reth::api::{EngineValidator, FullNodeComponents, NodeAddOns}; +use reth::builder::rpc::{RethRpcAddOns, RpcAddOns, RpcHandle, RpcHooks}; +use reth::builder::AddOnsContext; use reth::builder::{ components::ComponentsBuilder, FullNodeTypes, Node, NodeTypes, NodeTypesWithEngine, }; +use reth::builder::{NodeAdapter, NodeComponentsBuilder}; use reth_db::DatabaseEnv; use reth_optimism_chainspec::OpChainSpec; +use reth_optimism_node::engine::OptimismEngineValidator; +use reth_optimism_node::node::OptimismEngineValidatorBuilder; use reth_optimism_node::{ args::RollupArgs, node::{ - OptimismAddOns, OptimismConsensusBuilder, OptimismEngineValidatorBuilder, - OptimismExecutorBuilder, OptimismNetworkBuilder, + OptimismAddOns, OptimismConsensusBuilder, OptimismExecutorBuilder, OptimismNetworkBuilder, }, OptimismEngineTypes, }; +use crate::rpc::WorldChainEthApi; use crate::{ payload::builder::WorldChainPayloadServiceBuilder, pbh::db::load_world_chain_db, - pool::builder::WorldChainPoolBuilder, rpc::WorldChainEthApi, + pool::builder::WorldChainPoolBuilder, }; use super::args::{ExtArgs, WorldChainBuilderArgs}; @@ -48,7 +53,6 @@ impl WorldChainBuilder { OptimismNetworkBuilder, OptimismExecutorBuilder, OptimismConsensusBuilder, - OptimismEngineValidatorBuilder, > where Node: FullNodeTypes< @@ -86,7 +90,6 @@ impl WorldChainBuilder { }) .executor(OptimismExecutorBuilder::default()) .consensus(OptimismConsensusBuilder::default()) - .engine_validator(OptimismEngineValidatorBuilder::default()) } } @@ -103,20 +106,18 @@ where OptimismNetworkBuilder, OptimismExecutorBuilder, OptimismConsensusBuilder, - OptimismEngineValidatorBuilder, >; - type AddOns = WorldChainAddOns; - + type AddOns = OptimismAddOns< + NodeAdapter>::Components>, + >; fn components_builder(&self) -> Self::ComponentsBuilder { let Self { args, db } = self; Self::components(args.clone(), db.clone()) } fn add_ons(&self) -> Self::AddOns { - Self::AddOns { - inner: OptimismAddOns::new(self.args.rollup_args.sequencer_http.clone()), - } + OptimismAddOns::new(self.args.rollup_args.sequencer_http.clone()) } } @@ -129,11 +130,47 @@ impl NodeTypesWithEngine for WorldChainBuilder { type Engine = OptimismEngineTypes; } -#[derive(Debug, Clone)] -pub struct WorldChainAddOns { - pub inner: OptimismAddOns, +#[derive(Debug)] +pub struct WorldChainAddOns( + pub RpcAddOns, OptimismEngineValidatorBuilder>, +); + +impl Default for WorldChainAddOns { + fn default() -> Self { + Self::new(Default::default()) + } +} + +impl WorldChainAddOns { + /// Create a new instance with the given `sequencer_http` URL. + pub fn new(sequencer_http: Option) -> Self { + Self(RpcAddOns::new( + move |ctx| WorldChainEthApi::new(ctx, sequencer_http), + Default::default(), + )) + } +} + +impl NodeAddOns for WorldChainAddOns +where + N: FullNodeComponents>, + OptimismEngineValidator: EngineValidator<::Engine>, +{ + type Handle = RpcHandle>; + + async fn launch_add_ons(self, ctx: AddOnsContext<'_, N>) -> eyre::Result { + self.0.launch_add_ons(ctx).await + } } -impl NodeAddOns for WorldChainAddOns { +impl RethRpcAddOns for WorldChainAddOns +where + N: FullNodeComponents>, + OptimismEngineValidator: EngineValidator<::Engine>, +{ type EthApi = WorldChainEthApi; + + fn hooks_mut(&mut self) -> &mut RpcHooks { + self.0.hooks_mut() + } } diff --git a/world-chain-builder/src/node/test_utils.rs b/world-chain-builder/src/node/test_utils.rs index ef01cc4..e0b8c88 100644 --- a/world-chain-builder/src/node/test_utils.rs +++ b/world-chain-builder/src/node/test_utils.rs @@ -365,9 +365,9 @@ impl StorageRootProvider for WorldChainNoopProvider { fn storage_proof( &self, - address: Address, - slot: B256, - hashed_storage: HashedStorage, + _address: Address, + _slot: B256, + _hashed_storage: HashedStorage, ) -> ProviderResult { Ok(StorageProof::default()) } diff --git a/world-chain-builder/src/payload/builder.rs b/world-chain-builder/src/payload/builder.rs index 20bb559..82fac64 100644 --- a/world-chain-builder/src/payload/builder.rs +++ b/world-chain-builder/src/payload/builder.rs @@ -1,3 +1,5 @@ +use alloy_consensus::EMPTY_OMMER_ROOT_HASH; +use alloy_eips::merge::BEACON_NONCE; use reth_evm::ConfigureEvm; use std::sync::Arc; @@ -28,9 +30,8 @@ use reth_optimism_node::{ OptimismPayloadBuilderAttributes, }; use reth_optimism_payload_builder::error::OptimismPayloadBuilderError; -use reth_primitives::constants::BEACON_NONCE; use reth_primitives::{proofs, BlockBody}; -use reth_primitives::{Block, Header, Receipt, TxType, EMPTY_OMMER_ROOT_HASH}; +use reth_primitives::{Block, Header, Receipt, TxType}; use reth_provider::{ CanonStateSubscriptions, ChainSpecProvider, ExecutionOutcome, StateProviderFactory, }; @@ -274,7 +275,7 @@ where ); // apply eip-4788 pre block contract call - SystemCaller::new(&evm_config, chain_spec.clone()) + SystemCaller::new(evm_config.clone(), chain_spec.clone()) .pre_block_beacon_root_contract_call( &mut db, &initialized_cfg, @@ -350,7 +351,7 @@ where let env = EnvWithHandlerCfg::new_with_cfg_env( initialized_cfg.clone(), initialized_block_env.clone(), - evm_config.tx_env(&sequencer_tx), + evm_config.tx_env(&sequencer_tx.as_signed(), sequencer_tx.signer()), ); let mut evm = evm_config.evm_with_env(&mut db, env); @@ -440,7 +441,7 @@ where let env = EnvWithHandlerCfg::new_with_cfg_env( initialized_cfg.clone(), initialized_block_env.clone(), - evm_config.tx_env(&tx), + evm_config.tx_env(&tx.as_signed(), tx.signer()), ); // Configure the environment for the block. @@ -612,15 +613,15 @@ where requests_hash: None, }; - let body = BlockBody { - transactions: executed_txs, - ommers: vec![], - withdrawals, - requests: None, - }; - // seal the block - let block = Block { header, body }; + let block = Block { + header, + body: BlockBody { + transactions: executed_txs, + ommers: vec![], + withdrawals, + }, + }; let sealed_block = block.seal_slow(); debug!(target: "payload_builder", ?sealed_block, "sealed built block"); diff --git a/world-chain-builder/src/pool/noop.rs b/world-chain-builder/src/pool/noop.rs index 909f2cb..d2073ae 100644 --- a/world-chain-builder/src/pool/noop.rs +++ b/world-chain-builder/src/pool/noop.rs @@ -246,4 +246,40 @@ impl TransactionPool for NoopWorldChainTransactionPool { ) -> Option>> { None } + + fn remove_transactions_and_descendants( + &self, + _hashes: Vec, + ) -> Vec>> { + vec![] //TODO: implement + } + + fn remove_transactions_by_sender( + &self, + _sender: Address, + ) -> Vec>> { + vec![] //TODO: implement + } + + fn get_queued_transactions_by_sender( + &self, + _sender: Address, + ) -> Vec>> { + vec![] //TODO: implement + } + + fn get_pending_transactions_by_sender( + &self, + _sender: Address, + ) -> Vec>> { + vec![] //TODO: implement + } + + fn get_highest_consecutive_transaction_by_sender( + &self, + _sender: Address, + _on_chain_nonce: u64, + ) -> Option>> { + None //TODO: implement + } } diff --git a/world-chain-builder/src/primitives.rs b/world-chain-builder/src/primitives.rs index 1b90e5c..aaed11c 100644 --- a/world-chain-builder/src/primitives.rs +++ b/world-chain-builder/src/primitives.rs @@ -1,3 +1,4 @@ +use alloy_eips::eip2718::Decodable2718; use alloy_rlp::{Decodable, Encodable}; use reth::rpc::server_types::eth::{EthApiError, EthResult}; use reth_primitives::transaction::TransactionConversionError; @@ -42,7 +43,7 @@ impl Decodable for WorldChainPooledTransactionsElement { impl WorldChainPooledTransactionsElement { pub fn decode_enveloped(buf: &mut &[u8]) -> alloy_rlp::Result { - let inner = PooledTransactionsElement::decode_enveloped(buf)?; + let inner = PooledTransactionsElement::decode_2718(buf)?; let pbh_payload = match PbhPayload::decode(buf) { Ok(res) => Some(res), Err(error) => { @@ -55,7 +56,7 @@ impl WorldChainPooledTransactionsElement { } pub fn encode_enveloped(&self, out: &mut dyn alloy_rlp::BufMut) { - self.inner.encode_enveloped(out); + self.inner.encode(out); if let Some(pbh_payload) = &self.pbh_payload { pbh_payload.encode(out); } diff --git a/world-chain-builder/src/test/e2e/mod.rs b/world-chain-builder/src/test/e2e/mod.rs index df6a388..aaa299e 100644 --- a/world-chain-builder/src/test/e2e/mod.rs +++ b/world-chain-builder/src/test/e2e/mod.rs @@ -1,393 +1,401 @@ -//! Utilities for running world chain builder end-to-end tests. -use crate::{ - node::{ - args::{ExtArgs, WorldChainBuilderArgs}, - builder::{WorldChainAddOns, WorldChainBuilder}, - }, - pbh::date_marker::DateMarker, - pbh::external_nullifier::{ExternalNullifier, Prefix}, - pbh::payload::{PbhPayload, Proof}, - pool::{ - ordering::WorldChainOrdering, - root::{LATEST_ROOT_SLOT, OP_WORLD_ID}, - tx::WorldChainPooledTransaction, - validator::WorldChainTransactionValidator, - }, - primitives::WorldChainPooledTransactionsElement, -}; -use alloy_genesis::{Genesis, GenesisAccount}; -use alloy_network::eip2718::Encodable2718; -use alloy_network::{Ethereum, EthereumWallet, TransactionBuilder}; -use alloy_rpc_types::{TransactionInput, TransactionRequest}; -use alloy_signer_local::PrivateKeySigner; -use chrono::Utc; -use reth::api::{FullNodeTypesAdapter, NodeTypesWithDBAdapter}; -use reth::builder::{components::Components, NodeAdapter, NodeBuilder, NodeConfig, NodeHandle}; -use reth::chainspec::ChainSpec; -use reth::payload::{EthPayloadBuilderAttributes, PayloadId}; -use reth::tasks::TaskManager; -use reth::transaction_pool::{ - blobstore::DiskFileBlobStore, Pool, TransactionValidationTaskExecutor, -}; -use reth_consensus::Consensus; -use reth_db::{ - test_utils::{tempdir_path, TempDatabase}, - DatabaseEnv, -}; -use reth_e2e_test_utils::{ - node::NodeTestContext, transaction::TransactionTestContext, wallet::Wallet, -}; -use reth_node_core::args::RpcServerArgs; -use reth_optimism_chainspec::{OpChainSpec, BASE_MAINNET}; -use reth_optimism_evm::{OpExecutorProvider, OptimismEvmConfig}; -use reth_optimism_node::{engine::OptimismEngineValidator, OptimismPayloadBuilderAttributes}; -use reth_primitives::{PooledTransactionsElement, Withdrawals}; -use reth_provider::providers::BlockchainProvider; -use revm_primitives::{Address, Bytes, FixedBytes, TxKind, B256, U256}; -use semaphore::{ - hash_to_field, - identity::Identity, - poseidon_tree::LazyPoseidonTree, - protocol::{generate_nullifier_hash, generate_proof}, - Field, -}; -use serial_test::serial; -use std::{ - collections::{BTreeMap, HashMap}, - sync::Arc, - time::Duration, -}; - -pub const DEV_CHAIN_ID: u64 = 8453; - -type Adapter = NodeAdapter< - FullNodeTypesAdapter< - NodeTypesWithDBAdapter>>, - BlockchainProvider< - NodeTypesWithDBAdapter>>, - >, - >, - Components< - FullNodeTypesAdapter< - NodeTypesWithDBAdapter>>, - BlockchainProvider< - NodeTypesWithDBAdapter>>, - >, - >, - Pool< - TransactionValidationTaskExecutor< - WorldChainTransactionValidator< - BlockchainProvider< - NodeTypesWithDBAdapter>>, - >, - WorldChainPooledTransaction, - >, - >, - WorldChainOrdering, - DiskFileBlobStore, - >, - OptimismEvmConfig, - OpExecutorProvider, - Arc, - OptimismEngineValidator, - >, ->; - -pub struct WorldChainBuilderTestContext { - pub pbh_wallets: Vec, - pub tree: LazyPoseidonTree, - pub node: NodeTestContext, - pub tasks: TaskManager, - pub identities: HashMap, -} - -impl WorldChainBuilderTestContext { - pub async fn setup() -> eyre::Result { - let wallets = Wallet::new(20).with_chain_id(DEV_CHAIN_ID).gen(); - let mut tree = LazyPoseidonTree::new(30, Field::from(0)).derived(); - let mut identities = HashMap::new(); - for (i, signer) in wallets.iter().enumerate() { - let address = signer.address(); - identities.insert(address, i); - let identity = Identity::from_secret(signer.address().as_mut_slice(), None); - tree = tree.update(i, &identity.commitment()); - } - - let op_chain_spec = Arc::new(OpChainSpec { - inner: get_chain_spec(tree.root()), - }); - - let tasks = TaskManager::current(); - let exec = tasks.executor(); - - let node_config: NodeConfig = NodeConfig::new(op_chain_spec.clone()) - .with_chain(op_chain_spec.clone()) - .with_unused_ports() - .with_rpc( - RpcServerArgs::default() - .with_unused_ports() - .with_http_unused_port(), - ); - let path = tempdir_path(); - let NodeHandle { - node, - node_exit_future: _, - } = NodeBuilder::new(node_config.clone()) - .testing_node(exec.clone()) - .node(WorldChainBuilder::new( - ExtArgs { - builder_args: WorldChainBuilderArgs { - num_pbh_txs: 30, - verified_blockspace_capacity: 70, - ..Default::default() - }, - ..Default::default() - }, - &path, - )?) - .launch() - .await?; - - Ok(Self { - pbh_wallets: wallets, - tree, - node: NodeTestContext::new(node).await?, - tasks, - identities, - }) - } - - pub async fn raw_pbh_tx_bytes( - &self, - signer: PrivateKeySigner, - pbh_nonce: u16, - tx_nonce: u64, - ) -> Bytes { - let tx = tx(DEV_CHAIN_ID, None, tx_nonce); - let envelope = TransactionTestContext::sign_tx(signer.clone(), tx).await; - let raw_tx = envelope.encoded_2718(); - let mut data = raw_tx.as_ref(); - let recovered = PooledTransactionsElement::decode_enveloped(&mut data).unwrap(); - let pbh_payload = self.valid_proof( - signer.address(), - recovered.hash().as_slice(), - chrono::Utc::now(), - pbh_nonce, - ); - - let world_chain_pooled_tx_element = WorldChainPooledTransactionsElement { - inner: recovered, - pbh_payload: Some(pbh_payload.clone()), - }; - - let mut buff = Vec::::new(); - world_chain_pooled_tx_element.encode_enveloped(&mut buff); - buff.into() - } - - fn valid_proof( - &self, - identity: Address, - tx_hash: &[u8], - time: chrono::DateTime, - pbh_nonce: u16, - ) -> PbhPayload { - let external_nullifier = - ExternalNullifier::new(Prefix::V1, DateMarker::from(time), pbh_nonce).to_string(); - - self.create_proof(identity, external_nullifier, tx_hash) - } - - fn create_proof( - &self, - mut identity: Address, - external_nullifier: String, - signal: &[u8], - ) -> PbhPayload { - let idx = self.identities.get(&identity).unwrap(); - let secret = identity.as_mut_slice(); - // generate identity - let id = Identity::from_secret(secret, None); - let merkle_proof = self.tree.proof(*idx); - - let signal_hash = hash_to_field(signal); - let external_nullifier_hash = hash_to_field(external_nullifier.as_bytes()); - let nullifier_hash = generate_nullifier_hash(&id, external_nullifier_hash); - - let proof = Proof( - generate_proof(&id, &merkle_proof, external_nullifier_hash, signal_hash).unwrap(), - ); - - PbhPayload { - root: self.tree.root(), - nullifier_hash, - external_nullifier, - proof, - } - } -} - -#[tokio::test] -#[serial] -async fn test_can_build_pbh_payload() -> eyre::Result<()> { - tokio::time::sleep(Duration::from_secs(1)).await; - let mut ctx = WorldChainBuilderTestContext::setup().await?; - let mut pbh_tx_hashes = vec![]; - for signer in ctx.pbh_wallets.iter() { - let raw_tx = ctx.raw_pbh_tx_bytes(signer.clone(), 0, 0).await; - let pbh_hash = ctx.node.rpc.inject_tx(raw_tx.clone()).await?; - pbh_tx_hashes.push(pbh_hash); - } - - let (payload, _) = ctx - .node - .advance_block(vec![], optimism_payload_attributes) - .await?; - - assert_eq!(payload.block().body.transactions.len(), pbh_tx_hashes.len()); - let block_hash = payload.block().hash(); - let block_number = payload.block().number; - - let tip = pbh_tx_hashes[0]; - ctx.node - .assert_new_block(tip, block_hash, block_number) - .await?; - - Ok(()) -} - -#[tokio::test] -#[serial] -async fn test_transaction_pool_ordering() -> eyre::Result<()> { - tokio::time::sleep(Duration::from_secs(1)).await; - let mut ctx = WorldChainBuilderTestContext::setup().await?; - let non_pbh_tx = tx(ctx.node.inner.chain_spec().chain.id(), None, 0); - let wallet = ctx.pbh_wallets[0].clone(); - let signer = EthereumWallet::from(wallet); - let signed = >::build(non_pbh_tx, &signer) - .await - .unwrap(); - let non_pbh_hash = ctx.node.rpc.inject_tx(signed.encoded_2718().into()).await?; - let mut pbh_tx_hashes = vec![]; - for signer in ctx.pbh_wallets.iter().skip(1) { - let raw_tx = ctx.raw_pbh_tx_bytes(signer.clone(), 0, 0).await; - let pbh_hash = ctx.node.rpc.inject_tx(raw_tx.clone()).await?; - pbh_tx_hashes.push(pbh_hash); - } - - let (payload, _) = ctx - .node - .advance_block(vec![], optimism_payload_attributes) - .await?; - - assert_eq!( - payload.block().body.transactions.len(), - pbh_tx_hashes.len() + 1 - ); - // Assert the non-pbh transaction is included in the block last - assert_eq!( - payload.block().body.transactions.last().unwrap().hash(), - non_pbh_hash - ); - let block_hash = payload.block().hash(); - let block_number = payload.block().number; - - let tip = pbh_tx_hashes[0]; - ctx.node - .assert_new_block(tip, block_hash, block_number) - .await?; - - Ok(()) -} - -#[tokio::test] -#[serial] -async fn test_invalidate_dup_tx_and_nullifier() -> eyre::Result<()> { - tokio::time::sleep(Duration::from_secs(1)).await; - let ctx = WorldChainBuilderTestContext::setup().await?; - let signer = ctx.pbh_wallets[0].clone(); - let raw_tx = ctx.raw_pbh_tx_bytes(signer.clone(), 0, 0).await; - ctx.node.rpc.inject_tx(raw_tx.clone()).await?; - let dup_pbh_hash_res = ctx.node.rpc.inject_tx(raw_tx.clone()).await; - assert!(dup_pbh_hash_res.is_err()); - Ok(()) -} - -#[tokio::test] -#[serial] -async fn test_dup_pbh_nonce() -> eyre::Result<()> { - tokio::time::sleep(Duration::from_secs(1)).await; - let mut ctx = WorldChainBuilderTestContext::setup().await?; - let signer = ctx.pbh_wallets[0].clone(); - - let raw_tx_0 = ctx.raw_pbh_tx_bytes(signer.clone(), 0, 0).await; - ctx.node.rpc.inject_tx(raw_tx_0.clone()).await?; - let raw_tx_1 = ctx.raw_pbh_tx_bytes(signer.clone(), 0, 1).await; - - // Now that the nullifier has successfully been stored in - // the `ExecutedPbhNullifierTable`, inserting a new tx with the - // same pbh_nonce should fail to validate. - assert!(ctx.node.rpc.inject_tx(raw_tx_1.clone()).await.is_err()); - - let (payload, _) = ctx - .node - .advance_block(vec![], optimism_payload_attributes) - .await?; - - // One transaction should be successfully validated - // and included in the block. - assert_eq!(payload.block().body.transactions.len(), 1); - - Ok(()) -} - -/// Helper function to create a new eth payload attributes -pub fn optimism_payload_attributes(timestamp: u64) -> OptimismPayloadBuilderAttributes { - let attributes = EthPayloadBuilderAttributes { - timestamp, - prev_randao: B256::ZERO, - suggested_fee_recipient: Address::ZERO, - withdrawals: Withdrawals::default(), - parent_beacon_block_root: Some(B256::ZERO), - id: PayloadId(FixedBytes::<8>::random()), - parent: FixedBytes::default(), - }; - - OptimismPayloadBuilderAttributes { - payload_attributes: attributes, - transactions: vec![], - gas_limit: None, - no_tx_pool: false, - } -} - -fn tx(chain_id: u64, data: Option, nonce: u64) -> TransactionRequest { - TransactionRequest { - nonce: Some(nonce), - value: Some(U256::from(100)), - to: Some(TxKind::Call(Address::random())), - gas: Some(210000), - max_fee_per_gas: Some(20e10 as u128), - max_priority_fee_per_gas: Some(20e10 as u128), - chain_id: Some(chain_id), - input: TransactionInput { input: None, data }, - ..Default::default() - } -} - -/// Builds an OP Mainnet chain spec with the given merkle root -/// Populated in the OpWorldID contract. -fn get_chain_spec(merkle_root: Field) -> ChainSpec { - let genesis: Genesis = serde_json::from_str(include_str!("assets/genesis.json")).unwrap(); - ChainSpec::builder() - .chain(BASE_MAINNET.chain) - .genesis(genesis.extend_accounts(vec![( - OP_WORLD_ID, - GenesisAccount::default().with_storage(Some(BTreeMap::from_iter(vec![( - LATEST_ROOT_SLOT.into(), - merkle_root.into(), - )]))), - )])) - .ecotone_activated() - .build() -} +// //! Utilities for running world chain builder end-to-end tests. +// use crate::{ +// node::{ +// args::{ExtArgs, WorldChainBuilderArgs}, +// builder::WorldChainBuilder, +// }, +// pbh::date_marker::DateMarker, +// pbh::external_nullifier::{ExternalNullifier, Prefix}, +// pbh::payload::{PbhPayload, Proof}, +// pool::{ +// ordering::WorldChainOrdering, +// root::{LATEST_ROOT_SLOT, OP_WORLD_ID}, +// tx::WorldChainPooledTransaction, +// validator::WorldChainTransactionValidator, +// }, +// primitives::WorldChainPooledTransactionsElement, +// }; +// use alloy_eips::eip2718::Decodable2718; +// use alloy_genesis::{Genesis, GenesisAccount}; +// use alloy_network::eip2718::Encodable2718; +// use alloy_network::{Ethereum, EthereumWallet, TransactionBuilder}; +// use alloy_rpc_types::{TransactionInput, TransactionRequest}; +// use alloy_signer_local::PrivateKeySigner; +// use chrono::Utc; +// use reth::api::{FullNodeComponents, FullNodeTypesAdapter, NodeTypesWithDBAdapter}; +// use reth::builder::{components::Components, NodeAdapter, NodeBuilder, NodeConfig, NodeHandle}; +// use reth::chainspec::ChainSpec; +// use reth::payload::{EthPayloadBuilderAttributes, PayloadId}; +// use reth::tasks::TaskManager; +// use reth::transaction_pool::{ +// blobstore::DiskFileBlobStore, Pool, TransactionValidationTaskExecutor, +// }; +// use reth_consensus::Consensus; +// use reth_db::{ +// test_utils::{tempdir_path, TempDatabase}, +// DatabaseEnv, +// }; +// use reth_e2e_test_utils::{ +// node::NodeTestContext, transaction::TransactionTestContext, wallet::Wallet, +// }; +// use reth_node_core::args::RpcServerArgs; +// use reth_optimism_chainspec::{OpChainSpec, BASE_MAINNET}; +// use reth_optimism_evm::{OpExecutorProvider, OptimismEvmConfig}; +// use reth_optimism_node::{ +// engine::OptimismEngineValidator, node::OptimismAddOns, OptimismPayloadBuilderAttributes, +// }; +// use reth_primitives::{PooledTransactionsElement, Withdrawals}; +// use reth_provider::providers::BlockchainProvider; +// use revm_primitives::{Address, Bytes, FixedBytes, TxKind, B256, U256}; +// use semaphore::{ +// hash_to_field, +// identity::Identity, +// poseidon_tree::LazyPoseidonTree, +// protocol::{generate_nullifier_hash, generate_proof}, +// Field, +// }; +// use serial_test::serial; +// use std::{ +// collections::{BTreeMap, HashMap}, +// sync::Arc, +// time::Duration, +// }; + +// pub const DEV_CHAIN_ID: u64 = 8453; + +// type Adapter = NodeAdapter< +// FullNodeTypesAdapter< +// NodeTypesWithDBAdapter>>, +// BlockchainProvider< +// NodeTypesWithDBAdapter>>, +// >, +// >, +// Components< +// FullNodeTypesAdapter< +// NodeTypesWithDBAdapter>>, +// BlockchainProvider< +// NodeTypesWithDBAdapter>>, +// >, +// >, +// Pool< +// TransactionValidationTaskExecutor< +// WorldChainTransactionValidator< +// BlockchainProvider< +// NodeTypesWithDBAdapter>>, +// >, +// WorldChainPooledTransaction, +// >, +// >, +// WorldChainOrdering, +// DiskFileBlobStore, +// >, +// OptimismEvmConfig, +// OpExecutorProvider, +// Arc, +// >, +// >; + +// pub struct WorldChainBuilderTestContext { +// pub pbh_wallets: Vec, +// pub tree: LazyPoseidonTree, +// pub node: NodeTestContext< +// Adapter, +// , +// >, +// pub tasks: TaskManager, +// pub identities: HashMap, +// } + +// impl WorldChainBuilderTestContext +// where +// N: FullNodeComponents, +// { +// pub async fn setup() -> eyre::Result { +// let wallets = Wallet::new(20).with_chain_id(DEV_CHAIN_ID).gen(); +// let mut tree = LazyPoseidonTree::new(30, Field::from(0)).derived(); +// let mut identities = HashMap::new(); +// for (i, signer) in wallets.iter().enumerate() { +// let address = signer.address(); +// identities.insert(address, i); +// let identity = Identity::from_secret(signer.address().as_mut_slice(), None); +// tree = tree.update(i, &identity.commitment()); +// } + +// let op_chain_spec = Arc::new(OpChainSpec { +// inner: get_chain_spec(tree.root()), +// }); + +// let tasks = TaskManager::current(); +// let exec = tasks.executor(); + +// let node_config: NodeConfig = NodeConfig::new(op_chain_spec.clone()) +// .with_chain(op_chain_spec.clone()) +// .with_unused_ports() +// .with_rpc( +// RpcServerArgs::default() +// .with_unused_ports() +// .with_http_unused_port(), +// ); +// let path = tempdir_path(); +// let NodeHandle { +// node, +// node_exit_future: _, +// } = NodeBuilder::new(node_config.clone()) +// .testing_node(exec.clone()) +// .node(WorldChainBuilder::new( +// ExtArgs { +// builder_args: WorldChainBuilderArgs { +// num_pbh_txs: 30, +// verified_blockspace_capacity: 70, +// ..Default::default() +// }, +// ..Default::default() +// }, +// &path, +// )?) +// .launch() +// .await?; + +// Ok(Self { +// pbh_wallets: wallets, +// tree, +// node: NodeTestContext::new(node, optimism_payload_attributes).await?, +// tasks, +// identities, +// }) +// } + +// pub async fn raw_pbh_tx_bytes( +// &self, +// signer: PrivateKeySigner, +// pbh_nonce: u16, +// tx_nonce: u64, +// ) -> Bytes { +// let tx = tx(DEV_CHAIN_ID, None, tx_nonce); +// let envelope = TransactionTestContext::sign_tx(signer.clone(), tx).await; +// let raw_tx = envelope.encoded_2718(); +// let mut data = raw_tx.as_ref(); +// let recovered = PooledTransactionsElement::decode_2718(&mut data).unwrap(); +// let pbh_payload = self.valid_proof( +// signer.address(), +// recovered.hash().as_slice(), +// chrono::Utc::now(), +// pbh_nonce, +// ); + +// let world_chain_pooled_tx_element = WorldChainPooledTransactionsElement { +// inner: recovered, +// pbh_payload: Some(pbh_payload.clone()), +// }; + +// let mut buff = Vec::::new(); +// world_chain_pooled_tx_element.encode_enveloped(&mut buff); +// buff.into() +// } + +// fn valid_proof( +// &self, +// identity: Address, +// tx_hash: &[u8], +// time: chrono::DateTime, +// pbh_nonce: u16, +// ) -> PbhPayload { +// let external_nullifier = +// ExternalNullifier::new(Prefix::V1, DateMarker::from(time), pbh_nonce).to_string(); + +// self.create_proof(identity, external_nullifier, tx_hash) +// } + +// fn create_proof( +// &self, +// mut identity: Address, +// external_nullifier: String, +// signal: &[u8], +// ) -> PbhPayload { +// let idx = self.identities.get(&identity).unwrap(); +// let secret = identity.as_mut_slice(); +// // generate identity +// let id = Identity::from_secret(secret, None); +// let merkle_proof = self.tree.proof(*idx); + +// let signal_hash = hash_to_field(signal); +// let external_nullifier_hash = hash_to_field(external_nullifier.as_bytes()); +// let nullifier_hash = generate_nullifier_hash(&id, external_nullifier_hash); + +// let proof = Proof( +// generate_proof(&id, &merkle_proof, external_nullifier_hash, signal_hash).unwrap(), +// ); + +// PbhPayload { +// root: self.tree.root(), +// nullifier_hash, +// external_nullifier, +// proof, +// } +// } +// } + +// #[tokio::test] +// #[serial] +// async fn test_can_build_pbh_payload() -> eyre::Result<()> { +// tokio::time::sleep(Duration::from_secs(1)).await; +// let mut ctx = WorldChainBuilderTestContext::setup().await?; +// let mut pbh_tx_hashes = vec![]; +// for signer in ctx.pbh_wallets.iter() { +// let raw_tx = ctx.raw_pbh_tx_bytes(signer.clone(), 0, 0).await; +// let pbh_hash = ctx.node.rpc.inject_tx(raw_tx.clone()).await?; +// pbh_tx_hashes.push(pbh_hash); +// } + +// let (payload, _) = ctx +// .node +// .advance_block(vec![], optimism_payload_attributes) +// .await?; + +// assert_eq!(payload.block().body.transactions.len(), pbh_tx_hashes.len()); +// let block_hash = payload.block().hash(); +// let block_number = payload.block().number; + +// let tip = pbh_tx_hashes[0]; +// ctx.node +// .assert_new_block(tip, block_hash, block_number) +// .await?; + +// Ok(()) +// } + +// #[tokio::test] +// #[serial] +// async fn test_transaction_pool_ordering() -> eyre::Result<()> { +// tokio::time::sleep(Duration::from_secs(1)).await; +// let mut ctx = WorldChainBuilderTestContext::setup().await?; +// let non_pbh_tx = tx(ctx.node.inner.chain_spec().chain.id(), None, 0); +// let wallet = ctx.pbh_wallets[0].clone(); +// let signer = EthereumWallet::from(wallet); +// let signed = >::build(non_pbh_tx, &signer) +// .await +// .unwrap(); +// let non_pbh_hash = ctx.node.rpc.inject_tx(signed.encoded_2718().into()).await?; +// let mut pbh_tx_hashes = vec![]; +// for signer in ctx.pbh_wallets.iter().skip(1) { +// let raw_tx = ctx.raw_pbh_tx_bytes(signer.clone(), 0, 0).await; +// let pbh_hash = ctx.node.rpc.inject_tx(raw_tx.clone()).await?; +// pbh_tx_hashes.push(pbh_hash); +// } + +// let (payload, _) = ctx +// .node +// .advance_block(vec![], optimism_payload_attributes) +// .await?; + +// assert_eq!( +// payload.block().body.transactions.len(), +// pbh_tx_hashes.len() + 1 +// ); +// // Assert the non-pbh transaction is included in the block last +// assert_eq!( +// payload.block().body.transactions.last().unwrap().hash(), +// non_pbh_hash +// ); +// let block_hash = payload.block().hash(); +// let block_number = payload.block().number; + +// let tip = pbh_tx_hashes[0]; +// ctx.node +// .assert_new_block(tip, block_hash, block_number) +// .await?; + +// Ok(()) +// } + +// #[tokio::test] +// #[serial] +// async fn test_invalidate_dup_tx_and_nullifier() -> eyre::Result<()> { +// tokio::time::sleep(Duration::from_secs(1)).await; +// let ctx = WorldChainBuilderTestContext::setup().await?; +// let signer = ctx.pbh_wallets[0].clone(); +// let raw_tx = ctx.raw_pbh_tx_bytes(signer.clone(), 0, 0).await; +// ctx.node.rpc.inject_tx(raw_tx.clone()).await?; +// let dup_pbh_hash_res = ctx.node.rpc.inject_tx(raw_tx.clone()).await; +// assert!(dup_pbh_hash_res.is_err()); +// Ok(()) +// } + +// #[tokio::test] +// #[serial] +// async fn test_dup_pbh_nonce() -> eyre::Result<()> { +// tokio::time::sleep(Duration::from_secs(1)).await; +// let mut ctx = WorldChainBuilderTestContext::setup().await?; +// let signer = ctx.pbh_wallets[0].clone(); + +// let raw_tx_0 = ctx.raw_pbh_tx_bytes(signer.clone(), 0, 0).await; +// ctx.node.rpc.inject_tx(raw_tx_0.clone()).await?; +// let raw_tx_1 = ctx.raw_pbh_tx_bytes(signer.clone(), 0, 1).await; + +// // Now that the nullifier has successfully been stored in +// // the `ExecutedPbhNullifierTable`, inserting a new tx with the +// // same pbh_nonce should fail to validate. +// assert!(ctx.node.rpc.inject_tx(raw_tx_1.clone()).await.is_err()); + +// let (payload, _) = ctx +// .node +// .advance_block(vec![], optimism_payload_attributes) +// .await?; + +// // One transaction should be successfully validated +// // and included in the block. +// assert_eq!(payload.block().body.transactions.len(), 1); + +// Ok(()) +// } + +// /// Helper function to create a new eth payload attributes +// pub fn optimism_payload_attributes(timestamp: u64) -> OptimismPayloadBuilderAttributes { +// let attributes = EthPayloadBuilderAttributes { +// timestamp, +// prev_randao: B256::ZERO, +// suggested_fee_recipient: Address::ZERO, +// withdrawals: Withdrawals::default(), +// parent_beacon_block_root: Some(B256::ZERO), +// id: PayloadId(FixedBytes::<8>::random()), +// parent: FixedBytes::default(), +// }; + +// OptimismPayloadBuilderAttributes { +// payload_attributes: attributes, +// transactions: vec![], +// gas_limit: None, +// no_tx_pool: false, +// } +// } + +// fn tx(chain_id: u64, data: Option, nonce: u64) -> TransactionRequest { +// TransactionRequest { +// nonce: Some(nonce), +// value: Some(U256::from(100)), +// to: Some(TxKind::Call(Address::random())), +// gas: Some(210000), +// max_fee_per_gas: Some(20e10 as u128), +// max_priority_fee_per_gas: Some(20e10 as u128), +// chain_id: Some(chain_id), +// input: TransactionInput { input: None, data }, +// ..Default::default() +// } +// } + +// /// Builds an OP Mainnet chain spec with the given merkle root +// /// Populated in the OpWorldID contract. +// fn get_chain_spec(merkle_root: Field) -> ChainSpec { +// let genesis: Genesis = serde_json::from_str(include_str!("assets/genesis.json")).unwrap(); +// ChainSpec::builder() +// .chain(BASE_MAINNET.chain) +// .genesis(genesis.extend_accounts(vec![( +// OP_WORLD_ID, +// GenesisAccount::default().with_storage(Some(BTreeMap::from_iter(vec![( +// LATEST_ROOT_SLOT.into(), +// merkle_root.into(), +// )]))), +// )])) +// .ecotone_activated() +// .build() +// } diff --git a/world-chain-builder/src/test/mod.rs b/world-chain-builder/src/test/mod.rs index f1e61ec..309ca20 100644 --- a/world-chain-builder/src/test/mod.rs +++ b/world-chain-builder/src/test/mod.rs @@ -1,6 +1,7 @@ #[cfg(test)] pub mod e2e; +use alloy_eips::eip2718::Decodable2718; use chrono::Utc; use reth::chainspec::MAINNET; use reth::transaction_pool::blobstore::InMemoryBlobStore; @@ -28,7 +29,7 @@ pub fn get_eth_transaction() -> EthPooledTransaction { let raw = "0x02f914950181ad84b2d05e0085117553845b830f7df88080b9143a6040608081523462000414576200133a803803806200001e8162000419565b9283398101608082820312620004145781516001600160401b03908181116200041457826200004f9185016200043f565b92602092838201519083821162000414576200006d9183016200043f565b8186015190946001600160a01b03821692909183900362000414576060015190805193808511620003145760038054956001938488811c9816801562000409575b89891014620003f3578190601f988981116200039d575b50899089831160011462000336576000926200032a575b505060001982841b1c191690841b1781555b8751918211620003145760049788548481811c9116801562000309575b89821014620002f457878111620002a9575b5087908784116001146200023e5793839491849260009562000232575b50501b92600019911b1c19161785555b6005556007805460ff60a01b19169055600880546001600160a01b0319169190911790553015620001f3575060025469d3c21bcecceda100000092838201809211620001de57506000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9160025530835282815284832084815401905584519384523093a351610e889081620004b28239f35b601190634e487b7160e01b6000525260246000fd5b90606493519262461bcd60e51b845283015260248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152fd5b0151935038806200013a565b9190601f198416928a600052848a6000209460005b8c8983831062000291575050501062000276575b50505050811b0185556200014a565b01519060f884600019921b161c191690553880808062000267565b86860151895590970196948501948893500162000253565b89600052886000208880860160051c8201928b8710620002ea575b0160051c019085905b828110620002dd5750506200011d565b60008155018590620002cd565b92508192620002c4565b60228a634e487b7160e01b6000525260246000fd5b90607f16906200010b565b634e487b7160e01b600052604160045260246000fd5b015190503880620000dc565b90869350601f19831691856000528b6000209260005b8d8282106200038657505084116200036d575b505050811b018155620000ee565b015160001983861b60f8161c191690553880806200035f565b8385015186558a979095019493840193016200034c565b90915083600052896000208980850160051c8201928c8610620003e9575b918891869594930160051c01915b828110620003d9575050620000c5565b60008155859450889101620003c9565b92508192620003bb565b634e487b7160e01b600052602260045260246000fd5b97607f1697620000ae565b600080fd5b6040519190601f01601f191682016001600160401b038111838210176200031457604052565b919080601f84011215620004145782516001600160401b038111620003145760209062000475601f8201601f1916830162000419565b92818452828287010111620004145760005b8181106200049d57508260009394955001015290565b85810183015184820184015282016200048756fe608060408181526004918236101561001657600080fd5b600092833560e01c91826306fdde0314610a1c57508163095ea7b3146109f257816318160ddd146109d35781631b4c84d2146109ac57816323b872dd14610833578163313ce5671461081757816339509351146107c357816370a082311461078c578163715018a6146107685781638124f7ac146107495781638da5cb5b1461072057816395d89b411461061d578163a457c2d714610575578163a9059cbb146104e4578163c9567bf914610120575063dd62ed3e146100d557600080fd5b3461011c578060031936011261011c57806020926100f1610b5a565b6100f9610b75565b6001600160a01b0391821683526001865283832091168252845220549051908152f35b5080fd5b905082600319360112610338576008546001600160a01b039190821633036104975760079283549160ff8360a01c1661045557737a250d5630b4cf539739df2c5dacb4c659f2488d92836bffffffffffffffffffffffff60a01b8092161786553087526020938785528388205430156104065730895260018652848920828a52865280858a205584519081527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925863092a38554835163c45a015560e01b815290861685828581845afa9182156103dd57849187918b946103e7575b5086516315ab88c960e31b815292839182905afa9081156103dd576044879289928c916103c0575b508b83895196879586946364e329cb60e11b8652308c870152166024850152165af19081156103b6579086918991610389575b50169060065416176006558385541660604730895288865260c4858a20548860085416928751958694859363f305d71960e01b8552308a86015260248501528d60448501528d606485015260848401524260a48401525af1801561037f579084929161034c575b50604485600654169587541691888551978894859363095ea7b360e01b855284015260001960248401525af1908115610343575061030c575b5050805460ff60a01b1916600160a01b17905580f35b81813d831161033c575b6103208183610b8b565b8101031261033857518015150361011c5738806102f6565b8280fd5b503d610316565b513d86823e3d90fd5b6060809293503d8111610378575b6103648183610b8b565b81010312610374578290386102bd565b8580fd5b503d61035a565b83513d89823e3d90fd5b6103a99150863d88116103af575b6103a18183610b8b565b810190610e33565b38610256565b503d610397565b84513d8a823e3d90fd5b6103d79150843d86116103af576103a18183610b8b565b38610223565b85513d8b823e3d90fd5b6103ff919450823d84116103af576103a18183610b8b565b92386101fb565b845162461bcd60e51b81528085018790526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608490fd5b6020606492519162461bcd60e51b8352820152601760248201527f74726164696e6720697320616c7265616479206f70656e0000000000000000006044820152fd5b608490602084519162461bcd60e51b8352820152602160248201527f4f6e6c79206f776e65722063616e2063616c6c20746869732066756e6374696f6044820152603760f91b6064820152fd5b9050346103385781600319360112610338576104fe610b5a565b9060243593303303610520575b602084610519878633610bc3565b5160018152f35b600594919454808302908382041483151715610562576127109004820391821161054f5750925080602061050b565b634e487b7160e01b815260118552602490fd5b634e487b7160e01b825260118652602482fd5b9050823461061a578260031936011261061a57610590610b5a565b918360243592338152600160205281812060018060a01b03861682526020522054908282106105c9576020856105198585038733610d31565b608490602086519162461bcd60e51b8352820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152fd5b80fd5b83833461011c578160031936011261011c57805191809380549160019083821c92828516948515610716575b6020958686108114610703578589529081156106df5750600114610687575b6106838787610679828c0383610b8b565b5191829182610b11565b0390f35b81529295507f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b8284106106cc57505050826106839461067992820101948680610668565b80548685018801529286019281016106ae565b60ff19168887015250505050151560051b8301019250610679826106838680610668565b634e487b7160e01b845260228352602484fd5b93607f1693610649565b50503461011c578160031936011261011c5760085490516001600160a01b039091168152602090f35b50503461011c578160031936011261011c576020906005549051908152f35b833461061a578060031936011261061a57600880546001600160a01b031916905580f35b50503461011c57602036600319011261011c5760209181906001600160a01b036107b4610b5a565b16815280845220549051908152f35b82843461061a578160031936011261061a576107dd610b5a565b338252600160209081528383206001600160a01b038316845290528282205460243581019290831061054f57602084610519858533610d31565b50503461011c578160031936011261011c576020905160128152f35b83833461011c57606036600319011261011c5761084e610b5a565b610856610b75565b6044359160018060a01b0381169485815260209560018752858220338352875285822054976000198903610893575b505050906105199291610bc3565b85891061096957811561091a5733156108cc5750948481979861051997845260018a528284203385528a52039120558594938780610885565b865162461bcd60e51b8152908101889052602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608490fd5b865162461bcd60e51b81529081018890526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608490fd5b865162461bcd60e51b8152908101889052601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606490fd5b50503461011c578160031936011261011c5760209060ff60075460a01c1690519015158152f35b50503461011c578160031936011261011c576020906002549051908152f35b50503461011c578060031936011261011c57602090610519610a12610b5a565b6024359033610d31565b92915034610b0d5783600319360112610b0d57600354600181811c9186908281168015610b03575b6020958686108214610af05750848852908115610ace5750600114610a75575b6106838686610679828b0383610b8b565b929550600383527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b828410610abb575050508261068394610679928201019438610a64565b8054868501880152928601928101610a9e565b60ff191687860152505050151560051b83010192506106798261068338610a64565b634e487b7160e01b845260229052602483fd5b93607f1693610a44565b8380fd5b6020808252825181830181905290939260005b828110610b4657505060409293506000838284010152601f8019910116010190565b818101860151848201604001528501610b24565b600435906001600160a01b0382168203610b7057565b600080fd5b602435906001600160a01b0382168203610b7057565b90601f8019910116810190811067ffffffffffffffff821117610bad57604052565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03908116918215610cde5716918215610c8d57600082815280602052604081205491808310610c3957604082827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef958760209652828652038282205586815220818154019055604051908152a3565b60405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608490fd5b60405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608490fd5b60405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608490fd5b6001600160a01b03908116918215610de25716918215610d925760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925918360005260018252604060002085600052825280604060002055604051908152a3565b60405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608490fd5b60405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608490fd5b90816020910312610b7057516001600160a01b0381168103610b70579056fea2646970667358221220285c200b3978b10818ff576bb83f2dc4a2a7c98dfb6a36ea01170de792aa652764736f6c63430008140033000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000d3fd4f95820a9aa848ce716d6c200eaefb9a2e4900000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000003543131000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000035431310000000000000000000000000000000000000000000000000000000000c001a04e551c75810ffdfe6caff57da9f5a8732449f42f0f4c57f935b05250a76db3b6a046cd47e6d01914270c1ec0d9ac7fae7dfb240ec9a8b6ec7898c4d6aa174388f2"; let data = hex::decode(raw).unwrap(); - let tx = PooledTransactionsElement::decode_enveloped(&mut data.as_ref()).unwrap(); + let tx = PooledTransactionsElement::decode_2718(&mut data.as_ref()).unwrap(); tx.try_into_ecrecovered().unwrap().into() } From 91582f2e61ac43cbd42c9c9aa3686d5d2b135f6d Mon Sep 17 00:00:00 2001 From: 0xOsiris Date: Mon, 28 Oct 2024 17:44:03 -0700 Subject: [PATCH 04/13] fix: WorldChainAddOns --- world-chain-builder/src/node/builder.rs | 3 +++ world-chain-builder/src/rpc/mod.rs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/world-chain-builder/src/node/builder.rs b/world-chain-builder/src/node/builder.rs index 74430ef..cc59b81 100644 --- a/world-chain-builder/src/node/builder.rs +++ b/world-chain-builder/src/node/builder.rs @@ -8,6 +8,7 @@ use reth::builder::{ components::ComponentsBuilder, FullNodeTypes, Node, NodeTypes, NodeTypesWithEngine, }; use reth::builder::{NodeAdapter, NodeComponentsBuilder}; +use reth::rpc::eth::FullEthApiServer; use reth_db::DatabaseEnv; use reth_optimism_chainspec::OpChainSpec; use reth_optimism_node::engine::OptimismEngineValidator; @@ -155,6 +156,7 @@ impl NodeAddOns for WorldChainAddOns where N: FullNodeComponents>, OptimismEngineValidator: EngineValidator<::Engine>, + WorldChainEthApi: FullEthApiServer, { type Handle = RpcHandle>; @@ -167,6 +169,7 @@ impl RethRpcAddOns for WorldChainAddOns where N: FullNodeComponents>, OptimismEngineValidator: EngineValidator<::Engine>, + WorldChainEthApi: FullEthApiServer, { type EthApi = WorldChainEthApi; diff --git a/world-chain-builder/src/rpc/mod.rs b/world-chain-builder/src/rpc/mod.rs index 3219256..0a1031b 100644 --- a/world-chain-builder/src/rpc/mod.rs +++ b/world-chain-builder/src/rpc/mod.rs @@ -82,7 +82,7 @@ where { type Error = OpEthApiError; type NetworkTypes = Optimism; - type TransactionCompat = OpEthApi; + type TransactionCompat = Self; fn tx_resp_builder(&self) -> &Self::TransactionCompat { self From 7a0d8a5b3c028dcf0211498fb31f668027596e0b Mon Sep 17 00:00:00 2001 From: 0xOsiris Date: Tue, 29 Oct 2024 08:56:02 -0700 Subject: [PATCH 05/13] pushing checkpoint --- world-chain-builder/src/node/builder.rs | 5 +- world-chain-builder/src/test/e2e/mod.rs | 688 ++++++++++++++---------- 2 files changed, 405 insertions(+), 288 deletions(-) diff --git a/world-chain-builder/src/node/builder.rs b/world-chain-builder/src/node/builder.rs index cc59b81..4699b9c 100644 --- a/world-chain-builder/src/node/builder.rs +++ b/world-chain-builder/src/node/builder.rs @@ -109,16 +109,17 @@ where OptimismConsensusBuilder, >; - type AddOns = OptimismAddOns< + type AddOns = WorldChainAddOns< NodeAdapter>::Components>, >; + fn components_builder(&self) -> Self::ComponentsBuilder { let Self { args, db } = self; Self::components(args.clone(), db.clone()) } fn add_ons(&self) -> Self::AddOns { - OptimismAddOns::new(self.args.rollup_args.sequencer_http.clone()) + WorldChainAddOns::new(self.args.rollup_args.sequencer_http.clone()) } } diff --git a/world-chain-builder/src/test/e2e/mod.rs b/world-chain-builder/src/test/e2e/mod.rs index aaa299e..56883d4 100644 --- a/world-chain-builder/src/test/e2e/mod.rs +++ b/world-chain-builder/src/test/e2e/mod.rs @@ -1,239 +1,356 @@ -// //! Utilities for running world chain builder end-to-end tests. -// use crate::{ -// node::{ -// args::{ExtArgs, WorldChainBuilderArgs}, -// builder::WorldChainBuilder, -// }, -// pbh::date_marker::DateMarker, -// pbh::external_nullifier::{ExternalNullifier, Prefix}, -// pbh::payload::{PbhPayload, Proof}, -// pool::{ -// ordering::WorldChainOrdering, -// root::{LATEST_ROOT_SLOT, OP_WORLD_ID}, -// tx::WorldChainPooledTransaction, -// validator::WorldChainTransactionValidator, -// }, -// primitives::WorldChainPooledTransactionsElement, -// }; -// use alloy_eips::eip2718::Decodable2718; -// use alloy_genesis::{Genesis, GenesisAccount}; -// use alloy_network::eip2718::Encodable2718; -// use alloy_network::{Ethereum, EthereumWallet, TransactionBuilder}; -// use alloy_rpc_types::{TransactionInput, TransactionRequest}; -// use alloy_signer_local::PrivateKeySigner; -// use chrono::Utc; -// use reth::api::{FullNodeComponents, FullNodeTypesAdapter, NodeTypesWithDBAdapter}; -// use reth::builder::{components::Components, NodeAdapter, NodeBuilder, NodeConfig, NodeHandle}; -// use reth::chainspec::ChainSpec; -// use reth::payload::{EthPayloadBuilderAttributes, PayloadId}; -// use reth::tasks::TaskManager; -// use reth::transaction_pool::{ -// blobstore::DiskFileBlobStore, Pool, TransactionValidationTaskExecutor, -// }; -// use reth_consensus::Consensus; -// use reth_db::{ -// test_utils::{tempdir_path, TempDatabase}, -// DatabaseEnv, -// }; -// use reth_e2e_test_utils::{ -// node::NodeTestContext, transaction::TransactionTestContext, wallet::Wallet, -// }; -// use reth_node_core::args::RpcServerArgs; -// use reth_optimism_chainspec::{OpChainSpec, BASE_MAINNET}; -// use reth_optimism_evm::{OpExecutorProvider, OptimismEvmConfig}; -// use reth_optimism_node::{ -// engine::OptimismEngineValidator, node::OptimismAddOns, OptimismPayloadBuilderAttributes, -// }; -// use reth_primitives::{PooledTransactionsElement, Withdrawals}; -// use reth_provider::providers::BlockchainProvider; -// use revm_primitives::{Address, Bytes, FixedBytes, TxKind, B256, U256}; -// use semaphore::{ -// hash_to_field, -// identity::Identity, -// poseidon_tree::LazyPoseidonTree, -// protocol::{generate_nullifier_hash, generate_proof}, -// Field, -// }; -// use serial_test::serial; -// use std::{ -// collections::{BTreeMap, HashMap}, -// sync::Arc, -// time::Duration, -// }; - -// pub const DEV_CHAIN_ID: u64 = 8453; - -// type Adapter = NodeAdapter< -// FullNodeTypesAdapter< -// NodeTypesWithDBAdapter>>, -// BlockchainProvider< -// NodeTypesWithDBAdapter>>, -// >, -// >, -// Components< -// FullNodeTypesAdapter< -// NodeTypesWithDBAdapter>>, -// BlockchainProvider< -// NodeTypesWithDBAdapter>>, -// >, -// >, -// Pool< -// TransactionValidationTaskExecutor< -// WorldChainTransactionValidator< -// BlockchainProvider< -// NodeTypesWithDBAdapter>>, -// >, -// WorldChainPooledTransaction, -// >, -// >, -// WorldChainOrdering, -// DiskFileBlobStore, -// >, -// OptimismEvmConfig, -// OpExecutorProvider, -// Arc, -// >, -// >; - -// pub struct WorldChainBuilderTestContext { -// pub pbh_wallets: Vec, -// pub tree: LazyPoseidonTree, -// pub node: NodeTestContext< -// Adapter, -// , -// >, -// pub tasks: TaskManager, -// pub identities: HashMap, -// } - -// impl WorldChainBuilderTestContext -// where -// N: FullNodeComponents, -// { -// pub async fn setup() -> eyre::Result { -// let wallets = Wallet::new(20).with_chain_id(DEV_CHAIN_ID).gen(); -// let mut tree = LazyPoseidonTree::new(30, Field::from(0)).derived(); -// let mut identities = HashMap::new(); -// for (i, signer) in wallets.iter().enumerate() { -// let address = signer.address(); -// identities.insert(address, i); -// let identity = Identity::from_secret(signer.address().as_mut_slice(), None); -// tree = tree.update(i, &identity.commitment()); -// } - -// let op_chain_spec = Arc::new(OpChainSpec { -// inner: get_chain_spec(tree.root()), -// }); - -// let tasks = TaskManager::current(); -// let exec = tasks.executor(); - -// let node_config: NodeConfig = NodeConfig::new(op_chain_spec.clone()) -// .with_chain(op_chain_spec.clone()) -// .with_unused_ports() -// .with_rpc( -// RpcServerArgs::default() -// .with_unused_ports() -// .with_http_unused_port(), -// ); -// let path = tempdir_path(); -// let NodeHandle { -// node, -// node_exit_future: _, -// } = NodeBuilder::new(node_config.clone()) -// .testing_node(exec.clone()) -// .node(WorldChainBuilder::new( -// ExtArgs { -// builder_args: WorldChainBuilderArgs { -// num_pbh_txs: 30, -// verified_blockspace_capacity: 70, -// ..Default::default() -// }, -// ..Default::default() -// }, -// &path, -// )?) -// .launch() -// .await?; - -// Ok(Self { -// pbh_wallets: wallets, -// tree, -// node: NodeTestContext::new(node, optimism_payload_attributes).await?, -// tasks, -// identities, -// }) -// } - -// pub async fn raw_pbh_tx_bytes( -// &self, -// signer: PrivateKeySigner, -// pbh_nonce: u16, -// tx_nonce: u64, -// ) -> Bytes { -// let tx = tx(DEV_CHAIN_ID, None, tx_nonce); -// let envelope = TransactionTestContext::sign_tx(signer.clone(), tx).await; -// let raw_tx = envelope.encoded_2718(); -// let mut data = raw_tx.as_ref(); -// let recovered = PooledTransactionsElement::decode_2718(&mut data).unwrap(); -// let pbh_payload = self.valid_proof( -// signer.address(), -// recovered.hash().as_slice(), -// chrono::Utc::now(), -// pbh_nonce, -// ); - -// let world_chain_pooled_tx_element = WorldChainPooledTransactionsElement { -// inner: recovered, -// pbh_payload: Some(pbh_payload.clone()), -// }; - -// let mut buff = Vec::::new(); -// world_chain_pooled_tx_element.encode_enveloped(&mut buff); -// buff.into() -// } - -// fn valid_proof( -// &self, -// identity: Address, -// tx_hash: &[u8], -// time: chrono::DateTime, -// pbh_nonce: u16, -// ) -> PbhPayload { -// let external_nullifier = -// ExternalNullifier::new(Prefix::V1, DateMarker::from(time), pbh_nonce).to_string(); - -// self.create_proof(identity, external_nullifier, tx_hash) -// } - -// fn create_proof( -// &self, -// mut identity: Address, -// external_nullifier: String, -// signal: &[u8], -// ) -> PbhPayload { -// let idx = self.identities.get(&identity).unwrap(); -// let secret = identity.as_mut_slice(); -// // generate identity -// let id = Identity::from_secret(secret, None); -// let merkle_proof = self.tree.proof(*idx); - -// let signal_hash = hash_to_field(signal); -// let external_nullifier_hash = hash_to_field(external_nullifier.as_bytes()); -// let nullifier_hash = generate_nullifier_hash(&id, external_nullifier_hash); - -// let proof = Proof( -// generate_proof(&id, &merkle_proof, external_nullifier_hash, signal_hash).unwrap(), -// ); - -// PbhPayload { -// root: self.tree.root(), -// nullifier_hash, -// external_nullifier, -// proof, -// } -// } -// } +//! Utilities for running world chain builder end-to-end tests. +use crate::{ + node::{ + args::{ExtArgs, WorldChainBuilderArgs}, + builder::{WorldChainAddOns, WorldChainBuilder}, + }, + pbh::{ + date_marker::DateMarker, + external_nullifier::{ExternalNullifier, Prefix}, + payload::{PbhPayload, Proof}, + }, + pool::{ + ordering::WorldChainOrdering, + root::{LATEST_ROOT_SLOT, OP_WORLD_ID}, + tx::WorldChainPooledTransaction, + validator::WorldChainTransactionValidator, + }, + primitives::WorldChainPooledTransactionsElement, +}; +use alloy_eips::eip2718::Decodable2718; +use alloy_genesis::{Genesis, GenesisAccount}; +use alloy_network::eip2718::Encodable2718; +use alloy_network::{Ethereum, EthereumWallet, TransactionBuilder}; +use alloy_rpc_types::{TransactionInput, TransactionRequest}; +use alloy_signer_local::PrivateKeySigner; +use chrono::Utc; +use reth::tasks::TaskManager; +use reth::transaction_pool::{ + blobstore::DiskFileBlobStore, Pool, TransactionValidationTaskExecutor, +}; +use reth::{api::FullNodeTypes, chainspec::ChainSpec}; +use reth::{ + api::NodeTypes, + payload::{EthPayloadBuilderAttributes, PayloadId}, +}; +use reth::{ + api::NodeTypesWithEngine, + builder::{ + components::Components, Node, NodeAdapter, NodeBuilder, NodeComponents, + NodeComponentsBuilder, NodeConfig, NodeHandle, + }, + network::PeersHandleProvider, +}; +use reth::{ + api::{FullNodeComponents, FullNodeTypesAdapter, NodeTypesWithDBAdapter}, + builder::rpc::RethRpcAddOns, +}; +use reth_consensus::Consensus; +use reth_db::{ + test_utils::{tempdir_path, TempDatabase}, + DatabaseEnv, +}; +use reth_e2e_test_utils::{ + node::NodeTestContext, transaction::TransactionTestContext, wallet::Wallet, NodeHelperType, +}; +use reth_evm::execute::BasicBlockExecutorProvider; +use reth_node_core::args::RpcServerArgs; +use reth_optimism_chainspec::{OpChainSpec, BASE_MAINNET}; +use reth_optimism_evm::{OpExecutionStrategyFactory, OpExecutorProvider, OptimismEvmConfig}; +use reth_optimism_node::{ + engine::OptimismEngineValidator, node::OptimismAddOns, OptimismPayloadBuilderAttributes, +}; +use reth_primitives::{EthereumHardforks, Hardfork, PooledTransactionsElement, Withdrawals}; +use reth_provider::providers::BlockchainProvider; +use revm_primitives::{Address, Bytes, FixedBytes, TxKind, B256, U256}; +use semaphore::{ + hash_to_field, + identity::Identity, + poseidon_tree::LazyPoseidonTree, + protocol::{generate_nullifier_hash, generate_proof}, + Field, +}; +use serial_test::serial; +use std::{ + collections::{BTreeMap, HashMap}, + sync::Arc, + time::Duration, +}; + +pub const DEV_CHAIN_ID: u64 = 8453; + +// Type aliases + +// /// Type alias for a type of `NodeHelper` +// pub type NodeHelperType>> = +// NodeTestContext, AO>; + +pub struct WorldChainBuilderTestContext { + pub pbh_wallets: Vec, + pub tree: LazyPoseidonTree, + pub tasks: TaskManager, + pub identities: HashMap, +} +type HelperType = NodeTestContext< + NodeAdapter< + FullNodeTypesAdapter< + NodeTypesWithDBAdapter>>, + BlockchainProvider>>>, + >, + <>>, + BlockchainProvider>>>, + >, + >>::ComponentsBuilder as NodeComponentsBuilder< + FullNodeTypesAdapter< + NodeTypesWithDBAdapter>>, + BlockchainProvider>>>, + >, + >>::Components, + >, + WorldChainAddOns, +>; +type LongType = NodeTestContext< + NodeAdapter< + FullNodeTypesAdapter< + NodeTypesWithDBAdapter>>, + BlockchainProvider< + NodeTypesWithDBAdapter>>, + >, + >, + reth::builder::components::Components< + FullNodeTypesAdapter< + NodeTypesWithDBAdapter>>, + BlockchainProvider< + NodeTypesWithDBAdapter>>, + >, + >, + reth::transaction_pool::Pool< + TransactionValidationTaskExecutor< + WorldChainTransactionValidator< + BlockchainProvider< + NodeTypesWithDBAdapter< + WorldChainBuilder, + Arc>, + >, + >, + WorldChainPooledTransaction, + >, + >, + WorldChainOrdering, + DiskFileBlobStore, + >, + OptimismEvmConfig, + BasicBlockExecutorProvider, + Arc<(dyn reth_consensus::Consensus + 'static)>, + >, + >, + OptimismAddOns< + NodeAdapter< + FullNodeTypesAdapter< + NodeTypesWithDBAdapter>>, + BlockchainProvider< + NodeTypesWithDBAdapter>>, + >, + >, + reth::builder::components::Components< + FullNodeTypesAdapter< + NodeTypesWithDBAdapter>>, + BlockchainProvider< + NodeTypesWithDBAdapter>>, + >, + >, + reth::transaction_pool::Pool< + TransactionValidationTaskExecutor< + WorldChainTransactionValidator< + BlockchainProvider< + NodeTypesWithDBAdapter< + WorldChainBuilder, + Arc>, + >, + >, + WorldChainPooledTransaction, + >, + >, + WorldChainOrdering, + DiskFileBlobStore, + >, + OptimismEvmConfig, + BasicBlockExecutorProvider, + Arc<(dyn reth_consensus::Consensus + 'static)>, + >, + >, + >, +>; + +impl WorldChainBuilderTestContext { + pub async fn setup() -> eyre::Result<(Self, HelperType)> + where + N: reth::builder::Node< + reth::api::FullNodeTypesAdapter< + reth::api::NodeTypesWithDBAdapter< + N, + std::sync::Arc>, + >, + reth_provider::providers::BlockchainProvider< + reth::api::NodeTypesWithDBAdapter< + N, + std::sync::Arc>, + >, + >, + >, + > + FullNodeComponents, + ::ChainSpec: EthereumHardforks, + WorldChainAddOns: RethRpcAddOns< + NodeAdapter< + FullNodeTypesAdapter< + NodeTypesWithDBAdapter>>, + BlockchainProvider>>>, + >, + <>>, + BlockchainProvider< + NodeTypesWithDBAdapter>>, + >, + >, + >>::ComponentsBuilder as NodeComponentsBuilder< + FullNodeTypesAdapter< + NodeTypesWithDBAdapter>>, + BlockchainProvider< + NodeTypesWithDBAdapter>>, + >, + >, + >>::Components, + >, + >, + { + let wallets = Wallet::new(20).with_chain_id(DEV_CHAIN_ID).gen(); + let mut tree = LazyPoseidonTree::new(30, Field::from(0)).derived(); + let mut identities = HashMap::new(); + for (i, signer) in wallets.iter().enumerate() { + let address = signer.address(); + identities.insert(address, i); + let identity = Identity::from_secret(signer.address().as_mut_slice(), None); + tree = tree.update(i, &identity.commitment()); + } + + let op_chain_spec = Arc::new(OpChainSpec { + inner: get_chain_spec(tree.root()), + }); + + let tasks = TaskManager::current(); + let exec = tasks.executor(); + + let node_config: NodeConfig = NodeConfig::new(op_chain_spec.clone()) + .with_chain(op_chain_spec.clone()) + .with_unused_ports() + .with_rpc( + RpcServerArgs::default() + .with_unused_ports() + .with_http_unused_port(), + ); + let path = tempdir_path(); + let NodeHandle { + node, + node_exit_future: _, + } = NodeBuilder::new(node_config.clone()) + .testing_node(exec.clone()) + .node(WorldChainBuilder::new( + ExtArgs { + builder_args: WorldChainBuilderArgs { + num_pbh_txs: 30, + verified_blockspace_capacity: 70, + ..Default::default() + }, + ..Default::default() + }, + &path, + )?) + .launch() + .await?; + let test_ctx = NodeTestContext::new(node, optimism_payload_attributes).await?; + Ok(( + Self { + pbh_wallets: wallets, + tree, + tasks, + identities, + }, + test_ctx, + )) + } + + pub async fn raw_pbh_tx_bytes( + &self, + signer: PrivateKeySigner, + pbh_nonce: u16, + tx_nonce: u64, + ) -> Bytes { + let tx = tx(DEV_CHAIN_ID, None, tx_nonce); + let envelope = TransactionTestContext::sign_tx(signer.clone(), tx).await; + let raw_tx = envelope.encoded_2718(); + let mut data = raw_tx.as_ref(); + let recovered = PooledTransactionsElement::decode_2718(&mut data).unwrap(); + let pbh_payload = self.valid_proof( + signer.address(), + recovered.hash().as_slice(), + chrono::Utc::now(), + pbh_nonce, + ); + + let world_chain_pooled_tx_element = WorldChainPooledTransactionsElement { + inner: recovered, + pbh_payload: Some(pbh_payload.clone()), + }; + + let mut buff = Vec::::new(); + world_chain_pooled_tx_element.encode_enveloped(&mut buff); + buff.into() + } + + fn valid_proof( + &self, + identity: Address, + tx_hash: &[u8], + time: chrono::DateTime, + pbh_nonce: u16, + ) -> PbhPayload { + let external_nullifier = + ExternalNullifier::new(Prefix::V1, DateMarker::from(time), pbh_nonce).to_string(); + + self.create_proof(identity, external_nullifier, tx_hash) + } + + fn create_proof( + &self, + mut identity: Address, + external_nullifier: String, + signal: &[u8], + ) -> PbhPayload { + let idx = self.identities.get(&identity).unwrap(); + let secret = identity.as_mut_slice(); + // generate identity + let id = Identity::from_secret(secret, None); + let merkle_proof = self.tree.proof(*idx); + + let signal_hash = hash_to_field(signal); + let external_nullifier_hash = hash_to_field(external_nullifier.as_bytes()); + let nullifier_hash = generate_nullifier_hash(&id, external_nullifier_hash); + + let proof = Proof( + generate_proof(&id, &merkle_proof, external_nullifier_hash, signal_hash).unwrap(), + ); + + PbhPayload { + root: self.tree.root(), + nullifier_hash, + external_nullifier, + proof, + } + } +} // #[tokio::test] // #[serial] @@ -349,53 +466,52 @@ // Ok(()) // } -// /// Helper function to create a new eth payload attributes -// pub fn optimism_payload_attributes(timestamp: u64) -> OptimismPayloadBuilderAttributes { -// let attributes = EthPayloadBuilderAttributes { -// timestamp, -// prev_randao: B256::ZERO, -// suggested_fee_recipient: Address::ZERO, -// withdrawals: Withdrawals::default(), -// parent_beacon_block_root: Some(B256::ZERO), -// id: PayloadId(FixedBytes::<8>::random()), -// parent: FixedBytes::default(), -// }; - -// OptimismPayloadBuilderAttributes { -// payload_attributes: attributes, -// transactions: vec![], -// gas_limit: None, -// no_tx_pool: false, -// } -// } - -// fn tx(chain_id: u64, data: Option, nonce: u64) -> TransactionRequest { -// TransactionRequest { -// nonce: Some(nonce), -// value: Some(U256::from(100)), -// to: Some(TxKind::Call(Address::random())), -// gas: Some(210000), -// max_fee_per_gas: Some(20e10 as u128), -// max_priority_fee_per_gas: Some(20e10 as u128), -// chain_id: Some(chain_id), -// input: TransactionInput { input: None, data }, -// ..Default::default() -// } -// } - -// /// Builds an OP Mainnet chain spec with the given merkle root -// /// Populated in the OpWorldID contract. -// fn get_chain_spec(merkle_root: Field) -> ChainSpec { -// let genesis: Genesis = serde_json::from_str(include_str!("assets/genesis.json")).unwrap(); -// ChainSpec::builder() -// .chain(BASE_MAINNET.chain) -// .genesis(genesis.extend_accounts(vec![( -// OP_WORLD_ID, -// GenesisAccount::default().with_storage(Some(BTreeMap::from_iter(vec![( -// LATEST_ROOT_SLOT.into(), -// merkle_root.into(), -// )]))), -// )])) -// .ecotone_activated() -// .build() -// } +/// Helper function to create a new eth payload attributes +pub fn optimism_payload_attributes(timestamp: u64) -> OptimismPayloadBuilderAttributes { + let attributes = EthPayloadBuilderAttributes { + timestamp, + prev_randao: B256::ZERO, + suggested_fee_recipient: Address::ZERO, + withdrawals: Withdrawals::default(), + parent_beacon_block_root: Some(B256::ZERO), + id: PayloadId(FixedBytes::<8>::random()), + parent: FixedBytes::default(), + }; + + OptimismPayloadBuilderAttributes { + payload_attributes: attributes, + transactions: vec![], + gas_limit: None, + no_tx_pool: false, + } +} + +fn tx(chain_id: u64, data: Option, nonce: u64) -> TransactionRequest { + TransactionRequest { + nonce: Some(nonce), + value: Some(U256::from(100)), + to: Some(TxKind::Call(Address::random())), + gas: Some(210000), + max_fee_per_gas: Some(20e10 as u128), + max_priority_fee_per_gas: Some(20e10 as u128), + chain_id: Some(chain_id), + input: TransactionInput { input: None, data }, + ..Default::default() + } +} + +/// Builds an OP Mainnet chain spec with the given merkle root +/// Populated in the OpWorldID contract. +fn get_chain_spec(merkle_root: Field) -> ChainSpec { + let genesis: Genesis = serde_json::from_str(include_str!("assets/genesis.json")).unwrap(); + ChainSpec::builder() + .chain(BASE_MAINNET.chain) + .genesis(genesis.extend_accounts(vec![( + OP_WORLD_ID, + GenesisAccount::default().with_storage(Some(BTreeMap::from_iter(vec![( + LATEST_ROOT_SLOT.into(), + merkle_root.into(), + )]))), + )])) + .build() +} From aacacd847207301717fb036df04eddb0d54e0486 Mon Sep 17 00:00:00 2001 From: 0xKitsune <0xkitsune@protonmail.com> Date: Tue, 29 Oct 2024 12:38:27 -0400 Subject: [PATCH 06/13] impl TransactionCompat for WorldChainEthApi --- world-chain-builder/src/node/builder.rs | 4 ++-- world-chain-builder/src/rpc/mod.rs | 31 +++++++++++++++++++++++-- 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/world-chain-builder/src/node/builder.rs b/world-chain-builder/src/node/builder.rs index 4699b9c..e911ce9 100644 --- a/world-chain-builder/src/node/builder.rs +++ b/world-chain-builder/src/node/builder.rs @@ -12,7 +12,7 @@ use reth::rpc::eth::FullEthApiServer; use reth_db::DatabaseEnv; use reth_optimism_chainspec::OpChainSpec; use reth_optimism_node::engine::OptimismEngineValidator; -use reth_optimism_node::node::OptimismEngineValidatorBuilder; +use reth_optimism_node::node::{OpPrimitives, OptimismEngineValidatorBuilder}; use reth_optimism_node::{ args::RollupArgs, node::{ @@ -124,7 +124,7 @@ where } impl NodeTypes for WorldChainBuilder { - type Primitives = (); + type Primitives = OpPrimitives; type ChainSpec = OpChainSpec; } diff --git a/world-chain-builder/src/rpc/mod.rs b/world-chain-builder/src/rpc/mod.rs index 0a1031b..d098c3b 100644 --- a/world-chain-builder/src/rpc/mod.rs +++ b/world-chain-builder/src/rpc/mod.rs @@ -7,9 +7,11 @@ mod block; mod call; mod pending_block; use alloy_primitives::U256; +use alloy_rpc_types::TransactionInfo; use derive_more::derive::Deref; use op_alloy_network::Optimism; -use reth::api::ConfigureEvm; +use op_alloy_rpc_types::Transaction; +use reth::api::{ConfigureEvm, FullNodeComponents}; use reth::builder::EthApiBuilderCtx; use reth::chainspec::{EthChainSpec, EthereumHardforks}; @@ -18,7 +20,9 @@ use reth::rpc::api::eth::helpers::{ AddDevSigners, EthApiSpec, EthFees, EthState, LoadBlock, LoadFee, LoadState, SpawnBlocking, Trace, }; + use reth::rpc::api::eth::RpcNodeCoreExt; +use reth::rpc::compat::TransactionCompat; use reth::rpc::eth::{EthApiTypes, RpcNodeCore}; use reth::rpc::server_types::eth::{EthStateCache, FeeHistoryCache, GasPriceOracle}; use reth::tasks::{ @@ -27,7 +31,7 @@ use reth::tasks::{ }; use reth::transaction_pool::TransactionPool; use reth_optimism_rpc::{OpEthApi, OpEthApiError}; -use reth_primitives::Header; +use reth_primitives::{Header, TransactionSignedEcRecovered}; use reth_provider::{ BlockNumReader, BlockReaderIdExt, CanonStateSubscriptions, ChainSpecProvider, EvmEnvProvider, StageCheckpointReader, StateProviderFactory, @@ -217,6 +221,29 @@ where { } +impl TransactionCompat for WorldChainEthApi +where + N: FullNodeComponents, +{ + type Transaction = Transaction; + + fn fill( + &self, + tx: TransactionSignedEcRecovered, + tx_info: TransactionInfo, + ) -> Self::Transaction { + self.inner.fill(tx, tx_info) + } + + fn otterscan_api_truncate_input(tx: &mut Self::Transaction) { + OpEthApi::::otterscan_api_truncate_input(tx) + } + + fn tx_type(tx: &Self::Transaction) -> u8 { + OpEthApi::::tx_type(tx) + } +} + impl AddDevSigners for WorldChainEthApi where N: RpcNodeCore, From 42555876eedbf3e25eb6df38e6112039b3d588d2 Mon Sep 17 00:00:00 2001 From: 0xKitsune <0xkitsune@protonmail.com> Date: Tue, 29 Oct 2024 12:48:08 -0400 Subject: [PATCH 07/13] remove unused import --- world-chain-builder/src/node/builder.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/world-chain-builder/src/node/builder.rs b/world-chain-builder/src/node/builder.rs index e911ce9..cfc1b28 100644 --- a/world-chain-builder/src/node/builder.rs +++ b/world-chain-builder/src/node/builder.rs @@ -15,9 +15,7 @@ use reth_optimism_node::engine::OptimismEngineValidator; use reth_optimism_node::node::{OpPrimitives, OptimismEngineValidatorBuilder}; use reth_optimism_node::{ args::RollupArgs, - node::{ - OptimismAddOns, OptimismConsensusBuilder, OptimismExecutorBuilder, OptimismNetworkBuilder, - }, + node::{OptimismConsensusBuilder, OptimismExecutorBuilder, OptimismNetworkBuilder}, OptimismEngineTypes, }; From 61acaed1062306c52b0f51f5731475afd6ad621f Mon Sep 17 00:00:00 2001 From: 0xOsiris Date: Tue, 29 Oct 2024 09:58:56 -0700 Subject: [PATCH 08/13] test: patch compilation in e2e --- world-chain-builder/src/node/builder.rs | 4 +- world-chain-builder/src/test/e2e/mod.rs | 339 +++++++++--------------- 2 files changed, 127 insertions(+), 216 deletions(-) diff --git a/world-chain-builder/src/node/builder.rs b/world-chain-builder/src/node/builder.rs index e911ce9..cfc1b28 100644 --- a/world-chain-builder/src/node/builder.rs +++ b/world-chain-builder/src/node/builder.rs @@ -15,9 +15,7 @@ use reth_optimism_node::engine::OptimismEngineValidator; use reth_optimism_node::node::{OpPrimitives, OptimismEngineValidatorBuilder}; use reth_optimism_node::{ args::RollupArgs, - node::{ - OptimismAddOns, OptimismConsensusBuilder, OptimismExecutorBuilder, OptimismNetworkBuilder, - }, + node::{OptimismConsensusBuilder, OptimismExecutorBuilder, OptimismNetworkBuilder}, OptimismEngineTypes, }; diff --git a/world-chain-builder/src/test/e2e/mod.rs b/world-chain-builder/src/test/e2e/mod.rs index 56883d4..a2a7dfc 100644 --- a/world-chain-builder/src/test/e2e/mod.rs +++ b/world-chain-builder/src/test/e2e/mod.rs @@ -24,43 +24,25 @@ use alloy_network::{Ethereum, EthereumWallet, TransactionBuilder}; use alloy_rpc_types::{TransactionInput, TransactionRequest}; use alloy_signer_local::PrivateKeySigner; use chrono::Utc; +use reth::{api::{FullNodeTypesAdapter, NodeTypesWithDBAdapter}, builder::components::Components}; +use reth::builder::{NodeAdapter, NodeBuilder, NodeConfig, NodeHandle}; +use reth::chainspec::ChainSpec; +use reth::payload::{EthPayloadBuilderAttributes, PayloadId}; use reth::tasks::TaskManager; -use reth::transaction_pool::{ - blobstore::DiskFileBlobStore, Pool, TransactionValidationTaskExecutor, -}; -use reth::{api::FullNodeTypes, chainspec::ChainSpec}; -use reth::{ - api::NodeTypes, - payload::{EthPayloadBuilderAttributes, PayloadId}, -}; -use reth::{ - api::NodeTypesWithEngine, - builder::{ - components::Components, Node, NodeAdapter, NodeBuilder, NodeComponents, - NodeComponentsBuilder, NodeConfig, NodeHandle, - }, - network::PeersHandleProvider, -}; -use reth::{ - api::{FullNodeComponents, FullNodeTypesAdapter, NodeTypesWithDBAdapter}, - builder::rpc::RethRpcAddOns, -}; -use reth_consensus::Consensus; +use reth::transaction_pool::{blobstore::DiskFileBlobStore, TransactionValidationTaskExecutor}; use reth_db::{ test_utils::{tempdir_path, TempDatabase}, DatabaseEnv, }; use reth_e2e_test_utils::{ - node::NodeTestContext, transaction::TransactionTestContext, wallet::Wallet, NodeHelperType, + node::NodeTestContext, transaction::TransactionTestContext, wallet::Wallet, }; use reth_evm::execute::BasicBlockExecutorProvider; use reth_node_core::args::RpcServerArgs; use reth_optimism_chainspec::{OpChainSpec, BASE_MAINNET}; -use reth_optimism_evm::{OpExecutionStrategyFactory, OpExecutorProvider, OptimismEvmConfig}; -use reth_optimism_node::{ - engine::OptimismEngineValidator, node::OptimismAddOns, OptimismPayloadBuilderAttributes, -}; -use reth_primitives::{EthereumHardforks, Hardfork, PooledTransactionsElement, Withdrawals}; +use reth_optimism_evm::{OpExecutionStrategyFactory, OptimismEvmConfig}; +use reth_optimism_node::OptimismPayloadBuilderAttributes; +use reth_primitives::{PooledTransactionsElement, Withdrawals}; use reth_provider::providers::BlockchainProvider; use revm_primitives::{Address, Bytes, FixedBytes, TxKind, B256, U256}; use semaphore::{ @@ -89,29 +71,11 @@ pub struct WorldChainBuilderTestContext { pub pbh_wallets: Vec, pub tree: LazyPoseidonTree, pub tasks: TaskManager, + pub node: Adapter, pub identities: HashMap, } -type HelperType = NodeTestContext< - NodeAdapter< - FullNodeTypesAdapter< - NodeTypesWithDBAdapter>>, - BlockchainProvider>>>, - >, - <>>, - BlockchainProvider>>>, - >, - >>::ComponentsBuilder as NodeComponentsBuilder< - FullNodeTypesAdapter< - NodeTypesWithDBAdapter>>, - BlockchainProvider>>>, - >, - >>::Components, - >, - WorldChainAddOns, ->; -type LongType = NodeTestContext< + +type Adapter = NodeTestContext< NodeAdapter< FullNodeTypesAdapter< NodeTypesWithDBAdapter>>, @@ -146,7 +110,7 @@ type LongType = NodeTestContext< Arc<(dyn reth_consensus::Consensus + 'static)>, >, >, - OptimismAddOns< + WorldChainAddOns< NodeAdapter< FullNodeTypesAdapter< NodeTypesWithDBAdapter>>, @@ -154,7 +118,7 @@ type LongType = NodeTestContext< NodeTypesWithDBAdapter>>, >, >, - reth::builder::components::Components< + Components< FullNodeTypesAdapter< NodeTypesWithDBAdapter>>, BlockchainProvider< @@ -185,47 +149,7 @@ type LongType = NodeTestContext< >; impl WorldChainBuilderTestContext { - pub async fn setup() -> eyre::Result<(Self, HelperType)> - where - N: reth::builder::Node< - reth::api::FullNodeTypesAdapter< - reth::api::NodeTypesWithDBAdapter< - N, - std::sync::Arc>, - >, - reth_provider::providers::BlockchainProvider< - reth::api::NodeTypesWithDBAdapter< - N, - std::sync::Arc>, - >, - >, - >, - > + FullNodeComponents, - ::ChainSpec: EthereumHardforks, - WorldChainAddOns: RethRpcAddOns< - NodeAdapter< - FullNodeTypesAdapter< - NodeTypesWithDBAdapter>>, - BlockchainProvider>>>, - >, - <>>, - BlockchainProvider< - NodeTypesWithDBAdapter>>, - >, - >, - >>::ComponentsBuilder as NodeComponentsBuilder< - FullNodeTypesAdapter< - NodeTypesWithDBAdapter>>, - BlockchainProvider< - NodeTypesWithDBAdapter>>, - >, - >, - >>::Components, - >, - >, - { + pub async fn setup() -> eyre::Result { let wallets = Wallet::new(20).with_chain_id(DEV_CHAIN_ID).gen(); let mut tree = LazyPoseidonTree::new(30, Field::from(0)).derived(); let mut identities = HashMap::new(); @@ -271,15 +195,13 @@ impl WorldChainBuilderTestContext { .launch() .await?; let test_ctx = NodeTestContext::new(node, optimism_payload_attributes).await?; - Ok(( - Self { - pbh_wallets: wallets, - tree, - tasks, - identities, - }, - test_ctx, - )) + Ok(Self { + pbh_wallets: wallets, + tree, + tasks, + node: test_ctx, + identities, + }) } pub async fn raw_pbh_tx_bytes( @@ -352,119 +274,110 @@ impl WorldChainBuilderTestContext { } } -// #[tokio::test] -// #[serial] -// async fn test_can_build_pbh_payload() -> eyre::Result<()> { -// tokio::time::sleep(Duration::from_secs(1)).await; -// let mut ctx = WorldChainBuilderTestContext::setup().await?; -// let mut pbh_tx_hashes = vec![]; -// for signer in ctx.pbh_wallets.iter() { -// let raw_tx = ctx.raw_pbh_tx_bytes(signer.clone(), 0, 0).await; -// let pbh_hash = ctx.node.rpc.inject_tx(raw_tx.clone()).await?; -// pbh_tx_hashes.push(pbh_hash); -// } - -// let (payload, _) = ctx -// .node -// .advance_block(vec![], optimism_payload_attributes) -// .await?; - -// assert_eq!(payload.block().body.transactions.len(), pbh_tx_hashes.len()); -// let block_hash = payload.block().hash(); -// let block_number = payload.block().number; - -// let tip = pbh_tx_hashes[0]; -// ctx.node -// .assert_new_block(tip, block_hash, block_number) -// .await?; - -// Ok(()) -// } - -// #[tokio::test] -// #[serial] -// async fn test_transaction_pool_ordering() -> eyre::Result<()> { -// tokio::time::sleep(Duration::from_secs(1)).await; -// let mut ctx = WorldChainBuilderTestContext::setup().await?; -// let non_pbh_tx = tx(ctx.node.inner.chain_spec().chain.id(), None, 0); -// let wallet = ctx.pbh_wallets[0].clone(); -// let signer = EthereumWallet::from(wallet); -// let signed = >::build(non_pbh_tx, &signer) -// .await -// .unwrap(); -// let non_pbh_hash = ctx.node.rpc.inject_tx(signed.encoded_2718().into()).await?; -// let mut pbh_tx_hashes = vec![]; -// for signer in ctx.pbh_wallets.iter().skip(1) { -// let raw_tx = ctx.raw_pbh_tx_bytes(signer.clone(), 0, 0).await; -// let pbh_hash = ctx.node.rpc.inject_tx(raw_tx.clone()).await?; -// pbh_tx_hashes.push(pbh_hash); -// } - -// let (payload, _) = ctx -// .node -// .advance_block(vec![], optimism_payload_attributes) -// .await?; - -// assert_eq!( -// payload.block().body.transactions.len(), -// pbh_tx_hashes.len() + 1 -// ); -// // Assert the non-pbh transaction is included in the block last -// assert_eq!( -// payload.block().body.transactions.last().unwrap().hash(), -// non_pbh_hash -// ); -// let block_hash = payload.block().hash(); -// let block_number = payload.block().number; - -// let tip = pbh_tx_hashes[0]; -// ctx.node -// .assert_new_block(tip, block_hash, block_number) -// .await?; - -// Ok(()) -// } - -// #[tokio::test] -// #[serial] -// async fn test_invalidate_dup_tx_and_nullifier() -> eyre::Result<()> { -// tokio::time::sleep(Duration::from_secs(1)).await; -// let ctx = WorldChainBuilderTestContext::setup().await?; -// let signer = ctx.pbh_wallets[0].clone(); -// let raw_tx = ctx.raw_pbh_tx_bytes(signer.clone(), 0, 0).await; -// ctx.node.rpc.inject_tx(raw_tx.clone()).await?; -// let dup_pbh_hash_res = ctx.node.rpc.inject_tx(raw_tx.clone()).await; -// assert!(dup_pbh_hash_res.is_err()); -// Ok(()) -// } - -// #[tokio::test] -// #[serial] -// async fn test_dup_pbh_nonce() -> eyre::Result<()> { -// tokio::time::sleep(Duration::from_secs(1)).await; -// let mut ctx = WorldChainBuilderTestContext::setup().await?; -// let signer = ctx.pbh_wallets[0].clone(); - -// let raw_tx_0 = ctx.raw_pbh_tx_bytes(signer.clone(), 0, 0).await; -// ctx.node.rpc.inject_tx(raw_tx_0.clone()).await?; -// let raw_tx_1 = ctx.raw_pbh_tx_bytes(signer.clone(), 0, 1).await; - -// // Now that the nullifier has successfully been stored in -// // the `ExecutedPbhNullifierTable`, inserting a new tx with the -// // same pbh_nonce should fail to validate. -// assert!(ctx.node.rpc.inject_tx(raw_tx_1.clone()).await.is_err()); - -// let (payload, _) = ctx -// .node -// .advance_block(vec![], optimism_payload_attributes) -// .await?; - -// // One transaction should be successfully validated -// // and included in the block. -// assert_eq!(payload.block().body.transactions.len(), 1); - -// Ok(()) -// } +#[tokio::test] +#[serial] +async fn test_can_build_pbh_payload() -> eyre::Result<()> { + tokio::time::sleep(Duration::from_secs(1)).await; + let mut ctx = WorldChainBuilderTestContext::setup().await?; + let mut pbh_tx_hashes = vec![]; + for signer in ctx.pbh_wallets.iter() { + let raw_tx = ctx.raw_pbh_tx_bytes(signer.clone(), 0, 0).await; + let pbh_hash = ctx.node.rpc.inject_tx(raw_tx.clone()).await?; + pbh_tx_hashes.push(pbh_hash); + } + + let (payload, _) = ctx.node.advance_block().await?; + + assert_eq!(payload.block().body.transactions.len(), pbh_tx_hashes.len()); + let block_hash = payload.block().hash(); + let block_number = payload.block().number; + + let tip = pbh_tx_hashes[0]; + ctx.node + .assert_new_block(tip, block_hash, block_number) + .await?; + + Ok(()) +} + +#[tokio::test] +#[serial] +async fn test_transaction_pool_ordering() -> eyre::Result<()> { + tokio::time::sleep(Duration::from_secs(1)).await; + let mut ctx = WorldChainBuilderTestContext::setup().await?; + let non_pbh_tx = tx(ctx.node.inner.chain_spec().chain.id(), None, 0); + let wallet = ctx.pbh_wallets[0].clone(); + let signer = EthereumWallet::from(wallet); + let signed = >::build(non_pbh_tx, &signer) + .await + .unwrap(); + let non_pbh_hash = ctx.node.rpc.inject_tx(signed.encoded_2718().into()).await?; + let mut pbh_tx_hashes = vec![]; + for signer in ctx.pbh_wallets.iter().skip(1) { + let raw_tx = ctx.raw_pbh_tx_bytes(signer.clone(), 0, 0).await; + let pbh_hash = ctx.node.rpc.inject_tx(raw_tx.clone()).await?; + pbh_tx_hashes.push(pbh_hash); + } + + let (payload, _) = ctx.node.advance_block().await?; + + assert_eq!( + payload.block().body.transactions.len(), + pbh_tx_hashes.len() + 1 + ); + // Assert the non-pbh transaction is included in the block last + assert_eq!( + payload.block().body.transactions.last().unwrap().hash(), + non_pbh_hash + ); + let block_hash = payload.block().hash(); + let block_number = payload.block().number; + + let tip = pbh_tx_hashes[0]; + ctx.node + .assert_new_block(tip, block_hash, block_number) + .await?; + + Ok(()) +} + +#[tokio::test] +#[serial] +async fn test_invalidate_dup_tx_and_nullifier() -> eyre::Result<()> { + tokio::time::sleep(Duration::from_secs(1)).await; + let ctx = WorldChainBuilderTestContext::setup().await?; + let signer = ctx.pbh_wallets[0].clone(); + let raw_tx = ctx.raw_pbh_tx_bytes(signer.clone(), 0, 0).await; + ctx.node.rpc.inject_tx(raw_tx.clone()).await?; + let dup_pbh_hash_res = ctx.node.rpc.inject_tx(raw_tx.clone()).await; + assert!(dup_pbh_hash_res.is_err()); + Ok(()) +} + +#[tokio::test] +#[serial] +async fn test_dup_pbh_nonce() -> eyre::Result<()> { + tokio::time::sleep(Duration::from_secs(1)).await; + let mut ctx = WorldChainBuilderTestContext::setup().await?; + let signer = ctx.pbh_wallets[0].clone(); + + let raw_tx_0 = ctx.raw_pbh_tx_bytes(signer.clone(), 0, 0).await; + ctx.node.rpc.inject_tx(raw_tx_0.clone()).await?; + let raw_tx_1 = ctx.raw_pbh_tx_bytes(signer.clone(), 0, 1).await; + + // Now that the nullifier has successfully been stored in + // the `ExecutedPbhNullifierTable`, inserting a new tx with the + // same pbh_nonce should fail to validate. + assert!(ctx.node.rpc.inject_tx(raw_tx_1.clone()).await.is_err()); + + let (payload, _) = ctx.node.advance_block().await?; + + // One transaction should be successfully validated + // and included in the block. + assert_eq!(payload.block().body.transactions.len(), 1); + + Ok(()) +} /// Helper function to create a new eth payload attributes pub fn optimism_payload_attributes(timestamp: u64) -> OptimismPayloadBuilderAttributes { From 098717730b227b78661d05666dcdb00de98917a6 Mon Sep 17 00:00:00 2001 From: 0xOsiris Date: Tue, 29 Oct 2024 10:57:36 -0700 Subject: [PATCH 09/13] fix: transaction envelope 2718 rlp encoding/decoding --- world-chain-builder/src/primitives.rs | 45 +++++++++++++++++-------- world-chain-builder/src/test/e2e/mod.rs | 20 +++++------ 2 files changed, 41 insertions(+), 24 deletions(-) diff --git a/world-chain-builder/src/primitives.rs b/world-chain-builder/src/primitives.rs index aaed11c..7030562 100644 --- a/world-chain-builder/src/primitives.rs +++ b/world-chain-builder/src/primitives.rs @@ -1,4 +1,6 @@ +use crate::pbh::payload::PbhPayload; use alloy_eips::eip2718::Decodable2718; +use alloy_eips::eip2718::Encodable2718; use alloy_rlp::{Decodable, Encodable}; use reth::rpc::server_types::eth::{EthApiError, EthResult}; use reth_primitives::transaction::TransactionConversionError; @@ -9,8 +11,6 @@ use reth_primitives::{ use revm_primitives::Bytes; use tracing::warn; -use crate::pbh::payload::PbhPayload; - #[derive(Clone, Debug, PartialEq, Eq)] pub struct WorldChainPooledTransactionsElement { pub inner: PooledTransactionsElement, @@ -41,8 +41,30 @@ impl Decodable for WorldChainPooledTransactionsElement { } } +/// EIP-2718 encoding/decoding +impl Encodable2718 for WorldChainPooledTransactionsElement { + fn encode_2718(&self, out: &mut dyn bytes::BufMut) { + self.inner.encode_2718(out); + if let Some(pbh_paylaod) = &self.pbh_payload { + pbh_paylaod.encode(out); + } + } + + fn type_flag(&self) -> Option { + None + } + + fn encode_2718_len(&self) -> usize { + self.inner.encode_2718_len() + + self + .pbh_payload + .as_ref() + .map_or(0, |pbh_payload| pbh_payload.length()) + } +} + impl WorldChainPooledTransactionsElement { - pub fn decode_enveloped(buf: &mut &[u8]) -> alloy_rlp::Result { + pub fn decode_2718(buf: &mut &[u8]) -> alloy_rlp::Result { let inner = PooledTransactionsElement::decode_2718(buf)?; let pbh_payload = match PbhPayload::decode(buf) { Ok(res) => Some(res), @@ -54,14 +76,9 @@ impl WorldChainPooledTransactionsElement { Ok(Self { inner, pbh_payload }) } +} - pub fn encode_enveloped(&self, out: &mut dyn alloy_rlp::BufMut) { - self.inner.encode(out); - if let Some(pbh_payload) = &self.pbh_payload { - pbh_payload.encode(out); - } - } - +impl WorldChainPooledTransactionsElement { pub fn try_into_ecrecovered( self, ) -> Result { @@ -125,7 +142,7 @@ pub fn recover_raw_transaction( return Err(EthApiError::EmptyRawTransactionData); } - let transaction = WorldChainPooledTransactionsElement::decode_enveloped(&mut data.as_ref()) + let transaction = WorldChainPooledTransactionsElement::decode_2718(&mut data.as_ref()) .map_err(|_| EthApiError::FailedToDecodeSignedTransaction)?; let ecrecovered = transaction @@ -170,7 +187,7 @@ mod tests { // this is a legacy tx so we can attempt the same test with decode_enveloped let input_rlp = &mut &hex_data[..]; - let res = WorldChainPooledTransactionsElement::decode_enveloped(input_rlp); + let res = WorldChainPooledTransactionsElement::decode(input_rlp); assert!( res.is_err(), @@ -185,7 +202,7 @@ mod tests { fn decode_eip1559_enveloped() { let data = hex!("02f903d382426882ba09832dc6c0848674742682ed9694714b6a4ea9b94a8a7d9fd362ed72630688c8898c80b90364492d24749189822d8512430d3f3ff7a2ede675ac08265c08e2c56ff6fdaa66dae1cdbe4a5d1d7809f3e99272d067364e597542ac0c369d69e22a6399c3e9bee5da4b07e3f3fdc34c32c3d88aa2268785f3e3f8086df0934b10ef92cfffc2e7f3d90f5e83302e31382e302d64657600000000000000000000000000000000000000000000569e75fc77c1a856f6daaf9e69d8a9566ca34aa47f9133711ce065a571af0cfd000000000000000000000000e1e210594771824dad216568b91c9cb4ceed361c00000000000000000000000000000000000000000000000000000000000546e00000000000000000000000000000000000000000000000000000000000e4e1c00000000000000000000000000000000000000000000000000000000065d6750c00000000000000000000000000000000000000000000000000000000000f288000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002cf600000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000000f1628e56fa6d8c50e5b984a58c0df14de31c7b857ce7ba499945b99252976a93d06dcda6776fc42167fbe71cb59f978f5ef5b12577a90b132d14d9c6efa528076f0161d7bf03643cfc5490ec5084f4a041db7f06c50bd97efa08907ba79ddcac8b890f24d12d8db31abbaaf18985d54f400449ee0559a4452afe53de5853ce090000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000028000000000000000000000000000000000000000000000000000000000000003e800000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000064ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000c080a01428023fc54a27544abc421d5d017b9a7c5936ad501cbdecd0d9d12d04c1a033a0753104bbf1c87634d6ff3f0ffa0982710612306003eb022363b57994bdef445a"); - let res = WorldChainPooledTransactionsElement::decode_enveloped(&mut &data[..]).unwrap(); + let res = WorldChainPooledTransactionsElement::decode_2718(&mut &data[..]).unwrap(); assert_eq!( res.into_transaction().to(), Some(address!("714b6a4ea9b94a8a7d9fd362ed72630688c8898c")) @@ -220,7 +237,7 @@ mod tests { assert!(input_rlp.is_empty()); // we can also decode_enveloped - let res = WorldChainPooledTransactionsElement::decode_enveloped(&mut &data[..]); + let res = WorldChainPooledTransactionsElement::decode(&mut &data[..]); assert!(matches!(res, Ok(_tx))); } } diff --git a/world-chain-builder/src/test/e2e/mod.rs b/world-chain-builder/src/test/e2e/mod.rs index a2a7dfc..102b627 100644 --- a/world-chain-builder/src/test/e2e/mod.rs +++ b/world-chain-builder/src/test/e2e/mod.rs @@ -24,12 +24,14 @@ use alloy_network::{Ethereum, EthereumWallet, TransactionBuilder}; use alloy_rpc_types::{TransactionInput, TransactionRequest}; use alloy_signer_local::PrivateKeySigner; use chrono::Utc; -use reth::{api::{FullNodeTypesAdapter, NodeTypesWithDBAdapter}, builder::components::Components}; use reth::builder::{NodeAdapter, NodeBuilder, NodeConfig, NodeHandle}; -use reth::chainspec::ChainSpec; use reth::payload::{EthPayloadBuilderAttributes, PayloadId}; use reth::tasks::TaskManager; use reth::transaction_pool::{blobstore::DiskFileBlobStore, TransactionValidationTaskExecutor}; +use reth::{ + api::{FullNodeTypesAdapter, NodeTypesWithDBAdapter}, + builder::components::Components, +}; use reth_db::{ test_utils::{tempdir_path, TempDatabase}, DatabaseEnv, @@ -39,7 +41,7 @@ use reth_e2e_test_utils::{ }; use reth_evm::execute::BasicBlockExecutorProvider; use reth_node_core::args::RpcServerArgs; -use reth_optimism_chainspec::{OpChainSpec, BASE_MAINNET}; +use reth_optimism_chainspec::{OpChainSpec, OpChainSpecBuilder}; use reth_optimism_evm::{OpExecutionStrategyFactory, OptimismEvmConfig}; use reth_optimism_node::OptimismPayloadBuilderAttributes; use reth_primitives::{PooledTransactionsElement, Withdrawals}; @@ -160,9 +162,7 @@ impl WorldChainBuilderTestContext { tree = tree.update(i, &identity.commitment()); } - let op_chain_spec = Arc::new(OpChainSpec { - inner: get_chain_spec(tree.root()), - }); + let op_chain_spec = Arc::new(get_chain_spec(tree.root())); let tasks = TaskManager::current(); let exec = tasks.executor(); @@ -228,7 +228,7 @@ impl WorldChainBuilderTestContext { }; let mut buff = Vec::::new(); - world_chain_pooled_tx_element.encode_enveloped(&mut buff); + world_chain_pooled_tx_element.encode_2718(&mut buff); buff.into() } @@ -415,10 +415,9 @@ fn tx(chain_id: u64, data: Option, nonce: u64) -> TransactionRequest { /// Builds an OP Mainnet chain spec with the given merkle root /// Populated in the OpWorldID contract. -fn get_chain_spec(merkle_root: Field) -> ChainSpec { +fn get_chain_spec(merkle_root: Field) -> OpChainSpec { let genesis: Genesis = serde_json::from_str(include_str!("assets/genesis.json")).unwrap(); - ChainSpec::builder() - .chain(BASE_MAINNET.chain) + OpChainSpecBuilder::base_mainnet() .genesis(genesis.extend_accounts(vec![( OP_WORLD_ID, GenesisAccount::default().with_storage(Some(BTreeMap::from_iter(vec![( @@ -426,5 +425,6 @@ fn get_chain_spec(merkle_root: Field) -> ChainSpec { merkle_root.into(), )]))), )])) + .ecotone_activated() .build() } From dbd805469e0a1897bd90116f7da52749a7fc6af5 Mon Sep 17 00:00:00 2001 From: 0xOsiris Date: Tue, 29 Oct 2024 11:56:25 -0700 Subject: [PATCH 10/13] feat(devnet): switch to rollup-boost for engine proxy --- devnet/Dockerfile.rollup-boost | 20 +++++++++++++++++++ devnet/Justfile | 9 +++++++-- .../rollup-boost/rollup_boost_launcher.star | 1 + devnet/src/package_io/input_parser.star | 2 +- world-chain-builder/src/primitives.rs | 8 ++++---- 5 files changed, 33 insertions(+), 7 deletions(-) create mode 100644 devnet/Dockerfile.rollup-boost diff --git a/devnet/Dockerfile.rollup-boost b/devnet/Dockerfile.rollup-boost new file mode 100644 index 0000000..a9e6314 --- /dev/null +++ b/devnet/Dockerfile.rollup-boost @@ -0,0 +1,20 @@ +# Use the official Rust image for building +FROM rust:1.81 AS builder + +# Set the working directory inside the container +WORKDIR /app + +# Update package lists and install git +RUN apt-get update && \ + apt-get install -y git clang libclang-dev pkg-config && \ + git clone --depth=1 https://github.com/flashbots/rollup-boost.git . && \ + cargo build --release + +# Create a minimal image to run the binary +FROM debian:bookworm-slim + +# Copy the binary from the builder stage +COPY --from=builder /app/target/release/rollup-boost /app/ + +# Set the working directory +WORKDIR /app \ No newline at end of file diff --git a/devnet/Justfile b/devnet/Justfile index bf78f0a..828c188 100644 --- a/devnet/Justfile +++ b/devnet/Justfile @@ -13,6 +13,11 @@ devnet-down: kurtosis enclave rm -f world-chain kurtosis clean -# Builds and tags the world-chain-builder image -build: +# Builds and tags the world-chain-builder, and rollup-boost images +build: build-world-chain build-rollup-boost + +build-rollup-boost: + docker buildx build -t rollup-boost:latest -f Dockerfile.rollup-boost . + +build-world-chain: docker buildx build -t world-chain-builder:latest -f ../world-chain-builder/Dockerfile ../world-chain-builder diff --git a/devnet/src/engine/rollup-boost/rollup_boost_launcher.star b/devnet/src/engine/rollup-boost/rollup_boost_launcher.star index 754cd37..d6ca1a4 100644 --- a/devnet/src/engine/rollup-boost/rollup_boost_launcher.star +++ b/devnet/src/engine/rollup-boost/rollup_boost_launcher.star @@ -84,6 +84,7 @@ def get_config( public_ports = {} cmd = [ + "/app/rollup-boost", "--jwt-path=" + constants.JWT_MOUNT_PATH_ON_CONTAINER, "--l2-url={0}".format(L2_EXECUTION_ENGINE_ENDPOINT), "--builder-url={0}".format(BUILDER_EXECUTION_ENGINE_ENDPOINT), diff --git a/devnet/src/package_io/input_parser.star b/devnet/src/package_io/input_parser.star index 726723a..f047b8f 100644 --- a/devnet/src/package_io/input_parser.star +++ b/devnet/src/package_io/input_parser.star @@ -15,7 +15,7 @@ DEFAULT_EL_IMAGES = { } DEFAULT_ENGINE_IMAGES = { - "rollup-boost": "docker.io/leytont/rollup-boost:latest", + "rollup-boost": "rollup-boost:latest", } DEFAULT_CL_IMAGES = { diff --git a/world-chain-builder/src/primitives.rs b/world-chain-builder/src/primitives.rs index 7030562..b187c0e 100644 --- a/world-chain-builder/src/primitives.rs +++ b/world-chain-builder/src/primitives.rs @@ -177,7 +177,7 @@ mod tests { for hex_data in &input_too_short { let input_rlp = &mut &hex_data[..]; - let res = WorldChainPooledTransactionsElement::decode(input_rlp); + let res = WorldChainPooledTransactionsElement::decode_2718(input_rlp); assert!( res.is_err(), @@ -187,7 +187,7 @@ mod tests { // this is a legacy tx so we can attempt the same test with decode_enveloped let input_rlp = &mut &hex_data[..]; - let res = WorldChainPooledTransactionsElement::decode(input_rlp); + let res = WorldChainPooledTransactionsElement::decode_2718(input_rlp); assert!( res.is_err(), @@ -224,7 +224,7 @@ mod tests { let data = &hex!("d30b02808083c5cdeb8783c5acfd9e407c565656")[..]; let input_rlp = &mut &data[..]; - let res = WorldChainPooledTransactionsElement::decode(input_rlp); + let res = WorldChainPooledTransactionsElement::decode_2718(input_rlp); println!("{:?}", res); assert!(matches!(res, Ok(_tx))); assert!(input_rlp.is_empty()); @@ -237,7 +237,7 @@ mod tests { assert!(input_rlp.is_empty()); // we can also decode_enveloped - let res = WorldChainPooledTransactionsElement::decode(&mut &data[..]); + let res = WorldChainPooledTransactionsElement::decode_2718(&mut &data[..]); assert!(matches!(res, Ok(_tx))); } } From e25242fe247ba12443d9106a0685ae5fdaa91e90 Mon Sep 17 00:00:00 2001 From: 0xOsiris Date: Tue, 29 Oct 2024 12:03:06 -0700 Subject: [PATCH 11/13] chore: cleanup e2e --- world-chain-builder/src/test/e2e/mod.rs | 28 ++++++++++--------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/world-chain-builder/src/test/e2e/mod.rs b/world-chain-builder/src/test/e2e/mod.rs index 102b627..7679fee 100644 --- a/world-chain-builder/src/test/e2e/mod.rs +++ b/world-chain-builder/src/test/e2e/mod.rs @@ -24,7 +24,7 @@ use alloy_network::{Ethereum, EthereumWallet, TransactionBuilder}; use alloy_rpc_types::{TransactionInput, TransactionRequest}; use alloy_signer_local::PrivateKeySigner; use chrono::Utc; -use reth::builder::{NodeAdapter, NodeBuilder, NodeConfig, NodeHandle}; +use reth::{builder::{NodeAdapter, NodeBuilder, NodeConfig, NodeHandle}, transaction_pool::Pool}; use reth::payload::{EthPayloadBuilderAttributes, PayloadId}; use reth::tasks::TaskManager; use reth::transaction_pool::{blobstore::DiskFileBlobStore, TransactionValidationTaskExecutor}; @@ -63,20 +63,6 @@ use std::{ pub const DEV_CHAIN_ID: u64 = 8453; -// Type aliases - -// /// Type alias for a type of `NodeHelper` -// pub type NodeHelperType>> = -// NodeTestContext, AO>; - -pub struct WorldChainBuilderTestContext { - pub pbh_wallets: Vec, - pub tree: LazyPoseidonTree, - pub tasks: TaskManager, - pub node: Adapter, - pub identities: HashMap, -} - type Adapter = NodeTestContext< NodeAdapter< FullNodeTypesAdapter< @@ -85,7 +71,7 @@ type Adapter = NodeTestContext< NodeTypesWithDBAdapter>>, >, >, - reth::builder::components::Components< + Components< FullNodeTypesAdapter< NodeTypesWithDBAdapter>>, BlockchainProvider< @@ -127,7 +113,7 @@ type Adapter = NodeTestContext< NodeTypesWithDBAdapter>>, >, >, - reth::transaction_pool::Pool< + Pool< TransactionValidationTaskExecutor< WorldChainTransactionValidator< BlockchainProvider< @@ -150,6 +136,14 @@ type Adapter = NodeTestContext< >, >; +pub struct WorldChainBuilderTestContext { + pub pbh_wallets: Vec, + pub tree: LazyPoseidonTree, + pub tasks: TaskManager, + pub node: Adapter, + pub identities: HashMap, +} + impl WorldChainBuilderTestContext { pub async fn setup() -> eyre::Result { let wallets = Wallet::new(20).with_chain_id(DEV_CHAIN_ID).gen(); From ba0998cc6239a86cb55a8d45f92418930fc8dbd2 Mon Sep 17 00:00:00 2001 From: 0xOsiris Date: Tue, 29 Oct 2024 12:08:20 -0700 Subject: [PATCH 12/13] cleanup types --- world-chain-builder/src/test/e2e/mod.rs | 79 +++++++------------------ 1 file changed, 20 insertions(+), 59 deletions(-) diff --git a/world-chain-builder/src/test/e2e/mod.rs b/world-chain-builder/src/test/e2e/mod.rs index 7679fee..f843de8 100644 --- a/world-chain-builder/src/test/e2e/mod.rs +++ b/world-chain-builder/src/test/e2e/mod.rs @@ -24,7 +24,7 @@ use alloy_network::{Ethereum, EthereumWallet, TransactionBuilder}; use alloy_rpc_types::{TransactionInput, TransactionRequest}; use alloy_signer_local::PrivateKeySigner; use chrono::Utc; -use reth::{builder::{NodeAdapter, NodeBuilder, NodeConfig, NodeHandle}, transaction_pool::Pool}; +use reth::builder::{NodeAdapter, NodeBuilder, NodeConfig, NodeHandle}; use reth::payload::{EthPayloadBuilderAttributes, PayloadId}; use reth::tasks::TaskManager; use reth::transaction_pool::{blobstore::DiskFileBlobStore, TransactionValidationTaskExecutor}; @@ -63,79 +63,40 @@ use std::{ pub const DEV_CHAIN_ID: u64 = 8453; -type Adapter = NodeTestContext< - NodeAdapter< +type NodeAdapterType = NodeAdapter< + FullNodeTypesAdapter< + NodeTypesWithDBAdapter>>, + BlockchainProvider< + NodeTypesWithDBAdapter>>, + >, + >, + Components< FullNodeTypesAdapter< NodeTypesWithDBAdapter>>, BlockchainProvider< NodeTypesWithDBAdapter>>, >, >, - Components< - FullNodeTypesAdapter< - NodeTypesWithDBAdapter>>, - BlockchainProvider< - NodeTypesWithDBAdapter>>, - >, - >, - reth::transaction_pool::Pool< - TransactionValidationTaskExecutor< - WorldChainTransactionValidator< - BlockchainProvider< - NodeTypesWithDBAdapter< - WorldChainBuilder, - Arc>, - >, - >, - WorldChainPooledTransaction, - >, - >, - WorldChainOrdering, - DiskFileBlobStore, - >, - OptimismEvmConfig, - BasicBlockExecutorProvider, - Arc<(dyn reth_consensus::Consensus + 'static)>, - >, - >, - WorldChainAddOns< - NodeAdapter< - FullNodeTypesAdapter< - NodeTypesWithDBAdapter>>, - BlockchainProvider< - NodeTypesWithDBAdapter>>, - >, - >, - Components< - FullNodeTypesAdapter< - NodeTypesWithDBAdapter>>, + reth::transaction_pool::Pool< + TransactionValidationTaskExecutor< + WorldChainTransactionValidator< BlockchainProvider< NodeTypesWithDBAdapter>>, >, + WorldChainPooledTransaction, >, - Pool< - TransactionValidationTaskExecutor< - WorldChainTransactionValidator< - BlockchainProvider< - NodeTypesWithDBAdapter< - WorldChainBuilder, - Arc>, - >, - >, - WorldChainPooledTransaction, - >, - >, - WorldChainOrdering, - DiskFileBlobStore, - >, - OptimismEvmConfig, - BasicBlockExecutorProvider, - Arc<(dyn reth_consensus::Consensus + 'static)>, >, + WorldChainOrdering, + DiskFileBlobStore, >, + OptimismEvmConfig, + BasicBlockExecutorProvider, + Arc<(dyn reth_consensus::Consensus + 'static)>, >, >; +type Adapter = NodeTestContext>; + pub struct WorldChainBuilderTestContext { pub pbh_wallets: Vec, pub tree: LazyPoseidonTree, From 38de965221e2503524caf8c43926032a335b1b56 Mon Sep 17 00:00:00 2001 From: 0xOsiris Date: Tue, 29 Oct 2024 12:10:06 -0700 Subject: [PATCH 13/13] always run block building ci --- .github/workflows/devnet-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/devnet-ci.yml b/.github/workflows/devnet-ci.yml index 15b63af..d0b5c97 100644 --- a/.github/workflows/devnet-ci.yml +++ b/.github/workflows/devnet-ci.yml @@ -2,7 +2,6 @@ name: Block Building CI on: pull_request: branches: [main] - types: [review_requested, ready_for_review] workflow_dispatch: env: