-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from ZcashFoundation/jane/precompute
Prior to this PR the zcash script verification logic in zebra has had an issue with quadratic serialization of transactions when verifying scripts. In the script verification API each input is verified individually. This would be fine, except for the fact that we also have to deal with FFI to another language with a different representation for transactions, which requires that we serialize and deserialize each transaction for each call into c++ code. This PR solves this problem by exporting the newly setup "precomputed transaction" API, which lets us serialize our transaction once, pass it over, have zcash_script deserialize it once, and then pass us a `void*` pointer to the data they'd need for future function calls to verify individual transaction inputs. We then hold onto this pointer and pass it back into the C++ code for each input we verify, which prevents us from needing to do any more serialization for the duration of that transaction verification.
- Loading branch information
Showing
598 changed files
with
15,666 additions
and
17,544 deletions.
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
Oops, something went wrong.