Skip to content

Conversation

leolambo
Copy link
Contributor

@leolambo leolambo commented Aug 6, 2025

No description provided.

@leolambo leolambo marked this pull request as ready for review August 27, 2025 22:46
Copy link
Collaborator

@kajoseph kajoseph left a comment

Choose a reason for hiding this comment

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

This doesn't work for me. If I publish a txp with a nonce of 8 and then it gets "refreshed" to something else, it'll fail the server verification when trying to sign it.

This approach makes me a little nervous since it'll apply to all EVM txps and can cause confusion if we compromise the integrity of txp.nonce (i.e. it's set to X initially, but later gets updated to Y). I would recommend we take a different approach that's BWC-driven. Say, let's allow nonce to be null or -1 to indicate that it should be assigned later (e.g. on signature). IIRC, null falls back to 0 when creating signatures, so that would probably require the least change with intermediate signing/verifying. We'll just need to ensure txp.nonce doesn't get set to 0 if nonce == null until it's time to actually assign the nonce.

return cb(null, txp);
refreshTxData(server: WalletService, txp, opts, cb) {
// set latest nonce
server._getTransactionCount(opts.wallet, txp.from, (err, nonce) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

lint: extra space before txp.from

@kajoseph kajoseph changed the base branch from master to v10 September 15, 2025 19:21
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