Repository navigation
Simplify the driver's mempool configuration - #5113
jmg-duarte wants to merge 8 commits into
Conversation
|
Claude finished @jmg-duarte's task in 3m 19s —— View job PR Review: Simplify the driver's mempool configurationReviewed against Two minor points, posted inline:
Neither is blocking. Notes checked and considered fine
|
| name: match url.host_str() { | ||
| Some(host) => host.to_owned(), | ||
| None => format!("mempool_{index}"), | ||
| }, |
There was a problem hiding this comment.
Minor: with public-mempool now taking many URLs, naming each mempool purely by host_str() means two nodes that share a host but differ by port or path (e.g. http://localhost:8545 and http://localhost:8546) collapse to the same name. That name is the Mempool(<name>) label used in logs and the driver_mempool_submission metric (Display at infra/mempool/mod.rs:82), so their stats/logs would silently merge and the per-node race breakdown in the PR description would be unattributable. Distinct providers usually have distinct hosts so this is unlikely in practice, but it's worth either disambiguating (e.g. include port, or fall back to index on duplicate names) or at least being aware of it.
There was a problem hiding this comment.
Claude rightfully notes that this isn't a problem in practice because we're not running nodes on localhost in staging or prod
c3514cf to
5017daa
Compare
5017daa to
4bc6316
Compare
4bc6316 to
46a643b
Compare
|
Claude finished @jmg-duarte's task in 2m 29s —— View job PR Review: Simplify the driver's mempool configurationReviewed against One point posted inline:
Not blocking. Nice cleanup overall.
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Description
Continues the clean up of the submission configuration started in #5110.
Today a driver can send a settlement to private relays and public nodes at the same time. Settlements that interact with AMMs (or have EIP-1271 orders) go only to the relay; fully internalized settlements race on all of them. That mix is hard to reason about.
From now on a driver has exactly one receiver: either a set of public nodes or one private relay. Every settlement takes that route. — this simplifies our logic and for most cases this is existing behavior, for mainnet we'll be moving to builders exclusively so it will be unified; as for BNB, please check the respective section.
BNB
BNB is the only network where this changes routing in a way we care about (mainnet moves to builders). BNB becomes blink only. Over the last 30 days:
So those 3.5% lose a faster route, roughly one block each. We accept that for now; once builder support lands can we replace blink with builders on BNB to win that latency back.
Most (~96%) of blocks are built by BlockRazor and 48Club, and there's 4 more builders we can add to get nearly 100% coverage (Dune query):

How to validate the numbers
Every public node records one outcome per settlement:
Disabledwhen the settlement went to blink only, anything else when it raced.Share of raced settlements (3.5%; blink only is the remainder):
Share of races won by a public node (99.3%):
A "win" is the route whose tx got mined, not a polling artifact: each mempool signs its own tx, so the hashes differ and only one lands. Check it in the driver debug logs, e.g. one settlement on 2026-10-16 09:29:41Z where ovh1, alchemy and blink each submitted a different hash and alchemy's was mined:
(time range 2026-10-16T09:29:40Z to 09:29:46Z)
Changes
[[submission.mempool]]with exactly one of[submission.public-mempool](many URLs) or[submission.private-relay](one URL)[submission]is now requiredname, mempools are named after the URL host in logs and metricsmay_revert,Solution::revertable,Mempools::is_disabled,Error::Disabledexample.toml, the playground and e2e configs and the driver test setupBreaking config change, deployed in lockstep with the infra PR.
How to test
Existing tests, plus new config parsing tests. Driver and e2e
submission::local_node_*tests pass.