You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now the simulate endpoint for determining gas amounts requires the sequence number to be correct. This is actually quite hard to use in practice, and often necessitates extra RPC calls. This is also not how the flow works in EVM for instance.
We have found this to be meaningful client overhead in RPC calls + integration pains.
We should brainstorm a way to make the simulate endpoint response return the required sequence number, and adjust the ante handler so that on simulate the sequence number is not checked.
Problem Definition
Right now integrators cannot get gas estimates without first querying for the sequence number. This has two pain points right now.
One is that submitting a tx requires 3 interactive steps.
Fetch sequence number
Simulate to get gas
Sign & broadcast tx
But another problem thats particularly painful is when the simulate endpoint fails due to the wrong sequence. Then you have to re-simulate to get the gas amount. Ideally we would just get the sequence number from the simulation, and use that in the final signing. This is particularly helpful. It reduces the number of error states and interactive steps needed.
Proposed Feature
Remove sequence number correctness from being needed in RunTxMode==simulate.
I haven't looked into the simulate endpoints response type yet to have an informed opinion on how easy it is to add sequence number into the response type. But that would be ideal, and could then be a minor release change?
The text was updated successfully, but these errors were encountered:
in 52 we fixed this by allowing sequence numbers to be greater than current, i.e. simple check but then when it comes to execution you need to set the correct one. It seems this fixes the issue you have.
Summary
Right now the simulate endpoint for determining gas amounts requires the sequence number to be correct. This is actually quite hard to use in practice, and often necessitates extra RPC calls. This is also not how the flow works in EVM for instance.
We have found this to be meaningful client overhead in RPC calls + integration pains.
We should brainstorm a way to make the simulate endpoint response return the required sequence number, and adjust the ante handler so that on simulate the sequence number is not checked.
Problem Definition
Right now integrators cannot get gas estimates without first querying for the sequence number. This has two pain points right now.
One is that submitting a tx requires 3 interactive steps.
But another problem thats particularly painful is when the simulate endpoint fails due to the wrong sequence. Then you have to re-simulate to get the gas amount. Ideally we would just get the sequence number from the simulation, and use that in the final signing. This is particularly helpful. It reduces the number of error states and interactive steps needed.
Proposed Feature
Remove sequence number correctness from being needed in RunTxMode==simulate.
I haven't looked into the simulate endpoints response type yet to have an informed opinion on how easy it is to add sequence number into the response type. But that would be ideal, and could then be a minor release change?
The text was updated successfully, but these errors were encountered: