-
Notifications
You must be signed in to change notification settings - Fork 107
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
zebra_script: update to new zcash_script callback API #8566
Merged
Conversation
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
conradoplg
force-pushed
the
simplify-zcash-script-api
branch
2 times, most recently
from
May 29, 2024 21:56
d481230
to
3131e2f
Compare
github-actions
bot
added
the
C-trivial
Category: A trivial change that is not worth mentioning in the CHANGELOG
label
May 29, 2024
conradoplg
force-pushed
the
simplify-zcash-script-api
branch
from
May 29, 2024 22:10
3131e2f
to
a89a5a0
Compare
conradoplg
changed the title
WIP: use simplified zcash_script API
zebra_script: update to new zcash_script callback API
May 29, 2024
conradoplg
force-pushed
the
simplify-zcash-script-api
branch
from
June 13, 2024 14:10
1a82f84
to
67f417c
Compare
conradoplg
force-pushed
the
simplify-zcash-script-api
branch
from
June 13, 2024 22:49
67f417c
to
0ccbb04
Compare
conradoplg
requested review from
arya2 and
upbqdn
and removed request for
a team
June 13, 2024 22:50
3 tasks
upbqdn
previously approved these changes
Jun 17, 2024
Co-authored-by: Marek <mail@marek.onl>
conradoplg
commented
Jun 17, 2024
upbqdn
approved these changes
Jun 19, 2024
20 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
Motivation
See ZcashFoundation/zcash_script#157 for context.
Currently no matching issue.
Closes #3436 because makes it moot.
PR Author Checklist
Check before marking the PR as ready for review:
For significant changes:
If a checkbox isn't relevant to the PR, mark it as done.
Specifications
Complex Code or Requirements
Solution
This changes zebra_script to use the new zcash_script API.
This is a bit bigger than expected because I did a small refactoring that made the implementation easier: passing a BranchID instead of a NetworkUpgrade to the sighasher (which is simpler since all callers converted a BranchID to a NetworkUpgrade before calling it)
This also changes the SigHasher to allow precomputation, which is used with the new API. This way we keep the same performance since the old API also supported precomputation. But this will also allow us to share the precomputation with the shielded sighash implementation, but I'll do that in a follow up PR.
Testing
I just updated the tests for the new SigHasher API where applicable.
Review
This depends on #8568 since I wanted to make sure I was using up-to-date APIs.
Reviewer Checklist
Check before approving the PR:
PR blockers can be dealt with in new tickets or PRs.
And check the PR Author checklist is complete.
Follow Up Work
We can now use the new SigHasher to share precomputation with the shielded sighash, but that's optional.