Commit Graph

2932 Commits

Author SHA1 Message Date
Lorenz Leutgeb 0494227e75
rust/edition: 2021 → 2024
Switch from Rust 2021 to Rust 2024.

See <https://doc.rust-lang.org/edition-guide/rust-2024/>.

Regarding the added bound `use<>`, see
<https://blog.rust-lang.org/2024/09/05/impl-trait-capture-rules/>.
2026-03-30 16:56:58 +02:00
Fintan Halpenny edde15d9ea Release 1.8.0 2026-03-26 15:39:22 +00:00
Fintan Halpenny 263d04b5ea schemars: Update to 0.7.0 2026-03-26 15:32:50 +00:00
Fintan Halpenny 597b514d6c remote-helper: Update to 0.16.0 2026-03-26 15:32:43 +00:00
Fintan Halpenny d685d6f91d cli: Update to 0.20.0 2026-03-26 15:32:43 +00:00
Fintan Halpenny 78908682df node: Update to 0.19.0 2026-03-26 15:32:43 +00:00
Fintan Halpenny 6e40a617de protocol: Update to 0.7.0 2026-03-26 15:28:39 +00:00
Fintan Halpenny 5a2e7841c7 fetch: Update to 0.19.0 2026-03-26 15:28:39 +00:00
Fintan Halpenny 9f91817d25 radicle: Update to 0.23.0 2026-03-26 15:25:11 +00:00
Lorenz Leutgeb 46f4c0f38f
protocol/service: Increase timeout for fetches
A timeout of PT3S was empirically found to be too short to allow for the
verification of Signed References, given that this verification is now
potentially much more costly compared to earlier versions.

PT30S should allow fetching reasonably sized histories, even if they
are on feature level "root".

Note that this is not a timeout for the overall fetch process, but
only for inactivity on the channel during an ongoing fetch.
2026-03-25 19:50:27 +01:00
Lorenz Leutgeb e7467fb15f protocol: SignedRefs upgrades provide `SyncedAt`
When upgrading Signed References via `fn upgrad_sigrefs`, the value of
`RepositoryInfo::synced_at` was not updated. Thus, the caller could not
continue with migrated repositories as usual.

Now that enough information about Signed References is propagated, such
as the head of Signed References after upgrade, is available, it is
possible to construct `SyncedAt`.
2026-03-25 08:19:36 +00:00
Lorenz Leutgeb 6d771abfcc radicle/storage/refs: Remove `RefAt::load`
This is a very thin wrapper around `SignedRefs::load_at` which only
has a single usage in all of the workspace. Remove it.
2026-03-25 08:19:36 +00:00
Lorenz Leutgeb ec36d1c3ae radicle/sigrefs: Merge `SignedRefs{,At}`
Since now all callers expect `SignedRefsAt`, merge the two structs
and name the result just `SignedRefs`.
2026-03-25 08:07:49 +00:00
Lorenz Leutgeb 07011233eb radicle/sigrefs: Use `SignedRefsAt` everywhere
To make more information available to callers, prefer returning
`SignedRefsAt` everywhere.
2026-03-25 08:07:49 +00:00
Lorenz Leutgeb d25fb7f672 radicle/sigrefs/git: Refactor `Committer`
Just slightly more code reuse and a constant.
2026-03-25 08:07:49 +00:00
Lorenz Leutgeb 5d583338c8 radicle/sigrefs/git: Use stable `RAD_LOCAL_TIME`
For stable commits, use the same timestamp as the CLI tests do.
This preserves that commits that are created in the Signed References
module appears as "now" in the output.
2026-03-25 08:07:49 +00:00
Lorenz Leutgeb 86cacfb846 radicle: Have migration repair downgrades
Instead of repairing downgrades, automatic migration could fail.
This occurs when attempting to load signed references, and a downgrade
is detected while coalescing `RepositoryInfo`.

Similarly to how fetch recovers, automatic migration must also recover
by detecting for the downgrade error, and allowing the migration to
happen in this case.
2026-03-25 08:01:29 +00:00
Fintan Halpenny 33db6637b4 radicle: Teach `rad sync` and `rad clone` to accept feature levels
Teach the `rad sync` and `rad clone` commands to accept the
`--signed-refs-feature-level` option. This option configures that
fetch to use the minimum feature level provided when fetching from
other nodes. This overrides the value of
`node.fetch.signedReferences.featureLevel.minimum`, and should only be
used in scenarios where it is necessary to downgrade the security of a
fetch for backwards compatibility.


