Skip to content
Draft
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
2,825 changes: 2,431 additions & 394 deletions Cargo.lock

Large diffs are not rendered by default.

62 changes: 39 additions & 23 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ members = [
"crates/rbuilder-operator",
"crates/rbuilder-rebalancer",
"crates/reth-rbuilder",
"crates/arc-rbuilder",
"crates/rbuilder/src/test_utils",
"crates/rbuilder/src/telemetry/metrics_macros",
"crates/eth-sparse-mpt",
Expand All @@ -27,6 +28,7 @@ default-members = [
"crates/rbuilder",
"crates/rbuilder-operator",
"crates/reth-rbuilder",
"crates/arc-rbuilder",
"crates/rbuilder-rebalancer",
"crates/rbuilder-primitives",
"crates/rbuilder-utils",
Expand Down Expand Up @@ -72,7 +74,7 @@ incremental = false
[workspace.dependencies]
# default-features minus "rocksdb": we only read reth datadirs via MDBX + static files.
# ("reth-revm/portable" from reth's default set is re-enabled on the reth-revm dep below.)
reth = { git = "https://github.com/paradigmxyz/reth", rev = "d6324d63e27ef6b7c49cdc9b1977c1b808234c7b", default-features = false, features = [
reth = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3", default-features = false, features = [
"jemalloc",
"otlp",
"otlp-logs",
Expand All @@ -81,30 +83,34 @@ reth = { git = "https://github.com/paradigmxyz/reth", rev = "d6324d63e27ef6b7c49
"asm-keccak",
"min-debug-logs",
] }
reth-cli-util = { git = "https://github.com/paradigmxyz/reth", rev = "d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" }
reth-db = { git = "https://github.com/paradigmxyz/reth", rev = "d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" }
reth-db-common = { git = "https://github.com/paradigmxyz/reth", rev = "d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" }
reth-errors = { git = "https://github.com/paradigmxyz/reth", rev = "d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" }
reth-payload-builder = { git = "https://github.com/paradigmxyz/reth", rev = "d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" }
reth-node-api = { git = "https://github.com/paradigmxyz/reth", rev = "d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" }
reth-node-ethereum = { git = "https://github.com/paradigmxyz/reth", rev = "d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" }
reth-trie = { git = "https://github.com/paradigmxyz/reth", rev = "d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" }
reth-trie-parallel = { git = "https://github.com/paradigmxyz/reth", rev = "d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" }
reth-node-core = { git = "https://github.com/paradigmxyz/reth", rev = "d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" }
reth-primitives = { git = "https://github.com/paradigmxyz/reth", rev = "d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" }
reth-ethereum-primitives = { git = "https://github.com/paradigmxyz/reth", rev = "d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" }
reth-primitives-traits = { git = "https://github.com/paradigmxyz/reth", rev = "d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" }
reth-provider = { git = "https://github.com/paradigmxyz/reth", rev = "d6324d63e27ef6b7c49cdc9b1977c1b808234c7b", features = [
reth-cli = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-cli-util = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-db-common = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-errors = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-node-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-node-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-ethereum-engine-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-trie = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-trie-parallel = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-node-core = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-ethereum-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-primitives-traits = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-provider = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3", features = [
"test-utils",
] }
reth-chainspec = { git = "https://github.com/paradigmxyz/reth", rev = "d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" }
reth-evm = { git = "https://github.com/paradigmxyz/reth", rev = "d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" }
reth-evm-ethereum = { git = "https://github.com/paradigmxyz/reth", rev = "d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" }
reth-revm = { git = "https://github.com/paradigmxyz/reth", rev = "d6324d63e27ef6b7c49cdc9b1977c1b808234c7b", features = ["portable"] }
reth-execution-errors = { git = "https://github.com/paradigmxyz/reth", rev = "d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" }
reth-trie-db = { git = "https://github.com/paradigmxyz/reth", rev = "d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" }
reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth", rev = "d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" }
reth-tasks = { git = "https://github.com/paradigmxyz/reth", rev = "d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" }
reth-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-evm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-evm-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-revm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3", features = ["portable"] }
reth-execution-errors = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-trie-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-tasks = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-node-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-basic-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }

# compatible with reth v1.11.3 (d6324d63e27ef6b7c49cdc9b1977c1b808234c7b) dependencies
revm = { version = "34.0.0", features = [
Expand Down Expand Up @@ -184,6 +190,16 @@ uuid = { version = "1.6.1", features = ["serde", "v5", "v4"] }
criterion = "0.5.1"
proptest = "1.5"

# Arc chain support (path deps into the arc-node checkout, pinned to the same reth tag)
arc-evm = { path = "../../arc-node/crates/evm" }
arc-execution-config = { path = "../../arc-node/crates/execution-config" }
arc-precompiles = { path = "../../arc-node/crates/precompiles" }
arc-evm-node = { path = "../../arc-node/crates/evm-node" }
arc-execution-payload = { path = "../../arc-node/crates/execution-payload" }
arc-execution-txpool = { path = "../../arc-node/crates/execution-txpool" }
arc-shared = { path = "../../arc-node/crates/shared" }
arc-execution-validation = { path = "../../arc-node/crates/execution-validation" }
Comment on lines +194 to +201

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Workspace becomes unbuildable without an external checkout. These are path deps into a sibling ../../arc-node checkout, and crates/arc-rbuilder (which depends on them unconditionally) is in default-members (line 31). That means a plain cargo build / cargo check / make lint / make test at the repo root will fail for anyone β€” and CI β€” that doesn't have arc-node checked out at exactly that relative path. The arc feature on the rbuilder crate is properly optional, but adding arc-rbuilder to default-members defeats that isolation.

Consider one of:

  • Remove arc-rbuilder from default-members (keep it in members), so default builds skip it.
  • Gate the whole arc workspace behind an env/profile, or use git deps with a pinned rev instead of relative path deps.

Either way, please confirm cargo check on a fresh clone (no arc-node sibling) still succeeds before merge.


eth-sparse-mpt = { path = "crates/eth-sparse-mpt" }
bid-scraper = { path = "crates/bid-scraper" }
rbuilder = { path = "crates/rbuilder" }
Expand Down
56 changes: 56 additions & 0 deletions crates/arc-rbuilder/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
[package]
name = "arc-rbuilder"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true

[dependencies]
rbuilder = { workspace = true, features = ["arc"] }
rbuilder-config.workspace = true

arc-evm.workspace = true
arc-evm-node.workspace = true
arc-execution-config.workspace = true
arc-execution-payload.workspace = true
arc-execution-txpool.workspace = true
arc-execution-validation.workspace = true

reth.workspace = true
reth-cli-util.workspace = true
reth-node-api.workspace = true
reth-node-builder.workspace = true
reth-payload-builder.workspace = true
reth-basic-payload-builder.workspace = true
reth-ethereum-engine-primitives.workspace = true
reth-provider.workspace = true
reth-transaction-pool.workspace = true
reth-revm.workspace = true
reth-evm.workspace = true
reth-chainspec.workspace = true
reth-node-ethereum.workspace = true
alloy-consensus.workspace = true

alloy-primitives.workspace = true
alloy-rpc-types-beacon.workspace = true
alloy-rpc-types-engine.workspace = true
revm.workspace = true

clap.workspace = true
eyre.workspace = true
futures.workspace = true
tokio.workspace = true
tokio-util.workspace = true
tracing.workspace = true

[target.'cfg(not(target_env = "msvc"))'.dependencies]
tikv-jemallocator = { workspace = true }

[features]
jemalloc = []

[[bin]]
name = "arc-rbuilder"
path = "src/main.rs"
57 changes: 57 additions & 0 deletions crates/arc-rbuilder/config-arc-example.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Example rbuilder config for building Arc chain blocks (arc-rbuilder binary).
#
# Usage:
# cargo run -p arc-rbuilder -- node \
# --chain arc-testnet \
# --rbuilder.config crates/arc-rbuilder/config-arc-example.toml
#
# There are no relays and no bidding on Arc: blocks are delivered to Malachite
# consensus through the engine API (engine_getPayload), so all MEV-Boost
# related settings (relays, cl_node_url, relay secret keys) are unused.

log_json = false
log_level = "info,rbuilder=debug"
error_storage_path = "/tmp/rbuilder.error.sqlite"

# Address that collects priority fees while building; the block's true value
# is paid to the proposer's suggested fee recipient with the payout tx.
# env: COINBASE_SECRET_KEY
coinbase_secret_key = "env:COINBASE_SECRET_KEY"

# arc-rbuilder always builds for the chain the node runs (--chain flag); this
# value only needs to parse. Keep it matching the node anyway.
chain = "arc-localdev"

full_telemetry_server_port = 6060
redacted_telemetry_server_port = 6061

# Order intake: the in-process txpool subscription is wired automatically;
# these servers additionally accept bundles / raw txs over ipc/http.
jsonrpc_server_port = 8645
jsonrpc_server_ip = "0.0.0.0"
ignore_cancellable_orders = true

# Sub-second blocks: keep simulation lean.
simulation_threads = 4

live_builders = ["mp-ordering", "mgp-ordering"]

# Required: sparse trie root hash (parallel impl currently disallowed).
root_hash_use_sparse_trie = true
root_hash_compare_sparse_trie = false

[[builders]]
name = "mgp-ordering"
algo = "ordering-builder"
discard_txs = true
sorting = "mev-gas-price"
failed_order_retries = 1
drop_failed_orders = true

[[builders]]
name = "mp-ordering"
algo = "ordering-builder"
discard_txs = true
sorting = "max-profit"
failed_order_retries = 1
drop_failed_orders = true
Loading
Loading