teor
4f923b90ea
Log address book metrics when peers aren't responding
2021-03-17 10:47:04 +10:00
teor
5a30268d7a
Log address metrics when the peer set has no ready peers
2021-03-17 10:47:04 +10:00
teor
6a342e93ca
Refactor AddressBook metrics into their own struct
...
And provide an accessor function for address book metrics.
2021-03-17 10:47:04 +10: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
Jack Grigg
7a8cae9321
Tag message metrics by type
2021-03-17 09:38:07 +10:00
Jack Grigg
e51f33a4b9
Use interoperable names for common metrics
...
These names match the equivalent metrics in zcashd, enabling common
metrics to be collected across both node types.
2021-03-17 09:38:07 +10:00
teor
8fabbce037
Document and log trailing message bytes ( #1888 )
...
* Rename a variable for consistency
* Log extra trailing message bytes at debug level
2021-03-15 08:25:27 +10:00
teor
976ec912db
Document that the listed address is also advertised to peers ( #1891 )
...
Documents a potential privacy leak, and a missing feature.
2021-03-15 08:25:07 +10:00
teor
e50692bd51
CandidateSet: Add Listener Port Connections
...
Inbound connections on the Zcash protocol listener port
perform a handshake. If the handshake is successful, it
adds the peer to the AddressBook.
2021-03-09 23:05:18 -05:00
Jane Lusby
03aa6f671f
Implement outbound connection rate limiting - includes config rename with alias ( #1855 )
...
* Implement outbound connection rate limiting
* fix breaking change on config
Co-authored-by: teor <teor@riseup.net>
2021-03-10 01:36:05 +00:00
Jane Lusby
e541746a50
Add initial support for NU5 to zebra ( #1823 )
...
* Add NU5 variant to NetworkUpgrade
* Add consensus branch ID for NU5
* Add network protocol versions for NU5
* Add NU5 to the protocol::version_consistent test
* Make unimplemented panic messages more specific
* Block target spacing doesn't change in NU5
* add comments for future updates for NU5
Co-authored-by: teor <teor@riseup.net>
2021-03-03 06:22:11 +10:00
teor
895bb43ead
Clippy: Fix inconsistent struct member orders lint
2021-03-01 23:31:18 -05:00
teor
2587a4e272
Fix a peer DNS resolution edge case ( #1796 )
...
* Retry each peer DNS a few times individually
We retry each peer individually, as well as retrying if there are no
peers in the combined list.
DNS failures are correlated, so all peers can fail DNS, leaving Zebra
with a small list of custom-configured IP address peers.
Individual retries avoid this issue.
* Rename parse_peers to resolve_peers
Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>
2021-02-26 09:06:27 +10:00
teor
9c3f236075
Stop sending blocks and transactions on error
2021-02-25 08:44:57 -08:00
teor
78f162733d
Revert "leverage return value for propagating errors"
...
This reverts commit e6cb20e13f
.
2021-02-24 13:07:31 -08:00
teor
72e2e83828
Revert "introduce Transition enum"
...
This reverts commit 6906f87ead
.
2021-02-24 13:07:31 -08:00
teor
a5e89f4f2b
Revert "accidental drop on mustusesender"
...
This reverts commit 5ec8d09e0d
.
2021-02-24 13:07:31 -08:00
teor
d60226a3cf
Revert "rustfmt"
...
This reverts commit 9d9734ea81
.
2021-02-24 13:07:31 -08:00
teor
359015b2be
Revert "Only reject pending client requests when the peer has errored"
...
This reverts commit e06705ed81
.
2021-02-24 13:07:31 -08:00
teor
663ed6c842
Revert "Remove remaining references to fail_with"
...
This reverts commit 5e4bf804aa
.
2021-02-24 13:07:31 -08:00
teor
3c225550ee
Revert "rename transitions from Exit to Close"
...
This reverts commit cfc4717b98
.
2021-02-24 13:07:31 -08:00
teor
86dc66dfa9
Revert "deduplicate match arms in handle_client_request"
...
This reverts commit 2adee7b31a
.
2021-02-24 13:07:31 -08:00
teor
292a4391e2
Revert "update comments throughout connection.rs"
...
This reverts commit 651d352ce1
.
2021-02-24 13:07:31 -08:00
teor
fc44a97925
Revert "remove unnecessary Option around request timeout"
...
This reverts commit c3724031df
.
2021-02-24 13:07:31 -08:00
teor
e06120cd36
Revert "ensure peer/client.rs comments are up to date"
...
This reverts commit 2266886a53
.
2021-02-24 13:07:31 -08:00
teor
1a70d807b6
Revert "make sure peer/error.s comments are up to date"
...
This reverts commit 6f205a1812
.
2021-02-24 13:07:31 -08:00
teor
3b2077fcfd
Revert "Apply suggestions from code review"
...
This reverts commit 736092abb8
.
2021-02-24 13:07:31 -08:00
teor
7558f74c78
Bump versions for zebrad 1.0.0-alpha.3
2021-02-23 10:39:13 -05:00
dependabot[bot]
b578d1ff2e
build(deps): bump proptest-derive from 0.2.0 to 0.3.0
...
Bumps [proptest-derive](https://github.com/AltSysrq/proptest ) from 0.2.0 to 0.3.0.
- [Release notes](https://github.com/AltSysrq/proptest/releases )
- [Changelog](https://github.com/AltSysrq/proptest/blob/master/CHANGELOG.md )
- [Commits](https://github.com/AltSysrq/proptest/compare/proptest-derive-0.2.0...proptest-derive-0.3.0 )
Signed-off-by: dependabot[bot] <support@github.com>
2021-02-22 01:33:54 -05:00
teor
d4f2f27218
Add global span to spawned network tasks ( #1761 )
...
Closes #1575
2021-02-20 08:36:50 +10:00
ebfull
b7fddbde94
Compute the expected body length to reduce heap allocations ( #1773 )
...
* Compute the expected body length to reduce heap allocations
2021-02-19 22:18:57 +00:00
Jane Lusby
736092abb8
Apply suggestions from code review
...
Co-authored-by: teor <teor@riseup.net>
2021-02-19 14:11:35 -08:00
Jane Lusby
6f205a1812
make sure peer/error.s comments are up to date
2021-02-19 14:11:35 -08:00
Jane Lusby
2266886a53
ensure peer/client.rs comments are up to date
2021-02-19 14:11:35 -08:00
Jane Lusby
c3724031df
remove unnecessary Option around request timeout
2021-02-19 14:11:35 -08:00
Jane Lusby
651d352ce1
update comments throughout connection.rs
2021-02-19 14:11:35 -08:00
Jane Lusby
2adee7b31a
deduplicate match arms in handle_client_request
2021-02-19 14:11:35 -08:00
Jane Lusby
cfc4717b98
rename transitions from Exit to Close
2021-02-19 14:11:35 -08:00
teor
5e4bf804aa
Remove remaining references to fail_with
2021-02-19 14:11:35 -08:00
teor
e06705ed81
Only reject pending client requests when the peer has errored
...
- Add an `ExitClient` transition, used when the internal client channel
is closed or dropped, and there are no more pending requests
- Ignore pending requests after an `ExitClient` transition
- Reject pending requests when the peer has caused an error
(the `Exit` and `ExitRequest` transitions)
- Remove `PeerError::ConnectionDropped`, because it is now handled by
`ExitClient`. (Which is an internal error, not a peer error.)
2021-02-19 14:11:35 -08:00
teor
9d9734ea81
rustfmt
2021-02-19 14:11:35 -08:00
Jane Lusby
5ec8d09e0d
accidental drop on mustusesender
2021-02-19 14:11:35 -08:00
Jane Lusby
6906f87ead
introduce Transition enum
2021-02-19 14:11:35 -08:00
Jane Lusby
e6cb20e13f
leverage return value for propagating errors
2021-02-19 14:11:35 -08: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
8d1c498234
Log initial peer connection failures
...
And standardise another log message
2021-02-17 09:21:53 -05:00
teor
e85441c914
Add a correctness comment to justify the revert
2021-02-16 05:52:54 +10:00