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. |
algorandskiy
left a comment
There was a problem hiding this comment.
Implementation looks correct. Our versioning is very confusing though
…e corruption in catchpointtracker
…hpoint-onlineaccts-separatehashes
algorandskiy
left a comment
There was a problem hiding this comment.
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 <65323360+algorandskiy@users.noreply.github.com>
gmalouf
left a comment
There was a problem hiding this comment.
Submitted my comments, tests were failing at last check so pending resolving those.
Co-authored-by: Pavel Zbitskiy <65323360+algorandskiy@users.noreply.github.com>
algorandskiy
left a comment
There was a problem hiding this comment.
LGTM. I'll an e2e test as a followup
|
Please merge master in (to fix #6205) |
…accts-separatehashes
jannotti
left a comment
There was a problem hiding this comment.
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
onlineaccountsandonlineroundparamstailtables to the snapshot files, which provide online account lookup and total circulation amounts, respectively.Test Plan
Existing tests should pass — added a test
TestCatchpointAfterStakeLookupTxnsto use thevoter_params_getandonline_stakeopcodes (similar to some catchpoint tests written for testing use of box opcodes).