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 33c5bffbe2cd..d1840585814e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9227,6 +9227,7 @@ dependencies = [ "reth-scroll-chainspec", "reth-scroll-engine", "reth-scroll-evm", + "reth-scroll-primitives", "reth-scroll-rpc", "reth-tracing", "reth-transaction-pool", diff --git a/crates/scroll/alloy/consensus/src/receipt/receipt.rs b/crates/scroll/alloy/consensus/src/receipt/receipt.rs index 57acaae23e47..5cdd1b3e1134 100644 --- a/crates/scroll/alloy/consensus/src/receipt/receipt.rs +++ b/crates/scroll/alloy/consensus/src/receipt/receipt.rs @@ -251,8 +251,6 @@ mod tests { receipt.encode(&mut data); let decoded = ScrollReceiptWithBloom::decode(&mut &data[..]).unwrap(); - // receipt.clone().to_compact(&mut data); - // let (decoded, _) = Receipt::from_compact(&data[..], data.len()); assert_eq!(decoded, receipt); } } 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/src/receipt.rs b/crates/scroll/primitives/src/receipt.rs index 504268989223..fb4cea55235b 100644 --- a/crates/scroll/primitives/src/receipt.rs +++ b/crates/scroll/primitives/src/receipt.rs @@ -24,7 +24,7 @@ pub enum ScrollReceipt { } impl ScrollReceipt { - /// Returns [`OpTxType`] of the receipt. + /// Returns [`ScrollTxType`] of the receipt. pub const fn tx_type(&self) -> ScrollTxType { match self { Self::Legacy(_) => ScrollTxType::Legacy, diff --git a/crates/scroll/primitives/src/transaction/signed.rs b/crates/scroll/primitives/src/transaction/signed.rs index 7ebac6b5551f..1abf39779ce8 100644 --- a/crates/scroll/primitives/src/transaction/signed.rs +++ b/crates/scroll/primitives/src/transaction/signed.rs @@ -63,7 +63,7 @@ impl ScrollTransactionSigned { /// Creates a new signed transaction from the given transaction and signature without the hash. /// - /// Note: this only calculates the hash on the first [`OpTransactionSigned::hash`] call. + /// 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 } } diff --git a/crates/scroll/primitives/src/transaction/tx_type.rs b/crates/scroll/primitives/src/transaction/tx_type.rs index fc51a0238402..e549b81bd97a 100644 --- a/crates/scroll/primitives/src/transaction/tx_type.rs +++ b/crates/scroll/primitives/src/transaction/tx_type.rs @@ -24,9 +24,9 @@ mod tests { assert_eq!( identifier, expected_identifier, - "Unexpected identifier for OpTxType {tx_type:?}", + "Unexpected identifier for ScrollTxType {tx_type:?}", ); - assert_eq!(buf, expected_buf, "Unexpected buffer for OpTxType {tx_type:?}",); + assert_eq!(buf, expected_buf, "Unexpected buffer for ScrollTxType {tx_type:?}",); } #[rstest]