Commit Graph

228 Commits

Author SHA1 Message Date
Alexis Sellier 950fae209d
Make `ReadStorage` more usable
Previously, we were not able to access a `ReadRepository` instance
through `ReadStorage`. With this change, we are able to.
2023-02-15 22:08:20 +01:00
Alexis Sellier 8cbc3c2403
node: Move to NoiseXK
Move from NoiseNN with a custom authentication protocol, to NoiseXK.
Uses ECDH on the ed25519 curve via the `ec25519` library.
2023-02-15 22:05:04 +01:00
Fintan Halpenny 88fc4f1782
radicle: ensure stable commits for Docs
`Doc::commit` used `git2::Signature::now` when committing the document
to the repository. This results in the commits always changing and not
allowing us to test outputs of our CLI commands that would wish to
output the SHA.

Make `Doc::commit` reproducible in debug mode using `debug_assertions`
and checking the `RAD_COMMIT_TIME` environment variable.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-02-13 18:02:20 +01:00
Fintan Halpenny 9535467ff5
radicle: identity proposal cob
In order to make identity changes where the threshold is higher than
1, it is necessary to gather signatures of delegates to surpass that
threshold.

To achieve this the Proposal cob is introduced for proposing changes
and gathering the signatures over those changes.

Once a quorum is reached the Proposal can be published, committing the
new identity document to storage.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-02-13 13:50:51 +00:00
Sebastian Martinez 881e9af219
httpd: Add `assignees` to `Issues::create`
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-02-13 13:47:15 +01:00
Fintan Halpenny 540c56cac6
radicle: sign blob hash instead of content
The signatures for Radicle identities were using the documents
content.

It is standard to use the hash of the content instead, since signing
and verification is faster on a smaller set of data.

Use the resulting Git blob's object id, i.e. `git hash-object`, as the
signing and verifying payload.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-02-13 13:30:44 +01:00
Alexis Sellier b461950d59
Add `ReadStorage::contains` method 2023-02-12 21:04:55 +01:00
Alexis Sellier 7087288cfb
node: Implement inventory sync command 2023-02-12 20:57:33 +01:00
xphoniex bdc0ab9881
Update `radicle-git` and `radicle-surf`
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2023-02-10 22:14:50 +01:00
Sebastian Martinez a57b33c785
httpd: Add `api::test::patch` request method
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-02-10 12:17:03 +01:00
Slack Coder ed9900b5ac
cli: Support patch commenting
Allow commenting on a patch as well an issue.

Signed-off-by: Slack Coder <slackcoder@server.ky>
2023-02-07 11:16:59 +01:00
Alexis Sellier c861244ab8
Fix bug with `announce-refs` result 2023-02-07 10:46:12 +01:00
Alexis Sellier 037ff39894
node: Use JSON for control commands 2023-02-07 10:46:12 +01:00
Alexis Sellier 45e31a5192
Communicate fetch results through control socket
This allows a CLI to report to the user what fetch requests were
fulfilled, and which ones failed.
2023-02-07 10:46:12 +01:00
Sebastian Martinez af3ea6a11a
httpd: Add issue endpoints
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-02-06 14:14:06 +01:00
Fintan Halpenny 3f48c2c516
Rust 1.67
Rust 1.67 was announced[0]. Update the necessary files for running
1.67 and fix the clippy suggestions for string interpolation.

[0]: https://blog.rust-lang.org/2023/01/26/Rust-1.67.0.html

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-02-04 19:30:29 +01:00
xphoniex 4552c1f296
httpd: Add routes for patch ops
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2023-02-04 13:22:09 +00:00
Alexis Sellier 88ffc02c5e
Use string format for `OpId` JSON 2023-02-04 12:37:58 +01:00
Slack Coder 1cb8986830
Add Op ID string formatting
To help users, create an Op ID string format of the form `<actor-id>/<lamport>`.

