Repository navigation
refactor(contracts): remove slash-appeal challenger pool - #1451
Conversation
|
Warning Review limit reached
Next review available in: 46 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (3)
WalkthroughThe change removes challenger-incentive-pool support from ChangesSlash appeal settlement and deployment update
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant SlashAppeal
participant CapacityBond
participant token
SlashAppeal->>CapacityBond: settleAppealUpheld()
SlashAppeal->>token: burn(full appeal bond)
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
Gas snapshotNo gas changes vs base. |
Contracts coverageLine coverage: 89.74% (2616/2915 lines) |
Coverage reportTotal: 81.07% (was 81.07%, ● 0.00%) — 52384/64615 lines
History
|
ReviewVerdict: approve after nits. No blocking issues. The removal is complete and correctly reasoned — no dangling references outside What it doesDeletes Correctness — checked, nothing wrong
Nits1. 2. 3. 4. 5. 6. Test coverageNet-positive (+0.13pp, 89.58 → 89.71). Removing Security / economicsStrictly reduces surface: one fewer governance-settable address, one fewer untrusted external call. Economic effect is slightly more TOKEN burned per failed appeal — bounded at 10,000 TOKEN by the One thing worth stating explicitly in the PR body: CIAll 23 checks green — build+test, slither, aderyn, solhint, fmt, coverage, both anvil e2e journeys. Gas snapshot regenerated, no regression reported. Generated by Claude Code |
Follow-up to the SlashAppeal challenger-incentive-pool removal. - SlashAppeal.t.sol: use the repo's `emit Contract.Event(...)` convention (`SlashAppeal.AppealUpheld`) instead of redeclaring the event locally, so the test cannot carry a signature that drifts from the contract. - SlashAppeal.t.sol: drop the raw-call probe for the deleted `setChallengerIncentivePool` selector. It asserted an ABI absence that the source deletion already guarantees, and passed only because SlashAppeal has no fallback/receive — adding one later would have failed a test named for uphold semantics. The expectEmit plus the supply-delta assertion already pin the full-bond burn. - BaseProtocolDeploy.s.sol: fix a plural left behind when the setter list became a single entry, and restore the separator in the zero-address fail-fast parenthetical so it no longer reads as one clause. - CONTRIBUTING.md: document CURRENT_TERMS_HASH in the local-deploy block; it is read with vm.envBytes32 and has no default, so it is required. - ADR 028: the appeal bond no longer mirrors ADR 014 bond economics, so state the contrast explicitly instead of listing it as a reused primitive. - Regenerate .gas-snapshot for the trimmed uphold test. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_011Fkfn2edYpVuoumwZ1vkwH
55127b7 to
1b1e779
Compare
…deploy env-var list Two review follow-ups on the challenger-pool removal. Removing `test_lifecycle_SlashAppeal_setChallengerIncentivePool_outOfBounds` took out the only test exercising `SlashAppeal.ZeroAddress`, leaving the constructor's three-way `||` guard uncovered — every peer contract (Token, BuybackBurner, PaymentChannel) has this test, so SlashAppeal was the outlier. Adds one case per clause plus a positive case pinning `emergencyMultisig == address(0)` as deliberately allowed. Verified load-bearing by mutation: dropping each clause in turn fails exactly the matching test and no others. The same commit that dropped `CHALLENGER_INCENTIVE_POOL` from the deploy script's env-var docstring also corrected the parallel list in CONTRIBUTING.md to include `CURRENT_TERMS_HASH`, but left the script's own list at three entries. `_readConfig` reads it via `vm.envBytes32` with no default, so an unset value hard-reverts the deploy with nothing in the file the operator was reading to explain it. Gas snapshot regenerated under FOUNDRY_PROFILE=ci for the four new entries. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Summary
SlashAppealchallenger-incentive-pool state, governance surface, deployment wiring, and fixturesWhy
Appeals are operator-only and expose no counter-evidence claimant or pool disbursement path. The former 50/50 appeal-bond split created a fund sink and a transfer-failure branch without an eligible recipient.
Validation
FOUNDRY_PROFILE=ci forge build --sizes --deny warningsFOUNDRY_PROFILE=ci forge snapshot --snap .gas-snapshot(804 passed, 0 failed, 12 fork-only skipped)npm run lintcargo check -p decdn-e2e -p decdn-node --all-targetsCloses #1436
Summary by CodeRabbit
Updated Behavior
Documentation
CURRENT_TERMS_HASH.