This issue tracks the implementation of recent changes to the SDS specification.
The following changes need to be implemented:
The Message protobuf definition in the specification has been updated to include a sender_id.
- The
sender_id field (field number 1) must be added to the SdsMessage type in src/message.nim and the corresponding protobuf encoding/decoding in src/protobuf.nim.
- The sending participant MUST include its own globally unique identifier in the
sender_id field 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_id matching its own. This logic should be added to the message processing flow, within unwrapReceivedMessage in src/reliability.nim.
- Do not send a sync message if the causal history is empty i.e., there are no messages in the channel. Discussion
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) where timeNowInMs is 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.
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
Messageprotobuf definition in the specification has been updated to include asender_id.sender_idfield (field number 1) must be added to theSdsMessagetype insrc/message.nimand the corresponding protobuf encoding/decoding insrc/protobuf.nim.sender_idfield when sending a message.2. Participant State and Message Handling
sender_idmatching its own. This logic should be added to the message processing flow, withinunwrapReceivedMessageinsrc/reliability.nim.3. Lamport Timestamp Initialization & Increment
The initialization and incrementing of the Lamport timestamp for each channel has been updated in the specification.
Old specification:
New specification:
The current implementation in
getOrCreateChannelinitializes thelamportTimestampto0. This needs to be updated to initialize with the above defined value. Also need to make sure the lamport timestamp is uint64.