-
Notifications
You must be signed in to change notification settings - Fork 2
Description
This issue tracks the implementation of recent changes to the SDS specification.
The following changes need to be implemented:
1. Addition of sender_id
The Message protobuf definition in the specification has been updated to include a sender_id.
- The
sender_idfield (field number 1) must be added to theSdsMessagetype insrc/message.nimand the corresponding protobuf encoding/decoding insrc/protobuf.nim. - The sending participant MUST include its own globally unique identifier in the
sender_idfield when sending a message.
2. Participant State and Message Handling
- Upon receiving a message, the participant SHOULD ignore the message if it has a
sender_idmatching its own. This logic should be added to the message processing flow, withinunwrapReceivedMessageinsrc/reliability.nim. - Do not send a sync message if the causal history is empty i.e., there are no messages in the channel. Discussion
3. Lamport Timestamp Initialization & Increment
The initialization and incrementing of the Lamport timestamp for each channel has been updated in the specification.
Old specification:
A Lamport timestamp for each channel of communication, initialized to 0.
New specification:
A Lamport timestamp for each channel of communication, initialized to current epoch time in millisecond resolution and incremented by
max(timeNowInMs, current_lamport_timestamp + 1)wheretimeNowInMsis current epoch time in millisecond resolution.
The current implementation in getOrCreateChannel initializes the lamportTimestamp to 0. This needs to be updated to initialize with the above defined value. Also need to make sure the lamport timestamp is uint64.