solana-web3.js
solana-web3.js copied to clipboard
[experimental] Add `minContextSlot` to the lifetimeConstraint for nonces
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.