Skip to content

Commit

Permalink
Merge branch 'main' into drop-aware-sender-fixes#13242
Browse files Browse the repository at this point in the history
  • Loading branch information
ABD-AZE authored Dec 24, 2024
2 parents 84063a2 + 934fd1f commit 7894c0d
Show file tree
Hide file tree
Showing 103 changed files with 629 additions and 857 deletions.
2 changes: 1 addition & 1 deletion .config/zepter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ workflows:
# Ignore the case that `A` it outside of the workspace. Otherwise it will report errors in external dependencies that we have no influence on.

"--left-side-outside-workspace=ignore",
# Auxillary flags:
# Auxilary flags:
"--offline",
"--locked",
"--show-path",
Expand Down
2 changes: 2 additions & 0 deletions .github/assets/check_rv32imac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ crates_to_check=(
reth-primitives-traits
reth-optimism-forks
reth-network-peers
reth-trie-common
reth-chainspec
# reth-evm
# reth-primitives
# reth-optimism-chainspec
Expand Down
36 changes: 15 additions & 21 deletions Cargo.lock

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

16 changes: 8 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -477,11 +477,11 @@ alloy-transport-ipc = { version = "0.8.3", default-features = false }
alloy-transport-ws = { version = "0.8.3", default-features = false }

# op
op-alloy-rpc-types = "0.8.4"
op-alloy-rpc-types-engine = "0.8.4"
op-alloy-rpc-jsonrpsee = "0.8.4"
op-alloy-network = "0.8.4"
op-alloy-consensus = "0.8.4"
op-alloy-rpc-types = { version = "0.8.4", default-features = false }
op-alloy-rpc-types-engine = { version = "0.8.4", default-features = false }
op-alloy-rpc-jsonrpsee = { version = "0.8.4", default-features = false }
op-alloy-network = { version = "0.8.4", default-features = false }
op-alloy-consensus = { version = "0.8.4", default-features = false }

# misc
aquamarine = "0.6"
Expand All @@ -505,13 +505,13 @@ fdlimit = "0.3.0"
generic-array = "0.14"
humantime = "2.1"
humantime-serde = "1.1"
itertools = "0.13"
itertools = { version = "0.13", default-features = false }
linked_hash_set = "0.1"
modular-bitfield = "0.11.2"
notify = { version = "6.1.1", default-features = false, features = [
"macos_fsevent",
] }
nybbles = { version = "0.2.1", default-features = false }
nybbles = { version = "0.3.0", default-features = false }
once_cell = { version = "1.19", default-features = false, features = [
"critical-section",
] }
Expand All @@ -522,7 +522,7 @@ rayon = "1.7"
rustc-hash = { version = "2.0", default-features = false }
schnellru = "0.2"
serde = { version = "1.0", default-features = false }
serde_json = "1.0.94"
serde_json = { version = "1.0.94", default-features = false, features = ["alloc"] }
serde_with = { version = "3", default-features = false, features = ["macros"] }
sha2 = { version = "0.10", default-features = false }
shellexpand = "3.0.0"
Expand Down
2 changes: 1 addition & 1 deletion bin/reth-bench/src/bench/new_payload_fcu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ impl Command {
let versioned_hashes: Vec<B256> =
block.body.blob_versioned_hashes_iter().copied().collect();
let parent_beacon_block_root = block.parent_beacon_block_root;
let payload = block_to_payload(block);
let payload = block_to_payload(block).0;

debug!(?block_number, "Sending payload",);

Expand Down
2 changes: 1 addition & 1 deletion bin/reth-bench/src/bench/new_payload_only.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ impl Command {
let versioned_hashes: Vec<B256> =
block.body.blob_versioned_hashes_iter().copied().collect();
let parent_beacon_block_root = block.parent_beacon_block_root;
let payload = block_to_payload(block);
let payload = block_to_payload(block).0;

let block_number = payload.block_number();

Expand Down
3 changes: 2 additions & 1 deletion bin/reth/src/commands/debug_cmd/execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ use reth_network_api::NetworkInfo;
use reth_network_p2p::{headers::client::HeadersClient, EthBlockClient};
use reth_node_api::NodeTypesWithDBAdapter;
use reth_node_ethereum::EthExecutorProvider;
use reth_node_events::node::NodeEvent;
use reth_provider::{
providers::ProviderNodeTypes, ChainSpecProvider, ProviderFactory, StageCheckpointReader,
};
Expand Down Expand Up @@ -211,7 +212,7 @@ impl<C: ChainSpecParser<ChainSpec = ChainSpec>> Command<C> {
reth_node_events::node::handle_events(
Some(Box::new(network)),
latest_block_number,
pipeline.events().map(Into::into),
pipeline.events().map(Into::<NodeEvent<N::Primitives>>::into),
),
);

Expand Down
9 changes: 5 additions & 4 deletions bin/reth/src/commands/debug_cmd/merkle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,11 @@ impl<C: ChainSpecParser<ChainSpec = ChainSpec>> Command<C> {

let clean_input = ExecInput { target: Some(sealed_block.number), checkpoint: None };
loop {
let clean_result = merkle_stage.execute(&provider_rw, clean_input);
assert!(clean_result.is_ok(), "Clean state root calculation failed");
if clean_result.unwrap().done {
break
let clean_result = merkle_stage
.execute(&provider_rw, clean_input)
.map_err(|e| eyre::eyre!("Clean state root calculation failed: {}", e))?;
if clean_result.done {
break;
}
}

Expand Down
2 changes: 1 addition & 1 deletion book/developers/profiling.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,6 @@ If reth is not built properly, you will see this when you try to run reth:
If this happens, jemalloc likely needs to be rebuilt with the `jemalloc-prof` feature enabled.

If everything is working, this will output `jeprof.*.heap` files while reth is running.
[The jemalloc website](http://jemalloc.net/jemalloc.3.html#opt.abort) has a helpful overview of the options available, for example `lg_prof_interval`, `lg_prof_sample`, `prof_leak`, and `prof_final`.
[The jemalloc website](https://jemalloc.net/jemalloc.3.html#opt.abort) has a helpful overview of the options available, for example `lg_prof_interval`, `lg_prof_sample`, `prof_leak`, and `prof_final`.

Now that we have the heap snapshots, we can analyze them using `jeprof`. An example of jeprof usage and output can be seen on the jemalloc github repository: https://github.com/jemalloc/jemalloc/wiki/Use-Case:-Leak-Checking
4 changes: 2 additions & 2 deletions crates/blockchain-tree/src/bundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use alloy_primitives::{BlockHash, BlockNumber};
use reth_provider::{BlockExecutionForkProvider, ExecutionDataProvider, ExecutionOutcome};
use std::collections::BTreeMap;

/// Structure that combines references of required data to be a [`ExecutionDataProvider`].
/// Structure that combines references of required data to be an [`ExecutionDataProvider`].
#[derive(Clone, Debug)]
pub struct BundleStateDataRef<'a> {
/// The execution outcome after execution of one or more transactions and/or blocks.
Expand Down Expand Up @@ -39,7 +39,7 @@ impl BlockExecutionForkProvider for BundleStateDataRef<'_> {
}
}

/// Structure that owns the relevant data needs to be a [`ExecutionDataProvider`]
/// Structure that owns the relevant data needs to be an [`ExecutionDataProvider`]
#[derive(Clone, Debug)]
pub struct ExecutionData {
/// Execution outcome.
Expand Down
5 changes: 3 additions & 2 deletions crates/chainspec/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ reth-primitives-traits.workspace = true
alloy-chains = { workspace = true, features = ["serde", "rlp"] }
alloy-eips = { workspace = true, features = ["serde"] }
alloy-genesis.workspace = true
alloy-primitives = { workspace = true, features = ["rand", "rlp"] }
alloy-primitives = { workspace = true, features = ["rlp"] }
alloy-consensus.workspace = true

# misc
Expand Down Expand Up @@ -52,7 +52,8 @@ std = [
"reth-ethereum-forks/std",
"derive_more/std",
"reth-network-peers/std",
"reth-trie-common/std"
"reth-trie-common/std",
"serde_json/std"
]
arbitrary = [
"alloy-chains/arbitrary",
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/commands/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ impl<C: ChainSpecParser> EnvironmentArgs<C> {
/// Returns a [`ProviderFactory`] after executing consistency checks.
///
/// If it's a read-write environment and an issue is found, it will attempt to heal (including a
/// pipeline unwind). Otherwise, it will print out an warning, advising the user to restart the
/// pipeline unwind). Otherwise, it will print out a warning, advising the user to restart the
/// node to heal.
fn create_provider_factory<N: CliNodeTypes>(
&self,
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/commands/src/import.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ pub fn build_import_pipeline<N, C, E>(
static_file_producer: StaticFileProducer<ProviderFactory<N>>,
disable_exec: bool,
executor: E,
) -> eyre::Result<(Pipeline<N>, impl Stream<Item = NodeEvent>)>
) -> eyre::Result<(Pipeline<N>, impl Stream<Item = NodeEvent<N::Primitives>>)>
where
N: ProviderNodeTypes + CliNodeTypes,
C: Consensus + 'static,
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/commands/src/init_state/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ impl<C: ChainSpecParser<ChainSpec: EthChainSpec + EthereumHardforks>> InitStateC
)?;

// SAFETY: it's safe to commit static files, since in the event of a crash, they
// will be unwinded according to database checkpoints.
// will be unwound according to database checkpoints.
//
// Necessary to commit, so the header is accessible to provider_rw and
// init_state_dump
Expand Down
Loading

0 comments on commit 7894c0d

Please sign in to comment.