Repository navigation
docs(adr): OriginAssignment edge cases + PublisherRegistry setters (#450 §C.2 + §C.3) - #461
Merged
Merged
Conversation
§C.2 + §C.3) Last slice of #450. Closes the two §C bullets: pin OriginAssignment edge-case behaviors (§C.2) and surface PublisherRegistry's governable- parameter setters (§C.3). ADR 011 § Contract: OriginAssignment additions: - cancelAssignmentProposal(namespaceId) — publisher-only escape for pending proposals (vs the implicit overwrite via re-propose). - activateAssignment now documented to auto-clear pending proposals on validation revert (single failure-mode-single-recovery). - revokeAssignment now reverts on non-member operator (typo protection); retains the existing under-redundancy-allowed semantics for urgent revocations. - New AssignmentProposalCancelled event with autoCleared flag. ADR 011 § Edge cases (new subsection): Pins seven previously-implicit behaviors: - Empty operator array reverts (use revokeAssignment for removal) - Pending proposals never expire (publisher manages lifecycle) - Re-proposal overwrites and resets timelock counter; emits cancel + propose - Activation-revert auto-clears the pending proposal - ContentBlacklist-unbound deployment-window: skip blacklist check, validate only against StakingRegistry; setContentBlacklist(address(0)) reverts to prevent regression - revokeAssignment of non-member operator reverts (typo protection) - revokeAssignment dropping below minRedundancy is allowed by design (urgent path; off-chain consumers observe under-redundancy via getOrigins) ADR 002 § Contract: PublisherRegistry additions: - setMaxNamespacesPerPublisher(newMax) and setNamespaceTransferTimelock (newTimelock) setters, GOVERNANCE_ROLE-gated with bounds enforced at the contract layer per ADR 009 (max [1, 1000], timelock [24h, 30d]). - maxNamespacesPerPublisher() and namespaceTransferTimelock() views. - MaxNamespacesPerPublisherUpdated and NamespaceTransferTimelockUpdated events. - §93 prose updated: drop "governance-controlled parameter store" framing; values live on PublisherRegistry itself (per planning #14). Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
There was a problem hiding this comment.
Code Review
This pull request updates the content addressing and takedown ADRs to include governable parameters and refined assignment logic. Key changes include adding setters and safety bounds for namespace limits and transfer timelocks in the PublisherRegistry, as well as introducing a proposal cancellation mechanism and auto-clearing logic in OriginAssignment. Feedback focuses on ensuring documentation consistency by using seconds instead of human-readable time units for all parameter bounds and defaults to prevent implementation errors.
…review) Address Gemini review on PR #461: pin all timelock bounds to seconds (the unit the contract actually enforces) with human-readable forms in parentheses for cross-reference. Affects: - Solidity setter comment: "[86400, 2592000] (in seconds; 24 h – 30 days)" replaces the prior "[24h, 30d] (in seconds)" mixed form. - Prose §93: bounds and defaults stated as both seconds and human-readable; the contract-layer enforcement is in seconds. Convention now clear: on-chain bounds are seconds; human-readable forms are an aid to the reader, not the source of truth. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
1 of 4 tasks
alpergundogdu
added a commit
that referenced
this pull request
May 7, 2026
Switch summaryWindow / challengeWindow rows to seconds-primary formatting (human-readable in parens), matching the convention established in PR #461 for namespaceTransferTimelock — seconds is the unit the contract setter actually consumes. claimWindow stays in epochs (it's a count, not a wall-clock duration); note added that the contract derives the seconds-domain deadline internally via the immutable epochLength multiplier. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
alpergundogdu
added a commit
that referenced
this pull request
May 7, 2026
…ation, ReceiptFraud offense) (#462) * docs(adr): pin gap-fix items left open by #450 (timing bounds, commitEpochSummary validation, receipt-fraud offense) Three deferred items from the audit follow-up are pinned here as a single coherent block, since they share the "lock down what was still vague after the #450 surface-gap audit" theme. ADR 026 §11 — timing-window safety bounds: - summaryWindow: 7 days default, [3 days, 14 days] bounds — gives honest operators time to aggregate receipts off-chain (lower) without delaying gauge finality more than a month at the most permissive setting (upper). - challengeWindow: 7 days default, [3 days, 14 days] bounds — gives bonded challengers time to verify signatures + identity-diversity heuristics (lower) without indefinitely delaying gauge payouts (upper). - claimWindow: 26 epochs default, [13, 52] epochs bounds — promoted from §2 prose to the canonical bounds table. - Cross-parameter invariant: claimWindow > challengeWindow enforced at the setter layer so a frozen-with-undetected-fraud summary cannot outlive the challenge window before the operator's claim resolves. ADR 027 §4 — commitEpochSummary validation rules: - New "commitEpochSummary validation rules" subsection explicitly pins six checks the contract MUST enforce: argument-struct consistency, epoch validity (epochId < currentEpoch), summary-window-open timing, cryptographic anti-griefing (summary.aggregateRoot == current MMR root), last-write-wins replacement during the summary window, and trust-then-challenge for the operator-asserted fields. - Third-party submission preserved (per the existing prose) — the cryptographic check on aggregateRoot makes the submitter's identity irrelevant for correctness; relayers can submit on operators' behalf without trust assumptions. ADR 014 + ADR 027 §5 — receipt-fraud offense: - New OffenseType.ReceiptFraud appended to the canonical enum (preserving the existing four ordinals so SafetyReserve indexing stays stable). - New ISlashJudge.submitReceiptFraudChallenge(challengedNode, epochId, fraudEvidence) entry point. No counter-evidence window — Merkle inclusion/exclusion proofs against the operator's own on-chain aggregateRoot are cryptographically dispositive. - Receipt-fraud preimage formula added to §3 evidenceHash spec: keccak256(abi.encode(uint8(OffenseType.ReceiptFraud), epochId, aggregateRoot)) — stable across alternate fraud-evidence formats (different Merkle proofs against the same aggregateRoot produce the same evidenceHash). - ADR 027 §5 bond model: 100 TOKEN bond (matches existing challengeBond, governable [10, 1000]); 5/15/50% escalating slash percentage on successful challenge; 50/30/20 challenger / SafetyReserve / burn distribution; 50/50 burn-or-to-operator on unsuccessful — all matching the four existing offense types. Over-claimed claimedBytes / claimedDistinctClients fields zeroed for the epoch on success (gauge eligibility forfeiture stacks with the stake slash). Closes the three "honest gaps that remain (deferred to #451 lock-down)" flagged in the cross-PR audit on the #450 series. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * docs(adr): unit consistency on §11 timing-window bounds (Gemini review) Switch summaryWindow / challengeWindow rows to seconds-primary formatting (human-readable in parens), matching the convention established in PR #461 for namespaceTransferTimelock — seconds is the unit the contract setter actually consumes. claimWindow stays in epochs (it's a count, not a wall-clock duration); note added that the contract derives the seconds-domain deadline internally via the immutable epochLength multiplier. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Sixth and final slice of #450. Closes the two §C bullets —
OriginAssignmentedge cases (§C.2) andPublisherRegistrycap/timelock setters (§C.3).What's added
ADR 011 § Contract: OriginAssignment additions:
cancelAssignmentProposal(namespaceId)revokeAssignment(...)clarifiedactivateAssignment(...)clarifiedAssignmentProposalCancelled(namespaceId, proposer, autoCleared)ADR 011 § Edge cases (new subsection):
Pins seven previously-implicit behaviors:
revokeAssignmentfor removal — explicit intent)readyAt; emitsAssignmentProposalCancelled+AssignmentProposedContentBlacklist-unbound deployment-window:activateAssignmentskips the blacklist check and validates only againstStakingRegistry.isActive;setContentBlacklist(address(0))reverts to prevent regressionrevokeAssignmentof non-member operator reverts (typo protection)revokeAssignmentdropping belowminRedundancyis allowed by design (urgent path)ADR 002 § Contract: PublisherRegistry additions:
setMaxNamespacesPerPublisher(newMax)GOVERNANCE_ROLE; bounded[1, 1000]per ADR 009setNamespaceTransferTimelock(newTimelock)GOVERNANCE_ROLE; bounded[24h, 30d]per ADR 009maxNamespacesPerPublisher()/namespaceTransferTimelock()MaxNamespacesPerPublisherUpdated/NamespaceTransferTimelockUpdatedeventsPublisherRegistryitself, per planning #14Decisions baked in (per planning conversation)
cancelAssignmentProposal, callable any time beforeactivateAssignmentproposeAssignmentoverwrites; resetsreadyAtAssignmentProposalCancelled(autoCleared=true)revokeAssignmentof non-memberrevokeAssignmentbelow min-redundancyContentBlacklistunbound during deployStakingRegistryonly;setContentBlacklist(address(0))reverts#450 status after this PR merges
All 13 acceptance bullets closed:
StakingRegistry.isActive(operator)(#455)nodeIdOfreturn type aligned (#455)commitEpochReceiptRoot/commitEpochSummaryfull spec (#460)PaymentChannel.setFeeRoutersetter spec (#455)StakingRegistry → SafetyReserveredirect call signature (#459)Test plan
pre-commit run --files adr/002-content-addressing.md adr/011-content-takedown.mdcleanRelated
🤖 Generated with Claude Code