Skip to content

feat(contracts): add ContentBlacklist core (hash + origin blacklist) - #675

Closed
alpergundogdu wants to merge 3 commits into
mainfrom
feat/contracts-content-blacklist
Closed

alpergundogdu wants to merge 3 commits into
mainfrom
feat/contracts-content-blacklist

Conversation

@alpergundogdu

Copy link
Copy Markdown
Contributor

Summary

Partition C / PR 1: the ADR 011 core ContentBlacklist surface. The ADR 031 appeal flow (openBlacklistAppeal + the multisig/Governor lifecycle) is deferred to PR 2; the BlacklistEntry.suspended / suspendedAtUs fields exist here so the isBlacklisted views are forward-compatible, but nothing sets them yet.

Surface

  • Hash blacklist — global (addHash/removeHash, GOVERNANCE_ROLE) + regional (addHashRegional by the registered body for its region; removeHashRegional governance-only). Keyed by (blake3Hash, region), global = region bytes2(0), so a hash can be globally and/or regionally blacklisted independently.
  • Origin blacklist — addOrigin/emergencyAddOrigin force-eject via StakingRegistry.ejectNode (needs BLACKLIST_ROLE, granted post-deploy); removeOrigin clears the entry but does not un-eject (re-entry needs fresh stake per ADR 011).
  • Emergency multisig path — emergencyAdd/emergencyAddOrigin with category auto-expiry (14d GENERAL / 90d CSAM,TERRORIST) and an immutable 365-day sunset.
  • Regional-body registry — register/deregister (governance), suspend (emergency), unsuspend (governance).
  • Governable complianceWindow (bounds [1h, 7d]), monotonic version counter, views (isBlacklisted, isBlacklistedInRegion, isOriginBlacklisted, getEntry, getEntryInRegion, getBlacklistVersion).
  • region stored as bytes2 (ISO 3166-1 alpha-2, upper-cased/canonicalized), string at the external boundary. AccessControl + ReentrancyGuard (no funds in the core; ReentrancyGuard covers the ejectNode cross-call).

Design decisions (confirmed with maintainer; ADR 011 clarified in this PR)

ADR 011's core storage model was underspecified in two spots — both resolved and the ADR updated in-PR per the "update ADR in the same PR" convention:

  1. effectiveAt = addedAt + grace = the slashability threshold (grace = complianceWindow for governance entries, fixed 2h for emergency). isBlacklisted is immediate (eviction obligation begins at addedAt) and does not gate on effectiveAt. The struct comment / compliance table previously conflicted; fixed.
  2. (hash, region) entry keying (consistent with ADR 031), with a new getEntryInRegion view added to the interface.

Test plan

  • 35 ContentBlacklist tests (231 total) — global/regional/origin/emergency paths, category expiry, sunset, region canonicalization, eject cross-call (vm.expectCall), role gating, compliance-window bounds, version counter
  • forge fmt --check, forge build --deny warnings, gas snapshot regenerated; ADR check-refs/check-book-list/markdownlint pass
  • CI solidity suite (incl. slither / aderyn) green
  • gemini + Copilot review

Follow-ups

  • PR 2: ADR 031 appeal surface (openBlacklistAppeal + lifecycle, bond escrow, perjury denylist) on this same contract.
  • Then OriginAssignment + SlashJudge complete Partition C.

🤖 Generated with Claude Code

Partition C / PR 1: the ADR 011 core surface, deferring the ADR 031
appeal flow to a follow-up PR.

- Global + regional hash blacklist keyed by (blake3Hash, region); global
  entries use region bytes2(0). region is stored as bytes2 (ISO 3166-1
  alpha-2, upper-cased), string at the external boundary.
- effectiveAt = addedAt + grace = slashability threshold (grace =
  governable complianceWindow for governance entries, fixed 2h for
  emergency). isBlacklisted is immediate (eviction obligation), not gated
  on effectiveAt.
- Origin blacklisting force-ejects via StakingRegistry.ejectNode (needs
  BLACKLIST_ROLE; granted post-deploy). removeOrigin does not un-eject.
- Emergency multisig path with category auto-expiry (14d GENERAL / 90d
  CSAM,TERRORIST) and an immutable 365-day sunset.
- Regional-body registry, governable complianceWindow (bounds [1h, 7d]),
  monotonic version counter, and the ADR 011 views.

The BlacklistEntry struct carries suspended / suspendedAtUs so the views
are forward-compatible with the deferred appeal flow; nothing sets them
yet. 35 tests.

ADR 011 clarified in-PR (implementation surfaced two unpinned spots, both
confirmed with the maintainer): effectiveAt = addedAt + grace as the
slashability threshold, and (hash, region) entry keying with a new
getEntryInRegion view.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings May 22, 2026 16:33
@github-actions

github-actions Bot commented May 22, 2026 •

Copy link
Copy Markdown

Gas snapshot

Gas changes vs base
Compiling 87 files with Solc 0.8.28
Solc 0.8.28 finished in 5.98s
Compiler run successful!

