Severity: S1 (silent emission loss for affected miners)
Location: allways/validator/event_watcher.py:285-311
Bug
Bootstrap seeds +1 BusyEvent at each in-flight swap's initiated_block (L296-297), then rewinds cursor to current_block - SCORING_WINDOW_BLOCKS (L304). sync_to replays blocks from cursor+1 onward — including the same SwapInitiated event whose +1 was just seeded — so apply_busy_delta(+1) fires a second time.
When the swap eventually resolves, the matching -1 lands once, not twice, so the miner stays stuck at open_swap_count = 1 forever. Permanently excluded from crown-time credit as "busy."
SCORING_WINDOW_BLOCKS = 1200 (~4h); fulfillment timeouts are much shorter, so essentially every restart with in-flight swaps triggers this.
Fix options
- (a) Seed bootstrap +1 at
cursor rather than init_block, and skip replay events for swaps that were in the bootstrap set.
- (b) Bootstrap after
sync_to, diff expected vs observed counts.
- (c) Set cursor to
current_block (skip backfill) and accept loss of pre-restart crown credit.
Severity: S1 (silent emission loss for affected miners)
Location: allways/validator/event_watcher.py:285-311
Bug
Bootstrap seeds
+1 BusyEventat each in-flight swap'sinitiated_block(L296-297), then rewinds cursor tocurrent_block - SCORING_WINDOW_BLOCKS(L304).sync_toreplays blocks fromcursor+1onward — including the sameSwapInitiatedevent whose+1was just seeded — soapply_busy_delta(+1)fires a second time.When the swap eventually resolves, the matching
-1lands once, not twice, so the miner stays stuck atopen_swap_count = 1forever. Permanently excluded from crown-time credit as "busy."SCORING_WINDOW_BLOCKS = 1200(~4h); fulfillment timeouts are much shorter, so essentially every restart with in-flight swaps triggers this.Fix options
cursorrather thaninit_block, and skip replay events for swaps that were in the bootstrap set.sync_to, diff expected vs observed counts.current_block(skip backfill) and accept loss of pre-restart crown credit.