Skip to content

Conversation

@Ansonhkg
Copy link
Collaborator

@Ansonhkg Ansonhkg commented Nov 7, 2025

WHAT

  • Extended the signing stack so Cosmos ECDSA hashes are handled automatically and the raw pkpSign API exposes the existing bypassAutoHashing escape hatch.
  • Documented the hashing defaults/bypass option.
  • Added an e2e ticket suite that exercises every supported scheme/curve pair to protect against regressions.

Copilot AI review requested due to automatic review settings November 7, 2025 16:43
Copy link
Contributor

Copilot AI left a 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 bypassAutoHashing parameter 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`.
Copy link

Copilot AI Nov 7, 2025

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.

Suggested change
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`.

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Anson <ansonox@gmail.com>
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