Commit Graph
704 Commits
Author SHA1 Message Date
cloudhead abf89438ea node: Increase default rate-limiter config
With the increase in traffic on the network after launch, the old
defaults don't make sense anymore.

Longer term, we should look into throttling outgoing messages as well,
prioritizing original messages over relayed messages.
2024-05-01 11:06:28 +02:00
cloudhead 9cd08a01db cli: Small improvements to rad auth error output 2024-04-30 22:07:04 +02:00
cloudhead b31fbde159 node: Add log to node config 2024-04-29 15:59:17 +02:00
cloudhead a3ffe51ddf Rename RAD_SEED to RAD_KEYGEN_SEED
More explicit.
2024-04-26 10:38:54 +02:00
cloudhead fe5757d122 Tidy up environment variables
* Try to use constants instead of strings
* Move crypto seed override out of radicle-crypto
* Use GIT_COMMITTER_DATE for commit overrides
* Use RAD_LOCAL_TIME as general time override
* Allow variables to be used in release mode
2024-04-26 10:38:54 +02:00
cloudhead deeb39c558 node: Support "transparent" Tor
This allows for configuring your node such that `.onion` addresses
encountered are treated as regular DNS names.
2024-04-26 10:37:41 +02:00
cloudhead 85b321f943 cli: Use correct color for private repos 2024-04-24 21:11:26 +02:00
cloudhead 2b771921d5 node: Type-safe timestamps
Use a struct to represent timestamps, to improve type safety.
2024-04-24 12:19:40 +02:00
Sebastian Martinez 7fc3b73e88 Update radicle-surf to 0.21 2024-04-24 11:51:25 +02:00
cloudhead ae709b00ed cli: Enable HTML syntax highlighting in diffs 2024-04-20 15:59:20 +02:00
cloudhead 0b5fa51a92 helper: Allow pushing a raw SHA-1 2024-04-18 17:09:45 +02:00
Fintan Halpenny 3556758386 cli: fix rad inbox clear output
If multiple ids are specified for `rad inbox clear`, it would report
that only 1 item was cleared, when in fact multiple were.

This was found to be due to the SQL code returning a change count of
`1`. This is likely due to the way the statement is being reset each
time. The `sqlite` library does not seem to easily support the usage
of `IN` in a `WHERE` clause. So instead, the `count` is aggregated in
the loop and returned instead.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-04-09 16:09:44 +02:00
Fintan Halpenny 8bf871903a node: handle removal of cob from cache
When a `Patch` or `Issue` is entirely removed from the Git repository,
then there is no update to be made -- instead it should also be
removed from the cache.

This covers the case where the original author of the COB deletes the
COB.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-04-09 16:06:51 +02:00
cloudhead e3ecf4d7a0 cli: Add partial clone fail test
Ensure `rad clone` is successful as long as one fetch succeeds.
2024-04-09 15:54:08 +02:00
cloudhead 2eb665678e cli: rad sync UX improvements
* Add `--force` flag to force a fetch even if the node is not a seed.
* Don't fail if we can't connect to a node during a fetch.
* More accurately exit when we hit our replica count.
2024-04-09 10:43:35 +02:00
cloudhead e9b79fb6d0 cli: Improve UX for cloning/fetching private repos
When `--private` is passed to `clone`, we force a fetch from nodes that
aren't known seeds.

When it isn't specified, we skip nodes that aren't known seeds, even if
they are in the preferred seeds list. Previously, we would still fetch
from them, which would cause errors.
2024-04-08 22:15:56 +02:00
cloudhead bd8e0ebcda cli: Add tool in case sqlite3 is unavailable
Adds the `rad node db exec <query>` command.

Easy way to run sqlite queries if the sqlite3 CLI is not available or
too old.
2024-04-06 17:55:59 +02:00
cloudhead 6be77ca9c3 radicle: Implement remote_refs_at
Implement this function on `RemoteRepository`, and move `repositories`
to the trait level.

This function will be used to quickly get the `RefsAt` of all repository
remotes.
2024-04-05 21:59:28 +02:00
cloudhead 36808234a6 cli: Don't allow announcing without a fork 2024-04-04 14:13:34 +02:00
Fintan Halpenny ea69168f44 cli: explain public to private changes
Add an example of changing a public repository to a private
repository, noting that any replicated data will be public, but any
new changes will not be replicated.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-04-03 15:41:48 +02:00
Sebastian Martinez d38846baae cli: Display better errors in patch ready
Instead of doing nothing and going to sync no change, we should display
some error to the users that we haven't been able to apply the changes.
2024-04-03 15:19:31 +02:00
Sebastian Martinez 0a78b9cc5b cli: Display correct merge author in rad patch show output 2024-04-03 15:11:34 +02:00
Fintan Halpenny cd9b46fe51 radicle: fault tolerant thresholds
There are two areas where we can be more tolerant of delegate namespaces
being missing or not validating:
1. Calculating the canonical HEAD
2. Fetching from a remote

In 1. the protocol is tolerant in that if the local node does not have
the default branch for a delegate, it will still attempt to use any of
the delegates it does have to reach the threshold.

