Commit Graph

381 Commits

Author SHA1 Message Date
dependabot[bot] be5c7fa7c9 Bump owo-colors from 3.0.0 to 3.0.1
Bumps [owo-colors](https://github.com/jam1garner/owo-colors) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/jam1garner/owo-colors/releases)
- [Commits](https://github.com/jam1garner/owo-colors/compare/v3.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: owo-colors
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-13 13:21:50 -04:00
dependabot[bot] 09f23cb2e0 Bump owo-colors from 2.1.0 to 3.0.0
Bumps [owo-colors](https://github.com/jam1garner/owo-colors) from 2.1.0 to 3.0.0.
- [Release notes](https://github.com/jam1garner/owo-colors/releases)
- [Commits](https://github.com/jam1garner/owo-colors/compare/v2.1.0...v3.0.0)

---
updated-dependencies:
- dependency-name: owo-colors
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-12 11:45:40 -04:00
dependabot[bot] 7a5f419cb6
Bump thiserror from 1.0.29 to 1.0.30 (#2856)
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.29 to 1.0.30.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.29...1.0.30)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Deirdre Connolly <deirdre@zfnd.org>
2021-10-11 20:36:44 +00:00
dependabot[bot] c8af72cd30
Bump tracing from 0.1.28 to 0.1.29 (#2836)
Bumps [tracing](https://github.com/tokio-rs/tracing) from 0.1.28 to 0.1.29.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-0.1.28...tracing-0.1.29)

---
updated-dependencies:
- dependency-name: tracing
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-06 21:27:04 +00:00
dependabot[bot] 4c02c55f94
Bump tracing-subscriber from 0.2.24 to 0.2.25 (#2838)
Bumps [tracing-subscriber](https://github.com/tokio-rs/tracing) from 0.2.24 to 0.2.25.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-subscriber-0.2.24...tracing-subscriber-0.2.25)

---
updated-dependencies:
- dependency-name: tracing-subscriber
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-07 06:41:27 +10:00
Pili Guerra a85e80a0ec
Update versions for zebra v1.0.0-alpha.18 release (#2828)
* Update versions for zebra v1.0.0-alpha.18 release

* WIP: Initial PR list

* Remove uninteresting version bumps from CHANGELOG

* Categorise and group PRs in CHANGELOG, removing uninteresting PRs

* Further refine and categorise changelog entries

* Fix tag url

* Final changes to CHANGELOG

* Add a changelog description

* Spacing

* Clarify and fix changelog PR descriptions

* Add PRs that are about to be merged

* More slight clarifications

* Spacing

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

Co-authored-by: teor <teor@riseup.net>
Co-authored-by: Janito Vaqueiro Ferreira Filho <janito.vff@gmail.com>
2021-10-05 23:22:31 -03:00
Janito Vaqueiro Ferreira Filho 339fefb6e6
Update shared NU5 dependencies, set the NU5 testnet activation network upgrade parameters (#2825)
* Check return value of zcash_script_new_precomputed_tx

* Set the NU5 testnet activation height to 1_590_000

* Apply suggestions from code review

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

* Update Nu5 constants to new values

* Update ZIP-244 test vectors for new branch ID

* Squashed commit of the following:

commit bdb120a249
Author: Deirdre Connolly <durumcrustulum@gmail.com>
Date:   Tue Oct 5 11:54:01 2021 -0400

    Use pallas::Base::from_str_vartime() in sinsemilla tests

commit e99fa49258
Author: Deirdre Connolly <durumcrustulum@gmail.com>
Date:   Tue Oct 5 11:45:24 2021 -0400

    Compiles

commit a520018114
Author: Deirdre Connolly <durumcrustulum@gmail.com>
Date:   Tue Oct 5 10:15:17 2021 -0400

    Incomplete upgrade of deps

* Squashed commit of the following:

commit 8d1b76ec5626517817c3a4d9f3950acc90a359df
Author: Janito Vaqueiro Ferreira Filho <janito.vff@gmail.com>
Date:   Tue Oct 5 04:02:26 2021 +0000

    Update `zcash_script` to support V5 transactions

    Use a newer version of `zcash_script` that has been updated to support
    V5 transactions.

commit 371233628ae61e0c25d6ba8f31d9dba42823becb
Author: Janito Vaqueiro Ferreira Filho <janito.vff@gmail.com>
Date:   Tue Oct 5 03:06:20 2021 +0000

    Update Zcash dependencies

    Update some Zcash crates:

    - `halo2`
    - `incrementalmerkletree' (patch version)
    - `orchard` (patch version)
    - `zcash_history` (patch version)
    - `zcash_note_encryption` (patch version)
    - `zcash_primitives` (patch version)

    And also update the `group` dependency so that the code remains
    compatible.

commit de5cf1ec40c3fc08670fc971cdf3e65e13d9f4c7
Author: Janito Vaqueiro Ferreira Filho <janito.vff@gmail.com>
Date:   Tue Oct 5 03:04:13 2021 +0000

    Update error message assertion

    Use the updated message for the expected error variant.

* Update `zcash_script` to support V5 transactions

Use a newer version of `zcash_script` that has been updated to support
V5 transactions.

Co-authored-by: Conrado Gouvea <conrado@zfnd.org>
Co-authored-by: teor <teor@riseup.net>
2021-10-06 11:08:41 +10:00
Conrado Gouvea eb99081a9a
Enable 'full' feature in tokio for zebra-test (#2809) 2021-09-30 22:19:36 +00:00
dependabot[bot] 0325ba9f1f
Bump pretty_assertions from 0.7.2 to 1.0.0 (#2805)
Bumps [pretty_assertions](https://github.com/colin-kiegel/rust-pretty-assertions) from 0.7.2 to 1.0.0.
- [Release notes](https://github.com/colin-kiegel/rust-pretty-assertions/releases)
- [Changelog](https://github.com/colin-kiegel/rust-pretty-assertions/blob/main/CHANGELOG.md)
- [Commits](https://github.com/colin-kiegel/rust-pretty-assertions/compare/v0.7.2...v1.0.0)

---
updated-dependencies:
- dependency-name: pretty_assertions
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: teor <teor@riseup.net>
2021-09-30 03:28:32 +00:00
Janito Vaqueiro Ferreira Filho 175ac99a42
Improve `MockService` ergonomics for sending error responses (#2810)
* Remove `std::error::Error` constraint

The generic `Error` type parameter doesn't have to implement the
standard `Error` trait, so having that constraint only unnecessarily
limits the types that can be used as an error for the service.

* Implement automatic conversion into `Error` type

Make the usage a little more ergonomic by not having to write manual
error type conversions.

* Add a documentation test for an error response

Show an example that responds to a call to the service with an error.

Co-authored-by: teor <teor@riseup.net>
2021-09-30 02:48:26 +00:00
dependabot[bot] bace79a76e Bump owo-colors from 2.0.0 to 2.1.0
Bumps [owo-colors](https://github.com/jam1garner/owo-colors) from 2.0.0 to 2.1.0.
- [Release notes](https://github.com/jam1garner/owo-colors/releases)
- [Commits](https://github.com/jam1garner/owo-colors/compare/v2.0.0...v2.1.0)

---
updated-dependencies:
- dependency-name: owo-colors
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-23 13:54:27 -04:00
Janito Vaqueiro Ferreira Filho b714b2b3b6
Create a helper `MockService` type to help with writing tests that use mock `tower::Service`s (#2748)
* Implement initial service mocking helpers

Adds a [`MockService`] type, which can be configured and built for usage
in unit tests or proptests. The mocked service can then be used to
intercept requests and respond indivdiually to them.

* Use `MockService in the `mempool::Crawler` test

Refactor it to remove the helper mock function, and use the new
`MockService` helper type.

* Use `MockService` in `CandidateSet` test vectors

Refactor to remove the manual mocking of the peer set service.

* Panic if a response is not sent by `MockService`

Change the current semantics to require all `MockService` usages to
respond to every intercepted request.

A `must_use` attribute was added to the `ResponseSender` so that the
compiler can warn when this doesn't happen.

* Allow generic error types in `MockService`

Replace the hard-coded `BoxError` as the `Service`'s error type with a
generic type parameter. This allows mocking services in locations that
require specific error types.

* Add a `ResponseSender::request` getter

Allow inspecting the request again before responding, and using
information from the request in the response.

Co-authored-by: Conrado Gouvea <conrado@zfnd.org>
2021-09-21 17:44:59 +00:00
dependabot[bot] de589f6b31 Bump tracing-subscriber from 0.2.22 to 0.2.24
Bumps [tracing-subscriber](https://github.com/tokio-rs/tracing) from 0.2.22 to 0.2.24.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-subscriber-0.2.22...tracing-subscriber-0.2.24)

---
updated-dependencies:
- dependency-name: tracing-subscriber
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-20 17:15:55 -04:00
dependabot[bot] d178e08986 Bump tracing from 0.1.27 to 0.1.28
Bumps [tracing](https://github.com/tokio-rs/tracing) from 0.1.27 to 0.1.28.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-0.1.27...tracing-0.1.28)

---
updated-dependencies:
- dependency-name: tracing
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-20 16:33:13 -04:00
dependabot[bot] 3e358dafd1 Bump tracing-subscriber from 0.2.21 to 0.2.22
Bumps [tracing-subscriber](https://github.com/tokio-rs/tracing) from 0.2.21 to 0.2.22.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-subscriber-0.2.21...tracing-subscriber-0.2.22)

---
updated-dependencies:
- dependency-name: tracing-subscriber
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-14 21:32:37 -04:00
dependabot[bot] 21af477a37 Bump tracing from 0.1.26 to 0.1.27
Bumps [tracing](https://github.com/tokio-rs/tracing) from 0.1.26 to 0.1.27.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-0.1.26...tracing-0.1.27)

---
updated-dependencies:
- dependency-name: tracing
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-14 21:01:01 -04:00
Conrado Gouvea 8971d62727
Update version strings for v1.0.0 alpha.17 release (#2750)
* Change versions for v1.0.0-alpha.17 release
2021-09-14 17:41:50 +00:00
dependabot[bot] b5a7618a16 Bump tracing-subscriber from 0.2.19 to 0.2.21
Bumps [tracing-subscriber](https://github.com/tokio-rs/tracing) from 0.2.19 to 0.2.21.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-subscriber-0.2.19...tracing-subscriber-0.2.21)

---
updated-dependencies:
- dependency-name: tracing-subscriber
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-13 14:27:54 -04:00
dependabot[bot] af8dd3e4b1 Bump thiserror from 1.0.28 to 1.0.29
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.28 to 1.0.29.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.28...1.0.29)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-06 15:41:24 -04:00
dependabot[bot] cdfc380d2b Bump thiserror from 1.0.25 to 1.0.28
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.25 to 1.0.28.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.25...1.0.28)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-31 22:19:04 -04:00
dependabot[bot] c9fbd0939f Bump futures from 0.3.15 to 0.3.17
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.15 to 0.3.17.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.15...0.3.17)

---
updated-dependencies:
- dependency-name: futures
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-31 18:08:51 -04:00
Pili Guerra f59d552721
Update versions for zebra v1.0.0-alpha.14 release (#2537)
Co-authored-by: teor <teor@riseup.net>
2021-07-29 19:42:21 +00:00
Pili Guerra 4bfcc916de
Update versions for v1.0.0 alpha.13 release (#2488)
* Update versions for v1.0.0-alpha.13 release

* Update Cargo.lock

Co-authored-by: teor <teor@riseup.net>
2021-07-15 08:52:55 -03:00
Conrado Gouvea 40e350c342
Always compute sighash with librustzcash (#2469)
* Always use librustzcash for sighash and remove old sighash code

Also added ZIP-143 test vectors

* Remove librustzcash_sighash test that is no longer needed
2021-07-09 09:55:08 +10:00
Conrado Gouvea 1c919fbabb
Fix bug in sighash for coinbase transactions (#2459) 2021-07-08 16:05:40 -03:00
Conrado Gouvea fdfa3cbdc6
Add ZIP-244 signature hash support (#2165)
* ZIP-244 sighash implementation using librustzcash

* ZIP-244: fix sighash test; add roundtrip test; update vectors

* Improvements from review; renamed sighash::Hash to SigHash
2021-07-07 08:27:10 +10:00
Conrado Gouvea dd645e7e0c
Add ZIP-0244 TxId Digest support (#2129)
* Add ZIP-0244 TxId Digest support

* Apply suggestions from code review

Co-authored-by: Janito Vaqueiro Ferreira Filho <janito.vff@gmail.com>
Co-authored-by: Deirdre Connolly <deirdre@zfnd.org>
2021-07-06 09:58:22 -03:00
Pili Guerra 515dc4bf5c
Update versions for Zebra v1.0.0 alpha.12 release (#2415)
* Update versions for zebra v1.0.0-alpha.12 release

* Update Cargo.lock

* Update release checklist with latest version changes to help keep track for future releases

* Remove reference to the fact that tower-fallback was not updated
2021-07-01 08:59:32 +01:00
Janito Vaqueiro Ferreira Filho f33923f12f
Create a shared Tokio runtime for tests (#2397)
* Add a `zebra_test::RUNTIME` shared runtime

Create a lazily instantiated Tokio runtime that can be shared by tests.

* Split tests that require a shared runtime

Split two tests that were previously in one because of the need to share
a single Tokio runtime. With the `zebra_test::RUNTIME`, they can now
share the runtime without having to be a single test.
2021-07-01 10:30:31 +10:00
teor 9cb7ee4d0e
Release Blocker? Disable IPv6 tests when $ZEBRA_SKIP_IPV6_TESTS is set (#2405)
* Disable IPv6 tests when $ZEBRA_SKIP_IPV6_TESTS is set

This allows users to disable IPv6 tests in environments where IPv6 is not
configured.

* Add network test env var constants

* Replace env strings with constants

fastmod '"ZEBRA_SKIP_NETWORK_TESTS"' zebra_test::net::ZEBRA_SKIP_NETWORK_TESTS
fastmod '"ZEBRA_SKIP_IPV6_TESTS"' zebra_test::net::ZEBRA_SKIP_IPV6_TESTS

* Add functions to skip network tests

* Replace test network env var checks with test function

fastmod --fixed-strings 'env::var_os(zebra_test::net::ZEBRA_SKIP_NETWORK_TESTS).is_some()' 'zebra_test::net::zebra_skip_network_tests()'
fastmod --fixed-strings 'env::var_os(zebra_test::net::ZEBRA_SKIP_IPV6_TESTS).is_some()' 'zebra_test::net::zebra_skip_ipv6_tests()'

* Remove redundant logging and use statements
2021-06-29 11:20:32 +10:00
dependabot[bot] df426cba9e build(deps): bump tracing-subscriber from 0.2.18 to 0.2.19
Bumps [tracing-subscriber](https://github.com/tokio-rs/tracing) from 0.2.18 to 0.2.19.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-subscriber-0.2.18...tracing-subscriber-0.2.19)

---
updated-dependencies:
- dependency-name: tracing-subscriber
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-28 11:25:55 -04:00
teor 0d5e5bec3c
Improve docs and panic messages for zebra_test::command (#2406) 2021-06-28 10:35:56 -03:00
teor bcd5f2c50d
Gossip dynamic local listener ports to peers (#2277)
* Gossip dynamically allocated listener ports to peers

Previously, Zebra would either gossip port `0`, which is invalid, or skip
gossiping its own dynamically allocated listener port.

* Improve "no configured peers" warning

And downgrade from error to warning, because inbound-only nodes are a
valid use case.

* Move random_known_port to zebra-test

* Add tests for dynamic local listener ports and the AddressBook

Co-authored-by: Janito Vaqueiro Ferreira Filho <janito.vff@gmail.com>
2021-06-23 07:59:06 +10:00
Pili Guerra 6396ac27d8
Update versions for zebra v1.0.0-alpha.11 release (#2334)
* Update versions for zebra v1.0.0-alpha.11 release

* Update Cargo.lock
2021-06-18 10:37:58 +01:00
teor 56ef08e385 Rewrite acceptance test matching
- Add a custom semver match for `zebrad` versions
- Prefer "line contains string" matches, so tests ignore minor changes
- Escape regex meta-characters when a literal string match is intended
- Rename test functions so they are more precise
- Rewrite match internals to remove duplicate code and enable custom matches
- Document match functions
2021-06-10 22:46:33 -04:00
Alfredo Garcia 96a1b661f0
Rate limit initial genesis block download retries, Credit: Equilibrium (#2255)
* implement and test a rate limit in `request_genesis()`
* add `request_genesis_is_rate_limited` test to sync
* add ensure_timeouts constraint for GENESIS_TIMEOUT_RETRY
* Suppress expected warning logs in zebrad tests

Co-authored-by: teor <teor@riseup.net>
2021-06-09 23:39:51 +00:00
teor c453fbf6f6
Add final sapling root test vectors (#2243)
* Add sapling final root test vectors

Also tidy some formatting and imports

* Doc: final sapling roots can be duplicated

* Reverse the byte order of final sapling root test vectors

This makes the test vectors match the byte order in the block header,
rather than the zcashd RPC responses.

* Ignore pre-sapling block header commitments

Previously, Zebra expected this reserved field to be all zeroes,
but some mainnet and testnet blocks had other values.

* Test structural and semantic validation of the block commitment field

History roots are excluded from these tests, because they require
contextual validation.
2021-06-04 10:31:47 -03: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
Pili Guerra e3d2ae0a8a
Update versions for zebra v1.0.0-alpha.9 release (#2196)
* Update versions for zebra v1.0.0-alpha.9 release

* Update Cargo.lock
2021-05-26 13:01:39 +02:00
teor 227757ae68 Clippy nightly: replace a "while let" with a "for" loop 2021-05-24 22:04:54 -04:00
dependabot[bot] f13831eaab
build(deps): bump thiserror from 1.0.24 to 1.0.25 (#2190)
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.24 to 1.0.25.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.24...1.0.25)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-24 20:41:21 +10:00
dependabot[bot] 55b2127ddc
build(deps): bump futures from 0.3.14 to 0.3.15 (#2144)
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.14 to 0.3.15.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.14...0.3.15)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-13 07:56:47 +10:00
Pili Guerra 500dc2e511
Update version strings for Zebra v1.0.0-alpha.8 release (#2136)
* Update versions for zebra v1.0.0-alpha.8 release

* Update tower-batch and tower-fallback version strings

* Update Cargo.lock
2021-05-12 14:27:36 +02:00
dependabot[bot] 5632d8cbb8
build(deps): bump tracing-subscriber from 0.2.17 to 0.2.18 (#2097)
Bumps [tracing-subscriber](https://github.com/tokio-rs/tracing) from 0.2.17 to 0.2.18.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-subscriber-0.2.17...tracing-subscriber-0.2.18)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-04 09:13:14 +10:00
dependabot[bot] 84aca7e78b build(deps): bump tracing from 0.1.25 to 0.1.26
Bumps [tracing](https://github.com/tokio-rs/tracing) from 0.1.25 to 0.1.26.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-0.1.25...tracing-0.1.26)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-03 17:05:49 -04:00
dependabot[bot] 1be56166b6 build(deps): bump regex from 1.4.5 to 1.4.6
Bumps [regex](https://github.com/rust-lang/regex) from 1.4.5 to 1.4.6.
- [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.5...1.4.6)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-23 09:38:51 -04:00
Pili Guerra ea1446ee92
Update version strings for Zebra v1.0.0-alpha.7 release (#2056)
* Update version strings for Zebra v1.0.0-alpha.7 release
2021-04-23 12:56:25 +00:00
dependabot[bot] 6f8a6a9bc0 build(deps): bump pretty_assertions from 0.7.1 to 0.7.2
Bumps [pretty_assertions](https://github.com/colin-kiegel/rust-pretty-assertions) from 0.7.1 to 0.7.2.
- [Release notes](https://github.com/colin-kiegel/rust-pretty-assertions/releases)
- [Changelog](https://github.com/colin-kiegel/rust-pretty-assertions/blob/main/CHANGELOG.md)
- [Commits](https://github.com/colin-kiegel/rust-pretty-assertions/compare/v0.7.1...v0.7.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-17 01:44:41 -04:00
dependabot[bot] 7d36a5e2c3 build(deps): bump color-eyre from 0.5.10 to 0.5.11
Bumps [color-eyre](https://github.com/yaahc/color-eyre) from 0.5.10 to 0.5.11.
- [Release notes](https://github.com/yaahc/color-eyre/releases)
- [Changelog](https://github.com/yaahc/color-eyre/blob/v0.5.11/CHANGELOG.md)
- [Commits](https://github.com/yaahc/color-eyre/compare/v0.5.10...v0.5.11)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-14 09:22:27 -04:00
dependabot[bot] e084d0f1dc build(deps): bump futures from 0.3.13 to 0.3.14
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.13 to 0.3.14.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.13...0.3.14)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-12 20:45:35 -04:00
Alfredo Garcia 5ec05e91e1 update version strings for v1.0.0-alpha.6 2021-04-08 18:48:34 -04:00
dependabot[bot] 4e754089a6 build(deps): bump owo-colors from 1.4.2 to 2.0.0
Bumps [owo-colors](https://github.com/jam1garner/owo-colors) from 1.4.2 to 2.0.0.
- [Release notes](https://github.com/jam1garner/owo-colors/releases)
- [Commits](https://github.com/jam1garner/owo-colors/compare/v1.4.2...v2.0.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-29 08:01:44 -04:00
dependabot[bot] 1c87372b03 build(deps): bump owo-colors from 1.3.0 to 1.4.2
Bumps [owo-colors](https://github.com/jam1garner/owo-colors) from 1.3.0 to 1.4.2.
- [Release notes](https://github.com/jam1garner/owo-colors/releases)
- [Commits](https://github.com/jam1garner/owo-colors/commits/v1.4.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-26 14:47:11 -04:00
Deirdre Connolly ca1d2de87d
Bump versions for v1.0.0-alpha.5 (#1932)
Zebra's latest alpha checkpoints on Canopy activation, continues our work on NU5, and fixes a security issue.

Some notable changes include:

## Added
- Log address book metrics when PeerSet or CandidateSet don't have many peers (#1906)
- Document test coverage workflow (#1919)
- Add a final job to CI, so we can easily require all the CI jobs to pass (#1927)

## Changed
- Zebra has moved its mandatory checkpoint from Sapling to Canopy (#1898, #1926)
  - This is a breaking change for users that depend on the exact height of the mandatory checkpoint.

## Fixed
- tower-batch: wake waiting workers on close to avoid hangs (#1908)
- Assert that pre-Canopy blocks use checkpointing (#1909)
- Fix CI disk space usage by disabling incremental compilation in coverage builds (#1923)

## Security
- Stop relying on unchecked length fields when preallocating vectors (#1925)
2021-03-22 22:05:01 -04:00
dependabot[bot] 20a05df58f build(deps): bump regex from 1.4.3 to 1.4.5
Bumps [regex](https://github.com/rust-lang/regex) from 1.4.3 to 1.4.5.
- [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.3...1.4.5)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-16 21:02:15 -04:00
Alfredo Garcia d49eaab68e
Bump versions for zebrad 1.0.0-alpha.4 (#1913)
* Bump versions for zebrad 1.0.0-alpha.4

* add Cargo.lock
2021-03-16 21:12:37 -03:00
teor 9c0c2f0848 Add Testnet Post-Halving block test vectors 2021-03-16 12:39:07 -04:00
teor 8444b78e01 Add Mainnet Canopy block test vectors
Including one block that just happened to be 72 kB, in binary format.
2021-03-16 12:39:07 -04:00
dependabot[bot] b618f5b522 build(deps): bump tracing-subscriber from 0.2.16 to 0.2.17
Bumps [tracing-subscriber](https://github.com/tokio-rs/tracing) from 0.2.16 to 0.2.17.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-subscriber-0.2.16...tracing-subscriber-0.2.17)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-14 19:37:24 -04:00
dependabot[bot] d1ab8e9cf4 build(deps): bump pretty_assertions from 0.6.1 to 0.7.1
Bumps [pretty_assertions](https://github.com/colin-kiegel/rust-pretty-assertions) from 0.6.1 to 0.7.1.
- [Release notes](https://github.com/colin-kiegel/rust-pretty-assertions/releases)
- [Changelog](https://github.com/colin-kiegel/rust-pretty-assertions/blob/main/CHANGELOG.md)
- [Commits](https://github.com/colin-kiegel/rust-pretty-assertions/compare/v0.6.1...v0.7.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-09 03:59:28 -05:00
dependabot[bot] 57745facf6 build(deps): bump hex from 0.4.2 to 0.4.3
Bumps [hex](https://github.com/KokaKiwi/rust-hex) from 0.4.2 to 0.4.3.
- [Release notes](https://github.com/KokaKiwi/rust-hex/releases)
- [Commits](https://github.com/KokaKiwi/rust-hex/compare/v0.4.2...v0.4.3)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-04 14:44:12 -05:00
teor e1002ce2ce Test checkpoints on mainnet and testnet 2021-03-04 08:06:31 +10:00
teor 895bb43ead Clippy: Fix inconsistent struct member orders lint 2021-03-01 23:31:18 -05:00
dependabot[bot] bf1e2bd3b8
build(deps): bump tracing from 0.1.24 to 0.1.25 (#1815)
Bumps [tracing](https://github.com/tokio-rs/tracing) from 0.1.24 to 0.1.25.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-0.1.24...tracing-0.1.25)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-25 09:28:26 +10:00
dependabot[bot] 7b675bbd73 build(deps): bump futures from 0.3.12 to 0.3.13
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.12 to 0.3.13.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.12...0.3.13)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-23 16:09:53 -05:00
teor 7558f74c78 Bump versions for zebrad 1.0.0-alpha.3 2021-02-23 10:39:13 -05:00
dependabot[bot] 304d7682f5 build(deps): bump tracing-subscriber from 0.2.15 to 0.2.16
Bumps [tracing-subscriber](https://github.com/tokio-rs/tracing) from 0.2.15 to 0.2.16.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-subscriber-0.2.15...tracing-subscriber-0.2.16)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-22 01:38:42 -05:00
teor d4915c18e7
Fix inverted was_killed logic (#1779)
Also improve the error messages and code structure.
2021-02-20 06:26:00 +10:00
teor b0bc4a79c9 Disable conflict failure cleanup on macOS 2021-02-20 06:22:11 +10:00
dependabot[bot] 7bba67d97b build(deps): bump thiserror from 1.0.23 to 1.0.24
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.23 to 1.0.24.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.23...1.0.24)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-19 14:54:40 -05:00
teor c51fd688ee Skip node2.is_running() on Windows
`node2.is_running()` can return `true` on Windows, even though `node2`
has logged a panic. This cleanup code only runs if `node2` fails to panic
and exit as expected. So it's ok for us to skip it.

See #1781 for details.
2021-02-19 18:03:07 +10:00
teor 631fe22422 Fix conflict test node termination
On Windows, if a process is killed after it is dead, it returns `true`
for `was_killed`. Instead, check if the process is running before killing
it.

Also make the section where processes are running as short as possible,
and include context for both processes in every error.
2021-02-19 18:03:07 +10:00
dependabot[bot] f19ef44493 build(deps): bump tracing from 0.1.23 to 0.1.24
Bumps [tracing](https://github.com/tokio-rs/tracing) from 0.1.23 to 0.1.24.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-0.1.23...tracing-0.1.24)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-18 22:21:49 -05:00
teor bcb9cead88
Kill running acceptance test nodes on error (#1770)
And show the output from those nodes.

These changes help us diagnose errors that happen while one or more
acceptance test nodes are running.
2021-02-19 06:46:27 +10:00
Deirdre Connolly 0c5daa8410 Bump versions for zebrad 1.0.0-alpha.2
Including tower-batch bump to 0.2.0, tower-fallback to 0.2.0, zebra-script to 1.0.0-alpha.3
2021-02-09 16:14:29 -05:00
dependabot[bot] b3a3b8f7c7 build(deps): bump tracing from 0.1.22 to 0.1.23
Bumps [tracing](https://github.com/tokio-rs/tracing) from 0.1.22 to 0.1.23.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-0.1.22...tracing-0.1.23)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-05 12:26:52 -05:00
dependabot[bot] db9850afd5 build(deps): bump owo-colors from 1.2.1 to 1.3.0
Bumps [owo-colors](https://github.com/jam1garner/owo-colors) from 1.2.1 to 1.3.0.
- [Release notes](https://github.com/jam1garner/owo-colors/releases)
- [Commits](https://github.com/jam1garner/owo-colors/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-29 21:05:54 -05:00
Alfredo Garcia 4b34482264
Add hints to port conflict and lock file panics (#1535)
* add hint for port error
* add issue filter for port panic
* add lock file hint
* add metrics endpoint port conflict hint
* add hint for tracing endpoint port conflict
* add acceptance test for resource conflics
* Split out common conflict test code into a function
* Add state, metrics, and tracing conflict tests

* Add a full set of stderr acceptance test functions

This change makes the stdout and stderr acceptance test interfaces
identical.

* move Zcash listener opening
* add todo about hint for disk full
* add constant for lock file
* match path in state cache
* don't match windows cache path

* Use Display for state path logs

Avoids weird escaping on Windows when using Debug

* Add Windows conflict error messages

* Turn PORT_IN_USE_ERROR into a regex

And add another alternative Windows-specific port error

Co-authored-by: teor <teor@riseup.net>
Co-authored-by: Jane Lusby <jane@zfnd.org>
2021-01-29 22:36:33 +10:00
Deirdre Connolly 1b09538277
Bump versions for zebrad 1.0.0-alpha.1 (#1646)
* Bump versions where appropriate

Tested with cargo install --locked --path etc

* Remove fixed panics from 'Known Issues'

* Change to alpha release series in the README

Co-authored-by: teor <teor@riseup.net>
2021-01-27 20:31:39 -05:00
teor 49e6150427 Use collect() to avoid a lint 2021-01-19 11:02:20 -05:00
teor 258789ed9b Use the rustc unknown lints attribute
The clippy unknown lints attribute was deprecated in
nightly in rust-lang/rust#80524. The old lint name now produces a
warning.

Since we're using `allow(unknown_lints)` to suppress warnings, we need to
add the canonical name, so we can continue to build without warnings on
nightly.

But we also need to keep the old name, so we can continue to build
without warnings on stable.

And therefore, we also need to disable the "removed lints" warning,
otherwise we'll get warnings about the old name on nightly.

We'll need to keep this transitional clippy config until rustc 1.51 is
stable.
2021-01-19 11:02:20 -05:00
dependabot[bot] 75b510a9f6 build(deps): bump futures from 0.3.11 to 0.3.12
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.11 to 0.3.12.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.11...0.3.12)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-17 15:42:13 -05:00
dependabot[bot] 68e2942f83 build(deps): bump futures from 0.3.9 to 0.3.11
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.9 to 0.3.11.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.9...0.3.11)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-15 08:46:33 -05:00
teor 730910cd99 Upgrade to tokio 0.3.6 from crates.io
And remove the tokio git dependency patch
2021-01-12 15:37:27 -05:00
dependabot[bot] 21e92f6392 build(deps): bump futures from 0.3.8 to 0.3.9
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.8 to 0.3.9.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.8...0.3.9)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-12 02:13:02 -05:00
dependabot[bot] 836c74ae16 build(deps): bump regex from 1.4.2 to 1.4.3
Bumps [regex](https://github.com/rust-lang/regex) from 1.4.2 to 1.4.3.
- [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.2...1.4.3)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-11 20:47:32 -05:00
dependabot[bot] f2a21ac67c build(deps): bump thiserror from 1.0.22 to 1.0.23
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.22 to 1.0.23.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.22...1.0.23)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-28 16:17:00 -05:00
Henry de Valence 0842eb2dab
zebra: move to 1.x-based versioning. (#1476)
Previously we set the crate versions to 3.x, so that the major version was
aligned with the NU version.  But we want to be able to make API changes
independently of the NU schedule.
2020-12-08 08:53:07 +10:00
teor 5b687f878a Remove unused dependencies found using cargo-udeps 2020-12-05 14:53:28 -05:00
teor b4a50fd99f
Downgrade tokio to 0.3.4 to avoid a time wheel panic (#1453)
See tokio-rs/tokio#2789 for details. We were seeing this panic during
normal operation, not just at shutdown.
2020-12-04 13:52:37 +10:00
dependabot[bot] 8c052cc39a build(deps): bump color-eyre from 0.5.9 to 0.5.10
Bumps [color-eyre](https://github.com/yaahc/color-eyre) from 0.5.9 to 0.5.10.
- [Release notes](https://github.com/yaahc/color-eyre/releases)
- [Changelog](https://github.com/yaahc/color-eyre/blob/v0.5.10/CHANGELOG.md)
- [Commits](https://github.com/yaahc/color-eyre/compare/v0.5.9...v0.5.10)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-03 10:55:16 -05:00
Jane Lusby d7bef1c155
bump color-eyre version to avoid a panic when printing spantraces (#1438) 2020-12-02 14:16:18 -08:00
dependabot[bot] 6a075ed4b2 build(deps): bump owo-colors from 1.1.3 to 1.2.0
Bumps [owo-colors](https://github.com/jam1garner/owo-colors) from 1.1.3 to 1.2.0.
- [Release notes](https://github.com/jam1garner/owo-colors/releases)
- [Commits](https://github.com/jam1garner/owo-colors/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-02 10:25:16 -08:00
teor 92eb92d1dd
Disable the nightly clippy unnecessary_wraps lint (#1403)
It seems to be a bit broken - some of our functions return `Result` for
consistency with similar functions. But the lint picks them up anyway.
2020-12-01 12:20:57 +10:00
Henry de Valence 4fa119dd1f chain: fix consensus-critical coinbase encoding bug
The `CoinbaseData` parses the block height separately from the rest of the
free-form coinbase data.  However, it had two bugs:

1. It did not require that the height was canonically encoded;
2. Its canonical encoding was incorrect relative to the BIP34-inherited encoding.

This meant that we computed some transaction hashes incorrectly, because when
we re-serialized the coinbase transaction, we would canonically serialize the
coinbase transaction (using the incorrect definition of canonical, bug 2).  And
we didn't notice that the wrong definition of canonical encoding was being used
because we accepted what we thought were non-canonically encoded heights.

The relevant rules are here: 877212414a/src/script/script.h (L307-L346)

This commit changes the encoding to reject non-canonically encoded heights, and
to match the correct encoding rules.  We check that at least one
non-canonically encoded height is correctly rejected using a new test vector.

The database format increments because we saved a bunch of wrongly encoded blocks.

This discrepancy was originally noticed by @teor2345, who pointed out that a
previous version of the block 202 test vector (now preserved as "bad block
202") did not match the block from zcashd.
2020-12-01 10:14:44 +10:00
Henry de Valence f7baee77ff test: add mainnet block 202 test vector 2020-12-01 10:14:44 +10:00
Jane Lusby 99c5acc94f rename test fn 2020-11-24 11:04:30 -05:00
Jane Lusby 17fdbe941b fix stdout issue with test framework for cached data tests 2020-11-24 11:04:30 -05:00
Jane Lusby 9fd38f29b4 further make use statement consistent 2020-11-24 11:04:30 -05:00
Jane Lusby a21ddfeefc fix use cfg 2020-11-24 11:04:30 -05:00
Jane Lusby 4bfe747f34 update acceptance tests 2020-11-24 11:04:30 -05:00
dependabot[bot] e832f70c2c build(deps): bump tracing from 0.1.21 to 0.1.22
Bumps [tracing](https://github.com/tokio-rs/tracing) from 0.1.21 to 0.1.22.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-0.1.21...tracing-0.1.22)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-24 10:55:53 -05:00
dependabot[bot] a4af90c2b0 build(deps): bump color-eyre from 0.5.7 to 0.5.8
Bumps [color-eyre](https://github.com/yaahc/color-eyre) from 0.5.7 to 0.5.8.
- [Release notes](https://github.com/yaahc/color-eyre/releases)
- [Changelog](https://github.com/yaahc/color-eyre/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yaahc/color-eyre/compare/v0.5.7...v0.5.8)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-24 09:59:22 -05:00
Deirdre Connolly 902c6f6b29 Remove test attributes and allow(dead_code) for command timeout tests that exercise currently broken properties 2020-11-21 05:40:25 -05:00
Henry de Valence add94c1c45 deps: move to tokio 0.3, tower 0.4
This change is mostly mechanical, with the exception of the changes to the
`tower-batch` middleware.  This middleware was adapted from `tower::buffer`,
and the `tower::buffer` code was changed to implement its own bounded queue,
because Tokio 0.3 removed the `mpsc::Sender::poll_send` method.  See

ddc64e8d4d

for more context on the Tower changes.  To match Tower as closely as possible
in order to be able to upstream `tower-batch`, those changes are copied from
`tower::Buffer` to `tower-batch`.
2020-11-20 10:08:16 -08:00
teor 54cb9277ef Allow some new clippy nightly lints 2020-11-17 10:07:37 +10:00
Jane Lusby 7403897fda
Add transcript tests as described in the state service tracking issue (#1281)
* Add transcript test for requests while state is empty

* Add happy path test for each query once the state is populated

* let populate logic handle out of order blocks
2020-11-13 10:19:47 -08:00
teor 92dd16c114 Add minimum difficulty testnet block vectors 2020-11-12 12:30:54 +10:00
Alfredo Garcia 128643d81e
Call `zebra_test::init` where needed. (#1227)
* Add missing `zebra_test::init()` to zebra-chain
* Add missing `zebra_test::init()` to zebra-consensus
* Add missing `zebra_test::init()` to zebra-network
* Add missing `zebra_test::init()` to zebra-state
* Add missing `zebra_test::init()` to zebra-test
* Add missing `zebra_test::init()` to zebrad
2020-11-10 10:29:25 +10:00
dependabot[bot] a58299a0f0 build(deps): bump color-eyre from 0.5.6 to 0.5.7
Bumps [color-eyre](https://github.com/yaahc/color-eyre) from 0.5.6 to 0.5.7.
- [Release notes](https://github.com/yaahc/color-eyre/releases)
- [Changelog](https://github.com/yaahc/color-eyre/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yaahc/color-eyre/compare/v0.5.6...v0.5.7)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-09 08:40:55 -05:00
dependabot[bot] 1e3cf6dc5c build(deps): bump tracing-subscriber from 0.2.14 to 0.2.15
Bumps [tracing-subscriber](https://github.com/tokio-rs/tracing) from 0.2.14 to 0.2.15.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-subscriber-0.2.14...tracing-subscriber-0.2.15)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-04 20:37:40 -05:00
dependabot[bot] e87340594a build(deps): bump thiserror from 1.0.21 to 1.0.22
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.21 to 1.0.22.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.21...1.0.22)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-04 19:28:42 -05:00
dependabot[bot] 2442cf162f build(deps): bump regex from 1.4.1 to 1.4.2
Bumps [regex](https://github.com/rust-lang/regex) from 1.4.1 to 1.4.2.
- [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.1...1.4.2)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-02 17:01:21 -05:00
teor 3748623d92 Remove a redundant block header test vector 2020-10-28 21:24:28 -04:00
teor ea510b7d41
Run a block sync in CI with 2 large checkpoints (#1193)
* Run large checkpoint sync tests in CI
* Improve test child output match error context
* Add a debug_stop_at_height config
* Use stop at height in acceptance tests

And add some restart acceptance tests, to make sure the stop at
height feature works correctly.
2020-10-27 19:25:29 +10:00
dependabot[bot] 83c844abb5 build(deps): bump futures from 0.3.6 to 0.3.7
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.6 to 0.3.7.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.6...0.3.7)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-27 02:28:48 -04:00
dependabot[bot] ff51c2e0c0 build(deps): bump tracing-subscriber from 0.2.13 to 0.2.14
Bumps [tracing-subscriber](https://github.com/tokio-rs/tracing) from 0.2.13 to 0.2.14.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-subscriber-0.2.13...tracing-subscriber-0.2.14)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-23 15:02:02 -04:00
teor 17a3612b36 Remove a redundant condition in expect_stdout
When the loop exits, either the process has stopped running,
or the deadline has passed.

If the process is still running, we want to kill it.
2020-10-21 00:58:08 -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
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
dependabot[bot] 766baea9d8
build(deps): bump regex from 1.3.9 to 1.4.0 (#1150)
Bumps [regex](https://github.com/rust-lang/regex) from 1.3.9 to 1.4.0.
- [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.3.9...1.4.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-12 13:27:26 -07:00
dependabot[bot] 76e7e3d714 build(deps): bump tracing-subscriber from 0.2.12 to 0.2.13
Bumps [tracing-subscriber](https://github.com/tokio-rs/tracing) from 0.2.12 to 0.2.13.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-subscriber-0.2.12...tracing-subscriber-0.2.13)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-08 15:09:32 -04:00
dependabot[bot] 1b7bf61f96 build(deps): bump thiserror from 1.0.20 to 1.0.21
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.20 to 1.0.21.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.20...1.0.21)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-07 18:25:33 -04:00
teor 3820eddef7
Shielded coinbase test blocks (#1116)
* Add shielded coinbase block test vectors

* Add a large block test vector in binary format
2020-10-06 16:35:41 -07:00
dependabot[bot] 08f363e1cb build(deps): bump futures from 0.3.5 to 0.3.6
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.5 to 0.3.6.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.5...0.3.6)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-06 16:54:08 -04:00
dependabot[bot] d769f62a73 build(deps): bump color-eyre from 0.5.5 to 0.5.6
Bumps [color-eyre](https://github.com/yaahc/color-eyre) from 0.5.5 to 0.5.6.
- [Release notes](https://github.com/yaahc/color-eyre/releases)
- [Changelog](https://github.com/yaahc/color-eyre/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yaahc/color-eyre/compare/v0.5.5...v0.5.6)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-05 11:26:23 -04:00
Jane Lusby 86ed13060f
Add tests for `Chain` implementation (#1093)
* Begin work on RFC5 implementation

* I think this is necessary

* holy shit supertrait implemented via subtrait

* implement most of the chain functions

* change to slightly better name

* implement fork

* fix outpoint handling in Chain struct

* update expect for work

* resolve review comment

* split utxo into two sets

* update the Chain definition

* just a little more

* update comment

* Apply suggestions from code review

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

* apply changes from code review

* remove allow attribute in zebra-state/lib.rs

* Update zebra-state/src/memory_state.rs

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

* merge ChainSet type into MemoryState

* rename state impl types

* Add error messages to asserts

* checkpoint so I can split off arbitrary changes into a PR

* export proptest impls for use in downstream crates

* add testjob for disabled feature in zebra-chain

* run rustfmt

* try to fix github actions syntax

* differentiate name

* prove that github action tests zebra-chain build without features

* revert change from last commit now that test is running

* remove accidentally introduced newline

* checkpoint

* add module doc comment

* update RFC for utxos

* add missing header

* working proptest for Chain

* apply change from chain impl PR

* setup config for proptests

* Update zebra-chain/src/block/arbitrary.rs

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

* run rustfmt

Co-authored-by: teor <teor@riseup.net>
2020-10-02 15:51:51 -07:00
teor 41b985ee0b Block test vector comment updates 2020-09-30 07:27:16 +10:00
teor 1a7e43a31d Manually rustfmt code inside lazy_static! 2020-09-29 11:42:00 -04:00
teor 58041d8a49 Rename TEST_BLOCKS to BLOCKS
To avoid confusion with TESTNET_BLOCKS.

Automated search and replace, made using this script:

sed -i 's/TEST_BLOCKS/BLOCKS/' \
  $(grep -r TEST_BLOCKS zebra* | cut -d: -f1 | sort -u)
2020-09-29 11:42:00 -04:00
teor a35f36dd0b Split TEST_BLOCKS into mainnet and testnet
And add some basic tests to make sure:
* the heights are correct
* the lists aren't truncated or empty
2020-09-29 11:42:00 -04:00
dependabot[bot] 15c5365ca7 build(deps): bump tracing from 0.1.19 to 0.1.21
Bumps [tracing](https://github.com/tokio-rs/tracing) from 0.1.19 to 0.1.21.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-0.1.19...tracing-0.1.21)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-29 11:01:34 -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
Jane Lusby 0b4e974c9e
export proptest impls for use in downstream crates (#1092)
* export proptest impls for use in downstream crates

* add testjob for disabled feature in zebra-chain

* run rustfmt

* try to fix github actions syntax

* differentiate name

* prove that github action tests zebra-chain build without features

* revert change from last commit now that test is running

* remove accidentally introduced newline

* Update .github/workflows/ci.yml

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

Co-authored-by: Deirdre Connolly <deirdre@zfnd.org>
2020-09-23 18:52:52 -07:00
Henry de Valence 6dd7318d3b deps: use Tower 0.4 from git instead of 0.3.1.
This addresses at least three pain points:

- we were affected by bugs that were already fixed in git, but not in
  the released crate;
- we can use service combinators to transform requests and responses;
- we can use the hedge middleware.

The version in git is still marked as 0.3.1 but these changes will be
part of tower 0.4: https://github.com/tower-rs/tower/issues/431
2020-09-21 14:16:56 -07:00
Jane Lusby bd861fd25e
update panic hook for zebra-test to supress confusing output (#1065)
* update panic hook for zebra-test to supress confusing output

* remove outdated comment
2020-09-17 13:20:30 -07:00
dependabot[bot] b441e2cfa5 build(deps): bump color-eyre from 0.5.2 to 0.5.3
Bumps [color-eyre](https://github.com/yaahc/color-eyre) from 0.5.2 to 0.5.3.
- [Release notes](https://github.com/yaahc/color-eyre/releases)
- [Changelog](https://github.com/yaahc/color-eyre/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yaahc/color-eyre/compare/v0.5.2...v0.5.3)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-15 08:04:06 -04:00
teor 2c6287abcb Remove an unused zebra-test dependency on tempdir 2020-09-14 23:06:58 -04:00
dependabot[bot] ba32d27f6e
build(deps): bump tracing-subscriber from 0.2.11 to 0.2.12 (#1059)
Bumps [tracing-subscriber](https://github.com/tokio-rs/tracing) from 0.2.11 to 0.2.12.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-subscriber-0.2.11...tracing-subscriber-0.2.12)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-14 13:49:07 -07:00
Jane Lusby a7b418bfe5
Add test for first checkpoint verification (#1018)
* add test for first checkpoint sync

Prior this this change we've not had any tests that verify our sync /
network logic is well behaved. This PR cleans up the test helper code to
make error reports more consistent and uses this cleaned up API to
implement a checkpoint sync test which runs zebrad until it reads the
first checkpoint event from stdout.

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

* move include out of unix cfg

Co-authored-by: teor <teor@riseup.net>
2020-09-11 13:39:39 -07:00
Jane Lusby ffdec0cb23
Remove in-memory state service (#974)
* Remove in-memory state service

* make the config compatible with toml again

* checkpoint commit to see how much I still have to revert

* back to the starting point...

* remove unused dependency

* reorganize error handling a bit

* need to make a new color-eyre release now

* reorder again because I have problems

* remove unnecessary helpers

* revert changes to config loading

* add back missing space

* Switch to released color-eyre version

* add back missing newline again...

* improve error message on unix when terminated by signal

* add context to last few asserts in acceptance tests

* instrument some of the helpers

* remove accidental extra space

* try to make this compile on windows

* reorg platform specific code

* hide on_disk module and fix broken link
2020-09-01 12:39:04 -07:00
Ramana Venkata 991c70723a zebrad: Create zebrad.toml in acceptance tests from ZebradConfig
Fixes #929
2020-08-23 21:24:19 -04:00
Alfredo Garcia d349f2bbc2
Refactor acceptance serialized_tests (#920)
* add network listening address to default config
2020-08-20 07:48:22 +10:00
Jane Lusby 1d6183ef84
Make zebra-script wrap the C++ script implementation in zcashconsensus (#708)
* attempt to use zcashconsensus crate in zebra-script

* boop

* update verify fn to use zebra types

* a bit more cleanup

* cleanup

* more

* beep boop

* fix renamed member

* cleaning

* get a real branch id

* remove as of yet unneeded api

* Update zebra-chain/src/transaction.rs

* Update zebra-chain/src/transaction.rs

* more cleanup

* oops wrong dep section

* use a tuple to communicate arg association

* update to use published version of zcash_script

* fix new compiler error

* install llvm on windows

* fix bindgen bug????

* try to get docker file to win

* okay try everything

* fix windows build maybe

* always download choco

* fix paths for moved types

* try a different error message

* try convenience script

* try installing just llvm

* add back one more

* try installing some headers

* try a diff package

* try everything

* remove the minimum

* try newer docker builder image

* cleanup docker image

* cleanup extra ci step
2020-08-18 11:08:53 -07:00
Alfredo Garcia e73f976194
Valid generated config acceptance test (#859)
* add valid generated config test

* change to pathbuf

* use -c to make sure we are using the generated file

* add and use a ZebraTestDir type

* change approach to generate tempdir in top of each test

* pass tempdir to test_cmd and set current dir to it

* add and use a `generated_config_path` variable in tests
2020-08-13 13:31:13 -07:00
Henry de Valence a79ce97957
Fix sync algorithm. (#887)
* checkpoint: reject older of duplicate verification requests.

If we get a duplicate block verification request, we should drop the older one
in favor of the newer one, because the older request is likely to have been
canceled.  Previously, this code would accept up to four duplicate verification
requests, then fail all subsequent ones.

* sync: add a timeout layer to block requests.

Note that if this timeout is too short, we'll bring down the peer set in a
retry storm.

* sync: restart syncing on error

Restart the syncing process when an error occurs, rather than ignoring it.
Restarting means we discard all tips and start over with a new block locator,
so we can have another chance to "unstuck" ourselves.

* sync: additional debug info

* sync: handle lookahead limit correctly.

Instead of extracting all the completed task results, the previous code pulled
results out until there were fewer tasks than the lookahead limit, then
stopped.  This meant that completed tasks could be left until the limit was
exceeded again.  Instead, extract all completed results, and use the number of
pending tasks to decide whether to extend the tip or wait for blocks to finish.

* network: add debug instrumentation to retry policy

* sync: instrument the spawned task

* sync: streamline ObtainTips/ExtendTips logic & tracing

This change does three things:

1.  It aligns the implementation of ObtainTips and ExtendTips so that they use
the same deduplication method.  This means that when debugging we only have one
deduplication algorithm to focus on.

2.  It streamlines the tracing output to not include information already
included in spans. Both obtain_tips and extend_tips have their own spans
attached to the events, so it's not necessary to add Scope: prefixes in
messages.

3.  It changes the messages to be focused on reporting the actual
events rather than the interpretation of the events (e.g., "got genesis hash in
response" rather than "peer could not extend tip").  The motivation for this
change is that when debugging, the interpretation of events is already known to
be incorrect, in the sense that the mental model of the code (no bug) does not
match its behavior (has bug), so presenting minimally-interpreted events forces
interpretation relative to the actual code.

* sync: hack to work around zcashd behavior

* sync: localize debug statement in extend_tips

* sync: change algorithm to define tips as pairs of hashes.

This is different enough from the existing description that its comments no
longer apply, so I removed them.  A further chunk of work is to change the sync
RFC to document this algorithm.

* sync: reduce block timeout

* state: add resource limits for sled

Closes #888

* sync: add a restart timeout constant

* sync: de-pub constants
2020-08-12 16:48:01 -07:00
dependabot[bot] 945b019739
build(deps): bump tracing-subscriber from 0.2.10 to 0.2.11 (#873)
Bumps [tracing-subscriber](https://github.com/tokio-rs/tracing) from 0.2.10 to 0.2.11.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-subscriber-0.2.10...tracing-subscriber-0.2.11)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-11 10:30:50 -07:00
dependabot[bot] 5cb61136c9
build(deps): bump tracing from 0.1.18 to 0.1.19 (#872)
Bumps [tracing](https://github.com/tokio-rs/tracing) from 0.1.18 to 0.1.19.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-0.1.18...tracing-0.1.19)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-11 10:18:54 -07:00
Alfredo Garcia c9093e4d59
Make more checks in non server acceptance tests (#860)
* make sure no info is printed in non server tests

* check exact full output for validity instead of log msgs

* add end of output character to version regex

* use coercions, use equality operator

Co-authored-by: Jane Lusby <jlusby42@gmail.com>

Co-authored-by: Jane Lusby <jlusby42@gmail.com>
2020-08-10 12:50:48 -07:00
Jane Lusby 867dd0b475
Setup tracing-flame for use profiling zebrad (#436)
* Setup tracing-flame for use profiling zebrad

* start work on conditional flamegraph generation

* review time!

* update comments

* Update Cargo.toml

* disable default features for inferno

* reorganize

* missing one trait

* Apply suggestions from code review

* graceful shutdown!

* remove special case handling on ctrlc for cleanup

* rename signal fn to better represent its responsibility

* remove unused global hook for flushing flamegraph

* move tracing logic to the right file

* just copy linkerd's signal handling logic

* update book

* make zebrad app drop on shutdown normally

* Update zebrad/src/components/tokio.rs

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

* Update zebrad/src/application.rs

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

* Apply suggestions from code review

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

* cleanup a little

* ooh yea there's an API for that

* setup env-filter for backup subscriber

* document env filter

* document return codes

* forgot to save

* Update book/src/applications/zebrad.md

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

Co-authored-by: teor <teor@riseup.net>
2020-08-05 16:35:56 -07:00
Henry de Valence 4a03d76a41
Remove environment variables in favor of documented config options. (#827)
* Load tracing filter only from config and simplify logic.

* Configure the state storage in the config, not an environment variable.

This also changes the config so that the path is always set rather than being
optional, because Zebra always needs a place to store its config.
2020-08-05 11:48:08 -07: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 e037466e26
Acceptance tests - check kill signal (#814)
* check kill signal exit code

* change names and add docs

* change exit_status() to was_killed()

* change assert calls
2020-08-04 13:38:39 -07:00
dependabot[bot] 8e268150a7 build(deps): bump tracing-subscriber from 0.2.9 to 0.2.10
Bumps [tracing-subscriber](https://github.com/tokio-rs/tracing) from 0.2.9 to 0.2.10.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-subscriber-0.2.9...tracing-subscriber-0.2.10)

Signed-off-by: dependabot[bot] <support@github.com>
2020-08-03 21:11:50 -04:00
Alfredo Garcia deba84b96e rustfmt 2020-08-03 15:50:48 -04:00
Alfredo Garcia 5f23970377 move env variable creation to test_cmd 2020-08-03 15:50:48 -04:00
dependabot[bot] f3b65f9609 build(deps): bump tracing from 0.1.17 to 0.1.18
Bumps [tracing](https://github.com/tokio-rs/tracing) from 0.1.17 to 0.1.18.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-0.1.17...tracing-0.1.18)

Signed-off-by: dependabot[bot] <support@github.com>
2020-08-03 15:49:30 -04:00
Alfredo Garcia f2d7bb3177
Command execution tests (#690)
* add zebrad acceptance tests
* add custom command test helpers that work with kill
* add and use info event for start and seed commands
* combine conflicting tests into one test case

Co-authored-by: Jane Lusby <jane@zfnd.org>
2020-08-01 16:15:26 +10:00
Jane Lusby e6b849568f
Add support for errors in zebra_test::Transcript (#678)
* Add support for errors in zebra_test::Transcript

* test transcript with an error checker

* switch to option instead of MockError

* update docs

* dont use verifier against ready_and

* cleanup exports and add docs

* handle todos

* fix doctest

* temp: use cleaner error handling example

* add ability to test only for presence of error
2020-07-31 11:54:18 -07:00
Jane Lusby 1015db25a8
remap the state storage to only store blocks once (#741) 2020-07-31 09:21:54 +10:00
teor 12cbe410f2 fix: Hide warn-level logs in the zebra-consensus tests
Unless RUST_LOG is set.
2020-07-27 13:51:33 -04:00
teor a60299d86c fix: Change the default test log level to warn 2020-07-27 13:51:33 -04:00
Henry de Valence 4aa00ad216 Align crate versions and user-agent with NU numbers.
We had a brief discussion on discord and it seemed like we had consensus on the
following versioning policy:

* zebrad: match major version to NU version, so we will start by releasing
  zebrad 3.0.0;

* zebra-* libraries: start by matching zebrad's version, then increment major
  versions of each library as we need to make breaking changes (potentially
  faster than the zebrad version, always respecting semver but making no
  guarantees about the longevity of major releases).

This commit sets all of the crate versions to 3.0.0-alpha.0 -- the -alpha.0
marks it as a prerelease not subject to perfect adherence to compatibility
guarantees.
2020-07-24 11:46:37 -07:00
dependabot[bot] f7c59c99b5 build(deps): bump tracing-subscriber from 0.2.8 to 0.2.9
Bumps [tracing-subscriber](https://github.com/tokio-rs/tracing) from 0.2.8 to 0.2.9.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-subscriber-0.2.8...tracing-subscriber-0.2.9)

Signed-off-by: dependabot[bot] <support@github.com>
2020-07-24 14:31:44 -04:00
dependabot[bot] 909b74a613
build(deps): bump tracing from 0.1.16 to 0.1.17 (#734)
Bumps [tracing](https://github.com/tokio-rs/tracing) from 0.1.16 to 0.1.17.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-0.1.16...tracing-0.1.17)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-23 10:54:56 -07:00
dependabot[bot] 2208a6a22d build(deps): bump tracing-subscriber from 0.2.7 to 0.2.8
Bumps [tracing-subscriber](https://github.com/tokio-rs/tracing) from 0.2.7 to 0.2.8.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-subscriber-0.2.7...tracing-subscriber-0.2.8)

Signed-off-by: dependabot[bot] <support@github.com>
2020-07-21 12:01:40 -04:00
Jane Lusby f3dd24bb3c
bug cleanup related to error handling (#552)
* cleanup error handling fixes
2020-07-17 18:19:00 -04: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
dependabot[bot] d627889104 Bump tracing from 0.1.15 to 0.1.16
Bumps [tracing](https://github.com/tokio-rs/tracing) from 0.1.15 to 0.1.16.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-0.1.15...tracing-0.1.16)

Signed-off-by: dependabot[bot] <support@github.com>
2020-07-09 10:22:27 -07: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
dependabot[bot] a1d02c2606 Bump tracing-subscriber from 0.2.6 to 0.2.7
Bumps [tracing-subscriber](https://github.com/tokio-rs/tracing) from 0.2.6 to 0.2.7.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-subscriber-0.2.6...tracing-subscriber-0.2.7)

Signed-off-by: dependabot[bot] <support@github.com>
2020-07-02 06:47:04 -04:00
Jane Lusby 2abf4b93a8 consolidate test init functions into zebra-test (#541)
* consolidate test init logic into one place

* rustfmt

Co-authored-by: Jane Lusby <jane@zfnd.org>
2020-06-24 11:47:18 -07:00
Henry de Valence e8d42264e8 Add a check method to the Transcript. 2020-06-24 11:47:18 -07:00
Henry de Valence 5c9cd52baf Add a Transcript Service for testing. 2020-06-24 11:47:18 -07:00
Henry de Valence e8561d8f9e rename zebra-test-vectors to zebra-test 2020-06-22 20:23:02 -07:00