Skip to content

feat!: retire slashing, slash escrow and the unbonding window - #2938

Merged
thiras merged 6 commits into
mainfrom
feat/2917-retire-slashing
Nov 22, 2026
Merged

thiras merged 6 commits into
mainfrom
feat/2917-retire-slashing

Conversation

@thiras

@thiras thiras commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Contract ABI.
    • Gone: SlashJudge, SlashAppeal and SlashEscrowLib.
    • CapacityBond:
      • requestUnbond(uint256) and unbond() become one unbond(uint256 amount). It returns TOKEN in the same transaction, it is not pausable, and the bond curve still bounds it.
      • Unbonded is now (operator, amount, newActiveBond).
      • The constructor drops unbondingPeriod_.
      • Every slash, escrow, appeal and unbonding-window function, event, error and role is deleted. That includes AutoEjected; NodeAutoEjected stays.
    • DecdnGovernor: vote weight is no longer zeroed by a slash.
  • Signing domain. StreamResponse and OriginAttestation signatures use the CapacityBond EIP-712 domain {name "CapacityBond", version "1", chainId, verifyingContract: CapacityBond}, which bindingSignature already uses. Signatures under the old deCDN SlashJudge domain do not verify.
  • Config and CLI.
    • The blockchain.slash_judge_address and slash_appeal_address keys, --slash-judge-address and DECDN_SLASH_JUDGE_ADDRESS are gone. Because of deny_unknown_fields, a config that still sets them is rejected.
    • decdn get now requires capacity_bond_address.
    • decdn appeal slash and decdn node slashes are gone.
    • decdn node unbond and rotate-key --key eth exit in one step. Their JSON keys change: phase, unlock_at, remaining_secs, request_tx and withdraw_tx are gone, and unbond_tx is added.
  • Admin RPC. admin_v1_slashes is gone; code -32009 stays unused.
  • Receipt JSON. chain.slash_judge becomes chain.capacity_bond.
  • Deploy manifest. contracts.SlashJudge and contracts.SlashAppeal are no longer written.
  • sponsord-onramp. ONRAMP_SLASH_JUDGE_ADDR and the installers' --slash-judge-address are gone.
  • Metrics. decdn_slashes_detected_total and decdn_slash_resync_failures_total are gone.
  • Operator terms. crates/cli/TERMS.md drops the slashing wording, so the terms hash is now 0x9dc5c8d1…a8e8.

Reviewer notes

Read in this order:

  1. contracts/src/CapacityBond.sol
  2. crates/incentive/src/{stream_sig,bind_sig,origin_attestation}.rs (the domain switch; bind_node_id_domain is now capacity_bond_domain)
  3. crates/cli/src/commands/unbond.rs
  4. ADR 005 § Signer binding

Unchanged 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 014 and ADR 028 move to adr/_history/. ADR 014's signature scheme moves to ADR 005 § Signer binding.
  • ADR 016's deploy-order table is renumbered without gaps; contract comments that cite step numbers are updated.
  • 014 and 028 join the retired-number list in CLAUDE.md.

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 / StreamSlashError and the slash_domain / slash_dom variables 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, like bond(). CI's slither job covers it.

Follow-ups after merge:

  • devops: drop slash_judge_address from the decdn_node, decdn_gateway and sponsord_onramp roles and the decdn-node Helm chart (values.schema.json required list, values.yaml, ci/*.yaml, README) with the release bump. deny_unknown_fields rejects the key. Move the onramp's decdn pin to v0.4.0.
  • fleet: group_vars.
  • Arbitrum Sepolia redeploy (new CapacityBond ABI, new CURRENT_TERMS_HASH), then regenerate contracts/deployments/421614.json. It still lists the two keys.
  • website copy on slashing.
  • Comment on Reduce ContentBlacklist to regional tag lists; retire blacklist slashing and operator ejection #2916 that its SlashJudge part is done.

Verification

Always:

  • pre-commit run --all-files: all hooks pass except end-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 0
  • cargo nextest run --workspace: 6102 passed
  • PR title feat!:, lowercase subject

Only if touched:

  • contracts/ (forge v1.7.1): forge fmt --check, FOUNDRY_PROFILE=ci forge build --sizes --deny warnings (CapacityBond is 18,049 B), and forge test (749 passed, 3 skipped) all pass. .gas-snapshot is regenerated.
  • Public API: the decdn-client snapshot is regenerated; the decdn-protocol snapshot does not change.
  • adr/: make -C adr check-refs check-book-list passes, and architecture.md is updated.
  • Metric names: the appendix-observability.md rows are deleted. Dashboards in decdn/devops follow.
  • anvil e2e: decdn-e2e --features anvil-e2e (141 passed, including the rewritten g_node_06_unbond and g_node_07_rotate_key), decdn-node anvil (5 passed), sponsord anvil (2 passed).
  • Dashboard: pnpm test, 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

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]>
@thiras thiras self-assigned this Nov 22, 2026
Copilot AI balanced review requested due to automatic review settings November 22, 2026 16:26
@github-code-quality

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

Copy link
Copy Markdown

Code coverage overview

Languages: Rust, Solidity

Rust / code-coverage/cargo-llvm-cov

main bb063fb feat/2917-retire-sla... 45fb886 +/-
77% 77% 0%
View coverage of the 10 most impacted files.
File main bb063fb feat/2917-retire-sla... 45fb886 +/-
crates/node/src/dht/publish.rs 79% 77% -2%
crates/client/src/lib.rs 89% 89% 0%
crates/node/src/runtime/mod.rs 27% 27% 0%
crates/client/src/targets.rs 80% 81% +1%
crates/e2e/src/chain.rs 9% 11% +2%
crates/cli/src/...ommands/node.rs 67% 69% +2%
crates/cli/src/...mmands/fetch.rs 42% 45% +3%
crates/cli/src/...mands/unbond.rs 45% 56% +11%
crates/incentive/src/tx.rs 78% 91% +13%
crates/cli/src/...tate_key/eth.rs 25% 42% +17%

Solidity / code-coverage/forge

main bb063fb feat/2917-retire-sla... 45fb886 +/-
92% 90% -2%
View coverage of the 5 most impacted files.
File main bb063fb feat/2917-retire-sla... 45fb886 +/-
contracts/src/CapacityBond.sol 91% 88% -3%
contracts/scrip...colDeploy.s.sol 95% 95% 0%
contracts/scrip...yProtocol.s.sol 84% 84% 0%
contracts/src/D...cdnGovernor.sol 96% 96% 0%
contracts/src/BondMath.sol 100% 100% 0%

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


Updated November 22, 2026 18:26 UTC

@github-actions

github-actions Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Gas snapshot

No gas changes vs base.

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.

🔵 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 CapacityBond signing 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

thiras and others added 3 commits November 22, 2026 20:27
- 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]>
- 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]>
@thiras
thiras merged commit a53f26e into main Nov 22, 2026
39 checks passed
@thiras
thiras deleted the feat/2917-retire-slashing branch November 22, 2026 19:29
thiras added a commit that referenced this pull request Nov 22, 2026
* 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]>
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.

Retire slashing: SlashJudge, SlashAppeal, slash escrow and the unbonding window

2 participants