Skip to content

Commit 9f0e098

Browse files
committed
*: Mark protobuf generated modules with '_proto'
1 parent e461382 commit 9f0e098

31 files changed

+230
-238
lines changed

core/regen_structs_proto.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/sh
22

3-
../scripts/protobuf/gen.sh keys.proto ./src/
3+
../scripts/protobuf/gen.sh src/keys.proto

core/src/identity.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ pub mod secp256k1;
2929
pub mod error;
3030

3131
use self::error::*;
32-
use crate::{PeerId, keys};
32+
use crate::{PeerId, keys_proto};
3333

3434
/// Identity keypair of a node.
3535
///
@@ -150,20 +150,20 @@ impl PublicKey {
150150
/// exchange with other nodes.
151151
pub fn into_protobuf_encoding(self) -> Vec<u8> {
152152
use protobuf::Message;
153-
let mut public_key = keys::PublicKey::new();
153+
let mut public_key = keys_proto::PublicKey::new();
154154
match self {
155155
PublicKey::Ed25519(key) => {
156-
public_key.set_Type(keys::KeyType::Ed25519);
156+
public_key.set_Type(keys_proto::KeyType::Ed25519);
157157
public_key.set_Data(key.encode().to_vec());
158158
},
159159
#[cfg(not(any(target_os = "emscripten", target_os = "unknown")))]
160160
PublicKey::Rsa(key) => {
161-
public_key.set_Type(keys::KeyType::RSA);
161+
public_key.set_Type(keys_proto::KeyType::RSA);
162162
public_key.set_Data(key.encode_x509());
163163
},
164164
#[cfg(feature = "secp256k1")]
165165
PublicKey::Secp256k1(key) => {
166-
public_key.set_Type(keys::KeyType::Secp256k1);
166+
public_key.set_Type(keys_proto::KeyType::Secp256k1);
167167
public_key.set_Data(key.encode().to_vec());
168168
},
169169
};
@@ -177,31 +177,31 @@ impl PublicKey {
177177
/// or received from another node.
178178
pub fn from_protobuf_encoding(bytes: &[u8]) -> Result<PublicKey, DecodingError> {
179179
#[allow(unused_mut)] // Due to conditional compilation.
180-
let mut pubkey = protobuf::parse_from_bytes::<keys::PublicKey>(bytes)
180+
let mut pubkey = protobuf::parse_from_bytes::<keys_proto::PublicKey>(bytes)
181181
.map_err(|e| DecodingError::new("Protobuf").source(e))?;
182182

183183
match pubkey.get_Type() {
184-
keys::KeyType::Ed25519 => {
184+
keys_proto::KeyType::Ed25519 => {
185185
ed25519::PublicKey::decode(pubkey.get_Data())
186186
.map(PublicKey::Ed25519)
187187
},
188188
#[cfg(not(any(target_os = "emscripten", target_os = "unknown")))]
189-
keys::KeyType::RSA => {
189+
keys_proto::KeyType::RSA => {
190190
rsa::PublicKey::decode_x509(&pubkey.take_Data())
191191
.map(PublicKey::Rsa)
192192
}
193193
#[cfg(any(target_os = "emscripten", target_os = "unknown"))]
194-
keys::KeyType::RSA => {
194+
keys_proto::KeyType::RSA => {
195195
log::debug!("support for RSA was disabled at compile-time");
196196
Err(DecodingError::new("Unsupported"))
197197
},
198198
#[cfg(feature = "secp256k1")]
199-
keys::KeyType::Secp256k1 => {
199+
keys_proto::KeyType::Secp256k1 => {
200200
secp256k1::PublicKey::decode(pubkey.get_Data())
201201
.map(PublicKey::Secp256k1)
202202
}
203203
#[cfg(not(feature = "secp256k1"))]
204-
keys::KeyType::Secp256k1 => {
204+
keys_proto::KeyType::Secp256k1 => {
205205
log::debug!("support for secp256k1 was disabled at compile-time");
206206
Err("Unsupported".to_string().into())
207207
},
File renamed without changes.

core/src/keys.rs renamed to core/src/keys_proto.rs

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#![allow(unsafe_code)]
1818
#![allow(unused_imports)]
1919
#![allow(unused_results)]
20-
//! Generated file from `keys.proto`
20+
//! Generated file from `src/keys.proto`
2121
2222
use protobuf::Message as Message_imported_for_functions;
2323
use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;
@@ -525,35 +525,35 @@ impl ::protobuf::reflect::ProtobufValue for KeyType {
525525
}
526526

527527
static file_descriptor_proto_data: &'static [u8] = b"\
528-
\n\nkeys.proto\"=\n\tPublicKey\x12\x1c\n\x04Type\x18\x01\x20\x02(\x0e2\
529-
\x08.KeyTypeR\x04Type\x12\x12\n\x04Data\x18\x02\x20\x02(\x0cR\x04Data\">\
530-
\n\nPrivateKey\x12\x1c\n\x04Type\x18\x01\x20\x02(\x0e2\x08.KeyTypeR\x04T\
531-
ype\x12\x12\n\x04Data\x18\x02\x20\x02(\x0cR\x04Data*.\n\x07KeyType\x12\
532-
\x07\n\x03RSA\x10\0\x12\x0b\n\x07Ed25519\x10\x01\x12\r\n\tSecp256k1\x10\
533-
\x02J\xe9\x03\n\x06\x12\x04\0\0\x10\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\
534-
\n\n\n\x02\x05\0\x12\x04\x02\0\x06\x01\n\n\n\x03\x05\0\x01\x12\x03\x02\
535-
\x05\x0c\n\x0b\n\x04\x05\0\x02\0\x12\x03\x03\x02\n\n\x0c\n\x05\x05\0\x02\
536-
\0\x01\x12\x03\x03\x02\x05\n\x0c\n\x05\x05\0\x02\0\x02\x12\x03\x03\x08\t\
537-
\n\x0b\n\x04\x05\0\x02\x01\x12\x03\x04\x02\x0e\n\x0c\n\x05\x05\0\x02\x01\
538-
\x01\x12\x03\x04\x02\t\n\x0c\n\x05\x05\0\x02\x01\x02\x12\x03\x04\x0c\r\n\
539-
\x0b\n\x04\x05\0\x02\x02\x12\x03\x05\x02\x10\n\x0c\n\x05\x05\0\x02\x02\
540-
\x01\x12\x03\x05\x02\x0b\n\x0c\n\x05\x05\0\x02\x02\x02\x12\x03\x05\x0e\
541-
\x0f\n\n\n\x02\x04\0\x12\x04\x08\0\x0b\x01\n\n\n\x03\x04\0\x01\x12\x03\
542-
\x08\x08\x11\n\x0b\n\x04\x04\0\x02\0\x12\x03\t\x02\x1c\n\x0c\n\x05\x04\0\
543-
\x02\0\x04\x12\x03\t\x02\n\n\x0c\n\x05\x04\0\x02\0\x06\x12\x03\t\x0b\x12\
544-
\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\t\x13\x17\n\x0c\n\x05\x04\0\x02\0\
545-
\x03\x12\x03\t\x1a\x1b\n\x0b\n\x04\x04\0\x02\x01\x12\x03\n\x02\x1a\n\x0c\
546-
\n\x05\x04\0\x02\x01\x04\x12\x03\n\x02\n\n\x0c\n\x05\x04\0\x02\x01\x05\
547-
\x12\x03\n\x0b\x10\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03\n\x11\x15\n\x0c\
548-
\n\x05\x04\0\x02\x01\x03\x12\x03\n\x18\x19\n\n\n\x02\x04\x01\x12\x04\r\0\
549-
\x10\x01\n\n\n\x03\x04\x01\x01\x12\x03\r\x08\x12\n\x0b\n\x04\x04\x01\x02\
550-
\0\x12\x03\x0e\x02\x1c\n\x0c\n\x05\x04\x01\x02\0\x04\x12\x03\x0e\x02\n\n\
551-
\x0c\n\x05\x04\x01\x02\0\x06\x12\x03\x0e\x0b\x12\n\x0c\n\x05\x04\x01\x02\
552-
\0\x01\x12\x03\x0e\x13\x17\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\x0e\x1a\
553-
\x1b\n\x0b\n\x04\x04\x01\x02\x01\x12\x03\x0f\x02\x1a\n\x0c\n\x05\x04\x01\
554-
\x02\x01\x04\x12\x03\x0f\x02\n\n\x0c\n\x05\x04\x01\x02\x01\x05\x12\x03\
555-
\x0f\x0b\x10\n\x0c\n\x05\x04\x01\x02\x01\x01\x12\x03\x0f\x11\x15\n\x0c\n\
556-
\x05\x04\x01\x02\x01\x03\x12\x03\x0f\x18\x19\
528+
\n\x0esrc/keys.proto\"=\n\tPublicKey\x12\x1c\n\x04Type\x18\x01\x20\x02(\
529+
\x0e2\x08.KeyTypeR\x04Type\x12\x12\n\x04Data\x18\x02\x20\x02(\x0cR\x04Da\
530+
ta\">\n\nPrivateKey\x12\x1c\n\x04Type\x18\x01\x20\x02(\x0e2\x08.KeyTypeR\
531+
\x04Type\x12\x12\n\x04Data\x18\x02\x20\x02(\x0cR\x04Data*.\n\x07KeyType\
532+
\x12\x07\n\x03RSA\x10\0\x12\x0b\n\x07Ed25519\x10\x01\x12\r\n\tSecp256k1\
533+
\x10\x02J\xe9\x03\n\x06\x12\x04\0\0\x10\x01\n\x08\n\x01\x0c\x12\x03\0\0\
534+
\x12\n\n\n\x02\x05\0\x12\x04\x02\0\x06\x01\n\n\n\x03\x05\0\x01\x12\x03\
535+
\x02\x05\x0c\n\x0b\n\x04\x05\0\x02\0\x12\x03\x03\x02\n\n\x0c\n\x05\x05\0\
536+
\x02\0\x01\x12\x03\x03\x02\x05\n\x0c\n\x05\x05\0\x02\0\x02\x12\x03\x03\
537+
\x08\t\n\x0b\n\x04\x05\0\x02\x01\x12\x03\x04\x02\x0e\n\x0c\n\x05\x05\0\
538+
\x02\x01\x01\x12\x03\x04\x02\t\n\x0c\n\x05\x05\0\x02\x01\x02\x12\x03\x04\
539+
\x0c\r\n\x0b\n\x04\x05\0\x02\x02\x12\x03\x05\x02\x10\n\x0c\n\x05\x05\0\
540+
\x02\x02\x01\x12\x03\x05\x02\x0b\n\x0c\n\x05\x05\0\x02\x02\x02\x12\x03\
541+
\x05\x0e\x0f\n\n\n\x02\x04\0\x12\x04\x08\0\x0b\x01\n\n\n\x03\x04\0\x01\
542+
\x12\x03\x08\x08\x11\n\x0b\n\x04\x04\0\x02\0\x12\x03\t\x02\x1c\n\x0c\n\
543+
\x05\x04\0\x02\0\x04\x12\x03\t\x02\n\n\x0c\n\x05\x04\0\x02\0\x06\x12\x03\
544+
\t\x0b\x12\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\t\x13\x17\n\x0c\n\x05\x04\
545+
\0\x02\0\x03\x12\x03\t\x1a\x1b\n\x0b\n\x04\x04\0\x02\x01\x12\x03\n\x02\
546+
\x1a\n\x0c\n\x05\x04\0\x02\x01\x04\x12\x03\n\x02\n\n\x0c\n\x05\x04\0\x02\
547+
\x01\x05\x12\x03\n\x0b\x10\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03\n\x11\
548+
\x15\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\n\x18\x19\n\n\n\x02\x04\x01\
549+
\x12\x04\r\0\x10\x01\n\n\n\x03\x04\x01\x01\x12\x03\r\x08\x12\n\x0b\n\x04\
550+
\x04\x01\x02\0\x12\x03\x0e\x02\x1c\n\x0c\n\x05\x04\x01\x02\0\x04\x12\x03\
551+
\x0e\x02\n\n\x0c\n\x05\x04\x01\x02\0\x06\x12\x03\x0e\x0b\x12\n\x0c\n\x05\
552+
\x04\x01\x02\0\x01\x12\x03\x0e\x13\x17\n\x0c\n\x05\x04\x01\x02\0\x03\x12\
553+
\x03\x0e\x1a\x1b\n\x0b\n\x04\x04\x01\x02\x01\x12\x03\x0f\x02\x1a\n\x0c\n\
554+
\x05\x04\x01\x02\x01\x04\x12\x03\x0f\x02\n\n\x0c\n\x05\x04\x01\x02\x01\
555+
\x05\x12\x03\x0f\x0b\x10\n\x0c\n\x05\x04\x01\x02\x01\x01\x12\x03\x0f\x11\
556+
\x15\n\x0c\n\x05\x04\x01\x02\x01\x03\x12\x03\x0f\x18\x19\
557557
";
558558

559559
static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy {

core/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
pub use multiaddr;
4040
pub use multistream_select::Negotiated;
4141

42-
mod keys;
42+
mod keys_proto;
4343
mod peer_id;
4444
mod translation;
4545

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/sh
22

3-
../../scripts/protobuf/gen.sh rpc.proto ./src/
3+
../../scripts/protobuf/gen.sh src/rpc.proto

protocols/floodsub/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
pub mod protocol;
2525

2626
mod layer;
27-
mod rpc;
27+
mod rpc_proto;
2828
mod topic;
2929

3030
pub use self::layer::{Floodsub, FloodsubEvent};

protocols/floodsub/src/protocol.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
1919
// DEALINGS IN THE SOFTWARE.
2020

21-
use crate::rpc;
21+
use crate::rpc_proto;
2222
use crate::topic::TopicHash;
2323
use libp2p_core::{InboundUpgrade, OutboundUpgrade, UpgradeInfo, PeerId, upgrade};
2424
use protobuf::{ProtobufError, Message as ProtobufMessage};
@@ -58,7 +58,7 @@ where
5858
#[inline]
5959
fn upgrade_inbound(self, socket: upgrade::Negotiated<TSocket>, _: Self::Info) -> Self::Future {
6060
upgrade::read_one_then(socket, 2048, (), |packet, ()| {
61-
let mut rpc: rpc::RPC = protobuf::parse_from_bytes(&packet)?;
61+
let mut rpc: rpc_proto::RPC = protobuf::parse_from_bytes(&packet)?;
6262

6363
let mut messages = Vec::with_capacity(rpc.get_publish().len());
6464
for mut publish in rpc.take_publish().into_iter() {
@@ -180,10 +180,10 @@ where
180180
impl FloodsubRpc {
181181
/// Turns this `FloodsubRpc` into a message that can be sent to a substream.
182182
fn into_bytes(self) -> Vec<u8> {
183-
let mut proto = rpc::RPC::new();
183+
let mut proto = rpc_proto::RPC::new();
184184

185185
for message in self.messages {
186-
let mut msg = rpc::Message::new();
186+
let mut msg = rpc_proto::Message::new();
187187
msg.set_from(message.source.into_bytes());
188188
msg.set_data(message.data);
189189
msg.set_seqno(message.sequence_number);
@@ -198,7 +198,7 @@ impl FloodsubRpc {
198198
}
199199

200200
for topic in self.subscriptions {
201-
let mut subscription = rpc::RPC_SubOpts::new();
201+
let mut subscription = rpc_proto::RPC_SubOpts::new();
202202
subscription.set_subscribe(topic.action == FloodsubSubscriptionAction::Subscribe);
203203
subscription.set_topicid(topic.topic.into_string());
204204
proto.mut_subscriptions().push(subscription);
File renamed without changes.

protocols/floodsub/src/rpc.rs renamed to protocols/floodsub/src/rpc_proto.rs

Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#![allow(unsafe_code)]
1818
#![allow(unused_imports)]
1919
#![allow(unused_results)]
20-
//! Generated file from `rpc.proto`
20+
//! Generated file from `src/rpc.proto`
2121
2222
use protobuf::Message as Message_imported_for_functions;
2323
use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;
@@ -1609,58 +1609,58 @@ impl ::protobuf::reflect::ProtobufValue for TopicDescriptor_EncOpts_EncMode {
16091609
}
16101610

16111611
static file_descriptor_proto_data: &'static [u8] = b"\
1612-
\n\trpc.proto\x12\x0bfloodsub.pb\"\xb8\x01\n\x03RPC\x12>\n\rsubscription\
1613-
s\x18\x01\x20\x03(\x0b2\x18.floodsub.pb.RPC.SubOptsR\rsubscriptions\x12.\
1614-
\n\x07publish\x18\x02\x20\x03(\x0b2\x14.floodsub.pb.MessageR\x07publish\
1615-
\x1aA\n\x07SubOpts\x12\x1c\n\tsubscribe\x18\x01\x20\x01(\x08R\tsubscribe\
1616-
\x12\x18\n\x07topicid\x18\x02\x20\x01(\tR\x07topicid\"c\n\x07Message\x12\
1617-
\x12\n\x04from\x18\x01\x20\x01(\x0cR\x04from\x12\x12\n\x04data\x18\x02\
1618-
\x20\x01(\x0cR\x04data\x12\x14\n\x05seqno\x18\x03\x20\x01(\x0cR\x05seqno\
1619-
\x12\x1a\n\x08topicIDs\x18\x04\x20\x03(\tR\x08topicIDs\"\xbe\x03\n\x0fTo\
1620-
picDescriptor\x12\x12\n\x04name\x18\x01\x20\x01(\tR\x04name\x129\n\x04au\
1621-
th\x18\x02\x20\x01(\x0b2%.floodsub.pb.TopicDescriptor.AuthOptsR\x04auth\
1622-
\x126\n\x03enc\x18\x03\x20\x01(\x0b2$.floodsub.pb.TopicDescriptor.EncOpt\
1623-
sR\x03enc\x1a\x8a\x01\n\x08AuthOpts\x12B\n\x04mode\x18\x01\x20\x01(\x0e2\
1624-
..floodsub.pb.TopicDescriptor.AuthOpts.AuthModeR\x04mode\x12\x12\n\x04ke\
1625-
ys\x18\x02\x20\x03(\x0cR\x04keys\"&\n\x08AuthMode\x12\x08\n\x04NONE\x10\
1626-
\0\x12\x07\n\x03KEY\x10\x01\x12\x07\n\x03WOT\x10\x02\x1a\x96\x01\n\x07En\
1627-
cOpts\x12@\n\x04mode\x18\x01\x20\x01(\x0e2,.floodsub.pb.TopicDescriptor.\
1628-
EncOpts.EncModeR\x04mode\x12\x1c\n\tkeyHashes\x18\x02\x20\x03(\x0cR\tkey\
1629-
Hashes\"+\n\x07EncMode\x12\x08\n\x04NONE\x10\0\x12\r\n\tSHAREDKEY\x10\
1630-
\x01\x12\x07\n\x03WOT\x10\x02J\xcc\x10\n\x06\x12\x04\0\00\x01\n\x08\n\
1631-
\x01\x0c\x12\x03\0\0\x12\n\x08\n\x01\x02\x12\x03\x02\x08\x13\n\n\n\x02\
1632-
\x04\0\x12\x04\x04\0\x0c\x01\n\n\n\x03\x04\0\x01\x12\x03\x04\x08\x0b\n\
1633-
\x0b\n\x04\x04\0\x02\0\x12\x03\x05\x08+\n\x0c\n\x05\x04\0\x02\0\x04\x12\
1634-
\x03\x05\x08\x10\n\x0c\n\x05\x04\0\x02\0\x06\x12\x03\x05\x11\x18\n\x0c\n\
1635-
\x05\x04\0\x02\0\x01\x12\x03\x05\x19&\n\x0c\n\x05\x04\0\x02\0\x03\x12\
1636-
\x03\x05)*\n\x0b\n\x04\x04\0\x02\x01\x12\x03\x06\x08%\n\x0c\n\x05\x04\0\
1637-
\x02\x01\x04\x12\x03\x06\x08\x10\n\x0c\n\x05\x04\0\x02\x01\x06\x12\x03\
1638-
\x06\x11\x18\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03\x06\x19\x20\n\x0c\n\
1639-
\x05\x04\0\x02\x01\x03\x12\x03\x06#$\n\x0c\n\x04\x04\0\x03\0\x12\x04\x08\
1640-
\x08\x0b\t\n\x0c\n\x05\x04\0\x03\0\x01\x12\x03\x08\x10\x17\n(\n\x06\x04\
1641-
\0\x03\0\x02\0\x12\x03\t\x10,\"\x19\x20subscribe\x20or\x20unsubcribe\n\n\
1642-
\x0e\n\x07\x04\0\x03\0\x02\0\x04\x12\x03\t\x10\x18\n\x0e\n\x07\x04\0\x03\
1643-
\0\x02\0\x05\x12\x03\t\x19\x1d\n\x0e\n\x07\x04\0\x03\0\x02\0\x01\x12\x03\
1644-
\t\x1e'\n\x0e\n\x07\x04\0\x03\0\x02\0\x03\x12\x03\t*+\n\r\n\x06\x04\0\
1645-
\x03\0\x02\x01\x12\x03\n\x10,\n\x0e\n\x07\x04\0\x03\0\x02\x01\x04\x12\
1646-
\x03\n\x10\x18\n\x0e\n\x07\x04\0\x03\0\x02\x01\x05\x12\x03\n\x19\x1f\n\
1647-
\x0e\n\x07\x04\0\x03\0\x02\x01\x01\x12\x03\n\x20'\n\x0e\n\x07\x04\0\x03\
1648-
\0\x02\x01\x03\x12\x03\n*+\n\n\n\x02\x04\x01\x12\x04\x0e\0\x13\x01\n\n\n\
1649-
\x03\x04\x01\x01\x12\x03\x0e\x08\x0f\n\x0b\n\x04\x04\x01\x02\0\x12\x03\
1650-
\x0f\x08\x20\n\x0c\n\x05\x04\x01\x02\0\x04\x12\x03\x0f\x08\x10\n\x0c\n\
1651-
\x05\x04\x01\x02\0\x05\x12\x03\x0f\x11\x16\n\x0c\n\x05\x04\x01\x02\0\x01\
1652-
\x12\x03\x0f\x17\x1b\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\x0f\x1e\x1f\n\
1653-
\x0b\n\x04\x04\x01\x02\x01\x12\x03\x10\x08\x20\n\x0c\n\x05\x04\x01\x02\
1654-
\x01\x04\x12\x03\x10\x08\x10\n\x0c\n\x05\x04\x01\x02\x01\x05\x12\x03\x10\
1655-
\x11\x16\n\x0c\n\x05\x04\x01\x02\x01\x01\x12\x03\x10\x17\x1b\n\x0c\n\x05\
1656-
\x04\x01\x02\x01\x03\x12\x03\x10\x1e\x1f\n\x0b\n\x04\x04\x01\x02\x02\x12\
1657-
\x03\x11\x08!\n\x0c\n\x05\x04\x01\x02\x02\x04\x12\x03\x11\x08\x10\n\x0c\
1658-
\n\x05\x04\x01\x02\x02\x05\x12\x03\x11\x11\x16\n\x0c\n\x05\x04\x01\x02\
1659-
\x02\x01\x12\x03\x11\x17\x1c\n\x0c\n\x05\x04\x01\x02\x02\x03\x12\x03\x11\
1660-
\x1f\x20\n\x0b\n\x04\x04\x01\x02\x03\x12\x03\x12\x08%\n\x0c\n\x05\x04\
1661-
\x01\x02\x03\x04\x12\x03\x12\x08\x10\n\x0c\n\x05\x04\x01\x02\x03\x05\x12\
1662-
\x03\x12\x11\x17\n\x0c\n\x05\x04\x01\x02\x03\x01\x12\x03\x12\x18\x20\n\
1663-
\x0c\n\x05\x04\x01\x02\x03\x03\x12\x03\x12#$\nC\n\x02\x04\x02\x12\x04\
1612+
\n\rsrc/rpc.proto\x12\x0bfloodsub.pb\"\xb8\x01\n\x03RPC\x12>\n\rsubscrip\
1613+
tions\x18\x01\x20\x03(\x0b2\x18.floodsub.pb.RPC.SubOptsR\rsubscriptions\
1614+
\x12.\n\x07publish\x18\x02\x20\x03(\x0b2\x14.floodsub.pb.MessageR\x07pub\
1615+
lish\x1aA\n\x07SubOpts\x12\x1c\n\tsubscribe\x18\x01\x20\x01(\x08R\tsubsc\
1616+
ribe\x12\x18\n\x07topicid\x18\x02\x20\x01(\tR\x07topicid\"c\n\x07Message\
1617+
\x12\x12\n\x04from\x18\x01\x20\x01(\x0cR\x04from\x12\x12\n\x04data\x18\
1618+
\x02\x20\x01(\x0cR\x04data\x12\x14\n\x05seqno\x18\x03\x20\x01(\x0cR\x05s\
1619+
eqno\x12\x1a\n\x08topicIDs\x18\x04\x20\x03(\tR\x08topicIDs\"\xbe\x03\n\
1620+
\x0fTopicDescriptor\x12\x12\n\x04name\x18\x01\x20\x01(\tR\x04name\x129\n\
1621+
\x04auth\x18\x02\x20\x01(\x0b2%.floodsub.pb.TopicDescriptor.AuthOptsR\
1622+
\x04auth\x126\n\x03enc\x18\x03\x20\x01(\x0b2$.floodsub.pb.TopicDescripto\
1623+
r.EncOptsR\x03enc\x1a\x8a\x01\n\x08AuthOpts\x12B\n\x04mode\x18\x01\x20\
1624+
\x01(\x0e2..floodsub.pb.TopicDescriptor.AuthOpts.AuthModeR\x04mode\x12\
1625+
\x12\n\x04keys\x18\x02\x20\x03(\x0cR\x04keys\"&\n\x08AuthMode\x12\x08\n\
1626+
\x04NONE\x10\0\x12\x07\n\x03KEY\x10\x01\x12\x07\n\x03WOT\x10\x02\x1a\x96\
1627+
\x01\n\x07EncOpts\x12@\n\x04mode\x18\x01\x20\x01(\x0e2,.floodsub.pb.Topi\
1628+
cDescriptor.EncOpts.EncModeR\x04mode\x12\x1c\n\tkeyHashes\x18\x02\x20\
1629+
\x03(\x0cR\tkeyHashes\"+\n\x07EncMode\x12\x08\n\x04NONE\x10\0\x12\r\n\tS\
1630+
HAREDKEY\x10\x01\x12\x07\n\x03WOT\x10\x02J\xcc\x10\n\x06\x12\x04\0\00\
1631+
\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\x08\n\x01\x02\x12\x03\x02\x08\x13\
1632+
\n\n\n\x02\x04\0\x12\x04\x04\0\x0c\x01\n\n\n\x03\x04\0\x01\x12\x03\x04\
1633+
\x08\x0b\n\x0b\n\x04\x04\0\x02\0\x12\x03\x05\x08+\n\x0c\n\x05\x04\0\x02\
1634+
\0\x04\x12\x03\x05\x08\x10\n\x0c\n\x05\x04\0\x02\0\x06\x12\x03\x05\x11\
1635+
\x18\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x05\x19&\n\x0c\n\x05\x04\0\x02\
1636+
\0\x03\x12\x03\x05)*\n\x0b\n\x04\x04\0\x02\x01\x12\x03\x06\x08%\n\x0c\n\
1637+
\x05\x04\0\x02\x01\x04\x12\x03\x06\x08\x10\n\x0c\n\x05\x04\0\x02\x01\x06\
1638+
\x12\x03\x06\x11\x18\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03\x06\x19\x20\n\
1639+
\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\x06#$\n\x0c\n\x04\x04\0\x03\0\x12\
1640+
\x04\x08\x08\x0b\t\n\x0c\n\x05\x04\0\x03\0\x01\x12\x03\x08\x10\x17\n(\n\
1641+
\x06\x04\0\x03\0\x02\0\x12\x03\t\x10,\"\x19\x20subscribe\x20or\x20unsubc\
1642+
ribe\n\n\x0e\n\x07\x04\0\x03\0\x02\0\x04\x12\x03\t\x10\x18\n\x0e\n\x07\
1643+
\x04\0\x03\0\x02\0\x05\x12\x03\t\x19\x1d\n\x0e\n\x07\x04\0\x03\0\x02\0\
1644+
\x01\x12\x03\t\x1e'\n\x0e\n\x07\x04\0\x03\0\x02\0\x03\x12\x03\t*+\n\r\n\
1645+
\x06\x04\0\x03\0\x02\x01\x12\x03\n\x10,\n\x0e\n\x07\x04\0\x03\0\x02\x01\
1646+
\x04\x12\x03\n\x10\x18\n\x0e\n\x07\x04\0\x03\0\x02\x01\x05\x12\x03\n\x19\
1647+
\x1f\n\x0e\n\x07\x04\0\x03\0\x02\x01\x01\x12\x03\n\x20'\n\x0e\n\x07\x04\
1648+
\0\x03\0\x02\x01\x03\x12\x03\n*+\n\n\n\x02\x04\x01\x12\x04\x0e\0\x13\x01\
1649+
\n\n\n\x03\x04\x01\x01\x12\x03\x0e\x08\x0f\n\x0b\n\x04\x04\x01\x02\0\x12\
1650+
\x03\x0f\x08\x20\n\x0c\n\x05\x04\x01\x02\0\x04\x12\x03\x0f\x08\x10\n\x0c\
1651+
\n\x05\x04\x01\x02\0\x05\x12\x03\x0f\x11\x16\n\x0c\n\x05\x04\x01\x02\0\
1652+
\x01\x12\x03\x0f\x17\x1b\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\x0f\x1e\
1653+
\x1f\n\x0b\n\x04\x04\x01\x02\x01\x12\x03\x10\x08\x20\n\x0c\n\x05\x04\x01\
1654+
\x02\x01\x04\x12\x03\x10\x08\x10\n\x0c\n\x05\x04\x01\x02\x01\x05\x12\x03\
1655+
\x10\x11\x16\n\x0c\n\x05\x04\x01\x02\x01\x01\x12\x03\x10\x17\x1b\n\x0c\n\
1656+
\x05\x04\x01\x02\x01\x03\x12\x03\x10\x1e\x1f\n\x0b\n\x04\x04\x01\x02\x02\
1657+
\x12\x03\x11\x08!\n\x0c\n\x05\x04\x01\x02\x02\x04\x12\x03\x11\x08\x10\n\
1658+
\x0c\n\x05\x04\x01\x02\x02\x05\x12\x03\x11\x11\x16\n\x0c\n\x05\x04\x01\
1659+
\x02\x02\x01\x12\x03\x11\x17\x1c\n\x0c\n\x05\x04\x01\x02\x02\x03\x12\x03\
1660+
\x11\x1f\x20\n\x0b\n\x04\x04\x01\x02\x03\x12\x03\x12\x08%\n\x0c\n\x05\
1661+
\x04\x01\x02\x03\x04\x12\x03\x12\x08\x10\n\x0c\n\x05\x04\x01\x02\x03\x05\
1662+
\x12\x03\x12\x11\x17\n\x0c\n\x05\x04\x01\x02\x03\x01\x12\x03\x12\x18\x20\
1663+
\n\x0c\n\x05\x04\x01\x02\x03\x03\x12\x03\x12#$\nC\n\x02\x04\x02\x12\x04\
16641664
\x16\00\x01\x1a7\x20topicID\x20=\x20hash(topicDescriptor);\x20(not\x20th\
16651665
e\x20topic.name)\n\n\n\n\x03\x04\x02\x01\x12\x03\x16\x08\x17\n\x0b\n\x04\
16661666
\x04\x02\x02\0\x12\x03\x17\x08!\n\x0c\n\x05\x04\x02\x02\0\x04\x12\x03\

0 commit comments

Comments
 (0)