Repository navigation
feat!: retire slashing, slash escrow and the unbonding window - #2938
Conversation
No slashable offense remains, so the slashing machinery and everything that exists only to support it goes. Contracts: delete SlashJudge, SlashAppeal, SlashEscrowLib and their interfaces. CapacityBond drops slash, the tier ladder, offense counts, escrow and appeal settlement, SLASH_ROLE / SLASH_APPEAL_ROLE and the evidence-age cross-check. The unbonding window is gone: unbond(amount) returns TOKEN in the same transaction, bounded by the bond curve. DecdnGovernor no longer zeroes vote weight on a slash. Signatures: StreamResponse and OriginAttestation sign under the CapacityBond EIP-712 domain, the one bindingSignature already uses. slash_judge_address / slash_appeal_address leave the config, flags, manifest, gateway, onramp installers and SDK examples. Rust: delete the node slash watcher, its metrics and admin_v1_slashes, the incentive SlashJudge/SlashAppeal bindings, `decdn appeal slash` and `decdn node slashes`. `decdn node unbond` and `rotate-key --key eth` exit in one step. TERMS.md drops the slashing wording (new terms hash). Docs: retire ADR 014 and ADR 028 to adr/_history; the StreamResponse signature scheme moves to ADR 005 § Signer binding. ADR 003, 005, 009, 011, 016, 019, 026, 030, 036 and the appendices drop slashing and the unbonding window. Closes #2917 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 5 most impacted files.
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. Updated |
Gas snapshotNo gas changes vs base. |
There was a problem hiding this comment.
🔵 Needs a closer look
The supplied diffs omit core contract and deployment changes affecting withdrawals and signing domains, requiring human review of economic and governance invariants before approval.
No open issues 🎉
What changed in this PR
This breaking change retires deCDN’s slashing machinery after removal of the remaining offenses. It consolidates signature verification under CapacityBond and removes slash-related configuration, CLI commands, reporting, and interfaces. Blacklist enforcement and operator ejection remain for the separate #2916 work.
Changes:
- Use the
CapacityBondsigning domain for stream responses and origin attestations, including client sessions and receipts. - Remove slash-related bindings, installer options, appeal commands, and dashboard reporting.
- Update fixtures, tests, operator terms, and documentation for immediate bond exits and enforcement without slashing.
| File | Description |
|---|---|
docs/sponsord/operator.md |
Remove obsolete onramp environment option. |
docs/sponsord/architecture.md |
Update installer signing-domain documentation. |
deploy/sponsord/sponsord-onramp.env.example |
Remove SlashJudge configuration example. |
crates/sponsord-onramp/tests/http_contract.rs |
Update installer expectations without SlashJudge. |
crates/sponsord-onramp/src/test_support.rs |
Remove obsolete fixture field. |
crates/sponsord-onramp/src/state.rs |
Stop forwarding SlashJudge into profiles. |
crates/sponsord-onramp/src/installer.rs |
Remove SlashJudge profile and substitution. |
crates/sponsord-onramp/src/config.rs |
Remove SlashJudge arguments and configuration. |
crates/sponsord-onramp/assets/decdn.sh |
Remove obsolete installer flag. |
crates/sponsord-onramp/assets/decdn.ps1 |
Remove obsolete installer flag. |
crates/protocol/src/message.rs |
Point signature documentation to ADR 005. |
crates/protocol/src/lib.rs |
Update timestamp-skew documentation. |
crates/node/tests/support/mod.rs |
Update shared-domain terminology in comments. |
crates/node/tests/sighup_signal.rs |
Remove obsolete configuration fixture field. |
crates/node/tests/partial_serve.rs |
Switch test signing-domain helpers. |
crates/node/tests/origin_range_pull.rs |
Switch test signing-domain helpers. |
crates/node/tests/node_to_node_pull_through.rs |
Switch both hops’ domain helpers. |
crates/node/tests/node_origin_pull.rs |
Update domains and active-set comments. |
crates/node/tests/json_log_node_id.rs |
Remove obsolete daemon argument. |
crates/node/tests/client_loopback.rs |
Update domains and compliance comments. |
crates/node/tests/anvil_settlement_e2e.rs |
Use deployed CapacityBond for signatures. |
crates/node/tests/anvil_bringup_shutdown_e2e.rs |
Remove SlashJudge deployment coordinates. |
crates/node/src/runtime/tests.rs |
Remove obsolete configuration fixture field. |
crates/node/src/runtime/reload/tests.rs |
Remove obsolete configuration fixture field. |
crates/node/src/runtime/reload.rs |
Remove obsolete reload fixture field. |
crates/node/src/metrics/tests.rs |
Remove slash-resync metric assertions. |
crates/node/src/load_shed/mod.rs |
Remove slashing language from documentation. |
crates/node/src/lib.rs |
Remove slash-watcher module export. |
crates/node/src/handlers/client/outcome.rs |
Update timestamp refusal documentation. |
crates/node/src/handlers/client/mod.rs |
Document CapacityBond signatures and compliance. |
crates/node/src/handlers/client/dispatch.rs |
Explain timestamp and freshness gates without slashing. |
crates/node/src/dht/node_address.rs |
Update bond-transition terminology in comments. |
crates/node/src/dht/negative_cache.rs |
Update signature-retention terminology. |
crates/node/src/dht/chain_staker_set.rs |
Document revised active-set predicate. |
crates/node/src/dht/candidate_cache.rs |
Explain caching without slash-evidence rationale. |
crates/node/src/dht/attestation/test_support.rs |
Sign fixtures under CapacityBond. |
crates/node/src/dht/attestation.rs |
Document new attestation domain. |
crates/node/src/chain_freshness.rs |
Explain compliance protection without slashing. |
crates/node/src/chain_events/snapshot.rs |
Remove slash snapshots from documentation. |
crates/node/src/chain_events/mod.rs |
Update chain-reader documentation. |
crates/node/src/chain_events/boot_retry/tests.rs |
Test empty returns with retained bond getter. |
crates/node/src/chain_events/boot_retry.rs |
Document bootstrap sequence without slash reads. |
crates/node/src/binding_check/tests.rs |
Describe binding mismatch as unroutable. |
crates/node/src/admin/tests.rs |
Remove slash-reporting RPC tests. |
crates/incentive/src/slash_judge.rs |
Delete SlashJudge ABI bindings. |
crates/incentive/src/sig_canon.rs |
Update signature terminology in comments. |
crates/incentive/src/origin_attestation/tests.rs |
Verify attestations under CapacityBond. |
crates/incentive/src/origin_attestation.rs |
Document shared domain and distinct signed types. |
crates/incentive/src/eth_identity.rs |
Update signer-use documentation. |
crates/incentive/src/content_blacklist.rs |
Document compliance rather than slash boundaries. |
crates/incentive/src/bind_sig/tests.rs |
Use renamed domain helper. |
crates/incentive/src/bind_sig.rs |
Expose shared capacity_bond_domain helper. |
crates/e2e/tests/smoke.rs |
Update journey documentation. |
crates/e2e/tests/peer_store_probeless.rs |
Remove obsolete flag and update helper reference. |
crates/e2e/tests/origin_stream_while_store.rs |
Remove slashing language from test comments. |
crates/e2e/tests/gateway_concurrent_pulls.rs |
Remove obsolete gateway argument. |
crates/e2e/tests/g_node_01_onboarding.rs |
Explain registration through routing and attribution. |
crates/e2e/tests/cli_receipt.rs |
Remove obsolete CLI argument. |
crates/e2e/tests/cli_quote.rs |
Remove obsolete CLI argument. |
crates/e2e/tests/cli_publish.rs |
Remove references to deleted appeal journey. |
crates/e2e/tests/cli_fetch_two_data_dirs.rs |
Remove obsolete CLI argument. |
crates/e2e/tests/cli_fetch_topup.rs |
Remove obsolete CLI argument. |
crates/e2e/tests/cli_fetch_stdout.rs |
Remove obsolete CLI argument. |
crates/e2e/tests/cli_fetch_resume.rs |
Remove obsolete CLI argument. |
crates/e2e/tests/cli_fetch_recovers_one_holder.rs |
Remove obsolete fetch arguments. |
crates/e2e/tests/cli_fetch_multi_source.rs |
Remove obsolete CLI argument. |
crates/e2e/tests/cli_fetch_delegated.rs |
Remove obsolete CLI argument. |
crates/e2e/tests/cli_bundle_pull_unmatched_warning.rs |
Remove obsolete CLI argument. |
crates/e2e/tests/cli_bundle_pull_two_pools.rs |
Remove SlashJudge from generated configuration. |
crates/e2e/tests/cli_bundle_pull_range_dedup.rs |
Remove obsolete bundle arguments. |
crates/e2e/tests/cli_bundle_pull_pool_id.rs |
Remove obsolete CLI argument. |
crates/e2e/tests/cli_bundle_pull_multi_source.rs |
Remove obsolete CLI argument. |
crates/e2e/tests/cli_bundle_pull_default_dest.rs |
Remove obsolete CLI argument. |
crates/e2e/src/timeout.rs |
Update journey timeout rationale. |
crates/e2e/src/time.rs |
Remove obsolete window and snapshot comments. |
crates/e2e/src/pool_owner.rs |
Remove obsolete shared CLI argument. |
crates/e2e/src/node/tests.rs |
Remove slash-contract fixture addresses. |
crates/e2e/src/node.rs |
Remove slash configuration and watcher comments. |
crates/e2e/src/lib.rs |
Update time-helper documentation. |
crates/e2e/src/client.rs |
Use CapacityBond for fixture signing domains. |
crates/e2e/src/chain/tests.rs |
Update deployment manifest fixtures and counts. |
crates/common/src/config/resolved.rs |
Remove resolved SlashJudge address. |
crates/common/src/cli/run.rs |
Remove SlashJudge flag and document shared domain. |
crates/common/src/cli/receipt.rs |
Document CapacityBond receipt verification. |
crates/common/src/cli/probe.rs |
Consolidate probe domain configuration. |
crates/common/src/cli/mod.rs |
Remove appeal and slash-command exports. |
crates/common/src/cli/fetch.rs |
Consolidate fetch domain configuration. |
crates/common/src/cli/common.rs |
Update governance-chain signature documentation. |
crates/common/src/cli/appeal.rs |
Delete appeal command arguments. |
crates/client/tests/snapshots/public_api__public_api.snap |
Record breaking session and receipt API changes. |
crates/client/src/targets/tests.rs |
Update chain fixtures and response domains. |
crates/client/src/streamer/tests.rs |
Use renamed fixture domain helper. |
crates/client/src/source.rs |
Use renamed test-double domain helper. |
crates/client/src/session/test_support.rs |
Simplify chain fixture construction. |
crates/client/src/session.rs |
Require CapacityBond and remove SlashJudge. |
crates/client/src/scheduler/tests.rs |
Use renamed fixture domain helper. |
crates/client/src/recovery/tests.rs |
Use renamed fixture domain helper. |
crates/client/src/receipt/tests.rs |
Update receipt schema and signing tests. |
crates/client/src/receipt.rs |
Store and verify CapacityBond receipt domain. |
crates/client/src/rate_limited.rs |
Remove obsolete slashing documentation reference. |
crates/client/src/quote/tests.rs |
Update quote fixtures and response domain. |
crates/client/src/quote.rs |
Verify census responses under CapacityBond. |
crates/client/src/opened/tests.rs |
Switch response fixture domain. |
crates/client/src/ledgers.rs |
Use renamed placeholder domain helper. |
crates/client/src/lanes/tests.rs |
Update chain fixtures and domain helpers. |
crates/client/src/lanes.rs |
Document CapacityBond response verification. |
crates/client/src/funding/tests.rs |
Update binding-domain assertions. |
crates/client/src/funding/adoption_tests.rs |
Update delegated funding fixtures. |
crates/client/src/funding.rs |
Always attach the CapacityBond client binding. |
crates/client/src/first_open/tests.rs |
Use renamed fixture domain helper. |
crates/client/src/driver/tests.rs |
Use renamed fixture domain helper. |
crates/client/src/downloader/tests.rs |
Use renamed fixture domain helper. |
crates/client/src/discovery/tests.rs |
Update stale-registry warning assertion. |
crates/client/src/discovery.rs |
Update activity documentation and fallback warning. |
crates/client/src/credential/tests.rs |
Use renamed fixture domain helper. |
crates/client/src/connection/tests.rs |
Switch connection-test response domains. |
crates/client/src/bundle/engine/tests.rs |
Simplify chain fixtures and rename helper. |
crates/client/src/bundle/engine.rs |
Use mandatory CapacityBond address directly. |
crates/client/src/bundle.rs |
Build bundle response domain from CapacityBond. |
crates/client/README.md |
Remove obsolete example environment variable. |
crates/client/examples/bundle.rs |
Update example governance configuration. |
crates/cli/tests/get_node_dir_guard.rs |
Supply CapacityBond in client configuration. |
crates/cli/tests/doctor_cli.rs |
Remove obsolete configuration key. |
crates/cli/tests/config_validate.rs |
Update configuration fixtures. |
crates/cli/TERMS.md |
Remove slashing and describe direct bond withdrawal. |
crates/cli/src/main.rs |
Remove appeal command dispatch. |
crates/cli/src/known_chains/tests.rs |
Remove slash-contract manifest expectations. |
crates/cli/src/known_chains.rs |
Stop parsing slash-contract addresses. |
crates/cli/src/commands/terms/tests.rs |
Pin revised operator-terms hash. |
crates/cli/src/commands/rotate_key/mod.rs |
Document immediate exit and routing consequences. |
crates/cli/src/commands/rotate_key/iroh/tests.rs |
Update disclosure tests without slash evidence. |
crates/cli/src/commands/register.rs |
Use renamed registration-domain helper. |
crates/cli/src/commands/receipt/tests.rs |
Pin CapacityBond receipt coordinates. |
crates/cli/src/commands/receipt.rs |
Validate receipt CapacityBond against known deployments. |
crates/cli/src/commands/probe/tests.rs |
Assert CapacityBond flag forwarding. |
crates/cli/src/commands/probe.rs |
Verify probes under CapacityBond. |
crates/cli/src/commands/mod.rs |
Remove appeal module export. |
crates/cli/src/commands/gateway/tests.rs |
Update governance-chain fixture. |
crates/cli/src/commands/gateway.rs |
Remove SlashJudge default injection. |
crates/cli/src/commands/fetch/cache_store/tests.rs |
Use renamed fixture domain helper. |
crates/cli/src/commands/doctor/chain.rs |
Stop checking SlashJudge deployment code. |
crates/cli/src/commands/deregister/tests.rs |
Assert retained-deposit disclosure wording. |
crates/cli/src/commands/dashboard/status/tests.rs |
Remove slash-status fixtures. |
crates/cli/src/commands/dashboard/status.rs |
Remove slash reporting from status model. |
crates/cli/src/commands/dashboard/sources/tests.rs |
Remove obsolete RPC error-code case. |
crates/cli/src/commands/config/tests.rs |
Remove slash configuration expectations. |
crates/cli/src/commands/chain_ctx/tests.rs |
Remove appeal resolution tests and fields. |
crates/cli/src/commands/appeal/tests.rs |
Delete appeal command tests. |
crates/cli/README.md |
Remove appeal from command list. |
crates/cli/dashboard/src/view.ts |
Remove offense formatter and update polling comment. |
crates/cli/dashboard/src/view.test.ts |
Remove slash fixtures and formatter tests. |
crates/cli/dashboard/src/fixtures/dashboard-full.json |
Remove slash-status payload. |
crates/cli/dashboard/src/fixtures/dashboard-failing.json |
Remove slash-status payload. |
crates/cli/dashboard/src/fixtures/dashboard-alone.json |
Remove slash-status payload. |
crates/cli/dashboard/src/contract.test.ts |
Remove slash response shape checks. |
crates/cli/dashboard/src/components/NodeSlashes.tsx |
Delete slash-reporting panel. |
crates/cli/dashboard/src/components/NodeHealth.tsx |
Explain activity and binding through routing. |
crates/cli/dashboard/src/App.tsx |
Remove slash panel integration. |
crates/cli/dashboard/src/api.ts |
Remove slash DTOs and status field. |
crates/cli/Cargo.toml |
Update domain wording in dependency comment. |
crates/cache/src/origin/mod.rs |
Remove slash rationale from origin documentation. |
CONTRIBUTING.md |
Update deployment-parameter examples. |
contracts/test/Token.t.sol |
Attribute burn tests to buybacks in comment. |
contracts/test/RegionScopeLib.t.sol |
Remove slash-path rationale from comments. |
contracts/test/mocks/MockSlashJudgeEvidence.sol |
Delete obsolete evidence-age mock. |
contracts/test/mocks/MockCapacityBond.sol |
Remove slash-record mock surface. |
contracts/test/GenesisBuybackActivation.t.sol |
Remove obsolete deployment parameters. |
contracts/test/GenesisBuybackActivation.fork.t.sol |
Remove obsolete deployment parameters. |
contracts/test/E2EProtocol.t.sol |
Remove obsolete deployment parameters. |
contracts/test/ContentBlacklist.t.sol |
Describe effective boundary in test comment. |
contracts/src/Token.sol |
Document buyback burn consumer. |
contracts/src/PublisherRegistry.sol |
Correct deployment-step comment. |
contracts/src/OriginAssignment.sol |
Update deployment and inactive-operator comments. |
contracts/src/interfaces/ISlashJudgeEvidenceView.sol |
Delete evidence-age interface. |
contracts/src/interfaces/ISlashAppeal.sol |
Delete appeal interface. |
contracts/src/interfaces/IFeeRouter.sol |
Document epoch alignment through declarations. |
contracts/src/interfaces/IContentBlacklistHashView.sol |
Delete slash-only blacklist view interface. |
contracts/src/interfaces/ICapacityBondSlashEscrow.sol |
Delete slash-escrow interface. |
contracts/src/interfaces/ICapacityBondSlasher.sol |
Delete slasher interface. |
contracts/src/interfaces/ICapacityBondRegionView.sol |
Document remaining blacklist consumer. |
contracts/src/interfaces/ICapacityBondActivity.sol |
Update activity documentation for immediate unbonding. |
contracts/src/interfaces/ICapacityBond.sol |
Remove slash reads from governance interface. |
contracts/src/BuybackBurner.sol |
Remove obsolete slashing documentation reference. |
adr/Makefile |
Remove retired ADRs from book sources. |
adr/appendix-poc-production-seams.md |
Remove obsolete contract and parameter examples. |
adr/appendix-operator-upgrade-path.md |
Update signature and restart terminology. |
adr/appendix-local-admin-http.md |
Remove slash RPC from method table. |
adr/appendix-l2-deployment.md |
Remove slashing from governance-chain responsibilities. |
adr/appendix-binaries.md |
Remove appeal command and slash polling documentation. |
adr/041-refuse-to-serve.md |
Describe refusal and pricing without slashing. |
adr/037-regional-proxy-warming.md |
Emphasize voucher-enforced pricing. |
adr/001-network.md |
Update candidate-cache signature terminology. |
adr/_build/part-5-verification.md |
Summarize enforcement without slashing. |
.github/workflows/ci.yml |
Update comments describing cross-layer tests. |
.github/scripts/tests/test_solidity_path_filter.py |
Replace deleted watcher path in filter fixture. |
.claude/skills/decdn-spec-discipline/SKILL.md |
Add slashing-removal precedent. |
.claude/skills/decdn-spec-discipline/references/decdn-precedents.md |
Record removal of dependent slashing machinery. |
Review effort: Balanced
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- CapacityBond: a full exit (unbond below the activation floor) clears firstBondedAt and the floor, so bonding minBond and withdrawing it in one transaction cannot pre-age an address. bond and registerNode share one entry transition that records the live minBond and starts tenure when none runs; isActive requires a recorded floor. - decdn node unbond: a broadcast unbond whose receipt was not read no longer reports "no transaction landed"; the resume hint and the write-error ordering follow `decdn node bond`. - rotate-key --key eth: an inactive operator that still holds a tier clears it with declareMbps(0) before the unbond. - sponsord-onramp: MIN_DECDN_RELEASE is v0.4.0, the first decdn get that verifies under the CapacityBond domain. - Tests for the tenure reset, the unbond resume hints, the eth-rotation tier clear and annotate_cache_miss's deposit branch; dead e2e helpers removed. - Docs: tenure rule (ADR 003, 019, 026, 036), ADR 016 deploy-order diagram, RegisterNode binding and ejection (ADR 003, 011), boot reads (ADR 019, observability), and stale slash-era comments. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…lither Co-Authored-By: Claude Opus 5.5 <[email protected]>
- CapacityBond: a tenured operator's bond() records no entry, so a top-up keeps its grandfathered floor through a raised minBond; only a bond while no tenure runs, or registerNode, records the live minBond. Tests pin the unbond floor comparison against a raised and a lowered minBond, the tenured top-up, eject -> tenure end -> re-entry, and a Governor vote after a tenure reset. - rotate-key --key eth: the unbond phase asks first and discloses the tenure end and the tier it clears; the tier also reaches stderr when the receipt write fails. A calldata test pins declareMbps(0) before unbond. - decdn node unbond / bond: the no-recorded-tx hint covers a send whose broadcast is unknown. unbond reports a registered operator with no tenure as already inactive. - sponsord-onramp: the tag-shape and digest guards are tested above the v0.4.0 minimum; the rejection names both reasons for it. - annotate_cache_miss: the NotFound filter is tested; the redundant rate-0 guard is gone. - Docs: one tenure rule (ADR 036), linked from ADR 003, 009, 019, 026 and README; "ends the tenure" vs "full exit"; ADR 036 snapshot invariant; NodeInfo matches the contract; ADR 016 diagram; stale firstBondedAt / isActive / phase-4 comments. Co-Authored-By: Claude Opus 5.5 <[email protected]>
* feat!: retire slashing, slash escrow and the unbonding window No slashable offense remains, so the slashing machinery and everything that exists only to support it goes. Contracts: delete SlashJudge, SlashAppeal, SlashEscrowLib and their interfaces. CapacityBond drops slash, the tier ladder, offense counts, escrow and appeal settlement, SLASH_ROLE / SLASH_APPEAL_ROLE and the evidence-age cross-check. The unbonding window is gone: unbond(amount) returns TOKEN in the same transaction, bounded by the bond curve. DecdnGovernor no longer zeroes vote weight on a slash. Signatures: StreamResponse and OriginAttestation sign under the CapacityBond EIP-712 domain, the one bindingSignature already uses. slash_judge_address / slash_appeal_address leave the config, flags, manifest, gateway, onramp installers and SDK examples. Rust: delete the node slash watcher, its metrics and admin_v1_slashes, the incentive SlashJudge/SlashAppeal bindings, `decdn appeal slash` and `decdn node slashes`. `decdn node unbond` and `rotate-key --key eth` exit in one step. TERMS.md drops the slashing wording (new terms hash). Docs: retire ADR 014 and ADR 028 to adr/_history; the StreamResponse signature scheme moves to ADR 005 § Signer binding. ADR 003, 005, 009, 011, 016, 019, 026, 030, 036 and the appendices drop slashing and the unbonding window. Closes #2917 Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(contracts): keep _governedTargets under the solhint line limit Co-Authored-By: Claude Opus 5.5 <[email protected]> * refactor!: name the operator stream signature for what it is With slashing retired, the StreamResponse signature is the operator's signature over the answer, not slash evidence. Rename it everywhere: - slash_sig -> operator_sig (wire field, receipt JSON key, helpers) - SLASH_SIG_LEN -> OPERATOR_SIG_LEN - InvalidSlashSigLen -> InvalidOperatorSigLen - StreamSlashData / StreamSlashError -> StreamSigData / StreamSigError - slash_domain / slash_dom / HandlerDomains.slash -> stream_domain / stream_dom No behavior change. The postcard encoding is positional, so the wire bytes are identical; the receipt JSON key and the public API of decdn-protocol and decdn-client change. Refs #2917 Co-Authored-By: Claude Opus 5.5 <[email protected]> * chore(contracts): regenerate the gas snapshot Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix: address the #2938 review - CapacityBond: a full exit (unbond below the activation floor) clears firstBondedAt and the floor, so bonding minBond and withdrawing it in one transaction cannot pre-age an address. bond and registerNode share one entry transition that records the live minBond and starts tenure when none runs; isActive requires a recorded floor. - decdn node unbond: a broadcast unbond whose receipt was not read no longer reports "no transaction landed"; the resume hint and the write-error ordering follow `decdn node bond`. - rotate-key --key eth: an inactive operator that still holds a tier clears it with declareMbps(0) before the unbond. - sponsord-onramp: MIN_DECDN_RELEASE is v0.4.0, the first decdn get that verifies under the CapacityBond domain. - Tests for the tenure reset, the unbond resume hints, the eth-rotation tier clear and annotate_cache_miss's deposit branch; dead e2e helpers removed. - Docs: tenure rule (ADR 003, 019, 026, 036), ADR 016 deploy-order diagram, RegisterNode binding and ejection (ADR 003, 011), boot reads (ADR 019, observability), and stale slash-era comments. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(contracts): mark the firstBondedAt zero check as a sentinel for slither Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix: address the #2938 re-review - CapacityBond: a tenured operator's bond() records no entry, so a top-up keeps its grandfathered floor through a raised minBond; only a bond while no tenure runs, or registerNode, records the live minBond. Tests pin the unbond floor comparison against a raised and a lowered minBond, the tenured top-up, eject -> tenure end -> re-entry, and a Governor vote after a tenure reset. - rotate-key --key eth: the unbond phase asks first and discloses the tenure end and the tier it clears; the tier also reaches stderr when the receipt write fails. A calldata test pins declareMbps(0) before unbond. - decdn node unbond / bond: the no-recorded-tx hint covers a send whose broadcast is unknown. unbond reports a registered operator with no tenure as already inactive. - sponsord-onramp: the tag-shape and digest guards are tested above the v0.4.0 minimum; the rejection names both reasons for it. - annotate_cache_miss: the NotFound filter is tested; the redundant rate-0 guard is gone. - Docs: one tenure rule (ADR 036), linked from ADR 003, 009, 019, 026 and README; "ends the tenure" vs "full exit"; ADR 036 snapshot invariant; NodeInfo matches the contract; ADR 016 diagram; stale firstBondedAt / isActive / phase-4 comments. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix: address the #2939 review - decdn probe: the operator_sig row lines up with the other rows again; a test pins every value at column 17. - Two comments still framed the signature as slash evidence. - "a `operator_sig`" -> "an `operator_sig`" in ADR 012, 017, 022, 024 and a node test; a test local holding signed data is `sig_data`. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
What
No slashable offense remains. Rate-manipulation slashing went with #2901. This PR deletes the Blacklist offense together with
SlashJudge, so #2917 lands before #2916, by decision. With the offense gone, this removes the slashing machinery and everything that exists only to support it.Closes #2917
Breaking
SlashJudge,SlashAppealandSlashEscrowLib.CapacityBond:requestUnbond(uint256)andunbond()become oneunbond(uint256 amount). It returns TOKEN in the same transaction, it is not pausable, and the bond curve still bounds it.Unbondedis now(operator, amount, newActiveBond).unbondingPeriod_.AutoEjected;NodeAutoEjectedstays.DecdnGovernor: vote weight is no longer zeroed by a slash.StreamResponseandOriginAttestationsignatures use the CapacityBond EIP-712 domain{name "CapacityBond", version "1", chainId, verifyingContract: CapacityBond}, whichbindingSignaturealready uses. Signatures under the olddeCDN SlashJudgedomain do not verify.blockchain.slash_judge_addressandslash_appeal_addresskeys,--slash-judge-addressandDECDN_SLASH_JUDGE_ADDRESSare gone. Because ofdeny_unknown_fields, a config that still sets them is rejected.decdn getnow requirescapacity_bond_address.decdn appeal slashanddecdn node slashesare gone.decdn node unbondandrotate-key --key ethexit in one step. Their JSON keys change:phase,unlock_at,remaining_secs,request_txandwithdraw_txare gone, andunbond_txis added.admin_v1_slashesis gone; code -32009 stays unused.chain.slash_judgebecomeschain.capacity_bond.contracts.SlashJudgeandcontracts.SlashAppealare no longer written.ONRAMP_SLASH_JUDGE_ADDRand the installers'--slash-judge-addressare gone.decdn_slashes_detected_totalanddecdn_slash_resync_failures_totalare gone.crates/cli/TERMS.mddrops the slashing wording, so the terms hash is now0x9dc5c8d1…a8e8.Reviewer notes
Read in this order:
contracts/src/CapacityBond.solcrates/incentive/src/{stream_sig,bind_sig,origin_attestation}.rs(the domain switch;bind_node_id_domainis nowcapacity_bond_domain)crates/cli/src/commands/unbond.rsUnchanged on purpose, left for #2916:
ContentBlacklist,ejectNode/unEjectNode,BLACKLIST_ROLE,blacklistEjected,RegionScopeLib, and the compliance windows. Non-compliance now means blacklist plus ejection. ADR 030 keeps the region-stability window on its one remaining surface, the serve-time scope predicate. #2916 decides whether the window survives.ADRs.
adr/_history/. ADR 014's signature scheme moves to ADR 005 § Signer binding.Timestamp-skew refusal kept. The ±30 s check stays. Its rationale is now the signed timestamp that a pull receipt carries as the serve time. The SlashJudge constant and assert are deleted.
Identifier names kept.
slash_sig,SLASH_SIG_LEN,InvalidSlashSigLen,StreamSlashData/StreamSlashErrorand theslash_domain/slash_domvariables keep their names here. A follow-up PR renames them mechanically.Binding-mismatch wording. It says "unroutable" instead of "unslashable": a node whose key is not bound to its operator produces signatures that clients drop.
Review. The pr-review-toolkit pass (contracts, Rust, silent failures, tests, comments) is addressed in
fix: address the #2938 review.reclaimNodeId's missing tests predate this PR: #2940.Slither was not run locally; the local install is broken. The only new external call is
unbond, which does checks, then effects, then the transfer, likebond(). CI's slither job covers it.Follow-ups after merge:
slash_judge_addressfrom thedecdn_node,decdn_gatewayandsponsord_onramproles and thedecdn-nodeHelm chart (values.schema.jsonrequired list,values.yaml,ci/*.yaml, README) with the release bump.deny_unknown_fieldsrejects the key. Move the onramp's decdn pin to v0.4.0.group_vars.CURRENT_TERMS_HASH), then regeneratecontracts/deployments/421614.json. It still lists the two keys.Verification
Always:
pre-commit run --all-files: all hooks pass exceptend-of-file-fixer, which reformatted.gas-snapshot; that file is committed. cargo-deny warns only, about advisories already on main.cargo clippy --workspace --all-targets --all-features -- -D warnings: exit 0cargo nextest run --workspace: 6102 passedfeat!:, lowercase subjectOnly if touched:
contracts/(forge v1.7.1):forge fmt --check,FOUNDRY_PROFILE=ci forge build --sizes --deny warnings(CapacityBond is 18,049 B), andforge test(749 passed, 3 skipped) all pass..gas-snapshotis regenerated.decdn-clientsnapshot is regenerated; thedecdn-protocolsnapshot does not change.adr/:make -C adr check-refs check-book-listpasses, andarchitecture.mdis updated.appendix-observability.mdrows are deleted. Dashboards in decdn/devops follow.decdn-e2e --features anvil-e2e(141 passed, including the rewritteng_node_06_unbondandg_node_07_rotate_key),decdn-nodeanvil (5 passed), sponsord anvil (2 passed).pnpmtest, typecheck, lint and build pass (78 tests).sponsord-onramp: 60 passed.uvx --with pyyaml pytest .github/scripts/tests scripts/tests: 617 passed.🤖 Generated with Claude Code