Merge pull request #9 from logos-messaging/causal-sender-id

feat: add sender id in history entry
This commit is contained in:
kaichao 2026-06-02 20:42:42 +08:00 committed by GitHub
commit 37ec98a151
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 17 additions and 10 deletions

View File

@ -9,9 +9,12 @@ pub struct HistoryEntry {
/// Unique identifier of the SDS message, as defined in `Message`
#[prost(string, tag="1")]
pub message_id: ::prost::alloc::string::String,
/// Optional information to help remote parties retrieve this SDS
/// Optional information to help remote parties retrieve this SDS message; For example, A Waku deterministic message hash or routing payload hash
#[prost(bytes="bytes", tag="2")]
pub retrieval_hint: ::prost::bytes::Bytes,
/// Original message sender's participant ID (routing hint)
#[prost(string, tag="3")]
pub sender_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReliablePayload {
@ -28,5 +31,8 @@ pub struct ReliablePayload {
/// Optional field causes errors in nim protobuf generation. Removing for now as optional is implied anways.
#[prost(bytes="bytes", tag="20")]
pub content: ::prost::bytes::Bytes,
/// Original message sender's participant ID (routing hint)
#[prost(string, tag="7")]
pub sender_id: ::prost::alloc::string::String,
}
// @@protoc_insertion_point(module)

View File

@ -8,16 +8,17 @@ package logoschat.reliability;
message HistoryEntry {
string message_id = 1; // Unique identifier of the SDS message, as defined in `Message`
bytes retrieval_hint = 2; // Optional information to help remote parties retrieve this SDS
// message; For example, A Waku deterministic message hash or routing payload hash
bytes retrieval_hint = 2; // Optional information to help remote parties retrieve this SDS message; For example, A Waku deterministic message hash or routing payload hash
string sender_id = 3; // Original message sender's participant ID (routing hint)
}
message ReliablePayload {
string message_id = 2;
string channel_id = 3;
int32 lamport_timestamp = 10;
repeated HistoryEntry causal_history = 11;
bytes bloom_filter = 12;
string message_id = 2;
string channel_id = 3;
int32 lamport_timestamp = 10;
repeated HistoryEntry causal_history = 11;
bytes bloom_filter = 12;
// Optional field causes errors in nim protobuf generation. Removing for now as optional is implied anways.
bytes content = 20;
bytes content = 20;
string sender_id = 7; // Original message sender's participant ID (routing hint)
}