-
Notifications
You must be signed in to change notification settings - Fork 267
Use zcash_script in PCZTs #1721
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
base: main
Are you sure you want to change the base?
Conversation
This replaces the local script implementation with the one from the zcash_script crate. The `Script` type that was here is replaced by a family of three types - `script::PubKey`; - `script::Sig<PushValue>` – a v5+ script_sig, used for new sigs; - `script::Sig<Opcode>` – a pre-v5 script\_sig, used for sigs read off the chain, which may predate NU5; and - an unwrapped `Vec<u8>` for script code. This uses a number of zcash_script features that haven’t yet made it into the master branch, let alone a release, so this should not be merged.
Convert to script code in the test runner, rather than from it. This makes it easier to read/write the scripts (although they’re currently nonsensical) and also the conversion from `script::PubKey` to script code is total, while the reverse isn’t (since the code is arbitrary bytes).
The advantages of this appear to be:
The downside is that |
It makes sense to me for that dependency to be behind a feature flag, but beyond that, I don't think that |
Would it be worthwhile to split the Or, to avoid the auditing issue, would it need to also be split into two repositories? |
What I would do here is actually flip the dependencies: move the Rust implementation into the We would also likely move |
That sounds reasonable to me. I would do that after all the in-progress changes on zcash_script are merged1. They’re all prerequisites for at least the current form of this PR, so I don’t think there are any downsides to waiting. Footnotes
|
This replaces the local script implementation with the one from the zcash_script crate.
The
Script
type that was here is replaced by a family of three typesscript::PubKey
;script::Sig<PushValue>
– a v5+ script_sig, used for new sigs;script::Sig<Opcode>
– a pre-v5 script_sig, used for sigs read off the chain, which may predate NU5; andVec<u8>
for script code.This uses a number of zcash_script features that haven’t yet made it into the master branch, let alone a release, so this should not be merged.