From 756a6e0caa7385060384bd299e5ebea04e94ead9 Mon Sep 17 00:00:00 2001 From: refcell Date: Sat, 30 Nov 2024 08:38:51 -0500 Subject: [PATCH 1/3] extend engine api trait --- crates/engine/src/client.rs | 11 ++++++++++- crates/engine/src/traits.rs | 9 ++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/crates/engine/src/client.rs b/crates/engine/src/client.rs index f908628..294a112 100644 --- a/crates/engine/src/client.rs +++ b/crates/engine/src/client.rs @@ -7,6 +7,7 @@ use alloy_provider::{ReqwestProvider, RootProvider}; use alloy_rpc_client::RpcClient; use alloy_rpc_types_engine::{ ExecutionPayloadV3, ForkchoiceState, ForkchoiceUpdated, JwtSecret, PayloadId, PayloadStatus, + ExecutionPayloadEnvelopeV2, }; use alloy_transport_http::{ hyper_util::{ @@ -64,13 +65,21 @@ impl EngineClient { impl Engine for EngineClient { type Error = EngineError; - async fn get_payload( + async fn get_payload_v2( + &self, + payload_id: PayloadId, + ) -> Result { + self.engine.get_payload_v2(payload_id).await.map_err(|_| EngineError::PayloadError) + } + + async fn get_payload_v3( &self, payload_id: PayloadId, ) -> Result { self.engine.get_payload_v3(payload_id).await.map_err(|_| EngineError::PayloadError) } + async fn forkchoice_update( &self, state: ForkchoiceState, diff --git a/crates/engine/src/traits.rs b/crates/engine/src/traits.rs index ae923b9..cec49e4 100644 --- a/crates/engine/src/traits.rs +++ b/crates/engine/src/traits.rs @@ -4,6 +4,7 @@ use alloy_eips::eip1898::BlockNumberOrTag; use alloy_primitives::B256; use alloy_rpc_types_engine::{ ExecutionPayloadV3, ForkchoiceState, ForkchoiceUpdated, PayloadId, PayloadStatus, + ExecutionPayloadEnvelopeV2, }; use async_trait::async_trait; use op_alloy_protocol::L2BlockInfo; @@ -17,7 +18,13 @@ pub trait Engine { type Error: core::fmt::Debug; /// Gets a payload for the given payload id. - async fn get_payload( + async fn get_payload_v2( + &self, + payload_id: PayloadId, + ) -> Result; + + /// Gets a payload for the given payload id. + async fn get_payload_v3( &self, payload_id: PayloadId, ) -> Result; From be165b2377cff225354639ee26ef199a57937274 Mon Sep 17 00:00:00 2001 From: refcell Date: Mon, 2 Dec 2024 18:20:30 -0500 Subject: [PATCH 2/3] flesh out the engine controller --- Cargo.lock | 556 +++++++++++++++----------------- Cargo.toml | 4 +- crates/engine/Cargo.toml | 1 + crates/engine/src/client.rs | 20 +- crates/engine/src/controller.rs | 291 ++++++++++++++--- crates/engine/src/errors.rs | 23 ++ crates/engine/src/lib.rs | 2 +- crates/engine/src/traits.rs | 12 +- 8 files changed, 563 insertions(+), 346 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 22963d4..d810b61 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -91,9 +91,9 @@ dependencies = [ [[package]] name = "allocator-api2" -version = "0.2.20" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45862d1c77f2228b9e10bc609d5bc203d86ebc9b87ad8d5d5167a6c9abf739d9" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" [[package]] name = "alloy-chains" @@ -129,14 +129,14 @@ dependencies = [ [[package]] name = "alloy-consensus" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a1ff8439834ab71a4b0ecd1a8ff80b3921c87615f158940c3364f399c732786" +checksum = "73dd0ab7003dfa3efd252e423873cd3bc241d1456147e752f995cc8aabd1d1f6" dependencies = [ - "alloy-eips 0.7.0", + "alloy-eips 0.7.2", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.7.0", + "alloy-serde 0.7.2", "alloy-trie", "auto_impl", "c-kzg", @@ -147,15 +147,15 @@ dependencies = [ [[package]] name = "alloy-consensus-any" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "519a86faaa6729464365a90c04eba68539b6d3a30f426edb4b3dafd78920d42f" +checksum = "d08234c0eece0e08602db5095a16dc942cad91967cccfcfc2c6a42c25563964f" dependencies = [ - "alloy-consensus 0.7.0", - "alloy-eips 0.7.0", + "alloy-consensus 0.7.2", + "alloy-eips 0.7.2", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.7.0", + "alloy-serde 0.7.2", "serde", ] @@ -209,15 +209,15 @@ dependencies = [ [[package]] name = "alloy-eips" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dedb328c2114284f767e075589ca9de8d5e9c8a91333402f4804a584ed71a38" +checksum = "50c242de43a1869bcb2fbce3b377130959d10dfd562b87ac7aa2f04d98baac51" dependencies = [ "alloy-eip2930", "alloy-eip7702", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.7.0", + "alloy-serde 0.7.2", "c-kzg", "derive_more", "ethereum_ssz", @@ -266,15 +266,15 @@ dependencies = [ [[package]] name = "alloy-json-rpc" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "254f770918f96dc4ec88a15e6e2e243358e1719d66b40ef814428e7697079d25" +checksum = "6c15c11661571a19a06896663c93e804ccf013159275a89a98e892014df514d8" dependencies = [ "alloy-primitives", "alloy-sol-types", "serde", "serde_json", - "thiserror 1.0.69", + "thiserror 2.0.3", "tracing", ] @@ -303,27 +303,27 @@ dependencies = [ [[package]] name = "alloy-network" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "931dd176c6e33355f3dc0170ec69cf5b951f4d73870b276e2c837ab35f9c5136" +checksum = "60dd0b99eaa5e715dd90d42021f7f08a0a70976ea84f41a0ad233770e0c1962b" dependencies = [ - "alloy-consensus 0.7.0", + "alloy-consensus 0.7.2", "alloy-consensus-any", - "alloy-eips 0.7.0", - "alloy-json-rpc 0.7.0", - "alloy-network-primitives 0.7.0", + "alloy-eips 0.7.2", + "alloy-json-rpc 0.7.2", + "alloy-network-primitives 0.7.2", "alloy-primitives", "alloy-rpc-types-any", - "alloy-rpc-types-eth 0.7.0", - "alloy-serde 0.7.0", - "alloy-signer 0.7.0", + "alloy-rpc-types-eth 0.7.2", + "alloy-serde 0.7.2", + "alloy-signer 0.7.2", "alloy-sol-types", "async-trait", "auto_impl", "futures-utils-wasm", "serde", "serde_json", - "thiserror 1.0.69", + "thiserror 2.0.3", ] [[package]] @@ -341,14 +341,14 @@ dependencies = [ [[package]] name = "alloy-network-primitives" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa6ec0f23be233e851e31c5e4badfedfa9c7bc177bc37f4e03616072cd40a806" +checksum = "18abfc73ce48f074c8bc6e05c1f08ef0b1ddc9b04f191a821d0beb9470a42a29" dependencies = [ - "alloy-consensus 0.7.0", - "alloy-eips 0.7.0", + "alloy-consensus 0.7.2", + "alloy-eips 0.7.2", "alloy-primitives", - "alloy-serde 0.7.0", + "alloy-serde 0.7.2", "serde", ] @@ -369,7 +369,7 @@ dependencies = [ "getrandom", "hashbrown 0.15.2", "hex-literal", - "indexmap 2.6.0", + "indexmap 2.7.0", "itoa", "k256", "keccak-asm", @@ -378,7 +378,7 @@ dependencies = [ "proptest-derive", "rand", "ruint", - "rustc-hash 2.0.0", + "rustc-hash 2.1.0", "serde", "sha3", "tiny-keccak", @@ -386,20 +386,20 @@ dependencies = [ [[package]] name = "alloy-provider" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5545e2cbf2f8f24c68bb887ba0294fa12a2f816b9e72c4f226cd137b77d0e294" +checksum = "4933c761f10e44d5e901804b56efb2ce6e0945e6c57d2fa1e5ace303fae6f74a" dependencies = [ "alloy-chains", - "alloy-consensus 0.7.0", - "alloy-eips 0.7.0", - "alloy-json-rpc 0.7.0", - "alloy-network 0.7.0", - "alloy-network-primitives 0.7.0", + "alloy-consensus 0.7.2", + "alloy-eips 0.7.2", + "alloy-json-rpc 0.7.2", + "alloy-network 0.7.2", + "alloy-network-primitives 0.7.2", "alloy-primitives", "alloy-pubsub", "alloy-rpc-client", - "alloy-rpc-types-eth 0.7.0", + "alloy-rpc-types-eth 0.7.2", "alloy-transport", "alloy-transport-http", "alloy-transport-ipc", @@ -417,7 +417,7 @@ dependencies = [ "schnellru", "serde", "serde_json", - "thiserror 1.0.69", + "thiserror 2.0.3", "tokio", "tracing", "url", @@ -426,11 +426,11 @@ dependencies = [ [[package]] name = "alloy-pubsub" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b633f7731a3df2f4f334001bf80436565113816c5aa5c136c1ded563051e049b" +checksum = "808719714bfb2aa24b0eb2a38411ce8e654ba11c0ebf2a6648fcbe9fabfe696d" dependencies = [ - "alloy-json-rpc 0.7.0", + "alloy-json-rpc 0.7.2", "alloy-primitives", "alloy-transport", "bimap", @@ -462,16 +462,16 @@ checksum = "2b09cae092c27b6f1bde952653a22708691802e57bfef4a2973b80bea21efd3f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] name = "alloy-rpc-client" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aed9e40c2a73265ebf70f1e48303ee55920282e1ea5971e832873fb2d32cea74" +checksum = "6ce26c25efb8290b6ba559ae6c40bf6630d337e107ae242e5790501420dba7b7" dependencies = [ - "alloy-json-rpc 0.7.0", + "alloy-json-rpc 0.7.2", "alloy-primitives", "alloy-pubsub", "alloy-transport", @@ -518,29 +518,28 @@ dependencies = [ [[package]] name = "alloy-rpc-types-any" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79d7620e22d6ed7c58451dd303d0501ade5a8bec9dc8daef0fbc48ceffabbae1" +checksum = "abca110e59f760259e26d0c84912121468008aba48dd227af0f306cfd7bce9ae" dependencies = [ - "alloy-consensus 0.7.0", "alloy-consensus-any", - "alloy-rpc-types-eth 0.7.0", - "alloy-serde 0.7.0", + "alloy-rpc-types-eth 0.7.2", + "alloy-serde 0.7.2", ] [[package]] name = "alloy-rpc-types-beacon" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdbfc1b5ee81b1ef6d5e770f3bd6018eab66c7ac2ee1e897f88973b327e2fc20" +checksum = "45c8db5fb70d2fece7bc1cd5adf42e72fc8a23547adeff8f558d9063f1e7788c" dependencies = [ - "alloy-eips 0.7.0", + "alloy-eips 0.7.2", "alloy-primitives", - "alloy-rpc-types-engine 0.7.0", - "alloy-serde 0.7.0", + "alloy-rpc-types-engine 0.7.2", + "alloy-serde 0.7.2", "serde", "serde_with", - "thiserror 1.0.69", + "thiserror 2.0.3", ] [[package]] @@ -563,15 +562,15 @@ dependencies = [ [[package]] name = "alloy-rpc-types-engine" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb843daa6feb011475f0db8c499fff5ac62e1e6012fc01d97477ddb3217a83f" +checksum = "d3b000c7f3469e7faa575ba70207294cf07e91dfd6ce4d04d5d5d8069f974a66" dependencies = [ - "alloy-consensus 0.7.0", - "alloy-eips 0.7.0", + "alloy-consensus 0.7.2", + "alloy-eips 0.7.2", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.7.0", + "alloy-serde 0.7.2", "derive_more", "ethereum_ssz", "ethereum_ssz_derive", @@ -602,17 +601,17 @@ dependencies = [ [[package]] name = "alloy-rpc-types-eth" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df34b88df4deeac9ecfc80ad7cbb26a33e57437b9db8be5b952792feef6134bc" +checksum = "3468e7385fbb86b0fde5497d685c02f765ea09d36f7e07c5d1c9a52b077d38e2" dependencies = [ - "alloy-consensus 0.7.0", + "alloy-consensus 0.7.2", "alloy-consensus-any", - "alloy-eips 0.7.0", - "alloy-network-primitives 0.7.0", + "alloy-eips 0.7.2", + "alloy-network-primitives 0.7.2", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.7.0", + "alloy-serde 0.7.2", "alloy-sol-types", "derive_more", "itertools 0.13.0", @@ -648,9 +647,9 @@ dependencies = [ [[package]] name = "alloy-serde" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a89fd4cc3f96b3c5c0dd1cebeb63323e4659bbdc837117fa3fd5ac168df7d9" +checksum = "42de6002e2154b50b3568aea27e26bd9caf7b754658f43065f2e9b6ee0a8c839" dependencies = [ "alloy-primitives", "serde", @@ -673,16 +672,16 @@ dependencies = [ [[package]] name = "alloy-signer" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "532010243a96d1f8593c2246ec3971bc52303884fa1e43ca0a776798ba178910" +checksum = "f288a9a25e2578dab17845fd8d2be1d32de33565783ed185ded161a65f92381b" dependencies = [ "alloy-primitives", "async-trait", "auto_impl", "elliptic-curve", "k256", - "thiserror 1.0.69", + "thiserror 2.0.3", ] [[package]] @@ -696,7 +695,7 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -708,11 +707,11 @@ dependencies = [ "alloy-sol-macro-input", "const-hex", "heck", - "indexmap 2.6.0", + "indexmap 2.7.0", "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", "syn-solidity", "tiny-keccak", ] @@ -728,7 +727,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", "syn-solidity", ] @@ -757,17 +756,17 @@ dependencies = [ [[package]] name = "alloy-transport" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6f295f4b745fb9e4e663d70bc57aed991288912c7aaaf25767def921050ee43" +checksum = "90352f4cf78017905c3244f48b38fadc345970bbc9095087c0f985a580550488" dependencies = [ - "alloy-json-rpc 0.7.0", + "alloy-json-rpc 0.7.2", "base64 0.22.1", "futures-util", "futures-utils-wasm", "serde", "serde_json", - "thiserror 1.0.69", + "thiserror 2.0.3", "tokio", "tower", "tracing", @@ -777,12 +776,12 @@ dependencies = [ [[package]] name = "alloy-transport-http" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39139015a5ec127d9c895b49b484608e27fe4538544f84cdf5eae0bd36339bc6" +checksum = "7d26c94d51fa8b1aee3d15db113dd0773776c02bb36dbaa2590b900dadd7e7d0" dependencies = [ - "alloy-json-rpc 0.7.0", - "alloy-rpc-types-engine 0.7.0", + "alloy-json-rpc 0.7.2", + "alloy-rpc-types-engine 0.7.2", "alloy-transport", "http-body-util", "hyper 1.5.1", @@ -797,11 +796,11 @@ dependencies = [ [[package]] name = "alloy-transport-ipc" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b4f865b13bb8648e93f812b19b74838b9165212a2beb95fc386188c443a5e3" +checksum = "14c498fcdec50650be6b6a22ce7928a1b2738086b4f94f31b132e83498d45bbb" dependencies = [ - "alloy-json-rpc 0.7.0", + "alloy-json-rpc 0.7.2", "alloy-pubsub", "alloy-transport", "bytes", @@ -816,9 +815,9 @@ dependencies = [ [[package]] name = "alloy-transport-ws" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6af91e3521b8b3eac26809b1c6f9b86e3ed455dfab812f036836aabdf709b921" +checksum = "cd7b21335b55c9f715e2acca0228dc1d6880d961756916c13a9ce70f9f413e70" dependencies = [ "alloy-pubsub", "alloy-transport", @@ -929,7 +928,7 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -1113,7 +1112,7 @@ checksum = "965c2d33e53cb6b267e148a4cb0760bc01f4904c1cd4bb4002a085bb016d1490" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", "synstructure", ] @@ -1125,7 +1124,7 @@ checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -1183,7 +1182,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -1194,7 +1193,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -1256,7 +1255,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -1346,7 +1345,7 @@ dependencies = [ "regex", "rustc-hash 1.1.0", "shlex", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -1552,9 +1551,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd9de9f2205d5ef3fd67e685b0df337994ddd4495e2a28d185500d0e1edfea47" +checksum = "f34d93e62b03caf570cccc334cbc6c2fceca82f39211051345108adcba3eebdc" dependencies = [ "jobserver", "libc", @@ -1674,7 +1673,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -1917,7 +1916,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -1941,7 +1940,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -1952,7 +1951,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -2060,7 +2059,7 @@ checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -2081,7 +2080,7 @@ dependencies = [ "convert_case", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", "unicode-xid", ] @@ -2220,7 +2219,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -2368,7 +2367,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -2379,7 +2378,7 @@ checksum = "2f9ed6b3789237c8a0c1c505af1c7eb2c560df6186f01b098c3a1064ea532f38" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -2436,7 +2435,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -2452,9 +2451,9 @@ dependencies = [ [[package]] name = "event-listener-strategy" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" +checksum = "3c3e4e0dd3673c1139bf041f3008816d9cf2946bbfac2945c09e523b8d7b05b2" dependencies = [ "event-listener", "pin-project-lite", @@ -2645,7 +2644,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -2782,7 +2781,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.6.0", + "indexmap 2.7.0", "slab", "tokio", "tokio-util", @@ -2801,7 +2800,7 @@ dependencies = [ "futures-core", "futures-sink", "http 1.1.0", - "indexmap 2.6.0", + "indexmap 2.7.0", "slab", "tokio", "tokio-util", @@ -2946,13 +2945,13 @@ dependencies = [ name = "hilo-driver" version = "0.11.0" dependencies = [ - "alloy-consensus 0.7.0", - "alloy-eips 0.7.0", - "alloy-network 0.7.0", + "alloy-consensus 0.7.2", + "alloy-eips 0.7.2", + "alloy-network 0.7.2", "alloy-primitives", "alloy-provider", - "alloy-rpc-types-engine 0.7.0", - "alloy-rpc-types-eth 0.7.0", + "alloy-rpc-types-engine 0.7.2", + "alloy-rpc-types-eth 0.7.2", "alloy-transport", "async-trait", "eyre", @@ -2980,19 +2979,20 @@ dependencies = [ name = "hilo-engine" version = "0.11.0" dependencies = [ - "alloy-consensus 0.7.0", - "alloy-eips 0.7.0", - "alloy-network 0.7.0", + "alloy-consensus 0.7.2", + "alloy-eips 0.7.2", + "alloy-network 0.7.2", "alloy-primitives", "alloy-provider", "alloy-rpc-client", - "alloy-rpc-types-engine 0.7.0", - "alloy-rpc-types-eth 0.7.0", + "alloy-rpc-types-engine 0.7.2", + "alloy-rpc-types-eth 0.7.2", "alloy-transport-http", "async-trait", "hilo-providers-alloy", "http-body-util", "kona-driver", + "op-alloy-consensus 0.7.2", "op-alloy-genesis", "op-alloy-protocol", "op-alloy-provider", @@ -3010,7 +3010,7 @@ version = "0.11.0" dependencies = [ "alloy-primitives", "alloy-rlp", - "alloy-rpc-types-engine 0.7.0", + "alloy-rpc-types-engine 0.7.2", "arbitrary", "arbtest", "discv5 0.9.0", @@ -3032,7 +3032,7 @@ name = "hilo-node" version = "0.11.0" dependencies = [ "alloy-primitives", - "alloy-rpc-types-engine 0.7.0", + "alloy-rpc-types-engine 0.7.2", "alloy-transport", "hilo-driver", "op-alloy-genesis", @@ -3048,19 +3048,19 @@ dependencies = [ name = "hilo-providers-alloy" version = "0.11.0" dependencies = [ - "alloy-consensus 0.7.0", - "alloy-eips 0.7.0", + "alloy-consensus 0.7.2", + "alloy-eips 0.7.2", "alloy-primitives", "alloy-provider", "alloy-rlp", "alloy-rpc-types-beacon", - "alloy-serde 0.7.0", + "alloy-serde 0.7.2", "alloy-transport", "async-trait", "eyre", "kona-derive", "lru", - "op-alloy-consensus 0.7.1", + "op-alloy-consensus 0.7.2", "op-alloy-genesis", "op-alloy-protocol", "parking_lot", @@ -3076,13 +3076,13 @@ dependencies = [ name = "hilo-providers-local" version = "0.11.0" dependencies = [ - "alloy-consensus 0.7.0", - "alloy-eips 0.7.0", + "alloy-consensus 0.7.2", + "alloy-eips 0.7.2", "alloy-primitives", "async-trait", "derive_more", "kona-derive", - "op-alloy-consensus 0.7.1", + "op-alloy-consensus 0.7.2", "op-alloy-genesis", "op-alloy-protocol", "parking_lot", @@ -3459,7 +3459,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -3578,7 +3578,7 @@ checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -3619,9 +3619,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" +checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" dependencies = [ "arbitrary", "equivalent", @@ -3742,10 +3742,11 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.72" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" +checksum = "a865e038f7f6ed956f788f0d7d60c541fff74c7bd74272c5d4cf15c63743e705" dependencies = [ + "once_cell", "wasm-bindgen", ] @@ -3826,15 +3827,15 @@ dependencies = [ [[package]] name = "kona-derive" version = "0.1.0" -source = "git+https://github.com/anton-rs/kona?branch=rf/bump-other-deps#ca33a9c744c31f21115403c2bce0d5eebbe19ccc" +source = "git+https://github.com/anton-rs/kona?branch=rf/fix/executor-trait#525151e574df9ba0b9deaae64975af0ac7483ea8" dependencies = [ - "alloy-consensus 0.7.0", - "alloy-eips 0.7.0", + "alloy-consensus 0.7.2", + "alloy-eips 0.7.2", "alloy-primitives", "alloy-rlp", - "alloy-rpc-types-engine 0.7.0", + "alloy-rpc-types-engine 0.7.2", "async-trait", - "op-alloy-consensus 0.7.1", + "op-alloy-consensus 0.7.2", "op-alloy-genesis", "op-alloy-protocol", "op-alloy-rpc-types-engine", @@ -3845,14 +3846,14 @@ dependencies = [ [[package]] name = "kona-driver" version = "0.1.0" -source = "git+https://github.com/anton-rs/kona?branch=rf/bump-other-deps#ca33a9c744c31f21115403c2bce0d5eebbe19ccc" +source = "git+https://github.com/anton-rs/kona?branch=rf/fix/executor-trait#525151e574df9ba0b9deaae64975af0ac7483ea8" dependencies = [ - "alloy-consensus 0.7.0", + "alloy-consensus 0.7.2", "alloy-primitives", "alloy-rlp", "async-trait", "kona-derive", - "op-alloy-consensus 0.7.1", + "op-alloy-consensus 0.7.2", "op-alloy-genesis", "op-alloy-protocol", "op-alloy-rpc-types-engine", @@ -3906,15 +3907,15 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.166" +version = "0.2.167" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2ccc108bbc0b1331bd061864e7cd823c0cab660bbe6970e66e2c0614decde36" +checksum = "09d6582e104315a817dff97f75133544b2e094ee22447d2acf4a74e189ba06fc" [[package]] name = "libloading" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" +checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" dependencies = [ "cfg-if", "windows-targets 0.52.6", @@ -4216,7 +4217,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -4463,7 +4464,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -4476,7 +4477,7 @@ dependencies = [ "http-body-util", "hyper 1.5.1", "hyper-util", - "indexmap 2.6.0", + "indexmap 2.7.0", "ipnet", "metrics", "metrics-util", @@ -4535,11 +4536,10 @@ dependencies = [ [[package]] name = "mio" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" +checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" dependencies = [ - "hermit-abi 0.3.9", "libc", "wasi", "windows-sys 0.52.0", @@ -4738,7 +4738,7 @@ name = "node" version = "0.1.0" dependencies = [ "alloy-primitives", - "alloy-rpc-types-engine 0.7.0", + "alloy-rpc-types-engine 0.7.2", "clap", "eyre", "hilo-engine", @@ -4797,16 +4797,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "nu-ansi-term" -version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" -dependencies = [ - "overload", - "winapi", -] - [[package]] name = "num" version = "0.4.3" @@ -4914,7 +4904,7 @@ checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -4987,15 +4977,15 @@ dependencies = [ [[package]] name = "op-alloy-consensus" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75353c94e7515fac7d3c280bae56bff3375784a05cb44b317260606292ff6ba9" +checksum = "77284451ec70602f148f4f3bc6d1106fdfefd57c11ff459c4b2985e400ed1a18" dependencies = [ - "alloy-consensus 0.7.0", - "alloy-eips 0.7.0", + "alloy-consensus 0.7.2", + "alloy-eips 0.7.2", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.7.0", + "alloy-serde 0.7.2", "derive_more", "serde", "thiserror 2.0.3", @@ -5003,12 +4993,12 @@ dependencies = [ [[package]] name = "op-alloy-genesis" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f24feef0404861c836b8fc0a3eb0cf6f20507e63ab59a61eeb1491c0f57bc352" +checksum = "c912ec93ec839076e8bbaaf7bd3d80aeedbe38cd5e8e3e76dfc67d217637e651" dependencies = [ - "alloy-consensus 0.7.0", - "alloy-eips 0.7.0", + "alloy-consensus 0.7.2", + "alloy-eips 0.7.2", "alloy-primitives", "alloy-sol-types", "serde", @@ -5018,21 +5008,21 @@ dependencies = [ [[package]] name = "op-alloy-protocol" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef2ab185601941f4ed04418d71e42b220a9c59353c8fb98ba8993c42590c6742" +checksum = "9ab24c1b9c21cedd691938b5667c951b04ae8b89429d7cb7a88f30afb79cbbf1" dependencies = [ "alloc-no-stdlib", - "alloy-consensus 0.7.0", - "alloy-eips 0.7.0", + "alloy-consensus 0.7.2", + "alloy-eips 0.7.2", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.7.0", + "alloy-serde 0.7.2", "async-trait", "brotli", "cfg-if", "miniz_oxide", - "op-alloy-consensus 0.7.1", + "op-alloy-consensus 0.7.2", "op-alloy-genesis", "serde", "thiserror 2.0.3", @@ -5042,14 +5032,14 @@ dependencies = [ [[package]] name = "op-alloy-provider" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75972ee077d53ee911e7c80a6547199bc0bccbac4de53b1b77aa9b5031d031c8" +checksum = "4397a09aa793cec532dd6cee03765c9f8cb9ad4b23c2ef296547aacb4924f6aa" dependencies = [ - "alloy-network 0.7.0", + "alloy-network 0.7.2", "alloy-primitives", "alloy-provider", - "alloy-rpc-types-engine 0.7.0", + "alloy-rpc-types-engine 0.7.2", "alloy-transport", "async-trait", "op-alloy-rpc-types-engine", @@ -5057,9 +5047,9 @@ dependencies = [ [[package]] name = "op-alloy-registry" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "049784ddeef0454208c70592c62017159c5d93857d8269880b96fc734d199401" +checksum = "6d00f7795114ff4d78cfa64f6cefc3502fd0aefeeac9044f25b6201e5db8d14d" dependencies = [ "alloy-primitives", "lazy_static", @@ -5088,17 +5078,17 @@ dependencies = [ [[package]] name = "op-alloy-rpc-types-engine" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eeff9cf6fcdf8ef7183f254f9ad59b6e87af5084f21dfa17ba00c4448a84ddf1" +checksum = "b07175fcfd9d03a587ece7ce79fc288331e6d9ae523464eb677c751d5737713b" dependencies = [ - "alloy-eips 0.7.0", + "alloy-eips 0.7.2", "alloy-primitives", - "alloy-rpc-types-engine 0.7.0", - "alloy-serde 0.7.0", + "alloy-rpc-types-engine 0.7.2", + "alloy-serde 0.7.2", "derive_more", "ethereum_ssz", - "op-alloy-consensus 0.7.1", + "op-alloy-consensus 0.7.2", "op-alloy-protocol", "serde", "snap", @@ -5134,7 +5124,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -5171,12 +5161,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" -[[package]] -name = "overload" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" - [[package]] name = "page_size" version = "0.6.0" @@ -5189,9 +5173,9 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "3.7.0" +version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8be4817d39f3272f69c59fe05d0535ae6456c2dc2fa1ba02910296c7e0a5c590" +checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" dependencies = [ "arrayvec", "bitvec", @@ -5199,20 +5183,19 @@ dependencies = [ "bytes", "impl-trait-for-tuples", "parity-scale-codec-derive", - "rustversion", "serde", ] [[package]] name = "parity-scale-codec-derive" -version = "3.7.0" +version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8781a75c6205af67215f382092b6e0a4ff3734798523e69073d4bcd294ec767b" +checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.89", + "syn 1.0.109", ] [[package]] @@ -5304,7 +5287,7 @@ checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -5433,7 +5416,7 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -5465,7 +5448,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -5496,7 +5479,7 @@ checksum = "6ff7ff745a347b87471d859a377a9a404361e7efc2a971d73424a6d183c0fc77" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -5553,7 +5536,7 @@ dependencies = [ "pin-project-lite", "quinn-proto", "quinn-udp", - "rustc-hash 2.0.0", + "rustc-hash 2.1.0", "rustls", "socket2", "thiserror 2.0.3", @@ -5571,7 +5554,7 @@ dependencies = [ "getrandom", "rand", "ring 0.17.8", - "rustc-hash 2.0.0", + "rustc-hash 2.1.0", "rustls", "rustls-pki-types", "slab", @@ -5955,7 +5938,7 @@ dependencies = [ "convert_case", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -6025,7 +6008,7 @@ dependencies = [ "reth-storage-errors", "reth-tracing", "reth-trie-common", - "rustc-hash 2.0.0", + "rustc-hash 2.1.0", "serde", "strum", "sysinfo", @@ -6305,7 +6288,7 @@ dependencies = [ "crc", "dyn-clone", "once_cell", - "rustc-hash 2.0.0", + "rustc-hash 2.1.0", "serde", "thiserror-no-std", ] @@ -6439,7 +6422,7 @@ dependencies = [ "byteorder", "dashmap", "derive_more", - "indexmap 2.6.0", + "indexmap 2.7.0", "parking_lot", "reth-mdbx-sys", "smallvec", @@ -6533,7 +6516,7 @@ dependencies = [ "reth-tasks", "reth-tokio-util", "reth-transaction-pool", - "rustc-hash 2.0.0", + "rustc-hash 2.1.0", "schnellru", "secp256k1", "serde", @@ -6930,7 +6913,7 @@ dependencies = [ "reth-prune-types", "reth-static-file-types", "reth-tokio-util", - "rustc-hash 2.0.0", + "rustc-hash 2.1.0", "thiserror 1.0.69", "tokio", "tracing", @@ -7221,7 +7204,7 @@ dependencies = [ "reth-storage-api", "reth-tasks", "revm", - "rustc-hash 2.0.0", + "rustc-hash 2.1.0", "schnellru", "serde", "smallvec", @@ -7540,9 +7523,9 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustc-hash" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" +checksum = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497" dependencies = [ "rand", ] @@ -7823,7 +7806,7 @@ checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -7832,7 +7815,7 @@ version = "1.0.133" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" dependencies = [ - "indexmap 2.6.0", + "indexmap 2.7.0", "itoa", "memchr", "ryu", @@ -7847,7 +7830,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -7881,7 +7864,7 @@ dependencies = [ "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.6.0", + "indexmap 2.7.0", "serde", "serde_derive", "serde_json", @@ -7898,7 +7881,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -8127,7 +8110,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -8169,9 +8152,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.89" +version = "2.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d46482f1c1c87acd84dea20c1bf5ebff4c757009ed6bf19cfd36fb10e92c4e" +checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" dependencies = [ "proc-macro2", "quote", @@ -8187,7 +8170,7 @@ dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -8213,7 +8196,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -8295,7 +8278,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -8306,7 +8289,7 @@ checksum = "f077553d607adc1caf65430528a576c757a71ed73944b66ebb58ef2bbd243568" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -8350,9 +8333,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.36" +version = "0.3.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21" dependencies = [ "deranged", "itoa", @@ -8373,9 +8356,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +checksum = "2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de" dependencies = [ "num-conv", "time-core", @@ -8417,14 +8400,14 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.41.1" +version = "1.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33" +checksum = "5cec9b21b0450273377fc97bd4c33a8acffc8c996c987a7c5b319a0083707551" dependencies = [ "backtrace", "bytes", "libc", - "mio 1.0.2", + "mio 1.0.3", "parking_lot", "pin-project-lite", "signal-hook-registry", @@ -8441,7 +8424,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -8534,7 +8517,7 @@ version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ - "indexmap 2.6.0", + "indexmap 2.7.0", "serde", "serde_spanned", "toml_datetime", @@ -8599,7 +8582,7 @@ checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -8624,26 +8607,15 @@ dependencies = [ [[package]] name = "tracing-journald" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba316a74e8fc3c3896a850dba2375928a9fa171b085ecddfc7c054d39970f3fd" +checksum = "fc0b4143302cf1022dac868d521e36e8b27691f72c84b3311750d5188ebba657" dependencies = [ "libc", "tracing-core", "tracing-subscriber", ] -[[package]] -name = "tracing-log" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" -dependencies = [ - "log", - "once_cell", - "tracing-core", -] - [[package]] name = "tracing-logfmt" version = "0.3.5" @@ -8658,9 +8630,9 @@ dependencies = [ [[package]] name = "tracing-serde" -version = "0.1.3" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1" +checksum = "704b1aeb7be0d0a84fc9828cae51dab5970fee5088f83d1dd7ee6f6246fc6ff1" dependencies = [ "serde", "tracing-core", @@ -8668,22 +8640,19 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.18" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" dependencies = [ "matchers", - "nu-ansi-term", "once_cell", "regex", "serde", "serde_json", "sharded-slab", - "smallvec", "thread_local", "tracing", "tracing-core", - "tracing-log", "tracing-serde", ] @@ -8979,9 +8948,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.95" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" +checksum = "d15e63b4482863c109d70a7b8706c1e364eb6ea449b201a76c5b89cedcec2d5c" dependencies = [ "cfg-if", "once_cell", @@ -8990,36 +8959,37 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.95" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" +checksum = "8d36ef12e3aaca16ddd3f67922bc63e48e953f126de60bd33ccc0101ef9998cd" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.45" +version = "0.4.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" +checksum = "9dfaf8f50e5f293737ee323940c7d8b08a66a95a419223d9f41610ca08b0833d" dependencies = [ "cfg-if", "js-sys", + "once_cell", "wasm-bindgen", "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.95" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" +checksum = "705440e08b42d3e4b36de7d66c944be628d579796b8090bfa3471478a2260051" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -9027,22 +8997,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.95" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" +checksum = "98c9ae5a76e46f4deecd0f0255cc223cfa18dc9b261213b8aa0c7b36f61b3f1d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.95" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" +checksum = "6ee99da9c5ba11bd675621338ef6fa52296b76b83305e9b6e5c77d4c286d6d49" [[package]] name = "wasmtimer" @@ -9060,9 +9030,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.72" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" +checksum = "a98bc3c33f0fe7e59ad7cd041b89034fa82a7c2d4365ca538dda6cdaf513863c" dependencies = [ "js-sys", "wasm-bindgen", @@ -9183,7 +9153,7 @@ checksum = "9107ddc059d5b6fbfbffdfa7a7fe3e22a226def0b2608f72e9d552763d3e1ad7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -9194,7 +9164,7 @@ checksum = "29bee4b38ea3cde66011baa44dba677c432a78593e202392d1e9070cf2a7fca7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -9547,7 +9517,7 @@ checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", "synstructure", ] @@ -9569,7 +9539,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -9589,7 +9559,7 @@ checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", "synstructure", ] @@ -9610,7 +9580,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -9632,7 +9602,7 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index f17d884..08ba86b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,8 +37,8 @@ all-features = true rustdoc-args = ["--cfg", "docsrs"] [patch.crates-io] -kona-derive = { git = "https://github.com/anton-rs/kona", branch = "rf/bump-other-deps" } -kona-driver = { git = "https://github.com/anton-rs/kona", branch = "rf/bump-other-deps" } +kona-derive = { git = "https://github.com/anton-rs/kona", branch = "rf/fix/executor-trait" } +kona-driver = { git = "https://github.com/anton-rs/kona", branch = "rf/fix/executor-trait" } [workspace.dependencies] # Workspace diff --git a/crates/engine/Cargo.toml b/crates/engine/Cargo.toml index b5886c0..8d2d0c3 100644 --- a/crates/engine/Cargo.toml +++ b/crates/engine/Cargo.toml @@ -33,6 +33,7 @@ alloy-rpc-types-engine = { workspace = true, features = ["jwt", "serde"] } # Op Alloy op-alloy-genesis.workspace = true op-alloy-provider.workspace = true +op-alloy-consensus.workspace = true op-alloy-protocol.workspace = true op-alloy-rpc-types-engine.workspace = true diff --git a/crates/engine/src/client.rs b/crates/engine/src/client.rs index 294a112..f6329d4 100644 --- a/crates/engine/src/client.rs +++ b/crates/engine/src/client.rs @@ -6,8 +6,8 @@ use alloy_primitives::{Bytes, B256}; use alloy_provider::{ReqwestProvider, RootProvider}; use alloy_rpc_client::RpcClient; use alloy_rpc_types_engine::{ - ExecutionPayloadV3, ForkchoiceState, ForkchoiceUpdated, JwtSecret, PayloadId, PayloadStatus, - ExecutionPayloadEnvelopeV2, + ExecutionPayloadEnvelopeV2, ExecutionPayloadInputV2, ExecutionPayloadV2, ExecutionPayloadV3, + ForkchoiceState, ForkchoiceUpdated, JwtSecret, PayloadId, PayloadStatus, }; use alloy_transport_http::{ hyper_util::{ @@ -79,7 +79,6 @@ impl Engine for EngineClient { self.engine.get_payload_v3(payload_id).await.map_err(|_| EngineError::PayloadError) } - async fn forkchoice_update( &self, state: ForkchoiceState, @@ -88,7 +87,20 @@ impl Engine for EngineClient { self.engine.fork_choice_updated_v2(state, attr).await.map_err(|_| EngineError::PayloadError) } - async fn new_payload( + async fn new_payload_v2( + &self, + payload: ExecutionPayloadV2, + ) -> Result { + self.engine + .new_payload_v2(ExecutionPayloadInputV2 { + execution_payload: payload.payload_inner, + withdrawals: Some(payload.withdrawals), + }) + .await + .map_err(|_| EngineError::PayloadError) + } + + async fn new_payload_v3( &self, payload: ExecutionPayloadV3, parent_beacon_block_root: B256, diff --git a/crates/engine/src/controller.rs b/crates/engine/src/controller.rs index 0d24ae0..259dada 100644 --- a/crates/engine/src/controller.rs +++ b/crates/engine/src/controller.rs @@ -4,17 +4,24 @@ use alloy_consensus::{Header, Sealed}; use alloy_primitives::B256; -use alloy_rpc_types_engine::{ForkchoiceState, JwtSecret}; use async_trait::async_trait; use kona_driver::Executor; +use op_alloy_consensus::OpBlock; use op_alloy_genesis::RollupConfig; -use op_alloy_protocol::BlockInfo; +use op_alloy_protocol::{BatchValidationProvider, BlockInfo}; use op_alloy_rpc_types_engine::OpPayloadAttributes; use std::{sync::Arc, time::Duration}; use tokio::time::sleep; use url::Url; -use crate::{Engine, EngineClient, EngineError}; +use hilo_providers_alloy::AlloyL2ChainProvider; + +use alloy_rpc_types_engine::{ + ExecutionPayloadEnvelopeV2, ExecutionPayloadFieldV2, ExecutionPayloadV2, ForkchoiceState, + JwtSecret, PayloadStatusEnum, +}; + +use crate::{Engine, EngineClient, EngineControllerError}; /// L1 epoch block #[derive(Copy, Clone, Debug, Default, PartialEq, Eq)] @@ -38,6 +45,8 @@ impl From for Epoch { pub struct EngineController { /// The inner engine client which implements [crate::Engine]. pub client: EngineClient, + /// An L2 chain provider used to query the full blocks. + pub provider: AlloyL2ChainProvider, /// Blocktime of the L2 chain pub blocktime: u64, /// Most recent block found on the p2p network @@ -50,6 +59,10 @@ pub struct EngineController { pub finalized_head: BlockInfo, /// Batch epoch of the finalized head pub finalized_epoch: Epoch, + /// The ecotone timestamp used for fork choice + pub ecotone_timestamp: Option, + /// The canyon timestamp used for fork choice + pub canyon_timestamp: Option, } impl EngineController { @@ -64,10 +77,11 @@ impl EngineController { ) -> Self { let client = EngineClient::new_http( l2_engine_url.clone(), - l2_rpc_url, + l2_rpc_url.clone(), Arc::new(config.clone()), jwt_secret, ); + let provider = AlloyL2ChainProvider::new_http(l2_rpc_url, Arc::new(config.clone())); Self { blocktime: config.block_time, unsafe_head: finalized_head, @@ -76,7 +90,188 @@ impl EngineController { finalized_head, finalized_epoch, client, + provider, + ecotone_timestamp: config.ecotone_time, + canyon_timestamp: config.canyon_time, + } + } + + /// Instructs the engine to create a block and updates the forkchoice, based on a payload + /// received via p2p gossip. + pub async fn handle_unsafe_payload( + &mut self, + payload: &ExecutionPayloadEnvelopeV2, + ) -> Result<(), EngineControllerError> { + self.push_payload(payload.clone()).await?; + let payload = payload.clone().into_v1_payload(); + self.unsafe_head = BlockInfo { + number: payload.block_number, + hash: payload.block_hash, + parent_hash: payload.parent_hash, + timestamp: payload.timestamp, + }; + self.update_forkchoice().await?; + + tracing::info!("head updated: {} {:?}", self.unsafe_head.number, self.unsafe_head.hash,); + + Ok(()) + } + + /// Updates the [EngineController] finalized head & epoch + pub fn update_finalized(&mut self, head: BlockInfo, epoch: Epoch) { + self.finalized_head = head; + self.finalized_epoch = epoch; + } + + /// Sets the [EngineController] unsafe & safe heads, and safe epoch to the current finalized + /// head & epoch. + pub fn reorg(&mut self) { + self.unsafe_head = self.finalized_head; + self.safe_head = self.finalized_head; + self.safe_epoch = self.finalized_epoch; + } + + /// Sends a `ForkchoiceUpdated` message to check if the [Engine] is ready. + pub async fn engine_ready(&self) -> bool { + let forkchoice = self.create_forkchoice_state(); + self.client.forkchoice_update(forkchoice, None).await.is_ok() + } + + /// Returns which fork choice version to use based on the timestamp + /// and rollup config. + pub fn fork_choice_version(&self, timestamp: u64) -> u64 { + // TODO: replace this with https://github.com/alloy-rs/op-alloy/pull/321 + // once it's merged and updated in kona. + if self.ecotone_timestamp.is_some_and(|t| timestamp >= t) { + // Cancun + 3 + } else if self.canyon_timestamp.is_some_and(|t| timestamp >= t) { + // Shanghai + 2 + } else { + 1 + } + } + + /// Updates the forkchoice by sending `engine_forkchoiceUpdatedV2` (v3 post Ecotone) to the + /// engine with no payload. + async fn skip_attributes( + &mut self, + _attributes: OpPayloadAttributes, + block: OpBlock, + ) -> Result<(), EngineControllerError> { + // let new_epoch = *attributes.payload_attributes.epoch.as_ref().unwrap(); + let new_head = BlockInfo::from(block); + let new_epoch = new_head.into(); + self.update_safe_head(new_head, new_epoch, false); + self.update_forkchoice().await?; + + Ok(()) + } + + /// Sends [OpPayloadAttributes] via a `ForkChoiceUpdated` message to the [Engine] and returns + /// the [ExecutionPayloadEnvelopeV2] sent by the Execution Client. + async fn build_payload( + &self, + attributes: OpPayloadAttributes, + ) -> Result { + let forkchoice = self.create_forkchoice_state(); + + let update = self.client.forkchoice_update(forkchoice, Some(attributes)).await?; + + if !update.payload_status.status.is_valid() { + return Err(EngineControllerError::InvalidPayloadAttributes); + } + + let id = update.payload_id.ok_or(EngineControllerError::MissingPayloadId)?; + + self.client.get_payload_v2(id).await.map_err(|e| e.into()) + } + + /// Initiates validation & production of a new block: + /// - Sends the [OpPayloadAttributes] to the engine via `engine_forkchoiceUpdatedV2` (V3 post + /// Ecotone) and retrieves the [ExecutionPayloadEnvelopeV2] + /// - Executes the [ExecutionPayloadEnvelopeV2] to create a block via `engine_newPayloadV2` (V3 + /// post Ecotone) + /// - Updates the [EngineController] `safe_head`, `safe_epoch`, and `unsafe_head` + /// - Updates the forkchoice and sends this to the engine via `engine_forkchoiceUpdatedV2` (v3 + /// post Ecotone) + async fn process_attributes( + &mut self, + attributes: OpPayloadAttributes, + ) -> Result<(), EngineControllerError> { + let payload = self.build_payload(attributes).await?; + let v1_payload = payload.clone().into_v1_payload(); + + let new_head = BlockInfo { + number: v1_payload.block_number, + hash: v1_payload.block_hash, + parent_hash: v1_payload.parent_hash, + timestamp: v1_payload.timestamp, + }; + let new_epoch = new_head.into(); + + self.push_payload(payload).await?; + self.update_safe_head(new_head, new_epoch, true); + self.update_forkchoice().await?; + + Ok(()) + } + + /// Sends the given [ExecutionPayloadEnvelopeV2] to the [Engine] via `NewPayload` + async fn push_payload( + &self, + payload: ExecutionPayloadEnvelopeV2, + ) -> Result<(), EngineControllerError> { + let withdrawals = match &payload.execution_payload { + ExecutionPayloadFieldV2::V2(ExecutionPayloadV2 { withdrawals, .. }) => { + withdrawals.clone() + } + ExecutionPayloadFieldV2::V1(_) => vec![], + }; + let payload = ExecutionPayloadV2 { payload_inner: payload.into_v1_payload(), withdrawals }; + let status = self.client.new_payload_v2(payload).await?; + if !status.is_valid() && status.status != PayloadStatusEnum::Accepted { + return Err(EngineControllerError::InvalidPayloadAttributes); + } + + Ok(()) + } + + /// Sends a `ForkChoiceUpdated` message to the [Engine] with the current `Forkchoice State` and + /// no payload. + async fn update_forkchoice(&self) -> Result<(), EngineControllerError> { + let forkchoice = self.create_forkchoice_state(); + + let update = self.client.forkchoice_update(forkchoice, None).await?; + if !update.payload_status.is_valid() { + return Err(EngineControllerError::ForkchoiceRejected(update.payload_status)); + } + + Ok(()) + } + + /// Updates the current `safe_head` & `safe_epoch`. + /// + /// Also updates the current `unsafe_head` to the given `new_head` if `reorg_unsafe` is `true`, + /// or if the updated `safe_head` is newer than the current `unsafe_head` + fn update_safe_head(&mut self, new_head: BlockInfo, new_epoch: Epoch, reorg_unsafe: bool) { + if self.safe_head != new_head { + self.safe_head = new_head; + self.safe_epoch = new_epoch; } + + if reorg_unsafe || self.safe_head.number > self.unsafe_head.number { + self.unsafe_head = new_head; + } + } + + /// Fetches the L2 block for a given timestamp from the L2 Execution Client + async fn block_at(&mut self, timestamp: u64) -> Option { + let time_diff = timestamp as i64 - self.finalized_head.timestamp as i64; + let blocks = time_diff / self.blocktime as i64; + let block_num = self.finalized_head.number as i64 + blocks; + self.provider.block_by_number(block_num as u64).await.ok() } /// Creates a [ForkchoiceState]: @@ -94,7 +289,7 @@ impl EngineController { #[async_trait] impl Executor for EngineController { - type Error = EngineError; + type Error = EngineControllerError; /// Waits for the engine to be ready. async fn wait_until_ready(&mut self) { @@ -126,48 +321,58 @@ impl Executor for EngineController { } } - /// Execute the given payload attributes. - fn execute_payload(&mut self, _: OpPayloadAttributes) -> Result<&Header, Self::Error> { - todo!() + /// Receives payload attributes from the driver and handles them. + async fn execute_payload( + &mut self, + attributes: OpPayloadAttributes, + ) -> Result { + let block: Option = self.block_at(attributes.payload_attributes.timestamp).await; + + if let Some(block) = block { + if should_skip(&block, &attributes) { + self.skip_attributes(attributes, block).await?; + } else { + self.unsafe_head = self.safe_head; + self.process_attributes(attributes).await?; + } + } else { + self.process_attributes(attributes).await?; + } + + // Fetch the header from the block. + let block = self + .provider + .block_by_number(self.unsafe_head.number) + .await + .map_err(|_| EngineControllerError::BlockFetchFailed(self.unsafe_head.number))?; + Ok(block.header) } /// Computes the output root. fn compute_output_root(&mut self) -> Result { - todo!() + unimplemented!("Output root computation is not used by hilo") } } -// /// A validation error -// #[derive(Debug, thiserror::Error)] -// pub enum ValidationError { -// /// An RPC error -// #[error("RPC error")] -// RpcError, -// } - -// Validates the payload using the Fork Choice Update API. -// pub async fn validate_payload_fcu( -// &self, -// attributes: &OpAttributesWithParent, -// ) -> Result { -// // TODO: use the correct values -// let fork_choice_state = ForkchoiceState { -// head_block_hash: attributes.parent.block_info.hash, -// finalized_block_hash: attributes.parent.block_info.hash, -// safe_block_hash: attributes.parent.block_info.hash, -// }; -// -// let attributes = Some(attributes.attributes.clone()); -// let fcu = self -// .provider -// .fork_choice_updated_v2(fork_choice_state, attributes) -// .await -// .map_err(|_| ValidationError::RpcError)?; -// -// if fcu.is_valid() { -// Ok(true) -// } else { -// warn!(status = %fcu.payload_status, "Engine API returned invalid fork choice update"); -// Ok(false) -// } -// } +/// True if transactions in [OpPayloadAttributes] are not the same as those in a fetched L2 +/// [OpBlock] +fn should_skip(block: &OpBlock, attributes: &OpPayloadAttributes) -> bool { + use alloy_eips::eip2718::Encodable2718; + + let attributes_hashes = attributes + .transactions + .as_ref() + .unwrap() + .iter() + .map(|tx| alloy_primitives::keccak256(&tx.0)) + .collect::>(); + + let block_hashes = + block.body.transactions.iter().map(|tx| tx.clone().seal().hash()).collect::>(); + + attributes_hashes == block_hashes + && attributes.payload_attributes.timestamp == block.header.timestamp + && attributes.payload_attributes.prev_randao == block.header.mix_hash + && attributes.payload_attributes.suggested_fee_recipient == block.header.beneficiary + && attributes.gas_limit.map_or(true, |g| block.header.gas_limit == g) +} diff --git a/crates/engine/src/errors.rs b/crates/engine/src/errors.rs index 9264bf8..aa2f67b 100644 --- a/crates/engine/src/errors.rs +++ b/crates/engine/src/errors.rs @@ -1,5 +1,7 @@ //! Error types +use alloy_rpc_types_engine::PayloadStatus; + /// An error that originated from the engine api. #[derive(Debug, thiserror::Error)] pub enum EngineError { @@ -19,3 +21,24 @@ pub enum EngineError { #[error("Failed to get the `L2BlockInfo` for the given block number")] L2BlockInfoFetch, } + +/// An error that originated one level above the engine api, +/// in the [crate::EngineController]. +#[derive(Debug, thiserror::Error)] +pub enum EngineControllerError { + /// Invalid payload attributes were processed. + #[error("Invalid payload attributes were processed")] + InvalidPayloadAttributes, + /// Missing payload id. + #[error("Missing payload id")] + MissingPayloadId, + /// An error from the engine api. + #[error("An error from the engine api: {0}")] + EngineError(#[from] EngineError), + /// The forkchoice update was rejected with the given payload status. + #[error("The forkchoice update was rejected with the given payload status: {0:?}")] + ForkchoiceRejected(PayloadStatus), + /// Failed to fetch block. + #[error("Failed to fetch block {0}")] + BlockFetchFailed(u64), +} diff --git a/crates/engine/src/lib.rs b/crates/engine/src/lib.rs index 88e5207..6799e18 100644 --- a/crates/engine/src/lib.rs +++ b/crates/engine/src/lib.rs @@ -10,7 +10,7 @@ mod traits; pub use traits::Engine; mod errors; -pub use errors::EngineError; +pub use errors::{EngineControllerError, EngineError}; mod controller; pub use controller::EngineController; diff --git a/crates/engine/src/traits.rs b/crates/engine/src/traits.rs index cec49e4..8c54bb6 100644 --- a/crates/engine/src/traits.rs +++ b/crates/engine/src/traits.rs @@ -3,8 +3,8 @@ use alloy_eips::eip1898::BlockNumberOrTag; use alloy_primitives::B256; use alloy_rpc_types_engine::{ - ExecutionPayloadV3, ForkchoiceState, ForkchoiceUpdated, PayloadId, PayloadStatus, - ExecutionPayloadEnvelopeV2, + ExecutionPayloadEnvelopeV2, ExecutionPayloadV2, ExecutionPayloadV3, ForkchoiceState, + ForkchoiceUpdated, PayloadId, PayloadStatus, }; use async_trait::async_trait; use op_alloy_protocol::L2BlockInfo; @@ -36,8 +36,14 @@ pub trait Engine { attr: Option, ) -> Result; + /// Creates a new payload with the given [ExecutionPayloadV2]. + async fn new_payload_v2( + &self, + payload: ExecutionPayloadV2, + ) -> Result; + /// Creates a new payload with the given payload and parent beacon block root. - async fn new_payload( + async fn new_payload_v3( &self, payload: ExecutionPayloadV3, parent_beacon_block_root: B256, From 11cf8d3f7ee73253aa811ae753ef0c9e6400c44f Mon Sep 17 00:00:00 2001 From: refcell Date: Tue, 3 Dec 2024 11:58:27 -0500 Subject: [PATCH 3/3] fix: deps --- Cargo.lock | 56 +++++++++++++++++++++---------------------- Cargo.toml | 70 +++++++++++++++++++++++++++--------------------------- 2 files changed, 63 insertions(+), 63 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d810b61..8f529c2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -274,7 +274,7 @@ dependencies = [ "alloy-sol-types", "serde", "serde_json", - "thiserror 2.0.3", + "thiserror 2.0.4", "tracing", ] @@ -323,7 +323,7 @@ dependencies = [ "futures-utils-wasm", "serde", "serde_json", - "thiserror 2.0.3", + "thiserror 2.0.4", ] [[package]] @@ -417,7 +417,7 @@ dependencies = [ "schnellru", "serde", "serde_json", - "thiserror 2.0.3", + "thiserror 2.0.4", "tokio", "tracing", "url", @@ -539,7 +539,7 @@ dependencies = [ "alloy-serde 0.7.2", "serde", "serde_with", - "thiserror 2.0.3", + "thiserror 2.0.4", ] [[package]] @@ -681,7 +681,7 @@ dependencies = [ "auto_impl", "elliptic-curve", "k256", - "thiserror 2.0.3", + "thiserror 2.0.4", ] [[package]] @@ -766,7 +766,7 @@ dependencies = [ "futures-utils-wasm", "serde", "serde_json", - "thiserror 2.0.3", + "thiserror 2.0.4", "tokio", "tower", "tracing", @@ -2969,7 +2969,7 @@ dependencies = [ "reth-exex", "reth-primitives", "serde", - "thiserror 2.0.3", + "thiserror 2.0.4", "tokio", "tracing", "url", @@ -2997,7 +2997,7 @@ dependencies = [ "op-alloy-protocol", "op-alloy-provider", "op-alloy-rpc-types-engine", - "thiserror 2.0.3", + "thiserror 2.0.4", "tokio", "tower", "tracing", @@ -3039,7 +3039,7 @@ dependencies = [ "op-alloy-registry", "serde", "serde_json", - "thiserror 2.0.3", + "thiserror 2.0.4", "tracing", "url", ] @@ -3066,7 +3066,7 @@ dependencies = [ "parking_lot", "reqwest", "serde", - "thiserror 2.0.3", + "thiserror 2.0.4", "tokio", "tracing", "url", @@ -3827,7 +3827,7 @@ dependencies = [ [[package]] name = "kona-derive" version = "0.1.0" -source = "git+https://github.com/anton-rs/kona?branch=rf/fix/executor-trait#525151e574df9ba0b9deaae64975af0ac7483ea8" +source = "git+https://github.com/anton-rs/kona?branch=rf/fix/executor-trait#bb228e9fffd6907bb7989c757053008dc4ad8f71" dependencies = [ "alloy-consensus 0.7.2", "alloy-eips 0.7.2", @@ -3839,14 +3839,14 @@ dependencies = [ "op-alloy-genesis", "op-alloy-protocol", "op-alloy-rpc-types-engine", - "thiserror 2.0.3", + "thiserror 2.0.4", "tracing", ] [[package]] name = "kona-driver" version = "0.1.0" -source = "git+https://github.com/anton-rs/kona?branch=rf/fix/executor-trait#525151e574df9ba0b9deaae64975af0ac7483ea8" +source = "git+https://github.com/anton-rs/kona?branch=rf/fix/executor-trait#bb228e9fffd6907bb7989c757053008dc4ad8f71" dependencies = [ "alloy-consensus 0.7.2", "alloy-primitives", @@ -3857,7 +3857,7 @@ dependencies = [ "op-alloy-genesis", "op-alloy-protocol", "op-alloy-rpc-types-engine", - "thiserror 2.0.3", + "thiserror 2.0.4", "tracing", ] @@ -4972,7 +4972,7 @@ dependencies = [ "derive_more", "serde", "serde_with", - "thiserror 2.0.3", + "thiserror 2.0.4", ] [[package]] @@ -4988,7 +4988,7 @@ dependencies = [ "alloy-serde 0.7.2", "derive_more", "serde", - "thiserror 2.0.3", + "thiserror 2.0.4", ] [[package]] @@ -5003,7 +5003,7 @@ dependencies = [ "alloy-sol-types", "serde", "serde_repr", - "thiserror 2.0.3", + "thiserror 2.0.4", ] [[package]] @@ -5025,7 +5025,7 @@ dependencies = [ "op-alloy-consensus 0.7.2", "op-alloy-genesis", "serde", - "thiserror 2.0.3", + "thiserror 2.0.4", "tracing", "unsigned-varint 0.8.0", ] @@ -5092,7 +5092,7 @@ dependencies = [ "op-alloy-protocol", "serde", "snap", - "thiserror 2.0.3", + "thiserror 2.0.4", ] [[package]] @@ -5539,7 +5539,7 @@ dependencies = [ "rustc-hash 2.1.0", "rustls", "socket2", - "thiserror 2.0.3", + "thiserror 2.0.4", "tokio", "tracing", ] @@ -5558,7 +5558,7 @@ dependencies = [ "rustls", "rustls-pki-types", "slab", - "thiserror 2.0.3", + "thiserror 2.0.4", "tinyvec", "tracing", "web-time", @@ -8263,11 +8263,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.3" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c006c85c7651b3cf2ada4584faa36773bd07bac24acfb39f3c431b36d7e667aa" +checksum = "2f49a1853cf82743e3b7950f77e0f4d622ca36cf4317cba00c767838bac8d490" dependencies = [ - "thiserror-impl 2.0.3", + "thiserror-impl 2.0.4", ] [[package]] @@ -8283,9 +8283,9 @@ dependencies = [ [[package]] name = "thiserror-impl" -version = "2.0.3" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f077553d607adc1caf65430528a576c757a71ed73944b66ebb58ef2bbd243568" +checksum = "8381894bb3efe0c4acac3ded651301ceee58a15d47c2e34885ed1908ad667061" dependencies = [ "proc-macro2", "quote", @@ -9444,9 +9444,9 @@ dependencies = [ [[package]] name = "xml-rs" -version = "0.8.23" +version = "0.8.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af310deaae937e48a26602b730250b4949e125f468f11e6990be3e5304ddd96f" +checksum = "ea8b391c9a790b496184c29f7f93b9ed5b16abb306c05415b68bcc16e4d06432" [[package]] name = "xmltree" diff --git a/Cargo.toml b/Cargo.toml index 08ba86b..403f4fe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -56,29 +56,29 @@ kona-driver = { version = "0.1.0", default-features = false } # Alloy alloy-rlp = { version = "0.3.9", default-features = false } -alloy-eips = { version = "0.7.0", default-features = false } -alloy-serde = { version = "0.7.0", default-features = false } -alloy-signer = { version = "0.7.0", default-features = false } -alloy-network = { version = "0.7.0", default-features = false } -alloy-provider = { version = "0.7.0", default-features = false } -alloy-consensus = { version = "0.7.0", default-features = false } -alloy-rpc-types = { version = "0.7.0", default-features = false } -alloy-transport = { version = "0.7.0", default-features = false } -alloy-rpc-client = { version = "0.7.0", default-features = false } -alloy-primitives = { version = "0.8.13", default-features = false } -alloy-rpc-types-eth = { version = "0.7.0", default-features = false } -alloy-node-bindings = { version = "0.7.0", default-features = false } -alloy-transport-http = { version = "0.7.0", default-features = false } -alloy-rpc-types-beacon = { version = "0.7.0", default-features = false } -alloy-rpc-types-engine = { version = "0.7.0", default-features = false } +alloy-eips = { version = "0.7.2", default-features = false } +alloy-serde = { version = "0.7.2", default-features = false } +alloy-signer = { version = "0.7.2", default-features = false } +alloy-network = { version = "0.7.2", default-features = false } +alloy-provider = { version = "0.7.2", default-features = false } +alloy-consensus = { version = "0.7.2", default-features = false } +alloy-rpc-types = { version = "0.7.2", default-features = false } +alloy-transport = { version = "0.7.2", default-features = false } +alloy-rpc-client = { version = "0.7.2", default-features = false } +alloy-primitives = { version = "0.8.14", default-features = false } +alloy-rpc-types-eth = { version = "0.7.2", default-features = false } +alloy-node-bindings = { version = "0.7.2", default-features = false } +alloy-transport-http = { version = "0.7.2", default-features = false } +alloy-rpc-types-beacon = { version = "0.7.2", default-features = false } +alloy-rpc-types-engine = { version = "0.7.2", default-features = false } # OP Alloy -op-alloy-genesis = { version = "0.7.1", default-features = false } -op-alloy-provider = { version = "0.7.1", default-features = false } -op-alloy-protocol = { version = "0.7.1", default-features = false } -op-alloy-registry = { version = "0.7.1", default-features = false } -op-alloy-consensus = { version = "0.7.1", default-features = false } -op-alloy-rpc-types-engine = { version = "0.7.1", default-features = false } +op-alloy-genesis = { version = "0.7.2", default-features = false } +op-alloy-provider = { version = "0.7.2", default-features = false } +op-alloy-protocol = { version = "0.7.2", default-features = false } +op-alloy-registry = { version = "0.7.2", default-features = false } +op-alloy-consensus = { version = "0.7.2", default-features = false } +op-alloy-rpc-types-engine = { version = "0.7.2", default-features = false } # Reth reth-exex = { git = "https://github.com/paradigmxyz/reth", rev = "aea5613" } @@ -87,12 +87,12 @@ reth-primitives = { git = "https://github.com/paradigmxyz/reth", rev = "aea5613" reth-execution-types = { git = "https://github.com/paradigmxyz/reth", rev = "aea5613" } # Serialization -serde = { version = "1.0.214", default-features = false } -serde_json = { version = "1.0.132", default-features = false } +serde = { version = "1.0.215", default-features = false } +serde_json = { version = "1.0.133", default-features = false } # Tracing -tracing = { version = "0.1.40", default-features = false } -tracing-subscriber = { version = "0.3.18", default-features = false } +tracing = { version = "0.1.41", default-features = false } +tracing-subscriber = { version = "0.3.19", default-features = false } metrics-exporter-prometheus = { version = "0.16.0", default-features = false } # Networking @@ -100,31 +100,31 @@ snap = "1.1.1" discv5 = "0.9.0" libp2p = "0.54.1" openssl = "0.10.68" -libp2p-identity = "0.2.9" +libp2p-identity = "0.2.10" # Testing -arbtest = "0.3" -arbitrary = "1" +arbtest = "0.3.1" +arbitrary = "1.4.1" # CLI -clap = "4.5.20" -figment = { version = "0.10.8", features = ["toml", "env"] } +clap = "4.5.21" +figment = { version = "0.10.19", features = ["toml", "env"] } # Misc -url = "2.5.2" +url = "2.5.4" lru = "0.12.5" eyre = "0.6.12" again = "0.1.2" -tokio = "1.41.0" +tokio = "1.42.0" futures = "0.3.31" reqwest = "0.12.9" -tower = "0.5" +tower = "0.5.1" http-body-util = "0.1.2" parking_lot = "0.12.3" async-trait = "0.1.83" futures-timer = "3.0.3" unsigned-varint = "0.8.0" -thiserror = { version = "2.0", default-features = false } +thiserror = { version = "2.0.4", default-features = false } derive_more = { version = "1.0.0", default-features = false } lazy_static = { version = "1.5.0", default-features = false } -ctrlc = { version = "3.2.3", features = ["termination"] } +ctrlc = { version = "3.4.5", features = ["termination"] }