By using `0` as the clock value for an empty state (without operations),
we simplify transaction code. Previously, there was no clock value for
empty states, which meant that we had to sometimes use an `Option`.
This implementation intentionally preserves all edits such that
they may be displayed in an application as an edit history.
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
This makes a change to comments, such that all comments require a
parent, except the "root" comment, which is created with the COB.
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
This reverts to the previous naming, since after serialization
we would otherwise end up with `{ status: { status: closed } }`.
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
Sometimes it is more efficient to perform multiple operations at once
and store those in the collaborative object graph together.
Change the contents to be a non-empty sequence of byte sequences,
i.e. NonEmpty<Vec<u8>>. These are stored as blobs in a git tree in
order by their index in the non-empty sequence. They are, in turn,
retrieved in order of their original index.
Change the conversion of an `EntryWithClock` to return a non-empty
sequence of `Op`s, which are in turn used to apply many changes in
each `from_history` implementation.
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
The latter is a fork of the former, which adds const generics
and a bunch of other quality of life improvements that aren't
in the original crate due to it being unmaintained.
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
Helps with the confusion with `radicle_cob::Change` and matches the
name for this object in common literature.
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
Since the underlying DAG guarantees causal event delivery,
we can rely on this to simplify the code.
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>