-
Notifications
You must be signed in to change notification settings - Fork 88
Fix/improve signing schemes hashing #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: naga
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.
Pull Request Overview
This PR adds ECDSA signing support for Cosmos chain, introduces a bypassAutoHashing option to skip automatic payload hashing, and includes comprehensive end-to-end tests with documentation for all supported signing schemes.
- Adds ECDSA hash function mappings for Cosmos (SHA-256/SHA-384)
- Introduces
bypassAutoHashingparameter to allow pre-hashed payloads (useful for EIP-712) - Adds comprehensive e2e test suite covering 14 signing schemes across multiple chains
- Updates documentation with signing scheme tables and bypass hashing guidance
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/networks/src/networks/vNaga/shared/schemas/LitMessageSchema.ts | Adds cosmos chain support with ECDSA hash mappers and improves error handling with explicit validation checks |
| packages/networks/src/networks/vNaga/shared/managers/api-manager/pkpSign/pkpSign.InputSchema.ts | Adds optional bypassAutoHashing boolean parameter to PKPSignInputSchema |
| packages/e2e/src/tickets/signing-schemes.suite.ts | New comprehensive test suite covering 14 signing schemes (ECDSA, Schnorr, EdDSA variants) across ethereum, bitcoin, cosmos, and solana chains |
| packages/e2e/src/tickets/signing-schemes.spec.ts | Test entry point that registers the new signing schemes test suite |
| docs/sdk/auth-context-consumption/pkp-sign.mdx | Adds documentation for bypassAutoHashing option with EIP-712 example and maintains scheme reference table |
| docs/node-ops/staking-and-delegation.mdx | Adds consensus threshold rule section and removes trailing whitespace |
| docs/learning-lit/how-it-works.mdx | Adds comprehensive table of all 14 supported signing schemes with their curves |
| .changeset/gold-ducks-repeat.md | Documents the patch changes for networks and e2e packages |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| ## Consensus Threshold Rule | ||
|
|
||
| All Lit validator and signing operations are guarded by a threshold rule that requires at least `ROUNDUP(MAX(3, 2N/3))` participating nodes for a committee of size `N`. |
Copilot
AI
Nov 7, 2025
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.
The threshold formula notation could be clearer with explicit parentheses to avoid ambiguity. Consider updating to:
All Lit validator and signing operations are guarded by a threshold rule that requires at least `ROUNDUP(MAX(3, (2N/3)))` participating nodes for a committee of size `N`.
This makes it explicit that the division 2N/3 is computed first, then compared with 3, and finally rounded up.
| All Lit validator and signing operations are guarded by a threshold rule that requires at least `ROUNDUP(MAX(3, 2N/3))` participating nodes for a committee of size `N`. | |
| All Lit validator and signing operations are guarded by a threshold rule that requires at least `ROUNDUP(MAX(3, (2N/3)))` participating nodes for a committee of size `N`. |
Co-authored-by: Copilot <[email protected]> Signed-off-by: Anson <[email protected]>
WHAT