Commit Graph
3259 Commits
Author SHA1 Message Date
Lorenz Leutgeb 16de8f1950 README: Add references to downstream packages 2026-08-14 15:31:36 +02:00
Lorenz Leutgeb d7d9df27a5 debian: Remove
According to Lars Wirzenius, this is not required anymore, as it was
made redundant by `rad:z2nDKoCF4hg6xVrv7v93LmWHDJKUr`.

See also
<https://radicle.zulipchat.com/#narrow/channel/369277-heartwood/topic/Removal.20of.20.60debian.60.20directory/with/616115121>
2026-08-14 15:21:12 +02:00
David Sommerseth 2a9b5e72e9 cargo/spin: 0.9.8 → 0.9.9
Version 0.9.8 of `spin` was yanked. See also
<https://rustsec.org/advisories/RUSTSEC-2023-0031.html>.
and <https://github.com/zesterer/spin-rs/issues/148>.
2026-08-14 15:07:05 +02:00
Lorenz Leutgeb 71f39fb195 Release 1.10.1 releases/1.10.1 2026-08-12 16:55:28 +02:00
Lars WirzeniusandShawn Webb 52ac5d3b3e cli/debug: Add hardenedBsd detection
This is conditional on the target operating system being FreeBSDs.
HardenedBSD is FreeBSD but with changes. We determine which one it is,
by running 'sysctl --values hardening.version'.

Co-authored-by: Shawn Webb <shawn.webb@hardenedbsd.org>
2026-08-12 16:42:48 +02:00
Lars Wirzenius 9f05038234 cli/debug: Output /etc/os-release if available 2026-08-12 16:42:18 +02:00
Lorenz Leutgeb d18293c6ad cli/test: Do not accidentally test rad debug
The tests `rad-warn-ipv6.md` and `rad-warn-old-nodes.md` are meant to
primarily test the output of warnings. They test the output twice, via
`rad debug` and via `rad node status`.

Testing the output via one command should be sufficient.
2026-08-12 16:14:34 +02:00
Lorenz Leutgeb 4e3c274468 crypto, node: Randomly generate ephemeral keys 2026-08-12 15:28:40 +02:00
Lorenz LeutgebandKonstantinos Maninakis 4fff390c32 crypto: Use VerifyingKey::verify_strict
Refer to
<https://docs.rs/ed25519-dalek/2.2.0/ed25519_dalek/struct.VerifyingKey.html#method.verify_strict>.

Co-authored-by: Konstantinos Maninakis <maninak@protonmail.com>
2026-08-12 15:28:40 +02:00
Daniel NormanandLorenz Leutgeb d4acccf614 protocol/service: Check visibility on Subscribe
When `Service::handle_message` handles `Message::Subscribe`, constraints
regarding visibility of repositories are not considered, this leads to
leaking RIDs of private repositories.

Add a corresponding check.

Add a test to verify that reference announcements relayed via subscribe
correctly apply visibility filtering, there by ensuring references of
private repositories are only propagated to nodes on the allow list.

The test regarding deduplication needs a fix: Ensure that all mock
repositories are public and in storage so that they do not
get filtered out in case of unknown visiblity.

Co-authored-by: Lorenz Leutgeb <lorenz.leutgeb@radicle.dev>
2026-08-12 15:28:40 +02:00
Lorenz Leutgeb 6ba619f9a6 build/config: Link -dead_strip_dylibs on macOS 2026-08-06 17:31:04 +02:00
Lorenz Leutgeb 4641c342c6 Release 1.10.0 releases/1.10.0 2026-08-05 15:32:21 +02:00
Adrian Duke 1a5dfc2616 surf: Fix flakey test with sorted vector 2026-08-05 13:22:09 +02:00
Fintan Halpenny 4f7bde023c surf: Ignore Rust and JSON examples
The examples do not import everything necessary to compile, so the doctests will
fail using `no_run`.

