Skip to content

Track superseded mempool errors separately#4385

Draft
tilacog wants to merge 1 commit intomainfrom
mempool-metric-superseded
Draft

Track superseded mempool errors separately#4385
tilacog wants to merge 1 commit intomainfrom
mempool-metric-superseded

Conversation

@tilacog
Copy link
Copy Markdown
Contributor

@tilacog tilacog commented May 5, 2026

When Mempools::execute() runs mempools in parallel, errors from mempools whose results were discarded after another mempool succeeded were still recorded against driver_mempool_submission, biasing the per-mempool success ratio with timing-dependent shadowed failures.

Replace select_ok with FuturesUnordered + manual loop so observation runs in the consuming context. Errors that occur before another mempool succeeds are now recorded under a new Superseded label via observe::mempool_superseded, which also records the winning mempool in the trace fields. Errors in the all-failed case keep their existing labels (Revert / Expired / Other / Disabled).

Alert query update needed when deploying:

sum by (network) (increase(driver_mempool_submission{cow_fi_environment="prod",result="Success"}[2h]))
/
sum by (network) (increase(driver_mempool_submission{cow_fi_environment="prod",result!~"Disabled|Superseded"}[2h])) < 0.6

Description

Changes

  • ...
  • ...

How to test

When `Mempools::execute()` runs mempools in parallel, errors from mempools
whose results were discarded after another mempool succeeded were still
recorded against `driver_mempool_submission`, biasing the per-mempool
success ratio with timing-dependent shadowed failures.

Replace `select_ok` with `FuturesUnordered` + manual loop so observation
runs in the consuming context. Errors that occur before another mempool
succeeds are now recorded under a new `Superseded` label via
`observe::mempool_superseded`, which also records the winning mempool in
the trace fields. Errors in the all-failed case keep their existing
labels (Revert / Expired / Other / Disabled).

Alert query update needed when deploying:

    sum by (network) (increase(driver_mempool_submission{cow_fi_environment="prod",result="Success"}[2h]))
    /
    sum by (network) (increase(driver_mempool_submission{cow_fi_environment="prod",result!~"Disabled|Superseded"}[2h])) < 0.6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant