diff --git a/core/Cargo.toml b/core/Cargo.toml index 5f6fcbc0..a405de6b 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -19,7 +19,7 @@ multihash = { package = "parity-multihash", version = "0.1.0", path = "../misc/m multistream-select = { version = "0.2.0", path = "../misc/multistream-select" } futures = { version = "0.1", features = ["use_std"] } parking_lot = "0.7" -protobuf = "2.0.2" +protobuf = "2.3" quick-error = "1.2" rw-stream-sink = { version = "0.1.0", path = "../misc/rw-stream-sink" } smallvec = "0.6" diff --git a/core/regen_structs_proto.sh b/core/regen_structs_proto.sh index e1f75a97..7a0caead 100755 --- a/core/regen_structs_proto.sh +++ b/core/regen_structs_proto.sh @@ -6,7 +6,7 @@ sudo docker run --rm -v `pwd`:/usr/code:z -w /usr/code rust /bin/bash -c " \ apt-get update; \ apt-get install -y protobuf-compiler; \ - cargo install --version 2.0.2 protobuf-codegen; \ + cargo install --version 2.3.0 protobuf-codegen; \ protoc --rust_out . keys.proto" sudo chown $USER:$USER keys.rs diff --git a/core/src/keys_proto.rs b/core/src/keys_proto.rs index f0ba4435..745df110 100644 --- a/core/src/keys_proto.rs +++ b/core/src/keys_proto.rs @@ -1,9 +1,9 @@ -// This file is generated by rust-protobuf 2.0.2. Do not edit +// This file is generated by rust-protobuf 2.3.0. Do not edit // @generated // https://github.com/Manishearth/rust-clippy/issues/702 #![allow(unknown_lints)] -#![allow(clippy)] +#![allow(clippy::all)] #![cfg_attr(rustfmt, rustfmt_skip)] @@ -27,8 +27,8 @@ pub struct PublicKey { Type: ::std::option::Option, Data: ::protobuf::SingularField<::std::vec::Vec>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, } impl PublicKey { @@ -241,8 +241,8 @@ pub struct PrivateKey { Type: ::std::option::Option, Data: ::protobuf::SingularField<::std::vec::Vec>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, } impl PrivateKey { @@ -495,6 +495,12 @@ impl ::protobuf::ProtobufEnum for KeyType { impl ::std::marker::Copy for KeyType { } +impl ::std::default::Default for KeyType { + fn default() -> Self { + KeyType::RSA + } +} + impl ::protobuf::reflect::ProtobufValue for KeyType { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) diff --git a/protocols/floodsub/Cargo.toml b/protocols/floodsub/Cargo.toml index 13911ef8..209beb0f 100644 --- a/protocols/floodsub/Cargo.toml +++ b/protocols/floodsub/Cargo.toml @@ -16,7 +16,7 @@ cuckoofilter = "0.3.2" fnv = "1.0" futures = "0.1" libp2p-core = { version = "0.2.0", path = "../../core" } -protobuf = "2.0.2" +protobuf = "2.3" rand = "0.6" smallvec = "0.6.5" tokio-codec = "0.1" diff --git a/protocols/floodsub/regen_structs_proto.sh b/protocols/floodsub/regen_structs_proto.sh index 054ae5cd..fa704817 100755 --- a/protocols/floodsub/regen_structs_proto.sh +++ b/protocols/floodsub/regen_structs_proto.sh @@ -5,7 +5,7 @@ docker run --rm -v `pwd`:/usr/code:z -w /usr/code rust /bin/bash -c " \ apt-get update; \ apt-get install -y protobuf-compiler; \ - cargo install --version 2.0.2 protobuf-codegen; \ + cargo install --version 2.3.0 protobuf-codegen; \ protoc --rust_out . rpc.proto" sudo chown $USER:$USER *.rs diff --git a/protocols/floodsub/src/rpc_proto.rs b/protocols/floodsub/src/rpc_proto.rs index 9976669e..15670eda 100644 --- a/protocols/floodsub/src/rpc_proto.rs +++ b/protocols/floodsub/src/rpc_proto.rs @@ -1,9 +1,9 @@ -// This file is generated by rust-protobuf 2.0.2. Do not edit +// This file is generated by rust-protobuf 2.3.0. Do not edit // @generated // https://github.com/Manishearth/rust-clippy/issues/702 #![allow(unknown_lints)] -#![allow(clippy)] +#![allow(clippy::all)] #![cfg_attr(rustfmt, rustfmt_skip)] @@ -27,8 +27,8 @@ pub struct RPC { subscriptions: ::protobuf::RepeatedField, publish: ::protobuf::RepeatedField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, } impl RPC { @@ -246,8 +246,8 @@ pub struct RPC_SubOpts { subscribe: ::std::option::Option, topicid: ::protobuf::SingularField<::std::string::String>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, } impl RPC_SubOpts { @@ -460,8 +460,8 @@ pub struct Message { seqno: ::protobuf::SingularField<::std::vec::Vec>, topicIDs: ::protobuf::RepeatedField<::std::string::String>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, } impl Message { @@ -777,8 +777,8 @@ pub struct TopicDescriptor { auth: ::protobuf::SingularPtrField, enc: ::protobuf::SingularPtrField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, } impl TopicDescriptor { @@ -1063,8 +1063,8 @@ pub struct TopicDescriptor_AuthOpts { mode: ::std::option::Option, keys: ::protobuf::RepeatedField<::std::vec::Vec>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, } impl TopicDescriptor_AuthOpts { @@ -1300,6 +1300,12 @@ impl ::protobuf::ProtobufEnum for TopicDescriptor_AuthOpts_AuthMode { impl ::std::marker::Copy for TopicDescriptor_AuthOpts_AuthMode { } +impl ::std::default::Default for TopicDescriptor_AuthOpts_AuthMode { + fn default() -> Self { + TopicDescriptor_AuthOpts_AuthMode::NONE + } +} + impl ::protobuf::reflect::ProtobufValue for TopicDescriptor_AuthOpts_AuthMode { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) @@ -1312,8 +1318,8 @@ pub struct TopicDescriptor_EncOpts { mode: ::std::option::Option, keyHashes: ::protobuf::RepeatedField<::std::vec::Vec>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, } impl TopicDescriptor_EncOpts { @@ -1549,6 +1555,12 @@ impl ::protobuf::ProtobufEnum for TopicDescriptor_EncOpts_EncMode { impl ::std::marker::Copy for TopicDescriptor_EncOpts_EncMode { } +impl ::std::default::Default for TopicDescriptor_EncOpts_EncMode { + fn default() -> Self { + TopicDescriptor_EncOpts_EncMode::NONE + } +} + impl ::protobuf::reflect::ProtobufValue for TopicDescriptor_EncOpts_EncMode { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) diff --git a/protocols/identify/Cargo.toml b/protocols/identify/Cargo.toml index dcbfd088..3c16c8f8 100644 --- a/protocols/identify/Cargo.toml +++ b/protocols/identify/Cargo.toml @@ -17,7 +17,7 @@ libp2p-core = { version = "0.2.0", path = "../../core" } log = "0.4.1" multiaddr = { package = "parity-multiaddr", version = "0.1.0", path = "../../misc/multiaddr" } parking_lot = "0.7" -protobuf = "2.0.2" +protobuf = "2.3" smallvec = "0.6" tokio-codec = "0.1" tokio-io = "0.1.0" diff --git a/protocols/identify/regen_structs_proto.sh b/protocols/identify/regen_structs_proto.sh index 3a4354ed..621f0313 100755 --- a/protocols/identify/regen_structs_proto.sh +++ b/protocols/identify/regen_structs_proto.sh @@ -5,7 +5,7 @@ sudo docker run --rm -v `pwd`:/usr/code:z -w /usr/code rust /bin/bash -c " \ apt-get update; \ apt-get install -y protobuf-compiler; \ - cargo install --version 2.0.2 protobuf-codegen; \ + cargo install --version 2.3.0 protobuf-codegen; \ protoc --rust_out . structs.proto" sudo chown $USER:$USER *.rs diff --git a/protocols/identify/src/structs_proto.rs b/protocols/identify/src/structs_proto.rs index 6267f2f8..72818e09 100644 --- a/protocols/identify/src/structs_proto.rs +++ b/protocols/identify/src/structs_proto.rs @@ -1,9 +1,9 @@ -// This file is generated by rust-protobuf 2.0.2. Do not edit +// This file is generated by rust-protobuf 2.3.0. Do not edit // @generated // https://github.com/Manishearth/rust-clippy/issues/702 #![allow(unknown_lints)] -#![allow(clippy)] +#![allow(clippy::all)] #![cfg_attr(rustfmt, rustfmt_skip)] @@ -31,8 +31,8 @@ pub struct Identify { observedAddr: ::protobuf::SingularField<::std::vec::Vec>, protocols: ::protobuf::RepeatedField<::std::string::String>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, } impl Identify { diff --git a/protocols/kad/Cargo.toml b/protocols/kad/Cargo.toml index fbc37618..35b3347c 100644 --- a/protocols/kad/Cargo.toml +++ b/protocols/kad/Cargo.toml @@ -23,7 +23,7 @@ log = "0.4" multiaddr = { package = "parity-multiaddr", version = "0.1.0", path = "../../misc/multiaddr" } multihash = { package = "parity-multihash", version = "0.1.0", path = "../../misc/multihash" } parking_lot = "0.7" -protobuf = "2.0.2" +protobuf = "2.3" rand = "0.6.0" smallvec = "0.6" tokio-codec = "0.1" diff --git a/protocols/kad/regen_dht_proto.sh b/protocols/kad/regen_dht_proto.sh index 5a65b733..91aba0ca 100755 --- a/protocols/kad/regen_dht_proto.sh +++ b/protocols/kad/regen_dht_proto.sh @@ -5,7 +5,7 @@ docker run --rm -v `pwd`:/usr/code:z -w /usr/code rust /bin/bash -c " \ apt-get update; \ apt-get install -y protobuf-compiler; \ - cargo install --version 2.0.2 protobuf-codegen; \ + cargo install --version 2.3.0 protobuf-codegen; \ protoc --rust_out . dht.proto;\ protoc --rust_out . record.proto" diff --git a/protocols/kad/src/protobuf_structs/dht.rs b/protocols/kad/src/protobuf_structs/dht.rs index 608a0ad4..c48ee327 100644 --- a/protocols/kad/src/protobuf_structs/dht.rs +++ b/protocols/kad/src/protobuf_structs/dht.rs @@ -1,9 +1,9 @@ -// This file is generated by rust-protobuf 2.0.2. Do not edit +// This file is generated by rust-protobuf 2.3.0. Do not edit // @generated // https://github.com/Manishearth/rust-clippy/issues/702 #![allow(unknown_lints)] -#![allow(clippy)] +#![allow(clippy::all)] #![cfg_attr(rustfmt, rustfmt_skip)] @@ -31,8 +31,8 @@ pub struct Message { closerPeers: ::protobuf::RepeatedField, providerPeers: ::protobuf::RepeatedField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, } impl Message { @@ -430,8 +430,8 @@ pub struct Message_Peer { addrs: ::protobuf::RepeatedField<::std::vec::Vec>, connection: ::std::option::Option, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, } impl Message_Peer { @@ -727,6 +727,12 @@ impl ::protobuf::ProtobufEnum for Message_MessageType { impl ::std::marker::Copy for Message_MessageType { } +impl ::std::default::Default for Message_MessageType { + fn default() -> Self { + Message_MessageType::PUT_VALUE + } +} + impl ::protobuf::reflect::ProtobufValue for Message_MessageType { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) @@ -782,6 +788,12 @@ impl ::protobuf::ProtobufEnum for Message_ConnectionType { impl ::std::marker::Copy for Message_ConnectionType { } +impl ::std::default::Default for Message_ConnectionType { + fn default() -> Self { + Message_ConnectionType::NOT_CONNECTED + } +} + impl ::protobuf::reflect::ProtobufValue for Message_ConnectionType { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) diff --git a/protocols/kad/src/protobuf_structs/record.rs b/protocols/kad/src/protobuf_structs/record.rs index 17e80d43..4038ff82 100644 --- a/protocols/kad/src/protobuf_structs/record.rs +++ b/protocols/kad/src/protobuf_structs/record.rs @@ -1,9 +1,9 @@ -// This file is generated by rust-protobuf 2.0.2. Do not edit +// This file is generated by rust-protobuf 2.3.0. Do not edit // @generated // https://github.com/Manishearth/rust-clippy/issues/702 #![allow(unknown_lints)] -#![allow(clippy)] +#![allow(clippy::all)] #![cfg_attr(rustfmt, rustfmt_skip)] @@ -30,8 +30,8 @@ pub struct Record { signature: ::protobuf::SingularField<::std::vec::Vec>, timeReceived: ::protobuf::SingularField<::std::string::String>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, } impl Record { diff --git a/protocols/secio/Cargo.toml b/protocols/secio/Cargo.toml index cb4a55e0..2c098f69 100644 --- a/protocols/secio/Cargo.toml +++ b/protocols/secio/Cargo.toml @@ -15,7 +15,7 @@ bytes = "0.4" futures = "0.1" libp2p-core = { version = "0.2.0", path = "../../core" } log = "0.4.1" -protobuf = "2.0.2" +protobuf = "2.3" rand = "0.6" secp256k1 = { version = "0.12", features = ["rand"], optional = true } aes-ctr = "0.3" diff --git a/protocols/secio/regen_structs_proto.sh b/protocols/secio/regen_structs_proto.sh index 3a4354ed..621f0313 100755 --- a/protocols/secio/regen_structs_proto.sh +++ b/protocols/secio/regen_structs_proto.sh @@ -5,7 +5,7 @@ sudo docker run --rm -v `pwd`:/usr/code:z -w /usr/code rust /bin/bash -c " \ apt-get update; \ apt-get install -y protobuf-compiler; \ - cargo install --version 2.0.2 protobuf-codegen; \ + cargo install --version 2.3.0 protobuf-codegen; \ protoc --rust_out . structs.proto" sudo chown $USER:$USER *.rs diff --git a/protocols/secio/src/structs_proto.rs b/protocols/secio/src/structs_proto.rs index a481f381..64b06ae2 100644 --- a/protocols/secio/src/structs_proto.rs +++ b/protocols/secio/src/structs_proto.rs @@ -1,9 +1,9 @@ -// This file is generated by rust-protobuf 2.0.2. Do not edit +// This file is generated by rust-protobuf 2.3.0. Do not edit // @generated // https://github.com/Manishearth/rust-clippy/issues/702 #![allow(unknown_lints)] -#![allow(clippy)] +#![allow(clippy::all)] #![cfg_attr(rustfmt, rustfmt_skip)] @@ -30,8 +30,8 @@ pub struct Propose { ciphers: ::protobuf::SingularField<::std::string::String>, hashes: ::protobuf::SingularField<::std::string::String>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, } impl Propose { @@ -408,8 +408,8 @@ pub struct Exchange { epubkey: ::protobuf::SingularField<::std::vec::Vec>, signature: ::protobuf::SingularField<::std::vec::Vec>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, } impl Exchange {