Deirdre Connolly
8a9a5ba29b
Revert "Add some simple proptests using the Arbitray trait on Requests and Responses, gated to test only"
...
This reverts commit 5a123acf56
.
2019-11-26 19:35:49 -05:00
Deirdre Connolly
6f52fc7773
Add 'Other' opcode matching when parsing Reject messages
2019-11-26 19:35:49 -05:00
Deirdre Connolly
dd042cf4d8
Add some simple proptests using the Arbitray trait on Requests and Responses, gated to test only
2019-11-26 19:35:49 -05:00
Deirdre Connolly
6168cb51d7
Prefixed currently unused error variable with underscore
2019-11-26 19:35:49 -05:00
Deirdre Connolly
d78ead4a1a
Removed unused trait import
2019-11-26 19:35:49 -05:00
Deirdre Connolly
b9c27e5683
Handle Response::Error and send Message::Reject generated from a PeerError::Rejected
2019-11-26 19:35:49 -05:00
Deirdre Connolly
f5f1fe9bbc
Handle incoming Reject messages when we expect a response
2019-11-26 19:35:49 -05:00
Deirdre Connolly
efd37300b9
Impl From trait for Responses from generic Error impls
...
Also include new Response::Error variant.
2019-11-26 19:35:49 -05:00
Deirdre Connolly
9cdef4acf0
Implement From trait for generic Error impls
...
Also add 'Other' RejectCode variant.
2019-11-26 19:35:49 -05:00
Deirdre Connolly
49c5265d41
Add Rejected variant to PeerError enum, for now
2019-11-26 19:35:49 -05:00
Deirdre Connolly
bae9347f6e
Rustfmt
2019-11-26 19:35:49 -05:00
Deirdre Connolly
ed77aaacd9
Read and write Reject messages
...
Also change field type to as it's unclear if it actually has
to match the set of enum variants we care about.
2019-11-26 19:35:49 -05:00
dependabot-preview[bot]
4cd185e2ab
Bump serde from 1.0.102 to 1.0.103
...
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.102 to 1.0.103.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.102...v1.0.103 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-24 19:56:15 -08:00
dependabot-preview[bot]
18b83c59c2
Bump chrono from 0.4.9 to 0.4.10
...
Bumps [chrono](https://github.com/chronotope/chrono ) from 0.4.9 to 0.4.10.
- [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.9...v0.4.10 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-24 15:18:53 -05:00
dependabot-preview[bot]
c26bdd262c
Bump pin-project from 0.4.5 to 0.4.6
...
Bumps [pin-project](https://github.com/taiki-e/pin-project ) from 0.4.5 to 0.4.6.
- [Release notes](https://github.com/taiki-e/pin-project/releases )
- [Changelog](https://github.com/taiki-e/pin-project/blob/master/CHANGELOG.md )
- [Commits](https://github.com/taiki-e/pin-project/compare/v0.4.5...v0.4.6 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-20 14:03:40 -05:00
Henry de Valence
f00c16a624
Require that compactsize encodings are canonical.
2019-11-20 11:59:54 -05:00
Henry de Valence
68a6837cc1
Add a bytes round-trip test for compactsize encoding.
2019-11-20 11:59:54 -05:00
Henry de Valence
986b5ee46b
Fix overlapping range in compactsize encoding.
2019-11-20 11:59:54 -05:00
Henry de Valence
ca24aaf58e
Add the seed for the failing proptest case.
2019-11-20 11:59:54 -05:00
Henry de Valence
2b9991e4e7
Add a basic proptest for compactsize encodings.
...
There's a compiler warning about overlapping ranges so this test should catch the bug.
2019-11-20 11:59:54 -05:00
dependabot-preview[bot]
5b1db18a4b
Bump thiserror from 1.0.5 to 1.0.6
...
Bumps [thiserror](https://github.com/dtolnay/thiserror ) from 1.0.5 to 1.0.6.
- [Release notes](https://github.com/dtolnay/thiserror/releases )
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.5...1.0.6 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-19 10:39:57 -08:00
Deirdre Connolly
189d89a7fc
Handle 'mempool' messages as 'GetMempool' requests
...
With a 'Transactions' response that gets turned into an 'Inv(Vec<InventoryHash::Tx>)' message.
We don't yet handle a response from our peer for a 'mempool', which will have to be
a more generic 'Inv' type because we might receive transaction hashes we don't know about yet.
Pertains to #26
2019-11-18 15:55:25 -05:00
Deirdre Connolly
98079c9d77
Support Mempool message
...
This does not yet push requests into services that actually respond with transaction
hashes in our node's mempool, which doesn't exist yet.
Pertains to #26
2019-11-18 15:55:25 -05:00
Henry de Valence
6d79352fb6
Remove nightly toolchain pin since async/await is stable.
2019-11-16 00:11:14 -05:00
Deirdre Connolly
9133b87771
Add copyright marks on each license
2019-11-14 11:50:49 -08:00
Deirdre Connolly
bc2a4218ea
Update README.md
...
Co-Authored-By: Henry de Valence <hdevalence@hdevalence.ca>
2019-11-14 14:33:40 -05:00
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