How it looks without the formatting updates#51
Closed
vivek-arte wants to merge 48 commits into
Closed
Conversation
Issuer keys test vectors implementation
* zsa-note-type: test vectors for note commitment and encryption * zsa-note-type: explicit native then ZSA notes * zsa-note-type: consistent order of arguments * zsa-note-type: revert output format * zsa-note-type: commit note encryption with note type test vectors Co-authored-by: Aurélien Nicolas <info@nau.re>
* zsa-sync-test-vectors: output directly the needed test code * zsa-sync-test-vectors: regenerate rust code with the same content but final format Co-authored-by: Aurélien Nicolas <info@nau.re>
- Updated to support encryption_v3 as given in QED-it/orchard#38 and QED-it/librustzcash#18. - This PR breaks compatibility with OrchardDomainV2
This adds the changes to the zcash test vectors to update the calculation of the Asset Base from the Asset Identifier via the Asset Digest, as detailed in ZIP 227.
We would like to have the same R constant for ZEC and ZSA note commitments.
…orr scheme, and rename `asset_id` to `asset_base` (#12) This updates the ik derivation to be via the Schnorr scheme, and refactors asset_id.py to asset_base.py. It also adds test vector generation code for issuance authorization signature, adds a check to ensure the `isk` is non zero, and updates the generated Rust files.
This merges upstream changes into the `zsa1` branch of our fork.
This separates the additions of the ZSA work into a separate file, creating separate test vector files for them. It also adds in upstream changes to the test vectors crate.
* changing documentation of the BIP 340 code to reflect the specific commit it has been taken from * re-adding the main function to key_components so that orchard vectors can be generated independently * reducing code duplication between orchard and orchard_zsa key_components * cosmetic changes to reduce unnecessary divergences from upstream, addition of blank line at end of some files * making the key component random initialization cleaner * adding suggestions from review
This is to add upstream changes for ZIP 320 test vectors into the repository.
This PR adds in the changes for ZIP 320 vectors from upstream. It also edits the output file in order to reduce the diff between the generated test vectors upstream.
* updating zip_0244 functions to support generating both V5 and V6 digests, and adding NU6 constants to transaction.py * adding V6 transaction class to transaction.py -- code reuse needs to be improved * changes to transaction.py and zip_0244.py * minor update * initial attempt at inheritance, to be improved * changing inheritance structure of TransactionV5 and TransactionV6, and moving TransactionV6 to transaction_zsa.py * reverting zip_0244.py to only include V5 details * separate txid vectors for zsa into separate files * adding ZSA version of zip 244 vectors * renaming to NU7 and so on * still WIP, updating to work with librustzcash code * updating get_random_unicode_bytes to give a slightly wider range of values * changes to the transaction format serialization and the txid generation to make it spec compliant * updating the generated test vectors * some cleanup changes * removing unichr option from get_random_unicode_bytes * cleaner import * simple changes based on review comments * moving common transaction fields in a way that reduces code duplication * reducing code duplication by creating an OrchardActionBase class which is inherited by OrchardActionDEscription and OrchardZSAActionDescription * reducing code duplication in transaction, transaction_zsa, zip_0244 and orchard_zsa/digests files * reducing code duplication inside the main function of zip_0244 and orchard_zsa/digests * changing txn version back to V6 * renaming rho to nf_old in note_encryption files
This renames the TransactionZSA class to TransactionV6 to better reflect its purpose as a V6 transaction format reference implementation
For more details, see ZIP227
* Moving the burn fields into the action group * fixing small issue with switch to asset_desc_hash * regenerating test vector files
Main modifications - Generate test vectors for ZIP230 adresses - Generate test vectors for ZIP32 - Update regenerate script - Update rust output by replacing vectors by slices to support no_std
This is a companion PR to QED-it/orchard#182. It makes the changes to the specification made in zcash/zips#1042, namely the addition of a 0x00 byte to the start of the issuance validating key and the issuance authorization signature.
Add `SighashInfo` (version and associated data) to - Orchard binding signatures, - Orchard authorizing signatures, and - issuance authorization signatures. Update `auth_digest` by adding `SighashInfo`
…nges to ZIPs (#36) There was a rearranging of the transaction format and the digests that took place in zcash/zips#1086 and zcash/zips#1088. This PR makes the changes to the test vectors to match them back to the spec. --------- Co-authored-by: Constance Beguier <constance@qed-it.com>
Remove nested loop in orchard_auth_digest
* Add orchard_zsa_spend_auth_sigs_auth_digest * Update test vectors
Add `SighashInfo` (version and associated data) to - Sapling binding signatures, and - Sapling authorizing signatures Update `sapling_auth_digest` by adding `SighashInfo` as defined in ZIP246
Add `SighashInfo` (version and associated data) to - Transparent authorizing signatures. Update `auth_digest` by adding `SighashInfo` as defined in ZIP246 Add `SighashInfo` for Sapling/Orchard binding signatures only when the signatures exist
…g in TransactionBase
This performs some code refactoring to make the upstream merge in the next step less complicated. The refactoring is cosmetic in that it doesn't affect the generated test vectors. It mainly splits out the initialization and byte serialization of the transaction (in TransactionBase) to differing functions for header, transparent and sapling parts of the transaction. The Orchard parts are in the child classes (TransactionV5 and TransactionV6) and are not separated out into functions.
This merges in the updates from `upstream/master` to the target branch.
This makes the spacing, comment and minor rearrangements suggested in zcash#108 (review). Specifically, this PR makes the changes that are touching the ZSA portions of the repository.
This refactors the portions of the `TransactionBase` class so that it does not need to use the `version_group_id` to decide behaviour - the way it behaves is decided by redefinition of the added functions in the child classes (aka `TransactionV5` and `TransactionV6`). This refactor does not affect the generated test vectors.
8a71f9b to
54cfa35
Compare
Author
|
Merged #50, can close this now |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is a view of how the
zsa1branch would look if we merge in #50, that is, with the formatting change we made removed.Those changes remain in #41 (which is zcash#112) and #42.