mina-signer: use this.network instead of devnet#2744
mina-signer: use this.network instead of devnet#2744dannywillems wants to merge 5 commits intomainfrom
Conversation
There was a problem hiding this comment.
what's the point of this change? why should signFields() be network-specific? It was always intended for applications, not Mina signing, and adding a network parameter makes the API more confusing since it's not clear how it is related to any involved Mina network
| // we chose an arbitrary prefix for the signature | ||
| // there's no consequences in practice and the signatures can be used with any network | ||
| // if there needs to be a custom nonce, include it in the message itself | ||
| let h = hashWithPrefix(signaturePrefix('devnet'), msg.concat([point.x, point.y, this.r])); | ||
| let h = hashWithPrefix(signaturePrefix(network), msg.concat([point.x, point.y, this.r])); |
There was a problem hiding this comment.
the code here now contradicts the comment
| /** | ||
| * Verifies the {@link Signature} using a message and the corresponding {@link PublicKey}. | ||
| * Optionally specify the Mina network via `network` parameter to use a different signature prefix. | ||
| * @returns a {@link Bool} | ||
| */ |
There was a problem hiding this comment.
this is an awful idea, since the Mina network is being baked into the verification circuit as a constant. however, on the Auro side, the param will depend on what the user picks as the Mina network. so the developer actually must deploy different contracts on testnet vs mainnet
for what reason?
| "name": "mina-signer", | ||
| "description": "Node API for signing transactions on various networks for Mina Protocol", | ||
| "version": "3.1.0", | ||
| "version": "3.1.1", |
There was a problem hiding this comment.
this is a breaking change, has to be major version if this is shipped (but it shouldn't be)
No description provided.