Commit Graph

2200 Commits

Author SHA1 Message Date
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
teor e61b5e50a2
Diagnostics for CI port conflict failures (#1766)
Log a "Trying..." message before each listener opens, to see if the
delay is inside Zebra, or in the test harness or OS.

Also report the configured and actual ports where possible, for better
diagnostics.
2021-02-18 12:15:09 -03:00
teor 5424e1d8ba
Fix candidate set address state handling (#1709)
Design:
- Add a `PeerAddrState` to each `MetaAddr`
- Use a single peer set for all peers, regardless of state
- Implement time-based liveness as an `AddressBook` method, rather than
  a `PeerAddrState` variant
- Delete `AddressBook.by_state`

Implementation:
- Simplify `AddressBook` changes using `update` and `take` modifier
  methods
- Simplify the `AddressBook` iterator implementation, replacing it with
  methods that are more obviously correct
- Consistently collect peer set metrics

Documentation:
- Expand and update the peer set documentation

We can optimise later, but for now we want simple code that is more
obviously correct.
2021-02-18 11:18:32 +10:00
teor 579bd4a368
Retry DNS resolution on failure (#1762)
Otherwise, a transient DNS failure makes the node hang.
2021-02-18 07:09:02 +10:00
teor 86169f6412
Update PeerSet metrics after every change (#1727) 2021-02-18 07:06:59 +10:00
teor 972103d797 Fix tracing macro syntax 2021-02-17 11:09:22 -05:00
teor 253d1c02b3 Make sync logging a bit less verbose
And tweak some log content
2021-02-17 11:09:22 -05:00
teor 8d1c498234 Log initial peer connection failures
And standardise another log message
2021-02-17 09:21:53 -05:00
teor 1ef836abb9 Add a missing Sync bound 2021-02-17 09:03:09 -05:00
teor 090afb9d4c Ignore clippy lints on copied code 2021-02-17 09:03:09 -05:00
teor 47084ea85e Wake waiting tower-batch tasks on drop
When other tower-batch tasks drop, wake any tasks that are waiting for
a semaphore permit. Otherwise, tower-batch can hang.

We currently pin tower in our workspace to:
d4d1c67 hedge: use auto-resizing histograms (tower-rs/tower#484)

Copy tower/src/semaphore.rs from that commit, to pick up
tower-rs/tower#480.
2021-02-17 09:03:09 -05:00
dependabot[bot] 76e4b8f693 build(deps): bump tracing-futures from 0.2.4 to 0.2.5
Bumps [tracing-futures](https://github.com/tokio-rs/tracing) from 0.2.4 to 0.2.5.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-futures-0.2.4...tracing-futures-0.2.5)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-17 08:55:16 -05:00
teor 20486be042 Client design: add "one database per key" alternative 2021-02-16 23:25:45 -05:00
teor 55613db846 Fix a clippy redundant range lint 2021-02-17 12:47:56 +10:00
teor df59468085 Fix clippy uppercase acronym lint 2021-02-17 12:47:56 +10:00
Alfredo Garcia c8823e9552 change coverage to run on ubuntu-latest 2021-02-16 19:43:36 -05:00
Alfredo Garcia 280496ef4e bring coverage and docs back into CI 2021-02-16 19:43:36 -05:00
teor 47bcf6309a
Show env vars in CI (#1751)
And standardise how we set them
2021-02-17 08:04:00 +10:00
teor c9ca601cff Revert "Change skip network test name and comments"
This reverts commit f85006a798.
2021-02-16 12:50:14 -05:00
Deirdre Connolly 9493391a2a CI: bump build and test timeouts to 60 minutes 2021-02-16 12:47:35 -05:00
Deirdre Connolly 5d3fad515c Point at the renamed SECURITY.md in the README.md 2021-02-16 17:30:44 +10:00
Deirdre Connolly a6d3267f7e Rename responsible_disclosure.md to SECURITY.md 2021-02-16 17:30:44 +10:00
Deirdre Connolly 26aded0ef9 Run CI workflow on push to #main & manual request
We used to always run the CI workflow on push/merge to #main and at some point stopped; 
we still link to the status of this workflow on #main from our README. I think we should bring it back.
Also allows manual triggering of the workflow, which can come in handy if you are working
on a branch but haven't opened a PR yet.
2021-02-15 21:19:57 -05:00
Alfredo Garcia 366f239974
Resolve Windows CI disk space issues (#1726)
* remove windows conditional
* fully separate tests from large tests
* add rust beta to new large test jobs
* increase build time for windows
* disable cargo increment
2021-02-16 09:44:49 +10:00
teor cc7d5bd2ad
Update comments for the inbound service (#1740) 2021-02-16 06:14:40 +10:00
teor 372a432179
Update the call_all comment in Inbound (#1737) 2021-02-16 06:14:16 +10:00
Alfredo Garcia f85006a798 Change skip network test name and comments 2021-02-15 14:54:32 -05:00
teor 9056435942
Make the state usage clearer in script::Verifier (#1733) 2021-02-16 05:53:12 +10:00
teor e85441c914 Add a correctness comment to justify the revert 2021-02-16 05:52:54 +10:00
teor a02a00a3f5 Revert "Stop using CallAllUnordered in peer_set::add_initial_peers (#1705)"
This reverts commit 241c7ad849.
2021-02-16 05:52:54 +10:00
teor e8d8a49f41
Increase the conflict acceptance test launch delay (#1736)
* Increase the conflict acceptance test launch delay

Also rename the tests - the listener is for the Zcash protocol,
but the state, metrics, and tracing are Zebra-specific.

Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
2021-02-16 05:52:30 +10:00
Alfredo Garcia 21dbf5cb69
fix rust beta panic string warnings (#1731) 2021-02-15 07:00:02 +10:00
Alfredo Garcia a4d8b16213 fix title 2021-02-11 15:51:31 -05:00
Alfredo Garcia 49b23d0bbe add rust beta to zebra-chain building job 2021-02-11 15:51:31 -05:00
Alfredo Garcia 33af7130dc Apply suggestions from code review
Co-authored-by: Deirdre Connolly <deirdre@zfnd.org>
2021-02-11 15:51:31 -05:00
Alfredo Garcia 8c48ad6846 add rust version names to jobs 2021-02-11 15:51:31 -05:00
Alfredo Garcia 58a73c5626 add beta rust to test jobs 2021-02-11 15:51:31 -05:00
Alfredo Garcia de78fcf0f6 try a matrix for rust stable and beta 2021-02-11 15:51:31 -05:00
Alfredo Garcia 43ff80f28f try a CI build with beta rust 2021-02-11 15:51:31 -05:00
teor e7176b86da Clarify the Response::Nil documentation 2021-02-11 09:45:42 -05:00
dependabot[bot] af11cc4815 build(deps): bump vergen from 3.1.0 to 3.2.0
Bumps [vergen](https://github.com/rustyhorde/vergen) from 3.1.0 to 3.2.0.
- [Release notes](https://github.com/rustyhorde/vergen/releases)
- [Commits](https://github.com/rustyhorde/vergen/compare/v3.1.0...v3.2.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-10 21:36:03 -05:00
Deirdre Connolly d93804ebe7
Add draft PR template for release checklist (#1717)
* Add draft PR template for release checklist

* Add some notes about keepachangelog categories

* Add excessive detail to the release checklist

We want to be very clear about the process now,
so we get consistency, and so other developers
can follow it.

Eventually, these details should move to the
developer book.

* Add links for Release Drafter and the GitHub Releases location

Co-authored-by: teor <teor@riseup.net>
2021-02-10 10:56:58 +10:00
teor 0b76352468
Document a state_contains bug (#1715)
* Document a state_contains bug in the syncer and Inbound
2021-02-10 09:05:14 +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
teor dce11358d7
Log when the syncer awaits peer readiness (#1714) 2021-02-10 07:09:27 +10:00
dependabot[bot] d030cd9e3a build(deps): bump serde_json from 1.0.61 to 1.0.62
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.61 to 1.0.62.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.61...v1.0.62)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-08 18:44:36 -05:00
Alfredo Garcia 241c7ad849
Stop using CallAllUnordered in peer_set::add_initial_peers (#1705)
* use ServiceExt::oneshot and FuturesUnordered

Co-authored-by: teor <teor@riseup.net>
2021-02-09 08:16:02 +10:00
Alfredo Garcia 0723ac5be1
Fix poll_ready usage in ChainVerifier (#1700)
* change `poll_ready()` and `call()` of `ChainVerifier`
* add bound, move max_checkpoint_height
* add buffers to the checkpoint and block verifiers

And rename the chain verifier fields so `block` means `Arc<Block>`, and
`block_verifier` means `Buffer<BlockVerifier, ...>`.

* Fix the error types
* Use `ServiceExt::oneshot` in `ChainVerifier::call`

And:
* make the code look like the `main` branch as much as possible
* document the `poll_ready`/`call` invariant

* Use `ServiceExt::oneshot` in `chain::init`

Co-authored-by: teor <teor@riseup.net>
2021-02-09 08:13:55 +10:00
teor a91006afa7
Actually use `VerifyCheckpointError::CommitFinalized` (#1706)
Also:
* use `ServiceExt::oneshot` in the checkpoint verifier
* make some error messages more specific
* clean up the `std::future`/`futures` imports
2021-02-09 07:16:36 +10:00