Commit Graph
293 Commits
Author SHA1 Message Date
Alexis Sellier fa9a89caa3 Start integrating new CRDTs into radicle crate
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-26 17:13:22 +01:00
Alexis Sellier 550ad2b558 Make Thread a semilattice
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-26 17:13:22 +01:00
Alexis Sellier 7e8af47f59 Implement Change::decode
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-26 17:13:22 +01:00
Alexis Sellier 0448441418 Use merge as the Semilattice join method
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-26 17:13:22 +01:00
Alexis Sellier 01b7686659 Turn Redactable into a semilattice
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-26 17:13:22 +01:00
Alexis Sellier 681a8c9374 Test CRDT storage, simplify Thread
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-26 17:13:22 +01:00
Alexis Sellier 01ad0fb31d cob: Split generic code from automerge-specific 2022-11-26 17:13:18 +01:00
Alexis Sellier 5526eceea0 cob: Add new history type, simplify Content
Keep the history type in the manifest, but no need to specify it
for all individual changes.

Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-24 13:41:24 +01:00
Alexis Sellier 8dc655758e Test ordering of timelines with concurrency
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-23 21:03:49 +01:00
Alexis Sellier 64862b3ab3 Add lamport clock
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-23 19:52:20 +01:00
Alexis Sellier 0482757ce9 Implement LWWReg in terms of Max
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-23 19:52:20 +01:00
Alexis Sellier b11826b113 Add LWWMap and implement LWWSet with it
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-23 19:52:20 +01:00
Alexis Sellier 35f061746c Add radicle-crdt crate
Explorations with CRDTs.
2022-11-23 19:52:18 +01:00
xphoniex 21e47c7a34 cli: Use the build.rs at root
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2022-11-23 19:48:15 +01:00
Slack Coder f5d06f6138 node: Fix addresses sent to peers on conn.
Send the node's configured external addresses instead of its listenning
addresses.  External addresses are ones which the service is reachable
from the outside world, the listening addresses can be the wrong context
(local area network, or 0.0.0.0).

Signed-off-by: Slack Coder <slackcoder@server.ky>
2022-11-23 13:13:56 -05:00
Alexis Sellier 308112618f Get around circular-dependency
This was causing an issue in rust-analyzer, and probably would fail
in other ways via cargo. In any case it wasn't a good idea.

Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-22 13:41:32 +01:00
Alexis Sellier e258c72eca Implement some CLI tests using trycmd
I'm not entirely satisfied with `trycmd`, but it's a start.
If we choose to move to a different crate, or implement our own,
we can keep the example test cases.

Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-22 10:44:30 +01:00
Alexis Sellier 093bb686a4 Fix dependency issue with "test" feature
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-22 10:44:30 +01:00
Alexis Sellier d6a95e4d58 Support RAD_PASSPHRASE in signer method
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-22 10:44:30 +01:00
Alexis Sellier 1d798a80b4 Fix issues with incorrect terminal width
For some reason, the terminal width isn't always valid, and
then ends up returning `80`.

Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-22 10:44:30 +01:00
Alexis Sellier fd936becf1 Make Profile::init more flexible
Allow passing a custom home.

Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-22 10:44:30 +01:00
Alexis Sellier 66d1f99a1e Simplify key generation for tests and debugging
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-22 10:44:30 +01:00
Alexis Sellier 03fd69f323 Configure CLI default bin
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-22 10:44:30 +01:00
Alexis Sellier bdeebfb79a Add rad-path command
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-22 10:44:30 +01:00
Dr Maxim Orlovsky 26fa16d2b2 Support ECDH 2022-11-22 10:35:04 +01:00
Dr Maxim Orlovsky 3ec460056d Add cyphernet dependency 2022-11-22 10:34:49 +01:00
Dr Maxim Orlovsky 664898d8c8 Derive Hash for Signature 2022-11-21 16:40:29 +01:00
Dr Maxim Orlovsky ee17f35218 Implement Ord and PartialOrd for secret key type 2022-11-21 16:40:29 +01:00
Dr Maxim Orlovsky 2a6f3c4f55 Update ed25519-compact dependency 2022-11-21 16:07:43 +01:00
Dr. Maxim Orlovsky 3e48548745 Integrate framing and muxer into wire protocol 2022-11-21 16:05:53 +01:00
Dr. Maxim Orlovsky 13c9491e49 Implement framer and multiplexer 2022-11-21 16:05:53 +01:00
Dr. Maxim Orlovsky 983b2dc534 Two-stage connectivity with handshake 2022-11-21 16:05:53 +01:00
Dr. Maxim Orlovsky 008681a2ca Complete transcoder documentation 2022-11-21 16:05:53 +01:00
Dr. Maxim Orlovsky 4d77f95c21 Disconnect peers on failed handshakes 2022-11-21 16:05:53 +01:00
Dr. Maxim Orlovsky e9ae5897f7 Complete transcoder
* Encode/encrypt data sent to the remote peer
* Remove unused Transport
* Rename Decoder -> Deserializer
2022-11-21 16:05:53 +01:00
Dr. Maxim Orlovsky 56fb4d67a9 Introduce transcoder parameter to Wire & Transport 2022-11-21 16:05:53 +01:00
Dr. Maxim Orlovsky 6b87eed670 Identify remote peers by full SocketAddr
Wire inboxes were kept per IP address. However, there could be multiple peers
connecting from the same IP (for instance, if it is an IP of a NAT).
2022-11-21 16:05:53 +01:00
Fintan Halpenny c620f873e5 radicle-cob: test parse_refstr
Add quickcheck tests for parse_refstr to ensure the correct
behaviour.

