BuilderBonus: immediate ignore for revoked Markets, timelocked re-honour #17

Merged
Taskuler-bot merged 3 commits from feat/revoked-hold-ignore into main 2026-11-16 19:48:59 +00:00
Member

Base main: retargeted after #15 and #16 were merged (main @ b19f21d). Security re-reviewed 7a41b38 (v2, 2026-11-16): OK for testnet, no High/Medium/Low. The approval at 321d5b2 predates 7a41b38, so this needs a new approval at the current head. ffd8e53 is docs only (the KNOWN-ISSUES review status line). Pre-mainnet follow-ups (Info-D/E/F) are in #19, stacked on this branch. The Sepolia set deployed in #18 does not include this change.

Change (Info-2, DECIDED 2026-11-13; narrowed 2026-11-16 by George, L-6)

  • Ignoring a Market's hold answers takes the 48-hour schedule for every Market, revoked ones included (scheduleIgnoreHolds / executeIgnoreHolds / cancelIgnoreHolds).
  • Only exception: a revoked Market that is visibly broken. ignoreBrokenMarketHolds(m) (owner only) ignores it at once and emits HoldsIgnoredSet(m, true). It calls m.isHeld(address(0)) with HOLD_CHECK_GAS (50,000) and counts the Market as broken if that call reverts, runs out of gas, returns anything but exactly one 32-byte word 0 or 1, or returns true. Otherwise it reverts NotBroken(). A non-revoked, unknown or already ignored Market reverts BadMarket(); too little gas forwarded reverts InsufficientGas().
  • Honouring a revoked, ignored Market again is the delayed direction:
    • scheduleHonourHolds(m) emits HonourHoldsScheduled(m, eta).
    • executeHonourHolds(m) works from eta (48 hours) until eta + 7 days; otherwise TooEarly / RepointExpired. It emits HoldsIgnoredSet(m, false).
    • cancelHonourHolds(m) emits HonourHoldsCancelled(m).
    • honourHolds(m) reverts Timelocked() for such a Market.
  • Non-revoked Markets: ignoring takes the 48-hour schedule, and honouring is instant (unchanged).
  • Info-3: the held-time credit uses SafeCast.toUint64.
  • Deployment invariant (DECIDED 2026-11-16): the Market and BuilderBonus always share one Safe owner. DeployPhase1 now asserts bonus.owner() == market.owner() == governance after deploy.

ABI (BuilderBonus)

  • New functions: ignoreBrokenMarketHolds(address) 0x4162c683, scheduleHonourHolds(address) 0xec58aa91, executeHonourHolds(address) 0x46ff3673, cancelHonourHolds(address) 0x6a93d5d3.
  • New events:
    • HonourHoldsScheduled(address indexed market, uint64 eta) 0x2b111bde07a2d4d3bb32783563aaedc0d9042c458c1d9bc19ab9f15bc74a9cbb
    • HonourHoldsCancelled(address indexed market) 0x4694f9ca99f6d6a20180b2c677bf909dc680c6f4ca028049e00fccc62a152daf
  • New errors: Timelocked() 0x774ae17d, NotBroken() 0x7de5dbf3.
  • Changed: marketState(address) 0xa7a9a62c returns a 6th field, honourHoldsEta. scheduleIgnoreHolds no longer applies at once for revoked Markets.

Tests

  • A revoked Market that answers correctly can't be ignored at once (NotBroken, also while an ignore is scheduled); the 48-hour schedule works for it.
  • Each broken mode can be ignored at once: true, revert, malformed word, out of gas, empty return. Plus access control, BadMarket (not revoked, never current, already ignored) and InsufficientGas.
  • Revoking a Market and asking to ignore it in the same batch leaves a held builder blocked through the whole 48-hour notice period.
  • A broken revoked Market's freeze is lifted at once; re-honouring has a delay, an owner-only window, cancel and expiry, then blocks again. honourHolds reverts Timelocked.
  • A non-revoked Market keeps the ignore delay and the instant honour.
  • Full forge test with the fork RPC set: 348 passed, 0 failed, 0 skipped.

Size

BuilderBonus is 15,366 B (9,210 B margin). TaskulerMarket is unchanged at 24,146 B (430 B margin).

Docs

  • KI-14: the narrowed instant path, the shared-owner invariant, re-placing holds before ignoring, and the review status line (reviewed at 7a41b38, v2, 2026-11-16).
  • Runbook section 5: revoked-Market procedure (ignoreBrokenMarketHolds vs the 48-hour schedule), re-place every active hold on the current Market before ignoring a revoked Market's holds, the shared-owner invariant (transfer both owners together) and its check in the post-deploy verification.
  • README, THREAT-MODEL, OPEN-QUESTIONS 23a, AUDIT-SCOPE (total 3223/2119).
  • Info-1 (keepers poke on every hold change and at each until) is still accepted for testnet and remains a mainnet consideration pending George.
