Commit Graph

302 Commits

Author SHA1 Message Date
Daira Hopwood ae7b8a1038
Merge pull request #75 from daira/internal-derivation
Add test vectors for internal key derivation
2022-02-01 20:47:04 +00:00
Daira Hopwood 674dc7c054 Cosmetics.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-02-01 20:29:09 +00:00
Daira Hopwood f7f726bf0d Add `internal_ivk` and `internal_fp` to Sapling internal key test vector fields.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-02-01 20:29:09 +00:00
Daira Hopwood b955625f52 Calls to `self.tag()` in Sapling internal key derivation should have been to `self.parent_tag()`
Co-authored-by: Ying Tong Lai <yingtong@z.cash>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-02-01 20:29:09 +00:00
Daira Hopwood 2234fa1242 Refactor the Orchard FullViewingKey constructor by adding FullViewingKey.from_spending_key.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-02-01 20:29:09 +00:00
Daira Hopwood 6c2bac7b73 Add test vectors for Orchard internal key derivation.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-02-01 20:29:09 +00:00
Daira Hopwood b10115d363 Add test vectors for Sapling internal key derivation.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-02-01 20:29:09 +00:00
str4d 5d6b92cd5c
Merge pull request #72 from zcash-hackworks/zip_244_coinbase
Update ZIP 244 test vectors to reflect changes in coinbase transaction signatures.
2022-01-31 21:55:04 +00:00
Daira Hopwood f81796c12a Coinbase scripts generated by zcashd have an extra OP_0, and nSequence == 0xFFFFFFFF.
Also, the height in coinbase needs to match nExpiryHeight.

Co-authored-by: Jack Grigg <str4d@electriccoin.co>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-01-31 21:38:31 +00:00
Daira Hopwood 60faf1c2c5 Generate some v5 coinbase transactions.
Co-authored-by: Kris Nuttycombe <kris@nutty.land>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-01-27 23:43:29 +00:00
Daira Hopwood ff9e171ff3 Update the computation of ZIP 244 test vectors to match https://github.com/zcash/zips/pull/587 .
Co-authored-by: Kris Nuttycombe <kris@nutty.land>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-01-27 23:34:40 +00:00
Kris Nuttycombe 0afbd1f240 Correct the types of variable-length fields for ZIP 244 test vectors.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-01-27 22:52:50 +00:00
Kris Nuttycombe 74747238b4
Merge pull request #62 from zcash-hackworks/refactor-into-package
Refactor test vectors into package
2022-01-12 21:00:13 -07:00
Jack Grigg 2093b309f4 Refactor test vectors into package
Scripts that were previously run via:
    poetry run python ./SCRIPT_NAME.py

and have been moved, can now be run as:
    poetry run SCRIPT_NAME

