Skip to content
This repository was archived by the owner on Feb 12, 2026. It is now read-only.
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
23 changes: 21 additions & 2 deletions Cargo.lock

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

10 changes: 6 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[workspace]
resolver = "2"
members = ["crates/*", "bin/*"]
default-members = ["bin/basectl"]
default-members = ["bin/*"]
exclude = [".github/"]

[workspace.package]
Expand Down Expand Up @@ -44,6 +44,7 @@ needless-pass-by-ref-mut = "warn"
string-lit-as-bytes = "warn"

[workspace.dependencies]
cadence = "1.4"
clap = { version = "4.0", features = ["derive", "env"] }
tokio-tungstenite = { version = "0.26", features = ["native-tls"] }
futures-util = "0.3"
Expand All @@ -57,14 +58,15 @@ dirs = "6.0"
arboard = "3.4"
dotenvy = "0.15.7"
async-trait = "0.1"
mempool-rebroadcaster = { path = "./crates/mempool-rebroadcaster" }
sidecrush = { path = "./crates/sidecrush" }
metrics = "0.24.1"
metrics-derive = "0.1"
tracing = "0.1"
tracing-subscriber = { version = "0.3", default-features = false, features = ["env-filter", "fmt", "ansi", "json"] }
tokio = { version = "1.0", features = ["full"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
metrics = "0.24.1"
metrics-derive = "0.1"
cadence = "1.4"

# alloy
alloy-primitives = { version = "1.5.2", default-features = false, features = [
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ COPY . .

RUN PROFILE_FLAG=$([ "$RELEASE" = "true" ] && echo "--release" || echo "") && \
TARGET_DIR=$([ "$RELEASE" = "true" ] && echo "release" || echo "debug") && \
cargo build $PROFILE_FLAG --features="$FEATURES" --package=${SERVICE_NAME}; \
cargo build $PROFILE_FLAG --features="$FEATURES" --bin=${SERVICE_NAME}; \
cp target/$TARGET_DIR/${SERVICE_NAME} /tmp/final_binary

#
Expand Down
16 changes: 16 additions & 0 deletions bin/mempool-rebroadcaster/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[package]
name = "mempool-rebroadcaster-bin"
version = "0.1.0"
edition = "2021"

[[bin]]
name = "mempool-rebroadcaster"
path = "src/main.rs"

[dependencies]
clap = { workspace = true }
dotenvy = "0.15.7"
mempool-rebroadcaster = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { workspace = true }
tokio = { workspace = true }
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use clap::Parser;
use dotenvy::dotenv;
use mempool_rebroadcaster::rebroadcaster::Rebroadcaster;
use mempool_rebroadcaster::Rebroadcaster;
use tracing::{Level, error, info};
use tracing_subscriber::EnvFilter;

Expand Down
16 changes: 16 additions & 0 deletions bin/sidecrush/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[package]
name = "sidecrush-bin"
version = "0.1.0"
edition = "2021"

[[bin]]
name = "sidecrush"
path = "src/main.rs"

[dependencies]
clap = { workspace = true }
sidecrush = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { workspace = true }
tokio = { workspace = true }
cadence = { workspace = true }
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ use std::net::UdpSocket;
use cadence::{StatsdClient, UdpMetricSink};
use clap::Parser;
use sidecrush::{
blockbuilding_healthcheck::{
BlockProductionHealthChecker, HealthcheckConfig, Node, alloy_client::AlloyEthClient,
},
metrics::HealthcheckMetrics,
BlockProductionHealthChecker, HealthcheckConfig, HealthcheckMetrics, Node,
alloy_client::AlloyEthClient,
};
use tracing::Level;

Expand Down
13 changes: 4 additions & 9 deletions crates/mempool-rebroadcaster/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,14 @@ license.workspace = true
[lints]
workspace = true

[[bin]]
name = "mempool-rebroadcaster"
path = "src/main.rs"
[lib]
path = "src/lib.rs"

[dependencies]
clap = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { workspace = true }
tokio = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
dotenvy = { workspace = true }
tracing = { workspace = true }
tokio = { workspace = true }

# alloy
alloy-primitives.workspace = true
Expand All @@ -28,4 +24,3 @@ alloy-rpc-types-eth.workspace = true
alloy-consensus.workspace = true
alloy-trie.workspace = true
alloy-provider = { workspace = true, features = ["txpool-api"] }

4 changes: 3 additions & 1 deletion crates/mempool-rebroadcaster/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
pub mod rebroadcaster;
mod rebroadcaster;

pub use rebroadcaster::{Rebroadcaster, RebroadcasterResult, TxpoolDiff};
2 changes: 1 addition & 1 deletion crates/mempool-rebroadcaster/tests/e2e_tests.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::path::Path;

use alloy_rpc_types::txpool::TxpoolContent;
use mempool_rebroadcaster::rebroadcaster::Rebroadcaster;
use mempool_rebroadcaster::Rebroadcaster;

fn load_static_mempool_content<P: AsRef<Path>>(
filepath: P,
Expand Down
13 changes: 5 additions & 8 deletions crates/sidecrush/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,15 @@ license.workspace = true
[lints]
workspace = true

[[bin]]
name = "sidecrush"
path = "src/bin/sidecrush.rs"
[lib]
path = "src/lib.rs"

[dependencies]
anyhow = { workspace = true }
async-trait = { workspace = true }
cadence = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { workspace = true }
tokio = { workspace = true }
cadence = { workspace = true }
async-trait = { workspace = true }
anyhow = { workspace = true }
clap = { workspace = true }

# Ethereum client deps (will be used for header fetching)
alloy-provider = { workspace = true }
Expand Down
9 changes: 7 additions & 2 deletions crates/sidecrush/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
pub mod blockbuilding_healthcheck;
pub mod metrics;
mod healthcheck;
mod metrics;

pub use healthcheck::{
BlockProductionHealthChecker, EthClient, HeaderSummary, HealthcheckConfig, Node, alloy_client,
};
pub use metrics::HealthcheckMetrics;
31 changes: 31 additions & 0 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,40 @@ skip = [
# Common ecosystem duplicates
"getrandom",
"hashbrown",
"itertools",
"foldhash",
"lru",

# Random number generation
"rand",
"rand_chacha",
"rand_core",

# Proc-macro / derive ecosystem (alloy-tx-macros vs ratatui/instability)
"darling",
"darling_core",
"darling_macro",

# ratatui vs alloy transitive mismatches
"strum",
"strum_macros",
"unicode-width",

# crossterm/ratatui vs tempfile (rustix 0.38 vs 1.x)
"rustix",
"linux-raw-sys",

# Windows platform crates
"windows-sys",
"windows-targets",
"windows_aarch64_gnullvm",
"windows_aarch64_msvc",
"windows_i686_gnu",
"windows_i686_gnullvm",
"windows_i686_msvc",
"windows_x86_64_gnu",
"windows_x86_64_gnullvm",
"windows_x86_64_msvc",
]

[sources]
Expand Down
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ docker-image:

# Run mempool rebroadcaster service
run-mempool-rebroadcaster:
cargo run -p mempool-rebroadcaster -- --geth-mempool-endpoint {{env_var("GETH_MEMPOOL_ENDPOINT")}} --reth-mempool-endpoint {{env_var("RETH_MEMPOOL_ENDPOINT")}}
cargo run --bin mempool-rebroadcaster -- --geth-mempool-endpoint {{env_var("GETH_MEMPOOL_ENDPOINT")}} --reth-mempool-endpoint {{env_var("RETH_MEMPOOL_ENDPOINT")}}

# Run basectl with specified config (mainnet, sepolia, devnet, or path)
basectl config="mainnet":
Expand Down