This is made safe by ensuring that if the threshold is being updated
then the node performing the update must have a threshold of delegates
locally in their storage. It also made safe by 2.

In 2. the protocol is tolerant by allowing delegates to be missing
from the serving side, as long as they can still meet a threshold of
delegates. This is further tolerant, when validating the received
data, a threshold of delegates are valid to consider the fetch
successful -- otherwise it will fail.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-04-03 14:30:05 +02:00
cloudhead 7e13e0759f node: Simplify handling of fetch completion
* Don't branch based on whether it was a user-requested fetch or not.
* Only announce inventory on clones of public repos.
2024-04-03 14:25:02 +02:00
cloudhead 6744ffc325 node: Improvements to test reliability 2024-04-03 14:25:02 +02:00
cloudhead f01aac8828 cli: Add inbox to help output 2024-03-26 13:13:14 +01:00
cloudhead 9cdf0aa1fd Update radicle crates to 0.9.0 2024-03-26 11:56:27 +01:00
cloudhead e695d06bbb node: Logging improvements & other small things 2024-03-25 12:05:05 +01:00
cloudhead dbf47fe4e9 Implement new versioning system
See `VERSIONING.md` for details.
2024-03-25 11:54:08 +01:00
cloudhead 33be2a62da cli: Improve error when radicle-node isn't found 2024-03-22 16:41:51 +01:00
cloudhead 98b0d55fde cli: Include all nodes we can announce to on sync
Previously, we only kept tracked of unsynced nodes we were connected to.
Now we track all unsynced nodes, since announcements are relayed.

We also cap the replicas to exit earlier in case of very low replica
count.
2024-03-22 16:35:06 +01:00
cloudhead 3535170f2d cli: Improve errors and code for syncing
We distinguish between the cases:

a) There are no seeds at all.
b) There are no seeds to announce to despite the user wanting a higher
   replication factor, for example.
2024-03-22 16:35:06 +01:00
cloudhead ff79d15bb8 cli: Change syncing rule for configured seeds
Instead of waiting for *all* configured/preferred seeds to be synced,
we wait for at least one.

Note that the previous behavior can still be used by setting
`--replicas` appropriately.
2024-03-22 16:35:06 +01:00
cloudhead e6728db15a cli: Unify all syncing code
We were using similar but slightly different syncing code in the
remote-helper, issues/patches and `rad sync`. This commit unifies them.
2024-03-22 16:35:06 +01:00
cloudhead 8f89f088c6 cli: Correctly honor sync timeout 2024-03-22 16:35:06 +01:00
Sebastian Martinez 0581c017ae cli: Add rad patch archive --undo
Allows archived patches to be reverted to open state.
2024-03-21 20:33:15 +01:00
Fintan Halpenny ea31040ec6 cli: do not require RID for sync inventory
The inventory operation of the `rad sync` command does not require an
RID. Localise resolving the RID in the match arms that require it.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-03-21 20:29:11 +01:00
cloudhead 057af40ea3 radicle: Fix config loading with bad alias
Previously, a config would load fine with an invalid alias,
due to how serde is configured for the `Alias` type. This fixes it.
2024-03-21 14:44:04 +01:00
cloudhead 2bcb03b021 node: Re-think inventory update code
Instead of re-loading the full inventory on `rad init`, we simply add
the new repository to the in-memory cache.

We also keep track of whether a fetch was a full clone, to know when
to update our routing table.
2024-03-21 12:40:58 +01:00
Alexis Sellier f15afa84be cli: Add timing information to rad-sync 2024-03-19 17:27:18 +01:00
Alexis Sellier ddd4bde302 node: Make worker count configurable 2024-03-19 16:34:15 +01:00
Lars Wirzenius 6569449fff cli: add PATH to env vars in rad-debug
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-03-18 13:14:50 +01:00
Lars Wirzenius 5fce714ba5 cli: include path to rad binary in rad-debug
This relies on /proc/self/exe being a symlink to the binary, so this
may only work on Linux.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-03-18 13:14:01 +01:00
Alexis Sellier 5ae617abf0 helper: Don't sync if we aren't seeding 2024-03-18 13:04:48 +01:00
cloudhead 9cd1b0ec46 cli: Improve missing man page handling
Instead of saying "no manual entry", we output regular help.
2024-03-17 21:14:58 +01:00
cloudhead cf8f262cb2 man: Add rad-id.1 man page 2024-03-17 21:14:58 +01:00
cloudhead 752656fbfa cli: Fix output of rad auth
The `rad help` command was not the right one.
2024-03-15 10:20:28 +01:00
cloudhead de0b9ae44d cli: Don't highlight unknown languages
Previously, we'd show "Empty file".
2024-03-12 16:12:16 +01:00
cloudhead eb1ae13e68 cli: Use correct styling for revision id 2024-03-12 15:46:55 +01:00
Michael Raitza f0b8446515 cli: Handle message editor corner cases
1. Split on double newline fails when description is empty
2. Title must be a single line
2024-03-12 15:44:26 +01:00