aptos-core
aptos-core copied to clipboard
[Feature Request] Allow transaction simulation for transaction with higher nonce
🚀 Feature Request
Currently, simulating a transaction with high nonce will return a vm_status:
vm_status: 'Transaction Executed and Committed with Error SEQUENCE_NUMBER_TOO_NEW',
We would request to allow simulation result to be displayed for higher sequence number.
Motivation
There is some uses cases that will need to simulate a transaction with a higher nonce, For example, for multi-sig wallet. It is expected that there are multiple pending transactions in the transaction queue. Without simulation for transaction for higher nonce, the max gas is not able to be obtained for future transactions.
Pitch
Allow simulation for transaction nonce is higher. Increase the sequence number with test only native function in MOVE virtual machine.
This gets tricky... because what you want is fine grained simulation support. Specifically in this case, we have a move prologue that validates gas and sequence number and an epilogue that bumps sequence number and gas. We cannot skip these without devaluing the process. It is also not particularly cost effective for transactions to split these for fine grained simulation.
Might I ask why you want this feature outside of ... the error sucks?
What we want is just gasUsed in simulation so that we may better estimate the max gas. We understand that execution of lower sn transaction will impact higher sn transactions. But is there a work around?
This issue is stale because it has been open 45 days with no activity. Remove the stale label or comment - otherwise this will be closed in 15 days.
Let me merge this into another issue on improving simulation. https://github.com/aptos-labs/aptos-core/issues/5928