From 955319d836ceb638c95b161ceb6b0c27984cd950 Mon Sep 17 00:00:00 2001 From: frisitano Date: Sun, 8 Dec 2024 13:45:39 +0000 Subject: [PATCH 01/86] init scroll rpc --- Cargo.lock | 45 ++ Cargo.toml | 6 + crates/scroll/alloy/consensus/Cargo.toml | 49 ++ crates/scroll/alloy/consensus/src/lib.rs | 14 + .../consensus/src/transaction/envelope.rs | 545 ++++++++++++++++++ .../consensus/src/transaction/l1_message.rs | 444 ++++++++++++++ .../alloy/consensus/src/transaction/mod.rs | 16 + .../consensus/src/transaction/tx_type.rs | 137 +++++ .../alloy/consensus/src/transaction/typed.rs | 351 +++++++++++ crates/scroll/alloy/network/Cargo.toml | 22 + crates/scroll/alloy/network/README.md | 8 + crates/scroll/alloy/network/src/lib.rs | 40 ++ crates/scroll/alloy/rpc-types/Cargo.toml | 15 + crates/scroll/alloy/rpc-types/src/lib.rs | 1 + .../scroll/alloy/rpc-types/src/transaction.rs | 11 + crates/scroll/rpc/Cargo.toml | 14 + crates/scroll/rpc/src/error.rs | 0 crates/scroll/rpc/src/eth/block.rs | 82 +++ crates/scroll/rpc/src/eth/call.rs | 0 crates/scroll/rpc/src/eth/mod.rs | 5 + crates/scroll/rpc/src/eth/pending_block.rs | 0 crates/scroll/rpc/src/eth/receipt.rs | 0 crates/scroll/rpc/src/eth/transaction.rs | 0 crates/scroll/rpc/src/lib.rs | 4 + 24 files changed, 1809 insertions(+) create mode 100644 crates/scroll/alloy/consensus/Cargo.toml create mode 100644 crates/scroll/alloy/consensus/src/lib.rs create mode 100644 crates/scroll/alloy/consensus/src/transaction/envelope.rs create mode 100644 crates/scroll/alloy/consensus/src/transaction/l1_message.rs create mode 100644 crates/scroll/alloy/consensus/src/transaction/mod.rs create mode 100644 crates/scroll/alloy/consensus/src/transaction/tx_type.rs create mode 100644 crates/scroll/alloy/consensus/src/transaction/typed.rs create mode 100644 crates/scroll/alloy/network/Cargo.toml create mode 100644 crates/scroll/alloy/network/README.md create mode 100644 crates/scroll/alloy/network/src/lib.rs create mode 100644 crates/scroll/alloy/rpc-types/Cargo.toml create mode 100644 crates/scroll/alloy/rpc-types/src/lib.rs create mode 100644 crates/scroll/alloy/rpc-types/src/transaction.rs create mode 100644 crates/scroll/rpc/Cargo.toml create mode 100644 crates/scroll/rpc/src/error.rs create mode 100644 crates/scroll/rpc/src/eth/block.rs create mode 100644 crates/scroll/rpc/src/eth/call.rs create mode 100644 crates/scroll/rpc/src/eth/mod.rs create mode 100644 crates/scroll/rpc/src/eth/pending_block.rs create mode 100644 crates/scroll/rpc/src/eth/receipt.rs create mode 100644 crates/scroll/rpc/src/eth/transaction.rs create mode 100644 crates/scroll/rpc/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index 5bd0a599758d..3724a8e46c54 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -133,6 +133,7 @@ dependencies = [ "auto_impl", "c-kzg", "derive_more", + "k256", "rand 0.8.5", "serde", "serde_with", @@ -9819,6 +9820,10 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "afab94fb28594581f62d981211a9a4d53cc8130bbcbbb89a0440d9b8e81a7746" +[[package]] +name = "rpc" +version = "1.1.2" + [[package]] name = "rstest" version = "0.23.0" @@ -10114,6 +10119,46 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +[[package]] +name = "scroll-alloy-consensus" +version = "1.1.2" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "alloy-signer", + "arbitrary", + "bincode", + "derive_more", + "rand 0.8.5", + "serde", + "serde_json", + "serde_with", + "thiserror 1.0.69", + "tokio", +] + +[[package]] +name = "scroll-alloy-network" +version = "1.1.2" +dependencies = [ + "alloy-consensus", + "alloy-network", + "alloy-primitives", + "alloy-rpc-types-eth", + "scroll-alloy-consensus", + "scroll-alloy-rpc-types", +] + +[[package]] +name = "scroll-alloy-rpc-types" +version = "1.1.2" +dependencies = [ + "scroll-alloy-consensus", +] + [[package]] name = "sdd" version = "3.0.4" diff --git a/Cargo.toml b/Cargo.toml index 8dbe0c61e915..c24271b3c2f7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -100,9 +100,13 @@ members = [ "crates/rpc/rpc-testing-util/", "crates/rpc/rpc-types-compat/", "crates/rpc/rpc/", + "crates/scroll/alloy/consensus", + "crates/scroll/alloy/network", + "crates/scroll/alloy/rpc-types", "crates/scroll/execution", "crates/scroll/primitives", "crates/scroll/revm", + "crates/scroll/rpc", "crates/scroll/storage", "crates/stages/api/", "crates/stages/stages/", @@ -480,6 +484,8 @@ alloy-transport-ipc = { version = "0.6.4", default-features = false } alloy-transport-ws = { version = "0.6.4", default-features = false } # scroll +scroll-alloy-consensus = { path = "crates/scroll/alloy/consensus" } +scroll-alloy-rpc-types = { path = "crates/scroll/alloy/rpc-types" } # TODO (scroll): point to crates.io/tag once the crate is published/a tag is created. poseidon-bn254 = { git = "https://github.com/scroll-tech/poseidon-bn254", rev = "526a64a", features = ["bn254"] } diff --git a/crates/scroll/alloy/consensus/Cargo.toml b/crates/scroll/alloy/consensus/Cargo.toml new file mode 100644 index 000000000000..4e57fe403d49 --- /dev/null +++ b/crates/scroll/alloy/consensus/Cargo.toml @@ -0,0 +1,49 @@ +[package] +name = "scroll-alloy-consensus" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +license.workspace = true +homepage.workspace = true +repository.workspace = true +exclude.workspace = true + +[lints] +workspace = true + +[dependencies] +# Alloy +alloy-rlp.workspace = true +alloy-eips.workspace = true +alloy-consensus.workspace = true +alloy-primitives = { workspace = true, features = ["rlp"] } + +# misc +thiserror.workspace = true +derive_more = { workspace = true, features = ["display"] } + +# arbitrary +arbitrary = { workspace = true, features = ["derive"], optional = true } + +# serde +serde_with = { workspace = true, optional = true } +alloy-serde = { workspace = true, optional = true } +serde = { workspace = true, features = ["derive"], optional = true } + +[dev-dependencies] +rand.workspace = true +bincode.workspace = true +serde_json.workspace = true +alloy-signer.workspace = true +tokio = { workspace = true, features = ["macros"] } +arbitrary = { workspace = true, features = ["derive"] } +alloy-primitives = { workspace = true, features = ["rand"] } + +[features] +default = ["std"] +std = ["alloy-eips/std", "alloy-consensus/std", "derive_more/std"] +k256 = ["alloy-primitives/k256", "alloy-consensus/k256"] +kzg = ["alloy-eips/kzg", "alloy-consensus/kzg", "std"] +arbitrary = ["std", "dep:arbitrary", "alloy-consensus/arbitrary", "alloy-eips/arbitrary", "alloy-primitives/rand"] +serde = ["dep:serde", "dep:alloy-serde", "alloy-primitives/serde", "alloy-consensus/serde", "alloy-eips/serde"] +serde-bincode-compat = ["serde_with"] \ No newline at end of file diff --git a/crates/scroll/alloy/consensus/src/lib.rs b/crates/scroll/alloy/consensus/src/lib.rs new file mode 100644 index 000000000000..922936676ae9 --- /dev/null +++ b/crates/scroll/alloy/consensus/src/lib.rs @@ -0,0 +1,14 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] +#![cfg_attr(not(feature = "std"), no_std)] + +#[cfg(test)] +extern crate alloc; + +mod transaction; +pub use transaction::{ + ScrollTxEnvelope, ScrollTxType, ScrollTypedTransaction, TxL1Message, L1_MESSAGE_TX_TYPE_ID, +}; + +#[cfg(feature = "serde")] +pub use transaction::serde_l1_message_tx_rpc; diff --git a/crates/scroll/alloy/consensus/src/transaction/envelope.rs b/crates/scroll/alloy/consensus/src/transaction/envelope.rs new file mode 100644 index 000000000000..d89e7f0fb8f6 --- /dev/null +++ b/crates/scroll/alloy/consensus/src/transaction/envelope.rs @@ -0,0 +1,545 @@ +use alloy_consensus::{ + transaction::RlpEcdsaTx, Sealable, Sealed, Signed, Transaction, TxEip1559, TxEip2930, TxLegacy, +}; +use alloy_eips::{ + eip2718::{Decodable2718, Eip2718Error, Eip2718Result, Encodable2718}, + eip2930::AccessList, + eip7702::SignedAuthorization, +}; +use alloy_primitives::{Address, Bytes, TxKind, B256, U256}; +use alloy_rlp::{Decodable, Encodable}; + +use crate::{ScrollTxType, TxL1Message}; + +/// The Ethereum [EIP-2718] Transaction Envelope, modified for OP Stack chains. +/// +/// # Note: +/// +/// This enum distinguishes between tagged and untagged legacy transactions, as +/// the in-protocol merkle tree may commit to EITHER 0-prefixed or raw. +/// Therefore we must ensure that encoding returns the precise byte-array that +/// was decoded, preserving the presence or absence of the `TransactionType` +/// flag. +/// +/// [EIP-2718]: https://eips.ethereum.org/EIPS/eip-2718 +#[derive(Debug, Clone, PartialEq, Eq)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +#[cfg_attr( + feature = "serde", + serde(into = "serde_from::TaggedTxEnvelope", from = "serde_from::MaybeTaggedTxEnvelope") +)] +#[cfg_attr(all(any(test, feature = "arbitrary"), feature = "k256"), derive(arbitrary::Arbitrary))] +#[non_exhaustive] +pub enum ScrollTxEnvelope { + /// An untagged [`TxLegacy`]. + Legacy(Signed), + /// A [`TxEip2930`] tagged with type 1. + Eip2930(Signed), + /// A [`TxEip1559`] tagged with type 2. + Eip1559(Signed), + /// A [`L1Message`] tagged with type [`crate::L1_MESSAGE_TX_TYPE`]. + L1Message(Sealed), +} + +impl From> for ScrollTxEnvelope { + fn from(v: Signed) -> Self { + Self::Legacy(v) + } +} + +impl From> for ScrollTxEnvelope { + fn from(v: Signed) -> Self { + Self::Eip2930(v) + } +} + +impl From> for ScrollTxEnvelope { + fn from(v: Signed) -> Self { + Self::Eip1559(v) + } +} + +impl From for ScrollTxEnvelope { + fn from(v: TxL1Message) -> Self { + v.seal_slow().into() + } +} + +impl From> for ScrollTxEnvelope { + fn from(v: Sealed) -> Self { + Self::L1Message(v) + } +} + +impl Transaction for ScrollTxEnvelope { + fn chain_id(&self) -> Option { + match self { + Self::Legacy(tx) => tx.tx().chain_id(), + Self::Eip2930(tx) => tx.tx().chain_id(), + Self::Eip1559(tx) => tx.tx().chain_id(), + Self::L1Message(tx) => tx.chain_id(), + } + } + + fn nonce(&self) -> u64 { + match self { + Self::Legacy(tx) => tx.tx().nonce(), + Self::Eip2930(tx) => tx.tx().nonce(), + Self::Eip1559(tx) => tx.tx().nonce(), + Self::L1Message(tx) => tx.nonce(), + } + } + + fn gas_limit(&self) -> u64 { + match self { + Self::Legacy(tx) => tx.tx().gas_limit(), + Self::Eip2930(tx) => tx.tx().gas_limit(), + Self::Eip1559(tx) => tx.tx().gas_limit(), + Self::L1Message(tx) => tx.gas_limit(), + } + } + + fn gas_price(&self) -> Option { + match self { + Self::Legacy(tx) => tx.tx().gas_price(), + Self::Eip2930(tx) => tx.tx().gas_price(), + Self::Eip1559(tx) => tx.tx().gas_price(), + Self::L1Message(tx) => tx.gas_price(), + } + } + + fn max_fee_per_gas(&self) -> u128 { + match self { + Self::Legacy(tx) => tx.tx().max_fee_per_gas(), + Self::Eip2930(tx) => tx.tx().max_fee_per_gas(), + Self::Eip1559(tx) => tx.tx().max_fee_per_gas(), + Self::L1Message(tx) => tx.max_fee_per_gas(), + } + } + + fn max_priority_fee_per_gas(&self) -> Option { + match self { + Self::Legacy(tx) => tx.tx().max_priority_fee_per_gas(), + Self::Eip2930(tx) => tx.tx().max_priority_fee_per_gas(), + Self::Eip1559(tx) => tx.tx().max_priority_fee_per_gas(), + Self::L1Message(tx) => tx.max_priority_fee_per_gas(), + } + } + + fn max_fee_per_blob_gas(&self) -> Option { + match self { + Self::Legacy(tx) => tx.tx().max_fee_per_blob_gas(), + Self::Eip2930(tx) => tx.tx().max_fee_per_blob_gas(), + Self::Eip1559(tx) => tx.tx().max_fee_per_blob_gas(), + Self::L1Message(tx) => tx.max_fee_per_blob_gas(), + } + } + + fn priority_fee_or_price(&self) -> u128 { + match self { + Self::Legacy(tx) => tx.tx().priority_fee_or_price(), + Self::Eip2930(tx) => tx.tx().priority_fee_or_price(), + Self::Eip1559(tx) => tx.tx().priority_fee_or_price(), + Self::L1Message(tx) => tx.priority_fee_or_price(), + } + } + + fn to(&self) -> Option
{ + match self { + Self::Legacy(tx) => tx.tx().to(), + Self::Eip2930(tx) => tx.tx().to(), + Self::Eip1559(tx) => tx.tx().to(), + Self::L1Message(tx) => tx.to(), + } + } + + fn kind(&self) -> TxKind { + match self { + Self::Legacy(tx) => tx.tx().kind(), + Self::Eip2930(tx) => tx.tx().kind(), + Self::Eip1559(tx) => tx.tx().kind(), + Self::L1Message(tx) => tx.kind(), + } + } + + fn value(&self) -> U256 { + match self { + Self::Legacy(tx) => tx.tx().value(), + Self::Eip2930(tx) => tx.tx().value(), + Self::Eip1559(tx) => tx.tx().value(), + Self::L1Message(tx) => tx.value(), + } + } + + fn input(&self) -> &Bytes { + match self { + Self::Legacy(tx) => tx.tx().input(), + Self::Eip2930(tx) => tx.tx().input(), + Self::Eip1559(tx) => tx.tx().input(), + Self::L1Message(tx) => tx.input(), + } + } + + fn ty(&self) -> u8 { + match self { + Self::Legacy(tx) => tx.tx().ty(), + Self::Eip2930(tx) => tx.tx().ty(), + Self::Eip1559(tx) => tx.tx().ty(), + Self::L1Message(tx) => tx.ty(), + } + } + + fn access_list(&self) -> Option<&AccessList> { + match self { + Self::Legacy(tx) => tx.tx().access_list(), + Self::Eip2930(tx) => tx.tx().access_list(), + Self::Eip1559(tx) => tx.tx().access_list(), + Self::L1Message(tx) => tx.access_list(), + } + } + + fn blob_versioned_hashes(&self) -> Option<&[B256]> { + match self { + Self::Legacy(tx) => tx.tx().blob_versioned_hashes(), + Self::Eip2930(tx) => tx.tx().blob_versioned_hashes(), + Self::Eip1559(tx) => tx.tx().blob_versioned_hashes(), + Self::L1Message(tx) => tx.blob_versioned_hashes(), + } + } + + fn authorization_list(&self) -> Option<&[SignedAuthorization]> { + match self { + Self::Legacy(tx) => tx.tx().authorization_list(), + Self::Eip2930(tx) => tx.tx().authorization_list(), + Self::Eip1559(tx) => tx.tx().authorization_list(), + Self::L1Message(tx) => tx.authorization_list(), + } + } + + fn is_dynamic_fee(&self) -> bool { + match self { + Self::Legacy(tx) => tx.tx().is_dynamic_fee(), + Self::Eip2930(tx) => tx.tx().is_dynamic_fee(), + Self::Eip1559(tx) => tx.tx().is_dynamic_fee(), + Self::L1Message(tx) => tx.is_dynamic_fee(), + } + } + + fn effective_gas_price(&self, base_fee: Option) -> u128 { + match self { + Self::Legacy(tx) => tx.tx().effective_gas_price(base_fee), + Self::Eip2930(tx) => tx.tx().effective_gas_price(base_fee), + Self::Eip1559(tx) => tx.tx().effective_gas_price(base_fee), + Self::L1Message(tx) => tx.effective_gas_price(base_fee), + } + } +} + +impl ScrollTxEnvelope { + /// Returns true if the transaction is a legacy transaction. + #[inline] + pub const fn is_legacy(&self) -> bool { + matches!(self, Self::Legacy(_)) + } + + /// Returns true if the transaction is an EIP-2930 transaction. + #[inline] + pub const fn is_eip2930(&self) -> bool { + matches!(self, Self::Eip2930(_)) + } + + /// Returns true if the transaction is an EIP-1559 transaction. + #[inline] + pub const fn is_eip1559(&self) -> bool { + matches!(self, Self::Eip1559(_)) + } + + /// Returns true if the transaction is a deposit transaction. + #[inline] + pub const fn is_l1_message(&self) -> bool { + matches!(self, Self::L1Message(_)) + } + + /// Returns the [`TxLegacy`] variant if the transaction is a legacy transaction. + pub const fn as_legacy(&self) -> Option<&Signed> { + match self { + Self::Legacy(tx) => Some(tx), + _ => None, + } + } + + /// Returns the [`TxEip2930`] variant if the transaction is an EIP-2930 transaction. + pub const fn as_eip2930(&self) -> Option<&Signed> { + match self { + Self::Eip2930(tx) => Some(tx), + _ => None, + } + } + + /// Returns the [`TxEip1559`] variant if the transaction is an EIP-1559 transaction. + pub const fn as_eip1559(&self) -> Option<&Signed> { + match self { + Self::Eip1559(tx) => Some(tx), + _ => None, + } + } + + /// Returns the [`TxDeposit`] variant if the transaction is a deposit transaction. + pub const fn as_l1_message(&self) -> Option<&Sealed> { + match self { + Self::L1Message(tx) => Some(tx), + _ => None, + } + } + + /// Return the [`OpTxType`] of the inner txn. + pub const fn tx_type(&self) -> ScrollTxType { + match self { + Self::Legacy(_) => ScrollTxType::Legacy, + Self::Eip2930(_) => ScrollTxType::Eip2930, + Self::Eip1559(_) => ScrollTxType::Eip1559, + Self::L1Message(_) => ScrollTxType::L1Message, + } + } + + /// Return the length of the inner txn, including type byte length + pub fn eip2718_encoded_length(&self) -> usize { + match self { + Self::Legacy(t) => t.eip2718_encoded_length(), + Self::Eip2930(t) => t.eip2718_encoded_length(), + Self::Eip1559(t) => t.eip2718_encoded_length(), + Self::L1Message(t) => t.eip2718_encoded_length(), + } + } +} + +impl Encodable for ScrollTxEnvelope { + fn encode(&self, out: &mut dyn alloy_rlp::BufMut) { + self.network_encode(out) + } + + fn length(&self) -> usize { + self.network_len() + } +} + +impl Decodable for ScrollTxEnvelope { + fn decode(buf: &mut &[u8]) -> alloy_rlp::Result { + Ok(Self::network_decode(buf)?) + } +} + +impl Decodable2718 for ScrollTxEnvelope { + fn typed_decode(ty: u8, buf: &mut &[u8]) -> Eip2718Result { + match ty.try_into().map_err(|_| Eip2718Error::UnexpectedType(ty))? { + ScrollTxType::Eip2930 => Ok(Self::Eip2930(TxEip2930::rlp_decode_signed(buf)?)), + ScrollTxType::Eip1559 => Ok(Self::Eip1559(TxEip1559::rlp_decode_signed(buf)?)), + ScrollTxType::L1Message => Ok(Self::L1Message(TxL1Message::decode(buf)?.seal_slow())), + ScrollTxType::Legacy => { + Err(alloy_rlp::Error::Custom("type-0 eip2718 transactions are not supported") + .into()) + } + } + } + + fn fallback_decode(buf: &mut &[u8]) -> Eip2718Result { + Ok(Self::Legacy(TxLegacy::rlp_decode_signed(buf)?)) + } +} + +impl Encodable2718 for ScrollTxEnvelope { + fn type_flag(&self) -> Option { + match self { + Self::Legacy(_) => None, + Self::Eip2930(_) => Some(ScrollTxType::Eip2930 as u8), + Self::Eip1559(_) => Some(ScrollTxType::Eip1559 as u8), + Self::L1Message(_) => Some(ScrollTxType::L1Message as u8), + } + } + + fn encode_2718_len(&self) -> usize { + self.eip2718_encoded_length() + } + + fn encode_2718(&self, out: &mut dyn alloy_rlp::BufMut) { + match self { + // Legacy transactions have no difference between network and 2718 + Self::Legacy(tx) => tx.eip2718_encode(out), + Self::Eip2930(tx) => { + tx.eip2718_encode(out); + } + Self::Eip1559(tx) => { + tx.eip2718_encode(out); + } + Self::L1Message(tx) => { + tx.eip2718_encode(out); + } + } + } + + fn trie_hash(&self) -> B256 { + match self { + Self::Legacy(tx) => *tx.hash(), + Self::Eip1559(tx) => *tx.hash(), + Self::Eip2930(tx) => *tx.hash(), + Self::L1Message(tx) => tx.seal(), + } + } +} + +#[cfg(feature = "serde")] +mod serde_from { + //! NB: Why do we need this? + //! + //! Because the tag may be missing, we need an abstraction over tagged (with + //! type) and untagged (always legacy). This is [`MaybeTaggedTxEnvelope`]. + //! + //! The tagged variant is [`TaggedTxEnvelope`], which always has a type tag. + //! + //! We serialize via [`TaggedTxEnvelope`] and deserialize via + //! [`MaybeTaggedTxEnvelope`]. + use super::*; + + #[derive(Debug, serde::Deserialize)] + #[serde(untagged)] + pub(crate) enum MaybeTaggedTxEnvelope { + Tagged(TaggedTxEnvelope), + #[serde(with = "alloy_consensus::transaction::signed_legacy_serde")] + Untagged(Signed), + } + + #[derive(Debug, serde::Serialize, serde::Deserialize)] + #[serde(tag = "type")] + pub(crate) enum TaggedTxEnvelope { + #[serde( + rename = "0x0", + alias = "0x00", + with = "alloy_consensus::transaction::signed_legacy_serde" + )] + Legacy(Signed), + #[serde(rename = "0x1", alias = "0x01")] + Eip2930(Signed), + #[serde(rename = "0x2", alias = "0x02")] + Eip1559(Signed), + #[serde( + rename = "0x7e", + alias = "0x7E", + serialize_with = "crate::serde_l1_message_tx_rpc" + )] + L1Message(Sealed), + } + + impl From for ScrollTxEnvelope { + fn from(value: MaybeTaggedTxEnvelope) -> Self { + match value { + MaybeTaggedTxEnvelope::Tagged(tagged) => tagged.into(), + MaybeTaggedTxEnvelope::Untagged(tx) => Self::Legacy(tx), + } + } + } + + impl From for ScrollTxEnvelope { + fn from(value: TaggedTxEnvelope) -> Self { + match value { + TaggedTxEnvelope::Legacy(signed) => Self::Legacy(signed), + TaggedTxEnvelope::Eip2930(signed) => Self::Eip2930(signed), + TaggedTxEnvelope::Eip1559(signed) => Self::Eip1559(signed), + TaggedTxEnvelope::L1Message(tx) => Self::L1Message(tx), + } + } + } + + impl From for TaggedTxEnvelope { + fn from(value: ScrollTxEnvelope) -> Self { + match value { + ScrollTxEnvelope::Legacy(signed) => Self::Legacy(signed), + ScrollTxEnvelope::Eip2930(signed) => Self::Eip2930(signed), + ScrollTxEnvelope::Eip1559(signed) => Self::Eip1559(signed), + ScrollTxEnvelope::L1Message(tx) => Self::L1Message(tx), + } + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + use alloc::vec; + use alloy_primitives::{hex, Address, Bytes, TxKind, B256, U256}; + + #[test] + fn test_tx_gas_limit() { + let tx = TxL1Message { gas_limit: 1, ..Default::default() }; + let tx_envelope = ScrollTxEnvelope::L1Message(tx.seal_slow()); + assert_eq!(tx_envelope.gas_limit(), 1); + } + + #[test] + fn test_encode_decode_l1_message() { + let tx = TxL1Message { + queue_index: 1, + gas_limit: 2, + to: Address::left_padding_from(&[3]), + sender: Address::left_padding_from(&[4]), + value: U256::from(4_u64), + input: Bytes::from(vec![5]), + }; + let tx_envelope = ScrollTxEnvelope::L1Message(tx.seal_slow()); + let encoded = tx_envelope.encoded_2718(); + let decoded = ScrollTxEnvelope::decode_2718(&mut encoded.as_ref()).unwrap(); + assert_eq!(encoded.len(), tx_envelope.encode_2718_len()); + assert_eq!(decoded, tx_envelope); + } + + #[test] + #[cfg(feature = "serde")] + fn test_serde_roundtrip_deposit() { + let tx = TxL1Message { + queue_index: 11, + gas_limit: u64::MAX, + sender: Address::random(), + to: Address::random(), + value: U256::MAX, + input: Bytes::new(), + }; + let tx_envelope = ScrollTxEnvelope::L1Message(tx.seal_slow()); + + let serialized = serde_json::to_string(&tx_envelope).unwrap(); + let deserialized: ScrollTxEnvelope = serde_json::from_str(&serialized).unwrap(); + + assert_eq!(tx_envelope, deserialized); + } + + #[test] + fn eip2718_l1_message_decode() { + // + let b = hex!("7ef9015a830e7991831e848094781e90f1c8fc4611c9b7497c3b47f99ef6969cbc80b901248ef1332e000000000000000000000000c186fa914353c44b2e33ebe05f21846f1048beda0000000000000000000000003bad7ad0728f9917d1bf08af5782dcbd516cdd96000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e799100000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000044493a4f8411b3f3d662006b9bf68884e71f1fc0f8ea04e4cb188354738202c3e34a473b93000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000947885bcbd5cecef1336b5300fb5186a12ddd8c478"); + + let tx = ScrollTxEnvelope::decode_2718(&mut b[..].as_ref()).unwrap(); + tx.as_l1_message().unwrap(); + } + + #[test] + fn eip1559_decode() { + use alloy_consensus::SignableTransaction; + use alloy_primitives::PrimitiveSignature; + let tx = TxEip1559 { + chain_id: 1u64, + nonce: 2, + max_fee_per_gas: 3, + max_priority_fee_per_gas: 4, + gas_limit: 5, + to: Address::left_padding_from(&[6]).into(), + value: U256::from(7_u64), + input: vec![8].into(), + access_list: Default::default(), + }; + let sig = PrimitiveSignature::test_signature(); + let tx_signed = tx.into_signed(sig); + let envelope: ScrollTxEnvelope = tx_signed.into(); + let encoded = envelope.encoded_2718(); + let mut slice = encoded.as_slice(); + let decoded = ScrollTxEnvelope::decode_2718(&mut slice).unwrap(); + assert!(matches!(decoded, ScrollTxEnvelope::Eip1559(_))); + } +} diff --git a/crates/scroll/alloy/consensus/src/transaction/l1_message.rs b/crates/scroll/alloy/consensus/src/transaction/l1_message.rs new file mode 100644 index 000000000000..187f3e29c744 --- /dev/null +++ b/crates/scroll/alloy/consensus/src/transaction/l1_message.rs @@ -0,0 +1,444 @@ +//! Scroll L1 message transaction + +use alloy_consensus::{Sealable, Transaction}; +use alloy_primitives::{ + keccak256, + private::alloy_rlp::{Encodable, Header}, + Address, Bytes, ChainId, PrimitiveSignature as Signature, TxHash, TxKind, B256, U256, +}; +use alloy_rlp::Decodable; + +/// L1 message transaction type id, 0x7e in hex. +pub const L1_MESSAGE_TRANSACTION_TYPE: u8 = 126; + +/// A message transaction sent from the settlement layer to the L2 for execution. +/// +/// The signature of the L1 message is already verified on the L1 and as such doesn't contain +/// a signature field. Gas for the transaction execution on Scroll is already paid for on the L1. +/// +/// # Bincode compatibility +/// +/// `bincode` crate doesn't work with optionally serializable serde fields and some of the execution +/// types require optional serialization for RPC compatibility. Since `TxL1Message` doesn't +/// contain optionally serializable fields, no `bincode` compatible bridge implementation is +/// required. +#[derive(Debug, Clone, PartialEq, Eq, Hash, Default)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] +pub struct TxL1Message { + /// The queue index of the message in the L1 contract queue. + #[cfg_attr(feature = "serde", serde(with = "alloy_serde::quantity"))] + pub queue_index: u64, + /// The gas limit for the transaction. Gas is paid for when message is sent from the L1. + #[cfg_attr(feature = "serde", serde(with = "alloy_serde::quantity", rename = "gas"))] + pub gas_limit: u64, + /// The destination for the transaction. `Address` is used in place of `TxKind` since contract + /// creations aren't allowed via L1 message transactions. + pub to: Address, + /// The value sent. + pub value: U256, + /// The L1 sender of the transaction. + pub sender: Address, + /// The input of the transaction. + pub input: Bytes, +} + +impl TxL1Message { + /// Returns an empty signature for the [`TxL1Message`], which don't include a signature. + pub fn signature() -> Signature { + Signature::new(U256::ZERO, U256::ZERO, false) + } + + /// Decodes the inner [`TxL1Message`] fields from RLP bytes. + /// + /// NOTE: This assumes a RLP header has already been decoded, and _just_ decodes the following + /// RLP fields in the following order: + /// + /// - `queue_index` + /// - `gas_limit` + /// - `to` + /// - `value` + /// - `input` + /// - `sender` + pub fn rlp_decode_fields(buf: &mut &[u8]) -> alloy_rlp::Result { + Ok(Self { + queue_index: Decodable::decode(buf)?, + gas_limit: Decodable::decode(buf)?, + to: Decodable::decode(buf)?, + value: Decodable::decode(buf)?, + input: Decodable::decode(buf)?, + sender: Decodable::decode(buf)?, + }) + } + + /// Decodes the transaction from RLP bytes. + pub fn rlp_decode(buf: &mut &[u8]) -> alloy_rlp::Result { + let header = Header::decode(buf)?; + if !header.list { + return Err(alloy_rlp::Error::UnexpectedString); + } + let remaining = buf.len(); + + let this = Self::rlp_decode_fields(buf)?; + + if buf.len() + header.payload_length != remaining { + return Err(alloy_rlp::Error::ListLengthMismatch { + expected: header.payload_length, + got: remaining - buf.len(), + }); + } + + Ok(this) + } + + /// Outputs the length of the transaction's fields, without a RLP header. + fn rlp_encoded_fields_length(&self) -> usize { + self.queue_index.length() + + self.gas_limit.length() + + self.to.length() + + self.value.length() + + self.input.0.length() + + self.sender.length() + } + + /// Encode the fields of the transaction without a RLP header. + /// + fn rlp_encode_fields(&self, out: &mut dyn alloy_rlp::BufMut) { + self.queue_index.encode(out); + self.gas_limit.encode(out); + self.to.encode(out); + self.value.encode(out); + self.input.encode(out); + self.sender.encode(out); + } + + /// Create a RLP header for the transaction. + fn rlp_header(&self) -> Header { + Header { list: true, payload_length: self.rlp_encoded_fields_length() } + } + + /// RLP encodes the transaction. + pub fn rlp_encode(&self, out: &mut dyn alloy_rlp::BufMut) { + self.rlp_header().encode(out); + self.rlp_encode_fields(out); + } + + /// Get the length of the transaction when RLP encoded. + pub fn rlp_encoded_length(&self) -> usize { + self.rlp_header().length_with_payload() + } + + /// Get the length of the transaction when EIP-2718 encoded. This is the + /// 1 byte type flag + the length of the RLP encoded transaction. + pub fn eip2718_encoded_length(&self) -> usize { + self.rlp_encoded_length() + 1 + } + + /// EIP-2718 encode the transaction. + pub fn eip2718_encode(&self, out: &mut dyn alloy_rlp::BufMut) { + out.put_u8(L1_MESSAGE_TRANSACTION_TYPE); + self.rlp_encode(out) + } + + /// Calculates the in-memory size of the [`TxL1Message`] transaction. + #[inline] + pub fn size(&self) -> usize { + size_of::() + // queue_index + size_of::() + // gas_limit + size_of::
() + // to + size_of::() + // value + self.input.len() + // input + size_of::
() // sender + } + + pub fn tx_hash(&self) -> TxHash { + let mut buf = Vec::with_capacity(self.eip2718_encoded_length()); + self.eip2718_encode(&mut buf); + keccak256(&buf) + } +} + +impl Transaction for TxL1Message { + fn chain_id(&self) -> Option { + None + } + + fn nonce(&self) -> u64 { + 0u64 + } + + fn gas_limit(&self) -> u64 { + self.gas_limit + } + + fn gas_price(&self) -> Option { + None + } + + fn max_fee_per_gas(&self) -> u128 { + 0 + } + + fn max_priority_fee_per_gas(&self) -> Option { + None + } + + fn max_fee_per_blob_gas(&self) -> Option { + None + } + + fn priority_fee_or_price(&self) -> u128 { + 0 + } + + fn effective_gas_price(&self, _base_fee: Option) -> u128 { + 0 + } + + fn is_dynamic_fee(&self) -> bool { + false + } + + fn kind(&self) -> TxKind { + TxKind::Call(self.to) + } + + fn value(&self) -> U256 { + self.value + } + + fn input(&self) -> &Bytes { + &self.input + } + + fn ty(&self) -> u8 { + L1_MESSAGE_TRANSACTION_TYPE + } + + fn access_list(&self) -> Option<&alloy_eips::eip2930::AccessList> { + None + } + + fn blob_versioned_hashes(&self) -> Option<&[B256]> { + None + } + + fn authorization_list(&self) -> Option<&[alloy_eips::eip7702::SignedAuthorization]> { + None + } +} + +impl Encodable for TxL1Message { + fn encode(&self, out: &mut dyn alloy_rlp::BufMut) { + self.rlp_encode(out) + } + + fn length(&self) -> usize { + self.rlp_encoded_length() + } +} + +impl Decodable for TxL1Message { + fn decode(buf: &mut &[u8]) -> alloy_rlp::Result { + Self::rlp_decode(buf) + } +} + +impl Sealable for TxL1Message { + fn hash_slow(&self) -> B256 { + self.tx_hash() + } +} + +// TODO(scroll): Ensure this is consistent with scroll implementation. + +/// Deposit transactions don't have a signature, however, we include an empty signature in the +/// response for better compatibility. +/// +/// This function can be used as `serialize_with` serde attribute for the [`TxDeposit`] and will +/// flatten [`TxDeposit::signature`] into response. +#[cfg(feature = "serde")] +pub fn serde_l1_message_tx_rpc( + value: &T, + serializer: S, +) -> Result { + use serde::Serialize; + + #[derive(Serialize)] + struct SerdeHelper<'a, T> { + #[serde(flatten)] + value: &'a T, + #[serde(flatten)] + signature: Signature, + } + + SerdeHelper { value, signature: TxL1Message::signature() }.serialize(serializer) +} + +// #[cfg(test)] +// mod tests { +// use super::TxL1Message; +// use alloy_primitives::{address, bytes, hex, Bytes, U256}; +// use arbitrary::Arbitrary; +// use bytes::BytesMut; +// use rand::Rng; + +// // #[test] +// // fn test_bincode_roundtrip() { +// // let mut bytes = [0u8; 1024]; +// // rand::thread_rng().fill(bytes.as_mut_slice()); +// // let tx = TxL1Message::arbitrary(&mut arbitrary::Unstructured::new(&bytes)).unwrap(); + +// // let encoded = bincode::serialize(&tx).unwrap(); +// // let decoded: TxL1Message = bincode::deserialize(&encoded).unwrap(); +// // assert_eq!(decoded, tx); +// // } + +// #[test] +// fn test_eip2718_encode() { +// let tx = +// TxL1Message { +// queue_index: 947883, +// gas_limit: 2000000, +// to: address!("781e90f1c8fc4611c9b7497c3b47f99ef6969cbc"), +// value: U256::ZERO, +// sender: address!("7885bcbd5cecef1336b5300fb5186a12ddd8c478"), +// input: +// bytes!("8ef1332e000000000000000000000000c186fa914353c44b2e33ebe05f21846f1048beda0000000000000000000000003bad7ad0728f9917d1bf08af5782dcbd516cdd96000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e76ab00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000044493a4f84f464e58d4bfa93bcc57abfb14dbe1b8ff46cd132b5709aab227f269727943d2f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" +// ), } +// ; +// let bytes = +// Bytes::from_static(&hex!(" +// 7ef9015a830e76ab831e848094781e90f1c8fc4611c9b7497c3b47f99ef6969cbc80b901248ef1332e000000000000000000000000c186fa914353c44b2e33ebe05f21846f1048beda0000000000000000000000003bad7ad0728f9917d1bf08af5782dcbd516cdd96000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e76ab00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000044493a4f84f464e58d4bfa93bcc57abfb14dbe1b8ff46cd132b5709aab227f269727943d2f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000947885bcbd5cecef1336b5300fb5186a12ddd8c478" +// )); + +// let mut encoded = BytesMut::default(); +// tx.eip2718_encode(&mut encoded); + +// assert_eq!(encoded, bytes.as_ref()) +// } + +// // #[test] +// // fn test_compaction_backwards_compatibility() { +// // assert_eq!(TxL1Message::bitflag_encoded_bytes(), 2); +// // validate_bitflag_backwards_compat!(TxL1Message, UnusedBits::NotZero); +// // } +// } + +/// Bincode-compatible [`TxDeposit`] serde implementation. +#[cfg(all(feature = "serde", feature = "serde-bincode-compat"))] +pub(super) mod serde_bincode_compat { + use alloc::borrow::Cow; + use alloy_primitives::{Address, Bytes, TxKind, B256, U256}; + use serde::{Deserialize, Deserializer, Serialize, Serializer}; + use serde_with::{DeserializeAs, SerializeAs}; + + /// Bincode-compatible [`super::TxDeposit`] serde implementation. + /// + /// Intended to use with the [`serde_with::serde_as`] macro in the following way: + /// ```rust + /// use op_alloy_consensus::{serde_bincode_compat, TxDeposit}; + /// use serde::{Deserialize, Serialize}; + /// use serde_with::serde_as; + /// + /// #[serde_as] + /// #[derive(Serialize, Deserialize)] + /// struct Data { + /// #[serde_as(as = "serde_bincode_compat::TxDeposit")] + /// transaction: TxDeposit, + /// } + /// ``` + #[derive(Debug, Serialize, Deserialize)] + pub struct TxDeposit<'a> { + source_hash: B256, + from: Address, + #[serde(default)] + to: TxKind, + #[serde(default)] + mint: Option, + value: U256, + gas_limit: u64, + is_system_transaction: bool, + input: Cow<'a, Bytes>, + } + + impl<'a> From<&'a super::TxDeposit> for TxDeposit<'a> { + fn from(value: &'a super::TxDeposit) -> Self { + Self { + source_hash: value.source_hash, + from: value.from, + to: value.to, + mint: value.mint, + value: value.value, + gas_limit: value.gas_limit, + is_system_transaction: value.is_system_transaction, + input: Cow::Borrowed(&value.input), + } + } + } + + impl<'a> From> for super::TxDeposit { + fn from(value: TxDeposit<'a>) -> Self { + Self { + source_hash: value.source_hash, + from: value.from, + to: value.to, + mint: value.mint, + value: value.value, + gas_limit: value.gas_limit, + is_system_transaction: value.is_system_transaction, + input: value.input.into_owned(), + } + } + } + + impl SerializeAs for TxDeposit<'_> { + fn serialize_as(source: &super::TxDeposit, serializer: S) -> Result + where + S: Serializer, + { + TxDeposit::from(source).serialize(serializer) + } + } + + impl<'de> DeserializeAs<'de, super::TxDeposit> for TxDeposit<'de> { + fn deserialize_as(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + TxDeposit::deserialize(deserializer).map(Into::into) + } + } + + #[cfg(test)] + mod tests { + use arbitrary::Arbitrary; + use rand::Rng; + use serde::{Deserialize, Serialize}; + use serde_with::serde_as; + + use super::super::{serde_bincode_compat, TxDeposit}; + + #[test] + fn test_tx_deposit_bincode_roundtrip() { + #[serde_as] + #[derive(Debug, PartialEq, Eq, Serialize, Deserialize)] + struct Data { + #[serde_as(as = "serde_bincode_compat::TxDeposit")] + transaction: TxDeposit, + } + + let mut bytes = [0u8; 1024]; + rand::thread_rng().fill(bytes.as_mut_slice()); + let data = Data { + transaction: TxDeposit::arbitrary(&mut arbitrary::Unstructured::new(&bytes)) + .unwrap(), + }; + + let encoded = bincode::serialize(&data).unwrap(); + let decoded: Data = bincode::deserialize(&encoded).unwrap(); + assert_eq!(decoded, data); + } + } +} diff --git a/crates/scroll/alloy/consensus/src/transaction/mod.rs b/crates/scroll/alloy/consensus/src/transaction/mod.rs new file mode 100644 index 000000000000..a8f54b101878 --- /dev/null +++ b/crates/scroll/alloy/consensus/src/transaction/mod.rs @@ -0,0 +1,16 @@ +//! Tramsaction types for Scroll. + +mod tx_type; +pub use tx_type::{ScrollTxType, L1_MESSAGE_TX_TYPE_ID}; + +mod envelope; +pub use envelope::ScrollTxEnvelope; + +mod l1_message; +pub use l1_message::TxL1Message; + +mod typed; +pub use typed::ScrollTypedTransaction; + +#[cfg(feature = "serde")] +pub use l1_message::serde_l1_message_tx_rpc; diff --git a/crates/scroll/alloy/consensus/src/transaction/tx_type.rs b/crates/scroll/alloy/consensus/src/transaction/tx_type.rs new file mode 100644 index 000000000000..90e15467399a --- /dev/null +++ b/crates/scroll/alloy/consensus/src/transaction/tx_type.rs @@ -0,0 +1,137 @@ +//! Contains the transaction type identifier for Scroll. + +use alloy_eips::eip2718::Eip2718Error; +use alloy_primitives::{U64, U8}; +use alloy_rlp::{BufMut, Decodable, Encodable}; +use derive_more::Display; + +/// Identifier for an Scroll L1 message transaction +pub const L1_MESSAGE_TX_TYPE_ID: u8 = 126; // 0x7E + +/// Scroll `TransactionType` flags as specified in https://docs.scroll.io/en/technology/chain/transactions/. +#[repr(u8)] +#[derive(Debug, Copy, Clone, Eq, PartialEq, PartialOrd, Ord, Hash, Display)] +pub enum ScrollTxType { + /// Legacy transaction type. + #[display("legacy")] + Legacy = 0, + /// EIP-2930 transaction type. + #[display("eip2930")] + Eip2930 = 1, + /// EIP-1559 transaction type. + #[display("eip1559")] + Eip1559 = 2, + /// Optimism Deposit transaction type. + #[display("deposit")] + L1Message = L1_MESSAGE_TX_TYPE_ID, +} + +impl ScrollTxType { + /// List of all variants. + pub const ALL: [Self; 2] = [Self::Legacy, Self::L1Message]; +} + +#[cfg(any(test, feature = "arbitrary"))] +impl arbitrary::Arbitrary<'_> for ScrollTxType { + fn arbitrary(u: &mut arbitrary::Unstructured<'_>) -> arbitrary::Result { + let i = u.choose_index(Self::ALL.len())?; + Ok(Self::ALL[i]) + } +} + +impl From for U8 { + fn from(tx_type: ScrollTxType) -> Self { + Self::from(u8::from(tx_type)) + } +} + +impl From for u8 { + fn from(v: ScrollTxType) -> Self { + v as Self + } +} + +impl TryFrom for ScrollTxType { + type Error = Eip2718Error; + + fn try_from(value: u8) -> Result { + Ok(match value { + 0 => Self::Legacy, + 1 => Self::Eip2930, + 2 => Self::Eip1559, + 126 => Self::L1Message, + _ => return Err(Eip2718Error::UnexpectedType(value)), + }) + } +} + +impl TryFrom for ScrollTxType { + type Error = &'static str; + + fn try_from(value: u64) -> Result { + let err = || "invalid tx type"; + let value: u8 = value.try_into().map_err(|_| err())?; + Self::try_from(value).map_err(|_| err()) + } +} + +impl TryFrom for ScrollTxType { + type Error = &'static str; + + fn try_from(value: U64) -> Result { + value.to::().try_into() + } +} + +impl PartialEq for ScrollTxType { + fn eq(&self, other: &u8) -> bool { + (*self as u8) == *other + } +} + +impl PartialEq for u8 { + fn eq(&self, other: &ScrollTxType) -> bool { + *self == *other as Self + } +} + +impl Encodable for ScrollTxType { + fn encode(&self, out: &mut dyn BufMut) { + (*self as u8).encode(out); + } + + fn length(&self) -> usize { + 1 + } +} + +impl Decodable for ScrollTxType { + fn decode(buf: &mut &[u8]) -> alloy_rlp::Result { + let ty = u8::decode(buf)?; + + Self::try_from(ty).map_err(|_| alloy_rlp::Error::Custom("invalid transaction type")) + } +} + +#[cfg(test)] +mod tests { + use super::*; + use alloc::{vec, vec::Vec}; + + #[test] + fn test_all_tx_types() { + assert_eq!(ScrollTxType::ALL.len(), 2); + let all = vec![ScrollTxType::Legacy, ScrollTxType::L1Message]; + assert_eq!(ScrollTxType::ALL.to_vec(), all); + } + + #[test] + fn tx_type_roundtrip() { + for &tx_type in &ScrollTxType::ALL { + let mut buf = Vec::new(); + tx_type.encode(&mut buf); + let decoded = ScrollTxType::decode(&mut &buf[..]).unwrap(); + assert_eq!(tx_type, decoded); + } + } +} diff --git a/crates/scroll/alloy/consensus/src/transaction/typed.rs b/crates/scroll/alloy/consensus/src/transaction/typed.rs new file mode 100644 index 000000000000..f912ab9b4c78 --- /dev/null +++ b/crates/scroll/alloy/consensus/src/transaction/typed.rs @@ -0,0 +1,351 @@ +use crate::{ScrollTxEnvelope, ScrollTxType, TxL1Message}; +use alloy_consensus::{Transaction, TxEip1559, TxEip2930, TxEip7702, TxLegacy}; +use alloy_eips::eip2930::AccessList; +use alloy_primitives::{Address, Bytes, TxKind}; + +/// The TypedTransaction enum represents all Ethereum transaction request types, modified for the OP +/// Stack. +/// +/// Its variants correspond to specific allowed transactions: +/// 1. Legacy (pre-EIP2718) [`TxLegacy`] +/// 2. EIP2930 (state access lists) [`TxEip2930`] +/// 3. EIP1559 [`TxEip1559`] +/// 4. L1Message [`TxL1Message`] +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +#[cfg_attr( + feature = "serde", + serde( + from = "serde_from::MaybeTaggedTypedTransaction", + into = "serde_from::TaggedTypedTransaction" + ) +)] +pub enum ScrollTypedTransaction { + /// Legacy transaction + Legacy(TxLegacy), + /// EIP-2930 transaction + Eip2930(TxEip2930), + /// EIP-1559 transaction + Eip1559(TxEip1559), + /// Scroll L1 message transaction + L1Message(TxL1Message), +} + +impl From for ScrollTypedTransaction { + fn from(tx: TxLegacy) -> Self { + Self::Legacy(tx) + } +} + +impl From for ScrollTypedTransaction { + fn from(tx: TxEip2930) -> Self { + Self::Eip2930(tx) + } +} + +impl From for ScrollTypedTransaction { + fn from(tx: TxEip1559) -> Self { + Self::Eip1559(tx) + } +} + +impl From for ScrollTypedTransaction { + fn from(tx: TxL1Message) -> Self { + Self::L1Message(tx) + } +} + +impl From for ScrollTypedTransaction { + fn from(envelope: ScrollTxEnvelope) -> Self { + match envelope { + ScrollTxEnvelope::Legacy(tx) => Self::Legacy(tx.strip_signature()), + ScrollTxEnvelope::Eip2930(tx) => Self::Eip2930(tx.strip_signature()), + ScrollTxEnvelope::Eip1559(tx) => Self::Eip1559(tx.strip_signature()), + ScrollTxEnvelope::L1Message(tx) => Self::L1Message(tx.into_inner()), + } + } +} + +impl ScrollTypedTransaction { + /// Return the [`ScrollTxType`] of the inner txn. + pub const fn tx_type(&self) -> ScrollTxType { + match self { + Self::Legacy(_) => ScrollTxType::Legacy, + Self::Eip2930(_) => ScrollTxType::Eip2930, + Self::Eip1559(_) => ScrollTxType::Eip1559, + Self::L1Message(_) => ScrollTxType::L1Message, + } + } + + /// Return the inner legacy transaction if it exists. + pub const fn legacy(&self) -> Option<&TxLegacy> { + match self { + Self::Legacy(tx) => Some(tx), + _ => None, + } + } + + /// Return the inner EIP-2930 transaction if it exists. + pub const fn eip2930(&self) -> Option<&TxEip2930> { + match self { + Self::Eip2930(tx) => Some(tx), + _ => None, + } + } + + /// Return the inner EIP-1559 transaction if it exists. + pub const fn eip1559(&self) -> Option<&TxEip1559> { + match self { + Self::Eip1559(tx) => Some(tx), + _ => None, + } + } + + /// Return the inner deposit transaction if it exists. + pub const fn l1_message(&self) -> Option<&TxL1Message> { + match self { + Self::L1Message(tx) => Some(tx), + _ => None, + } + } +} + +impl Transaction for ScrollTypedTransaction { + fn chain_id(&self) -> Option { + match self { + Self::Legacy(tx) => tx.chain_id(), + Self::Eip2930(tx) => tx.chain_id(), + Self::Eip1559(tx) => tx.chain_id(), + Self::L1Message(tx) => tx.chain_id(), + } + } + + fn nonce(&self) -> u64 { + match self { + Self::Legacy(tx) => tx.nonce(), + Self::Eip2930(tx) => tx.nonce(), + Self::Eip1559(tx) => tx.nonce(), + Self::L1Message(tx) => tx.nonce(), + } + } + + fn gas_limit(&self) -> u64 { + match self { + Self::Legacy(tx) => tx.gas_limit(), + Self::Eip2930(tx) => tx.gas_limit(), + Self::Eip1559(tx) => tx.gas_limit(), + Self::L1Message(tx) => tx.gas_limit(), + } + } + + fn gas_price(&self) -> Option { + match self { + Self::Legacy(tx) => tx.gas_price(), + Self::Eip2930(tx) => tx.gas_price(), + Self::Eip1559(tx) => tx.gas_price(), + Self::L1Message(tx) => tx.gas_price(), + } + } + + fn max_fee_per_gas(&self) -> u128 { + match self { + Self::Legacy(tx) => tx.max_fee_per_gas(), + Self::Eip2930(tx) => tx.max_fee_per_gas(), + Self::Eip1559(tx) => tx.max_fee_per_gas(), + Self::L1Message(tx) => tx.max_fee_per_gas(), + } + } + + fn max_priority_fee_per_gas(&self) -> Option { + match self { + Self::Legacy(tx) => tx.max_priority_fee_per_gas(), + Self::Eip2930(tx) => tx.max_priority_fee_per_gas(), + Self::Eip1559(tx) => tx.max_priority_fee_per_gas(), + Self::L1Message(tx) => tx.max_priority_fee_per_gas(), + } + } + + fn max_fee_per_blob_gas(&self) -> Option { + match self { + Self::Legacy(tx) => tx.max_fee_per_blob_gas(), + Self::Eip2930(tx) => tx.max_fee_per_blob_gas(), + Self::Eip1559(tx) => tx.max_fee_per_blob_gas(), + Self::L1Message(tx) => tx.max_fee_per_blob_gas(), + } + } + + fn priority_fee_or_price(&self) -> u128 { + match self { + Self::Legacy(tx) => tx.priority_fee_or_price(), + Self::Eip2930(tx) => tx.priority_fee_or_price(), + Self::Eip1559(tx) => tx.priority_fee_or_price(), + Self::L1Message(tx) => tx.priority_fee_or_price(), + } + } + + fn to(&self) -> Option
{ + match self { + Self::Legacy(tx) => tx.to(), + Self::Eip2930(tx) => tx.to(), + Self::Eip1559(tx) => tx.to(), + Self::L1Message(tx) => tx.to(), + } + } + + fn kind(&self) -> TxKind { + match self { + Self::Legacy(tx) => tx.kind(), + Self::Eip2930(tx) => tx.kind(), + Self::Eip1559(tx) => tx.kind(), + Self::L1Message(tx) => tx.kind(), + } + } + + fn value(&self) -> alloy_primitives::U256 { + match self { + Self::Legacy(tx) => tx.value(), + Self::Eip2930(tx) => tx.value(), + Self::Eip1559(tx) => tx.value(), + Self::L1Message(tx) => tx.value(), + } + } + + fn input(&self) -> &Bytes { + match self { + Self::Legacy(tx) => tx.input(), + Self::Eip2930(tx) => tx.input(), + Self::Eip1559(tx) => tx.input(), + Self::L1Message(tx) => tx.input(), + } + } + + fn ty(&self) -> u8 { + match self { + Self::Legacy(_) => ScrollTxType::Legacy as u8, + Self::Eip2930(_) => ScrollTxType::Eip2930 as u8, + Self::Eip1559(_) => ScrollTxType::Eip1559 as u8, + Self::L1Message(_) => ScrollTxType::L1Message as u8, + } + } + + fn access_list(&self) -> Option<&AccessList> { + match self { + Self::Legacy(tx) => tx.access_list(), + Self::Eip2930(tx) => tx.access_list(), + Self::Eip1559(tx) => tx.access_list(), + Self::L1Message(tx) => tx.access_list(), + } + } + + fn blob_versioned_hashes(&self) -> Option<&[alloy_primitives::B256]> { + match self { + Self::Legacy(tx) => tx.blob_versioned_hashes(), + Self::Eip2930(tx) => tx.blob_versioned_hashes(), + Self::Eip1559(tx) => tx.blob_versioned_hashes(), + Self::L1Message(tx) => tx.blob_versioned_hashes(), + } + } + + fn authorization_list(&self) -> Option<&[alloy_eips::eip7702::SignedAuthorization]> { + match self { + Self::Legacy(tx) => tx.authorization_list(), + Self::Eip2930(tx) => tx.authorization_list(), + Self::Eip1559(tx) => tx.authorization_list(), + Self::L1Message(tx) => tx.authorization_list(), + } + } + + fn is_dynamic_fee(&self) -> bool { + match self { + Self::Legacy(tx) => tx.is_dynamic_fee(), + Self::Eip2930(tx) => tx.is_dynamic_fee(), + Self::Eip1559(tx) => tx.is_dynamic_fee(), + Self::L1Message(tx) => tx.is_dynamic_fee(), + } + } + + fn effective_gas_price(&self, base_fee: Option) -> u128 { + match self { + Self::Legacy(tx) => tx.effective_gas_price(base_fee), + Self::Eip2930(tx) => tx.effective_gas_price(base_fee), + Self::Eip1559(tx) => tx.effective_gas_price(base_fee), + Self::L1Message(tx) => tx.effective_gas_price(base_fee), + } + } +} + +#[cfg(feature = "serde")] +mod serde_from { + //! NB: Why do we need this? + //! + //! Because the tag may be missing, we need an abstraction over tagged (with + //! type) and untagged (always legacy). This is + //! [`MaybeTaggedTypedTransaction`]. + //! + //! The tagged variant is [`TaggedTypedTransaction`], which always has a + //! type tag. + //! + //! We serialize via [`TaggedTypedTransaction`] and deserialize via + //! [`MaybeTaggedTypedTransaction`]. + use super::*; + + #[derive(Debug, serde::Deserialize)] + #[serde(untagged)] + pub(crate) enum MaybeTaggedTypedTransaction { + Tagged(TaggedTypedTransaction), + Untagged(TxLegacy), + } + + #[derive(Debug, serde::Serialize, serde::Deserialize)] + #[serde(tag = "type")] + pub(crate) enum TaggedTypedTransaction { + /// Legacy transaction + #[serde(rename = "0x00", alias = "0x0")] + Legacy(TxLegacy), + /// EIP-2930 transaction + #[serde(rename = "0x01", alias = "0x1")] + Eip2930(TxEip2930), + /// EIP-1559 transaction + #[serde(rename = "0x02", alias = "0x2")] + Eip1559(TxEip1559), + /// L1Message transaction + #[serde( + rename = "0x7e", + alias = "0x7E", + serialize_with = "crate::serde_l1_message_tx_rpc" + )] + L1Message(TxL1Message), + } + + impl From for ScrollTypedTransaction { + fn from(value: MaybeTaggedTypedTransaction) -> Self { + match value { + MaybeTaggedTypedTransaction::Tagged(tagged) => tagged.into(), + MaybeTaggedTypedTransaction::Untagged(tx) => Self::Legacy(tx), + } + } + } + + impl From for ScrollTypedTransaction { + fn from(value: TaggedTypedTransaction) -> Self { + match value { + TaggedTypedTransaction::Legacy(signed) => Self::Legacy(signed), + TaggedTypedTransaction::Eip2930(signed) => Self::Eip2930(signed), + TaggedTypedTransaction::Eip1559(signed) => Self::Eip1559(signed), + TaggedTypedTransaction::L1Message(tx) => Self::L1Message(tx), + } + } + } + + impl From for TaggedTypedTransaction { + fn from(value: ScrollTypedTransaction) -> Self { + match value { + ScrollTypedTransaction::Legacy(signed) => Self::Legacy(signed), + ScrollTypedTransaction::Eip2930(signed) => Self::Eip2930(signed), + ScrollTypedTransaction::Eip1559(signed) => Self::Eip1559(signed), + ScrollTypedTransaction::L1Message(tx) => Self::L1Message(tx), + } + } + } +} diff --git a/crates/scroll/alloy/network/Cargo.toml b/crates/scroll/alloy/network/Cargo.toml new file mode 100644 index 000000000000..5ec40b0ec0a7 --- /dev/null +++ b/crates/scroll/alloy/network/Cargo.toml @@ -0,0 +1,22 @@ +[package] +name = "scroll-alloy-network" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +license.workspace = true +homepage.workspace = true +repository.workspace = true +exclude.workspace = true + +[lints] +workspace = true + +[dependencies] +scroll-alloy-consensus.workspace = true +scroll-alloy-rpc-types.workspace = true + +# alloy +alloy-consensus.workspace = true +alloy-network.workspace = true +alloy-primitives.workspace = true +alloy-rpc-types-eth.workspace = true \ No newline at end of file diff --git a/crates/scroll/alloy/network/README.md b/crates/scroll/alloy/network/README.md new file mode 100644 index 000000000000..da1f2fd66158 --- /dev/null +++ b/crates/scroll/alloy/network/README.md @@ -0,0 +1,8 @@ +# scroll-alloy-network + +Scroll blockchain RPC behavior abstraction. + +This crate contains a simple abstraction of the RPC behavior of an +Scroll blockchain. It is intended to be used by the Alloy client to +provide a consistent interface to the rest of the library, regardless of +changes the underlying blockchain makes to the RPC interface. diff --git a/crates/scroll/alloy/network/src/lib.rs b/crates/scroll/alloy/network/src/lib.rs new file mode 100644 index 000000000000..e34d773ba61c --- /dev/null +++ b/crates/scroll/alloy/network/src/lib.rs @@ -0,0 +1,40 @@ +#![doc = include_str!("../README.md")] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] + +pub use alloy_network::*; + +use alloy_consensus::{TxEnvelope, TxType, TypedTransaction}; +use alloy_primitives::{Address, Bytes, ChainId, TxKind, U256}; +use alloy_rpc_types_eth::AccessList; +use scroll_alloy_consensus::{ScrollTxEnvelope, ScrollTxType, ScrollTypedTransaction}; +use scroll_alloy_rpc_types::OpTransactionRequest; + +/// Types for an Op-stack network. +#[derive(Clone, Copy, Debug)] +pub struct Optimism { + _private: (), +} + +impl Network for Optimism { + type TxType = ScrollTxType; + + type TxEnvelope = scroll_alloy_consensus::ScrollTxEnvelope; + + type UnsignedTx = scroll_alloy_consensus::ScrollTypedTransaction; + + type ReceiptEnvelope = scroll_alloy_consensus::OpReceiptEnvelope; + + type Header = alloy_consensus::Header; + + type TransactionRequest = scroll_alloy_rpc_types::OpTransactionRequest; + + type TransactionResponse = scroll_alloy_rpc_types::Transaction; + + type ReceiptResponse = scroll_alloy_rpc_types::OpTransactionReceipt; + + type HeaderResponse = alloy_rpc_types_eth::Header; + + type BlockResponse = + alloy_rpc_types_eth::Block; +} diff --git a/crates/scroll/alloy/rpc-types/Cargo.toml b/crates/scroll/alloy/rpc-types/Cargo.toml new file mode 100644 index 000000000000..6cedd9124c86 --- /dev/null +++ b/crates/scroll/alloy/rpc-types/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "scroll-alloy-rpc-types" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +license.workspace = true +homepage.workspace = true +repository.workspace = true +exclude.workspace = true + +[lints] +workspace = true + +[dependencies] +scroll-alloy-consensus = { workspace = true, features = ["serde"] } \ No newline at end of file diff --git a/crates/scroll/alloy/rpc-types/src/lib.rs b/crates/scroll/alloy/rpc-types/src/lib.rs new file mode 100644 index 000000000000..8d760e2a9c36 --- /dev/null +++ b/crates/scroll/alloy/rpc-types/src/lib.rs @@ -0,0 +1 @@ +mod transaction; diff --git a/crates/scroll/alloy/rpc-types/src/transaction.rs b/crates/scroll/alloy/rpc-types/src/transaction.rs new file mode 100644 index 000000000000..e0faaf7da564 --- /dev/null +++ b/crates/scroll/alloy/rpc-types/src/transaction.rs @@ -0,0 +1,11 @@ +// TODO: move to rpc types +// Scroll specific transaction fields +// #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)] +// #[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] +// pub struct ScrollL1MessageTransactionFields { +// /// The index of the transaction in the message queue. +// #[cfg_attr(feature = "serde", serde(with = "alloy_serde::quantity"))] +// pub queue_index: u64, +// /// The sender of the transaction on the L1. +// pub sender: Address, +// } diff --git a/crates/scroll/rpc/Cargo.toml b/crates/scroll/rpc/Cargo.toml new file mode 100644 index 000000000000..daf4f4655204 --- /dev/null +++ b/crates/scroll/rpc/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "rpc" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +license.workspace = true +homepage.workspace = true +repository.workspace = true +exclude.workspace = true + +[dependencies] + +[lints] +workspace = true diff --git a/crates/scroll/rpc/src/error.rs b/crates/scroll/rpc/src/error.rs new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/crates/scroll/rpc/src/eth/block.rs b/crates/scroll/rpc/src/eth/block.rs new file mode 100644 index 000000000000..64a55496993d --- /dev/null +++ b/crates/scroll/rpc/src/eth/block.rs @@ -0,0 +1,82 @@ +//! Loads and formats OP block RPC response. + +use alloy_rpc_types_eth::BlockId; +use op_alloy_network::Network; +use op_alloy_rpc_types::OpTransactionReceipt; +use reth_chainspec::ChainSpecProvider; +use reth_optimism_chainspec::OpChainSpec; +use reth_primitives::TransactionMeta; +use reth_provider::HeaderProvider; +use reth_rpc_eth_api::{ + helpers::{EthBlocks, LoadBlock, LoadPendingBlock, LoadReceipt, SpawnBlocking}, + RpcNodeCore, RpcReceipt, +}; + +use crate::{OpEthApi, OpEthApiError, OpReceiptBuilder}; + +impl EthBlocks for OpEthApi +where + Self: LoadBlock< + Error = OpEthApiError, + NetworkTypes: Network, + >, + N: RpcNodeCore + HeaderProvider>, +{ + async fn block_receipts( + &self, + block_id: BlockId, + ) -> Result>>, Self::Error> + where + Self: LoadReceipt, + { + if let Some((block, receipts)) = self.load_block_and_receipts(block_id).await? { + let block_number = block.number; + let base_fee = block.base_fee_per_gas; + let block_hash = block.hash(); + let excess_blob_gas = block.excess_blob_gas; + let timestamp = block.timestamp; + + let l1_block_info = + reth_optimism_evm::extract_l1_info(&block.body).map_err(OpEthApiError::from)?; + + return block + .body + .transactions + .into_iter() + .zip(receipts.iter()) + .enumerate() + .map(|(idx, (ref tx, receipt))| -> Result<_, _> { + let meta = TransactionMeta { + tx_hash: tx.hash(), + index: idx as u64, + block_hash, + block_number, + base_fee, + excess_blob_gas, + timestamp, + }; + + Ok(OpReceiptBuilder::new( + &self.inner.provider().chain_spec(), + tx, + meta, + receipt, + &receipts, + l1_block_info.clone(), + )? + .build()) + }) + .collect::, Self::Error>>() + .map(Some) + } + + Ok(None) + } +} + +impl LoadBlock for OpEthApi +where + Self: LoadPendingBlock + SpawnBlocking, + N: RpcNodeCore, +{ +} diff --git a/crates/scroll/rpc/src/eth/call.rs b/crates/scroll/rpc/src/eth/call.rs new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/crates/scroll/rpc/src/eth/mod.rs b/crates/scroll/rpc/src/eth/mod.rs new file mode 100644 index 000000000000..a109b9a87c75 --- /dev/null +++ b/crates/scroll/rpc/src/eth/mod.rs @@ -0,0 +1,5 @@ +mod block; +mod call; +mod pending_block; +mod receipt; +mod transaction; diff --git a/crates/scroll/rpc/src/eth/pending_block.rs b/crates/scroll/rpc/src/eth/pending_block.rs new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/crates/scroll/rpc/src/eth/receipt.rs b/crates/scroll/rpc/src/eth/receipt.rs new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/crates/scroll/rpc/src/eth/transaction.rs b/crates/scroll/rpc/src/eth/transaction.rs new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/crates/scroll/rpc/src/lib.rs b/crates/scroll/rpc/src/lib.rs new file mode 100644 index 000000000000..0bd61418a292 --- /dev/null +++ b/crates/scroll/rpc/src/lib.rs @@ -0,0 +1,4 @@ +//! Scroll-Reth RPC Implementation. + +mod error; +mod eth; From 53f5538fa6cfea31026d676c75e4cfc1fe243e62 Mon Sep 17 00:00:00 2001 From: georgehao Date: Mon, 16 Dec 2024 09:59:25 +0800 Subject: [PATCH 02/86] add scroll alloy --- Cargo.lock | 60 +++- crates/scroll/alloy/consensus/src/lib.rs | 3 + .../alloy/consensus/src/receipt/envelope.rs | 335 ++++++++++++++++++ .../scroll/alloy/consensus/src/receipt/mod.rs | 5 + .../consensus/src/transaction/envelope.rs | 2 +- .../alloy/consensus/src/transaction/mod.rs | 2 +- crates/scroll/alloy/network/src/lib.rs | 17 +- crates/scroll/alloy/rpc-types/Cargo.toml | 23 +- crates/scroll/alloy/rpc-types/src/lib.rs | 4 + crates/scroll/alloy/rpc-types/src/receipt.rs | 189 ++++++++++ .../scroll/alloy/rpc-types/src/transaction.rs | 324 ++++++++++++++++- .../rpc-types/src/transaction/request.rs | 185 ++++++++++ crates/scroll/rpc/Cargo.toml | 70 +++- crates/scroll/rpc/src/eth/block.rs | 7 +- crates/scroll/rpc/src/eth/mod.rs | 4 - crates/scroll/rpc/src/lib.rs | 23 +- 16 files changed, 1211 insertions(+), 42 deletions(-) create mode 100644 crates/scroll/alloy/consensus/src/receipt/envelope.rs create mode 100644 crates/scroll/alloy/consensus/src/receipt/mod.rs create mode 100644 crates/scroll/alloy/rpc-types/src/receipt.rs create mode 100644 crates/scroll/alloy/rpc-types/src/transaction/request.rs diff --git a/Cargo.lock b/Cargo.lock index 3724a8e46c54..66825175bc71 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9199,6 +9199,52 @@ dependencies = [ "serde", ] +[[package]] +name = "reth-scroll-rpc" +version = "1.1.2" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rpc-types-debug", + "alloy-rpc-types-eth", + "derive_more", + "jsonrpsee-core", + "jsonrpsee-types", + "op-alloy-consensus", + "op-alloy-network", + "op-alloy-rpc-types", + "op-alloy-rpc-types-engine", + "parking_lot", + "reqwest", + "reth-chainspec", + "reth-evm", + "reth-network-api", + "reth-node-api", + "reth-node-builder", + "reth-optimism-chainspec", + "reth-optimism-consensus", + "reth-optimism-evm", + "reth-optimism-forks", + "reth-optimism-payload-builder", + "reth-optimism-primitives", + "reth-primitives", + "reth-provider", + "reth-rpc", + "reth-rpc-api", + "reth-rpc-eth-api", + "reth-rpc-eth-types", + "reth-rpc-server-types", + "reth-scroll-revm", + "reth-tasks", + "reth-transaction-pool", + "scroll-alloy-rpc-types", + "serde_json", + "thiserror 1.0.69", + "tokio", + "tracing", +] + [[package]] name = "reth-scroll-storage" version = "1.1.2" @@ -9820,10 +9866,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "afab94fb28594581f62d981211a9a4d53cc8130bbcbbb89a0440d9b8e81a7746" -[[package]] -name = "rpc" -version = "1.1.2" - [[package]] name = "rstest" version = "0.23.0" @@ -10156,7 +10198,17 @@ dependencies = [ name = "scroll-alloy-rpc-types" version = "1.1.2" dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-network-primitives", + "alloy-primitives", + "alloy-rpc-types-eth", + "alloy-serde", + "derive_more", "scroll-alloy-consensus", + "serde", + "serde_json", + "similar-asserts", ] [[package]] diff --git a/crates/scroll/alloy/consensus/src/lib.rs b/crates/scroll/alloy/consensus/src/lib.rs index 922936676ae9..273a725f7289 100644 --- a/crates/scroll/alloy/consensus/src/lib.rs +++ b/crates/scroll/alloy/consensus/src/lib.rs @@ -10,5 +10,8 @@ pub use transaction::{ ScrollTxEnvelope, ScrollTxType, ScrollTypedTransaction, TxL1Message, L1_MESSAGE_TX_TYPE_ID, }; +mod receipt; +pub use receipt::ScrollReceiptEnvelope; + #[cfg(feature = "serde")] pub use transaction::serde_l1_message_tx_rpc; diff --git a/crates/scroll/alloy/consensus/src/receipt/envelope.rs b/crates/scroll/alloy/consensus/src/receipt/envelope.rs new file mode 100644 index 000000000000..92314f08f43a --- /dev/null +++ b/crates/scroll/alloy/consensus/src/receipt/envelope.rs @@ -0,0 +1,335 @@ +//! Receipt envelope types for Scroll. + +use crate::ScrollTxType; +use alloy_consensus::{Eip658Value, Receipt, ReceiptWithBloom, TxReceipt}; +use alloy_eips::eip2718::{Decodable2718, Eip2718Error, Eip2718Result, Encodable2718}; +use alloy_primitives::{logs_bloom, Bloom, Log}; +use alloy_rlp::{length_of_length, BufMut, Decodable, Encodable}; + +/// Receipt envelope, as defined in [EIP-2718], modified for Scroll chains. +/// +/// This enum distinguishes between tagged and untagged legacy receipts, as the +/// in-protocol merkle tree may commit to EITHER 0-prefixed or raw. Therefore +/// we must ensure that encoding returns the precise byte-array that was +/// decoded, preserving the presence or absence of the `TransactionType` flag. +/// +/// Transaction receipt payloads are specified in their respective EIPs. +/// +/// [EIP-2718]: https://eips.ethereum.org/EIPS/eip-2718 +#[derive(Debug, Clone, PartialEq, Eq)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +#[cfg_attr(feature = "serde", serde(tag = "type"))] +#[non_exhaustive] +pub enum ScrollReceiptEnvelope { + /// Receipt envelope with no type flag. + #[cfg_attr(feature = "serde", serde(rename = "0x0", alias = "0x00"))] + Legacy(ReceiptWithBloom), + /// Receipt envelope with type flag 1, containing a [EIP-2930] receipt. + /// + /// [EIP-2930]: https://eips.ethereum.org/EIPS/eip-2930 + #[cfg_attr(feature = "serde", serde(rename = "0x1", alias = "0x01"))] + Eip2930(ReceiptWithBloom), + /// Receipt envelope with type flag 2, containing a [EIP-1559] receipt. + /// + /// [EIP-1559]: https://eips.ethereum.org/EIPS/eip-1559 + #[cfg_attr(feature = "serde", serde(rename = "0x2", alias = "0x02"))] + Eip1559(ReceiptWithBloom), + /// Receipt envelope with type flag 126, containing a [Scroll-L1-Message] receipt. + #[cfg_attr(feature = "serde", serde(rename = "0x7e", alias = "0x7E"))] + L1Message(ReceiptWithBloom), +} + +impl ScrollReceiptEnvelope { + /// Creates a new [`ScrollReceiptEnvelope`] from the given parts. + pub fn from_parts<'a>( + status: bool, + cumulative_gas_used: u128, + logs: impl IntoIterator, + tx_type: ScrollTxType, + ) -> Self { + let logs = logs.into_iter().cloned().collect::>(); + let logs_bloom = logs_bloom(&logs); + let inner_receipt = + Receipt { status: Eip658Value::Eip658(status), cumulative_gas_used, logs }; + match tx_type { + ScrollTxType::Legacy => { + Self::Legacy(ReceiptWithBloom { receipt: inner_receipt, logs_bloom }) + } + ScrollTxType::Eip2930 => { + Self::Eip2930(ReceiptWithBloom { receipt: inner_receipt, logs_bloom }) + } + ScrollTxType::Eip1559 => { + Self::Eip1559(ReceiptWithBloom { receipt: inner_receipt, logs_bloom }) + } + ScrollTxType::L1Message => { + Self::L1Message(ReceiptWithBloom { receipt: inner_receipt, logs_bloom }) + } + } + } +} + +impl ScrollReceiptEnvelope { + /// Return the [`ScrollTxType`] of the inner receipt. + pub const fn tx_type(&self) -> ScrollTxType { + match self { + Self::Legacy(_) => ScrollTxType::Legacy, + Self::Eip2930(_) => ScrollTxType::Eip2930, + Self::Eip1559(_) => ScrollTxType::Eip1559, + Self::L1Message(_) => ScrollTxType::L1Message, + } + } + + /// Return true if the transaction was successful. + pub fn is_success(&self) -> bool { + self.status() + } + + /// Returns the success status of the receipt's transaction. + pub fn status(&self) -> bool { + self.as_receipt().unwrap().status.coerce_status() + } + + /// Returns the cumulative gas used at this receipt. + pub fn cumulative_gas_used(&self) -> u128 { + self.as_receipt().unwrap().cumulative_gas_used + } + + /// Return the receipt logs. + pub fn logs(&self) -> &[T] { + &self.as_receipt().unwrap().logs + } + + /// Return the receipt's bloom. + pub const fn logs_bloom(&self) -> &Bloom { + match self { + Self::Legacy(t) => &t.logs_bloom, + Self::Eip2930(t) => &t.logs_bloom, + Self::Eip1559(t) => &t.logs_bloom, + Self::L1Message(t) => &t.logs_bloom, + } + } + + /// Returns the deposit receipt if it is a deposit receipt. + pub const fn as_deposit_receipt_with_bloom(&self) -> Option<&ReceiptWithBloom> { + match self { + Self::L1Message(t) => Some(t), + _ => None, + } + } + + /// Returns the deposit receipt if it is a deposit receipt. + pub const fn as_deposit_receipt(&self) -> Option<&Receipt> { + match self { + Self::L1Message(t) => Some(&t.receipt), + _ => None, + } + } + + /// Return the inner receipt. Currently this is infallible, however, future + /// receipt types may be added. + pub const fn as_receipt(&self) -> Option<&Receipt> { + match self { + Self::Legacy(t) | Self::Eip2930(t) | Self::Eip1559(t) | Self::L1Message(t) => { + Some(&t.receipt) + } + } + } +} + +impl ScrollReceiptEnvelope { + /// Get the length of the inner receipt in the 2718 encoding. + pub fn inner_length(&self) -> usize { + match self { + Self::Legacy(t) => t.length(), + Self::Eip2930(t) => t.length(), + Self::Eip1559(t) => t.length(), + Self::L1Message(t) => t.length(), + } + } + + /// Calculate the length of the rlp payload of the network encoded receipt. + pub fn rlp_payload_length(&self) -> usize { + let length = self.inner_length(); + match self { + Self::Legacy(_) => length, + _ => length + 1, + } + } +} + +impl TxReceipt for ScrollReceiptEnvelope +where + T: Clone + core::fmt::Debug + PartialEq + Eq + Send + Sync, +{ + fn status_or_post_state(&self) -> Eip658Value { + self.as_receipt().unwrap().status + } + + fn status(&self) -> bool { + self.as_receipt().unwrap().status.coerce_status() + } + + /// Return the receipt's bloom. + fn bloom(&self) -> Bloom { + *self.logs_bloom() + } + + fn bloom_cheap(&self) -> Option { + Some(self.bloom()) + } + + /// Returns the cumulative gas used at this receipt. + fn cumulative_gas_used(&self) -> u128 { + self.as_receipt().unwrap().cumulative_gas_used + } + + /// Return the receipt logs. + fn logs(&self) -> &[T] { + &self.as_receipt().unwrap().logs + } +} + +impl Encodable for ScrollReceiptEnvelope { + fn encode(&self, out: &mut dyn alloy_rlp::BufMut) { + self.network_encode(out) + } + + fn length(&self) -> usize { + let mut payload_length = self.rlp_payload_length(); + if !self.is_legacy() { + payload_length += length_of_length(payload_length); + } + payload_length + } +} + +impl Decodable for ScrollReceiptEnvelope { + fn decode(buf: &mut &[u8]) -> alloy_rlp::Result { + Self::network_decode(buf) + .map_or_else(|_| Err(alloy_rlp::Error::Custom("Unexpected type")), Ok) + } +} + +impl Encodable2718 for ScrollReceiptEnvelope { + fn type_flag(&self) -> Option { + match self { + Self::Legacy(_) => None, + Self::Eip2930(_) => Some(ScrollTxType::Eip2930 as u8), + Self::Eip1559(_) => Some(ScrollTxType::Eip1559 as u8), + Self::L1Message(_) => Some(ScrollTxType::L1Message as u8), + } + } + + fn encode_2718_len(&self) -> usize { + self.inner_length() + !self.is_legacy() as usize + } + + fn encode_2718(&self, out: &mut dyn BufMut) { + match self.type_flag() { + None => {} + Some(ty) => out.put_u8(ty), + } + match self { + Self::L1Message(t) => t.encode(out), + Self::Legacy(t) | Self::Eip2930(t) | Self::Eip1559(t) => t.encode(out), + } + } +} + +impl Decodable2718 for ScrollReceiptEnvelope { + fn typed_decode(ty: u8, buf: &mut &[u8]) -> Eip2718Result { + match ty.try_into().map_err(|_| Eip2718Error::UnexpectedType(ty))? { + ScrollTxType::Legacy => { + Err(alloy_rlp::Error::Custom("type-0 eip2718 transactions are not supported") + .into()) + } + ScrollTxType::Eip1559 => Ok(Self::Eip1559(Decodable::decode(buf)?)), + ScrollTxType::Eip2930 => Ok(Self::Eip2930(Decodable::decode(buf)?)), + ScrollTxType::L1Message => Ok(Self::L1Message(Decodable::decode(buf)?)), + } + } + + fn fallback_decode(buf: &mut &[u8]) -> Eip2718Result { + Ok(Self::Legacy(Decodable::decode(buf)?)) + } +} + +#[cfg(all(test, feature = "arbitrary"))] +impl<'a, T> arbitrary::Arbitrary<'a> for ScrollReceiptEnvelope +where + T: arbitrary::Arbitrary<'a>, +{ + fn arbitrary(u: &mut arbitrary::Unstructured<'a>) -> arbitrary::Result { + match u.int_in_range(0..=4)? { + 0 => Ok(Self::Legacy(ReceiptWithBloom::::arbitrary(u)?)), + 1 => Ok(Self::Eip2930(ReceiptWithBloom::::arbitrary(u)?)), + 2 => Ok(Self::Eip1559(ReceiptWithBloom::::arbitrary(u)?)), + _ => Ok(Self::L1Message(ReceiptWithBloom::::arbitrary(u)?)), + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + use alloy_consensus::{Receipt, ReceiptWithBloom}; + use alloy_eips::eip2718::Encodable2718; + use alloy_primitives::{address, b256, bytes, hex, Log, LogData}; + use alloy_rlp::Encodable; + + #[cfg(not(feature = "std"))] + use alloc::vec; + + // Test vector from: https://eips.ethereum.org/EIPS/eip-2481 + #[test] + fn encode_legacy_receipt() { + let expected = hex!("f901668001b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f85ff85d940000000000000000000000000000000000000011f842a0000000000000000000000000000000000000000000000000000000000000deada0000000000000000000000000000000000000000000000000000000000000beef830100ff"); + + let mut data = vec![]; + let receipt = ScrollReceiptEnvelope::Legacy(ReceiptWithBloom { + receipt: Receipt { + status: false.into(), + cumulative_gas_used: 0x1u128, + logs: vec![Log { + address: address!("0000000000000000000000000000000000000011"), + data: LogData::new_unchecked( + vec![ + b256!( + "000000000000000000000000000000000000000000000000000000000000dead" + ), + b256!( + "000000000000000000000000000000000000000000000000000000000000beef" + ), + ], + bytes!("0100ff"), + ), + }], + }, + logs_bloom: [0; 256].into(), + }); + + receipt.network_encode(&mut data); + + // check that the rlp length equals the length of the expected rlp + assert_eq!(receipt.length(), expected.len()); + assert_eq!(data, expected); + } + + #[test] + fn legacy_receipt_from_parts() { + let receipt = ScrollReceiptEnvelope::from_parts(true, 100, vec![], ScrollTxType::Legacy); + assert!(receipt.status()); + assert_eq!(receipt.cumulative_gas_used(), 100); + assert_eq!(receipt.logs().len(), 0); + assert_eq!(receipt.tx_type(), ScrollTxType::Legacy); + } + + #[test] + fn deposit_receipt_from_parts() { + let receipt = ScrollReceiptEnvelope::from_parts(true, 100, vec![], ScrollTxType::L1Message); + assert!(receipt.status()); + assert_eq!(receipt.cumulative_gas_used(), 100); + assert_eq!(receipt.logs().len(), 0); + assert_eq!(receipt.tx_type(), ScrollTxType::L1Message); + } +} diff --git a/crates/scroll/alloy/consensus/src/receipt/mod.rs b/crates/scroll/alloy/consensus/src/receipt/mod.rs new file mode 100644 index 000000000000..62d589383f7d --- /dev/null +++ b/crates/scroll/alloy/consensus/src/receipt/mod.rs @@ -0,0 +1,5 @@ +use alloy_consensus::TxReceipt; + +mod envelope; + +pub use envelope::ScrollReceiptEnvelope; diff --git a/crates/scroll/alloy/consensus/src/transaction/envelope.rs b/crates/scroll/alloy/consensus/src/transaction/envelope.rs index d89e7f0fb8f6..b2364332eca5 100644 --- a/crates/scroll/alloy/consensus/src/transaction/envelope.rs +++ b/crates/scroll/alloy/consensus/src/transaction/envelope.rs @@ -11,7 +11,7 @@ use alloy_rlp::{Decodable, Encodable}; use crate::{ScrollTxType, TxL1Message}; -/// The Ethereum [EIP-2718] Transaction Envelope, modified for OP Stack chains. +/// The Ethereum [EIP-2718] Transaction Envelope, modified for Scroll chains. /// /// # Note: /// diff --git a/crates/scroll/alloy/consensus/src/transaction/mod.rs b/crates/scroll/alloy/consensus/src/transaction/mod.rs index a8f54b101878..9e95d5a86d07 100644 --- a/crates/scroll/alloy/consensus/src/transaction/mod.rs +++ b/crates/scroll/alloy/consensus/src/transaction/mod.rs @@ -1,4 +1,4 @@ -//! Tramsaction types for Scroll. +//! Transaction types for Scroll. mod tx_type; pub use tx_type::{ScrollTxType, L1_MESSAGE_TX_TYPE_ID}; diff --git a/crates/scroll/alloy/network/src/lib.rs b/crates/scroll/alloy/network/src/lib.rs index e34d773ba61c..681586c5db3d 100644 --- a/crates/scroll/alloy/network/src/lib.rs +++ b/crates/scroll/alloy/network/src/lib.rs @@ -4,34 +4,31 @@ pub use alloy_network::*; -use alloy_consensus::{TxEnvelope, TxType, TypedTransaction}; -use alloy_primitives::{Address, Bytes, ChainId, TxKind, U256}; -use alloy_rpc_types_eth::AccessList; -use scroll_alloy_consensus::{ScrollTxEnvelope, ScrollTxType, ScrollTypedTransaction}; -use scroll_alloy_rpc_types::OpTransactionRequest; +use scroll_alloy_consensus::{self, ScrollTxType}; +use scroll_alloy_rpc_types; /// Types for an Op-stack network. #[derive(Clone, Copy, Debug)] -pub struct Optimism { +pub struct Scroll { _private: (), } -impl Network for Optimism { +impl Network for Scroll { type TxType = ScrollTxType; type TxEnvelope = scroll_alloy_consensus::ScrollTxEnvelope; type UnsignedTx = scroll_alloy_consensus::ScrollTypedTransaction; - type ReceiptEnvelope = scroll_alloy_consensus::OpReceiptEnvelope; + type ReceiptEnvelope = scroll_alloy_consensus::ScrollTxEnvelope; type Header = alloy_consensus::Header; - type TransactionRequest = scroll_alloy_rpc_types::OpTransactionRequest; + type TransactionRequest = scroll_alloy_rpc_types::ScrollTransactionRequest; type TransactionResponse = scroll_alloy_rpc_types::Transaction; - type ReceiptResponse = scroll_alloy_rpc_types::OpTransactionReceipt; + type ReceiptResponse = scroll_alloy_rpc_types::ScrollTransactionReceipt; type HeaderResponse = alloy_rpc_types_eth::Header; diff --git a/crates/scroll/alloy/rpc-types/Cargo.toml b/crates/scroll/alloy/rpc-types/Cargo.toml index 6cedd9124c86..775e3227c23b 100644 --- a/crates/scroll/alloy/rpc-types/Cargo.toml +++ b/crates/scroll/alloy/rpc-types/Cargo.toml @@ -11,5 +11,26 @@ exclude.workspace = true [lints] workspace = true +[dev-dependencies] +similar-asserts = "1.6" + [dependencies] -scroll-alloy-consensus = { workspace = true, features = ["serde"] } \ No newline at end of file +scroll-alloy-consensus = { workspace = true, features = ["serde"] } + +alloy-network-primitives = { version = "0.6.4", default-features = true } +alloy-rpc-types-eth = { version = "0.6.4", features = ["serde"], default-features = false } +alloy-primitives = { version = "0.8.12", features = ["map", "rlp", "serde"], default-features = false } +alloy-consensus = { version = "0.6.4", features = ["arbitrary"], default-features = false } +alloy-eips = { version = "0.6.4", features = ["serde"], default-features = false } +alloy-serde = { version = "0.6.4", default-features = false } +derive_more = { version = "1.0", default-features = false } +serde = { version = "1.0", features = ["derive", "alloc", "derive"], default-features = false } +serde_json = { version = "1.0", features = ["alloc"], default-features = false } + +[features] +std = [ + "alloy-network-primitives/std", + "alloy-eips/std", + "alloy-primitives/std", + "alloy-rpc-types-eth/std", +] \ No newline at end of file diff --git a/crates/scroll/alloy/rpc-types/src/lib.rs b/crates/scroll/alloy/rpc-types/src/lib.rs index 8d760e2a9c36..60b32ae456bd 100644 --- a/crates/scroll/alloy/rpc-types/src/lib.rs +++ b/crates/scroll/alloy/rpc-types/src/lib.rs @@ -1 +1,5 @@ +mod receipt; +pub use receipt::{ScrollTransactionReceipt, ScrollTransactionReceiptFields}; + mod transaction; +pub use transaction::{ScrollL1MessageTransactionFields, ScrollTransactionRequest, Transaction}; diff --git a/crates/scroll/alloy/rpc-types/src/receipt.rs b/crates/scroll/alloy/rpc-types/src/receipt.rs new file mode 100644 index 000000000000..4bf286d06d2a --- /dev/null +++ b/crates/scroll/alloy/rpc-types/src/receipt.rs @@ -0,0 +1,189 @@ +//! Receipt types for RPC + +use alloy_consensus::{Receipt, ReceiptWithBloom}; +use alloy_serde::OtherFields; +use serde::{Deserialize, Serialize}; + +use scroll_alloy_consensus::ScrollReceiptEnvelope; + +/// Scroll Transaction Receipt type +#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +#[doc(alias = "ScrollTxReceipt")] +pub struct ScrollTransactionReceipt { + /// Regular eth transaction receipt including deposit receipts + #[serde(flatten)] + pub inner: + alloy_rpc_types_eth::TransactionReceipt>, + /// The value of EVM execution result. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub return_value: Option>, + /// L1 fee for the transaction. + #[serde(default, skip_serializing_if = "Option::is_none", with = "alloy_serde::quantity::opt")] + pub l1_fee: Option, +} + +impl alloy_network_primitives::ReceiptResponse for ScrollTransactionReceipt { + fn contract_address(&self) -> Option { + self.inner.contract_address + } + + fn status(&self) -> bool { + self.inner.inner.status() + } + + fn block_hash(&self) -> Option { + self.inner.block_hash + } + + fn block_number(&self) -> Option { + self.inner.block_number + } + + fn transaction_hash(&self) -> alloy_primitives::TxHash { + self.inner.transaction_hash + } + + fn transaction_index(&self) -> Option { + self.inner.transaction_index() + } + + fn gas_used(&self) -> u128 { + self.inner.gas_used() + } + + fn effective_gas_price(&self) -> u128 { + self.inner.effective_gas_price() + } + + fn blob_gas_used(&self) -> Option { + self.inner.blob_gas_used() + } + + fn blob_gas_price(&self) -> Option { + self.inner.blob_gas_price() + } + + fn from(&self) -> alloy_primitives::Address { + self.inner.from() + } + + fn to(&self) -> Option { + self.inner.to() + } + + fn authorization_list(&self) -> Option<&[alloy_eips::eip7702::SignedAuthorization]> { + self.inner.authorization_list() + } + + fn cumulative_gas_used(&self) -> u128 { + self.inner.cumulative_gas_used() + } + + fn state_root(&self) -> Option { + self.inner.state_root() + } +} + +/// Additional fields for Scroll transaction receipts: +#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +#[doc(alias = "ScrollTxReceiptFields")] +pub struct ScrollTransactionReceiptFields { + /// The value of EVM execution result. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub return_value: Option>, + + /// L1 fee for the transaction. + #[serde(default, skip_serializing_if = "Option::is_none", with = "alloy_serde::quantity::opt")] + pub l1_fee: Option, +} + +impl From for OtherFields { + fn from(value: ScrollTransactionReceiptFields) -> Self { + serde_json::to_value(value).unwrap().try_into().unwrap() + } +} + +impl From for ScrollReceiptEnvelope { + fn from(value: ScrollTransactionReceipt) -> Self { + let inner_envelope = value.inner.inner; + + /// Helper function to convert the inner logs within a [ReceiptWithBloom] from RPC to + /// consensus types. + #[inline(always)] + fn convert_standard_receipt( + receipt: ReceiptWithBloom, + ) -> ReceiptWithBloom { + let ReceiptWithBloom { logs_bloom, receipt } = receipt; + + let consensus_logs = receipt.logs.into_iter().map(|log| log.inner).collect(); + ReceiptWithBloom { + receipt: Receipt { + status: receipt.status, + cumulative_gas_used: receipt.cumulative_gas_used, + logs: consensus_logs, + }, + logs_bloom, + } + } + + match inner_envelope { + ScrollReceiptEnvelope::Legacy(receipt) => { + Self::Legacy(convert_standard_receipt(receipt)) + } + ScrollReceiptEnvelope::Eip2930(receipt) => { + Self::Eip2930(convert_standard_receipt(receipt)) + } + ScrollReceiptEnvelope::Eip1559(receipt) => { + Self::Eip1559(convert_standard_receipt(receipt)) + } + ScrollReceiptEnvelope::L1Message(receipt) => { + Self::L1Message(convert_standard_receipt(receipt)) + } + _ => unreachable!("Unsupported OpReceiptEnvelope variant"), + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + use serde_json::{json, Value}; + + // + #[test] + fn parse_rpc_receipt() { + let s = r#"{ + "blockHash": "0x9e6a0fb7e22159d943d760608cc36a0fb596d1ab3c997146f5b7c55c8c718c67", + "blockNumber": "0x6cfef89", + "contractAddress": null, + "cumulativeGasUsed": "0xfa0d", + "depositNonce": "0x8a2d11", + "effectiveGasPrice": "0x0", + "from": "0xdeaddeaddeaddeaddeaddeaddeaddeaddead0001", + "gasUsed": "0xfa0d", + "logs": [], + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "status": "0x1", + "to": "0x4200000000000000000000000000000000000015", + "transactionHash": "0xb7c74afdeb7c89fb9de2c312f49b38cb7a850ba36e064734c5223a477e83fdc9", + "transactionIndex": "0x0", + "type": "0x7e", + //TODO replace with scroll receipt + }"#; + + let receipt: ScrollTransactionReceipt = serde_json::from_str(s).unwrap(); + let value = serde_json::to_value(&receipt).unwrap(); + let expected_value = serde_json::from_str::(s).unwrap(); + assert_eq!(value, expected_value); + } + + #[test] + fn serialize_empty_optimism_transaction_receipt_fields_struct() { + let op_fields = ScrollTransactionReceiptFields::default(); + + let json = serde_json::to_value(op_fields).unwrap(); + assert_eq!(json, json!({})); + } +} diff --git a/crates/scroll/alloy/rpc-types/src/transaction.rs b/crates/scroll/alloy/rpc-types/src/transaction.rs index e0faaf7da564..905ce98530a4 100644 --- a/crates/scroll/alloy/rpc-types/src/transaction.rs +++ b/crates/scroll/alloy/rpc-types/src/transaction.rs @@ -1,11 +1,313 @@ -// TODO: move to rpc types -// Scroll specific transaction fields -// #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)] -// #[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] -// pub struct ScrollL1MessageTransactionFields { -// /// The index of the transaction in the message queue. -// #[cfg_attr(feature = "serde", serde(with = "alloy_serde::quantity"))] -// pub queue_index: u64, -// /// The sender of the transaction on the L1. -// pub sender: Address, -// } +//! Scroll specific types related to transactions. + +use alloy_consensus::Transaction as _; +use alloy_eips::{eip2930::AccessList, eip7702::SignedAuthorization}; +use alloy_primitives::{Address, BlockHash, Bytes, ChainId, TxKind, B256, U256}; +use alloy_serde::OtherFields; +use scroll_alloy_consensus::ScrollTxEnvelope; +use serde::{Deserialize, Serialize}; + +mod request; +pub use request::ScrollTransactionRequest; + +/// Scroll Transaction type +#[derive( + Clone, Debug, PartialEq, Eq, Serialize, Deserialize, derive_more::Deref, derive_more::DerefMut, +)] +#[serde(try_from = "tx_serde::TransactionSerdeHelper", into = "tx_serde::TransactionSerdeHelper")] +#[cfg_attr(all(any(test, feature = "arbitrary"), feature = "k256"), derive(arbitrary::Arbitrary))] +pub struct Transaction { + /// Ethereum Transaction Types + #[deref] + #[deref_mut] + pub inner: alloy_rpc_types_eth::Transaction, + + /// Nonce for deposit transactions. Only present in RPC responses. + pub deposit_nonce: Option, + + /// Deposit receipt version for deposit transactions post-canyon + pub deposit_receipt_version: Option, +} + +impl alloy_consensus::Transaction for Transaction { + fn chain_id(&self) -> Option { + self.inner.chain_id() + } + + fn nonce(&self) -> u64 { + self.inner.nonce() + } + + fn gas_limit(&self) -> u64 { + self.inner.gas_limit() + } + + fn gas_price(&self) -> Option { + self.inner.gas_price() + } + + fn max_fee_per_gas(&self) -> u128 { + self.inner.max_fee_per_gas() + } + + fn max_priority_fee_per_gas(&self) -> Option { + self.inner.max_priority_fee_per_gas() + } + + fn max_fee_per_blob_gas(&self) -> Option { + self.inner.max_fee_per_blob_gas() + } + + fn priority_fee_or_price(&self) -> u128 { + self.inner.priority_fee_or_price() + } + + fn effective_gas_price(&self, base_fee: Option) -> u128 { + self.inner.effective_gas_price(base_fee) + } + + fn is_dynamic_fee(&self) -> bool { + self.inner.is_dynamic_fee() + } + + fn kind(&self) -> TxKind { + self.inner.kind() + } + + fn to(&self) -> Option
{ + self.inner.to() + } + + fn value(&self) -> U256 { + self.inner.value() + } + + fn input(&self) -> &Bytes { + self.inner.input() + } + + fn ty(&self) -> u8 { + self.inner.ty() + } + + fn access_list(&self) -> Option<&AccessList> { + self.inner.access_list() + } + + fn blob_versioned_hashes(&self) -> Option<&[B256]> { + self.inner.blob_versioned_hashes() + } + + fn authorization_list(&self) -> Option<&[SignedAuthorization]> { + self.inner.authorization_list() + } +} + +impl alloy_network_primitives::TransactionResponse for Transaction { + fn tx_hash(&self) -> alloy_primitives::TxHash { + self.inner.tx_hash() + } + + fn block_hash(&self) -> Option { + self.inner.block_hash() + } + + fn block_number(&self) -> Option { + self.inner.block_number() + } + + fn transaction_index(&self) -> Option { + self.inner.transaction_index() + } + + fn from(&self) -> Address { + self.inner.from() + } + + fn to(&self) -> Option
{ + alloy_consensus::Transaction::to(&self.inner) + } +} + +/// Scroll specific transaction fields +#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)] +#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] +#[serde(rename_all = "camelCase")] +pub struct ScrollL1MessageTransactionFields { + /// The index of the transaction in the message queue. + #[cfg_attr(feature = "serde", serde(with = "alloy_serde::quantity"))] + pub queue_index: u64, + /// The sender of the transaction on the L1. + pub sender: Address, +} + +impl From for OtherFields { + fn from(value: ScrollL1MessageTransactionFields) -> Self { + serde_json::to_value(value).unwrap().try_into().unwrap() + } +} + +impl AsRef for Transaction { + fn as_ref(&self) -> &ScrollTxEnvelope { + self.inner.as_ref() + } +} + +mod tx_serde { + //! Helper module for serializing and deserializing Scroll [`Transaction`]. + //! + //! This is needed because we might need to deserialize the `from` field into both + //! [`alloy_rpc_types_eth::Transaction::from`] and + //! [`scroll_alloy_consensus::TxL1Message::from`]. + //! + //! Additionally, we need similar logic for the `gasPrice` field + use super::*; + use serde::de::Error; + + /// Helper struct which will be flattened into the transaction and will only contain `from` + /// field if inner [`ScrollTxEnvelope`] did not consume it. + #[derive(Serialize, Deserialize)] + struct OptionalFields { + #[serde(default, skip_serializing_if = "Option::is_none")] + from: Option
, + #[serde( + default, + rename = "gasPrice", + skip_serializing_if = "Option::is_none", + with = "alloy_serde::quantity::opt" + )] + effective_gas_price: Option, + #[serde( + default, + rename = "nonce", + skip_serializing_if = "Option::is_none", + with = "alloy_serde::quantity::opt" + )] + deposit_nonce: Option, + } + + #[derive(Serialize, Deserialize)] + #[serde(rename_all = "camelCase")] + pub(crate) struct TransactionSerdeHelper { + #[serde(flatten)] + inner: ScrollTxEnvelope, + #[serde(default)] + block_hash: Option, + #[serde(default, with = "alloy_serde::quantity::opt")] + block_number: Option, + #[serde(default, with = "alloy_serde::quantity::opt")] + transaction_index: Option, + #[serde( + default, + skip_serializing_if = "Option::is_none", + with = "alloy_serde::quantity::opt" + )] + deposit_receipt_version: Option, + + #[serde(flatten)] + other: OptionalFields, + } + + impl From for TransactionSerdeHelper { + fn from(value: Transaction) -> Self { + let Transaction { + inner: + alloy_rpc_types_eth::Transaction { + inner, + block_hash, + block_number, + transaction_index, + effective_gas_price, + from, + }, + deposit_receipt_version, + deposit_nonce, + } = value; + + // if inner transaction is a deposit, then don't serialize `from` directly + let from = + if matches!(inner, ScrollTxEnvelope::L1Message(_)) { None } else { Some(from) }; + + // if inner transaction has its own `gasPrice` don't serialize it in this struct. + let effective_gas_price = effective_gas_price.filter(|_| inner.gas_price().is_none()); + + Self { + inner, + block_hash, + block_number, + transaction_index, + deposit_receipt_version, + other: OptionalFields { from, effective_gas_price, deposit_nonce }, + } + } + } + + impl TryFrom for Transaction { + type Error = serde_json::Error; + + fn try_from(value: TransactionSerdeHelper) -> Result { + let TransactionSerdeHelper { + inner, + block_hash, + block_number, + transaction_index, + deposit_receipt_version, + other, + } = value; + + // Try to get `from` field from inner envelope or from `MaybeFrom`, otherwise return + // error + let from = if let Some(from) = other.from { + from + } else if let ScrollTxEnvelope::L1Message(tx) = &inner { + tx.sender + } else { + return Err(serde_json::Error::custom("missing `from` field")); + }; + + // Only serialize deposit_nonce if inner transaction is l1_message to avoid duplicated + // keys + let deposit_nonce = other.deposit_nonce.filter(|_| inner.is_l1_message()); + + let effective_gas_price = other.effective_gas_price.or(inner.gas_price()); + + Ok(Self { + inner: alloy_rpc_types_eth::Transaction { + inner, + block_hash, + block_number, + transaction_index, + from, + effective_gas_price, + }, + deposit_receipt_version, + deposit_nonce, + }) + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn can_deserialize_deposit() { + // cast rpc eth_getTransactionByHash + // 0xbc9329afac05556497441e2b3ee4c5d4da7ca0b2a4c212c212d0739e94a24df9 --rpc-url optimism + let rpc_tx = r#"{"blockHash":"0x9d86bb313ebeedf4f9f82bf8a19b426be656a365648a7c089b618771311db9f9","blockNumber":"0x798ad0b","hash":"0xbc9329afac05556497441e2b3ee4c5d4da7ca0b2a4c212c212d0739e94a24df9","transactionIndex":"0x0","type":"0x7e","nonce":"0x152ea95","input":"0x440a5e200000146b000f79c50000000000000003000000006725333f000000000141e287000000000000000000000000000000000000000000000000000000012439ee7e0000000000000000000000000000000000000000000000000000000063f363e973e96e7145ff001c81b9562cba7b6104eeb12a2bc4ab9f07c27d45cd81a986620000000000000000000000006887246668a3b87f54deb3b94ba47a6f63f32985","mint":"0x0","sourceHash":"0x04e9a69416471ead93b02f0c279ab11ca0b635db5c1726a56faf22623bafde52","r":"0x0","s":"0x0","v":"0x0","yParity":"0x0","gas":"0xf4240","from":"0xdeaddeaddeaddeaddeaddeaddeaddeaddead0001","to":"0x4200000000000000000000000000000000000015","depositReceiptVersion":"0x1","value":"0x0","gasPrice":"0x0"}"#; + + let tx = serde_json::from_str::(rpc_tx).unwrap(); + + let ScrollTxEnvelope::L1Message(inner) = tx.as_ref() else { + panic!("Expected deposit transaction"); + }; + assert_eq!(tx.from, inner.sender); + assert_eq!(tx.deposit_nonce, Some(22211221)); + assert_eq!(tx.inner.effective_gas_price, Some(0)); + + let deserialized = serde_json::to_value(&tx).unwrap(); + let expected = serde_json::from_str::(rpc_tx).unwrap(); + similar_asserts::assert_eq!(deserialized, expected); + } +} diff --git a/crates/scroll/alloy/rpc-types/src/transaction/request.rs b/crates/scroll/alloy/rpc-types/src/transaction/request.rs new file mode 100644 index 000000000000..616855760d89 --- /dev/null +++ b/crates/scroll/alloy/rpc-types/src/transaction/request.rs @@ -0,0 +1,185 @@ +use alloy_consensus::{ + Sealed, SignableTransaction, Signed, TxEip1559, TxEip4844, TypedTransaction, +}; +use alloy_primitives::{Address, PrimitiveSignature as Signature, TxKind, U256}; +use alloy_rpc_types_eth::{AccessList, TransactionInput, TransactionRequest}; +use serde::{Deserialize, Serialize}; + +use scroll_alloy_consensus::{ScrollTxEnvelope, ScrollTypedTransaction, TxL1Message}; + +/// `ScrollTransactionRequest` is a wrapper around the `TransactionRequest` struct. +/// This struct derives several traits to facilitate easier use and manipulation +/// in the codebase. +#[derive( + Clone, + Debug, + Default, + PartialEq, + Eq, + Hash, + derive_more::From, + derive_more::AsRef, + derive_more::AsMut, + Serialize, + Deserialize, +)] +#[serde(transparent)] +pub struct ScrollTransactionRequest(TransactionRequest); + +impl ScrollTransactionRequest { + /// Sets the from field in the call to the provided address + #[inline] + pub const fn from(mut self, from: Address) -> Self { + self.0.from = Some(from); + self + } + + /// Sets the transactions type for the transactions. + #[doc(alias = "tx_type")] + pub const fn transaction_type(mut self, transaction_type: u8) -> Self { + self.0.transaction_type = Some(transaction_type); + self + } + + /// Sets the gas limit for the transaction. + pub const fn gas_limit(mut self, gas_limit: u64) -> Self { + self.0.gas = Some(gas_limit); + self + } + + /// Sets the nonce for the transaction. + pub const fn nonce(mut self, nonce: u64) -> Self { + self.0.nonce = Some(nonce); + self + } + + /// Sets the maximum fee per gas for the transaction. + pub const fn max_fee_per_gas(mut self, max_fee_per_gas: u128) -> Self { + self.0.max_fee_per_gas = Some(max_fee_per_gas); + self + } + + /// Sets the maximum priority fee per gas for the transaction. + pub const fn max_priority_fee_per_gas(mut self, max_priority_fee_per_gas: u128) -> Self { + self.0.max_priority_fee_per_gas = Some(max_priority_fee_per_gas); + self + } + + /// Sets the recipient address for the transaction. + #[inline] + pub const fn to(mut self, to: Address) -> Self { + self.0.to = Some(TxKind::Call(to)); + self + } + + /// Sets the value (amount) for the transaction. + pub const fn value(mut self, value: U256) -> Self { + self.0.value = Some(value); + self + } + + /// Sets the access list for the transaction. + pub fn access_list(mut self, access_list: AccessList) -> Self { + self.0.access_list = Some(access_list); + self + } + + /// Sets the input data for the transaction. + pub fn input(mut self, input: TransactionInput) -> Self { + self.0.input = input; + self + } + + /// Builds [`ScrollTypedTransaction`] from this builder. See + /// [`TransactionRequest::build_typed_tx`] for more info. + /// + /// Note that EIP-4844 transactions are not supported by Scroll and will be converted into + /// EIP-1559 transactions. + pub fn build_typed_tx(self) -> Result { + let tx = self.0.build_typed_tx().map_err(Self)?; + match tx { + TypedTransaction::Legacy(tx) => Ok(ScrollTypedTransaction::Legacy(tx)), + TypedTransaction::Eip1559(tx) => Ok(ScrollTypedTransaction::Eip1559(tx)), + TypedTransaction::Eip2930(tx) => Ok(ScrollTypedTransaction::Eip2930(tx)), + TypedTransaction::Eip4844(tx) => { + let tx: TxEip4844 = tx.into(); + Ok(ScrollTypedTransaction::Eip1559(TxEip1559 { + chain_id: tx.chain_id, + nonce: tx.nonce, + gas_limit: tx.gas_limit, + max_priority_fee_per_gas: tx.max_priority_fee_per_gas, + max_fee_per_gas: tx.max_fee_per_gas, + to: TxKind::Call(tx.to), + value: tx.value, + access_list: tx.access_list, + input: tx.input, + })) + } + TypedTransaction::Eip7702(_) => { + unimplemented!("EIP-7702 support is not implemented yet") + } + } + } +} + +impl From for ScrollTransactionRequest { + fn from(tx_l1_message: TxL1Message) -> Self { + let TxL1Message { queue_index: _, gas_limit, to: _, value, sender: from, input } = + tx_l1_message; + let to = TxKind::from(tx_l1_message.to); + + Self(TransactionRequest { + from: Some(from), + to: Some(to), + value: Some(value), + gas: Some(gas_limit), + input: input.into(), + ..Default::default() + }) + } +} + +impl From> for ScrollTransactionRequest { + fn from(value: Sealed) -> Self { + value.into_inner().into() + } +} + +impl From> for ScrollTransactionRequest +where + T: SignableTransaction + Into, +{ + fn from(value: Signed) -> Self { + #[cfg(feature = "k256")] + let from = value.recover_signer().ok(); + #[cfg(not(feature = "k256"))] + let from = None; + + let mut inner: TransactionRequest = value.strip_signature().into(); + inner.from = from; + + Self(inner) + } +} + +impl From for ScrollTransactionRequest { + fn from(tx: ScrollTypedTransaction) -> Self { + match tx { + ScrollTypedTransaction::Legacy(tx) => Self(tx.into()), + ScrollTypedTransaction::Eip2930(tx) => Self(tx.into()), + ScrollTypedTransaction::Eip1559(tx) => Self(tx.into()), + ScrollTypedTransaction::L1Message(tx) => tx.into(), + } + } +} + +impl From for ScrollTransactionRequest { + fn from(value: ScrollTxEnvelope) -> Self { + match value { + ScrollTxEnvelope::Eip2930(tx) => tx.into(), + ScrollTxEnvelope::Eip1559(tx) => tx.into(), + ScrollTxEnvelope::L1Message(tx) => tx.into(), + _ => Default::default(), + } + } +} diff --git a/crates/scroll/rpc/Cargo.toml b/crates/scroll/rpc/Cargo.toml index daf4f4655204..de5559d93dbf 100644 --- a/crates/scroll/rpc/Cargo.toml +++ b/crates/scroll/rpc/Cargo.toml @@ -1,14 +1,76 @@ [package] -name = "rpc" +name = "reth-scroll-rpc" version.workspace = true edition.workspace = true rust-version.workspace = true license.workspace = true homepage.workspace = true repository.workspace = true -exclude.workspace = true - -[dependencies] +description = "Ethereum RPC implementation for scroll." [lints] workspace = true + +[dependencies] +# reth +reth-evm.workspace = true +reth-primitives.workspace = true +reth-provider.workspace = true +reth-rpc-eth-api.workspace = true +reth-rpc-eth-types.workspace = true +reth-rpc-server-types.workspace = true +reth-tasks = { workspace = true, features = ["rayon"] } +reth-transaction-pool.workspace = true +reth-rpc.workspace = true +reth-rpc-api.workspace = true +reth-node-api.workspace = true +reth-network-api.workspace = true +reth-node-builder.workspace = true +reth-chainspec.workspace = true + +#scroll +scroll-alloy-rpc-types.workspace = true + +# op-reth +reth-optimism-chainspec.workspace = true +reth-optimism-consensus.workspace = true +reth-optimism-evm.workspace = true +reth-optimism-payload-builder.workspace = true +reth-optimism-primitives.workspace = true +reth-optimism-forks.workspace = true + +# ethereum +alloy-eips.workspace = true +alloy-primitives.workspace = true +alloy-rpc-types-eth.workspace = true +alloy-rpc-types-debug.workspace = true +alloy-consensus.workspace = true +op-alloy-network.workspace = true +op-alloy-rpc-types.workspace = true +op-alloy-rpc-types-engine.workspace = true +op-alloy-consensus.workspace = true +revm.workspace = true + +# async +parking_lot.workspace = true +tokio.workspace = true +reqwest = { workspace = true, features = ["rustls-tls-native-roots"] } + +# rpc +jsonrpsee-core.workspace = true +jsonrpsee-types.workspace = true +serde_json.workspace = true + +# misc +thiserror.workspace = true +tracing.workspace = true +derive_more = { workspace = true, features = ["constructor", "deref"] } + +[dev-dependencies] +reth-optimism-chainspec.workspace = true + +[features] +optimism = [] +scroll = [] + + diff --git a/crates/scroll/rpc/src/eth/block.rs b/crates/scroll/rpc/src/eth/block.rs index 64a55496993d..89c6b275d758 100644 --- a/crates/scroll/rpc/src/eth/block.rs +++ b/crates/scroll/rpc/src/eth/block.rs @@ -1,5 +1,6 @@ -//! Loads and formats OP block RPC response. +//! Loads and formats Scroll block RPC response. +use crate::{OpEthApi, OpEthApiError, OpReceiptBuilder}; use alloy_rpc_types_eth::BlockId; use op_alloy_network::Network; use op_alloy_rpc_types::OpTransactionReceipt; @@ -12,13 +13,13 @@ use reth_rpc_eth_api::{ RpcNodeCore, RpcReceipt, }; -use crate::{OpEthApi, OpEthApiError, OpReceiptBuilder}; +use scroll_alloy_rpc_types::ScrollTransactionReceipt; impl EthBlocks for OpEthApi where Self: LoadBlock< Error = OpEthApiError, - NetworkTypes: Network, + NetworkTypes: Network, >, N: RpcNodeCore + HeaderProvider>, { diff --git a/crates/scroll/rpc/src/eth/mod.rs b/crates/scroll/rpc/src/eth/mod.rs index a109b9a87c75..fc9210db1bab 100644 --- a/crates/scroll/rpc/src/eth/mod.rs +++ b/crates/scroll/rpc/src/eth/mod.rs @@ -1,5 +1 @@ mod block; -mod call; -mod pending_block; -mod receipt; -mod transaction; diff --git a/crates/scroll/rpc/src/lib.rs b/crates/scroll/rpc/src/lib.rs index 0bd61418a292..0f925459abab 100644 --- a/crates/scroll/rpc/src/lib.rs +++ b/crates/scroll/rpc/src/lib.rs @@ -1,4 +1,21 @@ -//! Scroll-Reth RPC Implementation. +//! OP-Reth RPC support. -mod error; -mod eth; +#![doc( + html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png", + html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", + issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/" +)] +#![cfg_attr(all(not(test), feature = "optimism"), warn(unused_crate_dependencies))] +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] +#![cfg_attr(feature = "scroll", allow(unused_crate_dependencies))] +// The `optimism` feature must be enabled to use this crate. +#![cfg(all(feature = "optimism", not(feature = "scroll")))] + +pub mod error; +pub mod eth; +pub mod sequencer; +pub mod witness; + +pub use error::{OpEthApiError, OpInvalidTransactionError, SequencerClientError}; +pub use eth::{OpEthApi, OpReceiptBuilder}; +pub use sequencer::SequencerClient; From c489b49533f32b005402f963e42ea5742925f4ec Mon Sep 17 00:00:00 2001 From: georgehao Date: Thu, 19 Dec 2024 22:56:19 +0800 Subject: [PATCH 03/86] add all featrues for rpc --- Cargo.lock | 9 +- Cargo.toml | 25 +- .../consensus/src/transaction/l1_message.rs | 183 ++++++------- crates/scroll/rpc/Cargo.toml | 12 +- crates/scroll/rpc/src/error.rs | 101 +++++++ crates/scroll/rpc/src/eth/block.rs | 31 +-- crates/scroll/rpc/src/eth/call.rs | 110 ++++++++ crates/scroll/rpc/src/eth/mod.rs | 259 ++++++++++++++++++ crates/scroll/rpc/src/eth/pending_block.rs | 41 +++ crates/scroll/rpc/src/eth/receipt.rs | 51 ++++ crates/scroll/rpc/src/eth/transaction.rs | 118 ++++++++ crates/scroll/rpc/src/lib.rs | 10 +- 12 files changed, 799 insertions(+), 151 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e0d998813259..b0e0b7ca1098 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9441,11 +9441,6 @@ dependencies = [ "reth-node-api", "reth-node-builder", "reth-optimism-chainspec", - "reth-optimism-consensus", - "reth-optimism-evm", - "reth-optimism-forks", - "reth-optimism-payload-builder", - "reth-optimism-primitives", "reth-primitives", "reth-provider", "reth-rpc", @@ -9453,9 +9448,13 @@ dependencies = [ "reth-rpc-eth-api", "reth-rpc-eth-types", "reth-rpc-server-types", + "reth-scroll-chainspec", + "reth-scroll-consensus", "reth-scroll-revm", "reth-tasks", "reth-transaction-pool", + "scroll-alloy-consensus", + "scroll-alloy-network", "scroll-alloy-rpc-types", "serde_json", "thiserror 1.0.69", diff --git a/Cargo.toml b/Cargo.toml index c99ed661fe8b..0fd59ff55d6d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -419,18 +419,6 @@ reth-rpc-eth-types = { path = "crates/rpc/rpc-eth-types", default-features = fal reth-rpc-layer = { path = "crates/rpc/rpc-layer" } reth-rpc-server-types = { path = "crates/rpc/rpc-server-types" } reth-rpc-types-compat = { path = "crates/rpc/rpc-types-compat" } -reth-scroll-chainspec = { path = "crates/scroll/chainspec" } -reth-scroll-cli = { path = "crates/scroll/cli" } -reth-scroll-consensus = { path = "crates/scroll/consensus" } -reth-scroll-evm = { path = "crates/scroll/evm" } -reth-scroll-execution = { path = "crates/scroll/execution" } -reth-scroll-forks = { path = "crates/scroll/hardforks" } -reth-scroll-node = { path = "crates/scroll/node" } -reth-scroll-primitives = { path = "crates/scroll/primitives" } -reth-scroll-state-commitment = { path = "crates/scroll/state-commitment" } -reth-scroll-trie = { path = "crates/scroll/trie" } -reth-scroll-revm = { path = "crates/scroll/revm" } -reth-scroll-storage = { path = "crates/scroll/storage" } reth-stages = { path = "crates/stages/stages" } reth-stages-api = { path = "crates/stages/api" } reth-stages-types = { path = "crates/stages/types" } @@ -502,6 +490,19 @@ alloy-transport-ws = { version = "0.6.4", default-features = false } # scroll scroll-alloy-consensus = { path = "crates/scroll/alloy/consensus" } scroll-alloy-rpc-types = { path = "crates/scroll/alloy/rpc-types" } +scroll-alloy-network = { path = "crates/scroll/alloy/network" } +reth-scroll-chainspec = { path = "crates/scroll/chainspec" } +reth-scroll-cli = { path = "crates/scroll/cli" } +reth-scroll-consensus = { path = "crates/scroll/consensus" } +reth-scroll-evm = { path = "crates/scroll/evm" } +reth-scroll-execution = { path = "crates/scroll/execution" } +reth-scroll-forks = { path = "crates/scroll/hardforks" } +reth-scroll-node = { path = "crates/scroll/node" } +reth-scroll-primitives = { path = "crates/scroll/primitives" } +reth-scroll-state-commitment = { path = "crates/scroll/state-commitment" } +reth-scroll-trie = { path = "crates/scroll/trie" } +reth-scroll-revm = { path = "crates/scroll/revm" } +reth-scroll-storage = { path = "crates/scroll/storage" } # TODO (scroll): point to crates.io/tag once the crate is published/a tag is created. poseidon-bn254 = { git = "https://github.com/scroll-tech/poseidon-bn254", rev = "526a64a", features = ["bn254"] } diff --git a/crates/scroll/alloy/consensus/src/transaction/l1_message.rs b/crates/scroll/alloy/consensus/src/transaction/l1_message.rs index 187f3e29c744..723b66ed1cf2 100644 --- a/crates/scroll/alloy/consensus/src/transaction/l1_message.rs +++ b/crates/scroll/alloy/consensus/src/transaction/l1_message.rs @@ -251,13 +251,13 @@ impl Sealable for TxL1Message { } } -// TODO(scroll): Ensure this is consistent with scroll implementation. - /// Deposit transactions don't have a signature, however, we include an empty signature in the /// response for better compatibility. /// -/// This function can be used as `serialize_with` serde attribute for the [`TxDeposit`] and will -/// flatten [`TxDeposit::signature`] into response. +/// This function can be used as `serialize_with` serde attribute for the [`TxL1Message`] and will +/// flatten [`TxL1Message::signature`] into response. +/// +/// https://github.com/scroll-tech/go-ethereum/blob/develop/core/types/l1_message_tx.go#L51 #[cfg(feature = "serde")] pub fn serde_l1_message_tx_rpc( value: &T, @@ -276,138 +276,119 @@ pub fn serde_l1_message_tx_rpc( SerdeHelper { value, signature: TxL1Message::signature() }.serialize(serializer) } -// #[cfg(test)] -// mod tests { -// use super::TxL1Message; -// use alloy_primitives::{address, bytes, hex, Bytes, U256}; -// use arbitrary::Arbitrary; -// use bytes::BytesMut; -// use rand::Rng; - -// // #[test] -// // fn test_bincode_roundtrip() { -// // let mut bytes = [0u8; 1024]; -// // rand::thread_rng().fill(bytes.as_mut_slice()); -// // let tx = TxL1Message::arbitrary(&mut arbitrary::Unstructured::new(&bytes)).unwrap(); - -// // let encoded = bincode::serialize(&tx).unwrap(); -// // let decoded: TxL1Message = bincode::deserialize(&encoded).unwrap(); -// // assert_eq!(decoded, tx); -// // } - -// #[test] -// fn test_eip2718_encode() { -// let tx = -// TxL1Message { -// queue_index: 947883, -// gas_limit: 2000000, -// to: address!("781e90f1c8fc4611c9b7497c3b47f99ef6969cbc"), -// value: U256::ZERO, -// sender: address!("7885bcbd5cecef1336b5300fb5186a12ddd8c478"), -// input: -// bytes!("8ef1332e000000000000000000000000c186fa914353c44b2e33ebe05f21846f1048beda0000000000000000000000003bad7ad0728f9917d1bf08af5782dcbd516cdd96000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e76ab00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000044493a4f84f464e58d4bfa93bcc57abfb14dbe1b8ff46cd132b5709aab227f269727943d2f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" -// ), } -// ; -// let bytes = -// Bytes::from_static(&hex!(" -// 7ef9015a830e76ab831e848094781e90f1c8fc4611c9b7497c3b47f99ef6969cbc80b901248ef1332e000000000000000000000000c186fa914353c44b2e33ebe05f21846f1048beda0000000000000000000000003bad7ad0728f9917d1bf08af5782dcbd516cdd96000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e76ab00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000044493a4f84f464e58d4bfa93bcc57abfb14dbe1b8ff46cd132b5709aab227f269727943d2f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000947885bcbd5cecef1336b5300fb5186a12ddd8c478" -// )); - -// let mut encoded = BytesMut::default(); -// tx.eip2718_encode(&mut encoded); - -// assert_eq!(encoded, bytes.as_ref()) -// } - -// // #[test] -// // fn test_compaction_backwards_compatibility() { -// // assert_eq!(TxL1Message::bitflag_encoded_bytes(), 2); -// // validate_bitflag_backwards_compat!(TxL1Message, UnusedBits::NotZero); -// // } -// } - -/// Bincode-compatible [`TxDeposit`] serde implementation. +#[cfg(test)] +mod tests { + use super::TxL1Message; + use alloy_primitives::{address, bytes, hex, Bytes, U256}; + use arbitrary::Arbitrary; + use bytes::BytesMut; + use rand::Rng; + + #[test] + fn test_bincode_roundtrip() { + let mut bytes = [0u8; 1024]; + rand::thread_rng().fill(bytes.as_mut_slice()); + let tx = TxL1Message::arbitrary(&mut arbitrary::Unstructured::new(&bytes)).unwrap(); + + let encoded = bincode::serialize(&tx).unwrap(); + let decoded: TxL1Message = bincode::deserialize(&encoded).unwrap(); + assert_eq!(decoded, tx); + } + + #[test] + fn test_eip2718_encode() { + let tx = + TxL1Message { + queue_index: 947883, + gas_limit: 2000000, + to: address!("781e90f1c8fc4611c9b7497c3b47f99ef6969cbc"), + value: U256::ZERO, + sender: address!("7885bcbd5cecef1336b5300fb5186a12ddd8c478"), + input: +bytes!("8ef1332e000000000000000000000000c186fa914353c44b2e33ebe05f21846f1048beda0000000000000000000000003bad7ad0728f9917d1bf08af5782dcbd516cdd96000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e76ab00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000044493a4f84f464e58d4bfa93bcc57abfb14dbe1b8ff46cd132b5709aab227f269727943d2f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" +), } + ; + let bytes = +Bytes::from_static(&hex!(" +7ef9015a830e76ab831e848094781e90f1c8fc4611c9b7497c3b47f99ef6969cbc80b901248ef1332e000000000000000000000000c186fa914353c44b2e33ebe05f21846f1048beda0000000000000000000000003bad7ad0728f9917d1bf08af5782dcbd516cdd96000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e76ab00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000044493a4f84f464e58d4bfa93bcc57abfb14dbe1b8ff46cd132b5709aab227f269727943d2f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000947885bcbd5cecef1336b5300fb5186a12ddd8c478" +)); + + let mut encoded = BytesMut::default(); + tx.eip2718_encode(&mut encoded); + + assert_eq!(encoded, bytes.as_ref()) + } + + #[test] + fn test_compaction_backwards_compatibility() { + assert_eq!(TxL1Message::bitflag_encoded_bytes(), 2); + validate_bitflag_backwards_compat!(TxL1Message, UnusedBits::NotZero); + } +} + +/// Bincode-compatible [`TxL1Message`] serde implementation. #[cfg(all(feature = "serde", feature = "serde-bincode-compat"))] pub(super) mod serde_bincode_compat { + extern crate alloc; use alloc::borrow::Cow; - use alloy_primitives::{Address, Bytes, TxKind, B256, U256}; + use alloy_primitives::{Address, Bytes, U256}; use serde::{Deserialize, Deserializer, Serialize, Serializer}; use serde_with::{DeserializeAs, SerializeAs}; - /// Bincode-compatible [`super::TxDeposit`] serde implementation. - /// - /// Intended to use with the [`serde_with::serde_as`] macro in the following way: - /// ```rust - /// use op_alloy_consensus::{serde_bincode_compat, TxDeposit}; - /// use serde::{Deserialize, Serialize}; - /// use serde_with::serde_as; - /// - /// #[serde_as] - /// #[derive(Serialize, Deserialize)] - /// struct Data { - /// #[serde_as(as = "serde_bincode_compat::TxDeposit")] - /// transaction: TxDeposit, - /// } - /// ``` + /// Bincode-compatible [`super::TxL1Message`] serde implementation. #[derive(Debug, Serialize, Deserialize)] - pub struct TxDeposit<'a> { - source_hash: B256, - from: Address, + pub struct TxL1Message<'a> { #[serde(default)] - to: TxKind, + queue_index: u64, #[serde(default)] - mint: Option, - value: U256, gas_limit: u64, - is_system_transaction: bool, + to: Address, + value: U256, + sender: Address, input: Cow<'a, Bytes>, } - impl<'a> From<&'a super::TxDeposit> for TxDeposit<'a> { - fn from(value: &'a super::TxDeposit) -> Self { + impl<'a> From<&'a super::TxL1Message> for TxL1Message<'a> { + fn from(value: &'a super::TxL1Message) -> Self { Self { - source_hash: value.source_hash, - from: value.from, + queue_index: value.queue_index, + gas_limit: value.gas_limit, to: value.to, - mint: value.mint, value: value.value, - gas_limit: value.gas_limit, - is_system_transaction: value.is_system_transaction, + sender: value.sender, input: Cow::Borrowed(&value.input), } } } - impl<'a> From> for super::TxDeposit { - fn from(value: TxDeposit<'a>) -> Self { + impl<'a> From> for super::TxL1Message { + fn from(value: TxL1Message<'a>) -> Self { Self { - source_hash: value.source_hash, - from: value.from, + queue_index: value.queue_index, + gas_limit: value.gas_limit, to: value.to, - mint: value.mint, value: value.value, - gas_limit: value.gas_limit, - is_system_transaction: value.is_system_transaction, + sender: value.sender, input: value.input.into_owned(), } } } - impl SerializeAs for TxDeposit<'_> { - fn serialize_as(source: &super::TxDeposit, serializer: S) -> Result + impl SerializeAs for TxL1Message<'_> { + fn serialize_as(source: &super::TxL1Message, serializer: S) -> Result where S: Serializer, { - TxDeposit::from(source).serialize(serializer) + TxL1Message::from(source).serialize(serializer) } } - impl<'de> DeserializeAs<'de, super::TxDeposit> for TxDeposit<'de> { - fn deserialize_as(deserializer: D) -> Result + impl<'de> DeserializeAs<'de, super::TxL1Message> for TxL1Message<'de> { + fn deserialize_as(deserializer: D) -> Result where D: Deserializer<'de>, { - TxDeposit::deserialize(deserializer).map(Into::into) + TxL1Message::deserialize(deserializer).map(Into::into) } } @@ -418,7 +399,7 @@ pub(super) mod serde_bincode_compat { use serde::{Deserialize, Serialize}; use serde_with::serde_as; - use super::super::{serde_bincode_compat, TxDeposit}; + use super::super::{serde_bincode_compat, TxL1Message}; #[test] fn test_tx_deposit_bincode_roundtrip() { @@ -426,13 +407,13 @@ pub(super) mod serde_bincode_compat { #[derive(Debug, PartialEq, Eq, Serialize, Deserialize)] struct Data { #[serde_as(as = "serde_bincode_compat::TxDeposit")] - transaction: TxDeposit, + transaction: TxL1Message, } let mut bytes = [0u8; 1024]; rand::thread_rng().fill(bytes.as_mut_slice()); let data = Data { - transaction: TxDeposit::arbitrary(&mut arbitrary::Unstructured::new(&bytes)) + transaction: TxL1Message::arbitrary(&mut arbitrary::Unstructured::new(&bytes)) .unwrap(), }; diff --git a/crates/scroll/rpc/Cargo.toml b/crates/scroll/rpc/Cargo.toml index de5559d93dbf..d96fb8adadff 100644 --- a/crates/scroll/rpc/Cargo.toml +++ b/crates/scroll/rpc/Cargo.toml @@ -29,15 +29,11 @@ reth-node-builder.workspace = true reth-chainspec.workspace = true #scroll +reth-scroll-chainspec.workspace = true scroll-alloy-rpc-types.workspace = true - -# op-reth -reth-optimism-chainspec.workspace = true -reth-optimism-consensus.workspace = true -reth-optimism-evm.workspace = true -reth-optimism-payload-builder.workspace = true -reth-optimism-primitives.workspace = true -reth-optimism-forks.workspace = true +scroll-alloy-network.workspace = true +reth-scroll-consensus.workspace = true +scroll-alloy-consensus.workspace = true # ethereum alloy-eips.workspace = true diff --git a/crates/scroll/rpc/src/error.rs b/crates/scroll/rpc/src/error.rs index e69de29bb2d1..f85006eba20a 100644 --- a/crates/scroll/rpc/src/error.rs +++ b/crates/scroll/rpc/src/error.rs @@ -0,0 +1,101 @@ +//! RPC errors specific to Scroll. + +use alloy_rpc_types_eth::{error::EthRpcErrorCode, BlockError}; +use jsonrpsee_types::error::INTERNAL_ERROR_CODE; +use reth_optimism_evm::OpBlockExecutionError; +use reth_rpc_eth_api::AsEthApiError; +use reth_rpc_eth_types::EthApiError; +use reth_rpc_server_types::result::{internal_rpc_err, rpc_err}; +use revm::primitives::{InvalidTransaction, OptimismInvalidTransaction}; + +/// Scroll specific errors, that extend [`EthApiError`]. +#[derive(Debug, thiserror::Error)] +pub enum ScrollEthApiError { + /// L1 ethereum error. + #[error(transparent)] + Eth(#[from] EthApiError), + /// EVM error originating from invalid Scroll data. + #[error(transparent)] + Evm(#[from] ScrollBlockExecutionError), + /// Thrown when calculating L1 gas fee. + #[error("failed to calculate l1 gas fee")] + L1BlockFeeError, + /// Thrown when calculating L1 gas used + #[error("failed to calculate l1 gas used")] + L1BlockGasError, + /// Wrapper for [`revm_primitives::InvalidTransaction`](InvalidTransaction). + #[error(transparent)] + InvalidTransaction(#[from] ScrollInvalidTransactionError), + /// Sequencer client error. + #[error(transparent)] + Sequencer(#[from] SequencerClientError), +} + +impl AsEthApiError for ScrollEthApiError { + fn as_err(&self) -> Option<&EthApiError> { + match self { + Self::Eth(err) => Some(err), + _ => None, + } + } +} + +impl From for jsonrpsee_types::error::ErrorObject<'static> { + fn from(err: ScrollEthApiError) -> Self { + match err { + ScrollEthApiError::Eth(err) => err.into(), + ScrollEthApiError::InvalidTransaction(err) => err.into(), + ScrollEthApiError::Evm(_) | + ScrollEthApiError::L1BlockFeeError | + ScrollEthApiError::L1BlockGasError => internal_rpc_err(err.to_string()), + ScrollEthApiError::Sequencer(err) => err.into(), + } + } +} + +/// Scroll specific invalid transaction errors +#[derive(thiserror::Error, Debug)] +pub enum ScrollInvalidTransactionError {} + +impl From for jsonrpsee_types::error::ErrorObject<'static> { + fn from(err: ScrollInvalidTransactionError) -> Self { + match err {} + } +} + +impl TryFrom for ScrollInvalidTransactionError { + type Error = InvalidTransaction; + + fn try_from(err: InvalidTransaction) -> Result { + match err { + _ => Err(err), + } + } +} + +/// Error type when interacting with the Sequencer +#[derive(Debug, thiserror::Error)] +pub enum SequencerClientError { + /// Wrapper around an [`reqwest::Error`]. + #[error(transparent)] + HttpError(#[from] reqwest::Error), + /// Thrown when serializing transaction to forward to sequencer + #[error("invalid sequencer transaction")] + InvalidSequencerTransaction, +} + +impl From for jsonrpsee_types::error::ErrorObject<'static> { + fn from(err: SequencerClientError) -> Self { + jsonrpsee_types::error::ErrorObject::owned( + INTERNAL_ERROR_CODE, + err.to_string(), + None::, + ) + } +} + +impl From for ScrollEthApiError { + fn from(error: BlockError) -> Self { + Self::Eth(error.into()) + } +} diff --git a/crates/scroll/rpc/src/eth/block.rs b/crates/scroll/rpc/src/eth/block.rs index 89c6b275d758..e02061e6a1c2 100644 --- a/crates/scroll/rpc/src/eth/block.rs +++ b/crates/scroll/rpc/src/eth/block.rs @@ -1,27 +1,28 @@ //! Loads and formats Scroll block RPC response. -use crate::{OpEthApi, OpEthApiError, OpReceiptBuilder}; use alloy_rpc_types_eth::BlockId; -use op_alloy_network::Network; -use op_alloy_rpc_types::OpTransactionReceipt; use reth_chainspec::ChainSpecProvider; -use reth_optimism_chainspec::OpChainSpec; use reth_primitives::TransactionMeta; use reth_provider::HeaderProvider; use reth_rpc_eth_api::{ helpers::{EthBlocks, LoadBlock, LoadPendingBlock, LoadReceipt, SpawnBlocking}, RpcNodeCore, RpcReceipt, }; +use reth_rpc_eth_types::EthReceiptBuilder; +use reth_scroll_chainspec::ScrollChainSpec; +use scroll_alloy_network::Network; use scroll_alloy_rpc_types::ScrollTransactionReceipt; -impl EthBlocks for OpEthApi +use crate::{ScrollEthApi, ScrollEthApiError}; + +impl EthBlocks for ScrollEthApi where Self: LoadBlock< - Error = OpEthApiError, + Error = ScrollEthApiError, NetworkTypes: Network, >, - N: RpcNodeCore + HeaderProvider>, + N: RpcNodeCore + HeaderProvider>, { async fn block_receipts( &self, @@ -37,9 +38,6 @@ where let excess_blob_gas = block.excess_blob_gas; let timestamp = block.timestamp; - let l1_block_info = - reth_optimism_evm::extract_l1_info(&block.body).map_err(OpEthApiError::from)?; - return block .body .transactions @@ -57,15 +55,8 @@ where timestamp, }; - Ok(OpReceiptBuilder::new( - &self.inner.provider().chain_spec(), - tx, - meta, - receipt, - &receipts, - l1_block_info.clone(), - )? - .build()) + EthReceiptBuilder::new(&tx, meta, receipt, &receipts) + .map(|builder| builder.build()) }) .collect::, Self::Error>>() .map(Some) @@ -75,7 +66,7 @@ where } } -impl LoadBlock for OpEthApi +impl LoadBlock for ScrollEthApi where Self: LoadPendingBlock + SpawnBlocking, N: RpcNodeCore, diff --git a/crates/scroll/rpc/src/eth/call.rs b/crates/scroll/rpc/src/eth/call.rs index e69de29bb2d1..5067d37646ed 100644 --- a/crates/scroll/rpc/src/eth/call.rs +++ b/crates/scroll/rpc/src/eth/call.rs @@ -0,0 +1,110 @@ +use alloy_consensus::Header; +use alloy_primitives::{Bytes, TxKind, U256}; +use alloy_rpc_types_eth::transaction::TransactionRequest; +use reth_evm::ConfigureEvm; +use reth_rpc_eth_api::{ + helpers::{estimate::EstimateCall, Call, EthCall, LoadPendingBlock, LoadState, SpawnBlocking}, + FromEthApiError, IntoEthApiError, RpcNodeCore, +}; +use reth_rpc_eth_types::{revm_utils::CallFees, RpcInvalidTransactionError}; +use revm::primitives::{BlockEnv, ScrollFields, TxEnv}; + +use crate::{ScrollEthApi, ScrollEthApiError}; + +impl EthCall for ScrollEthApi +where + Self: EstimateCall + LoadPendingBlock, + N: RpcNodeCore, +{ +} + +impl EstimateCall for ScrollEthApi +where + Self: Call, + Self::Error: From, + N: RpcNodeCore, +{ +} + +impl Call for ScrollEthApi +where + Self: LoadState> + SpawnBlocking, + Self::Error: From, + N: RpcNodeCore, +{ + #[inline] + fn call_gas_limit(&self) -> u64 { + self.inner.gas_cap() + } + + #[inline] + fn max_simulate_blocks(&self) -> u64 { + self.inner.max_simulate_blocks() + } + + fn create_txn_env( + &self, + block_env: &BlockEnv, + request: TransactionRequest, + ) -> Result { + // Ensure that if versioned hashes are set, they're not empty + if request.blob_versioned_hashes.as_ref().is_some_and(|hashes| hashes.is_empty()) { + return Err(RpcInvalidTransactionError::BlobTransactionMissingBlobHashes.into_eth_err()) + } + + let TransactionRequest { + from, + to, + gas_price, + max_fee_per_gas, + max_priority_fee_per_gas, + gas, + value, + input, + nonce, + access_list, + chain_id, + blob_versioned_hashes, + max_fee_per_blob_gas, + authorization_list, + .. + } = request; + + let CallFees { max_priority_fee_per_gas, gas_price, max_fee_per_blob_gas } = + CallFees::ensure_fees( + gas_price.map(U256::from), + max_fee_per_gas.map(U256::from), + max_priority_fee_per_gas.map(U256::from), + block_env.basefee, + blob_versioned_hashes.as_deref(), + max_fee_per_blob_gas.map(U256::from), + block_env.get_blob_gasprice().map(U256::from), + )?; + + let gas_limit = gas.unwrap_or_else(|| block_env.gas_limit.min(U256::from(u64::MAX)).to()); + + #[allow(clippy::needless_update)] + let env = TxEnv { + gas_limit, + nonce, + caller: from.unwrap_or_default(), + gas_price, + gas_priority_fee: max_priority_fee_per_gas, + transact_to: to.unwrap_or(TxKind::Create), + value: value.unwrap_or_default(), + data: input + .try_into_unique_input() + .map_err(Self::Error::from_eth_err)? + .unwrap_or_default(), + chain_id, + access_list: access_list.unwrap_or_default().into(), + // EIP-4844 fields + blob_hashes: blob_versioned_hashes.unwrap_or_default(), + max_fee_per_blob_gas, + authorization_list: authorization_list.map(Into::into), + scroll: ScrollFields { ..Default::default() }, + }; + + Ok(env) + } +} diff --git a/crates/scroll/rpc/src/eth/mod.rs b/crates/scroll/rpc/src/eth/mod.rs index fc9210db1bab..3fb94cc53838 100644 --- a/crates/scroll/rpc/src/eth/mod.rs +++ b/crates/scroll/rpc/src/eth/mod.rs @@ -1 +1,260 @@ +//! Scroll-Reth `eth_` endpoint implementation. + +use derive_more::Deref; +use std::{fmt, sync::Arc}; + +use alloy_consensus::Header; +use reth_chainspec::{EthChainSpec, EthereumHardforks}; +use reth_node_builder::EthApiBuilderCtx; +use reth_primitives::EthPrimitives; +use reth_provider::BlockReaderIdExt; +use reth_rpc::eth::{core::EthApiInner, DevSigner}; +use reth_rpc_eth_api::RpcNodeCore; +use reth_rpc_eth_types::{EthStateCache, FeeHistoryCache, GasPriceOracle}; +use reth_tasks::{ + pool::{BlockingTaskGuard, BlockingTaskPool}, + TaskSpawner, +}; + +use scroll_alloy_network::Scroll; + +use crate::ScrollEthApiError; + mod block; +mod call; +mod pending_block; +mod receipt; +mod transaction; + +/// Adapter for [`EthApiInner`], which holds all the data required to serve core `eth_` API. +pub type EthApiNodeBackend = EthApiInner< + ::Provider, + ::Pool, + ::Network, + ::Evm, +>; + +/// Scroll-Reth `Eth` API implementation. +/// +/// This type provides the functionality for handling `eth_` related requests. +/// +/// This wraps a default `Eth` implementation, and provides additional functionality where the +/// scroll spec deviates from the default (ethereum) spec, e.g. transaction forwarding to the +/// sequencer, receipts, additional RPC fields for transaction receipts. +/// +/// This type implements the [`FullEthApi`](reth_rpc_eth_api::helpers::FullEthApi) by implemented +/// all the `Eth` helper traits and prerequisite traits. +#[derive(Deref, Clone)] +pub struct ScrollEthApi { + /// Gateway to node's core components. + #[deref] + inner: Arc>, + /// Sequencer client, configured to forward submitted transactions to sequencer of given Scroll + /// network. + sequencer_client: Option, +} + +impl ScrollEthApi +where + N: RpcNodeCore< + Provider: BlockReaderIdExt + + ChainSpecProvider + + CanonStateSubscriptions + + Clone + + 'static, + >, +{ + /// Creates a new instance for given context. + pub fn new(ctx: &EthApiBuilderCtx, sequencer_http: Option) -> Self { + let blocking_task_pool = + BlockingTaskPool::build().expect("failed to build blocking task pool"); + + let inner = EthApiInner::new( + ctx.provider.clone(), + ctx.pool.clone(), + ctx.network.clone(), + ctx.cache.clone(), + ctx.new_gas_price_oracle(), + ctx.config.rpc_gas_cap, + ctx.config.rpc_max_simulate_blocks, + ctx.config.eth_proof_window, + blocking_task_pool, + ctx.new_fee_history_cache(), + ctx.evm_config.clone(), + ctx.executor.clone(), + ctx.config.proof_permits, + ); + + Self { inner: Arc::new(inner), sequencer_client: sequencer_http.map(SequencerClient::new) } + } +} + +impl EthApiTypes for ScrollEthApi +where + Self: Send + Sync, + N: RpcNodeCore, +{ + type Error = ScrollEthApiError; + type NetworkTypes = Scroll; + type TransactionCompat = Self; + + fn tx_resp_builder(&self) -> &Self::TransactionCompat { + self + } +} + +impl RpcNodeCore for ScrollEthApi +where + N: RpcNodeCore, +{ + type Provider = N::Provider; + type Pool = N::Pool; + type Evm = ::Evm; + type Network = ::Network; + type PayloadBuilder = (); + + #[inline] + fn pool(&self) -> &Self::Pool { + self.inner.pool() + } + + #[inline] + fn evm_config(&self) -> &Self::Evm { + self.inner.evm_config() + } + + #[inline] + fn network(&self) -> &Self::Network { + self.inner.network() + } + + #[inline] + fn payload_builder(&self) -> &Self::PayloadBuilder { + &() + } + + #[inline] + fn provider(&self) -> &Self::Provider { + self.inner.provider() + } +} + +impl RpcNodeCoreExt for ScrollEthApi +where + N: RpcNodeCore, +{ + #[inline] + fn cache(&self) -> &EthStateCache { + self.inner.cache() + } +} + +impl EthApiSpec for ScrollEthApi +where + N: RpcNodeCore< + Provider: ChainSpecProvider + + BlockNumReader + + StageCheckpointReader, + Network: NetworkInfo, + >, +{ + #[inline] + fn starting_block(&self) -> U256 { + self.inner.starting_block() + } + + #[inline] + fn signers(&self) -> &parking_lot::RwLock>> { + self.inner.signers() + } +} + +impl SpawnBlocking for ScrollEthApi +where + Self: Send + Sync + Clone + 'static, + N: RpcNodeCore, +{ + #[inline] + fn io_task_spawner(&self) -> impl TaskSpawner { + self.inner.task_spawner() + } + + #[inline] + fn tracing_task_pool(&self) -> &BlockingTaskPool { + self.inner.blocking_task_pool() + } + + #[inline] + fn tracing_task_guard(&self) -> &BlockingTaskGuard { + self.inner.blocking_task_guard() + } +} + +impl LoadFee for ScrollEthApi +where + Self: LoadBlock, + N: RpcNodeCore< + Provider: BlockReaderIdExt + + EvmEnvProvider + + ChainSpecProvider + + StateProviderFactory, + >, +{ + #[inline] + fn gas_oracle(&self) -> &GasPriceOracle { + self.inner.gas_oracle() + } + + #[inline] + fn fee_history_cache(&self) -> &FeeHistoryCache { + self.inner.fee_history_cache() + } +} + +impl LoadState for ScrollEthApi where + N: RpcNodeCore< + Provider: StateProviderFactory + ChainSpecProvider, + Pool: TransactionPool, + > +{ +} + +impl EthState for ScrollEthApi +where + Self: LoadState + SpawnBlocking, + N: RpcNodeCore, +{ + #[inline] + fn max_proof_window(&self) -> u64 { + self.inner.eth_proof_window() + } +} + +impl EthFees for ScrollEthApi +where + Self: LoadFee, + N: RpcNodeCore, +{ +} + +impl Trace for ScrollEthApi +where + Self: RpcNodeCore + LoadState>, + N: RpcNodeCore, +{ +} + +impl AddDevSigners for ScrollEthApi +where + N: RpcNodeCore, +{ + fn with_dev_accounts(&self) { + *self.inner.signers().write() = DevSigner::random_signers(20) + } +} + +impl fmt::Debug for ScrollEthApi { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("ScrollEthApi").finish_non_exhaustive() + } +} diff --git a/crates/scroll/rpc/src/eth/pending_block.rs b/crates/scroll/rpc/src/eth/pending_block.rs index e69de29bb2d1..71b1d29f5dc4 100644 --- a/crates/scroll/rpc/src/eth/pending_block.rs +++ b/crates/scroll/rpc/src/eth/pending_block.rs @@ -0,0 +1,41 @@ +//! Loads Scroll pending block for an RPC response. + +use alloy_consensus::Header; +use alloy_eips::BlockNumberOrTag; +use alloy_primitives::{BlockNumber, B256}; +use reth_chainspec::{EthChainSpec, EthereumHardforks}; +use reth_evm::ConfigureEvm; +use reth_primitives::{Receipt, SealedBlockWithSenders}; +use reth_provider::{ + BlockReader, BlockReaderIdExt, ChainSpecProvider, EvmEnvProvider, ExecutionOutcome, + ReceiptProvider, StateProviderFactory, +}; +use reth_rpc_eth_api::{ + helpers::{LoadPendingBlock, SpawnBlocking}, + FromEthApiError, RpcNodeCore, +}; +use reth_rpc_eth_types::{EthApiError, PendingBlock}; +use reth_transaction_pool::TransactionPool; +use revm::primitives::BlockEnv; + +use crate::ScrollEthApi; + +impl LoadPendingBlock for ScrollEthApi +where + Self: SpawnBlocking, + N: RpcNodeCore< + Provider: BlockReaderIdExt< + Block = reth_primitives::Block, + Receipt = reth_primitives::Receipt, + > + EvmEnvProvider + + ChainSpecProvider + + StateProviderFactory, + Pool: TransactionPool, + Evm: ConfigureEvm
, + >, +{ + #[inline] + fn pending_block(&self) -> &tokio::sync::Mutex> { + self.inner.pending_block() + } +} diff --git a/crates/scroll/rpc/src/eth/receipt.rs b/crates/scroll/rpc/src/eth/receipt.rs index e69de29bb2d1..fa6fcb3633a0 100644 --- a/crates/scroll/rpc/src/eth/receipt.rs +++ b/crates/scroll/rpc/src/eth/receipt.rs @@ -0,0 +1,51 @@ +//! Loads and formats Scroll receipt RPC response. + +use alloy_eips::eip2718::Encodable2718; +use alloy_rpc_types_eth::{Log, TransactionReceipt}; +use reth_node_api::{FullNodeComponents, NodeTypes}; +use reth_primitives::{Receipt, TransactionMeta, TransactionSigned, TxType}; +use reth_provider::{ChainSpecProvider, ReceiptProvider, TransactionsProvider}; +use reth_rpc_eth_api::{helpers::LoadReceipt, FromEthApiError, RpcReceipt}; +use reth_rpc_eth_types::{receipt::build_receipt, EthApiError}; + +use reth_scroll_chainspec::ScrollChainSpec; + +use crate::{ScrollEthApi, ScrollEthApiError}; + +impl LoadReceipt for ScrollEthApi +where + Self: Send + Sync, + N: FullNodeComponents>, + Self::Provider: + TransactionsProvider + ReceiptProvider, +{ + async fn build_transaction_receipt( + &self, + tx: TransactionSigned, + meta: TransactionMeta, + receipt: Receipt, + ) -> Result, Self::Error> { + let (block, receipts) = self + .cache() + .get_block_and_receipts(meta.block_hash) + .await + .map_err(Self::Error::from_eth_err)? + .ok_or(Self::Error::from_eth_err(EthApiError::HeaderNotFound( + meta.block_hash.into(), + )))?; + + // todo + let l1_block_info = + reth_optimism_evm::extract_l1_info(&block.body).map_err(OpEthApiError::from)?; + + Ok(OpReceiptBuilder::new( + &self.inner.provider().chain_spec(), + &tx, + meta, + &receipt, + &receipts, + l1_block_info, + )? + .build()) + } +} diff --git a/crates/scroll/rpc/src/eth/transaction.rs b/crates/scroll/rpc/src/eth/transaction.rs index e69de29bb2d1..d7f24dd21ef8 100644 --- a/crates/scroll/rpc/src/eth/transaction.rs +++ b/crates/scroll/rpc/src/eth/transaction.rs @@ -0,0 +1,118 @@ +//! Loads and formats Scroll transaction RPC response. + +use alloy_consensus::{Signed, Transaction as _}; +use alloy_primitives::{Bytes, Sealable, Sealed, B256}; +use alloy_rpc_types_eth::{Transaction, TransactionInfo}; +use reth_node_api::FullNodeComponents; +use reth_primitives::{TransactionSigned, TransactionSignedEcRecovered}; +use reth_provider::{BlockReaderIdExt, ReceiptProvider, TransactionsProvider}; +use reth_rpc_eth_api::{ + helpers::{EthSigner, EthTransactions, LoadTransaction, SpawnBlocking}, + FromEthApiError, FullEthApiTypes, RpcNodeCore, TransactionCompat, +}; +use reth_rpc_eth_types::utils::recover_raw_transaction; +use reth_transaction_pool::{PoolTransaction, TransactionOrigin, TransactionPool}; + +use scroll_alloy_consensus::ScrollTxEnvelope; + +use crate::{ScrollEthApi, ScrollEthApiError}; + +impl EthTransactions for ScrollEthApi +where + Self: LoadTransaction, + N: RpcNodeCore, +{ + fn signers(&self) -> &parking_lot::RwLock>> { + self.inner.signers() + } +} + +impl LoadTransaction for ScrollEthApi +where + Self: SpawnBlocking + FullEthApiTypes, + N: RpcNodeCore, + Self::Pool: TransactionPool, +{ +} + +impl TransactionCompat for ScrollEthApi +where + N: FullNodeComponents>, +{ + type Transaction = Transaction; + type Error = ScrollEthApiError; + + fn fill( + &self, + tx: TransactionSignedEcRecovered, + tx_info: TransactionInfo, + ) -> Result { + let from = tx.signer(); + let hash = tx.hash(); + let TransactionSigned { transaction, signature, .. } = tx.into_signed(); + + let inner = match transaction { + reth_primitives::Transaction::Legacy(tx) => { + Signed::new_unchecked(tx, signature, hash).into() + } + reth_primitives::Transaction::Eip2930(tx) => { + Signed::new_unchecked(tx, signature, hash).into() + } + reth_primitives::Transaction::Eip1559(tx) => { + Signed::new_unchecked(tx, signature, hash).into() + } + reth_primitives::Transaction::Eip4844(_) => unreachable!(), + reth_primitives::Transaction::Eip7702(tx) => unreachable!(), + reth_primitives::Transaction::Deposit(tx) => { + ScrollTxEnvelope::L1Message(tx.seal_unchecked(hash)) + } + }; + + let TransactionInfo { + block_hash, block_number, index: transaction_index, base_fee, .. + } = tx_info; + + let effective_gas_price = if inner.is_deposit() { + // For deposits, we must always set the `gasPrice` field to 0 in rpc + // deposit tx don't have a gas price field, but serde of `Transaction` will take care of + // it + 0 + } else { + base_fee + .map(|base_fee| { + inner.effective_tip_per_gas(base_fee as u64).unwrap_or_default() + base_fee + }) + .unwrap_or_else(|| inner.max_fee_per_gas()) + }; + + Ok(Transaction { + inner, + block_hash, + block_number, + transaction_index, + from, + effective_gas_price: Some(effective_gas_price), + }) + } + + fn otterscan_api_truncate_input(tx: &mut Self::Transaction) { + let input = match &mut tx.inner.inner { + ScrollTxEnvelope::Eip1559(tx) => &mut tx.tx_mut().input, + ScrollTxEnvelope::Eip2930(tx) => &mut tx.tx_mut().input, + ScrollTxEnvelope::Legacy(tx) => &mut tx.tx_mut().input, + ScrollTxEnvelope::L1Message(tx) => { + let (mut deposit, hash) = std::mem::replace( + tx, + Sealed::new_unchecked(Default::default(), Default::default()), + ) + .split(); + deposit.input = deposit.input.slice(..4); + let mut deposit = deposit.seal_unchecked(hash); + std::mem::swap(tx, &mut deposit); + return + } + _ => return, + }; + *input = input.slice(..4); + } +} diff --git a/crates/scroll/rpc/src/lib.rs b/crates/scroll/rpc/src/lib.rs index 0f925459abab..86f3e4feeecc 100644 --- a/crates/scroll/rpc/src/lib.rs +++ b/crates/scroll/rpc/src/lib.rs @@ -1,21 +1,21 @@ -//! OP-Reth RPC support. +//! Scroll-Reth RPC support. #![doc( html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png", html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/" )] -#![cfg_attr(all(not(test), feature = "optimism"), warn(unused_crate_dependencies))] +#![cfg_attr(all(not(test), feature = "scroll"), warn(unused_crate_dependencies))] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] #![cfg_attr(feature = "scroll", allow(unused_crate_dependencies))] // The `optimism` feature must be enabled to use this crate. -#![cfg(all(feature = "optimism", not(feature = "scroll")))] +#![cfg(all(feature = "scroll", not(feature = "optimism")))] pub mod error; pub mod eth; pub mod sequencer; pub mod witness; -pub use error::{OpEthApiError, OpInvalidTransactionError, SequencerClientError}; -pub use eth::{OpEthApi, OpReceiptBuilder}; +pub use error::{ScrollEthApiError, ScrollInvalidTransactionError, SequencerClientError}; +pub use eth::ScrollEthApi; pub use sequencer::SequencerClient; From 92df35aed6e316f1db5a535ced2bae8552805aac Mon Sep 17 00:00:00 2001 From: georgehao Date: Fri, 20 Dec 2024 14:32:12 +0800 Subject: [PATCH 04/86] lint --- Cargo.lock | 4 +- crates/scroll/alloy/consensus/Cargo.toml | 3 - crates/scroll/alloy/consensus/README.md | 15 +++ crates/scroll/alloy/consensus/src/lib.rs | 20 +++- .../alloy/consensus/src/receipt/envelope.rs | 19 ++-- .../scroll/alloy/consensus/src/receipt/mod.rs | 2 - .../consensus/src/transaction/envelope.rs | 50 +++++----- .../consensus/src/transaction/l1_message.rs | 95 +++++++++++-------- .../alloy/consensus/src/transaction/mod.rs | 6 ++ .../consensus/src/transaction/tx_type.rs | 3 +- .../alloy/consensus/src/transaction/typed.rs | 22 ++--- crates/scroll/alloy/rpc-types/Cargo.toml | 36 ++++++- crates/scroll/alloy/rpc-types/README.md | 3 + crates/scroll/alloy/rpc-types/src/lib.rs | 9 ++ crates/scroll/alloy/rpc-types/src/receipt.rs | 2 +- .../scroll/alloy/rpc-types/src/transaction.rs | 2 - crates/scroll/rpc/src/eth/mod.rs | 9 +- crates/scroll/rpc/src/lib.rs | 3 - 18 files changed, 192 insertions(+), 111 deletions(-) create mode 100644 crates/scroll/alloy/consensus/README.md create mode 100644 crates/scroll/alloy/rpc-types/README.md diff --git a/Cargo.lock b/Cargo.lock index b0e0b7ca1098..6e673cee8c16 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10430,7 +10430,6 @@ dependencies = [ "alloy-primitives", "alloy-rlp", "alloy-serde", - "alloy-signer", "arbitrary", "bincode", "derive_more", @@ -10438,8 +10437,6 @@ dependencies = [ "serde", "serde_json", "serde_with", - "thiserror 1.0.69", - "tokio", ] [[package]] @@ -10464,6 +10461,7 @@ dependencies = [ "alloy-primitives", "alloy-rpc-types-eth", "alloy-serde", + "arbitrary", "derive_more", "scroll-alloy-consensus", "serde", diff --git a/crates/scroll/alloy/consensus/Cargo.toml b/crates/scroll/alloy/consensus/Cargo.toml index 4e57fe403d49..34c4666670f5 100644 --- a/crates/scroll/alloy/consensus/Cargo.toml +++ b/crates/scroll/alloy/consensus/Cargo.toml @@ -19,7 +19,6 @@ alloy-consensus.workspace = true alloy-primitives = { workspace = true, features = ["rlp"] } # misc -thiserror.workspace = true derive_more = { workspace = true, features = ["display"] } # arbitrary @@ -34,8 +33,6 @@ serde = { workspace = true, features = ["derive"], optional = true } rand.workspace = true bincode.workspace = true serde_json.workspace = true -alloy-signer.workspace = true -tokio = { workspace = true, features = ["macros"] } arbitrary = { workspace = true, features = ["derive"] } alloy-primitives = { workspace = true, features = ["rand"] } diff --git a/crates/scroll/alloy/consensus/README.md b/crates/scroll/alloy/consensus/README.md new file mode 100644 index 000000000000..90b7b8631925 --- /dev/null +++ b/crates/scroll/alloy/consensus/README.md @@ -0,0 +1,15 @@ +# scroll-alloy-consensus + +Scroll consensus interface. + +This crate contains constants, types, and functions for implementing Scroll EL consensus and communication. This +includes an extended `ScrollTxEnvelope` type with [deposit transactions][deposit] + +In general a type belongs in this crate if it exists in the `alloy-consensus` crate, but was modified from the base Ethereum protocol in the OP Stack. +For consensus types that are not modified by the Scroll, the `alloy-consensus` types should be used instead. + +## Provenance + +Much of this code was ported from [reth-primitives] as part of ongoing alloy migrations. + +[reth-primitives]: https://github.com/paradigmxyz/reth/tree/main/crates/primitives diff --git a/crates/scroll/alloy/consensus/src/lib.rs b/crates/scroll/alloy/consensus/src/lib.rs index 273a725f7289..1274475e1df5 100644 --- a/crates/scroll/alloy/consensus/src/lib.rs +++ b/crates/scroll/alloy/consensus/src/lib.rs @@ -1,10 +1,12 @@ +#![doc = include_str!("../README.md")] +#![doc( + html_logo_url = "https://raw.githubusercontent.com/alloy-rs/core/main/assets/alloy.jpg", + html_favicon_url = "https://raw.githubusercontent.com/alloy-rs/core/main/assets/favicon.ico" +)] #![cfg_attr(not(test), warn(unused_crate_dependencies))] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] #![cfg_attr(not(feature = "std"), no_std)] -#[cfg(test)] -extern crate alloc; - mod transaction; pub use transaction::{ ScrollTxEnvelope, ScrollTxType, ScrollTypedTransaction, TxL1Message, L1_MESSAGE_TX_TYPE_ID, @@ -15,3 +17,15 @@ pub use receipt::ScrollReceiptEnvelope; #[cfg(feature = "serde")] pub use transaction::serde_l1_message_tx_rpc; + +/// Bincode-compatible serde implementations for consensus types. +/// +/// `bincode` crate doesn't work well with optionally serializable serde fields, but some of the +/// consensus types require optional serialization for RPC compatibility. This module makes so that +/// all fields are serialized. +/// +/// Read more: +#[cfg(all(feature = "serde", feature = "serde-bincode-compat"))] +pub mod serde_bincode_compat { + pub use super::transaction::serde_bincode_compat::TxL1Message; +} diff --git a/crates/scroll/alloy/consensus/src/receipt/envelope.rs b/crates/scroll/alloy/consensus/src/receipt/envelope.rs index 92314f08f43a..582d18cc23ff 100644 --- a/crates/scroll/alloy/consensus/src/receipt/envelope.rs +++ b/crates/scroll/alloy/consensus/src/receipt/envelope.rs @@ -102,10 +102,9 @@ impl ScrollReceiptEnvelope { /// Return the receipt's bloom. pub const fn logs_bloom(&self) -> &Bloom { match self { - Self::Legacy(t) => &t.logs_bloom, - Self::Eip2930(t) => &t.logs_bloom, - Self::Eip1559(t) => &t.logs_bloom, - Self::L1Message(t) => &t.logs_bloom, + Self::Legacy(t) | Self::Eip2930(t) | Self::Eip1559(t) | Self::L1Message(t) => { + &t.logs_bloom + } } } @@ -140,10 +139,9 @@ impl ScrollReceiptEnvelope { /// Get the length of the inner receipt in the 2718 encoding. pub fn inner_length(&self) -> usize { match self { - Self::Legacy(t) => t.length(), - Self::Eip2930(t) => t.length(), - Self::Eip1559(t) => t.length(), - Self::L1Message(t) => t.length(), + Self::Legacy(t) | Self::Eip2930(t) | Self::Eip1559(t) | Self::L1Message(t) => { + t.length() + } } } @@ -230,8 +228,9 @@ impl Encodable2718 for ScrollReceiptEnvelope { Some(ty) => out.put_u8(ty), } match self { - Self::L1Message(t) => t.encode(out), - Self::Legacy(t) | Self::Eip2930(t) | Self::Eip1559(t) => t.encode(out), + Self::L1Message(t) | Self::Legacy(t) | Self::Eip2930(t) | Self::Eip1559(t) => { + t.encode(out) + } } } } diff --git a/crates/scroll/alloy/consensus/src/receipt/mod.rs b/crates/scroll/alloy/consensus/src/receipt/mod.rs index 62d589383f7d..7142ef787ace 100644 --- a/crates/scroll/alloy/consensus/src/receipt/mod.rs +++ b/crates/scroll/alloy/consensus/src/receipt/mod.rs @@ -1,5 +1,3 @@ -use alloy_consensus::TxReceipt; - mod envelope; pub use envelope::ScrollReceiptEnvelope; diff --git a/crates/scroll/alloy/consensus/src/transaction/envelope.rs b/crates/scroll/alloy/consensus/src/transaction/envelope.rs index b2364332eca5..44c9c1c77bb4 100644 --- a/crates/scroll/alloy/consensus/src/transaction/envelope.rs +++ b/crates/scroll/alloy/consensus/src/transaction/envelope.rs @@ -30,6 +30,7 @@ use crate::{ScrollTxType, TxL1Message}; )] #[cfg_attr(all(any(test, feature = "arbitrary"), feature = "k256"), derive(arbitrary::Arbitrary))] #[non_exhaustive] + pub enum ScrollTxEnvelope { /// An untagged [`TxLegacy`]. Legacy(Signed), @@ -144,12 +145,21 @@ impl Transaction for ScrollTxEnvelope { } } - fn to(&self) -> Option
{ + fn effective_gas_price(&self, base_fee: Option) -> u128 { match self { - Self::Legacy(tx) => tx.tx().to(), - Self::Eip2930(tx) => tx.tx().to(), - Self::Eip1559(tx) => tx.tx().to(), - Self::L1Message(tx) => tx.to(), + Self::Legacy(tx) => tx.tx().effective_gas_price(base_fee), + Self::Eip2930(tx) => tx.tx().effective_gas_price(base_fee), + Self::Eip1559(tx) => tx.tx().effective_gas_price(base_fee), + Self::L1Message(tx) => tx.effective_gas_price(base_fee), + } + } + + fn is_dynamic_fee(&self) -> bool { + match self { + Self::Legacy(tx) => tx.tx().is_dynamic_fee(), + Self::Eip2930(tx) => tx.tx().is_dynamic_fee(), + Self::Eip1559(tx) => tx.tx().is_dynamic_fee(), + Self::L1Message(tx) => tx.is_dynamic_fee(), } } @@ -162,6 +172,15 @@ impl Transaction for ScrollTxEnvelope { } } + fn to(&self) -> Option
{ + match self { + Self::Legacy(tx) => tx.tx().to(), + Self::Eip2930(tx) => tx.tx().to(), + Self::Eip1559(tx) => tx.tx().to(), + Self::L1Message(tx) => tx.to(), + } + } + fn value(&self) -> U256 { match self { Self::Legacy(tx) => tx.tx().value(), @@ -215,24 +234,6 @@ impl Transaction for ScrollTxEnvelope { Self::L1Message(tx) => tx.authorization_list(), } } - - fn is_dynamic_fee(&self) -> bool { - match self { - Self::Legacy(tx) => tx.tx().is_dynamic_fee(), - Self::Eip2930(tx) => tx.tx().is_dynamic_fee(), - Self::Eip1559(tx) => tx.tx().is_dynamic_fee(), - Self::L1Message(tx) => tx.is_dynamic_fee(), - } - } - - fn effective_gas_price(&self, base_fee: Option) -> u128 { - match self { - Self::Legacy(tx) => tx.tx().effective_gas_price(base_fee), - Self::Eip2930(tx) => tx.tx().effective_gas_price(base_fee), - Self::Eip1559(tx) => tx.tx().effective_gas_price(base_fee), - Self::L1Message(tx) => tx.effective_gas_price(base_fee), - } - } } impl ScrollTxEnvelope { @@ -463,9 +464,10 @@ mod serde_from { #[cfg(test)] mod tests { + extern crate alloc; use super::*; use alloc::vec; - use alloy_primitives::{hex, Address, Bytes, TxKind, B256, U256}; + use alloy_primitives::{hex, Address, Bytes, U256}; #[test] fn test_tx_gas_limit() { diff --git a/crates/scroll/alloy/consensus/src/transaction/l1_message.rs b/crates/scroll/alloy/consensus/src/transaction/l1_message.rs index 723b66ed1cf2..da715f5cd69d 100644 --- a/crates/scroll/alloy/consensus/src/transaction/l1_message.rs +++ b/crates/scroll/alloy/consensus/src/transaction/l1_message.rs @@ -9,7 +9,7 @@ use alloy_primitives::{ use alloy_rlp::Decodable; /// L1 message transaction type id, 0x7e in hex. -pub const L1_MESSAGE_TRANSACTION_TYPE: u8 = 126; +const L1_MESSAGE_TRANSACTION_TYPE: u8 = 126; /// A message transaction sent from the settlement layer to the L2 for execution. /// @@ -152,6 +152,7 @@ impl TxL1Message { size_of::
() // sender } + /// Calculates the hash of the [`TxL1Message`] transaction. pub fn tx_hash(&self) -> TxHash { let mut buf = Vec::with_capacity(self.eip2718_encoded_length()); self.eip2718_encode(&mut buf); @@ -257,7 +258,7 @@ impl Sealable for TxL1Message { /// This function can be used as `serialize_with` serde attribute for the [`TxL1Message`] and will /// flatten [`TxL1Message::signature`] into response. /// -/// https://github.com/scroll-tech/go-ethereum/blob/develop/core/types/l1_message_tx.go#L51 +/// . #[cfg(feature = "serde")] pub fn serde_l1_message_tx_rpc( value: &T, @@ -278,51 +279,69 @@ pub fn serde_l1_message_tx_rpc( #[cfg(test)] mod tests { - use super::TxL1Message; - use alloy_primitives::{address, bytes, hex, Bytes, U256}; - use arbitrary::Arbitrary; - use bytes::BytesMut; - use rand::Rng; + use super::*; + use alloy_primitives::hex; + use alloy_rlp::BytesMut; #[test] - fn test_bincode_roundtrip() { - let mut bytes = [0u8; 1024]; - rand::thread_rng().fill(bytes.as_mut_slice()); - let tx = TxL1Message::arbitrary(&mut arbitrary::Unstructured::new(&bytes)).unwrap(); + fn test_rlp_roundtrip() { + let bytes = Bytes::from_static(&hex!("7ef9015aa044bae9d41b8380d781187b426c6fe43df5fb2fb57bd4466ef6a701e1f01e015694deaddeaddeaddeaddeaddeaddeaddeaddead000194420000000000000000000000000000000000001580808408f0d18001b90104015d8eb900000000000000000000000000000000000000000000000000000000008057650000000000000000000000000000000000000000000000000000000063d96d10000000000000000000000000000000000000000000000000000000000009f35273d89754a1e0387b89520d989d3be9c37c1f32495a88faf1ea05c61121ab0d1900000000000000000000000000000000000000000000000000000000000000010000000000000000000000002d679b567db6187c0c8323fa982cfb88b74dbcc7000000000000000000000000000000000000000000000000000000000000083400000000000000000000000000000000000000000000000000000000000f4240")); + let tx_a = TxL1Message::decode(&mut bytes[1..].as_ref()).unwrap(); + let mut buf_a = BytesMut::default(); + tx_a.encode(&mut buf_a); + assert_eq!(&buf_a[..], &bytes[1..]); + } + + #[test] + fn test_encode_decode_fields() { + let original = TxL1Message { + queue_index: 0, + gas_limit: 0, + to: Address::default(), + value: U256::default(), + sender: Address::default(), + input: Bytes::default(), + }; + + let mut buffer = BytesMut::new(); + original.rlp_encode_fields(&mut buffer); + let decoded = TxL1Message::rlp_decode_fields(&mut &buffer[..]).expect("Failed to decode"); - let encoded = bincode::serialize(&tx).unwrap(); - let decoded: TxL1Message = bincode::deserialize(&encoded).unwrap(); - assert_eq!(decoded, tx); + assert_eq!(original, decoded); } #[test] - fn test_eip2718_encode() { - let tx = - TxL1Message { - queue_index: 947883, - gas_limit: 2000000, - to: address!("781e90f1c8fc4611c9b7497c3b47f99ef6969cbc"), - value: U256::ZERO, - sender: address!("7885bcbd5cecef1336b5300fb5186a12ddd8c478"), - input: -bytes!("8ef1332e000000000000000000000000c186fa914353c44b2e33ebe05f21846f1048beda0000000000000000000000003bad7ad0728f9917d1bf08af5782dcbd516cdd96000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e76ab00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000044493a4f84f464e58d4bfa93bcc57abfb14dbe1b8ff46cd132b5709aab227f269727943d2f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" -), } - ; - let bytes = -Bytes::from_static(&hex!(" -7ef9015a830e76ab831e848094781e90f1c8fc4611c9b7497c3b47f99ef6969cbc80b901248ef1332e000000000000000000000000c186fa914353c44b2e33ebe05f21846f1048beda0000000000000000000000003bad7ad0728f9917d1bf08af5782dcbd516cdd96000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e76ab00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000044493a4f84f464e58d4bfa93bcc57abfb14dbe1b8ff46cd132b5709aab227f269727943d2f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000947885bcbd5cecef1336b5300fb5186a12ddd8c478" -)); - - let mut encoded = BytesMut::default(); - tx.eip2718_encode(&mut encoded); - - assert_eq!(encoded, bytes.as_ref()) + fn test_encode_with_and_without_header() { + let tx_deposit = TxL1Message { + queue_index: 0, + gas_limit: 50000, + to: Address::default(), + value: U256::default(), + sender: Address::default(), + input: Bytes::default(), + }; + + let mut buffer_with_header = BytesMut::new(); + tx_deposit.encode(&mut buffer_with_header); + + let mut buffer_without_header = BytesMut::new(); + tx_deposit.rlp_encode_fields(&mut buffer_without_header); + + assert!(buffer_with_header.len() > buffer_without_header.len()); } #[test] - fn test_compaction_backwards_compatibility() { - assert_eq!(TxL1Message::bitflag_encoded_bytes(), 2); - validate_bitflag_backwards_compat!(TxL1Message, UnusedBits::NotZero); + fn test_payload_length() { + let tx_deposit = TxL1Message { + queue_index: 0, + gas_limit: 50000, + to: Address::default(), + value: U256::default(), + sender: Address::default(), + input: Bytes::default(), + }; + + assert!(tx_deposit.size() > tx_deposit.rlp_encoded_fields_length()); } } diff --git a/crates/scroll/alloy/consensus/src/transaction/mod.rs b/crates/scroll/alloy/consensus/src/transaction/mod.rs index 9e95d5a86d07..22f16e1213bf 100644 --- a/crates/scroll/alloy/consensus/src/transaction/mod.rs +++ b/crates/scroll/alloy/consensus/src/transaction/mod.rs @@ -14,3 +14,9 @@ pub use typed::ScrollTypedTransaction; #[cfg(feature = "serde")] pub use l1_message::serde_l1_message_tx_rpc; + +/// Bincode-compatible serde implementations for transaction types. +#[cfg(all(feature = "serde", feature = "serde-bincode-compat"))] +pub(super) mod serde_bincode_compat { + pub use super::l1_message::serde_bincode_compat::TxL1Message; +} diff --git a/crates/scroll/alloy/consensus/src/transaction/tx_type.rs b/crates/scroll/alloy/consensus/src/transaction/tx_type.rs index 90e15467399a..d91086769b06 100644 --- a/crates/scroll/alloy/consensus/src/transaction/tx_type.rs +++ b/crates/scroll/alloy/consensus/src/transaction/tx_type.rs @@ -8,7 +8,7 @@ use derive_more::Display; /// Identifier for an Scroll L1 message transaction pub const L1_MESSAGE_TX_TYPE_ID: u8 = 126; // 0x7E -/// Scroll `TransactionType` flags as specified in https://docs.scroll.io/en/technology/chain/transactions/. +/// Scroll `TransactionType` flags as specified in . #[repr(u8)] #[derive(Debug, Copy, Clone, Eq, PartialEq, PartialOrd, Ord, Hash, Display)] pub enum ScrollTxType { @@ -116,6 +116,7 @@ impl Decodable for ScrollTxType { #[cfg(test)] mod tests { use super::*; + extern crate alloc; use alloc::{vec, vec::Vec}; #[test] diff --git a/crates/scroll/alloy/consensus/src/transaction/typed.rs b/crates/scroll/alloy/consensus/src/transaction/typed.rs index f912ab9b4c78..90be26e95b2c 100644 --- a/crates/scroll/alloy/consensus/src/transaction/typed.rs +++ b/crates/scroll/alloy/consensus/src/transaction/typed.rs @@ -1,16 +1,16 @@ use crate::{ScrollTxEnvelope, ScrollTxType, TxL1Message}; -use alloy_consensus::{Transaction, TxEip1559, TxEip2930, TxEip7702, TxLegacy}; +use alloy_consensus::{Transaction, TxEip1559, TxEip2930, TxLegacy}; use alloy_eips::eip2930::AccessList; use alloy_primitives::{Address, Bytes, TxKind}; -/// The TypedTransaction enum represents all Ethereum transaction request types, modified for the OP -/// Stack. +/// The `TypedTransaction` enum represents all Ethereum transaction request types, modified for +/// Scroll /// /// Its variants correspond to specific allowed transactions: -/// 1. Legacy (pre-EIP2718) [`TxLegacy`] -/// 2. EIP2930 (state access lists) [`TxEip2930`] -/// 3. EIP1559 [`TxEip1559`] -/// 4. L1Message [`TxL1Message`] +/// 1. `Legacy` (pre-EIP2718) [`TxLegacy`] +/// 2. `EIP2930` (state access lists) [`TxEip2930`] +/// 3. `EIP1559` [`TxEip1559`] +/// 4. `L1Message` [`TxL1Message`] #[derive(Debug, Clone, PartialEq, Eq, Hash)] #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] @@ -300,16 +300,16 @@ mod serde_from { #[derive(Debug, serde::Serialize, serde::Deserialize)] #[serde(tag = "type")] pub(crate) enum TaggedTypedTransaction { - /// Legacy transaction + /// `Legacy` transaction #[serde(rename = "0x00", alias = "0x0")] Legacy(TxLegacy), - /// EIP-2930 transaction + /// `EIP-2930` transaction #[serde(rename = "0x01", alias = "0x1")] Eip2930(TxEip2930), - /// EIP-1559 transaction + /// `EIP-1559` transaction #[serde(rename = "0x02", alias = "0x2")] Eip1559(TxEip1559), - /// L1Message transaction + /// `L1Message` transaction #[serde( rename = "0x7e", alias = "0x7E", diff --git a/crates/scroll/alloy/rpc-types/Cargo.toml b/crates/scroll/alloy/rpc-types/Cargo.toml index 775e3227c23b..1f5b4b4f27da 100644 --- a/crates/scroll/alloy/rpc-types/Cargo.toml +++ b/crates/scroll/alloy/rpc-types/Cargo.toml @@ -8,9 +8,6 @@ homepage.workspace = true repository.workspace = true exclude.workspace = true -[lints] -workspace = true - [dev-dependencies] similar-asserts = "1.6" @@ -26,11 +23,42 @@ alloy-serde = { version = "0.6.4", default-features = false } derive_more = { version = "1.0", default-features = false } serde = { version = "1.0", features = ["derive", "alloc", "derive"], default-features = false } serde_json = { version = "1.0", features = ["alloc"], default-features = false } +arbitrary = { version = "1.3", features = ["derive", "derive"], optional = true } [features] +default = ["std"] +arbitrary = [ + "std", + "dep:arbitrary", + "alloy-primitives/arbitrary", + "alloy-rpc-types-eth/arbitrary", +] +k256 = [ + "alloy-rpc-types-eth/k256", +] std = [ "alloy-network-primitives/std", "alloy-eips/std", "alloy-primitives/std", "alloy-rpc-types-eth/std", -] \ No newline at end of file +] +[lints.clippy] +missing-const-for-fn = "warn" +option-if-let-else = "warn" +redundant-clone = "warn" +use-self = "warn" + +[lints.clippy.all] +level = "warn" +priority = -1 + +[lints.rust] +missing-debug-implementations = "warn" +missing-docs = "warn" +rust-2018-idioms = "deny" +unnameable-types = "warn" +unreachable-pub = "warn" +unused-must-use = "deny" + +[lints.rustdoc] +all = "warn" \ No newline at end of file diff --git a/crates/scroll/alloy/rpc-types/README.md b/crates/scroll/alloy/rpc-types/README.md new file mode 100644 index 000000000000..963a99c4b23d --- /dev/null +++ b/crates/scroll/alloy/rpc-types/README.md @@ -0,0 +1,3 @@ +# scroll-alloy-rpc-types + +Scroll RPC-related types. diff --git a/crates/scroll/alloy/rpc-types/src/lib.rs b/crates/scroll/alloy/rpc-types/src/lib.rs index 60b32ae456bd..3236795f79ae 100644 --- a/crates/scroll/alloy/rpc-types/src/lib.rs +++ b/crates/scroll/alloy/rpc-types/src/lib.rs @@ -1,3 +1,12 @@ +#![doc = include_str!("../README.md")] +#![doc( + html_logo_url = "https://raw.githubusercontent.com/alloy-rs/core/main/assets/alloy.jpg", + html_favicon_url = "https://raw.githubusercontent.com/alloy-rs/core/main/assets/favicon.ico" +)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] +#![cfg_attr(not(any(test, feature = "std")), no_std)] + mod receipt; pub use receipt::{ScrollTransactionReceipt, ScrollTransactionReceiptFields}; diff --git a/crates/scroll/alloy/rpc-types/src/receipt.rs b/crates/scroll/alloy/rpc-types/src/receipt.rs index 4bf286d06d2a..4b766c1a5846 100644 --- a/crates/scroll/alloy/rpc-types/src/receipt.rs +++ b/crates/scroll/alloy/rpc-types/src/receipt.rs @@ -149,7 +149,7 @@ impl From for ScrollReceiptEnvelope #[test] diff --git a/crates/scroll/alloy/rpc-types/src/transaction.rs b/crates/scroll/alloy/rpc-types/src/transaction.rs index 905ce98530a4..b1c9cbf189ca 100644 --- a/crates/scroll/alloy/rpc-types/src/transaction.rs +++ b/crates/scroll/alloy/rpc-types/src/transaction.rs @@ -131,11 +131,9 @@ impl alloy_network_primitives::TransactionResponse for Transaction { /// Scroll specific transaction fields #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)] -#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] #[serde(rename_all = "camelCase")] pub struct ScrollL1MessageTransactionFields { /// The index of the transaction in the message queue. - #[cfg_attr(feature = "serde", serde(with = "alloy_serde::quantity"))] pub queue_index: u64, /// The sender of the transaction on the L1. pub sender: Address, diff --git a/crates/scroll/rpc/src/eth/mod.rs b/crates/scroll/rpc/src/eth/mod.rs index 3fb94cc53838..ca1d734820c8 100644 --- a/crates/scroll/rpc/src/eth/mod.rs +++ b/crates/scroll/rpc/src/eth/mod.rs @@ -40,7 +40,7 @@ pub type EthApiNodeBackend = EthApiInner< /// /// This wraps a default `Eth` implementation, and provides additional functionality where the /// scroll spec deviates from the default (ethereum) spec, e.g. transaction forwarding to the -/// sequencer, receipts, additional RPC fields for transaction receipts. +/// receipts, additional RPC fields for transaction receipts. /// /// This type implements the [`FullEthApi`](reth_rpc_eth_api::helpers::FullEthApi) by implemented /// all the `Eth` helper traits and prerequisite traits. @@ -49,9 +49,6 @@ pub struct ScrollEthApi { /// Gateway to node's core components. #[deref] inner: Arc>, - /// Sequencer client, configured to forward submitted transactions to sequencer of given Scroll - /// network. - sequencer_client: Option, } impl ScrollEthApi @@ -65,7 +62,7 @@ where >, { /// Creates a new instance for given context. - pub fn new(ctx: &EthApiBuilderCtx, sequencer_http: Option) -> Self { + pub fn new(ctx: &EthApiBuilderCtx) -> Self { let blocking_task_pool = BlockingTaskPool::build().expect("failed to build blocking task pool"); @@ -85,7 +82,7 @@ where ctx.config.proof_permits, ); - Self { inner: Arc::new(inner), sequencer_client: sequencer_http.map(SequencerClient::new) } + Self { inner: Arc::new(inner) } } } diff --git a/crates/scroll/rpc/src/lib.rs b/crates/scroll/rpc/src/lib.rs index 86f3e4feeecc..6b953302572f 100644 --- a/crates/scroll/rpc/src/lib.rs +++ b/crates/scroll/rpc/src/lib.rs @@ -13,9 +13,6 @@ pub mod error; pub mod eth; -pub mod sequencer; -pub mod witness; pub use error::{ScrollEthApiError, ScrollInvalidTransactionError, SequencerClientError}; pub use eth::ScrollEthApi; -pub use sequencer::SequencerClient; From 1b1525b8365a6fae2a2c5e66b586dbbc510d1a6c Mon Sep 17 00:00:00 2001 From: georgehao Date: Fri, 20 Dec 2024 15:59:01 +0800 Subject: [PATCH 05/86] fix ci --- Cargo.lock | 1 + .../consensus/src/transaction/envelope.rs | 51 +++-- crates/scroll/alloy/network/Cargo.toml | 3 +- crates/scroll/alloy/network/src/lib.rs | 199 +++++++++++++++++- .../rpc-types/src/transaction/request.rs | 2 + 5 files changed, 225 insertions(+), 31 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6e673cee8c16..ef33441bda8a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10447,6 +10447,7 @@ dependencies = [ "alloy-network", "alloy-primitives", "alloy-rpc-types-eth", + "alloy-signer", "scroll-alloy-consensus", "scroll-alloy-rpc-types", ] diff --git a/crates/scroll/alloy/consensus/src/transaction/envelope.rs b/crates/scroll/alloy/consensus/src/transaction/envelope.rs index 44c9c1c77bb4..580c0a08c7ad 100644 --- a/crates/scroll/alloy/consensus/src/transaction/envelope.rs +++ b/crates/scroll/alloy/consensus/src/transaction/envelope.rs @@ -30,7 +30,6 @@ use crate::{ScrollTxType, TxL1Message}; )] #[cfg_attr(all(any(test, feature = "arbitrary"), feature = "k256"), derive(arbitrary::Arbitrary))] #[non_exhaustive] - pub enum ScrollTxEnvelope { /// An untagged [`TxLegacy`]. Legacy(Signed), @@ -145,21 +144,12 @@ impl Transaction for ScrollTxEnvelope { } } - fn effective_gas_price(&self, base_fee: Option) -> u128 { - match self { - Self::Legacy(tx) => tx.tx().effective_gas_price(base_fee), - Self::Eip2930(tx) => tx.tx().effective_gas_price(base_fee), - Self::Eip1559(tx) => tx.tx().effective_gas_price(base_fee), - Self::L1Message(tx) => tx.effective_gas_price(base_fee), - } - } - - fn is_dynamic_fee(&self) -> bool { + fn to(&self) -> Option
{ match self { - Self::Legacy(tx) => tx.tx().is_dynamic_fee(), - Self::Eip2930(tx) => tx.tx().is_dynamic_fee(), - Self::Eip1559(tx) => tx.tx().is_dynamic_fee(), - Self::L1Message(tx) => tx.is_dynamic_fee(), + Self::Legacy(tx) => tx.tx().to(), + Self::Eip2930(tx) => tx.tx().to(), + Self::Eip1559(tx) => tx.tx().to(), + Self::L1Message(tx) => tx.to(), } } @@ -172,15 +162,6 @@ impl Transaction for ScrollTxEnvelope { } } - fn to(&self) -> Option
{ - match self { - Self::Legacy(tx) => tx.tx().to(), - Self::Eip2930(tx) => tx.tx().to(), - Self::Eip1559(tx) => tx.tx().to(), - Self::L1Message(tx) => tx.to(), - } - } - fn value(&self) -> U256 { match self { Self::Legacy(tx) => tx.tx().value(), @@ -234,6 +215,24 @@ impl Transaction for ScrollTxEnvelope { Self::L1Message(tx) => tx.authorization_list(), } } + + fn is_dynamic_fee(&self) -> bool { + match self { + Self::Legacy(tx) => tx.tx().is_dynamic_fee(), + Self::Eip2930(tx) => tx.tx().is_dynamic_fee(), + Self::Eip1559(tx) => tx.tx().is_dynamic_fee(), + Self::L1Message(tx) => tx.is_dynamic_fee(), + } + } + + fn effective_gas_price(&self, base_fee: Option) -> u128 { + match self { + Self::Legacy(tx) => tx.tx().effective_gas_price(base_fee), + Self::Eip2930(tx) => tx.tx().effective_gas_price(base_fee), + Self::Eip1559(tx) => tx.tx().effective_gas_price(base_fee), + Self::L1Message(tx) => tx.effective_gas_price(base_fee), + } + } } impl ScrollTxEnvelope { @@ -285,7 +284,7 @@ impl ScrollTxEnvelope { } } - /// Returns the [`TxDeposit`] variant if the transaction is a deposit transaction. + /// Returns the [`TxL1Message`] variant if the transaction is a deposit transaction. pub const fn as_l1_message(&self) -> Option<&Sealed> { match self { Self::L1Message(tx) => Some(tx), @@ -293,7 +292,7 @@ impl ScrollTxEnvelope { } } - /// Return the [`OpTxType`] of the inner txn. + /// Return the [`ScrollTxType`] of the inner txn. pub const fn tx_type(&self) -> ScrollTxType { match self { Self::Legacy(_) => ScrollTxType::Legacy, diff --git a/crates/scroll/alloy/network/Cargo.toml b/crates/scroll/alloy/network/Cargo.toml index 5ec40b0ec0a7..7e70c89caf92 100644 --- a/crates/scroll/alloy/network/Cargo.toml +++ b/crates/scroll/alloy/network/Cargo.toml @@ -19,4 +19,5 @@ scroll-alloy-rpc-types.workspace = true alloy-consensus.workspace = true alloy-network.workspace = true alloy-primitives.workspace = true -alloy-rpc-types-eth.workspace = true \ No newline at end of file +alloy-rpc-types-eth.workspace = true +alloy-signer = { workspace = true, version = "0.6.4", default-features = false } \ No newline at end of file diff --git a/crates/scroll/alloy/network/src/lib.rs b/crates/scroll/alloy/network/src/lib.rs index 681586c5db3d..dca12c5bc4f6 100644 --- a/crates/scroll/alloy/network/src/lib.rs +++ b/crates/scroll/alloy/network/src/lib.rs @@ -2,10 +2,12 @@ #![cfg_attr(not(test), warn(unused_crate_dependencies))] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] +use alloy_consensus::{TxEnvelope, TxType, TypedTransaction}; pub use alloy_network::*; - -use scroll_alloy_consensus::{self, ScrollTxType}; -use scroll_alloy_rpc_types; +use alloy_primitives::{Address, Bytes, ChainId, TxKind, U256}; +use alloy_rpc_types_eth::AccessList; +use scroll_alloy_consensus::{self, ScrollTxEnvelope, ScrollTxType, ScrollTypedTransaction}; +use scroll_alloy_rpc_types::ScrollTransactionRequest; /// Types for an Op-stack network. #[derive(Clone, Copy, Debug)] @@ -20,7 +22,7 @@ impl Network for Scroll { type UnsignedTx = scroll_alloy_consensus::ScrollTypedTransaction; - type ReceiptEnvelope = scroll_alloy_consensus::ScrollTxEnvelope; + type ReceiptEnvelope = scroll_alloy_consensus::ScrollReceiptEnvelope; type Header = alloy_consensus::Header; @@ -35,3 +37,192 @@ impl Network for Scroll { type BlockResponse = alloy_rpc_types_eth::Block; } + +impl TransactionBuilder for ScrollTransactionRequest { + fn chain_id(&self) -> Option { + self.as_ref().chain_id() + } + + fn set_chain_id(&mut self, chain_id: ChainId) { + self.as_mut().set_chain_id(chain_id); + } + + fn nonce(&self) -> Option { + self.as_ref().nonce() + } + + fn set_nonce(&mut self, nonce: u64) { + self.as_mut().set_nonce(nonce); + } + + fn input(&self) -> Option<&Bytes> { + self.as_ref().input() + } + + fn set_input>(&mut self, input: T) { + self.as_mut().set_input(input); + } + + fn from(&self) -> Option
{ + self.as_ref().from() + } + + fn set_from(&mut self, from: Address) { + self.as_mut().set_from(from); + } + + fn kind(&self) -> Option { + self.as_ref().kind() + } + + fn clear_kind(&mut self) { + self.as_mut().clear_kind(); + } + + fn set_kind(&mut self, kind: TxKind) { + self.as_mut().set_kind(kind); + } + + fn value(&self) -> Option { + self.as_ref().value() + } + + fn set_value(&mut self, value: U256) { + self.as_mut().set_value(value); + } + + fn gas_price(&self) -> Option { + self.as_ref().gas_price() + } + + fn set_gas_price(&mut self, gas_price: u128) { + self.as_mut().set_gas_price(gas_price); + } + + fn max_fee_per_gas(&self) -> Option { + self.as_ref().max_fee_per_gas() + } + + fn set_max_fee_per_gas(&mut self, max_fee_per_gas: u128) { + self.as_mut().set_max_fee_per_gas(max_fee_per_gas); + } + + fn max_priority_fee_per_gas(&self) -> Option { + self.as_ref().max_priority_fee_per_gas() + } + + fn set_max_priority_fee_per_gas(&mut self, max_priority_fee_per_gas: u128) { + self.as_mut().set_max_priority_fee_per_gas(max_priority_fee_per_gas); + } + + fn gas_limit(&self) -> Option { + self.as_ref().gas_limit() + } + + fn set_gas_limit(&mut self, gas_limit: u64) { + self.as_mut().set_gas_limit(gas_limit); + } + + fn access_list(&self) -> Option<&AccessList> { + self.as_ref().access_list() + } + + fn set_access_list(&mut self, access_list: AccessList) { + self.as_mut().set_access_list(access_list); + } + + fn complete_type(&self, ty: ScrollTxType) -> Result<(), Vec<&'static str>> { + match ty { + ScrollTxType::L1Message => Err(vec!["not implemented for deposit tx"]), + _ => { + let ty = TxType::try_from(ty as u8).unwrap(); + self.as_ref().complete_type(ty) + } + } + } + + fn can_submit(&self) -> bool { + self.as_ref().can_submit() + } + + fn can_build(&self) -> bool { + self.as_ref().can_build() + } + + #[doc(alias = "output_transaction_type")] + fn output_tx_type(&self) -> ScrollTxType { + match self.as_ref().preferred_type() { + TxType::Eip1559 | TxType::Eip4844 => ScrollTxType::Eip1559, + TxType::Eip2930 => ScrollTxType::Eip2930, + TxType::Legacy => ScrollTxType::Legacy, + TxType::Eip7702 => unimplemented!(), + } + } + + #[doc(alias = "output_transaction_type_checked")] + fn output_tx_type_checked(&self) -> Option { + self.as_ref().buildable_type().map(|tx_ty| match tx_ty { + TxType::Eip1559 | TxType::Eip4844 => ScrollTxType::Eip1559, + TxType::Eip2930 => ScrollTxType::Eip2930, + TxType::Legacy => ScrollTxType::Legacy, + TxType::Eip7702 => unimplemented!(), + }) + } + + fn prep_for_submission(&mut self) { + self.as_mut().prep_for_submission(); + } + + fn build_unsigned(self) -> BuildResult { + if let Err((tx_type, missing)) = self.as_ref().missing_keys() { + let tx_type = ScrollTxType::try_from(tx_type as u8).unwrap(); + return Err(TransactionBuilderError::InvalidTransactionRequest(tx_type, missing) + .into_unbuilt(self)); + } + Ok(self.build_typed_tx().expect("checked by missing_keys")) + } + + async fn build>( + self, + wallet: &W, + ) -> Result<::TxEnvelope, TransactionBuilderError> { + Ok(wallet.sign_request(self).await?) + } +} + +impl NetworkWallet for EthereumWallet { + fn default_signer_address(&self) -> Address { + NetworkWallet::::default_signer_address(self) + } + + fn has_signer_for(&self, address: &Address) -> bool { + NetworkWallet::::has_signer_for(self, address) + } + + fn signer_addresses(&self) -> impl Iterator { + NetworkWallet::::signer_addresses(self) + } + + async fn sign_transaction_from( + &self, + sender: Address, + tx: ScrollTypedTransaction, + ) -> alloy_signer::Result { + let tx = match tx { + ScrollTypedTransaction::Legacy(tx) => TypedTransaction::Legacy(tx), + ScrollTypedTransaction::Eip2930(tx) => TypedTransaction::Eip2930(tx), + ScrollTypedTransaction::Eip1559(tx) => TypedTransaction::Eip1559(tx), + ScrollTypedTransaction::L1Message(_) => { + return Err(alloy_signer::Error::other("not implemented for deposit tx")) + } + }; + let tx = NetworkWallet::::sign_transaction_from(self, sender, tx).await?; + + Ok(match tx { + TxEnvelope::Eip1559(tx) => ScrollTxEnvelope::Eip1559(tx), + TxEnvelope::Eip2930(tx) => ScrollTxEnvelope::Eip2930(tx), + TxEnvelope::Legacy(tx) => ScrollTxEnvelope::Legacy(tx), + _ => unreachable!(), + }) + } +} diff --git a/crates/scroll/alloy/rpc-types/src/transaction/request.rs b/crates/scroll/alloy/rpc-types/src/transaction/request.rs index 616855760d89..b3f164c277b1 100644 --- a/crates/scroll/alloy/rpc-types/src/transaction/request.rs +++ b/crates/scroll/alloy/rpc-types/src/transaction/request.rs @@ -1,6 +1,8 @@ use alloy_consensus::{ Sealed, SignableTransaction, Signed, TxEip1559, TxEip4844, TypedTransaction, }; +use alloy_eips::eip7702::SignedAuthorization; +use alloy_network_primitives::TransactionBuilder7702; use alloy_primitives::{Address, PrimitiveSignature as Signature, TxKind, U256}; use alloy_rpc_types_eth::{AccessList, TransactionInput, TransactionRequest}; use serde::{Deserialize, Serialize}; From 66f6d78784db26abe86e22494a9fb8ee48150e20 Mon Sep 17 00:00:00 2001 From: georgehao Date: Fri, 20 Dec 2024 16:03:43 +0800 Subject: [PATCH 06/86] fix lint --- crates/scroll/alloy/consensus/src/transaction/l1_message.rs | 2 +- crates/scroll/alloy/network/Cargo.toml | 2 +- crates/scroll/alloy/rpc-types/src/transaction/request.rs | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/crates/scroll/alloy/consensus/src/transaction/l1_message.rs b/crates/scroll/alloy/consensus/src/transaction/l1_message.rs index da715f5cd69d..9a3067e9f356 100644 --- a/crates/scroll/alloy/consensus/src/transaction/l1_message.rs +++ b/crates/scroll/alloy/consensus/src/transaction/l1_message.rs @@ -425,7 +425,7 @@ pub(super) mod serde_bincode_compat { #[serde_as] #[derive(Debug, PartialEq, Eq, Serialize, Deserialize)] struct Data { - #[serde_as(as = "serde_bincode_compat::TxDeposit")] + #[serde_as(as = "serde_bincode_compat::TxL1Message")] transaction: TxL1Message, } diff --git a/crates/scroll/alloy/network/Cargo.toml b/crates/scroll/alloy/network/Cargo.toml index 7e70c89caf92..b4acc6956109 100644 --- a/crates/scroll/alloy/network/Cargo.toml +++ b/crates/scroll/alloy/network/Cargo.toml @@ -20,4 +20,4 @@ alloy-consensus.workspace = true alloy-network.workspace = true alloy-primitives.workspace = true alloy-rpc-types-eth.workspace = true -alloy-signer = { workspace = true, version = "0.6.4", default-features = false } \ No newline at end of file +alloy-signer.workspace = true \ No newline at end of file diff --git a/crates/scroll/alloy/rpc-types/src/transaction/request.rs b/crates/scroll/alloy/rpc-types/src/transaction/request.rs index b3f164c277b1..616855760d89 100644 --- a/crates/scroll/alloy/rpc-types/src/transaction/request.rs +++ b/crates/scroll/alloy/rpc-types/src/transaction/request.rs @@ -1,8 +1,6 @@ use alloy_consensus::{ Sealed, SignableTransaction, Signed, TxEip1559, TxEip4844, TypedTransaction, }; -use alloy_eips::eip7702::SignedAuthorization; -use alloy_network_primitives::TransactionBuilder7702; use alloy_primitives::{Address, PrimitiveSignature as Signature, TxKind, U256}; use alloy_rpc_types_eth::{AccessList, TransactionInput, TransactionRequest}; use serde::{Deserialize, Serialize}; From a0e7e6bbaed2b59a65684ab04786e37655301c18 Mon Sep 17 00:00:00 2001 From: georgehao Date: Sat, 21 Dec 2024 00:10:40 +0800 Subject: [PATCH 07/86] fix transation unit --- .../consensus/src/transaction/l1_message.rs | 18 ++++ crates/scroll/alloy/rpc-types/Cargo.toml | 100 +++++++++++++++--- .../scroll/alloy/rpc-types/src/transaction.rs | 50 ++++----- .../rpc-types/src/transaction/request.rs | 3 +- 4 files changed, 123 insertions(+), 48 deletions(-) diff --git a/crates/scroll/alloy/consensus/src/transaction/l1_message.rs b/crates/scroll/alloy/consensus/src/transaction/l1_message.rs index 9a3067e9f356..f1078851257d 100644 --- a/crates/scroll/alloy/consensus/src/transaction/l1_message.rs +++ b/crates/scroll/alloy/consensus/src/transaction/l1_message.rs @@ -27,6 +27,8 @@ const L1_MESSAGE_TRANSACTION_TYPE: u8 = 126; #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] #[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] pub struct TxL1Message { + /// The L1 sender of the transaction. + pub from: Address, /// The queue index of the message in the L1 contract queue. #[cfg_attr(feature = "serde", serde(with = "alloy_serde::quantity"))] pub queue_index: u64, @@ -42,6 +44,8 @@ pub struct TxL1Message { pub sender: Address, /// The input of the transaction. pub input: Bytes, + /// The nonce of the transaction. + pub nonce: U256, } impl TxL1Message { @@ -63,12 +67,14 @@ impl TxL1Message { /// - `sender` pub fn rlp_decode_fields(buf: &mut &[u8]) -> alloy_rlp::Result { Ok(Self { + from: Decodable::decode(buf)?, queue_index: Decodable::decode(buf)?, gas_limit: Decodable::decode(buf)?, to: Decodable::decode(buf)?, value: Decodable::decode(buf)?, input: Decodable::decode(buf)?, sender: Decodable::decode(buf)?, + nonce: Decodable::decode(buf)?, }) } @@ -295,12 +301,14 @@ mod tests { #[test] fn test_encode_decode_fields() { let original = TxL1Message { + from: Address::default(), queue_index: 0, gas_limit: 0, to: Address::default(), value: U256::default(), sender: Address::default(), input: Bytes::default(), + nonce: U256::default(), }; let mut buffer = BytesMut::new(); @@ -313,12 +321,14 @@ mod tests { #[test] fn test_encode_with_and_without_header() { let tx_deposit = TxL1Message { + from: Address::default(), queue_index: 0, gas_limit: 50000, to: Address::default(), value: U256::default(), sender: Address::default(), input: Bytes::default(), + nonce: U256::default(), }; let mut buffer_with_header = BytesMut::new(); @@ -333,12 +343,14 @@ mod tests { #[test] fn test_payload_length() { let tx_deposit = TxL1Message { + from: Address::default(), queue_index: 0, gas_limit: 50000, to: Address::default(), value: U256::default(), sender: Address::default(), input: Bytes::default(), + nonce: U256::default(), }; assert!(tx_deposit.size() > tx_deposit.rlp_encoded_fields_length()); @@ -357,6 +369,7 @@ pub(super) mod serde_bincode_compat { /// Bincode-compatible [`super::TxL1Message`] serde implementation. #[derive(Debug, Serialize, Deserialize)] pub struct TxL1Message<'a> { + from: Address, #[serde(default)] queue_index: u64, #[serde(default)] @@ -365,17 +378,20 @@ pub(super) mod serde_bincode_compat { value: U256, sender: Address, input: Cow<'a, Bytes>, + nonce: U256, } impl<'a> From<&'a super::TxL1Message> for TxL1Message<'a> { fn from(value: &'a super::TxL1Message) -> Self { Self { + from: value.from, queue_index: value.queue_index, gas_limit: value.gas_limit, to: value.to, value: value.value, sender: value.sender, input: Cow::Borrowed(&value.input), + nonce: value.nonce, } } } @@ -383,12 +399,14 @@ pub(super) mod serde_bincode_compat { impl<'a> From> for super::TxL1Message { fn from(value: TxL1Message<'a>) -> Self { Self { + from: Address::default(), queue_index: value.queue_index, gas_limit: value.gas_limit, to: value.to, value: value.value, sender: value.sender, input: value.input.into_owned(), + nonce: value.nonce, } } } diff --git a/crates/scroll/alloy/rpc-types/Cargo.toml b/crates/scroll/alloy/rpc-types/Cargo.toml index 1f5b4b4f27da..d351f70bb82e 100644 --- a/crates/scroll/alloy/rpc-types/Cargo.toml +++ b/crates/scroll/alloy/rpc-types/Cargo.toml @@ -11,28 +11,97 @@ exclude.workspace = true [dev-dependencies] similar-asserts = "1.6" -[dependencies] -scroll-alloy-consensus = { workspace = true, features = ["serde"] } - -alloy-network-primitives = { version = "0.6.4", default-features = true } -alloy-rpc-types-eth = { version = "0.6.4", features = ["serde"], default-features = false } -alloy-primitives = { version = "0.8.12", features = ["map", "rlp", "serde"], default-features = false } -alloy-consensus = { version = "0.6.4", features = ["arbitrary"], default-features = false } -alloy-eips = { version = "0.6.4", features = ["serde"], default-features = false } -alloy-serde = { version = "0.6.4", default-features = false } -derive_more = { version = "1.0", default-features = false } -serde = { version = "1.0", features = ["derive", "alloc", "derive"], default-features = false } -serde_json = { version = "1.0", features = ["alloc"], default-features = false } -arbitrary = { version = "1.3", features = ["derive", "derive"], optional = true } +[dependencies.scroll-alloy-consensus] +workspace = true +features = ["serde"] + +[dependencies.alloy-consensus] +version = "0.6.4" +default-features = false + +[dependencies.alloy-eips] +version = "0.6.4" +features = ["serde"] +default-features = false + +[dependencies.alloy-network-primitives] +version = "0.6.4" +default-features = false + +[dependencies.alloy-primitives] +version = "0.8.12" +features = [ + "map", + "rlp", + "serde", +] +default-features = false + +[dependencies.alloy-rpc-types-eth] +version = "0.6.4" +features = ["serde"] +default-features = false + +[dependencies.alloy-serde] +version = "0.6.4" +default-features = false + +[dependencies.arbitrary] +version = "1.3" +features = [ + "derive", + "derive", +] +optional = true + +[dependencies.derive_more] +version = "1.0" +default-features = false + +[dependencies.serde] +version = "1.0" +features = [ + "derive", + "alloc", + "derive", +] +default-features = false + +[dependencies.serde_json] +version = "1.0" +features = ["alloc"] +default-features = false + +[dev-dependencies.alloy-consensus] +version = "0.6.4" +features = ["arbitrary"] +default-features = false + +[dev-dependencies.alloy-primitives] +version = "0.8.12" +features = ["arbitrary"] +default-features = false + +[dev-dependencies.alloy-rpc-types-eth] +version = "0.6.4" +features = ["arbitrary"] +default-features = false + +[dev-dependencies.arbitrary] +version = "1.3" +features = [ + "derive", + "derive", +] [features] -default = ["std"] arbitrary = [ "std", "dep:arbitrary", "alloy-primitives/arbitrary", "alloy-rpc-types-eth/arbitrary", ] +default = ["std"] k256 = [ "alloy-rpc-types-eth/k256", ] @@ -42,6 +111,7 @@ std = [ "alloy-primitives/std", "alloy-rpc-types-eth/std", ] + [lints.clippy] missing-const-for-fn = "warn" option-if-let-else = "warn" @@ -61,4 +131,4 @@ unreachable-pub = "warn" unused-must-use = "deny" [lints.rustdoc] -all = "warn" \ No newline at end of file +all = "warn" diff --git a/crates/scroll/alloy/rpc-types/src/transaction.rs b/crates/scroll/alloy/rpc-types/src/transaction.rs index b1c9cbf189ca..7a80bed243a4 100644 --- a/crates/scroll/alloy/rpc-types/src/transaction.rs +++ b/crates/scroll/alloy/rpc-types/src/transaction.rs @@ -22,11 +22,11 @@ pub struct Transaction { #[deref_mut] pub inner: alloy_rpc_types_eth::Transaction, - /// Nonce for deposit transactions. Only present in RPC responses. - pub deposit_nonce: Option, + /// sender for deposit transactions. Only present in RPC responses. + pub sender: Option
, - /// Deposit receipt version for deposit transactions post-canyon - pub deposit_receipt_version: Option, + /// queue index for deposit transactions + pub queue_index: Option, } impl alloy_consensus::Transaction for Transaction { @@ -175,13 +175,10 @@ mod tx_serde { with = "alloy_serde::quantity::opt" )] effective_gas_price: Option, - #[serde( - default, - rename = "nonce", - skip_serializing_if = "Option::is_none", - with = "alloy_serde::quantity::opt" - )] - deposit_nonce: Option, + #[serde(default, rename = "queueIndex", skip_serializing_if = "Option::is_none")] + queue_index: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + sender: Option
, } #[derive(Serialize, Deserialize)] @@ -195,13 +192,6 @@ mod tx_serde { block_number: Option, #[serde(default, with = "alloy_serde::quantity::opt")] transaction_index: Option, - #[serde( - default, - skip_serializing_if = "Option::is_none", - with = "alloy_serde::quantity::opt" - )] - deposit_receipt_version: Option, - #[serde(flatten)] other: OptionalFields, } @@ -218,13 +208,14 @@ mod tx_serde { effective_gas_price, from, }, - deposit_receipt_version, - deposit_nonce, + queue_index, + .. } = value; // if inner transaction is a deposit, then don't serialize `from` directly let from = if matches!(inner, ScrollTxEnvelope::L1Message(_)) { None } else { Some(from) }; + let sender = from; // if inner transaction has its own `gasPrice` don't serialize it in this struct. let effective_gas_price = effective_gas_price.filter(|_| inner.gas_price().is_none()); @@ -234,8 +225,7 @@ mod tx_serde { block_hash, block_number, transaction_index, - deposit_receipt_version, - other: OptionalFields { from, effective_gas_price, deposit_nonce }, + other: OptionalFields { from, effective_gas_price, queue_index, sender }, } } } @@ -249,7 +239,6 @@ mod tx_serde { block_hash, block_number, transaction_index, - deposit_receipt_version, other, } = value; @@ -263,10 +252,6 @@ mod tx_serde { return Err(serde_json::Error::custom("missing `from` field")); }; - // Only serialize deposit_nonce if inner transaction is l1_message to avoid duplicated - // keys - let deposit_nonce = other.deposit_nonce.filter(|_| inner.is_l1_message()); - let effective_gas_price = other.effective_gas_price.or(inner.gas_price()); Ok(Self { @@ -278,8 +263,8 @@ mod tx_serde { from, effective_gas_price, }, - deposit_receipt_version, - deposit_nonce, + sender: other.sender, + queue_index: other.queue_index, }) } } @@ -288,12 +273,13 @@ mod tx_serde { #[cfg(test)] mod tests { use super::*; + use alloy_primitives::U256; #[test] fn can_deserialize_deposit() { // cast rpc eth_getTransactionByHash - // 0xbc9329afac05556497441e2b3ee4c5d4da7ca0b2a4c212c212d0739e94a24df9 --rpc-url optimism - let rpc_tx = r#"{"blockHash":"0x9d86bb313ebeedf4f9f82bf8a19b426be656a365648a7c089b618771311db9f9","blockNumber":"0x798ad0b","hash":"0xbc9329afac05556497441e2b3ee4c5d4da7ca0b2a4c212c212d0739e94a24df9","transactionIndex":"0x0","type":"0x7e","nonce":"0x152ea95","input":"0x440a5e200000146b000f79c50000000000000003000000006725333f000000000141e287000000000000000000000000000000000000000000000000000000012439ee7e0000000000000000000000000000000000000000000000000000000063f363e973e96e7145ff001c81b9562cba7b6104eeb12a2bc4ab9f07c27d45cd81a986620000000000000000000000006887246668a3b87f54deb3b94ba47a6f63f32985","mint":"0x0","sourceHash":"0x04e9a69416471ead93b02f0c279ab11ca0b635db5c1726a56faf22623bafde52","r":"0x0","s":"0x0","v":"0x0","yParity":"0x0","gas":"0xf4240","from":"0xdeaddeaddeaddeaddeaddeaddeaddeaddead0001","to":"0x4200000000000000000000000000000000000015","depositReceiptVersion":"0x1","value":"0x0","gasPrice":"0x0"}"#; + // 0x5c1c3785c8bf5d7f1cb714abd1d22e32642887215602c3a14a5e9ee105bad6aa --rpc-url https://rpc.scroll.io + let rpc_tx = r#"{"blockHash":"0x018ed80ea8340984a1f4841490284d6e51d71f9e9411feeca41e007a89fbfdff","blockNumber":"0xb81121","from":"0x7885bcbd5cecef1336b5300fb5186a12ddd8c478","gas":"0x1e8480","gasPrice":"0x0","hash":"0x5c1c3785c8bf5d7f1cb714abd1d22e32642887215602c3a14a5e9ee105bad6aa","input":"0x8ef1332e000000000000000000000000c186fa914353c44b2e33ebe05f21846f1048beda0000000000000000000000003bad7ad0728f9917d1bf08af5782dcbd516cdd96000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e7ba000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000044493a4f846ffc1507cbfe98a2b0ba1f06ea7e4eb749c001f78f6cb5540daa556a0566322a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","nonce":"0x0","to":"0x781e90f1c8fc4611c9b7497c3b47f99ef6969cbc","transactionIndex":"0x0","value":"0x0","type":"0x7e","v":"0x0","r":"0x0","s":"0x0","sender":"0x7885bcbd5cecef1336b5300fb5186a12ddd8c478","queueIndex":"0xe7ba0", "yParity":"0x0"}"#; let tx = serde_json::from_str::(rpc_tx).unwrap(); @@ -301,7 +287,7 @@ mod tests { panic!("Expected deposit transaction"); }; assert_eq!(tx.from, inner.sender); - assert_eq!(tx.deposit_nonce, Some(22211221)); + assert_eq!(tx.queue_index, Some(U256::from(0xe7ba0))); assert_eq!(tx.inner.effective_gas_price, Some(0)); let deserialized = serde_json::to_value(&tx).unwrap(); diff --git a/crates/scroll/alloy/rpc-types/src/transaction/request.rs b/crates/scroll/alloy/rpc-types/src/transaction/request.rs index 616855760d89..a02dfc73dd42 100644 --- a/crates/scroll/alloy/rpc-types/src/transaction/request.rs +++ b/crates/scroll/alloy/rpc-types/src/transaction/request.rs @@ -124,7 +124,7 @@ impl ScrollTransactionRequest { impl From for ScrollTransactionRequest { fn from(tx_l1_message: TxL1Message) -> Self { - let TxL1Message { queue_index: _, gas_limit, to: _, value, sender: from, input } = + let TxL1Message { from, queue_index: _, gas_limit, to: _, value, input, nonce, .. } = tx_l1_message; let to = TxKind::from(tx_l1_message.to); @@ -134,6 +134,7 @@ impl From for ScrollTransactionRequest { value: Some(value), gas: Some(gas_limit), input: input.into(), + nonce: Some(nonce.to()), ..Default::default() }) } From 14dac7fb3ca87fbfbebe40353ad650059be8f33c Mon Sep 17 00:00:00 2001 From: georgehao Date: Sat, 21 Dec 2024 23:13:59 +0800 Subject: [PATCH 08/86] fix receipt unit test --- crates/scroll/alloy/rpc-types/src/receipt.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/crates/scroll/alloy/rpc-types/src/receipt.rs b/crates/scroll/alloy/rpc-types/src/receipt.rs index 4b766c1a5846..142cff097752 100644 --- a/crates/scroll/alloy/rpc-types/src/receipt.rs +++ b/crates/scroll/alloy/rpc-types/src/receipt.rs @@ -159,7 +159,6 @@ mod tests { "blockNumber": "0x6cfef89", "contractAddress": null, "cumulativeGasUsed": "0xfa0d", - "depositNonce": "0x8a2d11", "effectiveGasPrice": "0x0", "from": "0xdeaddeaddeaddeaddeaddeaddeaddeaddead0001", "gasUsed": "0xfa0d", @@ -169,8 +168,7 @@ mod tests { "to": "0x4200000000000000000000000000000000000015", "transactionHash": "0xb7c74afdeb7c89fb9de2c312f49b38cb7a850ba36e064734c5223a477e83fdc9", "transactionIndex": "0x0", - "type": "0x7e", - //TODO replace with scroll receipt + "type": "0x7e" }"#; let receipt: ScrollTransactionReceipt = serde_json::from_str(s).unwrap(); From 8bcf115f8317a37988d4f1c43297bd9198c61607 Mon Sep 17 00:00:00 2001 From: georgehao Date: Sat, 21 Dec 2024 23:44:24 +0800 Subject: [PATCH 09/86] fix unit test --- crates/scroll/alloy/consensus/src/transaction/envelope.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/scroll/alloy/consensus/src/transaction/envelope.rs b/crates/scroll/alloy/consensus/src/transaction/envelope.rs index 580c0a08c7ad..b061eac41016 100644 --- a/crates/scroll/alloy/consensus/src/transaction/envelope.rs +++ b/crates/scroll/alloy/consensus/src/transaction/envelope.rs @@ -478,12 +478,14 @@ mod tests { #[test] fn test_encode_decode_l1_message() { let tx = TxL1Message { + from: Default::default(), queue_index: 1, gas_limit: 2, to: Address::left_padding_from(&[3]), sender: Address::left_padding_from(&[4]), value: U256::from(4_u64), input: Bytes::from(vec![5]), + nonce: Default::default(), }; let tx_envelope = ScrollTxEnvelope::L1Message(tx.seal_slow()); let encoded = tx_envelope.encoded_2718(); @@ -496,12 +498,14 @@ mod tests { #[cfg(feature = "serde")] fn test_serde_roundtrip_deposit() { let tx = TxL1Message { + from: Default::default(), queue_index: 11, gas_limit: u64::MAX, sender: Address::random(), to: Address::random(), value: U256::MAX, input: Bytes::new(), + nonce: Default::default(), }; let tx_envelope = ScrollTxEnvelope::L1Message(tx.seal_slow()); From e7de38e215108700cbb0ead19d44807f7bb54d95 Mon Sep 17 00:00:00 2001 From: georgehao Date: Sun, 22 Dec 2024 17:12:06 +0800 Subject: [PATCH 10/86] fix unit test --- .../consensus/src/transaction/envelope.rs | 4 --- .../consensus/src/transaction/l1_message.rs | 25 ++++--------------- 2 files changed, 5 insertions(+), 24 deletions(-) diff --git a/crates/scroll/alloy/consensus/src/transaction/envelope.rs b/crates/scroll/alloy/consensus/src/transaction/envelope.rs index b061eac41016..580c0a08c7ad 100644 --- a/crates/scroll/alloy/consensus/src/transaction/envelope.rs +++ b/crates/scroll/alloy/consensus/src/transaction/envelope.rs @@ -478,14 +478,12 @@ mod tests { #[test] fn test_encode_decode_l1_message() { let tx = TxL1Message { - from: Default::default(), queue_index: 1, gas_limit: 2, to: Address::left_padding_from(&[3]), sender: Address::left_padding_from(&[4]), value: U256::from(4_u64), input: Bytes::from(vec![5]), - nonce: Default::default(), }; let tx_envelope = ScrollTxEnvelope::L1Message(tx.seal_slow()); let encoded = tx_envelope.encoded_2718(); @@ -498,14 +496,12 @@ mod tests { #[cfg(feature = "serde")] fn test_serde_roundtrip_deposit() { let tx = TxL1Message { - from: Default::default(), queue_index: 11, gas_limit: u64::MAX, sender: Address::random(), to: Address::random(), value: U256::MAX, input: Bytes::new(), - nonce: Default::default(), }; let tx_envelope = ScrollTxEnvelope::L1Message(tx.seal_slow()); diff --git a/crates/scroll/alloy/consensus/src/transaction/l1_message.rs b/crates/scroll/alloy/consensus/src/transaction/l1_message.rs index f1078851257d..164594739b40 100644 --- a/crates/scroll/alloy/consensus/src/transaction/l1_message.rs +++ b/crates/scroll/alloy/consensus/src/transaction/l1_message.rs @@ -27,8 +27,6 @@ const L1_MESSAGE_TRANSACTION_TYPE: u8 = 126; #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] #[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] pub struct TxL1Message { - /// The L1 sender of the transaction. - pub from: Address, /// The queue index of the message in the L1 contract queue. #[cfg_attr(feature = "serde", serde(with = "alloy_serde::quantity"))] pub queue_index: u64, @@ -44,8 +42,6 @@ pub struct TxL1Message { pub sender: Address, /// The input of the transaction. pub input: Bytes, - /// The nonce of the transaction. - pub nonce: U256, } impl TxL1Message { @@ -67,14 +63,12 @@ impl TxL1Message { /// - `sender` pub fn rlp_decode_fields(buf: &mut &[u8]) -> alloy_rlp::Result { Ok(Self { - from: Decodable::decode(buf)?, queue_index: Decodable::decode(buf)?, gas_limit: Decodable::decode(buf)?, to: Decodable::decode(buf)?, value: Decodable::decode(buf)?, input: Decodable::decode(buf)?, sender: Decodable::decode(buf)?, - nonce: Decodable::decode(buf)?, }) } @@ -291,26 +285,23 @@ mod tests { #[test] fn test_rlp_roundtrip() { - let bytes = Bytes::from_static(&hex!("7ef9015aa044bae9d41b8380d781187b426c6fe43df5fb2fb57bd4466ef6a701e1f01e015694deaddeaddeaddeaddeaddeaddeaddeaddead000194420000000000000000000000000000000000001580808408f0d18001b90104015d8eb900000000000000000000000000000000000000000000000000000000008057650000000000000000000000000000000000000000000000000000000063d96d10000000000000000000000000000000000000000000000000000000000009f35273d89754a1e0387b89520d989d3be9c37c1f32495a88faf1ea05c61121ab0d1900000000000000000000000000000000000000000000000000000000000000010000000000000000000000002d679b567db6187c0c8323fa982cfb88b74dbcc7000000000000000000000000000000000000000000000000000000000000083400000000000000000000000000000000000000000000000000000000000f4240")); + // + let bytes = Bytes::from_static(&hex!("7ef9015a830e7991831e848094781e90f1c8fc4611c9b7497c3b47f99ef6969cbc80b901248ef1332e000000000000000000000000c186fa914353c44b2e33ebe05f21846f1048beda0000000000000000000000003bad7ad0728f9917d1bf08af5782dcbd516cdd96000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e799100000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000044493a4f8411b3f3d662006b9bf68884e71f1fc0f8ea04e4cb188354738202c3e34a473b93000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000947885bcbd5cecef1336b5300fb5186a12ddd8c478")); let tx_a = TxL1Message::decode(&mut bytes[1..].as_ref()).unwrap(); let mut buf_a = BytesMut::default(); tx_a.encode(&mut buf_a); assert_eq!(&buf_a[..], &bytes[1..]); } - #[test] fn test_encode_decode_fields() { let original = TxL1Message { - from: Address::default(), - queue_index: 0, + queue_index: 100, gas_limit: 0, to: Address::default(), value: U256::default(), sender: Address::default(), input: Bytes::default(), - nonce: U256::default(), }; - let mut buffer = BytesMut::new(); original.rlp_encode_fields(&mut buffer); let decoded = TxL1Message::rlp_decode_fields(&mut &buffer[..]).expect("Failed to decode"); @@ -321,14 +312,12 @@ mod tests { #[test] fn test_encode_with_and_without_header() { let tx_deposit = TxL1Message { - from: Address::default(), queue_index: 0, gas_limit: 50000, to: Address::default(), value: U256::default(), sender: Address::default(), input: Bytes::default(), - nonce: U256::default(), }; let mut buffer_with_header = BytesMut::new(); @@ -343,14 +332,12 @@ mod tests { #[test] fn test_payload_length() { let tx_deposit = TxL1Message { - from: Address::default(), queue_index: 0, gas_limit: 50000, to: Address::default(), value: U256::default(), sender: Address::default(), input: Bytes::default(), - nonce: U256::default(), }; assert!(tx_deposit.size() > tx_deposit.rlp_encoded_fields_length()); @@ -384,14 +371,14 @@ pub(super) mod serde_bincode_compat { impl<'a> From<&'a super::TxL1Message> for TxL1Message<'a> { fn from(value: &'a super::TxL1Message) -> Self { Self { - from: value.from, + from: Default::default(), queue_index: value.queue_index, gas_limit: value.gas_limit, to: value.to, value: value.value, sender: value.sender, input: Cow::Borrowed(&value.input), - nonce: value.nonce, + nonce: Default::default(), } } } @@ -399,14 +386,12 @@ pub(super) mod serde_bincode_compat { impl<'a> From> for super::TxL1Message { fn from(value: TxL1Message<'a>) -> Self { Self { - from: Address::default(), queue_index: value.queue_index, gas_limit: value.gas_limit, to: value.to, value: value.value, sender: value.sender, input: value.input.into_owned(), - nonce: value.nonce, } } } From 1295c6b3aa4d96be03ca408353a803771568f7d3 Mon Sep 17 00:00:00 2001 From: georgehao Date: Sun, 22 Dec 2024 23:54:13 +0800 Subject: [PATCH 11/86] fix unit test --- .../alloy/consensus/src/transaction/envelope.rs | 2 +- .../alloy/consensus/src/transaction/l1_message.rs | 4 +--- crates/scroll/alloy/rpc-types/src/transaction.rs | 8 +++++--- .../alloy/rpc-types/src/transaction/request.rs | 14 ++++++-------- 4 files changed, 13 insertions(+), 15 deletions(-) diff --git a/crates/scroll/alloy/consensus/src/transaction/envelope.rs b/crates/scroll/alloy/consensus/src/transaction/envelope.rs index 580c0a08c7ad..47f5ba113c6c 100644 --- a/crates/scroll/alloy/consensus/src/transaction/envelope.rs +++ b/crates/scroll/alloy/consensus/src/transaction/envelope.rs @@ -37,7 +37,7 @@ pub enum ScrollTxEnvelope { Eip2930(Signed), /// A [`TxEip1559`] tagged with type 2. Eip1559(Signed), - /// A [`L1Message`] tagged with type [`crate::L1_MESSAGE_TX_TYPE`]. + /// A [`L1Message`] tagged with type 0x7E. L1Message(Sealed), } diff --git a/crates/scroll/alloy/consensus/src/transaction/l1_message.rs b/crates/scroll/alloy/consensus/src/transaction/l1_message.rs index 164594739b40..a1cd69e2adb8 100644 --- a/crates/scroll/alloy/consensus/src/transaction/l1_message.rs +++ b/crates/scroll/alloy/consensus/src/transaction/l1_message.rs @@ -365,20 +365,18 @@ pub(super) mod serde_bincode_compat { value: U256, sender: Address, input: Cow<'a, Bytes>, - nonce: U256, } impl<'a> From<&'a super::TxL1Message> for TxL1Message<'a> { fn from(value: &'a super::TxL1Message) -> Self { Self { - from: Default::default(), + from: value.sender, queue_index: value.queue_index, gas_limit: value.gas_limit, to: value.to, value: value.value, sender: value.sender, input: Cow::Borrowed(&value.input), - nonce: Default::default(), } } } diff --git a/crates/scroll/alloy/rpc-types/src/transaction.rs b/crates/scroll/alloy/rpc-types/src/transaction.rs index 7a80bed243a4..b5553430fe0a 100644 --- a/crates/scroll/alloy/rpc-types/src/transaction.rs +++ b/crates/scroll/alloy/rpc-types/src/transaction.rs @@ -253,8 +253,7 @@ mod tx_serde { }; let effective_gas_price = other.effective_gas_price.or(inner.gas_price()); - - Ok(Self { + let a = Self { inner: alloy_rpc_types_eth::Transaction { inner, block_hash, @@ -265,7 +264,8 @@ mod tx_serde { }, sender: other.sender, queue_index: other.queue_index, - }) + }; + Ok(a) } } } @@ -291,7 +291,9 @@ mod tests { assert_eq!(tx.inner.effective_gas_price, Some(0)); let deserialized = serde_json::to_value(&tx).unwrap(); + println!("{:?}", deserialized); let expected = serde_json::from_str::(rpc_tx).unwrap(); + println!("{:?}", expected); similar_asserts::assert_eq!(deserialized, expected); } } diff --git a/crates/scroll/alloy/rpc-types/src/transaction/request.rs b/crates/scroll/alloy/rpc-types/src/transaction/request.rs index a02dfc73dd42..295665419cc6 100644 --- a/crates/scroll/alloy/rpc-types/src/transaction/request.rs +++ b/crates/scroll/alloy/rpc-types/src/transaction/request.rs @@ -1,6 +1,8 @@ use alloy_consensus::{ Sealed, SignableTransaction, Signed, TxEip1559, TxEip4844, TypedTransaction, }; +use alloy_eips::eip7702::SignedAuthorization; +use alloy_network_primitives::TransactionBuilder7702; use alloy_primitives::{Address, PrimitiveSignature as Signature, TxKind, U256}; use alloy_rpc_types_eth::{AccessList, TransactionInput, TransactionRequest}; use serde::{Deserialize, Serialize}; @@ -124,17 +126,13 @@ impl ScrollTransactionRequest { impl From for ScrollTransactionRequest { fn from(tx_l1_message: TxL1Message) -> Self { - let TxL1Message { from, queue_index: _, gas_limit, to: _, value, input, nonce, .. } = - tx_l1_message; let to = TxKind::from(tx_l1_message.to); - Self(TransactionRequest { - from: Some(from), + from: Some(tx_l1_message.sender), to: Some(to), - value: Some(value), - gas: Some(gas_limit), - input: input.into(), - nonce: Some(nonce.to()), + value: Some(tx_l1_message.value), + gas: Some(tx_l1_message.gas_limit), + input: tx_l1_message.input.into(), ..Default::default() }) } From ea228e2fe885cb7ee740db17c4f9d53a70d3c877 Mon Sep 17 00:00:00 2001 From: georgehao Date: Sun, 22 Dec 2024 23:55:21 +0800 Subject: [PATCH 12/86] update --- crates/scroll/alloy/rpc-types/src/transaction.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/crates/scroll/alloy/rpc-types/src/transaction.rs b/crates/scroll/alloy/rpc-types/src/transaction.rs index b5553430fe0a..d11d612a1aef 100644 --- a/crates/scroll/alloy/rpc-types/src/transaction.rs +++ b/crates/scroll/alloy/rpc-types/src/transaction.rs @@ -291,9 +291,7 @@ mod tests { assert_eq!(tx.inner.effective_gas_price, Some(0)); let deserialized = serde_json::to_value(&tx).unwrap(); - println!("{:?}", deserialized); let expected = serde_json::from_str::(rpc_tx).unwrap(); - println!("{:?}", expected); similar_asserts::assert_eq!(deserialized, expected); } } From 53958fbba7c091fd6309ac195c72948117ce1cc6 Mon Sep 17 00:00:00 2001 From: georgehao Date: Mon, 23 Dec 2024 00:00:17 +0800 Subject: [PATCH 13/86] fix lint --- crates/scroll/alloy/rpc-types/src/transaction/request.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/crates/scroll/alloy/rpc-types/src/transaction/request.rs b/crates/scroll/alloy/rpc-types/src/transaction/request.rs index 295665419cc6..b3185fd263e3 100644 --- a/crates/scroll/alloy/rpc-types/src/transaction/request.rs +++ b/crates/scroll/alloy/rpc-types/src/transaction/request.rs @@ -1,8 +1,6 @@ use alloy_consensus::{ Sealed, SignableTransaction, Signed, TxEip1559, TxEip4844, TypedTransaction, }; -use alloy_eips::eip7702::SignedAuthorization; -use alloy_network_primitives::TransactionBuilder7702; use alloy_primitives::{Address, PrimitiveSignature as Signature, TxKind, U256}; use alloy_rpc_types_eth::{AccessList, TransactionInput, TransactionRequest}; use serde::{Deserialize, Serialize}; From c0a6ec9b3c44f8b7cfaedea898bde9ae4bd502c1 Mon Sep 17 00:00:00 2001 From: georgehao Date: Mon, 23 Dec 2024 00:32:33 +0800 Subject: [PATCH 14/86] fix lint --- crates/scroll/rpc/src/error.rs | 3 +-- crates/scroll/rpc/src/eth/mod.rs | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/crates/scroll/rpc/src/error.rs b/crates/scroll/rpc/src/error.rs index f85006eba20a..66c0b6fe6dfb 100644 --- a/crates/scroll/rpc/src/error.rs +++ b/crates/scroll/rpc/src/error.rs @@ -2,11 +2,10 @@ use alloy_rpc_types_eth::{error::EthRpcErrorCode, BlockError}; use jsonrpsee_types::error::INTERNAL_ERROR_CODE; -use reth_optimism_evm::OpBlockExecutionError; use reth_rpc_eth_api::AsEthApiError; use reth_rpc_eth_types::EthApiError; use reth_rpc_server_types::result::{internal_rpc_err, rpc_err}; -use revm::primitives::{InvalidTransaction, OptimismInvalidTransaction}; +use revm::primitives::InvalidTransaction; /// Scroll specific errors, that extend [`EthApiError`]. #[derive(Debug, thiserror::Error)] diff --git a/crates/scroll/rpc/src/eth/mod.rs b/crates/scroll/rpc/src/eth/mod.rs index ca1d734820c8..bf4e53fb03cc 100644 --- a/crates/scroll/rpc/src/eth/mod.rs +++ b/crates/scroll/rpc/src/eth/mod.rs @@ -4,17 +4,30 @@ use derive_more::Deref; use std::{fmt, sync::Arc}; use alloy_consensus::Header; +use alloy_primitives::U256; use reth_chainspec::{EthChainSpec, EthereumHardforks}; +use reth_evm::ConfigureEvm; +use reth_network_api::NetworkInfo; use reth_node_builder::EthApiBuilderCtx; use reth_primitives::EthPrimitives; -use reth_provider::BlockReaderIdExt; +use reth_provider::{ + BlockNumReader, BlockReader, BlockReaderIdExt, CanonStateSubscriptions, ChainSpecProvider, + EvmEnvProvider, StageCheckpointReader, StateProviderFactory, +}; use reth_rpc::eth::{core::EthApiInner, DevSigner}; -use reth_rpc_eth_api::RpcNodeCore; +use reth_rpc_eth_api::{ + helpers::{ + AddDevSigners, EthApiSpec, EthFees, EthSigner, EthState, LoadBlock, LoadFee, LoadState, + SpawnBlocking, Trace, + }, + EthApiTypes, RpcNodeCore, RpcNodeCoreExt, +}; use reth_rpc_eth_types::{EthStateCache, FeeHistoryCache, GasPriceOracle}; use reth_tasks::{ pool::{BlockingTaskGuard, BlockingTaskPool}, TaskSpawner, }; +use reth_transaction_pool::TransactionPool; use scroll_alloy_network::Scroll; From 7c4fd43b57315651f5b2ade9521fd0ce70bf33b9 Mon Sep 17 00:00:00 2001 From: georgehao Date: Mon, 23 Dec 2024 00:51:40 +0800 Subject: [PATCH 15/86] fix lint --- Cargo.lock | 2 +- crates/scroll/alloy/consensus/README.md | 2 +- .../alloy/consensus/src/transaction/envelope.rs | 2 +- crates/scroll/rpc/Cargo.toml | 2 +- crates/scroll/rpc/src/error.rs | 6 ++++-- crates/scroll/rpc/src/eth/call.rs | 2 +- crates/scroll/rpc/src/eth/pending_block.rs | 14 ++++---------- crates/scroll/rpc/src/eth/receipt.rs | 15 ++++----------- crates/scroll/rpc/src/eth/transaction.rs | 11 +++++------ 9 files changed, 22 insertions(+), 34 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c68ca9f99df4..bf496d216f32 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9450,7 +9450,7 @@ dependencies = [ "reth-rpc-eth-types", "reth-rpc-server-types", "reth-scroll-chainspec", - "reth-scroll-consensus", + "reth-scroll-evm", "reth-scroll-revm", "reth-tasks", "reth-transaction-pool", diff --git a/crates/scroll/alloy/consensus/README.md b/crates/scroll/alloy/consensus/README.md index 90b7b8631925..f65277520173 100644 --- a/crates/scroll/alloy/consensus/README.md +++ b/crates/scroll/alloy/consensus/README.md @@ -3,7 +3,7 @@ Scroll consensus interface. This crate contains constants, types, and functions for implementing Scroll EL consensus and communication. This -includes an extended `ScrollTxEnvelope` type with [deposit transactions][deposit] +includes an extended `ScrollTxEnvelope` type with deposit transactions In general a type belongs in this crate if it exists in the `alloy-consensus` crate, but was modified from the base Ethereum protocol in the OP Stack. For consensus types that are not modified by the Scroll, the `alloy-consensus` types should be used instead. diff --git a/crates/scroll/alloy/consensus/src/transaction/envelope.rs b/crates/scroll/alloy/consensus/src/transaction/envelope.rs index 47f5ba113c6c..633d1a8a2953 100644 --- a/crates/scroll/alloy/consensus/src/transaction/envelope.rs +++ b/crates/scroll/alloy/consensus/src/transaction/envelope.rs @@ -37,7 +37,7 @@ pub enum ScrollTxEnvelope { Eip2930(Signed), /// A [`TxEip1559`] tagged with type 2. Eip1559(Signed), - /// A [`L1Message`] tagged with type 0x7E. + /// A [`TxL1Message`] tagged with type 0x7E. L1Message(Sealed), } diff --git a/crates/scroll/rpc/Cargo.toml b/crates/scroll/rpc/Cargo.toml index d96fb8adadff..c484b5ad460e 100644 --- a/crates/scroll/rpc/Cargo.toml +++ b/crates/scroll/rpc/Cargo.toml @@ -32,8 +32,8 @@ reth-chainspec.workspace = true reth-scroll-chainspec.workspace = true scroll-alloy-rpc-types.workspace = true scroll-alloy-network.workspace = true -reth-scroll-consensus.workspace = true scroll-alloy-consensus.workspace = true +reth-scroll-evm.workspace = true # ethereum alloy-eips.workspace = true diff --git a/crates/scroll/rpc/src/error.rs b/crates/scroll/rpc/src/error.rs index 66c0b6fe6dfb..ee607b32d62b 100644 --- a/crates/scroll/rpc/src/error.rs +++ b/crates/scroll/rpc/src/error.rs @@ -1,12 +1,14 @@ //! RPC errors specific to Scroll. -use alloy_rpc_types_eth::{error::EthRpcErrorCode, BlockError}; +use alloy_rpc_types_eth::BlockError; use jsonrpsee_types::error::INTERNAL_ERROR_CODE; use reth_rpc_eth_api::AsEthApiError; use reth_rpc_eth_types::EthApiError; -use reth_rpc_server_types::result::{internal_rpc_err, rpc_err}; +use reth_rpc_server_types::result::internal_rpc_err; use revm::primitives::InvalidTransaction; +use reth_scroll_evm::ScrollBlockExecutionError; + /// Scroll specific errors, that extend [`EthApiError`]. #[derive(Debug, thiserror::Error)] pub enum ScrollEthApiError { diff --git a/crates/scroll/rpc/src/eth/call.rs b/crates/scroll/rpc/src/eth/call.rs index 5067d37646ed..74fb08aa0580 100644 --- a/crates/scroll/rpc/src/eth/call.rs +++ b/crates/scroll/rpc/src/eth/call.rs @@ -1,5 +1,5 @@ use alloy_consensus::Header; -use alloy_primitives::{Bytes, TxKind, U256}; +use alloy_primitives::{TxKind, U256}; use alloy_rpc_types_eth::transaction::TransactionRequest; use reth_evm::ConfigureEvm; use reth_rpc_eth_api::{ diff --git a/crates/scroll/rpc/src/eth/pending_block.rs b/crates/scroll/rpc/src/eth/pending_block.rs index 71b1d29f5dc4..d130e4cba5ff 100644 --- a/crates/scroll/rpc/src/eth/pending_block.rs +++ b/crates/scroll/rpc/src/eth/pending_block.rs @@ -1,22 +1,16 @@ //! Loads Scroll pending block for an RPC response. use alloy_consensus::Header; -use alloy_eips::BlockNumberOrTag; -use alloy_primitives::{BlockNumber, B256}; use reth_chainspec::{EthChainSpec, EthereumHardforks}; use reth_evm::ConfigureEvm; -use reth_primitives::{Receipt, SealedBlockWithSenders}; -use reth_provider::{ - BlockReader, BlockReaderIdExt, ChainSpecProvider, EvmEnvProvider, ExecutionOutcome, - ReceiptProvider, StateProviderFactory, -}; +use reth_primitives::Receipt; +use reth_provider::{BlockReaderIdExt, ChainSpecProvider, EvmEnvProvider, StateProviderFactory}; use reth_rpc_eth_api::{ helpers::{LoadPendingBlock, SpawnBlocking}, - FromEthApiError, RpcNodeCore, + RpcNodeCore, }; -use reth_rpc_eth_types::{EthApiError, PendingBlock}; +use reth_rpc_eth_types::PendingBlock; use reth_transaction_pool::TransactionPool; -use revm::primitives::BlockEnv; use crate::ScrollEthApi; diff --git a/crates/scroll/rpc/src/eth/receipt.rs b/crates/scroll/rpc/src/eth/receipt.rs index fa6fcb3633a0..390e2ed67aec 100644 --- a/crates/scroll/rpc/src/eth/receipt.rs +++ b/crates/scroll/rpc/src/eth/receipt.rs @@ -1,16 +1,14 @@ //! Loads and formats Scroll receipt RPC response. -use alloy_eips::eip2718::Encodable2718; -use alloy_rpc_types_eth::{Log, TransactionReceipt}; use reth_node_api::{FullNodeComponents, NodeTypes}; -use reth_primitives::{Receipt, TransactionMeta, TransactionSigned, TxType}; +use reth_primitives::{Receipt, TransactionMeta, TransactionSigned}; use reth_provider::{ChainSpecProvider, ReceiptProvider, TransactionsProvider}; use reth_rpc_eth_api::{helpers::LoadReceipt, FromEthApiError, RpcReceipt}; -use reth_rpc_eth_types::{receipt::build_receipt, EthApiError}; +use reth_rpc_eth_types::{receipt::build_receipt, EthApiError, EthReceiptBuilder}; use reth_scroll_chainspec::ScrollChainSpec; -use crate::{ScrollEthApi, ScrollEthApiError}; +use crate::ScrollEthApi; impl LoadReceipt for ScrollEthApi where @@ -34,17 +32,12 @@ where meta.block_hash.into(), )))?; - // todo - let l1_block_info = - reth_optimism_evm::extract_l1_info(&block.body).map_err(OpEthApiError::from)?; - - Ok(OpReceiptBuilder::new( + Ok(EthReceiptBuilder::new( &self.inner.provider().chain_spec(), &tx, meta, &receipt, &receipts, - l1_block_info, )? .build()) } diff --git a/crates/scroll/rpc/src/eth/transaction.rs b/crates/scroll/rpc/src/eth/transaction.rs index d7f24dd21ef8..3df7a7162c1f 100644 --- a/crates/scroll/rpc/src/eth/transaction.rs +++ b/crates/scroll/rpc/src/eth/transaction.rs @@ -1,17 +1,16 @@ //! Loads and formats Scroll transaction RPC response. use alloy_consensus::{Signed, Transaction as _}; -use alloy_primitives::{Bytes, Sealable, Sealed, B256}; +use alloy_primitives::{Sealable, Sealed}; use alloy_rpc_types_eth::{Transaction, TransactionInfo}; use reth_node_api::FullNodeComponents; use reth_primitives::{TransactionSigned, TransactionSignedEcRecovered}; use reth_provider::{BlockReaderIdExt, ReceiptProvider, TransactionsProvider}; use reth_rpc_eth_api::{ helpers::{EthSigner, EthTransactions, LoadTransaction, SpawnBlocking}, - FromEthApiError, FullEthApiTypes, RpcNodeCore, TransactionCompat, + FullEthApiTypes, RpcNodeCore, TransactionCompat, }; -use reth_rpc_eth_types::utils::recover_raw_transaction; -use reth_transaction_pool::{PoolTransaction, TransactionOrigin, TransactionPool}; +use reth_transaction_pool::TransactionPool; use scroll_alloy_consensus::ScrollTxEnvelope; @@ -63,7 +62,7 @@ where } reth_primitives::Transaction::Eip4844(_) => unreachable!(), reth_primitives::Transaction::Eip7702(tx) => unreachable!(), - reth_primitives::Transaction::Deposit(tx) => { + reth_primitives::Transaction::L1Message(tx) => { ScrollTxEnvelope::L1Message(tx.seal_unchecked(hash)) } }; @@ -72,7 +71,7 @@ where block_hash, block_number, index: transaction_index, base_fee, .. } = tx_info; - let effective_gas_price = if inner.is_deposit() { + let effective_gas_price = if inner.is_l1_message() { // For deposits, we must always set the `gasPrice` field to 0 in rpc // deposit tx don't have a gas price field, but serde of `Transaction` will take care of // it From 933e56dbd1a1b04ad0e0ea26dcccce0dbdcbd315 Mon Sep 17 00:00:00 2001 From: georgehao Date: Mon, 6 Jan 2025 14:25:40 +0800 Subject: [PATCH 16/86] fix clippy --- Cargo.lock | 587 ++++++++++-------- .../alloy/consensus/src/receipt/envelope.rs | 22 +- .../consensus/src/transaction/envelope.rs | 30 +- .../consensus/src/transaction/l1_message.rs | 17 +- .../alloy/consensus/src/transaction/typed.rs | 31 +- 5 files changed, 401 insertions(+), 286 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9cf7f95a3f1e..24747107538f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -119,16 +119,35 @@ dependencies = [ "strum 0.26.3", ] +[[package]] +name = "alloy-consensus" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae09ffd7c29062431dd86061deefe4e3c6f07fa0d674930095f8dcedb0baf02c" +dependencies = [ + "alloy-eips 0.6.4", + "alloy-primitives", + "alloy-rlp", + "alloy-serde 0.6.4", + "arbitrary", + "auto_impl", + "c-kzg", + "derive_more", + "k256", + "rand 0.8.5", + "serde", +] + [[package]] name = "alloy-consensus" version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e88e1edea70787c33e11197d3f32ae380f3db19e6e061e539a5bcf8184a6b326" dependencies = [ - "alloy-eips", + "alloy-eips 0.8.3", "alloy-primitives", "alloy-rlp", - "alloy-serde", + "alloy-serde 0.8.3", "alloy-trie", "arbitrary", "auto_impl", @@ -146,11 +165,11 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57b1bb53f40c0273cd1975573cd457b39213e68584e36d1401d25fd0398a1d65" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-primitives", "alloy-rlp", - "alloy-serde", + "alloy-serde 0.8.3", "serde", ] @@ -163,10 +182,10 @@ dependencies = [ "alloy-dyn-abi", "alloy-json-abi", "alloy-network", - "alloy-network-primitives", + "alloy-network-primitives 0.8.3", "alloy-primitives", "alloy-provider", - "alloy-rpc-types-eth", + "alloy-rpc-types-eth 0.8.3", "alloy-sol-types", "alloy-transport", "futures", @@ -220,6 +239,25 @@ dependencies = [ "serde_with", ] +[[package]] +name = "alloy-eips" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b6aa3961694b30ba53d41006131a2fca3bdab22e4c344e46db2c639e7c2dfdd" +dependencies = [ + "alloy-eip2930", + "alloy-eip7702", + "alloy-primitives", + "alloy-rlp", + "alloy-serde 0.6.4", + "arbitrary", + "c-kzg", + "derive_more", + "once_cell", + "serde", + "sha2 0.10.8", +] + [[package]] name = "alloy-eips" version = "0.8.3" @@ -230,7 +268,7 @@ dependencies = [ "alloy-eip7702", "alloy-primitives", "alloy-rlp", - "alloy-serde", + "alloy-serde 0.8.3", "arbitrary", "c-kzg", "derive_more", @@ -248,7 +286,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b2a4cf7b70f3495788e74ce1c765260ffe38820a2a774ff4aacb62e31ea73f9" dependencies = [ "alloy-primitives", - "alloy-serde", + "alloy-serde 0.8.3", "alloy-trie", "serde", ] @@ -285,15 +323,15 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "510cc00b318db0dfccfdd2d032411cfae64fc144aef9679409e014145d3dacc4" dependencies = [ - "alloy-consensus", + "alloy-consensus 0.8.3", "alloy-consensus-any", - "alloy-eips", + "alloy-eips 0.8.3", "alloy-json-rpc", - "alloy-network-primitives", + "alloy-network-primitives 0.8.3", "alloy-primitives", "alloy-rpc-types-any", - "alloy-rpc-types-eth", - "alloy-serde", + "alloy-rpc-types-eth 0.8.3", + "alloy-serde 0.8.3", "alloy-signer", "alloy-sol-types", "async-trait", @@ -304,16 +342,29 @@ dependencies = [ "thiserror 2.0.9", ] +[[package]] +name = "alloy-network-primitives" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df9f3e281005943944d15ee8491534a1c7b3cbf7a7de26f8c433b842b93eb5f9" +dependencies = [ + "alloy-consensus 0.6.4", + "alloy-eips 0.6.4", + "alloy-primitives", + "alloy-serde 0.6.4", + "serde", +] + [[package]] name = "alloy-network-primitives" version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9081c099e798b8a2bba2145eb82a9a146f01fc7a35e9ab6e7b43305051f97550" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-primitives", - "alloy-serde", + "alloy-serde 0.8.3", "serde", ] @@ -373,17 +424,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc2dfaddd9a30aa870a78a4e1316e3e115ec1e12e552cbc881310456b85c1f24" dependencies = [ "alloy-chains", - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-json-rpc", "alloy-network", - "alloy-network-primitives", + "alloy-network-primitives 0.8.3", "alloy-primitives", "alloy-pubsub", "alloy-rpc-client", "alloy-rpc-types-admin", "alloy-rpc-types-engine", - "alloy-rpc-types-eth", + "alloy-rpc-types-eth 0.8.3", "alloy-transport", "alloy-transport-http", "alloy-transport-ws", @@ -481,8 +532,8 @@ checksum = "3410a472ce26c457e9780f708ee6bd540b30f88f1f31fdab7a11d00bd6aa1aee" dependencies = [ "alloy-primitives", "alloy-rpc-types-engine", - "alloy-rpc-types-eth", - "alloy-serde", + "alloy-rpc-types-eth 0.8.3", + "alloy-serde 0.8.3", "serde", ] @@ -505,8 +556,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed06bd8a5fc57b352a6cbac24eec52a4760f08ae2c1eb56ac49c8ed4b02c351" dependencies = [ "alloy-primitives", - "alloy-rpc-types-eth", - "alloy-serde", + "alloy-rpc-types-eth 0.8.3", + "alloy-serde 0.8.3", "serde", ] @@ -517,8 +568,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed98e1af55a7d856bfa385f30f63d8d56be2513593655c904a8f4a7ec963aa3e" dependencies = [ "alloy-consensus-any", - "alloy-rpc-types-eth", - "alloy-serde", + "alloy-rpc-types-eth 0.8.3", + "alloy-serde 0.8.3", ] [[package]] @@ -527,7 +578,7 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c966cacae719252501d2c5f6b67beac2fd6c03ec3c5bb64d664e769737ea5651" dependencies = [ - "alloy-eips", + "alloy-eips 0.8.3", "alloy-primitives", "alloy-rpc-types-engine", "ethereum_ssz", @@ -553,11 +604,11 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03bd16fa4959255ebf4a7702df08f325e5631df5cdca07c8a8e58bdc10fe02e3" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-primitives", "alloy-rlp", - "alloy-serde", + "alloy-serde 0.8.3", "derive_more", "ethereum_ssz", "ethereum_ssz_derive", @@ -568,19 +619,39 @@ dependencies = [ "strum 0.26.3", ] +[[package]] +name = "alloy-rpc-types-eth" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8a477281940d82d29315846c7216db45b15e90bcd52309da9f54bcf7ad94a11" +dependencies = [ + "alloy-consensus 0.6.4", + "alloy-eips 0.6.4", + "alloy-network-primitives 0.6.4", + "alloy-primitives", + "alloy-rlp", + "alloy-serde 0.6.4", + "alloy-sol-types", + "arbitrary", + "derive_more", + "itertools 0.13.0", + "serde", + "serde_json", +] + [[package]] name = "alloy-rpc-types-eth" version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8737d7a6e37ca7bba9c23e9495c6534caec6760eb24abc9d5ffbaaba147818e1" dependencies = [ - "alloy-consensus", + "alloy-consensus 0.8.3", "alloy-consensus-any", - "alloy-eips", - "alloy-network-primitives", + "alloy-eips 0.8.3", + "alloy-network-primitives 0.8.3", "alloy-primitives", "alloy-rlp", - "alloy-serde", + "alloy-serde 0.8.3", "alloy-sol-types", "arbitrary", "derive_more", @@ -596,10 +667,10 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d81da8a9b3094af917a109d55617844096d22c8dbf70cde1c5a93a2bbef7c29a" dependencies = [ - "alloy-eips", + "alloy-eips 0.8.3", "alloy-primitives", - "alloy-rpc-types-eth", - "alloy-serde", + "alloy-rpc-types-eth 0.8.3", + "alloy-serde 0.8.3", "serde", "serde_json", ] @@ -611,8 +682,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "db14a83665cd28ffd01939f04c2adf0e0fd9bb648b73ca651dcaa0869dae027f" dependencies = [ "alloy-primitives", - "alloy-rpc-types-eth", - "alloy-serde", + "alloy-rpc-types-eth 0.8.3", + "alloy-serde 0.8.3", "serde", "serde_json", "thiserror 2.0.9", @@ -625,11 +696,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0a574e97dff62097d22d6cd360f898f3d069239ca0ca7bfc2e5e7b22815ec572" dependencies = [ "alloy-primitives", - "alloy-rpc-types-eth", - "alloy-serde", + "alloy-rpc-types-eth 0.8.3", + "alloy-serde 0.8.3", "serde", ] +[[package]] +name = "alloy-serde" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dfa4a7ccf15b2492bb68088692481fd6b2604ccbee1d0d6c44c21427ae4df83" +dependencies = [ + "alloy-primitives", + "arbitrary", + "serde", + "serde_json", +] + [[package]] name = "alloy-serde" version = "0.8.3" @@ -662,7 +745,7 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "47fababf5a745133490cde927d48e50267f97d3d1209b9fc9f1d1d666964d172" dependencies = [ - "alloy-consensus", + "alloy-consensus 0.8.3", "alloy-network", "alloy-primitives", "alloy-signer", @@ -2677,8 +2760,8 @@ dependencies = [ name = "ef-tests" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-primitives", "alloy-rlp", "rayon", @@ -2859,7 +2942,7 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" name = "example-beacon-api-sidecar-fetcher" version = "0.1.0" dependencies = [ - "alloy-consensus", + "alloy-consensus 0.8.3", "alloy-primitives", "alloy-rpc-types-beacon", "clap", @@ -2909,8 +2992,8 @@ dependencies = [ name = "example-custom-beacon-withdrawals" version = "0.0.0" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-sol-macro", "alloy-sol-types", "eyre", @@ -2944,7 +3027,7 @@ dependencies = [ name = "example-custom-engine-types" version = "0.0.0" dependencies = [ - "alloy-eips", + "alloy-eips 0.8.3", "alloy-genesis", "alloy-primitives", "alloy-rpc-types", @@ -2968,7 +3051,7 @@ dependencies = [ name = "example-custom-evm" version = "0.0.0" dependencies = [ - "alloy-consensus", + "alloy-consensus 0.8.3", "alloy-genesis", "alloy-primitives", "eyre", @@ -2988,9 +3071,9 @@ dependencies = [ name = "example-custom-inspector" version = "0.0.0" dependencies = [ - "alloy-eips", + "alloy-eips 0.8.3", "alloy-primitives", - "alloy-rpc-types-eth", + "alloy-rpc-types-eth 0.8.3", "clap", "futures-util", "reth", @@ -3012,7 +3095,7 @@ dependencies = [ name = "example-custom-payload-builder" version = "0.0.0" dependencies = [ - "alloy-eips", + "alloy-eips 0.8.3", "eyre", "futures-util", "reth", @@ -3048,9 +3131,9 @@ dependencies = [ name = "example-db-access" version = "0.0.0" dependencies = [ - "alloy-consensus", + "alloy-consensus 0.8.3", "alloy-primitives", - "alloy-rpc-types-eth", + "alloy-rpc-types-eth 0.8.3", "eyre", "reth-chainspec", "reth-db", @@ -3064,7 +3147,7 @@ dependencies = [ name = "example-manual-p2p" version = "0.0.0" dependencies = [ - "alloy-consensus", + "alloy-consensus 0.8.3", "eyre", "futures", "reth-chainspec", @@ -3156,7 +3239,7 @@ dependencies = [ name = "example-stateful-precompile" version = "0.0.0" dependencies = [ - "alloy-consensus", + "alloy-consensus 0.8.3", "alloy-genesis", "alloy-primitives", "eyre", @@ -5482,11 +5565,11 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c698f80ee53e56d1b60a97e9d90ad09788b516c964c9c97fb5927860b812ef0d" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-primitives", "alloy-rlp", - "alloy-serde", + "alloy-serde 0.8.3", "arbitrary", "derive_more", "serde", @@ -5500,8 +5583,8 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a023058a145333ed1760fd34d7f7605d5dd0211381690a29a66658127c8f307b" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-primitives", "alloy-sol-types", "serde", @@ -5515,10 +5598,10 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5771424687f73e70f8dbc7d1f4b404cc2fdac9b4cd14745d7f7065c3422e947" dependencies = [ - "alloy-consensus", + "alloy-consensus 0.8.3", "alloy-network", "alloy-primitives", - "alloy-rpc-types-eth", + "alloy-rpc-types-eth 0.8.3", "alloy-signer", "op-alloy-consensus", "op-alloy-rpc-types", @@ -5531,11 +5614,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "caf7cfd504c4cb5b34fe15a59ea68cbb87c3c9cbea4214d31455464505ee6434" dependencies = [ "alloc-no-stdlib", - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-primitives", "alloy-rlp", - "alloy-serde", + "alloy-serde 0.8.3", "async-trait", "brotli", "cfg-if", @@ -5554,7 +5637,7 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8a942124522a7f43d66fc0c332c77edb260c061560f02f8b45a8cc66c740164" dependencies = [ - "alloy-eips", + "alloy-eips 0.8.3", "alloy-primitives", "jsonrpsee", "op-alloy-rpc-types", @@ -5567,12 +5650,12 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5aef2128fe8979596b3a1f79a2454f3e32fd239889a03d50fe686b9a2f30a16" dependencies = [ - "alloy-consensus", - "alloy-eips", - "alloy-network-primitives", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", + "alloy-network-primitives 0.8.3", "alloy-primitives", - "alloy-rpc-types-eth", - "alloy-serde", + "alloy-rpc-types-eth 0.8.3", + "alloy-serde 0.8.3", "arbitrary", "derive_more", "op-alloy-consensus", @@ -5586,10 +5669,10 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b333b8894735ad2e5e2e3afb828a52811e75504735e19a5f9274483826d7fa99" dependencies = [ - "alloy-eips", + "alloy-eips 0.8.3", "alloy-primitives", "alloy-rpc-types-engine", - "alloy-serde", + "alloy-serde 0.8.3", "derive_more", "ethereum_ssz", "op-alloy-consensus", @@ -6569,8 +6652,8 @@ dependencies = [ name = "reth" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-primitives", "alloy-rlp", "alloy-rpc-types", @@ -6640,8 +6723,8 @@ dependencies = [ name = "reth-basic-payload-builder" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-primitives", "futures-core", "futures-util", @@ -6666,8 +6749,8 @@ dependencies = [ name = "reth-beacon-consensus" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-genesis", "alloy-primitives", "alloy-rpc-types-engine", @@ -6722,7 +6805,7 @@ dependencies = [ name = "reth-bench" version = "1.1.4" dependencies = [ - "alloy-eips", + "alloy-eips 0.8.3", "alloy-json-rpc", "alloy-primitives", "alloy-provider", @@ -6758,8 +6841,8 @@ dependencies = [ name = "reth-blockchain-tree" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-genesis", "alloy-primitives", "aquamarine", @@ -6799,8 +6882,8 @@ dependencies = [ name = "reth-blockchain-tree-api" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-primitives", "reth-consensus", "reth-execution-errors", @@ -6814,8 +6897,8 @@ dependencies = [ name = "reth-chain-state" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-primitives", "alloy-signer", "alloy-signer-local", @@ -6844,8 +6927,8 @@ name = "reth-chainspec" version = "1.1.4" dependencies = [ "alloy-chains", - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-genesis", "alloy-primitives", "alloy-rlp", @@ -6878,8 +6961,8 @@ name = "reth-cli-commands" version = "1.1.4" dependencies = [ "ahash", - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-primitives", "alloy-rlp", "arbitrary", @@ -6953,7 +7036,7 @@ dependencies = [ name = "reth-cli-util" version = "1.1.4" dependencies = [ - "alloy-eips", + "alloy-eips 0.8.3", "alloy-primitives", "cfg-if", "eyre", @@ -6971,8 +7054,8 @@ dependencies = [ name = "reth-codecs" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-genesis", "alloy-primitives", "alloy-trie", @@ -7021,8 +7104,8 @@ dependencies = [ name = "reth-consensus" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-primitives", "auto_impl", "derive_more", @@ -7034,8 +7117,8 @@ dependencies = [ name = "reth-consensus-common" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-primitives", "mockall", "rand 0.8.5", @@ -7051,12 +7134,12 @@ dependencies = [ name = "reth-consensus-debug-client" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-primitives", "alloy-provider", "alloy-rpc-types-engine", - "alloy-rpc-types-eth", + "alloy-rpc-types-eth 0.8.3", "auto_impl", "eyre", "futures", @@ -7074,7 +7157,7 @@ dependencies = [ name = "reth-db" version = "1.1.4" dependencies = [ - "alloy-consensus", + "alloy-consensus 0.8.3", "alloy-primitives", "arbitrary", "assert_matches", @@ -7116,7 +7199,7 @@ dependencies = [ name = "reth-db-api" version = "1.1.4" dependencies = [ - "alloy-consensus", + "alloy-consensus 0.8.3", "alloy-genesis", "alloy-primitives", "arbitrary", @@ -7145,7 +7228,7 @@ dependencies = [ name = "reth-db-common" version = "1.1.4" dependencies = [ - "alloy-consensus", + "alloy-consensus 0.8.3", "alloy-genesis", "alloy-primitives", "boyer-moore-magiclen", @@ -7175,7 +7258,7 @@ dependencies = [ name = "reth-db-models" version = "1.1.4" dependencies = [ - "alloy-eips", + "alloy-eips 0.8.3", "alloy-primitives", "arbitrary", "bytes", @@ -7271,8 +7354,8 @@ dependencies = [ name = "reth-downloaders" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-primitives", "alloy-rlp", "assert_matches", @@ -7310,13 +7393,13 @@ dependencies = [ name = "reth-e2e-test-utils" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-network", "alloy-primitives", "alloy-rlp", "alloy-rpc-types-engine", - "alloy-rpc-types-eth", + "alloy-rpc-types-eth 0.8.3", "alloy-signer", "alloy-signer-local", "derive_more", @@ -7388,7 +7471,7 @@ dependencies = [ name = "reth-engine-local" version = "1.1.4" dependencies = [ - "alloy-consensus", + "alloy-consensus 0.8.3", "alloy-primitives", "alloy-rpc-types-engine", "eyre", @@ -7420,7 +7503,7 @@ dependencies = [ name = "reth-engine-primitives" version = "1.1.4" dependencies = [ - "alloy-consensus", + "alloy-consensus 0.8.3", "alloy-primitives", "alloy-rpc-types-engine", "futures", @@ -7468,8 +7551,8 @@ dependencies = [ name = "reth-engine-tree" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-primitives", "alloy-rlp", "alloy-rpc-types-engine", @@ -7527,8 +7610,8 @@ dependencies = [ name = "reth-engine-util" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-primitives", "alloy-rpc-types-engine", "eyre", @@ -7574,7 +7657,7 @@ name = "reth-eth-wire" version = "1.1.4" dependencies = [ "alloy-chains", - "alloy-eips", + "alloy-eips 0.8.3", "alloy-primitives", "alloy-rlp", "arbitrary", @@ -7611,8 +7694,8 @@ name = "reth-eth-wire-types" version = "1.1.4" dependencies = [ "alloy-chains", - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-genesis", "alloy-primitives", "alloy-rlp", @@ -7646,8 +7729,8 @@ dependencies = [ name = "reth-ethereum-consensus" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-primitives", "reth-chainspec", "reth-consensus", @@ -7661,7 +7744,7 @@ dependencies = [ name = "reth-ethereum-engine-primitives" version = "1.1.4" dependencies = [ - "alloy-eips", + "alloy-eips 0.8.3", "alloy-primitives", "alloy-rlp", "alloy-rpc-types-engine", @@ -7682,7 +7765,7 @@ name = "reth-ethereum-forks" version = "1.1.4" dependencies = [ "alloy-chains", - "alloy-consensus", + "alloy-consensus 0.8.3", "alloy-primitives", "alloy-rlp", "arbitrary", @@ -7701,8 +7784,8 @@ dependencies = [ name = "reth-ethereum-payload-builder" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-primitives", "reth-basic-payload-builder", "reth-chain-state", @@ -7727,8 +7810,8 @@ dependencies = [ name = "reth-ethereum-primitives" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-primitives", "alloy-rlp", "arbitrary", @@ -7760,8 +7843,8 @@ dependencies = [ name = "reth-evm" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-primitives", "auto_impl", "futures-util", @@ -7790,8 +7873,8 @@ dependencies = [ name = "reth-evm-ethereum" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-genesis", "alloy-primitives", "alloy-sol-types", @@ -7815,7 +7898,7 @@ dependencies = [ name = "reth-execution-errors" version = "1.1.4" dependencies = [ - "alloy-eips", + "alloy-eips 0.8.3", "alloy-primitives", "alloy-rlp", "nybbles", @@ -7830,8 +7913,8 @@ dependencies = [ name = "reth-execution-types" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-primitives", "arbitrary", "bincode", @@ -7850,8 +7933,8 @@ dependencies = [ name = "reth-exex" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-genesis", "alloy-primitives", "eyre", @@ -7894,7 +7977,7 @@ dependencies = [ name = "reth-exex-test-utils" version = "1.1.4" dependencies = [ - "alloy-eips", + "alloy-eips 0.8.3", "eyre", "futures-util", "rand 0.8.5", @@ -7927,7 +8010,7 @@ dependencies = [ name = "reth-exex-types" version = "1.1.4" dependencies = [ - "alloy-eips", + "alloy-eips 0.8.3", "alloy-primitives", "arbitrary", "bincode", @@ -7953,7 +8036,7 @@ dependencies = [ name = "reth-invalid-block-hooks" version = "1.1.4" dependencies = [ - "alloy-consensus", + "alloy-consensus 0.8.3", "alloy-primitives", "alloy-rlp", "alloy-rpc-types-debug", @@ -8065,8 +8148,8 @@ dependencies = [ name = "reth-network" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-node-bindings", "alloy-primitives", "alloy-provider", @@ -8150,8 +8233,8 @@ dependencies = [ name = "reth-network-p2p" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-primitives", "auto_impl", "derive_more", @@ -8240,7 +8323,7 @@ dependencies = [ name = "reth-node-builder" version = "1.1.4" dependencies = [ - "alloy-eips", + "alloy-eips 0.8.3", "alloy-primitives", "alloy-rpc-types", "aquamarine", @@ -8304,8 +8387,8 @@ dependencies = [ name = "reth-node-core" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-primitives", "alloy-rpc-types-engine", "clap", @@ -8355,15 +8438,15 @@ dependencies = [ name = "reth-node-ethereum" version = "1.1.4" dependencies = [ - "alloy-consensus", + "alloy-consensus 0.8.3", "alloy-contract", - "alloy-eips", + "alloy-eips 0.8.3", "alloy-genesis", "alloy-primitives", "alloy-provider", "alloy-rpc-types-beacon", "alloy-rpc-types-engine", - "alloy-rpc-types-eth", + "alloy-rpc-types-eth 0.8.3", "alloy-signer", "alloy-sol-types", "eyre", @@ -8404,8 +8487,8 @@ dependencies = [ name = "reth-node-events" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-primitives", "alloy-rpc-types-engine", "futures", @@ -8462,8 +8545,8 @@ name = "reth-optimism-chainspec" version = "1.1.4" dependencies = [ "alloy-chains", - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-genesis", "alloy-primitives", "derive_more", @@ -8482,8 +8565,8 @@ dependencies = [ name = "reth-optimism-cli" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-primitives", "alloy-rlp", "clap", @@ -8533,8 +8616,8 @@ dependencies = [ name = "reth-optimism-consensus" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-primitives", "alloy-trie", "reth-chainspec", @@ -8552,8 +8635,8 @@ dependencies = [ name = "reth-optimism-evm" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-genesis", "alloy-primitives", "derive_more", @@ -8594,8 +8677,8 @@ dependencies = [ name = "reth-optimism-node" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-genesis", "alloy-network", "alloy-primitives", @@ -8649,8 +8732,8 @@ dependencies = [ name = "reth-optimism-payload-builder" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-primitives", "alloy-rlp", "alloy-rpc-types-debug", @@ -8685,8 +8768,8 @@ dependencies = [ name = "reth-optimism-primitives" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-primitives", "alloy-rlp", "arbitrary", @@ -8711,11 +8794,11 @@ dependencies = [ name = "reth-optimism-rpc" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-primitives", "alloy-rpc-types-debug", - "alloy-rpc-types-eth", + "alloy-rpc-types-eth 0.8.3", "jsonrpsee-core", "jsonrpsee-types", "op-alloy-consensus", @@ -8767,7 +8850,7 @@ dependencies = [ name = "reth-payload-builder" version = "1.1.4" dependencies = [ - "alloy-consensus", + "alloy-consensus 0.8.3", "alloy-primitives", "alloy-rpc-types", "async-trait", @@ -8802,7 +8885,7 @@ dependencies = [ name = "reth-payload-primitives" version = "1.1.4" dependencies = [ - "alloy-eips", + "alloy-eips 0.8.3", "alloy-primitives", "alloy-rpc-types-engine", "op-alloy-rpc-types-engine", @@ -8820,7 +8903,7 @@ dependencies = [ name = "reth-payload-util" version = "1.1.4" dependencies = [ - "alloy-consensus", + "alloy-consensus 0.8.3", "alloy-primitives", "reth-primitives", ] @@ -8840,14 +8923,14 @@ dependencies = [ name = "reth-primitives" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-genesis", "alloy-network", "alloy-primitives", "alloy-rlp", "alloy-rpc-types", - "alloy-serde", + "alloy-serde 0.8.3", "alloy-trie", "arbitrary", "assert_matches", @@ -8887,8 +8970,8 @@ dependencies = [ name = "reth-primitives-traits" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-genesis", "alloy-primitives", "alloy-rlp", @@ -8919,8 +9002,8 @@ dependencies = [ name = "reth-provider" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-primitives", "alloy-rpc-types-engine", "assert_matches", @@ -8970,8 +9053,8 @@ dependencies = [ name = "reth-prune" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-primitives", "assert_matches", "itertools 0.13.0", @@ -9021,8 +9104,8 @@ dependencies = [ name = "reth-revm" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-primitives", "reth-ethereum-forks", "reth-execution-errors", @@ -9040,9 +9123,9 @@ dependencies = [ name = "reth-rpc" version = "1.1.4" dependencies = [ - "alloy-consensus", + "alloy-consensus 0.8.3", "alloy-dyn-abi", - "alloy-eips", + "alloy-eips 0.8.3", "alloy-genesis", "alloy-network", "alloy-primitives", @@ -9052,11 +9135,11 @@ dependencies = [ "alloy-rpc-types-beacon", "alloy-rpc-types-debug", "alloy-rpc-types-engine", - "alloy-rpc-types-eth", + "alloy-rpc-types-eth 0.8.3", "alloy-rpc-types-mev", "alloy-rpc-types-trace", "alloy-rpc-types-txpool", - "alloy-serde", + "alloy-serde 0.8.3", "alloy-signer", "alloy-signer-local", "async-trait", @@ -9112,7 +9195,7 @@ dependencies = [ name = "reth-rpc-api" version = "1.1.4" dependencies = [ - "alloy-eips", + "alloy-eips 0.8.3", "alloy-json-rpc", "alloy-primitives", "alloy-rpc-types", @@ -9121,11 +9204,11 @@ dependencies = [ "alloy-rpc-types-beacon", "alloy-rpc-types-debug", "alloy-rpc-types-engine", - "alloy-rpc-types-eth", + "alloy-rpc-types-eth 0.8.3", "alloy-rpc-types-mev", "alloy-rpc-types-trace", "alloy-rpc-types-txpool", - "alloy-serde", + "alloy-serde 0.8.3", "jsonrpsee", "reth-engine-primitives", "reth-network-peers", @@ -9136,9 +9219,9 @@ dependencies = [ name = "reth-rpc-api-testing-util" version = "1.1.4" dependencies = [ - "alloy-eips", + "alloy-eips 0.8.3", "alloy-primitives", - "alloy-rpc-types-eth", + "alloy-rpc-types-eth 0.8.3", "alloy-rpc-types-trace", "futures", "jsonrpsee", @@ -9155,10 +9238,10 @@ dependencies = [ name = "reth-rpc-builder" version = "1.1.4" dependencies = [ - "alloy-eips", + "alloy-eips 0.8.3", "alloy-primitives", "alloy-rpc-types-engine", - "alloy-rpc-types-eth", + "alloy-rpc-types-eth 0.8.3", "alloy-rpc-types-trace", "clap", "http", @@ -9205,7 +9288,7 @@ dependencies = [ name = "reth-rpc-engine-api" version = "1.1.4" dependencies = [ - "alloy-eips", + "alloy-eips 0.8.3", "alloy-primitives", "alloy-rlp", "alloy-rpc-types-engine", @@ -9243,16 +9326,16 @@ dependencies = [ name = "reth-rpc-eth-api" version = "1.1.4" dependencies = [ - "alloy-consensus", + "alloy-consensus 0.8.3", "alloy-dyn-abi", - "alloy-eips", + "alloy-eips 0.8.3", "alloy-json-rpc", "alloy-network", "alloy-primitives", "alloy-rlp", - "alloy-rpc-types-eth", + "alloy-rpc-types-eth 0.8.3", "alloy-rpc-types-mev", - "alloy-serde", + "alloy-serde 0.8.3", "async-trait", "auto_impl", "dyn-clone", @@ -9288,10 +9371,10 @@ dependencies = [ name = "reth-rpc-eth-types" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-primitives", - "alloy-rpc-types-eth", + "alloy-rpc-types-eth 0.8.3", "alloy-sol-types", "derive_more", "futures", @@ -9347,7 +9430,7 @@ dependencies = [ name = "reth-rpc-server-types" version = "1.1.4" dependencies = [ - "alloy-eips", + "alloy-eips 0.8.3", "alloy-primitives", "alloy-rpc-types-engine", "jsonrpsee-core", @@ -9362,12 +9445,12 @@ dependencies = [ name = "reth-rpc-types-compat" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-primitives", "alloy-rlp", "alloy-rpc-types-engine", - "alloy-rpc-types-eth", + "alloy-rpc-types-eth 0.8.3", "jsonrpsee-types", "reth-primitives", "reth-primitives-traits", @@ -9380,11 +9463,11 @@ name = "reth-scroll-chainspec" version = "1.1.4" dependencies = [ "alloy-chains", - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-genesis", "alloy-primitives", - "alloy-serde", + "alloy-serde 0.8.3", "derive_more", "once_cell", "reth-chainspec", @@ -9430,8 +9513,8 @@ dependencies = [ name = "reth-scroll-engine" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-rlp", "alloy-rpc-types-engine", "reth-primitives", @@ -9443,8 +9526,8 @@ dependencies = [ name = "reth-scroll-evm" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "auto_impl", "derive_more", "eyre", @@ -9518,11 +9601,11 @@ dependencies = [ name = "reth-scroll-primitives" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-primitives", "alloy-rlp", - "alloy-serde", + "alloy-serde 0.8.3", "arbitrary", "bincode", "bytes", @@ -9548,13 +9631,13 @@ dependencies = [ [[package]] name = "reth-scroll-rpc" -version = "1.1.2" +version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-primitives", "alloy-rpc-types-debug", - "alloy-rpc-types-eth", + "alloy-rpc-types-eth 0.8.3", "derive_more", "jsonrpsee-core", "jsonrpsee-types", @@ -9586,7 +9669,7 @@ dependencies = [ "scroll-alloy-network", "scroll-alloy-rpc-types", "serde_json", - "thiserror 1.0.69", + "thiserror 2.0.9", "tokio", "tracing", ] @@ -9595,7 +9678,7 @@ dependencies = [ name = "reth-scroll-state-commitment" version = "1.1.4" dependencies = [ - "alloy-consensus", + "alloy-consensus 0.8.3", "alloy-genesis", "alloy-primitives", "alloy-rlp", @@ -9658,8 +9741,8 @@ dependencies = [ name = "reth-stages" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-primitives", "alloy-rlp", "assert_matches", @@ -9711,7 +9794,7 @@ dependencies = [ name = "reth-stages-api" version = "1.1.4" dependencies = [ - "alloy-eips", + "alloy-eips 0.8.3", "alloy-primitives", "aquamarine", "assert_matches", @@ -9793,8 +9876,8 @@ dependencies = [ name = "reth-storage-api" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-primitives", "alloy-rpc-types-engine", "auto_impl", @@ -9817,7 +9900,7 @@ dependencies = [ name = "reth-storage-errors" version = "1.1.4" dependencies = [ - "alloy-eips", + "alloy-eips 0.8.3", "alloy-primitives", "alloy-rlp", "derive_more", @@ -9847,8 +9930,8 @@ dependencies = [ name = "reth-testing-utils" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-genesis", "alloy-primitives", "rand 0.8.5", @@ -9884,8 +9967,8 @@ dependencies = [ name = "reth-transaction-pool" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-primitives", "alloy-rlp", "aquamarine", @@ -9932,8 +10015,8 @@ dependencies = [ name = "reth-trie" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-primitives", "alloy-rlp", "alloy-trie", @@ -9962,12 +10045,12 @@ dependencies = [ name = "reth-trie-common" version = "1.1.4" dependencies = [ - "alloy-consensus", + "alloy-consensus 0.8.3", "alloy-genesis", "alloy-primitives", "alloy-rlp", - "alloy-rpc-types-eth", - "alloy-serde", + "alloy-rpc-types-eth 0.8.3", + "alloy-serde 0.8.3", "alloy-trie", "arbitrary", "bincode", @@ -9993,7 +10076,7 @@ dependencies = [ name = "reth-trie-db" version = "1.1.4" dependencies = [ - "alloy-consensus", + "alloy-consensus 0.8.3", "alloy-primitives", "alloy-rlp", "derive_more", @@ -10098,7 +10181,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d056aaa21f36038ab35fe8ce940ee332903a0b4b992b8ca805fb60c85eb2086" dependencies = [ "alloy-primitives", - "alloy-rpc-types-eth", + "alloy-rpc-types-eth 0.8.3", "alloy-rpc-types-trace", "alloy-sol-types", "anstyle", @@ -10573,13 +10656,13 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "scroll-alloy-consensus" -version = "1.1.2" +version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", "alloy-primitives", "alloy-rlp", - "alloy-serde", + "alloy-serde 0.8.3", "arbitrary", "bincode", "derive_more", @@ -10591,12 +10674,12 @@ dependencies = [ [[package]] name = "scroll-alloy-network" -version = "1.1.2" +version = "1.1.4" dependencies = [ - "alloy-consensus", + "alloy-consensus 0.8.3", "alloy-network", "alloy-primitives", - "alloy-rpc-types-eth", + "alloy-rpc-types-eth 0.8.3", "alloy-signer", "scroll-alloy-consensus", "scroll-alloy-rpc-types", @@ -10604,14 +10687,14 @@ dependencies = [ [[package]] name = "scroll-alloy-rpc-types" -version = "1.1.2" +version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", - "alloy-network-primitives", + "alloy-consensus 0.6.4", + "alloy-eips 0.6.4", + "alloy-network-primitives 0.6.4", "alloy-primitives", - "alloy-rpc-types-eth", - "alloy-serde", + "alloy-rpc-types-eth 0.6.4", + "alloy-serde 0.6.4", "arbitrary", "derive_more", "scroll-alloy-consensus", diff --git a/crates/scroll/alloy/consensus/src/receipt/envelope.rs b/crates/scroll/alloy/consensus/src/receipt/envelope.rs index 582d18cc23ff..cb2729ec0b1c 100644 --- a/crates/scroll/alloy/consensus/src/receipt/envelope.rs +++ b/crates/scroll/alloy/consensus/src/receipt/envelope.rs @@ -23,20 +23,20 @@ use alloy_rlp::{length_of_length, BufMut, Decodable, Encodable}; pub enum ScrollReceiptEnvelope { /// Receipt envelope with no type flag. #[cfg_attr(feature = "serde", serde(rename = "0x0", alias = "0x00"))] - Legacy(ReceiptWithBloom), + Legacy(ReceiptWithBloom>), /// Receipt envelope with type flag 1, containing a [EIP-2930] receipt. /// /// [EIP-2930]: https://eips.ethereum.org/EIPS/eip-2930 #[cfg_attr(feature = "serde", serde(rename = "0x1", alias = "0x01"))] - Eip2930(ReceiptWithBloom), + Eip2930(ReceiptWithBloom>), /// Receipt envelope with type flag 2, containing a [EIP-1559] receipt. /// /// [EIP-1559]: https://eips.ethereum.org/EIPS/eip-1559 #[cfg_attr(feature = "serde", serde(rename = "0x2", alias = "0x02"))] - Eip1559(ReceiptWithBloom), + Eip1559(ReceiptWithBloom>), /// Receipt envelope with type flag 126, containing a [Scroll-L1-Message] receipt. #[cfg_attr(feature = "serde", serde(rename = "0x7e", alias = "0x7E"))] - L1Message(ReceiptWithBloom), + L1Message(ReceiptWithBloom>), } impl ScrollReceiptEnvelope { @@ -109,7 +109,7 @@ impl ScrollReceiptEnvelope { } /// Returns the deposit receipt if it is a deposit receipt. - pub const fn as_deposit_receipt_with_bloom(&self) -> Option<&ReceiptWithBloom> { + pub const fn as_deposit_receipt_with_bloom(&self) -> Option<&ReceiptWithBloom>> { match self { Self::L1Message(t) => Some(t), _ => None, @@ -155,10 +155,12 @@ impl ScrollReceiptEnvelope { } } -impl TxReceipt for ScrollReceiptEnvelope +impl TxReceipt for ScrollReceiptEnvelope where T: Clone + core::fmt::Debug + PartialEq + Eq + Send + Sync, { + type Log = T; + fn status_or_post_state(&self) -> Eip658Value { self.as_receipt().unwrap().status } @@ -260,10 +262,10 @@ where { fn arbitrary(u: &mut arbitrary::Unstructured<'a>) -> arbitrary::Result { match u.int_in_range(0..=4)? { - 0 => Ok(Self::Legacy(ReceiptWithBloom::::arbitrary(u)?)), - 1 => Ok(Self::Eip2930(ReceiptWithBloom::::arbitrary(u)?)), - 2 => Ok(Self::Eip1559(ReceiptWithBloom::::arbitrary(u)?)), - _ => Ok(Self::L1Message(ReceiptWithBloom::::arbitrary(u)?)), + 0 => Ok(Self::Legacy(ReceiptWithBloom::arbitrary(u)?)), + 1 => Ok(Self::Eip2930(ReceiptWithBloom::arbitrary(u)?)), + 2 => Ok(Self::Eip1559(ReceiptWithBloom::arbitrary(u)?)), + _ => Ok(Self::L1Message(ReceiptWithBloom::arbitrary(u)?)), } } } diff --git a/crates/scroll/alloy/consensus/src/transaction/envelope.rs b/crates/scroll/alloy/consensus/src/transaction/envelope.rs index 633d1a8a2953..6df9a07d93de 100644 --- a/crates/scroll/alloy/consensus/src/transaction/envelope.rs +++ b/crates/scroll/alloy/consensus/src/transaction/envelope.rs @@ -1,5 +1,6 @@ use alloy_consensus::{ transaction::RlpEcdsaTx, Sealable, Sealed, Signed, Transaction, TxEip1559, TxEip2930, TxLegacy, + Typed2718, }; use alloy_eips::{ eip2718::{Decodable2718, Eip2718Error, Eip2718Result, Encodable2718}, @@ -71,6 +72,17 @@ impl From> for ScrollTxEnvelope { } } +impl Typed2718 for ScrollTxEnvelope { + fn ty(&self) -> u8 { + match self { + Self::Legacy(tx) => tx.tx().ty(), + Self::Eip2930(tx) => tx.tx().ty(), + Self::Eip1559(tx) => tx.tx().ty(), + Self::L1Message(tx) => tx.ty(), + } + } +} + impl Transaction for ScrollTxEnvelope { fn chain_id(&self) -> Option { match self { @@ -180,15 +192,6 @@ impl Transaction for ScrollTxEnvelope { } } - fn ty(&self) -> u8 { - match self { - Self::Legacy(tx) => tx.tx().ty(), - Self::Eip2930(tx) => tx.tx().ty(), - Self::Eip1559(tx) => tx.tx().ty(), - Self::L1Message(tx) => tx.ty(), - } - } - fn access_list(&self) -> Option<&AccessList> { match self { Self::Legacy(tx) => tx.tx().access_list(), @@ -233,6 +236,15 @@ impl Transaction for ScrollTxEnvelope { Self::L1Message(tx) => tx.effective_gas_price(base_fee), } } + + fn is_create(&self) -> bool { + match self { + Self::Legacy(tx) => tx.tx().is_create(), + Self::Eip2930(tx) => tx.tx().is_create(), + Self::Eip1559(tx) => tx.tx().is_create(), + Self::L1Message(tx) => tx.is_create(), + } + } } impl ScrollTxEnvelope { diff --git a/crates/scroll/alloy/consensus/src/transaction/l1_message.rs b/crates/scroll/alloy/consensus/src/transaction/l1_message.rs index a1cd69e2adb8..fba1d5871ae1 100644 --- a/crates/scroll/alloy/consensus/src/transaction/l1_message.rs +++ b/crates/scroll/alloy/consensus/src/transaction/l1_message.rs @@ -1,6 +1,7 @@ //! Scroll L1 message transaction -use alloy_consensus::{Sealable, Transaction}; +use crate::ScrollTxType; +use alloy_consensus::{Sealable, Transaction, Typed2718}; use alloy_primitives::{ keccak256, private::alloy_rlp::{Encodable, Header}, @@ -160,6 +161,12 @@ impl TxL1Message { } } +impl Typed2718 for TxL1Message { + fn ty(&self) -> u8 { + ScrollTxType::L1Message as u8 + } +} + impl Transaction for TxL1Message { fn chain_id(&self) -> Option { None @@ -205,6 +212,10 @@ impl Transaction for TxL1Message { TxKind::Call(self.to) } + fn is_create(&self) -> bool { + false + } + fn value(&self) -> U256 { self.value } @@ -213,10 +224,6 @@ impl Transaction for TxL1Message { &self.input } - fn ty(&self) -> u8 { - L1_MESSAGE_TRANSACTION_TYPE - } - fn access_list(&self) -> Option<&alloy_eips::eip2930::AccessList> { None } diff --git a/crates/scroll/alloy/consensus/src/transaction/typed.rs b/crates/scroll/alloy/consensus/src/transaction/typed.rs index 90be26e95b2c..3f71845950b9 100644 --- a/crates/scroll/alloy/consensus/src/transaction/typed.rs +++ b/crates/scroll/alloy/consensus/src/transaction/typed.rs @@ -1,5 +1,5 @@ use crate::{ScrollTxEnvelope, ScrollTxType, TxL1Message}; -use alloy_consensus::{Transaction, TxEip1559, TxEip2930, TxLegacy}; +use alloy_consensus::{Transaction, TxEip1559, TxEip2930, TxLegacy, Typed2718}; use alloy_eips::eip2930::AccessList; use alloy_primitives::{Address, Bytes, TxKind}; @@ -111,6 +111,17 @@ impl ScrollTypedTransaction { } } +impl Typed2718 for ScrollTypedTransaction { + fn ty(&self) -> u8 { + match self { + Self::Legacy(_) => ScrollTxType::Legacy as u8, + Self::Eip2930(_) => ScrollTxType::Eip2930 as u8, + Self::Eip1559(_) => ScrollTxType::Eip1559 as u8, + Self::L1Message(_) => ScrollTxType::L1Message as u8, + } + } +} + impl Transaction for ScrollTypedTransaction { fn chain_id(&self) -> Option { match self { @@ -220,15 +231,6 @@ impl Transaction for ScrollTypedTransaction { } } - fn ty(&self) -> u8 { - match self { - Self::Legacy(_) => ScrollTxType::Legacy as u8, - Self::Eip2930(_) => ScrollTxType::Eip2930 as u8, - Self::Eip1559(_) => ScrollTxType::Eip1559 as u8, - Self::L1Message(_) => ScrollTxType::L1Message as u8, - } - } - fn access_list(&self) -> Option<&AccessList> { match self { Self::Legacy(tx) => tx.access_list(), @@ -273,6 +275,15 @@ impl Transaction for ScrollTypedTransaction { Self::L1Message(tx) => tx.effective_gas_price(base_fee), } } + + fn is_create(&self) -> bool { + match self { + Self::Legacy(tx) => tx.is_create(), + Self::Eip2930(tx) => tx.is_create(), + Self::Eip1559(tx) => tx.is_create(), + Self::L1Message(tx) => tx.is_create(), + } + } } #[cfg(feature = "serde")] From ac6575e25a91427cdb6466dda505cbd1da54bddc Mon Sep 17 00:00:00 2001 From: georgehao Date: Tue, 7 Jan 2025 11:11:32 +0800 Subject: [PATCH 17/86] fix cippy --- Cargo.lock | 577 ++++++++---------- Makefile | 12 + crates/scroll/alloy/rpc-types/Cargo.toml | 14 +- crates/scroll/alloy/rpc-types/src/receipt.rs | 11 +- .../scroll/alloy/rpc-types/src/transaction.rs | 20 +- crates/scroll/rpc/src/eth/block.rs | 47 +- crates/scroll/rpc/src/eth/call.rs | 21 +- crates/scroll/rpc/src/eth/mod.rs | 91 +-- crates/scroll/rpc/src/eth/pending_block.rs | 112 +++- crates/scroll/rpc/src/eth/receipt.rs | 76 ++- crates/scroll/rpc/src/eth/transaction.rs | 18 +- 11 files changed, 542 insertions(+), 457 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 24747107538f..d52e8a5f45fa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -119,35 +119,16 @@ dependencies = [ "strum 0.26.3", ] -[[package]] -name = "alloy-consensus" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae09ffd7c29062431dd86061deefe4e3c6f07fa0d674930095f8dcedb0baf02c" -dependencies = [ - "alloy-eips 0.6.4", - "alloy-primitives", - "alloy-rlp", - "alloy-serde 0.6.4", - "arbitrary", - "auto_impl", - "c-kzg", - "derive_more", - "k256", - "rand 0.8.5", - "serde", -] - [[package]] name = "alloy-consensus" version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e88e1edea70787c33e11197d3f32ae380f3db19e6e061e539a5bcf8184a6b326" dependencies = [ - "alloy-eips 0.8.3", + "alloy-eips", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.8.3", + "alloy-serde", "alloy-trie", "arbitrary", "auto_impl", @@ -165,11 +146,11 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57b1bb53f40c0273cd1975573cd457b39213e68584e36d1401d25fd0398a1d65" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.8.3", + "alloy-serde", "serde", ] @@ -182,10 +163,10 @@ dependencies = [ "alloy-dyn-abi", "alloy-json-abi", "alloy-network", - "alloy-network-primitives 0.8.3", + "alloy-network-primitives", "alloy-primitives", "alloy-provider", - "alloy-rpc-types-eth 0.8.3", + "alloy-rpc-types-eth", "alloy-sol-types", "alloy-transport", "futures", @@ -239,25 +220,6 @@ dependencies = [ "serde_with", ] -[[package]] -name = "alloy-eips" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b6aa3961694b30ba53d41006131a2fca3bdab22e4c344e46db2c639e7c2dfdd" -dependencies = [ - "alloy-eip2930", - "alloy-eip7702", - "alloy-primitives", - "alloy-rlp", - "alloy-serde 0.6.4", - "arbitrary", - "c-kzg", - "derive_more", - "once_cell", - "serde", - "sha2 0.10.8", -] - [[package]] name = "alloy-eips" version = "0.8.3" @@ -268,7 +230,7 @@ dependencies = [ "alloy-eip7702", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.8.3", + "alloy-serde", "arbitrary", "c-kzg", "derive_more", @@ -286,7 +248,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b2a4cf7b70f3495788e74ce1c765260ffe38820a2a774ff4aacb62e31ea73f9" dependencies = [ "alloy-primitives", - "alloy-serde 0.8.3", + "alloy-serde", "alloy-trie", "serde", ] @@ -323,15 +285,15 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "510cc00b318db0dfccfdd2d032411cfae64fc144aef9679409e014145d3dacc4" dependencies = [ - "alloy-consensus 0.8.3", + "alloy-consensus", "alloy-consensus-any", - "alloy-eips 0.8.3", + "alloy-eips", "alloy-json-rpc", - "alloy-network-primitives 0.8.3", + "alloy-network-primitives", "alloy-primitives", "alloy-rpc-types-any", - "alloy-rpc-types-eth 0.8.3", - "alloy-serde 0.8.3", + "alloy-rpc-types-eth", + "alloy-serde", "alloy-signer", "alloy-sol-types", "async-trait", @@ -342,29 +304,16 @@ dependencies = [ "thiserror 2.0.9", ] -[[package]] -name = "alloy-network-primitives" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df9f3e281005943944d15ee8491534a1c7b3cbf7a7de26f8c433b842b93eb5f9" -dependencies = [ - "alloy-consensus 0.6.4", - "alloy-eips 0.6.4", - "alloy-primitives", - "alloy-serde 0.6.4", - "serde", -] - [[package]] name = "alloy-network-primitives" version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9081c099e798b8a2bba2145eb82a9a146f01fc7a35e9ab6e7b43305051f97550" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-primitives", - "alloy-serde 0.8.3", + "alloy-serde", "serde", ] @@ -424,17 +373,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc2dfaddd9a30aa870a78a4e1316e3e115ec1e12e552cbc881310456b85c1f24" dependencies = [ "alloy-chains", - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-json-rpc", "alloy-network", - "alloy-network-primitives 0.8.3", + "alloy-network-primitives", "alloy-primitives", "alloy-pubsub", "alloy-rpc-client", "alloy-rpc-types-admin", "alloy-rpc-types-engine", - "alloy-rpc-types-eth 0.8.3", + "alloy-rpc-types-eth", "alloy-transport", "alloy-transport-http", "alloy-transport-ws", @@ -532,8 +481,8 @@ checksum = "3410a472ce26c457e9780f708ee6bd540b30f88f1f31fdab7a11d00bd6aa1aee" dependencies = [ "alloy-primitives", "alloy-rpc-types-engine", - "alloy-rpc-types-eth 0.8.3", - "alloy-serde 0.8.3", + "alloy-rpc-types-eth", + "alloy-serde", "serde", ] @@ -556,8 +505,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed06bd8a5fc57b352a6cbac24eec52a4760f08ae2c1eb56ac49c8ed4b02c351" dependencies = [ "alloy-primitives", - "alloy-rpc-types-eth 0.8.3", - "alloy-serde 0.8.3", + "alloy-rpc-types-eth", + "alloy-serde", "serde", ] @@ -568,8 +517,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed98e1af55a7d856bfa385f30f63d8d56be2513593655c904a8f4a7ec963aa3e" dependencies = [ "alloy-consensus-any", - "alloy-rpc-types-eth 0.8.3", - "alloy-serde 0.8.3", + "alloy-rpc-types-eth", + "alloy-serde", ] [[package]] @@ -578,7 +527,7 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c966cacae719252501d2c5f6b67beac2fd6c03ec3c5bb64d664e769737ea5651" dependencies = [ - "alloy-eips 0.8.3", + "alloy-eips", "alloy-primitives", "alloy-rpc-types-engine", "ethereum_ssz", @@ -604,11 +553,11 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03bd16fa4959255ebf4a7702df08f325e5631df5cdca07c8a8e58bdc10fe02e3" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.8.3", + "alloy-serde", "derive_more", "ethereum_ssz", "ethereum_ssz_derive", @@ -619,39 +568,19 @@ dependencies = [ "strum 0.26.3", ] -[[package]] -name = "alloy-rpc-types-eth" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8a477281940d82d29315846c7216db45b15e90bcd52309da9f54bcf7ad94a11" -dependencies = [ - "alloy-consensus 0.6.4", - "alloy-eips 0.6.4", - "alloy-network-primitives 0.6.4", - "alloy-primitives", - "alloy-rlp", - "alloy-serde 0.6.4", - "alloy-sol-types", - "arbitrary", - "derive_more", - "itertools 0.13.0", - "serde", - "serde_json", -] - [[package]] name = "alloy-rpc-types-eth" version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8737d7a6e37ca7bba9c23e9495c6534caec6760eb24abc9d5ffbaaba147818e1" dependencies = [ - "alloy-consensus 0.8.3", + "alloy-consensus", "alloy-consensus-any", - "alloy-eips 0.8.3", - "alloy-network-primitives 0.8.3", + "alloy-eips", + "alloy-network-primitives", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.8.3", + "alloy-serde", "alloy-sol-types", "arbitrary", "derive_more", @@ -667,10 +596,10 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d81da8a9b3094af917a109d55617844096d22c8dbf70cde1c5a93a2bbef7c29a" dependencies = [ - "alloy-eips 0.8.3", + "alloy-eips", "alloy-primitives", - "alloy-rpc-types-eth 0.8.3", - "alloy-serde 0.8.3", + "alloy-rpc-types-eth", + "alloy-serde", "serde", "serde_json", ] @@ -682,8 +611,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "db14a83665cd28ffd01939f04c2adf0e0fd9bb648b73ca651dcaa0869dae027f" dependencies = [ "alloy-primitives", - "alloy-rpc-types-eth 0.8.3", - "alloy-serde 0.8.3", + "alloy-rpc-types-eth", + "alloy-serde", "serde", "serde_json", "thiserror 2.0.9", @@ -696,23 +625,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0a574e97dff62097d22d6cd360f898f3d069239ca0ca7bfc2e5e7b22815ec572" dependencies = [ "alloy-primitives", - "alloy-rpc-types-eth 0.8.3", - "alloy-serde 0.8.3", + "alloy-rpc-types-eth", + "alloy-serde", "serde", ] -[[package]] -name = "alloy-serde" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dfa4a7ccf15b2492bb68088692481fd6b2604ccbee1d0d6c44c21427ae4df83" -dependencies = [ - "alloy-primitives", - "arbitrary", - "serde", - "serde_json", -] - [[package]] name = "alloy-serde" version = "0.8.3" @@ -745,7 +662,7 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "47fababf5a745133490cde927d48e50267f97d3d1209b9fc9f1d1d666964d172" dependencies = [ - "alloy-consensus 0.8.3", + "alloy-consensus", "alloy-network", "alloy-primitives", "alloy-signer", @@ -2760,8 +2677,8 @@ dependencies = [ name = "ef-tests" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", "rayon", @@ -2942,7 +2859,7 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" name = "example-beacon-api-sidecar-fetcher" version = "0.1.0" dependencies = [ - "alloy-consensus 0.8.3", + "alloy-consensus", "alloy-primitives", "alloy-rpc-types-beacon", "clap", @@ -2992,8 +2909,8 @@ dependencies = [ name = "example-custom-beacon-withdrawals" version = "0.0.0" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-sol-macro", "alloy-sol-types", "eyre", @@ -3027,7 +2944,7 @@ dependencies = [ name = "example-custom-engine-types" version = "0.0.0" dependencies = [ - "alloy-eips 0.8.3", + "alloy-eips", "alloy-genesis", "alloy-primitives", "alloy-rpc-types", @@ -3051,7 +2968,7 @@ dependencies = [ name = "example-custom-evm" version = "0.0.0" dependencies = [ - "alloy-consensus 0.8.3", + "alloy-consensus", "alloy-genesis", "alloy-primitives", "eyre", @@ -3071,9 +2988,9 @@ dependencies = [ name = "example-custom-inspector" version = "0.0.0" dependencies = [ - "alloy-eips 0.8.3", + "alloy-eips", "alloy-primitives", - "alloy-rpc-types-eth 0.8.3", + "alloy-rpc-types-eth", "clap", "futures-util", "reth", @@ -3095,7 +3012,7 @@ dependencies = [ name = "example-custom-payload-builder" version = "0.0.0" dependencies = [ - "alloy-eips 0.8.3", + "alloy-eips", "eyre", "futures-util", "reth", @@ -3131,9 +3048,9 @@ dependencies = [ name = "example-db-access" version = "0.0.0" dependencies = [ - "alloy-consensus 0.8.3", + "alloy-consensus", "alloy-primitives", - "alloy-rpc-types-eth 0.8.3", + "alloy-rpc-types-eth", "eyre", "reth-chainspec", "reth-db", @@ -3147,7 +3064,7 @@ dependencies = [ name = "example-manual-p2p" version = "0.0.0" dependencies = [ - "alloy-consensus 0.8.3", + "alloy-consensus", "eyre", "futures", "reth-chainspec", @@ -3239,7 +3156,7 @@ dependencies = [ name = "example-stateful-precompile" version = "0.0.0" dependencies = [ - "alloy-consensus 0.8.3", + "alloy-consensus", "alloy-genesis", "alloy-primitives", "eyre", @@ -5565,11 +5482,11 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c698f80ee53e56d1b60a97e9d90ad09788b516c964c9c97fb5927860b812ef0d" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.8.3", + "alloy-serde", "arbitrary", "derive_more", "serde", @@ -5583,8 +5500,8 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a023058a145333ed1760fd34d7f7605d5dd0211381690a29a66658127c8f307b" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-sol-types", "serde", @@ -5598,10 +5515,10 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5771424687f73e70f8dbc7d1f4b404cc2fdac9b4cd14745d7f7065c3422e947" dependencies = [ - "alloy-consensus 0.8.3", + "alloy-consensus", "alloy-network", "alloy-primitives", - "alloy-rpc-types-eth 0.8.3", + "alloy-rpc-types-eth", "alloy-signer", "op-alloy-consensus", "op-alloy-rpc-types", @@ -5614,11 +5531,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "caf7cfd504c4cb5b34fe15a59ea68cbb87c3c9cbea4214d31455464505ee6434" dependencies = [ "alloc-no-stdlib", - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.8.3", + "alloy-serde", "async-trait", "brotli", "cfg-if", @@ -5637,7 +5554,7 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8a942124522a7f43d66fc0c332c77edb260c061560f02f8b45a8cc66c740164" dependencies = [ - "alloy-eips 0.8.3", + "alloy-eips", "alloy-primitives", "jsonrpsee", "op-alloy-rpc-types", @@ -5650,12 +5567,12 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5aef2128fe8979596b3a1f79a2454f3e32fd239889a03d50fe686b9a2f30a16" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", - "alloy-network-primitives 0.8.3", + "alloy-consensus", + "alloy-eips", + "alloy-network-primitives", "alloy-primitives", - "alloy-rpc-types-eth 0.8.3", - "alloy-serde 0.8.3", + "alloy-rpc-types-eth", + "alloy-serde", "arbitrary", "derive_more", "op-alloy-consensus", @@ -5669,10 +5586,10 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b333b8894735ad2e5e2e3afb828a52811e75504735e19a5f9274483826d7fa99" dependencies = [ - "alloy-eips 0.8.3", + "alloy-eips", "alloy-primitives", "alloy-rpc-types-engine", - "alloy-serde 0.8.3", + "alloy-serde", "derive_more", "ethereum_ssz", "op-alloy-consensus", @@ -6652,8 +6569,8 @@ dependencies = [ name = "reth" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", "alloy-rpc-types", @@ -6723,8 +6640,8 @@ dependencies = [ name = "reth-basic-payload-builder" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "futures-core", "futures-util", @@ -6749,8 +6666,8 @@ dependencies = [ name = "reth-beacon-consensus" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-genesis", "alloy-primitives", "alloy-rpc-types-engine", @@ -6805,7 +6722,7 @@ dependencies = [ name = "reth-bench" version = "1.1.4" dependencies = [ - "alloy-eips 0.8.3", + "alloy-eips", "alloy-json-rpc", "alloy-primitives", "alloy-provider", @@ -6841,8 +6758,8 @@ dependencies = [ name = "reth-blockchain-tree" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-genesis", "alloy-primitives", "aquamarine", @@ -6882,8 +6799,8 @@ dependencies = [ name = "reth-blockchain-tree-api" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "reth-consensus", "reth-execution-errors", @@ -6897,8 +6814,8 @@ dependencies = [ name = "reth-chain-state" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-signer", "alloy-signer-local", @@ -6927,8 +6844,8 @@ name = "reth-chainspec" version = "1.1.4" dependencies = [ "alloy-chains", - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-genesis", "alloy-primitives", "alloy-rlp", @@ -6961,8 +6878,8 @@ name = "reth-cli-commands" version = "1.1.4" dependencies = [ "ahash", - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", "arbitrary", @@ -7036,7 +6953,7 @@ dependencies = [ name = "reth-cli-util" version = "1.1.4" dependencies = [ - "alloy-eips 0.8.3", + "alloy-eips", "alloy-primitives", "cfg-if", "eyre", @@ -7054,8 +6971,8 @@ dependencies = [ name = "reth-codecs" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-genesis", "alloy-primitives", "alloy-trie", @@ -7104,8 +7021,8 @@ dependencies = [ name = "reth-consensus" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "auto_impl", "derive_more", @@ -7117,8 +7034,8 @@ dependencies = [ name = "reth-consensus-common" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "mockall", "rand 0.8.5", @@ -7134,12 +7051,12 @@ dependencies = [ name = "reth-consensus-debug-client" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-provider", "alloy-rpc-types-engine", - "alloy-rpc-types-eth 0.8.3", + "alloy-rpc-types-eth", "auto_impl", "eyre", "futures", @@ -7157,7 +7074,7 @@ dependencies = [ name = "reth-db" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", + "alloy-consensus", "alloy-primitives", "arbitrary", "assert_matches", @@ -7199,7 +7116,7 @@ dependencies = [ name = "reth-db-api" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", + "alloy-consensus", "alloy-genesis", "alloy-primitives", "arbitrary", @@ -7228,7 +7145,7 @@ dependencies = [ name = "reth-db-common" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", + "alloy-consensus", "alloy-genesis", "alloy-primitives", "boyer-moore-magiclen", @@ -7258,7 +7175,7 @@ dependencies = [ name = "reth-db-models" version = "1.1.4" dependencies = [ - "alloy-eips 0.8.3", + "alloy-eips", "alloy-primitives", "arbitrary", "bytes", @@ -7354,8 +7271,8 @@ dependencies = [ name = "reth-downloaders" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", "assert_matches", @@ -7393,13 +7310,13 @@ dependencies = [ name = "reth-e2e-test-utils" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-network", "alloy-primitives", "alloy-rlp", "alloy-rpc-types-engine", - "alloy-rpc-types-eth 0.8.3", + "alloy-rpc-types-eth", "alloy-signer", "alloy-signer-local", "derive_more", @@ -7471,7 +7388,7 @@ dependencies = [ name = "reth-engine-local" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", + "alloy-consensus", "alloy-primitives", "alloy-rpc-types-engine", "eyre", @@ -7503,7 +7420,7 @@ dependencies = [ name = "reth-engine-primitives" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", + "alloy-consensus", "alloy-primitives", "alloy-rpc-types-engine", "futures", @@ -7551,8 +7468,8 @@ dependencies = [ name = "reth-engine-tree" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", "alloy-rpc-types-engine", @@ -7610,8 +7527,8 @@ dependencies = [ name = "reth-engine-util" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rpc-types-engine", "eyre", @@ -7657,7 +7574,7 @@ name = "reth-eth-wire" version = "1.1.4" dependencies = [ "alloy-chains", - "alloy-eips 0.8.3", + "alloy-eips", "alloy-primitives", "alloy-rlp", "arbitrary", @@ -7694,8 +7611,8 @@ name = "reth-eth-wire-types" version = "1.1.4" dependencies = [ "alloy-chains", - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-genesis", "alloy-primitives", "alloy-rlp", @@ -7729,8 +7646,8 @@ dependencies = [ name = "reth-ethereum-consensus" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "reth-chainspec", "reth-consensus", @@ -7744,7 +7661,7 @@ dependencies = [ name = "reth-ethereum-engine-primitives" version = "1.1.4" dependencies = [ - "alloy-eips 0.8.3", + "alloy-eips", "alloy-primitives", "alloy-rlp", "alloy-rpc-types-engine", @@ -7765,7 +7682,7 @@ name = "reth-ethereum-forks" version = "1.1.4" dependencies = [ "alloy-chains", - "alloy-consensus 0.8.3", + "alloy-consensus", "alloy-primitives", "alloy-rlp", "arbitrary", @@ -7784,8 +7701,8 @@ dependencies = [ name = "reth-ethereum-payload-builder" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "reth-basic-payload-builder", "reth-chain-state", @@ -7810,8 +7727,8 @@ dependencies = [ name = "reth-ethereum-primitives" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", "arbitrary", @@ -7843,8 +7760,8 @@ dependencies = [ name = "reth-evm" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "auto_impl", "futures-util", @@ -7873,8 +7790,8 @@ dependencies = [ name = "reth-evm-ethereum" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-genesis", "alloy-primitives", "alloy-sol-types", @@ -7898,7 +7815,7 @@ dependencies = [ name = "reth-execution-errors" version = "1.1.4" dependencies = [ - "alloy-eips 0.8.3", + "alloy-eips", "alloy-primitives", "alloy-rlp", "nybbles", @@ -7913,8 +7830,8 @@ dependencies = [ name = "reth-execution-types" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "arbitrary", "bincode", @@ -7933,8 +7850,8 @@ dependencies = [ name = "reth-exex" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-genesis", "alloy-primitives", "eyre", @@ -7977,7 +7894,7 @@ dependencies = [ name = "reth-exex-test-utils" version = "1.1.4" dependencies = [ - "alloy-eips 0.8.3", + "alloy-eips", "eyre", "futures-util", "rand 0.8.5", @@ -8010,7 +7927,7 @@ dependencies = [ name = "reth-exex-types" version = "1.1.4" dependencies = [ - "alloy-eips 0.8.3", + "alloy-eips", "alloy-primitives", "arbitrary", "bincode", @@ -8036,7 +7953,7 @@ dependencies = [ name = "reth-invalid-block-hooks" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", + "alloy-consensus", "alloy-primitives", "alloy-rlp", "alloy-rpc-types-debug", @@ -8148,8 +8065,8 @@ dependencies = [ name = "reth-network" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-node-bindings", "alloy-primitives", "alloy-provider", @@ -8233,8 +8150,8 @@ dependencies = [ name = "reth-network-p2p" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "auto_impl", "derive_more", @@ -8323,7 +8240,7 @@ dependencies = [ name = "reth-node-builder" version = "1.1.4" dependencies = [ - "alloy-eips 0.8.3", + "alloy-eips", "alloy-primitives", "alloy-rpc-types", "aquamarine", @@ -8387,8 +8304,8 @@ dependencies = [ name = "reth-node-core" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rpc-types-engine", "clap", @@ -8438,15 +8355,15 @@ dependencies = [ name = "reth-node-ethereum" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", + "alloy-consensus", "alloy-contract", - "alloy-eips 0.8.3", + "alloy-eips", "alloy-genesis", "alloy-primitives", "alloy-provider", "alloy-rpc-types-beacon", "alloy-rpc-types-engine", - "alloy-rpc-types-eth 0.8.3", + "alloy-rpc-types-eth", "alloy-signer", "alloy-sol-types", "eyre", @@ -8487,8 +8404,8 @@ dependencies = [ name = "reth-node-events" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rpc-types-engine", "futures", @@ -8545,8 +8462,8 @@ name = "reth-optimism-chainspec" version = "1.1.4" dependencies = [ "alloy-chains", - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-genesis", "alloy-primitives", "derive_more", @@ -8565,8 +8482,8 @@ dependencies = [ name = "reth-optimism-cli" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", "clap", @@ -8616,8 +8533,8 @@ dependencies = [ name = "reth-optimism-consensus" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-trie", "reth-chainspec", @@ -8635,8 +8552,8 @@ dependencies = [ name = "reth-optimism-evm" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-genesis", "alloy-primitives", "derive_more", @@ -8677,8 +8594,8 @@ dependencies = [ name = "reth-optimism-node" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-genesis", "alloy-network", "alloy-primitives", @@ -8732,8 +8649,8 @@ dependencies = [ name = "reth-optimism-payload-builder" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", "alloy-rpc-types-debug", @@ -8768,8 +8685,8 @@ dependencies = [ name = "reth-optimism-primitives" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", "arbitrary", @@ -8794,11 +8711,11 @@ dependencies = [ name = "reth-optimism-rpc" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rpc-types-debug", - "alloy-rpc-types-eth 0.8.3", + "alloy-rpc-types-eth", "jsonrpsee-core", "jsonrpsee-types", "op-alloy-consensus", @@ -8850,7 +8767,7 @@ dependencies = [ name = "reth-payload-builder" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", + "alloy-consensus", "alloy-primitives", "alloy-rpc-types", "async-trait", @@ -8885,7 +8802,7 @@ dependencies = [ name = "reth-payload-primitives" version = "1.1.4" dependencies = [ - "alloy-eips 0.8.3", + "alloy-eips", "alloy-primitives", "alloy-rpc-types-engine", "op-alloy-rpc-types-engine", @@ -8903,7 +8820,7 @@ dependencies = [ name = "reth-payload-util" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", + "alloy-consensus", "alloy-primitives", "reth-primitives", ] @@ -8923,14 +8840,14 @@ dependencies = [ name = "reth-primitives" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-genesis", "alloy-network", "alloy-primitives", "alloy-rlp", "alloy-rpc-types", - "alloy-serde 0.8.3", + "alloy-serde", "alloy-trie", "arbitrary", "assert_matches", @@ -8970,8 +8887,8 @@ dependencies = [ name = "reth-primitives-traits" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-genesis", "alloy-primitives", "alloy-rlp", @@ -9002,8 +8919,8 @@ dependencies = [ name = "reth-provider" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rpc-types-engine", "assert_matches", @@ -9053,8 +8970,8 @@ dependencies = [ name = "reth-prune" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "assert_matches", "itertools 0.13.0", @@ -9104,8 +9021,8 @@ dependencies = [ name = "reth-revm" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "reth-ethereum-forks", "reth-execution-errors", @@ -9123,9 +9040,9 @@ dependencies = [ name = "reth-rpc" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", + "alloy-consensus", "alloy-dyn-abi", - "alloy-eips 0.8.3", + "alloy-eips", "alloy-genesis", "alloy-network", "alloy-primitives", @@ -9135,11 +9052,11 @@ dependencies = [ "alloy-rpc-types-beacon", "alloy-rpc-types-debug", "alloy-rpc-types-engine", - "alloy-rpc-types-eth 0.8.3", + "alloy-rpc-types-eth", "alloy-rpc-types-mev", "alloy-rpc-types-trace", "alloy-rpc-types-txpool", - "alloy-serde 0.8.3", + "alloy-serde", "alloy-signer", "alloy-signer-local", "async-trait", @@ -9195,7 +9112,7 @@ dependencies = [ name = "reth-rpc-api" version = "1.1.4" dependencies = [ - "alloy-eips 0.8.3", + "alloy-eips", "alloy-json-rpc", "alloy-primitives", "alloy-rpc-types", @@ -9204,11 +9121,11 @@ dependencies = [ "alloy-rpc-types-beacon", "alloy-rpc-types-debug", "alloy-rpc-types-engine", - "alloy-rpc-types-eth 0.8.3", + "alloy-rpc-types-eth", "alloy-rpc-types-mev", "alloy-rpc-types-trace", "alloy-rpc-types-txpool", - "alloy-serde 0.8.3", + "alloy-serde", "jsonrpsee", "reth-engine-primitives", "reth-network-peers", @@ -9219,9 +9136,9 @@ dependencies = [ name = "reth-rpc-api-testing-util" version = "1.1.4" dependencies = [ - "alloy-eips 0.8.3", + "alloy-eips", "alloy-primitives", - "alloy-rpc-types-eth 0.8.3", + "alloy-rpc-types-eth", "alloy-rpc-types-trace", "futures", "jsonrpsee", @@ -9238,10 +9155,10 @@ dependencies = [ name = "reth-rpc-builder" version = "1.1.4" dependencies = [ - "alloy-eips 0.8.3", + "alloy-eips", "alloy-primitives", "alloy-rpc-types-engine", - "alloy-rpc-types-eth 0.8.3", + "alloy-rpc-types-eth", "alloy-rpc-types-trace", "clap", "http", @@ -9288,7 +9205,7 @@ dependencies = [ name = "reth-rpc-engine-api" version = "1.1.4" dependencies = [ - "alloy-eips 0.8.3", + "alloy-eips", "alloy-primitives", "alloy-rlp", "alloy-rpc-types-engine", @@ -9326,16 +9243,16 @@ dependencies = [ name = "reth-rpc-eth-api" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", + "alloy-consensus", "alloy-dyn-abi", - "alloy-eips 0.8.3", + "alloy-eips", "alloy-json-rpc", "alloy-network", "alloy-primitives", "alloy-rlp", - "alloy-rpc-types-eth 0.8.3", + "alloy-rpc-types-eth", "alloy-rpc-types-mev", - "alloy-serde 0.8.3", + "alloy-serde", "async-trait", "auto_impl", "dyn-clone", @@ -9371,10 +9288,10 @@ dependencies = [ name = "reth-rpc-eth-types" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-primitives", - "alloy-rpc-types-eth 0.8.3", + "alloy-rpc-types-eth", "alloy-sol-types", "derive_more", "futures", @@ -9430,7 +9347,7 @@ dependencies = [ name = "reth-rpc-server-types" version = "1.1.4" dependencies = [ - "alloy-eips 0.8.3", + "alloy-eips", "alloy-primitives", "alloy-rpc-types-engine", "jsonrpsee-core", @@ -9445,12 +9362,12 @@ dependencies = [ name = "reth-rpc-types-compat" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", "alloy-rpc-types-engine", - "alloy-rpc-types-eth 0.8.3", + "alloy-rpc-types-eth", "jsonrpsee-types", "reth-primitives", "reth-primitives-traits", @@ -9463,11 +9380,11 @@ name = "reth-scroll-chainspec" version = "1.1.4" dependencies = [ "alloy-chains", - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-genesis", "alloy-primitives", - "alloy-serde 0.8.3", + "alloy-serde", "derive_more", "once_cell", "reth-chainspec", @@ -9513,8 +9430,8 @@ dependencies = [ name = "reth-scroll-engine" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-rlp", "alloy-rpc-types-engine", "reth-primitives", @@ -9526,8 +9443,8 @@ dependencies = [ name = "reth-scroll-evm" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "auto_impl", "derive_more", "eyre", @@ -9601,11 +9518,11 @@ dependencies = [ name = "reth-scroll-primitives" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.8.3", + "alloy-serde", "arbitrary", "bincode", "bytes", @@ -9633,11 +9550,11 @@ dependencies = [ name = "reth-scroll-rpc" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rpc-types-debug", - "alloy-rpc-types-eth 0.8.3", + "alloy-rpc-types-eth", "derive_more", "jsonrpsee-core", "jsonrpsee-types", @@ -9678,7 +9595,7 @@ dependencies = [ name = "reth-scroll-state-commitment" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", + "alloy-consensus", "alloy-genesis", "alloy-primitives", "alloy-rlp", @@ -9741,8 +9658,8 @@ dependencies = [ name = "reth-stages" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", "assert_matches", @@ -9794,7 +9711,7 @@ dependencies = [ name = "reth-stages-api" version = "1.1.4" dependencies = [ - "alloy-eips 0.8.3", + "alloy-eips", "alloy-primitives", "aquamarine", "assert_matches", @@ -9876,8 +9793,8 @@ dependencies = [ name = "reth-storage-api" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rpc-types-engine", "auto_impl", @@ -9900,7 +9817,7 @@ dependencies = [ name = "reth-storage-errors" version = "1.1.4" dependencies = [ - "alloy-eips 0.8.3", + "alloy-eips", "alloy-primitives", "alloy-rlp", "derive_more", @@ -9930,8 +9847,8 @@ dependencies = [ name = "reth-testing-utils" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-genesis", "alloy-primitives", "rand 0.8.5", @@ -9967,8 +9884,8 @@ dependencies = [ name = "reth-transaction-pool" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", "aquamarine", @@ -10015,8 +9932,8 @@ dependencies = [ name = "reth-trie" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", "alloy-trie", @@ -10045,12 +9962,12 @@ dependencies = [ name = "reth-trie-common" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", + "alloy-consensus", "alloy-genesis", "alloy-primitives", "alloy-rlp", - "alloy-rpc-types-eth 0.8.3", - "alloy-serde 0.8.3", + "alloy-rpc-types-eth", + "alloy-serde", "alloy-trie", "arbitrary", "bincode", @@ -10076,7 +9993,7 @@ dependencies = [ name = "reth-trie-db" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", + "alloy-consensus", "alloy-primitives", "alloy-rlp", "derive_more", @@ -10181,7 +10098,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d056aaa21f36038ab35fe8ce940ee332903a0b4b992b8ca805fb60c85eb2086" dependencies = [ "alloy-primitives", - "alloy-rpc-types-eth 0.8.3", + "alloy-rpc-types-eth", "alloy-rpc-types-trace", "alloy-sol-types", "anstyle", @@ -10658,11 +10575,11 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" name = "scroll-alloy-consensus" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.8.3", + "alloy-serde", "arbitrary", "bincode", "derive_more", @@ -10676,10 +10593,10 @@ dependencies = [ name = "scroll-alloy-network" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", + "alloy-consensus", "alloy-network", "alloy-primitives", - "alloy-rpc-types-eth 0.8.3", + "alloy-rpc-types-eth", "alloy-signer", "scroll-alloy-consensus", "scroll-alloy-rpc-types", @@ -10689,12 +10606,12 @@ dependencies = [ name = "scroll-alloy-rpc-types" version = "1.1.4" dependencies = [ - "alloy-consensus 0.6.4", - "alloy-eips 0.6.4", - "alloy-network-primitives 0.6.4", + "alloy-consensus", + "alloy-eips", + "alloy-network-primitives", "alloy-primitives", - "alloy-rpc-types-eth 0.6.4", - "alloy-serde 0.6.4", + "alloy-rpc-types-eth", + "alloy-serde", "arbitrary", "derive_more", "scroll-alloy-consensus", diff --git a/Makefile b/Makefile index c1ee190f4dee..5c658d867836 100644 --- a/Makefile +++ b/Makefile @@ -390,6 +390,17 @@ lint-other-targets: --all-features \ -- -D warnings +lint-scroll-reth: + cargo +nightly clippy \ + --workspace \ + --bin "scroll-reth" \ + --lib \ + --examples \ + --tests \ + --benches \ + --features "scroll $(BIN_OTHER_FEATURES)" \ + -- -D warnings + lint-codespell: ensure-codespell codespell --skip "*.json" @@ -403,6 +414,7 @@ lint: make fmt && \ make lint-reth && \ make lint-op-reth && \ + make lint-scroll-reth && \ make lint-other-targets && \ make lint-codespell diff --git a/crates/scroll/alloy/rpc-types/Cargo.toml b/crates/scroll/alloy/rpc-types/Cargo.toml index d351f70bb82e..7d93b49d543b 100644 --- a/crates/scroll/alloy/rpc-types/Cargo.toml +++ b/crates/scroll/alloy/rpc-types/Cargo.toml @@ -16,16 +16,16 @@ workspace = true features = ["serde"] [dependencies.alloy-consensus] -version = "0.6.4" +version = "0.8.3" default-features = false [dependencies.alloy-eips] -version = "0.6.4" +version = "0.8.3" features = ["serde"] default-features = false [dependencies.alloy-network-primitives] -version = "0.6.4" +version = "0.8.3" default-features = false [dependencies.alloy-primitives] @@ -38,12 +38,12 @@ features = [ default-features = false [dependencies.alloy-rpc-types-eth] -version = "0.6.4" +version = "0.8.3" features = ["serde"] default-features = false [dependencies.alloy-serde] -version = "0.6.4" +version = "0.8.3" default-features = false [dependencies.arbitrary] @@ -73,7 +73,7 @@ features = ["alloc"] default-features = false [dev-dependencies.alloy-consensus] -version = "0.6.4" +version = "0.8.3" features = ["arbitrary"] default-features = false @@ -83,7 +83,7 @@ features = ["arbitrary"] default-features = false [dev-dependencies.alloy-rpc-types-eth] -version = "0.6.4" +version = "0.8.3" features = ["arbitrary"] default-features = false diff --git a/crates/scroll/alloy/rpc-types/src/receipt.rs b/crates/scroll/alloy/rpc-types/src/receipt.rs index 142cff097752..e4ecca38979b 100644 --- a/crates/scroll/alloy/rpc-types/src/receipt.rs +++ b/crates/scroll/alloy/rpc-types/src/receipt.rs @@ -15,9 +15,6 @@ pub struct ScrollTransactionReceipt { #[serde(flatten)] pub inner: alloy_rpc_types_eth::TransactionReceipt>, - /// The value of EVM execution result. - #[serde(default, skip_serializing_if = "Option::is_none")] - pub return_value: Option>, /// L1 fee for the transaction. #[serde(default, skip_serializing_if = "Option::is_none", with = "alloy_serde::quantity::opt")] pub l1_fee: Option, @@ -90,10 +87,6 @@ impl alloy_network_primitives::ReceiptResponse for ScrollTransactionReceipt { #[serde(rename_all = "camelCase")] #[doc(alias = "ScrollTxReceiptFields")] pub struct ScrollTransactionReceiptFields { - /// The value of EVM execution result. - #[serde(default, skip_serializing_if = "Option::is_none")] - pub return_value: Option>, - /// L1 fee for the transaction. #[serde(default, skip_serializing_if = "Option::is_none", with = "alloy_serde::quantity::opt")] pub l1_fee: Option, @@ -113,8 +106,8 @@ impl From for ScrollReceiptEnvelope, - ) -> ReceiptWithBloom { + receipt: ReceiptWithBloom>, + ) -> ReceiptWithBloom> { let ReceiptWithBloom { logs_bloom, receipt } = receipt; let consensus_logs = receipt.logs.into_iter().map(|log| log.inner).collect(); diff --git a/crates/scroll/alloy/rpc-types/src/transaction.rs b/crates/scroll/alloy/rpc-types/src/transaction.rs index d11d612a1aef..3bb0792d3b2a 100644 --- a/crates/scroll/alloy/rpc-types/src/transaction.rs +++ b/crates/scroll/alloy/rpc-types/src/transaction.rs @@ -1,6 +1,6 @@ //! Scroll specific types related to transactions. -use alloy_consensus::Transaction as _; +use alloy_consensus::{Transaction as _, Typed2718}; use alloy_eips::{eip2930::AccessList, eip7702::SignedAuthorization}; use alloy_primitives::{Address, BlockHash, Bytes, ChainId, TxKind, B256, U256}; use alloy_serde::OtherFields; @@ -29,6 +29,12 @@ pub struct Transaction { pub queue_index: Option, } +impl Typed2718 for Transaction { + fn ty(&self) -> u8 { + self.inner.ty() + } +} + impl alloy_consensus::Transaction for Transaction { fn chain_id(&self) -> Option { self.inner.chain_id() @@ -74,6 +80,10 @@ impl alloy_consensus::Transaction for Transaction { self.inner.kind() } + fn is_create(&self) -> bool { + self.inner.is_create() + } + fn to(&self) -> Option
{ self.inner.to() } @@ -86,10 +96,6 @@ impl alloy_consensus::Transaction for Transaction { self.inner.input() } - fn ty(&self) -> u8 { - self.inner.ty() - } - fn access_list(&self) -> Option<&AccessList> { self.inner.access_list() } @@ -123,10 +129,6 @@ impl alloy_network_primitives::TransactionResponse for Transaction { fn from(&self) -> Address { self.inner.from() } - - fn to(&self) -> Option
{ - alloy_consensus::Transaction::to(&self.inner) - } } /// Scroll specific transaction fields diff --git a/crates/scroll/rpc/src/eth/block.rs b/crates/scroll/rpc/src/eth/block.rs index e02061e6a1c2..d47c8b0c2ef4 100644 --- a/crates/scroll/rpc/src/eth/block.rs +++ b/crates/scroll/rpc/src/eth/block.rs @@ -1,28 +1,32 @@ //! Loads and formats Scroll block RPC response. -use alloy_rpc_types_eth::BlockId; +use alloy_consensus::BlockHeader; +use alloy_rpc_types_eth::{BlockId, TransactionReceipt}; use reth_chainspec::ChainSpecProvider; -use reth_primitives::TransactionMeta; -use reth_provider::HeaderProvider; +use reth_node_api::BlockBody; +use reth_primitives::{Receipt, TransactionMeta, TransactionSigned}; +use reth_provider::{BlockReader, HeaderProvider}; use reth_rpc_eth_api::{ helpers::{EthBlocks, LoadBlock, LoadPendingBlock, LoadReceipt, SpawnBlocking}, - RpcNodeCore, RpcReceipt, + RpcReceipt, }; -use reth_rpc_eth_types::EthReceiptBuilder; -use reth_scroll_chainspec::ScrollChainSpec; - +use reth_rpc_eth_types::{EthApiError, EthReceiptBuilder}; use scroll_alloy_network::Network; -use scroll_alloy_rpc_types::ScrollTransactionReceipt; -use crate::{ScrollEthApi, ScrollEthApiError}; +use reth_scroll_chainspec::ScrollChainSpec; +// use scroll_alloy_rpc_types::ScrollTransactionReceipt; + +// use crate::{eth::ScrollNodeCore, ScrollEthApi, ScrollEthApiError}; +use crate::{eth::ScrollNodeCore, ScrollEthApi}; impl EthBlocks for ScrollEthApi where Self: LoadBlock< - Error = ScrollEthApiError, - NetworkTypes: Network, + Error = EthApiError, + NetworkTypes: Network, + Provider: BlockReader, >, - N: RpcNodeCore + HeaderProvider>, + N: ScrollNodeCore + HeaderProvider>, { async fn block_receipts( &self, @@ -32,19 +36,19 @@ where Self: LoadReceipt, { if let Some((block, receipts)) = self.load_block_and_receipts(block_id).await? { - let block_number = block.number; - let base_fee = block.base_fee_per_gas; + let block_number = block.number(); + let base_fee = block.base_fee_per_gas(); let block_hash = block.hash(); - let excess_blob_gas = block.excess_blob_gas; - let timestamp = block.timestamp; + let excess_blob_gas = block.excess_blob_gas(); + let timestamp = block.timestamp(); return block .body - .transactions - .into_iter() + .transactions() + .iter() .zip(receipts.iter()) .enumerate() - .map(|(idx, (ref tx, receipt))| -> Result<_, _> { + .map(|(idx, (tx, receipt))| -> Result<_, _> { let meta = TransactionMeta { tx_hash: tx.hash(), index: idx as u64, @@ -54,8 +58,7 @@ where excess_blob_gas, timestamp, }; - - EthReceiptBuilder::new(&tx, meta, receipt, &receipts) + EthReceiptBuilder::new(tx, meta, receipt, &receipts) .map(|builder| builder.build()) }) .collect::, Self::Error>>() @@ -69,6 +72,6 @@ where impl LoadBlock for ScrollEthApi where Self: LoadPendingBlock + SpawnBlocking, - N: RpcNodeCore, + N: ScrollNodeCore, { } diff --git a/crates/scroll/rpc/src/eth/call.rs b/crates/scroll/rpc/src/eth/call.rs index 74fb08aa0580..1903af56315a 100644 --- a/crates/scroll/rpc/src/eth/call.rs +++ b/crates/scroll/rpc/src/eth/call.rs @@ -1,20 +1,21 @@ -use alloy_consensus::Header; use alloy_primitives::{TxKind, U256}; use alloy_rpc_types_eth::transaction::TransactionRequest; use reth_evm::ConfigureEvm; +use reth_provider::ProviderHeader; use reth_rpc_eth_api::{ - helpers::{estimate::EstimateCall, Call, EthCall, LoadPendingBlock, LoadState, SpawnBlocking}, - FromEthApiError, IntoEthApiError, RpcNodeCore, + helpers::{estimate::EstimateCall, Call, EthCall, LoadBlock, LoadState, SpawnBlocking}, + FromEthApiError, FullEthApiTypes, IntoEthApiError, }; use reth_rpc_eth_types::{revm_utils::CallFees, RpcInvalidTransactionError}; use revm::primitives::{BlockEnv, ScrollFields, TxEnv}; +use super::ScrollNodeCore; use crate::{ScrollEthApi, ScrollEthApiError}; impl EthCall for ScrollEthApi where - Self: EstimateCall + LoadPendingBlock, - N: RpcNodeCore, + Self: EstimateCall + LoadBlock + FullEthApiTypes, + N: ScrollNodeCore, { } @@ -22,24 +23,24 @@ impl EstimateCall for ScrollEthApi where Self: Call, Self::Error: From, - N: RpcNodeCore, + N: ScrollNodeCore, { } impl Call for ScrollEthApi where - Self: LoadState> + SpawnBlocking, + Self: LoadState>> + SpawnBlocking, Self::Error: From, - N: RpcNodeCore, + N: ScrollNodeCore, { #[inline] fn call_gas_limit(&self) -> u64 { - self.inner.gas_cap() + self.inner.eth_api.gas_cap() } #[inline] fn max_simulate_blocks(&self) -> u64 { - self.inner.max_simulate_blocks() + self.inner.eth_api.max_simulate_blocks() } fn create_txn_env( diff --git a/crates/scroll/rpc/src/eth/mod.rs b/crates/scroll/rpc/src/eth/mod.rs index bf4e53fb03cc..db57d369c57e 100644 --- a/crates/scroll/rpc/src/eth/mod.rs +++ b/crates/scroll/rpc/src/eth/mod.rs @@ -1,9 +1,7 @@ //! Scroll-Reth `eth_` endpoint implementation. -use derive_more::Deref; use std::{fmt, sync::Arc}; -use alloy_consensus::Header; use alloy_primitives::U256; use reth_chainspec::{EthChainSpec, EthereumHardforks}; use reth_evm::ConfigureEvm; @@ -12,7 +10,8 @@ use reth_node_builder::EthApiBuilderCtx; use reth_primitives::EthPrimitives; use reth_provider::{ BlockNumReader, BlockReader, BlockReaderIdExt, CanonStateSubscriptions, ChainSpecProvider, - EvmEnvProvider, StageCheckpointReader, StateProviderFactory, + EvmEnvProvider, ProviderBlock, ProviderHeader, ProviderReceipt, ProviderTx, + StageCheckpointReader, StateProviderFactory, }; use reth_rpc::eth::{core::EthApiInner, DevSigner}; use reth_rpc_eth_api::{ @@ -47,6 +46,10 @@ pub type EthApiNodeBackend = EthApiInner< ::Evm, >; +/// A helper trait with requirements for [`RpcNodeCore`] to be used in [`ScrollEthApi`]. +pub trait ScrollNodeCore: RpcNodeCore {} +impl ScrollNodeCore for T where T: RpcNodeCore {} + /// Scroll-Reth `Eth` API implementation. /// /// This type provides the functionality for handling `eth_` related requests. @@ -57,16 +60,15 @@ pub type EthApiNodeBackend = EthApiInner< /// /// This type implements the [`FullEthApi`](reth_rpc_eth_api::helpers::FullEthApi) by implemented /// all the `Eth` helper traits and prerequisite traits. -#[derive(Deref, Clone)] -pub struct ScrollEthApi { +#[derive(Clone)] +pub struct ScrollEthApi { /// Gateway to node's core components. - #[deref] - inner: Arc>, + inner: Arc>, } impl ScrollEthApi where - N: RpcNodeCore< + N: ScrollNodeCore< Provider: BlockReaderIdExt + ChainSpecProvider + CanonStateSubscriptions @@ -102,7 +104,7 @@ where impl EthApiTypes for ScrollEthApi where Self: Send + Sync, - N: RpcNodeCore, + N: ScrollNodeCore, { type Error = ScrollEthApiError; type NetworkTypes = Scroll; @@ -115,7 +117,7 @@ where impl RpcNodeCore for ScrollEthApi where - N: RpcNodeCore, + N: ScrollNodeCore, { type Provider = N::Provider; type Pool = N::Pool; @@ -125,17 +127,17 @@ where #[inline] fn pool(&self) -> &Self::Pool { - self.inner.pool() + self.inner.eth_api.pool() } #[inline] fn evm_config(&self) -> &Self::Evm { - self.inner.evm_config() + self.inner.eth_api.evm_config() } #[inline] fn network(&self) -> &Self::Network { - self.inner.network() + self.inner.eth_api.network() } #[inline] @@ -145,65 +147,67 @@ where #[inline] fn provider(&self) -> &Self::Provider { - self.inner.provider() + self.inner.eth_api.provider() } } impl RpcNodeCoreExt for ScrollEthApi where - N: RpcNodeCore, + N: ScrollNodeCore, { #[inline] - fn cache(&self) -> &EthStateCache { - self.inner.cache() + fn cache(&self) -> &EthStateCache, ProviderReceipt> { + self.inner.eth_api.cache() } } impl EthApiSpec for ScrollEthApi where - N: RpcNodeCore< + N: ScrollNodeCore< Provider: ChainSpecProvider + BlockNumReader + StageCheckpointReader, Network: NetworkInfo, >, { + type Transaction = ProviderTx; + #[inline] fn starting_block(&self) -> U256 { - self.inner.starting_block() + self.inner.eth_api.starting_block() } #[inline] - fn signers(&self) -> &parking_lot::RwLock>> { - self.inner.signers() + fn signers(&self) -> &parking_lot::RwLock>>>> { + self.inner.eth_api.signers() } } impl SpawnBlocking for ScrollEthApi where Self: Send + Sync + Clone + 'static, - N: RpcNodeCore, + N: ScrollNodeCore, { #[inline] fn io_task_spawner(&self) -> impl TaskSpawner { - self.inner.task_spawner() + self.inner.eth_api.task_spawner() } #[inline] fn tracing_task_pool(&self) -> &BlockingTaskPool { - self.inner.blocking_task_pool() + self.inner.eth_api.blocking_task_pool() } #[inline] fn tracing_task_guard(&self) -> &BlockingTaskGuard { - self.inner.blocking_task_guard() + self.inner.eth_api.blocking_task_guard() } } impl LoadFee for ScrollEthApi where Self: LoadBlock, - N: RpcNodeCore< + N: ScrollNodeCore< Provider: BlockReaderIdExt + EvmEnvProvider + ChainSpecProvider @@ -212,17 +216,17 @@ where { #[inline] fn gas_oracle(&self) -> &GasPriceOracle { - self.inner.gas_oracle() + self.inner.eth_api.gas_oracle() } #[inline] fn fee_history_cache(&self) -> &FeeHistoryCache { - self.inner.fee_history_cache() + self.inner.eth_api.fee_history_cache() } } impl LoadState for ScrollEthApi where - N: RpcNodeCore< + N: ScrollNodeCore< Provider: StateProviderFactory + ChainSpecProvider, Pool: TransactionPool, > @@ -232,39 +236,52 @@ impl LoadState for ScrollEthApi where impl EthState for ScrollEthApi where Self: LoadState + SpawnBlocking, - N: RpcNodeCore, + N: ScrollNodeCore, { #[inline] fn max_proof_window(&self) -> u64 { - self.inner.eth_proof_window() + self.inner.eth_api.eth_proof_window() } } impl EthFees for ScrollEthApi where Self: LoadFee, - N: RpcNodeCore, + N: ScrollNodeCore, { } impl Trace for ScrollEthApi where - Self: RpcNodeCore + LoadState>, - N: RpcNodeCore, + Self: RpcNodeCore + + LoadState< + Evm: ConfigureEvm< + Header = ProviderHeader, + Transaction = ProviderTx, + >, + >, + N: ScrollNodeCore, { } impl AddDevSigners for ScrollEthApi where - N: RpcNodeCore, + N: ScrollNodeCore, { fn with_dev_accounts(&self) { - *self.inner.signers().write() = DevSigner::random_signers(20) + *self.inner.eth_api.signers().write() = DevSigner::random_signers(20) } } -impl fmt::Debug for ScrollEthApi { +impl fmt::Debug for ScrollEthApi { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.debug_struct("ScrollEthApi").finish_non_exhaustive() } } + +/// Container type `ScrollEthApi` +#[allow(missing_debug_implementations)] +struct ScrollEthApiInner { + /// Gateway to node's core components. + eth_api: EthApiNodeBackend, +} diff --git a/crates/scroll/rpc/src/eth/pending_block.rs b/crates/scroll/rpc/src/eth/pending_block.rs index d130e4cba5ff..93e0cee8d4f6 100644 --- a/crates/scroll/rpc/src/eth/pending_block.rs +++ b/crates/scroll/rpc/src/eth/pending_block.rs @@ -1,35 +1,127 @@ //! Loads Scroll pending block for an RPC response. -use alloy_consensus::Header; +use alloy_consensus::{ + constants::EMPTY_WITHDRAWALS, proofs::calculate_transaction_root, BlockHeader, Header, + EMPTY_OMMER_ROOT_HASH, +}; +use alloy_eips::{eip7685::EMPTY_REQUESTS_HASH, merge::BEACON_NONCE}; +use alloy_primitives::{logs_bloom, B256, U256}; use reth_chainspec::{EthChainSpec, EthereumHardforks}; use reth_evm::ConfigureEvm; -use reth_primitives::Receipt; -use reth_provider::{BlockReaderIdExt, ChainSpecProvider, EvmEnvProvider, StateProviderFactory}; +use reth_primitives::{ + proofs::calculate_receipt_root_no_memo, BlockBody, Receipt, TransactionSigned, +}; +use reth_provider::{ + BlockReader, BlockReaderIdExt, ChainSpecProvider, EvmEnvProvider, ProviderBlock, + ProviderHeader, ProviderReceipt, ProviderTx, StateProviderFactory, +}; use reth_rpc_eth_api::{ helpers::{LoadPendingBlock, SpawnBlocking}, - RpcNodeCore, + EthApiTypes, RpcNodeCore, }; use reth_rpc_eth_types::PendingBlock; -use reth_transaction_pool::TransactionPool; +use reth_transaction_pool::{PoolTransaction, TransactionPool}; +use revm::primitives::{BlockEnv, ExecutionResult}; +use scroll_alloy_network::Network; use crate::ScrollEthApi; impl LoadPendingBlock for ScrollEthApi where - Self: SpawnBlocking, + Self: SpawnBlocking + + EthApiTypes< + NetworkTypes: Network< + HeaderResponse = alloy_rpc_types_eth::Header>, + >, + >, N: RpcNodeCore< Provider: BlockReaderIdExt< + Transaction = reth_primitives::TransactionSigned, Block = reth_primitives::Block, Receipt = reth_primitives::Receipt, + Header = reth_primitives::Header, > + EvmEnvProvider + ChainSpecProvider + StateProviderFactory, - Pool: TransactionPool, - Evm: ConfigureEvm
, + Pool: TransactionPool>>, + Evm: ConfigureEvm
, >, { #[inline] - fn pending_block(&self) -> &tokio::sync::Mutex> { - self.inner.pending_block() + fn pending_block( + &self, + ) -> &tokio::sync::Mutex< + Option, ProviderReceipt>>, + > { + self.inner.eth_api.pending_block() + } + + fn assemble_block( + &self, + block_env: &BlockEnv, + parent_hash: B256, + state_root: B256, + transactions: Vec>, + receipts: &[ProviderReceipt], + ) -> reth_provider::ProviderBlock { + let chain_spec = self.provider().chain_spec(); + let timestamp = block_env.timestamp.to::(); + + let transactions_root = calculate_transaction_root(&transactions); + let receipts_root = calculate_receipt_root_no_memo(&receipts.iter().collect::>()); + + let logs_bloom = logs_bloom(receipts.iter().flat_map(|r| &r.logs)); + let is_cancun = chain_spec.is_cancun_active_at_timestamp(timestamp); + let is_prague = chain_spec.is_prague_active_at_timestamp(timestamp); + let is_shanghai = chain_spec.is_shanghai_active_at_timestamp(timestamp); + + let header = Header { + parent_hash, + ommers_hash: EMPTY_OMMER_ROOT_HASH, + beneficiary: block_env.coinbase, + state_root, + transactions_root, + receipts_root, + withdrawals_root: (is_shanghai).then_some(EMPTY_WITHDRAWALS), + logs_bloom, + timestamp, + mix_hash: block_env.prevrandao.unwrap_or_default(), + nonce: BEACON_NONCE.into(), + base_fee_per_gas: Some(block_env.basefee.to::()), + number: block_env.number.to::(), + gas_limit: block_env.gas_limit.to::(), + difficulty: U256::ZERO, + gas_used: receipts.last().map(|r| r.cumulative_gas_used).unwrap_or_default(), + blob_gas_used: is_cancun.then(|| { + transactions.iter().map(|tx| tx.blob_gas_used().unwrap_or_default()).sum::() + }), + excess_blob_gas: block_env.get_blob_excess_gas(), + extra_data: Default::default(), + parent_beacon_block_root: is_cancun.then_some(B256::ZERO), + requests_hash: is_prague.then_some(EMPTY_REQUESTS_HASH), + target_blobs_per_block: None, + }; + + // seal the block + reth_primitives::Block { + header, + body: BlockBody { transactions, ommers: vec![], withdrawals: None }, + } + } + + fn assemble_receipt( + &self, + tx: &ProviderTx, + result: ExecutionResult, + cumulative_gas_used: u64, + ) -> reth_provider::ProviderReceipt { + #[allow(clippy::needless_update)] + Receipt { + tx_type: tx.tx_type(), + success: result.is_success(), + cumulative_gas_used, + logs: result.into_logs(), + ..Default::default() + } } } diff --git a/crates/scroll/rpc/src/eth/receipt.rs b/crates/scroll/rpc/src/eth/receipt.rs index 390e2ed67aec..a9f617a111ff 100644 --- a/crates/scroll/rpc/src/eth/receipt.rs +++ b/crates/scroll/rpc/src/eth/receipt.rs @@ -1,14 +1,16 @@ //! Loads and formats Scroll receipt RPC response. +use crate::{ScrollEthApi, ScrollEthApiError}; +use alloy_rpc_types_eth::{Log, TransactionReceipt}; use reth_node_api::{FullNodeComponents, NodeTypes}; -use reth_primitives::{Receipt, TransactionMeta, TransactionSigned}; -use reth_provider::{ChainSpecProvider, ReceiptProvider, TransactionsProvider}; +use reth_primitives::{Receipt, TransactionMeta, TransactionSigned, TxType}; +use reth_provider::{ReceiptProvider, TransactionsProvider}; use reth_rpc_eth_api::{helpers::LoadReceipt, FromEthApiError, RpcReceipt}; -use reth_rpc_eth_types::{receipt::build_receipt, EthApiError, EthReceiptBuilder}; +use reth_rpc_eth_types::{receipt::build_receipt, EthApiError}; use reth_scroll_chainspec::ScrollChainSpec; - -use crate::ScrollEthApi; +use scroll_alloy_consensus::ScrollReceiptEnvelope; +use scroll_alloy_rpc_types::{ScrollTransactionReceipt, ScrollTransactionReceiptFields}; impl LoadReceipt for ScrollEthApi where @@ -23,22 +25,66 @@ where meta: TransactionMeta, receipt: Receipt, ) -> Result, Self::Error> { - let (block, receipts) = self + let all_receipts = self + .inner + .eth_api .cache() - .get_block_and_receipts(meta.block_hash) + .get_receipts(meta.block_hash) .await .map_err(Self::Error::from_eth_err)? .ok_or(Self::Error::from_eth_err(EthApiError::HeaderNotFound( meta.block_hash.into(), )))?; - Ok(EthReceiptBuilder::new( - &self.inner.provider().chain_spec(), - &tx, - meta, - &receipt, - &receipts, - )? - .build()) + Ok(ScrollReceiptBuilder::new(&tx, meta, &receipt, &all_receipts)?.build()) + } +} + +/// Builds an [`ScrollTransactionReceipt`]. +#[derive(Debug)] +pub struct ScrollReceiptBuilder { + /// Core receipt, has all the fields of an L1 receipt and is the basis for the Scroll receipt. + pub core_receipt: TransactionReceipt>, + /// Additional Scroll receipt fields. + pub scroll_receipt_fields: ScrollTransactionReceiptFields, +} + +impl ScrollReceiptBuilder { + /// Returns a new builder. + pub fn new( + transaction: &TransactionSigned, + meta: TransactionMeta, + receipt: &Receipt, + all_receipts: &[Receipt], + ) -> Result { + let timestamp = meta.timestamp; + let core_receipt = + build_receipt(transaction, meta, receipt, all_receipts, |receipt_with_bloom| { + match receipt.tx_type { + TxType::Legacy => ScrollReceiptEnvelope::::Legacy(receipt_with_bloom), + TxType::Eip2930 => ScrollReceiptEnvelope::::Eip2930(receipt_with_bloom), + TxType::Eip1559 => ScrollReceiptEnvelope::::Eip1559(receipt_with_bloom), + TxType::Eip4844 => { + // TODO: unreachable + ScrollReceiptEnvelope::::Eip1559(receipt_with_bloom) + } + TxType::Eip7702 => unimplemented!("eip7702 unsupported"), + TxType::Deposit => ScrollReceiptEnvelope::::L1Message(receipt_with_bloom), + } + })?; + + let op_receipt_fields = ScrollTransactionReceiptFields { l1_fee: receipt.l1_fee }; + + Ok(Self { core_receipt, op_receipt_fields }) + } + + /// Builds [`ScrollTransactionReceipt`] by combing core (l1) receipt fields and additional + /// Scroll receipt fields. + pub fn build(self) -> ScrollTransactionReceipt { + let Self { core_receipt: inner, scroll_receipt_fields } = self; + + let ScrollTransactionReceiptFields { l1_fee, .. } = scroll_receipt_fields; + + ScrollTransactionReceipt { inner, l1_fee } } } diff --git a/crates/scroll/rpc/src/eth/transaction.rs b/crates/scroll/rpc/src/eth/transaction.rs index 3df7a7162c1f..f92bd69975eb 100644 --- a/crates/scroll/rpc/src/eth/transaction.rs +++ b/crates/scroll/rpc/src/eth/transaction.rs @@ -5,31 +5,33 @@ use alloy_primitives::{Sealable, Sealed}; use alloy_rpc_types_eth::{Transaction, TransactionInfo}; use reth_node_api::FullNodeComponents; use reth_primitives::{TransactionSigned, TransactionSignedEcRecovered}; -use reth_provider::{BlockReaderIdExt, ReceiptProvider, TransactionsProvider}; +use reth_provider::{ + BlockReader, BlockReaderIdExt, ProviderTx, ReceiptProvider, TransactionsProvider, +}; use reth_rpc_eth_api::{ helpers::{EthSigner, EthTransactions, LoadTransaction, SpawnBlocking}, - FullEthApiTypes, RpcNodeCore, TransactionCompat, + FullEthApiTypes, RpcNodeCoreExt, TransactionCompat, }; use reth_transaction_pool::TransactionPool; use scroll_alloy_consensus::ScrollTxEnvelope; -use crate::{ScrollEthApi, ScrollEthApiError}; +use crate::{eth::ScrollNodeCore, ScrollEthApi, ScrollEthApiError}; impl EthTransactions for ScrollEthApi where Self: LoadTransaction, - N: RpcNodeCore, + N: ScrollNodeCore>>, { - fn signers(&self) -> &parking_lot::RwLock>> { - self.inner.signers() + fn signers(&self) -> &parking_lot::RwLock>>>> { + self.inner.eth_api.signers() } } impl LoadTransaction for ScrollEthApi where - Self: SpawnBlocking + FullEthApiTypes, - N: RpcNodeCore, + Self: SpawnBlocking + FullEthApiTypes + RpcNodeCoreExt, + N: ScrollNodeCore, Self::Pool: TransactionPool, { } From 121fab796b31ed41fd27ac37f0bf5edd84b66bca Mon Sep 17 00:00:00 2001 From: georgehao Date: Tue, 7 Jan 2025 11:27:28 +0800 Subject: [PATCH 18/86] fix tranasction --- crates/scroll/rpc/src/eth/transaction.rs | 32 +++++++++++++----------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/crates/scroll/rpc/src/eth/transaction.rs b/crates/scroll/rpc/src/eth/transaction.rs index f92bd69975eb..c6a58d70f6a4 100644 --- a/crates/scroll/rpc/src/eth/transaction.rs +++ b/crates/scroll/rpc/src/eth/transaction.rs @@ -1,33 +1,22 @@ //! Loads and formats Scroll transaction RPC response. use alloy_consensus::{Signed, Transaction as _}; -use alloy_primitives::{Sealable, Sealed}; +use alloy_primitives::{PrimitiveSignature as Signature, Sealable, Sealed}; use alloy_rpc_types_eth::{Transaction, TransactionInfo}; use reth_node_api::FullNodeComponents; use reth_primitives::{TransactionSigned, TransactionSignedEcRecovered}; -use reth_provider::{ - BlockReader, BlockReaderIdExt, ProviderTx, ReceiptProvider, TransactionsProvider, -}; +use reth_provider::{ReceiptProvider, TransactionsProvider}; use reth_rpc_eth_api::{ - helpers::{EthSigner, EthTransactions, LoadTransaction, SpawnBlocking}, + helpers::{LoadTransaction, SpawnBlocking}, FullEthApiTypes, RpcNodeCoreExt, TransactionCompat, }; +use reth_rpc_eth_types::EthApiError; use reth_transaction_pool::TransactionPool; use scroll_alloy_consensus::ScrollTxEnvelope; use crate::{eth::ScrollNodeCore, ScrollEthApi, ScrollEthApiError}; -impl EthTransactions for ScrollEthApi -where - Self: LoadTransaction, - N: ScrollNodeCore>>, -{ - fn signers(&self) -> &parking_lot::RwLock>>>> { - self.inner.eth_api.signers() - } -} - impl LoadTransaction for ScrollEthApi where Self: SpawnBlocking + FullEthApiTypes + RpcNodeCoreExt, @@ -96,6 +85,19 @@ where }) } + fn build_simulate_v1_transaction( + &self, + request: alloy_rpc_types_eth::TransactionRequest, + ) -> Result { + let Ok(tx) = request.build_typed_tx() else { + return Err(ScrollEthApiError::Eth(EthApiError::TransactionConversionError)) + }; + + // Create an empty signature for the transaction. + let signature = Signature::new(Default::default(), Default::default(), false); + Ok(TransactionSigned::new_unhashed(tx.into(), signature)) + } + fn otterscan_api_truncate_input(tx: &mut Self::Transaction) { let input = match &mut tx.inner.inner { ScrollTxEnvelope::Eip1559(tx) => &mut tx.tx_mut().input, From f49eef993b072a987bc4c375b77fa60d806ecb81 Mon Sep 17 00:00:00 2001 From: georgehao Date: Tue, 7 Jan 2025 14:29:39 +0800 Subject: [PATCH 19/86] fix transaction --- crates/scroll/rpc/src/eth/receipt.rs | 9 ++++++--- crates/scroll/rpc/src/eth/transaction.rs | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/crates/scroll/rpc/src/eth/receipt.rs b/crates/scroll/rpc/src/eth/receipt.rs index a9f617a111ff..1a574d1769fe 100644 --- a/crates/scroll/rpc/src/eth/receipt.rs +++ b/crates/scroll/rpc/src/eth/receipt.rs @@ -69,13 +69,16 @@ impl ScrollReceiptBuilder { ScrollReceiptEnvelope::::Eip1559(receipt_with_bloom) } TxType::Eip7702 => unimplemented!("eip7702 unsupported"), - TxType::Deposit => ScrollReceiptEnvelope::::L1Message(receipt_with_bloom), + TxType::L1Message => { + ScrollReceiptEnvelope::::L1Message(receipt_with_bloom) + } } })?; - let op_receipt_fields = ScrollTransactionReceiptFields { l1_fee: receipt.l1_fee }; + let scroll_receipt_fields = + ScrollTransactionReceiptFields { l1_fee: Some(receipt.l1_fee.saturating_to()) }; - Ok(Self { core_receipt, op_receipt_fields }) + Ok(Self { core_receipt, scroll_receipt_fields }) } /// Builds [`ScrollTransactionReceipt`] by combing core (l1) receipt fields and additional diff --git a/crates/scroll/rpc/src/eth/transaction.rs b/crates/scroll/rpc/src/eth/transaction.rs index c6a58d70f6a4..59a212a72a64 100644 --- a/crates/scroll/rpc/src/eth/transaction.rs +++ b/crates/scroll/rpc/src/eth/transaction.rs @@ -4,7 +4,7 @@ use alloy_consensus::{Signed, Transaction as _}; use alloy_primitives::{PrimitiveSignature as Signature, Sealable, Sealed}; use alloy_rpc_types_eth::{Transaction, TransactionInfo}; use reth_node_api::FullNodeComponents; -use reth_primitives::{TransactionSigned, TransactionSignedEcRecovered}; +use reth_primitives::{RecoveredTx, TransactionSigned}; use reth_provider::{ReceiptProvider, TransactionsProvider}; use reth_rpc_eth_api::{ helpers::{LoadTransaction, SpawnBlocking}, @@ -34,7 +34,7 @@ where fn fill( &self, - tx: TransactionSignedEcRecovered, + tx: RecoveredTx, tx_info: TransactionInfo, ) -> Result { let from = tx.signer(); From d4cb63ca7b0fc068e8d102a7076d12a574d0651c Mon Sep 17 00:00:00 2001 From: georgehao Date: Tue, 7 Jan 2025 14:55:06 +0800 Subject: [PATCH 20/86] replace TxL1Message --- Cargo.lock | 2 + crates/primitives/Cargo.toml | 161 ++++---- crates/primitives/src/alloy_compat.rs | 15 +- crates/primitives/src/transaction/mod.rs | 6 +- crates/scroll/alloy/consensus/src/lib.rs | 3 +- .../consensus/src/transaction/l1_message.rs | 79 +++- .../alloy/consensus/src/transaction/mod.rs | 2 +- crates/scroll/evm/Cargo.toml | 27 +- crates/scroll/evm/src/execute.rs | 2 +- .../scroll/primitives/src/l1_transaction.rs | 344 ------------------ crates/scroll/primitives/src/lib.rs | 5 - 11 files changed, 173 insertions(+), 473 deletions(-) delete mode 100644 crates/scroll/primitives/src/l1_transaction.rs diff --git a/Cargo.lock b/Cargo.lock index d52e8a5f45fa..2a56053bba50 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8876,6 +8876,7 @@ dependencies = [ "reth-trie-common", "reth-zstd-compressors", "rstest", + "scroll-alloy-consensus", "secp256k1", "serde", "serde_json", @@ -9461,6 +9462,7 @@ dependencies = [ "reth-scroll-forks", "reth-scroll-primitives", "reth-scroll-revm", + "scroll-alloy-consensus", "thiserror 2.0.9", "tracing", ] diff --git a/crates/primitives/Cargo.toml b/crates/primitives/Cargo.toml index 9e692d244802..89bb22dc4f53 100644 --- a/crates/primitives/Cargo.toml +++ b/crates/primitives/Cargo.toml @@ -32,12 +32,13 @@ alloy-trie = { workspace = true, features = ["serde"] } # scroll revm-primitives = { package = "reth-scroll-revm", path = "../scroll/revm", features = ["serde"] } reth-scroll-primitives = { workspace = true, optional = true, features = ["serde"] } +scroll-alloy-consensus = { workspace = true, optional = true, features = ["serde"] } # optimism op-alloy-rpc-types = { workspace = true, optional = true } op-alloy-consensus = { workspace = true, features = [ - "arbitrary", - "serde", + "arbitrary", + "serde", ], optional = true } # for eip-4844 @@ -45,9 +46,9 @@ c-kzg = { workspace = true, features = ["serde"], optional = true } # crypto secp256k1 = { workspace = true, features = [ - "global-context", - "recovery", - "rand", + "global-context", + "recovery", + "rand", ], optional = true } # misc @@ -77,9 +78,9 @@ alloy-genesis.workspace = true arbitrary = { workspace = true, features = ["derive"] } secp256k1 = { workspace = true, features = [ - "global-context", - "recovery", - "rand", + "global-context", + "recovery", + "rand", ] } assert_matches.workspace = true @@ -93,102 +94,102 @@ rstest.workspace = true criterion.workspace = true pprof = { workspace = true, features = [ - "flamegraph", - "frame-pointer", - "criterion", + "flamegraph", + "frame-pointer", + "criterion", ] } [features] default = ["c-kzg", "alloy-compat", "std", "reth-codec", "secp256k1"] std = [ - "reth-primitives-traits/std", - "alloy-consensus/std", - "alloy-eips/std", - "alloy-genesis/std", - "alloy-primitives/std", - "alloy-serde?/std", - "once_cell/std", - "revm-primitives/std", - "serde/std", - "alloy-trie/std", - "serde_with?/std", - "alloy-rlp/std", - "reth-ethereum-forks/std", - "bytes/std", - "derive_more/std", - "reth-zstd-compressors?/std", - "secp256k1?/std" + "reth-primitives-traits/std", + "alloy-consensus/std", + "alloy-eips/std", + "alloy-genesis/std", + "alloy-primitives/std", + "alloy-serde?/std", + "once_cell/std", + "revm-primitives/std", + "serde/std", + "alloy-trie/std", + "serde_with?/std", + "alloy-rlp/std", + "reth-ethereum-forks/std", + "bytes/std", + "derive_more/std", + "reth-zstd-compressors?/std", + "secp256k1?/std" ] reth-codec = [ - "dep:reth-codecs", - "dep:reth-zstd-compressors", - "dep:modular-bitfield", "std", - "reth-primitives-traits/reth-codec", + "dep:reth-codecs", + "dep:reth-zstd-compressors", + "dep:modular-bitfield", "std", + "reth-primitives-traits/reth-codec", ] asm-keccak = ["alloy-primitives/asm-keccak", "revm-primitives/asm-keccak"] arbitrary = [ - "dep:arbitrary", - "alloy-eips/arbitrary", - "rand", - "reth-codec", - "reth-ethereum-forks/arbitrary", - "reth-primitives-traits/arbitrary", - "revm-primitives/arbitrary", - "reth-chainspec/arbitrary", - "alloy-consensus/arbitrary", - "alloy-primitives/arbitrary", - "alloy-rpc-types?/arbitrary", - "alloy-serde?/arbitrary", - "op-alloy-consensus?/arbitrary", - "op-alloy-rpc-types?/arbitrary", - "reth-codecs?/arbitrary", - "alloy-trie/arbitrary", - "reth-trie-common/arbitrary", - "dep:secp256k1", - "reth-scroll-primitives?/arbitrary" + "dep:arbitrary", + "alloy-eips/arbitrary", + "rand", + "reth-codec", + "reth-ethereum-forks/arbitrary", + "reth-primitives-traits/arbitrary", + "revm-primitives/arbitrary", + "reth-chainspec/arbitrary", + "alloy-consensus/arbitrary", + "alloy-primitives/arbitrary", + "alloy-rpc-types?/arbitrary", + "alloy-serde?/arbitrary", + "op-alloy-consensus?/arbitrary", + "op-alloy-rpc-types?/arbitrary", + "reth-codecs?/arbitrary", + "alloy-trie/arbitrary", + "reth-trie-common/arbitrary", + "dep:secp256k1", + "reth-scroll-primitives?/arbitrary" ] secp256k1 = [ - "reth-primitives-traits/secp256k1", + "reth-primitives-traits/secp256k1", ] c-kzg = [ - "dep:c-kzg", - "alloy-consensus/kzg", - "alloy-eips/kzg", - "revm-primitives/c-kzg", + "dep:c-kzg", + "alloy-consensus/kzg", + "alloy-eips/kzg", + "revm-primitives/c-kzg", ] optimism = [ - "dep:op-alloy-consensus", - "reth-codecs?/op", - "revm-primitives/optimism", + "dep:op-alloy-consensus", + "reth-codecs?/op", + "revm-primitives/optimism", ] alloy-compat = [ - "dep:alloy-rpc-types", - "dep:alloy-serde", - "dep:op-alloy-rpc-types", - "dep:alloy-network", + "dep:alloy-rpc-types", + "dep:alloy-serde", + "dep:op-alloy-rpc-types", + "dep:alloy-network", ] test-utils = [ - "reth-primitives-traits/test-utils", - "reth-chainspec/test-utils", - "reth-codecs?/test-utils", - "reth-trie-common/test-utils", - "arbitrary", - "revm-primitives/test-utils" + "reth-primitives-traits/test-utils", + "reth-chainspec/test-utils", + "reth-codecs?/test-utils", + "reth-trie-common/test-utils", + "arbitrary", + "revm-primitives/test-utils" ] serde-bincode-compat = [ - "serde_with", - "alloy-eips/serde-bincode-compat", - "alloy-consensus/serde-bincode-compat", - "op-alloy-consensus?/serde-bincode-compat", - "reth-primitives-traits/serde-bincode-compat", - "reth-trie-common/serde-bincode-compat", + "serde_with", + "alloy-eips/serde-bincode-compat", + "alloy-consensus/serde-bincode-compat", + "op-alloy-consensus?/serde-bincode-compat", + "reth-primitives-traits/serde-bincode-compat", + "reth-trie-common/serde-bincode-compat", ] scroll = [ - "reth-trie-common/scroll", - "reth-primitives-traits/scroll", - "reth-testing-utils/scroll", - "reth-scroll-primitives", - "reth-chainspec/scroll", + "reth-trie-common/scroll", + "reth-primitives-traits/scroll", + "reth-testing-utils/scroll", + "reth-scroll-primitives", + "reth-chainspec/scroll", ] [[bench]] diff --git a/crates/primitives/src/alloy_compat.rs b/crates/primitives/src/alloy_compat.rs index 0d4985c01af2..6b16af4ef610 100644 --- a/crates/primitives/src/alloy_compat.rs +++ b/crates/primitives/src/alloy_compat.rs @@ -160,14 +160,13 @@ impl TryFrom for TransactionSigned { #[cfg(all(feature = "scroll", not(feature = "optimism")))] crate::TxType::L1Message => { use alloy_consensus::Transaction as _; - let fields = - inner - .fields - .clone() - .deserialize_into::() - .map_err(|e| ConversionError::Custom(e.to_string()))?; + let fields = inner + .fields + .clone() + .deserialize_into::() + .map_err(|e| ConversionError::Custom(e.to_string()))?; ( - Transaction::L1Message(reth_scroll_primitives::TxL1Message { + Transaction::L1Message(scroll_alloy_consensus::TxL1Message { queue_index: fields.queue_index, gas_limit: inner.gas_limit(), to: inner.to().ok_or_else(|| ConversionError::Custom( @@ -178,7 +177,7 @@ impl TryFrom for TransactionSigned { sender: fields.sender, input: inner.input().clone(), }), - reth_scroll_primitives::TxL1Message::signature(), + scroll_alloy_consensus::TxL1Message::signature(), _hash, ) } diff --git a/crates/primitives/src/transaction/mod.rs b/crates/primitives/src/transaction/mod.rs index bc693ba27332..03991e62ff61 100644 --- a/crates/primitives/src/transaction/mod.rs +++ b/crates/primitives/src/transaction/mod.rs @@ -37,9 +37,9 @@ pub use reth_primitives_traits::{ WithEncoded, }; use reth_primitives_traits::{InMemorySize, SignedTransaction}; -#[cfg(all(feature = "scroll", not(feature = "optimism")))] -use reth_scroll_primitives::l1_transaction::TxL1Message; use revm_primitives::{AuthorizationList, TxEnv}; +#[cfg(all(feature = "scroll", not(feature = "optimism")))] +use scroll_alloy_consensus::TxL1Message; use serde::{Deserialize, Serialize}; pub use signature::{recover_signer, recover_signer_unchecked}; #[cfg(feature = "std")] @@ -1773,7 +1773,7 @@ pub mod serde_bincode_compat { #[cfg(all(feature = "optimism", not(feature = "scroll")))] Deposit(op_alloy_consensus::serde_bincode_compat::TxDeposit<'a>), #[cfg(all(feature = "scroll", not(feature = "optimism")))] - L1Message(Cow<'a, reth_scroll_primitives::l1_transaction::TxL1Message>), + L1Message(Cow<'a, scroll_alloy_consensus::TxL1Message>), } impl<'a> From<&'a super::Transaction> for Transaction<'a> { diff --git a/crates/scroll/alloy/consensus/src/lib.rs b/crates/scroll/alloy/consensus/src/lib.rs index 1274475e1df5..1cd766873a7a 100644 --- a/crates/scroll/alloy/consensus/src/lib.rs +++ b/crates/scroll/alloy/consensus/src/lib.rs @@ -9,7 +9,8 @@ mod transaction; pub use transaction::{ - ScrollTxEnvelope, ScrollTxType, ScrollTypedTransaction, TxL1Message, L1_MESSAGE_TX_TYPE_ID, + ScrollL1MessageTransactionFields, ScrollTxEnvelope, ScrollTxType, ScrollTypedTransaction, + TxL1Message, L1_MESSAGE_TX_TYPE_ID, }; mod receipt; diff --git a/crates/scroll/alloy/consensus/src/transaction/l1_message.rs b/crates/scroll/alloy/consensus/src/transaction/l1_message.rs index fba1d5871ae1..ff36efaa13a3 100644 --- a/crates/scroll/alloy/consensus/src/transaction/l1_message.rs +++ b/crates/scroll/alloy/consensus/src/transaction/l1_message.rs @@ -2,12 +2,14 @@ use crate::ScrollTxType; use alloy_consensus::{Sealable, Transaction, Typed2718}; +use alloy_eips::eip2718::{Decodable2718, Eip2718Error, Eip2718Result, Encodable2718}; use alloy_primitives::{ keccak256, private::alloy_rlp::{Encodable, Header}, Address, Bytes, ChainId, PrimitiveSignature as Signature, TxHash, TxKind, B256, U256, }; use alloy_rlp::Decodable; +use serde::{Deserialize, Serialize}; /// L1 message transaction type id, 0x7e in hex. const L1_MESSAGE_TRANSACTION_TYPE: u8 = 126; @@ -114,6 +116,10 @@ impl TxL1Message { self.sender.encode(out); } + pub(crate) const fn tx_type(&self) -> u8 { + L1_MESSAGE_TRANSACTION_TYPE + } + /// Create a RLP header for the transaction. fn rlp_header(&self) -> Header { Header { list: true, payload_length: self.rlp_encoded_fields_length() } @@ -167,6 +173,52 @@ impl Typed2718 for TxL1Message { } } +impl Encodable2718 for TxL1Message { + fn type_flag(&self) -> Option { + Some(self.tx_type()) + } + + fn encode_2718_len(&self) -> usize { + self.eip2718_encoded_length() + } + + fn encode_2718(&self, out: &mut dyn alloy_rlp::BufMut) { + out.put_u8(self.tx_type()); + self.rlp_encode(out); + } +} + +impl Decodable2718 for TxL1Message { + fn typed_decode(ty: u8, buf: &mut &[u8]) -> Eip2718Result { + if ty != L1_MESSAGE_TRANSACTION_TYPE { + return Err(Eip2718Error::UnexpectedType(ty)); + } + let tx = Self::rlp_decode(buf)?; + Ok(tx) + } + + fn fallback_decode(buf: &mut &[u8]) -> Eip2718Result { + let tx = Self::decode(buf)?; + Ok(tx) + } +} + +impl Encodable for TxL1Message { + fn encode(&self, out: &mut dyn alloy_rlp::BufMut) { + self.rlp_encode(out) + } + + fn length(&self) -> usize { + self.rlp_encoded_length() + } +} + +impl Decodable for TxL1Message { + fn decode(buf: &mut &[u8]) -> alloy_rlp::Result { + Self::rlp_decode(buf) + } +} + impl Transaction for TxL1Message { fn chain_id(&self) -> Option { None @@ -237,28 +289,23 @@ impl Transaction for TxL1Message { } } -impl Encodable for TxL1Message { - fn encode(&self, out: &mut dyn alloy_rlp::BufMut) { - self.rlp_encode(out) - } - - fn length(&self) -> usize { - self.rlp_encoded_length() - } -} - -impl Decodable for TxL1Message { - fn decode(buf: &mut &[u8]) -> alloy_rlp::Result { - Self::rlp_decode(buf) - } -} - impl Sealable for TxL1Message { fn hash_slow(&self) -> B256 { self.tx_hash() } } +/// Scroll specific transaction fields +#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct ScrollL1MessageTransactionFields { + /// The index of the transaction in the message queue. + #[serde(with = "alloy_serde::quantity")] + pub queue_index: u64, + /// The sender of the transaction on the L1. + pub sender: Address, +} + /// Deposit transactions don't have a signature, however, we include an empty signature in the /// response for better compatibility. /// diff --git a/crates/scroll/alloy/consensus/src/transaction/mod.rs b/crates/scroll/alloy/consensus/src/transaction/mod.rs index 22f16e1213bf..4509976c4ced 100644 --- a/crates/scroll/alloy/consensus/src/transaction/mod.rs +++ b/crates/scroll/alloy/consensus/src/transaction/mod.rs @@ -7,7 +7,7 @@ mod envelope; pub use envelope::ScrollTxEnvelope; mod l1_message; -pub use l1_message::TxL1Message; +pub use l1_message::{ScrollL1MessageTransactionFields, TxL1Message}; mod typed; pub use typed::ScrollTypedTransaction; diff --git a/crates/scroll/evm/Cargo.toml b/crates/scroll/evm/Cargo.toml index 28653851c6d6..8d82c5a61765 100644 --- a/crates/scroll/evm/Cargo.toml +++ b/crates/scroll/evm/Cargo.toml @@ -27,15 +27,14 @@ revm = { workspace = true, features = ["optional_no_base_fee"] } # scroll reth-scroll-chainspec.workspace = true reth-scroll-forks.workspace = true +scroll-alloy-consensus.workspace = true +reth-scroll-consensus.workspace = true +reth-scroll-execution.workspace = true # alloy alloy-consensus.workspace = true alloy-eips.workspace = true -# scroll -reth-scroll-consensus.workspace = true -reth-scroll-execution.workspace = true - # misc auto_impl.workspace = true derive_more.workspace = true @@ -49,16 +48,16 @@ reth-scroll-primitives.workspace = true [features] optimism = [ - "reth-primitives/optimism", - "revm/optimism" + "reth-primitives/optimism", + "revm/optimism" ] scroll = [ - "reth-chainspec/scroll", - "reth-evm/scroll", - "reth-primitives/scroll", - "reth-primitives-traits/scroll", - "reth-revm/scroll", - "reth-scroll-consensus/scroll", - "reth-scroll-execution/scroll", - "revm/scroll" + "reth-chainspec/scroll", + "reth-evm/scroll", + "reth-primitives/scroll", + "reth-primitives-traits/scroll", + "reth-revm/scroll", + "reth-scroll-consensus/scroll", + "reth-scroll-execution/scroll", + "revm/scroll" ] diff --git a/crates/scroll/evm/src/execute.rs b/crates/scroll/evm/src/execute.rs index ca6afab7817e..ffa3c7623d98 100644 --- a/crates/scroll/evm/src/execute.rs +++ b/crates/scroll/evm/src/execute.rs @@ -386,7 +386,7 @@ mod tests { ..Default::default() }), TxType::L1Message => { - reth_primitives::Transaction::L1Message(reth_scroll_primitives::TxL1Message { + reth_primitives::Transaction::L1Message(scroll_alloy_consensus::TxL1Message { sender: Address::random(), to: Address::ZERO, ..Default::default() diff --git a/crates/scroll/primitives/src/l1_transaction.rs b/crates/scroll/primitives/src/l1_transaction.rs deleted file mode 100644 index aa380d50e0ef..000000000000 --- a/crates/scroll/primitives/src/l1_transaction.rs +++ /dev/null @@ -1,344 +0,0 @@ -//! Scroll L1 message transaction - -use alloy_consensus::{Transaction, Typed2718}; -use alloy_eips::eip2718::{Decodable2718, Eip2718Error, Eip2718Result, Encodable2718}; -use alloy_primitives::{ - private::alloy_rlp::{Encodable, Header}, - Address, Bytes, ChainId, PrimitiveSignature as Signature, TxKind, B256, U256, -}; -use alloy_rlp::Decodable; -use bytes::BufMut; -use serde::{Deserialize, Serialize}; -#[cfg(any(test, feature = "reth-codec"))] -use {reth_codecs::Compact, reth_codecs_derive::add_arbitrary_tests}; - -/// L1 message transaction type id, 0x7e in hex. -pub const L1_MESSAGE_TRANSACTION_TYPE: u8 = 126; - -/// A message transaction sent from the settlement layer to the L2 for execution. -/// -/// The signature of the L1 message is already verified on the L1 and as such doesn't contain -/// a signature field. Gas for the transaction execution on Scroll is already paid for on the L1. -/// -/// # Bincode compatibility -/// -/// `bincode` crate doesn't work with optionally serializable serde fields and some of the execution -/// types require optional serialization for RPC compatibility. Since `TxL1Message` doesn't -/// contain optionally serializable fields, no `bincode` compatible bridge implementation is -/// required. -#[derive(Clone, Debug, Default, PartialEq, Eq, Hash)] -#[cfg_attr(any(test, feature = "serde"), derive(serde::Serialize, serde::Deserialize))] -#[cfg_attr(any(test, feature = "serde"), serde(rename_all = "camelCase"))] -#[cfg_attr(any(test, feature = "arbitrary"), derive(arbitrary::Arbitrary))] -#[cfg_attr(any(test, feature = "reth-codec"), derive(Compact))] -#[cfg_attr(any(test, feature = "reth-codec"), add_arbitrary_tests(compact, rlp))] -pub struct TxL1Message { - /// The queue index of the message in the L1 contract queue. - #[cfg_attr(feature = "serde", serde(with = "alloy_serde::quantity"))] - pub queue_index: u64, - /// The gas limit for the transaction. Gas is paid for when message is sent from the L1. - #[cfg_attr(feature = "serde", serde(with = "alloy_serde::quantity", rename = "gas"))] - pub gas_limit: u64, - /// The destination for the transaction. `Address` is used in place of `TxKind` since contract - /// creations aren't allowed via L1 message transactions. - pub to: Address, - /// The value sent. - pub value: U256, - /// The L1 sender of the transaction. - pub sender: Address, - /// The input of the transaction. - pub input: Bytes, -} - -impl TxL1Message { - /// Returns an empty signature for the [`TxL1Message`], which don't include a signature. - pub fn signature() -> Signature { - Signature::new(U256::ZERO, U256::ZERO, false) - } - - /// Returns the destination of the transaction as a [`TxKind`]. - pub const fn to(&self) -> TxKind { - TxKind::Call(self.to) - } - - /// Decodes the inner [`TxL1Message`] fields from RLP bytes. - /// - /// NOTE: This assumes a RLP header has already been decoded, and _just_ decodes the following - /// RLP fields in the following order: - /// - /// - `queue_index` - /// - `gas_limit` - /// - `to` - /// - `value` - /// - `input` - /// - `sender` - pub fn rlp_decode_fields(buf: &mut &[u8]) -> alloy_rlp::Result { - Ok(Self { - queue_index: Decodable::decode(buf)?, - gas_limit: Decodable::decode(buf)?, - to: Decodable::decode(buf)?, - value: Decodable::decode(buf)?, - input: Decodable::decode(buf)?, - sender: Decodable::decode(buf)?, - }) - } - - /// Decodes the transaction from RLP bytes. - pub fn rlp_decode(buf: &mut &[u8]) -> alloy_rlp::Result { - let header = Header::decode(buf)?; - if !header.list { - return Err(alloy_rlp::Error::UnexpectedString); - } - let remaining = buf.len(); - - let this = Self::rlp_decode_fields(buf)?; - - if buf.len() + header.payload_length != remaining { - return Err(alloy_rlp::Error::ListLengthMismatch { - expected: header.payload_length, - got: remaining - buf.len(), - }); - } - - Ok(this) - } - - /// Outputs the length of the transaction's fields, without a RLP header. - fn rlp_encoded_fields_length(&self) -> usize { - self.queue_index.length() + - self.gas_limit.length() + - self.to.length() + - self.value.length() + - self.input.0.length() + - self.sender.length() - } - - /// Encode the fields of the transaction without a RLP header. - /// - fn rlp_encode_fields(&self, out: &mut dyn BufMut) { - self.queue_index.encode(out); - self.gas_limit.encode(out); - self.to.encode(out); - self.value.encode(out); - self.input.encode(out); - self.sender.encode(out); - } - - pub(crate) const fn tx_type(&self) -> u8 { - L1_MESSAGE_TRANSACTION_TYPE - } - - /// Create a RLP header for the transaction. - fn rlp_header(&self) -> Header { - Header { list: true, payload_length: self.rlp_encoded_fields_length() } - } - - /// RLP encodes the transaction. - pub fn rlp_encode(&self, out: &mut dyn BufMut) { - self.rlp_header().encode(out); - self.rlp_encode_fields(out); - } - - /// Get the length of the transaction when RLP encoded. - pub fn rlp_encoded_length(&self) -> usize { - self.rlp_header().length_with_payload() - } - - /// Get the length of the transaction when EIP-2718 encoded. This is the - /// 1 byte type flag + the length of the RLP encoded transaction. - pub fn eip2718_encoded_length(&self) -> usize { - self.rlp_encoded_length() + 1 - } - - /// Calculates the in-memory size of the [`TxL1Message`] transaction. - #[inline] - pub fn size(&self) -> usize { - size_of::() + // queue_index - size_of::() + // gas_limit - size_of::
() + // to - size_of::() + // value - self.input.len() + // input - size_of::
() // sender - } -} - -impl Typed2718 for TxL1Message { - fn ty(&self) -> u8 { - self.tx_type() - } -} - -impl Encodable2718 for TxL1Message { - fn type_flag(&self) -> Option { - Some(self.tx_type()) - } - - fn encode_2718_len(&self) -> usize { - self.eip2718_encoded_length() - } - - fn encode_2718(&self, out: &mut dyn alloy_rlp::BufMut) { - out.put_u8(self.tx_type()); - self.rlp_encode(out); - } -} - -impl Decodable2718 for TxL1Message { - fn typed_decode(ty: u8, buf: &mut &[u8]) -> Eip2718Result { - if ty != L1_MESSAGE_TRANSACTION_TYPE { - return Err(Eip2718Error::UnexpectedType(ty)); - } - let tx = Self::rlp_decode(buf)?; - Ok(tx) - } - - fn fallback_decode(buf: &mut &[u8]) -> Eip2718Result { - let tx = Self::decode(buf)?; - Ok(tx) - } -} - -impl Encodable for TxL1Message { - fn encode(&self, out: &mut dyn BufMut) { - self.rlp_encode(out) - } - - fn length(&self) -> usize { - self.rlp_encoded_length() - } -} - -impl Decodable for TxL1Message { - fn decode(buf: &mut &[u8]) -> alloy_rlp::Result { - Self::rlp_decode(buf) - } -} - -impl Transaction for TxL1Message { - fn chain_id(&self) -> Option { - None - } - - fn nonce(&self) -> u64 { - 0u64 - } - - fn gas_limit(&self) -> u64 { - self.gas_limit - } - - fn gas_price(&self) -> Option { - None - } - - fn max_fee_per_gas(&self) -> u128 { - 0 - } - - fn max_priority_fee_per_gas(&self) -> Option { - None - } - - fn max_fee_per_blob_gas(&self) -> Option { - None - } - - fn priority_fee_or_price(&self) -> u128 { - 0 - } - - fn effective_gas_price(&self, _base_fee: Option) -> u128 { - 0 - } - - fn is_dynamic_fee(&self) -> bool { - false - } - - fn is_create(&self) -> bool { - false - } - - fn kind(&self) -> TxKind { - self.to() - } - - fn value(&self) -> U256 { - self.value - } - - fn input(&self) -> &Bytes { - &self.input - } - - fn access_list(&self) -> Option<&alloy_eips::eip2930::AccessList> { - None - } - - fn blob_versioned_hashes(&self) -> Option<&[B256]> { - None - } - - fn authorization_list(&self) -> Option<&[alloy_eips::eip7702::SignedAuthorization]> { - None - } -} - -/// Scroll specific transaction fields -#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct ScrollL1MessageTransactionFields { - /// The index of the transaction in the message queue. - #[serde(with = "alloy_serde::quantity")] - pub queue_index: u64, - /// The sender of the transaction on the L1. - pub sender: Address, -} - -#[cfg(test)] -mod tests { - use super::TxL1Message; - use alloy_eips::eip2718::Encodable2718; - use alloy_primitives::{address, bytes, hex, Bytes, U256}; - use arbitrary::Arbitrary; - use bytes::BytesMut; - use rand::Rng; - use reth_codecs::{test_utils::UnusedBits, validate_bitflag_backwards_compat}; - - #[test] - fn test_bincode_roundtrip() { - let mut bytes = [0u8; 1024]; - rand::thread_rng().fill(bytes.as_mut_slice()); - let tx = TxL1Message::arbitrary(&mut arbitrary::Unstructured::new(&bytes)).unwrap(); - - let encoded = bincode::serialize(&tx).unwrap(); - let decoded: TxL1Message = bincode::deserialize(&encoded).unwrap(); - assert_eq!(decoded, tx); - } - - #[test] - fn test_eip2718_encode() { - let tx = - TxL1Message { - queue_index: 947883, - gas_limit: 2000000, - to: address!("781e90f1c8fc4611c9b7497c3b47f99ef6969cbc"), - value: U256::ZERO, - sender: address!("7885bcbd5cecef1336b5300fb5186a12ddd8c478"), - input: bytes!("8ef1332e000000000000000000000000c186fa914353c44b2e33ebe05f21846f1048beda0000000000000000000000003bad7ad0728f9917d1bf08af5782dcbd516cdd96000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e76ab00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000044493a4f84f464e58d4bfa93bcc57abfb14dbe1b8ff46cd132b5709aab227f269727943d2f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"), - } - ; - let bytes = Bytes::from_static(&hex!("7ef9015a830e76ab831e848094781e90f1c8fc4611c9b7497c3b47f99ef6969cbc80b901248ef1332e000000000000000000000000c186fa914353c44b2e33ebe05f21846f1048beda0000000000000000000000003bad7ad0728f9917d1bf08af5782dcbd516cdd96000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e76ab00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000044493a4f84f464e58d4bfa93bcc57abfb14dbe1b8ff46cd132b5709aab227f269727943d2f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000947885bcbd5cecef1336b5300fb5186a12ddd8c478")); - - let mut encoded = BytesMut::default(); - tx.encode_2718(&mut encoded); - - assert_eq!(encoded, bytes.as_ref()) - } - - #[test] - fn test_compaction_backwards_compatibility() { - assert_eq!(TxL1Message::bitflag_encoded_bytes(), 2); - validate_bitflag_backwards_compat!(TxL1Message, UnusedBits::NotZero); - } -} diff --git a/crates/scroll/primitives/src/lib.rs b/crates/scroll/primitives/src/lib.rs index 0fb1ef09522f..1f6ff5cfd5da 100644 --- a/crates/scroll/primitives/src/lib.rs +++ b/crates/scroll/primitives/src/lib.rs @@ -9,10 +9,5 @@ mod execution_context; pub use account_extension::AccountExtension; mod account_extension; -pub use l1_transaction::{ - ScrollL1MessageTransactionFields, TxL1Message, L1_MESSAGE_TRANSACTION_TYPE, -}; -pub mod l1_transaction; - /// Poseidon hashing primitives. pub mod poseidon; From 04a5a8064beb5f62f099f0e769268d8f510153be Mon Sep 17 00:00:00 2001 From: georgehao Date: Wed, 8 Jan 2025 00:22:37 +0800 Subject: [PATCH 21/86] fix --- Cargo.lock | 16 ++--- crates/primitives/Cargo.toml | 5 +- crates/primitives/src/transaction/compat.rs | 2 +- crates/primitives/src/transaction/mod.rs | 2 +- crates/primitives/src/transaction/tx_type.rs | 15 ++-- crates/scroll/alloy/consensus/Cargo.toml | 70 +++++++++++++++++-- crates/scroll/alloy/consensus/src/lib.rs | 2 +- .../consensus/src/transaction/l1_message.rs | 14 ++-- .../alloy/consensus/src/transaction/mod.rs | 2 +- .../scroll/alloy/rpc-types/src/transaction.rs | 7 +- crates/scroll/primitives/Cargo.toml | 51 ++++---------- crates/scroll/rpc/src/eth/transaction.rs | 25 ++++--- 12 files changed, 126 insertions(+), 85 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2a56053bba50..89d92045df7b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9520,21 +9520,11 @@ dependencies = [ name = "reth-scroll-primitives" version = "1.1.4" dependencies = [ - "alloy-consensus", - "alloy-eips", "alloy-primitives", - "alloy-rlp", - "alloy-serde", "arbitrary", - "bincode", - "bytes", "modular-bitfield", "poseidon-bn254 0.1.0 (git+https://github.com/scroll-tech/poseidon-bn254?rev=526a64a)", - "proptest", - "proptest-arbitrary-interop", - "rand 0.8.5", "reth-codecs", - "reth-codecs-derive", "serde", "test-fuzz", ] @@ -10585,10 +10575,16 @@ dependencies = [ "arbitrary", "bincode", "derive_more", + "modular-bitfield", + "proptest", + "proptest-arbitrary-interop", "rand 0.8.5", + "reth-codecs", + "reth-codecs-derive", "serde", "serde_json", "serde_with", + "test-fuzz", ] [[package]] diff --git a/crates/primitives/Cargo.toml b/crates/primitives/Cargo.toml index 89bb22dc4f53..0fa05fcdfced 100644 --- a/crates/primitives/Cargo.toml +++ b/crates/primitives/Cargo.toml @@ -32,7 +32,7 @@ alloy-trie = { workspace = true, features = ["serde"] } # scroll revm-primitives = { package = "reth-scroll-revm", path = "../scroll/revm", features = ["serde"] } reth-scroll-primitives = { workspace = true, optional = true, features = ["serde"] } -scroll-alloy-consensus = { workspace = true, optional = true, features = ["serde"] } +scroll-alloy-consensus.workspace = true # optimism op-alloy-rpc-types = { workspace = true, optional = true } @@ -146,7 +146,8 @@ arbitrary = [ "alloy-trie/arbitrary", "reth-trie-common/arbitrary", "dep:secp256k1", - "reth-scroll-primitives?/arbitrary" + "reth-scroll-primitives?/arbitrary", + "scroll-alloy-consensus/arbitrary" ] secp256k1 = [ "reth-primitives-traits/secp256k1", diff --git a/crates/primitives/src/transaction/compat.rs b/crates/primitives/src/transaction/compat.rs index 0bca4c7aa391..8b2d5b547df8 100644 --- a/crates/primitives/src/transaction/compat.rs +++ b/crates/primitives/src/transaction/compat.rs @@ -118,7 +118,7 @@ impl FillTxEnv for TransactionSigned { tx_env.gas_limit = tx.gas_limit; tx_env.gas_price = U256::ZERO; tx_env.gas_priority_fee = None; - tx_env.transact_to = tx.to(); + tx_env.transact_to = TxKind::Call(tx.to); tx_env.value = tx.value; tx_env.data = tx.input.clone(); tx_env.chain_id = None; diff --git a/crates/primitives/src/transaction/mod.rs b/crates/primitives/src/transaction/mod.rs index 03991e62ff61..fe9dfbeafed3 100644 --- a/crates/primitives/src/transaction/mod.rs +++ b/crates/primitives/src/transaction/mod.rs @@ -586,7 +586,7 @@ impl reth_codecs::Compact for Transaction { (Self::Deposit(tx), buf) } #[cfg(all(feature = "scroll", not(feature = "optimism")))] - reth_scroll_primitives::L1_MESSAGE_TRANSACTION_TYPE => { + scroll_alloy_consensus::L1_MESSAGE_TRANSACTION_TYPE => { let (tx, buf) = TxL1Message::from_compact(buf, buf.len()); (Self::L1Message(tx), buf) } diff --git a/crates/primitives/src/transaction/tx_type.rs b/crates/primitives/src/transaction/tx_type.rs index 9b021ed74e3f..06fd0e882b04 100644 --- a/crates/primitives/src/transaction/tx_type.rs +++ b/crates/primitives/src/transaction/tx_type.rs @@ -122,7 +122,7 @@ impl From for u8 { #[cfg(all(feature = "optimism", not(feature = "scroll")))] TxType::Deposit => op_alloy_consensus::DEPOSIT_TX_TYPE_ID, #[cfg(all(feature = "scroll", not(feature = "optimism")))] - TxType::L1Message => reth_scroll_primitives::L1_MESSAGE_TRANSACTION_TYPE, + TxType::L1Message => scroll_alloy_consensus::L1_MESSAGE_TRANSACTION_TYPE, } } } @@ -207,7 +207,7 @@ impl reth_codecs::Compact for TxType { } #[cfg(all(feature = "scroll", not(feature = "optimism")))] Self::L1Message => { - buf.put_u8(reth_scroll_primitives::L1_MESSAGE_TRANSACTION_TYPE); + buf.put_u8(scroll_alloy_consensus::L1_MESSAGE_TRANSACTION_TYPE); COMPACT_EXTENDED_IDENTIFIER_FLAG } } @@ -231,7 +231,7 @@ impl reth_codecs::Compact for TxType { #[cfg(all(feature = "optimism", not(feature = "scroll")))] op_alloy_consensus::DEPOSIT_TX_TYPE_ID => Self::Deposit, #[cfg(all(feature = "scroll", not(feature = "optimism")))] - reth_scroll_primitives::L1_MESSAGE_TRANSACTION_TYPE => Self::L1Message, + scroll_alloy_consensus::L1_MESSAGE_TRANSACTION_TYPE => Self::L1Message, _ => panic!("Unsupported TxType identifier: {extended_identifier}"), } } @@ -278,6 +278,7 @@ mod tests { use alloy_primitives::hex; use reth_codecs::Compact; use rstest::rstest; + use scroll_alloy_consensus; #[rstest] #[case(U64::from(LEGACY_TX_TYPE_ID), Ok(TxType::Legacy))] @@ -292,7 +293,7 @@ mod tests { #[cfg_attr( all(feature = "scroll", not(feature = "optimism")), case( - U64::from(reth_scroll_primitives::L1_MESSAGE_TRANSACTION_TYPE), + U64::from(scroll_alloy_consensus::L1_MESSAGE_TRANSACTION_TYPE), Ok(TxType::L1Message) ) )] @@ -309,7 +310,7 @@ mod tests { #[case(TxType::Eip4844, COMPACT_EXTENDED_IDENTIFIER_FLAG, vec![EIP4844_TX_TYPE_ID])] #[case(TxType::Eip7702, COMPACT_EXTENDED_IDENTIFIER_FLAG, vec![EIP7702_TX_TYPE_ID])] #[cfg_attr(all(feature = "optimism", not(feature = "scroll")), case(TxType::Deposit, COMPACT_EXTENDED_IDENTIFIER_FLAG, vec![op_alloy_consensus::DEPOSIT_TX_TYPE_ID]))] - #[cfg_attr(all(feature = "scroll", not(feature = "optimism")), case(TxType::L1Message, COMPACT_EXTENDED_IDENTIFIER_FLAG, vec![reth_scroll_primitives::L1_MESSAGE_TRANSACTION_TYPE]))] + #[cfg_attr(all(feature = "scroll", not(feature = "optimism")), case(TxType::L1Message, COMPACT_EXTENDED_IDENTIFIER_FLAG, vec![scroll_alloy_consensus::L1_MESSAGE_TRANSACTION_TYPE]))] fn test_txtype_to_compact( #[case] tx_type: TxType, #[case] expected_identifier: usize, @@ -329,7 +330,7 @@ mod tests { #[case(TxType::Eip4844, COMPACT_EXTENDED_IDENTIFIER_FLAG, vec![EIP4844_TX_TYPE_ID])] #[case(TxType::Eip7702, COMPACT_EXTENDED_IDENTIFIER_FLAG, vec![EIP7702_TX_TYPE_ID])] #[cfg_attr(all(feature = "optimism", not(feature = "scroll")), case(TxType::Deposit, COMPACT_EXTENDED_IDENTIFIER_FLAG, vec![op_alloy_consensus::DEPOSIT_TX_TYPE_ID]))] - #[cfg_attr(all(feature = "scroll", not(feature = "optimism")), case(TxType::L1Message, COMPACT_EXTENDED_IDENTIFIER_FLAG, vec![reth_scroll_primitives::L1_MESSAGE_TRANSACTION_TYPE]))] + #[cfg_attr(all(feature = "scroll", not(feature = "optimism")), case(TxType::L1Message, COMPACT_EXTENDED_IDENTIFIER_FLAG, vec![scroll_alloy_consensus::L1_MESSAGE_TRANSACTION_TYPE]))] fn test_txtype_from_compact( #[case] expected_type: TxType, #[case] identifier: usize, @@ -349,7 +350,7 @@ mod tests { #[case(&[EIP7702_TX_TYPE_ID], Ok(TxType::Eip7702))] #[case(&[u8::MAX], Err(alloy_rlp::Error::InputTooShort))] #[cfg_attr(all(feature = "optimism", not(feature = "scroll")), case(&[op_alloy_consensus::DEPOSIT_TX_TYPE_ID], Ok(TxType::Deposit)))] - #[cfg_attr(all(feature = "scroll", not(feature = "optimism")), case(&[reth_scroll_primitives::L1_MESSAGE_TRANSACTION_TYPE], Ok(TxType::L1Message)))] + #[cfg_attr(all(feature = "scroll", not(feature = "optimism")), case(&[scroll_alloy_consensus::L1_MESSAGE_TRANSACTION_TYPE], Ok(TxType::L1Message)))] fn decode_tx_type(#[case] input: &[u8], #[case] expected: Result) { let tx_type_result = TxType::decode(&mut &input[..]); assert_eq!(tx_type_result, expected) diff --git a/crates/scroll/alloy/consensus/Cargo.toml b/crates/scroll/alloy/consensus/Cargo.toml index 34c4666670f5..2452095a8f1e 100644 --- a/crates/scroll/alloy/consensus/Cargo.toml +++ b/crates/scroll/alloy/consensus/Cargo.toml @@ -24,6 +24,12 @@ derive_more = { workspace = true, features = ["display"] } # arbitrary arbitrary = { workspace = true, features = ["derive"], optional = true } +reth-codecs = { workspace = true, optional = true } +reth-codecs-derive = { workspace = true, optional = true } + +# required by reth-codecs +modular-bitfield = { workspace = true, optional = true } + # serde serde_with = { workspace = true, optional = true } alloy-serde = { workspace = true, optional = true } @@ -34,13 +40,63 @@ rand.workspace = true bincode.workspace = true serde_json.workspace = true arbitrary = { workspace = true, features = ["derive"] } -alloy-primitives = { workspace = true, features = ["rand"] } +alloy-primitives = { workspace = true, features = ["rand", "arbitrary"] } +reth-codecs = { workspace = true, features = ["test-utils"] } +proptest-arbitrary-interop.workspace = true +proptest.workspace = true +test-fuzz.workspace = true [features] -default = ["std"] -std = ["alloy-eips/std", "alloy-consensus/std", "derive_more/std"] -k256 = ["alloy-primitives/k256", "alloy-consensus/k256"] -kzg = ["alloy-eips/kzg", "alloy-consensus/kzg", "std"] -arbitrary = ["std", "dep:arbitrary", "alloy-consensus/arbitrary", "alloy-eips/arbitrary", "alloy-primitives/rand"] -serde = ["dep:serde", "dep:alloy-serde", "alloy-primitives/serde", "alloy-consensus/serde", "alloy-eips/serde"] +default = [ + "reth-codec", + "std", +] +std = [ + "serde/std", + "alloy-primitives/std", + "reth-codecs/std", + "alloy-consensus/std", + "alloy-eips/std", + "alloy-rlp/std", + "alloy-serde/std", + "proptest/std", + "rand/std", + "derive_more/std" +] + +k256 = [ + "alloy-primitives/k256", + "alloy-consensus/k256" +] + +kzg = [ + "alloy-eips/kzg", + "alloy-consensus/kzg", + "std" +] +reth-codec = [ + "dep:reth-codecs", + "dep:reth-codecs-derive", + "modular-bitfield", + "std" +] +arbitrary = [ + "std", + "dep:arbitrary", + "alloy-primitives/arbitrary", + "alloy-consensus/arbitrary", + "alloy-eips/arbitrary", + "alloy-serde/arbitrary", + "reth-codecs/arbitrary", + "alloy-primitives/rand" +] +serde = [ + "dep:serde", + "dep:alloy-serde", + "alloy-primitives/serde", + "alloy-consensus/serde", + "alloy-eips/serde", + "rand/serde", + "reth-codecs/serde" +] serde-bincode-compat = ["serde_with"] \ No newline at end of file diff --git a/crates/scroll/alloy/consensus/src/lib.rs b/crates/scroll/alloy/consensus/src/lib.rs index 1cd766873a7a..1bee308475ab 100644 --- a/crates/scroll/alloy/consensus/src/lib.rs +++ b/crates/scroll/alloy/consensus/src/lib.rs @@ -10,7 +10,7 @@ mod transaction; pub use transaction::{ ScrollL1MessageTransactionFields, ScrollTxEnvelope, ScrollTxType, ScrollTypedTransaction, - TxL1Message, L1_MESSAGE_TX_TYPE_ID, + TxL1Message, L1_MESSAGE_TRANSACTION_TYPE, L1_MESSAGE_TX_TYPE_ID, }; mod receipt; diff --git a/crates/scroll/alloy/consensus/src/transaction/l1_message.rs b/crates/scroll/alloy/consensus/src/transaction/l1_message.rs index ff36efaa13a3..44fa84eaf4b4 100644 --- a/crates/scroll/alloy/consensus/src/transaction/l1_message.rs +++ b/crates/scroll/alloy/consensus/src/transaction/l1_message.rs @@ -10,9 +10,11 @@ use alloy_primitives::{ }; use alloy_rlp::Decodable; use serde::{Deserialize, Serialize}; +#[cfg(any(test, feature = "reth-codec"))] +use {reth_codecs::Compact, reth_codecs_derive::add_arbitrary_tests}; /// L1 message transaction type id, 0x7e in hex. -const L1_MESSAGE_TRANSACTION_TYPE: u8 = 126; +pub const L1_MESSAGE_TRANSACTION_TYPE: u8 = 126; /// A message transaction sent from the settlement layer to the L2 for execution. /// @@ -25,10 +27,12 @@ const L1_MESSAGE_TRANSACTION_TYPE: u8 = 126; /// types require optional serialization for RPC compatibility. Since `TxL1Message` doesn't /// contain optionally serializable fields, no `bincode` compatible bridge implementation is /// required. -#[derive(Debug, Clone, PartialEq, Eq, Hash, Default)] -#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] -#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] -#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] +#[derive(Clone, Debug, Default, PartialEq, Eq, Hash)] +#[cfg_attr(any(test, feature = "serde"), derive(serde::Serialize, serde::Deserialize))] +#[cfg_attr(any(test, feature = "serde"), serde(rename_all = "camelCase"))] +#[cfg_attr(any(test, feature = "arbitrary"), derive(arbitrary::Arbitrary))] +#[cfg_attr(any(test, feature = "reth-codec"), derive(Compact))] +#[cfg_attr(any(test, feature = "reth-codec"), add_arbitrary_tests(compact, rlp))] pub struct TxL1Message { /// The queue index of the message in the L1 contract queue. #[cfg_attr(feature = "serde", serde(with = "alloy_serde::quantity"))] diff --git a/crates/scroll/alloy/consensus/src/transaction/mod.rs b/crates/scroll/alloy/consensus/src/transaction/mod.rs index 4509976c4ced..f3df9d73c3c5 100644 --- a/crates/scroll/alloy/consensus/src/transaction/mod.rs +++ b/crates/scroll/alloy/consensus/src/transaction/mod.rs @@ -7,7 +7,7 @@ mod envelope; pub use envelope::ScrollTxEnvelope; mod l1_message; -pub use l1_message::{ScrollL1MessageTransactionFields, TxL1Message}; +pub use l1_message::{ScrollL1MessageTransactionFields, TxL1Message, L1_MESSAGE_TRANSACTION_TYPE}; mod typed; pub use typed::ScrollTypedTransaction; diff --git a/crates/scroll/alloy/rpc-types/src/transaction.rs b/crates/scroll/alloy/rpc-types/src/transaction.rs index 3bb0792d3b2a..bab192f7de08 100644 --- a/crates/scroll/alloy/rpc-types/src/transaction.rs +++ b/crates/scroll/alloy/rpc-types/src/transaction.rs @@ -26,7 +26,7 @@ pub struct Transaction { pub sender: Option
, /// queue index for deposit transactions - pub queue_index: Option, + pub queue_index: Option, } impl Typed2718 for Transaction { @@ -178,7 +178,7 @@ mod tx_serde { )] effective_gas_price: Option, #[serde(default, rename = "queueIndex", skip_serializing_if = "Option::is_none")] - queue_index: Option, + queue_index: Option, #[serde(default, skip_serializing_if = "Option::is_none")] sender: Option
, } @@ -275,7 +275,6 @@ mod tx_serde { #[cfg(test)] mod tests { use super::*; - use alloy_primitives::U256; #[test] fn can_deserialize_deposit() { @@ -289,7 +288,7 @@ mod tests { panic!("Expected deposit transaction"); }; assert_eq!(tx.from, inner.sender); - assert_eq!(tx.queue_index, Some(U256::from(0xe7ba0))); + assert_eq!(tx.queue_index, Some(0xe7ba0)); assert_eq!(tx.inner.effective_gas_price, Some(0)); let deserialized = serde_json::to_value(&tx).unwrap(); diff --git a/crates/scroll/primitives/Cargo.toml b/crates/scroll/primitives/Cargo.toml index 2ee8780f88a0..c5efb72b694d 100644 --- a/crates/scroll/primitives/Cargo.toml +++ b/crates/scroll/primitives/Cargo.toml @@ -13,21 +13,15 @@ workspace = true [dependencies] # alloy -alloy-consensus.workspace = true -alloy-eips.workspace = true alloy-primitives.workspace = true -alloy-rlp.workspace = true -alloy-serde.workspace = true # reth reth-codecs = { workspace = true, optional = true } -reth-codecs-derive = { workspace = true, optional = true } # scroll poseidon-bn254 = { workspace = true, features = ["bn254"], optional = true } # required by reth-codecs -bytes.workspace = true modular-bitfield = { workspace = true, optional = true } serde.workspace = true @@ -37,51 +31,32 @@ arbitrary = { workspace = true, features = ["derive"], optional = true } [dev-dependencies] alloy-primitives = { workspace = true, features = ["arbitrary"] } arbitrary = { workspace = true, features = ["derive"] } -bincode.workspace = true -rand.workspace = true reth-codecs = { workspace = true, features = ["test-utils"] } -proptest-arbitrary-interop.workspace = true -proptest.workspace = true test-fuzz.workspace = true [features] default = [ - "reth-codec", - "std" + "reth-codec", + "std" ] std = [ - "serde/std", - "alloy-primitives/std", - "reth-codecs/std", - "alloy-consensus/std", - "alloy-eips/std", - "alloy-rlp/std", - "alloy-serde/std", - "bytes/std", - "proptest/std", - "rand/std" + "serde/std", + "alloy-primitives/std", + "reth-codecs/std", ] arbitrary = [ - "dep:arbitrary", - "alloy-primitives/arbitrary", - "alloy-consensus/arbitrary", - "alloy-eips/arbitrary", - "alloy-serde/arbitrary", - "reth-codecs/arbitrary" + "dep:arbitrary", + "alloy-primitives/arbitrary", + "reth-codecs/arbitrary" ] reth-codec = [ - "dep:reth-codecs", - "dep:reth-codecs-derive", - "modular-bitfield", - "std" + "dep:reth-codecs", + "modular-bitfield", + "std" ] serde = [ - "alloy-primitives/serde", - "alloy-consensus/serde", - "alloy-eips/serde", - "bytes/serde", - "rand/serde", - "reth-codecs/serde" + "alloy-primitives/serde", + "reth-codecs/serde" ] poseidon = ["dep:poseidon-bn254"] diff --git a/crates/scroll/rpc/src/eth/transaction.rs b/crates/scroll/rpc/src/eth/transaction.rs index 59a212a72a64..31ff0bd98cd7 100644 --- a/crates/scroll/rpc/src/eth/transaction.rs +++ b/crates/scroll/rpc/src/eth/transaction.rs @@ -1,8 +1,8 @@ //! Loads and formats Scroll transaction RPC response. use alloy_consensus::{Signed, Transaction as _}; -use alloy_primitives::{PrimitiveSignature as Signature, Sealable, Sealed}; -use alloy_rpc_types_eth::{Transaction, TransactionInfo}; +use alloy_primitives::{Address, PrimitiveSignature as Signature, Sealable, Sealed}; +use alloy_rpc_types_eth::TransactionInfo; use reth_node_api::FullNodeComponents; use reth_primitives::{RecoveredTx, TransactionSigned}; use reth_provider::{ReceiptProvider, TransactionsProvider}; @@ -14,6 +14,7 @@ use reth_rpc_eth_types::EthApiError; use reth_transaction_pool::TransactionPool; use scroll_alloy_consensus::ScrollTxEnvelope; +use scroll_alloy_rpc_types::Transaction; use crate::{eth::ScrollNodeCore, ScrollEthApi, ScrollEthApiError}; @@ -40,6 +41,8 @@ where let from = tx.signer(); let hash = tx.hash(); let TransactionSigned { transaction, signature, .. } = tx.into_signed(); + let mut tx_sender: Address; + let mut tx_queue_index: u64; let inner = match transaction { reth_primitives::Transaction::Legacy(tx) => { @@ -54,6 +57,8 @@ where reth_primitives::Transaction::Eip4844(_) => unreachable!(), reth_primitives::Transaction::Eip7702(tx) => unreachable!(), reth_primitives::Transaction::L1Message(tx) => { + tx_queue_index = tx.queue_index; + tx_sender = tx.sender; ScrollTxEnvelope::L1Message(tx.seal_unchecked(hash)) } }; @@ -76,12 +81,16 @@ where }; Ok(Transaction { - inner, - block_hash, - block_number, - transaction_index, - from, - effective_gas_price: Some(effective_gas_price), + inner: alloy_rpc_types_eth::Transaction { + inner, + block_hash, + block_number, + transaction_index, + from, + effective_gas_price: Some(effective_gas_price), + }, + sender: Some(tx_sender), + queue_index: Some(tx_queue_index), }) } From fdbbd9440439d73dec2c747c524d10b75ac9779a Mon Sep 17 00:00:00 2001 From: georgehao Date: Wed, 8 Jan 2025 10:26:50 +0800 Subject: [PATCH 22/86] fix scroll cippy --- crates/scroll/rpc/src/error.rs | 4 +--- crates/scroll/rpc/src/eth/call.rs | 4 ++-- crates/scroll/rpc/src/eth/mod.rs | 20 +++++++++++--------- crates/scroll/rpc/src/eth/pending_block.rs | 7 +++---- crates/scroll/rpc/src/eth/receipt.rs | 1 - crates/scroll/rpc/src/eth/transaction.rs | 19 ++++++++++--------- 6 files changed, 27 insertions(+), 28 deletions(-) diff --git a/crates/scroll/rpc/src/error.rs b/crates/scroll/rpc/src/error.rs index ee607b32d62b..8d1d3e0507ec 100644 --- a/crates/scroll/rpc/src/error.rs +++ b/crates/scroll/rpc/src/error.rs @@ -68,9 +68,7 @@ impl TryFrom for ScrollInvalidTransactionError { type Error = InvalidTransaction; fn try_from(err: InvalidTransaction) -> Result { - match err { - _ => Err(err), - } + Err(err) } } diff --git a/crates/scroll/rpc/src/eth/call.rs b/crates/scroll/rpc/src/eth/call.rs index 1903af56315a..e11399665d8b 100644 --- a/crates/scroll/rpc/src/eth/call.rs +++ b/crates/scroll/rpc/src/eth/call.rs @@ -7,7 +7,7 @@ use reth_rpc_eth_api::{ FromEthApiError, FullEthApiTypes, IntoEthApiError, }; use reth_rpc_eth_types::{revm_utils::CallFees, RpcInvalidTransactionError}; -use revm::primitives::{BlockEnv, ScrollFields, TxEnv}; +use revm::primitives::{BlockEnv, TxEnv}; use super::ScrollNodeCore; use crate::{ScrollEthApi, ScrollEthApiError}; @@ -103,7 +103,7 @@ where blob_hashes: blob_versioned_hashes.unwrap_or_default(), max_fee_per_blob_gas, authorization_list: authorization_list.map(Into::into), - scroll: ScrollFields { ..Default::default() }, + scroll: Default::default(), }; Ok(env) diff --git a/crates/scroll/rpc/src/eth/mod.rs b/crates/scroll/rpc/src/eth/mod.rs index db57d369c57e..41b9dc4b76b0 100644 --- a/crates/scroll/rpc/src/eth/mod.rs +++ b/crates/scroll/rpc/src/eth/mod.rs @@ -6,12 +6,12 @@ use alloy_primitives::U256; use reth_chainspec::{EthChainSpec, EthereumHardforks}; use reth_evm::ConfigureEvm; use reth_network_api::NetworkInfo; +use reth_node_api::NodePrimitives; use reth_node_builder::EthApiBuilderCtx; -use reth_primitives::EthPrimitives; use reth_provider::{ BlockNumReader, BlockReader, BlockReaderIdExt, CanonStateSubscriptions, ChainSpecProvider, - EvmEnvProvider, ProviderBlock, ProviderHeader, ProviderReceipt, ProviderTx, - StageCheckpointReader, StateProviderFactory, + EvmEnvProvider, NodePrimitivesProvider, ProviderBlock, ProviderHeader, ProviderReceipt, + ProviderTx, StageCheckpointReader, StateProviderFactory, }; use reth_rpc::eth::{core::EthApiInner, DevSigner}; use reth_rpc_eth_api::{ @@ -35,8 +35,8 @@ use crate::ScrollEthApiError; mod block; mod call; mod pending_block; -mod receipt; -mod transaction; +pub mod receipt; +pub mod transaction; /// Adapter for [`EthApiInner`], which holds all the data required to serve core `eth_` API. pub type EthApiNodeBackend = EthApiInner< @@ -69,9 +69,11 @@ pub struct ScrollEthApi { impl ScrollEthApi where N: ScrollNodeCore< - Provider: BlockReaderIdExt - + ChainSpecProvider - + CanonStateSubscriptions + Provider: BlockReaderIdExt< + Block = <::Primitives as NodePrimitives>::Block, + Receipt = <::Primitives as NodePrimitives>::Receipt, + > + ChainSpecProvider + + CanonStateSubscriptions + Clone + 'static, >, @@ -97,7 +99,7 @@ where ctx.config.proof_permits, ); - Self { inner: Arc::new(inner) } + Self { inner: Arc::new(ScrollEthApiInner { eth_api: inner }) } } } diff --git a/crates/scroll/rpc/src/eth/pending_block.rs b/crates/scroll/rpc/src/eth/pending_block.rs index 93e0cee8d4f6..7dacd720d11b 100644 --- a/crates/scroll/rpc/src/eth/pending_block.rs +++ b/crates/scroll/rpc/src/eth/pending_block.rs @@ -1,8 +1,7 @@ //! Loads Scroll pending block for an RPC response. use alloy_consensus::{ - constants::EMPTY_WITHDRAWALS, proofs::calculate_transaction_root, BlockHeader, Header, - EMPTY_OMMER_ROOT_HASH, + constants::EMPTY_WITHDRAWALS, proofs::calculate_transaction_root, Header, EMPTY_OMMER_ROOT_HASH, }; use alloy_eips::{eip7685::EMPTY_REQUESTS_HASH, merge::BEACON_NONCE}; use alloy_primitives::{logs_bloom, B256, U256}; @@ -12,8 +11,8 @@ use reth_primitives::{ proofs::calculate_receipt_root_no_memo, BlockBody, Receipt, TransactionSigned, }; use reth_provider::{ - BlockReader, BlockReaderIdExt, ChainSpecProvider, EvmEnvProvider, ProviderBlock, - ProviderHeader, ProviderReceipt, ProviderTx, StateProviderFactory, + BlockReaderIdExt, ChainSpecProvider, EvmEnvProvider, ProviderBlock, ProviderHeader, + ProviderReceipt, ProviderTx, StateProviderFactory, }; use reth_rpc_eth_api::{ helpers::{LoadPendingBlock, SpawnBlocking}, diff --git a/crates/scroll/rpc/src/eth/receipt.rs b/crates/scroll/rpc/src/eth/receipt.rs index 1a574d1769fe..c72ea61ecbb2 100644 --- a/crates/scroll/rpc/src/eth/receipt.rs +++ b/crates/scroll/rpc/src/eth/receipt.rs @@ -57,7 +57,6 @@ impl ScrollReceiptBuilder { receipt: &Receipt, all_receipts: &[Receipt], ) -> Result { - let timestamp = meta.timestamp; let core_receipt = build_receipt(transaction, meta, receipt, all_receipts, |receipt_with_bloom| { match receipt.tx_type { diff --git a/crates/scroll/rpc/src/eth/transaction.rs b/crates/scroll/rpc/src/eth/transaction.rs index 31ff0bd98cd7..c997591b07e8 100644 --- a/crates/scroll/rpc/src/eth/transaction.rs +++ b/crates/scroll/rpc/src/eth/transaction.rs @@ -1,7 +1,7 @@ //! Loads and formats Scroll transaction RPC response. use alloy_consensus::{Signed, Transaction as _}; -use alloy_primitives::{Address, PrimitiveSignature as Signature, Sealable, Sealed}; +use alloy_primitives::{PrimitiveSignature as Signature, Sealable, Sealed}; use alloy_rpc_types_eth::TransactionInfo; use reth_node_api::FullNodeComponents; use reth_primitives::{RecoveredTx, TransactionSigned}; @@ -41,8 +41,8 @@ where let from = tx.signer(); let hash = tx.hash(); let TransactionSigned { transaction, signature, .. } = tx.into_signed(); - let mut tx_sender: Address; - let mut tx_queue_index: u64; + let mut tx_sender = None; + let mut tx_queue_index = None; let inner = match transaction { reth_primitives::Transaction::Legacy(tx) => { @@ -54,11 +54,12 @@ where reth_primitives::Transaction::Eip1559(tx) => { Signed::new_unchecked(tx, signature, hash).into() } - reth_primitives::Transaction::Eip4844(_) => unreachable!(), - reth_primitives::Transaction::Eip7702(tx) => unreachable!(), + reth_primitives::Transaction::Eip4844(_) | reth_primitives::Transaction::Eip7702(_) => { + unreachable!() + } reth_primitives::Transaction::L1Message(tx) => { - tx_queue_index = tx.queue_index; - tx_sender = tx.sender; + tx_queue_index = Some(tx.queue_index); + tx_sender = Some(tx.sender); ScrollTxEnvelope::L1Message(tx.seal_unchecked(hash)) } }; @@ -89,8 +90,8 @@ where from, effective_gas_price: Some(effective_gas_price), }, - sender: Some(tx_sender), - queue_index: Some(tx_queue_index), + sender: tx_sender, + queue_index: tx_queue_index, }) } From 8cad4fb25ef4df42011c0708c28fce5939c3efe1 Mon Sep 17 00:00:00 2001 From: georgehao Date: Wed, 8 Jan 2025 12:08:04 +0800 Subject: [PATCH 23/86] fix lint&& clippy --- crates/primitives/Cargo.toml | 6 ++++-- crates/primitives/src/lib.rs | 2 ++ crates/primitives/src/transaction/tx_type.rs | 1 - crates/scroll/alloy/rpc-types/Cargo.toml | 2 ++ 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/crates/primitives/Cargo.toml b/crates/primitives/Cargo.toml index 0fa05fcdfced..6227216d182f 100644 --- a/crates/primitives/Cargo.toml +++ b/crates/primitives/Cargo.toml @@ -32,7 +32,7 @@ alloy-trie = { workspace = true, features = ["serde"] } # scroll revm-primitives = { package = "reth-scroll-revm", path = "../scroll/revm", features = ["serde"] } reth-scroll-primitives = { workspace = true, optional = true, features = ["serde"] } -scroll-alloy-consensus.workspace = true +scroll-alloy-consensus = { workspace = true, optional = true, features = ["serde", "arbitrary"] } # optimism op-alloy-rpc-types = { workspace = true, optional = true } @@ -147,7 +147,7 @@ arbitrary = [ "reth-trie-common/arbitrary", "dep:secp256k1", "reth-scroll-primitives?/arbitrary", - "scroll-alloy-consensus/arbitrary" + "scroll-alloy-consensus?/arbitrary" ] secp256k1 = [ "reth-primitives-traits/secp256k1", @@ -182,10 +182,12 @@ serde-bincode-compat = [ "alloy-eips/serde-bincode-compat", "alloy-consensus/serde-bincode-compat", "op-alloy-consensus?/serde-bincode-compat", + "scroll-alloy-consensus?/serde-bincode-compat", "reth-primitives-traits/serde-bincode-compat", "reth-trie-common/serde-bincode-compat", ] scroll = [ + "dep:scroll-alloy-consensus", "reth-trie-common/scroll", "reth-primitives-traits/scroll", "reth-testing-utils/scroll", diff --git a/crates/primitives/src/lib.rs b/crates/primitives/src/lib.rs index 6e7d1d04dcb0..a453c58c69f1 100644 --- a/crates/primitives/src/lib.rs +++ b/crates/primitives/src/lib.rs @@ -23,6 +23,8 @@ use op_alloy_consensus as _; #[cfg(feature = "scroll")] use reth_scroll_primitives as _; +#[cfg(feature = "scroll")] +use scroll_alloy_consensus as _; extern crate alloc; diff --git a/crates/primitives/src/transaction/tx_type.rs b/crates/primitives/src/transaction/tx_type.rs index 06fd0e882b04..852bbb3ea64c 100644 --- a/crates/primitives/src/transaction/tx_type.rs +++ b/crates/primitives/src/transaction/tx_type.rs @@ -278,7 +278,6 @@ mod tests { use alloy_primitives::hex; use reth_codecs::Compact; use rstest::rstest; - use scroll_alloy_consensus; #[rstest] #[case(U64::from(LEGACY_TX_TYPE_ID), Ok(TxType::Legacy))] diff --git a/crates/scroll/alloy/rpc-types/Cargo.toml b/crates/scroll/alloy/rpc-types/Cargo.toml index 7d93b49d543b..7ca99def5254 100644 --- a/crates/scroll/alloy/rpc-types/Cargo.toml +++ b/crates/scroll/alloy/rpc-types/Cargo.toml @@ -100,10 +100,12 @@ arbitrary = [ "dep:arbitrary", "alloy-primitives/arbitrary", "alloy-rpc-types-eth/arbitrary", + "scroll-alloy-consensus/arbitrary" ] default = ["std"] k256 = [ "alloy-rpc-types-eth/k256", + "scroll-alloy-consensus/k256" ] std = [ "alloy-network-primitives/std", From 672e718472e27dfe863241ed5e882988447b7203 Mon Sep 17 00:00:00 2001 From: georgehao Date: Wed, 8 Jan 2025 17:53:38 +0800 Subject: [PATCH 24/86] fix lint --- Cargo.lock | 616 +++++++----------- Makefile | 14 +- crates/primitives/src/transaction/mod.rs | 2 +- .../alloy/consensus/src/receipt/envelope.rs | 8 +- crates/scroll/alloy/rpc-types/Cargo.toml | 14 +- crates/scroll/alloy/rpc-types/src/receipt.rs | 6 +- crates/scroll/rpc/src/eth/mod.rs | 5 +- crates/scroll/rpc/src/eth/pending_block.rs | 8 +- 8 files changed, 285 insertions(+), 388 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f2470cd0c63d..58642bfeb339 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -119,36 +119,16 @@ dependencies = [ "strum 0.26.3", ] -[[package]] -name = "alloy-consensus" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88e1edea70787c33e11197d3f32ae380f3db19e6e061e539a5bcf8184a6b326" -dependencies = [ - "alloy-eips 0.8.3", - "alloy-primitives", - "alloy-rlp", - "alloy-serde 0.8.3", - "alloy-trie", - "arbitrary", - "auto_impl", - "c-kzg", - "derive_more", - "k256", - "rand 0.8.5", - "serde", -] - [[package]] name = "alloy-consensus" version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d802a6d579d924a2926d181bce43231aaab4699a7c206197e88fbc6b9dda846f" dependencies = [ - "alloy-eips 0.9.1", + "alloy-eips", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.9.1", + "alloy-serde", "alloy-trie", "arbitrary", "auto_impl", @@ -160,29 +140,17 @@ dependencies = [ "serde_with", ] -[[package]] -name = "alloy-consensus-any" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57b1bb53f40c0273cd1975573cd457b39213e68584e36d1401d25fd0398a1d65" -dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", - "alloy-primitives", - "alloy-rlp", -] - [[package]] name = "alloy-consensus-any" version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24b1bcb3e4810bff7e2a62ac0d741c70a7b5560e57b76eb0f0d33e1070735c60" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.9.1", + "alloy-serde", "serde", ] @@ -195,10 +163,10 @@ dependencies = [ "alloy-dyn-abi", "alloy-json-abi", "alloy-network", - "alloy-network-primitives 0.9.1", + "alloy-network-primitives", "alloy-primitives", "alloy-provider", - "alloy-rpc-types-eth 0.9.1", + "alloy-rpc-types-eth", "alloy-sol-types", "alloy-transport", "futures", @@ -236,21 +204,6 @@ dependencies = [ "serde", ] -[[package]] -name = "alloy-eip7702" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c986539255fb839d1533c128e190e557e52ff652c9ef62939e233a81dd93f7e" -dependencies = [ - "alloy-primitives", - "alloy-rlp", - "arbitrary", - "derive_more", - "k256", - "rand 0.8.5", - "serde", -] - [[package]] name = "alloy-eip7702" version = "0.5.0" @@ -267,25 +220,6 @@ dependencies = [ "serde_with", ] -[[package]] -name = "alloy-eips" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f9fadfe089e9ccc0650473f2d4ef0a28bc015bbca5631d9f0f09e49b557fdb3" -dependencies = [ - "alloy-eip2930", - "alloy-eip7702 0.4.2", - "alloy-primitives", - "alloy-rlp", - "alloy-serde 0.8.3", - "arbitrary", - "c-kzg", - "derive_more", - "once_cell", - "serde", - "sha2 0.10.8", -] - [[package]] name = "alloy-eips" version = "0.9.1" @@ -293,10 +227,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "938bc1cf2ec42579e187834efc254e76dd3fa19f526b57872713e6b95f411305" dependencies = [ "alloy-eip2930", - "alloy-eip7702 0.5.0", + "alloy-eip7702", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.9.1", + "alloy-serde", "arbitrary", "c-kzg", "derive_more", @@ -313,9 +247,9 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b648eac186485ead3da160985b929e610a45eb39903f750da9b35f58a91eef52" dependencies = [ - "alloy-eips 0.9.1", + "alloy-eips", "alloy-primitives", - "alloy-serde 0.9.1", + "alloy-serde", "alloy-trie", "serde", ] @@ -352,15 +286,15 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fb5dc326960e88eec6b5e9add221a071f15cb8fa93b9e88ee9c76cd0e4e1009" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-consensus-any 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-consensus-any", + "alloy-eips", "alloy-json-rpc", - "alloy-network-primitives 0.9.1", + "alloy-network-primitives", "alloy-primitives", "alloy-rpc-types-any", - "alloy-rpc-types-eth 0.9.1", - "alloy-serde 0.9.1", + "alloy-rpc-types-eth", + "alloy-serde", "alloy-signer", "alloy-sol-types", "async-trait", @@ -371,29 +305,16 @@ dependencies = [ "thiserror 2.0.9", ] -[[package]] -name = "alloy-network-primitives" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9081c099e798b8a2bba2145eb82a9a146f01fc7a35e9ab6e7b43305051f97550" -dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", - "alloy-primitives", - "alloy-serde 0.8.3", - "serde", -] - [[package]] name = "alloy-network-primitives" version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1535c89ae0648f2c15c0bf9b8b92670f6b3b8515b645425c8b46462563c0eae4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-primitives", - "alloy-serde 0.9.1", + "alloy-serde", "serde", ] @@ -453,17 +374,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9a9d6ef38d75e4b0dce6737463099698f9b839d1c3f7c8883bfdfce8954374b" dependencies = [ "alloy-chains", - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-json-rpc", "alloy-network", - "alloy-network-primitives 0.9.1", + "alloy-network-primitives", "alloy-primitives", "alloy-pubsub", "alloy-rpc-client", "alloy-rpc-types-admin", "alloy-rpc-types-engine", - "alloy-rpc-types-eth 0.9.1", + "alloy-rpc-types-eth", "alloy-transport", "alloy-transport-http", "alloy-transport-ws", @@ -561,8 +482,8 @@ checksum = "206749723862bd27d5468270e30fc987c5b4376240aefee728d7e64282c9d146" dependencies = [ "alloy-primitives", "alloy-rpc-types-engine", - "alloy-rpc-types-eth 0.9.1", - "alloy-serde 0.9.1", + "alloy-rpc-types-eth", + "alloy-serde", "serde", ] @@ -585,8 +506,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ac98a9d17ec4d851ea38e556c27b92e1ff8c97664cf1feb77aec38dcba34579" dependencies = [ "alloy-primitives", - "alloy-rpc-types-eth 0.9.1", - "alloy-serde 0.9.1", + "alloy-rpc-types-eth", + "alloy-serde", "serde", ] @@ -596,9 +517,9 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e6ff23d7bde6ddeea4c1ca98e7a5a728326d543bd7133735c04ea83ebde41d0" dependencies = [ - "alloy-consensus-any 0.9.1", - "alloy-rpc-types-eth 0.9.1", - "alloy-serde 0.9.1", + "alloy-consensus-any", + "alloy-rpc-types-eth", + "alloy-serde", ] [[package]] @@ -607,7 +528,7 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e59d76349c11aa7fac9aadeceb65cf31d3f3430b407159b172b39d36ccb0671a" dependencies = [ - "alloy-eips 0.9.1", + "alloy-eips", "alloy-primitives", "alloy-rpc-types-engine", "ethereum_ssz", @@ -633,11 +554,11 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee96e9793d3ec528ead6e8580f24e9acc71f5c2bc35feefba24465044bb77d76" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.9.1", + "alloy-serde", "derive_more", "ethereum_ssz", "ethereum_ssz_derive", @@ -648,40 +569,19 @@ dependencies = [ "strum 0.26.3", ] -[[package]] -name = "alloy-rpc-types-eth" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8737d7a6e37ca7bba9c23e9495c6534caec6760eb24abc9d5ffbaaba147818e1" -dependencies = [ - "alloy-consensus 0.8.3", - "alloy-consensus-any 0.8.3", - "alloy-eips 0.8.3", - "alloy-network-primitives 0.8.3", - "alloy-primitives", - "alloy-rlp", - "alloy-serde 0.8.3", - "alloy-sol-types", - "arbitrary", - "derive_more", - "itertools 0.13.0", - "serde", - "serde_json", -] - [[package]] name = "alloy-rpc-types-eth" version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "319a0ca31863bd6fb9aafeaa16425d0a2f1228da44bc24fd2f997ba50afe7e18" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-consensus-any 0.9.1", - "alloy-eips 0.9.1", - "alloy-network-primitives 0.9.1", + "alloy-consensus", + "alloy-consensus-any", + "alloy-eips", + "alloy-network-primitives", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.9.1", + "alloy-serde", "alloy-sol-types", "arbitrary", "itertools 0.13.0", @@ -697,10 +597,10 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06fb874d3c1bd11f34acbf508c38409693a443ec5e18afd6bc34a7ee9a606e88" dependencies = [ - "alloy-eips 0.9.1", + "alloy-eips", "alloy-primitives", - "alloy-rpc-types-eth 0.9.1", - "alloy-serde 0.9.1", + "alloy-rpc-types-eth", + "alloy-serde", "serde", "serde_json", ] @@ -712,8 +612,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af2769894024f65ba252618e06a0ca22fc025377ade6d60d7f47a83ac9559680" dependencies = [ "alloy-primitives", - "alloy-rpc-types-eth 0.9.1", - "alloy-serde 0.9.1", + "alloy-rpc-types-eth", + "alloy-serde", "serde", "serde_json", "thiserror 2.0.9", @@ -726,23 +626,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69bfa0d7934827098cd386965a796e7765485dc86c6ae03cda262ad9ccb30e01" dependencies = [ "alloy-primitives", - "alloy-rpc-types-eth 0.9.1", - "alloy-serde 0.9.1", + "alloy-rpc-types-eth", + "alloy-serde", "serde", ] -[[package]] -name = "alloy-serde" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5851bf8d5ad33014bd0c45153c603303e730acc8a209450a7ae6b4a12c2789e2" -dependencies = [ - "alloy-primitives", - "arbitrary", - "serde", - "serde_json", -] - [[package]] name = "alloy-serde" version = "0.9.1" @@ -775,7 +663,7 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f5175bd063463e25f1ffc6daaa223db15baf4b18e3d83d0d31fb95756aab6cc" dependencies = [ - "alloy-consensus 0.9.1", + "alloy-consensus", "alloy-network", "alloy-primitives", "alloy-signer", @@ -2791,8 +2679,8 @@ dependencies = [ name = "ef-tests" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", "rayon", @@ -2973,7 +2861,7 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" name = "example-beacon-api-sidecar-fetcher" version = "0.1.0" dependencies = [ - "alloy-consensus 0.9.1", + "alloy-consensus", "alloy-primitives", "alloy-rpc-types-beacon", "clap", @@ -3023,8 +2911,8 @@ dependencies = [ name = "example-custom-beacon-withdrawals" version = "0.0.0" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-sol-macro", "alloy-sol-types", "eyre", @@ -3058,7 +2946,7 @@ dependencies = [ name = "example-custom-engine-types" version = "0.0.0" dependencies = [ - "alloy-eips 0.9.1", + "alloy-eips", "alloy-genesis", "alloy-primitives", "alloy-rpc-types", @@ -3082,7 +2970,7 @@ dependencies = [ name = "example-custom-evm" version = "0.0.0" dependencies = [ - "alloy-consensus 0.9.1", + "alloy-consensus", "alloy-genesis", "alloy-primitives", "eyre", @@ -3102,9 +2990,9 @@ dependencies = [ name = "example-custom-inspector" version = "0.0.0" dependencies = [ - "alloy-eips 0.9.1", + "alloy-eips", "alloy-primitives", - "alloy-rpc-types-eth 0.9.1", + "alloy-rpc-types-eth", "clap", "futures-util", "reth", @@ -3126,7 +3014,7 @@ dependencies = [ name = "example-custom-payload-builder" version = "0.0.0" dependencies = [ - "alloy-eips 0.9.1", + "alloy-eips", "eyre", "futures-util", "reth", @@ -3162,9 +3050,9 @@ dependencies = [ name = "example-db-access" version = "0.0.0" dependencies = [ - "alloy-consensus 0.9.1", + "alloy-consensus", "alloy-primitives", - "alloy-rpc-types-eth 0.9.1", + "alloy-rpc-types-eth", "eyre", "reth-chainspec", "reth-db", @@ -3178,7 +3066,7 @@ dependencies = [ name = "example-manual-p2p" version = "0.0.0" dependencies = [ - "alloy-consensus 0.9.1", + "alloy-consensus", "eyre", "futures", "reth-chainspec", @@ -3270,7 +3158,7 @@ dependencies = [ name = "example-stateful-precompile" version = "0.0.0" dependencies = [ - "alloy-consensus 0.9.1", + "alloy-consensus", "alloy-genesis", "alloy-primitives", "eyre", @@ -5544,11 +5432,11 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0adb232ec805af3aa35606c19329aa7dc44c4457ae318ed0b8fc7f799dd7dbfe" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.9.1", + "alloy-serde", "arbitrary", "derive_more", "serde", @@ -5562,8 +5450,8 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "84c272cfd65317538f5815c2b7059445230b050d48ebe2d0bab3e861d419a785" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-sol-types", "serde", @@ -5577,10 +5465,10 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19872a58b7acceeffb8e88ea048bee1690e7cde53068bd652976435d61fcd1de" dependencies = [ - "alloy-consensus 0.9.1", + "alloy-consensus", "alloy-network", "alloy-primitives", - "alloy-rpc-types-eth 0.9.1", + "alloy-rpc-types-eth", "alloy-signer", "op-alloy-consensus", "op-alloy-rpc-types", @@ -5593,11 +5481,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad65d040648e0963ed378e88489f5805e24fb56b7e6611362299cd4c24debeb2" dependencies = [ "alloc-no-stdlib", - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.9.1", + "alloy-serde", "async-trait", "brotli", "cfg-if", @@ -5616,7 +5504,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "36b1f2547067c5b60f3144ae1033a54ce1d11341d8327fa8f203b048d51465e9" dependencies = [ - "alloy-eips 0.9.1", + "alloy-eips", "alloy-primitives", "jsonrpsee", "op-alloy-rpc-types", @@ -5629,12 +5517,12 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e68d1a51fe3ee143f102b82f54fa237f21d12635da363276901e6d3ef6c65b7b" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", - "alloy-network-primitives 0.9.1", + "alloy-consensus", + "alloy-eips", + "alloy-network-primitives", "alloy-primitives", - "alloy-rpc-types-eth 0.9.1", - "alloy-serde 0.9.1", + "alloy-rpc-types-eth", + "alloy-serde", "arbitrary", "derive_more", "op-alloy-consensus", @@ -5648,10 +5536,10 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f8833ef149ceb74f8f25a79801d110d88ec2db32e700fa10db6c5f5b5cbb71a" dependencies = [ - "alloy-eips 0.9.1", + "alloy-eips", "alloy-primitives", "alloy-rpc-types-engine", - "alloy-serde 0.9.1", + "alloy-serde", "derive_more", "op-alloy-consensus", "op-alloy-protocol", @@ -6630,8 +6518,8 @@ dependencies = [ name = "reth" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", "alloy-rpc-types", @@ -6701,8 +6589,8 @@ dependencies = [ name = "reth-basic-payload-builder" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "futures-core", "futures-util", @@ -6727,8 +6615,8 @@ dependencies = [ name = "reth-beacon-consensus" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-genesis", "alloy-primitives", "alloy-rpc-types-engine", @@ -6783,7 +6671,7 @@ dependencies = [ name = "reth-bench" version = "1.1.4" dependencies = [ - "alloy-eips 0.9.1", + "alloy-eips", "alloy-json-rpc", "alloy-primitives", "alloy-provider", @@ -6819,8 +6707,8 @@ dependencies = [ name = "reth-blockchain-tree" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-genesis", "alloy-primitives", "aquamarine", @@ -6860,8 +6748,8 @@ dependencies = [ name = "reth-blockchain-tree-api" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "reth-consensus", "reth-execution-errors", @@ -6875,8 +6763,8 @@ dependencies = [ name = "reth-chain-state" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-signer", "alloy-signer-local", @@ -6905,8 +6793,8 @@ name = "reth-chainspec" version = "1.1.4" dependencies = [ "alloy-chains", - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-genesis", "alloy-primitives", "alloy-rlp", @@ -6939,8 +6827,8 @@ name = "reth-cli-commands" version = "1.1.4" dependencies = [ "ahash", - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", "arbitrary", @@ -7014,7 +6902,7 @@ dependencies = [ name = "reth-cli-util" version = "1.1.4" dependencies = [ - "alloy-eips 0.9.1", + "alloy-eips", "alloy-primitives", "cfg-if", "eyre", @@ -7032,8 +6920,8 @@ dependencies = [ name = "reth-codecs" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-genesis", "alloy-primitives", "alloy-trie", @@ -7082,8 +6970,8 @@ dependencies = [ name = "reth-consensus" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "auto_impl", "derive_more", @@ -7095,8 +6983,8 @@ dependencies = [ name = "reth-consensus-common" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "mockall", "rand 0.8.5", @@ -7111,12 +6999,12 @@ dependencies = [ name = "reth-consensus-debug-client" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-provider", "alloy-rpc-types-engine", - "alloy-rpc-types-eth 0.9.1", + "alloy-rpc-types-eth", "auto_impl", "eyre", "futures", @@ -7134,7 +7022,7 @@ dependencies = [ name = "reth-db" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", + "alloy-consensus", "alloy-primitives", "arbitrary", "assert_matches", @@ -7175,7 +7063,7 @@ dependencies = [ name = "reth-db-api" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", + "alloy-consensus", "alloy-genesis", "alloy-primitives", "arbitrary", @@ -7205,7 +7093,7 @@ dependencies = [ name = "reth-db-common" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", + "alloy-consensus", "alloy-genesis", "alloy-primitives", "boyer-moore-magiclen", @@ -7235,7 +7123,7 @@ dependencies = [ name = "reth-db-models" version = "1.1.4" dependencies = [ - "alloy-eips 0.9.1", + "alloy-eips", "alloy-primitives", "arbitrary", "bytes", @@ -7331,8 +7219,8 @@ dependencies = [ name = "reth-downloaders" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", "assert_matches", @@ -7370,13 +7258,13 @@ dependencies = [ name = "reth-e2e-test-utils" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-network", "alloy-primitives", "alloy-rlp", "alloy-rpc-types-engine", - "alloy-rpc-types-eth 0.9.1", + "alloy-rpc-types-eth", "alloy-signer", "alloy-signer-local", "derive_more", @@ -7448,7 +7336,7 @@ dependencies = [ name = "reth-engine-local" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", + "alloy-consensus", "alloy-primitives", "alloy-rpc-types-engine", "eyre", @@ -7479,7 +7367,7 @@ dependencies = [ name = "reth-engine-primitives" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", + "alloy-consensus", "alloy-primitives", "alloy-rpc-types-engine", "futures", @@ -7527,8 +7415,8 @@ dependencies = [ name = "reth-engine-tree" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", "alloy-rpc-types-engine", @@ -7588,8 +7476,8 @@ dependencies = [ name = "reth-engine-util" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rpc-types-engine", "eyre", @@ -7635,7 +7523,7 @@ name = "reth-eth-wire" version = "1.1.4" dependencies = [ "alloy-chains", - "alloy-eips 0.9.1", + "alloy-eips", "alloy-primitives", "alloy-rlp", "arbitrary", @@ -7672,8 +7560,8 @@ name = "reth-eth-wire-types" version = "1.1.4" dependencies = [ "alloy-chains", - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-genesis", "alloy-primitives", "alloy-rlp", @@ -7707,8 +7595,8 @@ dependencies = [ name = "reth-ethereum-consensus" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "reth-chainspec", "reth-consensus", @@ -7722,7 +7610,7 @@ dependencies = [ name = "reth-ethereum-engine-primitives" version = "1.1.4" dependencies = [ - "alloy-eips 0.9.1", + "alloy-eips", "alloy-primitives", "alloy-rlp", "alloy-rpc-types-engine", @@ -7743,7 +7631,7 @@ name = "reth-ethereum-forks" version = "1.1.4" dependencies = [ "alloy-chains", - "alloy-consensus 0.9.1", + "alloy-consensus", "alloy-primitives", "alloy-rlp", "arbitrary", @@ -7762,8 +7650,8 @@ dependencies = [ name = "reth-ethereum-payload-builder" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "reth-basic-payload-builder", "reth-chain-state", @@ -7788,8 +7676,8 @@ dependencies = [ name = "reth-ethereum-primitives" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", "arbitrary", @@ -7821,8 +7709,8 @@ dependencies = [ name = "reth-evm" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "auto_impl", "futures-util", @@ -7850,8 +7738,8 @@ dependencies = [ name = "reth-evm-ethereum" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-genesis", "alloy-primitives", "alloy-sol-types", @@ -7876,7 +7764,7 @@ dependencies = [ name = "reth-execution-errors" version = "1.1.4" dependencies = [ - "alloy-eips 0.9.1", + "alloy-eips", "alloy-primitives", "alloy-rlp", "nybbles", @@ -7891,8 +7779,8 @@ dependencies = [ name = "reth-execution-types" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "arbitrary", "bincode", @@ -7911,8 +7799,8 @@ dependencies = [ name = "reth-exex" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-genesis", "alloy-primitives", "eyre", @@ -7955,7 +7843,7 @@ dependencies = [ name = "reth-exex-test-utils" version = "1.1.4" dependencies = [ - "alloy-eips 0.9.1", + "alloy-eips", "eyre", "futures-util", "rand 0.8.5", @@ -7988,7 +7876,7 @@ dependencies = [ name = "reth-exex-types" version = "1.1.4" dependencies = [ - "alloy-eips 0.9.1", + "alloy-eips", "alloy-primitives", "arbitrary", "bincode", @@ -8014,7 +7902,7 @@ dependencies = [ name = "reth-invalid-block-hooks" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", + "alloy-consensus", "alloy-primitives", "alloy-rlp", "alloy-rpc-types-debug", @@ -8126,8 +8014,8 @@ dependencies = [ name = "reth-network" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-node-bindings", "alloy-primitives", "alloy-provider", @@ -8211,8 +8099,8 @@ dependencies = [ name = "reth-network-p2p" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "auto_impl", "derive_more", @@ -8301,8 +8189,8 @@ dependencies = [ name = "reth-node-builder" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rpc-types", "aquamarine", @@ -8366,8 +8254,8 @@ dependencies = [ name = "reth-node-core" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rpc-types-engine", "clap", @@ -8416,15 +8304,15 @@ dependencies = [ name = "reth-node-ethereum" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", + "alloy-consensus", "alloy-contract", - "alloy-eips 0.9.1", + "alloy-eips", "alloy-genesis", "alloy-primitives", "alloy-provider", "alloy-rpc-types-beacon", "alloy-rpc-types-engine", - "alloy-rpc-types-eth 0.9.1", + "alloy-rpc-types-eth", "alloy-signer", "alloy-sol-types", "eyre", @@ -8465,8 +8353,8 @@ dependencies = [ name = "reth-node-events" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rpc-types-engine", "derive_more", @@ -8524,8 +8412,8 @@ name = "reth-optimism-chainspec" version = "1.1.4" dependencies = [ "alloy-chains", - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-genesis", "alloy-primitives", "derive_more", @@ -8545,8 +8433,8 @@ dependencies = [ name = "reth-optimism-cli" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", "clap", @@ -8592,8 +8480,8 @@ dependencies = [ name = "reth-optimism-consensus" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-trie", "op-alloy-consensus", @@ -8612,8 +8500,8 @@ dependencies = [ name = "reth-optimism-evm" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-genesis", "alloy-primitives", "derive_more", @@ -8655,8 +8543,8 @@ dependencies = [ name = "reth-optimism-node" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-genesis", "alloy-network", "alloy-primitives", @@ -8712,8 +8600,8 @@ dependencies = [ name = "reth-optimism-payload-builder" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", "alloy-rpc-types-debug", @@ -8750,8 +8638,8 @@ dependencies = [ name = "reth-optimism-primitives" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", "arbitrary", @@ -8777,11 +8665,11 @@ dependencies = [ name = "reth-optimism-rpc" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rpc-types-debug", - "alloy-rpc-types-eth 0.9.1", + "alloy-rpc-types-eth", "jsonrpsee-core", "jsonrpsee-types", "op-alloy-consensus", @@ -8834,7 +8722,7 @@ dependencies = [ name = "reth-payload-builder" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", + "alloy-consensus", "alloy-primitives", "alloy-rpc-types", "async-trait", @@ -8870,7 +8758,7 @@ dependencies = [ name = "reth-payload-primitives" version = "1.1.4" dependencies = [ - "alloy-eips 0.9.1", + "alloy-eips", "alloy-primitives", "alloy-rpc-types-engine", "op-alloy-rpc-types-engine", @@ -8888,7 +8776,7 @@ dependencies = [ name = "reth-payload-util" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", + "alloy-consensus", "alloy-primitives", "reth-primitives", ] @@ -8907,14 +8795,14 @@ dependencies = [ name = "reth-primitives" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-genesis", "alloy-network", "alloy-primitives", "alloy-rlp", "alloy-rpc-types", - "alloy-serde 0.9.1", + "alloy-serde", "alloy-trie", "arbitrary", "assert_matches", @@ -8955,8 +8843,8 @@ dependencies = [ name = "reth-primitives-traits" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-genesis", "alloy-primitives", "alloy-rlp", @@ -8988,8 +8876,8 @@ dependencies = [ name = "reth-provider" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rpc-types-engine", "assert_matches", @@ -9039,8 +8927,8 @@ dependencies = [ name = "reth-prune" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "assert_matches", "itertools 0.13.0", @@ -9090,8 +8978,8 @@ dependencies = [ name = "reth-revm" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "reth-ethereum-forks", "reth-execution-errors", @@ -9109,9 +8997,9 @@ dependencies = [ name = "reth-rpc" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", + "alloy-consensus", "alloy-dyn-abi", - "alloy-eips 0.9.1", + "alloy-eips", "alloy-genesis", "alloy-network", "alloy-primitives", @@ -9121,11 +9009,11 @@ dependencies = [ "alloy-rpc-types-beacon", "alloy-rpc-types-debug", "alloy-rpc-types-engine", - "alloy-rpc-types-eth 0.9.1", + "alloy-rpc-types-eth", "alloy-rpc-types-mev", "alloy-rpc-types-trace", "alloy-rpc-types-txpool", - "alloy-serde 0.9.1", + "alloy-serde", "alloy-signer", "alloy-signer-local", "async-trait", @@ -9181,7 +9069,7 @@ dependencies = [ name = "reth-rpc-api" version = "1.1.4" dependencies = [ - "alloy-eips 0.9.1", + "alloy-eips", "alloy-json-rpc", "alloy-primitives", "alloy-rpc-types", @@ -9190,11 +9078,11 @@ dependencies = [ "alloy-rpc-types-beacon", "alloy-rpc-types-debug", "alloy-rpc-types-engine", - "alloy-rpc-types-eth 0.9.1", + "alloy-rpc-types-eth", "alloy-rpc-types-mev", "alloy-rpc-types-trace", "alloy-rpc-types-txpool", - "alloy-serde 0.9.1", + "alloy-serde", "jsonrpsee", "reth-engine-primitives", "reth-network-peers", @@ -9205,9 +9093,9 @@ dependencies = [ name = "reth-rpc-api-testing-util" version = "1.1.4" dependencies = [ - "alloy-eips 0.9.1", + "alloy-eips", "alloy-primitives", - "alloy-rpc-types-eth 0.9.1", + "alloy-rpc-types-eth", "alloy-rpc-types-trace", "futures", "jsonrpsee", @@ -9224,10 +9112,10 @@ dependencies = [ name = "reth-rpc-builder" version = "1.1.4" dependencies = [ - "alloy-eips 0.9.1", + "alloy-eips", "alloy-primitives", "alloy-rpc-types-engine", - "alloy-rpc-types-eth 0.9.1", + "alloy-rpc-types-eth", "alloy-rpc-types-trace", "clap", "http", @@ -9274,7 +9162,7 @@ dependencies = [ name = "reth-rpc-engine-api" version = "1.1.4" dependencies = [ - "alloy-eips 0.9.1", + "alloy-eips", "alloy-primitives", "alloy-rlp", "alloy-rpc-types-engine", @@ -9311,16 +9199,16 @@ dependencies = [ name = "reth-rpc-eth-api" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", + "alloy-consensus", "alloy-dyn-abi", - "alloy-eips 0.9.1", + "alloy-eips", "alloy-json-rpc", "alloy-network", "alloy-primitives", "alloy-rlp", - "alloy-rpc-types-eth 0.9.1", + "alloy-rpc-types-eth", "alloy-rpc-types-mev", - "alloy-serde 0.9.1", + "alloy-serde", "async-trait", "auto_impl", "dyn-clone", @@ -9356,10 +9244,10 @@ dependencies = [ name = "reth-rpc-eth-types" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-primitives", - "alloy-rpc-types-eth 0.9.1", + "alloy-rpc-types-eth", "alloy-sol-types", "derive_more", "futures", @@ -9415,7 +9303,7 @@ dependencies = [ name = "reth-rpc-server-types" version = "1.1.4" dependencies = [ - "alloy-eips 0.9.1", + "alloy-eips", "alloy-primitives", "alloy-rpc-types-engine", "jsonrpsee-core", @@ -9430,11 +9318,11 @@ dependencies = [ name = "reth-rpc-types-compat" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rpc-types-engine", - "alloy-rpc-types-eth 0.9.1", + "alloy-rpc-types-eth", "jsonrpsee-types", "reth-primitives", "reth-primitives-traits", @@ -9447,11 +9335,11 @@ name = "reth-scroll-chainspec" version = "1.1.4" dependencies = [ "alloy-chains", - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-genesis", "alloy-primitives", - "alloy-serde 0.9.1", + "alloy-serde", "derive_more", "once_cell", "reth-chainspec", @@ -9469,7 +9357,7 @@ dependencies = [ name = "reth-scroll-cli" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", + "alloy-consensus", "clap", "eyre", "reth-cli", @@ -9500,8 +9388,8 @@ dependencies = [ name = "reth-scroll-engine" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-rlp", "alloy-rpc-types-engine", "reth-primitives", @@ -9513,8 +9401,8 @@ dependencies = [ name = "reth-scroll-evm" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "auto_impl", "derive_more", "eyre", @@ -9611,11 +9499,11 @@ dependencies = [ name = "reth-scroll-rpc" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rpc-types-debug", - "alloy-rpc-types-eth 0.9.1", + "alloy-rpc-types-eth", "derive_more", "jsonrpsee-core", "jsonrpsee-types", @@ -9656,7 +9544,7 @@ dependencies = [ name = "reth-scroll-state-commitment" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", + "alloy-consensus", "alloy-genesis", "alloy-primitives", "alloy-rlp", @@ -9719,8 +9607,8 @@ dependencies = [ name = "reth-stages" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", "assert_matches", @@ -9772,7 +9660,7 @@ dependencies = [ name = "reth-stages-api" version = "1.1.4" dependencies = [ - "alloy-eips 0.9.1", + "alloy-eips", "alloy-primitives", "aquamarine", "assert_matches", @@ -9854,8 +9742,8 @@ dependencies = [ name = "reth-storage-api" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rpc-types-engine", "auto_impl", @@ -9878,7 +9766,7 @@ dependencies = [ name = "reth-storage-errors" version = "1.1.4" dependencies = [ - "alloy-eips 0.9.1", + "alloy-eips", "alloy-primitives", "alloy-rlp", "derive_more", @@ -9909,8 +9797,8 @@ dependencies = [ name = "reth-testing-utils" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-genesis", "alloy-primitives", "rand 0.8.5", @@ -9946,8 +9834,8 @@ dependencies = [ name = "reth-transaction-pool" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", "aquamarine", @@ -9994,8 +9882,8 @@ dependencies = [ name = "reth-trie" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", "alloy-trie", @@ -10024,12 +9912,12 @@ dependencies = [ name = "reth-trie-common" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", + "alloy-consensus", "alloy-genesis", "alloy-primitives", "alloy-rlp", - "alloy-rpc-types-eth 0.9.1", - "alloy-serde 0.9.1", + "alloy-rpc-types-eth", + "alloy-serde", "alloy-trie", "arbitrary", "bincode", @@ -10055,7 +9943,7 @@ dependencies = [ name = "reth-trie-db" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", + "alloy-consensus", "alloy-primitives", "alloy-rlp", "derive_more", @@ -10160,7 +10048,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc873bc873e12a1723493e1a35804fa79b673a0bfb1c19cfee659d46def8be42" dependencies = [ "alloy-primitives", - "alloy-rpc-types-eth 0.9.1", + "alloy-rpc-types-eth", "alloy-rpc-types-trace", "alloy-sol-types", "anstyle", @@ -10207,7 +10095,7 @@ version = "15.1.0" source = "git+https://github.com/scroll-tech/revm.git?branch=scroll-evm-executor/reth/v51#5cdeabaddd7fffa153e39de689d998a739eb404a" dependencies = [ "alloy-eip2930", - "alloy-eip7702 0.5.0", + "alloy-eip7702", "alloy-primitives", "auto_impl", "bitflags 2.6.0", @@ -10637,11 +10525,11 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" name = "scroll-alloy-consensus" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", - "alloy-eips 0.9.1", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.9.1", + "alloy-serde", "arbitrary", "bincode", "derive_more", @@ -10661,10 +10549,10 @@ dependencies = [ name = "scroll-alloy-network" version = "1.1.4" dependencies = [ - "alloy-consensus 0.9.1", + "alloy-consensus", "alloy-network", "alloy-primitives", - "alloy-rpc-types-eth 0.9.1", + "alloy-rpc-types-eth", "alloy-signer", "scroll-alloy-consensus", "scroll-alloy-rpc-types", @@ -10674,12 +10562,12 @@ dependencies = [ name = "scroll-alloy-rpc-types" version = "1.1.4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", - "alloy-network-primitives 0.8.3", + "alloy-consensus", + "alloy-eips", + "alloy-network-primitives", "alloy-primitives", - "alloy-rpc-types-eth 0.8.3", - "alloy-serde 0.8.3", + "alloy-rpc-types-eth", + "alloy-serde", "arbitrary", "derive_more", "scroll-alloy-consensus", diff --git a/Makefile b/Makefile index 5c658d867836..94cc46607a6c 100644 --- a/Makefile +++ b/Makefile @@ -401,6 +401,17 @@ lint-scroll-reth: --features "scroll $(BIN_OTHER_FEATURES)" \ -- -D warnings +lint-all: + cargo +nightly clippy \ + --workspace \ + --lib \ + --examples \ + --tests \ + --benches \ + --all-features \ + --locked + + lint-codespell: ensure-codespell codespell --skip "*.json" @@ -416,7 +427,8 @@ lint: make lint-op-reth && \ make lint-scroll-reth && \ make lint-other-targets && \ - make lint-codespell + make lint-codespell && \ + make lint-all fix-lint-reth: cargo +nightly clippy \ diff --git a/crates/primitives/src/transaction/mod.rs b/crates/primitives/src/transaction/mod.rs index e66647fe209b..276df3b08ae6 100644 --- a/crates/primitives/src/transaction/mod.rs +++ b/crates/primitives/src/transaction/mod.rs @@ -1225,7 +1225,7 @@ impl reth_primitives_traits::FillTxEnv for TransactionSigned { tx_env.gas_limit = tx.gas_limit; tx_env.gas_price = U256::ZERO; tx_env.gas_priority_fee = None; - tx_env.transact_to = tx.to(); + tx_env.transact_to = TxKind::Call(tx.to); tx_env.value = tx.value; tx_env.data = tx.input.clone(); tx_env.chain_id = None; diff --git a/crates/scroll/alloy/consensus/src/receipt/envelope.rs b/crates/scroll/alloy/consensus/src/receipt/envelope.rs index cb2729ec0b1c..83d9f7652f28 100644 --- a/crates/scroll/alloy/consensus/src/receipt/envelope.rs +++ b/crates/scroll/alloy/consensus/src/receipt/envelope.rs @@ -43,7 +43,7 @@ impl ScrollReceiptEnvelope { /// Creates a new [`ScrollReceiptEnvelope`] from the given parts. pub fn from_parts<'a>( status: bool, - cumulative_gas_used: u128, + cumulative_gas_used: u64, logs: impl IntoIterator, tx_type: ScrollTxType, ) -> Self { @@ -90,7 +90,7 @@ impl ScrollReceiptEnvelope { } /// Returns the cumulative gas used at this receipt. - pub fn cumulative_gas_used(&self) -> u128 { + pub fn cumulative_gas_used(&self) -> u64 { self.as_receipt().unwrap().cumulative_gas_used } @@ -179,7 +179,7 @@ where } /// Returns the cumulative gas used at this receipt. - fn cumulative_gas_used(&self) -> u128 { + fn cumulative_gas_used(&self) -> u64 { self.as_receipt().unwrap().cumulative_gas_used } @@ -290,7 +290,7 @@ mod tests { let receipt = ScrollReceiptEnvelope::Legacy(ReceiptWithBloom { receipt: Receipt { status: false.into(), - cumulative_gas_used: 0x1u128, + cumulative_gas_used: 0x1, logs: vec![Log { address: address!("0000000000000000000000000000000000000011"), data: LogData::new_unchecked( diff --git a/crates/scroll/alloy/rpc-types/Cargo.toml b/crates/scroll/alloy/rpc-types/Cargo.toml index 7ca99def5254..2b3cbd846b29 100644 --- a/crates/scroll/alloy/rpc-types/Cargo.toml +++ b/crates/scroll/alloy/rpc-types/Cargo.toml @@ -16,16 +16,16 @@ workspace = true features = ["serde"] [dependencies.alloy-consensus] -version = "0.8.3" +version = "0.9.0" default-features = false [dependencies.alloy-eips] -version = "0.8.3" +version = "0.9.0" features = ["serde"] default-features = false [dependencies.alloy-network-primitives] -version = "0.8.3" +version = "0.9.0" default-features = false [dependencies.alloy-primitives] @@ -38,12 +38,12 @@ features = [ default-features = false [dependencies.alloy-rpc-types-eth] -version = "0.8.3" +version = "0.9.0" features = ["serde"] default-features = false [dependencies.alloy-serde] -version = "0.8.3" +version = "0.9.0" default-features = false [dependencies.arbitrary] @@ -73,7 +73,7 @@ features = ["alloc"] default-features = false [dev-dependencies.alloy-consensus] -version = "0.8.3" +version = "0.9.0" features = ["arbitrary"] default-features = false @@ -83,7 +83,7 @@ features = ["arbitrary"] default-features = false [dev-dependencies.alloy-rpc-types-eth] -version = "0.8.3" +version = "0.9.0" features = ["arbitrary"] default-features = false diff --git a/crates/scroll/alloy/rpc-types/src/receipt.rs b/crates/scroll/alloy/rpc-types/src/receipt.rs index e4ecca38979b..6f19a155d216 100644 --- a/crates/scroll/alloy/rpc-types/src/receipt.rs +++ b/crates/scroll/alloy/rpc-types/src/receipt.rs @@ -45,7 +45,7 @@ impl alloy_network_primitives::ReceiptResponse for ScrollTransactionReceipt { self.inner.transaction_index() } - fn gas_used(&self) -> u128 { + fn gas_used(&self) -> u64 { self.inner.gas_used() } @@ -53,7 +53,7 @@ impl alloy_network_primitives::ReceiptResponse for ScrollTransactionReceipt { self.inner.effective_gas_price() } - fn blob_gas_used(&self) -> Option { + fn blob_gas_used(&self) -> Option { self.inner.blob_gas_used() } @@ -73,7 +73,7 @@ impl alloy_network_primitives::ReceiptResponse for ScrollTransactionReceipt { self.inner.authorization_list() } - fn cumulative_gas_used(&self) -> u128 { + fn cumulative_gas_used(&self) -> u64 { self.inner.cumulative_gas_used() } diff --git a/crates/scroll/rpc/src/eth/mod.rs b/crates/scroll/rpc/src/eth/mod.rs index 41b9dc4b76b0..2b9ef0afde53 100644 --- a/crates/scroll/rpc/src/eth/mod.rs +++ b/crates/scroll/rpc/src/eth/mod.rs @@ -10,8 +10,8 @@ use reth_node_api::NodePrimitives; use reth_node_builder::EthApiBuilderCtx; use reth_provider::{ BlockNumReader, BlockReader, BlockReaderIdExt, CanonStateSubscriptions, ChainSpecProvider, - EvmEnvProvider, NodePrimitivesProvider, ProviderBlock, ProviderHeader, ProviderReceipt, - ProviderTx, StageCheckpointReader, StateProviderFactory, + NodePrimitivesProvider, ProviderBlock, ProviderHeader, ProviderReceipt, ProviderTx, + StageCheckpointReader, StateProviderFactory, }; use reth_rpc::eth::{core::EthApiInner, DevSigner}; use reth_rpc_eth_api::{ @@ -211,7 +211,6 @@ where Self: LoadBlock, N: ScrollNodeCore< Provider: BlockReaderIdExt - + EvmEnvProvider + ChainSpecProvider + StateProviderFactory, >, diff --git a/crates/scroll/rpc/src/eth/pending_block.rs b/crates/scroll/rpc/src/eth/pending_block.rs index 7dacd720d11b..53694ede5ab9 100644 --- a/crates/scroll/rpc/src/eth/pending_block.rs +++ b/crates/scroll/rpc/src/eth/pending_block.rs @@ -11,8 +11,8 @@ use reth_primitives::{ proofs::calculate_receipt_root_no_memo, BlockBody, Receipt, TransactionSigned, }; use reth_provider::{ - BlockReaderIdExt, ChainSpecProvider, EvmEnvProvider, ProviderBlock, ProviderHeader, - ProviderReceipt, ProviderTx, StateProviderFactory, + BlockReaderIdExt, ChainSpecProvider, ProviderBlock, ProviderHeader, ProviderReceipt, + ProviderTx, StateProviderFactory, }; use reth_rpc_eth_api::{ helpers::{LoadPendingBlock, SpawnBlocking}, @@ -39,8 +39,7 @@ where Block = reth_primitives::Block, Receipt = reth_primitives::Receipt, Header = reth_primitives::Header, - > + EvmEnvProvider - + ChainSpecProvider + > + ChainSpecProvider + StateProviderFactory, Pool: TransactionPool>>, Evm: ConfigureEvm
, @@ -98,7 +97,6 @@ where extra_data: Default::default(), parent_beacon_block_root: is_cancun.then_some(B256::ZERO), requests_hash: is_prague.then_some(EMPTY_REQUESTS_HASH), - target_blobs_per_block: None, }; // seal the block From e58bc06a0a465aba9f0f38c75a60cadaa8ee0468 Mon Sep 17 00:00:00 2001 From: georgehao Date: Wed, 8 Jan 2025 20:20:27 +0800 Subject: [PATCH 25/86] fix zepter check --- crates/scroll/alloy/consensus/Cargo.toml | 10 ++++++-- crates/scroll/alloy/rpc-types/Cargo.toml | 10 +++++++- crates/scroll/chainspec/Cargo.toml | 31 ++++++++++++------------ crates/scroll/rpc/Cargo.toml | 15 ++++++++++-- 4 files changed, 46 insertions(+), 20 deletions(-) diff --git a/crates/scroll/alloy/consensus/Cargo.toml b/crates/scroll/alloy/consensus/Cargo.toml index 2452095a8f1e..279add36839d 100644 --- a/crates/scroll/alloy/consensus/Cargo.toml +++ b/crates/scroll/alloy/consensus/Cargo.toml @@ -61,7 +61,9 @@ std = [ "alloy-serde/std", "proptest/std", "rand/std", - "derive_more/std" + "derive_more/std", + "serde_json/std", + "serde_with/std", ] k256 = [ @@ -99,4 +101,8 @@ serde = [ "rand/serde", "reth-codecs/serde" ] -serde-bincode-compat = ["serde_with"] \ No newline at end of file +serde-bincode-compat = [ + "serde_with", + "alloy-consensus/serde-bincode-compat", + "alloy-eips/serde-bincode-compat" +] \ No newline at end of file diff --git a/crates/scroll/alloy/rpc-types/Cargo.toml b/crates/scroll/alloy/rpc-types/Cargo.toml index 2b3cbd846b29..553355f9bc80 100644 --- a/crates/scroll/alloy/rpc-types/Cargo.toml +++ b/crates/scroll/alloy/rpc-types/Cargo.toml @@ -100,7 +100,10 @@ arbitrary = [ "dep:arbitrary", "alloy-primitives/arbitrary", "alloy-rpc-types-eth/arbitrary", - "scroll-alloy-consensus/arbitrary" + "scroll-alloy-consensus/arbitrary", + "alloy-consensus/arbitrary", + "alloy-eips/arbitrary", + "alloy-serde/arbitrary", ] default = ["std"] k256 = [ @@ -112,6 +115,11 @@ std = [ "alloy-eips/std", "alloy-primitives/std", "alloy-rpc-types-eth/std", + "alloy-consensus/std", + "alloy-serde/std", + "derive_more/std", + "serde/std", + "serde_json/std", ] [lints.clippy] diff --git a/crates/scroll/chainspec/Cargo.toml b/crates/scroll/chainspec/Cargo.toml index da5da7194db5..80f72c8a837f 100644 --- a/crates/scroll/chainspec/Cargo.toml +++ b/crates/scroll/chainspec/Cargo.toml @@ -46,20 +46,21 @@ reth-chainspec = { workspace = true, features = ["test-utils"] } [features] default = ["std"] std = [ - "alloy-chains/std", - "alloy-genesis/std", - "alloy-primitives/std", - "alloy-eips/std", - "alloy-serde/std", - "reth-chainspec/std", - "reth-ethereum-forks/std", - "reth-primitives-traits/std", - "reth-scroll-forks/std", - "alloy-consensus/std", - "once_cell/std", - "serde/std", - "derive_more/std", - "reth-network-peers/std", - "serde_json/std" + "alloy-chains/std", + "alloy-genesis/std", + "alloy-primitives/std", + "alloy-eips/std", + "alloy-serde/std", + "reth-chainspec/std", + "reth-ethereum-forks/std", + "reth-primitives-traits/std", + "reth-scroll-forks/std", + "alloy-consensus/std", + "once_cell/std", + "serde/std", + "derive_more/std", + "reth-network-peers/std", + "serde_json/std", + "reth-trie-common/std", ] mpt = ["reth-trie-common"] diff --git a/crates/scroll/rpc/Cargo.toml b/crates/scroll/rpc/Cargo.toml index c484b5ad460e..5fd41c5ed242 100644 --- a/crates/scroll/rpc/Cargo.toml +++ b/crates/scroll/rpc/Cargo.toml @@ -66,7 +66,18 @@ derive_more = { workspace = true, features = ["constructor", "deref"] } reth-optimism-chainspec.workspace = true [features] -optimism = [] -scroll = [] +scroll = [ + "reth-primitives/scroll", + "reth-provider/scroll", + "reth-scroll-evm/scroll", + "reth-evm/scroll", +] +optimism = [ + "reth-primitives/optimism", + "reth-provider/optimism", + "reth-scroll-evm/optimism", + "revm/optimism", +] + From b0df29f8c043a2b371393c0304aa87bc04c1fcee Mon Sep 17 00:00:00 2001 From: georgehao Date: Wed, 8 Jan 2025 20:33:17 +0800 Subject: [PATCH 26/86] fix unit test --- crates/scroll/alloy/rpc-types/src/transaction.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/scroll/alloy/rpc-types/src/transaction.rs b/crates/scroll/alloy/rpc-types/src/transaction.rs index bab192f7de08..989aa760d6cd 100644 --- a/crates/scroll/alloy/rpc-types/src/transaction.rs +++ b/crates/scroll/alloy/rpc-types/src/transaction.rs @@ -280,7 +280,7 @@ mod tests { fn can_deserialize_deposit() { // cast rpc eth_getTransactionByHash // 0x5c1c3785c8bf5d7f1cb714abd1d22e32642887215602c3a14a5e9ee105bad6aa --rpc-url https://rpc.scroll.io - let rpc_tx = r#"{"blockHash":"0x018ed80ea8340984a1f4841490284d6e51d71f9e9411feeca41e007a89fbfdff","blockNumber":"0xb81121","from":"0x7885bcbd5cecef1336b5300fb5186a12ddd8c478","gas":"0x1e8480","gasPrice":"0x0","hash":"0x5c1c3785c8bf5d7f1cb714abd1d22e32642887215602c3a14a5e9ee105bad6aa","input":"0x8ef1332e000000000000000000000000c186fa914353c44b2e33ebe05f21846f1048beda0000000000000000000000003bad7ad0728f9917d1bf08af5782dcbd516cdd96000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e7ba000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000044493a4f846ffc1507cbfe98a2b0ba1f06ea7e4eb749c001f78f6cb5540daa556a0566322a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","nonce":"0x0","to":"0x781e90f1c8fc4611c9b7497c3b47f99ef6969cbc","transactionIndex":"0x0","value":"0x0","type":"0x7e","v":"0x0","r":"0x0","s":"0x0","sender":"0x7885bcbd5cecef1336b5300fb5186a12ddd8c478","queueIndex":"0xe7ba0", "yParity":"0x0"}"#; + let rpc_tx = r#"{"blockHash":"0x018ed80ea8340984a1f4841490284d6e51d71f9e9411feeca41e007a89fbfdff","blockNumber":"0xb81121","from":"0x7885bcbd5cecef1336b5300fb5186a12ddd8c478","gas":"0x1e8480","gasPrice":"0x0","hash":"0x5c1c3785c8bf5d7f1cb714abd1d22e32642887215602c3a14a5e9ee105bad6aa","input":"0x8ef1332e000000000000000000000000c186fa914353c44b2e33ebe05f21846f1048beda0000000000000000000000003bad7ad0728f9917d1bf08af5782dcbd516cdd96000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e7ba000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000044493a4f846ffc1507cbfe98a2b0ba1f06ea7e4eb749c001f78f6cb5540daa556a0566322a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","nonce":"0x0","to":"0x781e90f1c8fc4611c9b7497c3b47f99ef6969cbc","transactionIndex":"0x0","value":"0x0","type":"0x7e","v":"0x0","r":"0x0","s":"0x0","sender":"0x7885bcbd5cecef1336b5300fb5186a12ddd8c478","queueIndex":0xe7ba0, "yParity":"0x0"}"#; let tx = serde_json::from_str::(rpc_tx).unwrap(); From 4d34209a58be3cb34ef8b77fe88a676687397b50 Mon Sep 17 00:00:00 2001 From: georgehao Date: Wed, 8 Jan 2025 22:21:39 +0800 Subject: [PATCH 27/86] fix lint --- crates/scroll/alloy/consensus/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/scroll/alloy/consensus/src/lib.rs b/crates/scroll/alloy/consensus/src/lib.rs index 1bee308475ab..c3c168455402 100644 --- a/crates/scroll/alloy/consensus/src/lib.rs +++ b/crates/scroll/alloy/consensus/src/lib.rs @@ -7,6 +7,8 @@ #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] #![cfg_attr(not(feature = "std"), no_std)] +use serde_with as _; + mod transaction; pub use transaction::{ ScrollL1MessageTransactionFields, ScrollTxEnvelope, ScrollTxType, ScrollTypedTransaction, From 92f4fd455ecd4ac84ab6cf06342e3a71d10d4501 Mon Sep 17 00:00:00 2001 From: georgehao Date: Thu, 9 Jan 2025 23:53:21 +0800 Subject: [PATCH 28/86] fix unit test --- .github/assets/check_wasm.sh | 1 + .../consensus/src/transaction/l1_message.rs | 8 +++++ .../scroll/alloy/rpc-types/src/transaction.rs | 33 ++++++++++++++----- 3 files changed, 34 insertions(+), 8 deletions(-) diff --git a/.github/assets/check_wasm.sh b/.github/assets/check_wasm.sh index 11cccea04451..b3ad93954fab 100755 --- a/.github/assets/check_wasm.sh +++ b/.github/assets/check_wasm.sh @@ -75,6 +75,7 @@ exclude_crates=( reth-scroll-chainspec # tokio reth-scroll-evm # tokio reth-scroll-engine # tokio + reth-scroll-rpc #tokio ) # Array to hold the results diff --git a/crates/scroll/alloy/consensus/src/transaction/l1_message.rs b/crates/scroll/alloy/consensus/src/transaction/l1_message.rs index 44fa84eaf4b4..8ed82cd87d3b 100644 --- a/crates/scroll/alloy/consensus/src/transaction/l1_message.rs +++ b/crates/scroll/alloy/consensus/src/transaction/l1_message.rs @@ -400,6 +400,14 @@ mod tests { assert!(tx_deposit.size() > tx_deposit.rlp_encoded_fields_length()); } + + #[test] + fn test_deserialize_hex_to_u64() { + let rpc_tx = r#"{"gas":"0x1e8480","input":"0x8ef1332e000000000000000000000000c186fa914353c44b2e33ebe05f21846f1048beda0000000000000000000000003bad7ad0728f9917d1bf08af5782dcbd516cdd96000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e7ba000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000044493a4f846ffc1507cbfe98a2b0ba1f06ea7e4eb749c001f78f6cb5540daa556a0566322a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","to":"0x781e90f1c8fc4611c9b7497c3b47f99ef6969cbc","value":"0x0","sender":"0x7885bcbd5cecef1336b5300fb5186a12ddd8c478","queueIndex":"0xe7ba0"}"#; + // let obj: TxL1Message = serde_json::from_str(rpc_tx).unwrap(); + let obj = serde_json::from_str::(rpc_tx).unwrap(); + assert_eq!(obj.queue_index, 0xe7ba0); + } } /// Bincode-compatible [`TxL1Message`] serde implementation. diff --git a/crates/scroll/alloy/rpc-types/src/transaction.rs b/crates/scroll/alloy/rpc-types/src/transaction.rs index 989aa760d6cd..03b172a66b01 100644 --- a/crates/scroll/alloy/rpc-types/src/transaction.rs +++ b/crates/scroll/alloy/rpc-types/src/transaction.rs @@ -27,6 +27,9 @@ pub struct Transaction { /// queue index for deposit transactions pub queue_index: Option, + + /// nonce for transactions + pub nonce: Option, } impl Typed2718 for Transaction { @@ -177,8 +180,19 @@ mod tx_serde { with = "alloy_serde::quantity::opt" )] effective_gas_price: Option, - #[serde(default, rename = "queueIndex", skip_serializing_if = "Option::is_none")] + #[serde( + default, + rename = "queueIndex", + skip_serializing_if = "Option::is_none", + with = "alloy_serde::quantity::opt" + )] queue_index: Option, + #[serde( + default, + skip_serializing_if = "Option::is_none", + with = "alloy_serde::quantity::opt" + )] + nonce: Option, #[serde(default, skip_serializing_if = "Option::is_none")] sender: Option
, } @@ -211,14 +225,10 @@ mod tx_serde { from, }, queue_index, + nonce, .. } = value; - // if inner transaction is a deposit, then don't serialize `from` directly - let from = - if matches!(inner, ScrollTxEnvelope::L1Message(_)) { None } else { Some(from) }; - let sender = from; - // if inner transaction has its own `gasPrice` don't serialize it in this struct. let effective_gas_price = effective_gas_price.filter(|_| inner.gas_price().is_none()); @@ -227,7 +237,13 @@ mod tx_serde { block_hash, block_number, transaction_index, - other: OptionalFields { from, effective_gas_price, queue_index, sender }, + other: OptionalFields { + nonce, + from: Some(from), + effective_gas_price, + queue_index, + sender: Some(from), + }, } } } @@ -264,6 +280,7 @@ mod tx_serde { from, effective_gas_price, }, + nonce: other.nonce, sender: other.sender, queue_index: other.queue_index, }; @@ -280,7 +297,7 @@ mod tests { fn can_deserialize_deposit() { // cast rpc eth_getTransactionByHash // 0x5c1c3785c8bf5d7f1cb714abd1d22e32642887215602c3a14a5e9ee105bad6aa --rpc-url https://rpc.scroll.io - let rpc_tx = r#"{"blockHash":"0x018ed80ea8340984a1f4841490284d6e51d71f9e9411feeca41e007a89fbfdff","blockNumber":"0xb81121","from":"0x7885bcbd5cecef1336b5300fb5186a12ddd8c478","gas":"0x1e8480","gasPrice":"0x0","hash":"0x5c1c3785c8bf5d7f1cb714abd1d22e32642887215602c3a14a5e9ee105bad6aa","input":"0x8ef1332e000000000000000000000000c186fa914353c44b2e33ebe05f21846f1048beda0000000000000000000000003bad7ad0728f9917d1bf08af5782dcbd516cdd96000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e7ba000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000044493a4f846ffc1507cbfe98a2b0ba1f06ea7e4eb749c001f78f6cb5540daa556a0566322a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","nonce":"0x0","to":"0x781e90f1c8fc4611c9b7497c3b47f99ef6969cbc","transactionIndex":"0x0","value":"0x0","type":"0x7e","v":"0x0","r":"0x0","s":"0x0","sender":"0x7885bcbd5cecef1336b5300fb5186a12ddd8c478","queueIndex":0xe7ba0, "yParity":"0x0"}"#; + let rpc_tx = r#"{"blockHash":"0x018ed80ea8340984a1f4841490284d6e51d71f9e9411feeca41e007a89fbfdff","blockNumber":"0xb81121","from":"0x7885bcbd5cecef1336b5300fb5186a12ddd8c478","gas":"0x1e8480","gasPrice":"0x0","hash":"0x5c1c3785c8bf5d7f1cb714abd1d22e32642887215602c3a14a5e9ee105bad6aa","input":"0x8ef1332e000000000000000000000000c186fa914353c44b2e33ebe05f21846f1048beda0000000000000000000000003bad7ad0728f9917d1bf08af5782dcbd516cdd96000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e7ba000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000044493a4f846ffc1507cbfe98a2b0ba1f06ea7e4eb749c001f78f6cb5540daa556a0566322a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","nonce":"0x1","to":"0x781e90f1c8fc4611c9b7497c3b47f99ef6969cbc","transactionIndex":"0x0","value":"0x0","type":"0x7e","v":"0x0","r":"0x0","s":"0x0","sender":"0x7885bcbd5cecef1336b5300fb5186a12ddd8c478","queueIndex":"0xe7ba0", "yParity":"0x0"}"#; let tx = serde_json::from_str::(rpc_tx).unwrap(); From 06da2a7141731b8ede3e324415445f564e9c7f8c Mon Sep 17 00:00:00 2001 From: georgehao Date: Fri, 10 Jan 2025 01:13:50 +0800 Subject: [PATCH 29/86] fix conflict --- Cargo.lock | 12681 +++++++++++++++++++++++++++++++++ Cargo.toml | 1 - crates/scroll/evm/Cargo.toml | 9 +- 3 files changed, 12685 insertions(+), 6 deletions(-) create mode 100644 Cargo.lock diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 000000000000..b0918356ffbb --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,12681 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "addr2line" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" + +[[package]] +name = "aead" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" +dependencies = [ + "crypto-common", + "generic-array", +] + +[[package]] +name = "aes" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", +] + +[[package]] +name = "aes-gcm" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" +dependencies = [ + "aead", + "aes", + "cipher", + "ctr", + "ghash", + "subtle", +] + +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "getrandom 0.2.15", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "aligned-vec" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e0966165eaf052580bd70eb1b32cb3d6245774c0104d1b2793e9650bf83b52a" +dependencies = [ + "equator", +] + +[[package]] +name = "alloc-no-stdlib" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" + +[[package]] +name = "alloc-stdlib" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" +dependencies = [ + "alloc-no-stdlib", +] + +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + +[[package]] +name = "alloy-chains" +version = "0.1.54" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d38fdd69239714d7625cda1e3730773a3c1a8719d506370eb17bb0103b7c2e15" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "arbitrary", + "num_enum", + "proptest", + "serde", + "strum", +] + +[[package]] +name = "alloy-consensus" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4138dc275554afa6f18c4217262ac9388790b2fc393c2dfe03c51d357abf013" +dependencies = [ + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "alloy-trie", + "arbitrary", + "auto_impl", + "c-kzg", + "derive_more", + "k256", + "rand 0.8.5", + "serde", + "serde_with", +] + +[[package]] +name = "alloy-consensus-any" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa04e1882c31288ce1028fdf31b6ea94cfa9eafa2e497f903ded631c8c6a42c" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "serde", +] + +[[package]] +name = "alloy-contract" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f21886c1fea0626f755a49b2ac653b396fb345233f6170db2da3d0ada31560c" +dependencies = [ + "alloy-dyn-abi", + "alloy-json-abi", + "alloy-network", + "alloy-network-primitives", + "alloy-primitives", + "alloy-provider", + "alloy-rpc-types-eth", + "alloy-sol-types", + "alloy-transport", + "futures", + "futures-util", + "thiserror 2.0.10", +] + +[[package]] +name = "alloy-dyn-abi" +version = "0.8.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44e3b98c37b3218924cd1d2a8570666b89662be54e5b182643855f783ea68b33" +dependencies = [ + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-type-parser", + "alloy-sol-types", + "const-hex", + "derive_more", + "itoa", + "serde", + "serde_json", + "winnow", +] + +[[package]] +name = "alloy-eip2930" +version = "0.1.0" +source = "git+https://github.com/scroll-tech/alloy-eips?branch=v0.3.2#8d5fc83fc257b09510dc8d76561188218d9c0c32" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "arbitrary", + "rand 0.8.5", + "serde", +] + +[[package]] +name = "alloy-eip7702" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cabf647eb4650c91a9d38cb6f972bb320009e7e9d61765fb688a86f1563b33e8" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "arbitrary", + "derive_more", + "k256", + "rand 0.8.5", + "serde", + "serde_with", +] + +[[package]] +name = "alloy-eips" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52dd5869ed09e399003e0e0ec6903d981b2a92e74c5d37e6b40890bad2517526" +dependencies = [ + "alloy-eip2930", + "alloy-eip7702", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "arbitrary", + "c-kzg", + "derive_more", + "ethereum_ssz", + "ethereum_ssz_derive", + "once_cell", + "serde", + "sha2 0.10.8", +] + +[[package]] +name = "alloy-genesis" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7d2a7fe5c1a9bd6793829ea21a636f30fc2b3f5d2e7418ba86d96e41dd1f460" +dependencies = [ + "alloy-eips", + "alloy-primitives", + "alloy-serde", + "alloy-trie", + "serde", +] + +[[package]] +name = "alloy-json-abi" +version = "0.8.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "731ea743b3d843bc657e120fb1d1e9cc94f5dab8107e35a82125a63e6420a102" +dependencies = [ + "alloy-primitives", + "alloy-sol-type-parser", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-json-rpc" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2008bedb8159a255b46b7c8614516eda06679ea82f620913679afbd8031fea72" +dependencies = [ + "alloy-primitives", + "alloy-sol-types", + "serde", + "serde_json", + "thiserror 2.0.10", + "tracing", +] + +[[package]] +name = "alloy-network" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4556f01fe41d0677495df10a648ddcf7ce118b0e8aa9642a0e2b6dd1fb7259de" +dependencies = [ + "alloy-consensus", + "alloy-consensus-any", + "alloy-eips", + "alloy-json-rpc", + "alloy-network-primitives", + "alloy-primitives", + "alloy-rpc-types-any", + "alloy-rpc-types-eth", + "alloy-serde", + "alloy-signer", + "alloy-sol-types", + "async-trait", + "auto_impl", + "futures-utils-wasm", + "serde", + "serde_json", + "thiserror 2.0.10", +] + +[[package]] +name = "alloy-network-primitives" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31c3c6b71340a1d076831823f09cb6e02de01de5c6630a9631bdb36f947ff80" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-serde", + "serde", +] + +[[package]] +name = "alloy-node-bindings" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4520cd4bc5cec20c32c98e4bc38914c7fb96bf4a712105e44da186a54e65e3ba" +dependencies = [ + "alloy-genesis", + "alloy-primitives", + "k256", + "rand 0.8.5", + "serde_json", + "tempfile", + "thiserror 2.0.10", + "tracing", + "url", +] + +[[package]] +name = "alloy-primitives" +version = "0.8.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "788bb18e8f61d5d9340b52143f27771daf7e1dccbaf2741621d2493f9debf52e" +dependencies = [ + "alloy-rlp", + "arbitrary", + "bytes", + "cfg-if", + "const-hex", + "derive_arbitrary", + "derive_more", + "foldhash", + "getrandom 0.2.15", + "hashbrown 0.15.2", + "indexmap 2.7.0", + "itoa", + "k256", + "keccak-asm", + "paste", + "proptest", + "proptest-derive", + "rand 0.8.5", + "ruint", + "rustc-hash 2.1.0", + "serde", + "sha3", + "tiny-keccak", +] + +[[package]] +name = "alloy-provider" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a22c4441b3ebe2d77fa9cf629ba68c3f713eb91779cff84275393db97eddd82" +dependencies = [ + "alloy-chains", + "alloy-consensus", + "alloy-eips", + "alloy-json-rpc", + "alloy-network", + "alloy-network-primitives", + "alloy-primitives", + "alloy-pubsub", + "alloy-rpc-client", + "alloy-rpc-types-admin", + "alloy-rpc-types-engine", + "alloy-rpc-types-eth", + "alloy-transport", + "alloy-transport-http", + "alloy-transport-ws", + "async-stream", + "async-trait", + "auto_impl", + "dashmap", + "futures", + "futures-utils-wasm", + "lru", + "parking_lot", + "pin-project", + "reqwest", + "schnellru", + "serde", + "serde_json", + "thiserror 2.0.10", + "tokio", + "tracing", + "url", + "wasmtimer", +] + +[[package]] +name = "alloy-pubsub" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2269fd635f7b505f27c63a3cb293148cd02301efce4c8bdd9ff54fbfc4a20e23" +dependencies = [ + "alloy-json-rpc", + "alloy-primitives", + "alloy-transport", + "bimap", + "futures", + "serde", + "serde_json", + "tokio", + "tokio-stream", + "tower 0.5.2", + "tracing", +] + +[[package]] +name = "alloy-rlp" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f542548a609dca89fcd72b3b9f355928cf844d4363c5eed9c5273a3dd225e097" +dependencies = [ + "alloy-rlp-derive", + "arrayvec", + "bytes", +] + +[[package]] +name = "alloy-rlp-derive" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a833d97bf8a5f0f878daf2c8451fff7de7f9de38baa5a45d936ec718d81255a" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "alloy-rpc-client" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d06a292b37e182e514903ede6e623b9de96420e8109ce300da288a96d88b7e4b" +dependencies = [ + "alloy-json-rpc", + "alloy-primitives", + "alloy-pubsub", + "alloy-transport", + "alloy-transport-http", + "alloy-transport-ws", + "futures", + "pin-project", + "reqwest", + "serde", + "serde_json", + "tokio", + "tokio-stream", + "tower 0.5.2", + "tracing", + "url", + "wasmtimer", +] + +[[package]] +name = "alloy-rpc-types" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9383845dd924939e7ab0298bbfe231505e20928907d7905aa3bf112287305e06" +dependencies = [ + "alloy-primitives", + "alloy-rpc-types-engine", + "alloy-rpc-types-eth", + "alloy-serde", + "serde", +] + +[[package]] +name = "alloy-rpc-types-admin" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fcea70b3872c645fa0ee7fb23370d685f98e8c35f47297de619fb2e9f607ff" +dependencies = [ + "alloy-genesis", + "alloy-primitives", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-rpc-types-anvil" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11495cb8c8d3141fc27556a4c9188b81531ad5ec3076a0394c61a6dcfbce9f34" +dependencies = [ + "alloy-primitives", + "alloy-rpc-types-eth", + "alloy-serde", + "serde", +] + +[[package]] +name = "alloy-rpc-types-any" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca445cef0eb6c2cf51cfb4e214fbf1ebd00893ae2e6f3b944c8101b07990f988" +dependencies = [ + "alloy-consensus-any", + "alloy-rpc-types-eth", + "alloy-serde", +] + +[[package]] +name = "alloy-rpc-types-beacon" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4009405b1d3f5e8c529b8cf353f74e815fd2102549af4172fc721b4b9ea09133" +dependencies = [ + "alloy-eips", + "alloy-primitives", + "alloy-rpc-types-engine", + "ethereum_ssz", + "ethereum_ssz_derive", + "serde", + "serde_with", + "thiserror 2.0.10", +] + +[[package]] +name = "alloy-rpc-types-debug" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "358d6a8d7340b9eb1a7589a6c1fb00df2c9b26e90737fa5ed0108724dd8dac2c" +dependencies = [ + "alloy-primitives", + "serde", +] + +[[package]] +name = "alloy-rpc-types-engine" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a5f821f30344862a0b6eb9a1c2eb91dfb2ff44c7489f37152a526cdcab79264" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "derive_more", + "ethereum_ssz", + "ethereum_ssz_derive", + "jsonrpsee-types", + "jsonwebtoken", + "rand 0.8.5", + "serde", + "strum", +] + +[[package]] +name = "alloy-rpc-types-eth" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0938bc615c02421bd86c1733ca7205cc3d99a122d9f9bff05726bd604b76a5c2" +dependencies = [ + "alloy-consensus", + "alloy-consensus-any", + "alloy-eips", + "alloy-network-primitives", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "alloy-sol-types", + "arbitrary", + "itertools 0.13.0", + "jsonrpsee-types", + "serde", + "serde_json", + "thiserror 2.0.10", +] + +[[package]] +name = "alloy-rpc-types-mev" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06bd42cf54b8a05b596322267f396a7dbdf141a56e93502a2ab4464fb718467a" +dependencies = [ + "alloy-eips", + "alloy-primitives", + "alloy-rpc-types-eth", + "alloy-serde", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-rpc-types-trace" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd38207e056cc7d1372367fbb4560ddf9107cbd20731743f641246bf0dede149" +dependencies = [ + "alloy-primitives", + "alloy-rpc-types-eth", + "alloy-serde", + "serde", + "serde_json", + "thiserror 2.0.10", +] + +[[package]] +name = "alloy-rpc-types-txpool" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7fd456a3fa9ea732d1c0611c9d52b5326ee29f4d02d01b07dac453ed68d9eb5" +dependencies = [ + "alloy-primitives", + "alloy-rpc-types-eth", + "alloy-serde", + "serde", +] + +[[package]] +name = "alloy-serde" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae0465c71d4dced7525f408d84873aeebb71faf807d22d74c4a426430ccd9b55" +dependencies = [ + "alloy-primitives", + "arbitrary", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-signer" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bfa395ad5cc952c82358d31e4c68b27bf4a89a5456d9b27e226e77dac50e4ff" +dependencies = [ + "alloy-primitives", + "async-trait", + "auto_impl", + "elliptic-curve", + "k256", + "thiserror 2.0.10", +] + +[[package]] +name = "alloy-signer-local" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbdc63ce9eda1283fcbaca66ba4a414b841c0e3edbeef9c86a71242fc9e84ccc" +dependencies = [ + "alloy-consensus", + "alloy-network", + "alloy-primitives", + "alloy-signer", + "async-trait", + "coins-bip32", + "coins-bip39", + "k256", + "rand 0.8.5", + "thiserror 2.0.10", +] + +[[package]] +name = "alloy-sol-macro" +version = "0.8.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a07b74d48661ab2e4b50bb5950d74dbff5e61dd8ed03bb822281b706d54ebacb" +dependencies = [ + "alloy-sol-macro-expander", + "alloy-sol-macro-input", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "alloy-sol-macro-expander" +version = "0.8.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19cc9c7f20b90f9be1a8f71a3d8e283a43745137b0837b1a1cb13159d37cad72" +dependencies = [ + "alloy-sol-macro-input", + "const-hex", + "heck", + "indexmap 2.7.0", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.95", + "syn-solidity", + "tiny-keccak", +] + +[[package]] +name = "alloy-sol-macro-input" +version = "0.8.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "713b7e6dfe1cb2f55c80fb05fd22ed085a1b4e48217611365ed0ae598a74c6ac" +dependencies = [ + "const-hex", + "dunce", + "heck", + "proc-macro2", + "quote", + "syn 2.0.95", + "syn-solidity", +] + +[[package]] +name = "alloy-sol-type-parser" +version = "0.8.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1eda2711ab2e1fb517fc6e2ffa9728c9a232e296d16810810e6957b781a1b8bc" +dependencies = [ + "serde", + "winnow", +] + +[[package]] +name = "alloy-sol-types" +version = "0.8.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3b478bc9c0c4737a04cd976accde4df7eba0bdc0d90ad6ff43d58bc93cf79c1" +dependencies = [ + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-macro", + "const-hex", + "serde", +] + +[[package]] +name = "alloy-transport" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d17722a198f33bbd25337660787aea8b8f57814febb7c746bc30407bdfc39448" +dependencies = [ + "alloy-json-rpc", + "base64 0.22.1", + "futures-util", + "futures-utils-wasm", + "serde", + "serde_json", + "thiserror 2.0.10", + "tokio", + "tower 0.5.2", + "tracing", + "url", + "wasmtimer", +] + +[[package]] +name = "alloy-transport-http" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e1509599021330a31c4a6816b655e34bf67acb1cc03c564e09fd8754ff6c5de" +dependencies = [ + "alloy-json-rpc", + "alloy-transport", + "reqwest", + "serde_json", + "tower 0.5.2", + "tracing", + "url", +] + +[[package]] +name = "alloy-transport-ipc" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4da44bc9a5155ab599666d26decafcf12204b72a80eeaba7c5e234ee8ac205" +dependencies = [ + "alloy-json-rpc", + "alloy-pubsub", + "alloy-transport", + "bytes", + "futures", + "interprocess", + "pin-project", + "serde_json", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "alloy-transport-ws" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58011745b2f17b334db40df9077d75b181f78360a5bc5c35519e15d4bfce15e2" +dependencies = [ + "alloy-pubsub", + "alloy-transport", + "futures", + "http", + "rustls", + "serde_json", + "tokio", + "tokio-tungstenite", + "tracing", + "ws_stream_wasm", +] + +[[package]] +name = "alloy-trie" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6917c79e837aa7b77b7a6dae9f89cbe15313ac161c4d3cfaf8909ef21f3d22d8" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "arbitrary", + "arrayvec", + "derive_arbitrary", + "derive_more", + "nybbles", + "proptest", + "proptest-derive", + "serde", + "smallvec", + "tracing", +] + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "anes" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" + +[[package]] +name = "anstream" +version = "0.6.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" + +[[package]] +name = "anstyle-parse" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" +dependencies = [ + "anstyle", + "windows-sys 0.59.0", +] + +[[package]] +name = "anyhow" +version = "1.0.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04" + +[[package]] +name = "aquamarine" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f50776554130342de4836ba542aa85a4ddb361690d7e8df13774d7284c3d5c2" +dependencies = [ + "include_dir", + "itertools 0.10.5", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "arbitrary" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223" +dependencies = [ + "derive_arbitrary", +] + +[[package]] +name = "ark-ff" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b3235cc41ee7a12aaaf2c575a2ad7b46713a8a50bda2fc3b003a04845c05dd6" +dependencies = [ + "ark-ff-asm 0.3.0", + "ark-ff-macros 0.3.0", + "ark-serialize 0.3.0", + "ark-std 0.3.0", + "derivative", + "num-bigint", + "num-traits", + "paste", + "rustc_version 0.3.3", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm 0.4.2", + "ark-ff-macros 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "digest 0.10.7", + "itertools 0.10.5", + "num-bigint", + "num-traits", + "paste", + "rustc_version 0.4.1", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" +dependencies = [ + "num-bigint", + "num-traits", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-serialize" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671" +dependencies = [ + "ark-std 0.3.0", + "digest 0.9.0", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-std 0.4.0", + "digest 0.10.7", + "num-bigint", +] + +[[package]] +name = "ark-std" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "arrayref" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" + +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" +dependencies = [ + "serde", +] + +[[package]] +name = "asn1_der" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "155a5a185e42c6b77ac7b88a15143d930a9e9727a5b7b77eed417404ab15c247" + +[[package]] +name = "assert_matches" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" + +[[package]] +name = "async-channel" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" +dependencies = [ + "concurrent-queue", + "event-listener", + "futures-core", +] + +[[package]] +name = "async-compression" +version = "0.4.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df895a515f70646414f4b45c0b79082783b80552b373a68283012928df56f522" +dependencies = [ + "brotli", + "flate2", + "futures-core", + "memchr", + "pin-project-lite", + "tokio", + "zstd", + "zstd-safe", +] + +[[package]] +name = "async-recursion" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "async-sse" +version = "5.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e6fa871e4334a622afd6bb2f611635e8083a6f5e2936c0f90f37c7ef9856298" +dependencies = [ + "async-channel", + "futures-lite", + "http-types", + "log", + "memchr", + "pin-project-lite", +] + +[[package]] +name = "async-stream" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" +dependencies = [ + "async-stream-impl", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "async-trait" +version = "0.1.85" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f934833b4b7233644e5848f235df3f57ed8c80f1528a26c3dfa13d2147fa056" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "async_io_stream" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c" +dependencies = [ + "futures", + "pharos", + "rustc_version 0.4.1", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "aurora-engine-modexp" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0aef7712851e524f35fbbb74fa6599c5cd8692056a1c36f9ca0d2001b670e7e5" +dependencies = [ + "hex", + "num", +] + +[[package]] +name = "auto_impl" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "autocfg" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" + +[[package]] +name = "backon" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba5289ec98f68f28dd809fd601059e6aa908bb8f6108620930828283d4ee23d7" +dependencies = [ + "fastrand 2.3.0", + "tokio", +] + +[[package]] +name = "backtrace" +version = "0.3.74" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" +dependencies = [ + "addr2line", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", + "windows-targets 0.52.6", +] + +[[package]] +name = "base-x" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" + +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + +[[package]] +name = "bech32" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" + +[[package]] +name = "bimap" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "230c5f1ca6a325a32553f8640d31ac9b49f2411e901e427570154868b46da4f7" + +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + +[[package]] +name = "bindgen" +version = "0.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f49d8fed880d473ea71efb9bf597651e77201bdd4893efe54c9e5d65ae04ce6f" +dependencies = [ + "bitflags 2.6.0", + "cexpr", + "clang-sys", + "itertools 0.13.0", + "proc-macro2", + "quote", + "regex", + "rustc-hash 1.1.0", + "shlex", + "syn 2.0.95", +] + +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +dependencies = [ + "arbitrary", + "serde", +] + +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "serde", + "tap", + "wyz", +] + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block-padding" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8894febbff9f758034a5b8e12d87918f56dfc64a8e1fe757d65e29041538d93" +dependencies = [ + "generic-array", +] + +[[package]] +name = "blst" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4378725facc195f1a538864863f6de233b500a8862747e7f165078a419d5e874" +dependencies = [ + "cc", + "glob", + "threadpool", + "zeroize", +] + +[[package]] +name = "bn254" +version = "0.1.0" +source = "git+https://github.com/scroll-tech/bn254.git?branch=master#81e1dcc92ee9a2798b13b84b24de182e9c42256e" +dependencies = [ + "ff", + "getrandom 0.2.15", + "rand 0.8.5", + "rand_core 0.6.4", + "sp1-intrinsics", + "subtle", +] + +[[package]] +name = "bn254" +version = "0.1.0" +source = "git+https://github.com/scroll-tech/bn254#81e1dcc92ee9a2798b13b84b24de182e9c42256e" +dependencies = [ + "ff", + "getrandom 0.2.15", + "rand 0.8.5", + "rand_core 0.6.4", + "sp1-intrinsics", + "subtle", +] + +[[package]] +name = "boa_ast" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c340fe0f0b267787095cbe35240c6786ff19da63ec7b69367ba338eace8169b" +dependencies = [ + "bitflags 2.6.0", + "boa_interner", + "boa_macros", + "boa_string", + "indexmap 2.7.0", + "num-bigint", + "rustc-hash 2.1.0", +] + +[[package]] +name = "boa_engine" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f620c3f06f51e65c0504ddf04978be1b814ac6586f0b45f6019801ab5efd37f9" +dependencies = [ + "arrayvec", + "bitflags 2.6.0", + "boa_ast", + "boa_gc", + "boa_interner", + "boa_macros", + "boa_parser", + "boa_profiler", + "boa_string", + "bytemuck", + "cfg-if", + "dashmap", + "fast-float2", + "hashbrown 0.15.2", + "icu_normalizer", + "indexmap 2.7.0", + "intrusive-collections", + "itertools 0.13.0", + "num-bigint", + "num-integer", + "num-traits", + "num_enum", + "once_cell", + "pollster", + "portable-atomic", + "rand 0.8.5", + "regress", + "rustc-hash 2.1.0", + "ryu-js", + "serde", + "serde_json", + "sptr", + "static_assertions", + "tap", + "thin-vec", + "thiserror 2.0.10", + "time", +] + +[[package]] +name = "boa_gc" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2425c0b7720d42d73eaa6a883fbb77a5c920da8694964a3d79a67597ac55cce2" +dependencies = [ + "boa_macros", + "boa_profiler", + "boa_string", + "hashbrown 0.15.2", + "thin-vec", +] + +[[package]] +name = "boa_interner" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42407a3b724cfaecde8f7d4af566df4b56af32a2f11f0956f5570bb974e7f749" +dependencies = [ + "boa_gc", + "boa_macros", + "hashbrown 0.15.2", + "indexmap 2.7.0", + "once_cell", + "phf", + "rustc-hash 2.1.0", + "static_assertions", +] + +[[package]] +name = "boa_macros" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fd3f870829131332587f607a7ff909f1af5fc523fd1b192db55fbbdf52e8d3c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", + "synstructure", +] + +[[package]] +name = "boa_parser" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cc142dac798cdc6e2dbccfddeb50f36d2523bb977a976e19bdb3ae19b740804" +dependencies = [ + "bitflags 2.6.0", + "boa_ast", + "boa_interner", + "boa_macros", + "boa_profiler", + "fast-float2", + "icu_properties", + "num-bigint", + "num-traits", + "regress", + "rustc-hash 2.1.0", +] + +[[package]] +name = "boa_profiler" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4064908e7cdf9b6317179e9b04dcb27f1510c1c144aeab4d0394014f37a0f922" + +[[package]] +name = "boa_string" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7debc13fbf7997bf38bf8e9b20f1ad5e2a7d27a900e1f6039fe244ce30f589b5" +dependencies = [ + "fast-float2", + "paste", + "rustc-hash 2.1.0", + "sptr", + "static_assertions", +] + +[[package]] +name = "boyer-moore-magiclen" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95e6233f2d926b5b123caf9d58e3885885255567fbe7776a7fdcae2a4d7241c4" +dependencies = [ + "debug-helper", +] + +[[package]] +name = "brotli" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc97b8f16f944bba54f0433f07e30be199b6dc2bd25937444bbad560bcea29bd" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", + "brotli-decompressor", +] + +[[package]] +name = "brotli-decompressor" +version = "4.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a45bd2e4095a8b518033b128020dd4a55aab1c0a381ba4404a472630f4bc362" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", +] + +[[package]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "sha2 0.10.8", + "tinyvec", +] + +[[package]] +name = "bstr" +version = "1.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "531a9155a481e2ee699d4f98f43c0ca4ff8ee1bfd55c31e9e98fb29d2b176fe0" +dependencies = [ + "memchr", + "regex-automata 0.4.9", + "serde", +] + +[[package]] +name = "bumpalo" +version = "3.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" + +[[package]] +name = "byte-slice-cast" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" + +[[package]] +name = "bytemuck" +version = "1.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef657dfab802224e671f5818e9a4935f9b1957ed18e58292690cc39e7a4092a3" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fa76293b4f7bb636ab88fd78228235b5248b4d05cc589aed610f954af5d7c7a" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" +dependencies = [ + "serde", +] + +[[package]] +name = "c-kzg" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0307f72feab3300336fb803a57134159f6e20139af1357f36c54cb90d8e8928" +dependencies = [ + "blst", + "cc", + "glob", + "hex", + "libc", + "once_cell", + "serde", +] + +[[package]] +name = "camino" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo-platform" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" +dependencies = [ + "camino", + "cargo-platform", + "semver 1.0.24", + "serde", + "serde_json", + "thiserror 1.0.69", +] + +[[package]] +name = "cassowary" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df8670b8c7b9dae1793364eafadf7239c40d669904660c5960d74cfd80b46a53" + +[[package]] +name = "cast" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" + +[[package]] +name = "castaway" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0abae9be0aaf9ea96a3b1b8b1b55c602ca751eba1b1500220cea4ecbafe7c0d5" +dependencies = [ + "rustversion", +] + +[[package]] +name = "cc" +version = "1.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a012a0df96dd6d06ba9a1b29d6402d1a5d77c6befd2566afdc26e10603dc93d7" +dependencies = [ + "jobserver", + "libc", + "shlex", +] + +[[package]] +name = "cesu8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" + +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + +[[package]] +name = "chrono" +version = "0.4.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "js-sys", + "num-traits", + "serde", + "wasm-bindgen", + "windows-targets 0.52.6", +] + +[[package]] +name = "ciborium" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e" +dependencies = [ + "ciborium-io", + "ciborium-ll", + "serde", +] + +[[package]] +name = "ciborium-io" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757" + +[[package]] +name = "ciborium-ll" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" +dependencies = [ + "ciborium-io", + "half", +] + +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common", + "inout", +] + +[[package]] +name = "clang-sys" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" +dependencies = [ + "glob", + "libc", + "libloading", +] + +[[package]] +name = "clap" +version = "4.5.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b95dca1b68188a08ca6af9d96a6576150f598824bdb528c1190460c2940a0b48" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ab52925392148efd3f7562f2136a81ffb778076bcc85727c6e020d6dd57cf15" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.5.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54b755194d6389280185988721fffba69495eed5ee9feeee9a599b53db80318c" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "clap_lex" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" + +[[package]] +name = "codspeed" +version = "2.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "450a0e9df9df1c154156f4344f99d8f6f6e69d0fc4de96ef6e2e68b2ec3bce97" +dependencies = [ + "colored", + "libc", + "serde_json", +] + +[[package]] +name = "codspeed-criterion-compat" +version = "2.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eb1a6cb9c20e177fde58cdef97c1c7c9264eb1424fe45c4fccedc2fb078a569" +dependencies = [ + "codspeed", + "colored", + "criterion", + "futures", + "tokio", +] + +[[package]] +name = "coins-bip32" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2073678591747aed4000dd468b97b14d7007f7936851d3f2f01846899f5ebf08" +dependencies = [ + "bs58", + "coins-core", + "digest 0.10.7", + "hmac 0.12.1", + "k256", + "serde", + "sha2 0.10.8", + "thiserror 1.0.69", +] + +[[package]] +name = "coins-bip39" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74b169b26623ff17e9db37a539fe4f15342080df39f129ef7631df7683d6d9d4" +dependencies = [ + "bitvec", + "coins-bip32", + "hmac 0.12.1", + "once_cell", + "pbkdf2", + "rand 0.8.5", + "sha2 0.10.8", + "thiserror 1.0.69", +] + +[[package]] +name = "coins-core" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b962ad8545e43a28e14e87377812ba9ae748dd4fd963f4c10e9fcc6d13475b" +dependencies = [ + "base64 0.21.7", + "bech32", + "bs58", + "const-hex", + "digest 0.10.7", + "generic-array", + "ripemd", + "serde", + "sha2 0.10.8", + "sha3", + "thiserror 1.0.69", +] + +[[package]] +name = "colorchoice" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" + +[[package]] +name = "colored" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c" +dependencies = [ + "lazy_static", + "windows-sys 0.59.0", +] + +[[package]] +name = "combine" +version = "4.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" +dependencies = [ + "bytes", + "memchr", +] + +[[package]] +name = "comfy-table" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24f165e7b643266ea80cb858aed492ad9280e3e05ce24d4a99d7d7b889b6a4d9" +dependencies = [ + "crossterm", + "strum", + "strum_macros", + "unicode-width 0.2.0", +] + +[[package]] +name = "compact_str" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b79c4069c6cad78e2e0cdfcbd26275770669fb39fd308a752dc110e83b9af32" +dependencies = [ + "castaway", + "cfg-if", + "itoa", + "rustversion", + "ryu", + "static_assertions", +] + +[[package]] +name = "concat-kdf" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d72c1252426a83be2092dd5884a5f6e3b8e7180f6891b6263d2c21b92ec8816" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "console" +version = "0.15.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea3c6ecd8059b57859df5c69830340ed3c41d30e3da0c1cbed90a96ac853041b" +dependencies = [ + "encode_unicode", + "libc", + "once_cell", + "windows-sys 0.59.0", +] + +[[package]] +name = "const-hex" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b0485bab839b018a8f1723fc5391819fea5f8f0f32288ef8a735fd096b6160c" +dependencies = [ + "cfg-if", + "cpufeatures", + "hex", + "proptest", + "serde", +] + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "convert_case" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b55271e5c8c478ad3f38ad24ef34923091e0548492a266d19b3c0b4d82574c63" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "core2" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b49ba7ef1ad6107f8824dbe97de947cbaac53c44e7f9756a1fba0d37c1eec505" +dependencies = [ + "memchr", +] + +[[package]] +name = "cpp_demangle" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96e58d342ad113c2b878f16d5d034c03be492ae460cdbc02b7f0f2284d310c7d" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "cpufeatures" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" +dependencies = [ + "libc", +] + +[[package]] +name = "crc" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" + +[[package]] +name = "crc32fast" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "criterion" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2b12d017a929603d80db1831cd3a24082f8137ce19c69e6447f54f5fc8d692f" +dependencies = [ + "anes", + "cast", + "ciborium", + "clap", + "criterion-plot", + "futures", + "is-terminal", + "itertools 0.10.5", + "num-traits", + "once_cell", + "oorandom", + "plotters", + "rayon", + "regex", + "serde", + "serde_derive", + "serde_json", + "tinytemplate", + "tokio", + "walkdir", +] + +[[package]] +name = "criterion-plot" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1" +dependencies = [ + "cast", + "itertools 0.10.5", +] + +[[package]] +name = "critical-section" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" + +[[package]] +name = "crossbeam-channel" +version = "0.5.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ba6d68e24814cb8de6bb986db8222d3a027d15872cabc0d18817bc3c0e4471" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" + +[[package]] +name = "crossterm" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "829d955a0bb380ef178a640b91779e3987da38c9aea133b20614cfed8cdea9c6" +dependencies = [ + "bitflags 2.6.0", + "crossterm_winapi", + "mio 1.0.3", + "parking_lot", + "rustix", + "signal-hook", + "signal-hook-mio", + "winapi", +] + +[[package]] +name = "crossterm_winapi" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b" +dependencies = [ + "winapi", +] + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array", + "rand_core 0.6.4", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "rand_core 0.6.4", + "typenum", +] + +[[package]] +name = "crypto-mac" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" +dependencies = [ + "generic-array", + "subtle", +] + +[[package]] +name = "csv" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acdc4883a9c96732e4733212c01447ebd805833b7275a73ca3ee080fd77afdaf" +dependencies = [ + "csv-core", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "csv-core" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5efa2b3d7902f4b634a20cae3c9c4e6209dc4779feb6863329607560143efa70" +dependencies = [ + "memchr", +] + +[[package]] +name = "ctr" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" +dependencies = [ + "cipher", +] + +[[package]] +name = "curve25519-dalek" +version = "4.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" +dependencies = [ + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest 0.10.7", + "fiat-crypto", + "rustc_version 0.4.1", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "darling" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.95", +] + +[[package]] +name = "darling_macro" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "dashmap" +version = "6.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" +dependencies = [ + "cfg-if", + "crossbeam-utils", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core", + "serde", +] + +[[package]] +name = "data-encoding" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" + +[[package]] +name = "data-encoding-macro" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1559b6cba622276d6d63706db152618eeb15b89b3e4041446b05876e352e639" +dependencies = [ + "data-encoding", + "data-encoding-macro-internal", +] + +[[package]] +name = "data-encoding-macro-internal" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "332d754c0af53bc87c108fed664d121ecf59207ec4196041f04d6ab9002ad33f" +dependencies = [ + "data-encoding", + "syn 1.0.109", +] + +[[package]] +name = "debug-helper" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f578e8e2c440e7297e008bb5486a3a8a194775224bbc23729b0dbdfaeebf162e" + +[[package]] +name = "debugid" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d" +dependencies = [ + "uuid", +] + +[[package]] +name = "delay_map" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df941644b671f05f59433e481ba0d31ac10e3667de725236a4c0d587c496fba1" +dependencies = [ + "futures", + "tokio", + "tokio-util", +] + +[[package]] +name = "der" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" +dependencies = [ + "const-oid", + "zeroize", +] + +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", + "serde", +] + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive_arbitrary" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "derive_more" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "syn 2.0.95", + "unicode-xid", +] + +[[package]] +name = "diff" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "const-oid", + "crypto-common", + "subtle", +] + +[[package]] +name = "dirs" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-next" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" +dependencies = [ + "cfg-if", + "dirs-sys-next", +] + +[[package]] +name = "dirs-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys 0.48.0", +] + +[[package]] +name = "dirs-sys-next" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +dependencies = [ + "libc", + "redox_users", + "winapi", +] + +[[package]] +name = "discv5" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23e6b70634e26c909d1edbb3142b3eaf3b89da0e52f284f00ca7c80d9901ad9e" +dependencies = [ + "aes", + "aes-gcm", + "alloy-rlp", + "arrayvec", + "ctr", + "delay_map", + "enr", + "fnv", + "futures", + "hashlink", + "hex", + "hkdf", + "lazy_static", + "libp2p-identity", + "lru", + "more-asserts", + "multiaddr", + "parking_lot", + "rand 0.8.5", + "smallvec", + "socket2", + "tokio", + "tracing", + "uint 0.10.0", + "zeroize", +] + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "doctest-file" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aac81fa3e28d21450aa4d2ac065992ba96a1d7303efbce51a95f4fd175b67562" + +[[package]] +name = "downcast" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" + +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + +[[package]] +name = "dyn-clone" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der", + "digest 0.10.7", + "elliptic-curve", + "rfc6979", + "serdect", + "signature", + "spki", +] + +[[package]] +name = "ed25519" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +dependencies = [ + "pkcs8", + "signature", +] + +[[package]] +name = "ed25519-dalek" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" +dependencies = [ + "curve25519-dalek", + "ed25519", + "rand_core 0.6.4", + "serde", + "sha2 0.10.8", + "subtle", + "zeroize", +] + +[[package]] +name = "ef-tests" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "rayon", + "reth-chainspec", + "reth-db", + "reth-db-api", + "reth-evm-ethereum", + "reth-primitives", + "reth-provider", + "reth-revm", + "reth-scroll-primitives", + "reth-scroll-revm", + "reth-stages", + "serde", + "serde_json", + "thiserror 2.0.10", + "walkdir", +] + +[[package]] +name = "either" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" + +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest 0.10.7", + "ff", + "generic-array", + "group", + "pkcs8", + "rand_core 0.6.4", + "sec1", + "serdect", + "subtle", + "zeroize", +] + +[[package]] +name = "encode_unicode" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" + +[[package]] +name = "enr" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "972070166c68827e64bd1ebc8159dd8e32d9bc2da7ebe8f20b61308f7974ad30" +dependencies = [ + "alloy-rlp", + "base64 0.21.7", + "bytes", + "ed25519-dalek", + "hex", + "k256", + "log", + "rand 0.8.5", + "secp256k1", + "serde", + "sha3", + "zeroize", +] + +[[package]] +name = "enum-as-inner" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1e6a265c649f3f5979b601d26f1d05ada116434c87741c9493cb56218f76cbc" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "enumn" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f9ed6b3789237c8a0c1c505af1c7eb2c560df6186f01b098c3a1064ea532f38" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "equator" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c35da53b5a021d2484a7cc49b2ac7f2d840f8236a286f84202369bd338d761ea" +dependencies = [ + "equator-macro", +] + +[[package]] +name = "equator-macro" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bf679796c0322556351f287a51b49e48f7c4986e727b5dd78c972d30e2e16cc" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + +[[package]] +name = "ethereum_serde_utils" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70cbccfccf81d67bff0ab36e591fa536c8a935b078a7b0e58c1d00d418332fc9" +dependencies = [ + "alloy-primitives", + "hex", + "serde", + "serde_derive", + "serde_json", +] + +[[package]] +name = "ethereum_ssz" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "862e41ea8eea7508f70cfd8cd560f0c34bb0af37c719a8e06c2672f0f031d8e5" +dependencies = [ + "alloy-primitives", + "ethereum_serde_utils", + "itertools 0.13.0", + "serde", + "serde_derive", + "smallvec", + "typenum", +] + +[[package]] +name = "ethereum_ssz_derive" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d31ecf6640112f61dc34b4d8359c081102969af0edd18381fed2052f6db6a410" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "event-listener" +version = "2.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" + +[[package]] +name = "example-beacon-api-sidecar-fetcher" +version = "0.1.0" +dependencies = [ + "alloy-consensus", + "alloy-primitives", + "alloy-rpc-types-beacon", + "clap", + "eyre", + "futures-util", + "reqwest", + "reth", + "reth-node-ethereum", + "serde", + "serde_json", + "thiserror 2.0.10", +] + +[[package]] +name = "example-beacon-api-sse" +version = "0.0.0" +dependencies = [ + "alloy-rpc-types-beacon", + "clap", + "futures-util", + "mev-share-sse", + "reth", + "reth-node-ethereum", + "tokio", + "tracing", +] + +[[package]] +name = "example-bsc-p2p" +version = "0.0.0" +dependencies = [ + "alloy-primitives", + "reth-chainspec", + "reth-discv4", + "reth-network", + "reth-network-api", + "reth-network-peers", + "reth-primitives", + "reth-tracing", + "secp256k1", + "serde_json", + "tokio", + "tokio-stream", +] + +[[package]] +name = "example-custom-beacon-withdrawals" +version = "0.0.0" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-sol-macro", + "alloy-sol-types", + "eyre", + "reth", + "reth-chainspec", + "reth-evm", + "reth-evm-ethereum", + "reth-node-ethereum", + "reth-primitives", + "reth-scroll-revm", +] + +[[package]] +name = "example-custom-dev-node" +version = "0.0.0" +dependencies = [ + "alloy-genesis", + "alloy-primitives", + "eyre", + "futures-util", + "reth", + "reth-chainspec", + "reth-node-core", + "reth-node-ethereum", + "serde_json", + "tokio", +] + +[[package]] +name = "example-custom-engine-types" +version = "0.0.0" +dependencies = [ + "alloy-eips", + "alloy-genesis", + "alloy-primitives", + "alloy-rpc-types", + "eyre", + "reth", + "reth-basic-payload-builder", + "reth-chainspec", + "reth-ethereum-payload-builder", + "reth-node-api", + "reth-node-core", + "reth-node-ethereum", + "reth-payload-builder", + "reth-tracing", + "reth-trie-db", + "serde", + "thiserror 2.0.10", + "tokio", +] + +[[package]] +name = "example-custom-evm" +version = "0.0.0" +dependencies = [ + "alloy-consensus", + "alloy-genesis", + "alloy-primitives", + "eyre", + "reth", + "reth-chainspec", + "reth-evm", + "reth-evm-ethereum", + "reth-node-api", + "reth-node-core", + "reth-node-ethereum", + "reth-primitives", + "reth-tracing", + "tokio", +] + +[[package]] +name = "example-custom-inspector" +version = "0.0.0" +dependencies = [ + "alloy-eips", + "alloy-primitives", + "alloy-rpc-types-eth", + "clap", + "futures-util", + "reth", + "reth-node-ethereum", +] + +[[package]] +name = "example-custom-node-components" +version = "0.0.0" +dependencies = [ + "eyre", + "reth", + "reth-node-ethereum", + "reth-tracing", + "reth-transaction-pool", +] + +[[package]] +name = "example-custom-payload-builder" +version = "0.0.0" +dependencies = [ + "alloy-eips", + "eyre", + "futures-util", + "reth", + "reth-basic-payload-builder", + "reth-chainspec", + "reth-ethereum-payload-builder", + "reth-node-api", + "reth-node-ethereum", + "reth-payload-builder", + "reth-primitives", + "tracing", +] + +[[package]] +name = "example-custom-rlpx-subprotocol" +version = "0.0.0" +dependencies = [ + "alloy-primitives", + "eyre", + "futures", + "rand 0.8.5", + "reth", + "reth-eth-wire", + "reth-network", + "reth-network-api", + "reth-node-ethereum", + "tokio", + "tokio-stream", + "tracing", +] + +[[package]] +name = "example-db-access" +version = "0.0.0" +dependencies = [ + "alloy-consensus", + "alloy-primitives", + "alloy-rpc-types-eth", + "eyre", + "reth-chainspec", + "reth-db", + "reth-node-ethereum", + "reth-node-types", + "reth-primitives", + "reth-provider", +] + +[[package]] +name = "example-manual-p2p" +version = "0.0.0" +dependencies = [ + "alloy-consensus", + "eyre", + "futures", + "reth-chainspec", + "reth-discv4", + "reth-ecies", + "reth-eth-wire", + "reth-network", + "reth-network-peers", + "reth-primitives", + "secp256k1", + "tokio", +] + +[[package]] +name = "example-network" +version = "0.0.0" +dependencies = [ + "eyre", + "futures", + "reth-network", + "reth-provider", + "tokio", +] + +[[package]] +name = "example-network-txpool" +version = "0.0.0" +dependencies = [ + "eyre", + "reth-network", + "reth-provider", + "reth-transaction-pool", + "tokio", +] + +[[package]] +name = "example-node-custom-rpc" +version = "0.0.0" +dependencies = [ + "clap", + "jsonrpsee", + "reth", + "reth-node-ethereum", + "reth-transaction-pool", + "tokio", +] + +[[package]] +name = "example-node-event-hooks" +version = "0.0.0" +dependencies = [ + "reth", + "reth-node-ethereum", +] + +[[package]] +name = "example-polygon-p2p" +version = "0.0.0" +dependencies = [ + "alloy-primitives", + "reth-chainspec", + "reth-discv4", + "reth-network", + "reth-network-api", + "reth-primitives", + "reth-tracing", + "secp256k1", + "serde_json", + "tokio", + "tokio-stream", +] + +[[package]] +name = "example-rpc-db" +version = "0.0.0" +dependencies = [ + "eyre", + "futures", + "jsonrpsee", + "reth", + "reth-chainspec", + "reth-db", + "reth-node-ethereum", + "reth-provider", + "tokio", +] + +[[package]] +name = "example-stateful-precompile" +version = "0.0.0" +dependencies = [ + "alloy-consensus", + "alloy-genesis", + "alloy-primitives", + "eyre", + "parking_lot", + "reth", + "reth-chainspec", + "reth-evm", + "reth-node-api", + "reth-node-core", + "reth-node-ethereum", + "reth-primitives", + "reth-tracing", + "schnellru", + "tokio", +] + +[[package]] +name = "example-txpool-tracing" +version = "0.0.0" +dependencies = [ + "alloy-primitives", + "alloy-rpc-types-trace", + "clap", + "futures-util", + "reth", + "reth-node-ethereum", +] + +[[package]] +name = "eyre" +version = "0.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" +dependencies = [ + "indenter", + "once_cell", +] + +[[package]] +name = "fast-float2" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8eb564c5c7423d25c886fb561d1e4ee69f72354d16918afa32c08811f6b6a55" + +[[package]] +name = "fastrand" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" +dependencies = [ + "instant", +] + +[[package]] +name = "fastrand" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" + +[[package]] +name = "fastrlp" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" +dependencies = [ + "arrayvec", + "auto_impl", + "bytes", +] + +[[package]] +name = "fastrlp" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce8dba4714ef14b8274c371879b175aa55b16b30f269663f19d576f380018dc4" +dependencies = [ + "arrayvec", + "auto_impl", + "bytes", +] + +[[package]] +name = "fdlimit" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e182f7dbc2ef73d9ef67351c5fbbea084729c48362d3ce9dd44c28e32e277fe5" +dependencies = [ + "libc", + "thiserror 1.0.69", +] + +[[package]] +name = "ff" +version = "0.13.0" +source = "git+https://github.com/scroll-tech/ff?branch=feat/sp1#244b1098f6be1d19c5fd3f0ec60117ac2940e6ca" +dependencies = [ + "bitvec", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "fiat-crypto" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" + +[[package]] +name = "filetime" +version = "0.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" +dependencies = [ + "cfg-if", + "libc", + "libredox", + "windows-sys 0.59.0", +] + +[[package]] +name = "findshlibs" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40b9e59cd0f7e0806cca4be089683ecb6434e602038df21fe6bf6711b2f07f64" +dependencies = [ + "cc", + "lazy_static", + "libc", + "winapi", +] + +[[package]] +name = "fixed-hash" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" +dependencies = [ + "byteorder", + "rand 0.8.5", + "rustc-hex", + "static_assertions", +] + +[[package]] +name = "flate2" +version = "1.0.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foldhash" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f" + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "fragile" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" + +[[package]] +name = "fsevent-sys" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76ee7a02da4d231650c7cea31349b889be2f45ddb3ef3032d2ec8185f6313fd2" +dependencies = [ + "libc", +] + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "futures" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-executor" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" + +[[package]] +name = "futures-lite" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" +dependencies = [ + "fastrand 1.9.0", + "futures-core", + "futures-io", + "memchr", + "parking", + "pin-project-lite", + "waker-fn", +] + +[[package]] +name = "futures-macro" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-timer" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" +dependencies = [ + "gloo-timers", + "send_wrapper 0.4.0", +] + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "futures-utils-wasm" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42012b0f064e01aa58b545fe3727f90f7dd4020f4a3ea735b50344965f5a57e9" + +[[package]] +name = "generator" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc6bd114ceda131d3b1d665eba35788690ad37f5916457286b32ab6fd3c438dd" +dependencies = [ + "cfg-if", + "libc", + "log", + "rustversion", + "windows 0.58.0", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "serde", + "typenum", + "version_check", + "zeroize", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "ghash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" +dependencies = [ + "opaque-debug", + "polyval", +] + +[[package]] +name = "gimli" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" + +[[package]] +name = "glob" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" + +[[package]] +name = "gloo-net" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06f627b1a58ca3d42b45d6104bf1e1a03799df472df00988b6ba21accc10580" +dependencies = [ + "futures-channel", + "futures-core", + "futures-sink", + "gloo-utils", + "http", + "js-sys", + "pin-project", + "serde", + "serde_json", + "thiserror 1.0.69", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "gloo-timers" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" +dependencies = [ + "futures-channel", + "futures-core", + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "gloo-utils" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b5555354113b18c547c1d3a98fbf7fb32a9ff4f6fa112ce823a21641a0ba3aa" +dependencies = [ + "js-sys", + "serde", + "serde_json", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "h2" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccae279728d634d083c00f6099cb58f01cc99c145b84b8be2f6c74618d79922e" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http", + "indexmap 2.7.0", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "half" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" +dependencies = [ + "cfg-if", + "crunchy", +] + +[[package]] +name = "hash-db" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d23bd4e7b5eda0d0f3a307e8b381fdc8ba9000f26fbe912250c0a4cc3956364a" + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", + "allocator-api2", +] + +[[package]] +name = "hashbrown" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", + "serde", +] + +[[package]] +name = "hashlink" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" +dependencies = [ + "hashbrown 0.14.5", +] + +[[package]] +name = "hdrhistogram" +version = "7.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "765c9198f173dd59ce26ff9f95ef0aafd0a0fe01fb9d72841bc5066a4c06511d" +dependencies = [ + "byteorder", + "num-traits", +] + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" + +[[package]] +name = "hermit-abi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +dependencies = [ + "serde", +] + +[[package]] +name = "hex-literal" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" + +[[package]] +name = "hickory-proto" +version = "0.25.0-alpha.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d063c0692ee669aa6d261988aa19ca5510f1cc40e4f211024f50c888499a35d7" +dependencies = [ + "async-recursion", + "async-trait", + "cfg-if", + "data-encoding", + "enum-as-inner", + "futures-channel", + "futures-io", + "futures-util", + "idna", + "ipnet", + "once_cell", + "rand 0.8.5", + "serde", + "thiserror 2.0.10", + "tinyvec", + "tokio", + "tracing", + "url", +] + +[[package]] +name = "hickory-resolver" +version = "0.25.0-alpha.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42bc352e4412fb657e795f79b4efcf2bd60b59ee5ca0187f3554194cd1107a27" +dependencies = [ + "cfg-if", + "futures-util", + "hickory-proto", + "ipconfig", + "moka", + "once_cell", + "parking_lot", + "rand 0.8.5", + "resolv-conf", + "serde", + "smallvec", + "thiserror 2.0.10", + "tokio", + "tracing", +] + +[[package]] +name = "hkdf" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" +dependencies = [ + "hmac 0.12.1", +] + +[[package]] +name = "hmac" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" +dependencies = [ + "crypto-mac", + "digest 0.9.0", +] + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "hmac-drbg" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" +dependencies = [ + "digest 0.9.0", + "generic-array", + "hmac 0.8.1", +] + +[[package]] +name = "hostname" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" +dependencies = [ + "libc", + "match_cfg", + "winapi", +] + +[[package]] +name = "http" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +dependencies = [ + "bytes", + "futures-util", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "http-range-header" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9171a2ea8a68358193d15dd5d70c1c10a2afc3e7e4c5bc92bc9f025cebd7359c" + +[[package]] +name = "http-types" +version = "2.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e9b187a72d63adbfba487f48095306ac823049cb504ee195541e91c7775f5ad" +dependencies = [ + "anyhow", + "async-channel", + "base64 0.13.1", + "futures-lite", + "infer", + "pin-project-lite", + "rand 0.7.3", + "serde", + "serde_json", + "serde_qs", + "serde_urlencoded", + "url", +] + +[[package]] +name = "httparse" +version = "1.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "human_bytes" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91f255a4535024abf7640cb288260811fc14794f62b063652ed349f9a6c2348e" + +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + +[[package]] +name = "humantime-serde" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57a3db5ea5923d99402c94e9feb261dc5ee9b4efa158b0315f788cf549cc200c" +dependencies = [ + "humantime", + "serde", +] + +[[package]] +name = "hyper" +version = "1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "256fb8d4bd6413123cc9d91832d78325c48ff41677595be797d90f42969beae0" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2" +dependencies = [ + "futures-util", + "http", + "hyper", + "hyper-util", + "log", + "rustls", + "rustls-native-certs 0.8.1", + "rustls-pki-types", + "tokio", + "tokio-rustls", + "tower-service", + "webpki-roots", +] + +[[package]] +name = "hyper-util" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "hyper", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core 0.52.0", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "if-addrs" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a78a89907582615b19f6f0da1af18abf6ff08be259395669b834b057a7ee92d8" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "impl-codec" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" +dependencies = [ + "parity-scale-codec", +] + +[[package]] +name = "impl-trait-for-tuples" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "include_dir" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "923d117408f1e49d914f1a379a309cffe4f18c05cf4e3d12e613a15fc81bd0dd" +dependencies = [ + "include_dir_macros", +] + +[[package]] +name = "include_dir_macros" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cab85a7ed0bd5f0e76d93846e0147172bed2e2d3f859bcc33a8d9699cad1a75" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "indenter" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", + "serde", +] + +[[package]] +name = "indexmap" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" +dependencies = [ + "arbitrary", + "equivalent", + "hashbrown 0.15.2", + "serde", +] + +[[package]] +name = "indoc" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" + +[[package]] +name = "infer" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64e9829a50b42bb782c1df523f78d332fe371b10c661e78b7a3c34b0198e9fac" + +[[package]] +name = "inferno" +version = "0.11.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "232929e1d75fe899576a3d5c7416ad0d88dbfbb3c3d6aa00873a7408a50ddb88" +dependencies = [ + "ahash", + "indexmap 2.7.0", + "is-terminal", + "itoa", + "log", + "num-format", + "once_cell", + "quick-xml", + "rgb", + "str_stack", +] + +[[package]] +name = "inotify" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8069d3ec154eb856955c1c0fbffefbf5f3c40a104ec912d4797314c1801abff" +dependencies = [ + "bitflags 1.3.2", + "inotify-sys", + "libc", +] + +[[package]] +name = "inotify-sys" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e05c02b5e89bff3b946cedeca278abc628fe811e604f027c45a8aa3cf793d0eb" +dependencies = [ + "libc", +] + +[[package]] +name = "inout" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +dependencies = [ + "block-padding", + "generic-array", +] + +[[package]] +name = "instability" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "894813a444908c0c8c0e221b041771d107c4a21de1d317dc49bcc66e3c9e5b3f" +dependencies = [ + "darling", + "indoc", + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "instant" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "interprocess" +version = "2.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "894148491d817cb36b6f778017b8ac46b17408d522dd90f539d677ea938362eb" +dependencies = [ + "doctest-file", + "futures-core", + "libc", + "recvmsg", + "tokio", + "widestring", + "windows-sys 0.52.0", +] + +[[package]] +name = "intrusive-collections" +version = "0.9.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "189d0897e4cbe8c75efedf3502c18c887b05046e59d28404d4d8e46cbc4d1e86" +dependencies = [ + "memoffset", +] + +[[package]] +name = "ipconfig" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" +dependencies = [ + "socket2", + "widestring", + "windows-sys 0.48.0", + "winreg", +] + +[[package]] +name = "ipnet" +version = "2.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" + +[[package]] +name = "iri-string" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc0f0a572e8ffe56e2ff4f769f32ffe919282c3916799f8b68688b6030063bea" +dependencies = [ + "memchr", + "serde", +] + +[[package]] +name = "is-terminal" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" +dependencies = [ + "hermit-abi 0.4.0", + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" + +[[package]] +name = "jni" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6df18c2e3db7e453d3c6ac5b3e9d5182664d28788126d39b91f2d1e22b017ec" +dependencies = [ + "cesu8", + "combine", + "jni-sys", + "log", + "thiserror 1.0.69", + "walkdir", +] + +[[package]] +name = "jni-sys" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" + +[[package]] +name = "jobserver" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" +dependencies = [ + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.76" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6717b6b5b077764fb5966237269cb3c64edddde4b14ce42647430a78ced9e7b7" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "jsonrpsee" +version = "0.24.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5c71d8c1a731cc4227c2f698d377e7848ca12c8a48866fc5e6951c43a4db843" +dependencies = [ + "jsonrpsee-client-transport", + "jsonrpsee-core", + "jsonrpsee-http-client", + "jsonrpsee-proc-macros", + "jsonrpsee-server", + "jsonrpsee-types", + "jsonrpsee-wasm-client", + "jsonrpsee-ws-client", + "tokio", + "tracing", +] + +[[package]] +name = "jsonrpsee-client-transport" +version = "0.24.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "548125b159ba1314104f5bb5f38519e03a41862786aa3925cf349aae9cdd546e" +dependencies = [ + "base64 0.22.1", + "futures-channel", + "futures-util", + "gloo-net", + "http", + "jsonrpsee-core", + "pin-project", + "rustls", + "rustls-pki-types", + "rustls-platform-verifier", + "soketto", + "thiserror 1.0.69", + "tokio", + "tokio-rustls", + "tokio-util", + "tracing", + "url", +] + +[[package]] +name = "jsonrpsee-core" +version = "0.24.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2882f6f8acb9fdaec7cefc4fd607119a9bd709831df7d7672a1d3b644628280" +dependencies = [ + "async-trait", + "bytes", + "futures-timer", + "futures-util", + "http", + "http-body", + "http-body-util", + "jsonrpsee-types", + "parking_lot", + "pin-project", + "rand 0.8.5", + "rustc-hash 2.1.0", + "serde", + "serde_json", + "thiserror 1.0.69", + "tokio", + "tokio-stream", + "tracing", + "wasm-bindgen-futures", +] + +[[package]] +name = "jsonrpsee-http-client" +version = "0.24.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3638bc4617f96675973253b3a45006933bde93c2fd8a6170b33c777cc389e5b" +dependencies = [ + "async-trait", + "base64 0.22.1", + "http-body", + "hyper", + "hyper-rustls", + "hyper-util", + "jsonrpsee-core", + "jsonrpsee-types", + "rustls", + "rustls-platform-verifier", + "serde", + "serde_json", + "thiserror 1.0.69", + "tokio", + "tower 0.4.13", + "tracing", + "url", +] + +[[package]] +name = "jsonrpsee-proc-macros" +version = "0.24.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06c01ae0007548e73412c08e2285ffe5d723195bf268bce67b1b77c3bb2a14d" +dependencies = [ + "heck", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "jsonrpsee-server" +version = "0.24.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82ad8ddc14be1d4290cd68046e7d1d37acd408efed6d3ca08aefcc3ad6da069c" +dependencies = [ + "futures-util", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-util", + "jsonrpsee-core", + "jsonrpsee-types", + "pin-project", + "route-recognizer", + "serde", + "serde_json", + "soketto", + "thiserror 1.0.69", + "tokio", + "tokio-stream", + "tokio-util", + "tower 0.4.13", + "tracing", +] + +[[package]] +name = "jsonrpsee-types" +version = "0.24.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a178c60086f24cc35bb82f57c651d0d25d99c4742b4d335de04e97fa1f08a8a1" +dependencies = [ + "http", + "serde", + "serde_json", + "thiserror 1.0.69", +] + +[[package]] +name = "jsonrpsee-wasm-client" +version = "0.24.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a01cd500915d24ab28ca17527e23901ef1be6d659a2322451e1045532516c25" +dependencies = [ + "jsonrpsee-client-transport", + "jsonrpsee-core", + "jsonrpsee-types", +] + +[[package]] +name = "jsonrpsee-ws-client" +version = "0.24.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fe322e0896d0955a3ebdd5bf813571c53fea29edd713bc315b76620b327e86d" +dependencies = [ + "http", + "jsonrpsee-client-transport", + "jsonrpsee-core", + "jsonrpsee-types", + "url", +] + +[[package]] +name = "jsonwebtoken" +version = "9.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9ae10193d25051e74945f1ea2d0b42e03cc3b890f7e4cc5faa44997d808193f" +dependencies = [ + "base64 0.21.7", + "js-sys", + "pem", + "ring", + "serde", + "serde_json", + "simple_asn1", +] + +[[package]] +name = "k256" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" +dependencies = [ + "cfg-if", + "ecdsa", + "elliptic-curve", + "once_cell", + "serdect", + "sha2 0.10.8", + "signature", +] + +[[package]] +name = "keccak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" +dependencies = [ + "cpufeatures", +] + +[[package]] +name = "keccak-asm" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "505d1856a39b200489082f90d897c3f07c455563880bc5952e38eabf731c83b6" +dependencies = [ + "digest 0.10.7", + "sha3-asm", +] + +[[package]] +name = "kqueue" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7447f1ca1b7b563588a205fe93dea8df60fd981423a768bc1c0ded35ed147d0c" +dependencies = [ + "kqueue-sys", + "libc", +] + +[[package]] +name = "kqueue-sys" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed9625ffda8729b85e45cf04090035ac368927b8cebc34898e7c120f52e4838b" +dependencies = [ + "bitflags 1.3.2", + "libc", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +dependencies = [ + "spin", +] + +[[package]] +name = "libc" +version = "0.2.169" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" + +[[package]] +name = "libloading" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" +dependencies = [ + "cfg-if", + "windows-targets 0.52.6", +] + +[[package]] +name = "libm" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" + +[[package]] +name = "libp2p-identity" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "257b5621d159b32282eac446bed6670c39c7dc68a200a992d8f056afa0066f6d" +dependencies = [ + "asn1_der", + "bs58", + "ed25519-dalek", + "hkdf", + "libsecp256k1", + "multihash", + "quick-protobuf", + "sha2 0.10.8", + "thiserror 1.0.69", + "tracing", + "zeroize", +] + +[[package]] +name = "libproc" +version = "0.14.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e78a09b56be5adbcad5aa1197371688dc6bb249a26da3bca2011ee2fb987ebfb" +dependencies = [ + "bindgen", + "errno", + "libc", +] + +[[package]] +name = "libredox" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +dependencies = [ + "bitflags 2.6.0", + "libc", + "redox_syscall", +] + +[[package]] +name = "libsecp256k1" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95b09eff1b35ed3b33b877ced3a691fc7a481919c7e29c53c906226fcf55e2a1" +dependencies = [ + "arrayref", + "base64 0.13.1", + "digest 0.9.0", + "hmac-drbg", + "libsecp256k1-core", + "libsecp256k1-gen-ecmult", + "libsecp256k1-gen-genmult", + "rand 0.8.5", + "serde", + "sha2 0.9.9", + "typenum", +] + +[[package]] +name = "libsecp256k1-core" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451" +dependencies = [ + "crunchy", + "digest 0.9.0", + "subtle", +] + +[[package]] +name = "libsecp256k1-gen-ecmult" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3038c808c55c87e8a172643a7d87187fc6c4174468159cb3090659d55bcb4809" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "libsecp256k1-gen-genmult" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3db8d6ba2cec9eacc40e6e8ccc98931840301f1006e95647ceb2dd5c3aa06f7c" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "linked-hash-map" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" + +[[package]] +name = "linked_hash_set" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bae85b5be22d9843c80e5fc80e9b64c8a3b1f98f867c709956eca3efff4e92e2" +dependencies = [ + "linked-hash-map", + "serde", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + +[[package]] +name = "litemap" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" + +[[package]] +name = "lock_api" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +dependencies = [ + "autocfg", + "scopeguard", + "serde", +] + +[[package]] +name = "log" +version = "0.4.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" + +[[package]] +name = "loom" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "419e0dc8046cb947daa77eb95ae174acfbddb7673b4151f56d1eed8e93fbfaca" +dependencies = [ + "cfg-if", + "generator", + "scoped-tls", + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "lru" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" +dependencies = [ + "hashbrown 0.15.2", +] + +[[package]] +name = "lz4_flex" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75761162ae2b0e580d7e7c390558127e5f01b4194debd6221fd8c207fc80e3f5" + +[[package]] +name = "mach2" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b955cdeb2a02b9117f121ce63aa52d08ade45de53e48fe6a38b39c10f6f709" +dependencies = [ + "libc", +] + +[[package]] +name = "maili-protocol" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51c7acad58b4507289f65d103f0cf47f77aabf732a043ffd50e3d29edd317585" +dependencies = [ + "alloc-no-stdlib", + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "alloy-sol-types", + "async-trait", + "brotli", + "derive_more", + "miniz_oxide", + "op-alloy-consensus", + "op-alloy-genesis", + "rand 0.8.5", + "serde", + "thiserror 2.0.10", + "tracing", + "unsigned-varint", +] + +[[package]] +name = "match_cfg" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" + +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "memmap2" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd3f7eed9d3848f8b98834af67102b720745c4ec028fcd0aa0239277e7de374f" +dependencies = [ + "libc", +] + +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "metrics" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a7deb012b3b2767169ff203fadb4c6b0b82b947512e5eb9e0b78c2e186ad9e3" +dependencies = [ + "ahash", + "portable-atomic", +] + +[[package]] +name = "metrics-derive" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3dbdd96ed57d565ec744cba02862d707acf373c5772d152abae6ec5c4e24f6c" +dependencies = [ + "proc-macro2", + "quote", + "regex", + "syn 2.0.95", +] + +[[package]] +name = "metrics-exporter-prometheus" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12779523996a67c13c84906a876ac6fe4d07a6e1adb54978378e13f199251a62" +dependencies = [ + "base64 0.22.1", + "indexmap 2.7.0", + "metrics", + "metrics-util 0.19.0", + "quanta", + "thiserror 1.0.69", +] + +[[package]] +name = "metrics-process" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a82c8add4382f29a122fa64fff1891453ed0f6b2867d971e7d60cb8dfa322ff" +dependencies = [ + "libc", + "libproc", + "mach2", + "metrics", + "once_cell", + "procfs 0.17.0", + "rlimit", + "windows 0.58.0", +] + +[[package]] +name = "metrics-util" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15b482df36c13dd1869d73d14d28cd4855fbd6cfc32294bee109908a9f4a4ed7" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", + "hashbrown 0.15.2", + "indexmap 2.7.0", + "metrics", + "ordered-float", +] + +[[package]] +name = "metrics-util" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbd4884b1dd24f7d6628274a2f5ae22465c337c5ba065ec9b6edccddf8acc673" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", + "hashbrown 0.15.2", + "metrics", + "quanta", + "rand 0.8.5", + "rand_xoshiro", + "sketches-ddsketch", +] + +[[package]] +name = "mev-share-sse" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc8342aaf4a3c2a1b2612bdf5cd1aa423918e0f1a0d9242aaeefbffd49457cad" +dependencies = [ + "alloy-primitives", + "async-sse", + "bytes", + "futures-util", + "http-types", + "pin-project-lite", + "reqwest", + "serde", + "serde_json", + "thiserror 1.0.69", + "tokio", + "tracing", +] + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "mime_guess" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" +dependencies = [ + "mime", + "unicase", +] + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "miniz_oxide" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ffbe83022cedc1d264172192511ae958937694cd57ce297164951b8b3568394" +dependencies = [ + "adler2", +] + +[[package]] +name = "mio" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +dependencies = [ + "libc", + "log", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.48.0", +] + +[[package]] +name = "mio" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" +dependencies = [ + "libc", + "log", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.52.0", +] + +[[package]] +name = "mockall" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39a6bfcc6c8c7eed5ee98b9c3e33adc726054389233e201c95dab2d41a3839d2" +dependencies = [ + "cfg-if", + "downcast", + "fragile", + "mockall_derive", + "predicates", + "predicates-tree", +] + +[[package]] +name = "mockall_derive" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25ca3004c2efe9011bd4e461bd8256445052b9615405b4f7ea43fc8ca5c20898" +dependencies = [ + "cfg-if", + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "modular-bitfield" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a53d79ba8304ac1c4f9eb3b9d281f21f7be9d4626f72ce7df4ad8fbde4f38a74" +dependencies = [ + "modular-bitfield-impl", + "static_assertions", +] + +[[package]] +name = "modular-bitfield-impl" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a7d5f7076603ebc68de2dc6a650ec331a062a13abaa346975be747bbfa4b789" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "moka" +version = "0.12.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9321642ca94a4282428e6ea4af8cc2ca4eac48ac7a6a4ea8f33f76d0ce70926" +dependencies = [ + "crossbeam-channel", + "crossbeam-epoch", + "crossbeam-utils", + "loom", + "parking_lot", + "portable-atomic", + "rustc_version 0.4.1", + "smallvec", + "tagptr", + "thiserror 1.0.69", + "uuid", +] + +[[package]] +name = "more-asserts" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fafa6961cabd9c63bcd77a45d7e3b7f3b552b70417831fb0f56db717e72407e" + +[[package]] +name = "multiaddr" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe6351f60b488e04c1d21bc69e56b89cb3f5e8f5d22557d6e8031bdfd79b6961" +dependencies = [ + "arrayref", + "byteorder", + "data-encoding", + "libp2p-identity", + "multibase", + "multihash", + "percent-encoding", + "serde", + "static_assertions", + "unsigned-varint", + "url", +] + +[[package]] +name = "multibase" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b3539ec3c1f04ac9748a260728e855f261b4977f5c3406612c884564f329404" +dependencies = [ + "base-x", + "data-encoding", + "data-encoding-macro", +] + +[[package]] +name = "multihash" +version = "0.19.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b430e7953c29dd6a09afc29ff0bb69c6e306329ee6794700aee27b76a1aea8d" +dependencies = [ + "core2", + "unsigned-varint", +] + +[[package]] +name = "nix" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" +dependencies = [ + "bitflags 1.3.2", + "cfg-if", + "libc", +] + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "notify" +version = "6.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6205bd8bb1e454ad2e27422015fb5e4f2bcc7e08fa8f27058670d208324a4d2d" +dependencies = [ + "bitflags 2.6.0", + "filetime", + "fsevent-sys", + "inotify", + "kqueue", + "libc", + "log", + "mio 0.8.11", + "serde", + "walkdir", + "windows-sys 0.48.0", +] + +[[package]] +name = "ntapi" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8a3895c6391c39d7fe7ebc444a87eb2991b2a0bc718fdabd071eec617fc68e4" +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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" +dependencies = [ + "num-bigint", + "num-complex", + "num-integer", + "num-iter", + "num-rational", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +dependencies = [ + "num-integer", + "num-traits", + "serde", +] + +[[package]] +name = "num-complex" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num-format" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3" +dependencies = [ + "arrayvec", + "itoa", +] + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-iter" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" +dependencies = [ + "num-bigint", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", + "libm", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi 0.3.9", + "libc", +] + +[[package]] +name = "num_enum" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" +dependencies = [ + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "num_threads" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9" +dependencies = [ + "libc", +] + +[[package]] +name = "nybbles" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8983bb634df7248924ee0c4c3a749609b5abcb082c28fffe3254b3eb3602b307" +dependencies = [ + "alloy-rlp", + "arbitrary", + "const-hex", + "proptest", + "serde", + "smallvec", +] + +[[package]] +name = "object" +version = "0.36.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" +dependencies = [ + "critical-section", + "portable-atomic", +] + +[[package]] +name = "oorandom" +version = "11.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9" + +[[package]] +name = "op-alloy-consensus" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "442518bf0ef88f4d79409527565b8cdee235c891f2e2a829497caec5ed9d8d1c" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "arbitrary", + "derive_more", + "serde", + "serde_with", + "thiserror 2.0.10", +] + +[[package]] +name = "op-alloy-genesis" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a2af7fee1fa297569199b524493e50355eab3f1bff75cef492036eb4a3ffb5e" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-sol-types", + "serde", + "serde_repr", + "thiserror 2.0.10", +] + +[[package]] +name = "op-alloy-network" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9e7e9fc656dfa8cc3b6e799da23e100b3d47e31ec6b5a4ed9d44e11f0967ad8" +dependencies = [ + "alloy-consensus", + "alloy-network", + "alloy-primitives", + "alloy-rpc-types-eth", + "alloy-signer", + "op-alloy-consensus", + "op-alloy-rpc-types", +] + +[[package]] +name = "op-alloy-protocol" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a144b1ed079913b11c0640f4eaa3d2ac1bdb6cc35e3658a1640e88b241e0c32" +dependencies = [ + "maili-protocol", +] + +[[package]] +name = "op-alloy-rpc-jsonrpsee" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ff030fa1051bb38a0b526727aec511c0172d6f074a0d63cfedf522b11cc8b09" +dependencies = [ + "alloy-eips", + "alloy-primitives", + "jsonrpsee", + "op-alloy-protocol", + "op-alloy-rpc-types", + "op-alloy-rpc-types-engine", +] + +[[package]] +name = "op-alloy-rpc-types" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50223d61cad040db6721bcc2d489c924c1691ce3f5e674d4d8776131dab786a0" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-network-primitives", + "alloy-primitives", + "alloy-rpc-types-eth", + "alloy-serde", + "arbitrary", + "derive_more", + "op-alloy-consensus", + "serde", + "serde_json", +] + +[[package]] +name = "op-alloy-rpc-types-engine" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5e2419373bae23ea3f6cf5a49c624d9b644061e2e929d4f9629cbcbffa4964d" +dependencies = [ + "alloy-eips", + "alloy-primitives", + "alloy-rpc-types-engine", + "alloy-serde", + "derive_more", + "op-alloy-consensus", + "op-alloy-protocol", + "serde", + "thiserror 2.0.10", +] + +[[package]] +name = "op-reth" +version = "1.1.4" +dependencies = [ + "clap", + "reth-cli-util", + "reth-node-builder", + "reth-optimism-chainspec", + "reth-optimism-cli", + "reth-optimism-consensus", + "reth-optimism-evm", + "reth-optimism-forks", + "reth-optimism-node", + "reth-optimism-payload-builder", + "reth-optimism-primitives", + "reth-optimism-rpc", + "reth-provider", + "tracing", +] + +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + +[[package]] +name = "ordered-float" +version = "4.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7bb71e1b3fa6ca1c61f383464aaf2bb0e2f8e772a1f01d486832464de363b951" +dependencies = [ + "num-traits", +] + +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + +[[package]] +name = "p256" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" +dependencies = [ + "ecdsa", + "elliptic-curve", + "primeorder", + "sha2 0.10.8", +] + +[[package]] +name = "page_size" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30d5b2194ed13191c1999ae0704b7839fb18384fa22e49b57eeaa97d79ce40da" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "parity-scale-codec" +version = "3.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" +dependencies = [ + "arbitrary", + "arrayvec", + "bitvec", + "byte-slice-cast", + "bytes", + "impl-trait-for-tuples", + "parity-scale-codec-derive", + "serde", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "3.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "parking" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" + +[[package]] +name = "parking_lot" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets 0.52.6", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest 0.10.7", + "hmac 0.12.1", +] + +[[package]] +name = "pem" +version = "3.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e459365e590736a54c3fa561947c84837534b8e9af6fc5bf781307e82658fae" +dependencies = [ + "base64 0.22.1", + "serde", +] + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "pest" +version = "2.7.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b7cafe60d6cf8e62e1b9b2ea516a089c008945bb5a275416789e7db0bc199dc" +dependencies = [ + "memchr", + "thiserror 2.0.10", + "ucd-trie", +] + +[[package]] +name = "pharos" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414" +dependencies = [ + "futures", + "rustc_version 0.4.1", +] + +[[package]] +name = "phf" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" +dependencies = [ + "phf_macros", + "phf_shared", +] + +[[package]] +name = "phf_generator" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" +dependencies = [ + "phf_shared", + "rand 0.8.5", +] + +[[package]] +name = "phf_macros" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216" +dependencies = [ + "phf_generator", + "phf_shared", + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "phf_shared" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" +dependencies = [ + "siphasher", +] + +[[package]] +name = "pin-project" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e2ec53ad785f4d35dac0adea7f7dc6f1bb277ad84a680c7afefeae05d1f5916" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d56a66c0c55993aa927429d0f8a0abfd74f084e4d9c192cffed01e418d83eefb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "pkg-config" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" + +[[package]] +name = "plain_hasher" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e19e6491bdde87c2c43d70f4c194bc8a758f2eb732df00f61e43f7362e3b4cc" +dependencies = [ + "crunchy", +] + +[[package]] +name = "plotters" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aeb6f403d7a4911efb1e33402027fc44f29b5bf6def3effcc22d7bb75f2b747" +dependencies = [ + "num-traits", + "plotters-backend", + "plotters-svg", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "plotters-backend" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df42e13c12958a16b3f7f4386b9ab1f3e7933914ecea48da7139435263a4172a" + +[[package]] +name = "plotters-svg" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51bae2ac328883f7acdfea3d66a7c35751187f870bc81f94563733a154d7a670" +dependencies = [ + "plotters-backend", +] + +[[package]] +name = "pollster" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f3a9f18d041e6d0e102a0a46750538147e5e8992d3b4873aaafee2520b00ce3" + +[[package]] +name = "polyval" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" +dependencies = [ + "cfg-if", + "cpufeatures", + "opaque-debug", + "universal-hash", +] + +[[package]] +name = "portable-atomic" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "280dc24453071f1b63954171985a0b0d30058d287960968b9b2aca264c8d4ee6" + +[[package]] +name = "poseidon-bn254" +version = "0.1.0" +source = "git+https://github.com/scroll-tech/poseidon-bn254?branch=master#254baa0e3e85c0975c16fe6f33042b1fa9ae0a44" +dependencies = [ + "bn254 0.1.0 (git+https://github.com/scroll-tech/bn254.git?branch=master)", + "itertools 0.13.0", + "sp1-intrinsics", +] + +[[package]] +name = "poseidon-bn254" +version = "0.1.0" +source = "git+https://github.com/scroll-tech/poseidon-bn254?rev=526a64a#526a64a81419bcab6bd8280a8a3f9808189e0373" +dependencies = [ + "bn254 0.1.0 (git+https://github.com/scroll-tech/bn254)", + "itertools 0.13.0", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "pprof" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebbe2f8898beba44815fdc9e5a4ae9c929e21c5dc29b0c774a15555f7f58d6d0" +dependencies = [ + "aligned-vec", + "backtrace", + "cfg-if", + "criterion", + "findshlibs", + "inferno", + "libc", + "log", + "nix", + "once_cell", + "parking_lot", + "smallvec", + "symbolic-demangle", + "tempfile", + "thiserror 1.0.69", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "predicates" +version = "3.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5d19ee57562043d37e82899fade9a22ebab7be9cef5026b07fda9cdd4293573" +dependencies = [ + "anstyle", + "predicates-core", +] + +[[package]] +name = "predicates-core" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "727e462b119fe9c93fd0eb1429a5f7647394014cf3c04ab2c0350eeb09095ffa" + +[[package]] +name = "predicates-tree" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72dd2d6d381dfb73a193c7fca536518d7caee39fc8503f74e7dc0be0531b425c" +dependencies = [ + "predicates-core", + "termtree", +] + +[[package]] +name = "pretty_assertions" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ae130e2f271fbc2ac3a40fb1d07180839cdbbe443c7a27e1e3c13c5cac0116d" +dependencies = [ + "diff", + "yansi", +] + +[[package]] +name = "prettyplease" +version = "0.2.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "483f8c21f64f3ea09fe0f30f5d48c3e8eefe5dac9129f0075f76593b4c1da705" +dependencies = [ + "proc-macro2", + "syn 2.0.95", +] + +[[package]] +name = "primeorder" +version = "0.13.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" +dependencies = [ + "elliptic-curve", +] + +[[package]] +name = "primitive-types" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" +dependencies = [ + "fixed-hash", + "impl-codec", + "uint 0.9.5", +] + +[[package]] +name = "proc-macro-crate" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" +dependencies = [ + "toml_edit", +] + +[[package]] +name = "proc-macro-error-attr2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "proc-macro-error2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" +dependencies = [ + "proc-macro-error-attr2", + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "proc-macro2" +version = "1.0.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "procfs" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "731e0d9356b0c25f16f33b5be79b1c57b562f141ebfcdb0ad8ac2c13a24293b4" +dependencies = [ + "bitflags 2.6.0", + "chrono", + "flate2", + "hex", + "lazy_static", + "procfs-core 0.16.0", + "rustix", +] + +[[package]] +name = "procfs" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc5b72d8145275d844d4b5f6d4e1eef00c8cd889edb6035c21675d1bb1f45c9f" +dependencies = [ + "bitflags 2.6.0", + "hex", + "procfs-core 0.17.0", + "rustix", +] + +[[package]] +name = "procfs-core" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d3554923a69f4ce04c4a754260c338f505ce22642d3830e049a399fc2059a29" +dependencies = [ + "bitflags 2.6.0", + "chrono", + "hex", +] + +[[package]] +name = "procfs-core" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "239df02d8349b06fc07398a3a1697b06418223b1c7725085e801e7c0fc6a12ec" +dependencies = [ + "bitflags 2.6.0", + "hex", +] + +[[package]] +name = "proptest" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4c2511913b88df1637da85cc8d96ec8e43a3f8bb8ccb71ee1ac240d6f3df58d" +dependencies = [ + "bit-set", + "bit-vec", + "bitflags 2.6.0", + "lazy_static", + "num-traits", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rand_xorshift", + "regex-syntax 0.8.5", + "rusty-fork", + "tempfile", + "unarray", +] + +[[package]] +name = "proptest-arbitrary-interop" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1981e49bd2432249da8b0e11e5557099a8e74690d6b94e721f7dc0bb7f3555f" +dependencies = [ + "arbitrary", + "proptest", +] + +[[package]] +name = "proptest-derive" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ee1c9ac207483d5e7db4940700de86a9aae46ef90c48b57f99fe7edb8345e49" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "quanta" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bd1fe6824cea6538803de3ff1bc0cf3949024db3d43c9643024bfb33a807c0e" +dependencies = [ + "crossbeam-utils", + "libc", + "once_cell", + "raw-cpuid", + "wasi 0.11.0+wasi-snapshot-preview1", + "web-sys", + "winapi", +] + +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + +[[package]] +name = "quick-protobuf" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d6da84cc204722a989e01ba2f6e1e276e190f22263d0cb6ce8526fcdb0d2e1f" +dependencies = [ + "byteorder", +] + +[[package]] +name = "quick-xml" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f50b1c63b38611e7d4d7f68b82d3ad0cc71a2ad2e7f61fc10f1328d917c93cd" +dependencies = [ + "memchr", +] + +[[package]] +name = "quinn" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62e96808277ec6f97351a2380e6c25114bc9e67037775464979f3037c92d05ef" +dependencies = [ + "bytes", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash 2.1.0", + "rustls", + "socket2", + "thiserror 2.0.10", + "tokio", + "tracing", +] + +[[package]] +name = "quinn-proto" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2fe5ef3495d7d2e377ff17b1a8ce2ee2ec2a18cde8b6ad6619d65d0701c135d" +dependencies = [ + "bytes", + "getrandom 0.2.15", + "rand 0.8.5", + "ring", + "rustc-hash 2.1.0", + "rustls", + "rustls-pki-types", + "slab", + "thiserror 2.0.10", + "tinyvec", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-udp" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c40286217b4ba3a71d644d752e6a0b71f13f1b6a2c5311acfcbe0c2418ed904" +dependencies = [ + "cfg_aliases", + "libc", + "once_cell", + "socket2", + "tracing", + "windows-sys 0.59.0", +] + +[[package]] +name = "quote" +version = "1.0.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", + "serde", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.15", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rand_xorshift" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +dependencies = [ + "rand_core 0.6.4", +] + +[[package]] +name = "rand_xoshiro" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" +dependencies = [ + "rand_core 0.6.4", +] + +[[package]] +name = "ratatui" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdef7f9be5c0122f890d58bdf4d964349ba6a6161f705907526d891efabba57d" +dependencies = [ + "bitflags 2.6.0", + "cassowary", + "compact_str", + "crossterm", + "instability", + "itertools 0.13.0", + "lru", + "paste", + "strum", + "strum_macros", + "unicode-segmentation", + "unicode-truncate", + "unicode-width 0.1.14", +] + +[[package]] +name = "raw-cpuid" +version = "11.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ab240315c661615f2ee9f0f2cd32d5a7343a84d5ebcccb99d46e6637565e7b0" +dependencies = [ + "bitflags 2.6.0", +] + +[[package]] +name = "rayon" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "recvmsg" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3edd4d5d42c92f0a659926464d4cce56b562761267ecf0f469d85b7de384175" + +[[package]] +name = "redox_syscall" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" +dependencies = [ + "bitflags 2.6.0", +] + +[[package]] +name = "redox_users" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" +dependencies = [ + "getrandom 0.2.15", + "libredox", + "thiserror 1.0.69", +] + +[[package]] +name = "regex" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata 0.4.9", + "regex-syntax 0.8.5", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", +] + +[[package]] +name = "regex-automata" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.8.5", +] + +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + +[[package]] +name = "regex-syntax" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" + +[[package]] +name = "regress" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1541daf4e4ed43a0922b7969bdc2170178bcacc5dabf7e39bc508a9fa3953a7a" +dependencies = [ + "hashbrown 0.14.5", + "memchr", +] + +[[package]] +name = "relative-path" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2" + +[[package]] +name = "reqwest" +version = "0.12.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43e734407157c3c2034e0258f5e4473ddb361b1e85f95a66690d67264d7cd1da" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-rustls", + "hyper-util", + "ipnet", + "js-sys", + "log", + "mime", + "once_cell", + "percent-encoding", + "pin-project-lite", + "quinn", + "rustls", + "rustls-native-certs 0.8.1", + "rustls-pemfile", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-rustls", + "tokio-util", + "tower 0.5.2", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", + "webpki-roots", + "windows-registry", +] + +[[package]] +name = "resolv-conf" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52e44394d2086d010551b14b53b1f24e31647570cd1deb0379e2c21b329aba00" +dependencies = [ + "hostname", + "quick-error", +] + +[[package]] +name = "reth" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "alloy-rpc-types", + "aquamarine", + "backon", + "clap", + "eyre", + "futures", + "reth-basic-payload-builder", + "reth-beacon-consensus", + "reth-blockchain-tree", + "reth-chainspec", + "reth-cli", + "reth-cli-commands", + "reth-cli-runner", + "reth-cli-util", + "reth-config", + "reth-consensus", + "reth-consensus-common", + "reth-db", + "reth-db-api", + "reth-downloaders", + "reth-engine-util", + "reth-errors", + "reth-ethereum-cli", + "reth-ethereum-payload-builder", + "reth-evm", + "reth-execution-types", + "reth-exex", + "reth-fs-util", + "reth-network", + "reth-network-api", + "reth-network-p2p", + "reth-node-api", + "reth-node-builder", + "reth-node-core", + "reth-node-ethereum", + "reth-node-events", + "reth-node-metrics", + "reth-payload-builder", + "reth-payload-primitives", + "reth-payload-validator", + "reth-primitives", + "reth-primitives-traits", + "reth-provider", + "reth-prune", + "reth-revm", + "reth-rpc", + "reth-rpc-api", + "reth-rpc-builder", + "reth-rpc-eth-types", + "reth-rpc-server-types", + "reth-rpc-types-compat", + "reth-stages", + "reth-static-file", + "reth-tasks", + "reth-tracing", + "reth-transaction-pool", + "serde_json", + "similar-asserts", + "tempfile", + "tokio", + "tracing", +] + +[[package]] +name = "reth-basic-payload-builder" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "futures-core", + "futures-util", + "metrics", + "reth-chainspec", + "reth-evm", + "reth-metrics", + "reth-payload-builder", + "reth-payload-builder-primitives", + "reth-payload-primitives", + "reth-primitives", + "reth-provider", + "reth-revm", + "reth-scroll-revm", + "reth-tasks", + "reth-transaction-pool", + "tokio", + "tracing", +] + +[[package]] +name = "reth-beacon-consensus" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-genesis", + "alloy-primitives", + "alloy-rpc-types-engine", + "assert_matches", + "futures", + "itertools 0.13.0", + "metrics", + "reth-blockchain-tree", + "reth-blockchain-tree-api", + "reth-chainspec", + "reth-codecs", + "reth-config", + "reth-consensus", + "reth-db", + "reth-db-api", + "reth-downloaders", + "reth-engine-primitives", + "reth-errors", + "reth-ethereum-consensus", + "reth-ethereum-engine-primitives", + "reth-evm", + "reth-evm-ethereum", + "reth-exex-types", + "reth-metrics", + "reth-network-p2p", + "reth-node-types", + "reth-payload-builder", + "reth-payload-builder-primitives", + "reth-payload-primitives", + "reth-payload-validator", + "reth-primitives", + "reth-primitives-traits", + "reth-provider", + "reth-prune", + "reth-prune-types", + "reth-rpc-types-compat", + "reth-stages", + "reth-stages-api", + "reth-static-file", + "reth-tasks", + "reth-testing-utils", + "reth-tokio-util", + "reth-tracing", + "schnellru", + "thiserror 2.0.10", + "tokio", + "tokio-stream", + "tracing", +] + +[[package]] +name = "reth-bench" +version = "1.1.4" +dependencies = [ + "alloy-eips", + "alloy-json-rpc", + "alloy-primitives", + "alloy-provider", + "alloy-pubsub", + "alloy-rpc-client", + "alloy-rpc-types-engine", + "alloy-transport", + "alloy-transport-http", + "alloy-transport-ipc", + "alloy-transport-ws", + "async-trait", + "clap", + "csv", + "eyre", + "futures", + "reqwest", + "reth-cli-runner", + "reth-cli-util", + "reth-node-api", + "reth-node-core", + "reth-primitives", + "reth-primitives-traits", + "reth-rpc-types-compat", + "reth-tracing", + "serde", + "thiserror 2.0.10", + "tokio", + "tower 0.4.13", + "tracing", +] + +[[package]] +name = "reth-blockchain-tree" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-genesis", + "alloy-primitives", + "aquamarine", + "assert_matches", + "linked_hash_set", + "metrics", + "parking_lot", + "reth-blockchain-tree-api", + "reth-chainspec", + "reth-consensus", + "reth-db", + "reth-db-api", + "reth-evm", + "reth-evm-ethereum", + "reth-execution-errors", + "reth-execution-types", + "reth-metrics", + "reth-network", + "reth-node-types", + "reth-primitives", + "reth-provider", + "reth-revm", + "reth-scroll-revm", + "reth-stages-api", + "reth-storage-errors", + "reth-testing-utils", + "reth-trie", + "reth-trie-db", + "reth-trie-parallel", + "tokio", + "tracing", +] + +[[package]] +name = "reth-blockchain-tree-api" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "reth-consensus", + "reth-execution-errors", + "reth-primitives", + "reth-primitives-traits", + "reth-storage-errors", + "thiserror 2.0.10", +] + +[[package]] +name = "reth-chain-state" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-signer", + "alloy-signer-local", + "derive_more", + "metrics", + "parking_lot", + "pin-project", + "rand 0.8.5", + "reth-chainspec", + "reth-errors", + "reth-execution-types", + "reth-metrics", + "reth-primitives", + "reth-primitives-traits", + "reth-scroll-revm", + "reth-storage-api", + "reth-testing-utils", + "reth-trie", + "tokio", + "tokio-stream", + "tracing", +] + +[[package]] +name = "reth-chainspec" +version = "1.1.4" +dependencies = [ + "alloy-chains", + "alloy-consensus", + "alloy-eips", + "alloy-genesis", + "alloy-primitives", + "alloy-rlp", + "alloy-trie", + "auto_impl", + "derive_more", + "once_cell", + "reth-ethereum-forks", + "reth-network-peers", + "reth-primitives-traits", + "reth-trie-common", + "serde_json", +] + +[[package]] +name = "reth-cli" +version = "1.1.4" +dependencies = [ + "alloy-genesis", + "clap", + "eyre", + "reth-cli-runner", + "reth-db", + "serde_json", + "shellexpand", +] + +[[package]] +name = "reth-cli-commands" +version = "1.1.4" +dependencies = [ + "ahash", + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "arbitrary", + "backon", + "clap", + "comfy-table", + "crossterm", + "eyre", + "fdlimit", + "futures", + "human_bytes", + "itertools 0.13.0", + "proptest", + "proptest-arbitrary-interop", + "ratatui", + "reth-beacon-consensus", + "reth-chainspec", + "reth-cli", + "reth-cli-runner", + "reth-cli-util", + "reth-codecs", + "reth-config", + "reth-consensus", + "reth-db", + "reth-db-api", + "reth-db-common", + "reth-discv4", + "reth-downloaders", + "reth-ecies", + "reth-eth-wire", + "reth-ethereum-cli", + "reth-evm", + "reth-exex", + "reth-fs-util", + "reth-network", + "reth-network-p2p", + "reth-network-peers", + "reth-node-api", + "reth-node-builder", + "reth-node-core", + "reth-node-events", + "reth-node-metrics", + "reth-primitives", + "reth-provider", + "reth-prune", + "reth-prune-types", + "reth-stages", + "reth-stages-types", + "reth-static-file", + "reth-static-file-types", + "reth-trie", + "reth-trie-common", + "secp256k1", + "serde", + "serde_json", + "tokio", + "toml", + "tracing", +] + +[[package]] +name = "reth-cli-runner" +version = "1.1.4" +dependencies = [ + "reth-tasks", + "tokio", + "tracing", +] + +[[package]] +name = "reth-cli-util" +version = "1.1.4" +dependencies = [ + "alloy-eips", + "alloy-primitives", + "cfg-if", + "eyre", + "libc", + "rand 0.8.5", + "reth-fs-util", + "secp256k1", + "serde", + "thiserror 2.0.10", + "tikv-jemallocator", + "tracy-client", +] + +[[package]] +name = "reth-codecs" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-genesis", + "alloy-primitives", + "alloy-trie", + "arbitrary", + "bytes", + "modular-bitfield", + "op-alloy-consensus", + "proptest", + "proptest-arbitrary-interop", + "reth-codecs-derive", + "rstest", + "serde", + "serde_json", + "test-fuzz", + "visibility", +] + +[[package]] +name = "reth-codecs-derive" +version = "1.1.4" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "similar-asserts", + "syn 2.0.95", +] + +[[package]] +name = "reth-config" +version = "1.1.4" +dependencies = [ + "alloy-primitives", + "eyre", + "humantime-serde", + "reth-network-peers", + "reth-network-types", + "reth-prune-types", + "reth-stages-types", + "serde", + "tempfile", + "toml", +] + +[[package]] +name = "reth-consensus" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "auto_impl", + "derive_more", + "reth-primitives", + "reth-primitives-traits", +] + +[[package]] +name = "reth-consensus-common" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "mockall", + "rand 0.8.5", + "reth-chainspec", + "reth-consensus", + "reth-primitives", + "reth-primitives-traits", + "reth-storage-api", +] + +[[package]] +name = "reth-consensus-debug-client" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-provider", + "alloy-rpc-types-engine", + "alloy-rpc-types-eth", + "auto_impl", + "eyre", + "futures", + "reqwest", + "reth-node-api", + "reth-rpc-api", + "reth-rpc-builder", + "reth-tracing", + "ringbuffer", + "serde", + "tokio", +] + +[[package]] +name = "reth-db" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-primitives", + "arbitrary", + "assert_matches", + "bytes", + "codspeed-criterion-compat", + "derive_more", + "eyre", + "metrics", + "page_size", + "parking_lot", + "paste", + "pprof", + "proptest", + "reth-db-api", + "reth-fs-util", + "reth-libmdbx", + "reth-metrics", + "reth-nippy-jar", + "reth-primitives", + "reth-primitives-traits", + "reth-prune-types", + "reth-scroll-primitives", + "reth-stages-types", + "reth-storage-errors", + "reth-tracing", + "reth-trie-common", + "rustc-hash 2.1.0", + "serde", + "serde_json", + "strum", + "sysinfo", + "tempfile", + "test-fuzz", + "thiserror 2.0.10", +] + +[[package]] +name = "reth-db-api" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-genesis", + "alloy-primitives", + "arbitrary", + "bytes", + "derive_more", + "metrics", + "modular-bitfield", + "parity-scale-codec", + "proptest", + "proptest-arbitrary-interop", + "rand 0.8.5", + "reth-codecs", + "reth-db-models", + "reth-optimism-primitives", + "reth-primitives", + "reth-primitives-traits", + "reth-prune-types", + "reth-stages-types", + "reth-storage-errors", + "reth-trie-common", + "roaring", + "serde", + "test-fuzz", +] + +[[package]] +name = "reth-db-common" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-genesis", + "alloy-primitives", + "boyer-moore-magiclen", + "eyre", + "reth-chainspec", + "reth-codecs", + "reth-config", + "reth-db", + "reth-db-api", + "reth-etl", + "reth-fs-util", + "reth-node-types", + "reth-primitives", + "reth-primitives-traits", + "reth-provider", + "reth-stages-types", + "reth-trie", + "reth-trie-db", + "serde", + "serde_json", + "thiserror 2.0.10", + "tracing", +] + +[[package]] +name = "reth-db-models" +version = "1.1.4" +dependencies = [ + "alloy-eips", + "alloy-primitives", + "arbitrary", + "bytes", + "modular-bitfield", + "proptest", + "proptest-arbitrary-interop", + "reth-codecs", + "reth-primitives-traits", + "serde", + "test-fuzz", +] + +[[package]] +name = "reth-discv4" +version = "1.1.4" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "assert_matches", + "discv5", + "enr", + "generic-array", + "itertools 0.13.0", + "parking_lot", + "rand 0.8.5", + "reth-ethereum-forks", + "reth-net-banlist", + "reth-net-nat", + "reth-network-peers", + "reth-tracing", + "schnellru", + "secp256k1", + "serde", + "thiserror 2.0.10", + "tokio", + "tokio-stream", + "tracing", +] + +[[package]] +name = "reth-discv5" +version = "1.1.4" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "derive_more", + "discv5", + "enr", + "futures", + "itertools 0.13.0", + "metrics", + "rand 0.8.5", + "reth-chainspec", + "reth-ethereum-forks", + "reth-metrics", + "reth-network-peers", + "reth-tracing", + "secp256k1", + "thiserror 2.0.10", + "tokio", + "tracing", +] + +[[package]] +name = "reth-dns-discovery" +version = "1.1.4" +dependencies = [ + "alloy-chains", + "alloy-primitives", + "alloy-rlp", + "data-encoding", + "enr", + "hickory-resolver", + "linked_hash_set", + "parking_lot", + "rand 0.8.5", + "reth-chainspec", + "reth-ethereum-forks", + "reth-network-peers", + "reth-tokio-util", + "reth-tracing", + "schnellru", + "secp256k1", + "serde", + "serde_with", + "thiserror 2.0.10", + "tokio", + "tokio-stream", + "tracing", +] + +[[package]] +name = "reth-downloaders" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "assert_matches", + "futures", + "futures-util", + "itertools 0.13.0", + "metrics", + "pin-project", + "rand 0.8.5", + "rayon", + "reth-chainspec", + "reth-config", + "reth-consensus", + "reth-db", + "reth-db-api", + "reth-metrics", + "reth-network-p2p", + "reth-network-peers", + "reth-primitives", + "reth-primitives-traits", + "reth-provider", + "reth-storage-api", + "reth-tasks", + "reth-testing-utils", + "reth-tracing", + "tempfile", + "thiserror 2.0.10", + "tokio", + "tokio-stream", + "tokio-util", + "tracing", +] + +[[package]] +name = "reth-e2e-test-utils" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-network", + "alloy-primitives", + "alloy-rlp", + "alloy-rpc-types-engine", + "alloy-rpc-types-eth", + "alloy-signer", + "alloy-signer-local", + "derive_more", + "eyre", + "futures-util", + "jsonrpsee", + "op-alloy-rpc-types-engine", + "reth-chainspec", + "reth-db", + "reth-engine-local", + "reth-network", + "reth-network-api", + "reth-network-peers", + "reth-node-api", + "reth-node-builder", + "reth-node-core", + "reth-optimism-primitives", + "reth-payload-builder", + "reth-payload-builder-primitives", + "reth-payload-primitives", + "reth-primitives", + "reth-provider", + "reth-rpc-api", + "reth-rpc-eth-api", + "reth-rpc-layer", + "reth-rpc-server-types", + "reth-stages-types", + "reth-tasks", + "reth-tokio-util", + "reth-tracing", + "serde_json", + "tokio", + "tokio-stream", + "tracing", + "url", +] + +[[package]] +name = "reth-ecies" +version = "1.1.4" +dependencies = [ + "aes", + "alloy-primitives", + "alloy-rlp", + "block-padding", + "byteorder", + "cipher", + "concat-kdf", + "ctr", + "digest 0.10.7", + "futures", + "generic-array", + "hmac 0.12.1", + "pin-project", + "rand 0.8.5", + "reth-network-peers", + "secp256k1", + "sha2 0.10.8", + "sha3", + "thiserror 2.0.10", + "tokio", + "tokio-stream", + "tokio-util", + "tracing", + "typenum", +] + +[[package]] +name = "reth-engine-local" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-primitives", + "alloy-rpc-types-engine", + "eyre", + "futures-util", + "op-alloy-rpc-types-engine", + "reth-beacon-consensus", + "reth-chainspec", + "reth-consensus", + "reth-engine-primitives", + "reth-engine-service", + "reth-engine-tree", + "reth-ethereum-engine-primitives", + "reth-evm", + "reth-node-types", + "reth-payload-builder", + "reth-payload-builder-primitives", + "reth-payload-primitives", + "reth-provider", + "reth-prune", + "reth-stages-api", + "reth-transaction-pool", + "tokio", + "tokio-stream", + "tracing", +] + +[[package]] +name = "reth-engine-primitives" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-primitives", + "alloy-rpc-types-engine", + "futures", + "reth-errors", + "reth-execution-types", + "reth-payload-builder-primitives", + "reth-payload-primitives", + "reth-primitives", + "reth-primitives-traits", + "reth-trie", + "serde", + "thiserror 2.0.10", + "tokio", +] + +[[package]] +name = "reth-engine-service" +version = "1.1.4" +dependencies = [ + "futures", + "pin-project", + "reth-beacon-consensus", + "reth-chainspec", + "reth-consensus", + "reth-engine-primitives", + "reth-engine-tree", + "reth-ethereum-engine-primitives", + "reth-evm", + "reth-evm-ethereum", + "reth-exex-types", + "reth-network-p2p", + "reth-node-types", + "reth-payload-builder", + "reth-primitives", + "reth-provider", + "reth-prune", + "reth-stages-api", + "reth-tasks", + "thiserror 2.0.10", + "tokio", + "tokio-stream", +] + +[[package]] +name = "reth-engine-tree" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "alloy-rpc-types-engine", + "assert_matches", + "codspeed-criterion-compat", + "crossbeam-channel", + "derive_more", + "futures", + "metrics", + "proptest", + "rand 0.8.5", + "rayon", + "reth-beacon-consensus", + "reth-blockchain-tree", + "reth-blockchain-tree-api", + "reth-chain-state", + "reth-chainspec", + "reth-consensus", + "reth-db", + "reth-engine-primitives", + "reth-errors", + "reth-ethereum-engine-primitives", + "reth-evm", + "reth-exex-types", + "reth-metrics", + "reth-network-p2p", + "reth-payload-builder", + "reth-payload-builder-primitives", + "reth-payload-primitives", + "reth-primitives", + "reth-primitives-traits", + "reth-provider", + "reth-prune", + "reth-prune-types", + "reth-revm", + "reth-rpc-types-compat", + "reth-stages", + "reth-stages-api", + "reth-static-file", + "reth-tasks", + "reth-testing-utils", + "reth-tracing", + "reth-trie", + "reth-trie-db", + "reth-trie-parallel", + "reth-trie-sparse", + "revm-primitives", + "thiserror 2.0.10", + "tokio", + "tracing", +] + +[[package]] +name = "reth-engine-util" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rpc-types-engine", + "eyre", + "futures", + "itertools 0.13.0", + "pin-project", + "reth-consensus-common", + "reth-engine-primitives", + "reth-errors", + "reth-ethereum-forks", + "reth-evm", + "reth-fs-util", + "reth-payload-validator", + "reth-primitives", + "reth-provider", + "reth-revm", + "reth-rpc-types-compat", + "reth-trie", + "revm-primitives", + "serde", + "serde_json", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "reth-errors" +version = "1.1.4" +dependencies = [ + "reth-blockchain-tree-api", + "reth-consensus", + "reth-execution-errors", + "reth-fs-util", + "reth-storage-errors", + "thiserror 2.0.10", +] + +[[package]] +name = "reth-eth-wire" +version = "1.1.4" +dependencies = [ + "alloy-chains", + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "arbitrary", + "async-stream", + "bytes", + "derive_more", + "futures", + "pin-project", + "proptest", + "proptest-arbitrary-interop", + "rand 0.8.5", + "reth-codecs", + "reth-ecies", + "reth-eth-wire-types", + "reth-ethereum-forks", + "reth-metrics", + "reth-network-peers", + "reth-primitives", + "reth-primitives-traits", + "reth-tracing", + "secp256k1", + "serde", + "snap", + "test-fuzz", + "thiserror 2.0.10", + "tokio", + "tokio-stream", + "tokio-util", + "tracing", +] + +[[package]] +name = "reth-eth-wire-types" +version = "1.1.4" +dependencies = [ + "alloy-chains", + "alloy-consensus", + "alloy-eips", + "alloy-genesis", + "alloy-primitives", + "alloy-rlp", + "arbitrary", + "bytes", + "derive_more", + "proptest", + "proptest-arbitrary-interop", + "rand 0.8.5", + "reth-chainspec", + "reth-codecs-derive", + "reth-ethereum-forks", + "reth-primitives", + "reth-primitives-traits", + "serde", + "thiserror 2.0.10", +] + +[[package]] +name = "reth-ethereum-cli" +version = "1.1.4" +dependencies = [ + "clap", + "eyre", + "reth-chainspec", + "reth-cli", + "reth-cli-commands", +] + +[[package]] +name = "reth-ethereum-consensus" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "reth-chainspec", + "reth-consensus", + "reth-consensus-common", + "reth-primitives", + "reth-primitives-traits", + "tracing", +] + +[[package]] +name = "reth-ethereum-engine-primitives" +version = "1.1.4" +dependencies = [ + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "alloy-rpc-types-engine", + "reth-chain-state", + "reth-chainspec", + "reth-engine-primitives", + "reth-payload-primitives", + "reth-payload-validator", + "reth-primitives", + "reth-rpc-types-compat", + "serde", + "serde_json", + "sha2 0.10.8", +] + +[[package]] +name = "reth-ethereum-forks" +version = "1.1.4" +dependencies = [ + "alloy-chains", + "alloy-consensus", + "alloy-primitives", + "alloy-rlp", + "arbitrary", + "auto_impl", + "crc", + "dyn-clone", + "once_cell", + "proptest", + "proptest-derive", + "rustc-hash 2.1.0", + "serde", + "thiserror 2.0.10", +] + +[[package]] +name = "reth-ethereum-payload-builder" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "reth-basic-payload-builder", + "reth-chain-state", + "reth-chainspec", + "reth-errors", + "reth-evm", + "reth-evm-ethereum", + "reth-execution-types", + "reth-payload-builder", + "reth-payload-builder-primitives", + "reth-payload-primitives", + "reth-primitives", + "reth-primitives-traits", + "reth-revm", + "reth-scroll-revm", + "reth-storage-api", + "reth-transaction-pool", + "tracing", +] + +[[package]] +name = "reth-ethereum-primitives" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "arbitrary", + "derive_more", + "modular-bitfield", + "once_cell", + "proptest", + "proptest-arbitrary-interop", + "rand 0.8.5", + "reth-codecs", + "reth-primitives-traits", + "reth-zstd-compressors", + "secp256k1", + "serde", + "test-fuzz", +] + +[[package]] +name = "reth-etl" +version = "1.1.4" +dependencies = [ + "alloy-primitives", + "rayon", + "reth-db-api", + "tempfile", +] + +[[package]] +name = "reth-evm" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "auto_impl", + "futures-util", + "metrics", + "metrics-util 0.18.0", + "parking_lot", + "reth-chainspec", + "reth-consensus", + "reth-consensus-common", + "reth-ethereum-forks", + "reth-execution-errors", + "reth-execution-types", + "reth-metrics", + "reth-primitives", + "reth-primitives-traits", + "reth-prune-types", + "reth-revm", + "reth-scroll-revm", + "reth-storage-errors", + "revm-primitives", +] + +[[package]] +name = "reth-evm-ethereum" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-genesis", + "alloy-primitives", + "alloy-sol-types", + "reth-chainspec", + "reth-consensus", + "reth-ethereum-consensus", + "reth-ethereum-forks", + "reth-evm", + "reth-execution-types", + "reth-primitives", + "reth-primitives-traits", + "reth-revm", + "reth-scroll-primitives", + "reth-testing-utils", + "revm-primitives", + "secp256k1", + "serde_json", +] + +[[package]] +name = "reth-execution-errors" +version = "1.1.4" +dependencies = [ + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "nybbles", + "reth-consensus", + "reth-prune-types", + "reth-storage-errors", + "revm-primitives", + "thiserror 2.0.10", +] + +[[package]] +name = "reth-execution-types" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "arbitrary", + "bincode", + "rand 0.8.5", + "reth-execution-errors", + "reth-primitives", + "reth-primitives-traits", + "reth-scroll-revm", + "reth-trie", + "reth-trie-common", + "serde", + "serde_with", +] + +[[package]] +name = "reth-exex" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-genesis", + "alloy-primitives", + "eyre", + "futures", + "itertools 0.13.0", + "metrics", + "parking_lot", + "rand 0.8.5", + "reth-blockchain-tree", + "reth-chain-state", + "reth-chainspec", + "reth-config", + "reth-db-common", + "reth-evm", + "reth-evm-ethereum", + "reth-exex-types", + "reth-fs-util", + "reth-metrics", + "reth-node-api", + "reth-node-core", + "reth-primitives", + "reth-primitives-traits", + "reth-provider", + "reth-prune-types", + "reth-revm", + "reth-stages-api", + "reth-tasks", + "reth-testing-utils", + "reth-tracing", + "rmp-serde", + "secp256k1", + "tempfile", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "reth-exex-test-utils" +version = "1.1.4" +dependencies = [ + "alloy-eips", + "eyre", + "futures-util", + "rand 0.8.5", + "reth-blockchain-tree", + "reth-chainspec", + "reth-config", + "reth-consensus", + "reth-db", + "reth-db-common", + "reth-evm", + "reth-execution-types", + "reth-exex", + "reth-network", + "reth-node-api", + "reth-node-builder", + "reth-node-core", + "reth-node-ethereum", + "reth-payload-builder", + "reth-primitives", + "reth-provider", + "reth-tasks", + "reth-transaction-pool", + "reth-trie-db", + "tempfile", + "thiserror 2.0.10", + "tokio", +] + +[[package]] +name = "reth-exex-types" +version = "1.1.4" +dependencies = [ + "alloy-eips", + "alloy-primitives", + "arbitrary", + "bincode", + "rand 0.8.5", + "reth-chain-state", + "reth-execution-types", + "reth-primitives", + "reth-primitives-traits", + "serde", + "serde_with", +] + +[[package]] +name = "reth-fs-util" +version = "1.1.4" +dependencies = [ + "serde", + "serde_json", + "thiserror 2.0.10", +] + +[[package]] +name = "reth-invalid-block-hooks" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-primitives", + "alloy-rlp", + "alloy-rpc-types-debug", + "eyre", + "futures", + "jsonrpsee", + "pretty_assertions", + "reth-chainspec", + "reth-engine-primitives", + "reth-evm", + "reth-primitives", + "reth-primitives-traits", + "reth-provider", + "reth-revm", + "reth-rpc-api", + "reth-scroll-revm", + "reth-tracing", + "reth-trie", + "serde", + "serde_json", +] + +[[package]] +name = "reth-ipc" +version = "1.1.4" +dependencies = [ + "async-trait", + "bytes", + "futures", + "futures-util", + "interprocess", + "jsonrpsee", + "pin-project", + "rand 0.8.5", + "reth-tracing", + "serde_json", + "thiserror 2.0.10", + "tokio", + "tokio-stream", + "tokio-util", + "tower 0.4.13", + "tracing", +] + +[[package]] +name = "reth-libmdbx" +version = "1.1.4" +dependencies = [ + "bitflags 2.6.0", + "byteorder", + "codspeed-criterion-compat", + "dashmap", + "derive_more", + "indexmap 2.7.0", + "parking_lot", + "pprof", + "rand 0.8.5", + "rand_xorshift", + "reth-mdbx-sys", + "smallvec", + "tempfile", + "thiserror 2.0.10", + "tracing", +] + +[[package]] +name = "reth-mdbx-sys" +version = "1.1.4" +dependencies = [ + "bindgen", + "cc", +] + +[[package]] +name = "reth-metrics" +version = "1.1.4" +dependencies = [ + "futures", + "metrics", + "metrics-derive", + "tokio", + "tokio-util", +] + +[[package]] +name = "reth-net-banlist" +version = "1.1.4" +dependencies = [ + "alloy-primitives", +] + +[[package]] +name = "reth-net-nat" +version = "1.1.4" +dependencies = [ + "futures-util", + "if-addrs", + "reqwest", + "reth-tracing", + "serde_with", + "thiserror 2.0.10", + "tokio", + "tracing", +] + +[[package]] +name = "reth-network" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-node-bindings", + "alloy-primitives", + "alloy-provider", + "alloy-rlp", + "aquamarine", + "auto_impl", + "codspeed-criterion-compat", + "derive_more", + "discv5", + "enr", + "futures", + "itertools 0.13.0", + "metrics", + "parking_lot", + "pin-project", + "pprof", + "rand 0.8.5", + "reth-chainspec", + "reth-consensus", + "reth-discv4", + "reth-discv5", + "reth-dns-discovery", + "reth-ecies", + "reth-eth-wire", + "reth-eth-wire-types", + "reth-ethereum-forks", + "reth-fs-util", + "reth-metrics", + "reth-net-banlist", + "reth-network", + "reth-network-api", + "reth-network-p2p", + "reth-network-peers", + "reth-network-types", + "reth-primitives", + "reth-primitives-traits", + "reth-provider", + "reth-storage-api", + "reth-tasks", + "reth-tokio-util", + "reth-tracing", + "reth-transaction-pool", + "rustc-hash 2.1.0", + "schnellru", + "secp256k1", + "serde", + "serial_test", + "smallvec", + "tempfile", + "thiserror 2.0.10", + "tokio", + "tokio-stream", + "tokio-util", + "tracing", + "url", +] + +[[package]] +name = "reth-network-api" +version = "1.1.4" +dependencies = [ + "alloy-primitives", + "alloy-rpc-types-admin", + "auto_impl", + "derive_more", + "enr", + "futures", + "reth-eth-wire-types", + "reth-ethereum-forks", + "reth-network-p2p", + "reth-network-peers", + "reth-network-types", + "reth-tokio-util", + "serde", + "thiserror 2.0.10", + "tokio", + "tokio-stream", +] + +[[package]] +name = "reth-network-p2p" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "auto_impl", + "derive_more", + "futures", + "parking_lot", + "reth-consensus", + "reth-eth-wire-types", + "reth-network-peers", + "reth-network-types", + "reth-primitives", + "reth-primitives-traits", + "reth-storage-errors", + "tokio", + "tracing", +] + +[[package]] +name = "reth-network-peers" +version = "1.1.4" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "enr", + "rand 0.8.5", + "secp256k1", + "serde_json", + "serde_with", + "thiserror 2.0.10", + "tokio", + "url", +] + +[[package]] +name = "reth-network-types" +version = "1.1.4" +dependencies = [ + "humantime-serde", + "reth-ethereum-forks", + "reth-net-banlist", + "reth-network-peers", + "serde", + "serde_json", + "tracing", +] + +[[package]] +name = "reth-nippy-jar" +version = "1.1.4" +dependencies = [ + "anyhow", + "bincode", + "derive_more", + "lz4_flex", + "memmap2", + "rand 0.8.5", + "reth-fs-util", + "serde", + "tempfile", + "thiserror 2.0.10", + "tracing", + "zstd", +] + +[[package]] +name = "reth-node-api" +version = "1.1.4" +dependencies = [ + "alloy-rpc-types-engine", + "eyre", + "reth-beacon-consensus", + "reth-consensus", + "reth-db-api", + "reth-engine-primitives", + "reth-evm", + "reth-network-api", + "reth-node-core", + "reth-node-types", + "reth-payload-builder-primitives", + "reth-payload-primitives", + "reth-provider", + "reth-tasks", + "reth-transaction-pool", +] + +[[package]] +name = "reth-node-builder" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rpc-types", + "aquamarine", + "eyre", + "fdlimit", + "futures", + "jsonrpsee", + "rayon", + "reth-beacon-consensus", + "reth-blockchain-tree", + "reth-chain-state", + "reth-chainspec", + "reth-cli-util", + "reth-config", + "reth-consensus", + "reth-consensus-debug-client", + "reth-db", + "reth-db-api", + "reth-db-common", + "reth-downloaders", + "reth-engine-local", + "reth-engine-service", + "reth-engine-tree", + "reth-engine-util", + "reth-evm", + "reth-exex", + "reth-fs-util", + "reth-invalid-block-hooks", + "reth-network", + "reth-network-api", + "reth-network-p2p", + "reth-node-api", + "reth-node-core", + "reth-node-events", + "reth-node-metrics", + "reth-payload-builder", + "reth-payload-validator", + "reth-primitives", + "reth-provider", + "reth-prune", + "reth-rpc", + "reth-rpc-api", + "reth-rpc-builder", + "reth-rpc-engine-api", + "reth-rpc-eth-types", + "reth-rpc-layer", + "reth-stages", + "reth-static-file", + "reth-tasks", + "reth-tokio-util", + "reth-tracing", + "reth-transaction-pool", + "secp256k1", + "tempfile", + "tokio", + "tokio-stream", + "tracing", +] + +[[package]] +name = "reth-node-core" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rpc-types-engine", + "clap", + "derive_more", + "dirs-next", + "eyre", + "futures", + "humantime", + "proptest", + "rand 0.8.5", + "reth-chainspec", + "reth-cli-util", + "reth-config", + "reth-consensus", + "reth-db", + "reth-discv4", + "reth-discv5", + "reth-ethereum-forks", + "reth-net-nat", + "reth-network", + "reth-network-p2p", + "reth-network-peers", + "reth-primitives", + "reth-primitives-traits", + "reth-prune-types", + "reth-rpc-eth-types", + "reth-rpc-server-types", + "reth-rpc-types-compat", + "reth-stages-types", + "reth-storage-api", + "reth-storage-errors", + "reth-tracing", + "reth-transaction-pool", + "secp256k1", + "serde", + "shellexpand", + "strum", + "thiserror 2.0.10", + "tokio", + "toml", + "tracing", + "vergen", +] + +[[package]] +name = "reth-node-ethereum" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-contract", + "alloy-eips", + "alloy-genesis", + "alloy-primitives", + "alloy-provider", + "alloy-rpc-types-beacon", + "alloy-rpc-types-engine", + "alloy-rpc-types-eth", + "alloy-signer", + "alloy-sol-types", + "eyre", + "futures", + "rand 0.8.5", + "reth-basic-payload-builder", + "reth-beacon-consensus", + "reth-chainspec", + "reth-consensus", + "reth-db", + "reth-e2e-test-utils", + "reth-ethereum-engine-primitives", + "reth-ethereum-payload-builder", + "reth-evm", + "reth-evm-ethereum", + "reth-exex", + "reth-network", + "reth-node-api", + "reth-node-builder", + "reth-node-core", + "reth-payload-builder", + "reth-payload-primitives", + "reth-primitives", + "reth-provider", + "reth-revm", + "reth-rpc", + "reth-rpc-eth-api", + "reth-scroll-revm", + "reth-tasks", + "reth-tracing", + "reth-transaction-pool", + "reth-trie-db", + "serde_json", + "tokio", +] + +[[package]] +name = "reth-node-events" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rpc-types-engine", + "derive_more", + "futures", + "humantime", + "pin-project", + "reth-beacon-consensus", + "reth-engine-primitives", + "reth-network-api", + "reth-primitives-traits", + "reth-prune-types", + "reth-stages", + "reth-static-file-types", + "reth-storage-api", + "tokio", + "tracing", +] + +[[package]] +name = "reth-node-metrics" +version = "1.1.4" +dependencies = [ + "eyre", + "http", + "jsonrpsee-server", + "metrics", + "metrics-exporter-prometheus", + "metrics-process", + "metrics-util 0.18.0", + "procfs 0.16.0", + "reqwest", + "reth-metrics", + "reth-tasks", + "socket2", + "tikv-jemalloc-ctl", + "tokio", + "tower 0.4.13", + "tracing", + "vergen", +] + +[[package]] +name = "reth-node-types" +version = "1.1.4" +dependencies = [ + "reth-chainspec", + "reth-db-api", + "reth-engine-primitives", + "reth-primitives-traits", + "reth-trie-db", +] + +[[package]] +name = "reth-optimism-chainspec" +version = "1.1.4" +dependencies = [ + "alloy-chains", + "alloy-consensus", + "alloy-eips", + "alloy-genesis", + "alloy-primitives", + "derive_more", + "once_cell", + "op-alloy-consensus", + "op-alloy-rpc-types", + "reth-chainspec", + "reth-ethereum-forks", + "reth-network-peers", + "reth-optimism-forks", + "reth-primitives-traits", + "serde_json", + "thiserror 2.0.10", +] + +[[package]] +name = "reth-optimism-cli" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "clap", + "derive_more", + "eyre", + "futures-util", + "op-alloy-consensus", + "proptest", + "reth-chainspec", + "reth-cli", + "reth-cli-commands", + "reth-cli-runner", + "reth-consensus", + "reth-db", + "reth-db-api", + "reth-db-common", + "reth-downloaders", + "reth-execution-types", + "reth-fs-util", + "reth-node-builder", + "reth-node-core", + "reth-node-events", + "reth-node-metrics", + "reth-optimism-chainspec", + "reth-optimism-evm", + "reth-optimism-node", + "reth-optimism-primitives", + "reth-primitives", + "reth-provider", + "reth-prune", + "reth-stages", + "reth-static-file", + "reth-static-file-types", + "reth-tracing", + "serde", + "tempfile", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "reth-optimism-consensus" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-trie", + "op-alloy-consensus", + "reth-chainspec", + "reth-consensus", + "reth-consensus-common", + "reth-optimism-chainspec", + "reth-optimism-forks", + "reth-optimism-primitives", + "reth-primitives", + "reth-trie-common", + "tracing", +] + +[[package]] +name = "reth-optimism-evm" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-genesis", + "alloy-primitives", + "derive_more", + "op-alloy-consensus", + "reth-chainspec", + "reth-consensus", + "reth-consensus-common", + "reth-ethereum-forks", + "reth-evm", + "reth-execution-errors", + "reth-execution-types", + "reth-optimism-chainspec", + "reth-optimism-consensus", + "reth-optimism-forks", + "reth-optimism-primitives", + "reth-primitives", + "reth-primitives-traits", + "reth-prune-types", + "reth-revm", + "reth-scroll-revm", + "revm-primitives", + "thiserror 2.0.10", + "tracing", +] + +[[package]] +name = "reth-optimism-forks" +version = "1.1.4" +dependencies = [ + "alloy-chains", + "alloy-primitives", + "once_cell", + "reth-ethereum-forks", + "serde", +] + +[[package]] +name = "reth-optimism-node" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-genesis", + "alloy-network", + "alloy-primitives", + "alloy-rpc-types-engine", + "alloy-signer-local", + "clap", + "derive_more", + "eyre", + "futures", + "op-alloy-consensus", + "op-alloy-rpc-types-engine", + "parking_lot", + "reth-basic-payload-builder", + "reth-beacon-consensus", + "reth-chainspec", + "reth-consensus", + "reth-db", + "reth-e2e-test-utils", + "reth-engine-local", + "reth-evm", + "reth-network", + "reth-node-api", + "reth-node-builder", + "reth-node-core", + "reth-optimism-chainspec", + "reth-optimism-consensus", + "reth-optimism-evm", + "reth-optimism-forks", + "reth-optimism-node", + "reth-optimism-payload-builder", + "reth-optimism-primitives", + "reth-optimism-rpc", + "reth-payload-builder", + "reth-payload-util", + "reth-payload-validator", + "reth-primitives", + "reth-primitives-traits", + "reth-provider", + "reth-revm", + "reth-rpc-server-types", + "reth-rpc-types-compat", + "reth-scroll-revm", + "reth-tasks", + "reth-tracing", + "reth-transaction-pool", + "reth-trie-db", + "serde", + "serde_json", + "tokio", +] + +[[package]] +name = "reth-optimism-payload-builder" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "alloy-rpc-types-debug", + "alloy-rpc-types-engine", + "derive_more", + "op-alloy-consensus", + "op-alloy-rpc-types-engine", + "reth-basic-payload-builder", + "reth-chain-state", + "reth-chainspec", + "reth-evm", + "reth-execution-types", + "reth-optimism-chainspec", + "reth-optimism-consensus", + "reth-optimism-evm", + "reth-optimism-forks", + "reth-optimism-primitives", + "reth-payload-builder", + "reth-payload-builder-primitives", + "reth-payload-primitives", + "reth-payload-util", + "reth-primitives", + "reth-provider", + "reth-revm", + "reth-rpc-types-compat", + "reth-scroll-revm", + "reth-transaction-pool", + "sha2 0.10.8", + "thiserror 2.0.10", + "tracing", +] + +[[package]] +name = "reth-optimism-primitives" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "arbitrary", + "bytes", + "derive_more", + "modular-bitfield", + "once_cell", + "op-alloy-consensus", + "proptest", + "proptest-arbitrary-interop", + "rand 0.8.5", + "reth-codecs", + "reth-primitives", + "reth-primitives-traits", + "reth-zstd-compressors", + "revm-primitives", + "rstest", + "secp256k1", + "serde", +] + +[[package]] +name = "reth-optimism-rpc" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rpc-types-debug", + "alloy-rpc-types-eth", + "jsonrpsee-core", + "jsonrpsee-types", + "op-alloy-consensus", + "op-alloy-network", + "op-alloy-rpc-jsonrpsee", + "op-alloy-rpc-types", + "op-alloy-rpc-types-engine", + "parking_lot", + "reqwest", + "reth-chainspec", + "reth-evm", + "reth-network-api", + "reth-node-api", + "reth-node-builder", + "reth-optimism-chainspec", + "reth-optimism-consensus", + "reth-optimism-evm", + "reth-optimism-forks", + "reth-optimism-payload-builder", + "reth-optimism-primitives", + "reth-primitives", + "reth-primitives-traits", + "reth-provider", + "reth-rpc", + "reth-rpc-api", + "reth-rpc-eth-api", + "reth-rpc-eth-types", + "reth-rpc-server-types", + "reth-scroll-revm", + "reth-tasks", + "reth-transaction-pool", + "serde_json", + "thiserror 2.0.10", + "tokio", + "tracing", +] + +[[package]] +name = "reth-optimism-storage" +version = "1.1.4" +dependencies = [ + "reth-codecs", + "reth-db-api", + "reth-primitives", + "reth-prune-types", + "reth-stages-types", +] + +[[package]] +name = "reth-payload-builder" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-primitives", + "alloy-rpc-types", + "async-trait", + "futures-util", + "metrics", + "reth-chain-state", + "reth-ethereum-engine-primitives", + "reth-metrics", + "reth-payload-builder-primitives", + "reth-payload-primitives", + "reth-primitives", + "reth-primitives-traits", + "reth-scroll-revm", + "tokio", + "tokio-stream", + "tracing", +] + +[[package]] +name = "reth-payload-builder-primitives" +version = "1.1.4" +dependencies = [ + "alloy-rpc-types-engine", + "async-trait", + "pin-project", + "reth-payload-primitives", + "tokio", + "tokio-stream", + "tracing", +] + +[[package]] +name = "reth-payload-primitives" +version = "1.1.4" +dependencies = [ + "alloy-eips", + "alloy-primitives", + "alloy-rpc-types-engine", + "op-alloy-rpc-types-engine", + "reth-chain-state", + "reth-chainspec", + "reth-errors", + "reth-primitives", + "revm-primitives", + "serde", + "thiserror 2.0.10", + "tokio", +] + +[[package]] +name = "reth-payload-util" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-primitives", + "reth-primitives", +] + +[[package]] +name = "reth-payload-validator" +version = "1.1.4" +dependencies = [ + "alloy-rpc-types", + "reth-chainspec", + "reth-primitives", + "reth-primitives-traits", +] + +[[package]] +name = "reth-primitives" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-genesis", + "alloy-network", + "alloy-primitives", + "alloy-rlp", + "alloy-rpc-types", + "alloy-serde", + "alloy-trie", + "arbitrary", + "assert_matches", + "bincode", + "bytes", + "c-kzg", + "codspeed-criterion-compat", + "derive_more", + "modular-bitfield", + "once_cell", + "op-alloy-consensus", + "op-alloy-rpc-types", + "pprof", + "proptest", + "proptest-arbitrary-interop", + "rand 0.8.5", + "rayon", + "reth-chainspec", + "reth-codecs", + "reth-ethereum-forks", + "reth-primitives-traits", + "reth-scroll-primitives", + "reth-scroll-revm", + "reth-static-file-types", + "reth-testing-utils", + "reth-trie-common", + "reth-zstd-compressors", + "rstest", + "scroll-alloy-consensus", + "secp256k1", + "serde", + "serde_json", + "serde_with", + "test-fuzz", +] + +[[package]] +name = "reth-primitives-traits" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-genesis", + "alloy-primitives", + "alloy-rlp", + "alloy-trie", + "arbitrary", + "auto_impl", + "bincode", + "byteorder", + "bytes", + "derive_more", + "k256", + "modular-bitfield", + "op-alloy-consensus", + "proptest", + "proptest-arbitrary-interop", + "rand 0.8.5", + "reth-codecs", + "reth-scroll-revm", + "secp256k1", + "serde", + "serde_json", + "serde_with", + "test-fuzz", + "thiserror 2.0.10", +] + +[[package]] +name = "reth-provider" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rpc-types-engine", + "assert_matches", + "auto_impl", + "dashmap", + "eyre", + "itertools 0.13.0", + "metrics", + "notify", + "parking_lot", + "rand 0.8.5", + "rayon", + "reth-blockchain-tree-api", + "reth-chain-state", + "reth-chainspec", + "reth-codecs", + "reth-db", + "reth-db-api", + "reth-errors", + "reth-ethereum-engine-primitives", + "reth-evm", + "reth-execution-types", + "reth-fs-util", + "reth-metrics", + "reth-network-p2p", + "reth-nippy-jar", + "reth-node-types", + "reth-optimism-primitives", + "reth-primitives", + "reth-primitives-traits", + "reth-prune-types", + "reth-scroll-primitives", + "reth-scroll-revm", + "reth-stages-types", + "reth-storage-api", + "reth-storage-errors", + "reth-testing-utils", + "reth-trie", + "reth-trie-db", + "strum", + "tempfile", + "tokio", + "tracing", +] + +[[package]] +name = "reth-prune" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "assert_matches", + "itertools 0.13.0", + "metrics", + "rayon", + "reth-chainspec", + "reth-config", + "reth-db", + "reth-db-api", + "reth-errors", + "reth-exex-types", + "reth-metrics", + "reth-primitives-traits", + "reth-provider", + "reth-prune-types", + "reth-stages", + "reth-static-file-types", + "reth-testing-utils", + "reth-tokio-util", + "reth-tracing", + "rustc-hash 2.1.0", + "thiserror 2.0.10", + "tokio", + "tracing", +] + +[[package]] +name = "reth-prune-types" +version = "1.1.4" +dependencies = [ + "alloy-primitives", + "arbitrary", + "assert_matches", + "derive_more", + "modular-bitfield", + "proptest", + "proptest-arbitrary-interop", + "reth-codecs", + "serde", + "serde_json", + "test-fuzz", + "thiserror 2.0.10", + "toml", +] + +[[package]] +name = "reth-revm" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "reth-ethereum-forks", + "reth-execution-errors", + "reth-primitives", + "reth-primitives-traits", + "reth-prune-types", + "reth-scroll-revm", + "reth-storage-api", + "reth-storage-errors", + "reth-trie", +] + +[[package]] +name = "reth-rpc" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-dyn-abi", + "alloy-eips", + "alloy-genesis", + "alloy-network", + "alloy-primitives", + "alloy-rlp", + "alloy-rpc-types", + "alloy-rpc-types-admin", + "alloy-rpc-types-beacon", + "alloy-rpc-types-debug", + "alloy-rpc-types-engine", + "alloy-rpc-types-eth", + "alloy-rpc-types-mev", + "alloy-rpc-types-trace", + "alloy-rpc-types-txpool", + "alloy-serde", + "alloy-signer", + "alloy-signer-local", + "async-trait", + "derive_more", + "futures", + "http", + "http-body", + "hyper", + "jsonrpsee", + "jsonrpsee-types", + "jsonwebtoken", + "parking_lot", + "pin-project", + "rand 0.8.5", + "reth-chainspec", + "reth-consensus", + "reth-consensus-common", + "reth-engine-primitives", + "reth-errors", + "reth-evm", + "reth-evm-ethereum", + "reth-network-api", + "reth-network-peers", + "reth-network-types", + "reth-primitives", + "reth-primitives-traits", + "reth-provider", + "reth-revm", + "reth-rpc-api", + "reth-rpc-engine-api", + "reth-rpc-eth-api", + "reth-rpc-eth-types", + "reth-rpc-server-types", + "reth-rpc-types-compat", + "reth-scroll-revm", + "reth-tasks", + "reth-testing-utils", + "reth-transaction-pool", + "revm-inspectors", + "revm-primitives", + "serde", + "serde_json", + "thiserror 2.0.10", + "tokio", + "tokio-stream", + "tower 0.4.13", + "tracing", + "tracing-futures", +] + +[[package]] +name = "reth-rpc-api" +version = "1.1.4" +dependencies = [ + "alloy-eips", + "alloy-json-rpc", + "alloy-primitives", + "alloy-rpc-types", + "alloy-rpc-types-admin", + "alloy-rpc-types-anvil", + "alloy-rpc-types-beacon", + "alloy-rpc-types-debug", + "alloy-rpc-types-engine", + "alloy-rpc-types-eth", + "alloy-rpc-types-mev", + "alloy-rpc-types-trace", + "alloy-rpc-types-txpool", + "alloy-serde", + "jsonrpsee", + "reth-engine-primitives", + "reth-network-peers", + "reth-rpc-eth-api", +] + +[[package]] +name = "reth-rpc-api-testing-util" +version = "1.1.4" +dependencies = [ + "alloy-eips", + "alloy-primitives", + "alloy-rpc-types-eth", + "alloy-rpc-types-trace", + "futures", + "jsonrpsee", + "jsonrpsee-http-client", + "reth-primitives", + "reth-rpc-api", + "reth-rpc-eth-api", + "serde_json", + "similar-asserts", + "tokio", +] + +[[package]] +name = "reth-rpc-builder" +version = "1.1.4" +dependencies = [ + "alloy-eips", + "alloy-primitives", + "alloy-rpc-types-engine", + "alloy-rpc-types-eth", + "alloy-rpc-types-trace", + "clap", + "http", + "jsonrpsee", + "metrics", + "pin-project", + "reth-beacon-consensus", + "reth-chainspec", + "reth-consensus", + "reth-engine-primitives", + "reth-ethereum-engine-primitives", + "reth-evm", + "reth-evm-ethereum", + "reth-ipc", + "reth-metrics", + "reth-network-api", + "reth-network-peers", + "reth-node-core", + "reth-payload-builder", + "reth-primitives", + "reth-provider", + "reth-rpc", + "reth-rpc-api", + "reth-rpc-engine-api", + "reth-rpc-eth-api", + "reth-rpc-eth-types", + "reth-rpc-layer", + "reth-rpc-server-types", + "reth-rpc-types-compat", + "reth-tasks", + "reth-tracing", + "reth-transaction-pool", + "serde", + "serde_json", + "thiserror 2.0.10", + "tokio", + "tokio-util", + "tower 0.4.13", + "tower-http", + "tracing", +] + +[[package]] +name = "reth-rpc-engine-api" +version = "1.1.4" +dependencies = [ + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "alloy-rpc-types-engine", + "assert_matches", + "async-trait", + "jsonrpsee-core", + "jsonrpsee-types", + "metrics", + "parking_lot", + "reth-beacon-consensus", + "reth-chainspec", + "reth-engine-primitives", + "reth-ethereum-engine-primitives", + "reth-metrics", + "reth-payload-builder", + "reth-payload-builder-primitives", + "reth-payload-primitives", + "reth-primitives", + "reth-provider", + "reth-rpc-api", + "reth-rpc-types-compat", + "reth-storage-api", + "reth-tasks", + "reth-testing-utils", + "reth-tokio-util", + "reth-transaction-pool", + "serde", + "thiserror 2.0.10", + "tokio", + "tracing", +] + +[[package]] +name = "reth-rpc-eth-api" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-dyn-abi", + "alloy-eips", + "alloy-json-rpc", + "alloy-network", + "alloy-primitives", + "alloy-rlp", + "alloy-rpc-types-eth", + "alloy-rpc-types-mev", + "alloy-serde", + "async-trait", + "auto_impl", + "dyn-clone", + "futures", + "jsonrpsee", + "jsonrpsee-types", + "parking_lot", + "reth-chainspec", + "reth-errors", + "reth-evm", + "reth-network-api", + "reth-node-api", + "reth-primitives", + "reth-primitives-traits", + "reth-provider", + "reth-revm", + "reth-rpc-eth-types", + "reth-rpc-server-types", + "reth-rpc-types-compat", + "reth-scroll-revm", + "reth-tasks", + "reth-transaction-pool", + "reth-trie-common", + "revm-inspectors", + "revm-primitives", + "tokio", + "tracing", +] + +[[package]] +name = "reth-rpc-eth-types" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rpc-types-eth", + "alloy-sol-types", + "derive_more", + "futures", + "itertools 0.13.0", + "jsonrpsee-core", + "jsonrpsee-types", + "metrics", + "rand 0.8.5", + "reth-chain-state", + "reth-chainspec", + "reth-errors", + "reth-execution-types", + "reth-metrics", + "reth-primitives", + "reth-primitives-traits", + "reth-revm", + "reth-rpc-server-types", + "reth-rpc-types-compat", + "reth-scroll-revm", + "reth-storage-api", + "reth-tasks", + "reth-transaction-pool", + "reth-trie", + "revm-inspectors", + "revm-primitives", + "schnellru", + "serde", + "serde_json", + "thiserror 2.0.10", + "tokio", + "tokio-stream", + "tracing", +] + +[[package]] +name = "reth-rpc-layer" +version = "1.1.4" +dependencies = [ + "alloy-rpc-types-engine", + "http", + "http-body-util", + "jsonrpsee", + "jsonrpsee-http-client", + "pin-project", + "reqwest", + "tokio", + "tower 0.4.13", + "tower-http", + "tracing", +] + +[[package]] +name = "reth-rpc-server-types" +version = "1.1.4" +dependencies = [ + "alloy-eips", + "alloy-primitives", + "alloy-rpc-types-engine", + "jsonrpsee-core", + "jsonrpsee-types", + "reth-errors", + "reth-network-api", + "serde", + "strum", +] + +[[package]] +name = "reth-rpc-types-compat" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rpc-types-engine", + "alloy-rpc-types-eth", + "jsonrpsee-types", + "reth-primitives", + "reth-primitives-traits", + "serde", + "serde_json", +] + +[[package]] +name = "reth-scroll-chainspec" +version = "1.1.4" +dependencies = [ + "alloy-chains", + "alloy-consensus", + "alloy-eips", + "alloy-genesis", + "alloy-primitives", + "alloy-serde", + "derive_more", + "once_cell", + "reth-chainspec", + "reth-ethereum-forks", + "reth-network-peers", + "reth-primitives-traits", + "reth-scroll-forks", + "reth-trie-common", + "serde", + "serde_json", +] + +[[package]] +name = "reth-scroll-cli" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "clap", + "eyre", + "reth-cli", + "reth-cli-commands", + "reth-cli-runner", + "reth-db", + "reth-eth-wire", + "reth-node-builder", + "reth-node-core", + "reth-node-metrics", + "reth-primitives", + "reth-scroll-chainspec", + "reth-scroll-evm", + "reth-scroll-node", + "reth-tracing", + "tracing", +] + +[[package]] +name = "reth-scroll-consensus" +version = "1.1.4" +dependencies = [ + "eyre", + "reth-scroll-revm", +] + +[[package]] +name = "reth-scroll-engine" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-rlp", + "alloy-rpc-types-engine", + "reth-primitives", + "reth-scroll-chainspec", + "reth-scroll-forks", +] + +[[package]] +name = "reth-scroll-evm" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "auto_impl", + "derive_more", + "eyre", + "reth-chainspec", + "reth-consensus", + "reth-ethereum-consensus", + "reth-evm", + "reth-primitives", + "reth-primitives-traits", + "reth-revm", + "reth-scroll-chainspec", + "reth-scroll-consensus", + "reth-scroll-forks", + "reth-scroll-primitives", + "reth-scroll-revm", + "thiserror 2.0.10", + "tracing", +] + +[[package]] +name = "reth-scroll-forks" +version = "1.1.4" +dependencies = [ + "alloy-chains", + "alloy-primitives", + "once_cell", + "reth-ethereum-forks", + "serde", +] + +[[package]] +name = "reth-scroll-node" +version = "1.1.4" +dependencies = [ + "alloy-primitives", + "alloy-rpc-types-engine", + "eyre", + "reth-consensus", + "reth-db", + "reth-ethereum-engine-primitives", + "reth-ethereum-forks", + "reth-evm", + "reth-network", + "reth-node-api", + "reth-node-builder", + "reth-node-types", + "reth-payload-builder", + "reth-primitives", + "reth-primitives-traits", + "reth-provider", + "reth-rpc", + "reth-scroll-chainspec", + "reth-scroll-engine", + "reth-scroll-evm", + "reth-tracing", + "reth-transaction-pool", + "reth-trie-db", +] + +[[package]] +name = "reth-scroll-primitives" +version = "1.1.4" +dependencies = [ + "alloy-primitives", + "arbitrary", + "modular-bitfield", + "reth-codecs", + "serde", + "test-fuzz", +] + +[[package]] +name = "reth-scroll-revm" +version = "1.1.4" +dependencies = [ + "revm", +] + +[[package]] +name = "reth-scroll-rpc" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rpc-types-debug", + "alloy-rpc-types-eth", + "derive_more", + "jsonrpsee-core", + "jsonrpsee-types", + "op-alloy-consensus", + "op-alloy-network", + "op-alloy-rpc-types", + "op-alloy-rpc-types-engine", + "parking_lot", + "reqwest", + "reth-chainspec", + "reth-evm", + "reth-network-api", + "reth-node-api", + "reth-node-builder", + "reth-optimism-chainspec", + "reth-primitives", + "reth-provider", + "reth-rpc", + "reth-rpc-api", + "reth-rpc-eth-api", + "reth-rpc-eth-types", + "reth-rpc-server-types", + "reth-scroll-chainspec", + "reth-scroll-evm", + "reth-scroll-revm", + "reth-tasks", + "reth-transaction-pool", + "scroll-alloy-consensus", + "scroll-alloy-network", + "scroll-alloy-rpc-types", + "serde_json", + "thiserror 2.0.10", + "tokio", + "tracing", +] + +[[package]] +name = "reth-scroll-trie" +version = "1.1.4" +dependencies = [ + "alloy-primitives", + "alloy-trie", + "hex-literal", + "poseidon-bn254 0.1.0 (git+https://github.com/scroll-tech/poseidon-bn254?rev=526a64a)", + "proptest-arbitrary-interop", + "reth-trie", + "tracing", +] + +[[package]] +name = "reth-stages" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "assert_matches", + "bincode", + "codspeed-criterion-compat", + "futures-util", + "itertools 0.13.0", + "num-traits", + "paste", + "pprof", + "rand 0.8.5", + "rayon", + "reth-chainspec", + "reth-codecs", + "reth-config", + "reth-consensus", + "reth-db", + "reth-db-api", + "reth-downloaders", + "reth-etl", + "reth-evm", + "reth-evm-ethereum", + "reth-execution-errors", + "reth-execution-types", + "reth-exex", + "reth-network-p2p", + "reth-network-peers", + "reth-primitives", + "reth-primitives-traits", + "reth-provider", + "reth-prune", + "reth-prune-types", + "reth-revm", + "reth-scroll-primitives", + "reth-stages-api", + "reth-static-file", + "reth-storage-errors", + "reth-testing-utils", + "reth-trie", + "reth-trie-db", + "tempfile", + "thiserror 2.0.10", + "tokio", + "tracing", +] + +[[package]] +name = "reth-stages-api" +version = "1.1.4" +dependencies = [ + "alloy-eips", + "alloy-primitives", + "aquamarine", + "assert_matches", + "auto_impl", + "futures-util", + "metrics", + "reth-consensus", + "reth-errors", + "reth-metrics", + "reth-network-p2p", + "reth-primitives-traits", + "reth-provider", + "reth-prune", + "reth-stages-types", + "reth-static-file", + "reth-static-file-types", + "reth-testing-utils", + "reth-tokio-util", + "thiserror 2.0.10", + "tokio", + "tokio-stream", + "tracing", +] + +[[package]] +name = "reth-stages-types" +version = "1.1.4" +dependencies = [ + "alloy-primitives", + "arbitrary", + "bytes", + "modular-bitfield", + "proptest", + "proptest-arbitrary-interop", + "rand 0.8.5", + "reth-codecs", + "reth-trie-common", + "serde", + "test-fuzz", +] + +[[package]] +name = "reth-static-file" +version = "1.1.4" +dependencies = [ + "alloy-primitives", + "assert_matches", + "parking_lot", + "rayon", + "reth-codecs", + "reth-db", + "reth-db-api", + "reth-primitives-traits", + "reth-provider", + "reth-prune-types", + "reth-stages", + "reth-stages-types", + "reth-static-file-types", + "reth-storage-errors", + "reth-testing-utils", + "reth-tokio-util", + "tempfile", + "tracing", +] + +[[package]] +name = "reth-static-file-types" +version = "1.1.4" +dependencies = [ + "alloy-primitives", + "clap", + "derive_more", + "reth-nippy-jar", + "serde", + "strum", +] + +[[package]] +name = "reth-storage-api" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rpc-types-engine", + "auto_impl", + "reth-chainspec", + "reth-db", + "reth-db-api", + "reth-db-models", + "reth-execution-types", + "reth-primitives", + "reth-primitives-traits", + "reth-prune-types", + "reth-scroll-revm", + "reth-stages-types", + "reth-storage-errors", + "reth-trie", + "reth-trie-db", +] + +[[package]] +name = "reth-storage-errors" +version = "1.1.4" +dependencies = [ + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "derive_more", + "reth-fs-util", + "reth-primitives-traits", + "reth-static-file-types", + "thiserror 2.0.10", +] + +[[package]] +name = "reth-tasks" +version = "1.1.4" +dependencies = [ + "auto_impl", + "dyn-clone", + "futures-util", + "metrics", + "pin-project", + "rayon", + "reth-metrics", + "thiserror 2.0.10", + "tokio", + "tracing", + "tracing-futures", +] + +[[package]] +name = "reth-testing-utils" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-genesis", + "alloy-primitives", + "rand 0.8.5", + "reth-primitives", + "reth-primitives-traits", + "secp256k1", +] + +[[package]] +name = "reth-tokio-util" +version = "1.1.4" +dependencies = [ + "tokio", + "tokio-stream", + "tracing", +] + +[[package]] +name = "reth-tracing" +version = "1.1.4" +dependencies = [ + "clap", + "eyre", + "rolling-file", + "tracing", + "tracing-appender", + "tracing-journald", + "tracing-logfmt", + "tracing-subscriber", +] + +[[package]] +name = "reth-transaction-pool" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "aquamarine", + "assert_matches", + "auto_impl", + "bitflags 2.6.0", + "codspeed-criterion-compat", + "futures-util", + "metrics", + "parking_lot", + "paste", + "pprof", + "proptest", + "proptest-arbitrary-interop", + "rand 0.8.5", + "reth-chain-state", + "reth-chainspec", + "reth-eth-wire-types", + "reth-execution-types", + "reth-fs-util", + "reth-metrics", + "reth-payload-util", + "reth-primitives", + "reth-primitives-traits", + "reth-provider", + "reth-storage-api", + "reth-tasks", + "reth-tracing", + "revm-interpreter", + "revm-primitives", + "rustc-hash 2.1.0", + "schnellru", + "serde", + "serde_json", + "smallvec", + "tempfile", + "thiserror 2.0.10", + "tokio", + "tokio-stream", + "tracing", +] + +[[package]] +name = "reth-trie" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "alloy-trie", + "auto_impl", + "codspeed-criterion-compat", + "itertools 0.13.0", + "metrics", + "proptest", + "proptest-arbitrary-interop", + "rayon", + "reth-execution-errors", + "reth-metrics", + "reth-primitives", + "reth-primitives-traits", + "reth-scroll-revm", + "reth-stages-types", + "reth-storage-errors", + "reth-trie-common", + "reth-trie-sparse", + "serde_json", + "tracing", + "triehash", +] + +[[package]] +name = "reth-trie-common" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-genesis", + "alloy-primitives", + "alloy-rlp", + "alloy-rpc-types-eth", + "alloy-serde", + "alloy-trie", + "arbitrary", + "bincode", + "bytes", + "codspeed-criterion-compat", + "derive_more", + "hash-db", + "itertools 0.13.0", + "nybbles", + "plain_hasher", + "proptest", + "proptest-arbitrary-interop", + "reth-codecs", + "reth-primitives-traits", + "serde", + "serde_json", + "serde_with", +] + +[[package]] +name = "reth-trie-db" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-primitives", + "alloy-rlp", + "derive_more", + "metrics", + "proptest", + "proptest-arbitrary-interop", + "reth-chainspec", + "reth-db", + "reth-db-api", + "reth-execution-errors", + "reth-metrics", + "reth-primitives", + "reth-provider", + "reth-scroll-primitives", + "reth-scroll-revm", + "reth-storage-errors", + "reth-trie", + "reth-trie-common", + "serde", + "serde_json", + "similar-asserts", + "tracing", + "triehash", +] + +[[package]] +name = "reth-trie-parallel" +version = "1.1.4" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "codspeed-criterion-compat", + "derive_more", + "itertools 0.13.0", + "metrics", + "proptest", + "proptest-arbitrary-interop", + "rand 0.8.5", + "rayon", + "reth-db", + "reth-execution-errors", + "reth-metrics", + "reth-primitives", + "reth-provider", + "reth-trie", + "reth-trie-common", + "reth-trie-db", + "thiserror 2.0.10", + "tracing", +] + +[[package]] +name = "reth-trie-sparse" +version = "1.1.4" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "arbitrary", + "assert_matches", + "codspeed-criterion-compat", + "itertools 0.13.0", + "pretty_assertions", + "proptest", + "proptest-arbitrary-interop", + "rand 0.8.5", + "reth-execution-errors", + "reth-primitives-traits", + "reth-testing-utils", + "reth-tracing", + "reth-trie", + "reth-trie-common", + "smallvec", + "thiserror 2.0.10", +] + +[[package]] +name = "reth-zstd-compressors" +version = "1.1.4" +dependencies = [ + "zstd", +] + +[[package]] +name = "revm" +version = "19.0.0" +source = "git+https://github.com/scroll-tech/revm.git?branch=scroll-evm-executor/reth/v51#5cdeabaddd7fffa153e39de689d998a739eb404a" +dependencies = [ + "auto_impl", + "cfg-if", + "dyn-clone", + "once_cell", + "revm-interpreter", + "revm-precompile", + "serde", + "serde_json", +] + +[[package]] +name = "revm-inspectors" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc873bc873e12a1723493e1a35804fa79b673a0bfb1c19cfee659d46def8be42" +dependencies = [ + "alloy-primitives", + "alloy-rpc-types-eth", + "alloy-rpc-types-trace", + "alloy-sol-types", + "anstyle", + "boa_engine", + "boa_gc", + "colorchoice", + "revm", + "serde_json", + "thiserror 2.0.10", +] + +[[package]] +name = "revm-interpreter" +version = "15.0.0" +source = "git+https://github.com/scroll-tech/revm.git?branch=scroll-evm-executor/reth/v51#5cdeabaddd7fffa153e39de689d998a739eb404a" +dependencies = [ + "cfg-if", + "revm-primitives", + "serde", +] + +[[package]] +name = "revm-precompile" +version = "16.0.0" +source = "git+https://github.com/scroll-tech/revm.git?branch=scroll-evm-executor/reth/v51#5cdeabaddd7fffa153e39de689d998a739eb404a" +dependencies = [ + "aurora-engine-modexp", + "blst", + "c-kzg", + "cfg-if", + "k256", + "once_cell", + "p256", + "revm-primitives", + "ripemd", + "secp256k1", + "sha2 0.10.8", + "substrate-bn", +] + +[[package]] +name = "revm-primitives" +version = "15.1.0" +source = "git+https://github.com/scroll-tech/revm.git?branch=scroll-evm-executor/reth/v51#5cdeabaddd7fffa153e39de689d998a739eb404a" +dependencies = [ + "alloy-eip2930", + "alloy-eip7702", + "alloy-primitives", + "auto_impl", + "bitflags 2.6.0", + "bitvec", + "c-kzg", + "cfg-if", + "dyn-clone", + "enumn", + "hex", + "poseidon-bn254 0.1.0 (git+https://github.com/scroll-tech/poseidon-bn254?branch=master)", + "serde", +] + +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac 0.12.1", + "subtle", +] + +[[package]] +name = "rgb" +version = "0.8.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57397d16646700483b67d2dd6511d79318f9d057fdbd21a4066aeac8b41d310a" +dependencies = [ + "bytemuck", +] + +[[package]] +name = "ring" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.15", + "libc", + "spin", + "untrusted", + "windows-sys 0.52.0", +] + +[[package]] +name = "ringbuffer" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3df6368f71f205ff9c33c076d170dd56ebf68e8161c733c0caa07a7a5509ed53" + +[[package]] +name = "ripemd" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "rlimit" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7043b63bd0cd1aaa628e476b80e6d4023a3b50eb32789f2728908107bd0c793a" +dependencies = [ + "libc", +] + +[[package]] +name = "rlp" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" +dependencies = [ + "bytes", + "rustc-hex", +] + +[[package]] +name = "rmp" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "228ed7c16fa39782c3b3468e974aec2795e9089153cd08ee2e9aefb3613334c4" +dependencies = [ + "byteorder", + "num-traits", + "paste", +] + +[[package]] +name = "rmp-serde" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52e599a477cf9840e92f2cde9a7189e67b42c57532749bf90aea6ec10facd4db" +dependencies = [ + "byteorder", + "rmp", + "serde", +] + +[[package]] +name = "roaring" +version = "0.10.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a652edd001c53df0b3f96a36a8dc93fce6866988efc16808235653c6bcac8bf2" +dependencies = [ + "bytemuck", + "byteorder", +] + +[[package]] +name = "rolling-file" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8395b4f860856b740f20a296ea2cd4d823e81a2658cf05ef61be22916026a906" +dependencies = [ + "chrono", +] + +[[package]] +name = "route-recognizer" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afab94fb28594581f62d981211a9a4d53cc8130bbcbbb89a0440d9b8e81a7746" + +[[package]] +name = "rstest" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a2c585be59b6b5dd66a9d2084aa1d8bd52fbdb806eafdeffb52791147862035" +dependencies = [ + "futures", + "futures-timer", + "rstest_macros", + "rustc_version 0.4.1", +] + +[[package]] +name = "rstest_macros" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "825ea780781b15345a146be27eaefb05085e337e869bff01b4306a4fd4a9ad5a" +dependencies = [ + "cfg-if", + "glob", + "proc-macro-crate", + "proc-macro2", + "quote", + "regex", + "relative-path", + "rustc_version 0.4.1", + "syn 2.0.95", + "unicode-ident", +] + +[[package]] +name = "ruint" +version = "1.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5ef8fb1dd8de3870cb8400d51b4c2023854bbafd5431a3ac7e7317243e22d2f" +dependencies = [ + "alloy-rlp", + "arbitrary", + "ark-ff 0.3.0", + "ark-ff 0.4.2", + "bytes", + "fastrlp 0.3.1", + "fastrlp 0.4.0", + "num-bigint", + "num-integer", + "num-traits", + "parity-scale-codec", + "primitive-types", + "proptest", + "rand 0.8.5", + "rlp", + "ruint-macro", + "serde", + "valuable", + "zeroize", +] + +[[package]] +name = "ruint-macro" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48fd7bd8a6377e15ad9d42a8ec25371b94ddc67abe7c8b9127bec79bebaaae18" + +[[package]] +name = "rustc-demangle" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc-hash" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497" +dependencies = [ + "rand 0.8.5", +] + +[[package]] +name = "rustc-hex" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" + +[[package]] +name = "rustc_version" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" +dependencies = [ + "semver 0.11.0", +] + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver 1.0.24", +] + +[[package]] +name = "rustix" +version = "0.38.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a78891ee6bf2340288408954ac787aa063d8e8817e9f53abb37c695c6d834ef6" +dependencies = [ + "bitflags 2.6.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.59.0", +] + +[[package]] +name = "rustls" +version = "0.23.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5065c3f250cbd332cd894be57c40fa52387247659b14a2d6041d121547903b1b" +dependencies = [ + "log", + "once_cell", + "ring", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-native-certs" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5bfb394eeed242e909609f56089eecfe5fda225042e8b171791b9c95f5931e5" +dependencies = [ + "openssl-probe", + "rustls-pemfile", + "rustls-pki-types", + "schannel", + "security-framework 2.11.1", +] + +[[package]] +name = "rustls-native-certs" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fcff2dd52b58a8d98a70243663a0d234c4e2b79235637849d15913394a247d3" +dependencies = [ + "openssl-probe", + "rustls-pki-types", + "schannel", + "security-framework 3.2.0", +] + +[[package]] +name = "rustls-pemfile" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37" +dependencies = [ + "web-time", +] + +[[package]] +name = "rustls-platform-verifier" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afbb878bdfdf63a336a5e63561b1835e7a8c91524f51621db870169eac84b490" +dependencies = [ + "core-foundation 0.9.4", + "core-foundation-sys", + "jni", + "log", + "once_cell", + "rustls", + "rustls-native-certs 0.7.3", + "rustls-platform-verifier-android", + "rustls-webpki", + "security-framework 2.11.1", + "security-framework-sys", + "webpki-roots", + "winapi", +] + +[[package]] +name = "rustls-platform-verifier-android" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" + +[[package]] +name = "rustls-webpki" +version = "0.102.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + +[[package]] +name = "rustversion" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" + +[[package]] +name = "rusty-fork" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" +dependencies = [ + "fnv", + "quick-error", + "tempfile", + "wait-timeout", +] + +[[package]] +name = "ryu" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + +[[package]] +name = "ryu-js" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad97d4ce1560a5e27cec89519dc8300d1aa6035b099821261c651486a19e44d5" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "scc" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28e1c91382686d21b5ac7959341fcb9780fa7c03773646995a87c950fa7be640" +dependencies = [ + "sdd", +] + +[[package]] +name = "schannel" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "schnellru" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "356285bbf17bea63d9e52e96bd18f039672ac92b55b8cb997d6162a2a37d1649" +dependencies = [ + "ahash", + "cfg-if", + "hashbrown 0.13.2", +] + +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "scroll-alloy-consensus" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "arbitrary", + "bincode", + "derive_more", + "modular-bitfield", + "proptest", + "proptest-arbitrary-interop", + "rand 0.8.5", + "reth-codecs", + "reth-codecs-derive", + "serde", + "serde_json", + "serde_with", + "test-fuzz", +] + +[[package]] +name = "scroll-alloy-network" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-network", + "alloy-primitives", + "alloy-rpc-types-eth", + "alloy-signer", + "scroll-alloy-consensus", + "scroll-alloy-rpc-types", +] + +[[package]] +name = "scroll-alloy-rpc-types" +version = "1.1.4" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-network-primitives", + "alloy-primitives", + "alloy-rpc-types-eth", + "alloy-serde", + "arbitrary", + "derive_more", + "scroll-alloy-consensus", + "serde", + "serde_json", + "similar-asserts", +] + +[[package]] +name = "scroll-reth" +version = "1.1.4" +dependencies = [ + "clap", + "reth-cli-util", + "reth-node-builder", + "reth-provider", + "reth-scroll-cli", + "reth-scroll-node", +] + +[[package]] +name = "sdd" +version = "3.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "478f121bb72bbf63c52c93011ea1791dca40140dfe13f8336c4c5ac952c33aa9" + +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array", + "pkcs8", + "serdect", + "subtle", + "zeroize", +] + +[[package]] +name = "secp256k1" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9465315bc9d4566e1724f0fffcbcc446268cb522e60f9a27bcded6b19c108113" +dependencies = [ + "rand 0.8.5", + "secp256k1-sys", + "serde", +] + +[[package]] +name = "secp256k1-sys" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4387882333d3aa8cb20530a17c69a3752e97837832f34f6dccc760e715001d9" +dependencies = [ + "cc", +] + +[[package]] +name = "security-framework" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" +dependencies = [ + "bitflags 2.6.0", + "core-foundation 0.9.4", + "core-foundation-sys", + "libc", + "num-bigint", + "security-framework-sys", +] + +[[package]] +name = "security-framework" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271720403f46ca04f7ba6f55d438f8bd878d6b8ca0a1046e8228c4145bcbb316" +dependencies = [ + "bitflags 2.6.0", + "core-foundation 0.10.0", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" +dependencies = [ + "semver-parser", +] + +[[package]] +name = "semver" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cb6eb87a131f756572d7fb904f6e7b68633f09cca868c5df1c4b8d1a694bbba" +dependencies = [ + "serde", +] + +[[package]] +name = "semver-parser" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9900206b54a3527fdc7b8a938bffd94a568bac4f4aa8113b209df75a09c0dec2" +dependencies = [ + "pest", +] + +[[package]] +name = "send_wrapper" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" + +[[package]] +name = "send_wrapper" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" + +[[package]] +name = "serde" +version = "1.0.217" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.217" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "serde_json" +version = "1.0.135" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b0d7ba2887406110130a978386c4e1befb98c674b4fba677954e4db976630d9" +dependencies = [ + "indexmap 2.7.0", + "itoa", + "memchr", + "ryu", + "serde", +] + +[[package]] +name = "serde_qs" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7715380eec75f029a4ef7de39a9200e0a63823176b759d055b613f5a87df6a6" +dependencies = [ + "percent-encoding", + "serde", + "thiserror 1.0.69", +] + +[[package]] +name = "serde_repr" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "serde_spanned" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_with" +version = "3.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6b6f7f2fcb69f747921f79f3926bd1e203fce4fef62c268dd3abfb6d86029aa" +dependencies = [ + "base64 0.22.1", + "chrono", + "hex", + "indexmap 1.9.3", + "indexmap 2.7.0", + "serde", + "serde_derive", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "3.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d00caa5193a3c8362ac2b73be6b9e768aa5a4b2f721d8f4b339600c3cb51f8e" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "serdect" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a84f14a19e9a014bb9f4512488d9829a68e04ecabffb0f9904cd1ace94598177" +dependencies = [ + "base16ct", + "serde", +] + +[[package]] +name = "serial_test" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b258109f244e1d6891bf1053a55d63a5cd4f8f4c30cf9a1280989f80e7a1fa9" +dependencies = [ + "once_cell", + "parking_lot", + "scc", + "serial_test_derive", +] + +[[package]] +name = "serial_test_derive" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d69265a08751de7844521fd15003ae0a888e035773ba05695c5c759a6f89eef" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest 0.10.7", + "keccak", +] + +[[package]] +name = "sha3-asm" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28efc5e327c837aa837c59eae585fc250715ef939ac32881bcc11677cd02d46" +dependencies = [ + "cc", + "cfg-if", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shellexpand" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da03fa3b94cc19e3ebfc88c4229c49d8f08cdbd1228870a45f0ffdf84988e14b" +dependencies = [ + "dirs", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "signal-hook" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" +dependencies = [ + "libc", + "signal-hook-registry", +] + +[[package]] +name = "signal-hook-mio" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34db1a06d485c9142248b7a054f034b349b212551f3dfd19c94d45a754a217cd" +dependencies = [ + "libc", + "mio 1.0.3", + "signal-hook", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +dependencies = [ + "libc", +] + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest 0.10.7", + "rand_core 0.6.4", +] + +[[package]] +name = "similar" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1de1d4f81173b03af4c0cbed3c898f6bff5b870e4a7f5d6f4057d62a7a4b686e" +dependencies = [ + "bstr", + "unicode-segmentation", +] + +[[package]] +name = "similar-asserts" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfe85670573cd6f0fa97940f26e7e6601213c3b0555246c24234131f88c5709e" +dependencies = [ + "console", + "serde", + "similar", +] + +[[package]] +name = "simple_asn1" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" +dependencies = [ + "num-bigint", + "num-traits", + "thiserror 1.0.69", + "time", +] + +[[package]] +name = "siphasher" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" + +[[package]] +name = "sketches-ddsketch" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1e9a774a6c28142ac54bb25d25562e6bcf957493a184f15ad4eebccb23e410a" + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +dependencies = [ + "arbitrary", + "serde", +] + +[[package]] +name = "snap" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b6b67fb9a61334225b5b790716f609cd58395f895b3fe8b328786812a40bc3b" + +[[package]] +name = "socket2" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "soketto" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e859df029d160cb88608f5d7df7fb4753fd20fdfb4de5644f3d8b8440841721" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures", + "http", + "httparse", + "log", + "rand 0.8.5", + "sha1", +] + +[[package]] +name = "sp1-intrinsics" +version = "0.0.0" +source = "git+https://github.com/scroll-tech/sp1-intrinsics.git?branch=master#7e038e60db0b2e847f6d8f49e148ccac8c6fc394" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "sptr" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b9b39299b249ad65f3b7e96443bad61c02ca5cd3589f46cb6d610a0fd6c0d6a" + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "str_stack" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9091b6114800a5f2141aee1d1b9d6ca3592ac062dc5decb3764ec5895a47b4eb" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "strum" +version = "0.26.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" +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.95", +] + +[[package]] +name = "substrate-bn" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b5bbfa79abbae15dd642ea8176a21a635ff3c00059961d1ea27ad04e5b441c" +dependencies = [ + "byteorder", + "crunchy", + "lazy_static", + "rand 0.8.5", + "rustc-hex", +] + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "symbolic-common" +version = "12.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf08b42a6f9469bd8584daee39a1352c8133ccabc5151ccccb15896ef047d99a" +dependencies = [ + "debugid", + "memmap2", + "stable_deref_trait", + "uuid", +] + +[[package]] +name = "symbolic-demangle" +version = "12.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32f73b5a5bd4da72720c45756a2d11edf110116b87f998bda59b97be8c2c7cf1" +dependencies = [ + "cpp_demangle", + "rustc-demangle", + "symbolic-common", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46f71c0377baf4ef1cc3e3402ded576dccc315800fbc62dfc7fe04b009773b4a" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn-solidity" +version = "0.8.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31e89d8bf2768d277f40573c83a02a099e96d96dd3104e13ea676194e61ac4b0" +dependencies = [ + "paste", + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] + +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "sysinfo" +version = "0.32.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c33cd241af0f2e9e3b5c32163b873b29956890b5342e6745b917ce9d490f4af" +dependencies = [ + "core-foundation-sys", + "libc", + "memchr", + "ntapi", + "windows 0.57.0", +] + +[[package]] +name = "tagptr" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b2093cf4c8eb1e67749a6762251bc9cd836b6fc171623bd0a9d324d37af2417" + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "tempfile" +version = "3.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8a559c81686f576e8cd0290cd2a24a2a9ad80c98b3478856500fcbd7acd704" +dependencies = [ + "cfg-if", + "fastrand 2.3.0", + "getrandom 0.2.15", + "once_cell", + "rustix", + "windows-sys 0.59.0", +] + +[[package]] +name = "termtree" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f50febec83f5ee1df3015341d8bd429f2d1cc62bcba7ea2076759d315084683" + +[[package]] +name = "test-fuzz" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ab7a9bb33d134e863862ab9dad2ac7e022ac89707914627f498fe0f29248d9b" +dependencies = [ + "serde", + "test-fuzz-internal", + "test-fuzz-macro", + "test-fuzz-runtime", +] + +[[package]] +name = "test-fuzz-internal" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0bef5dd380747bd7b6e636a8032a24aa34fcecaf843e59fc97d299681922e86" +dependencies = [ + "bincode", + "cargo_metadata", + "serde", +] + +[[package]] +name = "test-fuzz-macro" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7e6b4c7391a38f0f026972ec2200bcfd1ec45533aa266fdae5858d011afc500" +dependencies = [ + "darling", + "heck", + "itertools 0.13.0", + "once_cell", + "prettyplease", + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "test-fuzz-runtime" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9fbe6fb7481ec6d9bf64ae2c5d49cb1b40f8da624a91031482af7b08168c679" +dependencies = [ + "hex", + "num-traits", + "serde", + "sha1", + "test-fuzz-internal", +] + +[[package]] +name = "thin-vec" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a38c90d48152c236a3ab59271da4f4ae63d678c5d7ad6b7714d7cb9760be5e4b" + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3ac7f54ca534db81081ef1c1e7f6ea8a3ef428d2fc069097c079443d24124d3" +dependencies = [ + "thiserror-impl 2.0.10", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e9465d30713b56a37ede7185763c3492a91be2f5fa68d958c44e41ab9248beb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "thread_local" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +dependencies = [ + "cfg-if", + "once_cell", +] + +[[package]] +name = "threadpool" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" +dependencies = [ + "num_cpus", +] + +[[package]] +name = "tikv-jemalloc-ctl" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f21f216790c8df74ce3ab25b534e0718da5a1916719771d3fec23315c99e468b" +dependencies = [ + "libc", + "paste", + "tikv-jemalloc-sys", +] + +[[package]] +name = "tikv-jemalloc-sys" +version = "0.6.0+5.3.0-1-ge13ca993e8ccb9ba9847cc330696e02839f328f7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd3c60906412afa9c2b5b5a48ca6a5abe5736aec9eb48ad05037a677e52e4e2d" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "tikv-jemallocator" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cec5ff18518d81584f477e9bfdf957f5bb0979b0bac3af4ca30b5b3ae2d2865" +dependencies = [ + "libc", + "tikv-jemalloc-sys", +] + +[[package]] +name = "time" +version = "0.3.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21" +dependencies = [ + "deranged", + "itoa", + "js-sys", + "libc", + "num-conv", + "num_threads", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + +[[package]] +name = "time-macros" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tinytemplate" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" +dependencies = [ + "serde", + "serde_json", +] + +[[package]] +name = "tinyvec" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "022db8904dfa342efe721985167e9fcd16c29b226db4397ed752a761cfce81e8" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.43.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d61fa4ffa3de412bfea335c6ecff681de2b609ba3c77ef3e00e521813a9ed9e" +dependencies = [ + "backtrace", + "bytes", + "libc", + "mio 1.0.3", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.52.0", +] + +[[package]] +name = "tokio-macros" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37" +dependencies = [ + "rustls", + "tokio", +] + +[[package]] +name = "tokio-stream" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", + "tokio-util", +] + +[[package]] +name = "tokio-tungstenite" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edc5f74e248dc973e0dbb7b74c7e0d6fcc301c694ff50049504004ef4d0cdcd9" +dependencies = [ + "futures-util", + "log", + "rustls", + "rustls-pki-types", + "tokio", + "tokio-rustls", + "tungstenite", + "webpki-roots", +] + +[[package]] +name = "tokio-util" +version = "0.7.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7fcaa8d55a2bdd6b83ace262b016eca0d79ee02818c5c1bcdf0305114081078" +dependencies = [ + "bytes", + "futures-core", + "futures-io", + "futures-sink", + "pin-project-lite", + "slab", + "tokio", +] + +[[package]] +name = "toml" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.22.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" +dependencies = [ + "indexmap 2.7.0", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "hdrhistogram", + "indexmap 1.9.3", + "pin-project", + "pin-project-lite", + "rand 0.8.5", + "slab", + "tokio", + "tokio-util", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-http" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "403fa3b783d4b626a8ad51d766ab03cb6d2dbfc46b1c5d4448395e6628dc9697" +dependencies = [ + "async-compression", + "base64 0.22.1", + "bitflags 2.6.0", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-body-util", + "http-range-header", + "httpdate", + "iri-string", + "mime", + "mime_guess", + "percent-encoding", + "pin-project-lite", + "tokio", + "tokio-util", + "tower 0.5.2", + "tower-layer", + "tower-service", + "tracing", + "uuid", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-appender" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3566e8ce28cc0a3fe42519fc80e6b4c943cc4c8cef275620eb8dac2d3d4e06cf" +dependencies = [ + "crossbeam-channel", + "thiserror 1.0.69", + "time", + "tracing-subscriber", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "tracing-core" +version = "0.1.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-futures" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" +dependencies = [ + "pin-project", + "tracing", +] + +[[package]] +name = "tracing-journald" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b1f47d22deb79c3f59fcf2a1f00f60cbdc05462bf17d1cd356c1fefa3f444bd" +dependencies = [ + "time", + "tracing", + "tracing-core", + "tracing-subscriber", +] + +[[package]] +name = "tracing-serde" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "704b1aeb7be0d0a84fc9828cae51dab5970fee5088f83d1dd7ee6f6246fc6ff1" +dependencies = [ + "serde", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +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", +] + +[[package]] +name = "tracy-client" +version = "0.17.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73202d787346a5418f8222eddb5a00f29ea47caf3c7d38a8f2f69f8455fa7c7e" +dependencies = [ + "loom", + "once_cell", + "rustc-demangle", + "tracy-client-sys", +] + +[[package]] +name = "tracy-client-sys" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69fff37da548239c3bf9e64a12193d261e8b22b660991c6fd2df057c168f435f" +dependencies = [ + "cc", + "windows-targets 0.52.6", +] + +[[package]] +name = "triehash" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1631b201eb031b563d2e85ca18ec8092508e262a3196ce9bd10a67ec87b9f5c" +dependencies = [ + "hash-db", + "rlp", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "tungstenite" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18e5b8366ee7a95b16d32197d0b2604b43a0be89dc5fac9f8e96ccafbaedda8a" +dependencies = [ + "byteorder", + "bytes", + "data-encoding", + "http", + "httparse", + "log", + "rand 0.8.5", + "rustls", + "rustls-pki-types", + "sha1", + "thiserror 1.0.69", + "utf-8", +] + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "ucd-trie" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" + +[[package]] +name = "uint" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + +[[package]] +name = "uint" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "909988d098b2f738727b161a106cfc7cab00c539c2687a8836f8e565976fb53e" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + +[[package]] +name = "unarray" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" + +[[package]] +name = "unicase" +version = "2.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" + +[[package]] +name = "unicode-ident" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" + +[[package]] +name = "unicode-segmentation" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" + +[[package]] +name = "unicode-truncate" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3644627a5af5fa321c95b9b235a72fd24cd29c648c2c379431e6628655627bf" +dependencies = [ + "itertools 0.13.0", + "unicode-segmentation", + "unicode-width 0.1.14", +] + +[[package]] +name = "unicode-width" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" + +[[package]] +name = "unicode-width" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "universal-hash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" +dependencies = [ + "crypto-common", + "subtle", +] + +[[package]] +name = "unsigned-varint" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb066959b24b5196ae73cb057f45598450d2c5f71460e98c49b738086eff9c06" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", +] + +[[package]] +name = "utf-8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + +[[package]] +name = "uuid" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" +dependencies = [ + "getrandom 0.2.15", +] + +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + +[[package]] +name = "vergen" +version = "8.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2990d9ea5967266ea0ccf413a4aa5c42a93dbcfda9cb49a97de6931726b12566" +dependencies = [ + "anyhow", + "cargo_metadata", + "cfg-if", + "regex", + "rustversion", + "time", +] + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "visibility" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d674d135b4a8c1d7e813e2f8d1c9a58308aee4a680323066025e53132218bd91" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "wait-timeout" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" +dependencies = [ + "libc", +] + +[[package]] +name = "waker-fn" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "317211a0dc0ceedd78fb2ca9a44aed3d7b9b26f81870d485c07122b4350673b7" + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.99" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396" +dependencies = [ + "cfg-if", + "once_cell", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.99" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79" +dependencies = [ + "bumpalo", + "log", + "proc-macro2", + "quote", + "syn 2.0.95", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.49" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38176d9b44ea84e9184eff0bc34cc167ed044f816accfe5922e54d84cf48eca2" +dependencies = [ + "cfg-if", + "js-sys", + "once_cell", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.99" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.99" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.99" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6" + +[[package]] +name = "wasm-streams" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "wasmtimer" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0048ad49a55b9deb3953841fa1fc5858f0efbcb7a18868c899a360269fac1b23" +dependencies = [ + "futures", + "js-sys", + "parking_lot", + "pin-utils", + "slab", + "wasm-bindgen", +] + +[[package]] +name = "web-sys" +version = "0.3.76" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04dd7223427d52553d3702c004d3b2fe07c148165faa56313cb00211e31c12bc" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki-roots" +version = "0.26.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d642ff16b7e79272ae451b7322067cdc17cadf68c23264be9d94a32319efe7e" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "widestring" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311" + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows" +version = "0.57.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12342cb4d8e3b046f3d80effd474a7a02447231330ef77d71daa6fbc40681143" +dependencies = [ + "windows-core 0.57.0", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" +dependencies = [ + "windows-core 0.58.0", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-core" +version = "0.57.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2ed2439a290666cd67ecce2b0ffaad89c2a56b976b736e6ece670297897832d" +dependencies = [ + "windows-implement 0.57.0", + "windows-interface 0.57.0", + "windows-result 0.1.2", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-core" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" +dependencies = [ + "windows-implement 0.58.0", + "windows-interface 0.58.0", + "windows-result 0.2.0", + "windows-strings", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-implement" +version = "0.57.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9107ddc059d5b6fbfbffdfa7a7fe3e22a226def0b2608f72e9d552763d3e1ad7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "windows-implement" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "windows-interface" +version = "0.57.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29bee4b38ea3cde66011baa44dba677c432a78593e202392d1e9070cf2a7fca7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "windows-interface" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "windows-registry" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +dependencies = [ + "windows-result 0.2.0", + "windows-strings", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-result" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result 0.2.0", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "winnow" +version = "0.6.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39281189af81c07ec09db316b302a3e67bf9bd7cbf6c820b50e35fee9c2fa980" +dependencies = [ + "memchr", +] + +[[package]] +name = "winreg" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + +[[package]] +name = "ws_stream_wasm" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7999f5f4217fe3818726b66257a4475f71e74ffd190776ad053fa159e50737f5" +dependencies = [ + "async_io_stream", + "futures", + "js-sys", + "log", + "pharos", + "rustc_version 0.4.1", + "send_wrapper 0.6.0", + "thiserror 1.0.69", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "yansi" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" + +[[package]] +name = "yoke" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "byteorder", + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "zerofrom" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "zstd" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "7.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54a3ab4db68cea366acc5c897c7b4d4d1b8994a9cd6e6f841f8964566a419059" +dependencies = [ + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.13+zstd.1.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" +dependencies = [ + "cc", + "pkg-config", +] diff --git a/Cargo.toml b/Cargo.toml index 8f623d36f3c3..d86839962eda 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -500,7 +500,6 @@ reth-scroll-cli = { path = "crates/scroll/cli" } reth-scroll-consensus = { path = "crates/scroll/consensus" } reth-scroll-evm = { path = "crates/scroll/evm" } reth-scroll-engine = { path = "crates/scroll/engine" } -reth-scroll-execution = { path = "crates/scroll/execution" } reth-scroll-forks = { path = "crates/scroll/hardforks" } reth-scroll-node = { path = "crates/scroll/node" } reth-scroll-primitives = { path = "crates/scroll/primitives" } diff --git a/crates/scroll/evm/Cargo.toml b/crates/scroll/evm/Cargo.toml index 02b8c43b7b9c..46388a9d2c3e 100644 --- a/crates/scroll/evm/Cargo.toml +++ b/crates/scroll/evm/Cargo.toml @@ -27,14 +27,14 @@ revm = { workspace = true, features = ["optional_no_base_fee"] } # scroll reth-scroll-chainspec.workspace = true reth-scroll-forks.workspace = true -scroll-alloy-consensus.workspace = true -reth-scroll-consensus.workspace = true -reth-scroll-execution.workspace = true # alloy alloy-consensus.workspace = true alloy-eips.workspace = true +# scroll +reth-scroll-consensus.workspace = true + # misc auto_impl.workspace = true derive_more.workspace = true @@ -53,8 +53,7 @@ optimism = [ scroll = [ "reth-evm/scroll", "reth-primitives/scroll", - "reth-primitives-traits/scroll", "reth-revm/scroll", "reth-scroll-consensus/scroll", "revm/scroll" -] +] \ No newline at end of file From 80755c1e2f679d3ce2f598809853673611654380 Mon Sep 17 00:00:00 2001 From: georgehao Date: Fri, 10 Jan 2025 14:24:34 +0800 Subject: [PATCH 30/86] sync scroll --- Cargo.lock | 21 +------ Cargo.toml | 2 - Makefile | 2 +- crates/ethereum/evm/Cargo.toml | 32 +++++----- crates/primitives/Cargo.toml | 3 - crates/primitives/src/alloy_compat.rs | 1 + crates/primitives/src/lib.rs | 2 - .../consensus/src/transaction/envelope.rs | 2 + .../consensus/src/transaction/l1_message.rs | 14 +++++ .../scroll/alloy/rpc-types/src/transaction.rs | 14 +---- crates/scroll/evm/Cargo.toml | 2 +- crates/scroll/primitives/Cargo.toml | 58 ------------------- crates/scroll/primitives/src/lib.rs | 17 ------ crates/scroll/rpc/src/eth/transaction.rs | 1 + crates/stages/stages/Cargo.toml | 2 - crates/storage/db/Cargo.toml | 3 - crates/storage/provider/Cargo.toml | 3 - crates/trie/db/Cargo.toml | 45 +++++++------- testing/ef-tests/Cargo.toml | 3 - 19 files changed, 58 insertions(+), 169 deletions(-) delete mode 100644 crates/scroll/primitives/Cargo.toml delete mode 100644 crates/scroll/primitives/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index b0918356ffbb..9c360ec522af 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2690,7 +2690,6 @@ dependencies = [ "reth-primitives", "reth-provider", "reth-revm", - "reth-scroll-primitives", "reth-scroll-revm", "reth-stages", "serde", @@ -7049,7 +7048,6 @@ dependencies = [ "reth-primitives", "reth-primitives-traits", "reth-prune-types", - "reth-scroll-primitives", "reth-stages-types", "reth-storage-errors", "reth-tracing", @@ -7750,7 +7748,6 @@ dependencies = [ "reth-primitives", "reth-primitives-traits", "reth-revm", - "reth-scroll-primitives", "reth-testing-utils", "revm-primitives", "secp256k1", @@ -8817,7 +8814,6 @@ dependencies = [ "reth-codecs", "reth-ethereum-forks", "reth-primitives-traits", - "reth-scroll-primitives", "reth-scroll-revm", "reth-static-file-types", "reth-testing-utils", @@ -8901,7 +8897,6 @@ dependencies = [ "reth-primitives", "reth-primitives-traits", "reth-prune-types", - "reth-scroll-primitives", "reth-scroll-revm", "reth-stages-types", "reth-storage-api", @@ -9403,8 +9398,8 @@ dependencies = [ "reth-scroll-chainspec", "reth-scroll-consensus", "reth-scroll-forks", - "reth-scroll-primitives", "reth-scroll-revm", + "scroll-alloy-consensus", "thiserror 2.0.10", "tracing", ] @@ -9449,18 +9444,6 @@ dependencies = [ "reth-trie-db", ] -[[package]] -name = "reth-scroll-primitives" -version = "1.1.4" -dependencies = [ - "alloy-primitives", - "arbitrary", - "modular-bitfield", - "reth-codecs", - "serde", - "test-fuzz", -] - [[package]] name = "reth-scroll-revm" version = "1.1.4" @@ -9565,7 +9548,6 @@ dependencies = [ "reth-prune", "reth-prune-types", "reth-revm", - "reth-scroll-primitives", "reth-stages-api", "reth-static-file", "reth-storage-errors", @@ -9877,7 +9859,6 @@ dependencies = [ "reth-metrics", "reth-primitives", "reth-provider", - "reth-scroll-primitives", "reth-scroll-revm", "reth-storage-errors", "reth-trie", diff --git a/Cargo.toml b/Cargo.toml index d86839962eda..b61dda208260 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -112,7 +112,6 @@ members = [ "crates/scroll/evm", "crates/scroll/hardforks", "crates/scroll/node", - "crates/scroll/primitives", "crates/scroll/revm", "crates/scroll/rpc", "crates/scroll/trie", @@ -502,7 +501,6 @@ reth-scroll-evm = { path = "crates/scroll/evm" } reth-scroll-engine = { path = "crates/scroll/engine" } reth-scroll-forks = { path = "crates/scroll/hardforks" } reth-scroll-node = { path = "crates/scroll/node" } -reth-scroll-primitives = { path = "crates/scroll/primitives" } reth-scroll-trie = { path = "crates/scroll/trie" } reth-scroll-revm = { path = "crates/scroll/revm" } # TODO (scroll): point to crates.io/tag once the crate is published/a tag is created. diff --git a/Makefile b/Makefile index 78a676b13086..cb4c23b95009 100644 --- a/Makefile +++ b/Makefile @@ -398,7 +398,7 @@ lint-scroll-reth: --examples \ --tests \ --benches \ - --features "scroll $(BIN_OTHER_FEATURES)" \ + --features "scroll $(BIN_OTHER_FEATURES) skip-state-root-validation" \ -- -D warnings lint-all: diff --git a/crates/ethereum/evm/Cargo.toml b/crates/ethereum/evm/Cargo.toml index 6f5554254236..0cd9124ccbd9 100644 --- a/crates/ethereum/evm/Cargo.toml +++ b/crates/ethereum/evm/Cargo.toml @@ -40,26 +40,24 @@ secp256k1.workspace = true serde_json.workspace = true alloy-genesis.workspace = true -reth-scroll-primitives.workspace = true - [features] default = ["std"] std = [ - "reth-consensus/std", - "reth-primitives/std", - "reth-revm/std", - "alloy-consensus/std", - "alloy-eips/std", - "alloy-genesis/std", - "alloy-primitives/std", - "revm-primitives/std", - "secp256k1/std", - "reth-ethereum-forks/std", - "serde_json/std", - "reth-primitives-traits/std", - "reth-chainspec/std" + "reth-consensus/std", + "reth-primitives/std", + "reth-revm/std", + "alloy-consensus/std", + "alloy-eips/std", + "alloy-genesis/std", + "alloy-primitives/std", + "revm-primitives/std", + "secp256k1/std", + "reth-ethereum-forks/std", + "serde_json/std", + "reth-primitives-traits/std", + "reth-chainspec/std" ] scroll = [ - "reth-primitives/scroll", - "reth-testing-utils/scroll", + "reth-primitives/scroll", + "reth-testing-utils/scroll", ] diff --git a/crates/primitives/Cargo.toml b/crates/primitives/Cargo.toml index 8d78de0793e4..f28b0bbb71b3 100644 --- a/crates/primitives/Cargo.toml +++ b/crates/primitives/Cargo.toml @@ -31,7 +31,6 @@ alloy-trie = { workspace = true, features = ["serde"] } # scroll revm-primitives = { package = "reth-scroll-revm", path = "../scroll/revm", features = ["serde"] } -reth-scroll-primitives = { workspace = true, optional = true, features = ["serde"] } scroll-alloy-consensus = { workspace = true, optional = true, features = ["serde", "arbitrary"] } # optimism @@ -151,7 +150,6 @@ arbitrary = [ "alloy-trie/arbitrary", "reth-trie-common/arbitrary", "dep:secp256k1", - "reth-scroll-primitives?/arbitrary", "scroll-alloy-consensus?/arbitrary" ] secp256k1 = [ @@ -195,7 +193,6 @@ scroll = [ "dep:scroll-alloy-consensus", "reth-primitives-traits/scroll", "reth-testing-utils/scroll", - "reth-scroll-primitives", ] [[bench]] diff --git a/crates/primitives/src/alloy_compat.rs b/crates/primitives/src/alloy_compat.rs index d198cea0a01c..612bc8e1ccf6 100644 --- a/crates/primitives/src/alloy_compat.rs +++ b/crates/primitives/src/alloy_compat.rs @@ -108,6 +108,7 @@ impl TryFrom for TransactionSigned { value: inner.value(), sender: fields.sender, input: inner.input().clone(), + nonce: inner.nonce(), }), scroll_alloy_consensus::TxL1Message::signature(), _hash, diff --git a/crates/primitives/src/lib.rs b/crates/primitives/src/lib.rs index a453c58c69f1..a0153480a982 100644 --- a/crates/primitives/src/lib.rs +++ b/crates/primitives/src/lib.rs @@ -22,8 +22,6 @@ #[cfg(feature = "optimism")] use op_alloy_consensus as _; #[cfg(feature = "scroll")] -use reth_scroll_primitives as _; -#[cfg(feature = "scroll")] use scroll_alloy_consensus as _; extern crate alloc; diff --git a/crates/scroll/alloy/consensus/src/transaction/envelope.rs b/crates/scroll/alloy/consensus/src/transaction/envelope.rs index 6df9a07d93de..82bd6b491f41 100644 --- a/crates/scroll/alloy/consensus/src/transaction/envelope.rs +++ b/crates/scroll/alloy/consensus/src/transaction/envelope.rs @@ -491,6 +491,7 @@ mod tests { fn test_encode_decode_l1_message() { let tx = TxL1Message { queue_index: 1, + nonce: 1, gas_limit: 2, to: Address::left_padding_from(&[3]), sender: Address::left_padding_from(&[4]), @@ -509,6 +510,7 @@ mod tests { fn test_serde_roundtrip_deposit() { let tx = TxL1Message { queue_index: 11, + nonce: 1, gas_limit: u64::MAX, sender: Address::random(), to: Address::random(), diff --git a/crates/scroll/alloy/consensus/src/transaction/l1_message.rs b/crates/scroll/alloy/consensus/src/transaction/l1_message.rs index 8ed82cd87d3b..3f35d361da86 100644 --- a/crates/scroll/alloy/consensus/src/transaction/l1_message.rs +++ b/crates/scroll/alloy/consensus/src/transaction/l1_message.rs @@ -37,6 +37,9 @@ pub struct TxL1Message { /// The queue index of the message in the L1 contract queue. #[cfg_attr(feature = "serde", serde(with = "alloy_serde::quantity"))] pub queue_index: u64, + /// The nonce for the transaction. + #[cfg_attr(feature = "serde", serde(with = "alloy_serde::quantity"))] + pub nonce: u64, /// The gas limit for the transaction. Gas is paid for when message is sent from the L1. #[cfg_attr(feature = "serde", serde(with = "alloy_serde::quantity", rename = "gas"))] pub gas_limit: u64, @@ -71,6 +74,7 @@ impl TxL1Message { pub fn rlp_decode_fields(buf: &mut &[u8]) -> alloy_rlp::Result { Ok(Self { queue_index: Decodable::decode(buf)?, + nonce: Decodable::decode(buf)?, gas_limit: Decodable::decode(buf)?, to: Decodable::decode(buf)?, value: Decodable::decode(buf)?, @@ -102,6 +106,7 @@ impl TxL1Message { /// Outputs the length of the transaction's fields, without a RLP header. fn rlp_encoded_fields_length(&self) -> usize { self.queue_index.length() + + self.nonce.length() + self.gas_limit.length() + self.to.length() + self.value.length() + @@ -113,6 +118,7 @@ impl TxL1Message { /// fn rlp_encode_fields(&self, out: &mut dyn alloy_rlp::BufMut) { self.queue_index.encode(out); + self.nonce.encode(out); self.gas_limit.encode(out); self.to.encode(out); self.value.encode(out); @@ -156,6 +162,7 @@ impl TxL1Message { #[inline] pub fn size(&self) -> usize { size_of::() + // queue_index + size_of::() + // nonce size_of::() + // gas_limit size_of::
() + // to size_of::() + // value @@ -359,6 +366,7 @@ mod tests { value: U256::default(), sender: Address::default(), input: Bytes::default(), + nonce: 0, }; let mut buffer = BytesMut::new(); original.rlp_encode_fields(&mut buffer); @@ -376,6 +384,7 @@ mod tests { value: U256::default(), sender: Address::default(), input: Bytes::default(), + nonce: 0, }; let mut buffer_with_header = BytesMut::new(); @@ -396,6 +405,7 @@ mod tests { value: U256::default(), sender: Address::default(), input: Bytes::default(), + nonce: 0, }; assert!(tx_deposit.size() > tx_deposit.rlp_encoded_fields_length()); @@ -426,6 +436,8 @@ pub(super) mod serde_bincode_compat { #[serde(default)] queue_index: u64, #[serde(default)] + nonce: u64, + #[serde(default)] gas_limit: u64, to: Address, value: U256, @@ -443,6 +455,7 @@ pub(super) mod serde_bincode_compat { value: value.value, sender: value.sender, input: Cow::Borrowed(&value.input), + nonce: value.nonce, } } } @@ -456,6 +469,7 @@ pub(super) mod serde_bincode_compat { value: value.value, sender: value.sender, input: value.input.into_owned(), + nonce: value.nonce, } } } diff --git a/crates/scroll/alloy/rpc-types/src/transaction.rs b/crates/scroll/alloy/rpc-types/src/transaction.rs index 03b172a66b01..3860388b2615 100644 --- a/crates/scroll/alloy/rpc-types/src/transaction.rs +++ b/crates/scroll/alloy/rpc-types/src/transaction.rs @@ -27,9 +27,6 @@ pub struct Transaction { /// queue index for deposit transactions pub queue_index: Option, - - /// nonce for transactions - pub nonce: Option, } impl Typed2718 for Transaction { @@ -187,12 +184,6 @@ mod tx_serde { with = "alloy_serde::quantity::opt" )] queue_index: Option, - #[serde( - default, - skip_serializing_if = "Option::is_none", - with = "alloy_serde::quantity::opt" - )] - nonce: Option, #[serde(default, skip_serializing_if = "Option::is_none")] sender: Option
, } @@ -225,7 +216,6 @@ mod tx_serde { from, }, queue_index, - nonce, .. } = value; @@ -238,7 +228,6 @@ mod tx_serde { block_number, transaction_index, other: OptionalFields { - nonce, from: Some(from), effective_gas_price, queue_index, @@ -280,7 +269,6 @@ mod tx_serde { from, effective_gas_price, }, - nonce: other.nonce, sender: other.sender, queue_index: other.queue_index, }; @@ -297,7 +285,7 @@ mod tests { fn can_deserialize_deposit() { // cast rpc eth_getTransactionByHash // 0x5c1c3785c8bf5d7f1cb714abd1d22e32642887215602c3a14a5e9ee105bad6aa --rpc-url https://rpc.scroll.io - let rpc_tx = r#"{"blockHash":"0x018ed80ea8340984a1f4841490284d6e51d71f9e9411feeca41e007a89fbfdff","blockNumber":"0xb81121","from":"0x7885bcbd5cecef1336b5300fb5186a12ddd8c478","gas":"0x1e8480","gasPrice":"0x0","hash":"0x5c1c3785c8bf5d7f1cb714abd1d22e32642887215602c3a14a5e9ee105bad6aa","input":"0x8ef1332e000000000000000000000000c186fa914353c44b2e33ebe05f21846f1048beda0000000000000000000000003bad7ad0728f9917d1bf08af5782dcbd516cdd96000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e7ba000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000044493a4f846ffc1507cbfe98a2b0ba1f06ea7e4eb749c001f78f6cb5540daa556a0566322a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","nonce":"0x1","to":"0x781e90f1c8fc4611c9b7497c3b47f99ef6969cbc","transactionIndex":"0x0","value":"0x0","type":"0x7e","v":"0x0","r":"0x0","s":"0x0","sender":"0x7885bcbd5cecef1336b5300fb5186a12ddd8c478","queueIndex":"0xe7ba0", "yParity":"0x0"}"#; + let rpc_tx = r#"{"blockHash":"0x018ed80ea8340984a1f4841490284d6e51d71f9e9411feeca41e007a89fbfdff","blockNumber":"0xb81121","from":"0x7885bcbd5cecef1336b5300fb5186a12ddd8c478","gas":"0x1e8480","gasPrice":"0x0","hash":"0x5c1c3785c8bf5d7f1cb714abd1d22e32642887215602c3a14a5e9ee105bad6aa","input":"0x8ef1332e000000000000000000000000c186fa914353c44b2e33ebe05f21846f1048beda0000000000000000000000003bad7ad0728f9917d1bf08af5782dcbd516cdd96000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e7ba000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000044493a4f846ffc1507cbfe98a2b0ba1f06ea7e4eb749c001f78f6cb5540daa556a0566322a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","nonce":"0x0","to":"0x781e90f1c8fc4611c9b7497c3b47f99ef6969cbc","transactionIndex":"0x0","value":"0x0","type":"0x7e","v":"0x0","r":"0x0","s":"0x0","sender":"0x7885bcbd5cecef1336b5300fb5186a12ddd8c478","queueIndex":"0xe7ba0", "yParity":"0x0"}"#; let tx = serde_json::from_str::(rpc_tx).unwrap(); diff --git a/crates/scroll/evm/Cargo.toml b/crates/scroll/evm/Cargo.toml index 46388a9d2c3e..1ba22ba22f0d 100644 --- a/crates/scroll/evm/Cargo.toml +++ b/crates/scroll/evm/Cargo.toml @@ -34,6 +34,7 @@ alloy-eips.workspace = true # scroll reth-scroll-consensus.workspace = true +scroll-alloy-consensus.workspace = true # misc auto_impl.workspace = true @@ -43,7 +44,6 @@ tracing.workspace = true [dev-dependencies] eyre.workspace = true -reth-scroll-primitives.workspace = true [features] optimism = [ diff --git a/crates/scroll/primitives/Cargo.toml b/crates/scroll/primitives/Cargo.toml deleted file mode 100644 index 7e4fee754eb9..000000000000 --- a/crates/scroll/primitives/Cargo.toml +++ /dev/null @@ -1,58 +0,0 @@ -[package] -name = "reth-scroll-primitives" -version.workspace = true -edition.workspace = true -rust-version.workspace = true -license.workspace = true -homepage.workspace = true -repository.workspace = true -exclude.workspace = true - -[lints] -workspace = true - -[dependencies] -# alloy -alloy-primitives.workspace = true - -# reth -reth-codecs = { workspace = true, optional = true } - -# required by reth-codecs -modular-bitfield = { workspace = true, optional = true } -serde.workspace = true - -# misc -arbitrary = { workspace = true, features = ["derive"], optional = true } - -[dev-dependencies] -alloy-primitives = { workspace = true, features = ["arbitrary"] } -arbitrary = { workspace = true, features = ["derive"] } -reth-codecs = { workspace = true, features = ["test-utils"] } - -test-fuzz.workspace = true - -[features] -default = [ - "reth-codec", - "std" -] -std = [ - "serde/std", - "alloy-primitives/std", - "reth-codecs/std", -] -arbitrary = [ - "dep:arbitrary", - "alloy-primitives/arbitrary", - "reth-codecs/arbitrary" -] -reth-codec = [ - "dep:reth-codecs", - "modular-bitfield", - "std" -] -serde = [ - "alloy-primitives/serde", - "reth-codecs/serde" -] diff --git a/crates/scroll/primitives/src/lib.rs b/crates/scroll/primitives/src/lib.rs deleted file mode 100644 index 6df51fb98f34..000000000000 --- a/crates/scroll/primitives/src/lib.rs +++ /dev/null @@ -1,17 +0,0 @@ -//! Primitive types for the Scroll extension of `Reth`. - -#![warn(unused_crate_dependencies)] -#![cfg_attr(not(feature = "std"), no_std)] - -pub use execution_context::ScrollPostExecutionContext; -mod execution_context; - -pub use account_extension::AccountExtension; -mod account_extension; - -/// Poseidon hashing primitives. -pub mod poseidon; -pub use l1_transaction::{ - ScrollL1MessageTransactionFields, TxL1Message, L1_MESSAGE_TRANSACTION_TYPE, -}; -pub mod l1_transaction; diff --git a/crates/scroll/rpc/src/eth/transaction.rs b/crates/scroll/rpc/src/eth/transaction.rs index c997591b07e8..cd9f8c011742 100644 --- a/crates/scroll/rpc/src/eth/transaction.rs +++ b/crates/scroll/rpc/src/eth/transaction.rs @@ -60,6 +60,7 @@ where reth_primitives::Transaction::L1Message(tx) => { tx_queue_index = Some(tx.queue_index); tx_sender = Some(tx.sender); + ScrollTxEnvelope::L1Message(tx.seal_unchecked(hash)) } }; diff --git a/crates/stages/stages/Cargo.toml b/crates/stages/stages/Cargo.toml index 191e356f6a26..6d2e8b2a2f26 100644 --- a/crates/stages/stages/Cargo.toml +++ b/crates/stages/stages/Cargo.toml @@ -76,8 +76,6 @@ reth-trie = { workspace = true, features = ["test-utils"] } reth-provider = { workspace = true, features = ["test-utils"] } reth-network-peers.workspace = true -reth-scroll-primitives.workspace = true - alloy-rlp.workspace = true itertools.workspace = true tokio = { workspace = true, features = ["rt", "sync", "macros"] } diff --git a/crates/storage/db/Cargo.toml b/crates/storage/db/Cargo.toml index 8117104d0bce..ac496d60e12c 100644 --- a/crates/storage/db/Cargo.toml +++ b/crates/storage/db/Cargo.toml @@ -63,8 +63,6 @@ tempfile.workspace = true test-fuzz.workspace = true parking_lot.workspace = true -reth-scroll-primitives.workspace = true - pprof = { workspace = true, features = [ "flamegraph", "frame-pointer", @@ -112,7 +110,6 @@ arbitrary = [ "reth-prune-types/arbitrary", "reth-stages-types/arbitrary", "alloy-consensus/arbitrary", - "reth-scroll-primitives/arbitrary" ] optimism = ["reth-primitives/optimism", "reth-db-api/optimism"] op = ["reth-db-api/op"] diff --git a/crates/storage/provider/Cargo.toml b/crates/storage/provider/Cargo.toml index caaf8d50313f..c471979e74af 100644 --- a/crates/storage/provider/Cargo.toml +++ b/crates/storage/provider/Cargo.toml @@ -79,8 +79,6 @@ reth-trie = { workspace = true, features = ["test-utils"] } reth-testing-utils.workspace = true reth-ethereum-engine-primitives.workspace = true -reth-scroll-primitives.workspace = true - parking_lot.workspace = true tempfile.workspace = true assert_matches.workspace = true @@ -116,7 +114,6 @@ serde = [ "reth-execution-types/serde", "reth-trie-db/serde", "reth-trie/serde", - "reth-scroll-primitives/serde" ] test-utils = [ "reth-db/test-utils", diff --git a/crates/trie/db/Cargo.toml b/crates/trie/db/Cargo.toml index 446630702fce..ad7bbad6171f 100644 --- a/crates/trie/db/Cargo.toml +++ b/crates/trie/db/Cargo.toml @@ -54,8 +54,6 @@ reth-trie = { workspace = true, features = ["test-utils"] } alloy-consensus.workspace = true -reth-scroll-primitives.workspace = true - # trie triehash = "0.8" @@ -68,30 +66,29 @@ similar-asserts.workspace = true [features] metrics = ["reth-metrics", "reth-trie/metrics", "dep:metrics"] serde = [ - "dep:serde", - "similar-asserts/serde", - "revm/serde", - "alloy-consensus/serde", - "alloy-primitives/serde", - "reth-trie/serde", - "reth-trie-common/serde", - "reth-provider/serde", - "reth-scroll-primitives/serde" + "dep:serde", + "similar-asserts/serde", + "revm/serde", + "alloy-consensus/serde", + "alloy-primitives/serde", + "reth-trie/serde", + "reth-trie-common/serde", + "reth-provider/serde", ] test-utils = [ - "triehash", - "revm/test-utils", - "reth-trie-common/test-utils", - "reth-chainspec/test-utils", - "reth-primitives/test-utils", - "reth-db/test-utils", - "reth-db-api/test-utils", - "reth-provider/test-utils", - "reth-trie/test-utils", + "triehash", + "revm/test-utils", + "reth-trie-common/test-utils", + "reth-chainspec/test-utils", + "reth-primitives/test-utils", + "reth-db/test-utils", + "reth-db-api/test-utils", + "reth-provider/test-utils", + "reth-trie/test-utils", ] scroll = [ - "reth-db/scroll", - "reth-primitives/scroll", - "reth-provider/scroll", - "revm/scroll" + "reth-db/scroll", + "reth-primitives/scroll", + "reth-provider/scroll", + "revm/scroll" ] diff --git a/testing/ef-tests/Cargo.toml b/testing/ef-tests/Cargo.toml index 72d1fb90893f..37b8881f1560 100644 --- a/testing/ef-tests/Cargo.toml +++ b/testing/ef-tests/Cargo.toml @@ -19,7 +19,6 @@ asm-keccak = [ "revm/asm-keccak", ] scroll = [ - "reth-scroll-primitives", "reth-revm/scroll", "reth-primitives/scroll", "reth-provider/scroll", @@ -43,8 +42,6 @@ reth-revm = { workspace = true, features = ["std"] } revm = { workspace = true, features = ["secp256k1", "blst", "c-kzg"] } -reth-scroll-primitives = { workspace = true, optional = true } - alloy-rlp.workspace = true alloy-primitives.workspace = true alloy-eips.workspace = true From f62691f68dec7303a8249d10bc61796e3a5abfb8 Mon Sep 17 00:00:00 2001 From: georgehao Date: Fri, 10 Jan 2025 19:06:37 +0800 Subject: [PATCH 31/86] fix bug --- crates/primitives/src/alloy_compat.rs | 1 - .../consensus/src/transaction/envelope.rs | 2 -- .../consensus/src/transaction/l1_message.rs | 14 -------------- .../scroll/alloy/rpc-types/src/transaction.rs | 18 +++++++++++++++--- crates/scroll/rpc/src/eth/transaction.rs | 3 ++- 5 files changed, 17 insertions(+), 21 deletions(-) diff --git a/crates/primitives/src/alloy_compat.rs b/crates/primitives/src/alloy_compat.rs index 612bc8e1ccf6..d198cea0a01c 100644 --- a/crates/primitives/src/alloy_compat.rs +++ b/crates/primitives/src/alloy_compat.rs @@ -108,7 +108,6 @@ impl TryFrom for TransactionSigned { value: inner.value(), sender: fields.sender, input: inner.input().clone(), - nonce: inner.nonce(), }), scroll_alloy_consensus::TxL1Message::signature(), _hash, diff --git a/crates/scroll/alloy/consensus/src/transaction/envelope.rs b/crates/scroll/alloy/consensus/src/transaction/envelope.rs index 82bd6b491f41..6df9a07d93de 100644 --- a/crates/scroll/alloy/consensus/src/transaction/envelope.rs +++ b/crates/scroll/alloy/consensus/src/transaction/envelope.rs @@ -491,7 +491,6 @@ mod tests { fn test_encode_decode_l1_message() { let tx = TxL1Message { queue_index: 1, - nonce: 1, gas_limit: 2, to: Address::left_padding_from(&[3]), sender: Address::left_padding_from(&[4]), @@ -510,7 +509,6 @@ mod tests { fn test_serde_roundtrip_deposit() { let tx = TxL1Message { queue_index: 11, - nonce: 1, gas_limit: u64::MAX, sender: Address::random(), to: Address::random(), diff --git a/crates/scroll/alloy/consensus/src/transaction/l1_message.rs b/crates/scroll/alloy/consensus/src/transaction/l1_message.rs index 3f35d361da86..8ed82cd87d3b 100644 --- a/crates/scroll/alloy/consensus/src/transaction/l1_message.rs +++ b/crates/scroll/alloy/consensus/src/transaction/l1_message.rs @@ -37,9 +37,6 @@ pub struct TxL1Message { /// The queue index of the message in the L1 contract queue. #[cfg_attr(feature = "serde", serde(with = "alloy_serde::quantity"))] pub queue_index: u64, - /// The nonce for the transaction. - #[cfg_attr(feature = "serde", serde(with = "alloy_serde::quantity"))] - pub nonce: u64, /// The gas limit for the transaction. Gas is paid for when message is sent from the L1. #[cfg_attr(feature = "serde", serde(with = "alloy_serde::quantity", rename = "gas"))] pub gas_limit: u64, @@ -74,7 +71,6 @@ impl TxL1Message { pub fn rlp_decode_fields(buf: &mut &[u8]) -> alloy_rlp::Result { Ok(Self { queue_index: Decodable::decode(buf)?, - nonce: Decodable::decode(buf)?, gas_limit: Decodable::decode(buf)?, to: Decodable::decode(buf)?, value: Decodable::decode(buf)?, @@ -106,7 +102,6 @@ impl TxL1Message { /// Outputs the length of the transaction's fields, without a RLP header. fn rlp_encoded_fields_length(&self) -> usize { self.queue_index.length() + - self.nonce.length() + self.gas_limit.length() + self.to.length() + self.value.length() + @@ -118,7 +113,6 @@ impl TxL1Message { /// fn rlp_encode_fields(&self, out: &mut dyn alloy_rlp::BufMut) { self.queue_index.encode(out); - self.nonce.encode(out); self.gas_limit.encode(out); self.to.encode(out); self.value.encode(out); @@ -162,7 +156,6 @@ impl TxL1Message { #[inline] pub fn size(&self) -> usize { size_of::() + // queue_index - size_of::() + // nonce size_of::() + // gas_limit size_of::
() + // to size_of::() + // value @@ -366,7 +359,6 @@ mod tests { value: U256::default(), sender: Address::default(), input: Bytes::default(), - nonce: 0, }; let mut buffer = BytesMut::new(); original.rlp_encode_fields(&mut buffer); @@ -384,7 +376,6 @@ mod tests { value: U256::default(), sender: Address::default(), input: Bytes::default(), - nonce: 0, }; let mut buffer_with_header = BytesMut::new(); @@ -405,7 +396,6 @@ mod tests { value: U256::default(), sender: Address::default(), input: Bytes::default(), - nonce: 0, }; assert!(tx_deposit.size() > tx_deposit.rlp_encoded_fields_length()); @@ -436,8 +426,6 @@ pub(super) mod serde_bincode_compat { #[serde(default)] queue_index: u64, #[serde(default)] - nonce: u64, - #[serde(default)] gas_limit: u64, to: Address, value: U256, @@ -455,7 +443,6 @@ pub(super) mod serde_bincode_compat { value: value.value, sender: value.sender, input: Cow::Borrowed(&value.input), - nonce: value.nonce, } } } @@ -469,7 +456,6 @@ pub(super) mod serde_bincode_compat { value: value.value, sender: value.sender, input: value.input.into_owned(), - nonce: value.nonce, } } } diff --git a/crates/scroll/alloy/rpc-types/src/transaction.rs b/crates/scroll/alloy/rpc-types/src/transaction.rs index 3860388b2615..0ff782ce7d3f 100644 --- a/crates/scroll/alloy/rpc-types/src/transaction.rs +++ b/crates/scroll/alloy/rpc-types/src/transaction.rs @@ -27,6 +27,10 @@ pub struct Transaction { /// queue index for deposit transactions pub queue_index: Option, + + /// nonce for deposit transactions. + /// why don't put in TxL1Message? if put in TxL1Message, the payload of l1_message is wrong. + pub nonce: Option, } impl Typed2718 for Transaction { @@ -184,6 +188,12 @@ mod tx_serde { with = "alloy_serde::quantity::opt" )] queue_index: Option, + #[serde( + default, + skip_serializing_if = "Option::is_none", + with = "alloy_serde::quantity::opt" + )] + nonce: Option, #[serde(default, skip_serializing_if = "Option::is_none")] sender: Option
, } @@ -216,6 +226,7 @@ mod tx_serde { from, }, queue_index, + nonce, .. } = value; @@ -232,6 +243,7 @@ mod tx_serde { effective_gas_price, queue_index, sender: Some(from), + nonce, }, } } @@ -260,7 +272,7 @@ mod tx_serde { }; let effective_gas_price = other.effective_gas_price.or(inner.gas_price()); - let a = Self { + Ok(Self { inner: alloy_rpc_types_eth::Transaction { inner, block_hash, @@ -271,8 +283,8 @@ mod tx_serde { }, sender: other.sender, queue_index: other.queue_index, - }; - Ok(a) + nonce: other.nonce, + }) } } } diff --git a/crates/scroll/rpc/src/eth/transaction.rs b/crates/scroll/rpc/src/eth/transaction.rs index cd9f8c011742..f372d5f316ef 100644 --- a/crates/scroll/rpc/src/eth/transaction.rs +++ b/crates/scroll/rpc/src/eth/transaction.rs @@ -60,7 +60,6 @@ where reth_primitives::Transaction::L1Message(tx) => { tx_queue_index = Some(tx.queue_index); tx_sender = Some(tx.sender); - ScrollTxEnvelope::L1Message(tx.seal_unchecked(hash)) } }; @@ -81,6 +80,7 @@ where }) .unwrap_or_else(|| inner.max_fee_per_gas()) }; + let nonce = inner.nonce(); Ok(Transaction { inner: alloy_rpc_types_eth::Transaction { @@ -93,6 +93,7 @@ where }, sender: tx_sender, queue_index: tx_queue_index, + nonce: Some(nonce), }) } From 60d16af7807b21820c0cf5911d4217ecd3ccacd5 Mon Sep 17 00:00:00 2001 From: georgehao Date: Fri, 10 Jan 2025 19:32:22 +0800 Subject: [PATCH 32/86] fix udeps issue --- .github/workflows/lint.yml | 3 ++- Makefile | 12 +++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index a84a51e74956..cac20c940143 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -181,7 +181,8 @@ jobs: --exclude op-reth --exclude "example-*" --exclude reth --exclude reth-payload-primitives \ --exclude reth-e2e-test-utils --exclude reth-ethereum-payload-builder --exclude reth-exex-test-utils \ --exclude reth-node-ethereum --exclude reth-scroll-cli --exclude reth-scroll-evm \ - --exclude reth-scroll-node --exclude "scroll-reth*" --exclude reth-scroll-engine + --exclude reth-scroll-node --exclude "scroll-reth*" --exclude reth-scroll-engine --exclude reth-scroll-rpc \ + --exclude reth-scroll-trie book: name: book diff --git a/Makefile b/Makefile index cb4c23b95009..09cd759886b7 100644 --- a/Makefile +++ b/Makefile @@ -411,6 +411,15 @@ lint-all: --all-features \ --locked +lint-udeps: + cargo udeps --workspace --lib --examples --tests --benches --all-features --locked \ + --exclude reth-optimism-cli --exclude reth-optimism-consensus --exclude reth-optimism-payload-builder \ + --exclude reth-optimism-node --exclude reth-optimism-evm --exclude reth-optimism-node --exclude reth-optimism-rpc \ + --exclude op-reth --exclude "example-*" --exclude reth --exclude reth-payload-primitives \ + --exclude reth-e2e-test-utils --exclude reth-ethereum-payload-builder --exclude reth-exex-test-utils \ + --exclude reth-node-ethereum --exclude reth-scroll-cli --exclude reth-scroll-evm \ + --exclude reth-scroll-node --exclude "scroll-reth*" --exclude reth-scroll-engine --exclude reth-scroll-rpc \ + --exclude reth-scroll-trie lint-codespell: ensure-codespell codespell --skip "*.json" @@ -428,7 +437,8 @@ lint: make lint-scroll-reth && \ make lint-other-targets && \ make lint-codespell && \ - make lint-all + make lint-all && \ + make lint-udeps fix-lint-reth: cargo +nightly clippy \ From e94ea17b2b03a2c9510a42778b5338434f852d07 Mon Sep 17 00:00:00 2001 From: georgehao Date: Mon, 13 Jan 2025 15:25:36 +0800 Subject: [PATCH 33/86] sync scroll --- .gitignore | 1 + Cargo.lock | 2 + Cargo.toml | 1 + crates/rpc/rpc/src/eth/helpers/block.rs | 1 + crates/scroll/node/Cargo.toml | 27 +++--- crates/scroll/node/src/addons.rs | 121 +++++++++++++++++++++--- crates/scroll/node/src/lib.rs | 7 +- crates/scroll/rpc/src/eth/block.rs | 1 + crates/scroll/rpc/src/eth/mod.rs | 10 +- 9 files changed, 141 insertions(+), 30 deletions(-) diff --git a/.gitignore b/.gitignore index 424bdd938e08..8e105aa01331 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ # will have compiled files and executables ./debug/ target/ +datadir/ # These are backup files generated by rustfmt **/*.rs.bk diff --git a/Cargo.lock b/Cargo.lock index 9c360ec522af..ef7161a15c93 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9436,9 +9436,11 @@ dependencies = [ "reth-primitives-traits", "reth-provider", "reth-rpc", + "reth-rpc-server-types", "reth-scroll-chainspec", "reth-scroll-engine", "reth-scroll-evm", + "reth-scroll-rpc", "reth-tracing", "reth-transaction-pool", "reth-trie-db", diff --git a/Cargo.toml b/Cargo.toml index b61dda208260..418e6d3ac4b1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -503,6 +503,7 @@ reth-scroll-forks = { path = "crates/scroll/hardforks" } reth-scroll-node = { path = "crates/scroll/node" } reth-scroll-trie = { path = "crates/scroll/trie" } reth-scroll-revm = { path = "crates/scroll/revm" } +reth-scroll-rpc = { path = "crates/scroll/rpc" } # TODO (scroll): point to crates.io/tag once the crate is published/a tag is created. poseidon-bn254 = { git = "https://github.com/scroll-tech/poseidon-bn254", rev = "526a64a", features = ["bn254"] } diff --git a/crates/rpc/rpc/src/eth/helpers/block.rs b/crates/rpc/rpc/src/eth/helpers/block.rs index 51a76f4e98fe..e068d1b84ddf 100644 --- a/crates/rpc/rpc/src/eth/helpers/block.rs +++ b/crates/rpc/rpc/src/eth/helpers/block.rs @@ -32,6 +32,7 @@ where where Self: LoadReceipt, { + println!("hhf: eth_block_receipts"); if let Some((block, receipts)) = self.load_block_and_receipts(block_id).await? { let block_number = block.number(); let base_fee = block.base_fee_per_gas(); diff --git a/crates/scroll/node/Cargo.toml b/crates/scroll/node/Cargo.toml index 0c6bee6a2183..16c68fb5cba9 100644 --- a/crates/scroll/node/Cargo.toml +++ b/crates/scroll/node/Cargo.toml @@ -30,6 +30,7 @@ reth-rpc.workspace = true reth-tracing.workspace = true reth-transaction-pool.workspace = true reth-trie-db.workspace = true +reth-rpc-server-types.workspace = true # alloy alloy-rpc-types-engine.workspace = true @@ -38,6 +39,7 @@ alloy-rpc-types-engine.workspace = true reth-scroll-chainspec.workspace = true reth-scroll-engine.workspace = true reth-scroll-evm.workspace = true +reth-scroll-rpc.workspace = true # alloy alloy-primitives.workspace = true @@ -47,19 +49,20 @@ eyre.workspace = true [features] optimism = [ - "reth-db/optimism", - "reth-primitives/optimism", - "reth-provider/optimism", - "reth-scroll-evm/optimism", - "reth-scroll-engine/optimism" + "reth-db/optimism", + "reth-primitives/optimism", + "reth-provider/optimism", + "reth-scroll-evm/optimism", + "reth-scroll-engine/optimism" ] scroll = [ - "reth-db/scroll", - "reth-node-builder/scroll", - "reth-primitives/scroll", - "reth-provider/scroll", - "reth-evm/scroll", - "reth-scroll-evm/scroll", - "reth-scroll-engine/scroll" + "reth-db/scroll", + "reth-node-builder/scroll", + "reth-primitives/scroll", + "reth-provider/scroll", + "reth-evm/scroll", + "reth-scroll-evm/scroll", + "reth-scroll-engine/scroll", + "reth-scroll-rpc/scroll", ] skip-state-root-validation = [] \ No newline at end of file diff --git a/crates/scroll/node/src/addons.rs b/crates/scroll/node/src/addons.rs index 588c901ae5dd..9eff6841f151 100644 --- a/crates/scroll/node/src/addons.rs +++ b/crates/scroll/node/src/addons.rs @@ -1,16 +1,115 @@ -use crate::ScrollEngineValidatorBuilder; +use crate::{ScrollEngineValidator, ScrollEngineValidatorBuilder, ScrollStorage}; +use reth_ethereum_engine_primitives::EthEngineTypes; use reth_network::NetworkHandle; -use reth_node_builder::{rpc::RpcAddOns, FullNodeComponents, FullNodeTypes}; +use reth_node_api::{AddOnsContext, NodeAddOns}; +use reth_node_builder::{ + rpc::{EngineValidatorAddOn, RethRpcAddOns, RpcAddOns, RpcHandle}, + FullNodeComponents, FullNodeTypes, +}; +use reth_node_types::{NodeTypes, NodeTypesWithEngine}; +use reth_primitives::EthPrimitives; use reth_rpc::EthApi; +use reth_rpc_server_types::RethRpcModule; +use reth_scroll_chainspec::ScrollChainSpec; +use reth_scroll_rpc::ScrollEthApi; +use reth_tracing::tracing::debug; /// Add-ons for the Scroll follower node. -pub type ScrollAddOns = RpcAddOns< - N, - EthApi< - ::Provider, - ::Pool, - NetworkHandle, - ::Evm, +#[derive(Debug)] +pub struct ScrollAddOns { + /// Rpc add-ons responsible for launching the RPC servers and instantiating the RPC handlers + /// and eth-api. + pub rpc_add_ons: RpcAddOns, ScrollEngineValidatorBuilder>, +} + +impl>> Default + for ScrollAddOns +{ + fn default() -> Self { + Self::builder().build() + } +} + +impl>> ScrollAddOns { + /// Build a [`ScrollAddOns`] using [`ScrollAddOnsBuilder`]. + pub fn builder() -> ScrollAddOnsBuilder { + ScrollAddOnsBuilder::default() + } +} + +impl NodeAddOns for ScrollAddOns +where + N: FullNodeComponents< + Types: NodeTypesWithEngine< + ChainSpec = ScrollChainSpec, + Primitives = EthPrimitives, + Storage = ScrollStorage, + Engine = EthEngineTypes, + >, + >, +{ + type Handle = RpcHandle>; + + async fn launch_add_ons( + self, + ctx: reth_node_api::AddOnsContext<'_, N>, + ) -> eyre::Result { + let Self { rpc_add_ons } = self; + rpc_add_ons.launch_add_ons_with(ctx, |modules, _auth_modules| Ok(())).await + } +} + +impl RethRpcAddOns for ScrollAddOns +where + N: FullNodeComponents< + Types: NodeTypesWithEngine< + ChainSpec = ScrollChainSpec, + Primitives = EthPrimitives, + Storage = ScrollStorage, + Engine = EthEngineTypes, + >, >, - ScrollEngineValidatorBuilder, ->; +{ + type EthApi = ScrollEthApi; + + fn hooks_mut(&mut self) -> &mut reth_node_builder::rpc::RpcHooks { + self.rpc_add_ons.hooks_mut() + } +} + +impl EngineValidatorAddOn for ScrollAddOns +where + N: FullNodeComponents< + Types: NodeTypesWithEngine< + ChainSpec = ScrollChainSpec, + Primitives = EthPrimitives, + Engine = EthEngineTypes, + >, + >, +{ + type Validator = ScrollEngineValidator; + + async fn engine_validator(&self, ctx: &AddOnsContext<'_, N>) -> eyre::Result { + ScrollEngineValidatorBuilder::default().build(ctx).await + } +} + +/// A regular scroll evm and executor builder. +#[derive(Debug, Default, Clone)] +#[non_exhaustive] +pub struct ScrollAddOnsBuilder {} + +impl ScrollAddOnsBuilder { + /// Builds an instance of [`ScrollAddOns`]. + pub fn build(self) -> ScrollAddOns + where + N: FullNodeComponents>, + { + ScrollAddOns { + rpc_add_ons: RpcAddOns::new( + move |ctx| ScrollEthApi::::new(ctx, Default::default()), + Default::default(), + ), + } + } +} diff --git a/crates/scroll/node/src/lib.rs b/crates/scroll/node/src/lib.rs index 0894d68b12ae..5f00a278d63f 100644 --- a/crates/scroll/node/src/lib.rs +++ b/crates/scroll/node/src/lib.rs @@ -3,8 +3,11 @@ mod builder; pub use builder::{ - consensus::ScrollConsensusBuilder, engine::ScrollEngineValidatorBuilder, - execution::ScrollExecutorBuilder, network::ScrollNetworkBuilder, payload::ScrollPayloadBuilder, + consensus::ScrollConsensusBuilder, + engine::{ScrollEngineValidator, ScrollEngineValidatorBuilder}, + execution::ScrollExecutorBuilder, + network::ScrollNetworkBuilder, + payload::ScrollPayloadBuilder, pool::ScrollPoolBuilder, }; diff --git a/crates/scroll/rpc/src/eth/block.rs b/crates/scroll/rpc/src/eth/block.rs index d47c8b0c2ef4..3eb2478821a5 100644 --- a/crates/scroll/rpc/src/eth/block.rs +++ b/crates/scroll/rpc/src/eth/block.rs @@ -35,6 +35,7 @@ where where Self: LoadReceipt, { + println!("hhhffffffffff"); if let Some((block, receipts)) = self.load_block_and_receipts(block_id).await? { let block_number = block.number(); let base_fee = block.base_fee_per_gas(); diff --git a/crates/scroll/rpc/src/eth/mod.rs b/crates/scroll/rpc/src/eth/mod.rs index 2b9ef0afde53..3a7de4130ac1 100644 --- a/crates/scroll/rpc/src/eth/mod.rs +++ b/crates/scroll/rpc/src/eth/mod.rs @@ -70,12 +70,12 @@ impl ScrollEthApi where N: ScrollNodeCore< Provider: BlockReaderIdExt< - Block = <::Primitives as NodePrimitives>::Block, - Receipt = <::Primitives as NodePrimitives>::Receipt, + Block=<::Primitives as NodePrimitives>::Block, + Receipt=<::Primitives as NodePrimitives>::Receipt, > + ChainSpecProvider - + CanonStateSubscriptions - + Clone - + 'static, + + CanonStateSubscriptions + + Clone + + 'static, >, { /// Creates a new instance for given context. From 0016be2fe6231ff081fa9fa76f02831d01cdfce8 Mon Sep 17 00:00:00 2001 From: georgehao Date: Mon, 13 Jan 2025 17:46:39 +0800 Subject: [PATCH 34/86] submit some fix --- crates/scroll/rpc/src/eth/mod.rs | 96 +++++++++++++++------- crates/scroll/rpc/src/eth/pending_block.rs | 5 +- crates/scroll/rpc/src/eth/transaction.rs | 41 +++++++-- 3 files changed, 107 insertions(+), 35 deletions(-) diff --git a/crates/scroll/rpc/src/eth/mod.rs b/crates/scroll/rpc/src/eth/mod.rs index 3a7de4130ac1..8faaf707df37 100644 --- a/crates/scroll/rpc/src/eth/mod.rs +++ b/crates/scroll/rpc/src/eth/mod.rs @@ -8,6 +8,7 @@ use reth_evm::ConfigureEvm; use reth_network_api::NetworkInfo; use reth_node_api::NodePrimitives; use reth_node_builder::EthApiBuilderCtx; +use reth_primitives::EthPrimitives; use reth_provider::{ BlockNumReader, BlockReader, BlockReaderIdExt, CanonStateSubscriptions, ChainSpecProvider, NodePrimitivesProvider, ProviderBlock, ProviderHeader, ProviderReceipt, ProviderTx, @@ -69,37 +70,21 @@ pub struct ScrollEthApi { impl ScrollEthApi where N: ScrollNodeCore< - Provider: BlockReaderIdExt< - Block=<::Primitives as NodePrimitives>::Block, - Receipt=<::Primitives as NodePrimitives>::Receipt, - > + ChainSpecProvider - + CanonStateSubscriptions - + Clone - + 'static, + Provider: BlockReaderIdExt + + ChainSpecProvider + + CanonStateSubscriptions + + Clone + + 'static, >, { - /// Creates a new instance for given context. - pub fn new(ctx: &EthApiBuilderCtx) -> Self { - let blocking_task_pool = - BlockingTaskPool::build().expect("failed to build blocking task pool"); - - let inner = EthApiInner::new( - ctx.provider.clone(), - ctx.pool.clone(), - ctx.network.clone(), - ctx.cache.clone(), - ctx.new_gas_price_oracle(), - ctx.config.rpc_gas_cap, - ctx.config.rpc_max_simulate_blocks, - ctx.config.eth_proof_window, - blocking_task_pool, - ctx.new_fee_history_cache(), - ctx.evm_config.clone(), - ctx.executor.clone(), - ctx.config.proof_permits, - ); + /// Returns a reference to the [`EthApiNodeBackend`]. + pub fn eth_api(&self) -> &EthApiNodeBackend { + self.inner.eth_api() + } - Self { inner: Arc::new(ScrollEthApiInner { eth_api: inner }) } + /// Build a [`ScrollEthApi`] using [`ScrollEthApiBuildlmn9 ,ner`]. + pub const fn builder() -> ScrollEthApiBuilder { + ScrollEthApiBuilder::new() } } @@ -286,3 +271,58 @@ struct ScrollEthApiInner { /// Gateway to node's core components. eth_api: EthApiNodeBackend, } + +impl ScrollEthApiInner { + /// Returns a reference to the [`EthApiNodeBackend`]. + const fn eth_api(&self) -> &EthApiNodeBackend { + &self.eth_api + } +} + +/// A type that knows how to build a [`ScrollEthApi`]. +#[derive(Debug, Default)] +pub struct ScrollEthApiBuilder {} + +impl ScrollEthApiBuilder { + /// Creates a [`ScrollEthApiBuilder`] instance from [`EthApiBuilderCtx`]. + pub const fn new() -> Self { + Self {} + } +} + +impl ScrollEthApiBuilder { + /// Builds an instance of [`ScrollEthApi`] + pub fn build(self, ctx: &EthApiBuilderCtx) -> ScrollEthApi + where + N: ScrollNodeCore< + Provider: BlockReaderIdExt< + Block = <::Primitives as NodePrimitives>::Block, + Receipt = <::Primitives as NodePrimitives>::Receipt, + > + ChainSpecProvider + + CanonStateSubscriptions + + Clone + + 'static, + >, + { + let blocking_task_pool = + BlockingTaskPool::build().expect("failed to build blocking task pool"); + + let inner = EthApiInner::new( + ctx.provider.clone(), + ctx.pool.clone(), + ctx.network.clone(), + ctx.cache.clone(), + ctx.new_gas_price_oracle(), + ctx.config.rpc_gas_cap, + ctx.config.rpc_max_simulate_blocks, + ctx.config.eth_proof_window, + blocking_task_pool, + ctx.new_fee_history_cache(), + ctx.evm_config.clone(), + ctx.executor.clone(), + ctx.config.proof_permits, + ); + + ScrollEthApi { inner: Arc::new(ScrollEthApiInner { eth_api: inner }) } + } +} diff --git a/crates/scroll/rpc/src/eth/pending_block.rs b/crates/scroll/rpc/src/eth/pending_block.rs index 53694ede5ab9..e590b75e1eb9 100644 --- a/crates/scroll/rpc/src/eth/pending_block.rs +++ b/crates/scroll/rpc/src/eth/pending_block.rs @@ -42,7 +42,10 @@ where > + ChainSpecProvider + StateProviderFactory, Pool: TransactionPool>>, - Evm: ConfigureEvm
, + Evm: ConfigureEvm< + Header = ProviderHeader, + Transaction = ProviderTx, + >, >, { #[inline] diff --git a/crates/scroll/rpc/src/eth/transaction.rs b/crates/scroll/rpc/src/eth/transaction.rs index f372d5f316ef..491711689340 100644 --- a/crates/scroll/rpc/src/eth/transaction.rs +++ b/crates/scroll/rpc/src/eth/transaction.rs @@ -1,23 +1,52 @@ //! Loads and formats Scroll transaction RPC response. use alloy_consensus::{Signed, Transaction as _}; -use alloy_primitives::{PrimitiveSignature as Signature, Sealable, Sealed}; +use alloy_primitives::{Bytes, PrimitiveSignature as Signature, Sealable, Sealed, B256}; use alloy_rpc_types_eth::TransactionInfo; use reth_node_api::FullNodeComponents; use reth_primitives::{RecoveredTx, TransactionSigned}; -use reth_provider::{ReceiptProvider, TransactionsProvider}; +use reth_provider::{ + BlockReader, BlockReaderIdExt, ProviderTx, ReceiptProvider, TransactionsProvider, +}; use reth_rpc_eth_api::{ - helpers::{LoadTransaction, SpawnBlocking}, - FullEthApiTypes, RpcNodeCoreExt, TransactionCompat, + helpers::{EthSigner, EthTransactions, LoadTransaction, SpawnBlocking}, + FromEthApiError, FullEthApiTypes, RpcNodeCore, RpcNodeCoreExt, TransactionCompat, }; -use reth_rpc_eth_types::EthApiError; -use reth_transaction_pool::TransactionPool; +use reth_rpc_eth_types::{utils::recover_raw_transaction, EthApiError}; +use reth_transaction_pool::{PoolTransaction, TransactionOrigin, TransactionPool}; use scroll_alloy_consensus::ScrollTxEnvelope; use scroll_alloy_rpc_types::Transaction; use crate::{eth::ScrollNodeCore, ScrollEthApi, ScrollEthApiError}; +impl EthTransactions for ScrollEthApi +where + Self: LoadTransaction, + N: ScrollNodeCore>>, +{ + fn signers(&self) -> &parking_lot::RwLock>>>> { + self.inner.eth_api.signers() + } + + /// Decodes and recovers the transaction and submits it to the pool. + /// + /// Returns the hash of the transaction. + async fn send_raw_transaction(&self, tx: Bytes) -> Result { + let recovered = recover_raw_transaction(&tx)?; + let pool_transaction = ::Transaction::from_pooled(recovered); + + // submit the transaction to the pool with a `Local` origin + let hash = self + .pool() + .add_transaction(TransactionOrigin::Local, pool_transaction) + .await + .map_err(Self::Error::from_eth_err)?; + + Ok(hash) + } +} + impl LoadTransaction for ScrollEthApi where Self: SpawnBlocking + FullEthApiTypes + RpcNodeCoreExt, From 95ab5bb556b1649591714075934a3bdedd115b11 Mon Sep 17 00:00:00 2001 From: georgehao Date: Mon, 13 Jan 2025 18:07:39 +0800 Subject: [PATCH 35/86] fix addons builder --- crates/scroll/node/src/addons.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/scroll/node/src/addons.rs b/crates/scroll/node/src/addons.rs index 9eff6841f151..bf4a96a20412 100644 --- a/crates/scroll/node/src/addons.rs +++ b/crates/scroll/node/src/addons.rs @@ -107,7 +107,7 @@ impl ScrollAddOnsBuilder { { ScrollAddOns { rpc_add_ons: RpcAddOns::new( - move |ctx| ScrollEthApi::::new(ctx, Default::default()), + move |ctx| ScrollEthApi::::builder().build(ctx), Default::default(), ), } From 0ce080332a3973f2cdcb34a0ae351be239d441ae Mon Sep 17 00:00:00 2001 From: georgehao Date: Tue, 14 Jan 2025 23:03:33 +0800 Subject: [PATCH 36/86] fix api error --- crates/rpc/rpc/src/eth/helpers/block.rs | 1 - crates/scroll/alloy/network/src/lib.rs | 2 +- crates/scroll/node/src/addons.rs | 14 ++++++-------- crates/scroll/rpc/src/eth/block.rs | 15 ++++++--------- crates/scroll/rpc/src/eth/mod.rs | 1 + crates/scroll/rpc/src/eth/pending_block.rs | 4 +--- crates/scroll/rpc/src/lib.rs | 2 +- 7 files changed, 16 insertions(+), 23 deletions(-) diff --git a/crates/rpc/rpc/src/eth/helpers/block.rs b/crates/rpc/rpc/src/eth/helpers/block.rs index e068d1b84ddf..51a76f4e98fe 100644 --- a/crates/rpc/rpc/src/eth/helpers/block.rs +++ b/crates/rpc/rpc/src/eth/helpers/block.rs @@ -32,7 +32,6 @@ where where Self: LoadReceipt, { - println!("hhf: eth_block_receipts"); if let Some((block, receipts)) = self.load_block_and_receipts(block_id).await? { let block_number = block.number(); let base_fee = block.base_fee_per_gas(); diff --git a/crates/scroll/alloy/network/src/lib.rs b/crates/scroll/alloy/network/src/lib.rs index dca12c5bc4f6..43407fc6b460 100644 --- a/crates/scroll/alloy/network/src/lib.rs +++ b/crates/scroll/alloy/network/src/lib.rs @@ -9,7 +9,7 @@ use alloy_rpc_types_eth::AccessList; use scroll_alloy_consensus::{self, ScrollTxEnvelope, ScrollTxType, ScrollTypedTransaction}; use scroll_alloy_rpc_types::ScrollTransactionRequest; -/// Types for an Op-stack network. +/// Types for an Scroll-stack network. #[derive(Clone, Copy, Debug)] pub struct Scroll { _private: (), diff --git a/crates/scroll/node/src/addons.rs b/crates/scroll/node/src/addons.rs index bf4a96a20412..41d4a38c8147 100644 --- a/crates/scroll/node/src/addons.rs +++ b/crates/scroll/node/src/addons.rs @@ -1,18 +1,16 @@ -use crate::{ScrollEngineValidator, ScrollEngineValidatorBuilder, ScrollStorage}; use reth_ethereum_engine_primitives::EthEngineTypes; -use reth_network::NetworkHandle; use reth_node_api::{AddOnsContext, NodeAddOns}; use reth_node_builder::{ - rpc::{EngineValidatorAddOn, RethRpcAddOns, RpcAddOns, RpcHandle}, - FullNodeComponents, FullNodeTypes, + rpc::{EngineValidatorAddOn, EngineValidatorBuilder, RethRpcAddOns, RpcAddOns, RpcHandle}, + FullNodeComponents, }; use reth_node_types::{NodeTypes, NodeTypesWithEngine}; use reth_primitives::EthPrimitives; -use reth_rpc::EthApi; -use reth_rpc_server_types::RethRpcModule; + use reth_scroll_chainspec::ScrollChainSpec; use reth_scroll_rpc::ScrollEthApi; -use reth_tracing::tracing::debug; + +use crate::{ScrollEngineValidator, ScrollEngineValidatorBuilder, ScrollStorage}; /// Add-ons for the Scroll follower node. #[derive(Debug)] @@ -55,7 +53,7 @@ where ctx: reth_node_api::AddOnsContext<'_, N>, ) -> eyre::Result { let Self { rpc_add_ons } = self; - rpc_add_ons.launch_add_ons_with(ctx, |modules, _auth_modules| Ok(())).await + rpc_add_ons.launch_add_ons_with(ctx, |_, _| Ok(())).await } } diff --git a/crates/scroll/rpc/src/eth/block.rs b/crates/scroll/rpc/src/eth/block.rs index 3eb2478821a5..1c3848e7d3e4 100644 --- a/crates/scroll/rpc/src/eth/block.rs +++ b/crates/scroll/rpc/src/eth/block.rs @@ -1,7 +1,7 @@ //! Loads and formats Scroll block RPC response. use alloy_consensus::BlockHeader; -use alloy_rpc_types_eth::{BlockId, TransactionReceipt}; +use alloy_rpc_types_eth::BlockId; use reth_chainspec::ChainSpecProvider; use reth_node_api::BlockBody; use reth_primitives::{Receipt, TransactionMeta, TransactionSigned}; @@ -10,20 +10,18 @@ use reth_rpc_eth_api::{ helpers::{EthBlocks, LoadBlock, LoadPendingBlock, LoadReceipt, SpawnBlocking}, RpcReceipt, }; -use reth_rpc_eth_types::{EthApiError, EthReceiptBuilder}; use scroll_alloy_network::Network; use reth_scroll_chainspec::ScrollChainSpec; -// use scroll_alloy_rpc_types::ScrollTransactionReceipt; +use scroll_alloy_rpc_types::ScrollTransactionReceipt; -// use crate::{eth::ScrollNodeCore, ScrollEthApi, ScrollEthApiError}; -use crate::{eth::ScrollNodeCore, ScrollEthApi}; +use crate::{eth::ScrollNodeCore, ScrollEthApi, ScrollEthApiError, ScrollReceiptBuilder}; impl EthBlocks for ScrollEthApi where Self: LoadBlock< - Error = EthApiError, - NetworkTypes: Network, + Error = ScrollEthApiError, + NetworkTypes: Network, Provider: BlockReader, >, N: ScrollNodeCore + HeaderProvider>, @@ -35,7 +33,6 @@ where where Self: LoadReceipt, { - println!("hhhffffffffff"); if let Some((block, receipts)) = self.load_block_and_receipts(block_id).await? { let block_number = block.number(); let base_fee = block.base_fee_per_gas(); @@ -59,7 +56,7 @@ where excess_blob_gas, timestamp, }; - EthReceiptBuilder::new(tx, meta, receipt, &receipts) + ScrollReceiptBuilder::new(tx, meta, receipt, &receipts) .map(|builder| builder.build()) }) .collect::, Self::Error>>() diff --git a/crates/scroll/rpc/src/eth/mod.rs b/crates/scroll/rpc/src/eth/mod.rs index 8faaf707df37..8e298efbe4c3 100644 --- a/crates/scroll/rpc/src/eth/mod.rs +++ b/crates/scroll/rpc/src/eth/mod.rs @@ -29,6 +29,7 @@ use reth_tasks::{ }; use reth_transaction_pool::TransactionPool; +pub use receipt::ScrollReceiptBuilder; use scroll_alloy_network::Scroll; use crate::ScrollEthApiError; diff --git a/crates/scroll/rpc/src/eth/pending_block.rs b/crates/scroll/rpc/src/eth/pending_block.rs index e590b75e1eb9..1445775b8fda 100644 --- a/crates/scroll/rpc/src/eth/pending_block.rs +++ b/crates/scroll/rpc/src/eth/pending_block.rs @@ -7,9 +7,7 @@ use alloy_eips::{eip7685::EMPTY_REQUESTS_HASH, merge::BEACON_NONCE}; use alloy_primitives::{logs_bloom, B256, U256}; use reth_chainspec::{EthChainSpec, EthereumHardforks}; use reth_evm::ConfigureEvm; -use reth_primitives::{ - proofs::calculate_receipt_root_no_memo, BlockBody, Receipt, TransactionSigned, -}; +use reth_primitives::{proofs::calculate_receipt_root_no_memo, BlockBody, Receipt}; use reth_provider::{ BlockReaderIdExt, ChainSpecProvider, ProviderBlock, ProviderHeader, ProviderReceipt, ProviderTx, StateProviderFactory, diff --git a/crates/scroll/rpc/src/lib.rs b/crates/scroll/rpc/src/lib.rs index 6b953302572f..7dcd20f4a3f2 100644 --- a/crates/scroll/rpc/src/lib.rs +++ b/crates/scroll/rpc/src/lib.rs @@ -15,4 +15,4 @@ pub mod error; pub mod eth; pub use error::{ScrollEthApiError, ScrollInvalidTransactionError, SequencerClientError}; -pub use eth::ScrollEthApi; +pub use eth::{ScrollEthApi, ScrollReceiptBuilder}; From 521f57cd22d084515fda3487e8393447f6781106 Mon Sep 17 00:00:00 2001 From: georgehao Date: Tue, 14 Jan 2025 23:13:52 +0800 Subject: [PATCH 37/86] fix lint --- crates/scroll/node/src/addons.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/scroll/node/src/addons.rs b/crates/scroll/node/src/addons.rs index 41d4a38c8147..711f86c869c7 100644 --- a/crates/scroll/node/src/addons.rs +++ b/crates/scroll/node/src/addons.rs @@ -88,7 +88,7 @@ where type Validator = ScrollEngineValidator; async fn engine_validator(&self, ctx: &AddOnsContext<'_, N>) -> eyre::Result { - ScrollEngineValidatorBuilder::default().build(ctx).await + ScrollEngineValidatorBuilder.build(ctx).await } } From 25b22e3ac7719e239ea0fbace7968cf9dda6d87c Mon Sep 17 00:00:00 2001 From: georgehao Date: Tue, 14 Jan 2025 23:52:50 +0800 Subject: [PATCH 38/86] fix lint --- Cargo.lock | 62 +++++++++--------------- crates/scroll/alloy/rpc-types/Cargo.toml | 18 +++---- crates/scroll/rpc/src/eth/block.rs | 2 +- crates/scroll/rpc/src/eth/transaction.rs | 4 +- 4 files changed, 36 insertions(+), 50 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3b1831978e96..707b8491e897 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -913,12 +913,11 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "3.0.7" +version = "3.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e" +checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" dependencies = [ "anstyle", - "once_cell", "windows-sys 0.59.0", ] @@ -1216,9 +1215,9 @@ dependencies = [ [[package]] name = "auto_impl" -version = "1.2.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e12882f59de5360c748c4cbf569a042d5fb0eb515f7bea9c1f470b47f6ffbd73" +checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", @@ -4840,9 +4839,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.25" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "loom" @@ -4881,23 +4880,11 @@ dependencies = [ "libc", ] -[[package]] -name = "maili-common" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "717a6707a37a427e38da9cb904c1691f3ecb6538342cd9a64f8f35b8c916a367" -dependencies = [ - "alloy-consensus", - "alloy-primitives", - "derive_more", - "serde", -] - [[package]] name = "maili-protocol" -version = "0.1.4" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "504fe1e74601310727f50d56121195e2636af8247d50ed13b5a145819c5cd1c8" +checksum = "428caa534dd054a449e64d8007d0fd0a15519d1033b272d37d02b74a29cf69f7" dependencies = [ "alloc-no-stdlib", "alloy-consensus", @@ -5072,9 +5059,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.8.3" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8402cab7aefae129c6977bb0ff1b8fd9a04eb5b51efc50a70bea51cda0c7924" +checksum = "4ffbe83022cedc1d264172192511ae958937694cd57ce297164951b8b3568394" dependencies = [ "adler2", ] @@ -5420,9 +5407,9 @@ checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9" [[package]] name = "op-alloy-consensus" -version = "0.9.3" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3c085fd93da29d79649876280e8d926ae6aa7ff5a5df7a1bd17659862822194" +checksum = "442518bf0ef88f4d79409527565b8cdee235c891f2e2a829497caec5ed9d8d1c" dependencies = [ "alloy-consensus", "alloy-eips", @@ -5431,7 +5418,6 @@ dependencies = [ "alloy-serde", "arbitrary", "derive_more", - "maili-common", "serde", "serde_with", "thiserror 2.0.11", @@ -5454,9 +5440,9 @@ dependencies = [ [[package]] name = "op-alloy-network" -version = "0.9.3" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0cccb2bcc8ff92e9e85b70ad2b5cc7f65ae57a2fb839c0b59fdab6f29ea1d6c" +checksum = "d9e7e9fc656dfa8cc3b6e799da23e100b3d47e31ec6b5a4ed9d44e11f0967ad8" dependencies = [ "alloy-consensus", "alloy-network", @@ -5492,9 +5478,9 @@ dependencies = [ [[package]] name = "op-alloy-rpc-types" -version = "0.9.3" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b700b5d4efbe6433abb13e52f18a5f9ffe8d8fe9aeef99912bc90ffe0d7ebc" +checksum = "50223d61cad040db6721bcc2d489c924c1691ce3f5e674d4d8776131dab786a0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -6307,9 +6293,9 @@ dependencies = [ [[package]] name = "raw-cpuid" -version = "11.3.0" +version = "11.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6928fa44c097620b706542d428957635951bade7143269085389d42c8a4927e" +checksum = "1ab240315c661615f2ee9f0f2cd32d5a7343a84d5ebcccb99d46e6637565e7b0" dependencies = [ "bitflags 2.7.0", ] @@ -10901,9 +10887,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "symbolic-common" -version = "12.13.2" +version = "12.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8150eae9699e3c73a3e6431dc1f80d87748797c0457336af23e94c1de619ed24" +checksum = "bf08b42a6f9469bd8584daee39a1352c8133ccabc5151ccccb15896ef047d99a" dependencies = [ "debugid", "memmap2", @@ -10913,9 +10899,9 @@ dependencies = [ [[package]] name = "symbolic-demangle" -version = "12.13.2" +version = "12.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95f4a9846f7a8933b6d198c022faa2c9bd89e1a970bed9d9a98d25708bf8de17" +checksum = "32f73b5a5bd4da72720c45756a2d11edf110116b87f998bda59b97be8c2c7cf1" dependencies = [ "cpp_demangle", "rustc-demangle", @@ -11763,9 +11749,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.12.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "744018581f9a3454a9e15beb8a33b017183f1e7c0cd170232a2d1453b23a51c4" +checksum = "b913a3b5fe84142e269d63cc62b64319ccaf89b748fc31fe025177f767a756c4" dependencies = [ "getrandom 0.2.15", ] diff --git a/crates/scroll/alloy/rpc-types/Cargo.toml b/crates/scroll/alloy/rpc-types/Cargo.toml index 553355f9bc80..9980f92a6f77 100644 --- a/crates/scroll/alloy/rpc-types/Cargo.toml +++ b/crates/scroll/alloy/rpc-types/Cargo.toml @@ -16,16 +16,16 @@ workspace = true features = ["serde"] [dependencies.alloy-consensus] -version = "0.9.0" +version = "0.9.2" default-features = false [dependencies.alloy-eips] -version = "0.9.0" +version = "0.9.2" features = ["serde"] default-features = false [dependencies.alloy-network-primitives] -version = "0.9.0" +version = "0.9.2" default-features = false [dependencies.alloy-primitives] @@ -38,16 +38,16 @@ features = [ default-features = false [dependencies.alloy-rpc-types-eth] -version = "0.9.0" +version = "0.9.2" features = ["serde"] default-features = false [dependencies.alloy-serde] -version = "0.9.0" +version = "0.9.2" default-features = false [dependencies.arbitrary] -version = "1.3" +version = "1.4" features = [ "derive", "derive", @@ -73,7 +73,7 @@ features = ["alloc"] default-features = false [dev-dependencies.alloy-consensus] -version = "0.9.0" +version = "0.9.2" features = ["arbitrary"] default-features = false @@ -83,12 +83,12 @@ features = ["arbitrary"] default-features = false [dev-dependencies.alloy-rpc-types-eth] -version = "0.9.0" +version = "0.9.2" features = ["arbitrary"] default-features = false [dev-dependencies.arbitrary] -version = "1.3" +version = "1.4" features = [ "derive", "derive", diff --git a/crates/scroll/rpc/src/eth/block.rs b/crates/scroll/rpc/src/eth/block.rs index 1c3848e7d3e4..c05a01e1edbc 100644 --- a/crates/scroll/rpc/src/eth/block.rs +++ b/crates/scroll/rpc/src/eth/block.rs @@ -41,7 +41,7 @@ where let timestamp = block.timestamp(); return block - .body + .body() .transactions() .iter() .zip(receipts.iter()) diff --git a/crates/scroll/rpc/src/eth/transaction.rs b/crates/scroll/rpc/src/eth/transaction.rs index 491711689340..301002e9cb06 100644 --- a/crates/scroll/rpc/src/eth/transaction.rs +++ b/crates/scroll/rpc/src/eth/transaction.rs @@ -64,12 +64,12 @@ where fn fill( &self, - tx: RecoveredTx, + tx: RecoveredTx, tx_info: TransactionInfo, ) -> Result { let from = tx.signer(); let hash = tx.hash(); - let TransactionSigned { transaction, signature, .. } = tx.into_signed(); + let TransactionSigned { transaction, signature, .. } = tx.into_tx(); let mut tx_sender = None; let mut tx_queue_index = None; From 58c2b50616812f89424022b5c9667a6d10ad0c09 Mon Sep 17 00:00:00 2001 From: georgehao Date: Tue, 14 Jan 2025 23:58:11 +0800 Subject: [PATCH 39/86] fix Zepter --- crates/scroll/node/Cargo.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/scroll/node/Cargo.toml b/crates/scroll/node/Cargo.toml index 16c68fb5cba9..77eea4eaa728 100644 --- a/crates/scroll/node/Cargo.toml +++ b/crates/scroll/node/Cargo.toml @@ -53,7 +53,8 @@ optimism = [ "reth-primitives/optimism", "reth-provider/optimism", "reth-scroll-evm/optimism", - "reth-scroll-engine/optimism" + "reth-scroll-engine/optimism", + "reth-scroll-rpc/optimism", ] scroll = [ "reth-db/scroll", From 5d1ccdff4b2ddae3ec496519dbc1e045f78c7f02 Mon Sep 17 00:00:00 2001 From: georgehao Date: Wed, 15 Jan 2025 16:20:10 +0800 Subject: [PATCH 40/86] fix lint --- Cargo.lock | 1 + crates/primitives/Cargo.toml | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index cdef5936639a..2c9d1695412a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8607,6 +8607,7 @@ dependencies = [ "reth-zstd-compressors", "revm-primitives", "rstest", + "scroll-alloy-consensus", "secp256k1", "serde", "serde_json", diff --git a/crates/primitives/Cargo.toml b/crates/primitives/Cargo.toml index 0065b816f4f6..7c7fc3530236 100644 --- a/crates/primitives/Cargo.toml +++ b/crates/primitives/Cargo.toml @@ -31,6 +31,7 @@ alloy-trie = { workspace = true, features = ["serde"] } # scroll revm-primitives = { workspace = true, features = ["serde"] } +scroll-alloy-consensus = { workspace = true, optional = true, features = ["serde", "arbitrary"] } # optimism op-alloy-rpc-types = { workspace = true, optional = true } @@ -148,6 +149,7 @@ arbitrary = [ "alloy-trie/arbitrary", "reth-trie-common/arbitrary", "dep:secp256k1", + "scroll-alloy-consensus?/arbitrary" ] secp256k1 = [ @@ -184,8 +186,10 @@ serde-bincode-compat = [ "op-alloy-consensus?/serde-bincode-compat", "reth-primitives-traits/serde-bincode-compat", "reth-trie-common/serde-bincode-compat", + "scroll-alloy-consensus?/serde-bincode-compat", ] scroll = [ + "dep:scroll-alloy-consensus", "reth-primitives-traits/scroll", "reth-testing-utils/scroll", ] From 4ec620ac72b470e0b9edb9a4a3de6c7c53509895 Mon Sep 17 00:00:00 2001 From: georgehao Date: Thu, 16 Jan 2025 10:22:07 +0800 Subject: [PATCH 41/86] fix udeps --- .github/workflows/lint.yml | 2 +- Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index eaefdfb61ec9..6d16166ab39d 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -183,7 +183,7 @@ jobs: --exclude op-reth --exclude "example-*" --exclude reth --exclude reth-payload-primitives \ --exclude reth-e2e-test-utils --exclude reth-ethereum-payload-builder --exclude reth-exex-test-utils \ --exclude reth-node-ethereum --exclude reth-scroll-cli --exclude reth-scroll-evm \ - --exclude reth-scroll-node --exclude "scroll-reth*" --exclude reth-scroll-engine --exclude reth-scroll-rpc \ + --exclude reth-scroll-node --exclude "scroll-reth" --exclude reth-scroll-engine --exclude reth-scroll-rpc \ --exclude reth-scroll-trie book: diff --git a/Makefile b/Makefile index 09cd759886b7..f11e312e9902 100644 --- a/Makefile +++ b/Makefile @@ -418,7 +418,7 @@ lint-udeps: --exclude op-reth --exclude "example-*" --exclude reth --exclude reth-payload-primitives \ --exclude reth-e2e-test-utils --exclude reth-ethereum-payload-builder --exclude reth-exex-test-utils \ --exclude reth-node-ethereum --exclude reth-scroll-cli --exclude reth-scroll-evm \ - --exclude reth-scroll-node --exclude "scroll-reth*" --exclude reth-scroll-engine --exclude reth-scroll-rpc \ + --exclude reth-scroll-node --exclude "scroll-reth" --exclude reth-scroll-engine --exclude reth-scroll-rpc \ --exclude reth-scroll-trie lint-codespell: ensure-codespell From 5798942ad04920933bc4335bedf446359494e610 Mon Sep 17 00:00:00 2001 From: georgehao Date: Thu, 16 Jan 2025 12:12:17 +0800 Subject: [PATCH 42/86] address comments --- Makefile | 2 +- crates/ethereum/evm/Cargo.toml | 30 ++-- crates/primitives/Cargo.toml | 166 +++++++++--------- crates/scroll/alloy/consensus/Cargo.toml | 84 +++++---- crates/scroll/alloy/consensus/README.md | 4 +- .../alloy/consensus/src/receipt/envelope.rs | 10 +- .../consensus/src/transaction/envelope.rs | 2 +- .../consensus/src/transaction/l1_message.rs | 46 ++++- .../consensus/src/transaction/tx_type.rs | 6 +- crates/scroll/alloy/network/src/lib.rs | 2 +- crates/scroll/alloy/rpc-types/Cargo.toml | 162 ++++------------- crates/scroll/alloy/rpc-types/src/receipt.rs | 6 +- .../scroll/alloy/rpc-types/src/transaction.rs | 11 +- crates/scroll/chainspec/Cargo.toml | 32 ++-- crates/scroll/evm/Cargo.toml | 14 +- crates/scroll/node/Cargo.toml | 28 +-- crates/scroll/rpc/src/eth/transaction.rs | 6 +- crates/trie/trie/Cargo.toml | 28 +-- 18 files changed, 298 insertions(+), 341 deletions(-) diff --git a/Makefile b/Makefile index f11e312e9902..d34a857f9a7e 100644 --- a/Makefile +++ b/Makefile @@ -412,7 +412,7 @@ lint-all: --locked lint-udeps: - cargo udeps --workspace --lib --examples --tests --benches --all-features --locked \ + cargo +nightly udeps --workspace --lib --examples --tests --benches --all-features --locked \ --exclude reth-optimism-cli --exclude reth-optimism-consensus --exclude reth-optimism-payload-builder \ --exclude reth-optimism-node --exclude reth-optimism-evm --exclude reth-optimism-node --exclude reth-optimism-rpc \ --exclude op-reth --exclude "example-*" --exclude reth --exclude reth-payload-primitives \ diff --git a/crates/ethereum/evm/Cargo.toml b/crates/ethereum/evm/Cargo.toml index 0cd9124ccbd9..31e63e941464 100644 --- a/crates/ethereum/evm/Cargo.toml +++ b/crates/ethereum/evm/Cargo.toml @@ -43,21 +43,21 @@ alloy-genesis.workspace = true [features] default = ["std"] std = [ - "reth-consensus/std", - "reth-primitives/std", - "reth-revm/std", - "alloy-consensus/std", - "alloy-eips/std", - "alloy-genesis/std", - "alloy-primitives/std", - "revm-primitives/std", - "secp256k1/std", - "reth-ethereum-forks/std", - "serde_json/std", - "reth-primitives-traits/std", - "reth-chainspec/std" + "reth-consensus/std", + "reth-primitives/std", + "reth-revm/std", + "alloy-consensus/std", + "alloy-eips/std", + "alloy-genesis/std", + "alloy-primitives/std", + "revm-primitives/std", + "secp256k1/std", + "reth-ethereum-forks/std", + "serde_json/std", + "reth-primitives-traits/std", + "reth-chainspec/std" ] scroll = [ - "reth-primitives/scroll", - "reth-testing-utils/scroll", + "reth-primitives/scroll", + "reth-testing-utils/scroll", ] diff --git a/crates/primitives/Cargo.toml b/crates/primitives/Cargo.toml index 7c7fc3530236..de2c63dadbf8 100644 --- a/crates/primitives/Cargo.toml +++ b/crates/primitives/Cargo.toml @@ -36,8 +36,8 @@ scroll-alloy-consensus = { workspace = true, optional = true, features = ["serde # optimism op-alloy-rpc-types = { workspace = true, optional = true } op-alloy-consensus = { workspace = true, features = [ - "arbitrary", - "serde", + "arbitrary", + "serde", ], optional = true } # for eip-4844 @@ -45,9 +45,9 @@ c-kzg = { workspace = true, features = ["serde"], optional = true } # crypto secp256k1 = { workspace = true, features = [ - "global-context", - "recovery", - "rand", + "global-context", + "recovery", + "rand", ], optional = true } # misc @@ -76,9 +76,9 @@ alloy-genesis.workspace = true arbitrary = { workspace = true, features = ["derive"] } secp256k1 = { workspace = true, features = [ - "global-context", - "recovery", - "rand", + "global-context", + "recovery", + "rand", ] } assert_matches.workspace = true @@ -92,106 +92,106 @@ rstest.workspace = true criterion.workspace = true pprof = { workspace = true, features = [ - "flamegraph", - "frame-pointer", - "criterion", + "flamegraph", + "frame-pointer", + "criterion", ] } [features] default = ["c-kzg", "alloy-compat", "std", "reth-codec", "secp256k1"] std = [ - "reth-primitives-traits/std", - "alloy-consensus/std", - "alloy-eips/std", - "alloy-genesis/std", - "alloy-primitives/std", - "alloy-serde?/std", - "once_cell/std", - "revm-primitives/std", - "serde/std", - "alloy-trie/std", - "serde_with?/std", - "alloy-rlp/std", - "reth-ethereum-forks/std", - "bytes/std", - "derive_more/std", - "reth-zstd-compressors?/std", - "secp256k1?/std", - "reth-trie-common/std", - "op-alloy-consensus?/std", - "op-alloy-rpc-types?/std", - "serde_json/std", - "reth-chainspec/std" + "reth-primitives-traits/std", + "alloy-consensus/std", + "alloy-eips/std", + "alloy-genesis/std", + "alloy-primitives/std", + "alloy-serde?/std", + "once_cell/std", + "revm-primitives/std", + "serde/std", + "alloy-trie/std", + "serde_with?/std", + "alloy-rlp/std", + "reth-ethereum-forks/std", + "bytes/std", + "derive_more/std", + "reth-zstd-compressors?/std", + "secp256k1?/std", + "reth-trie-common/std", + "op-alloy-consensus?/std", + "op-alloy-rpc-types?/std", + "serde_json/std", + "reth-chainspec/std" ] reth-codec = [ - "dep:reth-codecs", - "dep:reth-zstd-compressors", - "dep:modular-bitfield", "std", - "reth-primitives-traits/reth-codec", + "dep:reth-codecs", + "dep:reth-zstd-compressors", + "dep:modular-bitfield", "std", + "reth-primitives-traits/reth-codec", ] asm-keccak = ["alloy-primitives/asm-keccak", "revm-primitives/asm-keccak"] arbitrary = [ - "dep:arbitrary", - "alloy-eips/arbitrary", - "rand", - "reth-codec", - "reth-ethereum-forks/arbitrary", - "reth-primitives-traits/arbitrary", - "revm-primitives/arbitrary", - "reth-chainspec/arbitrary", - "alloy-consensus/arbitrary", - "alloy-primitives/arbitrary", - "alloy-rpc-types?/arbitrary", - "alloy-serde?/arbitrary", - "op-alloy-consensus?/arbitrary", - "op-alloy-rpc-types?/arbitrary", - "reth-codecs?/arbitrary", - "alloy-trie/arbitrary", - "reth-trie-common/arbitrary", - "dep:secp256k1", - "scroll-alloy-consensus?/arbitrary" + "dep:arbitrary", + "alloy-eips/arbitrary", + "rand", + "reth-codec", + "reth-ethereum-forks/arbitrary", + "reth-primitives-traits/arbitrary", + "revm-primitives/arbitrary", + "reth-chainspec/arbitrary", + "alloy-consensus/arbitrary", + "alloy-primitives/arbitrary", + "alloy-rpc-types?/arbitrary", + "alloy-serde?/arbitrary", + "op-alloy-consensus?/arbitrary", + "op-alloy-rpc-types?/arbitrary", + "reth-codecs?/arbitrary", + "alloy-trie/arbitrary", + "reth-trie-common/arbitrary", + "dep:secp256k1", + "scroll-alloy-consensus?/arbitrary" ] secp256k1 = [ - "reth-primitives-traits/secp256k1", + "reth-primitives-traits/secp256k1", ] c-kzg = [ - "dep:c-kzg", - "alloy-consensus/kzg", - "alloy-eips/kzg", - "revm-primitives/c-kzg", + "dep:c-kzg", + "alloy-consensus/kzg", + "alloy-eips/kzg", + "revm-primitives/c-kzg", ] optimism = [ - "dep:op-alloy-consensus", - "reth-codecs?/op", - "revm-primitives/optimism", + "dep:op-alloy-consensus", + "reth-codecs?/op", + "revm-primitives/optimism", ] alloy-compat = [ - "dep:alloy-rpc-types", - "dep:alloy-serde", - "dep:op-alloy-rpc-types", - "dep:alloy-network", + "dep:alloy-rpc-types", + "dep:alloy-serde", + "dep:op-alloy-rpc-types", + "dep:alloy-network", ] test-utils = [ - "reth-primitives-traits/test-utils", - "reth-chainspec/test-utils", - "reth-codecs?/test-utils", - "reth-trie-common/test-utils", - "arbitrary", + "reth-primitives-traits/test-utils", + "reth-chainspec/test-utils", + "reth-codecs?/test-utils", + "reth-trie-common/test-utils", + "arbitrary", ] serde-bincode-compat = [ - "serde_with", - "alloy-eips/serde-bincode-compat", - "alloy-consensus/serde-bincode-compat", - "op-alloy-consensus?/serde-bincode-compat", - "reth-primitives-traits/serde-bincode-compat", - "reth-trie-common/serde-bincode-compat", - "scroll-alloy-consensus?/serde-bincode-compat", + "serde_with", + "alloy-eips/serde-bincode-compat", + "alloy-consensus/serde-bincode-compat", + "op-alloy-consensus?/serde-bincode-compat", + "reth-primitives-traits/serde-bincode-compat", + "reth-trie-common/serde-bincode-compat", + "scroll-alloy-consensus?/serde-bincode-compat", ] scroll = [ - "dep:scroll-alloy-consensus", - "reth-primitives-traits/scroll", - "reth-testing-utils/scroll", + "dep:scroll-alloy-consensus", + "reth-primitives-traits/scroll", + "reth-testing-utils/scroll", ] [[bench]] diff --git a/crates/scroll/alloy/consensus/Cargo.toml b/crates/scroll/alloy/consensus/Cargo.toml index 279add36839d..4b196c6c434d 100644 --- a/crates/scroll/alloy/consensus/Cargo.toml +++ b/crates/scroll/alloy/consensus/Cargo.toml @@ -48,61 +48,59 @@ test-fuzz.workspace = true [features] default = [ - "reth-codec", - "std", + "reth-codec", + "std", ] std = [ - "serde/std", - "alloy-primitives/std", - "reth-codecs/std", - "alloy-consensus/std", - "alloy-eips/std", - "alloy-rlp/std", - "alloy-serde/std", - "proptest/std", - "rand/std", - "derive_more/std", - "serde_json/std", - "serde_with/std", + "serde/std", + "alloy-primitives/std", + "reth-codecs/std", + "alloy-consensus/std", + "alloy-eips/std", + "alloy-rlp/std", + "alloy-serde/std", + "proptest/std", + "rand/std", + "derive_more/std", + "serde_json/std", + "serde_with/std", ] - k256 = [ - "alloy-primitives/k256", - "alloy-consensus/k256" + "alloy-primitives/k256", + "alloy-consensus/k256" ] - kzg = [ - "alloy-eips/kzg", - "alloy-consensus/kzg", - "std" + "alloy-eips/kzg", + "alloy-consensus/kzg", + "std" ] reth-codec = [ - "dep:reth-codecs", - "dep:reth-codecs-derive", - "modular-bitfield", - "std" + "dep:reth-codecs", + "dep:reth-codecs-derive", + "modular-bitfield", + "std" ] arbitrary = [ - "std", - "dep:arbitrary", - "alloy-primitives/arbitrary", - "alloy-consensus/arbitrary", - "alloy-eips/arbitrary", - "alloy-serde/arbitrary", - "reth-codecs/arbitrary", - "alloy-primitives/rand" + "std", + "dep:arbitrary", + "alloy-primitives/arbitrary", + "alloy-consensus/arbitrary", + "alloy-eips/arbitrary", + "alloy-serde/arbitrary", + "reth-codecs/arbitrary", + "alloy-primitives/rand" ] serde = [ - "dep:serde", - "dep:alloy-serde", - "alloy-primitives/serde", - "alloy-consensus/serde", - "alloy-eips/serde", - "rand/serde", - "reth-codecs/serde" + "dep:serde", + "dep:alloy-serde", + "alloy-primitives/serde", + "alloy-consensus/serde", + "alloy-eips/serde", + "rand/serde", + "reth-codecs/serde" ] serde-bincode-compat = [ - "serde_with", - "alloy-consensus/serde-bincode-compat", - "alloy-eips/serde-bincode-compat" + "serde_with", + "alloy-consensus/serde-bincode-compat", + "alloy-eips/serde-bincode-compat" ] \ No newline at end of file diff --git a/crates/scroll/alloy/consensus/README.md b/crates/scroll/alloy/consensus/README.md index f65277520173..1f5971580ad3 100644 --- a/crates/scroll/alloy/consensus/README.md +++ b/crates/scroll/alloy/consensus/README.md @@ -5,8 +5,8 @@ Scroll consensus interface. This crate contains constants, types, and functions for implementing Scroll EL consensus and communication. This includes an extended `ScrollTxEnvelope` type with deposit transactions -In general a type belongs in this crate if it exists in the `alloy-consensus` crate, but was modified from the base Ethereum protocol in the OP Stack. -For consensus types that are not modified by the Scroll, the `alloy-consensus` types should be used instead. +In general a type belongs in this crate if it exists in the `alloy-consensus` crate, but was modified from the base Ethereum protocol in Scroll. +For consensus types that are not modified by Scroll, the `alloy-consensus` types should be used instead. ## Provenance diff --git a/crates/scroll/alloy/consensus/src/receipt/envelope.rs b/crates/scroll/alloy/consensus/src/receipt/envelope.rs index 83d9f7652f28..7b3354865f68 100644 --- a/crates/scroll/alloy/consensus/src/receipt/envelope.rs +++ b/crates/scroll/alloy/consensus/src/receipt/envelope.rs @@ -108,16 +108,16 @@ impl ScrollReceiptEnvelope { } } - /// Returns the deposit receipt if it is a deposit receipt. - pub const fn as_deposit_receipt_with_bloom(&self) -> Option<&ReceiptWithBloom>> { + /// Returns the L1 message receipt if it is a deposit receipt. + pub const fn as_l1_message_receipt_with_bloom(&self) -> Option<&ReceiptWithBloom>> { match self { Self::L1Message(t) => Some(t), _ => None, } } - /// Returns the deposit receipt if it is a deposit receipt. - pub const fn as_deposit_receipt(&self) -> Option<&Receipt> { + /// Returns the L1 message receipt if it is a deposit receipt. + pub const fn as_l1_message_receipt(&self) -> Option<&Receipt> { match self { Self::L1Message(t) => Some(&t.receipt), _ => None, @@ -326,7 +326,7 @@ mod tests { } #[test] - fn deposit_receipt_from_parts() { + fn l1_message_receipt_from_parts() { let receipt = ScrollReceiptEnvelope::from_parts(true, 100, vec![], ScrollTxType::L1Message); assert!(receipt.status()); assert_eq!(receipt.cumulative_gas_used(), 100); diff --git a/crates/scroll/alloy/consensus/src/transaction/envelope.rs b/crates/scroll/alloy/consensus/src/transaction/envelope.rs index 6df9a07d93de..9c5f88f779b3 100644 --- a/crates/scroll/alloy/consensus/src/transaction/envelope.rs +++ b/crates/scroll/alloy/consensus/src/transaction/envelope.rs @@ -506,7 +506,7 @@ mod tests { #[test] #[cfg(feature = "serde")] - fn test_serde_roundtrip_deposit() { + fn test_serde_roundtrip_l1_message() { let tx = TxL1Message { queue_index: 11, gas_limit: u64::MAX, diff --git a/crates/scroll/alloy/consensus/src/transaction/l1_message.rs b/crates/scroll/alloy/consensus/src/transaction/l1_message.rs index 8ed82cd87d3b..cb4bd1b491a9 100644 --- a/crates/scroll/alloy/consensus/src/transaction/l1_message.rs +++ b/crates/scroll/alloy/consensus/src/transaction/l1_message.rs @@ -310,7 +310,7 @@ pub struct ScrollL1MessageTransactionFields { pub sender: Address, } -/// Deposit transactions don't have a signature, however, we include an empty signature in the +/// L1 message transactions don't have a signature, however, we include an empty signature in the /// response for better compatibility. /// /// This function can be used as `serialize_with` serde attribute for the [`TxL1Message`] and will @@ -338,8 +338,12 @@ pub fn serde_l1_message_tx_rpc( #[cfg(test)] mod tests { use super::*; - use alloy_primitives::hex; + use alloy_eips::eip2718::Encodable2718; + use alloy_primitives::{address, bytes, hex, Bytes, U256}; use alloy_rlp::BytesMut; + use arbitrary::Arbitrary; + use rand::Rng; + use reth_codecs::{test_utils::UnusedBits, validate_bitflag_backwards_compat}; #[test] fn test_rlp_roundtrip() { @@ -350,6 +354,7 @@ mod tests { tx_a.encode(&mut buf_a); assert_eq!(&buf_a[..], &bytes[1..]); } + #[test] fn test_encode_decode_fields() { let original = TxL1Message { @@ -408,6 +413,43 @@ mod tests { let obj = serde_json::from_str::(rpc_tx).unwrap(); assert_eq!(obj.queue_index, 0xe7ba0); } + + #[test] + fn test_bincode_roundtrip() { + let mut bytes = [0u8; 1024]; + rand::thread_rng().fill(bytes.as_mut_slice()); + let tx = TxL1Message::arbitrary(&mut arbitrary::Unstructured::new(&bytes)).unwrap(); + + let encoded = bincode::serialize(&tx).unwrap(); + let decoded: TxL1Message = bincode::deserialize(&encoded).unwrap(); + assert_eq!(decoded, tx); + } + + #[test] + fn test_eip2718_encode() { + let tx = + TxL1Message { + queue_index: 947883, + gas_limit: 2000000, + to: address!("781e90f1c8fc4611c9b7497c3b47f99ef6969cbc"), + value: U256::ZERO, + sender: address!("7885bcbd5cecef1336b5300fb5186a12ddd8c478"), + input: bytes!("8ef1332e000000000000000000000000c186fa914353c44b2e33ebe05f21846f1048beda0000000000000000000000003bad7ad0728f9917d1bf08af5782dcbd516cdd96000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e76ab00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000044493a4f84f464e58d4bfa93bcc57abfb14dbe1b8ff46cd132b5709aab227f269727943d2f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"), + } + ; + let bytes = Bytes::from_static(&hex!("7ef9015a830e76ab831e848094781e90f1c8fc4611c9b7497c3b47f99ef6969cbc80b901248ef1332e000000000000000000000000c186fa914353c44b2e33ebe05f21846f1048beda0000000000000000000000003bad7ad0728f9917d1bf08af5782dcbd516cdd96000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e76ab00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000044493a4f84f464e58d4bfa93bcc57abfb14dbe1b8ff46cd132b5709aab227f269727943d2f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000947885bcbd5cecef1336b5300fb5186a12ddd8c478")); + + let mut encoded = BytesMut::default(); + tx.encode_2718(&mut encoded); + + assert_eq!(encoded, bytes.as_ref()) + } + + #[test] + fn test_compaction_backwards_compatibility() { + assert_eq!(TxL1Message::bitflag_encoded_bytes(), 2); + validate_bitflag_backwards_compat!(TxL1Message, UnusedBits::NotZero); + } } /// Bincode-compatible [`TxL1Message`] serde implementation. diff --git a/crates/scroll/alloy/consensus/src/transaction/tx_type.rs b/crates/scroll/alloy/consensus/src/transaction/tx_type.rs index d91086769b06..a0d96fb776bb 100644 --- a/crates/scroll/alloy/consensus/src/transaction/tx_type.rs +++ b/crates/scroll/alloy/consensus/src/transaction/tx_type.rs @@ -21,14 +21,14 @@ pub enum ScrollTxType { /// EIP-1559 transaction type. #[display("eip1559")] Eip1559 = 2, - /// Optimism Deposit transaction type. - #[display("deposit")] + /// L1 message transaction type. + #[display("l1_message")] L1Message = L1_MESSAGE_TX_TYPE_ID, } impl ScrollTxType { /// List of all variants. - pub const ALL: [Self; 2] = [Self::Legacy, Self::L1Message]; + pub const ALL: [Self; 4] = [Self::Legacy, Self::Eip1559, Self::Eip2930, Self::L1Message]; } #[cfg(any(test, feature = "arbitrary"))] diff --git a/crates/scroll/alloy/network/src/lib.rs b/crates/scroll/alloy/network/src/lib.rs index 43407fc6b460..e0a171d82e04 100644 --- a/crates/scroll/alloy/network/src/lib.rs +++ b/crates/scroll/alloy/network/src/lib.rs @@ -133,7 +133,7 @@ impl TransactionBuilder for ScrollTransactionRequest { fn complete_type(&self, ty: ScrollTxType) -> Result<(), Vec<&'static str>> { match ty { - ScrollTxType::L1Message => Err(vec!["not implemented for deposit tx"]), + ScrollTxType::L1Message => Err(vec!["not implemented for L1 message tx"]), _ => { let ty = TxType::try_from(ty as u8).unwrap(); self.as_ref().complete_type(ty) diff --git a/crates/scroll/alloy/rpc-types/Cargo.toml b/crates/scroll/alloy/rpc-types/Cargo.toml index 9980f92a6f77..865d7e59a72c 100644 --- a/crates/scroll/alloy/rpc-types/Cargo.toml +++ b/crates/scroll/alloy/rpc-types/Cargo.toml @@ -8,137 +8,53 @@ homepage.workspace = true repository.workspace = true exclude.workspace = true -[dev-dependencies] -similar-asserts = "1.6" - -[dependencies.scroll-alloy-consensus] +[lints] workspace = true -features = ["serde"] - -[dependencies.alloy-consensus] -version = "0.9.2" -default-features = false - -[dependencies.alloy-eips] -version = "0.9.2" -features = ["serde"] -default-features = false - -[dependencies.alloy-network-primitives] -version = "0.9.2" -default-features = false - -[dependencies.alloy-primitives] -version = "0.8.12" -features = [ - "map", - "rlp", - "serde", -] -default-features = false - -[dependencies.alloy-rpc-types-eth] -version = "0.9.2" -features = ["serde"] -default-features = false - -[dependencies.alloy-serde] -version = "0.9.2" -default-features = false - -[dependencies.arbitrary] -version = "1.4" -features = [ - "derive", - "derive", -] -optional = true - -[dependencies.derive_more] -version = "1.0" -default-features = false -[dependencies.serde] -version = "1.0" -features = [ - "derive", - "alloc", - "derive", -] -default-features = false - -[dependencies.serde_json] -version = "1.0" -features = ["alloc"] -default-features = false - -[dev-dependencies.alloy-consensus] -version = "0.9.2" -features = ["arbitrary"] -default-features = false - -[dev-dependencies.alloy-primitives] -version = "0.8.12" -features = ["arbitrary"] -default-features = false +[dependencies] +scroll-alloy-consensus = { workspace = true, features = ["serde"] } +alloy-consensus = { version = "0.9.2", default-features = false } +alloy-eips = { version = "0.9.2", features = ["serde"], default-features = false } +alloy-network-primitives = { version = "0.9.2", default-features = false } +alloy-primitives = { version = "0.8.12", features = ["map", "rlp", "serde"], default-features = false } +alloy-rpc-types-eth = { version = "0.9.2", features = ["serde"], default-features = false } +alloy-serde = { version = "0.9.2", default-features = false } +arbitrary = { version = "1.4", features = ["derive", "derive"], optional = true } +derive_more = { version = "1.0", default-features = false } +serde = { version = "1.0", features = ["derive", "alloc", "derive"], default-features = false } +serde_json = { version = "1.0", features = ["alloc"], default-features = false } -[dev-dependencies.alloy-rpc-types-eth] -version = "0.9.2" -features = ["arbitrary"] -default-features = false - -[dev-dependencies.arbitrary] -version = "1.4" -features = [ - "derive", - "derive", -] +[dev-dependencies] +similar-asserts = "1.6" +alloy-consensus = { version = "0.9.2", features = ["arbitrary"], default-features = false } +alloy-primitives = { version = "0.8.12", features = ["arbitrary"], default-features = false } +alloy-rpc-types-eth = { version = "0.9.2", features = ["arbitrary"], default-features = false } +arbitrary = { version = "1.4", features = ["derive", "derive"] } [features] arbitrary = [ - "std", - "dep:arbitrary", - "alloy-primitives/arbitrary", - "alloy-rpc-types-eth/arbitrary", - "scroll-alloy-consensus/arbitrary", - "alloy-consensus/arbitrary", - "alloy-eips/arbitrary", - "alloy-serde/arbitrary", + "std", + "dep:arbitrary", + "alloy-primitives/arbitrary", + "alloy-rpc-types-eth/arbitrary", + "scroll-alloy-consensus/arbitrary", + "alloy-consensus/arbitrary", + "alloy-eips/arbitrary", + "alloy-serde/arbitrary", ] default = ["std"] k256 = [ - "alloy-rpc-types-eth/k256", - "scroll-alloy-consensus/k256" + "alloy-rpc-types-eth/k256", + "scroll-alloy-consensus/k256" ] std = [ - "alloy-network-primitives/std", - "alloy-eips/std", - "alloy-primitives/std", - "alloy-rpc-types-eth/std", - "alloy-consensus/std", - "alloy-serde/std", - "derive_more/std", - "serde/std", - "serde_json/std", -] - -[lints.clippy] -missing-const-for-fn = "warn" -option-if-let-else = "warn" -redundant-clone = "warn" -use-self = "warn" - -[lints.clippy.all] -level = "warn" -priority = -1 - -[lints.rust] -missing-debug-implementations = "warn" -missing-docs = "warn" -rust-2018-idioms = "deny" -unnameable-types = "warn" -unreachable-pub = "warn" -unused-must-use = "deny" - -[lints.rustdoc] -all = "warn" + "alloy-network-primitives/std", + "alloy-eips/std", + "alloy-primitives/std", + "alloy-rpc-types-eth/std", + "alloy-consensus/std", + "alloy-serde/std", + "derive_more/std", + "serde/std", + "serde_json/std", +] \ No newline at end of file diff --git a/crates/scroll/alloy/rpc-types/src/receipt.rs b/crates/scroll/alloy/rpc-types/src/receipt.rs index 6f19a155d216..1a918ea2be62 100644 --- a/crates/scroll/alloy/rpc-types/src/receipt.rs +++ b/crates/scroll/alloy/rpc-types/src/receipt.rs @@ -83,7 +83,7 @@ impl alloy_network_primitives::ReceiptResponse for ScrollTransactionReceipt { } /// Additional fields for Scroll transaction receipts: -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] #[doc(alias = "ScrollTxReceiptFields")] pub struct ScrollTransactionReceiptFields { @@ -102,7 +102,7 @@ impl From for ScrollReceiptEnvelope Self { let inner_envelope = value.inner.inner; - /// Helper function to convert the inner logs within a [ReceiptWithBloom] from RPC to + /// Helper function to convert the inner logs within a [`ReceiptWithBloom`] from RPC to /// consensus types. #[inline(always)] fn convert_standard_receipt( @@ -134,7 +134,7 @@ impl From for ScrollReceiptEnvelope { Self::L1Message(convert_standard_receipt(receipt)) } - _ => unreachable!("Unsupported OpReceiptEnvelope variant"), + _ => unreachable!("Unsupported ScrollReceiptEnvelope variant"), } } } diff --git a/crates/scroll/alloy/rpc-types/src/transaction.rs b/crates/scroll/alloy/rpc-types/src/transaction.rs index 0ff782ce7d3f..2e2eecc4712d 100644 --- a/crates/scroll/alloy/rpc-types/src/transaction.rs +++ b/crates/scroll/alloy/rpc-types/src/transaction.rs @@ -22,14 +22,15 @@ pub struct Transaction { #[deref_mut] pub inner: alloy_rpc_types_eth::Transaction, - /// sender for deposit transactions. Only present in RPC responses. + /// sender for l1 message transactions. Only present in RPC responses. pub sender: Option
, - /// queue index for deposit transactions + /// queue index for l1 message transactions pub queue_index: Option, - /// nonce for deposit transactions. - /// why don't put in TxL1Message? if put in TxL1Message, the payload of l1_message is wrong. + /// nonce for l1 message transactions. + /// why don't put in `TxL1Message`? if put in `TxL1Message`, the payload of `l1_message` is + /// wrong. pub nonce: Option, } @@ -271,7 +272,7 @@ mod tx_serde { return Err(serde_json::Error::custom("missing `from` field")); }; - let effective_gas_price = other.effective_gas_price.or(inner.gas_price()); + let effective_gas_price = other.effective_gas_price.or_else(|| inner.gas_price()); Ok(Self { inner: alloy_rpc_types_eth::Transaction { inner, diff --git a/crates/scroll/chainspec/Cargo.toml b/crates/scroll/chainspec/Cargo.toml index 4f1a25156b6b..e422ad4f4449 100644 --- a/crates/scroll/chainspec/Cargo.toml +++ b/crates/scroll/chainspec/Cargo.toml @@ -45,20 +45,20 @@ reth-chainspec = { workspace = true, features = ["test-utils"] } [features] default = ["std"] std = [ - "alloy-chains/std", - "alloy-genesis/std", - "alloy-primitives/std", - "alloy-eips/std", - "alloy-serde/std", - "reth-chainspec/std", - "reth-ethereum-forks/std", - "reth-primitives-traits/std", - "reth-scroll-forks/std", - "alloy-consensus/std", - "once_cell/std", - "serde/std", - "derive_more/std", - "reth-network-peers/std", - "serde_json/std", - "reth-trie-common/std" + "alloy-chains/std", + "alloy-genesis/std", + "alloy-primitives/std", + "alloy-eips/std", + "alloy-serde/std", + "reth-chainspec/std", + "reth-ethereum-forks/std", + "reth-primitives-traits/std", + "reth-scroll-forks/std", + "alloy-consensus/std", + "once_cell/std", + "serde/std", + "derive_more/std", + "reth-network-peers/std", + "serde_json/std", + "reth-trie-common/std" ] diff --git a/crates/scroll/evm/Cargo.toml b/crates/scroll/evm/Cargo.toml index 1ba22ba22f0d..f409c0f2e973 100644 --- a/crates/scroll/evm/Cargo.toml +++ b/crates/scroll/evm/Cargo.toml @@ -47,13 +47,13 @@ eyre.workspace = true [features] optimism = [ - "reth-primitives/optimism", - "revm/optimism" + "reth-primitives/optimism", + "revm/optimism" ] scroll = [ - "reth-evm/scroll", - "reth-primitives/scroll", - "reth-revm/scroll", - "reth-scroll-consensus/scroll", - "revm/scroll" + "reth-evm/scroll", + "reth-primitives/scroll", + "reth-revm/scroll", + "reth-scroll-consensus/scroll", + "revm/scroll" ] \ No newline at end of file diff --git a/crates/scroll/node/Cargo.toml b/crates/scroll/node/Cargo.toml index 77eea4eaa728..3f180a151f53 100644 --- a/crates/scroll/node/Cargo.toml +++ b/crates/scroll/node/Cargo.toml @@ -49,21 +49,21 @@ eyre.workspace = true [features] optimism = [ - "reth-db/optimism", - "reth-primitives/optimism", - "reth-provider/optimism", - "reth-scroll-evm/optimism", - "reth-scroll-engine/optimism", - "reth-scroll-rpc/optimism", + "reth-db/optimism", + "reth-primitives/optimism", + "reth-provider/optimism", + "reth-scroll-evm/optimism", + "reth-scroll-engine/optimism", + "reth-scroll-rpc/optimism", ] scroll = [ - "reth-db/scroll", - "reth-node-builder/scroll", - "reth-primitives/scroll", - "reth-provider/scroll", - "reth-evm/scroll", - "reth-scroll-evm/scroll", - "reth-scroll-engine/scroll", - "reth-scroll-rpc/scroll", + "reth-db/scroll", + "reth-node-builder/scroll", + "reth-primitives/scroll", + "reth-provider/scroll", + "reth-evm/scroll", + "reth-scroll-evm/scroll", + "reth-scroll-engine/scroll", + "reth-scroll-rpc/scroll", ] skip-state-root-validation = [] \ No newline at end of file diff --git a/crates/scroll/rpc/src/eth/transaction.rs b/crates/scroll/rpc/src/eth/transaction.rs index 301002e9cb06..64c138daf3e0 100644 --- a/crates/scroll/rpc/src/eth/transaction.rs +++ b/crates/scroll/rpc/src/eth/transaction.rs @@ -98,9 +98,9 @@ where } = tx_info; let effective_gas_price = if inner.is_l1_message() { - // For deposits, we must always set the `gasPrice` field to 0 in rpc - // deposit tx don't have a gas price field, but serde of `Transaction` will take care of - // it + // For l1 message, we must always set the `gasPrice` field to 0 in rpc + // l1 message tx don't have a gas price field, but serde of `Transaction` will take care + // of it 0 } else { base_fee diff --git a/crates/trie/trie/Cargo.toml b/crates/trie/trie/Cargo.toml index bcf8f8529dd1..2d4e88cb95db 100644 --- a/crates/trie/trie/Cargo.toml +++ b/crates/trie/trie/Cargo.toml @@ -63,23 +63,23 @@ criterion.workspace = true [features] metrics = ["reth-metrics", "dep:metrics"] serde = [ - "alloy-primitives/serde", - "alloy-consensus/serde", - "alloy-trie/serde", - "alloy-eips/serde", - "revm/serde", - "reth-trie-common/serde", - "reth-primitives-traits/serde", + "alloy-primitives/serde", + "alloy-consensus/serde", + "alloy-trie/serde", + "alloy-eips/serde", + "revm/serde", + "reth-trie-common/serde", + "reth-primitives-traits/serde", ] test-utils = [ - "triehash", - "revm/test-utils", - "reth-primitives/test-utils", - "reth-trie-common/test-utils", + "triehash", + "revm/test-utils", + "reth-primitives/test-utils", "reth-trie-common/test-utils", - "reth-trie-sparse/test-utils", - "reth-stages-types/test-utils", - "reth-primitives-traits/test-utils" + "reth-trie-common/test-utils", + "reth-trie-sparse/test-utils", + "reth-stages-types/test-utils", + "reth-primitives-traits/test-utils" ] scroll = ["revm/scroll"] From 5fb1a0bc63b71caa6c9cb7ba814dea674ba302a2 Mon Sep 17 00:00:00 2001 From: georgehao Date: Thu, 16 Jan 2025 12:14:46 +0800 Subject: [PATCH 43/86] add line --- crates/primitives/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/primitives/Cargo.toml b/crates/primitives/Cargo.toml index de2c63dadbf8..a51735a36266 100644 --- a/crates/primitives/Cargo.toml +++ b/crates/primitives/Cargo.toml @@ -201,4 +201,4 @@ harness = false [[bench]] name = "validate_blob_tx" required-features = ["arbitrary", "c-kzg"] -harness = false \ No newline at end of file +harness = false From 3150d6733056e75f885cd7120947992e1849d503 Mon Sep 17 00:00:00 2001 From: georgehao Date: Thu, 16 Jan 2025 12:16:04 +0800 Subject: [PATCH 44/86] add line --- crates/scroll/alloy/consensus/Cargo.toml | 2 +- crates/scroll/alloy/network/Cargo.toml | 2 +- crates/scroll/alloy/rpc-types/Cargo.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/scroll/alloy/consensus/Cargo.toml b/crates/scroll/alloy/consensus/Cargo.toml index 4b196c6c434d..334a6bb7f3d5 100644 --- a/crates/scroll/alloy/consensus/Cargo.toml +++ b/crates/scroll/alloy/consensus/Cargo.toml @@ -103,4 +103,4 @@ serde-bincode-compat = [ "serde_with", "alloy-consensus/serde-bincode-compat", "alloy-eips/serde-bincode-compat" -] \ No newline at end of file +] diff --git a/crates/scroll/alloy/network/Cargo.toml b/crates/scroll/alloy/network/Cargo.toml index b4acc6956109..ae1ada97ade9 100644 --- a/crates/scroll/alloy/network/Cargo.toml +++ b/crates/scroll/alloy/network/Cargo.toml @@ -20,4 +20,4 @@ alloy-consensus.workspace = true alloy-network.workspace = true alloy-primitives.workspace = true alloy-rpc-types-eth.workspace = true -alloy-signer.workspace = true \ No newline at end of file +alloy-signer.workspace = true diff --git a/crates/scroll/alloy/rpc-types/Cargo.toml b/crates/scroll/alloy/rpc-types/Cargo.toml index 865d7e59a72c..e5f664d0e28b 100644 --- a/crates/scroll/alloy/rpc-types/Cargo.toml +++ b/crates/scroll/alloy/rpc-types/Cargo.toml @@ -57,4 +57,4 @@ std = [ "derive_more/std", "serde/std", "serde_json/std", -] \ No newline at end of file +] From 990a963884fe27f7046602a347090216ef775750 Mon Sep 17 00:00:00 2001 From: georgehao Date: Thu, 16 Jan 2025 12:19:53 +0800 Subject: [PATCH 45/86] add new line --- crates/scroll/evm/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/scroll/evm/Cargo.toml b/crates/scroll/evm/Cargo.toml index f409c0f2e973..7ae825f842bd 100644 --- a/crates/scroll/evm/Cargo.toml +++ b/crates/scroll/evm/Cargo.toml @@ -56,4 +56,4 @@ scroll = [ "reth-revm/scroll", "reth-scroll-consensus/scroll", "revm/scroll" -] \ No newline at end of file +] From 71aca5a2979c2688bea2b5aec5d16784813dfc09 Mon Sep 17 00:00:00 2001 From: georgehao Date: Thu, 16 Jan 2025 12:21:43 +0800 Subject: [PATCH 46/86] fix format --- crates/trie/db/Cargo.toml | 42 +++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/crates/trie/db/Cargo.toml b/crates/trie/db/Cargo.toml index ad7bbad6171f..15686ab64600 100644 --- a/crates/trie/db/Cargo.toml +++ b/crates/trie/db/Cargo.toml @@ -66,29 +66,29 @@ similar-asserts.workspace = true [features] metrics = ["reth-metrics", "reth-trie/metrics", "dep:metrics"] serde = [ - "dep:serde", - "similar-asserts/serde", - "revm/serde", - "alloy-consensus/serde", - "alloy-primitives/serde", - "reth-trie/serde", - "reth-trie-common/serde", - "reth-provider/serde", + "dep:serde", + "similar-asserts/serde", + "revm/serde", + "alloy-consensus/serde", + "alloy-primitives/serde", + "reth-trie/serde", + "reth-trie-common/serde", + "reth-provider/serde", ] test-utils = [ - "triehash", - "revm/test-utils", - "reth-trie-common/test-utils", - "reth-chainspec/test-utils", - "reth-primitives/test-utils", - "reth-db/test-utils", - "reth-db-api/test-utils", - "reth-provider/test-utils", - "reth-trie/test-utils", + "triehash", + "revm/test-utils", + "reth-trie-common/test-utils", + "reth-chainspec/test-utils", + "reth-primitives/test-utils", + "reth-db/test-utils", + "reth-db-api/test-utils", + "reth-provider/test-utils", + "reth-trie/test-utils", ] scroll = [ - "reth-db/scroll", - "reth-primitives/scroll", - "reth-provider/scroll", - "revm/scroll" + "reth-db/scroll", + "reth-primitives/scroll", + "reth-provider/scroll", + "revm/scroll" ] From 1f4713c5248038a7b1e39159177f0e5e6732852b Mon Sep 17 00:00:00 2001 From: georgehao Date: Thu, 16 Jan 2025 12:25:54 +0800 Subject: [PATCH 47/86] revert --- crates/trie/trie/Cargo.toml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/crates/trie/trie/Cargo.toml b/crates/trie/trie/Cargo.toml index 2d4e88cb95db..0d9dea11c3de 100644 --- a/crates/trie/trie/Cargo.toml +++ b/crates/trie/trie/Cargo.toml @@ -63,23 +63,23 @@ criterion.workspace = true [features] metrics = ["reth-metrics", "dep:metrics"] serde = [ - "alloy-primitives/serde", - "alloy-consensus/serde", - "alloy-trie/serde", - "alloy-eips/serde", - "revm/serde", - "reth-trie-common/serde", - "reth-primitives-traits/serde", + "alloy-primitives/serde", + "alloy-consensus/serde", + "alloy-trie/serde", + "alloy-eips/serde", + "revm/serde", + "reth-trie-common/serde", + "reth-primitives-traits/serde", ] test-utils = [ - "triehash", - "revm/test-utils", - "reth-primitives/test-utils", - "reth-trie-common/test-utils", - "reth-trie-common/test-utils", - "reth-trie-sparse/test-utils", - "reth-stages-types/test-utils", - "reth-primitives-traits/test-utils" + "triehash", + "revm/test-utils", + "reth-primitives/test-utils", + "reth-trie-common/test-utils", + "reth-trie-common/test-utils", + "reth-trie-sparse/test-utils", + "reth-stages-types/test-utils", + "reth-primitives-traits/test-utils" ] scroll = ["revm/scroll"] From b3c8b445eba4fe432ee882cfafdc6eb758ad5494 Mon Sep 17 00:00:00 2001 From: georgehao Date: Thu, 16 Jan 2025 14:26:52 +0800 Subject: [PATCH 48/86] fix comments --- crates/scroll/alloy/consensus/src/transaction/typed.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/scroll/alloy/consensus/src/transaction/typed.rs b/crates/scroll/alloy/consensus/src/transaction/typed.rs index 3f71845950b9..5b551b1d0b49 100644 --- a/crates/scroll/alloy/consensus/src/transaction/typed.rs +++ b/crates/scroll/alloy/consensus/src/transaction/typed.rs @@ -102,7 +102,7 @@ impl ScrollTypedTransaction { } } - /// Return the inner deposit transaction if it exists. + /// Return the inner l1 message if it exists. pub const fn l1_message(&self) -> Option<&TxL1Message> { match self { Self::L1Message(tx) => Some(tx), From 5e505f20b74921b845c611bc033237029bac614b Mon Sep 17 00:00:00 2001 From: georgehao Date: Thu, 16 Jan 2025 14:42:57 +0800 Subject: [PATCH 49/86] remove l1 message's serde_bincode_compat --- crates/scroll/alloy/consensus/src/lib.rs | 12 --- .../consensus/src/transaction/l1_message.rs | 100 ------------------ .../alloy/consensus/src/transaction/mod.rs | 6 -- 3 files changed, 118 deletions(-) diff --git a/crates/scroll/alloy/consensus/src/lib.rs b/crates/scroll/alloy/consensus/src/lib.rs index c3c168455402..cbeee0be82ed 100644 --- a/crates/scroll/alloy/consensus/src/lib.rs +++ b/crates/scroll/alloy/consensus/src/lib.rs @@ -20,15 +20,3 @@ pub use receipt::ScrollReceiptEnvelope; #[cfg(feature = "serde")] pub use transaction::serde_l1_message_tx_rpc; - -/// Bincode-compatible serde implementations for consensus types. -/// -/// `bincode` crate doesn't work well with optionally serializable serde fields, but some of the -/// consensus types require optional serialization for RPC compatibility. This module makes so that -/// all fields are serialized. -/// -/// Read more: -#[cfg(all(feature = "serde", feature = "serde-bincode-compat"))] -pub mod serde_bincode_compat { - pub use super::transaction::serde_bincode_compat::TxL1Message; -} diff --git a/crates/scroll/alloy/consensus/src/transaction/l1_message.rs b/crates/scroll/alloy/consensus/src/transaction/l1_message.rs index cb4bd1b491a9..6a7eaf1be928 100644 --- a/crates/scroll/alloy/consensus/src/transaction/l1_message.rs +++ b/crates/scroll/alloy/consensus/src/transaction/l1_message.rs @@ -451,103 +451,3 @@ mod tests { validate_bitflag_backwards_compat!(TxL1Message, UnusedBits::NotZero); } } - -/// Bincode-compatible [`TxL1Message`] serde implementation. -#[cfg(all(feature = "serde", feature = "serde-bincode-compat"))] -pub(super) mod serde_bincode_compat { - extern crate alloc; - use alloc::borrow::Cow; - use alloy_primitives::{Address, Bytes, U256}; - use serde::{Deserialize, Deserializer, Serialize, Serializer}; - use serde_with::{DeserializeAs, SerializeAs}; - - /// Bincode-compatible [`super::TxL1Message`] serde implementation. - #[derive(Debug, Serialize, Deserialize)] - pub struct TxL1Message<'a> { - from: Address, - #[serde(default)] - queue_index: u64, - #[serde(default)] - gas_limit: u64, - to: Address, - value: U256, - sender: Address, - input: Cow<'a, Bytes>, - } - - impl<'a> From<&'a super::TxL1Message> for TxL1Message<'a> { - fn from(value: &'a super::TxL1Message) -> Self { - Self { - from: value.sender, - queue_index: value.queue_index, - gas_limit: value.gas_limit, - to: value.to, - value: value.value, - sender: value.sender, - input: Cow::Borrowed(&value.input), - } - } - } - - impl<'a> From> for super::TxL1Message { - fn from(value: TxL1Message<'a>) -> Self { - Self { - queue_index: value.queue_index, - gas_limit: value.gas_limit, - to: value.to, - value: value.value, - sender: value.sender, - input: value.input.into_owned(), - } - } - } - - impl SerializeAs for TxL1Message<'_> { - fn serialize_as(source: &super::TxL1Message, serializer: S) -> Result - where - S: Serializer, - { - TxL1Message::from(source).serialize(serializer) - } - } - - impl<'de> DeserializeAs<'de, super::TxL1Message> for TxL1Message<'de> { - fn deserialize_as(deserializer: D) -> Result - where - D: Deserializer<'de>, - { - TxL1Message::deserialize(deserializer).map(Into::into) - } - } - - #[cfg(test)] - mod tests { - use arbitrary::Arbitrary; - use rand::Rng; - use serde::{Deserialize, Serialize}; - use serde_with::serde_as; - - use super::super::{serde_bincode_compat, TxL1Message}; - - #[test] - fn test_tx_deposit_bincode_roundtrip() { - #[serde_as] - #[derive(Debug, PartialEq, Eq, Serialize, Deserialize)] - struct Data { - #[serde_as(as = "serde_bincode_compat::TxL1Message")] - transaction: TxL1Message, - } - - let mut bytes = [0u8; 1024]; - rand::thread_rng().fill(bytes.as_mut_slice()); - let data = Data { - transaction: TxL1Message::arbitrary(&mut arbitrary::Unstructured::new(&bytes)) - .unwrap(), - }; - - let encoded = bincode::serialize(&data).unwrap(); - let decoded: Data = bincode::deserialize(&encoded).unwrap(); - assert_eq!(decoded, data); - } - } -} diff --git a/crates/scroll/alloy/consensus/src/transaction/mod.rs b/crates/scroll/alloy/consensus/src/transaction/mod.rs index f3df9d73c3c5..40653e279e42 100644 --- a/crates/scroll/alloy/consensus/src/transaction/mod.rs +++ b/crates/scroll/alloy/consensus/src/transaction/mod.rs @@ -14,9 +14,3 @@ pub use typed::ScrollTypedTransaction; #[cfg(feature = "serde")] pub use l1_message::serde_l1_message_tx_rpc; - -/// Bincode-compatible serde implementations for transaction types. -#[cfg(all(feature = "serde", feature = "serde-bincode-compat"))] -pub(super) mod serde_bincode_compat { - pub use super::l1_message::serde_bincode_compat::TxL1Message; -} From 2cfea98a036a3f8cde1dc1e4bff913b9bb79fbd5 Mon Sep 17 00:00:00 2001 From: georgehao Date: Thu, 16 Jan 2025 14:58:59 +0800 Subject: [PATCH 50/86] fix unit test faile --- crates/scroll/alloy/consensus/src/transaction/tx_type.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/crates/scroll/alloy/consensus/src/transaction/tx_type.rs b/crates/scroll/alloy/consensus/src/transaction/tx_type.rs index a0d96fb776bb..c5616d1752f5 100644 --- a/crates/scroll/alloy/consensus/src/transaction/tx_type.rs +++ b/crates/scroll/alloy/consensus/src/transaction/tx_type.rs @@ -121,8 +121,13 @@ mod tests { #[test] fn test_all_tx_types() { - assert_eq!(ScrollTxType::ALL.len(), 2); - let all = vec![ScrollTxType::Legacy, ScrollTxType::L1Message]; + assert_eq!(ScrollTxType::ALL.len(), 4); + let all = vec![ + ScrollTxType::Legacy, + ScrollTxType::Eip1559, + ScrollTxType::Eip2930, + ScrollTxType::L1Message, + ]; assert_eq!(ScrollTxType::ALL.to_vec(), all); } From e9d89f835d7ab6ba307bac7fb0ba2ed978b70592 Mon Sep 17 00:00:00 2001 From: georgehao Date: Thu, 16 Jan 2025 15:03:11 +0800 Subject: [PATCH 51/86] update --- crates/scroll/alloy/rpc-types/src/transaction.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/scroll/alloy/rpc-types/src/transaction.rs b/crates/scroll/alloy/rpc-types/src/transaction.rs index 2e2eecc4712d..6cbfb1edbefd 100644 --- a/crates/scroll/alloy/rpc-types/src/transaction.rs +++ b/crates/scroll/alloy/rpc-types/src/transaction.rs @@ -163,7 +163,7 @@ mod tx_serde { //! //! This is needed because we might need to deserialize the `from` field into both //! [`alloy_rpc_types_eth::Transaction::from`] and - //! [`scroll_alloy_consensus::TxL1Message::from`]. + //! [`scroll_alloy_consensus::TxL1Message`]. //! //! Additionally, we need similar logic for the `gasPrice` field use super::*; From e34cb7fe48b35f2fb22ec093aa1aaaf2b62913b9 Mon Sep 17 00:00:00 2001 From: georgehao Date: Fri, 17 Jan 2025 11:23:54 +0800 Subject: [PATCH 52/86] format --- crates/trie/trie/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/trie/trie/Cargo.toml b/crates/trie/trie/Cargo.toml index 0d9dea11c3de..bcf8f8529dd1 100644 --- a/crates/trie/trie/Cargo.toml +++ b/crates/trie/trie/Cargo.toml @@ -76,7 +76,7 @@ test-utils = [ "revm/test-utils", "reth-primitives/test-utils", "reth-trie-common/test-utils", - "reth-trie-common/test-utils", + "reth-trie-common/test-utils", "reth-trie-sparse/test-utils", "reth-stages-types/test-utils", "reth-primitives-traits/test-utils" From 24b3e1f3687644a26d1bda381fae9916fdd1c365 Mon Sep 17 00:00:00 2001 From: georgehao Date: Sun, 19 Jan 2025 15:18:53 +0800 Subject: [PATCH 53/86] address comment --- .../scroll/alloy/rpc-types/src/transaction.rs | 31 +++---------------- crates/scroll/rpc/src/eth/transaction.rs | 6 ---- 2 files changed, 4 insertions(+), 33 deletions(-) diff --git a/crates/scroll/alloy/rpc-types/src/transaction.rs b/crates/scroll/alloy/rpc-types/src/transaction.rs index 6cbfb1edbefd..de208e25b791 100644 --- a/crates/scroll/alloy/rpc-types/src/transaction.rs +++ b/crates/scroll/alloy/rpc-types/src/transaction.rs @@ -22,12 +22,6 @@ pub struct Transaction { #[deref_mut] pub inner: alloy_rpc_types_eth::Transaction, - /// sender for l1 message transactions. Only present in RPC responses. - pub sender: Option
, - - /// queue index for l1 message transactions - pub queue_index: Option, - /// nonce for l1 message transactions. /// why don't put in `TxL1Message`? if put in `TxL1Message`, the payload of `l1_message` is /// wrong. @@ -182,21 +176,12 @@ mod tx_serde { with = "alloy_serde::quantity::opt" )] effective_gas_price: Option, - #[serde( - default, - rename = "queueIndex", - skip_serializing_if = "Option::is_none", - with = "alloy_serde::quantity::opt" - )] - queue_index: Option, #[serde( default, skip_serializing_if = "Option::is_none", with = "alloy_serde::quantity::opt" )] nonce: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - sender: Option
, } #[derive(Serialize, Deserialize)] @@ -226,7 +211,6 @@ mod tx_serde { effective_gas_price, from, }, - queue_index, nonce, .. } = value; @@ -239,13 +223,7 @@ mod tx_serde { block_hash, block_number, transaction_index, - other: OptionalFields { - from: Some(from), - effective_gas_price, - queue_index, - sender: Some(from), - nonce, - }, + other: OptionalFields { from: Some(from), effective_gas_price, nonce }, } } } @@ -282,8 +260,6 @@ mod tx_serde { from, effective_gas_price, }, - sender: other.sender, - queue_index: other.queue_index, nonce: other.nonce, }) } @@ -293,6 +269,7 @@ mod tx_serde { #[cfg(test)] mod tests { use super::*; + use alloy_primitives::address; #[test] fn can_deserialize_deposit() { @@ -305,8 +282,8 @@ mod tests { let ScrollTxEnvelope::L1Message(inner) = tx.as_ref() else { panic!("Expected deposit transaction"); }; - assert_eq!(tx.from, inner.sender); - assert_eq!(tx.queue_index, Some(0xe7ba0)); + assert_eq!(inner.sender, address!("7885bcbd5cecef1336b5300fb5186a12ddd8c478")); + assert_eq!(inner.queue_index, 0xe7ba0); assert_eq!(tx.inner.effective_gas_price, Some(0)); let deserialized = serde_json::to_value(&tx).unwrap(); diff --git a/crates/scroll/rpc/src/eth/transaction.rs b/crates/scroll/rpc/src/eth/transaction.rs index 64c138daf3e0..7a0a339c5473 100644 --- a/crates/scroll/rpc/src/eth/transaction.rs +++ b/crates/scroll/rpc/src/eth/transaction.rs @@ -70,8 +70,6 @@ where let from = tx.signer(); let hash = tx.hash(); let TransactionSigned { transaction, signature, .. } = tx.into_tx(); - let mut tx_sender = None; - let mut tx_queue_index = None; let inner = match transaction { reth_primitives::Transaction::Legacy(tx) => { @@ -87,8 +85,6 @@ where unreachable!() } reth_primitives::Transaction::L1Message(tx) => { - tx_queue_index = Some(tx.queue_index); - tx_sender = Some(tx.sender); ScrollTxEnvelope::L1Message(tx.seal_unchecked(hash)) } }; @@ -120,8 +116,6 @@ where from, effective_gas_price: Some(effective_gas_price), }, - sender: tx_sender, - queue_index: tx_queue_index, nonce: Some(nonce), }) } From 77abf3f50dedd514428d415d9d5a41853ddd1b1e Mon Sep 17 00:00:00 2001 From: georgehao Date: Mon, 20 Jan 2025 01:09:33 +0800 Subject: [PATCH 54/86] fix alloy request http error --- .../scroll/alloy/rpc-types/src/transaction.rs | 17 ++--------------- crates/scroll/rpc/src/eth/transaction.rs | 1 - 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/crates/scroll/alloy/rpc-types/src/transaction.rs b/crates/scroll/alloy/rpc-types/src/transaction.rs index de208e25b791..3308fb18606c 100644 --- a/crates/scroll/alloy/rpc-types/src/transaction.rs +++ b/crates/scroll/alloy/rpc-types/src/transaction.rs @@ -21,11 +21,6 @@ pub struct Transaction { #[deref] #[deref_mut] pub inner: alloy_rpc_types_eth::Transaction, - - /// nonce for l1 message transactions. - /// why don't put in `TxL1Message`? if put in `TxL1Message`, the payload of `l1_message` is - /// wrong. - pub nonce: Option, } impl Typed2718 for Transaction { @@ -176,12 +171,6 @@ mod tx_serde { with = "alloy_serde::quantity::opt" )] effective_gas_price: Option, - #[serde( - default, - skip_serializing_if = "Option::is_none", - with = "alloy_serde::quantity::opt" - )] - nonce: Option, } #[derive(Serialize, Deserialize)] @@ -211,7 +200,6 @@ mod tx_serde { effective_gas_price, from, }, - nonce, .. } = value; @@ -223,7 +211,7 @@ mod tx_serde { block_hash, block_number, transaction_index, - other: OptionalFields { from: Some(from), effective_gas_price, nonce }, + other: OptionalFields { from: Some(from), effective_gas_price }, } } } @@ -260,7 +248,6 @@ mod tx_serde { from, effective_gas_price, }, - nonce: other.nonce, }) } } @@ -275,7 +262,7 @@ mod tests { fn can_deserialize_deposit() { // cast rpc eth_getTransactionByHash // 0x5c1c3785c8bf5d7f1cb714abd1d22e32642887215602c3a14a5e9ee105bad6aa --rpc-url https://rpc.scroll.io - let rpc_tx = r#"{"blockHash":"0x018ed80ea8340984a1f4841490284d6e51d71f9e9411feeca41e007a89fbfdff","blockNumber":"0xb81121","from":"0x7885bcbd5cecef1336b5300fb5186a12ddd8c478","gas":"0x1e8480","gasPrice":"0x0","hash":"0x5c1c3785c8bf5d7f1cb714abd1d22e32642887215602c3a14a5e9ee105bad6aa","input":"0x8ef1332e000000000000000000000000c186fa914353c44b2e33ebe05f21846f1048beda0000000000000000000000003bad7ad0728f9917d1bf08af5782dcbd516cdd96000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e7ba000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000044493a4f846ffc1507cbfe98a2b0ba1f06ea7e4eb749c001f78f6cb5540daa556a0566322a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","nonce":"0x0","to":"0x781e90f1c8fc4611c9b7497c3b47f99ef6969cbc","transactionIndex":"0x0","value":"0x0","type":"0x7e","v":"0x0","r":"0x0","s":"0x0","sender":"0x7885bcbd5cecef1336b5300fb5186a12ddd8c478","queueIndex":"0xe7ba0", "yParity":"0x0"}"#; + let rpc_tx = r#"{"blockHash":"0x018ed80ea8340984a1f4841490284d6e51d71f9e9411feeca41e007a89fbfdff","blockNumber":"0xb81121","from":"0x7885bcbd5cecef1336b5300fb5186a12ddd8c478","gas":"0x1e8480","gasPrice":"0x0","hash":"0x5c1c3785c8bf5d7f1cb714abd1d22e32642887215602c3a14a5e9ee105bad6aa","input":"0x8ef1332e000000000000000000000000c186fa914353c44b2e33ebe05f21846f1048beda0000000000000000000000003bad7ad0728f9917d1bf08af5782dcbd516cdd96000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e7ba000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000044493a4f846ffc1507cbfe98a2b0ba1f06ea7e4eb749c001f78f6cb5540daa556a0566322a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","to":"0x781e90f1c8fc4611c9b7497c3b47f99ef6969cbc","transactionIndex":"0x0","value":"0x0","type":"0x7e","v":"0x0","r":"0x0","s":"0x0","sender":"0x7885bcbd5cecef1336b5300fb5186a12ddd8c478","queueIndex":"0xe7ba0", "yParity":"0x0"}"#; let tx = serde_json::from_str::(rpc_tx).unwrap(); diff --git a/crates/scroll/rpc/src/eth/transaction.rs b/crates/scroll/rpc/src/eth/transaction.rs index 7a0a339c5473..8b0bb813bbcf 100644 --- a/crates/scroll/rpc/src/eth/transaction.rs +++ b/crates/scroll/rpc/src/eth/transaction.rs @@ -116,7 +116,6 @@ where from, effective_gas_price: Some(effective_gas_price), }, - nonce: Some(nonce), }) } From ec18070f9db8c0642d58c52551158198e885abca Mon Sep 17 00:00:00 2001 From: georgehao Date: Mon, 20 Jan 2025 16:17:08 +0800 Subject: [PATCH 55/86] fix lint --- crates/scroll/alloy/consensus/src/transaction/l1_message.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/scroll/alloy/consensus/src/transaction/l1_message.rs b/crates/scroll/alloy/consensus/src/transaction/l1_message.rs index 6a7eaf1be928..c4d7b494f2bf 100644 --- a/crates/scroll/alloy/consensus/src/transaction/l1_message.rs +++ b/crates/scroll/alloy/consensus/src/transaction/l1_message.rs @@ -153,6 +153,7 @@ impl TxL1Message { } /// Calculates the in-memory size of the [`TxL1Message`] transaction. + #[allow(clippy::missing_const_for_fn)] #[inline] pub fn size(&self) -> usize { size_of::() + // queue_index From d22a49b371970cd2a42e858def9f17dd75552fef Mon Sep 17 00:00:00 2001 From: georgehao Date: Mon, 20 Jan 2025 17:44:55 +0800 Subject: [PATCH 56/86] fix lint --- crates/trie/common/src/updates.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/trie/common/src/updates.rs b/crates/trie/common/src/updates.rs index 99e2c908ca80..362356dd173d 100644 --- a/crates/trie/common/src/updates.rs +++ b/crates/trie/common/src/updates.rs @@ -361,6 +361,7 @@ pub struct TrieUpdatesSorted { impl TrieUpdatesSorted { /// Returns reference to updated account nodes. + #[allow(clippy::missing_const_for_fn)] pub fn account_nodes_ref(&self) -> &[(Nibbles, BranchNodeCompact)] { &self.account_nodes } @@ -394,6 +395,7 @@ impl StorageTrieUpdatesSorted { } /// Returns reference to updated storage nodes. + #[allow(clippy::missing_const_for_fn)] pub fn storage_nodes_ref(&self) -> &[(Nibbles, BranchNodeCompact)] { &self.storage_nodes } From a4fea38682276adcfeca1df2849a330090d9b821 Mon Sep 17 00:00:00 2001 From: georgehao Date: Mon, 20 Jan 2025 17:51:13 +0800 Subject: [PATCH 57/86] fix lint --- crates/primitives/src/block.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/primitives/src/block.rs b/crates/primitives/src/block.rs index 8c6c8a870d61..b3d4fe80f7f3 100644 --- a/crates/primitives/src/block.rs +++ b/crates/primitives/src/block.rs @@ -106,6 +106,7 @@ impl BlockWithSenders { } /// Returns all senders of the transactions in the block. + #[allow(clippy::missing_const_for_fn)] pub fn senders(&self) -> &[Address] { &self.senders } @@ -519,6 +520,7 @@ impl SealedBlockWithSenders { impl SealedBlockWithSenders { /// Returns all senders of the transactions in the block. + #[allow(clippy::missing_const_for_fn)] pub fn senders(&self) -> &[Address] { &self.senders } From 7db94a16f9c0b9622e0476808185f4138de9c577 Mon Sep 17 00:00:00 2001 From: georgehao Date: Mon, 20 Jan 2025 18:28:01 +0800 Subject: [PATCH 58/86] fix lint --- crates/chain-state/src/in_memory.rs | 5 +++++ crates/ethereum/engine-primitives/src/lib.rs | 1 + crates/ethereum/engine-primitives/src/payload.rs | 2 ++ crates/net/eth-wire-types/src/capability.rs | 1 + crates/net/network/src/network.rs | 5 +++++ crates/net/network/src/test_utils/testnet.rs | 2 ++ crates/revm/src/batch.rs | 1 + crates/rpc/rpc-eth-types/src/fee_history.rs | 1 + crates/storage/db/src/lib.rs | 1 + crates/storage/db/src/tables/raw.rs | 1 + crates/storage/libmdbx-rs/src/environment.rs | 4 ++++ crates/storage/libmdbx-rs/src/transaction.rs | 2 ++ crates/storage/nippy-jar/src/lib.rs | 1 + crates/storage/nippy-jar/src/writer.rs | 1 + crates/storage/provider/src/providers/database/provider.rs | 1 + crates/storage/provider/src/providers/static_file/manager.rs | 3 +++ crates/transaction-pool/src/lib.rs | 1 + crates/transaction-pool/src/pool/mod.rs | 3 +++ crates/transaction-pool/src/pool/pending.rs | 1 + crates/transaction-pool/src/validate/eth.rs | 3 +++ 20 files changed, 40 insertions(+) diff --git a/crates/chain-state/src/in_memory.rs b/crates/chain-state/src/in_memory.rs index 9edc42d5e505..a8c408e684f2 100644 --- a/crates/chain-state/src/in_memory.rs +++ b/crates/chain-state/src/in_memory.rs @@ -827,11 +827,13 @@ impl ExecutedBlock { } /// Returns a reference to the executed block. + #[allow(clippy::missing_const_for_fn)] pub fn block(&self) -> &SealedBlockFor { &self.block } /// Returns a reference to the block's senders + #[allow(clippy::missing_const_for_fn)] pub fn senders(&self) -> &Vec
{ &self.senders } @@ -844,16 +846,19 @@ impl ExecutedBlock { } /// Returns a reference to the block's execution outcome + #[allow(clippy::missing_const_for_fn)] pub fn execution_outcome(&self) -> &ExecutionOutcome { &self.execution_output } /// Returns a reference to the hashed state result of the execution outcome + #[allow(clippy::missing_const_for_fn)] pub fn hashed_state(&self) -> &HashedPostState { &self.hashed_state } /// Returns a reference to the trie updates for the block + #[allow(clippy::missing_const_for_fn)] pub fn trie_updates(&self) -> &TrieUpdates { &self.trie } diff --git a/crates/ethereum/engine-primitives/src/lib.rs b/crates/ethereum/engine-primitives/src/lib.rs index 350780d0bdad..010196e26909 100644 --- a/crates/ethereum/engine-primitives/src/lib.rs +++ b/crates/ethereum/engine-primitives/src/lib.rs @@ -87,6 +87,7 @@ impl EthereumEngineValidator { /// Returns the chain spec used by the validator. #[inline] + #[allow(clippy::missing_const_for_fn)] fn chain_spec(&self) -> &ChainSpec { self.inner.chain_spec() } diff --git a/crates/ethereum/engine-primitives/src/payload.rs b/crates/ethereum/engine-primitives/src/payload.rs index 450302598ecd..97042fce3ea0 100644 --- a/crates/ethereum/engine-primitives/src/payload.rs +++ b/crates/ethereum/engine-primitives/src/payload.rs @@ -59,6 +59,7 @@ impl EthBuiltPayload { } /// Returns the built block(sealed) + #[allow(clippy::missing_const_for_fn)] pub fn block(&self) -> &SealedBlock { &self.block } @@ -69,6 +70,7 @@ impl EthBuiltPayload { } /// Returns the blob sidecars. + #[allow(clippy::missing_const_for_fn)] pub fn sidecars(&self) -> &[BlobTransactionSidecar] { &self.sidecars } diff --git a/crates/net/eth-wire-types/src/capability.rs b/crates/net/eth-wire-types/src/capability.rs index 2002a03aea62..e3bc86976e9a 100644 --- a/crates/net/eth-wire-types/src/capability.rs +++ b/crates/net/eth-wire-types/src/capability.rs @@ -109,6 +109,7 @@ pub struct Capabilities { impl Capabilities { /// Returns all capabilities. #[inline] + #[allow(clippy::missing_const_for_fn)] pub fn capabilities(&self) -> &[Capability] { &self.inner } diff --git a/crates/net/network/src/network.rs b/crates/net/network/src/network.rs index a25ad0490818..10866d1ca231 100644 --- a/crates/net/network/src/network.rs +++ b/crates/net/network/src/network.rs @@ -88,15 +88,18 @@ impl NetworkHandle { } /// Returns the [`PeerId`] used in the network. + #[allow(clippy::missing_const_for_fn)] pub fn peer_id(&self) -> &PeerId { &self.inner.local_peer_id } + #[allow(clippy::missing_const_for_fn)] fn manager(&self) -> &UnboundedSender> { &self.inner.to_manager_tx } /// Returns the mode of the network, either pow, or pos + #[allow(clippy::missing_const_for_fn)] pub fn mode(&self) -> &NetworkMode { &self.inner.network_mode } @@ -182,11 +185,13 @@ impl NetworkHandle { } /// Whether tx gossip is disabled + #[allow(clippy::missing_const_for_fn)] pub fn tx_gossip_disabled(&self) -> bool { self.inner.tx_gossip_disabled } /// Returns the secret key used for authenticating sessions. + #[allow(clippy::missing_const_for_fn)] pub fn secret_key(&self) -> &SecretKey { &self.inner.secret_key } diff --git a/crates/net/network/src/test_utils/testnet.rs b/crates/net/network/src/test_utils/testnet.rs index 3477387c56ab..1e4bb174508a 100644 --- a/crates/net/network/src/test_utils/testnet.rs +++ b/crates/net/network/src/test_utils/testnet.rs @@ -100,6 +100,7 @@ where } /// Return a slice of all peers. + #[allow(clippy::missing_const_for_fn)] pub fn peers(&self) -> &[Peer] { &self.peers } @@ -331,6 +332,7 @@ impl TestnetHandle { } /// Returns the [`PeerHandle`]s of this [`Testnet`]. + #[allow(clippy::missing_const_for_fn)] pub fn peers(&self) -> &[PeerHandle] { &self.peers } diff --git a/crates/revm/src/batch.rs b/crates/revm/src/batch.rs index c980bdc987c3..5a7289d99597 100644 --- a/crates/revm/src/batch.rs +++ b/crates/revm/src/batch.rs @@ -101,6 +101,7 @@ impl BlockBatchRecord { } /// Returns the recorded requests. + #[allow(clippy::missing_const_for_fn)] pub fn requests(&self) -> &[Requests] { &self.requests } diff --git a/crates/rpc/rpc-eth-types/src/fee_history.rs b/crates/rpc/rpc-eth-types/src/fee_history.rs index ae509dd2fdb4..5de13dcaa415 100644 --- a/crates/rpc/rpc-eth-types/src/fee_history.rs +++ b/crates/rpc/rpc-eth-types/src/fee_history.rs @@ -48,6 +48,7 @@ impl FeeHistoryCache { /// How the cache is configured. #[inline] + #[allow(clippy::missing_const_for_fn)] pub fn config(&self) -> &FeeHistoryCacheConfig { &self.inner.config } diff --git a/crates/storage/db/src/lib.rs b/crates/storage/db/src/lib.rs index 7e6a6932bdd7..67a6f0aefaf6 100644 --- a/crates/storage/db/src/lib.rs +++ b/crates/storage/db/src/lib.rs @@ -112,6 +112,7 @@ pub mod test_utils { } /// Returns the path to the database. + #[allow(clippy::missing_const_for_fn)] pub fn path(&self) -> &Path { &self.path } diff --git a/crates/storage/db/src/tables/raw.rs b/crates/storage/db/src/tables/raw.rs index 18fe0da23cd8..6dc54a8d698d 100644 --- a/crates/storage/db/src/tables/raw.rs +++ b/crates/storage/db/src/tables/raw.rs @@ -134,6 +134,7 @@ impl RawValue { } /// Returns the raw value as seen on the database. + #[allow(clippy::missing_const_for_fn)] pub fn raw_value(&self) -> &[u8] { &self.value } diff --git a/crates/storage/libmdbx-rs/src/environment.rs b/crates/storage/libmdbx-rs/src/environment.rs index 56eb8bf5c8bd..0b1335d63f8f 100644 --- a/crates/storage/libmdbx-rs/src/environment.rs +++ b/crates/storage/libmdbx-rs/src/environment.rs @@ -60,12 +60,14 @@ impl Environment { /// Returns true if the environment was opened as WRITEMAP. #[inline] + #[allow(clippy::missing_const_for_fn)] pub fn is_write_map(&self) -> bool { self.inner.env_kind.is_write_map() } /// Returns the kind of the environment. #[inline] + #[allow(clippy::missing_const_for_fn)] pub fn env_kind(&self) -> EnvironmentKind { self.inner.env_kind } @@ -84,6 +86,7 @@ impl Environment { /// Returns the transaction manager. #[inline] + #[allow(clippy::missing_const_for_fn)] pub(crate) fn txn_manager(&self) -> &TxnManager { &self.inner.txn_manager } @@ -131,6 +134,7 @@ impl Environment { /// The caller **must** ensure that the pointer is never dereferenced after the environment has /// been dropped. #[inline] + #[allow(clippy::missing_const_for_fn)] pub(crate) fn env_ptr(&self) -> *mut ffi::MDBX_env { self.inner.env } diff --git a/crates/storage/libmdbx-rs/src/transaction.rs b/crates/storage/libmdbx-rs/src/transaction.rs index 84b2dabc90a8..bed1c8433841 100644 --- a/crates/storage/libmdbx-rs/src/transaction.rs +++ b/crates/storage/libmdbx-rs/src/transaction.rs @@ -130,11 +130,13 @@ where /// Returns a copy of the raw pointer to the underlying MDBX transaction. #[doc(hidden)] #[cfg(test)] + #[allow(clippy::missing_const_for_fn)] pub fn txn(&self) -> *mut ffi::MDBX_txn { self.inner.txn.txn } /// Returns a raw pointer to the MDBX environment. + #[allow(clippy::missing_const_for_fn)] pub fn env(&self) -> &Environment { &self.inner.env } diff --git a/crates/storage/nippy-jar/src/lib.rs b/crates/storage/nippy-jar/src/lib.rs index c6546af89bd4..3bbfb3a299ce 100644 --- a/crates/storage/nippy-jar/src/lib.rs +++ b/crates/storage/nippy-jar/src/lib.rs @@ -413,6 +413,7 @@ impl DataReader { } /// Returns total size of data + #[allow(clippy::missing_const_for_fn)] pub fn size(&self) -> usize { self.data_mmap.len() } diff --git a/crates/storage/nippy-jar/src/writer.rs b/crates/storage/nippy-jar/src/writer.rs index 3a1003bee764..c3670b8e0261 100644 --- a/crates/storage/nippy-jar/src/writer.rs +++ b/crates/storage/nippy-jar/src/writer.rs @@ -430,6 +430,7 @@ impl NippyJarWriter { /// Returns a reference to the offsets vector. #[cfg(test)] + #[allow(clippy::missing_const_for_fn)] pub fn offsets(&self) -> &[u64] { &self.offsets } diff --git a/crates/storage/provider/src/providers/database/provider.rs b/crates/storage/provider/src/providers/database/provider.rs index 5dc30b5c1451..b310582dccfe 100644 --- a/crates/storage/provider/src/providers/database/provider.rs +++ b/crates/storage/provider/src/providers/database/provider.rs @@ -539,6 +539,7 @@ impl DatabaseProvider { } /// Returns a reference to the chain specification. + #[allow(clippy::missing_const_for_fn)] pub fn chain_spec(&self) -> &N::ChainSpec { &self.chain_spec } diff --git a/crates/storage/provider/src/providers/static_file/manager.rs b/crates/storage/provider/src/providers/static_file/manager.rs index e81c42284d41..f2c8c7854549 100644 --- a/crates/storage/provider/src/providers/static_file/manager.rs +++ b/crates/storage/provider/src/providers/static_file/manager.rs @@ -1073,6 +1073,7 @@ impl StaticFileProvider { } /// Returns directory where `static_files` are located. + #[allow(clippy::missing_const_for_fn)] pub fn directory(&self) -> &Path { &self.path } @@ -1166,12 +1167,14 @@ impl StaticFileProvider { /// Returns `static_files` directory #[cfg(any(test, feature = "test-utils"))] + #[allow(clippy::missing_const_for_fn)] pub fn path(&self) -> &Path { &self.path } /// Returns `static_files` transaction index #[cfg(any(test, feature = "test-utils"))] + #[allow(clippy::missing_const_for_fn)] pub fn tx_index(&self) -> &RwLock { &self.static_files_tx_index } diff --git a/crates/transaction-pool/src/lib.rs b/crates/transaction-pool/src/lib.rs index 56fe99421d5a..12b42235a121 100644 --- a/crates/transaction-pool/src/lib.rs +++ b/crates/transaction-pool/src/lib.rs @@ -228,6 +228,7 @@ where } /// Returns the wrapped pool. + #[allow(clippy::missing_const_for_fn)] pub(crate) fn inner(&self) -> &PoolInner { &self.pool } diff --git a/crates/transaction-pool/src/pool/mod.rs b/crates/transaction-pool/src/pool/mod.rs index a7c16d05aa8e..0f6714b5095f 100644 --- a/crates/transaction-pool/src/pool/mod.rs +++ b/crates/transaction-pool/src/pool/mod.rs @@ -1078,6 +1078,7 @@ impl AddedPendingTransaction { } /// Returns if the transaction should be propagated. + #[allow(clippy::missing_const_for_fn)] pub(crate) fn is_propagate_allowed(&self) -> bool { self.transaction.propagate } @@ -1168,6 +1169,7 @@ impl AddedTransaction { } /// Returns the discarded transactions if there were any + #[allow(clippy::missing_const_for_fn)] pub(crate) fn discarded_transactions(&self) -> Option<&[Arc>]> { match self { Self::Pending(tx) => Some(&tx.discarded), @@ -1211,6 +1213,7 @@ impl AddedTransaction { /// Returns the [`TransactionId`] of the added transaction #[cfg(test)] + #[allow(clippy::missing_const_for_fn)] pub(crate) fn id(&self) -> &TransactionId { match self { Self::Pending(added) => added.transaction.id(), diff --git a/crates/transaction-pool/src/pool/pending.rs b/crates/transaction-pool/src/pool/pending.rs index 27706bd17543..6d81b929e74b 100644 --- a/crates/transaction-pool/src/pool/pending.rs +++ b/crates/transaction-pool/src/pool/pending.rs @@ -560,6 +560,7 @@ pub(crate) struct PendingTransaction { impl PendingTransaction { /// The next transaction of the sender: `nonce + 1` + #[allow(clippy::missing_const_for_fn)] pub(crate) fn unlocks(&self) -> TransactionId { self.transaction.transaction_id.descendant() } diff --git a/crates/transaction-pool/src/validate/eth.rs b/crates/transaction-pool/src/validate/eth.rs index f6733a5c1aa9..18f4fce8eb51 100644 --- a/crates/transaction-pool/src/validate/eth.rs +++ b/crates/transaction-pool/src/validate/eth.rs @@ -45,11 +45,13 @@ pub struct EthTransactionValidator { impl EthTransactionValidator { /// Returns the configured chain spec + #[allow(clippy::missing_const_for_fn)] pub fn chain_spec(&self) -> &Arc { &self.inner.chain_spec } /// Returns the configured client + #[allow(clippy::missing_const_for_fn)] pub fn client(&self) -> &Client { &self.inner.client } @@ -165,6 +167,7 @@ pub(crate) struct EthTransactionValidatorInner { impl EthTransactionValidatorInner { /// Returns the configured chain id + #[allow(clippy::missing_const_for_fn)] pub(crate) fn chain_id(&self) -> u64 { self.chain_spec.chain().id() } From 7ad0d250d69a3537a0477468162d7f8a918e9146 Mon Sep 17 00:00:00 2001 From: georgehao Date: Mon, 20 Jan 2025 18:48:13 +0800 Subject: [PATCH 59/86] fix lint --- crates/optimism/node/src/engine.rs | 1 + crates/optimism/payload/src/builder.rs | 1 + crates/optimism/payload/src/payload.rs | 1 + crates/optimism/rpc/src/eth/mod.rs | 2 ++ crates/optimism/rpc/src/sequencer.rs | 2 ++ crates/rpc/rpc/src/debug.rs | 1 + crates/rpc/rpc/src/eth/bundle.rs | 1 + crates/rpc/rpc/src/eth/filter.rs | 1 + crates/rpc/rpc/src/eth/sim_bundle.rs | 1 + crates/rpc/rpc/src/reth.rs | 1 + crates/rpc/rpc/src/trace.rs | 1 + crates/scroll/rpc/src/eth/mod.rs | 1 + crates/scroll/rpc/src/eth/transaction.rs | 1 - 13 files changed, 14 insertions(+), 1 deletion(-) diff --git a/crates/optimism/node/src/engine.rs b/crates/optimism/node/src/engine.rs index cb4c88e9d52a..d655dbdeec3c 100644 --- a/crates/optimism/node/src/engine.rs +++ b/crates/optimism/node/src/engine.rs @@ -84,6 +84,7 @@ impl OpEngineValidator { /// Returns the chain spec used by the validator. #[inline] + #[allow(clippy::missing_const_for_fn)] fn chain_spec(&self) -> &OpChainSpec { self.inner.chain_spec() } diff --git a/crates/optimism/payload/src/builder.rs b/crates/optimism/payload/src/builder.rs index 3cf673a157aa..af035e916447 100644 --- a/crates/optimism/payload/src/builder.rs +++ b/crates/optimism/payload/src/builder.rs @@ -570,6 +570,7 @@ pub struct OpPayloadBuilderCtx { impl OpPayloadBuilderCtx { /// Returns the parent block the payload will be build on. + #[allow(clippy::missing_const_for_fn)] pub fn parent(&self) -> &SealedHeader { &self.config.parent_header } diff --git a/crates/optimism/payload/src/payload.rs b/crates/optimism/payload/src/payload.rs index 2b7c683df855..511af75d479c 100644 --- a/crates/optimism/payload/src/payload.rs +++ b/crates/optimism/payload/src/payload.rs @@ -170,6 +170,7 @@ impl OpBuiltPayload { } /// Returns the built block(sealed) + #[allow(clippy::missing_const_for_fn)] pub fn block(&self) -> &SealedBlockFor { &self.block } diff --git a/crates/optimism/rpc/src/eth/mod.rs b/crates/optimism/rpc/src/eth/mod.rs index ebcbaed12d13..9e6e5b6895b0 100644 --- a/crates/optimism/rpc/src/eth/mod.rs +++ b/crates/optimism/rpc/src/eth/mod.rs @@ -80,11 +80,13 @@ where >, { /// Returns a reference to the [`EthApiNodeBackend`]. + #[allow(clippy::missing_const_for_fn)] pub fn eth_api(&self) -> &EthApiNodeBackend { self.inner.eth_api() } /// Returns the configured sequencer client, if any. + #[allow(clippy::missing_const_for_fn)] pub fn sequencer_client(&self) -> Option<&SequencerClient> { self.inner.sequencer_client() } diff --git a/crates/optimism/rpc/src/sequencer.rs b/crates/optimism/rpc/src/sequencer.rs index 43a23cb9e163..26e3a636f932 100644 --- a/crates/optimism/rpc/src/sequencer.rs +++ b/crates/optimism/rpc/src/sequencer.rs @@ -36,11 +36,13 @@ impl SequencerClient { } /// Returns the network of the client + #[allow(clippy::missing_const_for_fn)] pub fn endpoint(&self) -> &str { &self.inner.sequencer_endpoint } /// Returns the client + #[allow(clippy::missing_const_for_fn)] pub fn http_client(&self) -> &Client { &self.inner.http_client } diff --git a/crates/rpc/rpc/src/debug.rs b/crates/rpc/rpc/src/debug.rs index b88bac816f8b..c009632a3ca7 100644 --- a/crates/rpc/rpc/src/debug.rs +++ b/crates/rpc/rpc/src/debug.rs @@ -66,6 +66,7 @@ impl DebugApi { } /// Access the underlying `Eth` API. + #[allow(clippy::missing_const_for_fn)] pub fn eth_api(&self) -> &Eth { &self.inner.eth_api } diff --git a/crates/rpc/rpc/src/eth/bundle.rs b/crates/rpc/rpc/src/eth/bundle.rs index 3cc1c1391638..578ca7809450 100644 --- a/crates/rpc/rpc/src/eth/bundle.rs +++ b/crates/rpc/rpc/src/eth/bundle.rs @@ -39,6 +39,7 @@ impl EthBundle { } /// Access the underlying `Eth` API. + #[allow(clippy::missing_const_for_fn)] pub fn eth_api(&self) -> &Eth { &self.inner.eth_api } diff --git a/crates/rpc/rpc/src/eth/filter.rs b/crates/rpc/rpc/src/eth/filter.rs index 337fbb91e06d..4ca1796fc0ea 100644 --- a/crates/rpc/rpc/src/eth/filter.rs +++ b/crates/rpc/rpc/src/eth/filter.rs @@ -98,6 +98,7 @@ where } /// Returns all currently active filters + #[allow(clippy::missing_const_for_fn)] pub fn active_filters(&self) -> &ActiveFilters> { &self.inner.active_filters } diff --git a/crates/rpc/rpc/src/eth/sim_bundle.rs b/crates/rpc/rpc/src/eth/sim_bundle.rs index de2597b64a3f..35d92fcbf8ae 100644 --- a/crates/rpc/rpc/src/eth/sim_bundle.rs +++ b/crates/rpc/rpc/src/eth/sim_bundle.rs @@ -78,6 +78,7 @@ impl EthSimBundle { } /// Access the underlying `Eth` API. + #[allow(clippy::missing_const_for_fn)] pub fn eth_api(&self) -> &Eth { &self.inner.eth_api } diff --git a/crates/rpc/rpc/src/reth.rs b/crates/rpc/rpc/src/reth.rs index dbd6398465f0..6f0008c8c0b2 100644 --- a/crates/rpc/rpc/src/reth.rs +++ b/crates/rpc/rpc/src/reth.rs @@ -22,6 +22,7 @@ pub struct RethApi { impl RethApi { /// The provider that can interact with the chain. + #[allow(clippy::missing_const_for_fn)] pub fn provider(&self) -> &Provider { &self.inner.provider } diff --git a/crates/rpc/rpc/src/trace.rs b/crates/rpc/rpc/src/trace.rs index d906419021b9..cfc1cafb1f85 100644 --- a/crates/rpc/rpc/src/trace.rs +++ b/crates/rpc/rpc/src/trace.rs @@ -60,6 +60,7 @@ impl TraceApi { } /// Access the underlying `Eth` API. + #[allow(clippy::missing_const_for_fn)] pub fn eth_api(&self) -> &Eth { &self.inner.eth_api } diff --git a/crates/scroll/rpc/src/eth/mod.rs b/crates/scroll/rpc/src/eth/mod.rs index 8e298efbe4c3..55241c1a136b 100644 --- a/crates/scroll/rpc/src/eth/mod.rs +++ b/crates/scroll/rpc/src/eth/mod.rs @@ -79,6 +79,7 @@ where >, { /// Returns a reference to the [`EthApiNodeBackend`]. + #[allow(clippy::missing_const_for_fn)] pub fn eth_api(&self) -> &EthApiNodeBackend { self.inner.eth_api() } diff --git a/crates/scroll/rpc/src/eth/transaction.rs b/crates/scroll/rpc/src/eth/transaction.rs index 8b0bb813bbcf..d817ddc1da28 100644 --- a/crates/scroll/rpc/src/eth/transaction.rs +++ b/crates/scroll/rpc/src/eth/transaction.rs @@ -105,7 +105,6 @@ where }) .unwrap_or_else(|| inner.max_fee_per_gas()) }; - let nonce = inner.nonce(); Ok(Transaction { inner: alloy_rpc_types_eth::Transaction { From 42de38f5019e26ac776909baa481699295b284bb Mon Sep 17 00:00:00 2001 From: georgehao Date: Mon, 20 Jan 2025 20:16:57 +0800 Subject: [PATCH 60/86] trigger ci --- crates/scroll/alloy/consensus/src/receipt/envelope.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/scroll/alloy/consensus/src/receipt/envelope.rs b/crates/scroll/alloy/consensus/src/receipt/envelope.rs index 7b3354865f68..37b1e968cce9 100644 --- a/crates/scroll/alloy/consensus/src/receipt/envelope.rs +++ b/crates/scroll/alloy/consensus/src/receipt/envelope.rs @@ -333,4 +333,5 @@ mod tests { assert_eq!(receipt.logs().len(), 0); assert_eq!(receipt.tx_type(), ScrollTxType::L1Message); } + } From d34bd3ea7833046e530f7d7b8d9d2ddbc78e304d Mon Sep 17 00:00:00 2001 From: georgehao Date: Mon, 20 Jan 2025 20:19:45 +0800 Subject: [PATCH 61/86] trigger ci --- crates/scroll/alloy/consensus/src/receipt/envelope.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/crates/scroll/alloy/consensus/src/receipt/envelope.rs b/crates/scroll/alloy/consensus/src/receipt/envelope.rs index 37b1e968cce9..7b3354865f68 100644 --- a/crates/scroll/alloy/consensus/src/receipt/envelope.rs +++ b/crates/scroll/alloy/consensus/src/receipt/envelope.rs @@ -333,5 +333,4 @@ mod tests { assert_eq!(receipt.logs().len(), 0); assert_eq!(receipt.tx_type(), ScrollTxType::L1Message); } - } From 067cc4da6edcfdcb5fa22960b33d16aa78a2b31f Mon Sep 17 00:00:00 2001 From: georgehao Date: Mon, 20 Jan 2025 22:07:59 +0800 Subject: [PATCH 62/86] update --- .github/workflows/unit.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index 539396277c2a..57991b32ac5e 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -49,7 +49,7 @@ jobs: args: --manifest-path book/sources/Cargo.toml --workspace --exclude ef-tests partition: 1 total_partitions: 1 - timeout-minutes: 30 + timeout-minutes: 300 steps: - name: Free up disk space run: rm -rf /opt/hostedtoolcache @@ -77,7 +77,7 @@ jobs: env: RUST_LOG: info,sync=error RUST_BACKTRACE: 1 - timeout-minutes: 30 + timeout-minutes: 300 steps: - name: Free up disk space run: rm -rf /opt/hostedtoolcache @@ -102,7 +102,7 @@ jobs: runs-on: ubuntu-latest env: RUST_BACKTRACE: 1 - timeout-minutes: 30 + timeout-minutes: 300 strategy: matrix: network: ["ethereum", "optimism"] @@ -120,7 +120,7 @@ jobs: runs-on: ubuntu-latest if: always() needs: [test, state, doc] - timeout-minutes: 30 + timeout-minutes: 300 steps: - name: Decide whether the needed jobs succeeded or failed uses: re-actors/alls-green@release/v1 From 2582a5822cf3fced1708f56319b518403b6d455f Mon Sep 17 00:00:00 2001 From: georgehao Date: Mon, 20 Jan 2025 22:44:10 +0800 Subject: [PATCH 63/86] update --- .github/workflows/unit.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index 57991b32ac5e..1a469ba71897 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -14,7 +14,7 @@ env: concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true + cancel-in-progress: false jobs: test: @@ -49,7 +49,7 @@ jobs: args: --manifest-path book/sources/Cargo.toml --workspace --exclude ef-tests partition: 1 total_partitions: 1 - timeout-minutes: 300 + timeout-minutes: 30 steps: - name: Free up disk space run: rm -rf /opt/hostedtoolcache @@ -77,7 +77,7 @@ jobs: env: RUST_LOG: info,sync=error RUST_BACKTRACE: 1 - timeout-minutes: 300 + timeout-minutes: 30 steps: - name: Free up disk space run: rm -rf /opt/hostedtoolcache @@ -102,7 +102,7 @@ jobs: runs-on: ubuntu-latest env: RUST_BACKTRACE: 1 - timeout-minutes: 300 + timeout-minutes: 30 strategy: matrix: network: ["ethereum", "optimism"] @@ -120,7 +120,7 @@ jobs: runs-on: ubuntu-latest if: always() needs: [test, state, doc] - timeout-minutes: 300 + timeout-minutes: 30 steps: - name: Decide whether the needed jobs succeeded or failed uses: re-actors/alls-green@release/v1 From 3013de68d7f77c7b476ee91a3691d18d853a6fe9 Mon Sep 17 00:00:00 2001 From: georgehao Date: Mon, 20 Jan 2025 23:51:46 +0800 Subject: [PATCH 64/86] test --- crates/rpc/rpc/src/eth/core.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/rpc/rpc/src/eth/core.rs b/crates/rpc/rpc/src/eth/core.rs index cf5753a34c18..eba778d6847d 100644 --- a/crates/rpc/rpc/src/eth/core.rs +++ b/crates/rpc/rpc/src/eth/core.rs @@ -695,6 +695,8 @@ mod tests { let fee_history = eth_api.fee_history(U64::from(1), newest_block.into(), None).await.unwrap(); + println!("left: {:#?}", fee_history.base_fee_per_gas); + println!("right: {:#?}", &base_fees_per_gas[base_fees_per_gas.len() - 2..]); assert_eq!( fee_history.base_fee_per_gas, &base_fees_per_gas[base_fees_per_gas.len() - 2..], From 59a2ad070f978652491b0b61144fe39536449dde Mon Sep 17 00:00:00 2001 From: georgehao Date: Mon, 20 Jan 2025 23:52:38 +0800 Subject: [PATCH 65/86] update --- .github/workflows/unit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index 1a469ba71897..539396277c2a 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -14,7 +14,7 @@ env: concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: false + cancel-in-progress: true jobs: test: From e69ae52b7cb8af67c525c7b453afc0918abfae90 Mon Sep 17 00:00:00 2001 From: georgehao Date: Tue, 21 Jan 2025 00:17:39 +0800 Subject: [PATCH 66/86] test --- .github/workflows/unit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index 539396277c2a..234d9aed51c6 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -90,7 +90,7 @@ jobs: path: testing/ef-tests/ethereum-tests submodules: recursive fetch-depth: 1 - - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@nightly - uses: taiki-e/install-action@nextest - uses: Swatinem/rust-cache@v2 with: From 44f528c5ca48f9f0a54804e7e44914da1eb468a9 Mon Sep 17 00:00:00 2001 From: georgehao Date: Tue, 21 Jan 2025 00:25:41 +0800 Subject: [PATCH 67/86] large runner --- .github/workflows/unit.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index 234d9aed51c6..68923d252b58 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -20,6 +20,8 @@ jobs: test: name: test / ${{ matrix.type }} (${{ matrix.partition }}/${{ matrix.total_partitions }}) runs-on: ubuntu-latest + container: + options: --cpus=4 --memory=16g env: RUST_BACKTRACE: 1 strategy: @@ -90,7 +92,7 @@ jobs: path: testing/ef-tests/ethereum-tests submodules: recursive fetch-depth: 1 - - uses: dtolnay/rust-toolchain@nightly + - uses: dtolnay/rust-toolchain@stable - uses: taiki-e/install-action@nextest - uses: Swatinem/rust-cache@v2 with: From 98a0b0b1036106e7558e73565e8961a0232354be Mon Sep 17 00:00:00 2001 From: georgehao Date: Tue, 21 Jan 2025 00:45:16 +0800 Subject: [PATCH 68/86] remove unused code --- crates/rpc/rpc/src/eth/core.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/crates/rpc/rpc/src/eth/core.rs b/crates/rpc/rpc/src/eth/core.rs index eba778d6847d..cf5753a34c18 100644 --- a/crates/rpc/rpc/src/eth/core.rs +++ b/crates/rpc/rpc/src/eth/core.rs @@ -695,8 +695,6 @@ mod tests { let fee_history = eth_api.fee_history(U64::from(1), newest_block.into(), None).await.unwrap(); - println!("left: {:#?}", fee_history.base_fee_per_gas); - println!("right: {:#?}", &base_fees_per_gas[base_fees_per_gas.len() - 2..]); assert_eq!( fee_history.base_fee_per_gas, &base_fees_per_gas[base_fees_per_gas.len() - 2..], From f4d07e28c05f0fd6c99732adf7e8bc9e7885277f Mon Sep 17 00:00:00 2001 From: georgehao Date: Tue, 21 Jan 2025 00:56:00 +0800 Subject: [PATCH 69/86] change runner --- .github/workflows/unit.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index 68923d252b58..e0aa98d26280 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -19,9 +19,7 @@ concurrency: jobs: test: name: test / ${{ matrix.type }} (${{ matrix.partition }}/${{ matrix.total_partitions }}) - runs-on: ubuntu-latest - container: - options: --cpus=4 --memory=16g + runs-on: ubuntu-latest-8-cores env: RUST_BACKTRACE: 1 strategy: From d4509329dc931f6fa2ac0fe079d26d18d986679b Mon Sep 17 00:00:00 2001 From: georgehao Date: Tue, 21 Jan 2025 01:07:22 +0800 Subject: [PATCH 70/86] update --- .github/workflows/unit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index e0aa98d26280..dd0136a85f75 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -19,7 +19,7 @@ concurrency: jobs: test: name: test / ${{ matrix.type }} (${{ matrix.partition }}/${{ matrix.total_partitions }}) - runs-on: ubuntu-latest-8-cores + runs-on: ubuntu-latest-8 env: RUST_BACKTRACE: 1 strategy: From e8eb4404f02969d152cf7392669d996dc475c1d0 Mon Sep 17 00:00:00 2001 From: georgehao Date: Tue, 21 Jan 2025 01:08:25 +0800 Subject: [PATCH 71/86] update --- .github/workflows/unit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index dd0136a85f75..539396277c2a 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -19,7 +19,7 @@ concurrency: jobs: test: name: test / ${{ matrix.type }} (${{ matrix.partition }}/${{ matrix.total_partitions }}) - runs-on: ubuntu-latest-8 + runs-on: ubuntu-latest env: RUST_BACKTRACE: 1 strategy: From 6c5ca69e95ed9470359fd61e534e8fd42459cff2 Mon Sep 17 00:00:00 2001 From: georgehao Date: Tue, 21 Jan 2025 14:20:31 +0800 Subject: [PATCH 72/86] test timeout --- .github/workflows/unit.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index 539396277c2a..ca2b2e9a0630 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -20,6 +20,7 @@ jobs: test: name: test / ${{ matrix.type }} (${{ matrix.partition }}/${{ matrix.total_partitions }}) runs-on: ubuntu-latest + timeout-minutes: 60 env: RUST_BACKTRACE: 1 strategy: From ba207f5d4db68602d310fa9ce085550398fa8533 Mon Sep 17 00:00:00 2001 From: georgehao Date: Tue, 21 Jan 2025 14:23:29 +0800 Subject: [PATCH 73/86] update --- .github/workflows/unit.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index ca2b2e9a0630..539396277c2a 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -20,7 +20,6 @@ jobs: test: name: test / ${{ matrix.type }} (${{ matrix.partition }}/${{ matrix.total_partitions }}) runs-on: ubuntu-latest - timeout-minutes: 60 env: RUST_BACKTRACE: 1 strategy: From ec836f3e2c01017fe2be5302b7a1155296aaaedb Mon Sep 17 00:00:00 2001 From: georgehao Date: Tue, 21 Jan 2025 14:23:50 +0800 Subject: [PATCH 74/86] update --- .github/workflows/unit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index 539396277c2a..59e7e10263ee 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -49,7 +49,7 @@ jobs: args: --manifest-path book/sources/Cargo.toml --workspace --exclude ef-tests partition: 1 total_partitions: 1 - timeout-minutes: 30 + timeout-minutes: 60 steps: - name: Free up disk space run: rm -rf /opt/hostedtoolcache From 4d66a59f55ad73dfe060198928e5c80b81b8c39e Mon Sep 17 00:00:00 2001 From: georgehao Date: Tue, 21 Jan 2025 14:36:36 +0800 Subject: [PATCH 75/86] update --- .github/workflows/unit.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index 59e7e10263ee..890081a5f389 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -22,6 +22,7 @@ jobs: runs-on: ubuntu-latest env: RUST_BACKTRACE: 1 + CARGO_HTTP_MULTIPLEXING: ${{ steps.set_env.outputs.value }} strategy: matrix: include: @@ -59,6 +60,14 @@ jobs: with: cache-on-failure: true - uses: taiki-e/install-action@nextest + - name: Set CARGO_HTTP_MULTIPLEXING if Rust version is 1.70.x + id: set_env + run: | + if rustc +stable --version --verbose | grep -q '^release: 1\.7[01]\.'; then + echo "::set-output name=value::false" + else + echo "::set-output name=value::true" + fi - if: "${{ matrix.type == 'book' }}" uses: arduino/setup-protoc@v3 with: From f40fdc3d9cfe3de1af5fb3c96892e9013f6867c6 Mon Sep 17 00:00:00 2001 From: georgehao Date: Tue, 21 Jan 2025 14:40:16 +0800 Subject: [PATCH 76/86] update --- .github/workflows/unit.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index 890081a5f389..6c15405ab3e5 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -22,7 +22,6 @@ jobs: runs-on: ubuntu-latest env: RUST_BACKTRACE: 1 - CARGO_HTTP_MULTIPLEXING: ${{ steps.set_env.outputs.value }} strategy: matrix: include: @@ -64,9 +63,7 @@ jobs: id: set_env run: | if rustc +stable --version --verbose | grep -q '^release: 1\.7[01]\.'; then - echo "::set-output name=value::false" - else - echo "::set-output name=value::true" + echo "CARGO_HTTP_MULTIPLEXING=false" >> $GITHUB_ENV fi - if: "${{ matrix.type == 'book' }}" uses: arduino/setup-protoc@v3 From b971e1b544a72cdb4542b94cb9a19a13110e8b50 Mon Sep 17 00:00:00 2001 From: georgehao Date: Tue, 21 Jan 2025 14:52:41 +0800 Subject: [PATCH 77/86] update --- .github/workflows/unit.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index 6c15405ab3e5..59e7e10263ee 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -59,12 +59,6 @@ jobs: with: cache-on-failure: true - uses: taiki-e/install-action@nextest - - name: Set CARGO_HTTP_MULTIPLEXING if Rust version is 1.70.x - id: set_env - run: | - if rustc +stable --version --verbose | grep -q '^release: 1\.7[01]\.'; then - echo "CARGO_HTTP_MULTIPLEXING=false" >> $GITHUB_ENV - fi - if: "${{ matrix.type == 'book' }}" uses: arduino/setup-protoc@v3 with: From 4adf46f06afd1b692776138f1a8476ef4bb2f837 Mon Sep 17 00:00:00 2001 From: georgehao Date: Tue, 21 Jan 2025 15:14:24 +0800 Subject: [PATCH 78/86] update --- .github/workflows/unit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index 59e7e10263ee..aa35bc12a5b7 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -120,7 +120,7 @@ jobs: runs-on: ubuntu-latest if: always() needs: [test, state, doc] - timeout-minutes: 30 + timeout-minutes: 600 steps: - name: Decide whether the needed jobs succeeded or failed uses: re-actors/alls-green@release/v1 From 43e315c3fe943501e16e37ff378960386a514d06 Mon Sep 17 00:00:00 2001 From: georgehao Date: Tue, 21 Jan 2025 15:27:07 +0800 Subject: [PATCH 79/86] update --- .github/workflows/unit.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index aa35bc12a5b7..c3e14daa1598 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -49,7 +49,7 @@ jobs: args: --manifest-path book/sources/Cargo.toml --workspace --exclude ef-tests partition: 1 total_partitions: 1 - timeout-minutes: 60 + timeout-minutes: 600 steps: - name: Free up disk space run: rm -rf /opt/hostedtoolcache @@ -77,7 +77,7 @@ jobs: env: RUST_LOG: info,sync=error RUST_BACKTRACE: 1 - timeout-minutes: 30 + timeout-minutes: 600 steps: - name: Free up disk space run: rm -rf /opt/hostedtoolcache @@ -120,7 +120,7 @@ jobs: runs-on: ubuntu-latest if: always() needs: [test, state, doc] - timeout-minutes: 600 + timeout-minutes: 6000 steps: - name: Decide whether the needed jobs succeeded or failed uses: re-actors/alls-green@release/v1 From 226e01d68601fad9c84ae77a7b29967cbb73c940 Mon Sep 17 00:00:00 2001 From: georgehao Date: Tue, 21 Jan 2025 17:11:47 +0800 Subject: [PATCH 80/86] rollback timeout --- .github/workflows/unit.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index c3e14daa1598..539396277c2a 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -49,7 +49,7 @@ jobs: args: --manifest-path book/sources/Cargo.toml --workspace --exclude ef-tests partition: 1 total_partitions: 1 - timeout-minutes: 600 + timeout-minutes: 30 steps: - name: Free up disk space run: rm -rf /opt/hostedtoolcache @@ -77,7 +77,7 @@ jobs: env: RUST_LOG: info,sync=error RUST_BACKTRACE: 1 - timeout-minutes: 600 + timeout-minutes: 30 steps: - name: Free up disk space run: rm -rf /opt/hostedtoolcache @@ -120,7 +120,7 @@ jobs: runs-on: ubuntu-latest if: always() needs: [test, state, doc] - timeout-minutes: 6000 + timeout-minutes: 30 steps: - name: Decide whether the needed jobs succeeded or failed uses: re-actors/alls-green@release/v1 From 82a801db366213b98e6a4816386fd5fa65673da4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Garamv=C3=B6lgyi?= Date: Tue, 21 Jan 2025 15:28:28 +0100 Subject: [PATCH 81/86] configure custom runner --- .github/workflows/unit.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index 539396277c2a..45cc5d7badac 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -19,7 +19,8 @@ concurrency: jobs: test: name: test / ${{ matrix.type }} (${{ matrix.partition }}/${{ matrix.total_partitions }}) - runs-on: ubuntu-latest + runs-on: + group: scroll-reth-runner-group env: RUST_BACKTRACE: 1 strategy: From 15c8c8e5aa50ef23dde6c14d6432a87e9d051216 Mon Sep 17 00:00:00 2001 From: georgehao Date: Wed, 22 Jan 2025 00:25:03 +0800 Subject: [PATCH 82/86] Update crates/scroll/alloy/rpc-types/src/receipt.rs Co-authored-by: greg <82421016+greged93@users.noreply.github.com> --- crates/scroll/alloy/rpc-types/src/receipt.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/scroll/alloy/rpc-types/src/receipt.rs b/crates/scroll/alloy/rpc-types/src/receipt.rs index 1a918ea2be62..192f15c19a1a 100644 --- a/crates/scroll/alloy/rpc-types/src/receipt.rs +++ b/crates/scroll/alloy/rpc-types/src/receipt.rs @@ -172,9 +172,9 @@ mod tests { #[test] fn serialize_empty_optimism_transaction_receipt_fields_struct() { - let op_fields = ScrollTransactionReceiptFields::default(); + let scroll_fields = ScrollTransactionReceiptFields::default(); - let json = serde_json::to_value(op_fields).unwrap(); + let json = serde_json::to_value(scroll_fields).unwrap(); assert_eq!(json, json!({})); } } From 7026d1cdcd3a0e30728336d597a318fc6da3a7e9 Mon Sep 17 00:00:00 2001 From: georgehao Date: Wed, 22 Jan 2025 00:25:21 +0800 Subject: [PATCH 83/86] Update crates/scroll/alloy/consensus/README.md Co-authored-by: greg <82421016+greged93@users.noreply.github.com> --- crates/scroll/alloy/consensus/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/scroll/alloy/consensus/README.md b/crates/scroll/alloy/consensus/README.md index 1f5971580ad3..b311fb2629b4 100644 --- a/crates/scroll/alloy/consensus/README.md +++ b/crates/scroll/alloy/consensus/README.md @@ -3,7 +3,7 @@ Scroll consensus interface. This crate contains constants, types, and functions for implementing Scroll EL consensus and communication. This -includes an extended `ScrollTxEnvelope` type with deposit transactions +includes an extended `ScrollTxEnvelope` type with l1 messages. In general a type belongs in this crate if it exists in the `alloy-consensus` crate, but was modified from the base Ethereum protocol in Scroll. For consensus types that are not modified by Scroll, the `alloy-consensus` types should be used instead. From 43964b8b4142b706b15d3506541dac4a6833a4e0 Mon Sep 17 00:00:00 2001 From: georgehao Date: Wed, 22 Jan 2025 00:50:25 +0800 Subject: [PATCH 84/86] remove unused macro --- crates/scroll/rpc/src/eth/call.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/crates/scroll/rpc/src/eth/call.rs b/crates/scroll/rpc/src/eth/call.rs index e11399665d8b..ea5035171f4b 100644 --- a/crates/scroll/rpc/src/eth/call.rs +++ b/crates/scroll/rpc/src/eth/call.rs @@ -84,7 +84,6 @@ where let gas_limit = gas.unwrap_or_else(|| block_env.gas_limit.min(U256::from(u64::MAX)).to()); - #[allow(clippy::needless_update)] let env = TxEnv { gas_limit, nonce, From 02a5317f239f0ee3944b9d45dcd55ce81d2ce0be Mon Sep 17 00:00:00 2001 From: greg <82421016+greged93@users.noreply.github.com> Date: Wed, 22 Jan 2025 10:24:07 +0100 Subject: [PATCH 85/86] feat: scroll primitives (#142) * feat: scroll primitives Signed-off-by: Gregory Edison * feat: add missing traits implementations Signed-off-by: Gregory Edison * feat: add `ScrollTransactionReceipt` Signed-off-by: Gregory Edison * fix: lint + tests Signed-off-by: Gregory Edison * fix: lint Signed-off-by: Gregory Edison * fix: answer comments Signed-off-by: Gregory Edison * fix: codespell Signed-off-by: Gregory Edison --------- Signed-off-by: Gregory Edison --- .github/workflows/unit.yml | 2 +- Cargo.lock | 28 + Cargo.toml | 4 +- crates/exex/exex/src/context.rs | 2 +- crates/exex/exex/src/dyn_context.rs | 2 +- crates/primitives-traits/Cargo.toml | 16 +- crates/primitives-traits/src/size.rs | 12 + crates/scroll/alloy/consensus/src/lib.rs | 2 +- .../scroll/alloy/consensus/src/receipt/mod.rs | 5 +- .../alloy/consensus/src/receipt/receipt.rs | 256 ++++++++ .../consensus/src/transaction/tx_type.rs | 55 ++ .../alloy/consensus/src/transaction/typed.rs | 46 ++ crates/scroll/node/Cargo.toml | 9 + crates/scroll/primitives/Cargo.toml | 122 ++++ crates/scroll/primitives/src/lib.rs | 41 ++ crates/scroll/primitives/src/receipt.rs | 281 +++++++++ .../scroll/primitives/src/transaction/mod.rs | 4 + .../primitives/src/transaction/signed.rs | 596 ++++++++++++++++++ .../primitives/src/transaction/tx_type.rs | 47 ++ .../storage/codecs/derive/src/compact/mod.rs | 2 +- crates/storage/storage-api/src/trie.rs | 2 +- crates/trie/sparse/src/trie.rs | 2 +- 22 files changed, 1523 insertions(+), 13 deletions(-) create mode 100644 crates/scroll/alloy/consensus/src/receipt/receipt.rs create mode 100644 crates/scroll/primitives/Cargo.toml create mode 100644 crates/scroll/primitives/src/lib.rs create mode 100644 crates/scroll/primitives/src/receipt.rs create mode 100644 crates/scroll/primitives/src/transaction/mod.rs create mode 100644 crates/scroll/primitives/src/transaction/signed.rs create mode 100644 crates/scroll/primitives/src/transaction/tx_type.rs diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index 45cc5d7badac..10380c878786 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -43,7 +43,7 @@ jobs: partition: 2 total_partitions: 2 - type: scroll - args: -p "reth-scroll-*" --locked --features "scroll" + args: -p "reth-scroll-*" -p "scroll-alloy-*" --locked --features "scroll" partition: 1 total_partitions: 1 - type: book diff --git a/Cargo.lock b/Cargo.lock index 2c9d1695412a..d1840585814e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8641,6 +8641,7 @@ dependencies = [ "rayon", "reth-codecs", "revm-primitives", + "scroll-alloy-consensus", "secp256k1", "serde", "serde_json", @@ -9226,12 +9227,39 @@ dependencies = [ "reth-scroll-chainspec", "reth-scroll-engine", "reth-scroll-evm", + "reth-scroll-primitives", "reth-scroll-rpc", "reth-tracing", "reth-transaction-pool", "reth-trie-db", ] +[[package]] +name = "reth-scroll-primitives" +version = "1.1.5" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "arbitrary", + "bytes", + "derive_more", + "modular-bitfield", + "once_cell", + "proptest", + "proptest-arbitrary-interop", + "rand 0.8.5", + "reth-codecs", + "reth-primitives-traits", + "reth-zstd-compressors", + "revm-primitives", + "rstest", + "scroll-alloy-consensus", + "secp256k1", + "serde", +] + [[package]] name = "reth-scroll-rpc" version = "1.1.5" diff --git a/Cargo.toml b/Cargo.toml index 73d7b12e7632..9b254d04a973 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -109,6 +109,7 @@ members = [ "crates/scroll/evm", "crates/scroll/hardforks", "crates/scroll/node", + "crates/scroll/primitives", "crates/scroll/rpc", "crates/scroll/trie", "crates/stages/api/", @@ -493,8 +494,9 @@ reth-scroll-evm = { path = "crates/scroll/evm" } reth-scroll-engine = { path = "crates/scroll/engine" } reth-scroll-forks = { path = "crates/scroll/hardforks" } reth-scroll-node = { path = "crates/scroll/node" } -reth-scroll-trie = { path = "crates/scroll/trie" } +reth-scroll-primitives = { path = "crates/scroll/primitives" } reth-scroll-rpc = { path = "crates/scroll/rpc" } +reth-scroll-trie = { path = "crates/scroll/trie" } # TODO (scroll): point to crates.io/tag once the crate is published/a tag is created. poseidon-bn254 = { git = "https://github.com/scroll-tech/poseidon-bn254", rev = "526a64a", features = ["bn254"] } diff --git a/crates/exex/exex/src/context.rs b/crates/exex/exex/src/context.rs index f536ed515f9e..deb6fa2bd8d2 100644 --- a/crates/exex/exex/src/context.rs +++ b/crates/exex/exex/src/context.rs @@ -21,7 +21,7 @@ pub struct ExExContext { /// # Important /// /// The exex should emit a `FinishedHeight` whenever a processed block is safe to prune. - /// Additionally, the exex can pre-emptively emit a `FinishedHeight` event to specify what + /// Additionally, the exex can preemptively emit a `FinishedHeight` event to specify what /// blocks to receive notifications for. pub events: UnboundedSender, /// Channel to receive [`ExExNotification`](crate::ExExNotification)s. diff --git a/crates/exex/exex/src/dyn_context.rs b/crates/exex/exex/src/dyn_context.rs index 8bda75cac45d..94f6ae81f8f7 100644 --- a/crates/exex/exex/src/dyn_context.rs +++ b/crates/exex/exex/src/dyn_context.rs @@ -26,7 +26,7 @@ pub struct ExExContextDyn { /// # Important /// /// The exex should emit a `FinishedHeight` whenever a processed block is safe to prune. - /// Additionally, the exex can pre-emptively emit a `FinishedHeight` event to specify what + /// Additionally, the exex can preemptively emit a `FinishedHeight` event to specify what /// blocks to receive notifications for. pub events: mpsc::UnboundedSender, /// Channel to receive [`ExExNotification`](crate::ExExNotification)s. diff --git a/crates/primitives-traits/Cargo.toml b/crates/primitives-traits/Cargo.toml index 6df42d096d82..16c32cb35140 100644 --- a/crates/primitives-traits/Cargo.toml +++ b/crates/primitives-traits/Cargo.toml @@ -23,9 +23,12 @@ alloy-primitives.workspace = true alloy-rlp.workspace = true alloy-trie.workspace = true -# revm-primitives scroll re-export +# revm-primitives revm-primitives = { workspace = true, default-features = false } +# scroll +scroll-alloy-consensus = { workspace = true, optional = true } + # op op-alloy-consensus = { workspace = true, optional = true } @@ -115,14 +118,16 @@ arbitrary = [ "secp256k1?/global-context", "secp256k1?/rand", "op-alloy-consensus?/arbitrary", - "alloy-trie/arbitrary" + "alloy-trie/arbitrary", + "scroll-alloy-consensus?/arbitrary" ] serde-bincode-compat = [ "serde", "serde_with", "alloy-consensus/serde-bincode-compat", "alloy-eips/serde-bincode-compat", - "op-alloy-consensus?/serde-bincode-compat" + "op-alloy-consensus?/serde-bincode-compat", + "scroll-alloy-consensus?/serde-bincode-compat" ] serde = [ "dep:serde", @@ -136,16 +141,19 @@ serde = [ "op-alloy-consensus?/serde", "k256/serde", "secp256k1?/serde", - "alloy-trie/serde" + "alloy-trie/serde", + "scroll-alloy-consensus?/serde" ] reth-codec = [ "dep:reth-codecs", "dep:modular-bitfield", "dep:byteorder", + "scroll-alloy-consensus?/reth-codec" ] op = [ "dep:op-alloy-consensus", ] +scroll-in-memory-size = ["scroll-alloy-consensus"] scroll = ["revm-primitives/scroll"] rayon = [ "dep:rayon", diff --git a/crates/primitives-traits/src/size.rs b/crates/primitives-traits/src/size.rs index 185f9f08ecce..cf5e36880e10 100644 --- a/crates/primitives-traits/src/size.rs +++ b/crates/primitives-traits/src/size.rs @@ -127,6 +127,18 @@ impl InMemorySize for op_alloy_consensus::OpTypedTransaction { } } +#[cfg(feature = "scroll-in-memory-size")] +impl InMemorySize for scroll_alloy_consensus::ScrollTypedTransaction { + fn size(&self) -> usize { + match self { + Self::Legacy(tx) => tx.size(), + Self::Eip2930(tx) => tx.size(), + Self::Eip1559(tx) => tx.size(), + Self::L1Message(tx) => tx.size(), + } + } +} + #[cfg(feature = "op")] impl InMemorySize for op_alloy_consensus::OpPooledTransaction { fn size(&self) -> usize { diff --git a/crates/scroll/alloy/consensus/src/lib.rs b/crates/scroll/alloy/consensus/src/lib.rs index cbeee0be82ed..a2c72e6f07a4 100644 --- a/crates/scroll/alloy/consensus/src/lib.rs +++ b/crates/scroll/alloy/consensus/src/lib.rs @@ -16,7 +16,7 @@ pub use transaction::{ }; mod receipt; -pub use receipt::ScrollReceiptEnvelope; +pub use receipt::{ScrollReceiptEnvelope, ScrollReceiptWithBloom, ScrollTransactionReceipt}; #[cfg(feature = "serde")] pub use transaction::serde_l1_message_tx_rpc; diff --git a/crates/scroll/alloy/consensus/src/receipt/mod.rs b/crates/scroll/alloy/consensus/src/receipt/mod.rs index 7142ef787ace..c06b4838314b 100644 --- a/crates/scroll/alloy/consensus/src/receipt/mod.rs +++ b/crates/scroll/alloy/consensus/src/receipt/mod.rs @@ -1,3 +1,6 @@ mod envelope; - pub use envelope::ScrollReceiptEnvelope; + +#[allow(clippy::module_inception)] +mod receipt; +pub use receipt::{ScrollReceiptWithBloom, ScrollTransactionReceipt}; diff --git a/crates/scroll/alloy/consensus/src/receipt/receipt.rs b/crates/scroll/alloy/consensus/src/receipt/receipt.rs new file mode 100644 index 000000000000..5cdd1b3e1134 --- /dev/null +++ b/crates/scroll/alloy/consensus/src/receipt/receipt.rs @@ -0,0 +1,256 @@ +//! Transaction receipt types for Scroll. + +use alloy_consensus::{ + Eip658Value, Receipt, ReceiptWithBloom, RlpDecodableReceipt, RlpEncodableReceipt, TxReceipt, +}; +use alloy_primitives::{Bloom, Log, U256}; +use alloy_rlp::{Buf, BufMut, Decodable, Encodable, Header}; + +/// Receipt containing result of transaction execution. +#[derive(Clone, Debug, PartialEq, Eq, Default)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] +pub struct ScrollTransactionReceipt { + /// The inner receipt type. + #[cfg_attr(feature = "serde", serde(flatten))] + pub inner: Receipt, + /// L1 fee for Scroll transactions. + pub l1_fee: U256, +} + +impl ScrollTransactionReceipt { + /// Returns a new [`ScrollTransactionReceipt`] from the inner receipt and the l1 fee. + pub const fn new(inner: Receipt, l1_fee: U256) -> Self { + Self { inner, l1_fee } + } +} + +impl ScrollTransactionReceipt { + /// Calculates [`Log`]'s bloom filter. This is slow operation and [`ScrollReceiptWithBloom`] + /// can be used to cache this value. + pub fn bloom_slow(&self) -> Bloom { + self.inner.logs.iter().collect() + } + + /// Calculates the bloom filter for the receipt and returns the [`ScrollReceiptWithBloom`] + /// container type. + pub fn with_bloom(self) -> ScrollReceiptWithBloom { + self.into() + } +} + +impl ScrollTransactionReceipt { + /// Returns length of RLP-encoded receipt fields with the given [`Bloom`] without an RLP header. + /// Does not include the L1 fee field which is not part of the consensus encoding of a receipt. + /// + pub fn rlp_encoded_fields_length_with_bloom(&self, bloom: &Bloom) -> usize { + self.inner.rlp_encoded_fields_length_with_bloom(bloom) + } + + /// RLP-encodes receipt fields with the given [`Bloom`] without an RLP header. + /// Does not include the L1 fee field which is not part of the consensus encoding of a receipt. + /// + pub fn rlp_encode_fields_with_bloom(&self, bloom: &Bloom, out: &mut dyn BufMut) { + self.inner.rlp_encode_fields_with_bloom(bloom, out); + } + + /// Returns RLP header for this receipt encoding with the given [`Bloom`]. + /// Does not include the L1 fee field which is not part of the consensus encoding of a receipt. + /// + pub fn rlp_header_with_bloom(&self, bloom: &Bloom) -> Header { + Header { list: true, payload_length: self.rlp_encoded_fields_length_with_bloom(bloom) } + } +} + +impl ScrollTransactionReceipt { + /// RLP-decodes receipt's field with a [`Bloom`]. + /// + /// Does not expect an RLP header. + pub fn rlp_decode_fields_with_bloom( + buf: &mut &[u8], + ) -> alloy_rlp::Result> { + let ReceiptWithBloom { receipt: inner, logs_bloom } = + Receipt::rlp_decode_fields_with_bloom(buf)?; + + Ok(ReceiptWithBloom { logs_bloom, receipt: Self { inner, l1_fee: Default::default() } }) + } +} + +impl AsRef> for ScrollTransactionReceipt { + fn as_ref(&self) -> &Receipt { + &self.inner + } +} + +impl TxReceipt for ScrollTransactionReceipt +where + T: AsRef + Clone + core::fmt::Debug + PartialEq + Eq + Send + Sync, +{ + type Log = T; + + fn status_or_post_state(&self) -> Eip658Value { + self.inner.status_or_post_state() + } + + fn status(&self) -> bool { + self.inner.status() + } + + fn bloom(&self) -> Bloom { + self.inner.bloom_slow() + } + + fn cumulative_gas_used(&self) -> u64 { + self.inner.cumulative_gas_used() + } + + fn logs(&self) -> &[Self::Log] { + self.inner.logs() + } +} + +impl RlpEncodableReceipt for ScrollTransactionReceipt { + fn rlp_encoded_length_with_bloom(&self, bloom: &Bloom) -> usize { + self.rlp_header_with_bloom(bloom).length_with_payload() + } + + fn rlp_encode_with_bloom(&self, bloom: &Bloom, out: &mut dyn BufMut) { + self.rlp_header_with_bloom(bloom).encode(out); + self.rlp_encode_fields_with_bloom(bloom, out); + } +} + +impl RlpDecodableReceipt for ScrollTransactionReceipt { + fn rlp_decode_with_bloom(buf: &mut &[u8]) -> alloy_rlp::Result> { + let header = Header::decode(buf)?; + if !header.list { + return Err(alloy_rlp::Error::UnexpectedString); + } + + if buf.len() < header.payload_length { + return Err(alloy_rlp::Error::InputTooShort); + } + + // Note: we pass a separate buffer to `rlp_decode_fields_with_bloom` to allow it decode + // optional fields based on the remaining length. + let mut fields_buf = &buf[..header.payload_length]; + let this = Self::rlp_decode_fields_with_bloom(&mut fields_buf)?; + + if !fields_buf.is_empty() { + return Err(alloy_rlp::Error::UnexpectedLength); + } + + buf.advance(header.payload_length); + + Ok(this) + } +} + +/// [`ScrollTransactionReceipt`] with calculated bloom filter, modified for Scroll. +/// +/// This convenience type allows us to lazily calculate the bloom filter for a +/// receipt, similar to [`Sealed`]. +/// +/// [`Sealed`]: alloy_consensus::Sealed +pub type ScrollReceiptWithBloom = ReceiptWithBloom>; + +#[cfg(any(test, feature = "arbitrary"))] +impl<'a, T> arbitrary::Arbitrary<'a> for ScrollTransactionReceipt +where + T: arbitrary::Arbitrary<'a>, +{ + fn arbitrary(u: &mut arbitrary::Unstructured<'a>) -> arbitrary::Result { + #[cfg(not(feature = "std"))] + use alloc::vec::Vec; + Ok(Self { + inner: Receipt { + status: Eip658Value::arbitrary(u)?, + cumulative_gas_used: u64::arbitrary(u)?, + logs: Vec::::arbitrary(u)?, + }, + l1_fee: U256::arbitrary(u)?, + }) + } +} + +#[cfg(test)] +mod tests { + use super::*; + use alloy_consensus::Receipt; + use alloy_primitives::{address, b256, bytes, hex, Bytes, Log, LogData}; + use alloy_rlp::{Decodable, Encodable}; + + #[cfg(not(feature = "std"))] + use alloc::{vec, vec::Vec}; + + // Test vector from: https://eips.ethereum.org/EIPS/eip-2481 + #[test] + fn decode_legacy_receipt() { + let data = hex!("f901668001b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f85ff85d940000000000000000000000000000000000000011f842a0000000000000000000000000000000000000000000000000000000000000deada0000000000000000000000000000000000000000000000000000000000000beef830100ff"); + + // EIP658Receipt + let expected = + ScrollReceiptWithBloom { + receipt: ScrollTransactionReceipt { + inner: Receipt { + status: false.into(), + cumulative_gas_used: 0x1, + logs: vec![Log { + address: address!("0000000000000000000000000000000000000011"), + data: LogData::new_unchecked( + vec![ + b256!("000000000000000000000000000000000000000000000000000000000000dead"), + b256!("000000000000000000000000000000000000000000000000000000000000beef"), + ], + bytes!("0100ff"), + ), + }], + }, + l1_fee: U256::ZERO + }, + logs_bloom: [0; 256].into(), + }; + + let receipt = ScrollReceiptWithBloom::decode(&mut &data[..]).unwrap(); + assert_eq!(receipt, expected); + } + + #[test] + fn gigantic_receipt() { + let receipt = ScrollTransactionReceipt { + inner: Receipt { + cumulative_gas_used: 16747627, + status: true.into(), + logs: vec![ + Log { + address: address!("4bf56695415f725e43c3e04354b604bcfb6dfb6e"), + data: LogData::new_unchecked( + vec![b256!( + "c69dc3d7ebff79e41f525be431d5cd3cc08f80eaf0f7819054a726eeb7086eb9" + )], + Bytes::from(vec![1; 0xffffff]), + ), + }, + Log { + address: address!("faca325c86bf9c2d5b413cd7b90b209be92229c2"), + data: LogData::new_unchecked( + vec![b256!( + "8cca58667b1e9ffa004720ac99a3d61a138181963b294d270d91c53d36402ae2" + )], + Bytes::from(vec![1; 0xffffff]), + ), + }, + ], + }, + l1_fee: U256::ZERO, + } + .with_bloom(); + + let mut data = vec![]; + + receipt.encode(&mut data); + let decoded = ScrollReceiptWithBloom::decode(&mut &data[..]).unwrap(); + + assert_eq!(decoded, receipt); + } +} diff --git a/crates/scroll/alloy/consensus/src/transaction/tx_type.rs b/crates/scroll/alloy/consensus/src/transaction/tx_type.rs index c5616d1752f5..528db0907711 100644 --- a/crates/scroll/alloy/consensus/src/transaction/tx_type.rs +++ b/crates/scroll/alloy/consensus/src/transaction/tx_type.rs @@ -1,9 +1,18 @@ //! Contains the transaction type identifier for Scroll. +use alloy_consensus::Typed2718; use alloy_eips::eip2718::Eip2718Error; use alloy_primitives::{U64, U8}; use alloy_rlp::{BufMut, Decodable, Encodable}; use derive_more::Display; +use reth_codecs::{ + __private::bytes, + txtype::{ + COMPACT_EXTENDED_IDENTIFIER_FLAG, COMPACT_IDENTIFIER_EIP1559, COMPACT_IDENTIFIER_EIP2930, + COMPACT_IDENTIFIER_LEGACY, + }, + Compact, +}; /// Identifier for an Scroll L1 message transaction pub const L1_MESSAGE_TX_TYPE_ID: u8 = 126; // 0x7E @@ -113,6 +122,52 @@ impl Decodable for ScrollTxType { } } +impl Compact for ScrollTxType { + fn to_compact(&self, buf: &mut B) -> usize + where + B: BufMut + AsMut<[u8]>, + { + match self { + Self::Legacy => COMPACT_IDENTIFIER_LEGACY, + Self::Eip2930 => COMPACT_IDENTIFIER_EIP2930, + Self::Eip1559 => COMPACT_IDENTIFIER_EIP1559, + Self::L1Message => { + buf.put_u8(L1_MESSAGE_TX_TYPE_ID); + COMPACT_EXTENDED_IDENTIFIER_FLAG + } + } + } + + // For backwards compatibility purposes only 2 bits of the type are encoded in the identifier + // parameter. In the case of a [`COMPACT_EXTENDED_IDENTIFIER_FLAG`], the full transaction type + // is read from the buffer as a single byte. + fn from_compact(mut buf: &[u8], identifier: usize) -> (Self, &[u8]) { + use bytes::Buf; + ( + match identifier { + COMPACT_IDENTIFIER_LEGACY => Self::Legacy, + COMPACT_IDENTIFIER_EIP2930 => Self::Eip2930, + COMPACT_IDENTIFIER_EIP1559 => Self::Eip1559, + COMPACT_EXTENDED_IDENTIFIER_FLAG => { + let extended_identifier = buf.get_u8(); + match extended_identifier { + L1_MESSAGE_TX_TYPE_ID => Self::L1Message, + _ => panic!("Unsupported TxType identifier: {extended_identifier}"), + } + } + _ => panic!("Unknown identifier for TxType: {identifier}"), + }, + buf, + ) + } +} + +impl Typed2718 for ScrollTxType { + fn ty(&self) -> u8 { + (*self).into() + } +} + #[cfg(test)] mod tests { use super::*; diff --git a/crates/scroll/alloy/consensus/src/transaction/typed.rs b/crates/scroll/alloy/consensus/src/transaction/typed.rs index 5b551b1d0b49..273fa351be1b 100644 --- a/crates/scroll/alloy/consensus/src/transaction/typed.rs +++ b/crates/scroll/alloy/consensus/src/transaction/typed.rs @@ -2,6 +2,8 @@ use crate::{ScrollTxEnvelope, ScrollTxType, TxL1Message}; use alloy_consensus::{Transaction, TxEip1559, TxEip2930, TxLegacy, Typed2718}; use alloy_eips::eip2930::AccessList; use alloy_primitives::{Address, Bytes, TxKind}; +use reth_codecs::{Compact, __private::bytes}; +use reth_codecs_derive::generate_tests; /// The `TypedTransaction` enum represents all Ethereum transaction request types, modified for /// Scroll @@ -286,6 +288,50 @@ impl Transaction for ScrollTypedTransaction { } } +impl Compact for ScrollTypedTransaction { + fn to_compact(&self, out: &mut B) -> usize + where + B: bytes::BufMut + AsMut<[u8]>, + { + let identifier = self.tx_type().to_compact(out); + match self { + Self::Legacy(tx) => tx.to_compact(out), + Self::Eip2930(tx) => tx.to_compact(out), + Self::Eip1559(tx) => tx.to_compact(out), + Self::L1Message(tx) => tx.to_compact(out), + }; + identifier + } + + fn from_compact(buf: &[u8], identifier: usize) -> (Self, &[u8]) { + let (tx_type, buf) = ScrollTxType::from_compact(buf, identifier); + match tx_type { + ScrollTxType::Legacy => { + let (tx, buf) = Compact::from_compact(buf, buf.len()); + (Self::Legacy(tx), buf) + } + ScrollTxType::Eip2930 => { + let (tx, buf) = Compact::from_compact(buf, buf.len()); + (Self::Eip2930(tx), buf) + } + ScrollTxType::Eip1559 => { + let (tx, buf) = Compact::from_compact(buf, buf.len()); + (Self::Eip1559(tx), buf) + } + ScrollTxType::L1Message => { + let (tx, buf) = Compact::from_compact(buf, buf.len()); + (Self::L1Message(tx), buf) + } + } + } +} + +generate_tests!( + #[compact] + ScrollTypedTransaction, + ScrollTypedTransactionTests +); + #[cfg(feature = "serde")] mod serde_from { //! NB: Why do we need this? diff --git a/crates/scroll/node/Cargo.toml b/crates/scroll/node/Cargo.toml index 3f180a151f53..cc3c81b1b9c2 100644 --- a/crates/scroll/node/Cargo.toml +++ b/crates/scroll/node/Cargo.toml @@ -39,6 +39,7 @@ alloy-rpc-types-engine.workspace = true reth-scroll-chainspec.workspace = true reth-scroll-engine.workspace = true reth-scroll-evm.workspace = true +reth-scroll-primitives = { workspace = true, features = ["serde", "serde-bincode-compat"] } reth-scroll-rpc.workspace = true # alloy @@ -48,6 +49,7 @@ alloy-primitives.workspace = true eyre.workspace = true [features] +default = ["reth-codec"] optimism = [ "reth-db/optimism", "reth-primitives/optimism", @@ -65,5 +67,12 @@ scroll = [ "reth-scroll-evm/scroll", "reth-scroll-engine/scroll", "reth-scroll-rpc/scroll", + "reth-scroll-primitives/scroll", + "reth-primitives-traits/scroll" +] +reth-codec = [ + "reth-primitives/reth-codec", + "reth-primitives-traits/reth-codec", + "reth-scroll-primitives/reth-codec" ] skip-state-root-validation = [] \ No newline at end of file diff --git a/crates/scroll/primitives/Cargo.toml b/crates/scroll/primitives/Cargo.toml new file mode 100644 index 000000000000..9e60bdc3a938 --- /dev/null +++ b/crates/scroll/primitives/Cargo.toml @@ -0,0 +1,122 @@ +[package] +name = "reth-scroll-primitives" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +license.workspace = true +homepage.workspace = true +repository.workspace = true + +[lints] +workspace = true + +[dependencies] +# reth +reth-codecs = { workspace = true, optional = true } +reth-primitives-traits = { workspace = true, features = ["scroll-in-memory-size"] } +reth-zstd-compressors = { workspace = true, optional = true } + +# revm +revm-primitives = { workspace = true, optional = true } + +# alloy +alloy-consensus.workspace = true +alloy-eips.workspace = true +alloy-primitives.workspace = true +alloy-rlp.workspace = true + +# scroll +scroll-alloy-consensus.workspace = true + +# codec +bytes = { workspace = true, optional = true } +modular-bitfield = { workspace = true, optional = true } +serde = { workspace = true, optional = true } + +# misc +derive_more.workspace = true +once_cell.workspace = true +rand = { workspace = true, optional = true } + +# test +arbitrary = { workspace = true, features = ["derive"], optional = true } +proptest = { workspace = true, optional = true } +secp256k1 = { workspace = true, optional = true } + +[dev-dependencies] +proptest-arbitrary-interop.workspace = true +reth-codecs = { workspace = true, features = ["test-utils"] } +rstest.workspace = true +proptest.workspace = true +secp256k1 = { workspace = true, features = ["rand"] } +rand.workspace = true + +[features] +default = ["std"] +std = [ + "serde?/std", + "scroll-alloy-consensus/std", + "alloy-consensus/std", + "alloy-eips/std", + "alloy-primitives/std", + "alloy-rlp/std", + "bytes?/std", + "reth-primitives-traits/std", + "reth-zstd-compressors?/std", + "reth-codecs?/std", + "derive_more/std", + "once_cell/std", + "proptest?/std", + "serde?/std", + "rand?/std", + "secp256k1?/std", + "revm-primitives?/std" +] +reth-codec = [ + "dep:reth-codecs", + "std", + "dep:proptest", + "dep:arbitrary", + "reth-primitives-traits/reth-codec", + "scroll-alloy-consensus/reth-codec", + "dep:bytes", + "dep:modular-bitfield", + "dep:reth-zstd-compressors" +] +serde = [ + "dep:serde", + "scroll-alloy-consensus/serde", + "secp256k1?/serde", + "alloy-consensus/serde", + "alloy-eips/serde", + "alloy-primitives/serde", + "bytes?/serde", + "rand?/serde", + "reth-codecs?/serde", + "reth-primitives-traits/serde" , + "revm-primitives?/serde", +] +serde-bincode-compat = [ + "alloy-consensus/serde-bincode-compat", + "alloy-eips/serde-bincode-compat", + "reth-primitives-traits/serde-bincode-compat", + "scroll-alloy-consensus/serde-bincode-compat" +] +arbitrary = [ + "dep:arbitrary", + "dep:secp256k1", + "secp256k1?/rand", + "rand", + "alloy-consensus/arbitrary", + "alloy-eips/arbitrary", + "alloy-primitives/arbitrary", + "reth-codecs?/arbitrary", + "reth-primitives-traits/arbitrary", + "revm-primitives?/arbitrary", + "scroll-alloy-consensus/arbitrary" +] +scroll = [ + "dep:revm-primitives", + "revm-primitives/scroll", + "reth-primitives-traits/scroll" +] diff --git a/crates/scroll/primitives/src/lib.rs b/crates/scroll/primitives/src/lib.rs new file mode 100644 index 000000000000..31ce2e165348 --- /dev/null +++ b/crates/scroll/primitives/src/lib.rs @@ -0,0 +1,41 @@ +//! Commonly used types in Scroll. + +#![doc( + html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png", + html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", + issue_tracker_base_url = "https://github.com/scroll-tech/reth/issues/" +)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] +#![cfg_attr(not(feature = "std"), no_std)] + +use once_cell as _; + +extern crate alloc; + +pub mod transaction; +pub use transaction::{signed::ScrollTransactionSigned, tx_type::ScrollTxType}; + +use reth_primitives_traits::Block; + +mod receipt; +pub use receipt::ScrollReceipt; + +/// Scroll-specific block type. +pub type ScrollBlock = alloy_consensus::Block; + +/// Scroll-specific block body type. +pub type ScrollBlockBody = ::Body; + +/// Primitive types for Scroll Node. +#[derive(Debug, Default, Clone, PartialEq, Eq)] +pub struct ScrollPrimitives; + +#[cfg(feature = "scroll")] +impl reth_primitives_traits::NodePrimitives for ScrollPrimitives { + type Block = ScrollBlock; + type BlockHeader = alloy_consensus::Header; + type BlockBody = ScrollBlockBody; + type SignedTx = ScrollTransactionSigned; + type Receipt = ScrollReceipt; +} diff --git a/crates/scroll/primitives/src/receipt.rs b/crates/scroll/primitives/src/receipt.rs new file mode 100644 index 000000000000..fb4cea55235b --- /dev/null +++ b/crates/scroll/primitives/src/receipt.rs @@ -0,0 +1,281 @@ +use alloy_consensus::{ + Eip2718EncodableReceipt, Eip658Value, Receipt, ReceiptWithBloom, RlpDecodableReceipt, + RlpEncodableReceipt, TxReceipt, Typed2718, +}; +use alloy_primitives::{Bloom, Log, U256}; +use alloy_rlp::{BufMut, Decodable, Header}; +use reth_primitives_traits::InMemorySize; +use scroll_alloy_consensus::{ScrollTransactionReceipt, ScrollTxType}; + +/// Typed ethereum transaction receipt. +/// Receipt containing result of transaction execution. +#[derive(Clone, Debug, PartialEq, Eq)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum ScrollReceipt { + /// Legacy receipt + Legacy(ScrollTransactionReceipt), + /// EIP-2930 receipt + Eip2930(ScrollTransactionReceipt), + /// EIP-1559 receipt + Eip1559(ScrollTransactionReceipt), + /// L1 message receipt + L1Message(Receipt), +} + +impl ScrollReceipt { + /// Returns [`ScrollTxType`] of the receipt. + pub const fn tx_type(&self) -> ScrollTxType { + match self { + Self::Legacy(_) => ScrollTxType::Legacy, + Self::Eip2930(_) => ScrollTxType::Eip2930, + Self::Eip1559(_) => ScrollTxType::Eip1559, + Self::L1Message(_) => ScrollTxType::L1Message, + } + } + + /// Returns inner [`Receipt`], + pub const fn as_receipt(&self) -> &Receipt { + match self { + Self::Legacy(receipt) | Self::Eip2930(receipt) | Self::Eip1559(receipt) => { + &receipt.inner + } + Self::L1Message(receipt) => receipt, + } + } + + /// Returns length of RLP-encoded receipt fields with the given [`Bloom`] without an RLP header. + pub fn rlp_encoded_fields_length(&self, bloom: &Bloom) -> usize { + match self { + Self::Legacy(receipt) | Self::Eip2930(receipt) | Self::Eip1559(receipt) => { + receipt.rlp_encoded_fields_length_with_bloom(bloom) + } + Self::L1Message(receipt) => receipt.rlp_encoded_fields_length_with_bloom(bloom), + } + } + + /// RLP-encodes receipt fields with the given [`Bloom`] without an RLP header. + pub fn rlp_encode_fields(&self, bloom: &Bloom, out: &mut dyn BufMut) { + match self { + Self::Legacy(receipt) | Self::Eip2930(receipt) | Self::Eip1559(receipt) => { + receipt.rlp_encode_fields_with_bloom(bloom, out) + } + Self::L1Message(receipt) => receipt.rlp_encode_fields_with_bloom(bloom, out), + } + } + + /// Returns RLP header for inner encoding. + pub fn rlp_header_inner(&self, bloom: &Bloom) -> Header { + Header { list: true, payload_length: self.rlp_encoded_fields_length(bloom) } + } + + /// RLP-decodes the receipt from the provided buffer. This does not expect a type byte or + /// network header. + pub fn rlp_decode_inner( + buf: &mut &[u8], + tx_type: ScrollTxType, + ) -> alloy_rlp::Result> { + match tx_type { + ScrollTxType::Legacy => { + let ReceiptWithBloom { receipt, logs_bloom } = + RlpDecodableReceipt::rlp_decode_with_bloom(buf)?; + Ok(ReceiptWithBloom { receipt: Self::Legacy(receipt), logs_bloom }) + } + ScrollTxType::Eip2930 => { + let ReceiptWithBloom { receipt, logs_bloom } = + RlpDecodableReceipt::rlp_decode_with_bloom(buf)?; + Ok(ReceiptWithBloom { receipt: Self::Eip2930(receipt), logs_bloom }) + } + ScrollTxType::Eip1559 => { + let ReceiptWithBloom { receipt, logs_bloom } = + RlpDecodableReceipt::rlp_decode_with_bloom(buf)?; + Ok(ReceiptWithBloom { receipt: Self::Eip1559(receipt), logs_bloom }) + } + ScrollTxType::L1Message => { + let ReceiptWithBloom { receipt, logs_bloom } = + RlpDecodableReceipt::rlp_decode_with_bloom(buf)?; + Ok(ReceiptWithBloom { receipt: Self::L1Message(receipt), logs_bloom }) + } + } + } + + /// Returns the l1 fee for the transaction receipt. + pub const fn l1_fee(&self) -> U256 { + match self { + Self::Legacy(receipt) | Self::Eip2930(receipt) | Self::Eip1559(receipt) => { + receipt.l1_fee + } + Self::L1Message(_) => U256::ZERO, + } + } +} + +impl Eip2718EncodableReceipt for ScrollReceipt { + fn eip2718_encoded_length_with_bloom(&self, bloom: &Bloom) -> usize { + !self.tx_type().is_legacy() as usize + self.rlp_header_inner(bloom).length_with_payload() + } + + fn eip2718_encode_with_bloom(&self, bloom: &Bloom, out: &mut dyn BufMut) { + if !self.tx_type().is_legacy() { + out.put_u8(self.tx_type() as u8); + } + self.rlp_header_inner(bloom).encode(out); + self.rlp_encode_fields(bloom, out); + } +} + +impl RlpEncodableReceipt for ScrollReceipt { + fn rlp_encoded_length_with_bloom(&self, bloom: &Bloom) -> usize { + let mut len = self.eip2718_encoded_length_with_bloom(bloom); + if !self.tx_type().is_legacy() { + len += Header { + list: false, + payload_length: self.eip2718_encoded_length_with_bloom(bloom), + } + .length(); + } + + len + } + + fn rlp_encode_with_bloom(&self, bloom: &Bloom, out: &mut dyn BufMut) { + if !self.tx_type().is_legacy() { + Header { list: false, payload_length: self.eip2718_encoded_length_with_bloom(bloom) } + .encode(out); + } + self.eip2718_encode_with_bloom(bloom, out); + } +} + +impl RlpDecodableReceipt for ScrollReceipt { + fn rlp_decode_with_bloom(buf: &mut &[u8]) -> alloy_rlp::Result> { + let header_buf = &mut &**buf; + let header = Header::decode(header_buf)?; + + // Legacy receipt, reuse initial buffer without advancing + if header.list { + return Self::rlp_decode_inner(buf, ScrollTxType::Legacy) + } + + // Otherwise, advance the buffer and try decoding type flag followed by receipt + *buf = *header_buf; + + let remaining = buf.len(); + let tx_type = ScrollTxType::decode(buf)?; + let this = Self::rlp_decode_inner(buf, tx_type)?; + + if buf.len() + header.payload_length != remaining { + return Err(alloy_rlp::Error::UnexpectedLength); + } + + Ok(this) + } +} + +impl TxReceipt for ScrollReceipt { + type Log = Log; + + fn status_or_post_state(&self) -> Eip658Value { + self.as_receipt().status_or_post_state() + } + + fn status(&self) -> bool { + self.as_receipt().status() + } + + fn bloom(&self) -> Bloom { + self.as_receipt().bloom() + } + + fn cumulative_gas_used(&self) -> u64 { + self.as_receipt().cumulative_gas_used() + } + + fn logs(&self) -> &[Log] { + self.as_receipt().logs() + } +} + +impl Typed2718 for ScrollReceipt { + fn ty(&self) -> u8 { + self.tx_type().into() + } +} + +impl InMemorySize for ScrollReceipt { + fn size(&self) -> usize { + self.as_receipt().size() + } +} + +impl reth_primitives_traits::Receipt for ScrollReceipt {} + +#[cfg(feature = "reth-codec")] +mod compact { + use super::*; + use alloc::borrow::Cow; + use alloy_primitives::U256; + use reth_codecs::Compact; + + #[derive(reth_codecs::CompactZstd)] + #[reth_zstd( + compressor = reth_zstd_compressors::RECEIPT_COMPRESSOR, + decompressor = reth_zstd_compressors::RECEIPT_DECOMPRESSOR + )] + struct CompactScrollReceipt<'a> { + tx_type: ScrollTxType, + success: bool, + cumulative_gas_used: u64, + logs: Cow<'a, Vec>, + l1_fee: Option, + } + + impl<'a> From<&'a ScrollReceipt> for CompactScrollReceipt<'a> { + fn from(receipt: &'a ScrollReceipt) -> Self { + Self { + tx_type: receipt.tx_type(), + success: receipt.status(), + cumulative_gas_used: receipt.cumulative_gas_used(), + logs: Cow::Borrowed(&receipt.as_receipt().logs), + l1_fee: (receipt.l1_fee() != U256::ZERO).then_some(receipt.l1_fee()), + } + } + } + + impl From> for ScrollReceipt { + fn from(receipt: CompactScrollReceipt<'_>) -> Self { + let CompactScrollReceipt { tx_type, success, cumulative_gas_used, logs, l1_fee } = + receipt; + + let inner = + Receipt { status: success.into(), cumulative_gas_used, logs: logs.into_owned() }; + + match tx_type { + ScrollTxType::Legacy => { + Self::Legacy(ScrollTransactionReceipt::new(inner, l1_fee.unwrap_or_default())) + } + ScrollTxType::Eip2930 => { + Self::Eip2930(ScrollTransactionReceipt::new(inner, l1_fee.unwrap_or_default())) + } + ScrollTxType::Eip1559 => { + Self::Eip1559(ScrollTransactionReceipt::new(inner, l1_fee.unwrap_or_default())) + } + ScrollTxType::L1Message => Self::L1Message(inner), + } + } + } + + impl Compact for ScrollReceipt { + fn to_compact(&self, buf: &mut B) -> usize + where + B: bytes::BufMut + AsMut<[u8]>, + { + CompactScrollReceipt::from(self).to_compact(buf) + } + + fn from_compact(buf: &[u8], len: usize) -> (Self, &[u8]) { + let (receipt, buf) = CompactScrollReceipt::from_compact(buf, len); + (receipt.into(), buf) + } + } +} diff --git a/crates/scroll/primitives/src/transaction/mod.rs b/crates/scroll/primitives/src/transaction/mod.rs new file mode 100644 index 000000000000..0b23824d496e --- /dev/null +++ b/crates/scroll/primitives/src/transaction/mod.rs @@ -0,0 +1,4 @@ +//! Scroll primitives transaction types. + +pub mod signed; +pub mod tx_type; diff --git a/crates/scroll/primitives/src/transaction/signed.rs b/crates/scroll/primitives/src/transaction/signed.rs new file mode 100644 index 000000000000..1abf39779ce8 --- /dev/null +++ b/crates/scroll/primitives/src/transaction/signed.rs @@ -0,0 +1,596 @@ +//! A signed Scroll transaction. + +use crate::ScrollTxType; +use alloc::vec::Vec; +use alloy_consensus::{ + transaction::RlpEcdsaTx, SignableTransaction, Signed, Transaction, TxEip1559, TxEip2930, + TxLegacy, Typed2718, +}; +use alloy_eips::{ + eip2718::{Decodable2718, Eip2718Error, Eip2718Result, Encodable2718}, + eip2930::AccessList, + eip7702::SignedAuthorization, +}; +use alloy_primitives::{ + keccak256, Address, Bytes, PrimitiveSignature as Signature, TxHash, TxKind, Uint, B256, +}; +use alloy_rlp::Header; +#[cfg(feature = "reth-codec")] +use arbitrary as _; +use core::{ + hash::{Hash, Hasher}, + mem, +}; +use derive_more::{AsRef, Deref}; +#[cfg(not(feature = "std"))] +use once_cell::sync::OnceCell as OnceLock; +#[cfg(any(test, feature = "reth-codec"))] +use proptest as _; +use reth_primitives_traits::{ + crypto::secp256k1::{recover_signer, recover_signer_unchecked}, + InMemorySize, SignedTransaction, +}; +use scroll_alloy_consensus::{ScrollTypedTransaction, TxL1Message}; +#[cfg(feature = "std")] +use std::sync::OnceLock; + +/// Signed transaction. +#[cfg_attr(any(test, feature = "reth-codec"), reth_codecs::add_arbitrary_tests(rlp))] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +#[derive(Debug, Clone, Eq, AsRef, Deref)] +pub struct ScrollTransactionSigned { + /// Transaction hash + #[cfg_attr(feature = "serde", serde(skip))] + pub hash: OnceLock, + /// The transaction signature values + pub signature: Signature, + /// Raw transaction info + #[deref] + #[as_ref] + pub transaction: ScrollTypedTransaction, +} + +impl ScrollTransactionSigned { + /// Calculates hash of given transaction and signature and returns new instance. + pub fn new(transaction: ScrollTypedTransaction, signature: Signature) -> Self { + let signed_tx = Self::new_unhashed(transaction, signature); + if signed_tx.ty() != ScrollTxType::L1Message { + signed_tx.hash.get_or_init(|| signed_tx.recalculate_hash()); + } + + signed_tx + } + + /// Creates a new signed transaction from the given transaction and signature without the hash. + /// + /// Note: this only calculates the hash on the first [`ScrollTransactionSigned::hash`] call. + pub fn new_unhashed(transaction: ScrollTypedTransaction, signature: Signature) -> Self { + Self { hash: Default::default(), signature, transaction } + } + + /// Returns whether this transaction is a l1 message. + pub const fn is_l1_message(&self) -> bool { + matches!(self.transaction, ScrollTypedTransaction::L1Message(_)) + } +} + +impl SignedTransaction for ScrollTransactionSigned { + fn tx_hash(&self) -> &TxHash { + self.hash.get_or_init(|| self.recalculate_hash()) + } + + fn signature(&self) -> &Signature { + &self.signature + } + + fn recover_signer(&self) -> Option
{ + // Scroll's L1 message does not have a signature. Directly return the `sender` address. + if let ScrollTypedTransaction::L1Message(TxL1Message { sender, .. }) = self.transaction { + return Some(sender) + } + + let Self { transaction, signature, .. } = self; + let signature_hash = signature_hash(transaction); + recover_signer(signature, signature_hash) + } + + fn recover_signer_unchecked(&self) -> Option
{ + // Scroll's L1 message does not have a signature. Directly return the `sender` address. + if let ScrollTypedTransaction::L1Message(TxL1Message { sender, .. }) = &self.transaction { + return Some(*sender) + } + + let Self { transaction, signature, .. } = self; + let signature_hash = signature_hash(transaction); + recover_signer_unchecked(signature, signature_hash) + } + + fn recover_signer_unchecked_with_buf(&self, buf: &mut Vec) -> Option
{ + match &self.transaction { + // Scroll's L1 message does not have a signature. Directly return the `sender` address. + ScrollTypedTransaction::L1Message(tx) => return Some(tx.sender), + ScrollTypedTransaction::Legacy(tx) => tx.encode_for_signing(buf), + ScrollTypedTransaction::Eip2930(tx) => tx.encode_for_signing(buf), + ScrollTypedTransaction::Eip1559(tx) => tx.encode_for_signing(buf), + }; + recover_signer_unchecked(&self.signature, keccak256(buf)) + } + + fn recalculate_hash(&self) -> B256 { + keccak256(self.encoded_2718()) + } +} + +#[cfg(feature = "scroll")] +impl reth_primitives_traits::FillTxEnv for ScrollTransactionSigned { + fn fill_tx_env(&self, tx_env: &mut revm_primitives::TxEnv, sender: Address) { + let envelope = self.encoded_2718(); + + tx_env.caller = sender; + match &self.transaction { + ScrollTypedTransaction::Legacy(tx) => { + tx_env.gas_limit = tx.gas_limit; + tx_env.gas_price = alloy_primitives::U256::from(tx.gas_price); + tx_env.gas_priority_fee = None; + tx_env.transact_to = tx.to; + tx_env.value = tx.value; + tx_env.data = tx.input.clone(); + tx_env.chain_id = tx.chain_id; + tx_env.nonce = Some(tx.nonce); + tx_env.access_list.clear(); + tx_env.blob_hashes.clear(); + tx_env.max_fee_per_blob_gas.take(); + tx_env.authorization_list = None; + } + ScrollTypedTransaction::Eip2930(tx) => { + tx_env.gas_limit = tx.gas_limit; + tx_env.gas_price = alloy_primitives::U256::from(tx.gas_price); + tx_env.gas_priority_fee = None; + tx_env.transact_to = tx.to; + tx_env.value = tx.value; + tx_env.data = tx.input.clone(); + tx_env.chain_id = Some(tx.chain_id); + tx_env.nonce = Some(tx.nonce); + tx_env.access_list.clone_from(&tx.access_list.0); + tx_env.blob_hashes.clear(); + tx_env.max_fee_per_blob_gas.take(); + tx_env.authorization_list = None; + } + ScrollTypedTransaction::Eip1559(tx) => { + tx_env.gas_limit = tx.gas_limit; + tx_env.gas_price = alloy_primitives::U256::from(tx.max_fee_per_gas); + tx_env.gas_priority_fee = + Some(alloy_primitives::U256::from(tx.max_priority_fee_per_gas)); + tx_env.transact_to = tx.to; + tx_env.value = tx.value; + tx_env.data = tx.input.clone(); + tx_env.chain_id = Some(tx.chain_id); + tx_env.nonce = Some(tx.nonce); + tx_env.access_list.clone_from(&tx.access_list.0); + tx_env.blob_hashes.clear(); + tx_env.max_fee_per_blob_gas.take(); + tx_env.authorization_list = None; + } + ScrollTypedTransaction::L1Message(tx) => { + tx_env.access_list.clear(); + tx_env.gas_limit = tx.gas_limit; + tx_env.gas_price = alloy_primitives::U256::ZERO; + tx_env.gas_priority_fee = None; + tx_env.transact_to = TxKind::Call(tx.to); + tx_env.value = tx.value; + tx_env.data = tx.input.clone(); + tx_env.chain_id = None; + tx_env.nonce = None; + tx_env.authorization_list = None; + + tx_env.scroll = revm_primitives::ScrollFields { + is_l1_msg: true, + rlp_bytes: Some(envelope.into()), + }; + return + } + } + + tx_env.scroll = + revm_primitives::ScrollFields { is_l1_msg: false, rlp_bytes: Some(envelope.into()) } + } +} + +impl InMemorySize for ScrollTransactionSigned { + #[inline] + fn size(&self) -> usize { + mem::size_of::() + self.transaction.size() + mem::size_of::() + } +} + +impl alloy_rlp::Encodable for ScrollTransactionSigned { + fn encode(&self, out: &mut dyn alloy_rlp::bytes::BufMut) { + self.network_encode(out); + } + + fn length(&self) -> usize { + let mut payload_length = self.encode_2718_len(); + if !Encodable2718::is_legacy(self) { + payload_length += Header { list: false, payload_length }.length(); + } + + payload_length + } +} + +impl alloy_rlp::Decodable for ScrollTransactionSigned { + fn decode(buf: &mut &[u8]) -> alloy_rlp::Result { + Self::network_decode(buf).map_err(Into::into) + } +} + +impl Encodable2718 for ScrollTransactionSigned { + fn type_flag(&self) -> Option { + if Typed2718::is_legacy(self) { + None + } else { + Some(self.ty()) + } + } + + fn encode_2718_len(&self) -> usize { + match &self.transaction { + ScrollTypedTransaction::Legacy(legacy_tx) => { + legacy_tx.eip2718_encoded_length(&self.signature) + } + ScrollTypedTransaction::Eip2930(access_list_tx) => { + access_list_tx.eip2718_encoded_length(&self.signature) + } + ScrollTypedTransaction::Eip1559(dynamic_fee_tx) => { + dynamic_fee_tx.eip2718_encoded_length(&self.signature) + } + ScrollTypedTransaction::L1Message(l1_message) => l1_message.eip2718_encoded_length(), + } + } + + fn encode_2718(&self, out: &mut dyn alloy_rlp::BufMut) { + let Self { transaction, signature, .. } = self; + + match &transaction { + ScrollTypedTransaction::Legacy(legacy_tx) => { + // do nothing w/ with_header + legacy_tx.eip2718_encode(signature, out) + } + ScrollTypedTransaction::Eip2930(access_list_tx) => { + access_list_tx.eip2718_encode(signature, out) + } + ScrollTypedTransaction::Eip1559(dynamic_fee_tx) => { + dynamic_fee_tx.eip2718_encode(signature, out) + } + ScrollTypedTransaction::L1Message(l1_message) => l1_message.encode_2718(out), + } + } +} + +impl Decodable2718 for ScrollTransactionSigned { + fn typed_decode(ty: u8, buf: &mut &[u8]) -> Eip2718Result { + match ty.try_into().map_err(|_| Eip2718Error::UnexpectedType(ty))? { + ScrollTxType::Legacy => Err(Eip2718Error::UnexpectedType(0)), + ScrollTxType::Eip2930 => { + let (tx, signature, hash) = TxEip2930::rlp_decode_signed(buf)?.into_parts(); + let signed_tx = Self::new_unhashed(ScrollTypedTransaction::Eip2930(tx), signature); + signed_tx.hash.get_or_init(|| hash); + Ok(signed_tx) + } + ScrollTxType::Eip1559 => { + let (tx, signature, hash) = TxEip1559::rlp_decode_signed(buf)?.into_parts(); + let signed_tx = Self::new_unhashed(ScrollTypedTransaction::Eip1559(tx), signature); + signed_tx.hash.get_or_init(|| hash); + Ok(signed_tx) + } + ScrollTxType::L1Message => Ok(Self::new_unhashed( + ScrollTypedTransaction::L1Message(TxL1Message::rlp_decode(buf)?), + TxL1Message::signature(), + )), + } + } + + fn fallback_decode(buf: &mut &[u8]) -> Eip2718Result { + let (transaction, signature) = TxLegacy::rlp_decode_with_signature(buf)?; + let signed_tx = Self::new_unhashed(ScrollTypedTransaction::Legacy(transaction), signature); + + Ok(signed_tx) + } +} + +impl Transaction for ScrollTransactionSigned { + fn chain_id(&self) -> Option { + self.deref().chain_id() + } + + fn nonce(&self) -> u64 { + self.deref().nonce() + } + + fn gas_limit(&self) -> u64 { + self.deref().gas_limit() + } + + fn gas_price(&self) -> Option { + self.deref().gas_price() + } + + fn max_fee_per_gas(&self) -> u128 { + self.deref().max_fee_per_gas() + } + + fn max_priority_fee_per_gas(&self) -> Option { + self.deref().max_priority_fee_per_gas() + } + + fn max_fee_per_blob_gas(&self) -> Option { + self.deref().max_fee_per_blob_gas() + } + + fn priority_fee_or_price(&self) -> u128 { + self.deref().priority_fee_or_price() + } + + fn effective_gas_price(&self, base_fee: Option) -> u128 { + self.deref().effective_gas_price(base_fee) + } + + fn effective_tip_per_gas(&self, base_fee: u64) -> Option { + self.deref().effective_tip_per_gas(base_fee) + } + + fn is_dynamic_fee(&self) -> bool { + self.deref().is_dynamic_fee() + } + + fn kind(&self) -> TxKind { + self.deref().kind() + } + + fn is_create(&self) -> bool { + self.deref().is_create() + } + + fn value(&self) -> Uint<256, 4> { + self.deref().value() + } + + fn input(&self) -> &Bytes { + self.deref().input() + } + + fn access_list(&self) -> Option<&AccessList> { + self.deref().access_list() + } + + fn blob_versioned_hashes(&self) -> Option<&[B256]> { + self.deref().blob_versioned_hashes() + } + + fn authorization_list(&self) -> Option<&[SignedAuthorization]> { + self.deref().authorization_list() + } +} + +impl Typed2718 for ScrollTransactionSigned { + fn ty(&self) -> u8 { + self.deref().ty() + } +} + +impl PartialEq for ScrollTransactionSigned { + fn eq(&self, other: &Self) -> bool { + self.signature == other.signature && + self.transaction == other.transaction && + self.tx_hash() == other.tx_hash() + } +} + +impl Hash for ScrollTransactionSigned { + fn hash(&self, state: &mut H) { + self.signature.hash(state); + self.transaction.hash(state); + } +} + +#[cfg(feature = "reth-codec")] +impl reth_codecs::Compact for ScrollTransactionSigned { + fn to_compact(&self, buf: &mut B) -> usize + where + B: bytes::BufMut + AsMut<[u8]>, + { + let start = buf.as_mut().len(); + + // Placeholder for bitflags. + // The first byte uses 4 bits as flags: IsCompressed[1bit], TxType[2bits], Signature[1bit] + buf.put_u8(0); + + let sig_bit = self.signature.to_compact(buf) as u8; + let zstd_bit = self.transaction.input().len() >= 32; + + let tx_bits = if zstd_bit { + let mut tmp = Vec::with_capacity(256); + if cfg!(feature = "std") { + reth_zstd_compressors::TRANSACTION_COMPRESSOR.with(|compressor| { + let mut compressor = compressor.borrow_mut(); + let tx_bits = self.transaction.to_compact(&mut tmp); + buf.put_slice(&compressor.compress(&tmp).expect("Failed to compress")); + tx_bits as u8 + }) + } else { + let mut compressor = reth_zstd_compressors::create_tx_compressor(); + let tx_bits = self.transaction.to_compact(&mut tmp); + buf.put_slice(&compressor.compress(&tmp).expect("Failed to compress")); + tx_bits as u8 + } + } else { + self.transaction.to_compact(buf) as u8 + }; + + // Replace bitflags with the actual values + buf.as_mut()[start] = sig_bit | (tx_bits << 1) | ((zstd_bit as u8) << 3); + + buf.as_mut().len() - start + } + + fn from_compact(mut buf: &[u8], _len: usize) -> (Self, &[u8]) { + use bytes::Buf; + + // The first byte uses 4 bits as flags: IsCompressed[1], TxType[2], Signature[1] + let bitflags = buf.get_u8() as usize; + + let sig_bit = bitflags & 1; + let (signature, buf) = Signature::from_compact(buf, sig_bit); + + let zstd_bit = bitflags >> 3; + let (transaction, buf) = if zstd_bit != 0 { + if cfg!(feature = "std") { + reth_zstd_compressors::TRANSACTION_DECOMPRESSOR.with(|decompressor| { + let mut decompressor = decompressor.borrow_mut(); + + // TODO: enforce that zstd is only present at a "top" level type + let transaction_type = (bitflags & 0b110) >> 1; + let (transaction, _) = ScrollTypedTransaction::from_compact( + decompressor.decompress(buf), + transaction_type, + ); + + (transaction, buf) + }) + } else { + let mut decompressor = reth_zstd_compressors::create_tx_decompressor(); + let transaction_type = (bitflags & 0b110) >> 1; + let (transaction, _) = ScrollTypedTransaction::from_compact( + decompressor.decompress(buf), + transaction_type, + ); + + (transaction, buf) + } + } else { + let transaction_type = bitflags >> 1; + ScrollTypedTransaction::from_compact(buf, transaction_type) + }; + + (Self { signature, transaction, hash: Default::default() }, buf) + } +} + +#[cfg(any(test, feature = "arbitrary"))] +impl<'a> arbitrary::Arbitrary<'a> for ScrollTransactionSigned { + fn arbitrary(u: &mut arbitrary::Unstructured<'a>) -> arbitrary::Result { + #[allow(unused_mut)] + let mut transaction = ScrollTypedTransaction::arbitrary(u)?; + + let secp = secp256k1::Secp256k1::new(); + let key_pair = secp256k1::Keypair::new(&secp, &mut rand::thread_rng()); + let signature = reth_primitives_traits::crypto::secp256k1::sign_message( + B256::from_slice(&key_pair.secret_bytes()[..]), + signature_hash(&transaction), + ) + .unwrap(); + + let signature = + if is_l1_message(&transaction) { TxL1Message::signature() } else { signature }; + + Ok(Self::new(transaction, signature)) + } +} + +/// Calculates the signing hash for the transaction. +fn signature_hash(tx: &ScrollTypedTransaction) -> B256 { + match tx { + ScrollTypedTransaction::Legacy(tx) => tx.signature_hash(), + ScrollTypedTransaction::Eip2930(tx) => tx.signature_hash(), + ScrollTypedTransaction::Eip1559(tx) => tx.signature_hash(), + ScrollTypedTransaction::L1Message(_) => B256::ZERO, + } +} + +/// Returns `true` if transaction is l1 message. +pub const fn is_l1_message(tx: &ScrollTypedTransaction) -> bool { + matches!(tx, ScrollTypedTransaction::L1Message(_)) +} + +impl> From> for ScrollTransactionSigned { + fn from(value: Signed) -> Self { + let (tx, sig, hash) = value.into_parts(); + let this = Self::new(tx.into(), sig); + this.hash.get_or_init(|| hash); + this + } +} + +/// Bincode-compatible transaction type serde implementations. +#[cfg(feature = "serde-bincode-compat")] +pub mod serde_bincode_compat { + use alloc::borrow::Cow; + use alloy_consensus::transaction::serde_bincode_compat::{TxEip1559, TxEip2930, TxLegacy}; + use alloy_primitives::{PrimitiveSignature as Signature, TxHash}; + use reth_primitives_traits::{serde_bincode_compat::SerdeBincodeCompat, SignedTransaction}; + use serde::{Deserialize, Serialize}; + + /// Bincode-compatible [`super::ScrollTypedTransaction`] serde implementation. + #[derive(Debug, Serialize, Deserialize)] + #[allow(missing_docs)] + enum ScrollTypedTransaction<'a> { + Legacy(TxLegacy<'a>), + Eip2930(TxEip2930<'a>), + Eip1559(TxEip1559<'a>), + L1Message(Cow<'a, scroll_alloy_consensus::TxL1Message>), + } + + impl<'a> From<&'a super::ScrollTypedTransaction> for ScrollTypedTransaction<'a> { + fn from(value: &'a super::ScrollTypedTransaction) -> Self { + match value { + super::ScrollTypedTransaction::Legacy(tx) => Self::Legacy(TxLegacy::from(tx)), + super::ScrollTypedTransaction::Eip2930(tx) => Self::Eip2930(TxEip2930::from(tx)), + super::ScrollTypedTransaction::Eip1559(tx) => Self::Eip1559(TxEip1559::from(tx)), + super::ScrollTypedTransaction::L1Message(tx) => Self::L1Message(Cow::Borrowed(tx)), + } + } + } + + impl<'a> From> for super::ScrollTypedTransaction { + fn from(value: ScrollTypedTransaction<'a>) -> Self { + match value { + ScrollTypedTransaction::Legacy(tx) => Self::Legacy(tx.into()), + ScrollTypedTransaction::Eip2930(tx) => Self::Eip2930(tx.into()), + ScrollTypedTransaction::Eip1559(tx) => Self::Eip1559(tx.into()), + ScrollTypedTransaction::L1Message(tx) => Self::L1Message(tx.into_owned()), + } + } + } + + /// Bincode-compatible [`super::ScrollTransactionSigned`] serde implementation. + #[derive(Debug, Serialize, Deserialize)] + pub struct ScrollTransactionSigned<'a> { + hash: TxHash, + signature: Signature, + transaction: ScrollTypedTransaction<'a>, + } + + impl<'a> From<&'a super::ScrollTransactionSigned> for ScrollTransactionSigned<'a> { + fn from(value: &'a super::ScrollTransactionSigned) -> Self { + Self { + hash: *value.tx_hash(), + signature: value.signature, + transaction: ScrollTypedTransaction::from(&value.transaction), + } + } + } + + impl<'a> From> for super::ScrollTransactionSigned { + fn from(value: ScrollTransactionSigned<'a>) -> Self { + Self { + hash: value.hash.into(), + signature: value.signature, + transaction: value.transaction.into(), + } + } + } + + impl SerdeBincodeCompat for super::ScrollTransactionSigned { + type BincodeRepr<'a> = ScrollTransactionSigned<'a>; + } +} diff --git a/crates/scroll/primitives/src/transaction/tx_type.rs b/crates/scroll/primitives/src/transaction/tx_type.rs new file mode 100644 index 000000000000..e549b81bd97a --- /dev/null +++ b/crates/scroll/primitives/src/transaction/tx_type.rs @@ -0,0 +1,47 @@ +//! Scroll transaction type. + +pub use scroll_alloy_consensus::ScrollTxType; + +#[cfg(test)] +mod tests { + use super::*; + use reth_codecs::{txtype::*, Compact}; + use rstest::rstest; + use scroll_alloy_consensus::L1_MESSAGE_TX_TYPE_ID; + + #[rstest] + #[case(ScrollTxType::Legacy, COMPACT_IDENTIFIER_LEGACY, vec![])] + #[case(ScrollTxType::Eip2930, COMPACT_IDENTIFIER_EIP2930, vec![])] + #[case(ScrollTxType::Eip1559, COMPACT_IDENTIFIER_EIP1559, vec![])] + #[case(ScrollTxType::L1Message, COMPACT_EXTENDED_IDENTIFIER_FLAG, vec![L1_MESSAGE_TX_TYPE_ID])] + fn test_txtype_to_compact( + #[case] tx_type: ScrollTxType, + #[case] expected_identifier: usize, + #[case] expected_buf: Vec, + ) { + let mut buf = vec![]; + let identifier = tx_type.to_compact(&mut buf); + + assert_eq!( + identifier, expected_identifier, + "Unexpected identifier for ScrollTxType {tx_type:?}", + ); + assert_eq!(buf, expected_buf, "Unexpected buffer for ScrollTxType {tx_type:?}",); + } + + #[rstest] + #[case(ScrollTxType::Legacy, COMPACT_IDENTIFIER_LEGACY, vec![])] + #[case(ScrollTxType::Eip2930, COMPACT_IDENTIFIER_EIP2930, vec![])] + #[case(ScrollTxType::Eip1559, COMPACT_IDENTIFIER_EIP1559, vec![])] + #[case(ScrollTxType::L1Message, COMPACT_EXTENDED_IDENTIFIER_FLAG, vec![L1_MESSAGE_TX_TYPE_ID])] + fn test_txtype_from_compact( + #[case] expected_type: ScrollTxType, + #[case] identifier: usize, + #[case] buf: Vec, + ) { + let (actual_type, remaining_buf) = ScrollTxType::from_compact(&buf, identifier); + + assert_eq!(actual_type, expected_type, "Unexpected TxType for identifier {identifier}"); + assert!(remaining_buf.is_empty(), "Buffer not fully consumed for identifier {identifier}"); + } +} diff --git a/crates/storage/codecs/derive/src/compact/mod.rs b/crates/storage/codecs/derive/src/compact/mod.rs index e7906bbdb506..b3232c25762c 100644 --- a/crates/storage/codecs/derive/src/compact/mod.rs +++ b/crates/storage/codecs/derive/src/compact/mod.rs @@ -200,7 +200,7 @@ fn should_use_alt_impl(ftype: &str, segment: &syn::PathSegment) -> bool { pub fn get_bit_size(ftype: &str) -> u8 { match ftype { "TransactionKind" | "TxKind" | "bool" | "Option" | "Signature" => 1, - "TxType" | "OpTxType" => 2, + "TxType" | "OpTxType" | "ScrollTxType" => 2, "u64" | "BlockNumber" | "TxNumber" | "ChainId" | "NumTransactions" => 4, "u128" => 5, "U256" => 6, diff --git a/crates/storage/storage-api/src/trie.rs b/crates/storage/storage-api/src/trie.rs index 2223b551c26f..e8b3dce2b7f1 100644 --- a/crates/storage/storage-api/src/trie.rs +++ b/crates/storage/storage-api/src/trie.rs @@ -20,7 +20,7 @@ pub trait StateRootProvider: Send + Sync { /// computation. fn state_root_from_state(&self, hashed_state: HashedPostState) -> ProviderResult; - /// Returns the state root of the `HashedPostState` on top of the current state but re-uses the + /// Returns the state root of the `HashedPostState` on top of the current state but reuses the /// intermediate nodes to speed up the computation. It's up to the caller to construct the /// prefix sets and inform the provider of the trie paths that have changes. fn state_root_from_nodes(&self, input: TrieInput) -> ProviderResult; diff --git a/crates/trie/sparse/src/trie.rs b/crates/trie/sparse/src/trie.rs index 21a64c0d6c21..357673b751e8 100644 --- a/crates/trie/sparse/src/trie.rs +++ b/crates/trie/sparse/src/trie.rs @@ -2246,7 +2246,7 @@ mod tests { /// different prefix: 0x0100. Hash builder trie has only the first two leaves, and we have /// proofs for them. /// - /// 1. Insert the leaf 0x0100 into the sparse trie, and check that the root extensino node was + /// 1. Insert the leaf 0x0100 into the sparse trie, and check that the root extension node was /// turned into a branch node. /// 2. Reveal the leaf 0x0001 in the sparse trie, and check that the root branch node wasn't /// overwritten with the extension node from the proof. From b4a5db9e1302ddbe899d9e34e9e1799131bb33a2 Mon Sep 17 00:00:00 2001 From: georgehao Date: Wed, 22 Jan 2025 17:54:01 +0800 Subject: [PATCH 86/86] address comments --- .../consensus/src/transaction/tx_type.rs | 8 +-- crates/scroll/rpc/src/error.rs | 65 ------------------- crates/scroll/rpc/src/eth/receipt.rs | 5 +- crates/scroll/rpc/src/lib.rs | 2 +- 4 files changed, 6 insertions(+), 74 deletions(-) diff --git a/crates/scroll/alloy/consensus/src/transaction/tx_type.rs b/crates/scroll/alloy/consensus/src/transaction/tx_type.rs index c5616d1752f5..5d5c9a48fd43 100644 --- a/crates/scroll/alloy/consensus/src/transaction/tx_type.rs +++ b/crates/scroll/alloy/consensus/src/transaction/tx_type.rs @@ -56,10 +56,10 @@ impl TryFrom for ScrollTxType { fn try_from(value: u8) -> Result { Ok(match value { - 0 => Self::Legacy, - 1 => Self::Eip2930, - 2 => Self::Eip1559, - 126 => Self::L1Message, + x if x == Self::Legacy as u8 => Self::Legacy, + x if x == Self::Eip2930 as u8 => Self::Eip2930, + x if x == Self::Eip1559 as u8 => Self::Eip1559, + x if x == Self::L1Message as u8 => Self::L1Message, _ => return Err(Eip2718Error::UnexpectedType(value)), }) } diff --git a/crates/scroll/rpc/src/error.rs b/crates/scroll/rpc/src/error.rs index 8d1d3e0507ec..e96fdbafd37b 100644 --- a/crates/scroll/rpc/src/error.rs +++ b/crates/scroll/rpc/src/error.rs @@ -1,13 +1,8 @@ //! RPC errors specific to Scroll. use alloy_rpc_types_eth::BlockError; -use jsonrpsee_types::error::INTERNAL_ERROR_CODE; use reth_rpc_eth_api::AsEthApiError; use reth_rpc_eth_types::EthApiError; -use reth_rpc_server_types::result::internal_rpc_err; -use revm::primitives::InvalidTransaction; - -use reth_scroll_evm::ScrollBlockExecutionError; /// Scroll specific errors, that extend [`EthApiError`]. #[derive(Debug, thiserror::Error)] @@ -15,28 +10,12 @@ pub enum ScrollEthApiError { /// L1 ethereum error. #[error(transparent)] Eth(#[from] EthApiError), - /// EVM error originating from invalid Scroll data. - #[error(transparent)] - Evm(#[from] ScrollBlockExecutionError), - /// Thrown when calculating L1 gas fee. - #[error("failed to calculate l1 gas fee")] - L1BlockFeeError, - /// Thrown when calculating L1 gas used - #[error("failed to calculate l1 gas used")] - L1BlockGasError, - /// Wrapper for [`revm_primitives::InvalidTransaction`](InvalidTransaction). - #[error(transparent)] - InvalidTransaction(#[from] ScrollInvalidTransactionError), - /// Sequencer client error. - #[error(transparent)] - Sequencer(#[from] SequencerClientError), } impl AsEthApiError for ScrollEthApiError { fn as_err(&self) -> Option<&EthApiError> { match self { Self::Eth(err) => Some(err), - _ => None, } } } @@ -45,54 +24,10 @@ impl From for jsonrpsee_types::error::ErrorObject<'static> { fn from(err: ScrollEthApiError) -> Self { match err { ScrollEthApiError::Eth(err) => err.into(), - ScrollEthApiError::InvalidTransaction(err) => err.into(), - ScrollEthApiError::Evm(_) | - ScrollEthApiError::L1BlockFeeError | - ScrollEthApiError::L1BlockGasError => internal_rpc_err(err.to_string()), - ScrollEthApiError::Sequencer(err) => err.into(), } } } -/// Scroll specific invalid transaction errors -#[derive(thiserror::Error, Debug)] -pub enum ScrollInvalidTransactionError {} - -impl From for jsonrpsee_types::error::ErrorObject<'static> { - fn from(err: ScrollInvalidTransactionError) -> Self { - match err {} - } -} - -impl TryFrom for ScrollInvalidTransactionError { - type Error = InvalidTransaction; - - fn try_from(err: InvalidTransaction) -> Result { - Err(err) - } -} - -/// Error type when interacting with the Sequencer -#[derive(Debug, thiserror::Error)] -pub enum SequencerClientError { - /// Wrapper around an [`reqwest::Error`]. - #[error(transparent)] - HttpError(#[from] reqwest::Error), - /// Thrown when serializing transaction to forward to sequencer - #[error("invalid sequencer transaction")] - InvalidSequencerTransaction, -} - -impl From for jsonrpsee_types::error::ErrorObject<'static> { - fn from(err: SequencerClientError) -> Self { - jsonrpsee_types::error::ErrorObject::owned( - INTERNAL_ERROR_CODE, - err.to_string(), - None::, - ) - } -} - impl From for ScrollEthApiError { fn from(error: BlockError) -> Self { Self::Eth(error.into()) diff --git a/crates/scroll/rpc/src/eth/receipt.rs b/crates/scroll/rpc/src/eth/receipt.rs index c72ea61ecbb2..14e25d8b5096 100644 --- a/crates/scroll/rpc/src/eth/receipt.rs +++ b/crates/scroll/rpc/src/eth/receipt.rs @@ -63,10 +63,7 @@ impl ScrollReceiptBuilder { TxType::Legacy => ScrollReceiptEnvelope::::Legacy(receipt_with_bloom), TxType::Eip2930 => ScrollReceiptEnvelope::::Eip2930(receipt_with_bloom), TxType::Eip1559 => ScrollReceiptEnvelope::::Eip1559(receipt_with_bloom), - TxType::Eip4844 => { - // TODO: unreachable - ScrollReceiptEnvelope::::Eip1559(receipt_with_bloom) - } + TxType::Eip4844 => unimplemented!("eip4844 unsupported"), TxType::Eip7702 => unimplemented!("eip7702 unsupported"), TxType::L1Message => { ScrollReceiptEnvelope::::L1Message(receipt_with_bloom) diff --git a/crates/scroll/rpc/src/lib.rs b/crates/scroll/rpc/src/lib.rs index 7dcd20f4a3f2..7464ea0192c8 100644 --- a/crates/scroll/rpc/src/lib.rs +++ b/crates/scroll/rpc/src/lib.rs @@ -14,5 +14,5 @@ pub mod error; pub mod eth; -pub use error::{ScrollEthApiError, ScrollInvalidTransactionError, SequencerClientError}; +pub use error::ScrollEthApiError; pub use eth::{ScrollEthApi, ScrollReceiptBuilder};