To achieve this, the `Handle::fetch` method introduces an optional
parameter for threading through the `FeatureLevel`.
2026-03-24 15:07:18 +00:00
Fintan Halpenny ef4ddf06c3 node: Remove `radicle_fetch::Config` from `worker::Config`
The configuration options are now passed through to the worker, and
are no longer needed to initialise.
2026-03-24 14:40:42 +00:00
Fintan Halpenny 07f3d56559 protocol: Allow configuration of `radicle_fetch::Config`
The configuration of the fetch process was only achieved at the setup
of the of the node.
This limits the ability to pass configuration options to the fetch
worker while the node service is running.

This change introduces `radicle_protocol::fetcher::state::FetchConfig`
to allow configuration options to be kept track of. This includes the
previous `timeout` option, but now also includes the
`radicle_fetch::Config`.

The service now produces the `FetchConfig` and passes it through to
the fetch worker.
2026-03-24 14:40:42 +00:00
Lorenz Leutgeb 81ca4b9eda fetch: Allow upgrading Signed References
After feature levels are introduced to Signed References, and downgrade
attack protections are implemented, new errors are encountered when
reading Signed References that are in a downgraded state.

Such downgrade errors are recoverable by advancing history in a way that
restores the feature level that the history requires.

However, the implementation in `radicle-fetch` must be adjusted to not
abort fetching on downgraded histories, but rather inspect the error in
this case and decide whether continuing the fetching process would
actually help recover from the downgraded state.

The two cases are treated slightly differently for non-delegates and
delegates. Since delegates are crucial for evaluating repository
identity, also the fact that they cannot recover from a downgraded state
is logged at the "info" level.
2026-03-24 14:40:42 +00:00
Lorenz Leutgeb e245e3115b fetch: Configure Minimum Feature Level
Add a configuration knob `node.fetch.signedReferences.featureLevel.minimum` to
allow node operators to enforce more strict verification when fetching
Signed References.
2026-03-24 14:40:42 +00:00
Lorenz Leutgeb 47063057a8 radicle/sigrefs: Automatically Migrate
In order to allow automatic migration to the feature level 'parent',
introduce a way to force writing signed references, even if the
user-controlled refs are unchanged.

To detect the special case of a Signed References history with a single
and root commit (which would otherwise be detected as feature level
'parent', even though the `refs/rad/sigrefs-parent` ref cannot be
written), keep information about the parent commit in `SignedRefs`.

The output of `rad inspect --sigrefs` is changed to match the more
strict interpretation of the feature level for histories with a single
and root commit.
2026-03-24 14:40:42 +00:00
Lorenz Leutgeb 8b166b2327 fetch: Log on old sigrefs
In hopes of nudging users to upgrade, print a warning if older feature
levels are encountered. However, only do this for delegates, as these
are more critical for the repository, to not log too many warnings.
2026-03-24 14:40:42 +00:00
Lorenz Leutgeb 7fb032da9b cli/inspect: Show feature level of sigrefs
In order for users to be able to inspect the feature level of Signed
References in a repository, have `rad inspect --sigrefs` attempt to
load Signed References, and, if successful, print the feature level.
2026-03-24 14:40:42 +00:00
Lorenz Leutgeb 404fe33a88 radicle/sigrefs: Remove `MissingIdentity` error
Feature levels now treat this situation.
2026-03-24 14:40:42 +00:00
Lorenz Leutgeb 7f19044a72 radicle/sigrefs/write: Treat error to verify head
To prevent from inability to write sigrefs in case of a verification
error, swallow verification errors about the head commit, log, and
carry on writing.
2026-03-24 14:40:42 +00:00
Lorenz Leutgeb 8bc3ffc0b0 radicle/sigrefs: Detect features when writing
In order to respond to the caller with the correct feature level in
case sigrefs are to be saved but unchanged, the write side needs to
care about feature levels. This is done by sharing more code with the
read side.
2026-03-24 14:40:42 +00:00
Lorenz Leutgeb 372a78754a radicle/sigrefs: Implement feature detection
To be able to reason about backwards compatibility, downgrade attacks,
and future configurable enforcement of minimum required (security)
features, introduce the concept of a "feature level" in Signed
References.

In this implementation feature levels are assumed to be monotonic, i.e.,
that higher feature levels behave like lower ones, and only add
semantics on top.

Implementing this as an `enum` that is `Ord` flows nicely.

