Commit Graph

1946 Commits

Author SHA1 Message Date
Deirdre Connolly b68e1e2d55 Move Network, Magic, and magics to zebra-chain 2020-03-12 22:02:17 -04:00
Deirdre Connolly 14120cf828 Clean up comments 2020-03-12 22:02:17 -04:00
Deirdre Connolly 27d960c61e Remove an answered XXX 2020-03-12 22:02:17 -04:00
Deirdre Connolly 5602ed66a9 Add tests, use Base58Check, not Base58 2020-03-12 22:02:17 -04:00
Deirdre Connolly f11821fcc8 base58 to string 2020-03-12 22:02:17 -04:00
Deirdre Connolly 9887b7c8b7 Fix up TransparentAddresses 2020-03-12 22:02:17 -04:00
Deirdre Connolly 16ee53a909 Impl zcash_(de)serialize for TransparentAddress 2020-03-12 22:02:17 -04:00
Deirdre Connolly 72ddc7d7a1 Add AddressPayloadHash type
Includes From impls for Script, secp256k1::PublicKey
2020-03-12 22:02:17 -04:00
Deirdre Connolly 9a4e4e4236 Stub out transparent addresses, keys with secp256k1 2020-03-12 22:02:17 -04:00
Deirdre Connolly 0998b90392 Stub out sprout, sapling key modules 2020-03-12 22:02:17 -04:00
Deirdre Connolly 8c0b00109f Remove PeerError::DeadServer, unused, unneeded
Resolves #251
2020-03-12 16:23:08 -04:00
dependabot-preview[bot] a3cd0bb82b Bump chrono from 0.4.10 to 0.4.11
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.10 to 0.4.11.
- [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.10...v0.4.11)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-07 18:26:07 -05:00
dependabot-preview[bot] cf0348b4f5 Bump hyper from 0.13.2 to 0.13.3
Bumps [hyper](https://github.com/hyperium/hyper) from 0.13.2 to 0.13.3.
- [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.2...v0.13.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-03 20:16:27 -05:00
dependabot-preview[bot] b00967761e Bump tokio from 0.2.12 to 0.2.13
Bumps [tokio](https://github.com/tokio-rs/tokio) from 0.2.12 to 0.2.13.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-28 19:37:53 -05:00
Deirdre Connolly db86ef6e8b Pull in secp256k1 wrapper crate as a dep 2020-02-28 13:19:47 -05:00
dependabot-preview[bot] d765016540 Bump tokio from 0.2.11 to 0.2.12
Bumps [tokio](https://github.com/tokio-rs/tokio) from 0.2.11 to 0.2.12.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-0.2.11...tokio-timer-0.2.12)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-27 14:09:10 -05:00
dependabot-preview[bot] 5ce141af07 Bump tracing from 0.1.12 to 0.1.13
Bumps [tracing](https://github.com/tokio-rs/tracing) from 0.1.12 to 0.1.13.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-0.1.12...tracing-0.1.13)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-27 09:19:42 -08:00
dependabot-preview[bot] e203efe4de Bump tracing-futures from 0.2.2 to 0.2.3
Bumps [tracing-futures](https://github.com/tokio-rs/tracing) from 0.2.2 to 0.2.3.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-futures-0.2.2...tracing-futures-0.2.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-27 09:19:15 -08:00
Henry de Valence 81500dfe11 Add Zebra logotype. 2020-02-26 21:25:35 -08:00
Henry de Valence cd6deea7e1 Clarify that it's the ZF discord and that it's engineering-focused. 2020-02-26 21:25:35 -08:00
Henry de Valence ff3efd504c Add Zebra logo to all workspace crates.
Also add html_root_url attributes.
2020-02-26 21:25:35 -08:00
Deirdre Connolly af455f9896 Refine Note types a little more 2020-02-22 22:24:26 -05:00
Deirdre Connolly a6a3a640ca Tidied up some note encryption types 2020-02-22 18:33:51 -05:00
Deirdre Connolly 8aefadd00f Add multiple types to lay out NotePlaintext's for sprout and sapling 2020-02-22 18:33:51 -05:00
Deirdre Connolly 1a10975389 Add memo test vector for invalid utf8 bytes 2020-02-22 18:33:51 -05:00
Henry de Valence f98cda40f9 Remove unused import. 2020-02-21 06:48:25 -05:00
Henry de Valence 3ed75cb626 Tweak peer set metrics.
- Add a total peers metric to prevent races between measurements of
  ready/unready peers (which can cause the sum to be wrong).
- Add an outbound request counter.
2020-02-21 06:48:25 -05:00
Henry de Valence 9c357eaf1e Use retries for FindBlocks requests. 2020-02-21 06:48:25 -05:00
Henry de Valence 94fe2c3b57 Increase the peerset request buffer size.
tower-buffer uses tokio's mpsc channels, not the futures-rs mpsc channels.
Unlike futures-rs mpsc channels, which have capacity n+m, where n is the buffer
size and m is the number of senders, tokio channels always have buffer size n.
This means that the buffer size is shared across all peer set handles.

Thanks to @hawkw for sharing details of the Tokio internals!
2020-02-21 06:48:25 -05:00
Henry de Valence 5f07a25b05 Shorten the default new_peer_interval to 60s.
This increases the frequency at which we crawl the network.
2020-02-21 06:48:25 -05:00
Henry de Valence b951f13f06 Add a `revhex` utility command to reverse endianness.
This makes it easier to translate block hashes output by our debug logs into
the format used by other tools.
2020-02-21 06:48:25 -05:00
Henry de Valence 80e7ee6dae Add metrics for inbound and outbound messages. 2020-02-21 06:48:25 -05:00
Henry de Valence 8c938af579 Spawn tasks for handshake futures.
Previously, we relied on the owner of the handshake future to drive it to
completion.  This meant that there were cases where handshakes might never be
completed, just because nothing was actively polling them.
2020-02-21 06:48:25 -05:00
Henry de Valence 43b2d35dda Crawl for more peers when we exhaust candidates. 2020-02-21 06:48:25 -05:00
Henry de Valence afa2c2347f fmt 2020-02-21 06:48:25 -05:00
Deirdre Connolly 272c3479a8 Remove unused BlockTestVector struct
Resolves #260
2020-02-20 15:05:13 -05:00
Henry de Valence 2d2603cf65 Add a CoinbaseData field, replacing Vec<u8>.
The CoinbaseData field can only be constructed by the transaction parser, so we
can ensure that a coinbase input is always serializable, as CoinbaseData
instances can't be constructed outside of the parser that maintains the data
size invariant.
2020-02-19 15:42:20 -05:00
dependabot-preview[bot] cd8e67b47c Bump hex from 0.4.1 to 0.4.2
Bumps [hex](https://github.com/KokaKiwi/rust-hex) from 0.4.1 to 0.4.2.
- [Release notes](https://github.com/KokaKiwi/rust-hex/releases)
- [Commits](https://github.com/KokaKiwi/rust-hex/compare/v0.4.1...v0.4.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-18 10:09:13 -08:00
Henry de Valence 7f91099172 Put grafana on port 3030. 2020-02-14 20:14:05 -05:00
Henry de Valence 8bff6ada6c Prevent a crash serializing configs. 2020-02-14 20:14:05 -05:00
Henry de Valence 00edcae0c2 Add metrics for the crawler and candidate set. 2020-02-14 20:14:05 -05:00
Henry de Valence cb9c9e1676 Tell Prometheus to scrape more aggressively 2020-02-14 20:14:05 -05:00
Henry de Valence c19e9916b5 Persist Prometheus data 2020-02-14 20:14:05 -05:00
Henry de Valence 34ca18eed8 Add prometheus config, notes.
Co-authored-by: Deirdre Connolly <deirdre@zfnd.org>
2020-02-14 20:14:05 -05:00
Henry de Valence 75d3d44fb3 Metrics MVP: add two metrics and export them to Prometheus.
Co-authored-by: Deirdre Connolly <deirdre@zfnd.org>
2020-02-14 20:14:05 -05:00
Henry de Valence b443d7a4be Fix clippy lints. 2020-02-14 18:23:41 -05:00
Henry de Valence 8000f888fd Connect to multiple peers concurrently.
The previous outbound peer connection logic got requests to connect to new
peers and processed them one at a time, making single connection attempts
and retrying if the connection attempt failed.  This was quite slow, because
many connections fail, and we have to wait for timeouts.  Instead, this logic
connects to new peers concurrently (up to 50 at a time).
2020-02-14 18:23:41 -05:00
Henry de Valence 7ba007f23d Exercise network functionality by downloading lots of blocks.
(Don't check any information about them, just blindly download).
2020-02-14 18:23:41 -05:00
Henry de Valence d887faf16f Add PartialOrd, Ord to BlockHeight. 2020-02-14 18:23:41 -05:00
Henry de Valence c4d72177c2 Add a Block::coinbase_height() method. 2020-02-14 18:23:41 -05:00