-
Notifications
You must be signed in to change notification settings - Fork 630
Add ERC: Composite EIP-712 Signatures #993
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dear sola92,
Thank you for proposing ERC-7920. The composite signature approach via Merkle trees addresses a critical UX gap in multi-message workflows. Below is concise technical feedback to strengthen the proposal:
Critical Revisions
-
Security Fix (Line 100):
// Replace encodePacked with encode to prevent collisions - abi.encodePacked("\x19\x01", ...) + abi.encode("\x19\x01", ...)
-
Merkle Tree Specs (Lines 45-47):
- Add explicit requirements for:
- Single-message roots (
root = leaf
) - Leaf ordering (lexicographical sort)
- Zero-padding for unbalanced trees
- Single-message roots (
- Reference RFC 6962 for tree construction.
- Add explicit requirements for:
-
Wallet Requirements (Lines 303-305):
- Mandate display of all message types before signing
- Recommend max message count (e.g., ≤10)
Implementation Notes
- Reference Code (Line 309): Include test vectors for:
- Odd/even leaf counts
- Cross-implementation root consistency
- Typo Fix: "marketRoot" → "merkleRoot" (Lines 88, 255)
Conclusion
ERC-7920 has strong potential to standardize composite signatures. Addressing these points will ensure safe adoption across wallets and dapps. I’m available to collaborate on test vectors or implementation details.
Respectfully,
xinbenlv
- Replace merkletreejs with reference implementation that follows ERC-7920 specification. - `abi.encodePacked` -> `abi.encode` - Add tests for the Merkle reference implementation - update spec to harden N=1 case
@xinbenlv thanks a lot for review. Very helpful. I pushed the follow changes:
Happy to collaborate and make any more changes need. Thanks in advance! |
The commit 5beb332 (as a parent of 2eae175) contains errors. |
Thanks @SamWilsn. Changes pushed. @poojaranjan could we add this to agenda for EIP Editing Office Hour Meeting 60 |
This EIP provides a standard for signing multiple typed-data messages with a single signature by encoding them into a Merkle tree. Allowing individual messages to be verified without requiring full knowledge of the others.