Signed-off-by: Slack Coder <slackcoder@server.ky>
2023-02-04 12:29:50 +01:00
Alexis Sellier 98f7fe1db8
node: Rename `GIT_RESET` env var 2023-01-30 18:23:24 +01:00
Alexis Sellier 050b3acb2e
Improve storage documentation 2023-01-30 14:28:41 +01:00
Alexis Sellier 498a5c4e4a
node: Handle `fetched` differently if initiated 2023-01-30 13:22:33 +01:00
Alexis Sellier 99bd62d276
Improve error message for identity error 2023-01-30 12:38:59 +01:00
Alexis Sellier 0726c553da
node: Run git fetch without any user config 2023-01-30 12:35:08 +01:00
Alexis Sellier 258d2d35e4
Move function to trait 2023-01-30 12:27:32 +01:00
Alexis Sellier a0910f7593
Cleanup old `fetch` code
We only use the old code in the simulator now.
2023-01-30 12:26:29 +01:00
Alexis Sellier 507a41d22f
Improve `ReadRepository` trait 2023-01-30 11:45:55 +01:00
Alexis Sellier f1a6a86689
node: Check refs when getting local inventory
If we don't do this, we're going to be returning broken repos.
2023-01-30 11:38:00 +01:00
Alexis Sellier b92dc59204
node: Turn off `--atomic` when not supported 2023-01-29 18:22:41 +01:00
Alexis Sellier aac0059064
Remove redundant `commit` module
This code was replaced with an external dependency.
2023-01-29 17:50:31 +01:00
Alexis Sellier d9e1055067
Improve logging 2023-01-28 23:58:16 +01:00
Alexis Sellier 5e955d39d0
cob: Add 'description' to `Revision`
Simplifies the code a little.
2023-01-26 17:37:58 +01:00
Alexis Sellier bb3787258a
cob: Refactor `Thread` methods 2023-01-26 16:20:22 +01:00
Alexis Sellier 30e9d6103c
Cleanup `clone` code
Remove a bunch of different instances of it.
2023-01-25 17:51:49 +01:00
Alexis Sellier fdad6358fc
cli: Correctly setup remote tracking branch
Signed-off-by: Alexis Sellier <self@cloudhead.io>
2023-01-25 17:51:49 +01:00
Alexis Sellier b1012014fe
Remove old `Profile::paths` function 2023-01-25 15:35:24 +01:00
Alexis Sellier 963ad3c3d7
Get `rad clone` working correctly 2023-01-25 11:35:20 +01:00
Alexis Sellier fea14ff7b3
Update `clone` functionality for new replication 2023-01-25 10:21:57 +01:00
Alexis Sellier ef950d515a
node: Fully integrate worker fetch into service 2023-01-25 10:21:57 +01:00
Alexis Sellier bb135b64b3
cli: Get `rad-checkout` working properly 2023-01-24 14:54:56 +01:00
Alexis Sellier 1f06f5340f
Make `Id` to string conversion more explicit
Two types of conversion: `canonical`, which is just the base58 encoding,
and `urn` which is like canonical, but includes `rad:`.
2023-01-24 13:49:03 +01:00
Alexis Sellier 3aff91f9b7
Correctly initialize home in `Profile::init` 2023-01-22 13:39:48 +01:00
Alexis Sellier 97d4729fa4
Switch to crates.io for `cyphernet` 2023-01-17 11:01:36 +01:00
Alexis Sellier be9def8b11
Rename `profile::Paths` to `profile::Home`
This makes the intent clearer.

Signed-off-by: Alexis Sellier <self@cloudhead.io>
2023-01-17 11:01:36 +01:00
Alexis Sellier d31968509d
Speed up node E2E tests
By allowing the node to run using a `MockSigner`, we speed up tests
significantly, since PBKDF2 doesn't need to run.

Signed-off-by: Alexis Sellier <self@cloudhead.io>
2023-01-17 11:01:36 +01:00
Alexis Sellier 72cb2fd713
Remove unused dependencies
Signed-off-by: Alexis Sellier <self@cloudhead.io>
2023-01-17 11:01:36 +01:00
Alexis Sellier 63e7248847
node: Complete Noise handshake integration
Co-authored-by: Dr. Maxim Orlovsky <dr.orlovsky@gmail.com>
Signed-off-by: Alexis Sellier <self@cloudhead.io>
2023-01-17 11:01:36 +01:00
Alexis Sellier 438ae84304
node: Implement E2E node test
There are few unrelated changes in this commit that I wasn't able to
split out, mostly due to laziness, so I'll list them here:

* The node startup logic is moved out of the main function, and into a
  dedicated functionin `client.rs`.
* There is a tentative worker implementation that is untested, and
  handles git replication both ways. It's likely lacking in various ways
  but I wanted to get it in there anyway.
* `Address` was moved from `radicle-node` to `radicle`, because it's
  needed to send `Connect` commands from the node handle.
* The `netservices` dependency was updated.
* Finally, there is a first end-to-end node test, which currently
  doesn't use NoiseXK, but uses the new reactor in `netservices`.

Signed-off-by: Alexis Sellier <self@cloudhead.io>
2023-01-12 20:34:31 +01:00
Alexis Sellier 66f0f87933
Small change to storage log output
Previously it would show eg. `RefString(...)`.

Signed-off-by: Alexis Sellier <self@cloudhead.io>
2023-01-10 21:18:47 +01:00
Slack Coder 1eb2a5ab9d
radicle: Use 'RAD_PASSPHRASE' unmodified
Keep the passphrase as is by removing 'trim_end()'.

Signed-off-by: Slack Coder <slackcoder@server.ky>
2023-01-09 16:45:51 +01:00