Skip to content

docs: add ADR 014 on-chain verification for slashing evidence - #167

Merged
thiras merged 2 commits into
mainfrom
adr-014-on-chain-verification
Apr 3, 2026
Merged

thiras merged 2 commits into
mainfrom
adr-014-on-chain-verification

Conversation

@thiras

@thiras thiras commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds ADR 014 specifying the on-chain slash evidence pipeline: dual-key slash signatures (ecrecover at 3,000 gas vs ~500k–1M for Ed25519 library), single-round optimistic challenge-response for BLAKE3 corruption (PoC), interactive keccak256 Merkle proof design (production), and unified SlashJudge contract interface
  • Resolves open questions in ADRs 002, 003 and updates cross-references in ADRs 004, 005, 011, and architecture.md
  • Updates gas estimate in ADR 004 from submitFraudProof() ~250k to SlashJudge.submit*Challenge() ~50–60k

Closes #4
Closes #143

Test plan

  • Verify no stale "Ed25519 verification library" or "Open question...on-chain verification" references remain: grep -rn 'Ed25519 verification library\|on-chain Ed25519 verification library' adr/
  • Verify corruption evidence Options A/B/C removed from ADR 003
  • Verify slash_sig/SlashJudge appears in ADRs 004, 005, 011, 014, and architecture.md
  • Verify ALPN strings unchanged
  • Verify TOKEN/USDC references in ADR 014 are correct (TOKEN for bonds, USDC for payments)
  • Review ADR 014 structure and technical decisions

🤖 Generated with Claude Code

Resolves the two critical blockers for slashing implementation:
dual-key slash signatures (ecrecover at 3k gas instead of ~500k Ed25519
library) and optimistic challenge-response for BLAKE3 corruption. Adds
unified SlashJudge contract interface and updates cross-references in
ADRs 002, 003, 004, 005, 011, and architecture.md.

Closes #4
Closes #143

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings April 3, 2026 04:35
@thiras
thiras requested review from Copilot and yigitdot and removed request for Copilot and yigitdot April 3, 2026 04:36

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request introduces ADR 014, which specifies the on-chain verification mechanisms for slashing evidence, including a dual-key signature scheme (Ed25519 and secp256k1) and an optimistic challenge-response protocol for content corruption. The feedback identifies a protocol gap where StreamEnd acknowledgements are proposed as counter-evidence without being defined as signed frames in the wire protocol. Additionally, there is a technical inconsistency regarding regional blacklist enforcement, as the node's region is currently not part of the on-chain state or the signed evidence required for adjudication by the SlashJudge contract.

Comment thread adr/014-on-chain-verification.md Resolved
Comment thread adr/014-on-chain-verification.md Resolved

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.

Pull request overview

Adds ADR 014 to define the PoC/production on-chain slashing evidence verification pipeline, and updates existing ADRs/architecture overview to reference the new slash_sig + SlashJudge design and revised gas estimates.

Changes:

  • Add ADR 014 describing dual-key slash signatures (EIP-712 secp256k1 slash_sig) and corruption challenge mechanisms, plus the unified SlashJudge interface.
  • Update cross-references and wording across ADRs 002/003/004/005/011 and adr/architecture.md to reflect ADR 014’s decisions.
  • Update repo ADR numbering guidance (CLAUDE.md) to reflect the next ADR number after 014.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
CLAUDE.md Updates ADR numbering convention (next number now 015).
adr/architecture.md Adds ADR 014 to the living index, glossary entries for slash_sig/SlashJudge, and marks the on-chain verification open question as decided.
adr/014-on-chain-verification.md New ADR specifying on-chain verification approach (dual-key signatures + SlashJudge + corruption challenge paths).
adr/011-content-takedown.md Replaces Ed25519-library assumption with ADR 014 dual-key ecrecover scheme for blacklist slashing evidence.
adr/005-protocol.md Updates signer binding and StreamResponse narrative to reference optional slash_sig and ADR 014.
adr/004-tokenomics.md Updates gas estimate entry to SlashJudge.submit*Challenge() (~50–60k).
adr/003-payments.md Removes corruption evidence options section; replaces with ADR 014 resolution reference.
adr/002-content-addressing.md Resolves on-chain verification open question by referencing ADR 014.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread adr/002-content-addressing.md Resolved
Comment thread adr/014-on-chain-verification.md Resolved
Comment thread adr/014-on-chain-verification.md Resolved
Comment thread adr/014-on-chain-verification.md Resolved
Comment thread adr/014-on-chain-verification.md Resolved
Comment thread adr/005-protocol.md Resolved
Comment thread adr/014-on-chain-verification.md Resolved
- Define DeliveryReceipt (EIP-712 signed) as counter-evidence for
  corruption challenges, replacing unsigned StreamEnd reference
- Clarify PoC corruption path is optimistic/economic, not cryptographic
- Specify ABI encoding for SlashJudge bytes arguments
- Clarify EIP-712 field sourcing (request-context fields, redirect zero-value)
- Acknowledge regional blacklist scope as PoC limitation (region not on-chain)
- Add slash_sig? to ADR 005 sequence diagrams for wire-format consistency
- Fix grep-matching string in ADRs Affected section

Co-Authored-By: Claude Opus 4.6 (1M context) <[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.

On-chain Ed25519 signature verification mechanism is unresolved ADR 002: Specify BLAKE3→keccak256 Merkle proof scheme for on-chain slashing

2 participants