Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize nonce check for pre-verified normal transaction #1086

Open
MilkywayPirate opened this issue Nov 17, 2023 · 0 comments
Open

Optimize nonce check for pre-verified normal transaction #1086

MilkywayPirate opened this issue Nov 17, 2023 · 0 comments
Labels
[Size] Small [Type] Maintenance Cleanup or handling of technical debt. [Type] Task An additional feature or improvement.

Comments

@MilkywayPirate
Copy link
Contributor

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).

@MilkywayPirate MilkywayPirate added [Size] Small [Type] Maintenance Cleanup or handling of technical debt. [Type] Task An additional feature or improvement. labels Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Size] Small [Type] Maintenance Cleanup or handling of technical debt. [Type] Task An additional feature or improvement.
Projects
None yet
Development

No branches or pull requests

1 participant