Deirdre Connolly
ae67344268
Add LICENSE-MIT and LICENSE-APACHE and note in README.md
...
Resolves #96
2019-11-14 14:33:40 -05:00
Henry de Valence
e63f8b51b1
Fix default port setting.
2019-11-13 18:47:44 -05:00
Henry de Valence
3b02b40758
Simplify tracing output.
2019-11-13 18:43:18 -05:00
Henry de Valence
ec4f6bd9ea
Allow using the connect stub to test address messages.
2019-11-13 18:43:18 -05:00
Henry de Valence
2ac77ab704
fmt
2019-11-13 18:43:18 -05:00
Henry de Valence
d170608c13
Remove outdated note.
...
The MetaAddr type is used not just in the Bitcoin code so it doesn't make sense
to keep it in the Bitcoin protocol implementation.
2019-11-13 18:43:18 -05:00
Henry de Valence
9a0bffecb8
Sanitize outbound address responses.
...
This aims to prevent a remote peer from inspecting timings of all messages
received by this node.
2019-11-13 18:43:18 -05:00
Deirdre Connolly
e5aa02bbd4
Remove special wait, unneeded for seed
...
Co-Authored-By: Henry de Valence <hdevalence@hdevalence.ca>
2019-11-12 22:39:47 -05:00
Deirdre Connolly
bdba52936e
Unwrap address_book in call(), which relies on poll_ready giving a positive response first, otherwise panic
...
Co-Authored-By: Henry de Valence <hdevalence@hdevalence.ca>
2019-11-12 22:39:47 -05:00
Deirdre Connolly
fb19febe26
Remove config override, not needed
2019-11-12 22:39:47 -05:00
Deirdre Connolly
4923e0d783
Update tracing invocation to be better manipulated
...
Co-Authored-By: Henry de Valence <hdevalence@hdevalence.ca>
2019-11-12 22:39:47 -05:00
Deirdre Connolly
73d777fe65
Update `Ok(None)` case logging.
2019-11-12 22:39:47 -05:00
Deirdre Connolly
0f20ff59c7
Clean up SeedService.poll_ready with a 'ref mut'
...
Co-Authored-By: Henry de Valence <hdevalence@hdevalence.ca>
2019-11-12 22:39:47 -05:00
Deirdre Connolly
9d8e32d05f
Update `seed` subcommand description
...
Co-Authored-By: Henry de Valence <hdevalence@hdevalence.ca>
2019-11-12 22:39:47 -05:00
Deirdre Connolly
fe2a1ec1ea
Remove autogenerated Abscissa doc comments
2019-11-12 22:39:47 -05:00
Deirdre Connolly
910268a45b
Remove to-fix comment
2019-11-12 22:39:47 -05:00
Deirdre Connolly
a2292d94a0
Clean up some logging and comments on seed service
2019-11-12 22:39:47 -05:00
Deirdre Connolly
d6ab549fd5
Yay, SeedService makes a remote 'connect' happy
2019-11-12 22:39:47 -05:00
Deirdre Connolly
4d3ab201e6
seed command seems to be functional
...
Moved SeedService out of the command closure Command currently spawns
a tokio task to DOS the seed service with `Request::GetPeers` every
second.
Pertains to #54
2019-11-12 22:39:47 -05:00
Deirdre Connolly
fee75b5da8
Add SeedService
...
This may need some cleaning up, but this is the first iteration to appease the compiler.
2019-11-12 22:39:47 -05:00
Deirdre Connolly
0ac1b663fe
Keep sets of initial peers as Strings in config file
2019-11-12 22:39:47 -05:00
Deirdre Connolly
b5bbef5c47
Default init seed nodes based on network choice
...
And more flushed out but incomplete
2019-11-12 22:39:47 -05:00
dependabot-preview[bot]
7b739b3c16
Bump thiserror from 1.0.4 to 1.0.5
...
Bumps [thiserror](https://github.com/dtolnay/thiserror ) from 1.0.4 to 1.0.5.
- [Release notes](https://github.com/dtolnay/thiserror/releases )
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.4...1.0.5 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-09 18:55:46 -08:00
dependabot-preview[bot]
78b243e955
Bump tower-load from `fac5c36` to `52dbdda`
...
Bumps [tower-load](https://github.com/tower-rs/tower ) from `fac5c36` to `52dbdda`.
- [Release notes](https://github.com/tower-rs/tower/releases )
- [Commits](fac5c361a4...52dbdda23d
)
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-02 11:27:35 -07:00
dependabot-preview[bot]
ec2db11ebe
Bump toml from 0.5.4 to 0.5.5
...
Bumps [toml](https://github.com/alexcrichton/toml-rs ) from 0.5.4 to 0.5.5.
- [Release notes](https://github.com/alexcrichton/toml-rs/releases )
- [Commits](https://github.com/alexcrichton/toml-rs/compare/0.5.4...0.5.5 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-01 10:20:57 -07:00
Deirdre Connolly
a322566694
Add Cargo.lock
...
To allow Dependabot to operate correctly.
2019-10-30 18:15:29 -04:00
Henry de Valence
f588f5d368
Remove connect loop
2019-10-26 19:54:17 -04:00
Deirdre Connolly
dadc13feb4
Create README.md
2019-10-25 12:58:30 -04:00
Henry de Valence
d8ba22e7a2
Update zebra-network Monodraw diagram.
...
Also, add the source file to the repo.
2019-10-24 15:06:02 -07:00
Deirdre Connolly
bb77e509ea
Comment out suspicious run line
2019-10-24 16:50:34 -04:00
Henry de Valence
7a09223ddb
Fix typos.
...
Co-authored-by: Deirdre Connolly <deirdre@zfnd.org>
2019-10-22 19:43:44 -07:00
Henry de Valence
28a24fa91b
Import and update the previous design.md.
2019-10-22 19:43:44 -07:00
Henry de Valence
47ec2e2689
Remove stub discover module.
2019-10-22 19:06:08 -07:00
Henry de Valence
c3ec235a5b
Suppress unused import warnings.
2019-10-22 19:06:08 -07:00
Henry de Valence
ed2ee9d42f
Add a PeerConnector wrapper around PeerHandshake
2019-10-22 19:06:08 -07:00
Henry de Valence
9e2678d76c
Rename PeerConnector to PeerHandshake.
...
It's only responsible for doing the handshakes, so it should be named that way,
and then we can have a Connector responsible for actually opening the TCP
connection.
2019-10-22 19:06:08 -07:00
Henry de Valence
121cea610b
Unlink peer spans from their creation details.
2019-10-22 19:06:08 -07:00
Henry de Valence
6faebe844c
Make zebra-network::Config toml-able.
...
The toml serializer function we are using -- maybe because of to_string_pretty
(?) barfs on structs that mix ordering of simple values and "tables", so just
keep all the Durations to the end.
2019-10-22 19:06:08 -07:00
Henry de Valence
0833d31ec7
Use a timer to add peers by interval.
2019-10-22 19:06:08 -07:00
Henry de Valence
9a779a639f
Add a timeout for peer handshakes.
2019-10-22 19:06:08 -07:00
Henry de Valence
027bdc8465
Rework initial crawler logic.
...
This splits out the connection handling code into a try_connect closure, which
could be refactored into a Service of its own.
On creation, when we are likely to have very few peers, launch many concurrent
connections to the first few candidates in the initial candidate set, before
continuing to grow the peer set according to demand signals.
2019-10-22 19:06:08 -07:00
Henry de Valence
e1a35490af
Move the CandidateSet to its own file.
...
Co-authored-by: Deirdre Connolly <deirdre@zfnd.org>
2019-10-22 19:06:08 -07:00
Henry de Valence
2f3292759f
Add an explicit tracing span to each address book.
...
Co-authored-by: Deirdre Connolly <deirdre@zfnd.org>
2019-10-22 19:06:08 -07:00
Henry de Valence
e0e17a4719
Send an initial request for peers on launching crawler.
...
Co-authored-by: Deirdre Connolly <deirdre@zfnd.org>
2019-10-22 19:06:08 -07:00
Henry de Valence
b1832ce593
Initial work to add a crawl-and-dial task.
...
This responds to peerset demand by connecting to additional peers.
Co-authored-by: Deirdre Connolly <deirdre@zfnd.org>
2019-10-22 19:06:08 -07:00
Henry de Valence
4055eb8889
bugfix: ensure the PeerServer always calls fail_with before exit
...
This caused a panic in the PeerSet when remote peers disconnected from us.
2019-10-22 17:55:09 -04:00
Deirdre Connolly
32aea0cbf9
Add useful docstrings
2019-10-21 15:55:18 -04:00
Deirdre Connolly
3de34290e6
Construct LIVE_PEER_DURATION from other timeout and interval constants
...
Use constants::HEARTBEAT_INTERVAL in our ping generator, add a test to check that LIVE_PEER_DURATION
is consistent with the other constants.
2019-10-21 15:55:18 -04:00
Deirdre Connolly
8588c44bcf
Add a comment about not cloning the server channel any more than we are
2019-10-21 15:55:18 -04:00
Deirdre Connolly
61a07c67ef
Inside tokio::spawn, loop over Iterator stream and send ClientRequest
...
msgs on the channel instead
Related to #49
2019-10-21 15:55:18 -04:00