Dr. Maxim Orlovsky
3e48548745
Integrate framing and muxer into wire protocol
2022-11-21 16:05:53 +01:00
Dr. Maxim Orlovsky
13c9491e49
Implement framer and multiplexer
2022-11-21 16:05:53 +01:00
Dr. Maxim Orlovsky
983b2dc534
Two-stage connectivity with handshake
2022-11-21 16:05:53 +01:00
Dr. Maxim Orlovsky
4d77f95c21
Disconnect peers on failed handshakes
2022-11-21 16:05:53 +01:00
Dr. Maxim Orlovsky
e9ae5897f7
Complete transcoder
...
* Encode/encrypt data sent to the remote peer
* Remove unused Transport
* Rename Decoder -> Deserializer
2022-11-21 16:05:53 +01:00
Dr. Maxim Orlovsky
56fb4d67a9
Introduce transcoder parameter to Wire & Transport
2022-11-21 16:05:53 +01:00
Dr. Maxim Orlovsky
6b87eed670
Identify remote peers by full `SocketAddr`
...
Wire inboxes were kept per IP address. However, there could be multiple peers
connecting from the same IP (for instance, if it is an IP of a NAT).
2022-11-21 16:05:53 +01:00
Alexis Sellier
45c7f3049b
Update to Rust 1.65
...
* Use new let-else syntax
* Fix new clippy lints
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-05 12:47:26 +01:00
Alexis Sellier
6f3a598cc1
Remove `git-url` dependency
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-10-31 18:14:54 +01:00
Alexis Sellier
2a1154ef87
Re-work git transports
...
The changes in this commit are all intertwined and it was hard to
split them into smaller commits:
* Use custom transports everywhere
Instead of `file://` and instead of using a child process for fetching
and pushing; we go through our custom transports, which use the `rad://`
and `heartwood://` schemes.
* Introduce a 'mock' remote transport
To test the remote transport without needing to spawn TCP streams,
we add a mock transport that works between storages on the file
system.
* Get rid of node's `git-url`
Instead of git urls, nodes simply use their node-ids to replicate.
2022-10-26 21:40:19 +02:00
Alexis Sellier
c306392d13
Improve wire module
...
* Set `Size` correctly to `u16`
* Remove `usize` support, since it's OS-dependent
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-10-18 13:04:12 +02:00
Alexis Sellier
07add86bb6
node: Handle node announcements
...
To build an address book, peers communicate via gossip, sending
`NodeAnnouncement` messages.
These need to be handled by storing the addresses in an address book
and the addresses need to be persisted to disk.
Node announcement messages should also be relayed to peers like other
gossip messages.
2022-10-14 11:58:17 +02:00
Alexis Sellier
832c6ad53f
Improve error handling in a few places
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-10-10 11:29:22 +02:00
Alexis Sellier
e909e04c6c
Implement proper `node::Features` type
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-10-07 22:49:58 +02:00
Alexis Sellier
2d52a53ce5
Add variable bloom filter sizes
...
This should help small nodes waste less bandwidth, while standardizing
on set sizes.
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-10-05 15:58:34 +02:00
Alexis Sellier
85ac8a1d4d
Implement routing table persistence
...
Uses SQLite for persistence.
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-10-05 12:13:12 +02:00
Alexis Sellier
fcb1007f9d
Refactor service
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-09-23 15:43:55 +02:00
Alexis Sellier
46501507be
Split repository into two creates
...
* `radicle`: core library
* `radicle-node`: node
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-09-21 15:11:17 +02:00
Alexis Sellier
d1ccf1b807
node: Rename folder to `radicle-node`
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-09-21 11:38:09 +02:00