From d0c30629f2632332e8df87c9da6888fb0f70f995 Mon Sep 17 00:00:00 2001 From: Andrew Davis <1709934+Savid@users.noreply.github.com> Date: Tue, 5 Sep 2023 12:41:36 +1000 Subject: [PATCH] feat(server): add coordinator cannon rpcs --- migrations/postgres/005_cannon.up.sql | 8 + migrations/postgres/005_cannon_down.sql | 1 + pkg/proto/eth/v1/committee.pb.go | 2 +- pkg/proto/xatu/coordinator.pb.go | 851 ++++++++++++++++++++-- pkg/proto/xatu/coordinator.proto | 48 ++ pkg/proto/xatu/coordinator_grpc.pb.go | 74 ++ pkg/server/persistence/cannon/location.go | 121 +++ pkg/server/persistence/cannon_location.go | 100 +++ pkg/server/service/coordinator/client.go | 53 ++ 9 files changed, 1179 insertions(+), 79 deletions(-) create mode 100644 migrations/postgres/005_cannon.up.sql create mode 100644 migrations/postgres/005_cannon_down.sql create mode 100644 pkg/server/persistence/cannon/location.go create mode 100644 pkg/server/persistence/cannon_location.go diff --git a/migrations/postgres/005_cannon.up.sql b/migrations/postgres/005_cannon.up.sql new file mode 100644 index 00000000..62ae6055 --- /dev/null +++ b/migrations/postgres/005_cannon.up.sql @@ -0,0 +1,8 @@ +CREATE TABLE cannon_location ( + location_id SERIAL PRIMARY KEY, + create_time TIMESTAMPTZ NOT NULL DEFAULT now(), + update_time TIMESTAMPTZ NOT NULL DEFAULT now(), + network_id VARCHAR(256), + type VARCHAR(256), + value TEXT +); diff --git a/migrations/postgres/005_cannon_down.sql b/migrations/postgres/005_cannon_down.sql new file mode 100644 index 00000000..9162140e --- /dev/null +++ b/migrations/postgres/005_cannon_down.sql @@ -0,0 +1 @@ +DROP TABLE IF EXISTS cannon_location; diff --git a/pkg/proto/eth/v1/committee.pb.go b/pkg/proto/eth/v1/committee.pb.go index c7639995..8108585b 100644 --- a/pkg/proto/eth/v1/committee.pb.go +++ b/pkg/proto/eth/v1/committee.pb.go @@ -23,7 +23,7 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// Committee is a set of validators that are assigned to a commitee for a given slot. +// Committee is a set of validators that are assigned to a committee for a given slot. type Committee struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/pkg/proto/xatu/coordinator.pb.go b/pkg/proto/xatu/coordinator.pb.go index 435719ac..a36a4abe 100644 --- a/pkg/proto/xatu/coordinator.pb.go +++ b/pkg/proto/xatu/coordinator.pb.go @@ -20,6 +20,55 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type CannonType int32 + +const ( + CannonType_BEACON_API_ETH_V2_BEACON_BLOCK_VOLUNTARY_EXIT CannonType = 0 + CannonType_BEACON_API_ETH_V2_BEACON_BLOCK_PROPOSER_SLASHING CannonType = 1 + CannonType_BEACON_API_ETH_V2_BEACON_BLOCK_DEPOSIT CannonType = 2 +) + +// Enum value maps for CannonType. +var ( + CannonType_name = map[int32]string{ + 0: "BEACON_API_ETH_V2_BEACON_BLOCK_VOLUNTARY_EXIT", + 1: "BEACON_API_ETH_V2_BEACON_BLOCK_PROPOSER_SLASHING", + 2: "BEACON_API_ETH_V2_BEACON_BLOCK_DEPOSIT", + } + CannonType_value = map[string]int32{ + "BEACON_API_ETH_V2_BEACON_BLOCK_VOLUNTARY_EXIT": 0, + "BEACON_API_ETH_V2_BEACON_BLOCK_PROPOSER_SLASHING": 1, + "BEACON_API_ETH_V2_BEACON_BLOCK_DEPOSIT": 2, + } +) + +func (x CannonType) Enum() *CannonType { + p := new(CannonType) + *p = x + return p +} + +func (x CannonType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (CannonType) Descriptor() protoreflect.EnumDescriptor { + return file_pkg_proto_xatu_coordinator_proto_enumTypes[0].Descriptor() +} + +func (CannonType) Type() protoreflect.EnumType { + return &file_pkg_proto_xatu_coordinator_proto_enumTypes[0] +} + +func (x CannonType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use CannonType.Descriptor instead. +func (CannonType) EnumDescriptor() ([]byte, []int) { + return file_pkg_proto_xatu_coordinator_proto_rawDescGZIP(), []int{0} +} + type CreateNodeRecordsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -694,6 +743,445 @@ func (x *GetDiscoveryNodeRecordResponse) GetNodeRecord() string { return "" } +type CannonLocationEthV2BeaconBlockVoluntaryExit struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"` +} + +func (x *CannonLocationEthV2BeaconBlockVoluntaryExit) Reset() { + *x = CannonLocationEthV2BeaconBlockVoluntaryExit{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_xatu_coordinator_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CannonLocationEthV2BeaconBlockVoluntaryExit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CannonLocationEthV2BeaconBlockVoluntaryExit) ProtoMessage() {} + +func (x *CannonLocationEthV2BeaconBlockVoluntaryExit) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_xatu_coordinator_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CannonLocationEthV2BeaconBlockVoluntaryExit.ProtoReflect.Descriptor instead. +func (*CannonLocationEthV2BeaconBlockVoluntaryExit) Descriptor() ([]byte, []int) { + return file_pkg_proto_xatu_coordinator_proto_rawDescGZIP(), []int{12} +} + +func (x *CannonLocationEthV2BeaconBlockVoluntaryExit) GetSlot() uint64 { + if x != nil { + return x.Slot + } + return 0 +} + +type CannonLocationEthV2BeaconBlockProposerSlashing struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"` +} + +func (x *CannonLocationEthV2BeaconBlockProposerSlashing) Reset() { + *x = CannonLocationEthV2BeaconBlockProposerSlashing{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_xatu_coordinator_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CannonLocationEthV2BeaconBlockProposerSlashing) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CannonLocationEthV2BeaconBlockProposerSlashing) ProtoMessage() {} + +func (x *CannonLocationEthV2BeaconBlockProposerSlashing) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_xatu_coordinator_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CannonLocationEthV2BeaconBlockProposerSlashing.ProtoReflect.Descriptor instead. +func (*CannonLocationEthV2BeaconBlockProposerSlashing) Descriptor() ([]byte, []int) { + return file_pkg_proto_xatu_coordinator_proto_rawDescGZIP(), []int{13} +} + +func (x *CannonLocationEthV2BeaconBlockProposerSlashing) GetSlot() uint64 { + if x != nil { + return x.Slot + } + return 0 +} + +type CannonLocationEthV2BeaconBlockDeposit struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"` +} + +func (x *CannonLocationEthV2BeaconBlockDeposit) Reset() { + *x = CannonLocationEthV2BeaconBlockDeposit{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_xatu_coordinator_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CannonLocationEthV2BeaconBlockDeposit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CannonLocationEthV2BeaconBlockDeposit) ProtoMessage() {} + +func (x *CannonLocationEthV2BeaconBlockDeposit) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_xatu_coordinator_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CannonLocationEthV2BeaconBlockDeposit.ProtoReflect.Descriptor instead. +func (*CannonLocationEthV2BeaconBlockDeposit) Descriptor() ([]byte, []int) { + return file_pkg_proto_xatu_coordinator_proto_rawDescGZIP(), []int{14} +} + +func (x *CannonLocationEthV2BeaconBlockDeposit) GetSlot() uint64 { + if x != nil { + return x.Slot + } + return 0 +} + +type CannonLocation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NetworkId string `protobuf:"bytes,1,opt,name=network_id,json=networkId,proto3" json:"network_id,omitempty"` + Type CannonType `protobuf:"varint,2,opt,name=type,proto3,enum=xatu.CannonType" json:"type,omitempty"` + // Types that are assignable to Data: + // + // *CannonLocation_EthV2BeaconBlockVoluntaryExit + // *CannonLocation_EthV2BeaconBlockProposerSlashing + // *CannonLocation_EthV2BeaconBlockDeposit + Data isCannonLocation_Data `protobuf_oneof:"Data"` +} + +func (x *CannonLocation) Reset() { + *x = CannonLocation{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_xatu_coordinator_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CannonLocation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CannonLocation) ProtoMessage() {} + +func (x *CannonLocation) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_xatu_coordinator_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CannonLocation.ProtoReflect.Descriptor instead. +func (*CannonLocation) Descriptor() ([]byte, []int) { + return file_pkg_proto_xatu_coordinator_proto_rawDescGZIP(), []int{15} +} + +func (x *CannonLocation) GetNetworkId() string { + if x != nil { + return x.NetworkId + } + return "" +} + +func (x *CannonLocation) GetType() CannonType { + if x != nil { + return x.Type + } + return CannonType_BEACON_API_ETH_V2_BEACON_BLOCK_VOLUNTARY_EXIT +} + +func (m *CannonLocation) GetData() isCannonLocation_Data { + if m != nil { + return m.Data + } + return nil +} + +func (x *CannonLocation) GetEthV2BeaconBlockVoluntaryExit() *CannonLocationEthV2BeaconBlockVoluntaryExit { + if x, ok := x.GetData().(*CannonLocation_EthV2BeaconBlockVoluntaryExit); ok { + return x.EthV2BeaconBlockVoluntaryExit + } + return nil +} + +func (x *CannonLocation) GetEthV2BeaconBlockProposerSlashing() *CannonLocationEthV2BeaconBlockProposerSlashing { + if x, ok := x.GetData().(*CannonLocation_EthV2BeaconBlockProposerSlashing); ok { + return x.EthV2BeaconBlockProposerSlashing + } + return nil +} + +func (x *CannonLocation) GetEthV2BeaconBlockDeposit() *CannonLocationEthV2BeaconBlockDeposit { + if x, ok := x.GetData().(*CannonLocation_EthV2BeaconBlockDeposit); ok { + return x.EthV2BeaconBlockDeposit + } + return nil +} + +type isCannonLocation_Data interface { + isCannonLocation_Data() +} + +type CannonLocation_EthV2BeaconBlockVoluntaryExit struct { + EthV2BeaconBlockVoluntaryExit *CannonLocationEthV2BeaconBlockVoluntaryExit `protobuf:"bytes,3,opt,name=eth_v2_beacon_block_voluntary_exit,json=BEACON_API_ETH_V2_BEACON_BLOCK_VOLUNTARY_EXIT,proto3,oneof"` +} + +type CannonLocation_EthV2BeaconBlockProposerSlashing struct { + EthV2BeaconBlockProposerSlashing *CannonLocationEthV2BeaconBlockProposerSlashing `protobuf:"bytes,4,opt,name=eth_v2_beacon_block_proposer_slashing,json=BEACON_API_ETH_V2_BEACON_BLOCK_PROPOSER_SLASHING,proto3,oneof"` +} + +type CannonLocation_EthV2BeaconBlockDeposit struct { + EthV2BeaconBlockDeposit *CannonLocationEthV2BeaconBlockDeposit `protobuf:"bytes,5,opt,name=eth_v2_beacon_block_deposit,json=BEACON_API_ETH_V2_BEACON_BLOCK_DEPOSIT,proto3,oneof"` +} + +func (*CannonLocation_EthV2BeaconBlockVoluntaryExit) isCannonLocation_Data() {} + +func (*CannonLocation_EthV2BeaconBlockProposerSlashing) isCannonLocation_Data() {} + +func (*CannonLocation_EthV2BeaconBlockDeposit) isCannonLocation_Data() {} + +type GetCannonLocationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NetworkId string `protobuf:"bytes,1,opt,name=network_id,json=networkId,proto3" json:"network_id,omitempty"` + Type CannonType `protobuf:"varint,2,opt,name=type,proto3,enum=xatu.CannonType" json:"type,omitempty"` +} + +func (x *GetCannonLocationRequest) Reset() { + *x = GetCannonLocationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_xatu_coordinator_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetCannonLocationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCannonLocationRequest) ProtoMessage() {} + +func (x *GetCannonLocationRequest) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_xatu_coordinator_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetCannonLocationRequest.ProtoReflect.Descriptor instead. +func (*GetCannonLocationRequest) Descriptor() ([]byte, []int) { + return file_pkg_proto_xatu_coordinator_proto_rawDescGZIP(), []int{16} +} + +func (x *GetCannonLocationRequest) GetNetworkId() string { + if x != nil { + return x.NetworkId + } + return "" +} + +func (x *GetCannonLocationRequest) GetType() CannonType { + if x != nil { + return x.Type + } + return CannonType_BEACON_API_ETH_V2_BEACON_BLOCK_VOLUNTARY_EXIT +} + +type GetCannonLocationResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Location *CannonLocation `protobuf:"bytes,1,opt,name=location,proto3" json:"location,omitempty"` +} + +func (x *GetCannonLocationResponse) Reset() { + *x = GetCannonLocationResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_xatu_coordinator_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetCannonLocationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCannonLocationResponse) ProtoMessage() {} + +func (x *GetCannonLocationResponse) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_xatu_coordinator_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetCannonLocationResponse.ProtoReflect.Descriptor instead. +func (*GetCannonLocationResponse) Descriptor() ([]byte, []int) { + return file_pkg_proto_xatu_coordinator_proto_rawDescGZIP(), []int{17} +} + +func (x *GetCannonLocationResponse) GetLocation() *CannonLocation { + if x != nil { + return x.Location + } + return nil +} + +type UpsertCannonLocationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Location *CannonLocation `protobuf:"bytes,1,opt,name=location,proto3" json:"location,omitempty"` +} + +func (x *UpsertCannonLocationRequest) Reset() { + *x = UpsertCannonLocationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_xatu_coordinator_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpsertCannonLocationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpsertCannonLocationRequest) ProtoMessage() {} + +func (x *UpsertCannonLocationRequest) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_xatu_coordinator_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpsertCannonLocationRequest.ProtoReflect.Descriptor instead. +func (*UpsertCannonLocationRequest) Descriptor() ([]byte, []int) { + return file_pkg_proto_xatu_coordinator_proto_rawDescGZIP(), []int{18} +} + +func (x *UpsertCannonLocationRequest) GetLocation() *CannonLocation { + if x != nil { + return x.Location + } + return nil +} + +type UpsertCannonLocationResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UpsertCannonLocationResponse) Reset() { + *x = UpsertCannonLocationResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_xatu_coordinator_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpsertCannonLocationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpsertCannonLocationResponse) ProtoMessage() {} + +func (x *UpsertCannonLocationResponse) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_xatu_coordinator_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpsertCannonLocationResponse.ProtoReflect.Descriptor instead. +func (*UpsertCannonLocationResponse) Descriptor() ([]byte, []int) { + return file_pkg_proto_xatu_coordinator_proto_rawDescGZIP(), []int{19} +} + type ExecutionNodeStatus_Capability struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -706,7 +1194,7 @@ type ExecutionNodeStatus_Capability struct { func (x *ExecutionNodeStatus_Capability) Reset() { *x = ExecutionNodeStatus_Capability{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_proto_xatu_coordinator_proto_msgTypes[12] + mi := &file_pkg_proto_xatu_coordinator_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -719,7 +1207,7 @@ func (x *ExecutionNodeStatus_Capability) String() string { func (*ExecutionNodeStatus_Capability) ProtoMessage() {} func (x *ExecutionNodeStatus_Capability) ProtoReflect() protoreflect.Message { - mi := &file_pkg_proto_xatu_coordinator_proto_msgTypes[12] + mi := &file_pkg_proto_xatu_coordinator_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -761,7 +1249,7 @@ type ExecutionNodeStatus_ForkID struct { func (x *ExecutionNodeStatus_ForkID) Reset() { *x = ExecutionNodeStatus_ForkID{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_proto_xatu_coordinator_proto_msgTypes[13] + mi := &file_pkg_proto_xatu_coordinator_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -774,7 +1262,7 @@ func (x *ExecutionNodeStatus_ForkID) String() string { func (*ExecutionNodeStatus_ForkID) ProtoMessage() {} func (x *ExecutionNodeStatus_ForkID) ProtoReflect() protoreflect.Message { - mi := &file_pkg_proto_xatu_coordinator_proto_msgTypes[13] + mi := &file_pkg_proto_xatu_coordinator_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -903,48 +1391,132 @@ var file_pkg_proto_xatu_coordinator_proto_rawDesc = []byte{ 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x32, 0xd1, 0x04, 0x0a, 0x0b, - 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x56, 0x0a, 0x11, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, - 0x12, 0x1e, 0x2e, 0x78, 0x61, 0x74, 0x75, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, - 0x64, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1f, 0x2e, 0x78, 0x61, 0x74, 0x75, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, - 0x64, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x80, 0x01, 0x0a, 0x1f, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x6c, - 0x6c, 0x65, 0x64, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x64, 0x65, - 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x12, 0x2c, 0x2e, 0x78, 0x61, 0x74, 0x75, 0x2e, 0x4c, + 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x22, 0x41, 0x0a, 0x2b, 0x43, + 0x61, 0x6e, 0x6e, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x74, 0x68, + 0x56, 0x32, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x56, 0x6f, 0x6c, + 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6c, + 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x22, 0x44, + 0x0a, 0x2e, 0x43, 0x61, 0x6e, 0x6e, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x45, 0x74, 0x68, 0x56, 0x32, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, + 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, + 0x73, 0x6c, 0x6f, 0x74, 0x22, 0x3b, 0x0a, 0x25, 0x43, 0x61, 0x6e, 0x6e, 0x6f, 0x6e, 0x4c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x74, 0x68, 0x56, 0x32, 0x42, 0x65, 0x61, 0x63, 0x6f, + 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x6c, 0x6f, + 0x74, 0x22, 0x84, 0x04, 0x0a, 0x0e, 0x43, 0x61, 0x6e, 0x6e, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x10, 0x2e, 0x78, 0x61, 0x74, 0x75, 0x2e, 0x43, 0x61, 0x6e, 0x6e, 0x6f, 0x6e, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x8e, 0x01, 0x0a, 0x22, 0x65, 0x74, + 0x68, 0x5f, 0x76, 0x32, 0x5f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x5f, 0x65, 0x78, 0x69, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x78, 0x61, 0x74, 0x75, 0x2e, 0x43, 0x61, + 0x6e, 0x6e, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x74, 0x68, 0x56, + 0x32, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x56, 0x6f, 0x6c, 0x75, + 0x6e, 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, 0x48, 0x00, 0x52, 0x2d, 0x42, 0x45, 0x41, + 0x43, 0x4f, 0x4e, 0x5f, 0x41, 0x50, 0x49, 0x5f, 0x45, 0x54, 0x48, 0x5f, 0x56, 0x32, 0x5f, 0x42, + 0x45, 0x41, 0x43, 0x4f, 0x4e, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x56, 0x4f, 0x4c, 0x55, + 0x4e, 0x54, 0x41, 0x52, 0x59, 0x5f, 0x45, 0x58, 0x49, 0x54, 0x12, 0x97, 0x01, 0x0a, 0x25, 0x65, + 0x74, 0x68, 0x5f, 0x76, 0x32, 0x5f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x6c, 0x61, 0x73, + 0x68, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x78, 0x61, 0x74, + 0x75, 0x2e, 0x43, 0x61, 0x6e, 0x6e, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x45, 0x74, 0x68, 0x56, 0x32, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, + 0x48, 0x00, 0x52, 0x30, 0x42, 0x45, 0x41, 0x43, 0x4f, 0x4e, 0x5f, 0x41, 0x50, 0x49, 0x5f, 0x45, + 0x54, 0x48, 0x5f, 0x56, 0x32, 0x5f, 0x42, 0x45, 0x41, 0x43, 0x4f, 0x4e, 0x5f, 0x42, 0x4c, 0x4f, + 0x43, 0x4b, 0x5f, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x45, 0x52, 0x5f, 0x53, 0x4c, 0x41, 0x53, + 0x48, 0x49, 0x4e, 0x47, 0x12, 0x7a, 0x0a, 0x1b, 0x65, 0x74, 0x68, 0x5f, 0x76, 0x32, 0x5f, 0x62, + 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x64, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x78, 0x61, 0x74, 0x75, + 0x2e, 0x43, 0x61, 0x6e, 0x6e, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, + 0x74, 0x68, 0x56, 0x32, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x44, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x48, 0x00, 0x52, 0x26, 0x42, 0x45, 0x41, 0x43, 0x4f, 0x4e, + 0x5f, 0x41, 0x50, 0x49, 0x5f, 0x45, 0x54, 0x48, 0x5f, 0x56, 0x32, 0x5f, 0x42, 0x45, 0x41, 0x43, + 0x4f, 0x4e, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x44, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, + 0x42, 0x06, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x22, 0x5f, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x43, + 0x61, 0x6e, 0x6e, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x10, 0x2e, 0x78, 0x61, 0x74, 0x75, 0x2e, 0x43, 0x61, 0x6e, 0x6e, 0x6f, 0x6e, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x4d, 0x0a, 0x19, 0x47, 0x65, 0x74, + 0x43, 0x61, 0x6e, 0x6e, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x78, 0x61, 0x74, 0x75, 0x2e, + 0x43, 0x61, 0x6e, 0x6e, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4f, 0x0a, 0x1b, 0x55, 0x70, 0x73, 0x65, + 0x72, 0x74, 0x43, 0x61, 0x6e, 0x6e, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x78, 0x61, 0x74, 0x75, + 0x2e, 0x43, 0x61, 0x6e, 0x6e, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x1e, 0x0a, 0x1c, 0x55, 0x70, 0x73, + 0x65, 0x72, 0x74, 0x43, 0x61, 0x6e, 0x6e, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0xa1, 0x01, 0x0a, 0x0a, 0x43, 0x61, + 0x6e, 0x6e, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x31, 0x0a, 0x2d, 0x42, 0x45, 0x41, 0x43, + 0x4f, 0x4e, 0x5f, 0x41, 0x50, 0x49, 0x5f, 0x45, 0x54, 0x48, 0x5f, 0x56, 0x32, 0x5f, 0x42, 0x45, + 0x41, 0x43, 0x4f, 0x4e, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x56, 0x4f, 0x4c, 0x55, 0x4e, + 0x54, 0x41, 0x52, 0x59, 0x5f, 0x45, 0x58, 0x49, 0x54, 0x10, 0x00, 0x12, 0x34, 0x0a, 0x30, 0x42, + 0x45, 0x41, 0x43, 0x4f, 0x4e, 0x5f, 0x41, 0x50, 0x49, 0x5f, 0x45, 0x54, 0x48, 0x5f, 0x56, 0x32, + 0x5f, 0x42, 0x45, 0x41, 0x43, 0x4f, 0x4e, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x50, 0x52, + 0x4f, 0x50, 0x4f, 0x53, 0x45, 0x52, 0x5f, 0x53, 0x4c, 0x41, 0x53, 0x48, 0x49, 0x4e, 0x47, 0x10, + 0x01, 0x12, 0x2a, 0x0a, 0x26, 0x42, 0x45, 0x41, 0x43, 0x4f, 0x4e, 0x5f, 0x41, 0x50, 0x49, 0x5f, + 0x45, 0x54, 0x48, 0x5f, 0x56, 0x32, 0x5f, 0x42, 0x45, 0x41, 0x43, 0x4f, 0x4e, 0x5f, 0x42, 0x4c, + 0x4f, 0x43, 0x4b, 0x5f, 0x44, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x10, 0x02, 0x32, 0x8a, 0x06, + 0x0a, 0x0b, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x56, 0x0a, + 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, + 0x64, 0x73, 0x12, 0x1e, 0x2e, 0x78, 0x61, 0x74, 0x75, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x78, 0x61, 0x74, 0x75, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x80, 0x01, 0x0a, 0x1f, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, + 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, + 0x64, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x12, 0x2c, 0x2e, 0x78, 0x61, 0x74, 0x75, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x78, 0x61, 0x74, 0x75, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x78, 0x61, 0x74, 0x75, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x53, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x80, 0x01, 0x0a, 0x1f, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, - 0x63, 0x6f, 0x72, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2c, 0x2e, 0x78, 0x61, 0x74, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x80, 0x01, 0x0a, 0x1f, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x64, 0x65, + 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2c, 0x2e, 0x78, + 0x61, 0x74, 0x75, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x78, 0x61, 0x74, 0x75, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x78, 0x61, 0x74, 0x75, 0x2e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4e, - 0x6f, 0x64, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7d, 0x0a, 0x1e, 0x43, 0x6f, 0x6f, - 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, - 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x12, 0x2b, 0x2e, 0x78, 0x61, - 0x74, 0x75, 0x2e, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x45, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x78, 0x61, 0x74, 0x75, 0x2e, - 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x65, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x44, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7d, 0x0a, 0x1e, 0x43, + 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x12, 0x2b, 0x2e, + 0x78, 0x61, 0x74, 0x75, 0x2e, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x63, 0x6f, + 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x78, 0x61, 0x74, + 0x75, 0x2e, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x65, 0x0a, 0x16, 0x47, 0x65, + 0x74, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, + 0x63, 0x6f, 0x72, 0x64, 0x12, 0x23, 0x2e, 0x78, 0x61, 0x74, 0x75, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x63, 0x6f, - 0x72, 0x64, 0x12, 0x23, 0x2e, 0x78, 0x61, 0x74, 0x75, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, - 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x78, 0x61, 0x74, 0x75, 0x2e, 0x47, - 0x65, 0x74, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x4e, 0x6f, 0x64, 0x65, 0x52, - 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, - 0x2c, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x74, - 0x68, 0x70, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x70, 0x73, 0x2f, 0x78, 0x61, 0x74, 0x75, 0x2f, 0x70, - 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x78, 0x61, 0x74, 0x75, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x78, 0x61, 0x74, 0x75, + 0x2e, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x4e, 0x6f, 0x64, + 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x56, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x43, 0x61, 0x6e, 0x6e, 0x6f, 0x6e, 0x4c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x2e, 0x78, 0x61, 0x74, 0x75, 0x2e, 0x47, 0x65, + 0x74, 0x43, 0x61, 0x6e, 0x6e, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x78, 0x61, 0x74, 0x75, 0x2e, 0x47, 0x65, + 0x74, 0x43, 0x61, 0x6e, 0x6e, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5f, 0x0a, 0x14, 0x55, 0x70, 0x73, + 0x65, 0x72, 0x74, 0x43, 0x61, 0x6e, 0x6e, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x21, 0x2e, 0x78, 0x61, 0x74, 0x75, 0x2e, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x43, + 0x61, 0x6e, 0x6e, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x78, 0x61, 0x74, 0x75, 0x2e, 0x55, 0x70, 0x73, 0x65, + 0x72, 0x74, 0x43, 0x61, 0x6e, 0x6e, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x2c, 0x5a, 0x2a, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x74, 0x68, 0x70, 0x61, 0x6e, 0x64, + 0x61, 0x6f, 0x70, 0x73, 0x2f, 0x78, 0x61, 0x74, 0x75, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x78, 0x61, 0x74, 0x75, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -959,43 +1531,64 @@ func file_pkg_proto_xatu_coordinator_proto_rawDescGZIP() []byte { return file_pkg_proto_xatu_coordinator_proto_rawDescData } -var file_pkg_proto_xatu_coordinator_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_pkg_proto_xatu_coordinator_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_pkg_proto_xatu_coordinator_proto_msgTypes = make([]protoimpl.MessageInfo, 22) var file_pkg_proto_xatu_coordinator_proto_goTypes = []interface{}{ - (*CreateNodeRecordsRequest)(nil), // 0: xatu.CreateNodeRecordsRequest - (*CreateNodeRecordsResponse)(nil), // 1: xatu.CreateNodeRecordsResponse - (*ListStalledExecutionNodeRecordsRequest)(nil), // 2: xatu.ListStalledExecutionNodeRecordsRequest - (*ListStalledExecutionNodeRecordsResponse)(nil), // 3: xatu.ListStalledExecutionNodeRecordsResponse - (*ExecutionNodeStatus)(nil), // 4: xatu.ExecutionNodeStatus - (*CreateExecutionNodeRecordStatusRequest)(nil), // 5: xatu.CreateExecutionNodeRecordStatusRequest - (*CreateExecutionNodeRecordStatusResponse)(nil), // 6: xatu.CreateExecutionNodeRecordStatusResponse - (*CoordinatedNodeRecord)(nil), // 7: xatu.CoordinatedNodeRecord - (*CoordinateExecutionNodeRecordsRequest)(nil), // 8: xatu.CoordinateExecutionNodeRecordsRequest - (*CoordinateExecutionNodeRecordsResponse)(nil), // 9: xatu.CoordinateExecutionNodeRecordsResponse - (*GetDiscoveryNodeRecordRequest)(nil), // 10: xatu.GetDiscoveryNodeRecordRequest - (*GetDiscoveryNodeRecordResponse)(nil), // 11: xatu.GetDiscoveryNodeRecordResponse - (*ExecutionNodeStatus_Capability)(nil), // 12: xatu.ExecutionNodeStatus.Capability - (*ExecutionNodeStatus_ForkID)(nil), // 13: xatu.ExecutionNodeStatus.ForkID + (CannonType)(0), // 0: xatu.CannonType + (*CreateNodeRecordsRequest)(nil), // 1: xatu.CreateNodeRecordsRequest + (*CreateNodeRecordsResponse)(nil), // 2: xatu.CreateNodeRecordsResponse + (*ListStalledExecutionNodeRecordsRequest)(nil), // 3: xatu.ListStalledExecutionNodeRecordsRequest + (*ListStalledExecutionNodeRecordsResponse)(nil), // 4: xatu.ListStalledExecutionNodeRecordsResponse + (*ExecutionNodeStatus)(nil), // 5: xatu.ExecutionNodeStatus + (*CreateExecutionNodeRecordStatusRequest)(nil), // 6: xatu.CreateExecutionNodeRecordStatusRequest + (*CreateExecutionNodeRecordStatusResponse)(nil), // 7: xatu.CreateExecutionNodeRecordStatusResponse + (*CoordinatedNodeRecord)(nil), // 8: xatu.CoordinatedNodeRecord + (*CoordinateExecutionNodeRecordsRequest)(nil), // 9: xatu.CoordinateExecutionNodeRecordsRequest + (*CoordinateExecutionNodeRecordsResponse)(nil), // 10: xatu.CoordinateExecutionNodeRecordsResponse + (*GetDiscoveryNodeRecordRequest)(nil), // 11: xatu.GetDiscoveryNodeRecordRequest + (*GetDiscoveryNodeRecordResponse)(nil), // 12: xatu.GetDiscoveryNodeRecordResponse + (*CannonLocationEthV2BeaconBlockVoluntaryExit)(nil), // 13: xatu.CannonLocationEthV2BeaconBlockVoluntaryExit + (*CannonLocationEthV2BeaconBlockProposerSlashing)(nil), // 14: xatu.CannonLocationEthV2BeaconBlockProposerSlashing + (*CannonLocationEthV2BeaconBlockDeposit)(nil), // 15: xatu.CannonLocationEthV2BeaconBlockDeposit + (*CannonLocation)(nil), // 16: xatu.CannonLocation + (*GetCannonLocationRequest)(nil), // 17: xatu.GetCannonLocationRequest + (*GetCannonLocationResponse)(nil), // 18: xatu.GetCannonLocationResponse + (*UpsertCannonLocationRequest)(nil), // 19: xatu.UpsertCannonLocationRequest + (*UpsertCannonLocationResponse)(nil), // 20: xatu.UpsertCannonLocationResponse + (*ExecutionNodeStatus_Capability)(nil), // 21: xatu.ExecutionNodeStatus.Capability + (*ExecutionNodeStatus_ForkID)(nil), // 22: xatu.ExecutionNodeStatus.ForkID } var file_pkg_proto_xatu_coordinator_proto_depIdxs = []int32{ - 12, // 0: xatu.ExecutionNodeStatus.capabilities:type_name -> xatu.ExecutionNodeStatus.Capability - 13, // 1: xatu.ExecutionNodeStatus.fork_id:type_name -> xatu.ExecutionNodeStatus.ForkID - 4, // 2: xatu.CreateExecutionNodeRecordStatusRequest.status:type_name -> xatu.ExecutionNodeStatus - 7, // 3: xatu.CoordinateExecutionNodeRecordsRequest.node_records:type_name -> xatu.CoordinatedNodeRecord - 0, // 4: xatu.Coordinator.CreateNodeRecords:input_type -> xatu.CreateNodeRecordsRequest - 2, // 5: xatu.Coordinator.ListStalledExecutionNodeRecords:input_type -> xatu.ListStalledExecutionNodeRecordsRequest - 5, // 6: xatu.Coordinator.CreateExecutionNodeRecordStatus:input_type -> xatu.CreateExecutionNodeRecordStatusRequest - 8, // 7: xatu.Coordinator.CoordinateExecutionNodeRecords:input_type -> xatu.CoordinateExecutionNodeRecordsRequest - 10, // 8: xatu.Coordinator.GetDiscoveryNodeRecord:input_type -> xatu.GetDiscoveryNodeRecordRequest - 1, // 9: xatu.Coordinator.CreateNodeRecords:output_type -> xatu.CreateNodeRecordsResponse - 3, // 10: xatu.Coordinator.ListStalledExecutionNodeRecords:output_type -> xatu.ListStalledExecutionNodeRecordsResponse - 6, // 11: xatu.Coordinator.CreateExecutionNodeRecordStatus:output_type -> xatu.CreateExecutionNodeRecordStatusResponse - 9, // 12: xatu.Coordinator.CoordinateExecutionNodeRecords:output_type -> xatu.CoordinateExecutionNodeRecordsResponse - 11, // 13: xatu.Coordinator.GetDiscoveryNodeRecord:output_type -> xatu.GetDiscoveryNodeRecordResponse - 9, // [9:14] is the sub-list for method output_type - 4, // [4:9] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 21, // 0: xatu.ExecutionNodeStatus.capabilities:type_name -> xatu.ExecutionNodeStatus.Capability + 22, // 1: xatu.ExecutionNodeStatus.fork_id:type_name -> xatu.ExecutionNodeStatus.ForkID + 5, // 2: xatu.CreateExecutionNodeRecordStatusRequest.status:type_name -> xatu.ExecutionNodeStatus + 8, // 3: xatu.CoordinateExecutionNodeRecordsRequest.node_records:type_name -> xatu.CoordinatedNodeRecord + 0, // 4: xatu.CannonLocation.type:type_name -> xatu.CannonType + 13, // 5: xatu.CannonLocation.eth_v2_beacon_block_voluntary_exit:type_name -> xatu.CannonLocationEthV2BeaconBlockVoluntaryExit + 14, // 6: xatu.CannonLocation.eth_v2_beacon_block_proposer_slashing:type_name -> xatu.CannonLocationEthV2BeaconBlockProposerSlashing + 15, // 7: xatu.CannonLocation.eth_v2_beacon_block_deposit:type_name -> xatu.CannonLocationEthV2BeaconBlockDeposit + 0, // 8: xatu.GetCannonLocationRequest.type:type_name -> xatu.CannonType + 16, // 9: xatu.GetCannonLocationResponse.location:type_name -> xatu.CannonLocation + 16, // 10: xatu.UpsertCannonLocationRequest.location:type_name -> xatu.CannonLocation + 1, // 11: xatu.Coordinator.CreateNodeRecords:input_type -> xatu.CreateNodeRecordsRequest + 3, // 12: xatu.Coordinator.ListStalledExecutionNodeRecords:input_type -> xatu.ListStalledExecutionNodeRecordsRequest + 6, // 13: xatu.Coordinator.CreateExecutionNodeRecordStatus:input_type -> xatu.CreateExecutionNodeRecordStatusRequest + 9, // 14: xatu.Coordinator.CoordinateExecutionNodeRecords:input_type -> xatu.CoordinateExecutionNodeRecordsRequest + 11, // 15: xatu.Coordinator.GetDiscoveryNodeRecord:input_type -> xatu.GetDiscoveryNodeRecordRequest + 17, // 16: xatu.Coordinator.GetCannonLocation:input_type -> xatu.GetCannonLocationRequest + 19, // 17: xatu.Coordinator.UpsertCannonLocation:input_type -> xatu.UpsertCannonLocationRequest + 2, // 18: xatu.Coordinator.CreateNodeRecords:output_type -> xatu.CreateNodeRecordsResponse + 4, // 19: xatu.Coordinator.ListStalledExecutionNodeRecords:output_type -> xatu.ListStalledExecutionNodeRecordsResponse + 7, // 20: xatu.Coordinator.CreateExecutionNodeRecordStatus:output_type -> xatu.CreateExecutionNodeRecordStatusResponse + 10, // 21: xatu.Coordinator.CoordinateExecutionNodeRecords:output_type -> xatu.CoordinateExecutionNodeRecordsResponse + 12, // 22: xatu.Coordinator.GetDiscoveryNodeRecord:output_type -> xatu.GetDiscoveryNodeRecordResponse + 18, // 23: xatu.Coordinator.GetCannonLocation:output_type -> xatu.GetCannonLocationResponse + 20, // 24: xatu.Coordinator.UpsertCannonLocation:output_type -> xatu.UpsertCannonLocationResponse + 18, // [18:25] is the sub-list for method output_type + 11, // [11:18] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name } func init() { file_pkg_proto_xatu_coordinator_proto_init() } @@ -1149,7 +1742,7 @@ func file_pkg_proto_xatu_coordinator_proto_init() { } } file_pkg_proto_xatu_coordinator_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExecutionNodeStatus_Capability); i { + switch v := v.(*CannonLocationEthV2BeaconBlockVoluntaryExit); i { case 0: return &v.state case 1: @@ -1161,6 +1754,102 @@ func file_pkg_proto_xatu_coordinator_proto_init() { } } file_pkg_proto_xatu_coordinator_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CannonLocationEthV2BeaconBlockProposerSlashing); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_xatu_coordinator_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CannonLocationEthV2BeaconBlockDeposit); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_xatu_coordinator_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CannonLocation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_xatu_coordinator_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetCannonLocationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_xatu_coordinator_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetCannonLocationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_xatu_coordinator_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpsertCannonLocationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_xatu_coordinator_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpsertCannonLocationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_xatu_coordinator_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExecutionNodeStatus_Capability); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_xatu_coordinator_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ExecutionNodeStatus_ForkID); i { case 0: return &v.state @@ -1173,18 +1862,24 @@ func file_pkg_proto_xatu_coordinator_proto_init() { } } } + file_pkg_proto_xatu_coordinator_proto_msgTypes[15].OneofWrappers = []interface{}{ + (*CannonLocation_EthV2BeaconBlockVoluntaryExit)(nil), + (*CannonLocation_EthV2BeaconBlockProposerSlashing)(nil), + (*CannonLocation_EthV2BeaconBlockDeposit)(nil), + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_pkg_proto_xatu_coordinator_proto_rawDesc, - NumEnums: 0, - NumMessages: 14, + NumEnums: 1, + NumMessages: 22, NumExtensions: 0, NumServices: 1, }, GoTypes: file_pkg_proto_xatu_coordinator_proto_goTypes, DependencyIndexes: file_pkg_proto_xatu_coordinator_proto_depIdxs, + EnumInfos: file_pkg_proto_xatu_coordinator_proto_enumTypes, MessageInfos: file_pkg_proto_xatu_coordinator_proto_msgTypes, }.Build() File_pkg_proto_xatu_coordinator_proto = out.File diff --git a/pkg/proto/xatu/coordinator.proto b/pkg/proto/xatu/coordinator.proto index 18554d44..33f6102d 100644 --- a/pkg/proto/xatu/coordinator.proto +++ b/pkg/proto/xatu/coordinator.proto @@ -15,6 +15,11 @@ service Coordinator { returns (CoordinateExecutionNodeRecordsResponse) {} rpc GetDiscoveryNodeRecord(GetDiscoveryNodeRecordRequest) returns (GetDiscoveryNodeRecordResponse) {} + + rpc GetCannonLocation(GetCannonLocationRequest) + returns (GetCannonLocationResponse) {} + rpc UpsertCannonLocation(UpsertCannonLocationRequest) + returns (UpsertCannonLocationResponse) {} } message CreateNodeRecordsRequest { repeated string node_records = 1; } @@ -82,3 +87,46 @@ message GetDiscoveryNodeRecordRequest { message GetDiscoveryNodeRecordResponse { string node_record = 1; } + +enum CannonType { + BEACON_API_ETH_V2_BEACON_BLOCK_VOLUNTARY_EXIT = 0; + BEACON_API_ETH_V2_BEACON_BLOCK_PROPOSER_SLASHING = 1; + BEACON_API_ETH_V2_BEACON_BLOCK_DEPOSIT = 2; +} + +message CannonLocationEthV2BeaconBlockVoluntaryExit { + uint64 slot = 1; +} + +message CannonLocationEthV2BeaconBlockProposerSlashing { + uint64 slot = 1; +} + +message CannonLocationEthV2BeaconBlockDeposit { + uint64 slot = 1; +} + +message CannonLocation { + string network_id = 1; + CannonType type = 2; + oneof Data { + CannonLocationEthV2BeaconBlockVoluntaryExit eth_v2_beacon_block_voluntary_exit = 3 [ json_name = "BEACON_API_ETH_V2_BEACON_BLOCK_VOLUNTARY_EXIT" ]; + CannonLocationEthV2BeaconBlockProposerSlashing eth_v2_beacon_block_proposer_slashing = 4 [ json_name = "BEACON_API_ETH_V2_BEACON_BLOCK_PROPOSER_SLASHING" ]; + CannonLocationEthV2BeaconBlockDeposit eth_v2_beacon_block_deposit = 5 [ json_name = "BEACON_API_ETH_V2_BEACON_BLOCK_DEPOSIT" ]; + } +} + +message GetCannonLocationRequest { + string network_id = 1; + CannonType type = 2; +} + +message GetCannonLocationResponse { + CannonLocation location = 1; +} + +message UpsertCannonLocationRequest { + CannonLocation location = 1; +} + +message UpsertCannonLocationResponse {} diff --git a/pkg/proto/xatu/coordinator_grpc.pb.go b/pkg/proto/xatu/coordinator_grpc.pb.go index 07163825..2bfbdc1d 100644 --- a/pkg/proto/xatu/coordinator_grpc.pb.go +++ b/pkg/proto/xatu/coordinator_grpc.pb.go @@ -24,6 +24,8 @@ const ( Coordinator_CreateExecutionNodeRecordStatus_FullMethodName = "/xatu.Coordinator/CreateExecutionNodeRecordStatus" Coordinator_CoordinateExecutionNodeRecords_FullMethodName = "/xatu.Coordinator/CoordinateExecutionNodeRecords" Coordinator_GetDiscoveryNodeRecord_FullMethodName = "/xatu.Coordinator/GetDiscoveryNodeRecord" + Coordinator_GetCannonLocation_FullMethodName = "/xatu.Coordinator/GetCannonLocation" + Coordinator_UpsertCannonLocation_FullMethodName = "/xatu.Coordinator/UpsertCannonLocation" ) // CoordinatorClient is the client API for Coordinator service. @@ -35,6 +37,8 @@ type CoordinatorClient interface { CreateExecutionNodeRecordStatus(ctx context.Context, in *CreateExecutionNodeRecordStatusRequest, opts ...grpc.CallOption) (*CreateExecutionNodeRecordStatusResponse, error) CoordinateExecutionNodeRecords(ctx context.Context, in *CoordinateExecutionNodeRecordsRequest, opts ...grpc.CallOption) (*CoordinateExecutionNodeRecordsResponse, error) GetDiscoveryNodeRecord(ctx context.Context, in *GetDiscoveryNodeRecordRequest, opts ...grpc.CallOption) (*GetDiscoveryNodeRecordResponse, error) + GetCannonLocation(ctx context.Context, in *GetCannonLocationRequest, opts ...grpc.CallOption) (*GetCannonLocationResponse, error) + UpsertCannonLocation(ctx context.Context, in *UpsertCannonLocationRequest, opts ...grpc.CallOption) (*UpsertCannonLocationResponse, error) } type coordinatorClient struct { @@ -90,6 +94,24 @@ func (c *coordinatorClient) GetDiscoveryNodeRecord(ctx context.Context, in *GetD return out, nil } +func (c *coordinatorClient) GetCannonLocation(ctx context.Context, in *GetCannonLocationRequest, opts ...grpc.CallOption) (*GetCannonLocationResponse, error) { + out := new(GetCannonLocationResponse) + err := c.cc.Invoke(ctx, Coordinator_GetCannonLocation_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *coordinatorClient) UpsertCannonLocation(ctx context.Context, in *UpsertCannonLocationRequest, opts ...grpc.CallOption) (*UpsertCannonLocationResponse, error) { + out := new(UpsertCannonLocationResponse) + err := c.cc.Invoke(ctx, Coordinator_UpsertCannonLocation_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // CoordinatorServer is the server API for Coordinator service. // All implementations must embed UnimplementedCoordinatorServer // for forward compatibility @@ -99,6 +121,8 @@ type CoordinatorServer interface { CreateExecutionNodeRecordStatus(context.Context, *CreateExecutionNodeRecordStatusRequest) (*CreateExecutionNodeRecordStatusResponse, error) CoordinateExecutionNodeRecords(context.Context, *CoordinateExecutionNodeRecordsRequest) (*CoordinateExecutionNodeRecordsResponse, error) GetDiscoveryNodeRecord(context.Context, *GetDiscoveryNodeRecordRequest) (*GetDiscoveryNodeRecordResponse, error) + GetCannonLocation(context.Context, *GetCannonLocationRequest) (*GetCannonLocationResponse, error) + UpsertCannonLocation(context.Context, *UpsertCannonLocationRequest) (*UpsertCannonLocationResponse, error) mustEmbedUnimplementedCoordinatorServer() } @@ -121,6 +145,12 @@ func (UnimplementedCoordinatorServer) CoordinateExecutionNodeRecords(context.Con func (UnimplementedCoordinatorServer) GetDiscoveryNodeRecord(context.Context, *GetDiscoveryNodeRecordRequest) (*GetDiscoveryNodeRecordResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetDiscoveryNodeRecord not implemented") } +func (UnimplementedCoordinatorServer) GetCannonLocation(context.Context, *GetCannonLocationRequest) (*GetCannonLocationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetCannonLocation not implemented") +} +func (UnimplementedCoordinatorServer) UpsertCannonLocation(context.Context, *UpsertCannonLocationRequest) (*UpsertCannonLocationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpsertCannonLocation not implemented") +} func (UnimplementedCoordinatorServer) mustEmbedUnimplementedCoordinatorServer() {} // UnsafeCoordinatorServer may be embedded to opt out of forward compatibility for this service. @@ -224,6 +254,42 @@ func _Coordinator_GetDiscoveryNodeRecord_Handler(srv interface{}, ctx context.Co return interceptor(ctx, in, info, handler) } +func _Coordinator_GetCannonLocation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetCannonLocationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CoordinatorServer).GetCannonLocation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Coordinator_GetCannonLocation_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CoordinatorServer).GetCannonLocation(ctx, req.(*GetCannonLocationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Coordinator_UpsertCannonLocation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpsertCannonLocationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CoordinatorServer).UpsertCannonLocation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Coordinator_UpsertCannonLocation_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CoordinatorServer).UpsertCannonLocation(ctx, req.(*UpsertCannonLocationRequest)) + } + return interceptor(ctx, in, info, handler) +} + // Coordinator_ServiceDesc is the grpc.ServiceDesc for Coordinator service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -251,6 +317,14 @@ var Coordinator_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetDiscoveryNodeRecord", Handler: _Coordinator_GetDiscoveryNodeRecord_Handler, }, + { + MethodName: "GetCannonLocation", + Handler: _Coordinator_GetCannonLocation_Handler, + }, + { + MethodName: "UpsertCannonLocation", + Handler: _Coordinator_UpsertCannonLocation_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "pkg/proto/xatu/coordinator.proto", diff --git a/pkg/server/persistence/cannon/location.go b/pkg/server/persistence/cannon/location.go new file mode 100644 index 00000000..69d83b72 --- /dev/null +++ b/pkg/server/persistence/cannon/location.go @@ -0,0 +1,121 @@ +package cannon + +import ( + "fmt" + "time" + + "github.com/ethpandaops/xatu/pkg/proto/xatu" + "google.golang.org/protobuf/encoding/protojson" +) + +type Location struct { + // LocationID is the location id. + LocationID int64 `json:"locationId" db:"location_id"` + // CreateTime is the timestamp of when the execution record was created. + CreateTime time.Time `json:"createTime" db:"create_time" fieldopt:"omitempty"` + // UpdateTime is the timestamp of when the activity record was updated. + UpdateTime time.Time `json:"updateTime" db:"update_time" fieldopt:"omitempty"` + // NetworkId is the network id of the location. + NetworkID string `json:"networkId" db:"network_id"` + // Type is the type of the location. + Type string `json:"type" db:"type"` + // Value is the value of the location. + Value string `json:"value" db:"value"` +} + +// MarshalValueFromProto marshals a proto message into the Value field. +func (l *Location) Marshal(msg *xatu.CannonLocation) error { + l.NetworkID = msg.NetworkId + + switch msg.Type { + case xatu.CannonType_BEACON_API_ETH_V2_BEACON_BLOCK_VOLUNTARY_EXIT: + l.Type = "BEACON_API_ETH_V2_BEACON_BLOCK_VOLUNTARY_EXIT" + + data := msg.GetEthV2BeaconBlockVoluntaryExit() + + b, err := protojson.Marshal(data) + if err != nil { + return err + } + + l.Value = string(b) + case xatu.CannonType_BEACON_API_ETH_V2_BEACON_BLOCK_PROPOSER_SLASHING: + l.Type = "BEACON_API_ETH_V2_BEACON_BLOCK_PROPOSER_SLASHING" + + data := msg.GetEthV2BeaconBlockProposerSlashing() + + b, err := protojson.Marshal(data) + if err != nil { + return err + } + + l.Value = string(b) + case xatu.CannonType_BEACON_API_ETH_V2_BEACON_BLOCK_DEPOSIT: + l.Type = "BEACON_API_ETH_V2_BEACON_BLOCK_DEPOSIT" + + data := msg.GetEthV2BeaconBlockDeposit() + + b, err := protojson.Marshal(data) + if err != nil { + return err + } + + l.Value = string(b) + default: + return fmt.Errorf("unknown type: %s", msg.Type) + } + + return nil +} + +func (l *Location) Unmarshal() (*xatu.CannonLocation, error) { + msg := &xatu.CannonLocation{ + NetworkId: l.NetworkID, + } + + switch l.Type { + case "BEACON_API_ETH_V2_BEACON_BLOCK_VOLUNTARY_EXIT": + msg.Type = xatu.CannonType_BEACON_API_ETH_V2_BEACON_BLOCK_VOLUNTARY_EXIT + + data := &xatu.CannonLocationEthV2BeaconBlockVoluntaryExit{} + + err := protojson.Unmarshal([]byte(l.Value), data) + if err != nil { + return nil, err + } + + msg.Data = &xatu.CannonLocation_EthV2BeaconBlockVoluntaryExit{ + EthV2BeaconBlockVoluntaryExit: data, + } + case "BEACON_API_ETH_V2_BEACON_BLOCK_PROPOSER_SLASHING": + msg.Type = xatu.CannonType_BEACON_API_ETH_V2_BEACON_BLOCK_PROPOSER_SLASHING + + data := &xatu.CannonLocationEthV2BeaconBlockProposerSlashing{} + + err := protojson.Unmarshal([]byte(l.Value), data) + if err != nil { + return nil, err + } + + msg.Data = &xatu.CannonLocation_EthV2BeaconBlockProposerSlashing{ + EthV2BeaconBlockProposerSlashing: data, + } + case "BEACON_API_ETH_V2_BEACON_BLOCK_DEPOSIT": + msg.Type = xatu.CannonType_BEACON_API_ETH_V2_BEACON_BLOCK_DEPOSIT + + data := &xatu.CannonLocationEthV2BeaconBlockDeposit{} + + err := protojson.Unmarshal([]byte(l.Value), data) + if err != nil { + return nil, err + } + + msg.Data = &xatu.CannonLocation_EthV2BeaconBlockDeposit{ + EthV2BeaconBlockDeposit: data, + } + default: + return nil, fmt.Errorf("unknown type: %s", l.Type) + } + + return msg, nil +} diff --git a/pkg/server/persistence/cannon_location.go b/pkg/server/persistence/cannon_location.go new file mode 100644 index 00000000..9fcbb4d5 --- /dev/null +++ b/pkg/server/persistence/cannon_location.go @@ -0,0 +1,100 @@ +package persistence + +import ( + "context" + "errors" + + "github.com/ethpandaops/xatu/pkg/server/persistence/cannon" + "github.com/huandu/go-sqlbuilder" +) + +var cannonLocationStruct = sqlbuilder.NewStruct(new(cannon.Location)).For(sqlbuilder.PostgreSQL) + +var ErrCannonLocationNotFound = errors.New("cannon location not found") + +func (c *Client) InsertCannonLocation(ctx context.Context, location *cannon.Location) error { + sb := cannonLocationStruct.InsertInto("cannon_location", location) + sql, args := sb.Build() + _, err := c.db.ExecContext(ctx, sql, args...) + + return err +} + +func (c *Client) UpdateCannonLocation(ctx context.Context, location *cannon.Location) error { + sb := cannonLocationStruct.Update("cannon_location", location) + sb.Where(sb.E("location_id", location.LocationID)) + + sql, args := sb.Build() + + _, err := c.db.ExecContext(ctx, sql, args...) + + return err +} + +func (c *Client) GetCannonLocationByID(ctx context.Context, id int64) (*cannon.Location, error) { + sb := cannonLocationStruct.SelectFrom("cannon_location") + sb.Where(sb.E("location_id", id)) + + sql, args := sb.Build() + + rows, err := c.db.QueryContext(ctx, sql, args...) + if err != nil { + return nil, err + } + + defer rows.Close() + + var locations []*cannon.Location + + for rows.Next() { + var location cannon.Location + + err = rows.Scan(cannonLocationStruct.Addr(&location)...) + if err != nil { + return nil, err + } + + locations = append(locations, &location) + } + + if len(locations) != 1 { + return nil, ErrCannonLocationNotFound + } + + return locations[0], nil +} + +// get by network id and type +func (c *Client) GetCannonLocationByNetworkIDAndType(ctx context.Context, networkID, typ string) (*cannon.Location, error) { + sb := cannonLocationStruct.SelectFrom("cannon_location") + sb.Where(sb.E("network_id", networkID)) + sb.Where(sb.E("type", typ)) + + sql, args := sb.Build() + + rows, err := c.db.QueryContext(ctx, sql, args...) + if err != nil { + return nil, err + } + + defer rows.Close() + + var locations []*cannon.Location + + for rows.Next() { + var location cannon.Location + + err = rows.Scan(cannonLocationStruct.Addr(&location)...) + if err != nil { + return nil, err + } + + locations = append(locations, &location) + } + + if len(locations) != 1 { + return nil, ErrCannonLocationNotFound + } + + return locations[0], nil +} diff --git a/pkg/server/service/coordinator/client.go b/pkg/server/service/coordinator/client.go index 059bfb6f..a2509c06 100644 --- a/pkg/server/service/coordinator/client.go +++ b/pkg/server/service/coordinator/client.go @@ -12,6 +12,7 @@ import ( "github.com/ethpandaops/xatu/pkg/proto/xatu" "github.com/ethpandaops/xatu/pkg/server/geoip" "github.com/ethpandaops/xatu/pkg/server/persistence" + "github.com/ethpandaops/xatu/pkg/server/persistence/cannon" "github.com/ethpandaops/xatu/pkg/server/persistence/node" n "github.com/ethpandaops/xatu/pkg/server/service/coordinator/node" "github.com/sirupsen/logrus" @@ -297,3 +298,55 @@ func (c *Client) GetDiscoveryNodeRecord(ctx context.Context, req *xatu.GetDiscov NodeRecord: randomRecord.Enr, }, nil } + +func (c *Client) GetCannonLocation(ctx context.Context, req *xatu.GetCannonLocationRequest) (*xatu.GetCannonLocationResponse, error) { + location, err := c.persistence.GetCannonLocationByNetworkIDAndType(ctx, req.NetworkId, req.Type.Enum().String()) + if err != nil && err != persistence.ErrCannonLocationNotFound { + return nil, err + } + + rsp := &xatu.GetCannonLocationResponse{} + + if location == nil { + return rsp, nil + } + + protoLoc, err := location.Unmarshal() + if err != nil { + return nil, err + } + + return &xatu.GetCannonLocationResponse{ + Location: protoLoc, + }, nil +} + +func (c *Client) UpsertCannonLocation(ctx context.Context, req *xatu.UpsertCannonLocationRequest) (*xatu.UpsertCannonLocationResponse, error) { + newLocation := &cannon.Location{} + + err := newLocation.Marshal(req.Location) + if err != nil { + return nil, err + } + + location, err := c.persistence.GetCannonLocationByNetworkIDAndType(ctx, req.Location.NetworkId, req.Location.Type.Enum().String()) + if err != nil && err != persistence.ErrCannonLocationNotFound { + return nil, err + } + + if location == nil { + err = c.persistence.InsertCannonLocation(ctx, newLocation) + if err != nil { + return nil, err + } + } else { + location.Value = newLocation.Value + + err = c.persistence.UpdateCannonLocation(ctx, location) + if err != nil { + return nil, err + } + } + + return &xatu.UpsertCannonLocationResponse{}, nil +}