Commit Graph

184 Commits

Author SHA1 Message Date
dependabot[bot] 599afb7fbb build(deps): bump metrics-runtime from 0.13.0 to 0.13.1
Bumps [metrics-runtime](https://github.com/metrics-rs/metrics) from 0.13.0 to 0.13.1.
- [Release notes](https://github.com/metrics-rs/metrics/releases)
- [Commits](https://github.com/metrics-rs/metrics/compare/metrics-runtime-v0.13.0...metrics-runtime-v0.13.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-07-21 12:00:42 -04:00
dependabot[bot] 474de52e5c
build(deps): bump displaydoc from 0.1.6 to 0.1.7 (#689)
Bumps [displaydoc](https://github.com/yaahc/displaydoc) from 0.1.6 to 0.1.7.
- [Release notes](https://github.com/yaahc/displaydoc/releases)
- [Commits](https://github.com/yaahc/displaydoc/commits)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-20 11:00:15 -07:00
dependabot[bot] 2d8e518499 build(deps): bump redjubjub from 0.2.1 to 0.2.2
Bumps [redjubjub](https://github.com/ZcashFoundation/redjubjub) from 0.2.1 to 0.2.2.
- [Release notes](https://github.com/ZcashFoundation/redjubjub/releases)
- [Changelog](https://github.com/ZcashFoundation/redjubjub/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ZcashFoundation/redjubjub/compare/0.2.1...0.2.2)

Signed-off-by: dependabot[bot] <support@github.com>
2020-07-16 09:42:44 -04:00
dependabot[bot] f70f3b324c Bump sled from 0.32.1 to 0.33.0
Bumps [sled](https://github.com/spacejam/sled) from 0.32.1 to 0.33.0.
- [Release notes](https://github.com/spacejam/sled/releases)
- [Changelog](https://github.com/spacejam/sled/blob/master/CHANGELOG.md)
- [Commits](https://github.com/spacejam/sled/compare/v0.32.1...v0.33)

Signed-off-by: dependabot[bot] <support@github.com>
2020-07-15 10:21:59 -07:00
Henry de Valence e58de06cb0 tower-fallback: add docs
Thanks to @seanmonstar for pointing to the article on the downsides of fallback.
2020-07-15 10:09:37 -07:00
Henry de Valence ecda5445d5 tower-fallback: switch to Box<dyn Error + Send + Sync + 'static>
Previously the code used Either for error handling, but a boxed std Error is
smaller in the happy path and more useful.
2020-07-15 10:09:37 -07:00
Henry de Valence 4be0a8edc3 tower-fallback: add implementation. 2020-07-15 10:09:37 -07:00
dependabot[bot] c3fcac8a5c Bump hyper from 0.13.6 to 0.13.7
Bumps [hyper](https://github.com/hyperium/hyper) from 0.13.6 to 0.13.7.
- [Release notes](https://github.com/hyperium/hyper/releases)
- [Changelog](https://github.com/hyperium/hyper/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hyperium/hyper/compare/v0.13.6...v0.13.7)

Signed-off-by: dependabot[bot] <support@github.com>
2020-07-14 10:40:53 -07:00
dependabot[bot] d945ec3620 Bump bytes from 0.5.5 to 0.5.6
Bumps [bytes](https://github.com/tokio-rs/bytes) from 0.5.5 to 0.5.6.
- [Release notes](https://github.com/tokio-rs/bytes/releases)
- [Changelog](https://github.com/tokio-rs/bytes/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/bytes/compare/v0.5.5...v0.5.6)

Signed-off-by: dependabot[bot] <support@github.com>
2020-07-14 10:39:42 -07:00
dependabot[bot] ebcf6b0385 Bump sled from 0.32.0 to 0.32.1
Bumps [sled](https://github.com/spacejam/sled) from 0.32.0 to 0.32.1.
- [Release notes](https://github.com/spacejam/sled/releases)
- [Changelog](https://github.com/spacejam/sled/blob/master/CHANGELOG.md)
- [Commits](https://github.com/spacejam/sled/compare/v0.32...v0.32.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-07-13 11:51:35 -04:00
Jane Lusby 2b48008129
setup skeleton zebra-utils crate for independent binaries (#638)
* setup skeleton zebra-utils crate for independent binaries

* resolve review comments
2020-07-10 12:31:01 -07:00
Jane Lusby 06fff62561 remove git dependency on equihash crate 2020-07-10 07:52:52 -04:00
Jane Lusby 765e1e61e7
fix spandoc instrumentation for await expressions (#618)
* fix spandoc instrumentation for await expressions

* depend on released version of spandoc
2020-07-09 17:43:44 -04:00
Henry de Valence 8b72781fe1 deps: Update redjubjub to 0.2
Closes #606.
2020-07-09 15:20:23 -04: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
Deirdre Connolly 2cd58c8325
Add RedJubjub signature verifier service (#460)
Using tower-batch-based async pattern.

Now the Verifier is agnostic of redjubjub SigTypes.  Updated tests to
generate sigs of both types and batch verifies the whole batch.

Resolves #407
2020-07-08 17:23:00 -04:00
teor f2052b398b
feature: Implement CheckpointVerifier (#524)
* Return Poll::Ready(Err(_)) when verification has finished
* Turn checkpoint::init() into CheckpointVerifier::new()
* Accept IntoIterator<...> for CheckpointVerifier::new()
* Add a CheckpointList type

* Replace the state service with oneshot channels.
* Reject redundant checkpoint blocks
* impl Drop for CheckpointVerifier

* Add fields for caching blocks, and managing verify chains.
* Add current checkpoint functions
* Use a checkpoint range
* Get full backtraces with Err::Try
* Add enums for verification progress and target block heights.

* Replace install_tracing() with zebra_test::init()
* Add a test that mixes good and bad blocks
* Add timeouts to the checkpoint test futures
2020-07-08 21:22:36 +10:00
dependabot[bot] 2a6a3ee518 Bump chrono from 0.4.12 to 0.4.13
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.12 to 0.4.13.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/master/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.12...v0.4.13)

Signed-off-by: dependabot[bot] <support@github.com>
2020-07-07 18:31:55 -04:00
dependabot[bot] 3debe97cb2 Bump equihash from `5b2c71e` to `ae2a248`
Bumps [equihash](https://github.com/ZcashFoundation/librustzcash) from `5b2c71e` to `ae2a248`.
- [Release notes](https://github.com/ZcashFoundation/librustzcash/releases)
- [Commits](5b2c71e112...ae2a248133)

Signed-off-by: dependabot[bot] <support@github.com>
2020-07-07 12:31:09 -07:00
Henry de Valence 68f57b2577 Update ed25519-zebra to 1.0. 2020-07-07 11:49:21 -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
dependabot[bot] 5ee48a6675
Bump chrono from 0.4.11 to 0.4.12 (#580)
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.11 to 0.4.12.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/master/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.11...v0.4.12)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-02 10:33:39 -07: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 8281b9040c
Start work on new Amount type (#554) 2020-07-01 16:31:30 -07:00
Jane Lusby 7245d91fe9
fix block downloading to be parallelized and commited via the verifier (#540) 2020-06-30 09:42:09 -07:00
Jane Lusby afd0e90a74
Implement equihash verification (#549)
This change brings in the `equihash` crate from librustzcash and uses it to add a basic `is_valid` test for `EquihashSolutions`.

Co-authored-by: Jane Lusby <jane@zfnd.org>
2020-06-26 11:21:02 -07:00
teor a706b65325
Consensus test tweaks (#538)
* Use spandoc correctly
* Refactor consensus test error handling
* Delete a checkpoint test that will soon be obsolete

* Only initialise tracing once for the block tests
* Use tracing in the checkpoint tests

* Move BlockVerifier and tests into block.rs

* Update a BlockVerifier comment
* Tweak some TODO comments
2020-06-25 10:14:23 +10: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 87a8d328d5 Rewrite zebra-state tests to use transcripts.
This makes adding more tests easier.
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
teor f10bfd5806 consensus: Add a block time check function
Add a function that checks the block header miner times against the
node's local clock.

(We'll use this function in the next commit.)

Part of #477.
2020-06-24 18:22:36 +10:00
Henry de Valence 70241d3cad Fix broken git dependencies.
Pinning hashes means these won't break again in the future; they can always be updated.
2020-06-22 20:23:02 -07:00
Henry de Valence e8561d8f9e rename zebra-test-vectors to zebra-test 2020-06-22 20:23:02 -07:00
Jane Lusby 246e7cd2a9
Start testing out new version of `eyre` and `color-eyre` in zebra (#526)
* port to new version of eyre without generics

* correctly setup color_eyre hooks

Co-authored-by: Jane Lusby <jane@zfnd.org>
2020-06-22 15:36:23 -07:00
dependabot[bot] f301de41fa Bump tracing-subscriber from 0.2.5 to 0.2.6
Bumps [tracing-subscriber](https://github.com/tokio-rs/tracing) from 0.2.5 to 0.2.6.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-subscriber/-0.2.5...tracing-subscriber-0.2.6)

Signed-off-by: dependabot[bot] <support@github.com>
2020-06-22 12:01:47 -04:00
dependabot[bot] e3ad9737e7 Bump sled from 0.31.0 to 0.32.0
Bumps [sled](https://github.com/spacejam/sled) from 0.31.0 to 0.32.0.
- [Release notes](https://github.com/spacejam/sled/releases)
- [Changelog](https://github.com/spacejam/sled/blob/master/CHANGELOG.md)
- [Commits](https://github.com/spacejam/sled/compare/v0.31...v0.32)

Signed-off-by: dependabot[bot] <support@github.com>
2020-06-22 12:00:54 -04:00
dependabot[bot] bf779ea1d6 Bump serde from 1.0.112 to 1.0.114
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.112 to 1.0.114.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.112...v1.0.114)

Signed-off-by: dependabot[bot] <support@github.com>
2020-06-22 11:58:09 -04:00
dependabot[bot] 6324ad8828 Bump bytes from 0.5.4 to 0.5.5
Bumps [bytes](https://github.com/tokio-rs/bytes) from 0.5.4 to 0.5.5.
- [Release notes](https://github.com/tokio-rs/bytes/releases)
- [Changelog](https://github.com/tokio-rs/bytes/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/bytes/compare/v0.5.4...v0.5.5)

Signed-off-by: dependabot[bot] <support@github.com>
2020-06-19 12:56:38 -04:00
Jane Lusby 63ae085945 make return error type for Batch generic 2020-06-19 01:48:56 -04:00
dependabot[bot] 70948556cf Bump ed25519-zebra from 0.4.0 to 0.4.1
Bumps [ed25519-zebra](https://github.com/ZcashFoundation/ed25519-zebra) from 0.4.0 to 0.4.1.
- [Release notes](https://github.com/ZcashFoundation/ed25519-zebra/releases)
- [Changelog](https://github.com/ZcashFoundation/ed25519-zebra/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ZcashFoundation/ed25519-zebra/compare/0.4.0...0.4.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-06-18 03:18:56 -07:00
Jane Lusby df18ac72c5 fix sharedpeererror to propagate tracing context 2020-06-17 14:38:26 -07:00
Henry de Valence a0e0e2302b Update ed25519-zebra to 0.4 2020-06-16 14:35:42 -07:00
Henry de Valence 34ca9a7ed2 Fix Ed25519Verifier using a patched batch API.
Changing the batch API to have an explicit item type removes the lifetime
problems described in the previous commit.
2020-06-16 14:35:42 -07:00
Henry de Valence 5bcef64514 Add Ed25519 batch verification example test.
This test doesn't compile in a way that reveals a problem with the design.  The
verification service takes a `Request<'msg>` parameterized by the message
lifetime, and returns a future unconstrained by the message lifetime (it hashes
upfront to avoid requiring that `'msg` outlive `call`).  But the `Batch`
middleware has the verification service working on its own task, so how can we
ensure that the message lives long enough to be read by the worker task?
2020-06-16 14:35:42 -07:00
Henry de Valence ee26e786f7 tower-batch: initial implementation of batching logic.
The name "Buffer" is changed to "Batch" everywhere, and the worker task is rewritten.

Instead of having Worker implement Future directly, we have a consuming async run() function.
2020-06-16 14:35:42 -07:00
Henry de Valence dcd3f7bb2d tower-batch: copy tower-buffer source code.
There's a lot of functional overlap between the batch design and tower-buffer's
existing internals, so we'll just vendor its source code and modify it.
If/when we upstream it, we can deduplicate common components.
2020-06-16 14:35:42 -07:00
dependabot[bot] 42fc386bb9 Bump thiserror from 1.0.19 to 1.0.20
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.19 to 1.0.20.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.19...1.0.20)

Signed-off-by: dependabot[bot] <support@github.com>
2020-06-16 09:51:05 -07:00
Henry de Valence 9ddcccdcb4 Update ed25519-zebra to 0.3 2020-06-16 00:42:25 -04:00
Henry de Valence a023ba9b16
Add serde bounds to zebra-chain structures. (#231) 2020-06-15 15:08:14 -07:00
Jane Lusby bb0553fab6
implement initial persistent state backend based on `sled` (#473) 2020-06-15 14:41:26 -07:00