This required adding Arbitrary instances for TypeName and ObjectId, as
well as adding a mechanism for generating Invalid ObjectIds.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2022-11-17 17:42:22 +00:00
Fintan Halpenny a985e067a5 Add TypeName & ObjectId parser
Added the `parse_refname` function for parsing a reference into its
`TypeName` and `ObjectId`, if possible.

This replaces the `cob_suffix` function in `radicle`.

This change also fixes the `FromStr` instance of `ObjectId` to use
`from_str` instead of `TryFrom` for bytes.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2022-11-17 17:42:21 +00:00
Alexis Sellier b4bc032113 Add rad-merge command
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-17 09:25:17 +01:00
Alexis Sellier 01047a4942 Add rad-review command
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-16 16:38:51 +01:00
xphoniex 89bdf59e8e Add rad-issue command
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2022-11-16 16:28:31 +01:00
Alexis Sellier dc21692ea3 Add licenses and contributor information
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-16 12:26:12 +01:00
Alexis Sellier 47d20003c0 Implement rad-patch
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-16 12:07:19 +01:00
Alexis Sellier dea268c389 Implement rad-push
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-16 11:36:23 +01:00
Slack Coder 5472931ff0 node: prune project routing table
Avoid wasting persistent memory by cleaning up stale routing entries
when the routing table is considered constrained.  Limit pruning to
improve resiliency in the face of long intervals between service
downtimes.

Signed-off-by: Slack Coder <slackcoder@server.ky>
2022-11-15 12:26:34 -05:00
Slack Coder a74cb416c1 node: sync project routing for known nodes
Keep the node's understanding of project hosting location current by
updating how Inventory Announcement messages are processed.

The Inventory Announcements contain a node's entire listing of projects.
Replace the routing table information for the announcer with those from the
message.

Signed-off-by: Slack Coder <slackcoder@server.ky>
2022-11-15 12:26:08 -05:00
Slack Coder 186eb42145 node: use announcer's timestamp in project inventory
Address a FIXME in service.process_inventory() by using the announcer's
time instead of the service's.

Signed-off-by: Slack Coder <slackcoder@server.ky>
2022-11-15 12:26:08 -05:00
xphoniex a496eeb84d Add rad-rm command
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2022-11-15 16:22:08 +01:00
Alexis Sellier 12988da089 Add Patch, Issue, Label COBs
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-14 12:40:00 +01:00