diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c48950b8ca..c747f5150c 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -43,6 +43,18 @@ jobs: with: components: rustfmt - run: cargo fmt --all --check + + crate-checks: + runs-on: ubuntu-latest + timeout-minutes: 30 + if: github.event_name == 'push' + steps: + - uses: actions/checkout@v5 + - uses: dtolnay/rust-toolchain@stable + - uses: rui314/setup-mold@v1 + - uses: mozilla-actions/sccache-action@v0.0.9 + - uses: taiki-e/install-action@cargo-hack + - run: cargo hack check --feature-powerset --depth 1 docs: name: docs diff --git a/Cargo.lock b/Cargo.lock index be7adeb22c..f15c7f0470 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3298,7 +3298,7 @@ dependencies = [ "libc", "option-ext", "redox_users 0.5.2", - "windows-sys 0.61.1", + "windows-sys 0.59.0", ] [[package]] @@ -4454,7 +4454,7 @@ dependencies = [ "js-sys", "log", "wasm-bindgen", - "windows-core 0.61.2", + "windows-core 0.57.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 38b6068e32..f9f8b4c444 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -127,7 +127,7 @@ reth-ethereum-engine-primitives = { git = "https://github.com/paradigmxyz/reth", reth-evm = { git = "https://github.com/paradigmxyz/reth", rev = "020eb6a" } reth-evm-ethereum = { git = "https://github.com/paradigmxyz/reth", rev = "020eb6a" } reth-ethereum-forks = { git = "https://github.com/paradigmxyz/reth", rev = "020eb6a" } -reth-ethereum-primitives = { git = "https://github.com/paradigmxyz/reth", rev = "020eb6a" } +reth-ethereum-primitives = { git = "https://github.com/paradigmxyz/reth", rev = "020eb6a", default-features = false } reth-execution-types = { git = "https://github.com/paradigmxyz/reth", rev = "020eb6a" } reth-metrics = { git = "https://github.com/paradigmxyz/reth", rev = "020eb6a" } reth-node-builder = { git = "https://github.com/paradigmxyz/reth", rev = "020eb6a" } @@ -136,7 +136,7 @@ reth-node-ethereum = { git = "https://github.com/paradigmxyz/reth", rev = "020eb reth-network-peers = { git = "https://github.com/paradigmxyz/reth", rev = "020eb6a" } reth-payload-builder = { git = "https://github.com/paradigmxyz/reth", rev = "020eb6a" } reth-payload-primitives = { git = "https://github.com/paradigmxyz/reth", rev = "020eb6a" } -reth-primitives-traits = { git = "https://github.com/paradigmxyz/reth", rev = "020eb6a" } +reth-primitives-traits = { git = "https://github.com/paradigmxyz/reth", rev = "020eb6a", default-features = false } reth-provider = { git = "https://github.com/paradigmxyz/reth", rev = "020eb6a" } reth-rpc-builder = { git = "https://github.com/paradigmxyz/reth", rev = "020eb6a" } reth-rpc-convert = { git = "https://github.com/paradigmxyz/reth", rev = "020eb6a" } diff --git a/bin/tempo-sidecar/Cargo.toml b/bin/tempo-sidecar/Cargo.toml index ef55ae8ae1..8459a7f4e9 100644 --- a/bin/tempo-sidecar/Cargo.toml +++ b/bin/tempo-sidecar/Cargo.toml @@ -18,6 +18,8 @@ alloy = { workspace = true, default-features = false, features = [ "reqwest-rustls-tls", "signers", "signer-local", + "signer-mnemonic", + "rand", ] } dashmap = "6.1" eyre.workspace = true diff --git a/crates/primitives/Cargo.toml b/crates/primitives/Cargo.toml index 78362222ae..8c3fea5ab2 100644 --- a/crates/primitives/Cargo.toml +++ b/crates/primitives/Cargo.toml @@ -66,6 +66,7 @@ serde = [ "p256/serde", ] reth-codec = [ + "serde", "dep:reth-codecs", "dep:reth-db-api", "dep:modular-bitfield", @@ -101,4 +102,4 @@ rpc = [ "dep:reth-rpc-convert", "dep:alloy-network", ] -cli = ["dep:reth-cli-commands"] +cli = ["dep:reth-cli-commands", "serde", "serde-bincode-compat", "reth-codec"] diff --git a/crates/primitives/src/header.rs b/crates/primitives/src/header.rs index ef9e3620b1..f37882b639 100644 --- a/crates/primitives/src/header.rs +++ b/crates/primitives/src/header.rs @@ -1,14 +1,14 @@ use alloy_consensus::{BlockHeader, Header, Sealable}; use alloy_primitives::{Address, B64, B256, BlockNumber, Bloom, Bytes, U256, keccak256}; use alloy_rlp::{RlpDecodable, RlpEncodable}; -use reth_codecs::Compact; -use reth_primitives_traits::{InMemorySize, serde_bincode_compat::RlpBincode}; +use reth_primitives_traits::InMemorySize; /// Tempo block header. /// /// Encoded as `rlp([inner, general_gas_limit])` meaning that any new /// fields added to the inner header will only affect the first list element. -#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, RlpEncodable, RlpDecodable, Compact)] +#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, RlpEncodable, RlpDecodable)] +#[cfg_attr(feature = "reth-codec", derive(reth_codecs::Compact))] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] #[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] #[cfg_attr(any(test, feature = "arbitrary"), derive(arbitrary::Arbitrary))] @@ -43,7 +43,8 @@ impl AsRef for TempoHeader { } } -impl RlpBincode for TempoHeader {} +#[cfg(feature = "serde-bincode-compat")] +impl reth_primitives_traits::serde_bincode_compat::RlpBincode for TempoHeader {} impl BlockHeader for TempoHeader { fn parent_hash(&self) -> B256 { @@ -150,17 +151,19 @@ impl Sealable for TempoHeader { impl reth_primitives_traits::BlockHeader for TempoHeader {} +#[cfg(feature = "reth-codec")] impl reth_db_api::table::Compress for TempoHeader { type Compressed = Vec; fn compress_to_buf>(&self, buf: &mut B) { - let _ = Compact::to_compact(self, buf); + let _ = reth_codecs::Compact::to_compact(self, buf); } } +#[cfg(feature = "reth-codec")] impl reth_db_api::table::Decompress for TempoHeader { fn decompress(value: &[u8]) -> Result { - let (obj, _) = Compact::from_compact(value, value.len()); + let (obj, _) = reth_codecs::Compact::from_compact(value, value.len()); Ok(obj) } } diff --git a/crates/primitives/src/transaction/envelope.rs b/crates/primitives/src/transaction/envelope.rs index d15ce3bd48..ea03d917fc 100644 --- a/crates/primitives/src/transaction/envelope.rs +++ b/crates/primitives/src/transaction/envelope.rs @@ -1,13 +1,10 @@ -use super::{ - aa_signature::AASignature, aa_signed::AASigned, account_abstraction::TxAA, - fee_token::TxFeeToken, -}; +use super::{aa_signed::AASigned, fee_token::TxFeeToken}; use alloy_consensus::{ EthereumTxEnvelope, Signed, TxEip1559, TxEip2930, TxEip7702, TxLegacy, TxType, TypedTransaction, error::{UnsupportedTransactionType, ValueError}, }; -use alloy_primitives::{Address, B256, Bytes, Signature, SignatureError, U256}; +use alloy_primitives::{Address, B256, Signature, SignatureError, U256}; use core::fmt; use reth_primitives_traits::InMemorySize; use tempo_precompiles::tip20::TIP20_PAYMENT_PREFIX; @@ -364,9 +361,14 @@ impl reth_primitives_traits::serde_bincode_compat::RlpBincode for TempoTxEnvelop #[cfg(feature = "reth-codec")] mod codec { + use crate::{AASignature, TxAA}; + use super::*; use alloy_eips::eip2718::EIP7702_TX_TYPE_ID; - use alloy_primitives::{Signature, bytes, bytes::BufMut}; + use alloy_primitives::{ + Bytes, Signature, + bytes::{self, BufMut}, + }; use reth_codecs::{ Compact, alloy::transaction::{CompactEnvelope, Envelope},