-
Notifications
You must be signed in to change notification settings - Fork 114
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
Use zcash_script’s new Script
trait
#8751
base: main
Are you sure you want to change the base?
Conversation
This depends on ZcashFoundation/zcash_script#171. |
e47cdfc
to
9e5014b
Compare
38617ec
to
f80b392
Compare
Thank you for your PR! We're focusing on changes for NU6 testnet activation at the moment so we won't be able to prioritise this review for another week or two. |
9d931b0
to
8449878
Compare
Re: the unchecked checkboxes
|
We usually check boxes if they don't apply to the PR.
Added a priority label. Added a |
What's next here? I see ZcashFoundation/zcash_script#171 has merged |
We should double check this PR works with zcash_script |
I can do this, but wondering how to show that it’s successful – should I put up a temporary PR that just fetches zcash_script from GH instead of the crate registry and shows that everything still passes? And we’ll just close it afterward? Also, I’m happy for there to be a zcash_script release now, but I figured it would be fine to leave it until the next PR or two land on zcash_script, which contain the actual Rust implementation. |
Notably, `HashType` has changed incompatibly, so ZcashFoundation/zebra#8751 will need to be updated.
Notably, `HashType` has changed incompatibly, so ZcashFoundation/zebra#8751 will need to be updated.
Show that ZcashFoundation#8751 would work with a new zcash_script release.
Show that ZcashFoundation#8751 would work with a new zcash_script release.
42b4aa1
to
b2f5a49
Compare
Ok, this now points at the zcash_script master branch. I also made a PR (#8896, to be discarded) that shows that the current Zebra main branch (without this PR) will also work with the new zcash_script. |
I guess @sellout has done this already in #8896? @conradoplg shall we do the zcash_script release and merge this? |
I should have ZcashFoundation/zcash_script#175 merged today, which is effectively an addendum to ZcashFoundation/zcash_script#171, so it’s probably worth getting that in before the release … and I think it will involve at least a small change to this PR as a consequence. |
* Address Str4d’s comments on #171 Notably, `HashType` has changed incompatibly, so ZcashFoundation/zebra#8751 will need to be updated. * Apply suggestions from code review Co-authored-by: Jack Grigg <[email protected]> * Restrict bitflags used for `HashType` in v5 tx --------- Co-authored-by: Jack Grigg <[email protected]>
This is a precursor to testing the Rust implementation of Zcash Script.
Show that ZcashFoundation#8751 would work with a new zcash_script release.
b2f5a49
to
eb26f14
Compare
I went ahead and updated this for the latest zcash_script which should be now working. CI should fail only the cargo deny sources check since it's pointing to |
I wonder if the |
A feature flag sounds good. I seem to recall that the plan was to run both together for a while until we have assurance that the Rust one is equivalent, and then switch to the Rust one and get rid of the C++ one. |
Yeah, I think it's important for some nodes to be running both simultaneously, taking the results from the C++ interpreter but loudly announcing any divergences. Probably even halting if there's a divergence, so that the node is left in a state where it's debuggable. |
Motivation
This is a precursor to testing the Rust implementation of Zcash Script.
Blocked-On: ZcashFoundation/zcash_script#171 and publishing a new version of
zcash_script
with those changes.Solution
This uses a trait that wraps the C++ Zcash Script implementation. As we progress toward cutting over to a Rust implementation, this trait will additionally have impls for the Rust version and a variant that runs both C++ & Rust, comparing the results.
Additionally, this eliminates a few cases from
zebra_script::Error
that can never be produced.Tests
The tests are the same as the previous zebra_script tests – there should be no change in behavior.
Follow-up Work
This is blocked on a release of zcash_script containing ZcashFoundation/zcash_script#171.
PR Author's Checklist
PR Reviewer's Checklist