Repository navigation
refactor!: name the operator stream signature for what it is - #2939
Merged
Merged
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]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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]>
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]>
# Conflicts: # crates/e2e/src/client.rs
…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]>
# Conflicts: # crates/cli/src/commands/fetch/tests.rs
- 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]>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the operator-attribution signature rename.
No open issues 🎉
What changed in this PR
Follows #2938’s removal of slashing by naming the stream-response signature for its remaining purpose: operator attribution. The rename spans deCDN’s protocol, signing helpers, client, node, and CLI without changing wire bytes or signature verification.
Changes:
- Renames signature fields, constants, errors, helpers, and domain variables to operator/stream terminology.
- Updates breaking public APIs and receipt/probe JSON keys, regenerates API snapshots, and adds probe-output alignment assertions.
- Aligns ADR terminology and the privacy-section anchor with the new names.
| File | Description |
|---|---|
crates/protocol/tests/snapshots/public_api__public_api.snap |
Records renamed protocol exports. |
crates/protocol/src/message.rs |
Renames signature length constant and validation error. |
crates/protocol/src/lib.rs |
Updates protocol re-exports and documentation. |
crates/protocol/src/dht/tests.rs |
Updates attestation signature-length tests. |
crates/protocol/src/dht.rs |
Renames the attestation signature deserializer. |
crates/protocol/src/client/tests.rs |
Updates response validation and wire-format tests. |
crates/protocol/src/client.rs |
Renames the response signature field and validation references. |
crates/node/tests/support/mod.rs |
Renames the shared handler domain field. |
crates/node/tests/partial_serve.rs |
Updates partial-serving domain fixtures. |
crates/node/tests/origin_range_pull.rs |
Updates origin-range domain fixtures. |
crates/node/tests/node_to_node_pull_through.rs |
Updates upstream signing helpers and domain references. |
crates/node/tests/client_loopback.rs |
Updates loopback signing and verification references. |
crates/node/tests/anvil_settlement_e2e.rs |
Updates settlement test domain references. |
crates/node/src/runtime/mod.rs |
Renames stream-domain wiring throughout node startup. |
crates/node/src/node_origin/pull_leg.rs |
Updates upstream pull domain references. |
crates/node/src/node_origin/mod.rs |
Renames upstream domain fields and attribution terminology. |
crates/node/src/handlers/timestamp_skew.rs |
Updates signature terminology in comments only. |
crates/node/src/handlers/client/wire.rs |
Updates response signing to renamed helpers and fields. |
crates/node/src/handlers/client/tests.rs |
Updates response-signature verification assertions. |
crates/node/src/handlers/client/mod.rs |
Renames handler signing dependencies and domain fields. |
crates/node/src/dht/records/tests.rs |
Updates attestation fixture signature lengths. |
crates/node/src/dht/node_address.rs |
Updates operator-attribution documentation only. |
crates/node/src/dht/candidate_cache.rs |
Updates signature-retention documentation only. |
crates/node/src/dht/attestation/test_support.rs |
Updates the attestation fixture constant. |
crates/incentive/src/stream_sig/tests.rs |
Updates signing-data and verification-error names. |
crates/incentive/src/stream_sig.rs |
Renames signing data, errors, and diagnostic wording. |
crates/incentive/src/origin_attestation/tests.rs |
Updates the cross-signature rejection test helper. |
crates/incentive/src/origin_attestation.rs |
Uses the renamed signature error type. |
crates/incentive/src/lib.rs |
Re-exports renamed signing helpers. |
crates/e2e/tests/cli_receipt.rs |
Updates receipt-signature tampering tests. |
crates/e2e/src/client.rs |
Renames fixture stream-domain fields and usages. |
crates/common/src/config/types.rs |
Updates configuration field documentation only. |
crates/common/src/config/mod.rs |
Updates validation comments only. |
crates/common/src/cli/run.rs |
Updates CapacityBond CLI help terminology. |
crates/common/src/cli/probe.rs |
Updates expected-signer CLI help terminology. |
crates/common/src/cli/node.rs |
Updates key-rotation documentation only. |
crates/common/src/cli/fetch.rs |
Updates fetch CLI help terminology. |
crates/client/tests/snapshots/public_api__public_api.snap |
Records the renamed receipt signature field. |
crates/client/src/tests.rs |
Updates signed-response validation and retention tests. |
crates/client/src/targets/tests.rs |
Updates the verification-error test message. |
crates/client/src/targets.rs |
Renames discovery domain parameters and references. |
crates/client/src/source.rs |
Renames the peer source’s borrowed stream domain. |
crates/client/src/source_set/tests.rs |
Updates the refusal-response fixture. |
crates/client/src/receipt/tests.rs |
Updates signature tests and pinned receipt JSON. |
crates/client/src/receipt.rs |
Renames the receipt field, JSON key, and verification references. |
crates/client/src/quote.rs |
Renames census stream-domain variables. |
crates/client/src/opened/tests.rs |
Updates the stream-domain test variable. |
crates/client/src/opened/fake_node.rs |
Updates fake-node response signing. |
crates/client/src/opened.rs |
Renames open-stage domain parameters. |
crates/client/src/lib.rs |
Updates pull APIs, verification references, and diagnostics. |
crates/client/src/lanes/tests.rs |
Updates lane dependency fixtures. |
crates/client/src/lanes.rs |
Renames the lane dependency’s stream-domain field. |
crates/client/src/lane_sources/tests.rs |
Updates lane-source domain fixtures and usages. |
crates/client/src/driver/tests.rs |
Updates refusal fixtures and signature-test comments. |
crates/client/src/discovery.rs |
Updates discovery attribution documentation only. |
crates/client/src/connection/tests.rs |
Renames connection-test domain variables. |
crates/client/src/bundle/engine.rs |
Renames bundle pull context domain references. |
crates/client/src/bundle.rs |
Updates bundle stream-domain initialization. |
crates/client/examples/common/mod.rs |
Updates example buyer domain fields and usages. |
crates/cli/tests/admin_rpc.rs |
Updates the DHT attestation fixture constant. |
crates/cli/src/commands/probe/tests.rs |
Pins the renamed JSON key and aligned text output. |
crates/cli/src/commands/probe.rs |
Renames probe signature data, JSON key, and text label. |
crates/cli/src/commands/node/tests.rs |
Updates fake-node signing helpers. |
crates/cli/src/commands/node.rs |
Renames the node-ranking stream-domain variable. |
crates/cli/src/commands/fetch/tests.rs |
Updates signed-refusal test helpers. |
crates/cli/src/commands/fetch.rs |
Updates fetch domain wiring and terminology. |
adr/glossary.md |
Renames the signature in its glossary definition. |
adr/appendix-pull-receipts.md |
Updates receipt terminology and the privacy anchor link. |
adr/appendix-operator-key-rotation.md |
Updates operator-signature terminology throughout the runbook. |
adr/024-account-abstraction.md |
Updates signature terminology in wallet constraints. |
adr/022-content-discovery.md |
Updates coverage-consistency signature terminology. |
adr/019-node-onboarding.md |
Updates signature terminology in wallet guidance. |
adr/017-privacy.md |
Renames P-23 terminology and its heading anchor. |
adr/013-schema-evolution.md |
Updates the example response field name. |
adr/012-client.md |
Updates rate-commitment signature terminology. |
adr/005-protocol.md |
Updates protocol diagrams and signature terminology. |
adr/003-payments.md |
Updates signature terminology in domain documentation. |
Review effort: Balanced
Code coverage overviewLanguages: Rust Rust / code-coverage/cargo-llvm-cov
View coverage of the 10 most impacted files.
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
This is a follow-up to #2938, which is merged. With slashing retired, the
StreamResponsesignature is the operator's signature over its answer, not slash evidence. This PR renames it everywhere. Behaviour does not change.slash_sig(wire field, receipt JSON key, helpers)operator_sigSLASH_SIG_LENOPERATOR_SIG_LENInvalidSlashSigLenInvalidOperatorSigLenStreamSlashData/StreamSlashErrorStreamSigData/StreamSigErrorslash_domain/slash_dom/HandlerDomains.slashstream_domain/stream_domThe ADR prose follows, and so does the ADR 017 P-23 heading with its one inbound anchor.
Refs #2917
Breaking
decdn-protocolanddecdn-client; both snapshots are regenerated.slash_sigkey is nowoperator_sig.decdn probe: the--jsonkeyslash_sigis nowoperator_sig, and so is the text label. A script that reads.slash_siggets nothing.decdn-incentivepublic API:StreamSlashData/StreamSlashErrorare nowStreamSigData/StreamSigError. This crate has no public-API snapshot, so no gate flags the change.Reviewer notes
perlreplacement, followed bycargo fmt.slash(trailing slash, backslash) andcache/src/engine.rs's localslashindex are untouched on purpose.mainwith a merge that keeps its own tree, because the squash tree equals feat!: retire slashing, slash escrow and the unbonding window #2938's final tip, which the branch already contains. The diff againstmainis the rename only.Verification
cargo clippy --workspace --all-targets --all-features -- -D warnings: exit 0CARGO_BUILD_WARNINGS=deny cargo doc --workspace --no-deps --document-private-items: exit 0cargo nextest run --workspace: 6092 passeddecdn-protocol,decdn-client) regenerateddecdn-e2e141 passed;decdn-nodeanvil 5 passedmake -C adr check-refs check-book-list: exit 0fix: address the #2939 review. A probe test now pins every output value at column 17; a mutation check confirms it catches the misalignment.🤖 Generated with Claude Code