docs(adr): specify slashing and economic penalties - #67
Closed
flo2517 wants to merge 3 commits into
Closed
Conversation
Add ADR-012, the accepted architecture record that issue #32 asks for: role vocabulary, per-role trust and threat model, a per-class data classification with a target placement column, cross-cutting guarantees (finality, conflict resolution, replay, data availability, erasure, key recovery), a five-stage migration mapped onto the v3.0-v6.0 milestones, and the table of follow-up ADR gates each stage still requires. ADR-012 authorizes no implementation by itself. Its purpose is to make milestones v3.0 through v6.0 plannable: every issue there was silently blocked by AGENTS.md's absolute prohibition list with no ADR to point at. AGENTS.md now separates prohibitions that no ADR lifts (hard-coded secrets, contract changes without consumer analysis, detailed metrics or tenant data on-chain) from those gated on a named follow-up ADR. No rule is weakened; the security, contract, and runtime rules are unchanged. ROADMAP.md is extended from v1.0 to v6.0 so it matches the GitHub milestones, and states that it and the milestones are the source of truth over architecture.md and architecture_review.md. Refs #32 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ROADMAP.md said "Leases and Rewards End-to-End" while the milestone is "v0.3 — Leases and Rewards E2E". Every other heading in the file now matches its milestone verbatim; this was the last one that did not. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Add ADR-015, the gate ADR-012 §6 names for #52 and the follow-up ADR-011 §5 explicitly demanded when it shipped validator rewards without any penalty. The investigation surfaced a prerequisite #52's description hides: providers bond nothing. pallet-network-validator takes a real bond (ReservableCurrency, MinStake, reserve on registration, release after UnbondingPeriod), but pallet-provider-registry has no Currency association and pallet-lease holds no collateral. There is nothing to slash today, so provider bonding is the larger half of #52 rather than a detail of it, and it lands in a pallet #52 does not mention. Key decisions: a slash may only cite finalized rounds that met quorum and survived their dispute window, and never a single round; being trimmed as an outlier is explicitly not evidence of dishonesty, since the trimmed mean discards honest edge cases identically; slashed funds are burned, never paid to the accuser or the counterparty, because either would manufacture an incentive to fabricate breaches; exiting stake stays slashable, with the UnbondingPeriod >= DisputeWindow + AppealWindow invariant asserted rather than left to parameter tuning. Slashing must not go live while EnsureRoot is the appeal authority, so #52 now also depends on #36. ROADMAP.md records that coupling. Refs #52 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Stacked on #65 — review that one first. This PR's diff against
mainwill collapse to just ADR-015 once #65 merges.Motivation
ADR-011 §5 shipped validator rewards and explicitly deferred penalties: "slashing stake for provably bad submissions is the intended long-term deterrent but its economic parameters need their own analysis — out of scope for this ADR, tracked as follow-up work." ADR-012 §6 names that follow-up ADR-015 and makes it the gate for #52. This is it.
The finding that changes #52's shape
Providers bond nothing.
pallet-network-validatortakes a real bond —ReservableCurrency(lib.rs:161),MinStake(lib.rs:173,MinValidatorStake = 1_000atruntime/src/lib.rs:106,317), reserved atlib.rs:449, released afterUnbondingPeriodatlib.rs:503.pallet-provider-registryhas noCurrencyassociation at all, andpallet-leaseholds no collateral.#52 asks for financial penalties against providers that miss their availability commitments. There is nothing to take. Provider bonding is a precondition, it is the larger half of the work, and it lands in
pallet-provider-registry— a pallet #52 never mentions, whose registration semantics change for every existing caller including the Control Plane'sregister_provider_forpath (ADR-009).Decisions worth arguing about
close_rounddiscards the highest and lowest submission by construction, so an honest validator seeing a genuine edge case is trimmed exactly like a liar. Persistent outlier status may inform selection or rewards; it may never slash on its own. What is slashable is equivocation — two conflicting signed submissions for the same(provider, round, dimension)— and evidence contradicted by its ownpayload_hash. Both are self-incriminating and need no third-party judgement.Exiting { available_at }stays slashable, with the invariantUnbondingPeriod >= DisputeWindow + AppealWindow + BreachRounds × round lengthasserted in the runtime rather than left to whoever next tunes a parameter. Today's values (14_400vs300,runtime/src/lib.rs:107,115) leave ample margin.pallet-rewardsalready documents this for upheld disputes and it stays: clawback across unbounded history is unbounded runtime work.Consequence: #52 gains a dependency on #36
An armed slash is appealable, and the appeal is resolved by a governance origin. Today that is
EnsureRoot(runtime/src/lib.rs:316) — one sudo key deciding whether to destroy a participant's stake. That is not an acceptable terminal authority for an irreversible penalty, and it is exactly the centralization this roadmap removes. §6 therefore forbids slashing going live before ADR-020/#36. The mechanism may be implemented, tested, and merged behind a disabled parameter. ADR-012 §5 already places #36 and #52 in the same stage, so this costs no schedule.ROADMAP.md's v3.0 table is updated to record the coupling.What it does not solve
A colluding committee majority can still slash an honest provider. ADR-011 §4 and ADR-012 §2 both already flag operator-level collusion as an accepted gap.
BreachRoundsraises the cost and the appeal path is the backstop; attestation (#61) is the real fix and is deliberately later. The ADR says so rather than implying the problem is closed.Affected components
None at build time. Constrains future work in
blockchain/pallets/{network-validator,provider-registry,rewards}.Rollback
Revert the commit. Documentation only.
Verification
Every citation was read against the source before being written:
blockchain/pallets/network-validator/src/lib.rs:161,173,441,449,503,529,549,639,709,755;blockchain/pallets/rewards/src/lib.rs:182;blockchain/runtime/src/lib.rs:106,107,115,316,317. Confirmed by grep thatpallet-provider-registryandpallet-leasecontain noCurrency, stake, bond, or collateral of any kind.Refs #52
🤖 Generated with Claude Code