mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-28 09:11:34 +00:00
protocols/gossipsub: Add message signing and verification configuration (#1583)
This adds optional message signing and verification to the gossipsub protocol as per the libp2p specifications. In addition this commit: - Removes the LruCache received cache and simply uses the memcache in it's place. - Send subscriptions to all peers - Prevent invalid messages from being gossiped - Send grafts when subscriptions are added to the mesh Co-authored-by: Max Inden <mail@max-inden.de> Co-authored-by: Rüdiger Klaehn <rklaehn@protonmail.com> Co-authored-by: Rüdiger Klaehn <rklaehn@gmail.com>
This commit is contained in:
@ -19,6 +19,8 @@ message Message {
|
||||
optional bytes data = 2;
|
||||
optional bytes seqno = 3;
|
||||
repeated string topic_ids = 4;
|
||||
optional bytes signature = 5;
|
||||
optional bytes key = 6;
|
||||
}
|
||||
|
||||
message ControlMessage {
|
||||
@ -30,11 +32,11 @@ message ControlMessage {
|
||||
|
||||
message ControlIHave {
|
||||
optional string topic_id = 1;
|
||||
repeated string message_ids = 2;
|
||||
repeated bytes message_ids = 2;
|
||||
}
|
||||
|
||||
message ControlIWant {
|
||||
repeated string message_ids= 1;
|
||||
repeated bytes message_ids= 1;
|
||||
}
|
||||
|
||||
message ControlGraft {
|
||||
|
Reference in New Issue
Block a user