radicle-heartwood-lfs/radicle-node/src
cloudhead 358324883c
node: Announce offline ref updates
Currently, if refs are updated while the node is stopped, these refs are
not immediately announced when the node starts, due to the node being
unaware of the updates.

To remedy this, on startup, we compare the refs we have in storage with
the refs we announced to the network. Since only our own refs could have
changed while the node was stopped, this change only applies to owned
refs. If we detect that storage has changed while the node was stopped,
we create ref announcements for the updated repos and store them in our
gossip database. These announcements will be included with other
historical gossip announcements when nodes connect to us.

To keep track of what was announced, we store our local node's sync
status in the database. This is also useful when using the `rad sync status`
command, as it tells us what oid our local node is at, and whether it
is aware of our local changes yet.

In addition to this, we make a small fix: previously, inventory and ref
announcements originating from our local node were not stored in the
announcement database. We ensure that they are via the new `announce`
method.
2023-11-20 17:54:36 +01:00
..
runtime radicle: return RefsAt for announce_refs 2023-11-17 16:29:02 +01:00
service node: Announce offline ref updates 2023-11-20 17:54:36 +01:00
test node: Announce offline ref updates 2023-11-20 17:54:36 +01:00
tests fetch: Ignore sigrefs that are behind 2023-11-09 13:12:21 +01:00
wire Update Rust toolchain to 1.74 2023-11-17 16:58:24 +01:00
worker radicle: temporary repository helper 2023-11-16 12:01:10 +00:00
bounded.rs node: loosen BoundedVec::collect_from bounds 2023-11-17 16:09:42 +01:00
control.rs node: `info` announcements 2023-11-17 16:29:29 +01:00
deserializer.rs node: Implement protocol multiplexing 2023-04-10 14:41:55 +02:00
lib.rs radicle: Make addresses.db accessible from profile 2023-06-02 14:49:20 +02:00
logger.rs cli: Implement `rad node start` with support for deamonizing 2023-04-28 14:19:20 +02:00
main.rs node: remove git-daemon code 2023-11-06 12:07:27 +01:00
runtime.rs Update Rust toolchain to 1.74 2023-11-17 16:58:24 +01:00
service.rs node: Announce offline ref updates 2023-11-20 17:54:36 +01:00
signals.rs node: Handle `SIGINT` and `SIGTERM` properly 2023-02-14 13:28:16 +01:00
test.rs node: Create shared test environment 2023-02-07 10:46:12 +01:00
tests.rs node: Announce offline ref updates 2023-11-20 17:54:36 +01:00
wire.rs node: `info` announcements 2023-11-17 16:29:29 +01:00
worker.rs radicle: temporary repository helper 2023-11-16 12:01:10 +00:00