Go to file
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
.github/workflows CI: Ensure that all test vector variants are always checked 2022-01-08 00:45:22 +00:00
test-vectors Add zip244 test vectors. 2022-01-12 19:27:28 -07:00
zcash_test_vectors Refactor test vectors into package 2022-01-13 02:46:20 +00:00
.gitignore Additions to .gitignore. 2018-07-03 15:04:41 +01:00
COPYING.md Move COPYING to COPYING.md so that it will be rendered correctly by GitHub. 2021-10-12 14:12:11 +01:00
LICENSE-APACHE Add license information 2019-07-03 17:37:23 +01:00
LICENSE-MIT Update copyright year in LICENSE-MIT. 2022-01-04 19:34:54 +00:00
README.md Refactor test vectors into package 2022-01-13 02:46:20 +00:00
f4jumble_long.py Refactor test vectors into package 2022-01-13 02:46:20 +00:00
orchard_empty_roots.py Refactor test vectors into package 2022-01-13 02:46:20 +00:00
orchard_map_to_curve.py Refactor test vectors into package 2022-01-13 02:46:20 +00:00
orchard_poseidon_hash.py Refactor test vectors into package 2022-01-13 02:46:20 +00:00
poetry.lock Add test vectors for unified viewing keys. 2021-12-10 10:06:51 -07:00
pyproject.toml Refactor test vectors into package 2022-01-13 02:46:20 +00:00
regenerate.sh Refactor test vectors into package 2022-01-13 02:46:20 +00:00
unified_address.py Refactor test vectors into package 2022-01-13 02:46:20 +00:00
unified_full_viewing_keys.py Refactor test vectors into package 2022-01-13 02:46:20 +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 either one of the scripts listed in pyproject.toml, or one of the Python files in the root directory.

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.