Skip to content

docs: separate governance into ADR 009 from ADR 004 - #38

Merged
thiras merged 3 commits into
mainfrom
docs/split-governance-adr-009
Mar 29, 2026
Merged

thiras merged 3 commits into
mainfrom
docs/split-governance-adr-009

Conversation

@thiras

@thiras thiras commented Mar 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #33

  • Extracts governance spec (OpenZeppelin Governor, emergency multisig, governable parameters with safety bounds, multi-chain considerations) from ADR 004 into new ADR 009: Governance Model
  • Keeps ADR 004 focused on tokenomics: staking, slashing, fee model, buyback, node unit economics
  • Updates cross-references in ADR 001, ADR 003, and architecture.md to point governance references to ADR 009

Test plan

  • Verify all internal markdown links resolve correctly
  • Confirm ADR 004 no longer contains governance model, parameter bounds table, or emergency multisig sections
  • Confirm ADR 009 is self-contained with proper context and cross-references back to ADR 004/003
  • Check architecture.md lists ADR 009 after ADR 008

🤖 Generated with Claude Code

ADR 004 mixed tokenomics with governance, making it unfocused. The
governance spec (OpenZeppelin Governor, emergency multisig, parameter
safety bounds) is production-only and irrelevant to the PoC. Split into:
- ADR 004: tokenomics — staking, slashing, fee model, buyback
- ADR 009: governance — voting, proposals, parameter management, multisig

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings March 29, 2026 18:16

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces ADR 009 to centralize the protocol's governance model, detailing the transition from a PoC admin key to a production token-weighted system with safety bounds and an emergency multisig. Existing ADRs and the architecture overview were updated to reference this new document. Feedback recommends improving navigation within ADR 009 by converting text references to other ADRs into clickable markdown links.

Comment thread adr/009-governance.md Resolved

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

Splits the governance specification out of ADR 004 into a dedicated ADR 009, keeping ADR 004 focused on tokenomics while updating documentation cross-references across the ADR set and architecture overview.

Changes:

  • Added ADR 009: Governance Model containing PoC admin-key governance, production Governor model, safety-bound parameter table, emergency multisig, and multi-chain notes.
  • Removed the detailed governance section from ADR 004, replacing it with links/summaries pointing to ADR 009.
  • Updated governance-related references in architecture.md, ADR 001, and ADR 003 to point to ADR 009.

Reviewed changes

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

Show a summary per file
File Description
adr/architecture.md Adds ADR 009 entry and shifts governance mentions from ADR 004 to ADR 009
adr/009-governance.md New ADR capturing the governance model and parameter safety bounds
adr/004-tokenomics.md Removes embedded governance spec and replaces with links to ADR 009
adr/003-payments.md Updates TOKEN usage description to reference ADR 009 for governance
adr/001-network.md Updates safety-bound references (multiaddr size, cooldown, unbonding) to ADR 009

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

Comment thread adr/009-governance.md Resolved
Comment thread adr/009-governance.md Resolved
thiras and others added 2 commits March 29, 2026 21:21
- Move Multi-Chain Bridging back to ADR 004 (broader than governance)
- Remove duplicated PoC admin key description from ADR 004
- Linkify bare-text ADR references in architecture.md, ADR 001, ADR 009
- Remove multi-chain from ADR 009 scope list

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@thiras
thiras merged commit 2197096 into main Mar 29, 2026
@thiras
thiras deleted the docs/split-governance-adr-009 branch March 29, 2026 18:25
thiras added a commit that referenced this pull request Oct 21, 2026
* fix(sponsord): re-send a hashless topUp once its nonce is vacant (#2572)

The keeper held further top-ups for a `topUp` whose submit returned no
tx hash until the treasury's confirmed nonce passed the nonce it was
sent with. When the transaction was never broadcast, or was dropped,
nothing fills that nonce, so the hold lasted until an operator sent
0-value self-transfers, and the pool could drain meanwhile.

`settle` now reads the pending nonce too for a hashless hold. When the
confirmed and pending nonces both equal the top-up's nonce, no
transaction holds it, so the keeper re-sends `topUp` at that nonce
through `decdn_client::buyer_pool::send_top_up_at`, records the hash
on the hold, and settles it by that receipt. Two transactions at one
nonce cannot both mine, so the re-send cannot escrow twice. A re-send
that reverts `PoolNotOpen` ends the hold; any other failure waits for
the next sweep. This is the node daemon's vacant-nonce rule.

`PoolChain` gains `pending_nonce` and `send_top_up_at`; `ChainPool`
re-attaches the `PoolNotOpen` marker through its redaction. `FakePool`
scripts the pending count and the re-send's outcome.

Closes #2572

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* docs(sponsord): point at the migrated issues and describe the hashless hold

The archived decdn/sponsord repository's issues 22 to 26 were deleted
after their migration here, so the docs' links to them resolved to
nothing. They now point at #2546 to #2550. Bare `(#38)` and `(#40)`
references in the sponsord crates named issues of that repository;
they now say so, since the same numbers name unrelated issues here.

security.md said a top-up whose response was lost is not held. The
keeper holds it, and re-sends it once its nonce is vacant.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* fix(sponsord): re-send a held topUp the node does not know under the same rule

A held `topUp` whose hash the RPC node does not know stood where a
hashless one did: its hold lasted until the nonce was used, so a
re-send the node dropped in turn was held for an operator. The vacancy
rule now covers both: when the node shows no transaction of the top-up
and its nonce is next with nothing holding it, the keeper re-sends.

The pending nonce is read only then; a queued top-up (an earlier nonce
unfilled) gets its own log line instead of sharing the mempool-held
one. A re-send that reverts `PoolNotOpen` counts as a failure, as the
same revert on the first send does.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* fix(sponsord): keep earlier hashes on a hold and correct the stuck-nonce remedy

A re-send replaced the hold's hash, so a first send that mined after
it went uncounted and the log named a hash that never mined. The hold
keeps the earlier hashes, and a used nonce is checked against each
before the top-up counts as unknown.

The operator remedy for a held nonce said to send 0-value
self-transfers; those take the pending nonce and queue behind the
stuck transaction. The logs and the operator guide now say to replace
it at that nonce with a higher fee, and the queued case says which
nonces to fill. A re-send answered as possibly broadcast is told from
a rejection (`ChainPool` attaches `TopUpUnconfirmed`), an allowance
shortfall names its remedy, and every other re-send failure logs at
error with the hold's age and what to check. The pending-nonce read
failure has its own line, and `FakePool` can fail it alone.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* refactor(sponsord): count top-ups and record re-sends in one place

`KeeperStatus::record_topup` replaces the three copies of the counter
and timestamp update; `Unconfirmed::record_resend` keeps the earlier
hash cap beside the field it bounds. `FakePool::fail_resends` takes a
`ResendFailure` in place of four switches that were never combined.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

---------

Co-authored-by: Claude Fable 5.1 <[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.

ADR 004: Consider separating governance into its own ADR

2 participants