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
351 changes: 184 additions & 167 deletions Cargo.lock

Large diffs are not rendered by default.

116 changes: 58 additions & 58 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -120,64 +120,64 @@ tempo-telemetry-util = { path = "crates/telemetry-util", default-features = fals
tempo-transaction-pool = { path = "crates/transaction-pool", default-features = false }
tempo-validator-config = { path = "crates/validator-config", default-features = false }

reth-basic-payload-builder = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-chainspec = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d", default-features = false }
reth-cli = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-cli-commands = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-cli-runner = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-cli-util = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-basic-payload-builder = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-chainspec = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9", default-features = false }
reth-cli = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-cli-commands = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-cli-runner = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-cli-util = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-codecs = { version = "0.3.0", default-features = false }
reth-consensus = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-consensus-common = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-db = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-discv5 = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-db-api = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-e2e-test-utils = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-engine-local = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-engine-tree = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-errors = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-eth-wire-types = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-etl = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-ethereum = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-ethereum-cli = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-ethereum-consensus = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-ethereum-engine-primitives = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-ethereum-primitives = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d", default-features = false }
reth-execution-types = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-evm = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-evm-ethereum = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-metrics = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-network-api = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-network-peers = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d", default-features = false }
reth-node-api = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-node-builder = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-node-core = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-node-ethereum = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-node-metrics = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-payload-builder = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-payload-primitives = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-primitives-traits = { version = "0.3.0", default-features = false }
reth-config = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-downloaders = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-provider = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-prune-types = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-rpc = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-rpc-api = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-rpc-builder = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-rpc-convert = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-rpc-eth-api = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-rpc-eth-types = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-rpc-server-types = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-stages = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-static-file = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-storage-api = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-tracing = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-trie = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-trie-common = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-trie-db = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d" }
reth-consensus = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-consensus-common = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-db = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-discv5 = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-db-api = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-e2e-test-utils = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-engine-local = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-engine-tree = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-errors = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-eth-wire-types = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-etl = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-ethereum = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-ethereum-cli = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-ethereum-consensus = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-ethereum-engine-primitives = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-ethereum-primitives = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9", default-features = false }
reth-execution-types = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-evm = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-evm-ethereum = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-metrics = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-network-api = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-network-peers = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9", default-features = false }
reth-node-api = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-node-builder = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-node-core = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-node-ethereum = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-node-metrics = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-payload-builder = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-payload-primitives = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-primitives-traits = { version = "0.3.1", default-features = false }
reth-config = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-downloaders = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-provider = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-prune-types = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-rpc = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-rpc-api = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-rpc-builder = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-rpc-convert = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-rpc-eth-api = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-rpc-eth-types = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-rpc-server-types = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-stages = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-static-file = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-storage-api = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-tracing = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-trie = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-trie-common = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }
reth-trie-db = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9" }

