-
Notifications
You must be signed in to change notification settings - Fork 479
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: Add onlineaccounts and onlineroundparamstail tables to snapshot files #6177
catchpoints: Add onlineaccounts and onlineroundparamstail tables to snapshot files #6177
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6177 +/- ##
==========================================
- Coverage 52.00% 51.93% -0.08%
==========================================
Files 642 643 +1
Lines 85898 86223 +325
==========================================
+ Hits 44674 44777 +103
- Misses 38386 38584 +198
- Partials 2838 2862 +24 ☔ 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.
Implementation looks correct. Our versioning is very confusing though
…e corruption in catchpointtracker
…hpoint-onlineaccts-separatehashes
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.
LGTM. I guess a manual test needs to be done:
- make a new catchpoint and restore using new algod. Ensure it joins the network and processes blocks/transactions.
- make sure the old algod rejects a new catchpoint with a clear error message
…accts-separatehashes
…ashes' into catchpoint-onlineaccts-separatehashes
Co-authored-by: Pavel Zbitskiy <[email protected]>
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.
Submitted my comments, tests were failing at last check so pending resolving those.
Co-authored-by: Pavel Zbitskiy <[email protected]>
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.
LGTM. I'll an e2e test as a followup
Please merge master in (to fix #6205) |
…accts-separatehashes
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.
Wow. I read it all, but catchpoints are a huge mess. I think everything makes sense, in so far as one can claim the existing code makes sense.
Summary
The new opcodes in #5984 require access to historical lookups of online account details and total circulation amounts. During catchpoint restore, replaying and evaluating old blocks bootstraps the tracker DBs. However transactions that use these opcodes will fail, since they need access to historical ledger amounts earlier than the horizon of the catchpoint snapshot. This PR adds the
onlineaccounts
andonlineroundparamstail
tables to the snapshot files, which provide online account lookup and total circulation amounts, respectively.Test Plan
Existing tests should pass — added a test
TestCatchpointAfterStakeLookupTxns
to use thevoter_params_get
andonline_stake
opcodes (similar to some catchpoint tests written for testing use of box opcodes).