Base `main`: retargeted after #15 and #16 were merged (main @ `b19f21d`). Security re-reviewed `7a41b38` (v2, 2026-11-16): OK for testnet, no High/Medium/Low. The approval at `321d5b2` predates `7a41b38`, so this needs a new approval at the current head. `ffd8e53` is docs only (the KNOWN-ISSUES review status line). Pre-mainnet follow-ups (Info-D/E/F) are in #19, stacked on this branch. The Sepolia set deployed in #18 does not include this change. ## Change (Info-2, DECIDED 2026-11-13; narrowed 2026-11-16 by George, L-6) - **Ignoring a Market's hold answers takes the 48-hour schedule for every Market, revoked ones included** (`scheduleIgnoreHolds` / `executeIgnoreHolds` / `cancelIgnoreHolds`). - **Only exception: a revoked Market that is visibly broken.** `ignoreBrokenMarketHolds(m)` (owner only) ignores it at once and emits `HoldsIgnoredSet(m, true)`. It calls `m.isHeld(address(0))` with `HOLD_CHECK_GAS` (50,000) and counts the Market as broken if that call reverts, runs out of gas, returns anything but exactly one 32-byte word 0 or 1, or returns true. Otherwise it reverts `NotBroken()`. A non-revoked, unknown or already ignored Market reverts `BadMarket()`; too little gas forwarded reverts `InsufficientGas()`. - **Honouring a revoked, ignored Market again** is the delayed direction: - `scheduleHonourHolds(m)` emits `HonourHoldsScheduled(m, eta)`. - `executeHonourHolds(m)` works from `eta` (48 hours) until `eta + 7 days`; otherwise `TooEarly` / `RepointExpired`. It emits `HoldsIgnoredSet(m, false)`. - `cancelHonourHolds(m)` emits `HonourHoldsCancelled(m)`. - `honourHolds(m)` reverts `Timelocked()` for such a Market. - **Non-revoked Markets:** ignoring takes the 48-hour schedule, and honouring is instant (unchanged). - **Info-3:** the held-time credit uses `SafeCast.toUint64`. - **Deployment invariant (DECIDED 2026-11-16):** the Market and BuilderBonus always share one Safe owner. `DeployPhase1` now asserts `bonus.owner() == market.owner() == governance` after deploy. ## ABI (BuilderBonus) - New functions: `ignoreBrokenMarketHolds(address)` `0x4162c683`, `scheduleHonourHolds(address)` `0xec58aa91`, `executeHonourHolds(address)` `0x46ff3673`, `cancelHonourHolds(address)` `0x6a93d5d3`. - New events: - `HonourHoldsScheduled(address indexed market, uint64 eta)` `0x2b111bde07a2d4d3bb32783563aaedc0d9042c458c1d9bc19ab9f15bc74a9cbb` - `HonourHoldsCancelled(address indexed market)` `0x4694f9ca99f6d6a20180b2c677bf909dc680c6f4ca028049e00fccc62a152daf` - New errors: `Timelocked()` `0x774ae17d`, `NotBroken()` `0x7de5dbf3`. - Changed: `marketState(address)` `0xa7a9a62c` returns a 6th field, `honourHoldsEta`. `scheduleIgnoreHolds` no longer applies at once for revoked Markets. ## Tests - A revoked Market that answers correctly can't be ignored at once (`NotBroken`, also while an ignore is scheduled); the 48-hour schedule works for it. - Each broken mode can be ignored at once: true, revert, malformed word, out of gas, empty return. Plus access control, `BadMarket` (not revoked, never current, already ignored) and `InsufficientGas`. - Revoking a Market and asking to ignore it in the same batch leaves a held builder blocked through the whole 48-hour notice period. - A broken revoked Market's freeze is lifted at once; re-honouring has a delay, an owner-only window, cancel and expiry, then blocks again. `honourHolds` reverts `Timelocked`. - A non-revoked Market keeps the ignore delay and the instant honour. - Full `forge test` with the fork RPC set: **348 passed, 0 failed, 0 skipped**. ## Size BuilderBonus is 15,366 B (9,210 B margin). TaskulerMarket is unchanged at 24,146 B (430 B margin). ## Docs - KI-14: the narrowed instant path, the shared-owner invariant, re-placing holds before ignoring, and the review status line (reviewed at `7a41b38`, v2, 2026-11-16). - Runbook section 5: revoked-Market procedure (`ignoreBrokenMarketHolds` vs the 48-hour schedule), re-place every active hold on the current Market before ignoring a revoked Market's holds, the shared-owner invariant (transfer both owners together) and its check in the post-deploy verification. - README, THREAT-MODEL, OPEN-QUESTIONS 23a, AUDIT-SCOPE (total 3223/2119). - Info-1 (keepers poke on every hold change and at each `until`) is still accepted for testnet and remains a mainnet consideration pending George.
- scheduleIgnoreHolds on a revoked Market applies at once. Honouring a revoked,
  ignored Market again takes scheduleHonourHolds + executeHonourHolds (48 hours,
  7-day window, cancelHonourHolds); honourHolds reverts Timelocked for it.
  Non-revoked Markets are unchanged.
- Checked cast when crediting held time.
- Tests; docs (KI-14 review status and keeper note, runbook, threat model).
george approved these changes 2026-11-13 22:07:17 +00:00
Dismissed
Taskuler-bot changed target branch from feat/bonus-migration to main 2026-11-13 22:19:38 +00:00
Revoked Markets now use the 48-hour scheduleIgnoreHolds path like any other.
ignoreBrokenMarketHolds(m) ignores a revoked Market at once only when a
gas-capped isHeld(address(0)) call reverts, runs out of gas, returns
malformed data or returns true; otherwise it reverts NotBroken.
Re-honouring stays timelocked.

Deploy script asserts the Market and BuilderBonus share one owner; docs
record the shared-owner invariant, the runbook step to re-place holds on
the current Market before ignoring a revoked one, and the review status.
Taskuler-bot dismissed george's review 2026-11-16 19:03:15 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

george approved these changes 2026-11-16 19:47:29 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
taskuler/contracts!17
No description provided.