Commit Graph

1930 Commits

Author SHA1 Message Date
cloudhead cce46a3d8b
Try to improve performance of repository open
By using `open_ext` with `BARE`, we defer loading of the Git config,
which has been shown to be expensive.
2024-05-13 16:37:02 +02:00
cloudhead 8e541dcf58
node: Set TCP NO_DELAY for node connections
Just experimenting. I think this will be a better default for the type
of data exchanged between nodes.
2024-05-13 16:12:41 +02:00
cloudhead 2ca1e74707
cli: Have way to delete payload field in `rad id`
Allow for deleting a field by setting it to `null`.
2024-05-13 16:12:41 +02:00
Alexis Sellier 930f9b0a7e
node: Don't always connect to Tor addresses
Only connect if Tor is configured.
2024-05-10 13:38:02 +02:00
Alexis Sellier c5395f0674
cli: Improve `rad stats` output
Use daily/weekly figures.
2024-05-10 13:13:03 +02:00
Alexis Sellier 9766c67671
node: Fix tor proxy issue for regular addresses
This should allow using a Tor proxy for regular connections.
2024-05-09 21:45:48 +02:00
cloudhead 6ab3bfcba0
node: Use banning for repeated offenders
When the penalty score for a node reaches a certain threshold, we ban
the node.

Banned nodes are not allowed to connect to us.
2024-05-07 14:49:02 +02:00
cloudhead 9a82aae993
node: Reset connection attempts when stable
Instead of resetting the number of attempts on connection, reset it when
the connection is stable, ie. after some time has passed.

This prevents connection retries from happening in succession when a
peer is disconnected during the initial handshake, as is the case with
invalid subscribe timestamps.
2024-05-07 14:49:02 +02:00
cloudhead ef4efe3200
node: Improve logging for storage check 2024-05-07 14:49:02 +02:00
cloudhead 7484d737d5
node: Re-use inventory message timestamps
If our inventory hasn't updated, don't issue a new inventory
announcement, simply use the previous message.

This avoids identical inventories propagating over the network and using
up resources.
2024-05-07 14:49:02 +02:00
cloudhead 88a4029789
node: Use `BoundedVec` for inbox 2024-05-07 14:49:02 +02:00
cloudhead f212dbb2ee
node: Make sure we bound peer message inboxes 2024-05-07 14:49:02 +02:00
Fintan Halpenny e8f2f88bf6
cli: Add test for unknown field in identity doc
Add a test to confirm that the identity can still be deserialized when an
unknown field is added.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-05-07 10:21:07 +02:00
Fintan Halpenny 9b719d0cca
radicle: allow for unknown fields in Project deserialization
Allow unknown fields to pass through when deserializing the `Project` payload.
This allows the deserialization to be more resilient when unknown fields are
added, e.g. from the CLI, and improves backwards-compatability when new fields
may be added in the future.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-05-07 10:19:59 +02:00
cloudhead 43b0b2b426
node: Always go through proxy with Tor
Force the proxy for regular connections, when Tor is configured.
2024-05-06 22:27:46 +02:00
cloudhead 153be9ede4
node: Improve session type definition 2024-05-06 22:22:39 +02:00
Dr Maxim Orlovsky a3cce22f7a
node: Patch dependencies for Tor/socks5 support 2024-05-06 22:19:36 +02:00
cloudhead 72db6dd7dd
docs: Fix example in `rad-id.1` 2024-05-06 13:40:43 +02:00
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