Follow-up to #123. The Phase 0 Go-side MEV-Share SSE monitor consumer was removed in fa0df83 after the public-mempool path was proven on feat/mempool-tracking-scaffold (PR #118). This issue tracks the proper reintroduction: a Rust-side MempoolSource impl that feeds the same engine trigger path public mempool already uses, not a parallel monitor goroutine that only bumps metrics.
Why monitor-only was wrong
The original cmd/monitor/mev_share.go ran in a separate Go binary, parsed hints, and bumped aether_mev_share_* counters. The engine never saw the events. A real searcher edge requires the engine to act on private flow within the same hot-path detection pipeline as public mempool — counters in a sidecar are observability without action.
To do
Source impl
Source label
DB column
Filter for minimal hints
Metrics
Wiring
Tests
Proof
Out of scope
- Flashbots Protect direct ingest (different endpoint, different auth model)
- MEV-Share publishing (we are a consumer, not a publisher, in this work)
- Multi-provider hint aggregation (BlockNative, etc.)
- Higher-tier paid Flashbots Protect subscription
Branch
New branch off develop once #123 / PR #118 lands. Suggested: feat/mev-share-source.
Reference
Removed Go consumer (for context on schema fields + reconnect pattern): see commit fa0df83 in the diff of PR #118. The Go schema MevShareHint struct is a 1:1 match with the public Flashbots event stream and can be ported as-is to a Rust serde::Deserialize shape.
Follow-up to #123. The Phase 0 Go-side MEV-Share SSE monitor consumer was removed in
fa0df83after the public-mempool path was proven onfeat/mempool-tracking-scaffold(PR #118). This issue tracks the proper reintroduction: a Rust-sideMempoolSourceimpl that feeds the same engine trigger path public mempool already uses, not a parallel monitor goroutine that only bumps metrics.Why monitor-only was wrong
The original
cmd/monitor/mev_share.goran in a separate Go binary, parsed hints, and bumpedaether_mev_share_*counters. The engine never saw the events. A real searcher edge requires the engine to act on private flow within the same hot-path detection pipeline as public mempool — counters in a sidecar are observability without action.To do
Source impl
crates/ingestion/src/mev_share.rsdefiningMevShareSourcethat implements the existingMempoolSourcetrait (parallel toAlchemyMempool)https://mev-share.flashbots.net, override viaMEV_SHARE_URL)PendingTxEventand dispatch throughEventChannels.pending_tx_txSource label
source: PendingSourceenum field onPendingTxEventwith variantsPublic(default) andMevShareAlchemyMempoolsetssource = Public,MevShareSourcesetssource = MevShareDB column
0003_add_source_to_arbs.sqladdingsource TEXT NOT NULL DEFAULT 'public'NewArb.sourcefield incrates/common/src/db.rsandinternal/db/ledger.goFilter for minimal hints
to,callData,functionSelector— the spec lets senders share only the hash. Such hints carry no signal we can decode.aether_mempool_filtered_total{reason="mev_share_minimal_hint"}so dashboards show how often Flashbots gives us useless hints (tier signal — if the rate is high, consider paying for fuller subscription)Metrics
aether_mempool_candidates_total{source}counter — split incoming candidates by sourceaether_mempool_filtered_totalfor dropsaether_mev_share_reconnects_total/aether_mev_share_errors_total{reason}for stream healthaether_pending_dex_tx_total{source, router, protocol, decoded}(extend existing counter with a new label — coordinate with dashboards)Wiring
MevShareSourcefromcrates/grpc-server/src/main.rsalongsideAlchemyMempool, gated onMEV_SHARE_ENABLED=1(or another truthy flag) so default behaviour stays unchanged when the env var is absentTests
PendingTxEventwithsource=MevShareto, nocallData) → bumpsmempool_filtered_total{mev_share_minimal_hint}and is droppedmev_share_errors_total{reason="parse"}and stream continuesProof
arbswith bothsource=publicandsource=mev_shareOut of scope
Branch
New branch off
developonce #123 / PR #118 lands. Suggested:feat/mev-share-source.Reference
Removed Go consumer (for context on schema fields + reconnect pattern): see commit
fa0df83in the diff of PR #118. The Go schemaMevShareHintstruct is a 1:1 match with the public Flashbots event stream and can be ported as-is to a Rustserde::Deserializeshape.