Alexis Sellier
98f7fe1db8
node: Rename `GIT_RESET` env var
2023-01-30 18:23:24 +01:00
Alexis Sellier
c1a749e09e
node: Make git-daemon errors more apparent
2023-01-30 14:07:31 +01:00
Alexis Sellier
03b94c81a0
node: Make git daemon listen configurable
2023-01-30 13:47:09 +01:00
Alexis Sellier
498a5c4e4a
node: Handle `fetched` differently if initiated
2023-01-30 13:22:33 +01:00
Alexis Sellier
3aa105afda
node: Return error if remote errors
...
Instead of simply breaking out of the loop, log and return an error.
2023-01-30 13:15:33 +01:00
Alexis Sellier
0726c553da
node: Run git fetch without any user config
2023-01-30 12:35:08 +01:00
Alexis Sellier
a0910f7593
Cleanup old `fetch` code
...
We only use the old code in the simulator now.
2023-01-30 12:26:29 +01:00
Alexis Sellier
be77eebc3d
node: Only try to fetch from connected nodes
2023-01-30 11:20:33 +01:00
Alexis Sellier
ac23f45d9b
node: Cleanup working naming
2023-01-29 21:41:16 +01:00
Alexis Sellier
7d5347b74f
node: Document worker a little more
2023-01-29 21:34:40 +01:00
Alexis Sellier
b92dc59204
node: Turn off `--atomic` when not supported
2023-01-29 18:22:41 +01:00
Alexis Sellier
33d8c35189
node: Move some code to `Runtime::run`
2023-01-29 17:39:46 +01:00
Alexis Sellier
23cf44f4c7
node: Rename `client` module to `runtime`
2023-01-29 17:33:07 +01:00
Alexis Sellier
02be334144
node: Use `git-daemon` as backend
2023-01-29 17:26:01 +01:00
Alexis Sellier
d9e1055067
Improve logging
2023-01-28 23:58:16 +01:00
Alexis Sellier
deeb160c2d
node: Improve stderr logging for git process
2023-01-27 17:04:20 +01:00
Alexis Sellier
be95222fb5
node: Fix bug in upload-pack
...
We were not properly exiting one of the threads that was copying
data from the stream to the upload-pack process. This is a fix.
2023-01-27 15:09:17 +01:00
Alexis Sellier
026dfbde5d
node: Improve logging output
2023-01-26 18:15:27 +01:00
Alexis Sellier
405c00b91d
Update all dependencies
...
Also moves `netservices` to `crates.io`
2023-01-25 20:38:54 +01:00
Alexis Sellier
798485dfb1
Remove "log" feature from netservices
2023-01-25 20:12:13 +01:00
Alexis Sellier
30e9d6103c
Cleanup `clone` code
...
Remove a bunch of different instances of it.
2023-01-25 17:51:49 +01:00
Alexis Sellier
cdc3c8a265
node: Try to cleanup socket file on exit
...
Signed-off-by: Alexis Sellier <self@cloudhead.io>
2023-01-25 17:51:49 +01:00
Alexis Sellier
b4f44f39f2
Update `netservices` dependency
2023-01-25 15:35:24 +01:00
Alexis Sellier
963ad3c3d7
Get `rad clone` working correctly
2023-01-25 11:35:20 +01:00
Alexis Sellier
c888f40660
node: Respond to `announce-refs` control
2023-01-25 10:21:57 +01:00
Alexis Sellier
d324eab377
node: Remove control socket at the end
2023-01-25 10:21:57 +01:00
Alexis Sellier
fea14ff7b3
Update `clone` functionality for new replication
2023-01-25 10:21:57 +01:00
Alexis Sellier
ef950d515a
node: Fully integrate worker fetch into service
2023-01-25 10:21:57 +01:00
Alexis Sellier
ec2e7d7ee1
node: Refactor fetch response code
...
Only user-requested fetches require a response.
Signed-off-by: Alexis Sellier <self@cloudhead.io>
2023-01-25 10:21:57 +01:00
Alexis Sellier
e6f56ff3bc
Update `io-reactor` dependency
2023-01-25 10:21:57 +01:00
Alexis Sellier
3aff91f9b7
Correctly initialize home in `Profile::init`
2023-01-22 13:39:48 +01:00
Alexis Sellier
8318b07d89
node: Fix spurious test failures
...
In some circumstances, the nodes are already offline when the objects
are dropped.
Signed-off-by: Alexis Sellier <self@cloudhead.io>
2023-01-19 10:20:23 +01:00
Alexis Sellier
3bc07195f5
Migrate to `localtime` from `nakamoto`
...
The only thing we needed nakamoto for was `LocalTime`.
Signed-off-by: Alexis Sellier <self@cloudhead.io>
2023-01-18 18:03:11 +01:00
Alexis Sellier
d25c47ad0e
node: Get rid of worker response channel
2023-01-18 17:45:46 +01:00
Alexis Sellier
7e55ed346a
node: Update log target to match type name
...
Signed-off-by: Alexis Sellier <self@cloudhead.io>
2023-01-18 17:45:46 +01:00
Alexis Sellier
067b532154
node: Get replication test to pass
...
Signed-off-by: Alexis Sellier <self@cloudhead.io>
2023-01-18 17:45:46 +01:00
Alexis Sellier
723cdcf233
node: Update `io-reactor`
...
Signed-off-by: Alexis Sellier <self@cloudhead.io>
2023-01-18 17:45:46 +01:00
Alexis Sellier
b9484b6832
node: Implement graceful shutdown
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2023-01-18 17:44:16 +01:00
Alexis Sellier
f33e79f14b
node: Fix redundant announcements
...
This change makes sure that nodes don't gossip announcements back to
the announcers.
Since the tests were relying on this mechanism to populate the routing
table, we had to change a few more things, such as adding the inventory
to the node's routing table.
Signed-off-by: Alexis Sellier <self@cloudhead.io>
2023-01-18 08:48:33 +01:00
Alexis Sellier
3d04849b7b
node: Properly parse replication data
...
Fix all of the `FIXME` in the worker.
Signed-off-by: Alexis Sellier <self@cloudhead.io>
2023-01-17 12:59:00 +01:00
Alexis Sellier
df9346fefb
node: Fix E2E tests
...
The tests were flaky because the routes are sampled at a moment
when gossip could still be happening. Instead, we check the
local inventory directly to build the expected routing table.
Signed-off-by: Alexis Sellier <self@cloudhead.io>
2023-01-17 12:59:00 +01:00
Alexis Sellier
3bedb4438e
node: Fix a few logging-related things
...
Signed-off-by: Alexis Sellier <self@cloudhead.io>
2023-01-17 11:01:36 +01:00
Alexis Sellier
97d4729fa4
Switch to crates.io for `cyphernet`
2023-01-17 11:01:36 +01:00
Alexis Sellier
be9def8b11
Rename `profile::Paths` to `profile::Home`
...
This makes the intent clearer.
Signed-off-by: Alexis Sellier <self@cloudhead.io>
2023-01-17 11:01:36 +01:00
Alexis Sellier
d31968509d
Speed up node E2E tests
...
By allowing the node to run using a `MockSigner`, we speed up tests
significantly, since PBKDF2 doesn't need to run.
Signed-off-by: Alexis Sellier <self@cloudhead.io>
2023-01-17 11:01:36 +01:00
Alexis Sellier
741f7c9651
node: Rename `Transport` to `Wire`
...
Signed-off-by: Alexis Sellier <self@cloudhead.io>
2023-01-17 11:01:36 +01:00
Alexis Sellier
63e7248847
node: Complete Noise handshake integration
...
Co-authored-by: Dr. Maxim Orlovsky <dr.orlovsky@gmail.com>
Signed-off-by: Alexis Sellier <self@cloudhead.io>
2023-01-17 11:01:36 +01:00
Alexis Sellier
1aba9812c7
node: Request recent messages on connection
...
Instead of only being interested in messages from "now", we request
messages from one hour in the past up to now. This lets nodes catch
up on state more quickly, without having to wait for new announcements.
Signed-off-by: Alexis Sellier <self@cloudhead.io>
2023-01-17 11:01:36 +01:00
Alexis Sellier
6d420813f5
node: Fix attempted session state
...
We shouldn't be marking attempted peers as "connected". We should wait
for the connection to be properly established.
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2023-01-13 15:44:01 +01:00
Alexis Sellier
438ae84304
node: Implement E2E node test
...
There are few unrelated changes in this commit that I wasn't able to
split out, mostly due to laziness, so I'll list them here:
* The node startup logic is moved out of the main function, and into a
dedicated functionin `client.rs`.
* There is a tentative worker implementation that is untested, and
handles git replication both ways. It's likely lacking in various ways
but I wanted to get it in there anyway.
* `Address` was moved from `radicle-node` to `radicle`, because it's
needed to send `Connect` commands from the node handle.
* The `netservices` dependency was updated.
* Finally, there is a first end-to-end node test, which currently
doesn't use NoiseXK, but uses the new reactor in `netservices`.
Signed-off-by: Alexis Sellier <self@cloudhead.io>
2023-01-12 20:34:31 +01:00