fix(pool): apply the sponsorship budget gate when counting candidates - #1336
Merged
Merged
Conversation
inakov
requested review from
Richard-Dang,
dancoombs,
jakehobbs and
pavelm
as code owners
September 10, 2026 11:42
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
... and 1 file with indirect coverage changes
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
inakov
added this pull request to stack #1338
September 10, 2026 11:56
dancoombs
approved these changes
Sep 10, 2026
num_candidates exempted bundler-sponsored ops from the price check, so a sponsored op whose budget no longer covers the required fee was counted as a candidate indefinitely. On robinhood EP v0.7 the gauge read 317 while the assigner's ep_eligible_ops read 0. Mirror the assigner's gate (op_meets_fee_requirements) in do_maintenance: a sponsored op is a candidate only while total_gas_limit * required max_fee_per_gas fits within its max_cost. Over-budget ops go through set_underpriced() like non-sponsored underpriced ops, which also stops them accruing time-to-mine while stranded. Metric-only: the op stays eligible and in best_operations. do_maintenance now returns the candidate count so tests can assert on it.
inakov
force-pushed
the
ivan/pool-num-candidates-sponsorship-budget
branch
from
September 10, 2026 15:33
818ffbc to
b42ba8f
Compare
inakov
disabled the stack merge
September 10, 2026 15:34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Task 1 of the Rundler Production Task handoff doc. Metric-only: no change to which ops are eligible, returned to the assigner, or bundled.
Motivation
On
rundler-robinhood-mainnetEP v0.7,rundler_op_pool_num_candidatesread 317 whilerundler_builder_assigner_ep_eligible_opsfor the same entrypoint read 0. Every one of those ops was bundler-sponsored with a budget that no longer covered the current gas price, so the assigner rejected it on every pass. The pool's candidate check exempted sponsored ops from any price gate, so it counted them as bundleable indefinitely. That made the dashboard'snum_ops_in_pool - num_candidates"stuck ops" panel read ~0 while essentially the whole pool was stuck.Proposed Changes
do_maintenancewith the assigner's budget gate (op_meets_fee_requirements): a sponsored op is a candidate only whiletotal_gas_limit * required_max_fee_per_gas <= max_cost. Non-sponsored ops keep the existing fee comparison.set_underpriced()like non-sponsored underpriced ops.set_underpriced()only clears the time-to-mine tracker, so the op stays eligible and inbest_operations. Side benefit: stranded sponsored ops no longer accrue days of time-to-mine that would skew the histogram if they eventually mine.do_maintenancereturns the candidate count so tests can assert on it directly. The single caller ignores the value.best_operations, and has its tracker cleared; a blocked op recovers when fees drop (re-evaluated each pass, not latched); non-sponsored ops unchanged.Notes
state.uo_feesand the assigner uses its ownrequired_fees. Both come fromfee_estimator.required_op_fees(bundle_fees), sampled at slightly different times, so the two metrics should now track each other closely rather than exactly.Expected effect
num_candidateson robinhood EP v0.7 drops from ~317 to roughly the count of genuinely bundleable ops and moves together withep_eligible_ops. Thenum_ops_in_pool - num_candidatesdashboard panel becomes a usable stuck-ops signal.Related: #1335 (Task 3, log spam). Task 2 (
num_suspect_opsdrift) will follow separately.