Skip to content

Share benign-race classifier; match landed code-only form#591

Merged
anderdc merged 1 commit into
testfrom
fix/benign-race-log-hygiene
Jul 23, 2026
Merged

Share benign-race classifier; match landed code-only form#591
anderdc merged 1 commit into
testfrom
fix/benign-race-log-hygiene

Conversation

@LandynDev

Copy link
Copy Markdown
Collaborator

Log-hygiene sweep of the benign-race handling around permissionless cranks. No behavior change to flow control; one log-level fix.

  • One classifier. benign_marker in solana/client.py replaces five copies of the any(m in str(e)) predicate (swap loop x3, weights vote, CLI crank). Returns the matched error NAME.
  • Close the code-only gap. A benign race that lands on-chain stringifies as {'Custom': N} with no name. CLI already matched both forms; the validator matched names only, so a landed benign race logged a false-alarm ERROR. All sites now match both via a single name->code map.
  • Terse benign logs. Benign no-ops log the marker name (e.g. no-op (PoolNotClosed)) instead of the full ~1KB RPC simulation blob.
  • Accurate label. resolve_pool no-op (peer won the race) dropped - PoolNotClosed/SeedSlotNotYetProduced mean the validator was early, not that a peer won.

Tests: classifier test covers name form, landed code-only form, and non-benign passthrough. Full suite passes (795).

@anderdc
anderdc merged commit f570a44 into test Jul 23, 2026
3 checks passed
@anderdc
anderdc deleted the fix/benign-race-log-hygiene branch July 23, 2026 18:36
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.

2 participants