Skip to content

feat!: split governance chain from payment chains - #2899

Merged
alpergundogdu merged 14 commits into
mainfrom
claude/governance-ethereum-chain-agnostic-96be04
Nov 17, 2026
Merged

alpergundogdu merged 14 commits into
mainfrom
claude/governance-ethereum-chain-agnostic-96be04

Conversation

@alpergundogdu

@alpergundogdu alpergundogdu commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Governance, bond, slashing, TOKEN, buyback and the content blacklist run on Ethereum. PaymentPool runs on any EVM chain with native 6-decimal USDC and CCTP V2. It holds only USDC, reads no bond state and has no governance: every parameter is an immutable. Payments are chain-neutral, so the trust root does not depend on any payment chain.

This PR carries the ADRs and the full implementation (contracts, wire protocol, node, client, CLI, sponsord, e2e, docs; merged in from #2904). No testnet redeploy is part of it; that follows once decdn v4 is built, so the known-chain list is empty for now.

Design

  • Sweep. A permissionless sweep(address[] operators) burns the accrued protocol share of up to 32 operators in one CCTP V2 depositForBurnWithHook (standard finality, never expires). The hook data carries one (operator, servedBytes, amount) entry per operator, so money and the served-bytes record travel in one Circle-attested message. The batch skips operators with nothing pending; minSweep bounds the batch total, since each message costs one receive on Ethereum.
  • Governance chain. CctpSweepReceiver (a stateless bridge adapter) checks the message, measures the USDC it minted and calls FeeRouter.deposit(operator, servedBytes, amount) per entry. FeeRouter splits each deposit into the operator rebate, buyback and treasury. It credits weight only for active operators, prices it on the net USDC that stays with the protocol (min(bytes, net × 1 MiB / deliveryFloor)), clamps it to declared capacity and stamps the arrival epoch. rebateBps is at most 9900, so net never reaches zero and governance cannot lock itself out. DecdnGovernor keeps its read interface.
  • Recovery. If no sweep arrives for a whole vote window (for example during a CCTP outage), active operators restore weight with a direct FeeRouter.deposit on Ethereum, with no bridge. At least two must deposit, because the share cap sizes each operator's weight from the others' bytes.
  • Adding a bridge is a new governance-chain adapter plus a PaymentPoolBase variant. FeeRouter does not change.
  • Payment side. The operator is paid operatorBps (60% in the reference deployment) in the same transaction. ProviderNotBound, the bond and fee-router immutables and the per-pool governance are removed. An immutable pauser can block only openPool and topUp.
  • Wire. StreamRequest.payment_pool names the pool as a CAIP-10 account (eip155:<chain>:<address>). Probe responses and Declined refusals carry up to 8 accepted payment_pools; a client retries a declining node once on a listed pool.
  • Blacklist. ContentBlacklist keeps an append-only mutation ledger. Nodes follow it by eth_call at the safe block.

Implementation

  • Config: [blockchain] is the governance chain. Payment chains are [[blockchain.payment_chains]] { rpc_url, chain_id, payment_pools = [...] }, so a node accepts a list of pools per chain. Removed: payment_pool_address, usdc_address, fee_shares_poll_interval_sec. event_poll_interval_ms becomes receipt_poll_interval_ms.
  • Node:
    • One provider and signer per payment chain; one settlement service, redeemer and store view per pool.
    • Requests for an unaccepted pool get Declined before any chain read.
    • No eth_getLogs: the registry, origin seats, slashes, blacklist and pool state are periodic eth_call reads. An idle node drops from about 2,100 RPC calls an hour to about 100.
    • Earnings come from the node's own redeem receipts.
  • Client: ChainConfig { governance, payment_pools }. Each fetch and bundle pull runs one pass per pool. The gateway and decdn get --capability find a capability's pool by its signature.
  • Gateway (on top of main's capabilities-only gateway, feat(gateway)!: capabilities only, scoped by namespace, no loopback token #2910): a capability resolves its PaymentPool across every configured --pool. "One capability per pool" means one per (contract, pool id). A namespace scope is checked under the capability's own pool contract. /_status chain_id / payment_pool show the first configured pool. The HTTP shape is main's, unchanged.
  • Credit (on top of main's payer-fronted credit, docs(adr)!: the payer fronts credit #2877): the node keeps main's design (no floor accumulator, no per-signer cap; pool_floor_signer_live_windows is gone) with per-pool lane routing.
  • CLI:
    • decdn node sweep [--with <operator>]... and decdn node receive-sweeps (Iris attestation, one receiveSweep per message).
    • Multi-pool node earnings, node lanes, pool, doctor and setup.
    • New flags --governance-rpc-url, --governance-chain-id, --pool <caip10>, --pool-rpc-url.
  • sponsord: the onramp and installers take separate governance and pool coordinates (ONRAMP_GOVERNANCE_RPC_URL, ONRAMP_GOVERNANCE_CHAIN_ID, ONRAMP_POOL_RPC_URL). The daemon API is unchanged.
  • Docs: docs/runbook.md covers sweeping and a CCTP outage.

Verified

  • CCTP spike (Arbitrum Sepolia to Ethereum Sepolia): a real hooked burn from a pool-shaped contract was attested in about 15 minutes and received through a receiver-shaped contract. Hook parsing, destinationCaller enforcement and replay protection all held. Standard messages have expirationBlock 0, and Iris refuses to re-attest them.
  • Local gates after merging main (through docs(adr)!: the payer fronts credit #2877):

Outside this repo (devops)

  • Alerts and dashboards reference removed watcher metrics: Decdn*WatcherStalled, DecdnChainWatcherFlapping, chain_get_logs_*, settlement_reanchor_*, fee_shares_watcher_*. blacklist_reenumeration_failures_total is now blacklist_ledger_poll_failures_total.
  • The unattributed stream-failure panels need decdn_serve_stream_rejected_unaccepted_pool_total subtracted.
  • Deployed node configs need the new [blockchain] shape and receipt_poll_interval_ms.
  • The onramp needs its three new settings.

🤖 Generated with Claude Code

Governance, bond, slashing, TOKEN and buyback run on Ethereum L1. PaymentPool runs on any EVM chain with native USDC and CCTP V2, holds only USDC, reads no bond state and has no governance. A permissionless sweep carries the protocol share and the served-bytes record to the governance-chain FeeRouter in one CCTP message. FeeRouter checks the operator is active, prices weight on the USDC that stays with the protocol, clamps credit to declared capacity and stamps the arrival epoch. The split of the swept share is governable without bounds and buyback is a setting. StreamRequest carries chain_id and the probe extension carries an unsigned payment_chains hint.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Copilot AI balanced review requested due to automatic review settings November 13, 2026 16:16

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.

Note

Copilot was unable to complete this review at the selected tier due to model policy or plan restrictions.

🟡 Changes recommended

Minor documentation nits remain—terminology mismatch in adr/019 and a typo/grammar issue in adr/036—so the change isn’t ready until these are corrected.

2 open issues
What changed in this PR

Documentation-only update to the deCDN ADR/spec to separate a single governance chain (Ethereum L1) from one or more admitted payment chains (EVM + native 6-decimal USDC + CCTP v2), keeping payments chain-neutral while anchoring trust and accounting on the governance chain.

Changes:

  • Reframes terminology, architecture, and economics around “governance chain” vs “payment chain”, including permissionless sweeps that carry served-bytes data to the governance-chain FeeRouter.
  • Updates wire/protocol documentation to route by StreamRequest.chain_id and adds an unsigned ProbeResponseExt.payment_chains hint.
  • Replaces the former L2-target appendix with governance/payment chain admission rules and aligns related operational/observability guidance.
File Description
README.md Updates the top-level project summary to reflect the governance-chain vs payment-chain split.
adr/​README.md Adjusts the ADR book introduction and appendix descriptions to match the new multi-chain payments model.
adr/​glossary.md Adds and updates glossary terms for governance/payment chains, sweeps, and related accounting concepts.
adr/​architecture.md Updates the architecture overview and document map to reflect the two-chain governance/payment design.
adr/​appendix-pull-receipts.md Clarifies receipt fields to include both payment-chain and governance-chain coordinates where relevant.
adr/​appendix-poc-production-seams.md Updates PoC vs production guidance to account for separate governance-chain and payment-chain RPC needs.
adr/​appendix-observability.md Revises observability/metrics descriptions for a split governance-chain and payment-chain operational model.
adr/​appendix-l2-deployment.md Replaces the prior L2 deployment targeting discussion with governance/payment chain admission rules.
adr/​appendix-gateway.md Clarifies which identifiers and status fields refer to the governance chain versus the payment chain.
adr/​041-refuse-to-serve.md Updates refusal-to-serve and economic terminology to match operatorBps on payment chains and sweep-based accounting.
adr/​036-served-bytes-voting-weight.md Updates the served-bytes voting-weight narrative to reflect sweep-delivered accounting to the governance chain.
adr/​026-tokenomics.md Rewrites tokenomics flow to separate payment-chain operator payout from governance-chain protocol-share splitting via FeeRouter.
adr/​024-account-abstraction.md Updates account abstraction/operator custody discussion for a multi-chain payment environment.
adr/​019-node-onboarding.md Updates onboarding steps and boot/read expectations for separate governance-chain vs payment-chain responsibilities.
adr/​018-liquidity-strategy.md Aligns liquidity and buyback strategy assumptions with governance-chain execution and sweep-fed inflows.
adr/​017-privacy.md Updates privacy considerations to reflect per-chain RPC separation and the governance/payment split.
adr/​014-on-chain-verification.md Updates on-chain verification discussion to align with governance-chain assumptions and the new model.
adr/​013-schema-evolution.md Documents wire/schema evolution updates including chain_id routing and the unsigned payment_chains hint.
adr/​012-client.md Updates client configuration and trust model documentation for governance-chain reads and payment-chain pools.
adr/​011-content-takedown.md Clarifies content takedown mechanics and staleness considerations in a governance/payment chain split.
adr/​009-governance.md Updates governance documentation to reflect governance-chain control surfaces and sweep-fed FeeRouter behavior.
adr/​008-reputation.md Aligns reputation and cross-references with the updated tokenomics and payment-chain settlement wording.
adr/​005-protocol.md Updates protocol/wire documentation to include StreamRequest.chain_id and the payment_chains probe hint.
adr/​001-network.md Updates network-level narrative and assumptions to reflect governance-chain anchoring and payment-chain neutrality.

Review effort: Balanced

Comment thread adr/019-node-onboarding.md Resolved
Comment thread adr/036-served-bytes-voting-weight.md Resolved
alpergundogdu added a commit to decdn/website that referenced this pull request Nov 13, 2026
Governance on Ethereum, payments on any chain where customers hold USDC,
joined by one CCTP message. How decdn got there, six rules for DePINs,
prior art and the multi-chain testnet plan.

Describes the design in decdn/decdn#2899, which is still open.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
alpergundogdu added a commit to decdn/website that referenced this pull request Nov 13, 2026
* feat(blog): publish post 10, scaling DePIN onto many chains

Governance on Ethereum, payments on any chain where customers hold USDC,
joined by one CCTP message. How decdn got there, six rules for DePINs,
prior art and the multi-chain testnet plan.

Describes the design in decdn/decdn#2899, which is still open.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* fix(blog): use US spelling, pilot program

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* fix(blog): lowercase decdn in the history heading

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

---------

Co-authored-by: Claude Sonnet 5.5 <[email protected]>
alpergundogdu and others added 2 commits November 13, 2026 17:56
The admission rule names a censorship window: forced inclusion on a rollup, the validator
set on a layer 1. Rule 2 pins the 6-decimal ERC-20 interface. StreamRequest.chain_id and the
payment_chains hint carry CAIP-2 identifiers, so a non-EVM chain needs no message change.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…be04

Combine the payment-chain fields with main's size proofs: the probe and
stream extensions carry both, and the frame table counts the chain hint
and the chain id on main's new ceilings.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Kpvr4Hsh3j4uw3sPiHpYkv
…CLI, sponsord) (#2904)

* docs(adr): standard CCTP sweeps never expire; size minSweep for L1 receive gas

A standard-transfer message carries expirationBlock 0, so an attested
sweep stays receivable indefinitely and Circle refuses to re-attest it.
Verified on Arbitrum Sepolia -> Ethereum Sepolia.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* docs(adr): sweep maxFee falls back to 0; FeeRouter credits the USDC balance delta

Deployed TokenMessengerV2 has no getMinFeeAmount, so the pool reads it when
present and uses 0 otherwise. FeeRouter measures U as its USDC balance rise,
so a non-USDC burn credits nothing, and drops the sender check that the
messenger already enforces. sweep resets pending before the CCTP call.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* docs(adr): bridge adapters feed a permissionless FeeRouter.deposit

FeeRouter knows no bridge. CctpSweepReceiver is the CCTP V2 adapter on the
governance chain; PaymentPool sweeps to it (sweepRecipient, sweepDomain).
A new bridge is a new adapter plus a PaymentPool variant, with no FeeRouter
change. Documents the clamp-fill cost that an open deposit implies.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* feat(contracts)!: FeeRouter.deposit and the CCTP sweep receiver

FeeRouter takes sweeps through a permissionless deposit: rebate to an active
operator, buyback and treasury legs, a USDC-backed weight credit clamped to
declared capacity in the arrival epoch. CctpSweepReceiver receives a CCTP V2
sweep, measures the minted USDC and deposits it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* feat(contracts)!: payment-chain PaymentPool with CCTP sweep; governance-chain deploy split

PaymentPoolBase holds the voucher pool with no governance, roles or bond
reads: redeemMany pays operatorBps same-tx and accrues the rest in pending;
sweep is permissionless and resets pending before the bridge call. The CCTP
PaymentPool burns to the governance-chain CctpSweepReceiver with maxFee from
getMinFeeAmount when present. disputeWindow is uint32 so the close deadline
cannot wrap.

DeployProtocol deploys the governance-chain set plus the receiver;
DeployPaymentPool deploys a pool per payment chain. LoopbackCctp (testnet/)
plays CCTP on one local chain for dev-deploy.sh and the e2e; a CI gate keeps
it out of src/ and script/.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test(contracts): share env values with the protocol deploy test

vm.setEnv is process-wide and suites run in parallel.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* docs(adr): a capability's cap is the whole bound on where it is spent

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* feat(contracts)!: ContentBlacklist mutation ledger for log-free node sync

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* docs(adr): pin blacklist ledger reads to the safe block

A reorg that replaces records at the same indices leaves mutationCount
unchanged; reads at the safe block never see a record that can still change.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* feat(contracts)!: batched protocol-share sweeps

PaymentPool.sweep takes a batch of 1 to MAX_SWEEP_BATCH (32) operators
and sends their pending protocol shares in one CCTP transfer. Each entry
needs a non-zero pending share, so a duplicate reverts on the same check.
minSweep bounds the batch total: a sweep costs one governance-chain
receive, so many small operators reach the floor together.

The hook data is abi.encode(SweepShare[]), one (operator, servedBytes,
amount) entry per operator. The pool emits Swept(operator, servedBytes,
amount) per operator and one SweepSent(amount, maxFee) per batch.

CctpSweepReceiver deposits each entry into FeeRouter. The minted USDC
splits pro rata to the entry amounts, the last entry takes the rounding
remainder, and an entry whose share is 0 is skipped. It rejects an empty
batch, one above the limit, and one that sums to zero.

A full batch's burn body is 3364 bytes, under the 8192-byte
maxMessageBodySize of the deployed V2 transmitters. The receive costs
about 93k gas per operator against cold storage.

ADRs 003, 016, the L2 appendix and the glossary describe the batch,
the payload and the pro-rata split.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* docs(adr): governance recovers vote weight by direct FeeRouter deposit

When no sweep arrives for a whole window, every operator's weight
decays to 0 and no proposal can pass. FeeRouter.deposit is
permissionless on the governance chain, so active operators restore
weight with direct USDC deposits, with no bridge and no traffic. ADR 036
states the bounds, the cost (the non-rebated net) and the need for at
least two depositing operators under the share cap. ADR 016 links the
recovery path from the FeeRouter wash-trading note.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* feat(contracts)!: cap the FeeRouter rebate at 99%

Weight credit is backed only by the non-rebated net of a deposit. With
a zero net no deposit credits weight, the vote window empties, and no
one holds the votes to change the split back. setSplit now rejects a
rebateBps above 9900, so buyback plus treasury keep at least 1% and a
direct deposit can always restore weight.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* feat(contracts)!: a sweep batch skips operators with nothing pending

A batch reverted when any listed operator had nothing pending, so
anyone could make it fail by sweeping one listed operator first. The
sweep skips such entries and needs only a non-zero total of at least
minSweep. The gas snapshot covers both this and the rebate ceiling.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* feat(protocol)!: CAIP-10 payment pool on StreamRequest; payment_pools hints and pool refusal

StreamRequest names the PaymentPool contract that holds pool_id as a
CAIP-10 PoolAccount (CAIP-2 ChainId plus contract address). ProbeResponseExt
and StreamResponseExt carry an optional payment_pools hint of at most 8
accounts; the StreamResponse validator allows it only on a Declined
refusal. Frame-ceiling tests and ADR 005/012/013 follow.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* feat!: governance and payment-chain config split; deployment-keyed stores; new contract bindings

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* feat(node)!: per-chain providers and per-pool services; pool refusal and probe hint; earnings from redeem receipts

The node accepts every configured PaymentPool on every payment chain.
Each payment chain gets its own providers, with wallet signers bound to
that chain id, and its own chain-event poller for its pools' settlement
routes. Governance reads and transactions stay on the governance chain.

Each pool gets its own seller store view over the shared redb files,
settlement service, redeemer, pool view and operatorBps. The client
handler keys lanes and floor accounting by (deployment, pool) and routes
each StreamRequest by payment_pool. A pool the node does not accept is
refused Declined with the accepted pools listed, before any pool read.
The probe extension advertises the accepted pools.

Preflight probes each pool on its own chain and names the pool on a
chain-id mismatch. The settlement ledger decodes the node's own
redeemMany receipt: net is the pool's USDC transfer to the operator,
gross scales it by 10000/operatorBps (rounded up), bytes sum the
operator's PoolRedeemed lanes. SettlementRecord drops its epoch field.

Removes the unused fee_shares_watcher metrics and the stale claim that
the pool clamps byte credit; ADR 003 describes the paid side and the
ledger from the node's own receipts.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* feat(node)!: replace chain event watchers with eth_call reads; blacklist ledger sync

The node reads no event log. Each chain projection has its own eth_call
refresh loop: registry snapshot every 5 min (plus a rate-limited refresh
on an unknown NodeId), origin seats every 10 min (plus a rate-limited
refresh on a seat miss), operatorSlashCount every 15 min, the
ContentBlacklist mutation ledger at the safe block (ADR 011), and
getPool + getAuthorizations every 30 s for pools with a live lane.
Paid watermarks come from the node's own redeemMany receipts and the
pre-redeem getWatermarks read; sent redeemMany hashes persist in
settle.redb and their receipts are read again on boot.

Deletes the multiplexed poller, the resumable watcher, the cursor and
checkpoint machinery (checkpoint.redb, SharedHead), the PoolOpened
projection folding, event_poll_interval_ms (receipt_poll_interval_ms
replaces it) and the deleted watchers' metrics.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* feat(client)!: governance and payment pools split in ChainConfig; per-node pool selection and Declined retry

ChainConfig holds the governance chain (RPC, chain id, SlashJudge,
CapacityBond) and a list of payment pools (payment-chain RPC and
Deployment). Registry reads, probe and stream signatures and the client
identity binding use the governance chain; vouchers, capabilities and pool
transactions use each pool's Deployment. Receipts carry both chain ids.

pool_route picks each node's pool: the first pool of the buyer's route
(held pools first, then config order) that the node's payment_pools probe
hint lists; no hint means the first configured pool. A fetch runs one pass
per pool that a node is routed to. A Declined refusal that lists the
node's pools retries that node once, in the pass of a listed pool;
nothing retries it again.

decdn get / gateway fetches run the passes; a bundle pull pays through the
route's first pool and skips nodes routed elsewhere. The node's buyer leg
pays through the first pool of its own route and skips upstreams whose
hint routes them elsewhere. resolve_chain reads the governance RPC and
chain id from [blockchain] and every pool of every payment chain.

ADR 005 and 012 state the pass and retry rules.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* docs(adr): blacklist boot snapshot reads getHashEntry per hash

The boot snapshot reads getHashEntry(region, hash) once per paged hash for
liveness and expiry, and keeps a hash under a region only where it is
live. Emergency entries and live emergency origins take addedAt plus the
category term.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* feat(cli)!: node sweep and receive-sweeps; multi-pool pool, earnings, lanes, doctor and setup

`decdn node sweep` sends each pool's pending protocol share once it
reaches minSweep. `decdn node receive-sweeps` reads each sweep's CCTP
message and attestation from Iris (`blockchain.cctp_iris_url` or
`--iris`), waits while it is pending, skips a used nonce, and calls
`CctpSweepReceiver.receiveSweep` on the governance chain.

`node earnings --address` scans each pool's USDC transfers to the
operator and decodes their receipts with the node's ledger decoder, now
in `decdn_incentive::settlement_receipt`; both modes report per-pool
settlements and the pending protocol share. `LaneSnapshot` names its
pool. `pool`, `setup`, `doctor` and `receipt` act per pool on the pool's
own payment chain.

Flags: `--governance-rpc-url`/`--governance-chain-id` and
`--pool <caip10>`/`--pool-rpc-url` replace `--rpc-url`,
`--payment-pool-address` and `--chain-id` on get, gateway, quote, pool
and node earnings; the pool-id flag is `--pool-id`. The governance RPC
is required. `pool_route` is a hidden engine seam.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* feat(client)!: multi-pool bundle passes, per-deployment escrows, gateway capability pool resolution

Bundle pulls run one pass per payment pool that a holder is routed to
(ADR 005 § Payment pool routing). Each pass pays through one pool with
its own lanes, funding facts and recovery gate (`PassPool`); the pools of
earlier passes stay parked for their replacements and shortfalls. A pass
that leaves failed or unrun entries hands them to the next pool's pass,
which skips every file an earlier pass completed and resumes partial
files. A node that answers Declined with `payment_pools` takes its one
retry in that pool's pass. With more than one pool, an entry's probe
round settles before the fetch, so an entry whose holders all take
another pool waits for that pool's pass. The manifest fetch runs the same
passes. `BundlePuller::fetch_manifest` takes `&mut self`.

`UnconfirmedEscrows::for_pool` gives a handle keyed by the
`PaymentPool` contract: a pending `openPool` or `topUp` blocks only its
own contract, while `pending` and `untracked` still list every contract.
Single-blob fetch passes and bundle passes report through it.

The gateway resolves a registered capability's pool by recovering its
owner signature under each configured pool's EIP-712 domain and matching
the on-chain owner there. The delegate's pulls pay through that pool
only, and `/pools` reads delegate lanes keyed by (contract, pool,
signer). The HTTP contract is unchanged. ADR 012 says so.

`decdn node earnings` refuses `--pool` without `--address`: the daemon
reports every pool it serves.

The e2e `ChainFixture` deploys the payment pool through
`DeployPaymentPool` with a `LoopbackCctp`, reads
`deployments/<chainId>-payment.json`, and can redeploy a second pool.
`cli_bundle_pull_two_pools` pulls one bundle from two holders on two
contracts.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* feat(cli)!: batched sweeps in node sweep and receive-sweeps

Bind PaymentPool.sweep(address[]), MAX_SWEEP_BATCH, SweepShare, the
per-operator Swept and per-batch SweepSent events, and the BelowMinSweep
and BadSweepBatch errors, with selector and signature pins.

decdn node sweep sweeps the operator alone by default; --with <ADDRESS>
(repeatable) adds other operators to the same batch so they share one
CCTP transfer and one governance-chain receive. The CLI reads each listed
operator's pending share, leaves out empty and repeated ones, refuses a
batch over MAX_SWEEP_BATCH, sends only when the batch total reaches
minSweep, and prints each swept share from the Swept events and the batch
total and fee from SweepSent.

decdn node receive-sweeps receives each batch transaction once (a batch
is one CCTP message), decodes the SweepShare[] hook data, and reports
the batch size and the operator's entry on each line.

The e2e ChainFixture sweeps a batch and receives a sweep by transaction;
slash_appeal drives the real decdn node sweep --with path.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* feat(cli)!: decdn get --capability resolves its pool

A --capability delegation pays through the contract of its capability's
pool, found as the gateway finds a registered capability's: the first
configured payment pool under whose EIP-712 domain the owner signature
recovers to the pool's on-chain getPool owner. A capability that matches
no configured pool is refused before any fetch.

capability_pool moves out of the gateway into commands::capability_pool
with a transport-neutral error; the gateway maps it to 422/502 as before.
The blob route, the bundle route, the manifest fetch and the gateway's
--capability lanes all carry the resolved Delegation, and the SDK's
bundle Funding::Delegated names its pool. ADR 012 states the rule.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* feat(sponsord)!: separate governance and payment-chain coordinates

The onramp's download profile names both chains. ONRAMP_RPC_URL is
replaced by ONRAMP_GOVERNANCE_RPC_URL, ONRAMP_GOVERNANCE_CHAIN_ID and
ONRAMP_POOL_RPC_URL (all required); the payment chain id and pool still
come from the daemon's GET /v1/info. The installers take
GOVERNANCE_CHAIN_ID / GOVERNANCE_RPC_URL / POOL_CHAIN_ID / POOL_RPC_URL
and pass --governance-rpc-url and --governance-chain-id from the
governance chain and --pool eip155:<pool chain>:<pool> and
--pool-rpc-url from the payment chain.

The daemon signs for one pool on one payment chain and reads nothing on
the governance chain, so its SPONSORD_* settings and both HTTP APIs are
unchanged; the docs name its chain as the payment chain. The test
fixtures keep the two chain ids apart.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* docs: config split, sweep and CCTP outage runbook

The runbook's "Sweeping the protocol share" covers batches: one sweep
carries 1 to 32 operators, decdn node sweep --with shares the receive,
and receive-sweeps receives a batch once whoever sent it. A "CCTP outage"
subsection under it covers what keeps working, detection, keeping
governance weight with direct FeeRouter deposits, receiving the backlog
one epoch at a time, and moving a payment chain off CCTP.

CONTRIBUTING describes the governance and payment manifests, both scan
start blocks, and the empty KNOWN_CHAINS list. README and the CLI README
stop pointing at the removed testnet manifest and the --chain target.
The capability error names --pool instead of the removed
--payment-pool-address, and a buyer-pool doc names payment_pools.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Resolves the gateway worker import (main's CacheStores alongside this
branch's Delegation) and regenerates the gas snapshot.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@alpergundogdu alpergundogdu changed the title docs(adr): split governance chain from payment chains feat!: split governance chain from payment chains Nov 17, 2026
alpergundogdu and others added 2 commits November 17, 2026 17:14
Takes main's capabilities-only gateway (#2910) as the base and re-applies
the governance/payment chain split on top of it: every registered
capability resolves its PaymentPool contract with capability_pool(), and
its pulls, lanes, payer and retirement are keyed by (contract, pool id,
signer). A namespace scope is checked under each candidate contract's
scope domain before any chain read. Pointer domains and registry reads use
the governance chain. The self-funded pool payer that main deleted stays
deleted, including this branch's per-pool funding for it. The e2e pool
owner helper takes the --governance-*/--pool flags.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Takes main's pay-ahead credit design (#2877): the node-side floor
accumulator, per-signer live cap and credit ramp are gone, along with
pool_floor_signer_live_windows. The branch's per-pool routing stays:
lanes are keyed by LaneId (contract + LaneKey), redeem hints and lane
stores go through PoolRoute, and the voucher domain is the lane's pool
route.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-code-quality

github-code-quality Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Code coverage overview

Languages: Rust, Solidity

Rust / code-coverage/cargo-llvm-cov

main 95da7ad claude/governance-et... f5f7ff8 +/-
77% 76% -1%
View coverage of the 10 most impacted files.
File main 95da7ad claude/governance-et... f5f7ff8 +/-
crates/cli/src/...rnings_chain.rs 80% 46% -34%
crates/node/src...list_watcher.rs 84% 54% -30%
crates/client/s...undle/engine.rs 65% 62% -3%
crates/cli/src/...mmands/sweep.rs 0% 27% +27%
crates/client/s...c/pool_route.rs 0% 89% +89%
crates/protocol...pool_account.rs 0% 91% +91%
crates/cli/src/...ability_pool.rs 0% 93% +93%
crates/protocol...src/chain_id.rs 0% 96% +96%
crates/cli/src/...s/sweep/iris.rs 0% 97% +97%
crates/cli/src/.../pool_select.rs 0% 98% +98%

Solidity / code-coverage/forge

main 95da7ad claude/governance-et... f5f7ff8 +/-
92% 92% 0%
View coverage of the 9 most impacted files.
File main 95da7ad claude/governance-et... f5f7ff8 +/-
contracts/scrip...colDeploy.s.sol 96% 95% -1%
contracts/src/PaymentPool.sol 99% 100% +1%
contracts/scrip...yProtocol.s.sol 83% 84% +1%
contracts/src/C...ntBlacklist.sol 98% 100% +2%
contracts/src/FeeRouter.sol 94% 99% +5%
contracts/scrip...ymentPool.s.sol 0% 75% +75%
contracts/src/C...eepReceiver.sol 0% 98% +98%
contracts/src/P...entPoolBase.sol 0% 100% +100%
contracts/testn...oopbackCctp.sol 0% 100% +100%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.


Updated November 17, 2026 18:58 UTC

@github-actions

Copy link
Copy Markdown

Gas snapshot

No gas changes vs base.

…'s revert strings

The dashboard contract test and the earnings view test name the
per-pool lane and earnings fields. LoopbackCctp reverts with Circle's
own strings on purpose, so solhint's custom-errors rule is off for it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Comment thread crates/cli/src/commands/sweep.rs Fixed
The value is the pool's public CAIP-10 contract id. Its old name,
`account`, made CodeQL read it as a credential in the progress line.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Comment thread crates/cli/src/commands/sweep.rs Fixed
alpergundogdu and others added 2 commits November 17, 2026 18:35
The receive-sweeps progress line names the pool by its public
contract address and chain id, read from the deployment fields.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@alpergundogdu
alpergundogdu merged commit 90e2c23 into main Nov 17, 2026
39 checks passed
@alpergundogdu
alpergundogdu deleted the claude/governance-ethereum-chain-agnostic-96be04 branch November 17, 2026 19:51
yigitdot added a commit that referenced this pull request Nov 18, 2026
Main splits the governance chain from the payment chains (#2899). Its
payment_pools hint lived on the probe answer, which this branch deletes.
StreamResponseExt now carries one payment_pools field, appended after
coverage, and the node fills it on every answer, served or refused. A
discovery open names the route's first pool; a node that refuses that
pool names the pools it accepts and stays a serve target for their pass.
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.

4 participants