You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every FastTracked appeal incremented both counters in fastTrackBlacklistAppeal, and all five decrements are gated on the appeal having been fast-tracked — so at each site the counter is provably nonzero. The clamps are unreachable by construction.
Which is exactly the problem: if one ever fires, the relief-cap accounting has already diverged, and the clamp hides it at the precise moment you would want to know. The failure is silent and permanent (the counter stays wrong, throttling future legitimate fast-tracks in that region until it drifts to zero).
Options, in rough order of preference:
Revert with a custom error — the accounting invariant is real and cheap to enforce.
Keep the clamps but comment them as unreachable, naming the invariant that makes them so, so a future reader does not mistake them for handling a live case.
Low priority; the invariant genuinely holds today. Worth doing whenever fastTrackBlacklistAppeal's preconditions change — notably #1307, which proposes adding one.
Automated triage note for a later run: this is small and self-contained once the intended failure mode is pinned, but it is not decision-free yet. Please choose between the two outcomes in the issue: (a) replace all five clamp pairs with an invariant-enforcing custom-error revert, or (b) keep behavior unchanged and document the unreachable branches. If (a), please also pin the custom error's shape/arguments so an implementer is not designing a new contract ABI while fixing the accounting guard.
Activity
altanoruc commentedon Jul 19, 2026
Automated triage note for a later run: this is small and self-contained once the intended failure mode is pinned, but it is not decision-free yet. Please choose between the two outcomes in the issue: (a) replace all five clamp pairs with an invariant-enforcing custom-error revert, or (b) keep behavior unchanged and document the unreachable branches. If (a), please also pin the custom error's shape/arguments so an implementer is not designing a new contract ABI while fixing the accounting guard.
fix(contracts): revert instead of clamping relief-counter underflow (#…
chore(contracts): refresh gas snapshot after #1311 relief-slot change
fix: batch three hygiene issues — relief-counter invariant, gossip me…