Skip to content

docs: allow provider-initiated zero-voucher channel close in ADR 003 - #105

Merged
thiras merged 2 commits into
mainfrom
fix/zero-voucher-channel-close
Apr 2, 2026
Merged

thiras merged 2 commits into
mainfrom
fix/zero-voucher-channel-close

Conversation

@thiras

@thiras thiras commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a zero-voucher close path to closeChannel: provider can call with amount=0, nonce=0 when claimedNonce == 0, skipping signature verification
  • The dispute window applies normally — clients/watchtowers can dispute with a real voucher if one exists
  • Resolves the channel griefing attack vector (previously listed as open options) by letting providers immediately close dead channels instead of waiting 90 days

Test plan

  • Verify ADR 003 internal consistency across the three updated sections (fee calculation lifecycle, channel griefing attack vector, channel close lifecycle)
  • Verify cross-ADR consistency: ADR 007 (watchtower) and ADR 010 (multi-token) remain compatible with the new close path
  • Confirm no changes needed in architecture.md (payment lifecycle described at high level only)

🤖 Generated with Claude Code

Providers had no way to close channels where no vouchers were signed
without waiting for the 90-day expiry. This adds a zero-voucher close
path: provider calls closeChannel with amount=0/nonce=0, skipping
signature verification when claimedNonce == 0. The dispute window
still applies, so clients/watchtowers can dispute with a real voucher.
Also resolves the channel griefing attack vector.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings April 2, 2026 02:24

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

Updates ADR 003’s payment-channel close specification to add a provider-initiated “zero-voucher” close path, intended to mitigate channel-griefing by allowing providers to promptly move never-used channels into the close→dispute→settle lifecycle.

Changes:

  • Specify a zero-voucher closeChannel path (provider-only) that skips signature verification when amount=0, nonce=0, and claimedNonce==0.
  • Update the “Channel griefing” attack vector section to mark the issue as resolved by provider-initiated zero-voucher close and adjust remaining mitigation options.
  • Extend the “Channel close lifecycle” section to document the zero-voucher close behavior.

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

Comment thread adr/003-payments.md Resolved
Comment thread adr/003-payments.md Resolved
Comment thread adr/003-payments.md Resolved
Comment thread adr/003-payments.md Resolved

@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 updates the ADR 003 documentation to detail the new provider-initiated zero-voucher close mechanism, which allows providers to close channels without a client-signed voucher when no payments have been made. The review feedback suggests improving consistency across the document by explicitly mentioning the requirement for an empty signature in the zero-voucher close descriptions to ensure clarity for implementers.

Comment thread adr/003-payments.md Resolved
Comment thread adr/003-payments.md Resolved
…, reclaimExpired clarity

- Define voucher nonces as starting at 1 (nonce 0 = sentinel for "no
  voucher") in a new Voucher Nonce Convention section, preventing the
  nonce=0 collision identified in review
- Define "empty signature" precisely as signature.length == 0; clarify
  that all other closeChannel calls require normal EIP-712 verification
- Clarify that "no inactivity timer needed" means no *additional*
  mechanism beyond the existing reclaimExpired path
- Add "and an empty signature" to griefing and lifecycle sections for
  consistency across all three zero-voucher close descriptions

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@thiras
thiras merged commit eebb1a7 into main Apr 2, 2026
@thiras
thiras deleted the fix/zero-voucher-channel-close branch April 2, 2026 02:32
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.

2 participants