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

Trim the transaction table #1061

Merged
merged 31 commits into from
Nov 17, 2023
Merged

Trim the transaction table #1061

merged 31 commits into from
Nov 17, 2023

Conversation

MilkywayPirate
Copy link
Contributor

@MilkywayPirate MilkywayPirate commented Oct 31, 2023

Purpose

The TransactionTable and in particular non finalized transactions now only retains entries for accounts which have non-finalized transactions.
Accounts without non-finalized transactions are expunged from the transaction table and in that case the last finalized block is used for keeping track of the next available account nonce.

Changes

  • When purging, then remove any entries (from the non-finalized transactions table) that has no non-finalized transactions.
  • Don't populate the transaction table at startup.

Checklist

  • My code follows the style of this project.
  • The code compiles without warnings.
  • I have performed a self-review of the changes.
  • I have documented my code, in particular the intent of the
    hard-to-understand areas.
  • (If necessary) I have updated the CHANGELOG.

@MilkywayPirate MilkywayPirate changed the base branch from main to lmdb-accountmap October 31, 2023 11:11
@MilkywayPirate MilkywayPirate marked this pull request as ready for review November 6, 2023 09:07
@MilkywayPirate MilkywayPirate self-assigned this Nov 10, 2023
Base automatically changed from lmdb-accountmap to main November 13, 2023 18:07
Copy link
Contributor

@td202 td202 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly minor things. Otherwise, ensure that the account nonce is re-checked before adding incoming transactions (not from blocks), per our discussion.

Copy link
Contributor

@td202 td202 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job!

@MilkywayPirate MilkywayPirate merged commit 0e1dda9 into main Nov 17, 2023
3 checks passed
@MilkywayPirate MilkywayPirate deleted the trim-tt branch November 17, 2023 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants