Repository navigation
docs(adr): add DAO-governed origin assignment authority - #390
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the ADR set to specify a DAO-governed “positive authority” mechanism for origin assignment, introducing publisher/namespace identity and an OriginAssignment registry while preserving permissionless caching and a default-open namespace (namespaceId == 0).
Changes:
- Adds publisher/namespace identity primitives (ADR 002) and defines DAO-ratified origin operator sets per namespace (ADR 011), with blacklist integration.
- Extends the probe protocol to include a signed
is_originsignal and ties it to slashing semantics (ADR 005), with supporting updates across discovery/payments/network ADRs. - Updates governance bounds and contract interaction docs to include new contracts, roles, and deployment wiring (ADR 009, ADR 016).
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| adr/architecture.md | Updates high-level architecture to reflect cache-permissionless vs DAO-gated origin role for registered namespaces. |
| adr/001-network.md | Aligns network consequences with origin gating + minimum redundancy for registered namespaces. |
| adr/002-content-addressing.md | Introduces publisher identity, namespaces, default-open namespace semantics, and PublisherRegistry interface. |
| adr/003-payments.md | Reframes redundancy/withholding mitigation around DAO-supervised origin sets for registered namespaces. |
| adr/005-protocol.md | Adds is_origin to ProbeResponse and defines authorization + phantom-origin slashing rules. |
| adr/009-governance.md | Adds safety bounds for origin assignment and publisher/namespace governance parameters. |
| adr/011-content-takedown.md | Adds origin assignment authority section and integrates origin blacklisting with assignment eviction. |
| adr/016-contract-interactions.md | Adds PublisherRegistry/OriginAssignment to inventories, graphs, role matrix, and reentrancy tables. |
| adr/022-content-discovery.md | Clarifies terminology and adds origin-only discovery flow via on-chain origin sets. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Code Review
This pull request introduces a framework for publisher identity and origin assignment authority, defining the PublisherRegistry and OriginAssignment contracts to manage namespaces and authorized origin operators. The changes integrate these primitives into the network topology, protocol probes, governance parameters, and slashing mechanisms, establishing a DAO-governed model for content origins. Feedback identifies several technical issues, including the lack of historical state lookups in the OriginAssignment interface required for slashing verification, potential gas limit exhaustion in bulk assignment removals, and the need for uniqueness validation in operator sets to prevent bypassing redundancy invariants. Additionally, a correction to the documented contract deployment sequence is required to resolve circular dependencies.
- Phantom-origin slashing: add namespaceOfAt and isAuthorizedOriginAt historical views with checkpoint storage; SlashJudge evaluates against on-chain state at the response timestamp, not current state. Bounded by Max evidence age (ADR 009). - Replace cross-contract removeAllAssignments (unbounded gas) with runtime-check pattern: blacklisted operators are treated as unauthorized at probe / peer-table / slashing time regardless of stale OriginAssignment state. Permissionless pruneBlacklistedAssignment for lazy storage cleanup. - Reorder ADR 016 deployment: PublisherRegistry → OriginAssignment → ContentBlacklist (resolves circular dependency on construction). - Origin-only discovery in ADR 022: DHT remains primary; on-chain OriginAssignment.getOrigins is fallback with operator → NodeId mapping via StakingRegistry.getActiveNodes. - Add operator-uniqueness validation to proposeAssignment (prevents bypassing minRedundancy via duplicates). - Add cross-parameter invariant 1 ≤ minRedundancy ≤ maxOriginsPerNamespace to ADR 009. - Add StakingRegistry.isActive to ADR 016 proposeAssignment guards (table now matches the prose and ADR 011). - Update ADR 011 ADRs Affected re: ADR 022 — DHT STORE remains permissionless; origin authorization enforced at probe time. - Update ADR 013 v1 baseline to include is_origin in ProbeResponse signed-fields table. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
/gemini review |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 10 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Code Review
This pull request introduces a comprehensive governance framework for content origins, establishing publisher identities and namespaces to link content hashes to responsible parties. It adds the PublisherRegistry and OriginAssignment contracts, enabling DAO-supervised origin sets with protocol-enforced redundancy floors and a new 'phantom-origin' slashing mechanism. The protocol is updated to include an is_origin flag in probe responses, and discovery mechanisms now include on-chain fallbacks for finding authorized origins. Feedback focuses on completing the contract interfaces by adding missing governable setters and garbage collection functions, resolving signature discrepancies in documentation tables, and ensuring the ContentBlacklist supports historical lookups necessary for the proposed slashing logic.
Resolves Copilot inline comments on commit 52119cc: - ADR 011 §Decision and §Lifecycle, ADR 011 Consequences: replace "atomically removes" / "atomically evicted" / "no stale entries" language with the actual model (runtime check is the security primitive; storage cleanup via pruneBlacklistedAssignment is lazy and permissionless). - ADR 011 §Hash Evasion: fix pruneBlacklistedAssignments → singular pruneBlacklistedAssignment to match the interface. - ADR 011 IOriginAssignment + ADR 016 GOVERNANCE_ROLE row + reentrancy table: add the missing setMaxOriginsPerNamespace setter (ADR 009 already documents the parameter as governable). - ADR 003 §Withholding mitigations: scope the "any staked operator may serve" line to the default-open bootstrap window; post-activation, withholding mitigation is the allow-list's redundancy floor. - ADR 016 deployment dependency graph: drop stale CB → OA edge (ContentBlacklist no longer cross-calls OriginAssignment). - ADR 016 OriginAssignment construction notes: pruneBlacklistedAssignment reverts (not no-op) until the ContentBlacklist address is bound, matching the post-deploy initialization section. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a formal on-chain governance framework for origin node assignments, establishing PublisherRegistry and OriginAssignment contracts to manage content namespaces and authorized operator sets. The origin role becomes DAO-governed for both registered namespaces and default-open content, while the cache-only role remains permissionless. Key protocol updates include an is_origin flag in probe responses and the implementation of phantom-origin slashing to enforce authorization. Feedback focused on improving the readability of the ADR documentation by simplifying complex sentence structures in several files.
|
Design issue surfaced during reconstructability audit: single-claim creates stranded-hash + squatting. Two failure modes the PR doesn't address with
Proposed fix: multi-claim, no coordination required. Drop the one-claim rule; let any namespace independently claim any hash. Mechanical changes:
What it loses: the framing of a claim as "official publisher of this content." That framing was never load-bearing — slashing, takedown, and probe verification are hash-keyed and operator-keyed, never publisher-keyed. What it gains:
Diff scope: ADR 002 (claim semantics + interface views), ADR 011 § Historical state and slashing evidence (OR-search predicate), ADR 016 § PublisherRegistry table (drop Amending now. |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a comprehensive framework for publisher identity and origin assignment authority across the network. It defines namespaces, content claims, and the PublisherRegistry and OriginAssignment contracts to manage authorized origin sets with protocol-enforced redundancy invariants. The ProbeResponse protocol is updated to include an is_origin flag, supported by a new phantom-origin slashing mechanism. Feedback addresses the need for interface consistency in IOriginAssignment, correction of a type mismatch in pseudo-code logic, and clarification of checkpoint pruning rules to ensure security. Suggestions were also provided to align contract interaction tables with multi-claim semantics and simplify function signatures in the role matrix.
|
Filed #399 capturing the |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request establishes a decentralized framework for publisher identity and origin assignment authority, introducing the PublisherRegistry and OriginAssignment contracts to manage content namespaces and DAO-authorized origin sets. The changes formalize the distinction between permissionless cache roles and governed origin roles while establishing redundancy floors for content availability. Feedback focuses on enhancing documentation clarity by simplifying verbose descriptions of storage cleanup and optimizing the layout of the contract inventory table for better readability.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a formal system for publisher identity and origin assignment by adding the PublisherRegistry and OriginAssignment contracts. These changes establish a DAO-governed framework for authorizing origin operators, implementing redundancy floors, and managing content namespaces. Review feedback highlights a potential 'claim-censor' vulnerability in the default-open logic and suggests improving gas efficiency through batch content claims. Additionally, suggestions were made to streamline the DAO ratification process for high-churn assignments, restrict namespace transfer finalization to the new owner, and ensure operator status is re-verified during activation.
Resolves #189. Distributes the design across 9 existing draft ADRs (no new ADR) per planning direction: - ADR 002: publisher/namespace identity primitive + IPublisherRegistry - ADR 011: Origin Assignment Authority section + IOriginAssignment; DAO ratifies publisher-proposed operator sets via the standard timelock path - ADR 005: ProbeResponse extended with is_origin field; phantom-origin slashing for false origin claims in registered namespaces - ADR 016: PublisherRegistry and OriginAssignment added to inventory, deployment order, call graph, role matrix, and reentrancy analysis - ADR 009: new governable parameters with safety bounds (min-redundancy, assignment timelock, namespace caps, transfer timelock) and rationale - ADR 022: resolves "publisher" terminology collision; documents origin-only discovery via OriginAssignment.getOrigins - ADR 001: rewrites the unconditional permissionless-origin claim; cache role permissionless, origin role DAO-gated for registered namespaces - ADR 003: rewrites multi-origin redundancy as DAO-supervised via the OriginAssignment min-redundancy invariant - architecture.md: high-level overview reflects the role split The default-open namespace (namespaceId == 0) preserves the permissionless / long-tail story for unregistered content. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
- Phantom-origin slashing: add namespaceOfAt and isAuthorizedOriginAt historical views with checkpoint storage; SlashJudge evaluates against on-chain state at the response timestamp, not current state. Bounded by Max evidence age (ADR 009). - Replace cross-contract removeAllAssignments (unbounded gas) with runtime-check pattern: blacklisted operators are treated as unauthorized at probe / peer-table / slashing time regardless of stale OriginAssignment state. Permissionless pruneBlacklistedAssignment for lazy storage cleanup. - Reorder ADR 016 deployment: PublisherRegistry → OriginAssignment → ContentBlacklist (resolves circular dependency on construction). - Origin-only discovery in ADR 022: DHT remains primary; on-chain OriginAssignment.getOrigins is fallback with operator → NodeId mapping via StakingRegistry.getActiveNodes. - Add operator-uniqueness validation to proposeAssignment (prevents bypassing minRedundancy via duplicates). - Add cross-parameter invariant 1 ≤ minRedundancy ≤ maxOriginsPerNamespace to ADR 009. - Add StakingRegistry.isActive to ADR 016 proposeAssignment guards (table now matches the prose and ADR 011). - Update ADR 011 ADRs Affected re: ADR 022 — DHT STORE remains permissionless; origin authorization enforced at probe time. - Update ADR 013 v1 baseline to include is_origin in ProbeResponse signed-fields table. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
The default-open namespace was carved out of OriginAssignment as a permissionless escape hatch for unclaimed content, leaving phantom-origin claims for default-open hashes non-slashable, no DAO-accountable party for takedown, and no redundancy floor for long-tail availability. Extends OriginAssignment with a single global DAO-maintained allow-list keyed by namespaceId == 0, reusing the existing per-namespace storage and checkpoint history. Lifecycle is single-step governance under the standard 48h Governor timelock — no propose/ratify split, no second timelock parameter. Bootstrap rule: permissive (any active staker authorized) until the first non-empty activation flips defaultOpenAllowlistActive permanently and emits DefaultOpenAllowlistActivated. New parameters defaultOpenMinRedundancy (5–500, default 10) and defaultOpenMaxOrigins (20–500, default 100) with cross-parameter invariants enforced at the contract layer. Probe-time and slashing rules collapse to a uniform branch — no namespaceId == 0 special case downstream; isAuthorizedOriginAt(0, op, t) returns true for t < defaultOpenActivatedAt so pre-activation probes are not retroactively slashable. Updates ADRs 001, 002, 005, 009, 011, 016, 022, architecture.md, and the PoC/production seams appendix to remove the carve-out language and point at the new ADR 011 §Default-open allow-list. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Resolves Copilot inline comments on commit 52119cc: - ADR 011 §Decision and §Lifecycle, ADR 011 Consequences: replace "atomically removes" / "atomically evicted" / "no stale entries" language with the actual model (runtime check is the security primitive; storage cleanup via pruneBlacklistedAssignment is lazy and permissionless). - ADR 011 §Hash Evasion: fix pruneBlacklistedAssignments → singular pruneBlacklistedAssignment to match the interface. - ADR 011 IOriginAssignment + ADR 016 GOVERNANCE_ROLE row + reentrancy table: add the missing setMaxOriginsPerNamespace setter (ADR 009 already documents the parameter as governable). - ADR 003 §Withholding mitigations: scope the "any staked operator may serve" line to the default-open bootstrap window; post-activation, withholding mitigation is the allow-list's redundancy floor. - ADR 016 deployment dependency graph: drop stale CB → OA edge (ContentBlacklist no longer cross-calls OriginAssignment). - ADR 016 OriginAssignment construction notes: pruneBlacklistedAssignment reverts (not no-op) until the ContentBlacklist address is bound, matching the post-deploy initialization section. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Three reviewer agents flagged the same redundancies after round 2: - bootstrap rule restated 4× with subtle wording variations - runtime-check + lazy-prune pattern explained in 4 places - Solidity comment block re-stated the prose Lifecycle below it - "Unassigned" subsection was nested under "Default-open allow-list" - "Permissionless property" paragraph hedged twice over Compress to a single canonical Bootstrap subsection; replace later restatements with cross-references. Trim the setDefaultOpenAllowlist interface comment to a one-line pointer. Promote the unassigned-namespaces paragraph to its own §Unassigned namespaces section. Tighten the Decision bullet, Lifecycle step 4, the Permissionless property paragraph, and the Consequences bullet to point at §Interaction with ContentBlacklist and §Default-open allow-list rather than re-explain. No semantic change — same model, fewer words. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Closes the link-hygiene gaps surfaced by the issue #189 reconstructability audit. Two starting ADRs (002 and 011) named other ADRs in plain text where the convention elsewhere in the same files uses [ADR NNN](NNN-name.md): - ADR 002 §"Why this lives in ADR 002": the four ADRs named as referrers (011, 016, 005, 022) are now anchored links, with 011 and 005 pointing at the specific subsections (#origin-assignment-authority and the cdn/probe/v1 anchor) that justify ADR 002's role. - ADR 011 §"ADRs Affected": the seven plain-bold entries (001, 002, 003, 005, 009, 016, 022) now match the format already used for the ADR 026 entry in the same list. ADR 002 deep-links to #publisher-identity-and-namespaces; ADR 005 deep-links to #cdnprobev1--latency-probe (matching the existing intra-document reference at the §Interaction with ContentBlacklist bullet). No semantic change. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Three medium-priority readability comments from the post-link-fix Gemini review. All address the same shape — a single sentence stacking two or three clauses joined by em-dashes or semicolons — and split into shorter sentences without changing technical content: - ADR 001 §Consequences (positive #2): the origin-role description ran three concepts together (DAO-governance / registered vs default-open / bootstrap window). Now three sentences plus a See: line. - ADR 003 §Withholding (minimum-redundancy bullet): replace the semicolon-joined "owners propose; governance ratifies" with two sentences. - ADR 011 §Decision (positive-authority bullet): same propose/ratify pair, same split. No semantic change. All anchor links preserved. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
The previous one-namespace-per-hash + first-write-wins rule created two failure modes the PR did not address: - Stranded hashes: a namespace owner who lost keys, abandoned, or refused cooperation stranded every hash they had claimed, with no escape valve for another publisher or the DAO. The lifecycle (revocation, transfer) all required the current owner. - Squatting: any party could pre-claim popular hashes (e.g. a future release ISO's BLAKE3) and block the legitimate publisher. ADR 002 forward-referenced "ADR 016 for the dispute resolution rules and the consequences if a second claim is rejected"; ADR 016 only said revert(). The cross-reference promised more than it delivered. Drop the one-claim rule. Allow any non-zero namespace to claim any hash independently; reverts only on duplicate by the same namespace (idempotency). The set of operators authorized to serve the hash as origin is the union across claiming namespaces, plus the default-open allow-list when the claim set is empty. Mechanical changes: - ADR 002 § Default-open namespace + new § Multi-claim semantics: reframe claim from "authorial ownership" (never load-bearing) to "registration as a responsible origin authority". `namespaceOf` and `namespaceOfAt` return `uint256[]` instead of scalar; `claimContent` no longer reverts on cross-namespace duplicates. Storage becomes a per-hash append-only `(namespaceId, claimedAt)` array. - ADR 011 § Historical state and slashing evidence: `SlashJudge` predicate becomes an OR-search over the claiming-namespace set at the response timestamp. The `ProbeResponse` schema is unchanged — the signer asserts authorization as a property of the world; the protocol verifies it holds against any one claiming authority. No `claimed_namespace` field added. - ADR 016 § PublisherRegistry: drop "first-write-wins across non-zero namespaces" guard from `claimContent` row. Untouched: ContentBlacklist (hash-keyed, namespace-agnostic), OriginAssignment.proposeAssignment / activateAssignment / revokeAssignment (per-namespace, agnostic to how many namespaces claim a given hash), min-redundancy floor (per-namespace at activation; effective network-wide redundancy is now the sum across claiming namespaces — strictly better), default-open allow-list, ADR 005 ProbeResponse schema, ADR 003 § Content withholding, ADR 009 governance parameters. What we lose: the framing of an on-chain claim as "the official publisher of this content." That framing was never load-bearing on any protocol primitive — slashing, takedown, and probe verification are hash-keyed and operator-keyed, never publisher-keyed. What we gain: - Squatting becomes pointless: claiming a hash you do not intend to serve gates nothing. - Stranded hashes recover automatically: another publisher just claims independently and starts serving. - Per-namespace effective redundancy floors sum network-wide. - Design matches reality: Microsoft, Cloudflare, GitHub Releases, and mirrors all legitimately serve the same bytes with no need for the protocol to pretend one of them is the sole author. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Five medium-priority Gemini comments on the multi-claim flip — two were direct fallout from the type change (`namespaceOf` now returns an array), three were pre-existing nits worth fixing in the same pass. - ADR 005 § cdn/probe/v1 (`is_origin` rules and SlashJudge clause): the pseudo-code calls `OriginAssignment.isAuthorizedOrigin(namespaceOf(hash), operator)` and `…isAuthorizedOriginAt(namespaceOfAt(hash, t), operator, t)` — both type-mismatch after the array return. Replaced with the ∃-quantifier over the claiming set, with default-open as the empty-set fallback. Pointed the SlashJudge clause at ADR 011 § Historical state and slashing evidence rather than restate the predicate inline. - ADR 011 § Contract: OriginAssignment: added the missing `setContentBlacklist(address)` interface method. ADR 016 already references it as a post-deploy initialization step; the interface block was the orphan. - ADR 011 § Historical state and slashing evidence (pruning paragraph): spell out the two invariants pruning must respect — never prune the currently-active checkpoint (`revokedAt == type(uint64).max`); always retain the most recent checkpoint whose `activatedAt` precedes the start of the current evidence window so binary-search lookups at the window's lower edge stay valid. - ADR 016 § Off-Chain Read API: `namespaceOf` row updated to `returns (uint256[])` with a one-line pointer to ADR 002 § Multi-claim semantics. - ADR 016 § Role matrix (Governor → OriginAssignment row): `activateAssignment` takes only `namespaceId` (operators come from the pending proposal); add the new `setContentBlacklist(address)` setter. No semantic change beyond the pruning invariants (which were implied by the threat model but not explicitly stated). Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Folding the unwind described in #399 (closed) directly into this PR per team direction — clean up at introduction time rather than land then remove. Confirmed during this work that no Rust code or Solidity contracts reference these symbols on main, so the change is ADR-only. Origin status was being signaled in two redundant places: on the wire via `ProbeResponse.is_origin`, and on chain via `OriginAssignment`. The on-chain view is authoritative; the wire bit is just a cached restatement. Phantom-origin slashing is the offense category that exists to deter lying about that wire bit — i.e., it only exists *because* is_origin exists. Remove the wire bit and the attack surface and the slashing category disappear together. What origin status was actually controlling at the protocol layer: - Routing / discovery: handled by `OriginAssignment.getOrigins(ns)`, which clients and watchtowers query off-chain. - Payment economics: same `rate_per_mb` for origins and caches; nothing to differentiate. - Takedown compliance: `ContentBlacklist` is hash-keyed; serving a blacklisted hash is slashable for any node, origin or cache. - Min-redundancy: enforced contract-side at activation; probe-time signaling is unrelated. - BLAKE3 verification: bytes are bytes; clients verify the hash regardless of who served them. So the wire bit was load-bearing on nothing except itself. Mechanical changes: - ADR 005 § cdn/probe/v1: drop `is_origin` from `ProbeResponse`, drop the `is_origin` rules paragraph, drop `is_origin` from the signature field set, drop the phantom-origin entry from the slashing-categories enumeration (now 2 categories: phantom-announcement, rate-manipulation). - ADR 011 § Origin Assignment Authority: drop `isAuthorizedOriginAt` from `IOriginAssignment`. Drop § Historical state and slashing evidence in full — the OR-search predicate, checkpoint storage, pruning invariants, and re-authorization handling were all in service of phantom-origin SlashJudge; none has another consumer. - ADR 011 § Interaction with ContentBlacklist: drop probe-time / requester-side / SlashJudge bullets. Replace with off-chain cross-reference pattern: callers of `getOrigins(ns)` filter against `ContentBlacklist.isOriginBlacklisted` themselves. - ADR 011 lifecycle step 3 + Default-open intro + ADRs Affected (ADR 005): reframe to drop probe-time signaling. - ADR 002 § Multi-claim semantics: drop SlashJudge OR-search reference; trim to the routing/discovery framing. - ADR 002 IPublisherRegistry: drop `namespaceOfAt(hash, t)` historical view (only consumer was SlashJudge). Storage simplifies from per-hash append-only `(namespaceId, claimedAt)` array to per-hash `uint256[]` set; ordering / timestamps no longer load-bearing. - ADR 002 "Why this lives in ADR 002": drop ADR 005 link (no probe-time enforcement to cross-reference). - ADR 016 § Off-Chain Read API + § Reentrancy table + storage notes: drop `isAuthorizedOriginAt` rows; simplify storage to current-state `EnumerableSet` only (no checkpoint history, no GC pruning). - ADR 013 § Signed-fields table: drop `is_origin` from `ProbeResponse` signed-field set (this matches the new ADR 005 baseline; the v1 ALPN is unchanged because the field never shipped on a deployed network). - ADR 022 § Origin discovery + ADRs Affected (ADR 011): reframe — no probe-time `is_origin` validation; clients intersect probed peers against the off-chain `getOrigins(ns)` set. - ADR architecture.md § Origin Integration: drop "advertise itself as origin" framing; origin status surfaces via `getOrigins(ns)` only. - ADR appendix-poc-production-seams.md § Default-open allow-list row: drop "rejects is_origin: true claims (slashable phantom-origin)"; reframe to "off-chain consumers consult getOrigins(0) to filter unauthorized origins". What stays untouched: ContentBlacklist (hash-keyed, never cared about origin status), OriginAssignment.proposeAssignment / activateAssignment / revokeAssignment (per-namespace, namespace-agnostic to claims), min-redundancy invariant (per-namespace at activation), default-open allow-list, governable parameters, all publisher and DAO workflows. PublisherRegistry registration and namespace lifecycle are unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Two medium-priority comments on the is_origin unwind, both stylistic: - ADR 011 § Hash Evasion (origin-blacklisting bullet): the blacklisted- origin runtime-removal description still listed "probes, peer-table validation, slashing evaluation" — a stale enumeration after the unwind (probe-time origin check no longer exists; phantom-origin slashing no longer exists). Trim to "Effectively removed at runtime; storage cleanup is lazy and permissionless via pruneBlacklistedAssignment", with the cross-reference to § Interaction with ContentBlacklist preserved. - ADR 016 § Contract Inventory: row 10 (OriginAssignment) had a single table cell carrying constructor args + default-open bootstrap + governance entry points + ContentBlacklist binding rationale. Trimmed the cell to constructor args plus a one-line pointer; moved the bootstrap / governance / binding detail into a new § OriginAssignment construction notes subsection between the table and § Post-Deployment Initialization. Same content, restructured for table readability. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Two ADRs not previously touched by this PR were left inconsistent with the new OriginAssignment surface introduced in ADR 011: - ADR 012 § Eclipse Attack Mitigation: the rejection of "Option A — Origin-backed nodes as fallback" was framed as a flat refusal to expose origin status on-chain, which now reads as a contradiction with `OriginAssignment.getOrigins(ns)`. Reframe to reject origin status as a *trust* mechanism (still true) while acknowledging the new on-chain primitive as an *availability commitment* (publisher's min-redundancy commitment, not a node-quality ranking). The original design invariant — "no external origin URL is ever exposed" — is preserved: `OriginAssignment` records only operator Ethereum addresses, never backend URLs. Clients still verify content via BLAKE3 and score peers via reputation / probes regardless of authorized-origin status. - ADR 019 § Phase 1 Step 6: the existing wording said "the protocol treats all staked nodes identically." Post-PR-390 false — recognised origin status for registered namespaces requires `OriginAssignment.proposeAssignment` (publisher) and DAO ratification via timelock; for default-open content it requires the DAO-maintained allow-list (subject to the bootstrap rule). Reword Step 6 to keep the cache-only-is-permissionless framing and add a paragraph spelling out the on-chain authorisation flow for operators who want origin status, with the explicit note that it runs on the publisher's / governance's timeline rather than the operator's onboarding flow. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Surfaced during a walkthrough of the on-chain "given a hash, find an authorized origin NodeId" path. The operator-address → NodeId step was the only one in the chain that required paginating getActiveNodes; every other lookup (namespaceOf, getOrigins, isOriginBlacklisted) is already O(1) per call. Adding a typed per-operator view collapses that step to a single read. Storage already exists — addressToNodeId is a public mapping populated atomically inside registerNode (ADR 001 § Constraints, ADR 003 § NodeId- to-Ethereum Binding) — so this is purely a typed-view addition that also bundles the active flag to save a second read against nodes[nodeId].active. - adr/003-payments.md: declare nodeIdOf alongside the existing StakingRegistry storage block, with a comment pointing at the two consumers (ADR 016 read API, ADR 022 origin discovery). - adr/016-contract-interactions.md: row added to § Off-Chain Read API table noting the per-operator binding+activity lookup as the canonical step in the on-chain origin-discovery fallback. - adr/022-content-discovery.md: § Origin discovery fallback now points at nodeIdOf for per-operator NodeId resolution, replacing the bulk paginated getActiveNodes path. Notes that the chain of reads (namespaceOf → getOrigins → nodeIdOf → isOriginBlacklisted) is batchable via the standard Multicall3 aggregator on Arbitrum without prescribing the implementation, since batching is a client-library concern that does not affect protocol semantics. Strict 1:1 binding (ADR 001 § Constraints line 340) means a single- valued return is correct as-is; if the design ever loosens to N:1 (multiple NodeIds per stake — currently rejected), this view would need to widen to bytes32[] memory and the OriginAssignment min- redundancy story would need rework. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Co-authored-by: Copilot <[email protected]>
2e250cb to
58c1bfa
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a comprehensive framework for publisher identity and origin assignment authority. It establishes the PublisherRegistry for managing namespaces and content claims, and the OriginAssignment contract for DAO-governed authorization of origin nodes. The changes distinguish between the permissionless cache role and the governance-gated origin role, implementing a minimum-redundancy invariant for content availability. Additionally, it defines a "default-open" namespace for unclaimed content with a permissive bootstrap window, updates discovery protocols to include on-chain fallbacks, and integrates these new primitives across existing ADRs for governance, payments, and network topology. I have no feedback to provide.
Co-authored-by: Copilot <[email protected]>
Summary
Resolves #189 by adding a DAO authority for origin server assignment, distributed across 9 existing draft ADRs (no new ADR per the planning decision).
OriginAssignmentcontract (ADR 011) for DAO-governed positive authority over which operators may act as origins for which content.namespaceId == 0) preserves long-tail / permissionless serving for unregistered content.removeAllAssignments.ProbeResponseextended with anis_originfield; signingis_origin: truewithout authorization is a phantom-origin slashing offense (ADR 005).Test plan
pre-commit run --all-filespasses (markdownlint, cargo fmt, cargo clippy, cargo deny)adr/NNN-name.md#anchorconvention03352fd(ADR 011 §"ADRs Affected" entries 001/002/003/005/009/016/022 now follow the same[ADR NNN](NNN-name.md)convention as the existing ADR 026 entry; ADR 002 §"Why this lives in ADR 002" now anchor-links the four downstream ADRs it names)🤖 Generated with Claude Code