Conversation
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9a5d893922
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| const publicKey = secp256k1.getPublicKey(secretKey, true); | ||
| return bytesToHex(publicKey); |
There was a problem hiding this comment.
Preserve the legacy public-key ID for restored P2PK keys
publicKeyHex is the repository key that generateNewKeyPair() stores and that signProof()/getKeyPair() later look up by exact string. Changing it from the old '02' + schnorr.getPublicKey(secretKey) form to secp256k1.getPublicKey(secretKey, true) changes the identifier for every key whose secp256k1 point has odd Y (the new tests show several 03... cases). That means a wallet restored from seed on this release will re-derive and persist a different publicKeyHex than previous releases, so previously shared or minted P2PK proofs locked to the legacy value can no longer be matched after a DB wipe/restore, breaking recovery of existing funds unless there is a migration or backward-compatible aliasing layer.
Useful? React with 👍 / 👎.
Adds test vectors for the deterministic test vector for the nut.
nut pr: cashubtc/nuts#331
replaces: #68