-
Notifications
You must be signed in to change notification settings - Fork 524
catchpoints: more support for EnableCatchpointsWithOnlineAccounts #6214
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
catchpoints: more support for EnableCatchpointsWithOnlineAccounts #6214
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
left a comment
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.
Shared some questions
…TestAcctOnlineVotersLongerHistory
b8f7574 to
11a5f46
Compare
…ory before making catchpoint
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.