Ran 37 tests for test/ContentBlacklist.t.sol:ContentBlacklistTest
[PASS] test_addHashRegional_emptyRegionReverts() (gas: 43099)
[PASS] test_addHashRegional_revertsForNonBody() (gas: 43544)
[PASS] test_addHashRegional_revertsWhenSuspended() (gas: 75195)
[PASS] test_addHash_blacklistsAndSetsEffectiveAt() (gas: 145738)
[PASS] test_addHash_onlyGovernance() (gas: 12476)
[PASS] test_addHash_overwriteRefreshesEffectiveAt() (gas: 156035)
[PASS] test_addHash_revertsOnZeroHash() (gas: 13771)
[PASS] test_addOrigin_ejectsAndBlacklists() (gas: 146153)
[PASS] test_addOrigin_onlyGovernance() (gas: 14681)
[PASS] test_complianceWindow_affectsEffectiveAt() (gas: 148218)
[PASS] test_constructor_revertsOnZeroArgs() (gas: 241016)
[PASS] test_deregisterRegionalBody_leavesEntriesActive() (gas: 182208)
[PASS] test_emergencyAddOrigin_ejectsAndExpires() (gas: 186691)
[PASS] test_emergencyAdd_effectiveAtIs2hAndExpires() (gas: 182049)
[PASS] test_emergencyAdd_generalExpiresAfter14d() (gas: 177785)
[PASS] test_emergencyAdd_invalidCategoryReverts() (gas: 13957)
[PASS] test_emergencyAdd_onlyEmergencyRole() (gas: 15084)
[PASS] test_emergencyAdd_revertsAfterSunset() (gas: 15126)
[PASS] test_emergencyAdd_severeExpiresAfter90d() (gas: 180047)
[PASS] test_getEntryInRegion_regionalAndEmptyGlobal() (gas: 312705)
[PASS] test_globalEntry_blacklistsAllRegions() (gas: 141274)
[PASS] test_governanceAddHash_overridesExpiredEmergency() (gas: 158187)
[PASS] test_initialState() (gas: 30009)
[PASS] test_invalidRegion_reverts() (gas: 46054)
[PASS] test_regionCanonicalization_lowercaseEqualsUpper() (gas: 199030)
[PASS] test_regionalBody_canBlacklistInRegion() (gas: 201946)
[PASS] test_registerRegionalBody_revertsIfRegionTaken() (gas: 45674)
[PASS] test_removeHashRegional_emitsCanonicalRegion() (gas: 156968)
[PASS] test_removeHashRegional_onlyGovernance() (gas: 163017)
[PASS] test_removeHash_clearsAndBumpsVersion() (gas: 115793)
[PASS] test_removeHash_revertsIfNotFound() (gas: 15874)
[PASS] test_removeOrigin_clearsWithoutUnejecting() (gas: 116943)
[PASS] test_removeOrigin_revertsIfNotFound() (gas: 17845)
[PASS] test_setComplianceWindow_bounds() (gas: 28887)
[PASS] test_suspendRegionalBody_onlyEmergency() (gas: 46258)
[PASS] test_unsuspendRegionalBody_restores() (gas: 211867)
[PASS] test_version_bumpsOnEveryMutation() (gas: 321197)
Suite result: ok. 37 passed; 0 failed; 0 skipped; finished in 11.64ms (8.21ms CPU time)

Ran 15 tests for test/DecdnGovernor.t.sol:DecdnGovernorTest
[PASS] test_abstainCountsTowardQuorumButNotApproval() (gas: 252371)
[PASS] test_cancelByProposer_beforeVoteStart() (gas: 100384)
[PASS] test_clockIsTimestampMode() (gas: 10341)
[PASS] test_constructor_revertsOnZeroVotingEscrow() (gas: 89459)
[PASS] test_defeated_whenAgainstOutweighsFor() (gas: 250905)
[PASS] test_defeated_whenQuorumNotReached() (gas: 173239)
[PASS] test_fullLifecycle_passesQueuesExecutes() (gas: 340779)
[PASS] test_getVotesReadsVeBalance() (gas: 36793)
[PASS] test_proposalThresholdIsTenthPercentOfVeSupply() (gas: 13383)
[PASS] test_proposalThresholdTracksSupply() (gas: 23169)
[PASS] test_proposalThresholdUsesSnapshotSupply() (gas: 62395)
[PASS] test_propose_revertsBelowThreshold() (gas: 52808)
[PASS] test_quorumIs4PercentOfVeSupply() (gas: 13502)
[PASS] test_targetIsTimelockGated() (gas: 8381)
[PASS] test_votingScheduleConstants() (gas: 6386)
Suite result: ok. 15 passed; 0 failed; 0 skipped; finished in 6.06ms (2.70ms CPU time)

