This repository was archived by the owner on Jan 22, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
verify bank hash on startup with ledger tool option #17939
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1fd3940 to
a228b25
Compare
Codecov Report
@@ Coverage Diff @@
## master #17939 +/- ##
=========================================
- Coverage 82.6% 82.6% -0.1%
=========================================
Files 431 431
Lines 121341 121342 +1
=========================================
- Hits 100262 100254 -8
- Misses 21079 21088 +9 |
jeffwashington
commented
Jun 15, 2021
| process_options.accounts_db_caching_enabled, | ||
| process_options.limit_load_slot_count_from_snapshot, | ||
| process_options.shrink_ratio, | ||
| process_options.accounts_db_test_hash_calculation, |
Contributor
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here's where we pass true to verify hash calculations further down.
jeffwashington
commented
Jun 15, 2021
| check_hash, | ||
| can_cached_slot_be_unflushed, | ||
| )?; | ||
| let (calculated_hash, calculated_lamports) = self |
Contributor
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
switch to a lower level function that lets us verify the hash calculation.
sakridge
approved these changes
Jun 15, 2021
mergify bot
pushed a commit
that referenced
this pull request
Jun 16, 2021
(cherry picked from commit f558b9b) # Conflicts: # core/tests/snapshots.rs # ledger/src/bank_forks_utils.rs # runtime/src/snapshot_utils.rs
mergify bot
added a commit
that referenced
this pull request
Jun 16, 2021
…#17996) * verify bank hash on startup with ledger tool option (#17939) (cherry picked from commit f558b9b) # Conflicts: # core/tests/snapshots.rs # ledger/src/bank_forks_utils.rs # runtime/src/snapshot_utils.rs * fix merge errors Co-authored-by: Jeff Washington (jwash) <[email protected]> Co-authored-by: Jeff Washington (jwash) <[email protected]>
Closed
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
non-index hash calculation is being used in more places with more options, including replacing index scan versions.
Summary of Changes
Plumb through more verification compared to index-scan so tests and optional args to validator or ledger-tool verify can check hash calculations.
Fixes #