reth-revm = { git = "https://github.com/paradigmxyz/reth", rev = "7839f3d", features = [
reth-revm = { git = "https://github.com/paradigmxyz/reth", rev = "73ec2c9", features = [
"std",
"optional-checks",
] }
Expand All @@ -187,7 +187,7 @@ alloy = { version = "2.0.1", default-features = false }
alloy-consensus = { version = "2.0.1", default-features = false }
alloy-contract = { version = "2.0.1", default-features = false }
alloy-eips = { version = "2.0.1", default-features = false }
alloy-evm = { version = "0.33.0", default-features = false }
alloy-evm = { version = "0.34.0", default-features = false }
revm-inspectors = "0.39.0"
alloy-genesis = { version = "2.0.1", default-features = false }
alloy-hardforks = "0.4.7"
Expand Down Expand Up @@ -374,4 +374,4 @@ commonware-p2p = { git = "https://github.com/commonwarexyz/monorepo", rev = "2a7
commonware-parallel = { git = "https://github.com/commonwarexyz/monorepo", rev = "2a7dd423f0a241276a5a38db8cc3d05f11de0c03" }
commonware-runtime = { git = "https://github.com/commonwarexyz/monorepo", rev = "2a7dd423f0a241276a5a38db8cc3d05f11de0c03" }
commonware-storage = { git = "https://github.com/commonwarexyz/monorepo", rev = "2a7dd423f0a241276a5a38db8cc3d05f11de0c03" }
commonware-utils = { git = "https://github.com/commonwarexyz/monorepo", rev = "2a7dd423f0a241276a5a38db8cc3d05f11de0c03" }
commonware-utils = { git = "https://github.com/commonwarexyz/monorepo", rev = "2a7dd423f0a241276a5a38db8cc3d05f11de0c03" }
1 change: 1 addition & 0 deletions bin/tempo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ reth-db-api.workspace = true
reth-etl.workspace = true
reth-ethereum = { workspace = true, features = ["full", "cli", "network"] }
reth-ethereum-cli.workspace = true
reth-metrics.workspace = true
reth-network-peers.workspace = true
reth-node-builder.workspace = true
reth-primitives-traits.workspace = true
Expand Down
7 changes: 6 additions & 1 deletion bin/tempo/src/p2p_proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,12 @@ async fn run_p2p_network(
config.sessions_config.session_event_buffer = cfg.max_concurrent_inbound;

let (requests_tx, mut requests_rx) = tokio::sync::mpsc::channel(1024);
let (transactions_tx, mut transactions_rx) = tokio::sync::mpsc::unbounded_channel();
let (transactions_tx, mut transactions_rx) = reth_metrics::common::mpsc::memory_bounded_channel(
config
.transactions_manager_config
.tx_channel_memory_limit_bytes,
"p2p-proxy.tx",
);

let network = NetworkManager::new(config)
.await
Expand Down
37 changes: 17 additions & 20 deletions crates/evm/src/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ impl ReceiptBuilder for TempoReceiptBuilder {
///
/// This is an extension of [`EthTxResult`] with context necessary for committing a Tempo transaction.
#[derive(Debug)]
pub(crate) struct TempoTxResult<H> {
pub struct TempoTxResult<H> {
/// Inner transaction execution result.
inner: EthTxResult<H, TempoTxType>,
/// Next section of the block.
Expand All @@ -98,7 +98,7 @@ pub(crate) struct TempoTxResult<H> {
tx: Option<TempoTxEnvelope>,
}

impl<H> TxResult for TempoTxResult<H> {
impl<H: Send + 'static> TxResult for TempoTxResult<H> {
type HaltReason = H;

fn result(&self) -> &ResultAndState<Self::HaltReason> {
Expand All @@ -113,9 +113,9 @@ impl<H> TxResult for TempoTxResult<H> {
/// Block executor for Tempo.
///
/// Wraps an inner [`EthBlockExecutor`] and layers Tempo-specific block execution
/// logic on top: section-based transaction ordering ([`BlockSection`]), subblock
/// logic on top: section-based transaction ordering (`BlockSection`), subblock
/// validation, shared/non-shared gas accounting, and gas incentive tracking.
pub(crate) struct TempoBlockExecutor<'a, DB: Database, I> {
pub struct TempoBlockExecutor<'a, DB: Database, I> {
pub(crate) inner:
EthBlockExecutor<'a, TempoEvm<DB, I>, &'a TempoChainSpec, TempoReceiptBuilder>,

Expand Down Expand Up @@ -500,10 +500,7 @@ where
})
}

fn commit_transaction(
&mut self,
output: Self::Result,
) -> Result<GasOutput, BlockExecutionError> {
fn commit_transaction(&mut self, output: Self::Result) -> GasOutput {
let TempoTxResult {
inner,
next_section,
Expand All @@ -520,7 +517,7 @@ where
inner.result.result.tx_gas_used()
};

let gas_output = self.inner.commit_transaction(inner)?;
let gas_output = self.inner.commit_transaction(inner);

self.section = next_section;

Expand All @@ -546,9 +543,9 @@ where
self.seen_subblocks.last_mut().unwrap()
};

last_subblock.1.push(tx.ok_or_else(|| {
BlockExecutionError::msg("missing tx for subblock transaction")
})?);
last_subblock
.1
.push(tx.expect("missing tx for subblock transaction"));
}
BlockSection::GasIncentive => {
self.incentive_gas_used += gas_used;
Expand All @@ -558,7 +555,7 @@ where
}
}

Ok(gas_output)
gas_output
}

fn finish(
Expand Down Expand Up @@ -1203,7 +1200,7 @@ mod tests {
tx: None,
};

let gas_output = executor.commit_transaction(output).unwrap();
let gas_output = executor.commit_transaction(output);

assert_eq!(gas_output.tx_gas_used(), 21000);
assert_eq!(executor.section(), BlockSection::NonShared);
Expand Down Expand Up @@ -1250,7 +1247,7 @@ mod tests {
tx: None,
};

let gas_output = executor.commit_transaction(output).unwrap();
let gas_output = executor.commit_transaction(output);

// With zero storage creation gas, execution gas equals total gas
assert_eq!(gas_output.tx_gas_used(), 21000);
Expand Down Expand Up @@ -1287,7 +1284,7 @@ mod tests {
is_payment: false,
tx: None,
};
executor.commit_transaction(output1).unwrap();
executor.commit_transaction(output1);

// Commit second transaction (50000 gas)
let tx2 = create_legacy_tx();
Expand All @@ -1309,7 +1306,7 @@ mod tests {
is_payment: false,
tx: None,
};
executor.commit_transaction(output2).unwrap();
executor.commit_transaction(output2);

// Receipts should have cumulative total gas (tracked by inner executor)
let receipts = executor.receipts();
Expand Down Expand Up @@ -1370,7 +1367,7 @@ mod tests {
is_payment: false,
tx: None,
};
executor.commit_transaction(output).unwrap();
executor.commit_transaction(output);

assert_eq!(executor.non_shared_gas_left, initial_non_shared - 50_000);
}
Expand Down Expand Up @@ -1413,7 +1410,7 @@ mod tests {
is_payment: false,
tx: None,
};
executor.commit_transaction(output).unwrap();
executor.commit_transaction(output);

// non_shared_gas_left should decrease by regular gas (200k), not total (300k)
assert_eq!(
Expand Down Expand Up @@ -1459,7 +1456,7 @@ mod tests {
is_payment: false,
tx: None,
};
executor.commit_transaction(output).unwrap();
executor.commit_transaction(output);

assert_eq!(
executor.incentive_gas_used, 200_000,
Expand Down
14 changes: 8 additions & 6 deletions crates/evm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use alloy_primitives::Address;
use alloy_rlp::Decodable;
pub use assemble::TempoBlockAssembler;
mod block;
pub use block::TempoReceiptBuilder;
pub use block::{TempoBlockExecutor, TempoReceiptBuilder, TempoTxResult};
mod context;
pub use context::{TempoBlockExecutionCtx, TempoNextBlockEnvAttributes};
#[cfg(feature = "engine")]
Expand All @@ -23,7 +23,7 @@ use std::{borrow::Cow, sync::Arc};

use alloy_evm::{
self, EvmEnv,
block::{BlockExecutorFactory, BlockExecutorFor},
block::BlockExecutorFactory,
eth::{EthBlockExecutionCtx, NextEvmEnvAttributes},
revm::Inspector,
};
Expand All @@ -36,7 +36,7 @@ use tempo_primitives::{
subblock::PartialValidatorKey,
};

use crate::{block::TempoBlockExecutor, evm::TempoEvm};
use crate::evm::TempoEvm;
use reth_evm_ethereum::EthEvmConfig;
use tempo_chainspec::{TempoChainSpec, hardfork::TempoHardforks};
use tempo_revm::{evm::TempoContext, gas_params::tempo_gas_params};
Expand Down Expand Up @@ -93,6 +93,8 @@ impl BlockExecutorFactory for TempoEvmConfig {
type ExecutionCtx<'a> = TempoBlockExecutionCtx<'a>;
type Transaction = TempoTxEnvelope;
type Receipt = TempoReceipt;
type TxExecutionResult = TempoTxResult<TempoHaltReason>;
type Executor<'a, DB: StateDB, I: Inspector<TempoContext<DB>>> = TempoBlockExecutor<'a, DB, I>;

fn evm_factory(&self) -> &Self::EvmFactory {
self.inner.executor_factory.evm_factory()
Expand All @@ -102,10 +104,10 @@ impl BlockExecutorFactory for TempoEvmConfig {
&'a self,
evm: TempoEvm<DB, I>,
ctx: Self::ExecutionCtx<'a>,
) -> impl BlockExecutorFor<'a, Self, DB, I>
) -> Self::Executor<'a, DB, I>
where
DB: StateDB + 'a,
I: Inspector<TempoContext<DB>> + 'a,
DB: StateDB,
I: Inspector<TempoContext<DB>>,
{
TempoBlockExecutor::new(evm, ctx, self.chain_spec())
}
Expand Down
15 changes: 14 additions & 1 deletion crates/primitives/src/reth_compat/header.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::{TempoConsensusContext, TempoHeader};
use alloy_primitives::{B256, BlockNumber, U256};
use alloy_primitives::{B256, BlockNumber, Bytes, U256};

impl reth_primitives_traits::InMemorySize for TempoConsensusContext {
fn size(&self) -> usize {
Expand Down Expand Up @@ -46,6 +46,19 @@ impl reth_primitives_traits::header::HeaderMut for TempoHeader {
fn set_difficulty(&mut self, difficulty: U256) {
self.inner.set_difficulty(difficulty);
}

fn set_mix_hash(&mut self, mix_hash: B256) {
self.inner.set_mix_hash(mix_hash);
}

fn set_extra_data(&mut self, extra_data: Bytes) {
self.inner.set_extra_data(extra_data);
}

fn set_parent_beacon_block_root(&mut self, parent_beacon_block_root: Option<B256>) {
self.inner
.set_parent_beacon_block_root(parent_beacon_block_root);
}
}

#[cfg(feature = "reth-codec")]
Expand Down
Loading
Loading