status-im / specs

Specifications for Status clients.
https://specs.status.im/
MIT License
14 stars 14 forks source link

Document Lamport unix time bidding process #57

Closed oskarth closed 4 years ago

oskarth commented 4 years ago

Currently https://github.com/status-im/specs/blob/978c5b77bb45805df91a326132b4bc89671006d2/status-payloads-spec.md#clock-vs-timestamp-and-message-ordering mentions use of Lamport clocks.

However, it doesn't appear to mention the unix time bidding process tweak and rationale (with Lamport invariant) described in https://github.com/status-im/status-react/blob/c9994b5d0f72377ec51000541e6b02500f8430f5/src/status_im/utils/clocks.cljs

;; But what we can do, is to use our time to make a "bid", hoping that it will ;; beat the current chat-timestamp. So our Lamport timestamp format is: ;; {unix-timestamp-ms}{2-digits-post-id}

cc @corpetty @cammellos