Go to file
Kris Nuttycombe fb5f931e5f Ensure that successive diversified UAs have the same structure.
In 23321662d1, the unified address
test vectors were modified to include multiple addresses for each
account at successive diversifier indices. However, the generation
process resulted in such diversified addresses having varying sets
of typecodes within a single account; in particular, p2sh and p2pkh
addresses were interleaved in a manner that made testing transparent
functionality using the resulting test vectors more difficult.

In the process of this fix, it was also noted that the handling of
unknown typecodes was inconsistent, with the unknown typecode always
being included in the resulting test vector even if no data
corresponding to that typecode was present. This has also been
modified such that if an unknown typecode is present, data is present,
and vice versa.
2022-10-07 19:17:23 -06:00
.github/workflows Update dependency versions. 2022-09-19 15:36:15 -06:00
test-vectors Use unified addresse strings in test vectors rather than byte vectors. 2022-09-19 13:59:00 -06:00
zcash_test_vectors Ensure that successive diversified UAs have the same structure. 2022-10-07 19:17:23 -06:00
.gitignore
COPYING.md
LICENSE-APACHE
LICENSE-MIT
README.md Move remaining scripts out of the root directory. 2022-02-08 13:53:57 +00:00
orchard_vesta.py
poetry.lock Update dependency versions. 2022-09-19 15:36:15 -06:00
pyproject.toml Update dependency versions. 2022-09-19 15:36:15 -06:00
regenerate.sh Add BIP 32 key derivation and test vectors. 2022-02-11 16:29:14 +00:00

README.md

Zcash Python test vectors

Code to generate test vectors for various parts of Zcash.

The generated test vectors are checked into the repository:

  • test-vectors/json/: JSON format.
  • test-vectors/rust/: Rust format, suitable for copying into a Rust library or application to use from #[cfg(test)] code.
  • test-vectors/zcash/: Bitcoin-flavoured JSON format (where 256-bit values are encoded as byte-reversed hex strings), for use in zcashd unit tests.

To generate the test vectors yourself (for example, to generate a larger set after adjusting:

  • Install poetry.
  • poetry install
  • poetry run SCRIPT_NAME [-t json|rust|zcash]
    • SCRIPT_NAME is one of the scripts listed in pyproject.toml.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.