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

Remove frontiers table from ledger #4425

Merged
merged 1 commit into from
Mar 25, 2024

Conversation

clemahieu
Copy link
Contributor

The frontiers table is redundant and only used for legacy block processing. It tracks a mapping of head block hash to account number. This information can already be obtained by the previous block's sideband information, which contains the account number, and the account_info which contains the head block.

This rewrites the ledger checks in terms of the already existing information and removes updates to the frontiers table and associated tests. This also does a ledger upgrade which drops the frontiers table.

@clemahieu clemahieu added enhancement database Relates to lmdb or rocksdb labels Feb 10, 2024
nano/core_test/block_store.cpp Outdated Show resolved Hide resolved
nano/secure/ledger.cpp Outdated Show resolved Hide resolved
dsiganos
dsiganos previously approved these changes Feb 12, 2024
nano/secure/ledger.cpp Outdated Show resolved Hide resolved
nano/secure/ledger.cpp Outdated Show resolved Hide resolved
@clemahieu clemahieu force-pushed the remove_frontiers_table branch from 9f10d06 to 9f2d728 Compare March 5, 2024 16:33
@clemahieu clemahieu marked this pull request as draft March 5, 2024 16:37
@clemahieu clemahieu force-pushed the remove_frontiers_table branch from 9f2d728 to b4b5d09 Compare March 5, 2024 17:18
@clemahieu
Copy link
Contributor Author

Split this commit. This is the second part which includes database changes which we can merge later in the release cycle since it upgrades the database. The first part is in this commit #4460

@clemahieu clemahieu force-pushed the remove_frontiers_table branch from 15f600e to 278d6de Compare March 22, 2024 17:23
@clemahieu clemahieu marked this pull request as ready for review March 22, 2024 17:27
@clemahieu clemahieu merged commit 43dae2f into nanocurrency:develop Mar 25, 2024
24 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
database Relates to lmdb or rocksdb enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants