Commit Graph

1700 Commits

Author SHA1 Message Date
teor 1d35c5a0b9 Enable the zebrad sync tests by default
If your test environment does not have DNS or network access, set the
ZEBRA_SKIP_NETWORK_TESTS environmental variable to disable these tests.
2020-10-21 00:58:08 -04:00
Deirdre Connolly 9549e180c0 Allow dead_code on parameters for now 2020-10-20 11:16:22 -04:00
Deirdre Connolly a7ef6f6a40 Allow dead_code for checkpoint::Verifier for now 2020-10-20 11:16:22 -04:00
Deirdre Connolly e796132057 Allow dead_code for the transaction::Request for now (mempool) 2020-10-20 11:16:22 -04:00
Henry de Valence eb43893de0 consensus: minimize API, clean docs
This reduces the API surface to the minimum required for functionality,
and cleans up module documentation.  The stub mempool module is deleted
entirely, since it will need to be redone later anyways.
2020-10-20 11:16:22 -04:00
Henry de Valence d4ce3eb054 consensus: improve docs
- remove no longer accurate documentation about transaction verifier;
- add description of the role of the crate.
2020-10-20 11:16:22 -04:00
Jane Lusby c0aa1b477e consensus: add #[source] attributes to chain errors 2020-10-20 11:16:22 -04:00
Jane Lusby 8a64c056fb consensus: integrate block, transaction Verifiers 2020-10-20 11:16:22 -04:00
Jane Lusby 4a36c4485a consensus: integrate script, transaction Verifiers 2020-10-20 11:16:22 -04:00
Henry de Valence 248c318906 consensus: sketch of transaction::Verifier
This squashes the previous sequence of commits to let us separate out
the structural skeleton (which unblocks other work and is not
consensus-critical) from the actual checks (which don't block other work
and are consensus-critical).

Co-authored-by: Deirdre Connolly <deirdre@zfnd.org>
2020-10-20 11:16:22 -04:00
Henry de Valence 9dc8d76d68 consensus: add stub groth16::Verifier
Co-authored-by: Deirdre Connolly <deirdre@zfnd.org>
2020-10-20 11:16:22 -04:00
Deirdre Connolly eb56666d30 chain: add ShieldedData::binding_verification_key() 2020-10-20 11:16:22 -04:00
Deirdre Connolly 5a78bbb6c9 Add nullifiers(), and note_commitments() to ShieldedData 2020-10-20 11:16:22 -04:00
Deirdre Connolly 97b6ba10cc Use redjubjub crate exported from zebra-chain in the redjubjub::Verifier 2020-10-20 11:16:22 -04:00
Deirdre Connolly f9de91716c Add docstrings for sighash 2020-10-20 11:16:22 -04:00
Deirdre Connolly db54a623b7 Export sighash::HashType 2020-10-20 11:16:22 -04:00
Deirdre Connolly 5df0ff4086 Add Clippy (stable) job and continue-on-error Clippy (nightly) job
Do not pass -- -D warnings to the Clippy (nightly) job

We do _not_ want the nightly job to fail on warnings.

Resolves #1156
2020-10-20 01:03:43 -04:00
dependabot[bot] 0856e5d654 build(deps): bump codecov/codecov-action from v1.0.13 to v1.0.14
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from v1.0.13 to v1.0.14.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Commits](https://github.com/codecov/codecov-action/compare/v1.0.13...7d5dfa54903bd909319c580a00535b483d1efcf3)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-19 10:59:44 -04:00
teor 8def574bc2 Activate the standard pull request template by default
Non-default pull request templates can be used via the CLI,
or a URL query parameter:
https://docs.github.com/en/free-pro-team@latest/github/managing-your-work-on-github/about-automation-for-issues-and-pull-requests-with-query-parameters
2020-10-17 17:20:41 -04:00
dependabot[bot] 2358091a37 build(deps): bump serde from 1.0.116 to 1.0.117
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.116 to 1.0.117.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.116...v1.0.117)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-16 15:26:00 -04:00
teor d9fbba8a55 Skip the sync tests when ZEBRA_SKIP_NETWORK_TESTS is set 2020-10-16 15:21:01 -04:00
teor e3e85f5dbd Add tests for TestDirExt
Some of these tests are ignored, because they trigger known TestDirExt
bugs. See #1140 for details.
2020-10-15 19:54:00 -04:00
teor 3e897722a6 Improve TestDirExt docs 2020-10-15 19:54:00 -04:00
teor 04ce907dbf Remove duplicate code in zebra_test::command 2020-10-15 19:54:00 -04:00
teor 32bbc19c6b Fix a timeout bug in zebra_test::command
And add tests for the command functionality.

Also document some remaining bugs (see #1140).
2020-10-15 19:54:00 -04:00
teor 92f0c934cf Add a sync acceptance test for the Testnet 2020-10-15 19:54:00 -04:00
teor efb9bfa5de
Merge pull request #1165 from teor2345/difficulty-tidy
Tidy some difficulty code
2020-10-16 06:50:08 +10:00
teor de04e76564 Reduce the equihash proptest run time
Reduce the default number of cases run by the equihash proptests,
so they run in under 10 seconds on my machine.

Set the PROPTEST_CASES env var to override the default.
2020-10-16 06:49:43 +10:00
teor 3da4fdb8db Reword more errors 2020-10-15 08:31:18 +10:00
teor c74a205ecf Reword error message
Co-authored-by: Jane Lusby <jlusby42@gmail.com>
2020-10-15 08:31:18 +10:00
teor e46df7ed5b Tidy up a use list 2020-10-15 08:31:18 +10:00
teor d09c310bbc Add failure tests for difficulty is valid 2020-10-15 08:31:18 +10:00
teor 4076402536 Add failure tests for coinbase is valid 2020-10-15 08:31:18 +10:00
teor 9e5cd23e42 Test difficulty is valid for all block test vectors 2020-10-15 08:31:18 +10:00
teor 54efea96cd Test coinbase is first for all block test vectors 2020-10-15 08:31:18 +10:00
teor 7ce3e2e43a Test equihash solution for all block test vectors 2020-10-15 08:31:18 +10:00
teor d241e0b3fc Test block time validity for all block test vectors 2020-10-15 08:31:18 +10:00
teor ea284a4d56 Rename a test function 2020-10-15 08:31:18 +10:00
teor 74d02a6f08 Keep block tests in the same order as check::* 2020-10-15 08:31:18 +10:00
teor c3a8fd3894 Check PoWLimit for difficulty threshold 2020-10-15 08:31:18 +10:00
teor 00de709dd8 impl From<U256> for ExpandedDifficulty 2020-10-15 08:31:18 +10:00
Jane Lusby e05103323e
Implement Async Script Verification RFC (#961)
This commit begins the process of integrating `zcash_script` with the rest of the system for verifying scripts while syncing the block chain. It does so by adding the necessary support for looking up UTXOs from the state service and implements the first parts of the `script::Verifier` for looking up the necessary UTXOs in the state and then generating the necessary call to `zcash_script` to verify the script itself.

Co-authored-by: teor <teor@riseup.net>
2020-10-14 14:06:32 -07:00
Alfredo Garcia 2d3c3bcc23 add systemd service file 2020-10-14 15:33:00 -04:00
dependabot[bot] 49042c5f78
build(deps): bump regex from 1.4.0 to 1.4.1 (#1159)
Bumps [regex](https://github.com/rust-lang/regex) from 1.4.0 to 1.4.1.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.4.0...1.4.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-14 12:10:48 -07:00
teor 351e5013ae
Expand the template testing section (#1157)
Based on team discussions
2020-10-14 12:08:52 -07:00
dependabot[bot] 15d0e127fd build(deps): bump structopt from 0.3.19 to 0.3.20
Bumps [structopt](https://github.com/TeXitoi/structopt) from 0.3.19 to 0.3.20.
- [Release notes](https://github.com/TeXitoi/structopt/releases)
- [Changelog](https://github.com/TeXitoi/structopt/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TeXitoi/structopt/compare/v0.3.19...v0.3.20)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-13 12:00:27 -04:00
dependabot[bot] f2d9d4fb87 build(deps): bump serde_json from 1.0.58 to 1.0.59
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.58 to 1.0.59.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.58...v1.0.59)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-13 12:00:03 -04:00
Deirdre Connolly 10da2873fd Set timeout-minutes per job 2020-10-12 18:39:33 -04:00
Deirdre Connolly 686071e023 Default all GitHub Actions jobs to timeout at 30 minutes
Resolves #1142
2020-10-12 18:39:33 -04:00
teor 40c745e540 Keep check.rs functions in alphabetical order 2020-10-13 08:11:11 +10:00