-
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
deps(ecc): Update zcash_primitives
and orchard
only for zebra-chain crate
#8522
Closed
Closed
Changes from 5 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
4ec2607
upgrade zcash_primitives and orchard only for zebra-chain crate
oxarbitrage 617fc03
update and use TryFrom for amounts
oxarbitrage 1da71d8
fix imports in serialize
oxarbitrage 66894df
leave doc as it was
oxarbitrage ba7fc7b
leave doc as it was 2
oxarbitrage bca2c28
use `try_into` for amount
oxarbitrage 3e4aa04
use `zip_212_enforcement`
oxarbitrage 71dc000
Merge remote-tracking branch 'origin/main' into upgrade-primitives-or…
oxarbitrage File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 was because the
coinbase_outputs_are_decryptable_for_historical_blocks
test inzebra-consensus
pass only if this variable isin the grace period, however i think we need to compare with the height of the output to decide what goes here ?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.
Oh good, they've changed this already, I thought this was in 0.15.0.
ZIP-212 enforcement can always be on here because we only call this function after Canopy activation. We should leave a comment about needing to check the height if Zebra's mandatory checkpoint height ever falls below the last block before Canopy activation (or we could just double check the height here anyways).
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.
If we change to
sapling::note_encryption::Zip212Enforcement::On
then the test will fail with:We might need to fix the test.
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.
So the test will pass, and so we don't have to update this code if Zebra's mandatory checkpoint height is ever lowered below the last block before Canopy activation, we could derive
Ord
/PartialOrd
impls onNetworkUpgrade
and do:It could also just get the Canopy activation height and check that it's past it.
Zebra skips the check in production because of the mandatory checkpoint height but does check historical blocks before Canopy in the test, so the test actually covers more than strictly necessary here.
This is the relevant section of the ZIP: https://zips.z.cash/zip-0212#consensus-rule-change-for-coinbase-transactions
Note: This seems to be wrong in zcashd, see zcash/zcash#6890.
It may be a good idea to do a sync test from Canopy activation until the end of the grace period with checkpoint sync disabled to make sure that all of the blocks in the grace period follow the ZIP, though I think it was implemented correctly in zcashd prior to v5.9.0.Update: Actually, there's no point in a sync test, the mandatory checkpoint height is still after the grace period. We can do a sync test with checkpoint sync disabled when we're lowering the mandatory checkpoint height.