Ran 71 tests for test/StakingRegistry.t.sol:StakingRegistryTest
[PASS] testFuzz_slash_threeLegsSumToSlashAmount(uint256) (runs: 1024, μ: 267876, ~: 267920)
[PASS] test_bindNodeId_preRegistrationBindsWithoutActiveNode() (gas: 121331)
[PASS] test_bindNodeId_revertsIfBoundToOther() (gas: 380009)
[PASS] test_bindNodeId_revertsOnBadBindingSig() (gas: 383379)
[PASS] test_bindNodeId_revertsOnRejectedEd25519() (gas: 390385)
[PASS] test_bindNodeId_revertsOnZeroNodeId() (gas: 378763)
[PASS] test_bindNodeId_rotatesToNewNodeId() (gas: 432113)
[PASS] test_constructor_revertsOnOutOfBoundsMaxMultiaddrSize() (gas: 136227)
[PASS] test_constructor_revertsOnOutOfBoundsMinStake() (gas: 135680)
[PASS] test_constructor_revertsOnOutOfBoundsMultiaddrCooldown() (gas: 73575)
[PASS] test_constructor_revertsOnOutOfBoundsUnbondingPeriod() (gas: 135868)
[PASS] test_constructor_revertsOnZeroAdmin() (gas: 71161)
[PASS] test_constructor_revertsOnZeroToken() (gas: 71099)
[PASS] test_constructor_revertsOnZeroVerifier() (gas: 71112)
[PASS] test_constructor_setsImmutableAndState() (gas: 33068)
[PASS] test_deregisterNode_flipsFlagAndRemovesFromActiveSet() (gas: 358604)
[PASS] test_deregisterNode_revertsWhenNotActive() (gas: 20444)
[PASS] test_ejectNode_flipsBothFlagsWhenRegistered() (gas: 378374)
[PASS] test_ejectNode_revertsWithoutBlacklistRole() (gas: 13043)
[PASS] test_ejectNode_unregisteredOperator_onlySetsFlag() (gas: 117141)
[PASS] test_getActiveNodes_paginationBounds() (gas: 984926)
[PASS] test_isActive_falseWhenAnyStakeInUnbonding() (gas: 425144)
[PASS] test_isActive_requiresStakeAndRegistration() (gas: 426308)
[PASS] test_reRegisterSameNodeId_afterDeregister_works() (gas: 425547)
[PASS] test_reclaimNodeId_clearsRecordForDeregisteredHolder() (gas: 369655)
[PASS] test_reclaimNodeId_revertsIfNotBound() (gas: 20426)
[PASS] test_reclaimNodeId_revertsOnRejectedEd25519() (gas: 380078)
[PASS] test_reclaimNodeId_tearsDownHolderBinding() (gas: 370235)
[PASS] test_reclaimThenReRegister_recoversNodeId() (gas: 641580)
[PASS] test_recordSettlement_revertsWithoutReporterRole() (gas: 13135)
[PASS] test_recordSettlement_updatesTimestamp() (gas: 39735)
[PASS] test_registerNode_happyPath() (gas: 426149)
[PASS] test_registerNode_revertsBelowMinStake() (gas: 114102)
[PASS] test_registerNode_revertsOnAlreadyRegistered() (gas: 380213)
[PASS] test_registerNode_revertsOnBadBindingSignature() (gas: 124838)
[PASS] test_registerNode_revertsOnNodeIdBoundToOther() (gas: 428375)
[PASS] test_registerNode_revertsOnRejectedEd25519Signature() (gas: 135944)
[PASS] test_registerNode_revertsOnZeroNodeId() (gas: 110245)
[PASS] test_registerNode_revertsWhenEjected() (gas: 138596)
[PASS] test_registerNode_revertsWhenMultiaddrsTooLarge() (gas: 112641)
[PASS] test_registerNode_revertsWhenRegionHintTooLong() (gas: 112451)
[PASS] test_requestUnstake_movesAmountToUnbonding() (gas: 137411)
[PASS] test_requestUnstake_revertsOnInflightRequest() (gas: 139987)
[PASS] test_requestUnstake_revertsOnInsufficientStake() (gas: 89097)
[PASS] test_setMaxMultiaddrSize_withinBounds() (gas: 20275)
[PASS] test_setMinStake_revertsOutOfBounds() (gas: 17758)
[PASS] test_setMinStake_withinBoundsSucceeds() (gas: 20278)
[PASS] test_setUnbondingPeriod_revertsOutOfBounds() (gas: 17636)
[PASS] test_slashAutoEject_bumpsRegistrationNonce() (gas: 541090)
[PASS] test_slash_appliesToActivePlusUnbonding() (gas: 307767)
[PASS] test_slash_autoEjectAlsoFlipsNodeActive() (gas: 585309)
[PASS] test_slash_distributes50_30_20() (gas: 266842)
[PASS] test_slash_drawsFromUnbondingWhenActiveInsufficient() (gas: 312489)
[PASS] test_slash_notifiesSafetyReserve() (gas: 262190)
[PASS] test_slash_revertsOnZeroChallenger() (gas: 93042)
[PASS] test_slash_revertsWhenSafetyReserveNotWired() (gas: 102865)
[PASS] test_slash_revertsWithoutSlashRole() (gas: 92618)
[PASS] test_slash_tier1_is5Percent() (gas: 259202)
[PASS] test_slash_tier2_is15Percent() (gas: 323751)
[PASS] test_slash_tier3Stays50PercentBeyondThird() (gas: 522342)
[PASS] test_slash_tier3_is50Percent() (gas: 389435)
[PASS] test_stake_addsToActiveStake() (gas: 87045)
[PASS] test_stake_clearsEjectedFlagWhenRestakedToMinimum() (gas: 137525)
[PASS] test_stake_revertsOnZeroAmount() (gas: 18266)
[PASS] test_stake_revertsWhenPaused() (gas: 45245)
[PASS] test_unstake_returnsTokensAfterUnbonding() (gas: 135708)
[PASS] test_unstake_revertsBeforeUnbondingComplete() (gas: 128446)
[PASS] test_unstake_revertsWithNoRequest() (gas: 22517)
[PASS] test_updateMultiaddrs_replacesAndStampsTimestamp() (gas: 404142)
[PASS] test_updateMultiaddrs_respectsCooldown() (gas: 426495)
[PASS] test_updateMultiaddrs_revertsWhenNotActive() (gas: 15622)
Suite result: ok. 71 passed; 0 failed; 0 skipped; finished in 312.64ms (308.14ms CPU time)

