-
Notifications
You must be signed in to change notification settings - Fork 487
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 EnableOnlineAccountCatchpoints #6214
catchpoints: more support for EnableOnlineAccountCatchpoints #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. |
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
catchpointFileWriter
currently does not have any access to the consensus parameters, and so does not know ifEnableOnlineAccountCatchpoints
is set. This means catchpoints files may contain chunks withOnlineAccountRecordV6
andOnlineRoundParamsRecordV6
even whenEnableOnlineAccountCatchpoints
is not set. However these objects are ignored when calculating the label — the catchpoint label hash calculation is conditioned onEnableOnlineAccountCatchpoints
.This adds an argument to
makeCatchpointFileWriter
so thatcatchpointFileWriter
knows what the current consensus version is.This also adds support to
catchpointdump
for 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
TestExactAccountChunk
to 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.