Pre-audit hardening, part 3: Kleros 0.10.0 views, bonus and review-job controls #13
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/pre-audit-3"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Decisions of 2026-11-12 (George). No deployment in this PR.
Dispute timeout and the deployed KlerosCore
KlerosCoreNeo, see below). Itsdisputes(id)returns 5 values (160 bytes); rc.2 returns 6 (192 bytes).DisputeLibnow accepts any return of at least 96 bytes and reads the period from the third word, which is the same in both versions.evidence(commit, vote, appeal, execution) now counts as pending forresolveStalledDispute.Fork tests (
test/fork/KlerosSepoliaFork.t.sol, local fork of Arbitrum Sepolia at block 328,678,215; needARB_SEPOLIA_RPC_URL. WithCIorREQUIRE_FORK_TESTS=trueset, a missing URL fails the run; a plain local run without it skips them)disputes()layout of an existing dispute is 160 bytes, and the period gate reads it correctly.createDisputefrom the Market works against the real core. The run covers staking, drawing (RNG mocked on the fork), commit, vote, appeal, execution, and thenexecuteRuling, which settles throughrule(). The timeout is blocked in every period after evidence, including when a refused ruling (0) is waiting in execution.DisputeRequest: the Market emits the rc.2 3-field event. The deployed 0.10.0IArbitrableV2declares a 5-field event. The event shape is not changed here.Kleros items before mainnet (KNOWN-ISSUES KI-5, OPEN-QUESTIONS 22, new
docs/DEPLOY-RUNBOOK.md)DisputeRequestform: mainnet blocker pending Kleros confirmation. Fallback: emit both forms (about +62 B Market bytecode, about +2.6k gas per dispute).KlerosCoreNeo, which only accepts disputes from arbitrables whitelisted by Kleros governance. Every Market deploy and redeploy has to be whitelisted before use; this is a go-live gate in the new deploy runbook. The deploy script comment is corrected (the Sepolia core has no whitelist).Builder bonus
cancelAwardnow bars both the award's builder and its customer for 2 full funding periods from the cancel:BAR_PERIODS = 2,barredUntil(account)= cancel timestamp + 2 ×PERIOD,isBarred, new eventAccountBarred(account, until). A cancel in the last second of a period still bars for 2 full periods. The cancelled award keeps its place in both period counts. This replaces "cancel frees the counts". While the bar lasts,reserverejects the addresses andfinalizereleases their slots instead of awarding.1_000e6). It stays a Safe setting:DeployPhase1.BONUS_MIN_BOUNTY_USDC, docs and tests are updated.Review jobs
REVIEWER_ACCEPT_DELAY= 24 hours. On a review job,acceptBidrevertsTooEarlyuntil 24h after the reviewer was last (re)assigned (decided 2026-11-12).ReviewerRegistry.setReviewer(reviewer, false, reason)now requires a reason that is not empty or whitespace-only (MissingReason), which is emitted inReviewerSet.ABI
TaskulerMarket.REVIEWER_ACCEPT_DELAY(),BuilderBonus.BAR_PERIODS(),BuilderBonus.barredUntil(address),BuilderBonus.isBarred(address), eventBuilderBonus.AccountBarred(address,uint256), errorReviewerRegistry.MissingReason().BuilderBonus.qualifiesnow also checks the bar.Size and tests
forge testwith the fork RPC set: 253 passed, 0 failed, 0 skipped (including the 5 fork tests).Docs updated: KNOWN-ISSUES (KI-5, KI-8, KI-9), THREAT-MODEL, AUDIT-SCOPE, README, SECURITY-NOTES, OPEN-QUESTIONS, new DEPLOY-RUNBOOK.
Merge this PR before #12. #12 already contains this branch with the
docs/AUDIT-SCOPE.mdtable resolved, so the second merge is clean.