Commit Graph

1912 Commits

Author SHA1 Message Date
cloudhead fddd0680fa
cli: Make ruby syntax highlighting non-optional
The current verison of the crate no longer requires C++ and builds fine.
2024-05-05 00:50:54 +02:00
cloudhead 2f3d1284ca
docs: Fix download link in README.md 2024-05-04 22:58:39 +02:00
cloudhead 6dd52c94fb
cli: Use new pager for `rad diff` 2024-05-03 14:31:08 +02:00
cloudhead 40f4383bbc
term: Implement content-aware pager
This is a pager (like `less`) that takes an `Element`, and dynamically
re-renders the element when the terminal size changes. This ensures that
the content is always properly wrapped and rendered.
2024-05-03 14:31:05 +02:00
cloudhead 2801403182
signals: Move signal handling to its own crate
We're going to share this code with `radicle-term`.
2024-05-03 14:30:51 +02:00
cloudhead 425e7b5092
docs: Fix docstring variable 2024-05-03 13:26:33 +02:00
cloudhead 104a1b96d0
docs: Specify `--root` for source installation
This places the binaries in the common location for Radicle.
2024-05-03 12:07:45 +02:00
cloudhead 227e13d5b1
build: Push tags as part of upload 2024-05-02 21:37:15 +02:00
cloudhead 2c6fa989cb
scripts: Script for outputting markdown changelog 2024-05-02 17:00:14 +02:00
cloudhead 0d880e12e1
node: Respect relay config on subscribe
Don't relay when a subscribe message is received, unless our relay
configuration allows us.
2024-05-02 13:48:47 +02:00
cloudhead a54180199e
node: Further increase the rate-limit defaults
The rate-limitter gets hit on connect, due to historical gossip messages
being exchanged. This results in a high initial burst that needs to be
accounted for.
2024-05-02 13:43:09 +02:00
Sebastian Martinez 5ffbf7545f
httpd: Add apiVersion to root handler and node information
This will help consumers of the httpd to check if they are on the right
version of the API
2024-05-02 13:09:00 +02:00
Sebastian Martinez d04d9d7d1f
httpd: Add threshold to project info 2024-05-02 14:43:12 +02:00
Sebastian Martinez c4d4ad7008
httpd: Add alias to project delegates 2024-05-02 14:43:12 +02:00
Sebastian Martinez 854fc9af8e
httpd: Decouple repo stats from tree endpoint 2024-05-02 14:41:27 +02:00
cloudhead a9b94b0ad6
node: New relay configuration for nodes
Relay now has three values: "always", "never" and "auto".

The first two operate like the previous `true`/`false`. The
new (default) value turns relaying on for nodes with public (external)
addresses and off for nodes without. This should reduce redundant traffic on
the network, that was causing the rate limiters to trigger.
2024-05-02 11:45:29 +02:00
cloudhead 1708ddf777
build: Small changes to build script 2024-05-01 16:09:23 +02:00
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 afe13b9e47
node: Don't rate-limit persistent peers 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 780f0eff37
build: Don't set 'latest' link for dev builds 2024-04-30 22:02:32 +02:00
cloudhead faafd21a91
build: Use zig for linux builds
There was an issue with the build that is resolved when using zig.
aarch64 binaries had a bug in libgit2 involving file access.
2024-04-30 21:54:48 +02:00
cloudhead eece90e9f7
node: Fix naming/spelling of "limitter" module 2024-04-30 14:24:09 +02:00
cloudhead e5df616ead
node: Protect against non-monotonic clocks
Many (most?) system clocks are not monotonic, and even though we're
getting a `LocalTime`, which *is* monotonic when using `now()`, it is
constructed from a `SystemTime` which isn't.
2024-04-30 10:56:37 +02:00
cloudhead bb5355fcb1
node: Promote rate-limitting log to "debug" 2024-04-29 18:02:26 +02:00
cloudhead 55c4de0239
Remove outdated Dockerfiles 2024-04-29 18:02:07 +02:00
cloudhead b31fbde159
node: Add `log` to node config 2024-04-29 15:59:17 +02:00
cloudhead 0b816d5c86
docs: Typo fixes
Nb. This was submitted by user `@omahs` via GitHub, but since an email
address was not included in the commits, I've used my own.
2024-04-29 13:28:31 +02:00
cloudhead a9e3a53d2b
build: Don't add trailing slash 2024-04-29 13:17:15 +02:00
cloudhead 7126d05130
node: Use constant delay for refreshing node ann
We use a shorter, constant delay, so that it is the same on all nodes.
2024-04-29 12:49:59 +02:00
cloudhead a815640a3b
node: Always try to relay node announcements
They are cached and will often be old. They should still be relayed.
2024-04-29 12:28:30 +02:00
cloudhead 97b1a5de53
build: Move/rename build steps 2024-04-29 11:14:09 +02:00
cloudhead 0c93a1c1a4
build: Remove GitHub workflows
These are being replaced by our reproducible builds.
2024-04-29 10:47:51 +02:00
cloudhead 5f1657484f
build: Add "upload" build step 2024-04-29 10:47:03 +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 70d2e1a0db
node: Improve `Timestamp` conversion safety
Remove `Timestamp::from(u64)` instance, since not all `u64`s are valid
Timestamps, and add `try_from` instead.
2024-04-26 10:33:34 +02:00
cloudhead cd2884a609
build: Adjust folder structure
This allows for simply extracting into $PATH.
2024-04-25 17:15:58 +02:00
cloudhead 85b321f943
cli: Use correct color for private repos 2024-04-24 21:11:26 +02:00
cloudhead c607619683
node: Don't relay old messages
Avoids spamming peers on startup.
2024-04-24 13:25:58 +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
cloudhead 0fcfbb3ecf
node: Don't re-use timestamps
There are rare cases where ref announcements may be sent in close
succession, and the current clock time is re-used. This will cause the
second (newer) announcement to be ignored by peers.

We add a `timestamp` method that checks if the timestamp is re-used, and
increments it if so, ensuring that we always use a fresh one.
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
Lars Wirzenius 1a0221f726
radicle: fix tests to not leave temporary files behind
In radicle/src/test.rs, we have a helper type for a Node, which
creates a temporary directory using tempfile::tempdir, which creates a
TempDir. When the TempDir is dropped, it deletes its associated
directory. Before that happens, the Node has already stored the path.
Right after that the TempDir is dropped, and the directory deleted.
When the test code later opens the repository, using Storage::open,
it recreates the directory. As a result, there is nothing that would
delete the directory when the test finishes.

This means tests that use the helper Node type leave temporary files
behind.

Fix this by storing the TempDir in the helper Node, not just its path.
This means the TempDir is only dropped at the end of the test its used
in, and no temporary files are left behind.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-04-24 11:47:14 +02:00
cloudhead c07522365a
cargo: Run `cargo update` on workspace 2024-04-23 17:43:21 +02:00
cloudhead 9fe5a8922f
build: Update to zig 0.12.0, add `rad-web` 2024-04-23 10:59:33 +02:00
cloudhead cdebbe5bb7
node: Improved message logging 2024-04-23 10:41:43 +02:00
cloudhead d77b5d5abe
node: Add 'disconnect' command to handle 2024-04-23 09:52:25 +02:00
cloudhead 65aeebb2d1
docs: Update manual pages to 1.0.0 2024-04-22 14:37:19 +02:00