Instead, use `ignore` instead so that it does not attempt to compile the examples.
2026-08-05 13:18:19 +02:00
Lorenz Leutgeb a2eb756887 cli/id: Introduce rad id cache
Similar to `rad [issue|patch] cache`, this will re-compute cached state
about the identity document. The identity COB does not cache to SQLite,
but there is `refs/rad/id`, which can become stale.
2026-08-04 19:42:13 +02:00
Adrian Duke ca1b4fa7bc cli/id: Add verbose output to show and list 2026-08-04 19:34:56 +02:00
Adrian Duke c830053e32 cli/id: Incorporate reason for rejection 2026-08-04 19:34:34 +02:00
Lorenz Leutgeb 71a91042d9 cargo/workspace: Bump crate versions
In topological order:

 - radicle-git-metadata     0.2.0 →  0.2.1
 - radicle-git-ref-format   0.1.0 →  0.2.0
 - radicle-oid              0.2.1 →  0.2.2
 - radicle-crypto          0.18.0 → 0.19.0
 - radicle-surf            0.28.0 → 0.29.0
 - radicle-cob             0.21.0 → 0.21.1
 - radicle-core             0.4.0 →  0.4.1
 - radicle                 0.25.0 → 0.25.1
 - radicle-signals         0.12.0 → 0.12.1
 - radicle-fetch           0.21.0 → 0.21.1
 - radicle-term            0.19.0 → 0.19.1
 - radicle-protocol         0.9.0 →  0.9.1
 - radicle-cli-test        0.14.0 → 0.14.1
 - radicle-node            0.21.0 → 0.21.1
 - radicle-cli             0.22.0 → 0.23.0
 - radicle-schemars         0.9.0 →  0.9.1
 - radicle-remote-helper   0.18.0 → 0.18.1
2026-07-24 21:37:41 +02:00
Lorenz Leutgeb ac607c8cad git-ref-format: Integrate with workspace
Instead of depending on `git-ref-format-core`, the
`radicle-git-ref-format` crate succeeds it.
2026-07-24 16:31:30 +02:00
Lorenz Leutgeb 8731d01bca git-ref-format: Copy over from radicle-git
This is the result of

    cp -r \
      ../radicle-git/radicle-git-ext/git-ref-format/core/src/{{cbor,check,deriv,lit,name,refspec,serde}.rs,{name,refspec}} \
      crates/radicle-git-ref-format/src/

with the radicle-git workspace at commit
8c5df5ecbd3f2507d323608b52e1fbf7b177d864.
2026-07-24 16:27:02 +02:00
Lorenz Leutgeb 36fc031da2 surf: Switch to crate in workspace
Now that `radicle-surf` lives in this workspace, use it.
2026-07-24 16:27:02 +02:00
Lorenz Leutgeb f8b5bde40a surf: Refactor
Refactor the `radicle-surf` crate to use OIDs from `radicle-oid` instead
of `radicle-git-ext`, and `radicle-git-ref-format` instead of re-exports
from `radicle-git-ext`. Also remove the dependency `radicle-std-ext`.

This requires changing `use`s, and an ad-hoc reimplementation of
`ResultExt::or_matches`.

The remaining changes (excl. tests) are automatic via `rustfmt` and
`cargo clippy`.

For testing, implement reconstruction of

    https://github.com/radicle-dev/git-platinum

in particular of the commits
 - a0dd9122d33dff2a35f564d564db127152c88e02
 - 27acd68c7504755aa11023300890bb85bbd69d45
 - e972683fe8136bf8a5cb2378cf50303554008049
and some tags.

`…/src/test/roundtrip.rs` was copied from the `test-helpers` crate in
the radicle-git workspace.

`…/src/test/{repository.rs,gen*}` was copied from the `radicle-git-ext`
crate in the radicle-git workspace.
2026-07-24 16:27:02 +02:00
Lorenz Leutgeb e880810e48 surf: Move test files into place
In the radicle-git workspace, crates brought their own testing crates
along with them, usually in a subdirectory named "t". In the heartwood
workspace we use tests within the same crate.

This commit only moves files, so that it is easier to follow changes to
them in the upcoming commit.
2026-07-24 16:09:56 +02:00
Lorenz Leutgeb 0ef1f0714d surf: Copy over from radicle-git
This is the result of a simple

    cp -r ../radicle-git/radicle-surf/ crates
    rm -r crates/radicle-surf/{data,scripts,build.rs}

with the radicle-git workspace at commit
8c5df5ecbd3f2507d323608b52e1fbf7b177d864.
2026-07-24 16:09:55 +02:00
Lorenz Leutgeb 64a028353b scripts/just/check-ellipses: Replace less
Replacing all "..." with "…" is too aggressive.
2026-07-23 22:16:01 +02:00
Lorenz Leutgeb e9b999e2dd protocol: Calm typos
The `typos` spell-checker complains about "[T]ype" and "[I]nitiator".

Reformulate the comment to work around the issue.
2026-07-23 22:13:56 +02:00
Lorenz Leutgeb 474b7f3693 cargo/workspace: Add "no-std" category
Add the "no-std" category package metadata to all crates that are
`no_std`.
2026-07-22 16:44:59 +02:00
Lorenz Leutgeb a71f3b7295 cargo/workspace: Remove workspace version
No crate actually inherits this version number, remove it.
2026-07-22 16:44:59 +02:00
Lorenz Leutgeb e373f80d08 cargo/workspace: Add repository metadata
Some `/crates/*/Cargo.toml` were missing to inherit repository package
metadata from `/Cargo.toml`.
2026-07-22 16:44:59 +02:00
Lorenz Leutgeb a0551416f9 cargo/workspace: Remove homepage
In `/Cargo.toml` and all `/crates/*/Cargo.toml`, remove homepage package
metadata. This field is inteded to carry the *homepage of the crate*. In
our case, no crate has an actual homepage on its own.
2026-07-22 16:44:58 +02:00
Lorenz Leutgeb 69a4da6ffb cargo/workspace: Reorder package metadata
In all `/crates/*/Cargo.toml`, split package metadata into two or three
blocks:

 1. name, version, and description (in this order)
 2. Further metadata defined per crate.
 3. References to the workspace.