Treatment of the write-side is left for the next commit. Currently,
the write side "promises" `FeatureLevel::Parent`, but is not able
to "keep the promise", since it does not actually inspect the
feature level of the head in case it is unchanged.

CHANGELOG
2026-03-24 14:40:42 +00:00
Lorenz Leutgeb 9a4539fe82 radicle/sigrefs: Find first non-replayed commit
The scenario A₁ ← B₁ ← A₂ ← B₂ would previously have resulted in A₁
being loaded. This is undesriable, since the latest non-replayed commit
is B₁.

The information regarding the order of duplicates, which is preserved by
`seen`, can be used to recover the first commit.
2026-03-24 14:40:42 +00:00
Lorenz Leutgeb b5dc3486db node/wire: Remove `FetchResult` log
Logs produced by this log statement are very hard to decipher, remove
in favour of other logs in the service.
2026-03-24 14:40:10 +00:00
Lorenz Leutgeb 14493cbfbf core: Enable `radicle-oid/qcheck`
Dependents likely expect this.
2026-03-24 13:01:25 +00:00
Fintan Halpenny 9fda8c6d8f radicle: Update to 0.22.1 2026-03-20 16:15:32 +00:00
Fintan Halpenny d9915d275f Release 1.7.1 2026-03-19 21:07:51 +00:00
Adrian Duke c627e68fdb node/reactor: Demote reactor lag log to DEBUG
Demote from WARN to DEBUG as no actions to remedy can be taken by users.
2026-03-19 21:07:51 +00:00
Lorenz Leutgeb a6a3716f5d radicle/node/db: Fix type of IPv6 addresses
Due to a bug introduced in `df8e4e6c88a8bfb6c1ec6b07dcda64093b477cbe`, IPv6
addresses in the configuration file might have ended up in the database
tagged with `type = "dns"`, which is incorrect. The bug was fixed in
`a2e72b48e79d090d33f6c13c485239947de0522e`.

However, Radicle 1.7.0 was released in between those two versions, so a
this migration to repair the entries is added.

Tests are added in `test::migration_8` module. This requires some test
setup, mainly a `Database::memory_up_to_migration` constructor that is only
available to test code.
2026-03-19 21:07:51 +00:00
Lorenz Leutgeb fa1699e5d0 radicle/sigrefs: Revert strict verification of `refs/rad/root`
More sigrefs on the network than previously thought actually are missing
the reference `refs/rad/root`. Revert the change to make this an error,
which was part of commit `d3bc868e84c334f113806df1737f52cc57c5453d`.
2026-03-19 21:07:46 +00:00
Fintan Halpenny d01ff2e79d radicle/node: Do not error on IPv6 without `[]`
IPv6 addresses are already persisted in `config.json` files.
The parsing of these old addresses, e.g. `FE80::0202:B3FF:FE1E:8329:5976` should remain valid.
Emit a warning when they are found.
The output of the address will still enclose the host in `[]`.
2026-03-19 11:52:04 +01:00
Lorenz Leutgeb c237a3fe47
radicle: Fix JSON Schema for `node::Address`
JSON Schema generation via `schemars` was accidentally broken in
`a2e72b4`. Restore the schema.
2026-03-19 00:38:03 +01:00
Fintan Halpenny 9fd4f00c23 remote-helper: Update to 0.15.0 2026-03-18 20:53:00 +00:00
Fintan Halpenny d7e7db35ed cli: Update to 0.19.0 2026-03-18 20:53:00 +00:00
Fintan Halpenny 026dcdb24a node: Update 0.18.0 2026-03-18 20:53:00 +00:00
Fintan Halpenny a9c1c6ef54 protocol: Update to 0.6.0 2026-03-18 20:53:00 +00:00
Fintan Halpenny 8660b2f004 fetch: Update to 0.18.0 2026-03-18 20:53:00 +00:00
Fintan Halpenny 4a731e34e1 radicle: Update to 0.22.0 2026-03-18 20:52:18 +00:00
Fintan Halpenny dafd3527ee git-metadata: Update to 0.2.0 2026-03-18 20:52:18 +00:00
Fintan Halpenny c9450fe84a cob: Update to 0.19.0 2026-03-18 20:44:25 +00:00
Fintan Halpenny 244be71596 core: Update to 0.2.0 2026-03-18 20:44:25 +00:00
Fintan Halpenny 6745865197 crypto: Update to 0.16.0 2026-03-18 20:44:25 +00:00
Defelo a2e72b48e7
node: Serialize and deserialize ipv6 addresses in square brackets 2026-03-18 21:07:10 +01:00