Skip to content

Drop Ed25519 wire signature on ProbeResponse/StreamResponse; consolidate on slash_sig #408

Closed

Description

@alpergundogdu

Context

ADR 005 currently requires two signatures on every ProbeResponse and StreamResponse:

  1. signature — Ed25519 over the security-relevant fields, signed by the iroh NodeId key.
  2. slash_sig — EIP-712 secp256k1 over the same fields, signed by the operator's Ethereum key.

The dual-sig pattern is historical: ADR 005 originally specified the Ed25519 sig as the slashing-evidence mechanism (April 2026, #2). When ADR 014 was added six months later (#167), the team realized on-chain Ed25519 verification was economically unviable (~500k–1M gas vs. ~3k for ecrecover) and bolted on slash_sig as a second signature. The Ed25519 sig was kept rather than removed, but its load-bearing reason changed from "primary slash evidence" to "off-chain non-repudiation."

The redundancy

Every job the Ed25519 body sig does is also covered by slash_sig:

Job Ed25519 body sig slash_sig
On-chain slashing ✗ (too expensive) ✓ (SlashJudge via ecrecover)
Off-chain evidence portability ✓ ✓ (ecrecover + StakingRegistry.nodeIdOf lookup)
In-session message integrity redundant (iroh QUIC already authenticates) redundant (same)
Connection-level peer auth n/a (handled by iroh transport, not body sig) n/a

SlashJudge never consumes the Ed25519 body sig. Phantom-announcement and rate-manipulation slashing both operate end-to-end on slash_sig.

The "production opt-out" misfeature

ADR 005 §cdn/probe/v1 and ADR 014 §1 currently allow production to relax slash_sig to zero-length-as-opt-out, with the Ed25519 sig as the fallback non-repudiation mechanism for messages from opt-out nodes. Re-examining: every node is already mandatorily on-chain registered (StakingRegistry.registerNode), staked, and slashable via ADR 003 (vouchers) and ADR 011 (origin blacklisting). The opt-out grants immunity from one specific slashing category (probe/stream phantom + rate manipulation) while still requiring full on-chain registration. The stated rationale ("economic pressure via reputation, not hard protocol requirement") is satisfied without the opt-out: reputation pressure squeezes out non-conforming nodes equally well when the protocol simply requires slash_sig. No legitimate use case justifies the hatch — ERC-1271 and smart accounts are already covered by SignatureChecker (ADR 024), and EIP-712 signing is trivial for any operator stack capable of staking.

Proposed change

Drop the signature (Ed25519) field from ProbeResponse and StreamResponse. Make slash_sig the sole message-body signature, mandatory and non-empty universally. Remove the production opt-out path.

NodeAnnounce and ReputationReport retain their Ed25519 sigs — they are gossip messages with no slash_sig alternative and their Ed25519 sig is the only authentication.

The Ed25519 NodeId-ownership proof on StakingRegistry.registerNode (one-time, on-chain) is unrelated and stays.

Wire format changes

- ProbeResponse {has_blob, rate_per_mb, timestamp_us, signature, total_bytes?, slash_sig}
+ ProbeResponse {has_blob, rate_per_mb, timestamp_us, total_bytes?, slash_sig}

- StreamResponse {ok, rate_per_mb, total_bytes, timestamp_us, signature, redirect?, error?, voucher_interval_mb?, slash_sig}
+ StreamResponse {ok, rate_per_mb, total_bytes, timestamp_us, redirect?, error?, voucher_interval_mb?, slash_sig}

Wins

  • One signature per message instead of two; halved per-message signing CPU
  • ~65 bytes saved per ProbeResponse (~50% size reduction)
  • One verification path (ecrecover + StakingRegistry binding lookup) — no dual code paths
  • Eliminates the production opt-out misfeature; "accountability for everyone" becomes the protocol's clear stance

Costs

  • Off-chain verifiers go from "verify Ed25519 against iroh NodeId directly" to "ecrecover + cached StakingRegistry.nodeIdOf lookup." Marginal — those verifiers (clients, requesting nodes, watchtowers) already maintain a StakingRegistry binding cache for clientStakeOf, voucher attribution, and on-chain registry checks. Operator key rotation forces binding-at-message-time resolution off-chain; SlashJudge already does this on-chain, so the pattern is established.
  • Tier 3 / ALPN-bump per ADR 013 (signed-field-set change). Cheap now — nothing is shipped.

ADRs to update

  • adr/005-protocol.md — drop signature from ProbeResponse/StreamResponse; remove PoC-constraint callout; rewrite Signer-binding paragraph
  • adr/014-on-chain-verification.md — drop dual-key framing; rewrite §1 as single-signature; remove production-opt-out paragraphs; update consequences
  • adr/001-network.md — update probe-flow ProbeResponse definition
  • adr/011-content-takedown.md — drop "dual-key scheme" reference
  • adr/003-payments.md — anchor updates for ADR 014 §1 cross-references
  • adr/architecture.md — drop "dual-key slash signatures" framing
  • adr/README.md — update "Slash signature" glossary entry
  • adr/appendix-operator-key-rotation.md — iroh node-key no longer signs ProbeResponse/StreamResponse body

Out of scope

  • Code changes (current protocol crate has only ProbeMessage framing per ADR 013; no ProbeResponse/StreamResponse impl yet)
  • Changes to NodeAnnounce or ReputationReport Ed25519 sigs
  • Changes to the on-chain Ed25519 NodeId-ownership proof in StakingRegistry.registerNode

Metadata

Metadata

Assignees

Labels

design:adr

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions