Optimize nonce check for pre-verified normal transaction #1086
Labels
[Size] Small
[Type] Maintenance
Cleanup or handling of technical debt.
[Type] Task
An additional feature or improvement.
Task description
The PR #1061 optimized the transaction table. However as a result of this it is necessary to re-check that the nonce of the pre-verified transaction is ok.
This currently looks up the account of the last finalized block in order to deem the transaction nonce ok or not.
For the usual - and most cases it should not be necessary to look up the account of the last finalized block. Instead it is sufficient to check whether the last finalized block at the point of pre-verification is STILL the last finalized block at the point where the transaction is added to the transaction table (this is recorded in the verification context).
If the last finalized block has changed, then it is still necessary to actually look up the account of the last finalized block in order to decide whether the transaction nonce is ok (before putting it into the transaction table).
The text was updated successfully, but these errors were encountered: