Commit Graph

125 Commits

Author SHA1 Message Date
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 a06ed9f6de
Statically link sqlite3 2022-10-12 13:27:45 +02:00
Alexis Sellier fde0af09f7
Handle errors correctly in storage
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-10-11 09:31:48 +02:00
Alexis Sellier d652df7c30
node: Handle error in handshake call
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-10-10 14:47:50 +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 78545c2f0f
Implement routing table pruning functions
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-10-08 13:45:15 +02:00
Alexis Sellier b8c2ab5316
Switch to a lighter sqlite dependency
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-10-08 12:13:59 +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 15f525299e
Add commnads to query internal service state
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-10-04 21:07:57 +02:00
Alexis Sellier af06ad6451
Use message timestamp for filtering
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-09-29 10:48:41 +02:00
Alexis Sellier e35ec2f715
Rebroadcast logic for stored gossip messages
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-09-29 10:02:52 +02:00
Slack Coder f9ad3ac155 git: Use RefString types for git::refs
Lean on rust's type system to improve safety.

Signed-off-by: Slack Coder <slackcoder@server.ky>
2022-09-28 16:11:03 -05:00
Alexis Sellier 27e39c0df5
Make `Id` a `Copy` 2022-09-27 14:13:20 +02:00
Alexis Sellier ca2f766d19
Add `Profile::connect`
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-09-26 14:27:56 +02:00
Alexis Sellier 8605946703
node: Add CLI options 2022-09-26 11:25:20 +02:00
Alexis Sellier 116eaa79e6
Use `Profile` in client
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-09-23 20:21:21 +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 7169881849
Remove peer timestamp
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-09-22 18:17:51 +02:00
Alexis Sellier 1fa85f0da3
Rename `Peer` to `Session`
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-09-22 17:49:20 +02:00
Alexis Sellier e382bc4eb9
Remove `Project` type
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-09-22 15:59:20 +02:00
Alexis Sellier c2b599f068
Implement node handle to control node
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-09-22 12:36:12 +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