diff --git a/Cargo.lock b/Cargo.lock index ff2f30650..aaf94f143 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -42,71 +42,60 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] -name = "alloy-consensus" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=cb95183#cb95183d477024b57b27336035d10403e8ba55b8" +name = "alloy-chains" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04e9a1892803b02f53e25bea3e414ddd0501f12d97456c9d5ade4edf88f9516f" dependencies = [ - "alloy-eips 0.1.0", - "alloy-primitives", - "alloy-rlp", - "alloy-serde 0.1.0", - "c-kzg", - "serde", - "sha2", + "num_enum", + "strum", ] [[package]] name = "alloy-consensus" version = "0.1.2" -source = "git+https://github.com/alloy-rs/alloy#8aa54828c025a99bbe7e2d4fc9768605d172cc6d" -dependencies = [ - "alloy-eips 0.1.2", - "alloy-primitives", - "alloy-rlp", - "alloy-serde 0.1.2", - "serde", -] - -[[package]] -name = "alloy-eips" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=cb95183#cb95183d477024b57b27336035d10403e8ba55b8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a016bfa21193744d4c38b3f3ab845462284d129e5e23c7cc0fafca7e92d9db37" dependencies = [ + "alloy-eips", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.1.0", + "alloy-serde", "c-kzg", - "once_cell", "serde", ] [[package]] name = "alloy-eips" version = "0.1.2" -source = "git+https://github.com/alloy-rs/alloy#8aa54828c025a99bbe7e2d4fc9768605d172cc6d" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32d6d8118b83b0489cfb7e6435106948add2b35217f4a5004ef895f613f60299" dependencies = [ "alloy-primitives", "alloy-rlp", - "alloy-serde 0.1.2", + "alloy-serde", "c-kzg", + "once_cell", "serde", "sha2", ] [[package]] name = "alloy-genesis" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=cb95183#cb95183d477024b57b27336035d10403e8ba55b8" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "894f33a7822abb018db56b10ab90398e63273ce1b5a33282afd186c132d764a6" dependencies = [ "alloy-primitives", - "alloy-serde 0.1.0", + "alloy-serde", "serde", ] [[package]] name = "alloy-json-rpc" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=cb95183#cb95183d477024b57b27336035d10403e8ba55b8" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61f0ae6e93b885cc70fe8dae449e7fd629751dbee8f59767eaaa7285333c5727" dependencies = [ "alloy-primitives", "serde", @@ -117,24 +106,29 @@ dependencies = [ [[package]] name = "alloy-network" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=cb95183#cb95183d477024b57b27336035d10403e8ba55b8" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc122cbee2b8523854cc11d87bcd5773741602c553d2d2d106d82eeb9c16924a" dependencies = [ - "alloy-consensus 0.1.0", - "alloy-eips 0.1.0", + "alloy-consensus", + "alloy-eips", "alloy-json-rpc", "alloy-primitives", - "alloy-rpc-types", + "alloy-rpc-types-eth", + "alloy-serde", "alloy-signer", + "alloy-sol-types", "async-trait", + "auto_impl", "futures-utils-wasm", "thiserror", ] [[package]] name = "alloy-node-bindings" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=cb95183#cb95183d477024b57b27336035d10403e8ba55b8" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df0e005ecc1b41f0b3bf90f68df5a446971e7eb34e1ea051da401e7e8eeef8fd" dependencies = [ "alloy-genesis", "alloy-primitives", @@ -170,16 +164,18 @@ dependencies = [ [[package]] name = "alloy-provider" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=cb95183#cb95183d477024b57b27336035d10403e8ba55b8" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d5af289798fe8783acd0c5f10644d9d26f54a12bc52a083e4f3b31718e9bf92" dependencies = [ - "alloy-eips 0.1.0", + "alloy-chains", + "alloy-consensus", + "alloy-eips", "alloy-json-rpc", "alloy-network", "alloy-primitives", "alloy-rpc-client", - "alloy-rpc-types", - "alloy-rpc-types-trace", + "alloy-rpc-types-eth", "alloy-transport", "alloy-transport-http", "async-stream", @@ -189,7 +185,9 @@ dependencies = [ "futures", "futures-utils-wasm", "lru", + "pin-project", "reqwest", + "serde", "serde_json", "tokio", "tracing", @@ -220,8 +218,9 @@ dependencies = [ [[package]] name = "alloy-rpc-client" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=cb95183#cb95183d477024b57b27336035d10403e8ba55b8" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b40fcb53b2a9d0a78a4968b2eca8805a4b7011b9ee3fdfa2acaf137c5128f36b" dependencies = [ "alloy-json-rpc", "alloy-transport", @@ -240,48 +239,37 @@ dependencies = [ [[package]] name = "alloy-rpc-types" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=cb95183#cb95183d477024b57b27336035d10403e8ba55b8" -dependencies = [ - "alloy-consensus 0.1.0", - "alloy-eips 0.1.0", - "alloy-genesis", - "alloy-primitives", - "alloy-rlp", - "alloy-serde 0.1.0", - "alloy-sol-types", - "itertools 0.12.1", - "serde", - "serde_json", - "thiserror", -] - -[[package]] -name = "alloy-rpc-types-trace" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=cb95183#cb95183d477024b57b27336035d10403e8ba55b8" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50f2fbe956a3e0f0975c798f488dc6be96b669544df3737e18f4a325b42f4c86" dependencies = [ - "alloy-primitives", - "alloy-rpc-types", - "alloy-serde 0.1.0", - "serde", - "serde_json", + "alloy-rpc-types-eth", + "alloy-serde", ] [[package]] -name = "alloy-serde" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=cb95183#cb95183d477024b57b27336035d10403e8ba55b8" +name = "alloy-rpc-types-eth" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "083f443a83b9313373817236a8f4bea09cca862618e9177d822aee579640a5d6" dependencies = [ + "alloy-consensus", + "alloy-eips", "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "alloy-sol-types", + "itertools 0.13.0", "serde", "serde_json", + "thiserror", ] [[package]] name = "alloy-serde" version = "0.1.2" -source = "git+https://github.com/alloy-rs/alloy#8aa54828c025a99bbe7e2d4fc9768605d172cc6d" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d94da1c0c4e27cc344b05626fe22a89dc6b8b531b9475f3b7691dbf6913e4109" dependencies = [ "alloy-primitives", "serde", @@ -290,8 +278,9 @@ dependencies = [ [[package]] name = "alloy-signer" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=cb95183#cb95183d477024b57b27336035d10403e8ba55b8" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58d876be3afd8b78979540084ff63995292a26aa527ad0d44276405780aa0ffd" dependencies = [ "alloy-primitives", "async-trait", @@ -361,8 +350,9 @@ dependencies = [ [[package]] name = "alloy-transport" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=cb95183#cb95183d477024b57b27336035d10403e8ba55b8" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245af9541f0a0dbd5258669c80dfe3af118164cacec978a520041fc130550deb" dependencies = [ "alloy-json-rpc", "base64", @@ -374,19 +364,20 @@ dependencies = [ "tokio", "tower", "url", - "wasm-bindgen-futures", ] [[package]] name = "alloy-transport-http" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=cb95183#cb95183d477024b57b27336035d10403e8ba55b8" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5619c017e1fdaa1db87f9182f4f0ed97c53d674957f4902fba655e972d359c6c" dependencies = [ "alloy-json-rpc", "alloy-transport", "reqwest", "serde_json", "tower", + "tracing", "url", ] @@ -1572,9 +1563,9 @@ dependencies = [ [[package]] name = "itertools" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" dependencies = [ "either", ] @@ -1621,8 +1612,8 @@ dependencies = [ name = "kona-client" version = "0.1.0" dependencies = [ - "alloy-consensus 0.1.0", - "alloy-eips 0.1.0", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", "anyhow", @@ -1671,8 +1662,8 @@ name = "kona-derive" version = "0.0.1" dependencies = [ "alloc-no-stdlib", - "alloy-consensus 0.1.0", - "alloy-eips 0.1.0", + "alloy-consensus", + "alloy-eips", "alloy-node-bindings", "alloy-primitives", "alloy-provider", @@ -1708,8 +1699,8 @@ dependencies = [ name = "kona-executor" version = "0.0.1" dependencies = [ - "alloy-consensus 0.1.0", - "alloy-eips 0.1.0", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", "anyhow", @@ -1726,8 +1717,8 @@ dependencies = [ name = "kona-host" version = "0.1.0" dependencies = [ - "alloy-consensus 0.1.0", - "alloy-eips 0.1.0", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-provider", "alloy-rlp", @@ -1756,7 +1747,7 @@ dependencies = [ name = "kona-mpt" version = "0.0.1" dependencies = [ - "alloy-consensus 0.1.0", + "alloy-consensus", "alloy-primitives", "alloy-provider", "alloy-rlp", @@ -1776,7 +1767,7 @@ dependencies = [ name = "kona-plasma" version = "0.0.1" dependencies = [ - "alloy-consensus 0.1.0", + "alloy-consensus", "alloy-primitives", "alloy-provider", "alloy-transport-http", @@ -1811,8 +1802,8 @@ dependencies = [ name = "kona-primitives" version = "0.0.1" dependencies = [ - "alloy-consensus 0.1.0", - "alloy-eips 0.1.0", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", "alloy-sol-types", @@ -2048,6 +2039,26 @@ dependencies = [ "libc", ] +[[package]] +name = "num_enum" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" +dependencies = [ + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.67", +] + [[package]] name = "nybbles" version = "0.2.1" @@ -2076,13 +2087,13 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "op-alloy-consensus" version = "0.1.0" -source = "git+https://github.com/alloy-rs/op-alloy?branch=refcell/re-exports#01e94e6d4a13ba8a5ee58fbeca1e830edea4730a" +source = "git+https://github.com/alloy-rs/op-alloy#97cca5624dc3db8631ff7866e091876fd2fedd25" dependencies = [ - "alloy-consensus 0.1.2", - "alloy-eips 0.1.2", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.1.2", + "alloy-serde", "serde", ] @@ -2692,6 +2703,12 @@ dependencies = [ "untrusted", ] +[[package]] +name = "rustversion" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" + [[package]] name = "rusty-fork" version = "0.3.0" @@ -2992,6 +3009,28 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" +[[package]] +name = "strum" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d8cec3501a5194c432b2b7976db6b7d10ec95c253208b45f83f7136aa985e29" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.67", +] + [[package]] name = "substrate-bn" version = "0.6.0" @@ -3014,10 +3053,11 @@ checksum = "0d0208408ba0c3df17ed26eb06992cb1a1268d41b2c0e12e65203fbe3972cee5" [[package]] name = "superchain-primitives" version = "0.1.0" -source = "git+https://github.com/ethereum-optimism/superchain-registry?branch=main#67128af695e57d6e32a740f8587aca4e0bded888" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ce53db1b0ae24593ac759782cceedb03c838a39bb1f2ccd5c0923778acd7871" dependencies = [ - "alloy-consensus 0.1.0", - "alloy-eips 0.1.0", + "alloy-consensus", + "alloy-eips", "alloy-genesis", "alloy-primitives", "alloy-sol-types", diff --git a/Cargo.toml b/Cargo.toml index bb18c45c8..1897618f9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,9 +24,9 @@ async-trait = "0.1.80" # Ethereum alloy-primitives = { version = "0.7.6", default-features = false } alloy-rlp = { version = "0.3.5", default-features = false } -alloy-consensus = { git = "https://github.com/alloy-rs/alloy", rev = "cb95183", default-features = false } -op-alloy-consensus = { git = "https://github.com/alloy-rs/op-alloy", branch = "refcell/re-exports", default-features = false } -alloy-eips = { git = "https://github.com/alloy-rs/alloy", rev = "cb95183", default-features = false } +alloy-consensus = { version = "0.1", default-features = false } +op-alloy-consensus = { git = "https://github.com/alloy-rs/op-alloy", default-features = false } +alloy-eips = { version = "0.1", default-features = false } revm = { git = "https://github.com/bluealloy/revm", rev = "a832a4e", default-features = false } [profile.dev] diff --git a/bin/client/src/l2/chain_provider.rs b/bin/client/src/l2/chain_provider.rs index ec70845aa..92cf3e90d 100644 --- a/bin/client/src/l2/chain_provider.rs +++ b/bin/client/src/l2/chain_provider.rs @@ -3,6 +3,7 @@ use crate::{BootInfo, CachingOracle, HintType, HINT_WRITER}; use alloc::{boxed::Box, sync::Arc, vec::Vec}; use alloy_consensus::Header; +use alloy_eips::eip2718::Decodable2718; use alloy_primitives::{Bytes, B256}; use alloy_rlp::Decodable; use anyhow::{anyhow, Result}; @@ -13,7 +14,7 @@ use kona_preimage::{HintWriterClient, PreimageKey, PreimageKeyType, PreimageOrac use kona_primitives::{ L2BlockInfo, L2ExecutionPayloadEnvelope, OpBlock, RollupConfig, SystemConfig, }; -use op_alloy_consensus::{Decodable2718, OpTxEnvelope}; +use op_alloy_consensus::OpTxEnvelope; /// The oracle-backed L2 chain provider for the client program. #[derive(Debug, Clone)] diff --git a/bin/host/Cargo.toml b/bin/host/Cargo.toml index d19ad3ec6..60ed8e3bc 100644 --- a/bin/host/Cargo.toml +++ b/bin/host/Cargo.toml @@ -25,10 +25,10 @@ kona-mpt = { path = "../../crates/mpt", version = "0.0.1" } kona-derive = { path = "../../crates/derive", version = "0.0.1", features = ["online"] } # external -alloy-provider = { git = "https://github.com/alloy-rs/alloy", rev = "cb95183" } -alloy-transport-http = { git = "https://github.com/alloy-rs/alloy", rev = "cb95183" } -alloy-rpc-client = { git = "https://github.com/alloy-rs/alloy", rev = "cb95183" } -alloy-rpc-types = { git = "https://github.com/alloy-rs/alloy", rev = "cb95183" } +alloy-provider = { version = "0.1" } +alloy-transport-http = { version = "0.1" } +alloy-rpc-client = { version = "0.1" } +alloy-rpc-types = { version = "0.1" } reqwest = "0.12" tokio = { version = "1.37.0", features = ["full"] } futures = "0.3" diff --git a/bin/host/src/fetcher/mod.rs b/bin/host/src/fetcher/mod.rs index 329e763e9..17de13513 100644 --- a/bin/host/src/fetcher/mod.rs +++ b/bin/host/src/fetcher/mod.rs @@ -3,11 +3,11 @@ use crate::{kv::KeyValueStore, util}; use alloy_consensus::{Header, TxEnvelope}; -use alloy_eips::{eip2718::Encodable2718, eip4844::FIELD_ELEMENTS_PER_BLOB}; +use alloy_eips::{eip2718::Encodable2718, eip4844::FIELD_ELEMENTS_PER_BLOB, BlockId}; use alloy_primitives::{address, keccak256, Address, Bytes, B256}; use alloy_provider::{Provider, ReqwestProvider}; use alloy_rlp::Decodable; -use alloy_rpc_types::{Block, BlockTransactions}; +use alloy_rpc_types::{Block, BlockNumberOrTag, BlockTransactions, BlockTransactionsKind}; use anyhow::{anyhow, Result}; use kona_client::HintType; use kona_derive::{ @@ -130,7 +130,7 @@ where .map_err(|e| anyhow!("Failed to convert bytes to B256: {e}"))?; let Block { transactions, .. } = self .l1_provider - .get_block_by_hash(hash, true) + .get_block_by_hash(hash, BlockTransactionsKind::Full) .await .map_err(|e| anyhow!("Failed to fetch block: {e}"))? .ok_or(anyhow!("Block not found."))?; @@ -292,7 +292,7 @@ where .map_err(|e| anyhow!("Failed to convert bytes to B256: {e}"))?; let Block { transactions, .. } = self .l2_provider - .get_block_by_hash(hash, false) + .get_block_by_hash(hash, BlockTransactionsKind::Hashes) .await .map_err(|e| anyhow!("Failed to fetch block: {e}"))? .ok_or(anyhow!("Block not found."))?; @@ -374,11 +374,8 @@ where // Fetch the storage root for the L2 head block. let l2_to_l1_message_passer = self .l2_provider - .get_proof( - L2_TO_L1_MESSAGE_PASSER_ADDRESS, - Default::default(), - self.l2_head.into(), - ) + .get_proof(L2_TO_L1_MESSAGE_PASSER_ADDRESS, Default::default()) + .block_id(BlockId::Hash(self.l2_head.into())) .await .map_err(|e| anyhow!("Failed to fetch account proof: {e}"))?; @@ -437,7 +434,8 @@ where let proof_response = self .l2_provider - .get_proof(address, Default::default(), block_number.into()) + .get_proof(address, Default::default()) + .block_id(BlockId::Number(BlockNumberOrTag::Number(block_number))) .await .map_err(|e| anyhow!("Failed to fetch account proof: {e}"))?; @@ -465,7 +463,8 @@ where let mut proof_response = self .l2_provider - .get_proof(address, vec![slot], block_number.into()) + .get_proof(address, vec![slot]) + .block_id(BlockId::Number(BlockNumberOrTag::Number(block_number))) .await .map_err(|e| anyhow!("Failed to fetch account proof: {e}"))?; diff --git a/crates/derive/Cargo.toml b/crates/derive/Cargo.toml index 1888f49ea..9811522b1 100644 --- a/crates/derive/Cargo.toml +++ b/crates/derive/Cargo.toml @@ -41,24 +41,24 @@ serde = { version = "1.0.203", default-features = false, features = ["derive"], # `online` feature dependencies c-kzg = { version = "1.0.2", default-features = false, optional = true } sha2 = { version = "0.10.8", default-features = false, optional = true } -alloy-transport = { git = "https://github.com/alloy-rs/alloy", rev = "cb95183", default-features = false, optional = true } -alloy-provider = { git = "https://github.com/alloy-rs/alloy", rev = "cb95183", default-features = false, optional = true } -alloy-transport-http = { git = "https://github.com/alloy-rs/alloy", rev = "cb95183", optional = true } -alloy-rpc-types = { git = "https://github.com/alloy-rs/alloy", rev = "cb95183", default-features = false, optional = true } +alloy-transport = { version = "0.1", default-features = false, optional = true } +alloy-provider = { version = "0.1", default-features = false, optional = true } +alloy-transport-http = { version = "0.1", optional = true } +alloy-rpc-types = { version = "0.1", default-features = false, optional = true } serde_json = { version = "1.0.94", default-features = false, optional = true } reqwest = { version = "0.12.4", default-features = false, optional = true } # `test-utils` feature dependencies -alloy-node-bindings = { git = "https://github.com/alloy-rs/alloy", rev = "cb95183", default-features = false, optional = true } +alloy-node-bindings = { version = "0.1", default-features = false, optional = true } tracing-subscriber = { version = "0.3.18", optional = true } -alloy-rpc-client = { git = "https://github.com/alloy-rs/alloy", rev = "cb95183", default-features = false, optional = true } +alloy-rpc-client = { version = "0.1", default-features = false, optional = true } [dev-dependencies] tokio = { version = "1.38", features = ["full"] } proptest = "1.4.0" tracing-subscriber = "0.3.18" -alloy-node-bindings = { git = "https://github.com/alloy-rs/alloy", rev = "cb95183", default-features = false } -alloy-rpc-client = { git = "https://github.com/alloy-rs/alloy", rev = "cb95183", default-features = false } +alloy-node-bindings = { version = "0.1", default-features = false } +alloy-rpc-client = { version = "0.1", default-features = false } serde_json = { version = "1.0.117", default-features = false } [features] diff --git a/crates/derive/src/stages/attributes_queue/builder.rs b/crates/derive/src/stages/attributes_queue/builder.rs index 4f2eebf25..4a4951ef8 100644 --- a/crates/derive/src/stages/attributes_queue/builder.rs +++ b/crates/derive/src/stages/attributes_queue/builder.rs @@ -10,9 +10,9 @@ use crate::{ }, }; use alloc::{boxed::Box, fmt::Debug, sync::Arc, vec, vec::Vec}; +use alloy_eips::eip2718::Encodable2718; use alloy_rlp::Encodable; use async_trait::async_trait; -use op_alloy_consensus::Encodable2718; /// The [AttributesBuilder] is responsible for preparing [L2PayloadAttributes] /// that can be used to construct an L2 Block containing only deposits. diff --git a/crates/derive/src/stages/attributes_queue/deposits.rs b/crates/derive/src/stages/attributes_queue/deposits.rs index dcc95eaa3..3744d5622 100644 --- a/crates/derive/src/stages/attributes_queue/deposits.rs +++ b/crates/derive/src/stages/attributes_queue/deposits.rs @@ -2,7 +2,7 @@ use crate::types::RawTransaction; use alloc::vec::Vec; -use alloy_consensus::Receipt; +use alloy_consensus::{Eip658Value, Receipt}; use alloy_primitives::{Address, B256}; use kona_primitives::{decode_deposit, DEPOSIT_EVENT_ABI_HASH}; @@ -19,7 +19,7 @@ pub(crate) async fn derive_deposits( let mut global_index = 0; let mut res = Vec::new(); for r in receipts.iter() { - if !r.status { + if Eip658Value::Eip658(false) == r.status { continue; } for l in r.logs.iter() { @@ -90,7 +90,7 @@ mod tests { let mut invalid_topic_log = generate_valid_log(); invalid_topic_log.data.topics_mut()[0] = B256::default(); Receipt { - status: true, + status: Eip658Value::Eip658(true), logs: vec![generate_valid_log(), bad_dest_log, invalid_topic_log], ..Default::default() } diff --git a/crates/derive/src/stages/l1_traversal.rs b/crates/derive/src/stages/l1_traversal.rs index 6db6d7ec9..3a6102561 100644 --- a/crates/derive/src/stages/l1_traversal.rs +++ b/crates/derive/src/stages/l1_traversal.rs @@ -162,7 +162,8 @@ pub(crate) mod tests { } pub(crate) fn new_receipts() -> alloc::vec::Vec { - let mut receipt = Receipt { status: true, ..Receipt::default() }; + let mut receipt = + Receipt { status: alloy_consensus::Eip658Value::Eip658(true), ..Receipt::default() }; let bad = Log::new( Address::from([2; 20]), vec![CONFIG_UPDATE_TOPIC, B256::default()], diff --git a/crates/derive/src/types/ecotone.rs b/crates/derive/src/types/ecotone.rs index b83fa8afe..f5bdd1ad1 100644 --- a/crates/derive/src/types/ecotone.rs +++ b/crates/derive/src/types/ecotone.rs @@ -4,8 +4,9 @@ use crate::types::{RawTransaction, UpgradeDepositSource}; use alloc::{string::String, vec, vec::Vec}; +use alloy_eips::eip2718::Encodable2718; use alloy_primitives::{address, bytes, Address, Bytes, TxKind, U256}; -use op_alloy_consensus::{Encodable2718, OpTxEnvelope, TxDeposit}; +use op_alloy_consensus::{OpTxEnvelope, TxDeposit}; use spin::Lazy; /// The UpdgradeTo Function Signature diff --git a/crates/derive/src/types/fjord.rs b/crates/derive/src/types/fjord.rs index a4e3c2c32..5a9258069 100644 --- a/crates/derive/src/types/fjord.rs +++ b/crates/derive/src/types/fjord.rs @@ -6,8 +6,9 @@ use crate::types::{ upgrade_to_calldata, RawTransaction, UpgradeDepositSource, GAS_PRICE_ORACLE_ADDRESS, }; use alloc::{string::String, vec, vec::Vec}; +use alloy_eips::eip2718::Encodable2718; use alloy_primitives::{address, bytes, Address, Bytes, TxKind, U256}; -use op_alloy_consensus::{Encodable2718, OpTxEnvelope, TxDeposit}; +use op_alloy_consensus::{OpTxEnvelope, TxDeposit}; use spin::Lazy; /// The L1 Info Depositer Address. diff --git a/crates/executor/src/eip4788.rs b/crates/executor/src/eip4788.rs index 344202b8f..e701fc458 100644 --- a/crates/executor/src/eip4788.rs +++ b/crates/executor/src/eip4788.rs @@ -1,7 +1,7 @@ //! Contains the logic for executing the pre-block beacon root call. use alloc::{boxed::Box, vec::Vec}; -use alloy_consensus::constants::BEACON_ROOTS_ADDRESS; +use alloy_eips::eip4788::BEACON_ROOTS_ADDRESS; use alloy_primitives::{Address, Bytes, B256, U256}; use anyhow::{anyhow, Result}; use kona_derive::types::{L2PayloadAttributes, RollupConfig}; diff --git a/crates/executor/src/lib.rs b/crates/executor/src/lib.rs index a46111df5..bcd3788da 100644 --- a/crates/executor/src/lib.rs +++ b/crates/executor/src/lib.rs @@ -8,11 +8,12 @@ extern crate alloc; use alloc::vec::Vec; use alloy_consensus::{Header, Sealable, Sealed, EMPTY_OMMER_ROOT_HASH, EMPTY_ROOT_HASH}; +use alloy_eips::eip2718::{Decodable2718, Encodable2718}; use alloy_primitives::{address, keccak256, Address, Bytes, TxKind, B256, U256}; use anyhow::{anyhow, Result}; use kona_derive::types::{L2PayloadAttributes, RawTransaction, RollupConfig}; use kona_mpt::{ordered_trie_with_encoder, TrieDB, TrieDBFetcher, TrieDBHinter}; -use op_alloy_consensus::{Decodable2718, Encodable2718, OpReceiptEnvelope, OpTxEnvelope}; +use op_alloy_consensus::{OpReceiptEnvelope, OpTxEnvelope}; use revm::{ db::{states::bundle_state::BundleRetention, State}, primitives::{ @@ -267,6 +268,7 @@ where state_root, transactions_root, receipts_root, + requests_root: None, withdrawals_root, logs_bloom, difficulty: U256::ZERO, diff --git a/crates/executor/src/util.rs b/crates/executor/src/util.rs index e585b6c65..971738fb9 100644 --- a/crates/executor/src/util.rs +++ b/crates/executor/src/util.rs @@ -1,10 +1,10 @@ //! Contains utilities for the L2 executor. use alloc::vec::Vec; +use alloy_consensus::{Eip658Value, Receipt, ReceiptWithBloom, Transaction}; use alloy_primitives::{Bloom, Log}; use op_alloy_consensus::{ - Eip658Value, OpDepositReceipt, OpDepositReceiptWithBloom, OpReceiptEnvelope, OpTxEnvelope, - OpTxType, Receipt, ReceiptWithBloom, Transaction, + OpDepositReceipt, OpDepositReceiptWithBloom, OpReceiptEnvelope, OpTxEnvelope, OpTxType, }; /// Constructs a [OpReceiptEnvelope] from a [Receipt] fields and [OpTxType]. diff --git a/crates/mpt/Cargo.toml b/crates/mpt/Cargo.toml index 6a4962af7..f004ead39 100644 --- a/crates/mpt/Cargo.toml +++ b/crates/mpt/Cargo.toml @@ -23,9 +23,9 @@ alloy-trie = { version = "0.4.1", default-features = false } [dev-dependencies] alloy-consensus.workspace = true tokio = { version = "1.38.0", features = ["full"] } -alloy-provider = { git = "https://github.com/alloy-rs/alloy", rev = "cb95183" } -alloy-rpc-types = { git = "https://github.com/alloy-rs/alloy", rev = "cb95183" } -alloy-transport-http = { git = "https://github.com/alloy-rs/alloy", rev = "cb95183" } +alloy-provider = { version = "0.1" } +alloy-rpc-types = { version = "0.1" } +alloy-transport-http = { version = "0.1" } reqwest = "0.12.4" tracing-subscriber = "0.3.18" futures = { version = "0.3.30", default-features = false } diff --git a/crates/mpt/src/test_util.rs b/crates/mpt/src/test_util.rs index dee1d3afe..606dd2d55 100644 --- a/crates/mpt/src/test_util.rs +++ b/crates/mpt/src/test_util.rs @@ -7,7 +7,7 @@ use alloc::{collections::BTreeMap, vec::Vec}; use alloy_consensus::{Receipt, ReceiptEnvelope, ReceiptWithBloom, TxEnvelope, TxType}; use alloy_primitives::{keccak256, Bytes, Log, B256}; use alloy_provider::{network::eip2718::Encodable2718, Provider, ProviderBuilder}; -use alloy_rpc_types::BlockTransactions; +use alloy_rpc_types::{BlockTransactions, BlockTransactionsKind}; use anyhow::{anyhow, Result}; use reqwest::Url; @@ -17,13 +17,11 @@ const RPC_URL: &str = "https://docs-demo.quiknode.pro/"; pub(crate) async fn get_live_derivable_receipts_list( ) -> Result<(B256, BTreeMap, Vec)> { // Initialize the provider. - let provider = ProviderBuilder::new() - .on_http(Url::parse(RPC_URL).expect("invalid rpc url")) - .map_err(|e| anyhow!(e))?; + let provider = ProviderBuilder::new().on_http(Url::parse(RPC_URL).expect("invalid rpc url")); let block_number = 19005266; let block = provider - .get_block(block_number.into(), true) + .get_block(block_number.into(), BlockTransactionsKind::Full) .await .map_err(|e| anyhow!(e))? .ok_or(anyhow!("Missing block"))?; @@ -82,13 +80,11 @@ pub(crate) async fn get_live_derivable_receipts_list( pub(crate) async fn get_live_derivable_transactions_list( ) -> Result<(B256, BTreeMap, Vec)> { // Initialize the provider. - let provider = ProviderBuilder::new() - .on_http(Url::parse(RPC_URL).expect("invalid rpc url")) - .map_err(|e| anyhow!(e))?; + let provider = ProviderBuilder::new().on_http(Url::parse(RPC_URL).expect("invalid rpc url")); let block_number = 19005266; let block = provider - .get_block(block_number.into(), true) + .get_block(block_number.into(), BlockTransactionsKind::Full) .await .map_err(|e| anyhow!(e))? .ok_or(anyhow!("Missing block"))?; diff --git a/crates/plasma/Cargo.toml b/crates/plasma/Cargo.toml index 8fe13aa69..40e18208b 100644 --- a/crates/plasma/Cargo.toml +++ b/crates/plasma/Cargo.toml @@ -24,8 +24,8 @@ kona-derive = { path = "../derive", version = "0.0.1" } serde = { version = "1.0.203", default-features = false, features = ["derive"], optional = true } # `online` feature dependencies -alloy-transport-http = { git = "https://github.com/alloy-rs/alloy", rev = "cb95183", optional = true } -alloy-provider = { git = "https://github.com/alloy-rs/alloy", rev = "cb95183", default-features = false, optional = true } +alloy-transport-http = { version = "0.1", optional = true } +alloy-provider = { version = "0.1", default-features = false, optional = true } reqwest = { version = "0.12", default-features = false, optional = true } [dev-dependencies] diff --git a/crates/primitives/Cargo.toml b/crates/primitives/Cargo.toml index 8e505d2c8..1bbaaa7b6 100644 --- a/crates/primitives/Cargo.toml +++ b/crates/primitives/Cargo.toml @@ -17,7 +17,7 @@ alloy-eips.workspace = true op-alloy-consensus.workspace = true # Superchain Registry -superchain-primitives = { git = "https://github.com/ethereum-optimism/superchain-registry", branch = "main", default-features = false } +superchain-primitives = { version = "0.1", default-features = false } # Alloy Types alloy-sol-types = { version = "0.7.6", default-features = false } diff --git a/crates/primitives/src/deposits.rs b/crates/primitives/src/deposits.rs index f65b11008..16537b8d9 100644 --- a/crates/primitives/src/deposits.rs +++ b/crates/primitives/src/deposits.rs @@ -1,10 +1,11 @@ //! Contains deposit transaction types and helper methods. use alloc::{string::String, vec::Vec}; +use alloy_eips::eip2718::Encodable2718; use alloy_primitives::{b256, keccak256, Address, Bytes, Log, TxKind, B256, U256, U64}; use alloy_rlp::Encodable; use core::fmt::Display; -use op_alloy_consensus::{Encodable2718, OpTxEnvelope, TxDeposit}; +use op_alloy_consensus::{OpTxEnvelope, TxDeposit}; use crate::RawTransaction; diff --git a/crates/primitives/src/payload.rs b/crates/primitives/src/payload.rs index 46d0677c8..568873c86 100644 --- a/crates/primitives/src/payload.rs +++ b/crates/primitives/src/payload.rs @@ -1,9 +1,10 @@ //! Contains the execution payload type. use alloc::vec::Vec; +use alloy_eips::eip2718::{Decodable2718, Encodable2718}; use alloy_primitives::{Address, Bloom, Bytes, B256}; use anyhow::Result; -use op_alloy_consensus::{Decodable2718, Encodable2718, OpTxEnvelope, OpTxType}; +use op_alloy_consensus::{OpTxEnvelope, OpTxType}; /// Fixed and variable memory costs for a payload. /// ~1000 bytes per payload, with some margin for overhead like map data. diff --git a/examples/trusted-sync/Cargo.toml b/examples/trusted-sync/Cargo.toml index 35766d79d..f9af92f7d 100644 --- a/examples/trusted-sync/Cargo.toml +++ b/examples/trusted-sync/Cargo.toml @@ -22,6 +22,6 @@ tokio = { version = "1.37.0", features = ["full"] } tracing-subscriber = "0.3.18" clap = { version = "4.5.4", features = ["derive", "env"] } serde = { version = "1.0.198", features = ["derive"] } -alloy-provider = { git = "https://github.com/alloy-rs/alloy", rev = "cb95183", default-features = false } -alloy-rpc-types = { git = "https://github.com/alloy-rs/alloy", rev = "cb95183", default-features = false } -alloy-transport = { git = "https://github.com/alloy-rs/alloy", rev = "cb95183", default-features = false } +alloy-provider = { version = "0.1", default-features = false } +alloy-rpc-types = { version = "0.1", default-features = false } +alloy-transport = { version = "0.1", default-features = false } diff --git a/examples/trusted-sync/src/validation.rs b/examples/trusted-sync/src/validation.rs index e9fa5fb70..d7148417b 100644 --- a/examples/trusted-sync/src/validation.rs +++ b/examples/trusted-sync/src/validation.rs @@ -1,7 +1,7 @@ //! Contains logic to validate derivation pipeline outputs. use alloy_provider::{Provider, ReqwestProvider}; -use alloy_rpc_types::{BlockNumberOrTag, Header}; +use alloy_rpc_types::{BlockNumberOrTag, BlockTransactionsKind, Header}; use alloy_transport::TransportResult; use anyhow::Result; use kona_derive::types::{ @@ -45,7 +45,7 @@ impl OnlineValidator { // Don't hydrate the block so we only get a list of transaction hashes. let block = self .provider - .get_block(tag.into(), false) + .get_block(tag.into(), BlockTransactionsKind::Hashes) .await .map_err(|e| anyhow::anyhow!(e))? .ok_or(anyhow::anyhow!("Block not found"))?;