Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,195 changes: 609 additions & 586 deletions Cargo.lock

Large diffs are not rendered by default.

68 changes: 18 additions & 50 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bera-reth"
version = "1.3.2"
version = "1.3.3"
edition = "2024"
license = "MIT OR Apache-2.0"

Expand All @@ -13,15 +13,18 @@ alloy-network = "1.6.3"
alloy-primitives = "1.5.6"
alloy-rlp = "0.3.13"
alloy-rpc-types = "1.6.3"
alloy-rpc-types-engine = "1.6.3"
alloy-rpc-types-eth = "1.6.3"
alloy-serde = "1.6.3"
alloy-signer-local = "1.6.3"
alloy-sol-macro = "1.5.6"
alloy-sol-types = "1.5.6"
blst = "0.3"
bytes = "1.10.1"
clap = { version = "4.5.40", features = ["derive"] }
derive_more = "2.0.1"
eyre = "0.6.12"
hex = "0.4"
sha2 = "0.10"

# rpc
Expand All @@ -30,12 +33,15 @@ jsonrpsee-core = { version = "0.26.0", features = ["server"] }
jsonrpsee-proc-macros = "0.26.0"

async-trait = "0.1.88"
brotli = "7"
futures-util = "0.3"
metrics = "0.24"
modular-bitfield = "0.13.1"
reth = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.2" }
reth-basic-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.2" }
reth-chain-state = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.2" }
reth-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.2" }
reth-cli = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.2" }
reth-cli-commands = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.2" }
reth-cli-util = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.2" }
reth-codecs = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.2" }
reth-consensus-common = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.2" }
Expand All @@ -50,6 +56,8 @@ reth-ethereum-payload-builder = { git = "https://github.com/paradigmxyz/reth", t
reth-ethereum-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.2" }
reth-evm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.2" }
reth-evm-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.2" }
reth-execution-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.2" }
reth-metrics = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.2" }
reth-network-peers = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.2" }
reth-node-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.2" }
reth-node-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.2" }
Expand All @@ -58,17 +66,24 @@ reth-node-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11
reth-payload-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.2" }
reth-payload-validator = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.2" }
reth-primitives-traits = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.2" }
reth-revm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.2" }
reth-rpc = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.2" }
reth-rpc-convert = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.2" }
reth-rpc-engine-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.2" }
reth-rpc-eth-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.2" }
reth-rpc-eth-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.2" }
reth-storage-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.2" }
reth-tasks = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.2" }
reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.2" }
ringbuffer = "0.15"
serde = { version = "1.0", features = ["derive"], default-features = false }
serde_json = "1.0"
thiserror = "2.0"
tokio = "1.46.0"
tokio = { version = "1.46.0", features = ["sync", "net", "macros"] }
tokio-tungstenite = { version = "0.26", features = ["rustls-tls-native-roots"] }
tokio-util = "0.7"
tracing = "0.1.41"
url = "2"

[dev-dependencies]
alloy-provider = "1.6.3"
Expand Down Expand Up @@ -111,50 +126,3 @@ lto = "thin"

[package.metadata.cargo-machete]
ignored = ["modular-bitfield"]

# [patch."https://github.com/paradigmxyz/reth"]
# reth = { path = "../reth/bin/reth" }
# reth-rpc = { path = "../reth/crates/rpc/rpc" }
# reth-basic-payload-builder = { path = "../reth/crates/payload/basic" }
# reth-chainspec = { path = "../reth/crates/chainspec" }
# reth-cli = { path = "../reth/crates/cli/cli" }
# reth-cli-commands = { path = "../reth/crates/cli/commands" }
# reth-cli-util = { path = "../reth/crates/cli/util" }
# reth-db = { path = "../reth/crates/storage/db" }
# reth-engine-local = { path = "../reth/crates/engine/local" }
# reth-engine-primitives = { path = "../reth/crates/engine/primitives" }
# reth-ethereum-cli = { path = "../reth/crates/ethereum/cli" }
# reth-engine-tree = { path = "../reth/crates/engine/tree" }
# reth-ethereum-engine-primitives = { path = "../reth/crates/ethereum/engine-primitives" }
# reth-ethereum-payload-builder = { path = "../reth/crates/ethereum/payload" }
# reth-ethereum-primitives = { path = "../reth/crates/ethereum/primitives" }
# reth-evm = { path = "../reth/crates/evm/evm" }
# reth-evm-ethereum = { path = "../reth/crates/ethereum/evm" }
# reth-network-peers = { path = "../reth/crates/net/peers" }
# reth-node-api = { path = "../reth/crates/node/api" }
# reth-node-builder = { path = "../reth/crates/node/builder" }
# reth-node-core = { path = "../reth/crates/node/core" }
# reth-payload-validator = { path = "../reth/crates/payload/validator" }
# reth-node-ethereum = { path = "../reth/crates/ethereum/node" }
# reth-payload-primitives = { path = "../reth/crates/payload/primitives" }
# reth-primitives-traits = { path = "../reth/crates/primitives-traits" }
# reth-tracing = { path = "../reth/crates/tracing" }
# reth-codecs = { path = "../reth/crates/storage/codecs" }
# reth-db-api = { path = "../reth/crates/storage/db-api" }
# reth-rpc-engine-api = { path = "../reth/crates/rpc/rpc-engine-api" }
# reth-rpc-eth-api = { path = "../reth/crates/rpc/rpc-eth-api" }
# reth-rpc-eth-types = { path = "../reth/crates/rpc/rpc-eth-types" }
# reth-rpc-convert = { path = "../reth/crates/rpc/rpc-convert" }
# reth-transaction-pool = { path = "../reth/crates/transaction-pool" }
# reth-zstd-compressors = { path = "../reth/crates/storage/zstd-compressors" }
# reth-trie-common = { path = "../reth/crates/trie/common" }
# reth-trie-db = { path = "../reth/crates/trie/db" }
# reth-trie = { path = "../reth/crates/trie/trie" }
# reth-stages-types = { path = "../reth/crates/stages/types" }
# reth-execution-types = { path = "../reth/crates/evm/execution-types" }
# reth-execution-errors = { path = "../reth/crates/evm/execution-errors" }
# reth-storage-api = { path = "../reth/crates/storage/storage-api" }
# reth-provider = { path = "../reth/crates/storage/provider" }
# reth-storage-errors = { path = "../reth/crates/storage/errors" }
# reth-e2e-test-utils = { path = "../reth/crates/e2e-test-utils" }
# reth-rpc-builder = { path = "../reth/crates/rpc/rpc-builder" }
2 changes: 2 additions & 0 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ ignore = [
"RUSTSEC-2025-0141",
# https://rustsec.org/advisories/RUSTSEC-2026-0002 lru 0.12.5 unsound IterMut, pinned by discv5
"RUSTSEC-2026-0002",
# https://rustsec.org/advisories/RUSTSEC-2023-0089 atomic-polyfill unmaintained, pinned by test-fuzz
"RUSTSEC-2023-0089",
]
# If this is true, then cargo deny will use the git executable to fetch advisory database.
# If this is false, then it uses a built-in git library.
Expand Down
9 changes: 2 additions & 7 deletions src/engine/payload.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use crate::{
chainspec::BerachainChainSpec,
node::evm::config::BERACHAIN_BLOCK_TIME_SECONDS,
primitives::{BerachainBlock, BerachainHeader, BerachainPrimitives, header::BlsPublicKey},
};
use alloy_consensus::BlockHeader;
Expand Down Expand Up @@ -142,13 +143,7 @@ impl PayloadAttributesBuilder<BerachainPayloadAttributes, BerachainHeader>
for LocalPayloadAttributesBuilder<BerachainChainSpec>
{
fn build(&self, parent: &SealedHeader<BerachainHeader>) -> BerachainPayloadAttributes {
let mut timestamp =
std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).unwrap().as_secs();

if self.enforce_increasing_timestamp {
timestamp = std::cmp::max(parent.timestamp().saturating_add(1), timestamp);
}

let timestamp = parent.timestamp() + BERACHAIN_BLOCK_TIME_SECONDS;
BerachainPayloadAttributes {
inner: EthPayloadAttributes {
timestamp,
Expand Down
8 changes: 4 additions & 4 deletions src/evm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,9 @@ where
type Error = EVMError<DB::Error>;
type HaltReason = HaltReason;
type Spec = SpecId;
type BlockEnv = BlockEnv;
type Precompiles = PRECOMPILE;
type Inspector = I;
type BlockEnv = BlockEnv;

fn block(&self) -> &BlockEnv {
&self.block
Expand Down Expand Up @@ -280,8 +280,8 @@ impl EvmFactory for BerachainEvmFactory {
type Error<DBError: core::error::Error + Send + Sync + 'static> = EVMError<DBError>;
type HaltReason = HaltReason;
type Spec = SpecId;
type Precompiles = PrecompilesMap;
type BlockEnv = BlockEnv;
type Precompiles = PrecompilesMap;

fn create_evm<DB: Database>(&self, db: DB, input: EvmEnv) -> Self::Evm<DB, NoOpInspector> {
BerachainEvmBuilder::new(db, input).build()
Expand Down Expand Up @@ -406,13 +406,13 @@ mod tests {
if let Ok(result) = &result_with_tracer &&
let ExecutionResult::Success { gas_used, .. } = &result.result
{
assert_eq!(*gas_used, 0);
assert_eq!(gas_used, &0);
}

if let Ok(result) = &result_without_tracer &&
let ExecutionResult::Success { gas_used, .. } = &result.result
{
assert_eq!(*gas_used, 0);
assert_eq!(gas_used, &0);
}

// Verify tracer captured system call details
Expand Down
Loading
Loading