Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(exex):move maximum ExExManager capacity to a constant #11293

Merged
merged 2 commits into from
Sep 27, 2024
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
6 changes: 6 additions & 0 deletions crates/exex/exex/src/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ use tokio::sync::{
};
use tokio_util::sync::{PollSendError, PollSender, ReusableBoxFuture};

/// Default max size of the internal state notifications buffer.
///
/// 1024 notifications in the buffer is 3.5 hours of mainnet blocks,
/// or 17 minutes of 1-second blocks.
pub const DEFAULT_EXEX_MANAGER_CAPACITY: usize = 1024;

/// Metrics for an `ExEx`.
#[derive(Metrics)]
#[metrics(scope = "exex")]
Expand Down
6 changes: 4 additions & 2 deletions crates/node/builder/src/launch/exex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ use std::{fmt, fmt::Debug};
use futures::future;
use reth_chain_state::ForkChoiceSubscriptions;
use reth_chainspec::EthChainSpec;
use reth_exex::{ExExContext, ExExHandle, ExExManager, ExExManagerHandle, Wal};
use reth_exex::{
ExExContext, ExExHandle, ExExManager, ExExManagerHandle, Wal, DEFAULT_EXEX_MANAGER_CAPACITY,
};
use reth_node_api::{FullNodeComponents, NodeTypes};
use reth_primitives::Head;
use reth_provider::CanonStateSubscriptions;
Expand Down Expand Up @@ -108,7 +110,7 @@ impl<Node: FullNodeComponents + Clone> ExExLauncher<Node> {
// todo(onbjerg): rm magic number
let exex_manager = ExExManager::new(
exex_handles,
1024,
DEFAULT_EXEX_MANAGER_CAPACITY,
exex_wal,
components.provider().finalized_block_stream(),
);
Expand Down
Loading