-
Notifications
You must be signed in to change notification settings - Fork 263
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
[ZIP-233] Network Sustainability Mechanism: Burning #1567
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1567 +/- ##
==========================================
- Coverage 61.62% 61.56% -0.07%
==========================================
Files 148 148
Lines 18825 18873 +48
==========================================
+ Hits 11601 11619 +18
- Misses 7224 7254 +30 ☔ View full report in Codecov by Sentry. |
#[cfg(zcash_unstable = "zfuture")] | ||
NetworkUpgrade::ZFuture, |
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 change is incorrect I believe. ZFuture
by definition has no activation height.
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.
What's the recommended development pattern for naming and activating "provisional" protocol changes within dev branches prior to those changes being accepted or planned for any network upgrade?
In other words, what's the best way to do steps 2 and 3 below (wrt librustzcash
crates):
- Implement some consensus protocol change,
- Name the new protocol version (with a provisional dev-branch-specific identifier),
- Modify update/activation logic and tests for activating that new protocol change,
- Later, if things go well, after ZIPs are specified and the changes are slated for a real life upgrade, submit another code change to rename the provisional protocol version with the real target version,
- Merge the protocol changes with other protocol changes for the slated upgrade, etc...
Also, I believe this process/convention needs to be shared somewhat with zebra
, correct?
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.
I realized my question isn't directly relevant to this diff hunk, and I understand why ::Future
should not be added to that list.
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.
As discussed in the last Arborist call, the proposed mechanism is to guard those changes with:
#[cfg(all(zcash_unstable = "nu7", feature = "zip-233"))]
This requires the zcash_unstable
feature flag to be set, and also for an ordinary additive Rust feature flag. This will make it so that the code cannot be part of any ordinary build, but those who need to experiment with and ensure build consistency can proceed.
As part of this, we should add a NetworkUpgrade::Nu7
constant that is guarded by #[cfg(zcash_unstable = "nu7")]
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.
I'll make a PR to zcash_protocol
that adds these constants.
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 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.
…" flag, added NU7
This mostly consists of the addition of a
burn_amount
transaction field, introduced in theZFuture
network upgrade. Enablingcfg(zcash_unstable = "zfuture")
meant that a lot of TZE code was unnecessarily enabled, so we switched some of those sections tozcash_unstable = "tze"
as well as introducingzcash_unstable = "nsm"
to keep things separate. Thezfuture
cfg is now used just to enable the ZFuture network upgrade.The code for the generated test vectors is available in this PR.