Commit Graph

14 Commits

Author SHA1 Message Date
Marek 6f896ef5a5
fix(doc): Fix the syntax of links in comments (#4494)
* Fix the syntax of links in comments

* Fix a mistake in the docs

Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>

* Remove unnecessary angle brackets from a link

* Revert the changes for links that serve as references

* Revert "Revert the changes for links that serve as references"

This reverts commit 8b091aa9fa.

* Remove `<` `>` from links that serve as references

This reverts commit 046ef25620.

* Don't use `<` `>` in normal comments

* Don't use `<` `>` for normal comments

* Revert changes for comments starting with `//`

Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
2022-05-30 20:12:11 +00:00
Deirdre Connolly eda83ebe0e
Async Halo2 verifier service (#2645)
* First pass at async Halo2 verification service

Stubs out a batch verifier for the future.
The dependencies for orchard, halo2, librustzcash, zcash_primitives, have
not been resolved.

* Halo2 verifier service and test

* Remove redundant conversion

* Test async halo2 verifier service with pre-computed Orchard shielded data test vectors

* Fix typo

Co-authored-by: Conrado Gouvea <conrado@zfnd.org>

* Assert future result is_ok() in Halo2 verifier test

Co-authored-by: Janito Vaqueiro Ferreira Filho <janito.vff@gmail.com>

* Shorten tower::Service trait constraints for Halo2 verifier tests

* Remove commented out trait constraints

* .expect() vs .unwrap() to parse orchard::redpallas::VerificationKey

* Use .to_vec() for some test vectors

* Fix self-referential Display impl

* Fix deps

* Distinguish orchard vs zebra_chain::orchard imports

* Add test that halo2 verifier fails with malformed proof inputs

* Use thiserror for Halo2Error

* Use ZcashFoundation/orchard instead of dconnolly/orchard

* Add a link to the issue to remove the zfnd fork of orchard crate

* Update zebra-consensus/Cargo.toml

Co-authored-by: teor <teor@riseup.net>

* Add note

* Move artificial Orchard shielded data test vectors to zebra-test

* Align brackets

* Tidy some trait constraints and debug statements

Co-authored-by: Janito Vaqueiro Ferreira Filho <janito.vff@gmail.com>

Co-authored-by: Conrado Gouvea <conrado@zfnd.org>
Co-authored-by: Janito Vaqueiro Ferreira Filho <janito.vff@gmail.com>
Co-authored-by: teor <teor@riseup.net>
2021-11-17 13:26:15 +10:00
Conrado Gouvea 6570ebeeb8
ZIP 212: validate Sapling and Orchard output of coinbase transactions (#3029)
* Part of ZIP 212: validate Sapling and Orchard output of coinbase transactions

* Add Orchard test vector

* Revert accidentally deleted link

* Apply suggestions from code review

Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>

* Use height from loop

* Apply suggestions from code review

Co-authored-by: Deirdre Connolly <deirdre@zfnd.org>

* Fix formatting

Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
Co-authored-by: Deirdre Connolly <deirdre@zfnd.org>
2021-11-11 22:18:37 +00:00
teor 2f0f379a9e
Standardise clippy lints and require docs (#2238)
* Standardise lints across Zebra crates, and add missing docs

The only remaining module with missing docs is `zebra_test::command`

* Todo -> TODO

* Clarify what a transcript ErrorChecker does

Also change `Error` -> `BoxError`

* TransError -> ExpectedTranscriptError

* Output Descriptions -> Output descriptions
2021-06-04 08:48:40 +10:00
teor 3748623d92 Remove a redundant block header test vector 2020-10-28 21:24:28 -04:00
teor 1a7e43a31d Manually rustfmt code inside lazy_static! 2020-09-29 11:42:00 -04:00
teor 6f371f3436
Add block test vectors for each network upgrade (#1096)
* Move block test vectors into separate files
* Refactor block test vectors into their own module
* Remove some duplicate test vector data

* Add mainnet block test vectors for each network upgrade
* Add testnet block test vectors for each network upgrade

* Update the TEST_BLOCKS list
* Add basic tests using TEST_BLOCKS

* Ignore shell.nix
2020-09-28 12:42:06 +10:00
Alfredo Garcia 70597c1da3
Add testnet blocks to zebra_state (#770)
* add testnet blocks, use them in state tests

* remove mutex and just add more transcripts

Co-authored-by: Jane Lusby <jane@zfnd.org>
2020-08-04 13:39:32 -07:00
Alfredo Garcia 04b2eeedd0
Longer checkpoint gap test case (#643)
* create longer checkpoint test

* use futures unordered to syncronize background futures

Co-authored-by: Jane Lusby <jane@zfnd.org>
2020-07-13 09:29:21 -07:00
Alfredo Garcia 5d6a5ca329
Add consensus coinbase checks (#593)
* add coinbase check and test case

Co-authored-by: Jane Lusby <jane@zfnd.org>
2020-07-10 09:13:44 +10:00
Jane Lusby a733580fd8
add proptests for invalid forms of input (#550)
* add proptests for invalid forms of input

* apply proptests to each valid block we have

* start moving equihash logic to BlockHeader

* provide an error based interface

* cleanup logging in dependent crate

* use is_equihash_solution_valid everywhere

* switch to proper equihash crate branch
2020-07-07 11:01:02 -07:00
Alfredo Garcia db30e53470
Create a test for block size (#558)
* add block size limit test
* calculate max_transactions_in_block and max_inputs_in_tx
* abstract block generation
* move all test vectors to zebra-test
2020-07-07 10:37:32 +10:00
Alfredo Garcia d736355f9f
Add ZIP143 and ZIP243 test vectors (#585) 2020-07-03 09:45:40 +10:00
Henry de Valence e8561d8f9e rename zebra-test-vectors to zebra-test 2020-06-22 20:23:02 -07:00