Repository navigation
feat(contracts): extend DeployProtocol + full E2E integration (#452) - #720
Merged
Merged
Conversation
ADR 003 PaymentChannel: USDC-denominated off-chain payment channels with EIP-712 vouchers (SignatureChecker for EOA + ERC-1271), 48h dispute window, operator early-withdraw-while-open, and same-tx settlement routing through FeeRouter.routeSettlement. openChannel gates on CapacityBond.isActive; the forced-inclusion deadline extension sits behind an overridable L2 seam. Adds focused consumer interfaces IFeeRouterSettlement + ICapacityBondActivity (mirroring the existing ICapacityBondReporter/Ejector split). First of four stacked PRs closing the remaining #452 contract surface. Co-Authored-By: Claude <[email protected]>
…ds (#452) ADR 014 SlashJudge: adjudicates phantom, rate-manipulation, and blacklist offenses via secp256k1 EIP-712 slash_sig verification (SignatureChecker, EOA + ERC-1271). All three resolve synchronously (no counter-evidence window); the challenger is recorded by CapacityBond.slash for the 50% finality leg and the challenge bond round-trips. Enforces the evidence-age window + the MAX_EVIDENCE_AGE_US < unbondingPeriod invariant on this side (the CapacityBond mirror check is a tracked follow-up). Adds focused interfaces ISlashJudge (canonical), ICapacityBondSlasher, IContentBlacklistHashView. Second of four stacked PRs for #452. Co-Authored-By: Claude <[email protected]>
…authority (#452) ADR 011 OriginAssignment: the DAO's positive origin authority. Registered namespaces use a publisher-propose / governance-ratify flow gated by an assignment timelock with operator re-validation (active + not blacklisted) at activation; the default-open namespace (id 0) is a governance-maintained global allow-list under the same EnumerableSet storage. Permissionless pruneBlacklistedAssignment cleans up blacklisted operators one entry at a time. Reuses ICapacityBondActivity; adds IPublisherRegistryOwnership + IContentBlacklistOriginView. Third of four stacked PRs for #452. Co-Authored-By: Claude <[email protected]>
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
alpergundogdu
commented
May 29, 2026
…SlashJudge (#452) CI slither (fail-on: medium) flagged four unsuppressed medium findings in PR #718's cumulative diff: - OriginAssignment.cancelAssignmentProposal: incorrect-equality on the `_pending[...].readyAt == 0` sentinel — the preceding `ownerOf` external read taints the struct field for the strict-equality detector. - OriginAssignment._replaceSet: unused-return on `set.remove(...)`. - SlashJudge.submitBlacklistChallenge / _checkRegistered: unused-return on the `(addedAt,)` / `(bound,)` tuple destructuring of external view calls. Directive placement follows existing conventions (call-line for direct calls per FeeRouter; function-decl for tuple destructuring per SlashAppeal). No behavioral change — comment-only suppressions. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…ment # Conflicts: # contracts/src/PaymentChannel.sol # contracts/src/SlashJudge.sol # contracts/test/PaymentChannel.t.sol # contracts/test/SlashJudge.t.sol
Deploys PaymentChannel, SlashJudge, and OriginAssignment in BaseProtocolDeploy and wires the post-deploy role grants (ROUTER_CALLER_ROLE -> PaymentChannel, SLASH_ROLE -> SlashJudge, OriginAssignment.setContentBlacklist), growing the governance-handoff set to 8 targets and the manifest. Launch params seeded as constants (48h dispute, 90d channel, 100 TOKEN challenge bond, 5d evidence age). Adds the acceptance E2E (register -> bond -> open channel -> settle through FeeRouter -> 3-bucket distribution -> slash -> escrow -> auto-eject -> appeal) on the deployed, handed-off surface, plus an ABI-freeze snapshot for the new public surfaces. Fourth of four stacked PRs for #452. BuybackBurner concrete binding remains deferred to #686. Co-Authored-By: Claude <[email protected]>
thiras
force-pushed
the
452-pr4-deploy-e2e
branch
from
May 30, 2026 00:58
6f226ab to
f8f468a
Compare
No constructor grants PAUSER_ROLE, and the deploy wiring only granted EMERGENCY_MULTISIG_ROLE. Post-handoff the sole PAUSER_ROLE admin is the Timelock, so the first emergency pause would have needed a 48h-delayed governance proposal — defeating the emergency path. Grant PAUSER_ROLE to the emergency multisig on all 5 deployed Pausable targets (CapacityBond, FeeRouter, SlashAppeal, PaymentChannel, SlashJudge) in _wireCrossContractRoles, before the governance handoff. Matches ADR 016 § Role Inventory (EMERGENCY_ROLE holds pause() on Pausable contracts) and the documented intent in PaymentChannel. Add a role-matrix test asserting the grant on every target. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
# Conflicts: # contracts/src/OriginAssignment.sol
Gas snapshotGas changes vs baseRun: 26683451389 |
Contracts coverageLine coverage: 87.50% (1666/1904 lines) |
Addresses review findings on #720: - Add phase-7 `_assertPeerRolesWired`: a reverting in-script post-condition that re-reads every phase-4 peer grant (SETTLEMENT_REPORTER/SLASH_APPEAL/ BLACKLIST/SLASH/GENESIS_GRANTOR/ROUTER_CALLER/EMERGENCY_MULTISIG/PAUSER) and both address bindings (OriginAssignment→ContentBlacklist, challenger pool). `_assertNoBackDoors` only covered governance/admin, so a wrong or dropped peer grant — a dead slash trigger, unroutable payments, no live pauser, or an unwired blacklist check — would have shipped silently (grantRole to a wrong address does not revert). New PeerRoleNotWired / BindingNotWired errors. - Prove the emergency multisig can ACTUALLY pause (not just hold PAUSER_ROLE): pause via the multisig, assert a whenNotPaused entrypoint reverts, unpause. - Add behavioral E2E for the blacklist→CapacityBond ejection edge (BLACKLIST_ROLE wiring), previously only asserted as a role bit. - Move the new-contract peer-role assertions into the canonical role-matrix test so a wiring regression fails independently of the heavier E2E flow. - Strengthen the E2E: assert each slash tier escrows a strictly larger amount, and that a granted appeal releases the appealed slash's escrow and refunds the appeal bond (net delta == released escrow); read FeeRouter shares from cfg. - Fix stale/inaccurate NatSpec: _governedTargets "five"→"eight" (+ invariant note), phase-2/phase-4 enumerations, the upholdAppeal degrade-vs-revert comment, and narrow the InterfaceFreeze docstring to the three #452 contracts. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PR 4 of 4 (final) for #452. Stacked on #718 → #717 → #716 — merge bottom-up; this diff is against the OriginAssignment branch.
Wires the three new contracts into the deploy and proves the full surface end-to-end:
BaseProtocolDeploy: deploysPaymentChannel,SlashJudge,OriginAssignment; adds the post-deploy role grants (ROUTER_CALLER_ROLE→ PaymentChannel,SLASH_ROLE→ SlashJudge,OriginAssignment.setContentBlacklist); grows the governance-handoff set to 8 targets and the manifest. Launch params seeded as constants (noDeployConfigchurn): 48h dispute / 90d channel / rate bounds 1–1000 / 100 TOKEN challenge bond / 5d evidence age.E2EProtocol.t.sol): on the deployed, governance-handed-off set — register → bond → open channel → settle throughFeeRouter→ 3-bucket distribution (90/0/10 launch) → slash → escrow → auto-ejection → appeal (open → fast-track → grant → escrow refund + slash-zero-out cleared). Plus a deploy-wiring assertion test.InterfaceFreeze.t.sol): pins the new contracts' public-surface selectors to canonical signatures (acceptance: "interface ABIs frozen for audit").Notes
SlashJudgerole-holder (soleSLASH_ROLEgrantee) and runs the appeal's governance step as theTimelockController— the SlashJudge evidence path is unit-tested in feat(contracts): add SlashJudge evidence verification + challenge bonds (#452) #717 and the full proposal path inGovernanceLifecycle.t.sol.DeployProtocol.t.sol,GovernanceLifecycle.t.sol) pass unchanged — proving the 3 new contracts deploy + hand off uniformly.closes #452is intentionally NOT set: the canonical surface is feature-complete except theBuybackBurnerconcrete Balancer V3 binding, deferred to feat(contracts): live Balancer V3 swap binding for BuybackBurner #686 (launch routes 0% buyback). Close Implement unified deCDN contract surface for audit (full 14-contract scope) #452 once that lands or once you accept the deferral.Verification
forge fmt --checkclean;FOUNDRY_PROFILE=ci forge build --deny warningsclean; pre-commit pass.forge test— full suite 386 pass, 0 fail (5 new across E2E + ABI freeze; all existing deploy/gov suites green).Test plan
🤖 Generated with Claude Code