Repository navigation
feat!: split governance chain from payment chains - #2899
Conversation
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]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
There was a problem hiding this comment.
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_idand adds an unsignedProbeResponseExt.payment_chainshint. - 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
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…fusal Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
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]>
* 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]>
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]>
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]>
Code coverage overviewLanguages: Rust, Solidity Rust / code-coverage/cargo-llvm-cov
View coverage of the 10 most impacted files.
Solidity / code-coverage/forge
View coverage of the 9 most impacted files.
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. Updated |
Gas snapshotNo 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]>
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]>
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]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.

Summary
Governance, bond, slashing, TOKEN, buyback and the content blacklist run on Ethereum.
PaymentPoolruns 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(address[] operators)burns the accrued protocol share of up to 32 operators in one CCTP V2depositForBurnWithHook(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;minSweepbounds the batch total, since each message costs one receive on Ethereum.CctpSweepReceiver(a stateless bridge adapter) checks the message, measures the USDC it minted and callsFeeRouter.deposit(operator, servedBytes, amount)per entry.FeeRoutersplits each deposit into the operator rebate, buyback and treasury. It credits weight only for active operators, prices it on thenetUSDC that stays with the protocol (min(bytes, net × 1 MiB / deliveryFloor)), clamps it to declared capacity and stamps the arrival epoch.rebateBpsis at most 9900, sonetnever reaches zero and governance cannot lock itself out.DecdnGovernorkeeps its read interface.FeeRouter.depositon Ethereum, with no bridge. At least two must deposit, because the share cap sizes each operator's weight from the others' bytes.PaymentPoolBasevariant.FeeRouterdoes not change.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 immutablepausercan block onlyopenPoolandtopUp.StreamRequest.payment_poolnames the pool as a CAIP-10 account (eip155:<chain>:<address>). Probe responses andDeclinedrefusals carry up to 8 acceptedpayment_pools; a client retries a declining node once on a listed pool.ContentBlacklistkeeps an append-only mutation ledger. Nodes follow it byeth_callat thesafeblock.Implementation
[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_msbecomesreceipt_poll_interval_ms.Declinedbefore any chain read.eth_getLogs: the registry, origin seats, slashes, blacklist and pool state are periodiceth_callreads. An idle node drops from about 2,100 RPC calls an hour to about 100.ChainConfig { governance, payment_pools }. Each fetch and bundle pull runs one pass per pool. The gateway anddecdn get --capabilityfind a capability's pool by its signature.PaymentPoolacross 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./_statuschain_id/payment_poolshow the first configured pool. The HTTP shape is main's, unchanged.pool_floor_signer_live_windowsis gone) with per-pool lane routing.decdn node sweep [--with <operator>]...anddecdn node receive-sweeps(Iris attestation, onereceiveSweepper message).node earnings,node lanes,pool,doctorandsetup.--governance-rpc-url,--governance-chain-id,--pool <caip10>,--pool-rpc-url.ONRAMP_GOVERNANCE_RPC_URL,ONRAMP_GOVERNANCE_CHAIN_ID,ONRAMP_POOL_RPC_URL). The daemon API is unchanged.docs/runbook.mdcovers sweeping and a CCTP outage.Verified
destinationCallerenforcement and replay protection all held. Standard messages haveexpirationBlock0, and Iris refuses to re-attest them.main(through docs(adr)!: the payer fronts credit #2877):--all-features --all-targets, 6196/6196 workspace tests,cargo docwith warnings denied, client API snapshot unchanged.decdn-nodeanvil tests fail only on macOS (Linux-only port helper); CI runs them.Outside this repo (devops)
Decdn*WatcherStalled,DecdnChainWatcherFlapping,chain_get_logs_*,settlement_reanchor_*,fee_shares_watcher_*.blacklist_reenumeration_failures_totalis nowblacklist_ledger_poll_failures_total.decdn_serve_stream_rejected_unaccepted_pool_totalsubtracted.[blockchain]shape andreceipt_poll_interval_ms.🤖 Generated with Claude Code