Skip to content

Commit

Permalink
Merge branch 'main' into klkvr/2718-tx
Browse files Browse the repository at this point in the history
  • Loading branch information
klkvr authored Sep 28, 2024
2 parents 4203d9b + b090578 commit dc02862
Show file tree
Hide file tree
Showing 98 changed files with 1,376 additions and 1,030 deletions.
4 changes: 2 additions & 2 deletions .github/assets/check_wasm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ exclude_crates=(
reth-ethereum-payload-builder
reth-etl
reth-evm-ethereum
reth-evm-optimism
reth-execution-errors
reth-exex
reth-exex-test-utils
Expand All @@ -49,8 +48,9 @@ exclude_crates=(
reth-node-ethereum
reth-node-events
reth-node-metrics
reth-node-optimism
reth-optimism-cli
reth-optimism-evm
reth-optimism-node
reth-optimism-payload-builder
reth-optimism-rpc
reth-payload-builder
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
name: Run tests
run: |
cargo nextest run \
--locked -p reth-node-optimism --features "optimism"
--locked -p reth-optimism-node --features "optimism"
integration-success:
name: integration success
Expand Down
105 changes: 92 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ reth-ethereum-payload-builder = { path = "crates/ethereum/payload" }
reth-etl = { path = "crates/etl" }
reth-evm = { path = "crates/evm" }
reth-evm-ethereum = { path = "crates/ethereum/evm" }
reth-evm-optimism = { path = "crates/optimism/evm" }
reth-optimism-evm = { path = "crates/optimism/evm" }
reth-execution-errors = { path = "crates/evm/execution-errors" }
reth-execution-types = { path = "crates/evm/execution-types" }
reth-exex = { path = "crates/exex/exex" }
Expand All @@ -360,7 +360,7 @@ reth-node-core = { path = "crates/node/core" }
reth-node-ethereum = { path = "crates/ethereum/node" }
reth-node-events = { path = "crates/node/events" }
reth-node-metrics = { path = "crates/node/metrics" }
reth-node-optimism = { path = "crates/optimism/node" }
reth-optimism-node = { path = "crates/optimism/node" }
reth-node-types = { path = "crates/node/types" }
reth-optimism-chainspec = { path = "crates/optimism/chainspec" }
reth-optimism-cli = { path = "crates/optimism/cli" }
Expand Down Expand Up @@ -426,7 +426,7 @@ alloy-dyn-abi = "0.8.0"
alloy-primitives = { version = "0.8.4", default-features = false }
alloy-rlp = "0.3.4"
alloy-sol-types = "0.8.0"
alloy-trie = { version = "0.5", default-features = false }
alloy-trie = { version = "0.6", default-features = false }

alloy-consensus = { version = "0.3.6", default-features = false }
alloy-eips = { version = "0.3.6", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion book/developers/exex/hello-world.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ async fn my_exex<Node: FullNodeComponents>(mut ctx: ExExContext<Node>) -> eyre::
if let Some(committed_chain) = notification.committed_chain() {
ctx.events
.send(ExExEvent::FinishedHeight(committed_chain.tip().number))?;
.send(ExExEvent::FinishedHeight(committed_chain.tip().num_hash()))?;
}
}
Expand Down
2 changes: 1 addition & 1 deletion book/developers/exex/how-it-works.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ event to signify what blocks have been processed. This event is used by Reth to

An ExEx will only receive notifications for block numbers greater than the block in the most recently emitted `FinishedHeight` event.

To clarify: if an ExEx emits `ExExEvent::FinishedHeight(0)` it will receive notifications for any `block_number > 0`.
To clarify: if an ExEx emits `ExExEvent::FinishedHeight` for `block #0` it will receive notifications for any `block_number > 0`.
4 changes: 2 additions & 2 deletions book/developers/exex/remote.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ async fn remote_exex<Node: FullNodeComponents>(
while let Some(notification) = ctx.notifications.next().await {
if let Some(committed_chain) = notification.committed_chain() {
ctx.events
.send(ExExEvent::FinishedHeight(committed_chain.tip().number))?;
.send(ExExEvent::FinishedHeight(committed_chain.tip().num_hash()))?;
}
info!("Notification sent to the gRPC server");
Expand Down Expand Up @@ -388,7 +388,7 @@ async fn remote_exex<Node: FullNodeComponents>(
while let Some(notification) = ctx.notifications.next().await {
if let Some(committed_chain) = notification.committed_chain() {
ctx.events
.send(ExExEvent::FinishedHeight(committed_chain.tip().number))?;
.send(ExExEvent::FinishedHeight(committed_chain.tip().num_hash()))?;
}
info!(?notification, "Notification sent to the gRPC server");
Expand Down
4 changes: 2 additions & 2 deletions book/developers/exex/tracking-state.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl<Node: FullNodeComponents> Future for MyExEx<Node> {
if let Some(committed_chain) = notification.committed_chain() {
this.ctx
.events
.send(ExExEvent::FinishedHeight(committed_chain.tip().number))?;
.send(ExExEvent::FinishedHeight(committed_chain.tip().num_hash()))?;
}
}
Expand Down Expand Up @@ -152,7 +152,7 @@ impl<Node: FullNodeComponents> Future for MyExEx<Node> {
this.ctx
.events
.send(ExExEvent::FinishedHeight(committed_chain.tip().number))?;
.send(ExExEvent::FinishedHeight(committed_chain.tip().num_hash()))?;
}
if let Some(first_block) = this.first_block {
Expand Down
1 change: 1 addition & 0 deletions crates/blockchain-tree/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ reth-node-types.workspace = true

# ethereum
alloy-primitives.workspace = true
alloy-eips.workspace = true

# common
parking_lot.workspace = true
Expand Down
3 changes: 2 additions & 1 deletion crates/blockchain-tree/src/block_buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,9 @@ impl BlockBuffer {
#[cfg(test)]
mod tests {
use crate::BlockBuffer;
use alloy_eips::BlockNumHash;
use alloy_primitives::BlockHash;
use reth_primitives::{BlockNumHash, SealedBlockWithSenders};
use reth_primitives::SealedBlockWithSenders;
use reth_testing_utils::generators::{self, random_block, BlockParams, Rng};
use std::collections::HashMap;

Expand Down
3 changes: 2 additions & 1 deletion crates/blockchain-tree/src/block_indices.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
use super::state::SidechainId;
use crate::canonical_chain::CanonicalChain;
use alloy_eips::BlockNumHash;
use alloy_primitives::{BlockHash, BlockNumber};
use linked_hash_set::LinkedHashSet;
use reth_execution_types::Chain;
use reth_primitives::{BlockNumHash, SealedBlockWithSenders};
use reth_primitives::SealedBlockWithSenders;
use std::collections::{btree_map, hash_map, BTreeMap, BTreeSet, HashMap, HashSet};

/// Internal indices of the blocks and chains.
Expand Down
5 changes: 3 additions & 2 deletions crates/blockchain-tree/src/blockchain_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use crate::{
state::{SidechainId, TreeState},
AppendableChain, BlockIndices, BlockchainTreeConfig, ExecutionData, TreeExternals,
};
use alloy_eips::{BlockNumHash, ForkBlock};
use alloy_primitives::{BlockHash, BlockNumber, B256, U256};
use reth_blockchain_tree_api::{
error::{BlockchainTreeError, CanonicalError, InsertBlockError, InsertBlockErrorKind},
Expand All @@ -16,8 +17,8 @@ use reth_execution_errors::{BlockExecutionError, BlockValidationError};
use reth_execution_types::{Chain, ExecutionOutcome};
use reth_node_types::NodeTypesWithDB;
use reth_primitives::{
BlockNumHash, EthereumHardfork, ForkBlock, GotExpected, Hardforks, Receipt, SealedBlock,
SealedBlockWithSenders, SealedHeader, StaticFileSegment,
EthereumHardfork, GotExpected, Hardforks, Receipt, SealedBlock, SealedBlockWithSenders,
SealedHeader, StaticFileSegment,
};
use reth_provider::{
providers::ProviderNodeTypes, BlockExecutionWriter, BlockNumReader, BlockWriter,
Expand Down
2 changes: 1 addition & 1 deletion crates/blockchain-tree/src/bundle.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! [`ExecutionDataProvider`] implementations used by the tree.
use alloy_eips::ForkBlock;
use alloy_primitives::{BlockHash, BlockNumber};
use reth_primitives::ForkBlock;
use reth_provider::{BlockExecutionForkProvider, ExecutionDataProvider, ExecutionOutcome};
use std::collections::BTreeMap;

Expand Down
2 changes: 1 addition & 1 deletion crates/blockchain-tree/src/canonical_chain.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use alloy_eips::BlockNumHash;
use alloy_primitives::{BlockHash, BlockNumber};
use reth_primitives::BlockNumHash;
use std::collections::BTreeMap;

/// This keeps track of (non-finalized) blocks of the canonical chain.
Expand Down
Loading

0 comments on commit dc02862

Please sign in to comment.