catchpoints: more support for EnableCatchpointsWithOnlineAccounts#6214
Merged
gmalouf merged 11 commits intoalgorand:masterfrom Jan 8, 2025
Merged
catchpoints: more support for EnableCatchpointsWithOnlineAccounts#6214gmalouf merged 11 commits intoalgorand:masterfrom
gmalouf merged 11 commits intoalgorand:masterfrom
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6214 +/- ##
==========================================
- Coverage 51.91% 51.87% -0.05%
==========================================
Files 643 643
Lines 86234 86349 +115
==========================================
+ Hits 44769 44794 +25
- Misses 38599 38688 +89
- Partials 2866 2867 +1 ☔ View full report in Codecov by Sentry. |
gmalouf
reviewed
Jan 3, 2025
gmalouf
reviewed
Jan 3, 2025
gmalouf
reviewed
Jan 3, 2025
algorandskiy
reviewed
Jan 3, 2025
gmalouf
reviewed
Jan 3, 2025
gmalouf
reviewed
Jan 3, 2025
…TestAcctOnlineVotersLongerHistory
gmalouf
previously approved these changes
Jan 8, 2025
b8f7574 to
11a5f46
Compare
…ory before making catchpoint
gmalouf
approved these changes
Jan 8, 2025
algorandskiy
approved these changes
Jan 8, 2025
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Follow-on to #6177.
When writing catchpoint files, the
catchpointFileWritercurrently does not have any access to the consensus parameters, and so does not know ifEnableCatchpointsWithOnlineAccountsis set. This means catchpoints files may contain chunks withOnlineAccountRecordV6andOnlineRoundParamsRecordV6even whenEnableCatchpointsWithOnlineAccountsis not set. However these objects are ignored when calculating the label — the catchpoint label hash calculation is conditioned onEnableCatchpointsWithOnlineAccounts.This adds an argument to
makeCatchpointFileWriterso thatcatchpointFileWriterknows what the current consensus version is.This also adds support to
catchpointdumpfor analyzing and dumping the onlineaccount and onlineroundparams records in catchpoint files, and calculating the labels.This also addresses a corner case when the state proof recoverability system (from #4803) tells the onlineaccounts tracker to retain more than 320 rounds of history (set by
votersTracker.lowestRound()) and used here:In this case, catchpoint files will contain more than the expected 320 rows, and lead to catchpoint label hash mismatch if catchpoint-generating nodes have differing opinions of when the last state proof was verified. In practice, this can really only occur when a node is catching up quickly (after being stopped and restarted, or starting from 0) and flushing large batches of rounds — it might not have verified the most recent state proof when it hits the catchpoint first stage snapshot round.
Test Plan
Updated
TestExactAccountChunkto exercise the new consensus params argument, can try updating other similar tests.Needs a new test where dcc.lowestRound is set to something older than
(dcc.newBase()+1).SubSaturate(320), and verifies the excludeBefore argument works.