Lines in blocks (2.) and (3.) are sorted lexicographically, and blocks
are separated by empty lines.
2026-07-22 16:44:58 +02:00
Lorenz Leutgeb 024006297d cargo/workspace: Remove package.authors metadata
This field is deprecated, see
<https://doc.rust-lang.org/cargo/reference/manifest.html#the-authors-field>.
2026-07-22 16:44:58 +02:00
Lorenz Leutgeb caf45f1525 cli: Tighten visibility and minimize pub use
In `radicle-cli`, which is a binary crate (!) a few `pub use`s can be
removed. This forces `radicle-remote-helper` to depend on the library
crate `radicle-term` to access some of the types that were re-exported
from `radicle-cli`, making the dependency more obvious, and minimizing
the public symbols on `radicle-cli`.

The dependency on `radicle-cli` cannot be removed from
`radicle-remote-helper` easily, so is kept.
2026-07-22 16:43:34 +02:00
Lorenz Leutgeb c2af4b5982 signals: Fix Windows
Commit `41d776be4120df9f84633f1d54c1a1de27624c4e` accidentally broke
`radicle-signals` by a simple confusion of
`std::sync::mpsc::{,Sync}Sender`.
2026-07-22 16:26:47 +02:00
Lorenz Leutgeb 2ae6301f86 cargo/workspace: Bump crate versions
In topological order:

 - radicle-crypto         0.17.0 → 0.18.0
 - radicle-oid             0.2.0 →  0.2.1
 - radicle-cob            0.20.0 → 0.21.0
 - radicle-core            0.3.0 →  0.4.0
 - radicle                0.24.0 → 0.25.0
 - radicle-signals        0.11.0 → 0.12.0
 - radicle-fetch          0.20.0 → 0.21.0
 - radicle-log             0.1.0 →  0.2.0
 - radicle-term           0.18.0 → 0.19.0
 - radicle-protocol        0.8.0 →  0.9.0
 - radicle-cli-test       0.13.0 → 0.14.0
 - radicle-node           0.20.0 → 0.21.0
 - radicle-cli            0.21.0 → 0.22.0
 - radicle-schemars        0.8.0 →  0.9.0
 - radicle-remote-helper  0.17.0 → 0.18.0
2026-07-22 13:12:19 +02:00
Lorenz Leutgeb 008b1a25e1 flake/nixpkgs: 25.11 → 26.05
Running `cargo semver-checks` errors with

    error: unsupported rustdoc format v57 for file:
    …/heartwood/target/semver-checks/local-radicle-…/target/doc/radicle.json
    (supported formats are v53, v55, v56)

Support for rustdoc format v57 is part of cargo-semver-checks 0.46,
which is not part of NixOS 25.11, which has reached EOL.

Re-point the "nixpkgs-stable" input to NixOS 26.05 to reach a newer
cargo-semver-checks and a NixOS version that is supported.

Update the flake.
2026-07-22 13:12:19 +02:00
Lorenz Leutgeb ee8b7919fc crypto: Add conditions for PublicKey::to_bytes 2026-07-22 13:12:14 +02:00
Lorenz Leutgeb 0a2981d78d term: Fix features for zeroize
In `df6524e7e21027c4eb128dd2eaab0a6d70a6d76d`, default features for
`zeroize` were disabled for the workspace in `/Cargo.toml`, accidentally
affecting `radicle-term`, since `radicle-term` depends on
`impl Zeroize for String` which is available on feature "alloc" only.
2026-07-22 12:51:07 +02:00
Lorenz Leutgeb a87e0bd1c8 build/Dockerfile: Install Zig via apk releases/1.10.0-rc.2 2026-07-21 14:23:23 +02:00
Lorenz Leutgeb 8d50b75826 build/Dockerfile/zig: 0.13.0 → 0.16.0 2026-07-21 14:23:23 +02:00
Lorenz Leutgeb 4751432b3c build/Dockerfile: Specify Registry docker.io
Make explicit that Docker Hub is used.
2026-07-21 14:23:23 +02:00
Lorenz Leutgeb 828bfd02fa build/Dockerfile: Re-use $ALPINE_VERSION
Use the same version of Alpine Linux for building and packaging.
2026-07-21 14:23:00 +02:00
Lorenz Leutgeb 394ade5576 build/Dockerfile/alpine: 3.24 → 3.24 2026-07-21 13:48:12 +02:00
Lorenz Leutgeb 0f8e1cc597 build/Dockerfile: Omit default RUST_VERSION
The Rust version used for development is tracked in
`/rust-toolchain.toml`, and the value specified there is used to set
`RUST_VERSION` in the `build/build` script. Thus, when using
`build/build`, the default value is unimportant.

