0

I'm wondering if there's an instruction to set a maximum slot for transactions. Specifically, I need a way to:

Verify the actual landing slot is less than X. If it isn't, the transaction should be reverted.

Or for such needs i will need to write a program by my own

1 Answer 1

0

Since blockhashes last 150 blocks before they're rejected by the cluster, there's a cheeky way to do this by using an older blockhash that is close to expiry, but not quite expired.

For example, you can fetch a blockhash 140 hashes back, and then submit your transaction, knowing that it must land within the next 10 blocks or expire.

Here's the recent blockhashes sysvar:https://explorer.solana.com/address/SysvarRecentB1ockHashes11111111111111111111/blockhashes

1
  • thank you for answering! that's inspiring Commented Sep 9 at 2:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.