Skip to content

test(contracts): full ADR 030 updateRegion e2e — EIP-712 + ed25519 registerNode signing harness (#689) - #760

Merged
yigitdot merged 5 commits into
mainfrom
feat/689-updateregion-e2e
Jun 2, 2026
Merged

yigitdot merged 5 commits into
mainfrom
feat/689-updateregion-e2e

Conversation

@yigitdot

@yigitdot yigitdot commented Jun 1, 2026 •

Copy link
Copy Markdown
Contributor

Closes #689. Unblocked by #669 (production Ed25519Verifier, merged).

What

Replaces the mock-based test_updateRegion_cooldownAndPrevSnapshot smoke test with an end-to-end flow that registers a node through the production Ed25519Verifier and exercises the full ADR 030 region surface plus the cross-contract eject path.

Signing harness (no FFI)

Extends the existing pinned contracts/test/ed25519-vectors/ generator — matching the repo's established committed-vector pattern (FFI is not enabled in foundry.toml) — with a section 4 that emits a real ed25519 signature over the exact registerNode ownership digest:

keccak256(abi.encodePacked(nodeId, msg.sender, block.chainid, registrationNonce[nodeId]))
  • Public key == NodeId; operator is Foundry's default account #0 (forge-signable for the EIP-712 binding sig), chainId pinned to 31337.
  • Adds a pinned sha3 = "=0.10.8" dep + an EIP-55 checksummer; Cargo.lock and README updated.

New test — CapacityBondRegionE2E.t.sol (deploys the real verifier)

  • ✅ keygen → bond → signed registerNode succeeds (harness ↔ real verifier agree)
  • ✅ corrupt ed25519 sig reverts InvalidEd25519Signature (negative control — proves the verifier is genuinely in the path)
  • ✅ updateRegion: first call free, within-cooldown reverts the exact RegionCooldownActive(readyAt), after-window succeeds; regionPrev / regionLastChanged + RegionUpdated asserted
  • ✅ replay rejection: deregisterNode bumps registrationNonce, so replaying the original ed25519 sig in a fresh registration reverts InvalidEd25519Signature (deregister is the path that isolates the sig check — eject/already-active preconditions revert before it)
  • ✅ cross-contract eject via ContentBlacklist.addOperator → CapacityBond.ejectNode: asserts the EjectedByBlacklist and NodeAutoEjected(nodeId, MIN_BOND) events, the ejected flag, node deactivation, and the registrationNonce bump

Removes the superseded mock smoke test from CapacityBond.t.sol.

Scope item 3 — deferral note

The issue's scope item 3 ("eject triggered when regionLastChanged falls outside the attestation window") has no production implementation in the current revision: the region-ripening predicate that reads regionPrev/regionLastChanged is deferred to the ADR 030 enforcement PR (see the region-attestation storage doc in CapacityBond.sol, which states no contract reads those slots yet). This PR therefore covers the only cross-contract eject path that exists today (blacklist-driven) and documents the deferral inline. Tracked in #761; noted on #689.

Review & rebase

  • Review round 1 (5c13233): corrected the replay-test comment (bindingNonce is advanced by the first registerNode, not deregisterNode) and strengthened the eject test (assert the ejected flag + EjectedByBlacklist event). The disputed EIP-55 comment was verified accurate against solc 0.8.28 (all-lowercase address literals are a hard compile error) and left as-is.
  • Rebase (f1e0043): merged main to clear a conflict from the stake → bond surface rename (refactor(contracts): rename stake→bond on CapacityBond surface #768). Resolution kept the deleted mock test atop main's renames; adapted the new test to the renamed surface (MIN_BOND, minBond_, bond.bond, _bondAndRegister).
  • Review round 2 (998285a): build the generator preimage in a fixed [u8; 92] stack array instead of a heap Vec (emitted vector bytes unchanged); assert NodeAutoEjected alongside EjectedByBlacklist in the eject test.

Verification (current HEAD)

  • forge test --match-contract CapacityBondRegionE2ETest → 5/5 pass
  • forge test (full suite) → 444/444 pass
  • forge fmt --check clean; FOUNDRY_PROFILE=ci forge build --deny warnings clean
  • ed25519-vectors generator: cargo clippy clean; regenerated vector is byte-identical to the committed constants
  • No src/ contract changes (test-only), so aderyn/slither findings are unaffected

🤖 Generated with Claude Code

…sterNode signing (#689)

Replace the mock-based `test_updateRegion_cooldownAndPrevSnapshot` smoke test
with an end-to-end flow that registers a node through the production
`Ed25519Verifier` (unblocked by #669) and exercises the full ADR 030 region
surface plus the cross-contract eject path.

- Extend the pinned `ed25519-vectors` generator (no FFI, matching the repo's
  committed-vector pattern) with a section 4 that emits a real ed25519 signature
  over the exact `registerNode` ownership digest
  `keccak256(nodeId ‖ operator ‖ chainId ‖ registrationNonce)`. Add a pinned
  `sha3` dep + an EIP-55 checksummer; update Cargo.lock and README.
- New `CapacityBondRegionE2E.t.sol` deploying the real verifier: signed register
  succeeds; corrupt-sig negative control reverts `InvalidEd25519Signature`;
  `updateRegion` cooldown / prev-snapshot / event; ed25519 replay rejection via
  the `deregisterNode` nonce bump; and the `ContentBlacklist → ejectNode`
  cross-contract path.
- Remove the superseded mock smoke test from `CapacityBond.t.sol`.

Issue #689 scope item 3 ("eject triggered when regionLastChanged falls outside
the attestation window") has no production implementation in this revision — the
region-ripening predicate that reads regionPrev/regionLastChanged is deferred to
the ADR 030 enforcement PR — so the test covers the only cross-contract eject
path that exists today (blacklist-driven) and documents the deferral inline.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@github-actions

github-actions Bot commented Jun 1, 2026 •

Copy link
Copy Markdown

Gas snapshot

Gas changes vs base
No files changed, compilation skipped

Ran 24 tests for test/BuybackBurner.t.sol:BuybackBurnerTest
[PASS] test_constructor_grantsAdminAndGovernanceRoles() (gas: 14873)
[PASS] test_constructor_revertsOnZeroAdmin() (gas: 67989)
[PASS] test_constructor_revertsOnZeroToken() (gas: 67964)
[PASS] test_constructor_revertsOnZeroUsdc() (gas: 67972)
[PASS] test_executeBuyback_happyPath_burnsAndEmits() (gas: 110748)
[PASS] test_executeBuyback_revertsPoolNotWiredWhenPoolUnset() (gas: 973169)
[PASS] test_executeBuyback_revertsPoolNotWiredWhenVaultUnset() (gas: 973299)
[PASS] test_executeBuyback_revertsSwapNotImplementedWhenActualDeltaIsZero() (gas: 65569)
[PASS] test_executeBuyback_revertsSwapReportMismatch() (gas: 116470)
[PASS] test_executeBuyback_revertsWhenAmountExceedsBalance() (gas: 77138)
[PASS] test_executeBuyback_revertsWhenPaused() (gas: 73161)
[PASS] test_executeBuyback_revertsWithoutKeeperRole() (gas: 64237)
[PASS] test_executeBuyback_revertsZeroAmount() (gas: 20661)
[PASS] test_executeBuyback_revertsZeroMinOut() (gas: 65728)
[PASS] test_pause_revertsWithoutPauserRole() (gas: 11929)
[PASS] test_rescueUSDC_revertsOnZeroAmount() (gas: 13609)
[PASS] test_rescueUSDC_revertsOnZeroRecipient() (gas: 13609)
[PASS] test_rescueUSDC_revertsWithoutGovernanceRole() (gas: 12259)
[PASS] test_rescueUSDC_transfersToRecipient() (gas: 56391)
[PASS] test_setPool_emitsUpdateEvent() (gas: 24938)
[PASS] test_setPool_revertsWithoutGovernanceRole() (gas: 12273)
[PASS] test_setVault_emitsUpdateEvent() (gas: 24925)
[PASS] test_setVault_revertsWithoutGovernanceRole() (gas: 12129)
[PASS] test_unpause_revertsWithoutPauserRole() (gas: 23910)
Suite result: ok. 24 passed; 0 failed; 0 skipped; finished in 5.22ms (4.12ms CPU time)

Ran 17 tests for test/FeeRouter.t.sol:FeeRouterTest
[PASS] test_bytesInWindow_clampsOversizedWindow() (gas: 510226)
[PASS] test_bytesInWindow_sumsTrailingWindow() (gas: 497431)
[PASS] test_bytesInWindow_zeroWindowReturnsZero() (gas: 9387)
[PASS] test_pause_revertsWithoutRole() (gas: 14609)
[PASS] test_routeSettlement_distributesThreeLegs() (gas: 232441)
[PASS] test_routeSettlement_dustRoutesToOperatorWhenBuybackUnset() (gas: 141816)
[PASS] test_routeSettlement_incrementsBytesPerEpoch() (gas: 221502)
[PASS] test_routeSettlement_revertsWithoutRouterRole() (gas: 89186)
[PASS] test_setBuybackBurner_revertsWithoutRole() (gas: 14698)
[PASS] test_setSharesAndDestinations_revertsWithoutRole() (gas: 19547)
[PASS] test_setShares_rejectsNonZeroShareWithoutDestination() (gas: 16217)
[PASS] test_setShares_rejectsSumNot10000() (gas: 14523)
[PASS] test_setShares_revertsWithoutRole() (gas: 15219)
[PASS] test_setTreasury_revertsWithoutRole() (gas: 14763)
[PASS] test_setWindowEpochs_enforcesBounds() (gas: 32758)
[PASS] test_setWindowEpochs_revertsWithoutRole() (gas: 14688)
[PASS] test_unpause_revertsWithoutRole() (gas: 72144)
Suite result: ok. 17 passed; 0 failed; 0 skipped; finished in 5.21ms (4.37ms CPU time)

Ran 54 tests for test/GovernanceLifecycle.t.sol:GovernanceLifecycleTest
[PASS] test_canary_executorIsTimelock() (gas: 9969)
[PASS] test_canary_governanceRoleHandoff() (gas: 99144)
[PASS] test_canary_governorVoteWeightWired() (gas: 129967)
[PASS] test_lifecycle_CapacityBond_setClaimSlashGateEpochs_happy() (gas: 589504)
[PASS] test_lifecycle_CapacityBond_setClaimSlashGateEpochs_outOfBounds() (gas: 595197)
[PASS] test_lifecycle_CapacityBond_setMaxCapacityMbps_happy() (gas: 589226)
[PASS] test_lifecycle_CapacityBond_setMaxCapacityMbps_outOfBounds() (gas: 595130)
[PASS] test_lifecycle_CapacityBond_setMaxMultiaddrSize_happy() (gas: 589246)
[PASS] test_lifecycle_CapacityBond_setMaxMultiaddrSize_outOfBounds() (gas: 595221)
[PASS] test_lifecycle_CapacityBond_setMinBond_happy() (gas: 589380)
[PASS] test_lifecycle_CapacityBond_setMinBond_outOfBounds() (gas: 595175)
[PASS] test_lifecycle_CapacityBond_setMinCapacityMbps_happy() (gas: 589355)
[PASS] test_lifecycle_CapacityBond_setMinCapacityMbps_outOfBounds() (gas: 595152)
[PASS] test_lifecycle_CapacityBond_setMultiaddrUpdateCooldown_happy() (gas: 606409)
[PASS] test_lifecycle_CapacityBond_setMultiaddrUpdateCooldown_outOfBounds() (gas: 595082)
[PASS] test_lifecycle_CapacityBond_setRegionStabilityWindow_happy() (gas: 589294)
[PASS] test_lifecycle_CapacityBond_setRegionStabilityWindow_outOfBounds() (gas: 595154)
[PASS] test_lifecycle_CapacityBond_setTreasury_happy() (gas: 606765)
[PASS] test_lifecycle_CapacityBond_setUnbondingPeriod_happy() (gas: 589296)
[PASS] test_lifecycle_CapacityBond_setUnbondingPeriod_outOfBounds() (gas: 595158)
[PASS] test_lifecycle_ContentBlacklist_addHashGlobal_happy() (gas: 611922)
[PASS] test_lifecycle_ContentBlacklist_addHashGlobal_outOfBounds() (gas: 597246)
[PASS] test_lifecycle_ContentBlacklist_addOperator_happy() (gas: 640678)
[PASS] test_lifecycle_ContentBlacklist_addOperator_outOfBounds() (gas: 602436)
[PASS] test_lifecycle_ContentBlacklist_registerRegionalBody_happy() (gas: 611166)
[PASS] test_lifecycle_ContentBlacklist_removeHashGlobal_happy() (gas: 997238)
[PASS] test_lifecycle_ContentBlacklist_removeHashGlobal_outOfBounds() (gas: 599794)
[PASS] test_lifecycle_ContentBlacklist_removeOperator_happy() (gas: 1025729)
[PASS] test_lifecycle_ContentBlacklist_setAppealBond_happy() (gas: 591735)
[PASS] test_lifecycle_ContentBlacklist_setAppealBond_outOfBounds() (gas: 597567)
[PASS] test_lifecycle_ContentBlacklist_setOriginBlacklist_happy() (gas: 610300)
[PASS] test_lifecycle_ContentBlacklist_setOriginBlacklist_outOfBounds() (gas: 598088)
[PASS] test_lifecycle_DecdnGovernor_setAgeRampMonths_happy() (gas: 631070)
[PASS] test_lifecycle_DecdnGovernor_setAgeRampMonths_outOfBounds() (gas: 636788)
[PASS] test_lifecycle_DecdnGovernor_setVoteCapBps_happy() (gas: 631077)
[PASS] test_lifecycle_DecdnGovernor_setVoteCapBps_outOfBounds() (gas: 636830)
[PASS] test_lifecycle_FeeRouter_setBuybackBurner_happy() (gas: 589629)
[PASS] test_lifecycle_FeeRouter_setBuybackBurner_outOfBounds() (gas: 597158)
[PASS] test_lifecycle_FeeRouter_setSharesAndDestinations_happy() (gas: 622563)
[PASS] test_lifecycle_FeeRouter_setSharesAndDestinations_outOfBounds() (gas: 598254)
[PASS] test_lifecycle_FeeRouter_setShares_happy() (gas: 608708)
[PASS] test_lifecycle_FeeRouter_setShares_outOfBounds() (gas: 597051)
[PASS] test_lifecycle_FeeRouter_setTreasury_happy() (gas: 589655)
[PASS] test_lifecycle_FeeRouter_setTreasury_outOfBounds() (gas: 594903)
[PASS] test_lifecycle_FeeRouter_setWindowEpochs_happy() (gas: 611399)
[PASS] test_lifecycle_FeeRouter_setWindowEpochs_outOfBounds() (gas: 597427)
[PASS] test_lifecycle_PublisherRegistry_setMaxNamespacesPerPublisher_happy() (gas: 591962)
[PASS] test_lifecycle_PublisherRegistry_setMaxNamespacesPerPublisher_outOfBounds() (gas: 597562)
[PASS] test_lifecycle_PublisherRegistry_setNamespaceTransferTimelock_happy() (gas: 591878)
[PASS] test_lifecycle_PublisherRegistry_setNamespaceTransferTimelock_outOfBounds() (gas: 597604)
[PASS] test_lifecycle_SlashAppeal_setAppealBond_happy() (gas: 591652)
[PASS] test_lifecycle_SlashAppeal_setAppealBond_outOfBounds() (gas: 597519)
[PASS] test_lifecycle_SlashAppeal_setChallengerIncentivePool_happy() (gas: 592113)
[PASS] test_lifecycle_SlashAppeal_setChallengerIncentivePool_outOfBounds() (gas: 597393)
Suite result: ok. 54 passed; 0 failed; 0 skipped; finished in 151.79ms (127.87ms CPU time)

Ran 3 tests for test/InterfaceFreeze.t.sol:InterfaceFreezeTest
[PASS] test_originAssignment_abiFrozen() (gas: 1298)
[PASS] test_paymentChannel_abiFrozen() (gas: 1540)
[PASS] test_slashJudge_abiFrozen() (gas: 870)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 379.22µs (75.33µs CPU time)

Ran 30 tests for test/OriginAssignment.t.sol:OriginAssignmentTest
[PASS] test_activate_blacklistSkippedWhenUnset() (gas: 2047543)
[PASS] test_activate_onlyGovernance() (gas: 140585)
[PASS] test_activate_replacesPreviousSet() (gas: 352112)
[PASS] test_activate_revertsBeforeTimelock() (gas: 140524)
[PASS] test_activate_revertsNoPending() (gas: 21009)
[PASS] test_activate_revertsOperatorBlacklisted() (gas: 173841)
[PASS] test_activate_revertsOperatorBlacklistedViaOperatorMapping() (gas: 183923)
[PASS] test_activate_revertsOperatorWentInactive() (gas: 155953)
[PASS] test_activate_setsAuthorizedSet() (gas: 224900)
[PASS] test_cancel_clearsPending() (gas: 110536)
[PASS] test_defaultOpen_addAndRemove() (gas: 78409)
[PASS] test_defaultOpen_onlyGovernance() (gas: 21169)
[PASS] test_defaultOpen_revertsInactive() (gas: 27910)
[PASS] test_defaultOpen_setAllowlist() (gas: 172108)
[PASS] test_propose_overwriteReplacesPending() (gas: 128731)
[PASS] test_propose_revertsDuplicate() (gas: 34918)
[PASS] test_propose_revertsEmpty() (gas: 21925)
[PASS] test_propose_revertsInactiveOperator() (gas: 39841)
[PASS] test_propose_revertsNonOwner() (gas: 27271)
[PASS] test_propose_revertsTooMany() (gas: 39410)
[PASS] test_propose_storesPending() (gas: 133692)
[PASS] test_prune_removesBlacklistedOperator() (gas: 248023)
[PASS] test_prune_removesOperatorBlacklistedViaOperatorMapping() (gas: 248717)
[PASS] test_prune_revertsWhenBlacklistUnset() (gas: 1865198)
[PASS] test_prune_revertsWhenNotBlacklisted() (gas: 226404)
[PASS] test_revoke_byPublisherAndGovernance() (gas: 237252)
[PASS] test_revoke_revertsNonMember() (gas: 23619)
[PASS] test_setAssignmentTimelock_enforcesBounds() (gas: 24759)
[PASS] test_setContentBlacklist_rejectsZero() (gas: 13473)
[PASS] test_setMaxOrigins_enforcesBounds() (gas: 13857)
Suite result: ok. 30 passed; 0 failed; 0 skipped; finished in 11.38ms (8.56ms CPU time)

Ran 88 tests for test/CapacityBond.t.sol:CapacityBondTest
[PASS] testFuzz_bondRequired_monotonic(uint256,uint256) (runs: 1024, μ: 19327, ~: 19622)
[PASS] test_appealGrant_unlocksClaimBeforeGateExpiry() (gas: 433692)
[PASS] test_bondRequired_matchesAdrWorkedExamples() (gas: 29776)
[PASS] test_bondRequired_strictlyMonotonic() (gas: 37752)
[PASS] test_bondRequired_zeroForZeroMbps() (gas: 13183)
[PASS] test_capacityBand_defaults() (gas: 10622)
[PASS] test_capacityBand_floorAlwaysBelowCeiling() (gas: 29341)
[PASS] test_claimVestedCredit_movesIntoActiveBond() (gas: 214461)
[PASS] test_claimVestedCredit_multiClaimFollowsLinearCurve() (gas: 219046)
[PASS] test_claimVestedCredit_multiSlash_gatedByOlderStandingSlash() (gas: 584023)
[PASS] test_claimVestedCredit_revertsWhenNoActiveBond() (gas: 144484)
[PASS] test_claimVestedCredit_revertsWhenSlashedInWindow() (gas: 438931)
[PASS] test_claimVestedCredit_succeedsAfterSlashGateExpires() (gas: 441920)
[PASS] test_creditSlash_escrowsThenDistributes5050AtFinality() (gas: 458272)
[PASS] test_curveDefaults() (gas: 10668)
[PASS] test_declareMbps_acceptsFloorAndCeiling() (gas: 161154)
[PASS] test_declareMbps_emitsOldAndNewValue() (gas: 158324)
[PASS] test_declareMbps_revertsAboveCeiling() (gas: 18084)
[PASS] test_declareMbps_revertsBelowFloor() (gas: 17907)
[PASS] test_declareMbps_revertsWhenBondBelowCurve() (gas: 131872)
[PASS] test_declareMbps_revertsZero() (gas: 17940)
[PASS] test_declareMbps_succeedsExactlyAtCurve() (gas: 147258)
[PASS] test_declaredMbps_storesValue() (gas: 147170)
[PASS] test_escrowHooks_requireSlashAppealRole() (gas: 17061)
[PASS] test_finalizeUnappealedSlash_distributes5050() (gas: 356720)
[PASS] test_firstBondedAt_immutableAcrossReBonds() (gas: 111513)
[PASS] test_firstBondedAt_setsOnFirstBond() (gas: 102579)
[PASS] test_forfeitUnvestedCredit_burnsWhenNoTreasury() (gas: 255996)
[PASS] test_forfeitUnvestedCredit_doesNotClawBackVestedUnclaimed() (gas: 291647)
[PASS] test_forfeitUnvestedCredit_onUnbond() (gas: 300423)
[PASS] test_genesisCredit_fullVestAfterDuration() (gas: 141172)
[PASS] test_genesisCredit_grantWithinWindow() (gas: 139175)
[PASS] test_genesisCredit_revertsAfterWindow() (gas: 82784)
[PASS] test_genesisCredit_vestsLinearly() (gas: 141475)
[PASS] test_markAppealOpen_blocksFinalize() (gas: 327347)
[PASS] test_pause_revertsWithoutRole() (gas: 14704)
[PASS] test_pendingCreditSlash_reducesOriginalGrant() (gas: 433126)
[PASS] test_reduceBondAtTier_activeOnly() (gas: 921)
[PASS] test_reduceBondAtTier_remainderClip() (gas: 1101)
[PASS] test_reduceBondAtTier_slashEqualsActive() (gas: 832)
[PASS] test_reduceBondAtTier_spillsIntoUnbonding() (gas: 932)
[PASS] test_reduceBondAtTier_unbondingOnly() (gas: 973)
[PASS] test_reduceBondAtTier_zeroInputs() (gas: 1448)
[PASS] test_registerNode_revertsOnInvalidEd25519Sig() (gas: 179149)
[PASS] test_registerNode_revertsWhenAlreadyActive() (gas: 387703)
[PASS] test_registerNode_revertsWhenBondBelowCurve() (gas: 207535)
[PASS] test_registerNode_succeedsAtCurve() (gas: 415487)
[PASS] test_requestUnbond_allowedWhenNoCapacityDeclared() (gas: 164080)
[PASS] test_requestUnbond_revertsWhenItDropsBelowCurve() (gas: 160394)
[PASS] test_requestUnbond_succeedsDownToExactlyCurve() (gas: 208876)
[PASS] test_setAlpha_revertsOutOfBounds() (gas: 18430)
[PASS] test_setAlpha_revertsWhenGbpsTierOutOfRange() (gas: 29865)
[PASS] test_setAlpha_updatesCurveAndEmits() (gas: 33866)
[PASS] test_setCapacity_onlyGovernance() (gas: 19590)
[PASS] test_setClaimSlashGateEpochs_revertsWithoutRole() (gas: 14868)
[PASS] test_setCurve_onlyGovernance() (gas: 19482)
[PASS] test_setKAlpha_orderingMatters() (gas: 56112)
[PASS] test_setK_revertsWhenGbpsTierOutOfRange() (gas: 43967)
[PASS] test_setK_updatesCurveAndEmits() (gas: 35693)
[PASS] test_setMaxCapacity_acceptsInclusiveBounds() (gas: 24473)
[PASS] test_setMaxCapacity_revertsOutOfBounds() (gas: 18395)
[PASS] test_setMaxCapacity_updatesBandAndEmits() (gas: 31129)
[PASS] test_setMaxMultiaddrSize_revertsWithoutRole() (gas: 14999)
[PASS] test_setMinBond_revertsWithoutRole() (gas: 14890)
[PASS] test_setMinCapacity_acceptsInclusiveBounds() (gas: 24710)
[PASS] test_setMinCapacity_revertsOutOfBounds() (gas: 18581)
[PASS] test_setMinCapacity_updatesBandAndEmits() (gas: 167027)
[PASS] test_setMultiaddrUpdateCooldown_revertsWithoutRole() (gas: 14844)
[PASS] test_setRegionStabilityWindow_revertsWithoutRole() (gas: 14911)
[PASS] test_setTreasury_revertsWithoutRole() (gas: 15007)
[PASS] test_setUnbondingPeriod_revertsWithoutRole() (gas: 14957)
[PASS] test_settleAppealGranted_clearsAndRefunds() (gas: 303554)
[PASS] test_settleAppealGranted_multiSlash_recomputesThenClears() (gas: 429170)
[PASS] test_settleAppealGranted_reverseMiddleSlash_keepsNewest() (gas: 578178)
[PASS] test_settleAppealUpheld_distributes5050() (gas: 348826)
[PASS] test_slashHitsVestedAndUnvestedTogether() (gas: 476143)
[PASS] test_slashHitsVestedButUnclaimed() (gas: 443592)
[PASS] test_slashId_persistsRecord() (gas: 314901)
[PASS] test_slash_creditSlash_escalatesAcrossTiers() (gas: 666622)
[PASS] test_slash_doesNotEnforceCurve() (gas: 362563)
[PASS] test_slash_escrowsWithoutDistribution() (gas: 326213)
[PASS] test_slash_stampsSlashedAtEpoch() (gas: 314708)
[PASS] test_slash_tier3_mixedBond_exhaustsActiveTapsUnbonding() (gas: 599374)
[PASS] test_slash_tierEscalation_15then50pct() (gas: 547261)
[PASS] test_slashedAtEpoch_zeroBeforeSlash() (gas: 10174)
[PASS] test_unpause_revertsWithoutRole() (gas: 94546)
[PASS] test_updateMultiaddrs_revertsWhenNodeNotActive() (gas: 15635)
[PASS] test_updateRegion_revertsWhenNodeNotActive() (gas: 15696)
Suite result: ok. 88 passed; 0 failed; 0 skipped; finished in 255.70ms (252.36ms CPU time)

Ran 5 tests for test/CapacityBondRegionE2E.t.sol:CapacityBondRegionE2ETest
[PASS] test_crossContractEject_viaContentBlacklist() (gas: 2849334)
[PASS] test_registerNode_corruptEd25519Signature_reverts() (gas: 640872)
[PASS] test_registerNode_realEd25519Signature_succeeds() (gas: 851299)
[PASS] test_registerNode_replayAfterNonceBump_reverts() (gas: 1321825)
[PASS] test_updateRegion_cooldownPrevSnapshotAndEvent() (gas: 922988)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 39.56ms (36.03ms CPU time)

Ran 19 tests for test/ContentBlacklist.t.sol:ContentBlacklistTest
[PASS] test_addHashGlobal_andQuery() (gas: 40454)
[PASS] test_addHashGlobal_revertsWithoutGovernanceRole() (gas: 14608)
[PASS] test_addHashRegional_globalTakesPrecedence() (gas: 44310)
[PASS] test_addHashRegional_revertsWithoutRegionalBodyRole() (gas: 14750)
[PASS] test_addHash_revertsWhileAppealActive() (gas: 233813)
[PASS] test_addOperator_callsEjectOnCapacityBond() (gas: 93920)
[PASS] test_fullAppealFlow_ratifyRemovesHash() (gas: 276038)
[PASS] test_hasActiveAppeal_clearedOnLapseOpen() (gas: 223830)
[PASS] test_hasActiveAppeal_clearedOnReject() (gas: 410381)
[PASS] test_hasActiveAppeal_clearedOnReverse() (gas: 255340)
[PASS] test_openBlacklistAppeal_revertsDuplicatePerHash() (gas: 334316)
[PASS] test_openBlacklistAppeal_revertsOnEntryNotBlacklisted() (gas: 18635)
[PASS] test_openBlacklistAppeal_revertsOnZeroRegion() (gas: 16243)
[PASS] test_regionalCap_countsFastTrackedNotOpen() (gas: 894100)
[PASS] test_registerRegionalBody_revertsWithoutGovernanceRole() (gas: 14830)
[PASS] test_rejectAppeal_burnsBond() (gas: 229508)
[PASS] test_removeHashRegional_blocksGlobalRegionEntries() (gas: 46682)
[PASS] test_reverseAppeal_clearsSuspendedAndBurnsBond() (gas: 262037)
[PASS] test_setAppealBond_revertsWithoutGovernanceRole() (gas: 14754)
Suite result: ok. 19 passed; 0 failed; 0 skipped; finished in 3.46ms (2.46ms CPU time)

Ran 13 tests for test/DecdnGovernor.t.sol:DecdnGovernorTest
[PASS] test_ageRampMonthsAt_preservesPriorReadAfterLaterPush() (gas: 4104760)
[PASS] test_getVotes_halfRamp() (gas: 173099)
[PASS] test_getVotes_historicalSnapshotIgnoresFutureSlash() (gas: 221405)
[PASS] test_getVotes_ramp() (gas: 173020)
[PASS] test_getVotes_recoversAfterWindowSlidesPastSlash() (gas: 196808)
[PASS] test_getVotes_uncappedWhenBelowCap() (gas: 173006)
[PASS] test_getVotes_zeroIfNeverBonded() (gas: 93593)
[PASS] test_getVotes_zeroWhenSlashedInWindow() (gas: 119032)
[PASS] test_proposalThreshold_isPointOnePercent() (gas: 71807)
[PASS] test_quorum_isFourPercentOfTotalBytesInWindow() (gas: 71639)
[PASS] test_setAgeRampMonths_revertsWithoutTimelockCaller() (gas: 11013)
[PASS] test_setVoteCapBps_revertsWithoutTimelockCaller() (gas: 11066)
[PASS] test_voteCapBpsAt_preservesPriorReadAfterLaterPush() (gas: 4104884)
Suite result: ok. 13 passed; 0 failed; 0 skipped; finished in 5.34ms (3.69ms CPU time)

Ran 23 tests for test/DeployProtocol.t.sol:DeployProtocolTest
[PASS] test_assertNoBackDoors_revertsWhenHandoffIncomplete() (gas: 24934827)
[PASS] test_assertNoBackDoors_revertsWhenTimelockMissingRole() (gas: 94428)
[PASS] test_crossContractWiring_capacityBondPeerRoles() (gas: 23419)
[PASS] test_crossContractWiring_genesisGrantorIsTimelock() (gas: 17165)
[PASS] test_crossContractWiring_newContractPeerRoles() (gas: 31445)
[PASS] test_crossContractWiring_slashAppealChallengerPool() (gas: 9920)
[PASS] test_deployTargets_revertsOnZeroChallengerIncentivePool() (gas: 2025645)
[PASS] test_deployTargets_revertsOnZeroDeployer() (gas: 580314)
[PASS] test_deployTargets_revertsOnZeroEd25519Verifier() (gas: 2025513)
[PASS] test_deployTargets_revertsOnZeroEmergencyMultisig() (gas: 2025557)
[PASS] test_deployTargets_revertsOnZeroInitialTokenHolder() (gas: 2025645)
[PASS] test_deployTargets_revertsOnZeroUsdc() (gas: 2025451)
[PASS] test_emergencyMultisig_canPauseAndBlockEntrypoint() (gas: 48410)
[PASS] test_feeRouter_launchSharesDormantBuyback() (gas: 16477)
[PASS] test_feeRouter_treasuryIsTimelock() (gas: 10051)
[PASS] test_governor_openExecutor() (gas: 8743)
[PASS] test_governor_timelockBinding() (gas: 25888)
[PASS] test_roleMatrix_deployerHoldsNoRoleAnywhere() (gas: 66946)
[PASS] test_roleMatrix_emergencyMultisigGrants() (gas: 19569)
[PASS] test_roleMatrix_pauserIsEmergencyMultisig() (gas: 45657)
[PASS] test_roleMatrix_timelockHoldsDefaultAdminOnEveryTarget() (gas: 41846)
[PASS] test_roleMatrix_timelockHoldsGovernanceOnEveryTarget() (gas: 41974)
[PASS] test_token_initialHolderHoldsFullSupply() (gas: 13803)
Suite result: ok. 23 passed; 0 failed; 0 skipped; finished in 17.92ms (11.90ms CPU time)

Ran 7 tests for test/DeployProtocolScript.t.sol:DeployProtocolScriptTest
[PASS] test_readConfig_appliesDefaultsForOptionalVars() (gas: 17786)
[PASS] test_readConfig_deployerIsTxOrigin() (gas: 15801)
[PASS] test_run_abortsBeforeBroadcastWhenManifestExists() (gas: 22040)
[PASS] test_run_revertsIfDeployerIsForgeDefaultSender() (gas: 15305)
[PASS] test_writeManifest_overwritesWhenForced() (gas: 110634)
[PASS] test_writeManifest_revertsOnExistingFile() (gas: 32033)
[PASS] test_writeManifest_writesAllAddresses() (gas: 92307)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 16.32ms (15.28ms CPU time)

Ran 3 tests for test/E2EProtocol.t.sol:E2EProtocolTest
[PASS] test_deployWiring_newContractsWiredAndHandedOff() (gas: 66882)
[PASS] test_e2e_blacklistEjectsOperator() (gas: 420295)
[PASS] test_e2e_registerSettleSlashEjectAppeal() (gas: 1474331)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 14.48ms (3.91ms CPU time)

Ran 12 tests for test/Ed25519Verifier.t.sol:Ed25519VerifierTest
[PASS] test_MalleatedScalarRejected() (gas: 525477)
[PASS] test_NonCanonicalYRejected() (gas: 11387)
[PASS] test_OffCurvePubKeyRejected() (gas: 14174)
[PASS] test_SmallOrderPubKeyRejected() (gas: 40661)
[PASS] test_SmallOrderRRejected() (gas: 39201)
[PASS] test_ValidVectorsAccepted() (gas: 3003445)
[PASS] test_VerifyRunsUnderStaticcall() (gas: 508245)
[PASS] test_WrongLengthSignatureRejected() (gas: 12156)
[PASS] test_WrongMessageRejected() (gas: 507932)
[PASS] test_WrongPubKeyRejected() (gas: 509119)
[PASS] test_WrongRRejected() (gas: 503763)
[PASS] test_WrongSRejected() (gas: 508960)
Suite result: ok. 12 passed; 0 failed; 0 skipped; finished in 60.28ms (59.84ms CPU time)

Ran 27 tests for test/PublisherRegistry.t.sol:PublisherRegistryTest
[PASS] testFuzz_createNamespace_idsAreSequentialAndOwned(uint8) (runs: 1024, μ: 717319, ~: 371835)
[PASS] test_claimContent_multiClaimAcrossNamespaces() (gas: 233820)
[PASS] test_claimContent_recordsClaim() (gas: 134733)
[PASS] test_claimContent_revertsForDefaultOpenNamespace() (gas: 13756)
[PASS] test_claimContent_revertsIfNotOwner() (gas: 66829)
[PASS] test_claimContent_revertsOnDuplicateSameNamespace() (gas: 135319)
[PASS] test_constructor_revertsZeroAdmin() (gas: 36674)
[PASS] test_constructor_setsDefaultsAndRoles() (gas: 19037)
[PASS] test_createNamespace_assignsIdsFromOne() (gas: 92728)
[PASS] test_createNamespace_revertsAtCap() (gas: 98581)
[PASS] test_createNamespace_zeroIsNeverAssigned() (gas: 65471)
[PASS] test_namespaceOf_emptyForUnclaimed() (gas: 8273)
[PASS] test_setMaxNamespaces_revertsOutOfBounds() (gas: 17605)
[PASS] test_setMaxNamespaces_revertsWithoutRole() (gas: 13384)
[PASS] test_setMaxNamespaces_withinBounds() (gas: 20687)
[PASS] test_setTransferTimelock_revertsOutOfBounds() (gas: 17706)
[PASS] test_setTransferTimelock_revertsWithoutRole() (gas: 14763)
[PASS] test_setTransferTimelock_withinBounds() (gas: 20560)
[PASS] test_transfer_cancelByOwner() (gas: 78668)
[PASS] test_transfer_cancelRevertsIfNotOwner() (gas: 93302)
[PASS] test_transfer_finalizeRevertsIfNotPendingOwner() (gas: 93817)
[PASS] test_transfer_finalizeRevertsNoPending() (gas: 68544)
[PASS] test_transfer_fullFlow() (gas: 98658)
[PASS] test_transfer_initiateRevertsIfNotOwner() (gas: 66923)
[PASS] test_transfer_initiateRevertsZeroNewOwner() (gas: 64330)
[PASS] test_transfer_revertsWhenRecipientAtCap() (gas: 150145)
[PASS] test_transfer_selfTransferExemptFromCap() (gas: 95404)
Suite result: ok. 27 passed; 0 failed; 0 skipped; finished in 928.46ms (927.41ms CPU time)

Ran 23 tests for test/SlashAppeal.t.sol:SlashAppealTest
[PASS] test_cleanup_fastTrackedLapse_grantsOperatorFavorable() (gas: 455127)
[PASS] test_cleanup_openLapse_upholds() (gas: 472918)
[PASS] test_fastTrack_requiresMultisig() (gas: 484713)
[PASS] test_forceResolveStuckAppeal_resolvesAfterRoleRevoked() (gas: 521967)
[PASS] test_forceResolveStuckAppeal_revertsWhenNotAppealOpen() (gas: 320040)
[PASS] test_forceResolveStuckAppeal_revertsWithoutGovernanceRole() (gas: 487811)
[PASS] test_frequencyCap_blocksSecondAppealWithinWindow() (gas: 608342)
[PASS] test_grant_newerAppeal_fallsBackToOlderStandingSlash() (gas: 603691)
[PASS] test_grant_olderAppeal_preservesNewerSlashZeroOut() (gas: 603110)
[PASS] test_grant_refundsOperatorAndBondAndClearsZeroOut() (gas: 463283)
[PASS] test_grant_requiresGovernance() (gas: 495318)
[PASS] test_grant_restoresCreditVestingNotLiquid() (gas: 576566)
[PASS] test_grant_revertsIfNotFastTracked() (gas: 486982)
[PASS] test_open_locksEscrowAndPullsBond() (gas: 491027)
[PASS] test_open_revertsAfterFilingWindow() (gas: 481847)
[PASS] test_open_revertsForNonOperator() (gas: 495646)
[PASS] test_open_revertsOnDoubleAppeal() (gas: 486748)
[PASS] test_open_revertsUnknownSlash() (gas: 23755)
[PASS] test_pause_extendsFilingWindow() (gas: 408650)
[PASS] test_reject_burnsBondAndDistributesEscrow() (gas: 478602)
[PASS] test_slashAppealPause_extendsCapacityBondFilingWindow() (gas: 556672)
[PASS] test_uphold_distributesEscrowAndSplitsBond() (gas: 515000)
[PASS] test_uphold_poolUnset_burnsFullBond() (gas: 2249371)
Suite result: ok. 23 passed; 0 failed; 0 skipped; finished in 20.60ms (18.88ms CPU time)

Ran 22 tests for test/SlashJudge.t.sol:SlashJudgeTest
[PASS] test_blacklist_revertsOnHashMismatch() (gas: 68210)
[PASS] test_blacklist_revertsWhenBlacklistedAfterResponse() (gas: 72559)
[PASS] test_blacklist_revertsWhenNotBlacklisted() (gas: 48632)
[PASS] test_blacklist_revertsWhenSuspended() (gas: 72096)
[PASS] test_blacklist_slashesOnProbeResponse() (gas: 189538)
[PASS] test_blacklist_slashesOnStreamResponse() (gas: 190270)
[PASS] test_constructor_revertsWhenEvidenceAgeExceedsUnbonding() (gas: 366864)
[PASS] test_pause_blocksChallenges() (gas: 58348)
[PASS] test_phantom_revertsOnBadProbeSignature() (gas: 46691)
[PASS] test_phantom_revertsOnEvidenceReplay() (gas: 199102)
[PASS] test_phantom_revertsOnFutureEvidence() (gas: 47528)
[PASS] test_phantom_revertsOnNodeIdMismatch() (gas: 37805)
[PASS] test_phantom_revertsOnStaleEvidence() (gas: 49909)
[PASS] test_phantom_revertsOnUnregisteredNode() (gas: 39027)
[PASS] test_phantom_revertsOutsideTimestampWindow() (gas: 49624)
[PASS] test_phantom_revertsWhenStreamOk() (gas: 53546)
[PASS] test_phantom_slashesAndRoundTripsBond() (gas: 179547)
[PASS] test_rate_revertsWhenNotHigher() (gas: 53581)
[PASS] test_rate_slashesWhenStreamRateHigher() (gas: 172123)
[PASS] test_setChallengeBond_enforcesBounds() (gas: 24689)
[PASS] test_setMaxEvidenceAge_enforcesBoundsAndInvariant() (gas: 40199)
[PASS] test_setters_onlyGovernance() (gas: 13759)
Suite result: ok. 22 passed; 0 failed; 0 skipped; finished in 29.93ms (28.69ms CPU time)

Ran 44 tests for test/TestnetFaucet.t.sol:TestnetFaucetTest
[PASS] testFuzz_claim_atOrAboveCooldown(uint256) (runs: 1024, μ: 91486, ~: 91528)
[PASS] testFuzz_claim_belowCooldown(uint256) (runs: 1024, μ: 85185, ~: 85389)
[PASS] test_admin_canGrantAndRevokeRoles() (gas: 56401)
[PASS] test_claim_blocksReentrancy() (gas: 1550228)
[PASS] test_claim_happyPath() (gas: 82821)
[PASS] test_claim_perCallerCooldownIndependence() (gas: 133478)
[PASS] test_claim_revertsBeforeCooldown() (gas: 83092)
[PASS] test_claim_revertsOnInsufficientBalance() (gas: 50715)
[PASS] test_claim_revertsOneSecondBeforeCooldownBoundary() (gas: 82996)
[PASS] test_claim_revertsWhenPaused() (gas: 39998)
[PASS] test_claim_succeedsAfterCooldown() (gas: 90430)
[PASS] test_claim_succeedsAtExactCooldownBoundary() (gas: 87103)
[PASS] test_constructor_allowsZeroCooldown() (gas: 1810378)
[PASS] test_constructor_revertsOnCooldownExceedingMax() (gas: 1015061)
[PASS] test_constructor_revertsOnMainnetChainId() (gas: 988198)
[PASS] test_constructor_revertsOnZeroAdmin() (gas: 985898)
[PASS] test_constructor_revertsOnZeroClaimAmount() (gas: 988045)
[PASS] test_constructor_revertsOnZeroFunding() (gas: 988061)
[PASS] test_constructor_revertsOnZeroGovernance() (gas: 985864)
[PASS] test_constructor_revertsOnZeroPauser() (gas: 985954)
[PASS] test_constructor_revertsOnZeroTokenAddress() (gas: 70468)
[PASS] test_constructor_revertsOnZeroTreasury() (gas: 987830)
[PASS] test_constructor_revertsWhenTreasuryNotApproved() (gas: 1110690)
[PASS] test_constructor_setsStateAndRoles() (gas: 43070)
[PASS] test_nonAdmin_cannotGrantRoles() (gas: 17889)
[PASS] test_pause_blocksClaimUnpauseRestores() (gas: 91691)
[PASS] test_pause_revertsOnNonPauser() (gas: 14607)
[PASS] test_setClaimAmount_revertsOnNonGovernance() (gas: 14702)
[PASS] test_setClaimAmount_revertsOnZero() (gas: 13338)
[PASS] test_setClaimAmount_updatesAndEmits() (gas: 22083)
[PASS] test_setCooldown_acceptsMaxCooldown() (gas: 20228)
[PASS] test_setCooldown_allowsZero() (gas: 94920)
[PASS] test_setCooldown_revertsOnExceedingMax() (gas: 13790)
[PASS] test_setCooldown_revertsOnNonGovernance() (gas: 14705)
[PASS] test_setCooldown_updatesAndEmits() (gas: 22231)
[PASS] test_timeUntilNext_tracksCooldownWindow() (gas: 82615)
[PASS] test_timeUntilNext_zeroBeforeFirstClaim() (gas: 10099)
[PASS] test_unpause_revertsOnNonPauser() (gas: 43483)
[PASS] test_withdraw_revertsOnInsufficientBalance() (gas: 26877)
[PASS] test_withdraw_revertsOnNonGovernance() (gas: 17089)
[PASS] test_withdraw_revertsOnZeroAmount() (gas: 20838)
[PASS] test_withdraw_revertsOnZeroTo() (gas: 18662)
[PASS] test_withdraw_transfersAndEmits() (gas: 44129)
[PASS] test_withdraw_worksWhilePaused() (gas: 68286)
Suite result: ok. 44 passed; 0 failed; 0 skipped; finished in 275.12ms (270.88ms CPU time)

Ran 10 tests for test/Token.t.sol:TokenTest
[PASS] testFuzz_burn_reducesSupplyByExactAmount(uint256) (runs: 1024, μ: 27822, ~: 27700)
[PASS] test_burnFrom_consumesAllowance() (gas: 38534)
[PASS] test_burn_reducesTotalSupplyAndBalance() (gas: 26044)
[PASS] test_constructor_metadata() (gas: 17896)
[PASS] test_constructor_mintsFullSupplyToHolder() (gas: 12954)
[PASS] test_constructor_revertsOnZeroInitialHolder() (gas: 83264)
[PASS] test_constructor_totalSupplyConstantMatches() (gas: 9364)
[PASS] test_noMintFunctionExposed() (gas: 10765)
[PASS] test_noVotesSurfaceExposed() (gas: 11991)
[PASS] test_permit_setsAllowance() (gas: 67380)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 104.69ms (104.02ms CPU time)

Ran 56 tests for test/PaymentChannel.t.sol:PaymentChannelTest
[PASS] testFuzz_settle_refundEqualsDepositMinusClaimed(uint256,uint256) (runs: 1024, μ: 416039, ~: 416090)
[PASS] testFuzz_withdrawThenSettle_partitionsClaim(uint256,uint256,uint256,uint256) (runs: 1024, μ: 554657, ~: 555056)
[PASS] test_close_afterWithdraw_settleRoutesRemainderOnly() (gas: 547394)
[PASS] test_close_atWatermarkNonce_succeeds() (gas: 477450)
[PASS] test_close_revertsAfterExpiry() (gas: 211121)
[PASS] test_close_revertsOnAmountExceedingDeposit() (gas: 223121)
[PASS] test_close_revertsOnByteOnlyAdvance() (gas: 470362)
[PASS] test_close_then_settle_routesAndRefunds() (gas: 426064)
[PASS] test_close_thirdPartyCannotClose() (gas: 213018)
[PASS] test_constructor_revertsOnDisputeWindowOutOfBounds() (gas: 77036)
[PASS] test_constructor_revertsOnEoaFeeRouter() (gas: 77058)
[PASS] test_constructor_revertsOnZeroAdmin() (gas: 71951)
[PASS] test_dispute_higherNonceWins() (gas: 309711)
[PASS] test_dispute_revertsAfterDeadline() (gas: 297276)
[PASS] test_dispute_revertsOnAmountExceedingDeposit() (gas: 305225)
[PASS] test_dispute_revertsOnAmountRegression() (gas: 304835)
[PASS] test_dispute_revertsOnByteOnlyAdvance() (gas: 488772)
[PASS] test_dispute_revertsOnBytesRegression() (gas: 304972)
[PASS] test_dispute_revertsOnStaleNonce() (gas: 302261)
[PASS] test_forcedInclusion_doesNotExtendTwice() (gas: 2916491)
[PASS] test_forcedInclusion_extendsDeadlineOnce() (gas: 2893929)
[PASS] test_forcedInclusion_noExtendWhenAmpleTimeRemains() (gas: 2902445)
[PASS] test_getRateBounds_returnsConfigured() (gas: 9912)
[PASS] test_normalDispute_doesNotExtend() (gas: 319584)
[PASS] test_openChannel_derivesIdAndIncrementsNonce() (gas: 221523)
[PASS] test_openChannel_distinctIdsAcrossProviders() (gas: 351414)
[PASS] test_openChannel_revertsBelowMinDeposit() (gas: 23033)
[PASS] test_openChannel_revertsOnInactiveProvider() (gas: 29784)
[PASS] test_openChannel_revertsWhenPaused() (gas: 47399)
[PASS] test_paused_exitsStillCallable() (gas: 671201)
[PASS] test_reclaimExpired_refundsRemainderToClient() (gas: 452272)
[PASS] test_reclaimExpired_revertsBeforeExpiry() (gas: 206190)
[PASS] test_route_zeroesResidualAllowanceAfterUnderPull() (gas: 535018)
[PASS] test_setDisputeWindow_enforcesBounds() (gas: 24815)
[PASS] test_setFeeRouter_revertsOnEoaRouter() (gas: 18660)
[PASS] test_setFeeRouter_revertsOnZeroAndUnchanged() (gas: 24635)
[PASS] test_setFeeRouter_updatesTarget() (gas: 292460)
[PASS] test_setters_onlyGovernance() (gas: 13998)
[PASS] test_settle_amountEqualsDeposit_zeroRefund() (gas: 410874)
[PASS] test_settle_fullyWithdrawn_noRouterCall() (gas: 473130)
[PASS] test_settle_revertsBeforeDisputeDeadline() (gas: 294513)
[PASS] test_topUp_increasesDeposit() (gas: 226710)
[PASS] test_topUp_onlyClient() (gas: 206621)
[PASS] test_topUp_revertsWhenPaused() (gas: 233022)
[PASS] test_voucher_rejectedOnWrongChannelId() (gas: 339891)
[PASS] test_withdraw_acceptsErc1271Signature() (gas: 717406)
[PASS] test_withdraw_onlyProvider() (gas: 210927)
[PASS] test_withdraw_revertsOnAmountExceedingDeposit() (gas: 222881)
[PASS] test_withdraw_revertsOnBadSignature() (gas: 215715)
[PASS] test_withdraw_revertsOnBytesRegression() (gas: 469281)
[PASS] test_withdraw_revertsOnNonMonotonicNonce() (gas: 468957)
[PASS] test_withdraw_revertsWhenDeltaZero() (gas: 469732)
[PASS] test_withdraw_routesDeltaAndAdvancesWatermark() (gas: 465532)
[PASS] test_withdraw_secondWithdrawRoutesOnlyIncrement() (gas: 554879)
[PASS] test_zeroVoucherClose_disabledAfterWithdraw() (gas: 462930)
[PASS] test_zeroVoucherClose_refundsFullDeposit() (gas: 218313)
Suite result: ok. 56 passed; 0 failed; 0 skipped; finished in 1.77s (1.80s CPU time)

Ran 19 test suites in 1.97s (3.72s CPU time): 480 tests passed, 0 failed, 0 skipped (480 total tests)
━ CapacityBondTest::test_capacityBand_defaults() (gas: 10622 → 10622 | 0 0.000%)
━ CapacityBondTest::test_pause_revertsWithoutRole() (gas: 14704 → 14704 | 0 0.000%)
━ CapacityBondTest::test_reduceBondAtTier_remainderClip() (gas: 1101 → 1101 | 0 0.000%)
━ CapacityBondTest::test_reduceBondAtTier_spillsIntoUnbonding() (gas: 932 → 932 | 0 0.000%)
━ CapacityBondTest::test_requestUnbond_allowedWhenNoCapacityDeclared() (gas: 164080 → 164080 | 0 0.000%)
━ CapacityBondTest::test_setAlpha_revertsOutOfBounds() (gas: 18430 → 18430 | 0 0.000%)
━ CapacityBondTest::test_setAlpha_revertsWhenGbpsTierOutOfRange() (gas: 29865 → 29865 | 0 0.000%)
━ ContentBlacklistTest::test_addHashGlobal_revertsWithoutGovernanceRole() (gas: 14608 → 14608 | 0 0.000%)
━ ContentBlacklistTest::test_openBlacklistAppeal_revertsOnEntryNotBlacklisted() (gas: 18635 → 18635 | 0 0.000%)
━ ContentBlacklistTest::test_openBlacklistAppeal_revertsOnZeroRegion() (gas: 16243 → 16243 | 0 0.000%)
━ ContentBlacklistTest::test_registerRegionalBody_revertsWithoutGovernanceRole() (gas: 14830 → 14830 | 0 0.000%)
━ ContentBlacklistTest::test_setAppealBond_revertsWithoutGovernanceRole() (gas: 14754 → 14754 | 0 0.000%)
━ DecdnGovernorTest::test_ageRampMonthsAt_preservesPriorReadAfterLaterPush() (gas: 4104760 → 4104760 | 0 0.000%)
━ DecdnGovernorTest::test_getVotes_halfRamp() (gas: 173099 → 173099 | 0 0.000%)
━ DecdnGovernorTest::test_getVotes_historicalSnapshotIgnoresFutureSlash() (gas: 221405 → 221405 | 0 0.000%)
━ DecdnGovernorTest::test_getVotes_ramp() (gas: 173020 → 173020 | 0 0.000%)
━ DecdnGovernorTest::test_getVotes_recoversAfterWindowSlidesPastSlash() (gas: 196808 → 196808 | 0 0.000%)
━ DecdnGovernorTest::test_getVotes_uncappedWhenBelowCap() (gas: 173006 → 173006 | 0 0.000%)
━ DecdnGovernorTest::test_getVotes_zeroIfNeverBonded() (gas: 93593 → 93593 | 0 0.000%)
━ DecdnGovernorTest::test_getVotes_zeroWhenSlashedInWindow() (gas: 119032 → 119032 | 0 0.000%)
━ DecdnGovernorTest::test_proposalThreshold_isPointOnePercent() (gas: 71807 → 71807 | 0 0.000%)
━ DecdnGovernorTest::test_quorum_isFourPercentOfTotalBytesInWindow() (gas: 71639 → 71639 | 0 0.000%)
━ DecdnGovernorTest::test_setAgeRampMonths_revertsWithoutTimelockCaller() (gas: 11013 → 11013 | 0 0.000%)
━ DecdnGovernorTest::test_setVoteCapBps_revertsWithoutTimelockCaller() (gas: 11066 → 11066 | 0 0.000%)
━ DecdnGovernorTest::test_voteCapBpsAt_preservesPriorReadAfterLaterPush() (gas: 4104884 → 4104884 | 0 0.000%)
━ DeployProtocolTest::test_assertNoBackDoors_revertsWhenTimelockMissingRole() (gas: 94428 → 94428 | 0 0.000%)
━ DeployProtocolTest::test_crossContractWiring_capacityBondPeerRoles() (gas: 23419 → 23419 | 0 0.000%)
━ DeployProtocolTest::test_crossContractWiring_newContractPeerRoles() (gas: 31445 → 31445 | 0 0.000%)
━ DeployProtocolTest::test_crossContractWiring_slashAppealChallengerPool() (gas: 9920 → 9920 | 0 0.000%)
━ DeployProtocolTest::test_deployTargets_revertsOnZeroChallengerIncentivePool() (gas: 2025645 → 2025645 | 0 0.000%)
━ DeployProtocolTest::test_deployTargets_revertsOnZeroDeployer() (gas: 580314 → 580314 | 0 0.000%)
━ DeployProtocolTest::test_deployTargets_revertsOnZeroEd25519Verifier() (gas: 2025513 → 2025513 | 0 0.000%)
━ DeployProtocolTest::test_deployTargets_revertsOnZeroEmergencyMultisig() (gas: 2025557 → 2025557 | 0 0.000%)
━ DeployProtocolTest::test_deployTargets_revertsOnZeroInitialTokenHolder() (gas: 2025645 → 2025645 | 0 0.000%)
━ DeployProtocolTest::test_deployTargets_revertsOnZeroUsdc() (gas: 2025451 → 2025451 | 0 0.000%)
━ DeployProtocolTest::test_feeRouter_launchSharesDormantBuyback() (gas: 16477 → 16477 | 0 0.000%)
━ DeployProtocolTest::test_feeRouter_treasuryIsTimelock() (gas: 10051 → 10051 | 0 0.000%)
━ DeployProtocolTest::test_governor_openExecutor() (gas: 8743 → 8743 | 0 0.000%)
━ DeployProtocolTest::test_governor_timelockBinding() (gas: 25888 → 25888 | 0 0.000%)
━ DeployProtocolTest::test_token_initialHolderHoldsFullSupply() (gas: 13803 → 13803 | 0 0.000%)
━ DeployProtocolScriptTest::test_readConfig_appliesDefaultsForOptionalVars() (gas: 17786 → 17786 | 0 0.000%)
━ DeployProtocolScriptTest::test_readConfig_deployerIsTxOrigin() (gas: 15801 → 15801 | 0 0.000%)
━ DeployProtocolScriptTest::test_run_abortsBeforeBroadcastWhenManifestExists() (gas: 22040 → 22040 | 0 0.000%)
━ DeployProtocolScriptTest::test_run_revertsIfDeployerIsForgeDefaultSender() (gas: 15305 → 15305 | 0 0.000%)
━ DeployProtocolScriptTest::test_writeManifest_overwritesWhenForced() (gas: 110634 → 110634 | 0 0.000%)
━ DeployProtocolScriptTest::test_writeManifest_revertsOnExistingFile() (gas: 32033 → 32033 | 0 0.000%)
━ DeployProtocolScriptTest::test_writeManifest_writesAllAddresses() (gas: 92307 → 92307 | 0 0.000%)
━ E2EProtocolTest::test_deployWiring_newContractsWiredAndHandedOff() (gas: 66882 → 66882 | 0 0.000%)
━ Ed25519VerifierTest::test_MalleatedScalarRejected() (gas: 525477 → 525477 | 0 0.000%)
━ Ed25519VerifierTest::test_NonCanonicalYRejected() (gas: 11387 → 11387 | 0 0.000%)
━ Ed25519VerifierTest::test_OffCurvePubKeyRejected() (gas: 14174 → 14174 | 0 0.000%)
━ Ed25519VerifierTest::test_SmallOrderPubKeyRejected() (gas: 40661 → 40661 | 0 0.000%)
━ Ed25519VerifierTest::test_SmallOrderRRejected() (gas: 39201 → 39201 | 0 0.000%)
━ Ed25519VerifierTest::test_ValidVectorsAccepted() (gas: 3003445 → 3003445 | 0 0.000%)
━ Ed25519VerifierTest::test_VerifyRunsUnderStaticcall() (gas: 508245 → 508245 | 0 0.000%)
━ Ed25519VerifierTest::test_WrongLengthSignatureRejected() (gas: 12156 → 12156 | 0 0.000%)
━ Ed25519VerifierTest::test_WrongMessageRejected() (gas: 507932 → 507932 | 0 0.000%)
━ Ed25519VerifierTest::test_WrongPubKeyRejected() (gas: 509119 → 509119 | 0 0.000%)
━ Ed25519VerifierTest::test_WrongRRejected() (gas: 503763 → 503763 | 0 0.000%)
━ Ed25519VerifierTest::test_WrongSRejected() (gas: 508960 → 508960 | 0 0.000%)
━ FeeRouterTest::test_pause_revertsWithoutRole() (gas: 14609 → 14609 | 0 0.000%)
━ FeeRouterTest::test_routeSettlement_distributesThreeLegs() (gas: 232441 → 232441 | 0 0.000%)
━ FeeRouterTest::test_setShares_rejectsSumNot10000() (gas: 14523 → 14523 | 0 0.000%)
━ FeeRouterTest::test_setShares_revertsWithoutRole() (gas: 15219 → 15219 | 0 0.000%)
━ FeeRouterTest::test_setWindowEpochs_revertsWithoutRole() (gas: 14688 → 14688 | 0 0.000%)
━ GovernanceLifecycleTest::test_canary_executorIsTimelock() (gas: 9969 → 9969 | 0 0.000%)
━ InterfaceFreezeTest::test_originAssignment_abiFrozen() (gas: 1298 → 1298 | 0 0.000%)
━ InterfaceFreezeTest::test_paymentChannel_abiFrozen() (gas: 1540 → 1540 | 0 0.000%)
━ InterfaceFreezeTest::test_slashJudge_abiFrozen() (gas: 870 → 870 | 0 0.000%)
━ OriginAssignmentTest::test_activate_revertsBeforeTimelock() (gas: 140524 → 140524 | 0 0.000%)
━ OriginAssignmentTest::test_cancel_clearsPending() (gas: 110536 → 110536 | 0 0.000%)
━ OriginAssignmentTest::test_defaultOpen_addAndRemove() (gas: 78409 → 78409 | 0 0.000%)
━ OriginAssignmentTest::test_defaultOpen_revertsInactive() (gas: 27910 → 27910 | 0 0.000%)
━ OriginAssignmentTest::test_propose_revertsEmpty() (gas: 21925 → 21925 | 0 0.000%)
━ OriginAssignmentTest::test_propose_revertsNonOwner() (gas: 27271 → 27271 | 0 0.000%)
━ OriginAssignmentTest::test_propose_revertsTooMany() (gas: 39410 → 39410 | 0 0.000%)
━ OriginAssignmentTest::test_propose_storesPending() (gas: 133692 → 133692 | 0 0.000%)
━ OriginAssignmentTest::test_revoke_revertsNonMember() (gas: 23619 → 23619 | 0 0.000%)
━ OriginAssignmentTest::test_setMaxOrigins_enforcesBounds() (gas: 13857 → 13857 | 0 0.000%)
━ PaymentChannelTest::test_openChannel_revertsBelowMinDeposit() (gas: 23033 → 23033 | 0 0.000%)
━ PaymentChannelTest::test_openChannel_revertsOnInactiveProvider() (gas: 29784 → 29784 | 0 0.000%)
━ PaymentChannelTest::test_openChannel_revertsWhenPaused() (gas: 47399 → 47399 | 0 0.000%)
━ PaymentChannelTest::test_setDisputeWindow_enforcesBounds() (gas: 24815 → 24815 | 0 0.000%)
━ PaymentChannelTest::test_setFeeRouter_revertsOnEoaRouter() (gas: 18660 → 18660 | 0 0.000%)
━ PaymentChannelTest::test_setFeeRouter_revertsOnZeroAndUnchanged() (gas: 24635 → 24635 | 0 0.000%)
━ PublisherRegistryTest::test_claimContent_multiClaimAcrossNamespaces() (gas: 233820 → 233820 | 0 0.000%)
━ PublisherRegistryTest::test_claimContent_recordsClaim() (gas: 134733 → 134733 | 0 0.000%)
━ PublisherRegistryTest::test_claimContent_revertsForDefaultOpenNamespace() (gas: 13756 → 13756 | 0 0.000%)
━ PublisherRegistryTest::test_claimContent_revertsIfNotOwner() (gas: 66829 → 66829 | 0 0.000%)
━ PublisherRegistryTest::test_claimContent_revertsOnDuplicateSameNamespace() (gas: 135319 → 135319 | 0 0.000%)
━ PublisherRegistryTest::test_constructor_revertsZeroAdmin() (gas: 36674 → 36674 | 0 0.000%)
━ PublisherRegistryTest::test_constructor_setsDefaultsAndRoles() (gas: 19037 → 19037 | 0 0.000%)
━ PublisherRegistryTest::test_createNamespace_assignsIdsFromOne() (gas: 92728 → 92728 | 0 0.000%)
━ PublisherRegistryTest::test_createNamespace_revertsAtCap() (gas: 98581 → 98581 | 0 0.000%)
━ PublisherRegistryTest::test_createNamespace_zeroIsNeverAssigned() (gas: 65471 → 65471 | 0 0.000%)
━ PublisherRegistryTest::test_namespaceOf_emptyForUnclaimed() (gas: 8273 → 8273 | 0 0.000%)
━ PublisherRegistryTest::test_setMaxNamespaces_revertsOutOfBounds() (gas: 17605 → 17605 | 0 0.000%)
━ PublisherRegistryTest::test_setMaxNamespaces_revertsWithoutRole() (gas: 13384 → 13384 | 0 0.000%)
━ PublisherRegistryTest::test_setMaxNamespaces_withinBounds() (gas: 20687 → 20687 | 0 0.000%)
━ PublisherRegistryTest::test_setTransferTimelock_revertsOutOfBounds() (gas: 17706 → 17706 | 0 0.000%)
━ PublisherRegistryTest::test_setTransferTimelock_revertsWithoutRole() (gas: 14763 → 14763 | 0 0.000%)
━ PublisherRegistryTest::test_setTransferTimelock_withinBounds() (gas: 20560 → 20560 | 0 0.000%)
━ PublisherRegistryTest::test_transfer_cancelByOwner() (gas: 78668 → 78668 | 0 0.000%)
━ PublisherRegistryTest::test_transfer_cancelRevertsIfNotOwner() (gas: 93302 → 93302 | 0 0.000%)
━ PublisherRegistryTest::test_transfer_finalizeRevertsIfNotPendingOwner() (gas: 93817 → 93817 | 0 0.000%)
━ PublisherRegistryTest::test_transfer_finalizeRevertsNoPending() (gas: 68544 → 68544 | 0 0.000%)
━ PublisherRegistryTest::test_transfer_fullFlow() (gas: 98658 → 98658 | 0 0.000%)
━ PublisherRegistryTest::test_transfer_initiateRevertsIfNotOwner() (gas: 66923 → 66923 | 0 0.000%)
━ PublisherRegistryTest::test_transfer_initiateRevertsZeroNewOwner() (gas: 64330 → 64330 | 0 0.000%)
━ PublisherRegistryTest::test_transfer_revertsWhenRecipientAtCap() (gas: 150145 → 150145 | 0 0.000%)
━ PublisherRegistryTest::test_transfer_selfTransferExemptFromCap() (gas: 95404 → 95404 | 0 0.000%)
━ SlashJudgeTest::test_blacklist_revertsOnHashMismatch() (gas: 68210 → 68210 | 0 0.000%)
━ SlashJudgeTest::test_blacklist_revertsWhenBlacklistedAfterResponse() (gas: 72559 → 72559 | 0 0.000%)
━ SlashJudgeTest::test_blacklist_revertsWhenNotBlacklisted() (gas: 48632 → 48632 | 0 0.000%)
━ SlashJudgeTest::test_blacklist_revertsWhenSuspended() (gas: 72096 → 72096 | 0 0.000%)
━ SlashJudgeTest::test_blacklist_slashesOnProbeResponse() (gas: 189538 → 189538 | 0 0.000%)
━ SlashJudgeTest::test_blacklist_slashesOnStreamResponse() (gas: 190270 → 190270 | 0 0.000%)
━ SlashJudgeTest::test_constructor_revertsWhenEvidenceAgeExceedsUnbonding() (gas: 366864 → 366864 | 0 0.000%)
━ SlashJudgeTest::test_pause_blocksChallenges() (gas: 58348 → 58348 | 0 0.000%)
━ SlashJudgeTest::test_phantom_revertsOnBadProbeSignature() (gas: 46691 → 46691 | 0 0.000%)
━ SlashJudgeTest::test_phantom_revertsOnEvidenceReplay() (gas: 199102 → 199102 | 0 0.000%)
━ SlashJudgeTest::test_phantom_revertsOnFutureEvidence() (gas: 47528 → 47528 | 0 0.000%)
━ SlashJudgeTest::test_phantom_revertsOnNodeIdMismatch() (gas: 37805 → 37805 | 0 0.000%)
━ SlashJudgeTest::test_phantom_revertsOnStaleEvidence() (gas: 49909 → 49909 | 0 0.000%)
━ SlashJudgeTest::test_phantom_revertsOnUnregisteredNode() (gas: 39027 → 39027 | 0 0.000%)
━ SlashJudgeTest::test_phantom_revertsOutsideTimestampWindow() (gas: 49624 → 49624 | 0 0.000%)
━ SlashJudgeTest::test_phantom_revertsWhenStreamOk() (gas: 53546 → 53546 | 0 0.000%)
━ SlashJudgeTest::test_phantom_slashesAndRoundTripsBond() (gas: 179547 → 179547 | 0 0.000%)
━ SlashJudgeTest::test_rate_revertsWhenNotHigher() (gas: 53581 → 53581 | 0 0.000%)
━ SlashJudgeTest::test_rate_slashesWhenStreamRateHigher() (gas: 172123 → 172123 | 0 0.000%)
━ SlashJudgeTest::test_setChallengeBond_enforcesBounds() (gas: 24689 → 24689 | 0 0.000%)
━ SlashJudgeTest::test_setMaxEvidenceAge_enforcesBoundsAndInvariant() (gas: 40199 → 40199 | 0 0.000%)
━ SlashJudgeTest::test_setters_onlyGovernance() (gas: 13759 → 13759 | 0 0.000%)
━ TestnetFaucetTest::testFuzz_claim_atOrAboveCooldown(uint256) (gas: 91528 → 91528 | 0 0.000%)
━ TestnetFaucetTest::testFuzz_claim_belowCooldown(uint256) (gas: 85389 → 85389 | 0 0.000%)
━ TestnetFaucetTest::test_admin_canGrantAndRevokeRoles() (gas: 56401 → 56401 | 0 0.000%)
━ TestnetFaucetTest::test_claim_blocksReentrancy() (gas: 1550228 → 1550228 | 0 0.000%)
━ TestnetFaucetTest::test_claim_happyPath() (gas: 82821 → 82821 | 0 0.000%)
━ TestnetFaucetTest::test_claim_perCallerCooldownIndependence() (gas: 133478 → 133478 | 0 0.000%)
━ TestnetFaucetTest::test_claim_revertsBeforeCooldown() (gas: 83092 → 83092 | 0 0.000%)
━ TestnetFaucetTest::test_claim_revertsOnInsufficientBalance() (gas: 50715 → 50715 | 0 0.000%)
━ TestnetFaucetTest::test_claim_revertsOneSecondBeforeCooldownBoundary() (gas: 82996 → 82996 | 0 0.000%)
━ TestnetFaucetTest::test_claim_revertsWhenPaused() (gas: 39998 → 39998 | 0 0.000%)
━ TestnetFaucetTest::test_claim_succeedsAfterCooldown() (gas: 90430 → 90430 | 0 0.000%)
━ TestnetFaucetTest::test_claim_succeedsAtExactCooldownBoundary() (gas: 87103 → 87103 | 0 0.000%)
━ TestnetFaucetTest::test_constructor_allowsZeroCooldown() (gas: 1810378 → 1810378 | 0 0.000%)
━ TestnetFaucetTest::test_constructor_revertsOnCooldownExceedingMax() (gas: 1015061 → 1015061 | 0 0.000%)
━ TestnetFaucetTest::test_constructor_revertsOnMainnetChainId() (gas: 988198 → 988198 | 0 0.000%)
━ TestnetFaucetTest::test_constructor_revertsOnZeroAdmin() (gas: 985898 → 985898 | 0 0.000%)
━ TestnetFaucetTest::test_constructor_revertsOnZeroClaimAmount() (gas: 988045 → 988045 | 0 0.000%)
━ TestnetFaucetTest::test_constructor_revertsOnZeroFunding() (gas: 988061 → 988061 | 0 0.000%)
━ TestnetFaucetTest::test_constructor_revertsOnZeroGovernance() (gas: 985864 → 985864 | 0 0.000%)
━ TestnetFaucetTest::test_constructor_revertsOnZeroPauser() (gas: 985954 → 985954 | 0 0.000%)
━ TestnetFaucetTest::test_constructor_revertsOnZeroTokenAddress() (gas: 70468 → 70468 | 0 0.000%)
━ TestnetFaucetTest::test_constructor_revertsOnZeroTreasury() (gas: 987830 → 987830 | 0 0.000%)
━ TestnetFaucetTest::test_constructor_revertsWhenTreasuryNotApproved() (gas: 1110690 → 1110690 | 0 0.000%)
━ TestnetFaucetTest::test_constructor_setsStateAndRoles() (gas: 43070 → 43070 | 0 0.000%)
━ TestnetFaucetTest::test_nonAdmin_cannotGrantRoles() (gas: 17889 → 17889 | 0 0.000%)
━ TestnetFaucetTest::test_pause_blocksClaimUnpauseRestores() (gas: 91691 → 91691 | 0 0.000%)
━ TestnetFaucetTest::test_pause_revertsOnNonPauser() (gas: 14607 → 14607 | 0 0.000%)
━ TestnetFaucetTest::test_setClaimAmount_revertsOnNonGovernance() (gas: 14702 → 14702 | 0 0.000%)
━ TestnetFaucetTest::test_setClaimAmount_revertsOnZero() (gas: 13338 → 13338 | 0 0.000%)
━ TestnetFaucetTest::test_setClaimAmount_updatesAndEmits() (gas: 22083 → 22083 | 0 0.000%)
━ TestnetFaucetTest::test_setCooldown_acceptsMaxCooldown() (gas: 20228 → 20228 | 0 0.000%)
━ TestnetFaucetTest::test_setCooldown_allowsZero() (gas: 94920 → 94920 | 0 0.000%)
━ TestnetFaucetTest::test_setCooldown_revertsOnExceedingMax() (gas: 13790 → 13790 | 0 0.000%)
━ TestnetFaucetTest::test_setCooldown_revertsOnNonGovernance() (gas: 14705 → 14705 | 0 0.000%)
━ TestnetFaucetTest::test_setCooldown_updatesAndEmits() (gas: 22231 → 22231 | 0 0.000%)
━ TestnetFaucetTest::test_timeUntilNext_tracksCooldownWindow() (gas: 82615 → 82615 | 0 0.000%)
━ TestnetFaucetTest::test_timeUntilNext_zeroBeforeFirstClaim() (gas: 10099 → 10099 | 0 0.000%)
━ TestnetFaucetTest::test_unpause_revertsOnNonPauser() (gas: 43483 → 43483 | 0 0.000%)
━ TestnetFaucetTest::test_withdraw_revertsOnInsufficientBalance() (gas: 26877 → 26877 | 0 0.000%)
━ TestnetFaucetTest::test_withdraw_revertsOnNonGovernance() (gas: 17089 → 17089 | 0 0.000%)
━ TestnetFaucetTest::test_withdraw_revertsOnZeroAmount() (gas: 20838 → 20838 | 0 0.000%)
━ TestnetFaucetTest::test_withdraw_revertsOnZeroTo() (gas: 18662 → 18662 | 0 0.000%)
━ TestnetFaucetTest::test_withdraw_transfersAndEmits() (gas: 44129 → 44129 | 0 0.000%)
━ TestnetFaucetTest::test_withdraw_worksWhilePaused() (gas: 68286 → 68286 | 0 0.000%)
━ TokenTest::testFuzz_burn_reducesSupplyByExactAmount(uint256) (gas: 27700 → 27700 | 0 0.000%)
━ TokenTest::test_burnFrom_consumesAllowance() (gas: 38534 → 38534 | 0 0.000%)
━ TokenTest::test_burn_reducesTotalSupplyAndBalance() (gas: 26044 → 26044 | 0 0.000%)
━ TokenTest::test_constructor_metadata() (gas: 17896 → 17896 | 0 0.000%)
━ TokenTest::test_constructor_mintsFullSupplyToHolder() (gas: 12954 → 12954 | 0 0.000%)
━ TokenTest::test_constructor_revertsOnZeroInitialHolder() (gas: 83264 → 83264 | 0 0.000%)
━ TokenTest::test_constructor_totalSupplyConstantMatches() (gas: 9364 → 9364 | 0 0.000%)
━ TokenTest::test_noMintFunctionExposed() (gas: 10765 → 10765 | 0 0.000%)
━ TokenTest::test_noVotesSurfaceExposed() (gas: 11991 → 11991 | 0 0.000%)
━ TokenTest::test_permit_setsAllowance() (gas: 67380 → 67380 | 0 0.000%)
↑ CapacityBondTest::test_appealGrant_unlocksClaimBeforeGateExpiry() (gas: 433691 → 433692 | 1 0.000%)
↑ CapacityBondTest::test_pendingCreditSlash_reducesOriginalGrant() (gas: 433125 → 433126 | 1 0.000%)
↑ CapacityBondTest::test_forfeitUnvestedCredit_onUnbond() (gas: 300422 → 300423 | 1 0.000%)
↑ SlashAppealTest::test_grant_newerAppeal_fallsBackToOlderStandingSlash() (gas: 603685 → 603691 | 6 0.001%)
↑ CapacityBondTest::test_declaredMbps_storesValue() (gas: 147168 → 147170 | 2 0.001%)
↓ CapacityBondTest::test_registerNode_revertsOnInvalidEd25519Sig() (gas: 179153 → 179149 | -4 -0.002%)
↑ SlashAppealTest::test_open_revertsOnDoubleAppeal() (gas: 486736 → 486748 | 12 0.002%)
↓ SlashAppealTest::test_reject_burnsBondAndDistributesEscrow() (gas: 478618 → 478602 | -16 -0.003%)
↑ CapacityBondTest::test_slash_creditSlash_escalatesAcrossTiers() (gas: 666599 → 666622 | 23 0.003%)
↓ CapacityBondTest::test_slashHitsVestedAndUnvestedTogether() (gas: 476164 → 476143 | -21 -0.004%)
↓ CapacityBondTest::test_slashHitsVestedButUnclaimed() (gas: 443613 → 443592 | -21 -0.005%)
↑ CapacityBondTest::test_creditSlash_escrowsThenDistributes5050AtFinality() (gas: 458249 → 458272 | 23 0.005%)
↑ SlashAppealTest::test_grant_revertsIfNotFastTracked() (gas: 486955 → 486982 | 27 0.006%)
↓ CapacityBondTest::test_claimVestedCredit_multiSlash_gatedByOlderStandingSlash() (gas: 584065 → 584023 | -42 -0.007%)
↓ CapacityBondTest::test_slash_tier3_mixedBond_exhaustsActiveTapsUnbonding() (gas: 599418 → 599374 | -44 -0.007%)
↓ SlashAppealTest::test_pause_extendsFilingWindow() (gas: 408682 → 408650 | -32 -0.008%)
↑ CapacityBondTest::test_slash_tierEscalation_15then50pct() (gas: 547217 → 547261 | 44 0.008%)
↑ SlashAppealTest::test_grant_restoresCreditVestingNotLiquid() (gas: 576516 → 576566 | 50 0.009%)
↑ SlashAppealTest::test_open_revertsAfterFilingWindow() (gas: 481797 → 481847 | 50 0.010%)
↓ SlashAppealTest::test_uphold_distributesEscrowAndSplitsBond() (gas: 515059 → 515000 | -59 -0.011%)
↑ SlashAppealTest::test_frequencyCap_blocksSecondAppealWithinWindow() (gas: 608265 → 608342 | 77 0.013%)
↑ OriginAssignmentTest::test_defaultOpen_setAllowlist() (gas: 172086 → 172108 | 22 0.013%)
↑ CapacityBondTest::test_slash_stampsSlashedAtEpoch() (gas: 314664 → 314708 | 44 0.014%)
↑ SlashAppealTest::test_grant_requiresGovernance() (gas: 495247 → 495318 | 71 0.014%)
↑ SlashAppealTest::test_open_locksEscrowAndPullsBond() (gas: 490954 → 491027 | 73 0.015%)
↓ CapacityBondTest::test_genesisCredit_grantWithinWindow() (gas: 139196 → 139175 | -21 -0.015%)
↑ CapacityBondTest::test_registerNode_succeedsAtCurve() (gas: 415424 → 415487 | 63 0.015%)
↑ SlashAppealTest::test_grant_refundsOperatorAndBondAndClearsZeroOut() (gas: 463212 → 463283 | 71 0.015%)
↑ SlashAppealTest::test_grant_olderAppeal_preservesNewerSlashZeroOut() (gas: 603017 → 603110 | 93 0.015%)
↓ FeeRouterTest::test_routeSettlement_dustRoutesToOperatorWhenBuybackUnset() (gas: 141838 → 141816 | -22 -0.016%)
↑ OriginAssignmentTest::test_activate_onlyGovernance() (gas: 140563 → 140585 | 22 0.016%)
↑ SlashAppealTest::test_open_revertsForNonOperator() (gas: 495568 → 495646 | 78 0.016%)
↑ CapacityBondTest::test_slash_doesNotEnforceCurve() (gas: 362496 → 362563 | 67 0.018%)
↑ CapacityBondTest::test_finalizeUnappealedSlash_distributes5050() (gas: 356654 → 356720 | 66 0.019%)
↑ CapacityBondTest::test_settleAppealGranted_reverseMiddleSlash_keepsNewest() (gas: 578068 → 578178 | 110 0.019%)
↓ CapacityBondTest::test_claimVestedCredit_revertsWhenSlashedInWindow() (gas: 439019 → 438931 | -88 -0.020%)
↑ CapacityBondTest::test_markAppealOpen_blocksFinalize() (gas: 327281 → 327347 | 66 0.020%)
↑ CapacityBondTest::test_slash_escrowsWithoutDistribution() (gas: 326147 → 326213 | 66 0.020%)
↑ FeeRouterTest::test_routeSettlement_incrementsBytesPerEpoch() (gas: 221457 → 221502 | 45 0.020%)
↓ CapacityBondTest::test_slashId_persistsRecord() (gas: 314968 → 314901 | -67 -0.021%)
↓ FeeRouterTest::test_routeSettlement_revertsWithoutRouterRole() (gas: 89208 → 89186 | -22 -0.025%)
↑ FeeRouterTest::test_bytesInWindow_sumsTrailingWindow() (gas: 497291 → 497431 | 140 0.028%)
↑ SlashAppealTest::test_fastTrack_requiresMultisig() (gas: 484575 → 484713 | 138 0.028%)
↓ CapacityBondTest::test_claimVestedCredit_succeedsAfterSlashGateExpires() (gas: 442051 → 441920 | -131 -0.030%)
↓ CapacityBondTest::test_claimVestedCredit_multiClaimFollowsLinearCurve() (gas: 219111 → 219046 | -65 -0.030%)
↓ FeeRouterTest::test_unpause_revertsWithoutRole() (gas: 72166 → 72144 | -22 -0.030%)
↑ CapacityBondTest::test_settleAppealUpheld_distributes5050() (gas: 348716 → 348826 | 110 0.032%)
↑ CapacityBondTest::test_requestUnbond_succeedsDownToExactlyCurve() (gas: 208809 → 208876 | 67 0.032%)
↑ CapacityBondTest::test_settleAppealGranted_multiSlash_recomputesThenClears() (gas: 429016 → 429170 | 154 0.036%)
↓ CapacityBondTest::test_registerNode_revertsWhenAlreadyActive() (gas: 387843 → 387703 | -140 -0.036%)
↓ CapacityBondTest::test_forfeitUnvestedCredit_doesNotClawBackVestedUnclaimed() (gas: 291756 → 291647 | -109 -0.037%)
↓ CapacityBondTest::test_claimVestedCredit_movesIntoActiveBond() (gas: 214548 → 214461 | -87 -0.041%)
↑ CapacityBondTest::test_registerNode_revertsWhenBondBelowCurve() (gas: 207450 → 207535 | 85 0.041%)
↓ CapacityBondTest::test_forfeitUnvestedCredit_burnsWhenNoTreasury() (gas: 256105 → 255996 | -109 -0.043%)
↑ CapacityBondTest::test_settleAppealGranted_clearsAndRefunds() (gas: 303422 → 303554 | 132 0.044%)
↓ CapacityBondTest::test_claimVestedCredit_revertsWhenNoActiveBond() (gas: 144549 → 144484 | -65 -0.045%)
↑ BuybackBurnerTest::test_constructor_grantsAdminAndGovernanceRoles() (gas: 14866 → 14873 | 7 0.047%)
↑ DeployProtocolTest::test_roleMatrix_pauserIsEmergencyMultisig() (gas: 45635 → 45657 | 22 0.048%)
↓ CapacityBondTest::test_genesisCredit_revertsAfterWindow() (gas: 82827 → 82784 | -43 -0.052%)
↑ DeployProtocolTest::test_roleMatrix_timelockHoldsGovernanceOnEveryTarget() (gas: 41952 → 41974 | 22 0.052%)
↑ DeployProtocolTest::test_roleMatrix_timelockHoldsDefaultAdminOnEveryTarget() (gas: 41824 → 41846 | 22 0.053%)
↑ OriginAssignmentTest::test_propose_revertsInactiveOperator() (gas: 39819 → 39841 | 22 0.055%)
↑ CapacityBondTest::test_requestUnbond_revertsWhenItDropsBelowCurve() (gas: 160305 → 160394 | 89 0.056%)
↑ CapacityBondTest::test_firstBondedAt_immutableAcrossReBonds() (gas: 111447 → 111513 | 66 0.059%)
↓ BuybackBurnerTest::test_setPool_emitsUpdateEvent() (gas: 24953 → 24938 | -15 -0.060%)
↑ OriginAssignmentTest::test_propose_revertsDuplicate() (gas: 34896 → 34918 | 22 0.063%)
↑ CapacityBondTest::test_firstBondedAt_setsOnFirstBond() (gas: 102513 → 102579 | 66 0.064%)
↑ CapacityBondTest::test_setAlpha_updatesCurveAndEmits() (gas: 33844 → 33866 | 22 0.065%)
↑ DeployProtocolTest::test_roleMatrix_deployerHoldsNoRoleAnywhere() (gas: 66902 → 66946 | 44 0.066%)
↓ FeeRouterTest::test_setWindowEpochs_enforcesBounds() (gas: 32780 → 32758 | -22 -0.067%)
↑ CapacityBondTest::test_declareMbps_revertsWhenBondBelowCurve() (gas: 131783 → 131872 | 89 0.068%)
↑ OriginAssignmentTest::test_activate_revertsOperatorBlacklisted() (gas: 173723 → 173841 | 118 0.068%)
↓ OriginAssignmentTest::test_propose_overwriteReplacesPending() (gas: 128820 → 128731 | -89 -0.069%)
↓ CapacityBondTest::test_unpause_revertsWithoutRole() (gas: 94612 → 94546 | -66 -0.070%)
↑ CapacityBondTest::test_declareMbps_succeedsExactlyAtCurve() (gas: 147146 → 147258 | 112 0.076%)
↑ CapacityBondTest::test_declareMbps_acceptsFloorAndCeiling() (gas: 161019 → 161154 | 135 0.084%)
↓ SlashAppealTest::test_open_revertsUnknownSlash() (gas: 23776 → 23755 | -21 -0.088%)
↑ GovernanceLifecycleTest::test_canary_governanceRoleHandoff() (gas: 99056 → 99144 | 88 0.089%)
↑ OriginAssignmentTest::test_setAssignmentTimelock_enforcesBounds() (gas: 24737 → 24759 | 22 0.089%)
↑ CapacityBondTest::test_setMinCapacity_acceptsInclusiveBounds() (gas: 24688 → 24710 | 22 0.089%)
↑ BuybackBurnerTest::test_executeBuyback_revertsWhenPaused() (gas: 73094 → 73161 | 67 0.092%)
↓ CapacityBondTest::test_genesisCredit_vestsLinearly() (gas: 141606 → 141475 | -131 -0.093%)
↑ CapacityBondTest::test_setMinCapacity_updatesBandAndEmits() (gas: 166870 → 167027 | 157 0.094%)
↓ BuybackBurnerTest::test_executeBuyback_revertsWithoutKeeperRole() (gas: 64298 → 64237 | -61 -0.095%)
↑ GovernanceLifecycleTest::test_lifecycle_SlashAppeal_setAppealBond_outOfBounds() (gas: 596948 → 597519 | 571 0.096%)
↑ GovernanceLifecycleTest::test_lifecycle_SlashAppeal_setAppealBond_happy() (gas: 591081 → 591652 | 571 0.097%)
↑ GovernanceLifecycleTest::test_lifecycle_DecdnGovernor_setVoteCapBps_outOfBounds() (gas: 636214 → 636830 | 616 0.097%)
↑ GovernanceLifecycleTest::test_lifecycle_DecdnGovernor_setAgeRampMonths_outOfBounds() (gas: 636172 → 636788 | 616 0.097%)
↑ GovernanceLifecycleTest::test_lifecycle_DecdnGovernor_setVoteCapBps_happy() (gas: 630461 → 631077 | 616 0.098%)
↑ GovernanceLifecycleTest::test_lifecycle_DecdnGovernor_setAgeRampMonths_happy() (gas: 630454 → 631070 | 616 0.098%)
↑ GovernanceLifecycleTest::test_lifecycle_FeeRouter_setSharesAndDestinations_happy() (gas: 621947 → 622563 | 616 0.099%)
↑ CapacityBondTest::test_declareMbps_emitsOldAndNewValue() (gas: 158167 → 158324 | 157 0.099%)
↑ GovernanceLifecycleTest::test_lifecycle_FeeRouter_setWindowEpochs_happy() (gas: 610783 → 611399 | 616 0.101%)
↑ GovernanceLifecycleTest::test_lifecycle_ContentBlacklist_registerRegionalBody_happy() (gas: 610550 → 611166 | 616 0.101%)
↑ GovernanceLifecycleTest::test_lifecycle_ContentBlacklist_setOriginBlacklist_happy() (gas: 609684 → 610300 | 616 0.101%)
↑ GovernanceLifecycleTest::test_lifecycle_FeeRouter_setShares_happy() (gas: 608092 → 608708 | 616 0.101%)
↑ GovernanceLifecycleTest::test_lifecycle_CapacityBond_setMultiaddrUpdateCooldown_happy() (gas: 605793 → 606409 | 616 0.102%)
↑ GovernanceLifecycleTest::test_lifecycle_ContentBlacklist_removeHashGlobal_outOfBounds() (gas: 599178 → 599794 | 616 0.103%)
↑ GovernanceLifecycleTest::test_lifecycle_FeeRouter_setSharesAndDestinations_outOfBounds() (gas: 597638 → 598254 | 616 0.103%)
↑ GovernanceLifecycleTest::test_lifecycle_ContentBlacklist_setOriginBlacklist_outOfBounds() (gas: 597472 → 598088 | 616 0.103%)
↑ GovernanceLifecycleTest::test_lifecycle_PublisherRegistry_setNamespaceTransferTimelock_outOfBounds() (gas: 596988 → 597604 | 616 0.103%)
↑ GovernanceLifecycleTest::test_lifecycle_ContentBlacklist_setAppealBond_outOfBounds() (gas: 596951 → 597567 | 616 0.103%)
↑ GovernanceLifecycleTest::test_lifecycle_PublisherRegistry_setMaxNamespacesPerPublisher_outOfBounds() (gas: 596946 → 597562 | 616 0.103%)
↑ GovernanceLifecycleTest::test_lifecycle_FeeRouter_setWindowEpochs_outOfBounds() (gas: 596811 → 597427 | 616 0.103%)
↑ GovernanceLifecycleTest::test_lifecycle_SlashAppeal_setChallengerIncentivePool_outOfBounds() (gas: 596777 → 597393 | 616 0.103%)
↑ GovernanceLifecycleTest::test_lifecycle_ContentBlacklist_addHashGlobal_outOfBounds() (gas: 596630 → 597246 | 616 0.103%)
↑ GovernanceLifecycleTest::test_lifecycle_FeeRouter_setBuybackBurner_outOfBounds() (gas: 596542 → 597158 | 616 0.103%)
↑ GovernanceLifecycleTest::test_lifecycle_FeeRouter_setShares_outOfBounds() (gas: 596435 → 597051 | 616 0.103%)
↑ GovernanceLifecycleTest::test_lifecycle_CapacityBond_setMaxMultiaddrSize_outOfBounds() (gas: 594605 → 595221 | 616 0.104%)
↑ GovernanceLifecycleTest::test_lifecycle_CapacityBond_setClaimSlashGateEpochs_outOfBounds() (gas: 594581 → 595197 | 616 0.104%)
↑ GovernanceLifecycleTest::test_lifecycle_CapacityBond_setUnbondingPeriod_outOfBounds() (gas: 594542 → 595158 | 616 0.104%)
↑ GovernanceLifecycleTest::test_lifecycle_CapacityBond_setMultiaddrUpdateCooldown_outOfBounds() (gas: 594466 → 595082 | 616 0.104%)
↑ GovernanceLifecycleTest::test_lifecycle_FeeRouter_setTreasury_outOfBounds() (gas: 594287 → 594903 | 616 0.104%)
↑ OriginAssignmentTest::test_defaultOpen_onlyGovernance() (gas: 21147 → 21169 | 22 0.104%)
↑ GovernanceLifecycleTest::test_lifecycle_SlashAppeal_setChallengerIncentivePool_happy() (gas: 591497 → 592113 | 616 0.104%)
↑ GovernanceLifecycleTest::test_lifecycle_PublisherRegistry_setMaxNamespacesPerPublisher_happy() (gas: 591346 → 591962 | 616 0.104%)
↑ GovernanceLifecycleTest::test_lifecycle_PublisherRegistry_setNamespaceTransferTimelock_happy() (gas: 591262 → 591878 | 616 0.104%)
↑ GovernanceLifecycleTest::test_lifecycle_ContentBlacklist_setAppealBond_happy() (gas: 591119 → 591735 | 616 0.104%)
↑ GovernanceLifecycleTest::test_lifecycle_FeeRouter_setTreasury_happy() (gas: 589039 → 589655 | 616 0.105%)
↑ GovernanceLifecycleTest::test_lifecycle_FeeRouter_setBuybackBurner_happy() (gas: 589013 → 589629 | 616 0.105%)
↑ GovernanceLifecycleTest::test_lifecycle_CapacityBond_setClaimSlashGateEpochs_happy() (gas: 588888 → 589504 | 616 0.105%)
↑ GovernanceLifecycleTest::test_lifecycle_CapacityBond_setMinBond_happy() (gas: 588764 → 589380 | 616 0.105%)
↑ GovernanceLifecycleTest::test_lifecycle_CapacityBond_setMinCapacityMbps_happy() (gas: 588739 → 589355 | 616 0.105%)
↑ GovernanceLifecycleTest::test_lifecycle_CapacityBond_setMaxMultiaddrSize_happy() (gas: 588630 → 589246 | 616 0.105%)
↑ OriginAssignmentTest::test_activate_revertsNoPending() (gas: 20987 → 21009 | 22 0.105%)
↑ GovernanceLifecycleTest::test_lifecycle_CapacityBond_setMinBond_outOfBounds() (gas: 594537 → 595175 | 638 0.107%)
↑ GovernanceLifecycleTest::test_lifecycle_CapacityBond_setRegionStabilityWindow_outOfBounds() (gas: 594516 → 595154 | 638 0.107%)
↑ GovernanceLifecycleTest::test_lifecycle_CapacityBond_setMinCapacityMbps_outOfBounds() (gas: 594514 → 595152 | 638 0.107%)
↑ GovernanceLifecycleTest::test_lifecycle_CapacityBond_setMaxCapacityMbps_outOfBounds() (gas: 594492 → 595130 | 638 0.107%)
↑ GovernanceLifecycleTest::test_lifecycle_CapacityBond_setUnbondingPeriod_happy() (gas: 588658 → 589296 | 638 0.108%)
↑ GovernanceLifecycleTest::test_lifecycle_CapacityBond_setMaxCapacityMbps_happy() (gas: 588588 → 589226 | 638 0.108%)
↑ GovernanceLifecycleTest::test_lifecycle_CapacityBond_setTreasury_happy() (gas: 606105 → 606765 | 660 0.109%)
↓ CapacityBondTest::test_genesisCredit_fullVestAfterDuration() (gas: 141326 → 141172 | -154 -0.109%)
↑ GovernanceLifecycleTest::test_lifecycle_CapacityBond_setRegionStabilityWindow_happy() (gas: 588634 → 589294 | 660 0.112%)
↓ FeeRouterTest::test_setSharesAndDestinations_revertsWithoutRole() (gas: 19569 → 19547 | -22 -0.112%)
↑ OriginAssignmentTest::test_activate_blacklistSkippedWhenUnset() (gas: 2045181 → 2047543 | 2362 0.115%)
↑ BuybackBurnerTest::test_setVault_emitsUpdateEvent() (gas: 24896 → 24925 | 29 0.116%)
↑ OriginAssignmentTest::test_prune_revertsWhenBlacklistUnset() (gas: 1862769 → 1865198 | 2429 0.130%)
↑ ContentBlacklistTest::test_fullAppealFlow_ratifyRemovesHash() (gas: 275665 → 276038 | 373 0.135%)
↓ FeeRouterTest::test_setShares_rejectsNonZeroShareWithoutDestination() (gas: 16239 → 16217 | -22 -0.135%)
↑ ContentBlacklistTest::test_hasActiveAppeal_clearedOnReverse() (gas: 254985 → 255340 | 355 0.139%)
↑ CapacityBondTest::test_updateMultiaddrs_revertsWhenNodeNotActive() (gas: 15613 → 15635 | 22 0.141%)
↑ ContentBlacklistTest::test_reverseAppeal_clearsSuspendedAndBurnsBond() (gas: 261664 → 262037 | 373 0.143%)
↑ BuybackBurnerTest::test_pause_revertsWithoutPauserRole() (gas: 11912 → 11929 | 17 0.143%)
↑ CapacityBondTest::test_setMaxMultiaddrSize_revertsWithoutRole() (gas: 14977 → 14999 | 22 0.147%)
↑ CapacityBondTest::test_setK_revertsWhenGbpsTierOutOfRange() (gas: 43902 → 43967 | 65 0.148%)
↑ CapacityBondTest::test_setMultiaddrUpdateCooldown_revertsWithoutRole() (gas: 14822 → 14844 | 22 0.148%)
↓ FeeRouterTest::test_setBuybackBurner_revertsWithoutRole() (gas: 14720 → 14698 | -22 -0.149%)
↑ CapacityBondTest::test_capacityBand_floorAlwaysBelowCeiling() (gas: 29297 → 29341 | 44 0.150%)
↑ GovernanceLifecycleTest::test_canary_governorVoteWeightWired() (gas: 129769 → 129967 | 198 0.153%)
↑ PaymentChannelTest::test_setters_onlyGovernance() (gas: 13976 → 13998 | 22 0.157%)
↑ OriginAssignmentTest::test_setContentBlacklist_rejectsZero() (gas: 13451 → 13473 | 22 0.164%)
↑ CapacityBondTest::test_bondRequired_zeroForZeroMbps() (gas: 13161 → 13183 | 22 0.167%)
↑ CapacityBondTest::test_setKAlpha_orderingMatters() (gas: 56002 → 56112 | 110 0.196%)
↑ BuybackBurnerTest::test_constructor_revertsOnZeroToken() (gas: 67829 → 67964 | 135 0.199%)
↓ BuybackBurnerTest::test_executeBuyback_revertsZeroAmount() (gas: 20705 → 20661 | -44 -0.213%)
↑ CapacityBondTest::test_slashedAtEpoch_zeroBeforeSlash() (gas: 10152 → 10174 | 22 0.217%)
↑ PaymentChannelTest::test_getRateBounds_returnsConfigured() (gas: 9890 → 9912 | 22 0.222%)
↓ CapacityBondTest::test_setCapacity_onlyGovernance() (gas: 19635 → 19590 | -45 -0.229%)
↑ CapacityBondTest::test_setMinCapacity_revertsOutOfBounds() (gas: 18537 → 18581 | 44 0.237%)
↓ CapacityBondTest::test_declareMbps_revertsBelowFloor() (gas: 17950 → 17907 | -43 -0.240%)
↑ CapacityBondTest::test_declareMbps_revertsZero() (gas: 17895 → 17940 | 45 0.251%)
↓ SlashAppealTest::test_cleanup_openLapse_upholds() (gas: 474119 → 472918 | -1201 -0.253%)
↓ DeployProtocolTest::test_emergencyMultisig_canPauseAndBlockEntrypoint() (gas: 48534 → 48410 | -124 -0.255%)
↑ BuybackBurnerTest::test_unpause_revertsWithoutPauserRole() (gas: 23849 → 23910 | 61 0.256%)
↑ CapacityBondTest::test_escrowHooks_requireSlashAppealRole() (gas: 17017 → 17061 | 44 0.259%)
↓ SlashAppealTest::test_cleanup_fastTrackedLapse_grantsOperatorFavorable() (gas: 456307 → 455127 | -1180 -0.259%)
↑ BuybackBurnerTest::test_constructor_revertsOnZeroAdmin() (gas: 67810 → 67989 | 179 0.264%)
↑ BuybackBurnerTest::test_constructor_revertsOnZeroUsdc() (gas: 67793 → 67972 | 179 0.264%)
↑ CapacityBondTest::test_setMaxCapacity_acceptsInclusiveBounds() (gas: 24407 → 24473 | 66 0.270%)
↓ CapacityBondTest::test_updateRegion_revertsWhenNodeNotActive() (gas: 15741 → 15696 | -45 -0.286%)
↑ CapacityBondTest::test_setMaxCapacity_updatesBandAndEmits() (gas: 31040 → 31129 | 89 0.287%)
↑ CapacityBondTest::test_setUnbondingPeriod_revertsWithoutRole() (gas: 14913 → 14957 | 44 0.295%)
↑ CapacityBondTest::test_setMinBond_revertsWithoutRole() (gas: 14846 → 14890 | 44 0.296%)
↑ CapacityBondTest::test_bondRequired_matchesAdrWorkedExamples() (gas: 29688 → 29776 | 88 0.296%)
↑ CapacityBondTest::test_setClaimSlashGateEpochs_revertsWithoutRole() (gas: 14824 → 14868 | 44 0.297%)
↑ PaymentChannelTest::test_constructor_revertsOnDisputeWindowOutOfBounds() (gas: 76787 → 77036 | 249 0.324%)
↑ DeployProtocolTest::test_roleMatrix_emergencyMultisigGrants() (gas: 19503 → 19569 | 66 0.338%)
↑ CapacityBondTest::test_setCurve_onlyGovernance() (gas: 19416 → 19482 | 66 0.340%)
↑ PaymentChannelTest::test_constructor_revertsOnZeroAdmin() (gas: 71702 → 71951 | 249 0.347%)
↑ GovernanceLifecycleTest::test_lifecycle_ContentBlacklist_removeHashGlobal_happy() (gas: 993743 → 997238 | 3495 0.352%)
↑ GovernanceLifecycleTest::test_lifecycle_ContentBlacklist_removeOperator_happy() (gas: 1022125 → 1025729 | 3604 0.353%)
↑ PaymentChannelTest::test_constructor_revertsOnEoaFeeRouter() (gas: 76787 → 77058 | 271 0.353%)
↑ CapacityBondTest::test_setMaxCapacity_revertsOutOfBounds() (gas: 18329 → 18395 | 66 0.360%)
↑ CapacityBondTest::test_setK_updatesCurveAndEmits() (gas: 35561 → 35693 | 132 0.371%)
↑ CapacityBondTest::test_declareMbps_revertsAboveCeiling() (gas: 18017 → 18084 | 67 0.372%)
↑ E2EProtocolTest::test_e2e_registerSettleSlashEjectAppeal() (gas: 1468598 → 1474331 | 5733 0.390%)
↑ CapacityBondTest::test_curveDefaults() (gas: 10624 → 10668 | 44 0.414%)
↑ CapacityBondTest::test_setRegionStabilityWindow_revertsWithoutRole() (gas: 14845 → 14911 | 66 0.445%)
↑ ContentBlacklistTest::test_addHashRegional_revertsWithoutRegionalBodyRole() (gas: 14684 → 14750 | 66 0.449%)
↑ FeeRouterTest::test_setTreasury_revertsWithoutRole() (gas: 14696 → 14763 | 67 0.456%)
↑ GovernanceLifecycleTest::test_lifecycle_ContentBlacklist_addOperator_happy() (gas: 637690 → 640678 | 2988 0.469%)
↑ GovernanceLifecycleTest::test_lifecycle_ContentBlacklist_addHashGlobal_happy() (gas: 609043 → 611922 | 2879 0.473%)
↑ DeployProtocolTest::test_crossContractWiring_genesisGrantorIsTimelock() (gas: 17075 → 17165 | 90 0.527%)
↑ CapacityBondTest::test_bondRequired_strictlyMonotonic() (gas: 37554 → 37752 | 198 0.527%)
↑ E2EProtocolTest::test_e2e_blacklistEjectsOperator() (gas: 417879 → 420295 | 2416 0.578%)
↑ CapacityBondTest::test_setTreasury_revertsWithoutRole() (gas: 14919 → 15007 | 88 0.590%)
↑ BuybackBurnerTest::test_setVault_revertsWithoutGovernanceRole() (gas: 12054 → 12129 | 75 0.622%)
↑ FeeRouterTest::test_bytesInWindow_zeroWindowReturnsZero() (gas: 9326 → 9387 | 61 0.654%)
↑ PaymentChannelTest::test_normalDispute_doesNotExtend() (gas: 317503 → 319584 | 2081 0.655%)
↑ PaymentChannelTest::test_dispute_higherNonceWins() (gas: 307630 → 309711 | 2081 0.676%)
↑ PaymentChannelTest::test_dispute_revertsOnAmountExceedingDeposit() (gas: 303144 → 305225 | 2081 0.686%)
↑ PaymentChannelTest::test_dispute_revertsOnBytesRegression() (gas: 302891 → 304972 | 2081 0.687%)
↑ PaymentChannelTest::test_dispute_revertsOnAmountRegression() (gas: 302754 → 304835 | 2081 0.687%)
↑ PaymentChannelTest::test_dispute_revertsOnStaleNonce() (gas: 300180 → 302261 | 2081 0.693%)
↑ PaymentChannelTest::test_dispute_revertsAfterDeadline() (gas: 295195 → 297276 | 2081 0.705%)
↑ PaymentChannelTest::test_settle_revertsBeforeDisputeDeadline() (gas: 292432 → 294513 | 2081 0.712%)
↑ PaymentChannelTest::test_withdraw_acceptsErc1271Signature() (gas: 711964 → 717406 | 5442 0.764%)
↑ PaymentChannelTest::test_close_revertsOnAmountExceedingDeposit() (gas: 221040 → 223121 | 2081 0.941%)
↑ PaymentChannelTest::test_withdraw_revertsOnAmountExceedingDeposit() (gas: 220800 → 222881 | 2081 0.942%)
↑ PaymentChannelTest::test_openChannel_derivesIdAndIncrementsNonce() (gas: 219442 → 221523 | 2081 0.948%)
↑ GovernanceLifecycleTest::test_lifecycle_ContentBlacklist_addOperator_outOfBounds() (gas: 596767 → 602436 | 5669 0.950%)
↑ PaymentChannelTest::test_zeroVoucherClose_refundsFullDeposit() (gas: 216232 → 218313 | 2081 0.962%)
↑ PaymentChannelTest::test_withdraw_revertsOnBadSignature() (gas: 213634 → 215715 | 2081 0.974%)
↑ PaymentChannelTest::test_reclaimExpired_revertsBeforeExpiry() (gas: 204176 → 206190 | 2014 0.986%)
↑ PaymentChannelTest::test_close_revertsAfterExpiry() (gas: 209040 → 211121 | 2081 0.996%)
↑ PaymentChannelTest::test_withdraw_onlyProvider() (gas: 208846 → 210927 | 2081 0.996%)
↑ PaymentChannelTest::test_close_thirdPartyCannotClose() (gas: 210915 → 213018 | 2103 0.997%)
↑ CapacityBondTest::testFuzz_bondRequired_monotonic(uint256,uint256) (gas: 19427 → 19622 | 195 1.004%)
↑ PaymentChannelTest::test_topUp_onlyClient() (gas: 204390 → 206621 | 2231 1.092%)
↑ PaymentChannelTest::test_dispute_revertsOnByteOnlyAdvance() (gas: 483308 → 488772 | 5464 1.131%)
↑ PaymentChannelTest::test_close_atWatermarkNonce_succeeds() (gas: 471986 → 477450 | 5464 1.158%)
↑ BuybackBurnerTest::test_setPool_revertsWithoutGovernanceRole() (gas: 12132 → 12273 | 141 1.162%)
↑ PaymentChannelTest::test_settle_fullyWithdrawn_noRouterCall() (gas: 467688 → 473130 | 5442 1.164%)
↑ PaymentChannelTest::test_close_revertsOnByteOnlyAdvance() (gas: 464920 → 470362 | 5442 1.171%)
↑ PaymentChannelTest::test_withdraw_revertsWhenDeltaZero() (gas: 464290 → 469732 | 5442 1.172%)
↑ PaymentChannelTest::test_withdraw_revertsOnBytesRegression() (gas: 463839 → 469281 | 5442 1.173%)
↑ PaymentChannelTest::test_withdraw_revertsOnNonMonotonicNonce() (gas: 463515 → 468957 | 5442 1.174%)
↑ DeployProtocolTest::test_assertNoBackDoors_revertsWhenHandoffIncomplete() (gas: 24644804 → 24934827 | 290023 1.177%)
↑ PaymentChannelTest::test_withdraw_routesDeltaAndAdvancesWatermark() (gas: 460090 → 465532 | 5442 1.183%)
↑ PaymentChannelTest::test_zeroVoucherClose_disabledAfterWithdraw() (gas: 457488 → 462930 | 5442 1.190%)
↑ PaymentChannelTest::test_openChannel_distinctIdsAcrossProviders() (gas: 347252 → 351414 | 4162 1.199%)
↑ PaymentChannelTest::test_reclaimExpired_refundsRemainderToClient() (gas: 446830 → 452272 | 5442 1.218%)
↑ PaymentChannelTest::test_voucher_rejectedOnWrongChannelId() (gas: 335707 → 339891 | 4184 1.246%)
↑ PaymentChannelTest::test_close_then_settle_routesAndRefunds() (gas: 420622 → 426064 | 5442 1.294%)
↑ PaymentChannelTest::testFuzz_settle_refundEqualsDepositMinusClaimed(uint256,uint256) (gas: 410648 → 416090 | 5442 1.325%)
↑ PaymentChannelTest::test_settle_amountEqualsDeposit_zeroRefund() (gas: 405432 → 410874 | 5442 1.342%)
↓ CapacityBondTest::test_reduceBondAtTier_zeroInputs() (gas: 1471 → 1448 | -23 -1.564%)
↑ PaymentChannelTest::testFuzz_withdrawThenSettle_partitionsClaim(uint256,uint256,uint256,uint256) (gas: 546319 → 555056 | 8737 1.599%)
↑ PaymentChannelTest::test_withdraw_secondWithdrawRoutesOnlyIncrement() (gas: 546054 → 554879 | 8825 1.616%)
↑ PaymentChannelTest::test_close_afterWithdraw_settleRoutesRemainderOnly() (gas: 538591 → 547394 | 8803 1.634%)
↑ PaymentChannelTest::test_paused_exitsStillCallable() (gas: 659037 → 671201 | 12164 1.846%)
↑ PaymentChannelTest::test_topUp_increasesDeposit() (gas: 222520 → 226710 | 4190 1.883%)
↑ OriginAssignmentTest::test_activate_revertsOperatorWentInactive() (gas: 152943 → 155953 | 3010 1.968%)
↑ OriginAssignmentTest::test_prune_removesBlacklistedOperator() (gas: 243079 → 248023 | 4944 2.034%)
↑ OriginAssignmentTest::test_revoke_byPublisherAndGovernance() (gas: 232436 → 237252 | 4816 2.072%)
↑ OriginAssignmentTest::test_activate_replacesPreviousSet() (gas: 344888 → 352112 | 7224 2.095%)
↑ OriginAssignmentTest::test_activate_setsAuthorizedSet() (gas: 220067 → 224900 | 4833 2.196%)
↑ CapacityBondTest::test_reduceBondAtTier_unbondingOnly() (gas: 951 → 973 | 22 2.313%)
↑ CapacityBondTest::test_reduceBondAtTier_activeOnly() (gas: 899 → 921 | 22 2.447%)
↑ OriginAssignmentTest::test_prune_revertsWhenNotBlacklisted() (gas: 220747 → 226404 | 5657 2.563%)
↑ ContentBlacklistTest::test_addOperator_callsEjectOnCapacityBond() (gas: 91570 → 93920 | 2350 2.566%)
↑ PaymentChannelTest::test_setFeeRouter_updatesTarget() (gas: 284490 → 292460 | 7970 2.802%)
↑ SlashAppealTest::test_uphold_poolUnset_burnsFullBond() (gas: 2175009 → 2249371 | 74362 3.419%)
↑ BuybackBurnerTest::test_executeBuyback_revertsSwapReportMismatch() (gas: 110981 → 116470 | 5489 4.946%)
↑ ContentBlacklistTest::test_removeHashRegional_blocksGlobalRegionEntries() (gas: 44419 → 46682 | 2263 5.095%)
↑ BuybackBurnerTest::test_executeBuyback_happyPath_burnsAndEmits() (gas: 105272 → 110748 | 5476 5.202%)
↓ ContentBlacklistTest::test_hasActiveAppeal_clearedOnReject() (gas: 433926 → 410381 | -23545 -5.426%)
↑ ContentBlacklistTest::test_addHashRegional_globalTakesPrecedence() (gas: 41980 → 44310 | 2330 5.550%)
↑ PaymentChannelTest::test_forcedInclusion_doesNotExtendTwice() (gas: 2756694 → 2916491 | 159797 5.797%)
↑ PaymentChannelTest::test_forcedInclusion_noExtendWhenAmpleTimeRemains() (gas: 2742648 → 2902445 | 159797 5.826%)
↑ PaymentChannelTest::test_forcedInclusion_extendsDeadlineOnce() (gas: 2734132 → 2893929 | 159797 5.845%)
↑ ContentBlacklistTest::test_addHashGlobal_andQuery() (gas: 38191 → 40454 | 2263 5.925%)
↓ ContentBlacklistTest::test_openBlacklistAppeal_revertsDuplicatePerHash() (gas: 356697 → 334316 | -22381 -6.275%)
↓ ContentBlacklistTest::test_rejectAppeal_burnsBond() (gas: 247882 → 229508 | -18374 -7.412%)
↓ ContentBlacklistTest::test_hasActiveAppeal_clearedOnLapseOpen() (gas: 242221 → 223830 | -18391 -7.593%)
↑ BuybackBurnerTest::test_executeBuyback_revertsSwapNotImplementedWhenActualDeltaIsZero() (gas: 60069 → 65569 | 5500 9.156%)
↓ CapacityBondTest::test_reduceBondAtTier_slashEqualsActive() (gas: 942 → 832 | -110 -11.677%)
↓ PublisherRegistryTest::testFuzz_createNamespace_idsAreSequentialAndOwned(uint8) (gas: 441404 → 371835 | -69569 -15.761%)
↑ BuybackBurnerTest::test_executeBuyback_revertsPoolNotWiredWhenVaultUnset() (gas: 840424 → 973299 | 132875 15.810%)
↑ BuybackBurnerTest::test_executeBuyback_revertsPoolNotWiredWhenPoolUnset() (gas: 840272 → 973169 | 132897 15.816%)

New tests:
  + BuybackBurnerTest::test_executeBuyback_revertsWhenAmountExceedsBalance()
  + BuybackBurnerTest::test_executeBuyback_revertsZeroMinOut()
  + BuybackBurnerTest::test_rescueUSDC_revertsOnZeroAmount()
  + BuybackBurnerTest::test_rescueUSDC_revertsOnZeroRecipient()
  + BuybackBurnerTest::test_rescueUSDC_revertsWithoutGovernanceRole()
  + BuybackBurnerTest::test_rescueUSDC_transfersToRecipient()
  + CapacityBondRegionE2ETest::test_crossContractEject_viaContentBlacklist()
  + CapacityBondRegionE2ETest::test_registerNode_corruptEd25519Signature_reverts()
  + CapacityBondRegionE2ETest::test_registerNode_realEd25519Signature_succeeds()
  + CapacityBondRegionE2ETest::test_registerNode_replayAfterNonceBump_reverts()
  + CapacityBondRegionE2ETest::test_updateRegion_cooldownPrevSnapshotAndEvent()
  + ContentBlacklistTest::test_addHash_revertsWhileAppealActive()
  + ContentBlacklistTest::test_regionalCap_countsFastTrackedNotOpen()
  + FeeRouterTest::test_bytesInWindow_clampsOversizedWindow()
  + OriginAssignmentTest::test_activate_revertsOperatorBlacklistedViaOperatorMapping()
  + OriginAssignmentTest::test_prune_removesOperatorBlacklistedViaOperatorMapping()
  + PaymentChannelTest::test_route_zeroesResidualAllowanceAfterUnderPull()
  + PaymentChannelTest::test_topUp_revertsWhenPaused()
  + SlashAppealTest::test_forceResolveStuckAppeal_resolvesAfterRoleRevoked()
  + SlashAppealTest::test_forceResolveStuckAppeal_revertsWhenNotAppealOpen()
  + SlashAppealTest::test_forceResolveStuckAppeal_revertsWithoutGovernanceRole()
  + SlashAppealTest::test_slashAppealPause_extendsCapacityBondFilingWindow()

--------------------------------------------------------------------------------
Total tests: 458, ↑ 224, ↓ 47, ━ 187
Overall gas change: 1250262 (0.753%)

Run: 26832238701

@github-actions

github-actions Bot commented Jun 1, 2026 •

Copy link
Copy Markdown

Contracts coverage

Line coverage: 88.96% (1797/2020 lines)
▲ +0.69pp vs base (88.27% → 88.96%)
Run: 26832238701

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces end-to-end testing for the ADR 030 updateRegion flow using the production Ed25519Verifier instead of a mock. Specifically, it removes the mock-based unit test from CapacityBond.t.sol and introduces a comprehensive test suite in CapacityBondRegionE2E.t.sol that exercises registration with real signatures, signature corruption, region cooldowns, replay protection, and cross-contract ejection. To support this, the offline test-vector generator in contracts/test/ed25519-vectors has been updated to generate real registerNode ownership vectors using Keccak256, adding the sha3 dependency. There are no review comments, and I have no additional feedback to provide.

@github-actions

github-actions Bot commented Jun 1, 2026 •

Copy link
Copy Markdown

Coverage report

Total: 86.77% (was 86.77%, ● 0.00%) — 25214/29059 lines

No coverage data for changed Rust files.

History
Commit Total Δ vs base
c915780 89.52% ● 0.00%
5c13233 86.90% ● 0.00%
f1e0043 86.77% ● 0.00%
998285a 86.77% ● 0.00%
06159ff (HEAD) 86.77% ● 0.00%

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR upgrades the contracts test suite for ADR 030 region self-attestation by replacing a mock-based smoke test with a true end-to-end registration + updateRegion flow that exercises the production Ed25519 verification path and the blacklist-driven cross-contract eject path.

Changes:

  • Extend the committed Rust vector generator to emit a real ed25519 signature over the exact registerNode ownership digest (keccak256(nodeId ‖ operator ‖ chainId ‖ registrationNonce)), and document the new output section.
  • Add CapacityBondRegionE2E.t.sol to deploy CapacityBond with the production Ed25519Verifier and test: real registration, invalid ed25519 rejection, updateRegion cooldown + prev snapshot + event, replay rejection via registrationNonce, and cross-contract eject via ContentBlacklist.
  • Remove the superseded mock smoke test from CapacityBond.t.sol and point readers to the new e2e test.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
contracts/test/ed25519-vectors/src/main.rs Adds section-4 generation for a registerNode ed25519 signature vector and helper utilities (keccak + checksum formatting).
contracts/test/ed25519-vectors/README.md Documents the additional consumer (CapacityBondRegionE2E.t.sol) and the new section-4 output.
contracts/test/ed25519-vectors/Cargo.toml Adds a pinned sha3 dependency for keccak256 when generating the registerNode digest.
contracts/test/ed25519-vectors/Cargo.lock Updates lockfile for the new sha3 dependency and transitive packages.
contracts/test/CapacityBondRegionE2E.t.sol New end-to-end Foundry test covering production ed25519 registration, ADR 030 updateRegion behavior, replay rejection, and cross-contract eject.
contracts/test/CapacityBond.t.sol Removes the old updateRegion smoke test and clarifies that ADR 030 e2e coverage lives in the new test file.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +190 to +191
/// EIP-55 mixed-case checksum of a 20-byte address (Solidity rejects
/// all-lowercase address literals as failing the checksum test).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked this against solc 0.8.28 (the repo's pinned version) — it's a hard compile error, not a tooling/readability concern. Compiling an all-lowercase literal:

address internal constant A = 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266;

gives:

Error (9429): This looks like an address but has an invalid checksum.
Correct checksummed address: "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266".
If this is not used as an address, please prepend '00'.

A 39–41-digit hex literal that fails the EIP-55 checksum test is rejected (the compiler only accepts it as an address if it passes, or as a number literal if you pad it). That's exactly why the generator emits a checksummed literal — an all-lowercase paste would not compile. Leaving the comment as-is.

yigitdot and others added 2 commits June 1, 2026 18:41
…rengthen eject assertions

- Correct the replay-test comment: `bindingNonce` is advanced by the first
  `registerNode`, not by `deregisterNode` (which only bumps `registrationNonce`);
  the re-sign uses the live nonce to clear the binding check.
- Tighten "short-circuit" → "revert before" in the replay-test natspec.
- Strengthen the cross-contract eject test: assert the `ejected` flag (the slot
  the `registerNode` precondition checks) and the `EjectedByBlacklist` event, not
  just the cleared `active` state and bumped nonce.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Resolve CapacityBond.t.sol conflict: keep the removal of the superseded
mock-based test_updateRegion_cooldownAndPrevSnapshot (its coverage moved to
CapacityBondRegionE2E.t.sol), atop main's stake→bond surface rename.

Adapt CapacityBondRegionE2E.t.sol to the renamed surface: MIN_STAKE→MIN_BOND,
minStake_→minBond_, bond.stake→bond.bond, _stakeAndRegister→_bondAndRegister.
@yigitdot

yigitdot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new end-to-end test suite (CapacityBondRegionE2E.t.sol) to thoroughly cover the ADR 030 updateRegion flow using the production Ed25519Verifier and real signatures. To support this, the Rust test-vector generator (ed25519-vectors) has been updated to generate the required signing vectors, including adding the sha3 dependency and updating the documentation. The review feedback suggests optimizing the Rust vector generator by using a stack-allocated fixed-size array instead of a heap-allocated Vec for the cryptographic preimage, and improving test assertions in the new Solidity test suite by verifying the NodeAutoEjected event during cross-contract ejection.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +150 to +155
let mut preimage = Vec::with_capacity(92);
preimage.extend_from_slice(&node_id);
preimage.extend_from_slice(&REG_OPERATOR);
preimage.extend_from_slice(&u256_be(CHAIN_ID));
preimage.extend_from_slice(&NONCE.to_be_bytes());
let digest: [u8; 32] = Keccak256::digest(&preimage).into();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For fixed-size cryptographic preimages, we can avoid heap allocation (Vec) by using a stack-allocated fixed-size array [u8; 92]. This is more idiomatic and efficient in Rust, minimizing unnecessary memory allocations.

Suggested change
let mut preimage = Vec::with_capacity(92);
preimage.extend_from_slice(&node_id);
preimage.extend_from_slice(&REG_OPERATOR);
preimage.extend_from_slice(&u256_be(CHAIN_ID));
preimage.extend_from_slice(&NONCE.to_be_bytes());
let digest: [u8; 32] = Keccak256::digest(&preimage).into();
// Build the abi.encodePacked preimage: 32 + 20 + 32 + 8 = 92 bytes.
let mut preimage = [0u8; 92];
preimage[0..32].copy_from_slice(&node_id);
preimage[32..52].copy_from_slice(&REG_OPERATOR);
preimage[52..84].copy_from_slice(&u256_be(CHAIN_ID));
preimage[84..92].copy_from_slice(&NONCE.to_be_bytes());
References
  1. Minimize memory allocations in performance-critical code by using in-place filtering or reusable buffers instead of creating multiple intermediate collections.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 998285a — preimage now built in a fixed [u8; 92] stack array. Re-ran the generator; the emitted REG_* vector bytes are identical, so no re-paste was needed.

Comment on lines +213 to +214
vm.expectEmit(true, false, false, false, address(bond));
emit CapacityBond.EjectedByBlacklist(REG_OPERATOR);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Assert the NodeAutoEjected event in addition to EjectedByBlacklist to ensure complete coverage of the node deactivation side effects during cross-contract ejection.

        vm.expectEmit(true, false, false, false, address(bond));
        emit CapacityBond.EjectedByBlacklist(REG_OPERATOR);
        vm.expectEmit(true, false, false, true, address(bond));
        emit CapacityBond.NodeAutoEjected(REG_NODE_ID, MIN_BOND);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 998285a — added expectEmit for NodeAutoEjected(REG_NODE_ID, MIN_BOND) after EjectedByBlacklist (emit order). remainingBond == MIN_BOND since the operator bonded the minimum and was never slashed. 5/5 tests still pass.

…ert NodeAutoEjected

- ed25519-vectors generator: build the registerNode preimage in a fixed
  [u8; 92] stack array instead of a heap Vec (idiomatic; emitted vector bytes
  unchanged).
- CapacityBondRegionE2E eject test: also assert the NodeAutoEjected(nodeId,
  MIN_BOND) event alongside EjectedByBlacklist, covering both eject side-effect
  events.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

@alpergundogdu alpergundogdu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review — ADR 030 updateRegion e2e + ed25519 signing harness (#689)

Read the full diff. This is a clean, well-scoped test-only change (no src/ contract changes, so aderyn/slither surface is unaffected). The differential-vector approach (extend the pinned ed25519-vectors generator rather than enabling FFI) is the right call and matches the repo's established committed-vector pattern. Nice work; I'd approve.

Verified

  • Digest construction matches the contract. The generator's 92-byte preimage nodeId(32) ‖ operator(20) ‖ chainId(uint256 BE, 32) ‖ nonce(uint64 BE, 8) correctly mirrors keccak256(abi.encodePacked(...)) for registerNode's ownership digest. u256_be zero-extends the u64 chain id into the high-order 32-byte slot correctly. ✅
  • EIP-55 checksummer is correct (keccak of the lowercase hex string, uppercase nibble ≥ 8) — needed because solc 0.8.28 rejects all-lowercase mixed-case-eligible address literals. ✅
  • vk.verify_strict(&digest, &sig) assertion in the generator guarantees the emitted vector is parity-valid against the production verifier's strictness bar. ✅
  • Negative control is genuine: test_registerNode_corruptEd25519Signature_reverts flips a byte and asserts InvalidEd25519Signature, proving the real verifier is in the path, not rubber-stamping. ✅
  • Replay test reasoning holds: after deregisterNode, registrationNonce[nodeId] → 1; the replayed sig was signed over nonce 0, so the digest differs and it reverts InvalidEd25519Signature. The fresh _signBindNode (reading the live bindingNonce) correctly isolates the ed25519 layer from the binding check. ✅
  • setUp pins vm.chainId(REG_CHAIN_ID) + asserts vm.addr(REG_OP_PK) == REG_OPERATOR so any Foundry-default drift fails loudly rather than silently invalidating the committed signature. ✅
  • Scope item #3 deferral is well-documented both inline and in the PR body (the regionPrev/regionLastChanged ripening predicate has no production reader yet; tracked in #761). Covering only the blacklist-driven eject path that actually exists is the correct call.

Nitpicks (non-blocking)

  • The hex_lit / nibble const-fn helpers panic! on malformed input — fine here (generator binary, compile-time, not workspace anti-panic scope), just noting they're build-time asserts by design.
  • Consider a brief comment on REG_ED25519_SIG reminding maintainers it's regenerated via cargo run in ed25519-vectors (the README covers it, but the constant block is where someone will be tempted to hand-edit).

No correctness concerns. Mergeable.


Generated by Claude Code

Emit a regeneration reminder from the ed25519-vectors generator directly above
the REG_ED25519_SIG constant (so it survives re-paste): the signature is bound
to the digest and a hand-edited value fails verify_strict, reverting
registerNode with InvalidEd25519Signature. Paste the refreshed block into
CapacityBondRegionE2E.t.sol.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@yigitdot
yigitdot merged commit 2fd2e4f into main Jun 2, 2026
19 checks passed
@yigitdot
yigitdot deleted the feat/689-updateregion-e2e branch June 2, 2026 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(contracts): full ADR 030 updateRegion e2e — EIP-712 + ed25519 registerNode signing harness

3 participants