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

Verifies accounts lt hash at startup #3145

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

brooksprumo
Copy link

@brooksprumo brooksprumo commented Oct 11, 2024

Problem

Eventually, the accounts lt hash will not be recalculated at startup. Instead, we'll get the initial accounts lt hash from the snapshot (or equivalent). When that happens, we will still want to verify the accounts, and we'll want that to happen in the background, similar to today with the full accounts hash calculation. Currently there is not a way to verify the accounts lt hash that is suitable for running in the background.

Summary of Changes

Add a function to calculate the accounts lt hash from storages. Use that to verify the accounts lt hash at startup in the background.

Additional Testing

In addition to the tests in the PR, I ran this code against mnb on a dev box. This calculates the accounts lt hash from the index first, then verifies from storages second. This was successful (hashes matched). The verification step took approximately the same amount of time as the normal accounts hash verification (full + incremental).

@brooksprumo brooksprumo self-assigned this Oct 11, 2024
@brooksprumo brooksprumo marked this pull request as ready for review October 11, 2024 23:17
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.

1 participant