diff --git a/gossip/proto/message.pb.go b/gossip/proto/message.pb.go index d5513b2760f..6bfa80bcf1d 100644 --- a/gossip/proto/message.pb.go +++ b/gossip/proto/message.pb.go @@ -20,6 +20,7 @@ It has these top-level messages: DataMessage Payload AliveMessage + LeadershipMessage PeerTime MembershipRequest MembershipResponse @@ -128,6 +129,7 @@ type GossipMessage struct { // *GossipMessage_StateInfo // *GossipMessage_StateRequest // *GossipMessage_StateResponse + // *GossipMessage_LeadershipMsg Content isGossipMessage_Content `protobuf_oneof:"content"` } @@ -182,6 +184,9 @@ type GossipMessage_StateRequest struct { type GossipMessage_StateResponse struct { StateResponse *RemoteStateResponse `protobuf:"bytes,17,opt,name=stateResponse,oneof"` } +type GossipMessage_LeadershipMsg struct { + LeadershipMsg *LeadershipMessage `protobuf:"bytes,18,opt,name=leadershipMsg,oneof"` +} func (*GossipMessage_AliveMsg) isGossipMessage_Content() {} func (*GossipMessage_MemReq) isGossipMessage_Content() {} @@ -197,6 +202,7 @@ func (*GossipMessage_Conn) isGossipMessage_Content() {} func (*GossipMessage_StateInfo) isGossipMessage_Content() {} func (*GossipMessage_StateRequest) isGossipMessage_Content() {} func (*GossipMessage_StateResponse) isGossipMessage_Content() {} +func (*GossipMessage_LeadershipMsg) isGossipMessage_Content() {} func (m *GossipMessage) GetContent() isGossipMessage_Content { if m != nil { @@ -303,6 +309,13 @@ func (m *GossipMessage) GetStateResponse() *RemoteStateResponse { return nil } +func (m *GossipMessage) GetLeadershipMsg() *LeadershipMessage { + if x, ok := m.GetContent().(*GossipMessage_LeadershipMsg); ok { + return x.LeadershipMsg + } + return nil +} + // XXX_OneofFuncs is for the internal use of the proto package. func (*GossipMessage) XXX_OneofFuncs() (func(msg proto1.Message, b *proto1.Buffer) error, func(msg proto1.Message, tag, wire int, b *proto1.Buffer) (bool, error), func(msg proto1.Message) (n int), []interface{}) { return _GossipMessage_OneofMarshaler, _GossipMessage_OneofUnmarshaler, _GossipMessage_OneofSizer, []interface{}{ @@ -320,6 +333,7 @@ func (*GossipMessage) XXX_OneofFuncs() (func(msg proto1.Message, b *proto1.Buffe (*GossipMessage_StateInfo)(nil), (*GossipMessage_StateRequest)(nil), (*GossipMessage_StateResponse)(nil), + (*GossipMessage_LeadershipMsg)(nil), } } @@ -397,6 +411,11 @@ func _GossipMessage_OneofMarshaler(msg proto1.Message, b *proto1.Buffer) error { if err := b.EncodeMessage(x.StateResponse); err != nil { return err } + case *GossipMessage_LeadershipMsg: + b.EncodeVarint(18<<3 | proto1.WireBytes) + if err := b.EncodeMessage(x.LeadershipMsg); err != nil { + return err + } case nil: default: return fmt.Errorf("GossipMessage.Content has unexpected type %T", x) @@ -519,6 +538,14 @@ func _GossipMessage_OneofUnmarshaler(msg proto1.Message, tag, wire int, b *proto err := b.DecodeMessage(msg) m.Content = &GossipMessage_StateResponse{msg} return true, err + case 18: // content.leadershipMsg + if wire != proto1.WireBytes { + return true, proto1.ErrInternalBadWireType + } + msg := new(LeadershipMessage) + err := b.DecodeMessage(msg) + m.Content = &GossipMessage_LeadershipMsg{msg} + return true, err default: return false, nil } @@ -598,6 +625,11 @@ func _GossipMessage_OneofSizer(msg proto1.Message) (n int) { n += proto1.SizeVarint(17<<3 | proto1.WireBytes) n += proto1.SizeVarint(uint64(s)) n += s + case *GossipMessage_LeadershipMsg: + s := proto1.Size(x.LeadershipMsg) + n += proto1.SizeVarint(18<<3 | proto1.WireBytes) + n += proto1.SizeVarint(uint64(s)) + n += s case nil: default: panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) @@ -765,6 +797,33 @@ func (m *AliveMessage) GetTimestamp() *PeerTime { return nil } +// Leadership Message is sent during leader election to inform +// remote peers about intent of peer to proclaim itself as leader +type LeadershipMessage struct { + Membership *Member `protobuf:"bytes,1,opt,name=membership" json:"membership,omitempty"` + Timestamp *PeerTime `protobuf:"bytes,2,opt,name=timestamp" json:"timestamp,omitempty"` + Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` +} + +func (m *LeadershipMessage) Reset() { *m = LeadershipMessage{} } +func (m *LeadershipMessage) String() string { return proto1.CompactTextString(m) } +func (*LeadershipMessage) ProtoMessage() {} +func (*LeadershipMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } + +func (m *LeadershipMessage) GetMembership() *Member { + if m != nil { + return m.Membership + } + return nil +} + +func (m *LeadershipMessage) GetTimestamp() *PeerTime { + if m != nil { + return m.Timestamp + } + return nil +} + // PeerTime defines the logical time of a peer's life type PeerTime struct { IncNumber uint64 `protobuf:"varint,1,opt,name=inc_number,json=incNumber" json:"inc_number,omitempty"` @@ -774,7 +833,7 @@ type PeerTime struct { func (m *PeerTime) Reset() { *m = PeerTime{} } func (m *PeerTime) String() string { return proto1.CompactTextString(m) } func (*PeerTime) ProtoMessage() {} -func (*PeerTime) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } +func (*PeerTime) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} } // MembershipRequest is used to ask membership information // from a remote peer @@ -786,7 +845,7 @@ type MembershipRequest struct { func (m *MembershipRequest) Reset() { *m = MembershipRequest{} } func (m *MembershipRequest) String() string { return proto1.CompactTextString(m) } func (*MembershipRequest) ProtoMessage() {} -func (*MembershipRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} } +func (*MembershipRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} } func (m *MembershipRequest) GetSelfInformation() *AliveMessage { if m != nil { @@ -804,7 +863,7 @@ type MembershipResponse struct { func (m *MembershipResponse) Reset() { *m = MembershipResponse{} } func (m *MembershipResponse) String() string { return proto1.CompactTextString(m) } func (*MembershipResponse) ProtoMessage() {} -func (*MembershipResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} } +func (*MembershipResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} } func (m *MembershipResponse) GetAlive() []*AliveMessage { if m != nil { @@ -831,7 +890,7 @@ type Member struct { func (m *Member) Reset() { *m = Member{} } func (m *Member) String() string { return proto1.CompactTextString(m) } func (*Member) ProtoMessage() {} -func (*Member) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} } +func (*Member) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} } // Empty is used for pinging and in tests type Empty struct { @@ -840,7 +899,7 @@ type Empty struct { func (m *Empty) Reset() { *m = Empty{} } func (m *Empty) String() string { return proto1.CompactTextString(m) } func (*Empty) ProtoMessage() {} -func (*Empty) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} } +func (*Empty) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} } // RemoteStateRequest is used to ask a set of blocks // from a remote peer @@ -851,7 +910,7 @@ type RemoteStateRequest struct { func (m *RemoteStateRequest) Reset() { *m = RemoteStateRequest{} } func (m *RemoteStateRequest) String() string { return proto1.CompactTextString(m) } func (*RemoteStateRequest) ProtoMessage() {} -func (*RemoteStateRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} } +func (*RemoteStateRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} } // RemoteStateResponse is used to send a set of blocks // to a remote peer @@ -862,7 +921,7 @@ type RemoteStateResponse struct { func (m *RemoteStateResponse) Reset() { *m = RemoteStateResponse{} } func (m *RemoteStateResponse) String() string { return proto1.CompactTextString(m) } func (*RemoteStateResponse) ProtoMessage() {} -func (*RemoteStateResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} } +func (*RemoteStateResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} } func (m *RemoteStateResponse) GetPayloads() []*Payload { if m != nil { @@ -883,6 +942,7 @@ func init() { proto1.RegisterType((*DataMessage)(nil), "proto.DataMessage") proto1.RegisterType((*Payload)(nil), "proto.Payload") proto1.RegisterType((*AliveMessage)(nil), "proto.AliveMessage") + proto1.RegisterType((*LeadershipMessage)(nil), "proto.LeadershipMessage") proto1.RegisterType((*PeerTime)(nil), "proto.PeerTime") proto1.RegisterType((*MembershipRequest)(nil), "proto.MembershipRequest") proto1.RegisterType((*MembershipResponse)(nil), "proto.MembershipResponse") @@ -1039,70 +1099,73 @@ var _Gossip_serviceDesc = grpc.ServiceDesc{ func init() { proto1.RegisterFile("message.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 1036 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xb4, 0x55, 0xdf, 0x4f, 0xe3, 0x46, - 0x10, 0x8e, 0xf3, 0x13, 0x4f, 0x1c, 0x08, 0x73, 0xd7, 0xca, 0x45, 0xad, 0x84, 0xac, 0x93, 0x9a, - 0x46, 0x25, 0xdc, 0xc1, 0xc3, 0x3d, 0x55, 0x2d, 0x10, 0x4a, 0x90, 0x4a, 0x40, 0x0b, 0xd7, 0xea, - 0xfa, 0x82, 0x96, 0x64, 0x71, 0x2c, 0xe2, 0xb5, 0xc9, 0x2e, 0x57, 0xf1, 0x2f, 0xf4, 0xa1, 0x7f, - 0x73, 0xb5, 0x3f, 0xec, 0xd8, 0x10, 0xaa, 0xde, 0xc3, 0x3d, 0xd9, 0x33, 0xfb, 0x7d, 0x3b, 0x33, - 0xbb, 0xf3, 0xcd, 0x42, 0x27, 0x66, 0x42, 0xd0, 0x90, 0x0d, 0xd2, 0x45, 0x22, 0x13, 0x6c, 0xe8, - 0x4f, 0xf0, 0x4f, 0x0b, 0x3a, 0x27, 0x89, 0x10, 0x51, 0x7a, 0x66, 0x96, 0xf1, 0x35, 0x34, 0x78, - 0xc2, 0x27, 0xcc, 0x77, 0xb6, 0x9d, 0x5e, 0x9d, 0x18, 0x03, 0x7d, 0x68, 0x4d, 0x66, 0x94, 0x73, - 0x36, 0xf7, 0xab, 0xdb, 0x4e, 0xcf, 0x23, 0x99, 0x89, 0x7d, 0xa8, 0x49, 0x1a, 0xfa, 0xb5, 0x6d, - 0xa7, 0xb7, 0xbe, 0xe7, 0x9b, 0xdd, 0x07, 0xa5, 0x2d, 0x07, 0x57, 0x34, 0x24, 0x0a, 0x84, 0xef, - 0x60, 0x8d, 0xce, 0xa3, 0x4f, 0xec, 0x4c, 0x84, 0x7e, 0x7d, 0xdb, 0xe9, 0xb5, 0xf7, 0x5e, 0x59, - 0xc2, 0x81, 0x76, 0x1b, 0xfc, 0xa8, 0x42, 0x72, 0x18, 0xee, 0x41, 0x33, 0x66, 0x31, 0x61, 0xf7, - 0x7e, 0x43, 0x13, 0xb2, 0x08, 0x67, 0x2c, 0xbe, 0x61, 0x0b, 0x31, 0x8b, 0x52, 0xc2, 0xee, 0x1f, - 0x98, 0x90, 0xa3, 0x0a, 0xb1, 0x48, 0xdc, 0xb7, 0x1c, 0xe1, 0x37, 0x35, 0xe7, 0x9b, 0x15, 0x1c, - 0x91, 0x26, 0x5c, 0xb0, 0x9c, 0x24, 0x70, 0x00, 0xad, 0x29, 0x95, 0x54, 0xa5, 0xd6, 0xd2, 0x2c, - 0xb4, 0xac, 0xa1, 0xf2, 0xe6, 0x99, 0x65, 0x20, 0xec, 0x43, 0x63, 0xc6, 0xe6, 0xf3, 0xc4, 0xff, - 0xa3, 0x84, 0x36, 0x95, 0x8f, 0xd4, 0xca, 0xa8, 0x42, 0x0c, 0x04, 0x77, 0xcc, 0xde, 0xc3, 0x28, - 0xf4, 0x5d, 0x8d, 0xde, 0x2c, 0xec, 0x3d, 0x8c, 0x42, 0x93, 0x7e, 0x86, 0xc9, 0x52, 0x51, 0x45, - 0xc3, 0xb3, 0x54, 0x96, 0xe5, 0x66, 0x20, 0xdc, 0x07, 0x50, 0xbf, 0x1f, 0xd2, 0x29, 0x95, 0xcc, - 0x6f, 0x3f, 0x8b, 0x60, 0x16, 0x46, 0x15, 0x52, 0x80, 0xe1, 0x3b, 0x73, 0xa3, 0x47, 0xf1, 0xd4, - 0xf7, 0x34, 0xe3, 0x2b, 0xcb, 0x38, 0x32, 0x17, 0x7b, 0x94, 0xc4, 0x31, 0xe5, 0x53, 0x15, 0xc7, - 0xe2, 0xf0, 0x0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0xca, 0xb1, 0x15, 0xb4, 0xa0, 0xa1, 0x5f, 0x9d, 0x60, 0x00, 0xf8, - 0x7c, 0xe6, 0xab, 0x16, 0x37, 0x87, 0x2a, 0x74, 0x31, 0x75, 0x92, 0x99, 0xc1, 0x01, 0xbc, 0x5a, - 0x31, 0xe1, 0xb1, 0x0f, 0x6b, 0xb6, 0x43, 0x85, 0x2d, 0xff, 0x69, 0x07, 0xe7, 0xeb, 0xfd, 0x3e, - 0xb4, 0xac, 0x1e, 0x9e, 0x3e, 0x00, 0x5d, 0xf0, 0x0e, 0xe7, 0xc9, 0xe4, 0xce, 0x9e, 0x41, 0xd7, - 0xd9, 0x4b, 0xa1, 0x69, 0x04, 0x8d, 0xbf, 0x80, 0x67, 0xfe, 0x2e, 0xe5, 0x82, 0xd1, 0x18, 0x57, - 0xea, 0x7d, 0x6b, 0xa5, 0x37, 0xa8, 0xf4, 0x9c, 0xb7, 0x0e, 0xbe, 0x81, 0xfa, 0x45, 0xc4, 0x43, - 0x2c, 0x3d, 0xbb, 0x5b, 0x25, 0x2b, 0xa8, 0x1c, 0xfe, 0xf8, 0x67, 0x3f, 0x8c, 0xe4, 0xec, 0xe1, - 0x66, 0x30, 0x49, 0xe2, 0xdd, 0xd9, 0x63, 0xca, 0x16, 0x73, 0x36, 0x0d, 0xd9, 0x62, 0xf7, 0x96, - 0xde, 0x2c, 0xa2, 0xc9, 0x6e, 0xa8, 0xb7, 0xde, 0xd5, 0xac, 0x9b, 0xa6, 0xfe, 0xec, 0xff, 0x1b, - 0x00, 0x00, 0xff, 0xff, 0xe3, 0x43, 0x0c, 0x66, 0x1d, 0x0a, 0x00, 0x00, + // 1073 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xc4, 0x56, 0x5f, 0x4f, 0xe3, 0x46, + 0x10, 0x8f, 0xf3, 0x17, 0x4f, 0x1c, 0x08, 0x73, 0xd7, 0xca, 0x45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 0x53, 0x27, 0x99, 0xe9, + 0x1d, 0xc0, 0x8b, 0x15, 0x53, 0x0b, 0xfb, 0xb0, 0x66, 0x34, 0x23, 0xcc, 0xf1, 0x9f, 0x6a, 0x2a, + 0x5f, 0xef, 0xf7, 0xa1, 0x65, 0x14, 0xfa, 0x74, 0x24, 0x75, 0xc1, 0x39, 0x9c, 0xc5, 0x93, 0x3b, + 0x73, 0x07, 0x5d, 0x6b, 0x2f, 0x81, 0xa6, 0x6e, 0x31, 0xf8, 0x0e, 0x1c, 0xfd, 0x75, 0x99, 0xce, + 0x19, 0x8d, 0x70, 0x65, 0x07, 0xda, 0x5a, 0xe9, 0xf5, 0x2a, 0x3d, 0xeb, 0xb5, 0x85, 0xaf, 0xa0, + 0x7e, 0x11, 0xf2, 0x00, 0x4b, 0x7f, 0x25, 0xb6, 0x4a, 0x96, 0x57, 0x39, 0xfc, 0xf1, 0xf7, 0x7e, + 0x10, 0xa6, 0xd3, 0x87, 0x9b, 0xc1, 0x24, 0x8e, 0x76, 0xa7, 0x8f, 0x09, 0x9b, 0xcf, 0x98, 0x1f, + 0xb0, 0xf9, 0xee, 0x2d, 0xbd, 0x99, 0x87, 0x93, 0xdd, 0x40, 0x6d, 0xbd, 0xab, 0x58, 0x37, 0x4d, + 0xf5, 0xb3, 0xff, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc9, 0xb3, 0xdc, 0x93, 0xf1, 0x0a, 0x00, + 0x00, } diff --git a/gossip/proto/message.proto b/gossip/proto/message.proto index 5fc85ff97f2..41c35f1c7b1 100644 --- a/gossip/proto/message.proto +++ b/gossip/proto/message.proto @@ -74,6 +74,9 @@ message GossipMessage { // Used to send a set of blocks to a remote peer RemoteStateResponse stateResponse = 17; + + // Used to indicate intent of peer to become leader + LeadershipMessage leadershipMsg = 18; } } @@ -166,6 +169,14 @@ message AliveMessage { bytes signature = 3; } +// Leadership Message is sent during leader election to inform +// remote peers about intent of peer to proclaim itself as leader +message LeadershipMessage { + Member membership = 1; + PeerTime timestamp = 2; + bytes signature = 3; +} + // PeerTime defines the logical time of a peer's life message PeerTime { uint64 inc_number = 1;