-
Notifications
You must be signed in to change notification settings - Fork 102
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
bug: some subtrees have incorrect end heights after a full sync #7532
Closed
5 of 10 tasks
Tracked by
#6642
Labels
A-state
Area: State / database changes
C-bug
Category: This is a bug
I-invalid-data
Zebra relies on invalid or untrusted data, or sends invalid data
Comments
teor2345
added
C-bug
Category: This is a bug
S-needs-triage
Status: A bug report needs triage
labels
Sep 12, 2023
This was referenced Sep 7, 2023
teor2345
added
P-Medium ⚡
I-invalid-data
Zebra relies on invalid or untrusted data, or sends invalid data
A-state
Area: State / database changes
labels
Sep 12, 2023
This was referenced Sep 13, 2023
We have what looks like an instance of this bug in CI:
|
4 tasks
Here are the corresponding Saplingsapling 0-10
sapling 1090-1095
Orchard
It is ok for a subtree to be incomplete if the state hasn't fully synced yet. |
This was referenced Sep 14, 2023
Closed
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-state
Area: State / database changes
C-bug
Category: This is a bug
I-invalid-data
Zebra relies on invalid or untrusted data, or sends invalid data
Steps to fix
Remove different code for end of block and middle of blockEdit: this is tricky to doWhat happened?
I expected to see this happen:
Subtree end heights should be the block they are completed in.
Subtrees should match
zcashd
.Instead, this happened:
Subtree end heights were 1 more than they should be, under these conditions:
Some subtrees won't match
zcashd
after a full Zebra sync.What were you doing when the issue happened?
Testing PR #7531 on my local machine.
Zebra logs
Zebra Version
zebrad 1.2.0 commit 8e74e49
Which operating systems does the issue happen on?
OS details
local machine
Additional information
This bug would have been caught by ticket #7446, but only if we found a test vector for "Completed Subtree at the end of the block", and "subtrees added with new tip blocks", and ran it on a full sync Zebra state.
The best way to detect this bug is a manual
zcash-rpc-diff
after a full sync of a new state, I'll add a check to ticket #7450.In PR #7531, I refactored the upgrade and tip block subtrees to use the same code, which is how I found this bug. So a similar bug shouldn't happen again.
The text was updated successfully, but these errors were encountered: