-
Notifications
You must be signed in to change notification settings - Fork 106
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
fix(consensus): Check that Zebra's state contains the social consensus chain on startup #6163
Conversation
This new task takes about one second on my machine, about the same time as validating the Zcash parameters:
|
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #6163 +/- ##
==========================================
+ Coverage 77.96% 78.07% +0.10%
==========================================
Files 304 304
Lines 39197 39251 +54
==========================================
+ Hits 30560 30644 +84
+ Misses 8637 8607 -30 |
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.
This is looking good!
f54132c
to
ec52aee
Compare
Coverage failed downloading Zcash parameters:
https://github.com/ZcashFoundation/zebra/actions/runs/4192197818/jobs/7267473489#step:9:18 It's possible the download server is very slow right now. |
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.
There are "missing documentation for a struct field" warnings in the BackgroundTaskHandles
, but this looks perfect otherwise!
Oops, that should be fixed now! |
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.
Looks great! Thank you!
@Mergifyio refresh |
✅ Pull request refreshed |
@Mergifyio update |
✅ Branch has been successfully updated |
Failed due to bug #5940, that fix is in the |
This approval should have been dismissed by the main branch update, this is a bug in GitHub's latest pusher setting.
@arya2 this just needs a re-approval after a |
@Mergifyio refresh |
✅ Pull request refreshed |
Unrelated failure in the getblocktemplate tests, I'll open another ticket. |
@Mergifyio refresh |
✅ Pull request refreshed |
Motivation
Zebra does not check that the state has followed the correct chain, but this is a new consensus requirement on mainnet.
Closes #5912
Specifications
https://zips.z.cash/protocol/protocol.pdf#blockchain
Complex Code or Requirements
This PR adds another short startup task using the existing concurrent task framework and event loop.
Solution
Unrelated cleanups:
Testing
New tests:
I also did full and partial syncs locally, and they passed. (I had some unrelated issues with syncing due to proof errors, likely caused by disk corruption.)
Changelog
Added security and deprecation notes in this PR.
Review
This PR's code is ready for review. It is not on the critical path.
Reviewer Checklist
Follow Up