solana-web3.js icon indicating copy to clipboard operation
solana-web3.js copied to clipboard

[experimental] Add `minContextSlot` to the lifetimeConstraint for nonces

Open steveluscher opened this issue 9 months ago • 1 comments

Motivation

It's important to know what slot a nonce should be considered valid for when confirming a transaction. If you get nonce at slot X but then when you go to confirm the transaction you hit an RPC that reads the nonce account at slot X-n then the confirmation algo will interpret the nonce mismatch as ‘the nonce having been advanced.’

Fix

Add minContextSlot to the lifetimeConstraint for IDurableNonceTransaction and update all the tests.

steveluscher avatar Oct 05 '23 22:10 steveluscher