Skip to content

mina-signer: use this.network instead of devnet#2744

Open
dannywillems wants to merge 5 commits intomainfrom
dw/update-devnet
Open

mina-signer: use this.network instead of devnet#2744
dannywillems wants to merge 5 commits intomainfrom
dw/update-devnet

Conversation

@dannywillems
Copy link
Copy Markdown
Contributor

No description provided.

@dannywillems dannywillems requested review from a team as code owners January 26, 2026 13:58
@dannywillems dannywillems moved this to In Review in Rust node Jan 26, 2026
Copy link
Copy Markdown
Contributor

@mitschabaude mitschabaude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment on lines 296 to +299
// 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]));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the code here now contradicts the comment

Comment on lines 288 to 292
/**
* 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}
*/
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"name": "mina-signer",
"description": "Node API for signing transactions on various networks for Mina Protocol",
"version": "3.1.0",
"version": "3.1.1",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a breaking change, has to be major version if this is shipped (but it shouldn't be)

@dannywillems dannywillems self-assigned this Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

3 participants