Some top-level scripts remain, where they only generate test vectors and
do not contain any Zcash logic. These now use the `zcash_test_vectors`
package, and can't be run directly unless this package is made available
in `PYTHONPATH`.
2022-01-13 02:46:20 +00:00
str4d 69dd363272
Merge pull request #67 from nuttycom/fix_zip0244_field_names
Rename scriptCode -> scriptPubKey & add zip244 test vectors.
2022-01-13 02:45:08 +00:00
Kris Nuttycombe e3959621fd Add zip244 test vectors. 2022-01-12 19:27:28 -07:00
Kris Nuttycombe 0a6297335f Rename scriptCode -> scriptPubKey 2022-01-12 19:26:12 -07:00
str4d 1ce0af7cd3
Merge pull request #68 from nuttycom/add_missing_test_vectors
Add test vectors for ZIPs 143, 243, 244, and 316
2022-01-13 02:09:47 +00:00
Kris Nuttycombe cbb71f6a9a Add generated test vectors for zip_143, zip_243, zip_244, unified addresses, and ufvks 2022-01-12 18:50:18 -07:00
str4d db01d4e23b
Merge pull request #63 from zcash-hackworks/ci-check-test-vectors
CI: Add workflow to verify test vectors are up-to-date
2022-01-10 16:36:00 +00:00
Jack Grigg 13b0cb1d92 CI: Ensure that all test vector variants are always checked
If one fails, we still want to check the others, because it can easily
be an output-specific issue.
2022-01-08 00:45:22 +00:00
Jack Grigg 053edd9e33 CI: Use `git status --porcelain` to verify no changes
`git diff -s --exit-code` will detect changes to tracked files, but
doesn't detect untracked files.
2022-01-07 23:55:40 +00:00
Jack Grigg 3174db5d00 Commit generated test vectors 2022-01-07 22:57:23 +00:00
Jack Grigg ffd11d94ec CI: Add workflow to verify test vectors are up-to-date
It will also help us to avoid unintentional modifications to existing
test vectors.
2022-01-07 22:57:23 +00:00
str4d 290218811f
Merge pull request #60 from daira/license-contribution-text
Revert a change made in #53, so that the license and contribution preamble is visible in `README.md`
2022-01-07 15:04:44 +00:00
str4d 6ee8ff7f51
Merge pull request #61 from zcash-hackworks/57-zip244-changes
Update test vectors for ZIP 244 changes
2022-01-07 11:57:54 +00:00
Jack Grigg 9a666e4a29 ZIP 244: Reverse order of value and script_code in txin_sig_digest 2022-01-06 21:33:28 +00:00
Jack Grigg fe666c2b94 ZIP 244: Add hash_type to transparent_sig_digest 2022-01-06 21:33:12 +00:00
Jack Grigg bda224b133 ZIP 244: Add new commitments to transparent inputs
Signatures for shielded inputs also commit to these new commitments,
meaning that for mixed transactions, shielded signatures are no longer
equivalent to signing the txid. This property remains for fully shielded
transactions.
2022-01-06 21:11:35 +00:00
Jack Grigg 29872dcaa0 ZIP 244: Change semantics of sequence_sig_digest 2022-01-05 21:02:08 +00:00
Daira Hopwood 2bff061a7b Update copyright year in LICENSE-MIT.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-01-04 19:34:54 +00:00
Daira Hopwood 838d7d18db Revert a change made in #53, so that the license and contribution preamble is visible in `README.md`.
Addresses https://github.com/zcash-hackworks/zcash-test-vectors/pull/53/files#r751745511
2022-01-04 17:09:56 +00:00
Daira Hopwood 61894e7793
Merge pull request #59 from daira/ua-item-order
Encode UAs/UVKs in ascending typecode order
2022-01-04 16:54:23 +00:00
Daira Hopwood ca0fdf3b30 Cosmetics.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-01-04 15:26:18 +00:00
Daira Hopwood 38246e3165 Encode UAs/UVKs in ascending typecode order.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-01-04 15:26:06 +00:00
Kris Nuttycombe faed954b99
Merge pull request #55 from nuttycom/unified_fvks
Add test vectors for unified viewing keys.
2021-12-10 12:25:53 -07:00
Kris Nuttycombe fe10d3d47c
Ensure that pubkey has the correct length and structure.
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2021-12-10 12:25:45 -07:00
Kris Nuttycombe 3e77a9a158 Add test vectors for unified viewing keys.
Fixes #47
Co-authored-by: str4d <jack@electriccoin.co>
2021-12-10 10:06:51 -07:00
therealyingtong 07a8e95931 Correct ROOT_OF_UNITY. 2021-10-12 15:36:43 +02:00
therealyingtong 35fbc5d7b2 orchard_vesta.py: Undo renaming of p and q. 2021-10-12 15:21:15 +02:00
Daira Hopwood 69a2dbb691 Move COPYING to COPYING.md so that it will be rendered correctly by GitHub.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-10-12 14:12:11 +01:00
ying tong 795d436ad2
Merge pull request #53 from daira/dual-license
Ensure that GitHub's "View license" link points to complete license information
2021-10-12 15:09:39 +02:00
str4d d1f5723d8b
Merge pull request #54 from zcash-hackworks/nu5-testnet-update
Updates for new NU5 testnet consensus rules
2021-09-29 10:47:45 +13:00
Jack Grigg dd8fdb4eaa Updates for new NU5 testnet consensus rules
The ZIP 244 test vectors are altered as a result of changing the
consensus branch ID.
2021-09-28 22:34:42 +01:00
str4d 61d2ae2425
Merge pull request #49 from daira/large-uas
Updates for large UAs/UVKs
2021-09-23 11:19:40 +12:00
Daira Hopwood 230876e20e Ensure that GitHub's "View license" link points to complete license information.
refs https://github.com/zcash/librustzcash/issues/443

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-09-17 23:16:26 +01:00
Daira Hopwood 3838e2514d
Apply suggestion for the type of jumbled_hash.
Co-authored-by: str4d <thestr4d@gmail.com>
2021-09-17 20:40:48 +01:00
Daira Hopwood bc6bc8a375 zc_utils.py: optionally enforce the MAX_SIZE limit (enforced by default).
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-09-17 20:39:53 +01:00
str4d 3e0835b140
Merge pull request #52 from zcash-hackworks/merkle-path
Merkle path test vectors for a depth-4 tree
2021-09-17 01:16:21 +12:00
Daira Hopwood efee9dcb03 chmod +x for scripts and make the shebang/preamble consistent.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-09-15 18:03:47 +01:00