From f1a20f12dcd13b1832b2fd866b234a90fe1b4203 Mon Sep 17 00:00:00 2001 From: zixuanzh Date: Thu, 28 Mar 2019 15:23:56 -0400 Subject: [PATCH] update from to from_id in proto --- libp2p/pubsub/pb/rpc.proto | 2 +- libp2p/pubsub/pb/rpc_pb2.py | 46 ++++++++++++++++++------------------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/libp2p/pubsub/pb/rpc.proto b/libp2p/pubsub/pb/rpc.proto index 764b033..f07da20 100644 --- a/libp2p/pubsub/pb/rpc.proto +++ b/libp2p/pubsub/pb/rpc.proto @@ -15,7 +15,7 @@ message RPC { } message Message { - optional bytes from = 1; + optional bytes from_id = 1; optional bytes data = 2; optional bytes seqno = 3; repeated string topicIDs = 4; diff --git a/libp2p/pubsub/pb/rpc_pb2.py b/libp2p/pubsub/pb/rpc_pb2.py index 57035ed..d315782 100644 --- a/libp2p/pubsub/pb/rpc_pb2.py +++ b/libp2p/pubsub/pb/rpc_pb2.py @@ -19,7 +19,7 @@ DESCRIPTOR = _descriptor.FileDescriptor( package='pubsub.pb', syntax='proto2', serialized_options=None, - serialized_pb=_b('\n\trpc.proto\x12\tpubsub.pb\"\xb4\x01\n\x03RPC\x12-\n\rsubscriptions\x18\x01 \x03(\x0b\x32\x16.pubsub.pb.RPC.SubOpts\x12#\n\x07publish\x18\x02 \x03(\x0b\x32\x12.pubsub.pb.Message\x12*\n\x07\x63ontrol\x18\x03 \x01(\x0b\x32\x19.pubsub.pb.ControlMessage\x1a-\n\x07SubOpts\x12\x11\n\tsubscribe\x18\x01 \x01(\x08\x12\x0f\n\x07topicid\x18\x02 \x01(\t\"f\n\x07Message\x12\x0c\n\x04\x66rom\x18\x01 \x01(\x0c\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\x12\r\n\x05seqno\x18\x03 \x01(\x0c\x12\x10\n\x08topicIDs\x18\x04 \x03(\t\x12\x11\n\tsignature\x18\x05 \x01(\x0c\x12\x0b\n\x03key\x18\x06 \x01(\x0c\"\xb0\x01\n\x0e\x43ontrolMessage\x12&\n\x05ihave\x18\x01 \x03(\x0b\x32\x17.pubsub.pb.ControlIHave\x12&\n\x05iwant\x18\x02 \x03(\x0b\x32\x17.pubsub.pb.ControlIWant\x12&\n\x05graft\x18\x03 \x03(\x0b\x32\x17.pubsub.pb.ControlGraft\x12&\n\x05prune\x18\x04 \x03(\x0b\x32\x17.pubsub.pb.ControlPrune\"3\n\x0c\x43ontrolIHave\x12\x0f\n\x07topicID\x18\x01 \x01(\t\x12\x12\n\nmessageIDs\x18\x02 \x03(\t\"\"\n\x0c\x43ontrolIWant\x12\x12\n\nmessageIDs\x18\x01 \x03(\t\"\x1f\n\x0c\x43ontrolGraft\x12\x0f\n\x07topicID\x18\x01 \x01(\t\"\x1f\n\x0c\x43ontrolPrune\x12\x0f\n\x07topicID\x18\x01 \x01(\t\"\x87\x03\n\x0fTopicDescriptor\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x31\n\x04\x61uth\x18\x02 \x01(\x0b\x32#.pubsub.pb.TopicDescriptor.AuthOpts\x12/\n\x03\x65nc\x18\x03 \x01(\x0b\x32\".pubsub.pb.TopicDescriptor.EncOpts\x1a|\n\x08\x41uthOpts\x12:\n\x04mode\x18\x01 \x01(\x0e\x32,.pubsub.pb.TopicDescriptor.AuthOpts.AuthMode\x12\x0c\n\x04keys\x18\x02 \x03(\x0c\"&\n\x08\x41uthMode\x12\x08\n\x04NONE\x10\x00\x12\x07\n\x03KEY\x10\x01\x12\x07\n\x03WOT\x10\x02\x1a\x83\x01\n\x07\x45ncOpts\x12\x38\n\x04mode\x18\x01 \x01(\x0e\x32*.pubsub.pb.TopicDescriptor.EncOpts.EncMode\x12\x11\n\tkeyHashes\x18\x02 \x03(\x0c\"+\n\x07\x45ncMode\x12\x08\n\x04NONE\x10\x00\x12\r\n\tSHAREDKEY\x10\x01\x12\x07\n\x03WOT\x10\x02') + serialized_pb=_b('\n\trpc.proto\x12\tpubsub.pb\"\xb4\x01\n\x03RPC\x12-\n\rsubscriptions\x18\x01 \x03(\x0b\x32\x16.pubsub.pb.RPC.SubOpts\x12#\n\x07publish\x18\x02 \x03(\x0b\x32\x12.pubsub.pb.Message\x12*\n\x07\x63ontrol\x18\x03 \x01(\x0b\x32\x19.pubsub.pb.ControlMessage\x1a-\n\x07SubOpts\x12\x11\n\tsubscribe\x18\x01 \x01(\x08\x12\x0f\n\x07topicid\x18\x02 \x01(\t\"i\n\x07Message\x12\x0f\n\x07\x66rom_id\x18\x01 \x01(\x0c\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\x12\r\n\x05seqno\x18\x03 \x01(\x0c\x12\x10\n\x08topicIDs\x18\x04 \x03(\t\x12\x11\n\tsignature\x18\x05 \x01(\x0c\x12\x0b\n\x03key\x18\x06 \x01(\x0c\"\xb0\x01\n\x0e\x43ontrolMessage\x12&\n\x05ihave\x18\x01 \x03(\x0b\x32\x17.pubsub.pb.ControlIHave\x12&\n\x05iwant\x18\x02 \x03(\x0b\x32\x17.pubsub.pb.ControlIWant\x12&\n\x05graft\x18\x03 \x03(\x0b\x32\x17.pubsub.pb.ControlGraft\x12&\n\x05prune\x18\x04 \x03(\x0b\x32\x17.pubsub.pb.ControlPrune\"3\n\x0c\x43ontrolIHave\x12\x0f\n\x07topicID\x18\x01 \x01(\t\x12\x12\n\nmessageIDs\x18\x02 \x03(\t\"\"\n\x0c\x43ontrolIWant\x12\x12\n\nmessageIDs\x18\x01 \x03(\t\"\x1f\n\x0c\x43ontrolGraft\x12\x0f\n\x07topicID\x18\x01 \x01(\t\"\x1f\n\x0c\x43ontrolPrune\x12\x0f\n\x07topicID\x18\x01 \x01(\t\"\x87\x03\n\x0fTopicDescriptor\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x31\n\x04\x61uth\x18\x02 \x01(\x0b\x32#.pubsub.pb.TopicDescriptor.AuthOpts\x12/\n\x03\x65nc\x18\x03 \x01(\x0b\x32\".pubsub.pb.TopicDescriptor.EncOpts\x1a|\n\x08\x41uthOpts\x12:\n\x04mode\x18\x01 \x01(\x0e\x32,.pubsub.pb.TopicDescriptor.AuthOpts.AuthMode\x12\x0c\n\x04keys\x18\x02 \x03(\x0c\"&\n\x08\x41uthMode\x12\x08\n\x04NONE\x10\x00\x12\x07\n\x03KEY\x10\x01\x12\x07\n\x03WOT\x10\x02\x1a\x83\x01\n\x07\x45ncOpts\x12\x38\n\x04mode\x18\x01 \x01(\x0e\x32*.pubsub.pb.TopicDescriptor.EncOpts.EncMode\x12\x11\n\tkeyHashes\x18\x02 \x03(\x0c\"+\n\x07\x45ncMode\x12\x08\n\x04NONE\x10\x00\x12\r\n\tSHAREDKEY\x10\x01\x12\x07\n\x03WOT\x10\x02') ) @@ -45,8 +45,8 @@ _TOPICDESCRIPTOR_AUTHOPTS_AUTHMODE = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=865, - serialized_end=903, + serialized_start=868, + serialized_end=906, ) _sym_db.RegisterEnumDescriptor(_TOPICDESCRIPTOR_AUTHOPTS_AUTHMODE) @@ -71,8 +71,8 @@ _TOPICDESCRIPTOR_ENCOPTS_ENCMODE = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=994, - serialized_end=1037, + serialized_start=997, + serialized_end=1040, ) _sym_db.RegisterEnumDescriptor(_TOPICDESCRIPTOR_ENCOPTS_ENCMODE) @@ -167,7 +167,7 @@ _MESSAGE = _descriptor.Descriptor( containing_type=None, fields=[ _descriptor.FieldDescriptor( - name='from', full_name='pubsub.pb.Message.from', index=0, + name='from_id', full_name='pubsub.pb.Message.from_id', index=0, number=1, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, @@ -221,7 +221,7 @@ _MESSAGE = _descriptor.Descriptor( oneofs=[ ], serialized_start=207, - serialized_end=309, + serialized_end=312, ) @@ -272,8 +272,8 @@ _CONTROLMESSAGE = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=312, - serialized_end=488, + serialized_start=315, + serialized_end=491, ) @@ -310,8 +310,8 @@ _CONTROLIHAVE = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=490, - serialized_end=541, + serialized_start=493, + serialized_end=544, ) @@ -341,8 +341,8 @@ _CONTROLIWANT = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=543, - serialized_end=577, + serialized_start=546, + serialized_end=580, ) @@ -372,8 +372,8 @@ _CONTROLGRAFT = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=579, - serialized_end=610, + serialized_start=582, + serialized_end=613, ) @@ -403,8 +403,8 @@ _CONTROLPRUNE = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=612, - serialized_end=643, + serialized_start=615, + serialized_end=646, ) @@ -442,8 +442,8 @@ _TOPICDESCRIPTOR_AUTHOPTS = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=779, - serialized_end=903, + serialized_start=782, + serialized_end=906, ) _TOPICDESCRIPTOR_ENCOPTS = _descriptor.Descriptor( @@ -480,8 +480,8 @@ _TOPICDESCRIPTOR_ENCOPTS = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=906, - serialized_end=1037, + serialized_start=909, + serialized_end=1040, ) _TOPICDESCRIPTOR = _descriptor.Descriptor( @@ -524,8 +524,8 @@ _TOPICDESCRIPTOR = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=646, - serialized_end=1037, + serialized_start=649, + serialized_end=1040, ) _RPC_SUBOPTS.containing_type = _RPC