Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
cob: provide stable ordering of concurrent values
Merged fintohaps opened 1 year ago

The underlying Dag for a COB will use the Ord implementation of whatever is provided as the key. This means that the lexicographical ordering of the Oid SHA will be used, which in turn means that if the SHAs change in our tests, then the ordering will be broken for concurrent updates.

To prevent this from happening, a new key is used EntryKey, which is the combination of an Oid and a Timestamp – the commit timestamp. The key is used in place of EntryId as the Dag key.

This introduction meant that in some places it was necessary to have a way of getting the timestamp of an EntryId. The TimestampOf trait is used in these cases, which means that some infallible functions became fallible.

fintohaps opened with revision 8c740a45 on base 855327d3 +234 -96 1 year ago

The underlying Dag for a COB will use the Ord implementation of whatever is provided as the key. This means that the lexicographical ordering of the Oid SHA will be used, which in turn means that if the SHAs change in our tests, then the ordering will be broken for concurrent updates.

To prevent this from happening, a new key is used EntryKey, which is the combination of an Oid and a Timestamp – the commit timestamp. The key is used in place of EntryId as the Dag key.

This introduction meant that in some places it was necessary to have a way of getting the timestamp of an EntryId. The TimestampOf trait is used in these cases, which means that some infallible functions became fallible.

fintohaps pushed revision 2 af29ca7e on base f83c1167 +234 -96 1 year ago

Changes:

  • rebased
  • changed commit message to use the terminology “chronlogical ordering” rather than “stable ordering”
fintohaps pushed revision 3 c378998c on base de1958fa +72 -19 1 year ago

Changes:

  • Approach the problem from the Dag API, introducing a prune_by method which is used in place of prune, and allows us to dictate the ordering based on the key and value pairs.
fintohaps pushed revision 4 f6b2c511 on base de1958fa +70 -17 1 year ago

Changes:

  • Reverting some erroneuous changes
fintohaps pushed revision 5 244fb1f6 on base de1958fa +130 -17 1 year ago

Changes:

  • Add test for prune_by
  • Do not take ordering by reference in prune_by
did:key:z6MksFqX...wzpT merged revision 244fb1f6 at a838c3ea 1 year ago