Ran 44 tests for test/TestnetFaucet.t.sol:TestnetFaucetTest
[PASS] testFuzz_claim_atOrAboveCooldown(uint256) (runs: 1024, μ: 91483, ~: 91528)
[PASS] testFuzz_claim_belowCooldown(uint256) (runs: 1024, μ: 85160, ~: 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 286.22ms (282.44ms CPU time)

Ran 10 tests for test/Token.t.sol:TokenTest
[PASS] testFuzz_burn_reducesSupplyByExactAmount(uint256) (runs: 1024, μ: 27767, ~: 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 90.37ms (89.84ms CPU time)

Ran 26 tests for test/PublisherRegistry.t.sol:PublisherRegistryTest
[PASS] testFuzz_createNamespace_idsAreSequentialAndOwned(uint8) (runs: 1024, μ: 720676, ~: 357922)
[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: 135341)
[PASS] test_constructor_revertsZeroAdmin() (gas: 36674)
[PASS] test_constructor_setsDefaultsAndRoles() (gas: 19037)
[PASS] test_createNamespace_assignsIdsFromOne() (gas: 92750)
[PASS] test_createNamespace_revertsAtCap() (gas: 98492)
[PASS] test_createNamespace_zeroIsNeverAssigned() (gas: 65471)
[PASS] test_namespaceOf_emptyForUnclaimed() (gas: 8273)
[PASS] test_setMaxNamespaces_revertsOutOfBounds() (gas: 17627)
[PASS] test_setMaxNamespaces_revertsWithoutRole() (gas: 13384)
[PASS] test_setMaxNamespaces_withinBounds() (gas: 20687)
[PASS] test_setTransferTimelock_revertsOutOfBounds() (gas: 17706)
[PASS] test_setTransferTimelock_withinBounds() (gas: 20560)
[PASS] test_transfer_cancelByOwner() (gas: 78690)
[PASS] test_transfer_cancelRevertsIfNotOwner() (gas: 93302)
[PASS] test_transfer_finalizeRevertsIfNotPendingOwner() (gas: 93817)
[PASS] test_transfer_finalizeRevertsNoPending() (gas: 68566)
[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. 26 passed; 0 failed; 0 skipped; finished in 801.24ms (800.32ms CPU time)

Ran 30 tests for test/VotingEscrow.t.sol:VotingEscrowTest
[PASS] testFuzz_balanceOf_neverExceedsAmount_decaysMonotonically(uint256,uint256,uint256) (runs: 1024, μ: 2999763, ~: 2999794)
[PASS] testFuzz_totalSupplyMatchesSum(uint256,uint256,uint256,uint256,uint256) (runs: 1024, μ: 3388666, ~: 3302845)
[PASS] test_balanceOfAt_historical() (gas: 2997904)
[PASS] test_balanceOfAt_revertsFutureLookup() (gas: 2992234)
[PASS] test_balanceOf_decaysLinearlyToZero() (gas: 3008821)
[PASS] test_balanceOf_zeroForNeverLocked() (gas: 10164)
[PASS] test_constructor_revertsBadDurations() (gas: 126152)
[PASS] test_constructor_revertsMaxLockExceedsWalkCap() (gas: 1713697)
[PASS] test_constructor_revertsZeroToken() (gas: 64692)
[PASS] test_constructor_setsState() (gas: 15440)
[PASS] test_createLock_locksAndSetsWeight() (gas: 2996643)
[PASS] test_createLock_revertsAboveMaxDuration() (gas: 51400)
[PASS] test_createLock_revertsBelowMinDuration() (gas: 51231)
[PASS] test_createLock_revertsExistingLock() (gas: 3019383)
[PASS] test_createLock_revertsZeroAmount() (gas: 18380)
[PASS] test_createLock_weekAligned() (gas: 2990616)
[PASS] test_increaseAmount_raisesWeight() (gas: 3110971)
[PASS] test_increaseAmount_revertsNoLock() (gas: 20476)
[PASS] test_increaseUnlockTime_extendsAndRaisesWeight() (gas: 3101851)
[PASS] test_increaseUnlockTime_revertsAboveMax() (gas: 2996215)
[PASS] test_increaseUnlockTime_revertsNotInFuture() (gas: 2996294)
[PASS] test_noTransferSurface() (gas: 2995268)
[PASS] test_pause_blocksCreateLock() (gas: 75658)
[PASS] test_totalSupplyAt_revertsFutureLookup() (gas: 9014)
[PASS] test_totalSupplyAt_zeroBeforeGenesis() (gas: 2993507)
[PASS] test_totalSupply_currentMatchesSum() (gas: 3279374)
[PASS] test_totalSupply_equalsSumOfBalances_multipleLocks() (gas: 4790797)
[PASS] test_withdraw_afterExpiry() (gas: 5477775)
[PASS] test_withdraw_revertsBeforeExpiry() (gas: 2995832)
[PASS] test_withdraw_revertsNoLock() (gas: 20423)
Suite result: ok. 30 passed; 0 failed; 0 skipped; finished in 1.96s (1.99s CPU time)

Ran 7 test suites in 2.66s (3.47s CPU time): 233 tests passed, 0 failed, 0 skipped (233 total tests)
━ ContentBlacklistTest::test_addHashRegional_emptyRegionReverts() (gas: 43099 → 43099 | 0 0.000%)
━ ContentBlacklistTest::test_addHashRegional_revertsForNonBody() (gas: 43544 → 43544 | 0 0.000%)
━ ContentBlacklistTest::test_addHashRegional_revertsWhenSuspended() (gas: 75195 → 75195 | 0 0.000%)
━ ContentBlacklistTest::test_addHash_blacklistsAndSetsEffectiveAt() (gas: 145738 → 145738 | 0 0.000%)
━ ContentBlacklistTest::test_addHash_onlyGovernance() (gas: 12476 → 12476 | 0 0.000%)
━ ContentBlacklistTest::test_addHash_overwriteRefreshesEffectiveAt() (gas: 156035 → 156035 | 0 0.000%)
━ ContentBlacklistTest::test_addHash_revertsOnZeroHash() (gas: 13771 → 13771 | 0 0.000%)
━ ContentBlacklistTest::test_addOrigin_ejectsAndBlacklists() (gas: 146153 → 146153 | 0 0.000%)
━ ContentBlacklistTest::test_addOrigin_onlyGovernance() (gas: 14681 → 14681 | 0 0.000%)
━ ContentBlacklistTest::test_complianceWindow_affectsEffectiveAt() (gas: 148218 → 148218 | 0 0.000%)
━ ContentBlacklistTest::test_constructor_revertsOnZeroArgs() (gas: 241016 → 241016 | 0 0.000%)
━ ContentBlacklistTest::test_deregisterRegionalBody_leavesEntriesActive() (gas: 182208 → 182208 | 0 0.000%)
━ ContentBlacklistTest::test_emergencyAddOrigin_ejectsAndExpires() (gas: 186691 → 186691 | 0 0.000%)
━ ContentBlacklistTest::test_emergencyAdd_effectiveAtIs2hAndExpires() (gas: 182049 → 182049 | 0 0.000%)
━ ContentBlacklistTest::test_emergencyAdd_generalExpiresAfter14d() (gas: 177785 → 177785 | 0 0.000%)
━ ContentBlacklistTest::test_emergencyAdd_invalidCategoryReverts() (gas: 13957 → 13957 | 0 0.000%)
━ ContentBlacklistTest::test_emergencyAdd_onlyEmergencyRole() (gas: 15084 → 15084 | 0 0.000%)
━ ContentBlacklistTest::test_emergencyAdd_revertsAfterSunset() (gas: 15126 → 15126 | 0 0.000%)
━ ContentBlacklistTest::test_emergencyAdd_severeExpiresAfter90d() (gas: 180047 → 180047 | 0 0.000%)
━ ContentBlacklistTest::test_getEntryInRegion_regionalAndEmptyGlobal() (gas: 312705 → 312705 | 0 0.000%)
━ ContentBlacklistTest::test_globalEntry_blacklistsAllRegions() (gas: 141274 → 141274 | 0 0.000%)
━ ContentBlacklistTest::test_governanceAddHash_overridesExpiredEmergency() (gas: 158187 → 158187 | 0 0.000%)
━ ContentBlacklistTest::test_initialState() (gas: 30009 → 30009 | 0 0.000%)
━ ContentBlacklistTest::test_invalidRegion_reverts() (gas: 46054 → 46054 | 0 0.000%)
━ ContentBlacklistTest::test_regionCanonicalization_lowercaseEqualsUpper() (gas: 199030 → 199030 | 0 0.000%)
━ ContentBlacklistTest::test_regionalBody_canBlacklistInRegion() (gas: 201946 → 201946 | 0 0.000%)
━ ContentBlacklistTest::test_registerRegionalBody_revertsIfRegionTaken() (gas: 45674 → 45674 | 0 0.000%)
━ ContentBlacklistTest::test_removeHashRegional_emitsCanonicalRegion() (gas: 156968 → 156968 | 0 0.000%)
━ ContentBlacklistTest::test_removeHashRegional_onlyGovernance() (gas: 163017 → 163017 | 0 0.000%)
━ ContentBlacklistTest::test_removeHash_clearsAndBumpsVersion() (gas: 115793 → 115793 | 0 0.000%)
━ ContentBlacklistTest::test_removeHash_revertsIfNotFound() (gas: 15874 → 15874 | 0 0.000%)
━ ContentBlacklistTest::test_removeOrigin_clearsWithoutUnejecting() (gas: 116943 → 116943 | 0 0.000%)
━ ContentBlacklistTest::test_removeOrigin_revertsIfNotFound() (gas: 17845 → 17845 | 0 0.000%)
━ ContentBlacklistTest::test_setComplianceWindow_bounds() (gas: 28887 → 28887 | 0 0.000%)
━ ContentBlacklistTest::test_suspendRegionalBody_onlyEmergency() (gas: 46258 → 46258 | 0 0.000%)
━ ContentBlacklistTest::test_unsuspendRegionalBody_restores() (gas: 211867 → 211867 | 0 0.000%)
━ ContentBlacklistTest::test_version_bumpsOnEveryMutation() (gas: 321197 → 321197 | 0 0.000%)
━ DecdnGovernorTest::test_abstainCountsTowardQuorumButNotApproval() (gas: 252371 → 252371 | 0 0.000%)
━ DecdnGovernorTest::test_cancelByProposer_beforeVoteStart() (gas: 100384 → 100384 | 0 0.000%)
━ DecdnGovernorTest::test_clockIsTimestampMode() (gas: 10341 → 10341 | 0 0.000%)
━ DecdnGovernorTest::test_constructor_revertsOnZeroVotingEscrow() (gas: 89459 → 89459 | 0 0.000%)
━ DecdnGovernorTest::test_defeated_whenAgainstOutweighsFor() (gas: 250905 → 250905 | 0 0.000%)
━ DecdnGovernorTest::test_defeated_whenQuorumNotReached() (gas: 173239 → 173239 | 0 0.000%)
━ DecdnGovernorTest::test_fullLifecycle_passesQueuesExecutes() (gas: 340779 → 340779 | 0 0.000%)
━ DecdnGovernorTest::test_getVotesReadsVeBalance() (gas: 36793 → 36793 | 0 0.000%)
━ DecdnGovernorTest::test_proposalThresholdIsTenthPercentOfVeSupply() (gas: 13383 → 13383 | 0 0.000%)
━ DecdnGovernorTest::test_proposalThresholdTracksSupply() (gas: 23169 → 23169 | 0 0.000%)
━ DecdnGovernorTest::test_proposalThresholdUsesSnapshotSupply() (gas: 62395 → 62395 | 0 0.000%)
━ DecdnGovernorTest::test_propose_revertsBelowThreshold() (gas: 52808 → 52808 | 0 0.000%)
━ DecdnGovernorTest::test_quorumIs4PercentOfVeSupply() (gas: 13502 → 13502 | 0 0.000%)
━ DecdnGovernorTest::test_targetIsTimelockGated() (gas: 8381 → 8381 | 0 0.000%)
━ DecdnGovernorTest::test_votingScheduleConstants() (gas: 6386 → 6386 | 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: 135341 → 135341 | 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: 92750 → 92750 | 0 0.000%)
━ PublisherRegistryTest::test_createNamespace_revertsAtCap() (gas: 98492 → 98492 | 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: 17627 → 17627 | 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_withinBounds() (gas: 20560 → 20560 | 0 0.000%)
━ PublisherRegistryTest::test_transfer_cancelByOwner() (gas: 78690 → 78690 | 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: 68566 → 68566 | 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%)
━ StakingRegistryTest::testFuzz_slash_threeLegsSumToSlashAmount(uint256) (gas: 267920 → 267920 | 0 0.000%)
━ StakingRegistryTest::test_bindNodeId_preRegistrationBindsWithoutActiveNode() (gas: 121331 → 121331 | 0 0.000%)
━ StakingRegistryTest::test_bindNodeId_revertsIfBoundToOther() (gas: 380009 → 380009 | 0 0.000%)
━ StakingRegistryTest::test_bindNodeId_revertsOnBadBindingSig() (gas: 383379 → 383379 | 0 0.000%)
━ StakingRegistryTest::test_bindNodeId_revertsOnRejectedEd25519() (gas: 390385 → 390385 | 0 0.000%)
━ StakingRegistryTest::test_bindNodeId_revertsOnZeroNodeId() (gas: 378763 → 378763 | 0 0.000%)
━ StakingRegistryTest::test_bindNodeId_rotatesToNewNodeId() (gas: 432113 → 432113 | 0 0.000%)
━ StakingRegistryTest::test_constructor_revertsOnOutOfBoundsMaxMultiaddrSize() (gas: 136227 → 136227 | 0 0.000%)
━ StakingRegistryTest::test_constructor_revertsOnOutOfBoundsMinStake() (gas: 135680 → 135680 | 0 0.000%)
━ StakingRegistryTest::test_constructor_revertsOnOutOfBoundsMultiaddrCooldown() (gas: 73575 → 73575 | 0 0.000%)
━ StakingRegistryTest::test_constructor_revertsOnOutOfBoundsUnbondingPeriod() (gas: 135868 → 135868 | 0 0.000%)
━ StakingRegistryTest::test_constructor_revertsOnZeroAdmin() (gas: 71161 → 71161 | 0 0.000%)
━ StakingRegistryTest::test_constructor_revertsOnZeroToken() (gas: 71099 → 71099 | 0 0.000%)
━ StakingRegistryTest::test_constructor_revertsOnZeroVerifier() (gas: 71112 → 71112 | 0 0.000%)
━ StakingRegistryTest::test_constructor_setsImmutableAndState() (gas: 33068 → 33068 | 0 0.000%)
━ StakingRegistryTest::test_deregisterNode_flipsFlagAndRemovesFromActiveSet() (gas: 358604 → 358604 | 0 0.000%)
━ StakingRegistryTest::test_deregisterNode_revertsWhenNotActive() (gas: 20444 → 20444 | 0 0.000%)
━ StakingRegistryTest::test_ejectNode_flipsBothFlagsWhenRegistered() (gas: 378374 → 378374 | 0 0.000%)
━ StakingRegistryTest::test_ejectNode_revertsWithoutBlacklistRole() (gas: 13043 → 13043 | 0 0.000%)
━ StakingRegistryTest::test_ejectNode_unregisteredOperator_onlySetsFlag() (gas: 117141 → 117141 | 0 0.000%)
━ StakingRegistryTest::test_getActiveNodes_paginationBounds() (gas: 984926 → 984926 | 0 0.000%)
━ StakingRegistryTest::test_isActive_falseWhenAnyStakeInUnbonding() (gas: 425144 → 425144 | 0 0.000%)
━ StakingRegistryTest::test_isActive_requiresStakeAndRegistration() (gas: 426308 → 426308 | 0 0.000%)
━ StakingRegistryTest::test_reRegisterSameNodeId_afterDeregister_works() (gas: 425547 → 425547 | 0 0.000%)
━ StakingRegistryTest::test_reclaimNodeId_clearsRecordForDeregisteredHolder() (gas: 369655 → 369655 | 0 0.000%)
━ StakingRegistryTest::test_reclaimNodeId_revertsIfNotBound() (gas: 20426 → 20426 | 0 0.000%)
━ StakingRegistryTest::test_reclaimNodeId_revertsOnRejectedEd25519() (gas: 380078 → 380078 | 0 0.000%)
━ StakingRegistryTest::test_reclaimNodeId_tearsDownHolderBinding() (gas: 370235 → 370235 | 0 0.000%)
━ StakingRegistryTest::test_reclaimThenReRegister_recoversNodeId() (gas: 641580 → 641580 | 0 0.000%)
━ StakingRegistryTest::test_recordSettlement_revertsWithoutReporterRole() (gas: 13135 → 13135 | 0 0.000%)
━ StakingRegistryTest::test_recordSettlement_updatesTimestamp() (gas: 39735 → 39735 | 0 0.000%)
━ StakingRegistryTest::test_registerNode_happyPath() (gas: 426149 → 426149 | 0 0.000%)
━ StakingRegistryTest::test_registerNode_revertsBelowMinStake() (gas: 114102 → 114102 | 0 0.000%)
━ StakingRegistryTest::test_registerNode_revertsOnAlreadyRegistered() (gas: 380213 → 380213 | 0 0.000%)
━ StakingRegistryTest::test_registerNode_revertsOnBadBindingSignature() (gas: 124838 → 124838 | 0 0.000%)
━ StakingRegistryTest::test_registerNode_revertsOnNodeIdBoundToOther() (gas: 428375 → 428375 | 0 0.000%)
━ StakingRegistryTest::test_registerNode_revertsOnRejectedEd25519Signature() (gas: 135944 → 135944 | 0 0.000%)
━ StakingRegistryTest::test_registerNode_revertsOnZeroNodeId() (gas: 110245 → 110245 | 0 0.000%)
━ StakingRegistryTest::test_registerNode_revertsWhenEjected() (gas: 138596 → 138596 | 0 0.000%)
━ StakingRegistryTest::test_registerNode_revertsWhenMultiaddrsTooLarge() (gas: 112641 → 112641 | 0 0.000%)
━ StakingRegistryTest::test_registerNode_revertsWhenRegionHintTooLong() (gas: 112451 → 112451 | 0 0.000%)
━ StakingRegistryTest::test_requestUnstake_movesAmountToUnbonding() (gas: 137411 → 137411 | 0 0.000%)
━ StakingRegistryTest::test_requestUnstake_revertsOnInflightRequest() (gas: 139987 → 139987 | 0 0.000%)
━ StakingRegistryTest::test_requestUnstake_revertsOnInsufficientStake() (gas: 89097 → 89097 | 0 0.000%)
━ StakingRegistryTest::test_setMaxMultiaddrSize_withinBounds() (gas: 20275 → 20275 | 0 0.000%)
━ StakingRegistryTest::test_setMinStake_revertsOutOfBounds() (gas: 17758 → 17758 | 0 0.000%)
━ StakingRegistryTest::test_setMinStake_withinBoundsSucceeds() (gas: 20278 → 20278 | 0 0.000%)
━ StakingRegistryTest::test_setUnbondingPeriod_revertsOutOfBounds() (gas: 17636 → 17636 | 0 0.000%)
━ StakingRegistryTest::test_slashAutoEject_bumpsRegistrationNonce() (gas: 541090 → 541090 | 0 0.000%)
━ StakingRegistryTest::test_slash_appliesToActivePlusUnbonding() (gas: 307767 → 307767 | 0 0.000%)
━ StakingRegistryTest::test_slash_autoEjectAlsoFlipsNodeActive() (gas: 585309 → 585309 | 0 0.000%)
━ StakingRegistryTest::test_slash_distributes50_30_20() (gas: 266842 → 266842 | 0 0.000%)
━ StakingRegistryTest::test_slash_drawsFromUnbondingWhenActiveInsufficient() (gas: 312489 → 312489 | 0 0.000%)
━ StakingRegistryTest::test_slash_notifiesSafetyReserve() (gas: 262190 → 262190 | 0 0.000%)
━ StakingRegistryTest::test_slash_revertsOnZeroChallenger() (gas: 93042 → 93042 | 0 0.000%)
━ StakingRegistryTest::test_slash_revertsWhenSafetyReserveNotWired() (gas: 102865 → 102865 | 0 0.000%)
━ StakingRegistryTest::test_slash_revertsWithoutSlashRole() (gas: 92618 → 92618 | 0 0.000%)
━ StakingRegistryTest::test_slash_tier1_is5Percent() (gas: 259202 → 259202 | 0 0.000%)
━ StakingRegistryTest::test_slash_tier2_is15Percent() (gas: 323751 → 323751 | 0 0.000%)
━ StakingRegistryTest::test_slash_tier3Stays50PercentBeyondThird() (gas: 522342 → 522342 | 0 0.000%)
━ StakingRegistryTest::test_slash_tier3_is50Percent() (gas: 389435 → 389435 | 0 0.000%)
━ StakingRegistryTest::test_stake_addsToActiveStake() (gas: 87045 → 87045 | 0 0.000%)
━ StakingRegistryTest::test_stake_clearsEjectedFlagWhenRestakedToMinimum() (gas: 137525 → 137525 | 0 0.000%)
━ StakingRegistryTest::test_stake_revertsOnZeroAmount() (gas: 18266 → 18266 | 0 0.000%)
━ StakingRegistryTest::test_stake_revertsWhenPaused() (gas: 45245 → 45245 | 0 0.000%)
━ StakingRegistryTest::test_unstake_returnsTokensAfterUnbonding() (gas: 135708 → 135708 | 0 0.000%)
━ StakingRegistryTest::test_unstake_revertsBeforeUnbondingComplete() (gas: 128446 → 128446 | 0 0.000%)
━ StakingRegistryTest::test_unstake_revertsWithNoRequest() (gas: 22517 → 22517 | 0 0.000%)
━ StakingRegistryTest::test_updateMultiaddrs_replacesAndStampsTimestamp() (gas: 404142 → 404142 | 0 0.000%)
━ StakingRegistryTest::test_updateMultiaddrs_respectsCooldown() (gas: 426495 → 426495 | 0 0.000%)
━ StakingRegistryTest::test_updateMultiaddrs_revertsWhenNotActive() (gas: 15622 → 15622 | 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%)
━ VotingEscrowTest::testFuzz_balanceOf_neverExceedsAmount_decaysMonotonically(uint256,uint256,uint256) (gas: 2999794 → 2999794 | 0 0.000%)
━ VotingEscrowTest::test_balanceOfAt_historical() (gas: 2997904 → 2997904 | 0 0.000%)
━ VotingEscrowTest::test_balanceOfAt_revertsFutureLookup() (gas: 2992234 → 2992234 | 0 0.000%)
━ VotingEscrowTest::test_balanceOf_decaysLinearlyToZero() (gas: 3008821 → 3008821 | 0 0.000%)
━ VotingEscrowTest::test_balanceOf_zeroForNeverLocked() (gas: 10164 → 10164 | 0 0.000%)
━ VotingEscrowTest::test_constructor_revertsBadDurations() (gas: 126152 → 126152 | 0 0.000%)
━ VotingEscrowTest::test_constructor_revertsMaxLockExceedsWalkCap() (gas: 1713697 → 1713697 | 0 0.000%)
━ VotingEscrowTest::test_constructor_revertsZeroToken() (gas: 64692 → 64692 | 0 0.000%)
━ VotingEscrowTest::test_constructor_setsState() (gas: 15440 → 15440 | 0 0.000%)
━ VotingEscrowTest::test_createLock_locksAndSetsWeight() (gas: 2996643 → 2996643 | 0 0.000%)
━ VotingEscrowTest::test_createLock_revertsAboveMaxDuration() (gas: 51400 → 51400 | 0 0.000%)
━ VotingEscrowTest::test_createLock_revertsBelowMinDuration() (gas: 51231 → 51231 | 0 0.000%)
━ VotingEscrowTest::test_createLock_revertsExistingLock() (gas: 3019383 → 3019383 | 0 0.000%)
━ VotingEscrowTest::test_createLock_revertsZeroAmount() (gas: 18380 → 18380 | 0 0.000%)
━ VotingEscrowTest::test_createLock_weekAligned() (gas: 2990616 → 2990616 | 0 0.000%)
━ VotingEscrowTest::test_increaseAmount_raisesWeight() (gas: 3110971 → 3110971 | 0 0.000%)
━ VotingEscrowTest::test_increaseAmount_revertsNoLock() (gas: 20476 → 20476 | 0 0.000%)
━ VotingEscrowTest::test_increaseUnlockTime_extendsAndRaisesWeight() (gas: 3101851 → 3101851 | 0 0.000%)
━ VotingEscrowTest::test_increaseUnlockTime_revertsAboveMax() (gas: 2996215 → 2996215 | 0 0.000%)
━ VotingEscrowTest::test_increaseUnlockTime_revertsNotInFuture() (gas: 2996294 → 2996294 | 0 0.000%)
━ VotingEscrowTest::test_noTransferSurface() (gas: 2995268 → 2995268 | 0 0.000%)
━ VotingEscrowTest::test_pause_blocksCreateLock() (gas: 75658 → 75658 | 0 0.000%)
━ VotingEscrowTest::test_totalSupplyAt_revertsFutureLookup() (gas: 9014 → 9014 | 0 0.000%)
━ VotingEscrowTest::test_totalSupplyAt_zeroBeforeGenesis() (gas: 2993507 → 2993507 | 0 0.000%)
━ VotingEscrowTest::test_totalSupply_currentMatchesSum() (gas: 3279374 → 3279374 | 0 0.000%)
━ VotingEscrowTest::test_totalSupply_equalsSumOfBalances_multipleLocks() (gas: 4790797 → 4790797 | 0 0.000%)
━ VotingEscrowTest::test_withdraw_afterExpiry() (gas: 5477775 → 5477775 | 0 0.000%)
━ VotingEscrowTest::test_withdraw_revertsBeforeExpiry() (gas: 2995832 → 2995832 | 0 0.000%)
━ VotingEscrowTest::test_withdraw_revertsNoLock() (gas: 20423 → 20423 | 0 0.000%)
↑ VotingEscrowTest::testFuzz_totalSupplyMatchesSum(uint256,uint256,uint256,uint256,uint256) (gas: 3297722 → 3302845 | 5123 0.155%)
↓ PublisherRegistryTest::testFuzz_createNamespace_idsAreSequentialAndOwned(uint8) (gas: 371835 → 357922 | -13913 -3.742%)

--------------------------------------------------------------------------------
Total tests: 233, ↑ 1, ↓ 1, ━ 231
Overall gas change: -8790 (-0.009%)

Run: 26300354345

@github-actions

github-actions Bot commented May 22, 2026 •

Copy link
Copy Markdown

Contracts coverage

Line coverage: 94.78% (744/785 lines)
▲ +0.93pp vs base (93.85% → 94.78%)
Run: 26300354345

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

Adds the ADR 011 “ContentBlacklist” core contract to the Foundry contracts suite, providing governance/emergency-controlled hash blacklisting (global + regional) and origin blacklisting (with StakingRegistry.ejectNode integration), plus a polling-friendly version counter.

Changes:

  • Introduces ContentBlacklist core contract: global/regional hash entries, origin entries w/ eject cross-call, emergency category expiry + sunset, regional-body registry, and compliance-window parameter.
  • Adds minimal IStakingRegistryEject interface and a test mock, plus a comprehensive Foundry test suite for the new surface.
  • Updates ADR 011 compliance-window semantics and documents (hash, region) keying + getEntryInRegion; regenerates gas snapshot.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
contracts/src/ContentBlacklist.sol Implements the on-chain blacklist core (hash + origin, governance/emergency/regional paths, versioning, views/events).
contracts/src/interfaces/IStakingRegistryEject.sol Minimal interface for StakingRegistry.ejectNode dependency.
contracts/test/ContentBlacklist.t.sol Foundry tests covering constructor, role-gating, global/regional/emergency/origin flows, expiry/sunset, and compliance window/versioning.
contracts/test/mocks/MockStakingRegistryEject.sol Test stand-in for StakingRegistry eject surface used by ContentBlacklist tests.
contracts/.gas-snapshot Gas snapshot update to include new tests and refreshed baselines.
adr/011-content-takedown.md ADR clarifications: (hash, region) keying + getEntryInRegion, and corrected compliance/grace semantics.

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

Comment thread contracts/src/ContentBlacklist.sol Resolved

@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 implements the ContentBlacklist contract and its associated interface, providing a governance-controlled mechanism for on-chain hash and origin blacklisting as specified in ADR 011. The system supports global and regional hash blacklists, origin-based node ejection from the StakingRegistry, and an emergency multisig path with category-specific auto-expiry. Review feedback recommends standardizing all timestamp and duration fields to uint256 for consistency with the broader protocol and ADR specifications. Additionally, it is suggested that the getEntryInRegion function be updated to handle empty region strings gracefully, ensuring consistent behavior across the contract's view functions.

Comment thread contracts/src/ContentBlacklist.sol Resolved
Comment thread contracts/src/ContentBlacklist.sol Resolved
Comment thread contracts/src/ContentBlacklist.sol Resolved
Comment thread contracts/src/ContentBlacklist.sol Resolved
Comment thread contracts/src/ContentBlacklist.sol Resolved
alpergundogdu and others added 2 commits May 22, 2026 17:37
The `addedAt == 0` revert guards in _removeHashEntry / removeOrigin are
presence checks (0 = no entry), not value-bearing equalities. Annotate
with slither-disable-next-line incorrect-equality (the same pattern
StakingRegistry uses for its presence/amount sentinels). The remaining
block.timestamp findings are LOW severity (below fail_on: medium), as in
the already-merged StakingRegistry / PublisherRegistry.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…canonical region)

- Use uint256 for all timestamp / duration fields (blacklistDeadline,
  complianceWindow, BlacklistEntry + OriginEntry fields, constants),
  matching StakingRegistry and the ADR 011 struct; drop the now-unneeded
  SafeCast.
- removeHashRegional emits the canonical (upper-cased) region in
  HashRemoved, matching HashBlacklisted, instead of the raw caller input.
- getEntryInRegion resolves an empty region to the global entry instead
  of reverting, consistent with isBlacklistedInRegion.
- MockStakingRegistryEject.ejectNode marked override.
- Add tests for getEntryInRegion (regional + empty/global) and the
  canonical-region HashRemoved emission.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
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.

3 participants