However, ensuring that the default value remains consistent with
`/rust-toolchain.toml` is a maintenance burden.

Remove the default value. This increases friction of building without
`build/build`, but makes maintenance easier.
2026-07-21 13:47:40 +02:00
Lorenz Leutgeb e0dc14de2b protocol/handle: Responder in Command::Block
Other variants of `Command` use `Responder` respond with data.
`Command::Block` does not.

Change `Command::Block` to be in line with other variants.
2026-07-21 13:25:25 +02:00
Lorenz Leutgeb 3658ece34f node/test: Clean up
Adjusting visibility and conditional compilation for the modules in
`radicle_node::test` allows some dead code elimination.
2026-07-21 12:32:42 +02:00
Lorenz Leutgeb 8efbf06f78 node: Clean up uses
The re-exports from other crates got quite confusing.

Remove all `pub use` from `radicle-node`, and rewrite all `use`s
accordingly.

The result is a slight increase in the number of `use` lines, but with
improved clarity on which type is actually imported.
2026-07-21 12:31:48 +02:00
Lorenz Leutgeb 9eeecacf28 node: Remove re-export …::node::PROTOCOL_VERSION
It appears that `radicle_node::PROTOCOL_VERSION` (which is a re-export
of `radicle::node::PROTOCOL_VERSION` is the only symbol exported from
`radicle-node` that is used in `radicle-cli` (except tests).

Since `radicle-cli` depends on `radicle` anyway, it is questionable how
much sense that re-export and use from a binary crate (!) makes.

Remove the re-export.
2026-07-21 12:28:10 +02:00
Lorenz Leutgeb f45a96f0e9 cargo/dev: Optimize compute-heavy dependencies 2026-07-21 09:19:01 +02:00
Lorenz LeutgebandFintan Halpenny df6524e7e2 crypto: Rewrite
Reasons for the rewrite:
 - Migrate away from `ec25519` as our implementation of Ed25519,
   because that crate is unmaintained.
   Instead of `ec25519` we use `ed25519-dalek` which is the most popular
   implementation of Ed25519 in Rust.
 - Migrate away from `amplify`, because we make very little use of its
   features. Here, we only use `amplify::Bytes32`, which is just a thin
   wrapper of `[u8; 32]`.
   Instead of `amplify::Bytes32` we use `type PublicKeyBytes = [u8; 32]`.

The realization that `ExtendedSignature` is not really tied to SSH, but
is merely a representation of a key together with a signature, allows to
relax the bounds on traits in `radicle-cob`.

Separating out uses of "public key" (a rather simple model of a key,
just 32 bytes) and "verifying key" (an actual point on the Edwards
curve, ready to verify signatures, using more memory than just 32 bytes)
allows a more sensible definition of `crypto::Signer`, which propagates
to `radicle-cob`, `radicle`, `radicle-cli`, `radicle-node` and
simplifies trait bounds.

In `radicle-node`, make the fact clearer that actually the secret key
itself is required (for our implementation of Diffie-Hellman) not
"just" signing. This results in removal of the generic argument
(usually called `G`) of multiple types.

Concretizing the types in `radicle-node` this way, i.e. by (morally)
setting `G = radicle_crypto::SigningKey`, leads to removal of
`MemorySigner` and `MockSigner`, as they really just wrap a signing
key.

Re-exporting `ed25519::Signature` (via re-export in `ed25519-dalek`)
is hopefully more future-proof than using our own type for signatures.
However, the fact that `ed25519::Signature` is not serializable and
does not implement `std::hash::Hash` means that we have to resort to
ad-hoc solutions in `radicle`:
 1. The Identity COB requires serialization of signatures. These are
    generally questionable, since the security of the Identity COB
    should rely on the security of Signed References. In the medium
    term we might even want to consider ignoring signatures in actions.
 2. When reading Signed References, detection of Replay Attacks uses
    a `HashMap` keyed by signatures. This detection only exists for
    backwards compatibility.
These two use cases are exotic enough to warrant ad-hoc implementations.
By not wrapping `ed25519::Signature`, we encourage writing more widely
compatible code in the future.

Co-authored-by: Fintan Halpenny <fintan.halpenny@gmail.com>
2026-07-21 09:19:01 +02:00