radicle-dev / radicle-link

The second iteration of the Radicle code collaboration protocol.
Other
423 stars 39 forks source link

Hash Ordering on Sequence #146

Open FintanH opened 4 years ago

FintanH commented 4 years ago

@cloudhead mentioned another approach to ordering sequences:

@fintohaps: was thinking of something related to the ordering of comments when two of them have arrived at the same time - you mentioned sorting them by timestamp - I wonder if it's not a better idea to sort them by content hash, since it's harder to game and since they are effectively both happening at the same time

This would make OrdSequence more of a HashSequence. We'd still need the unique identifiers to identify modifications. But maybe we don't even need a timestamp then, just the UUID.

kim commented 4 years ago

Either of content-hash, signature bytes, random value (UUID), phase-of-the-moon, gyroscope tilt degree, ... would work, I think, as it’s only tie-breaking causally concurrent values. In the special case of comments, the local clock is a reasonable choice, as it is surfaced to the user (note that we’d still need a hidden practically-random value as a last-last-resort).

FintanH commented 4 years ago

Surely the phase of the moon would be the same for both users at the same time 😝

kim commented 4 years ago

Are you sure? I mean, if you take lat,lon into account...

FintanH commented 4 years ago

I'm never sure. Let me ask my tarot cards