Repository navigation
docs: specify EIP-712 domain separator for voucher signatures - #42
Conversation
Without an explicit domain separator, vouchers could be replayed across different chains, contract deployments, or test vs production environments. Add the full EIP-712 specification (domain separator, voucher typehash, signature digest, verification logic) to ADR 003 and cross-reference it from ADR 007. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
There was a problem hiding this comment.
Code Review
This pull request updates the architectural decision records for payments and watchtowers to include a formal specification for EIP-712 voucher signatures. It defines the domain separator and voucher structure to mitigate replay attacks across different chains and contract deployments. The review feedback suggests a gas optimization for proxy-deployed contracts, recommending that the domain separator be cached and only recomputed if the chain ID changes to avoid unnecessary overhead.
There was a problem hiding this comment.
Pull request overview
This PR updates the architecture decision records to fully specify the EIP-712 domain separator and digest construction for voucher signatures, and aligns the watchtower ADR to reference that shared signature domain to prevent replay across chains/contract deployments.
Changes:
- Added an “EIP-712 Voucher Signature” specification section to ADR 003 (domain separator, typehash, digest, verification guidance).
- Updated ADR 003’s replay-attack and voucher-format sections to cross-reference the new EIP-712 spec.
- Updated ADR 007’s contract integration section to reference ADR 003’s EIP-712 domain separator for consistent off-chain verification.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
adr/003-payments.md |
Adds the EIP-712 voucher signing/verification specification and updates related sections to reference it. |
adr/007-watchtower.md |
References ADR 003’s EIP-712 domain separator to ensure watchtowers verify vouchers against the same domain. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Use constructor/immutable pattern in code snippet (consistency) - Use keccak256(bytes(...)) for modern Solidity compatibility - Require hardened ECDSA recovery (OZ ECDSA.recover, canonical s) - Recommend cached domain separator with chainid check for proxies Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Summary
name,version,chainId,verifyingContract),Vouchertypehash, signature digest construction, and verification logicCloses #8
Test plan
#eip-712-voucher-signatureanchor link resolves in ADR 003003-payments.md#eip-712-voucher-signaturecross-reference resolves from ADR 007🤖 Generated with Claude Code