Skip to content

docs(adr): retire ADR 024 ERC-7579 session-key production plan (#1848) - #2092

Merged
alpergundogdu merged 2 commits into
mainfrom
claude/issue-1848-brainstorm-02a069
Sep 21, 2026
Merged

alpergundogdu merged 2 commits into
mainfrom
claude/issue-1848-brainstorm-02a069

Conversation

@alpergundogdu

Copy link
Copy Markdown
Contributor

Closes #1848.

What this decides

ADR 024 deferred high-frequency signing to a Production plan built on the Safe-7579 adapter + erc7579/smartsessions session keys, plus an off-chain ERC-1271 verification branch. The reality check the issue asked for: that plan has no live consumer, no code footprint (only prose and doc-comments referenced it), and its buyer-side motivation is fully superseded by ADR 003 capability delegation (#1824). It is retired.

The shipped, load-bearing part of ADR 024 — universal SignatureChecker on-chain (in CapacityBond, PaymentPool, SlashJudge, DecdnGovernor) and EOA-recovery-only off-chain verification — stays as present-tense canon. Only the design-ahead Production session-key plan is removed.

The residual, recorded not built

A node's serving identity is its fund-holding identity (registerNode binds msg.sender, slash_sig is verified by recovery against it), so unlike a client an operator can't separate a hot serving key from multisig-custodied funds via capability delegation. Mainnet will likely want this. ADR 024 gains an "Unimplemented — Operator Custody While Serving" section that records the requirement and the constraints, but commits to no implementation.

The core finding: ERC-1271 validity is mutable and operator-controlled, which partitions every deCDN signature:

  • Consumed at call time (bond, register, redeem, pool close, capability grant) — ERC-1271 is fine; this is what SignatureChecker already does.
  • Re-verified later as slash evidence (slash_sig) — ERC-1271 is unsound, because the operator controls validity in the gap between taking payment and the on-chain slash.

Four concrete hazards a future design must answer are documented inline: selective validator (valid for serve digests, invalid for the slash-evidence digests), post-payment revocation (the "first-class revocation" a session-key module sells is the attack), gas-bomb on the slash path (SignatureChecker caps no gas on the ERC-1271 call), and unsound off-chain RPC evidence (validity is mutable after the block it was read at). The recorded direction is a native EOA operator-signer delegation mirroring the ADR 003 buyer capability — keeping slash_sig EOA-recovered — not an ERC-7579 session key.

Dependents updated in the same PR

So none still assert the retired plan:

  • ADR 012 — client key-custody rows, key-summary table, identity lifecycle, mobile-scope and consequences: buyer side reframed as capability-delegated EOA signer (no residual).
  • ADR 019 — operator wallet bullet: drops the Safe-7579 + ERC-4337 paymaster path; points at the unimplemented section.
  • ADR 003 — ephemeral-binding note: EOA-recovery framing, new section anchor.
  • appendix-operator-key-rotation.md — removes the third "slash-sig session key", its rotation procedures, decision-tree branch, and failure-mode row; two-key runbook; renamed "Safe owner rotation (optional)".
  • architecture.md — ADR 024 summary and runbook one-liner.
  • crates/common/.../node.rs RotateKeyTarget doc note, plus the renamed off-chain-verification section references in crates/protocol and crates/incentive (comment-only).

Verification

  • cargo check (protocol, incentive, common), cargo clippy, cargo doc, cargo fmt --check, markdownlint — all pass (pre-commit hooks ran on commit).
  • All ADR 024 anchor links validated; repo-wide sweep for smartsessions/7579/paymaster/old section anchors is clean outside the deliberate mentions in the new Unimplemented section.

ADR 024 status stays Draft (the operator-custody piece remains open).

🤖 Generated with Claude Code

The Production session-key plan (Safe-7579 adapter + erc7579/smartsessions
+ off-chain ERC-1271 branch) has no live consumer, no code footprint, and
its buyer-side motivation is superseded by ADR 003 capability delegation.
Retire it and record the operator-custody residual as unimplemented.

ADR 024 keeps the shipped `SignatureChecker` on-chain decision and the
EOA-recovery-only off-chain posture as present-tense canon, and gains an
"Unimplemented — Operator Custody While Serving" section. That section
records why mainnet will likely want a Safe-custodied node that serves
from a hot key, and why the obvious ERC-1271 route is unsound for
slash-critical signing: ERC-1271 validity is mutable and operator-
controlled, so a signature re-verified later as slash evidence can be made
invalid after payment (selective validator, post-payment revocation),
DoS'd via a gas-bomb validator, or wrongly cached from an off-chain RPC.
The recorded direction is a native EOA operator-signer delegation that
mirrors the ADR 003 buyer capability, keeping slash_sig EOA-recovered.

Dependents updated in the same change so none still assert the retired
plan: ADR 012 client key-custody rows and lifecycle, ADR 019 wallet
bullet, ADR 003 ephemeral-binding note, appendix-operator-key-rotation
(third "slash-sig session key" and its rotation procedures removed),
architecture.md ADR 024 summary, and the RotateKeyTarget doc note plus
the off-chain-verification section references in protocol/incentive.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Copilot AI lite review requested due to automatic review settings September 21, 2026 09:51

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.

Copilot review overview

🟡 Changes recommended

Some references and verification claims are inconsistent with the “retired” posture (e.g., remaining old ADR 024 anchor/title references and repo-wide sweep discrepancies) and should be corrected before approval.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 3 Low severity

Open (3)
What changed in this PR

This PR retires ADR 024’s previously “Production” plan for ERC-7579 session keys / off-chain ERC-1271 verification, and updates the surrounding ADRs and inline code docs to reflect the now-canonical posture: on-chain signatures support ERC-1271 via SignatureChecker, while off-chain verification remains EOA-recovery-only, with the remaining operator-custody-while-serving problem explicitly recorded as unimplemented.

Changes:

  • Reframes ADR 024 to remove the session-key Production plan, adds an explicit “Unimplemented — Operator Custody While Serving” section, and renames the off-chain verification section to “EOA Recovery Only”.
  • Updates dependent ADRs/runbooks to remove the retired “third key/session key” operator rotation path and align buyer-side custody with ADR 003 capability delegation.
  • Updates/adjusts multiple Rust doc comments to point at the renamed ADR 024 off-chain verification section (noting a few remaining references still need cleanup).
File Description
crates/​protocol/​src/​message.rs Updates ADR 024 section references in validation error docs (some remaining references still point at the old heading).
crates/​protocol/​src/​client.rs Updates voucher/binding signature length docs to cite the renamed ADR 024 off-chain verification section.
crates/​incentive/​src/​bind_sig.rs Reframes bind-signature verification docs to “EOA recovery only” and removes the “deferred ERC-1271 branch” posture (one inline comment still needs alignment).
crates/​common/​src/​cli/​node.rs Updates RotateKeyTarget docs to reflect only two operator keys and points to the new unimplemented operator-custody section.
adr/​architecture.md Updates ADR 024 summary and operator key-rotation runbook description to match the retired plan.
adr/​appendix-operator-key-rotation.md Removes session-key rotation and rewrites the operator rotation decision tree for the two-key posture + optional Safe owner rotation.
adr/​024-account-abstraction.md Core retirement/refactor: removes the Production session-key plan, renames off-chain verification section, and records operator-custody residual + ERC-1271 hazards.
adr/​019-node-onboarding.md Updates onboarding wallet guidance to remove the session-key/paymaster path and point at the unimplemented operator-custody residual.
adr/​012-client.md Updates client key custody narrative/tables to capability-delegated hot EOA signer; removes session-key “Production plan” framing.
adr/​003-payments.md Updates off-chain binding text to align smart-account funding with capability-delegated EOA signer + the renamed ADR 024 section.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread adr/024-account-abstraction.md Resolved
Comment thread crates/incentive/src/bind_sig.rs Resolved
Comment thread crates/protocol/src/message.rs Resolved
Review follow-up:
- crates/protocol/src/message.rs: InvalidSlashSigLen's doc still cited the
  old "§Off-Chain ERC-1271 Verification" title; the first pass missed it
  because the citation is line-wrapped. Retarget to the renamed section.
- contracts/test/Token.t.sol: the EIP-2612 Permit section header cited a
  retired "ADR 024 / ERC-4337 + ERC-1271 path"; gas abstraction (ERC-4337)
  lives in ADR 003, so cite that.
- CHANGELOG.md: add the required one-entry-per-PR record of the retirement
  under Unreleased § Removed. The prior entry that deferred the off-chain
  verifier stays as history.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@github-actions

Copy link
Copy Markdown

Gas snapshot

No gas changes vs base.

@github-actions

Copy link
Copy Markdown

Contracts coverage

Line coverage: 90.63% (2399/2647 lines)
▲ +0.88pp vs base (89.75% → 90.63%)
Run: 35586421912

@github-actions

Copy link
Copy Markdown

Coverage report

Total: 83.36% (was 82.86%, ▲ +0.50%) — 84358/101195 lines

File Coverage Lines Δ
crates/incentive/src/bind_sig.rs 87.60% 113/129 ● 0.00%
crates/protocol/src/client.rs 97.53% 1064/1091 ● 0.00%
crates/protocol/src/message.rs 99.67% 301/302 ● 0.00%
History
Commit Total Δ vs base
23872a9 (HEAD) 83.36% ▲ +0.50%

@alpergundogdu
alpergundogdu merged commit a9edf85 into main Sep 21, 2026
25 checks passed
@alpergundogdu
alpergundogdu deleted the claude/issue-1848-brainstorm-02a069 branch September 21, 2026 13:14
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.

ADR 024 session keys: reality check and feasibility review

2 participants