From 793fceea5564173ff5463d41c421bc225d62f77a Mon Sep 17 00:00:00 2001 From: Anmol1696 Date: Tue, 29 Oct 2024 15:29:22 +0400 Subject: [PATCH 1/5] update exposer to add functions --- .../relayers/hermes/statefulset.yaml | 2 +- starship/exposer/config.go | 2 + starship/exposer/exposer/mnemonic.pb.go | 114 +--- starship/exposer/exposer/node.pb.go | 202 ++---- starship/exposer/exposer/service.pb.go | 590 ++++++++++++------ starship/exposer/exposer/service.pb.gw.go | 294 ++++++++- starship/exposer/exposer/service_grpc.pb.go | 145 ++++- starship/exposer/handler_relayer.go | 104 ++- starship/faucet/faucet/service.pb.go | 48 +- starship/faucet/faucet/service.pb.gw.go | 3 +- starship/faucet/faucet/service_grpc.pb.go | 25 +- starship/faucet/faucet/status.pb.go | 70 +-- starship/proto/exposer/service.proto | 37 ++ starship/registry/registry/chain.pb.go | 510 +++------------ starship/registry/registry/ibc.pb.go | 114 +--- starship/registry/registry/mnemonic.pb.go | 92 +-- starship/registry/registry/service.pb.go | 136 +--- starship/registry/registry/service.pb.gw.go | 3 +- starship/registry/registry/service_grpc.pb.go | 25 +- starship/tests/e2e/configs/three-chain.yaml | 3 + 20 files changed, 1266 insertions(+), 1253 deletions(-) diff --git a/starship/charts/devnet/templates/relayers/hermes/statefulset.yaml b/starship/charts/devnet/templates/relayers/hermes/statefulset.yaml index 112f09bd8..6f5977c7d 100644 --- a/starship/charts/devnet/templates/relayers/hermes/statefulset.yaml +++ b/starship/charts/devnet/templates/relayers/hermes/statefulset.yaml @@ -192,7 +192,7 @@ spec: - bash - "-c" - | - /exposer/exposer + /exposer/exposer --verbose resources: {{- include "getResourceObject" $.Values.exposer.resources | trim | nindent 12 }} securityContext: allowPrivilegeEscalation: false diff --git a/starship/exposer/config.go b/starship/exposer/config.go index c925110a2..8bcf4c07a 100644 --- a/starship/exposer/config.go +++ b/starship/exposer/config.go @@ -38,6 +38,8 @@ type Config struct { NodeKeyFile string `name:"node-key-file" json:"node_key_file" env:"NODE_KEY_FILE" usage:"Path of node_key.json file for node"` // StatusURL is used to fetch status info from blockchain node StatusURL string `name:"status-url" json:"status_url" env:"STATUS_URL" usage:"URL to fetch chain status"` + // ChainIDs is the list of chain ids, comma separated + ChainIDs string `name:"chain-ids" json:"chain_ids" env:"CHAIN_IDS" usage:"Comma separated list of chain ids"` // Verbose switches on debug logging Verbose bool `name:"verbose" json:"verbose" usage:"switch on debug / verbose logging"` // OnlyFatalLog set log level as fatal to ignore logs diff --git a/starship/exposer/exposer/mnemonic.pb.go b/starship/exposer/exposer/mnemonic.pb.go index 5a26d2d87..0427976aa 100644 --- a/starship/exposer/exposer/mnemonic.pb.go +++ b/starship/exposer/exposer/mnemonic.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.1 // protoc (unknown) // source: exposer/mnemonic.proto @@ -32,11 +32,9 @@ type Mnemonic struct { func (x *Mnemonic) Reset() { *x = Mnemonic{} - if protoimpl.UnsafeEnabled { - mi := &file_exposer_mnemonic_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_exposer_mnemonic_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Mnemonic) String() string { @@ -47,7 +45,7 @@ func (*Mnemonic) ProtoMessage() {} func (x *Mnemonic) ProtoReflect() protoreflect.Message { mi := &file_exposer_mnemonic_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -98,11 +96,9 @@ type Keys struct { func (x *Keys) Reset() { *x = Keys{} - if protoimpl.UnsafeEnabled { - mi := &file_exposer_mnemonic_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_exposer_mnemonic_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Keys) String() string { @@ -113,7 +109,7 @@ func (*Keys) ProtoMessage() {} func (x *Keys) ProtoReflect() protoreflect.Message { mi := &file_exposer_mnemonic_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -181,11 +177,9 @@ type TypeKey struct { func (x *TypeKey) Reset() { *x = TypeKey{} - if protoimpl.UnsafeEnabled { - mi := &file_exposer_mnemonic_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_exposer_mnemonic_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TypeKey) String() string { @@ -196,7 +190,7 @@ func (*TypeKey) ProtoMessage() {} func (x *TypeKey) ProtoReflect() protoreflect.Message { mi := &file_exposer_mnemonic_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -237,11 +231,9 @@ type PrivValidatorKey struct { func (x *PrivValidatorKey) Reset() { *x = PrivValidatorKey{} - if protoimpl.UnsafeEnabled { - mi := &file_exposer_mnemonic_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_exposer_mnemonic_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrivValidatorKey) String() string { @@ -252,7 +244,7 @@ func (*PrivValidatorKey) ProtoMessage() {} func (x *PrivValidatorKey) ProtoReflect() protoreflect.Message { mi := &file_exposer_mnemonic_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -298,11 +290,9 @@ type NodeKey struct { func (x *NodeKey) Reset() { *x = NodeKey{} - if protoimpl.UnsafeEnabled { - mi := &file_exposer_mnemonic_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_exposer_mnemonic_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeKey) String() string { @@ -313,7 +303,7 @@ func (*NodeKey) ProtoMessage() {} func (x *NodeKey) ProtoReflect() protoreflect.Message { mi := &file_exposer_mnemonic_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -432,68 +422,6 @@ func file_exposer_mnemonic_proto_init() { if File_exposer_mnemonic_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_exposer_mnemonic_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Mnemonic); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_exposer_mnemonic_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Keys); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_exposer_mnemonic_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*TypeKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_exposer_mnemonic_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*PrivValidatorKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_exposer_mnemonic_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*NodeKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/starship/exposer/exposer/node.pb.go b/starship/exposer/exposer/node.pb.go index b0466ab4d..53354899e 100644 --- a/starship/exposer/exposer/node.pb.go +++ b/starship/exposer/exposer/node.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.1 // protoc (unknown) // source: exposer/node.proto @@ -32,11 +32,9 @@ type Status struct { func (x *Status) Reset() { *x = Status{} - if protoimpl.UnsafeEnabled { - mi := &file_exposer_node_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_exposer_node_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Status) String() string { @@ -47,7 +45,7 @@ func (*Status) ProtoMessage() {} func (x *Status) ProtoReflect() protoreflect.Message { mi := &file_exposer_node_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -100,11 +98,9 @@ type NodeInfo struct { func (x *NodeInfo) Reset() { *x = NodeInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_exposer_node_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_exposer_node_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeInfo) String() string { @@ -115,7 +111,7 @@ func (*NodeInfo) ProtoMessage() {} func (x *NodeInfo) ProtoReflect() protoreflect.Message { mi := &file_exposer_node_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -204,11 +200,9 @@ type SyncInfo struct { func (x *SyncInfo) Reset() { *x = SyncInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_exposer_node_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_exposer_node_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SyncInfo) String() string { @@ -219,7 +213,7 @@ func (*SyncInfo) ProtoMessage() {} func (x *SyncInfo) ProtoReflect() protoreflect.Message { mi := &file_exposer_node_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -309,11 +303,9 @@ type ValidatorInfo struct { func (x *ValidatorInfo) Reset() { *x = ValidatorInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_exposer_node_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_exposer_node_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValidatorInfo) String() string { @@ -324,7 +316,7 @@ func (*ValidatorInfo) ProtoMessage() {} func (x *ValidatorInfo) ProtoReflect() protoreflect.Message { mi := &file_exposer_node_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -374,11 +366,9 @@ type PrivValidatorState struct { func (x *PrivValidatorState) Reset() { *x = PrivValidatorState{} - if protoimpl.UnsafeEnabled { - mi := &file_exposer_node_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_exposer_node_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrivValidatorState) String() string { @@ -389,7 +379,7 @@ func (*PrivValidatorState) ProtoMessage() {} func (x *PrivValidatorState) ProtoReflect() protoreflect.Message { mi := &file_exposer_node_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -451,11 +441,9 @@ type Status_Result struct { func (x *Status_Result) Reset() { *x = Status_Result{} - if protoimpl.UnsafeEnabled { - mi := &file_exposer_node_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_exposer_node_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Status_Result) String() string { @@ -466,7 +454,7 @@ func (*Status_Result) ProtoMessage() {} func (x *Status_Result) ProtoReflect() protoreflect.Message { mi := &file_exposer_node_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -514,11 +502,9 @@ type NodeInfo_ProtocolVersion struct { func (x *NodeInfo_ProtocolVersion) Reset() { *x = NodeInfo_ProtocolVersion{} - if protoimpl.UnsafeEnabled { - mi := &file_exposer_node_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_exposer_node_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeInfo_ProtocolVersion) String() string { @@ -529,7 +515,7 @@ func (*NodeInfo_ProtocolVersion) ProtoMessage() {} func (x *NodeInfo_ProtocolVersion) ProtoReflect() protoreflect.Message { mi := &file_exposer_node_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -576,11 +562,9 @@ type NodeInfo_Other struct { func (x *NodeInfo_Other) Reset() { *x = NodeInfo_Other{} - if protoimpl.UnsafeEnabled { - mi := &file_exposer_node_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_exposer_node_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeInfo_Other) String() string { @@ -591,7 +575,7 @@ func (*NodeInfo_Other) ProtoMessage() {} func (x *NodeInfo_Other) ProtoReflect() protoreflect.Message { mi := &file_exposer_node_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -631,11 +615,9 @@ type ValidatorInfo_Key struct { func (x *ValidatorInfo_Key) Reset() { *x = ValidatorInfo_Key{} - if protoimpl.UnsafeEnabled { - mi := &file_exposer_node_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_exposer_node_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValidatorInfo_Key) String() string { @@ -646,7 +628,7 @@ func (*ValidatorInfo_Key) ProtoMessage() {} func (x *ValidatorInfo_Key) ProtoReflect() protoreflect.Message { mi := &file_exposer_node_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -832,116 +814,6 @@ func file_exposer_node_proto_init() { if File_exposer_node_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_exposer_node_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Status); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_exposer_node_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*NodeInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_exposer_node_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SyncInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_exposer_node_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ValidatorInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_exposer_node_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*PrivValidatorState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_exposer_node_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Status_Result); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_exposer_node_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*NodeInfo_ProtocolVersion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_exposer_node_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*NodeInfo_Other); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_exposer_node_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ValidatorInfo_Key); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_exposer_node_proto_msgTypes[4].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/starship/exposer/exposer/service.pb.go b/starship/exposer/exposer/service.pb.go index f39676678..6d0d81622 100644 --- a/starship/exposer/exposer/service.pb.go +++ b/starship/exposer/exposer/service.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.1 // protoc (unknown) // source: exposer/service.proto @@ -35,11 +35,9 @@ type ResponseNodeID struct { func (x *ResponseNodeID) Reset() { *x = ResponseNodeID{} - if protoimpl.UnsafeEnabled { - mi := &file_exposer_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_exposer_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResponseNodeID) String() string { @@ -50,7 +48,7 @@ func (*ResponseNodeID) ProtoMessage() {} func (x *ResponseNodeID) ProtoReflect() protoreflect.Message { mi := &file_exposer_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -83,11 +81,9 @@ type ResponsePubKey struct { func (x *ResponsePubKey) Reset() { *x = ResponsePubKey{} - if protoimpl.UnsafeEnabled { - mi := &file_exposer_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_exposer_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResponsePubKey) String() string { @@ -98,7 +94,7 @@ func (*ResponsePubKey) ProtoMessage() {} func (x *ResponsePubKey) ProtoReflect() protoreflect.Message { mi := &file_exposer_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -137,11 +133,9 @@ type ResponseFileData struct { func (x *ResponseFileData) Reset() { *x = ResponseFileData{} - if protoimpl.UnsafeEnabled { - mi := &file_exposer_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_exposer_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResponseFileData) String() string { @@ -152,7 +146,7 @@ func (*ResponseFileData) ProtoMessage() {} func (x *ResponseFileData) ProtoReflect() protoreflect.Message { mi := &file_exposer_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -192,11 +186,9 @@ type RequestCreateChannel struct { func (x *RequestCreateChannel) Reset() { *x = RequestCreateChannel{} - if protoimpl.UnsafeEnabled { - mi := &file_exposer_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_exposer_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RequestCreateChannel) String() string { @@ -207,7 +199,7 @@ func (*RequestCreateChannel) ProtoMessage() {} func (x *RequestCreateChannel) ProtoReflect() protoreflect.Message { mi := &file_exposer_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -281,11 +273,9 @@ type ResponseCreateChannel struct { func (x *ResponseCreateChannel) Reset() { *x = ResponseCreateChannel{} - if protoimpl.UnsafeEnabled { - mi := &file_exposer_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_exposer_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResponseCreateChannel) String() string { @@ -296,7 +286,7 @@ func (*ResponseCreateChannel) ProtoMessage() {} func (x *ResponseCreateChannel) ProtoReflect() protoreflect.Message { mi := &file_exposer_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -318,6 +308,267 @@ func (x *ResponseCreateChannel) GetStatus() string { return "" } +type RequestGetClients struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ChainId string `protobuf:"bytes,1,opt,name=chain_id,proto3" json:"chain_id,omitempty"` +} + +func (x *RequestGetClients) Reset() { + *x = RequestGetClients{} + mi := &file_exposer_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RequestGetClients) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RequestGetClients) ProtoMessage() {} + +func (x *RequestGetClients) ProtoReflect() protoreflect.Message { + mi := &file_exposer_service_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RequestGetClients.ProtoReflect.Descriptor instead. +func (*RequestGetClients) Descriptor() ([]byte, []int) { + return file_exposer_service_proto_rawDescGZIP(), []int{5} +} + +func (x *RequestGetClients) GetChainId() string { + if x != nil { + return x.ChainId + } + return "" +} + +type ResponseGetClients struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Clients []string `protobuf:"bytes,1,rep,name=clients,proto3" json:"clients,omitempty"` +} + +func (x *ResponseGetClients) Reset() { + *x = ResponseGetClients{} + mi := &file_exposer_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResponseGetClients) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResponseGetClients) ProtoMessage() {} + +func (x *ResponseGetClients) ProtoReflect() protoreflect.Message { + mi := &file_exposer_service_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResponseGetClients.ProtoReflect.Descriptor instead. +func (*ResponseGetClients) Descriptor() ([]byte, []int) { + return file_exposer_service_proto_rawDescGZIP(), []int{6} +} + +func (x *ResponseGetClients) GetClients() []string { + if x != nil { + return x.Clients + } + return nil +} + +type RequestUpdateClients struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ChainId string `protobuf:"bytes,1,opt,name=chain_id,proto3" json:"chain_id,omitempty"` +} + +func (x *RequestUpdateClients) Reset() { + *x = RequestUpdateClients{} + mi := &file_exposer_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RequestUpdateClients) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RequestUpdateClients) ProtoMessage() {} + +func (x *RequestUpdateClients) ProtoReflect() protoreflect.Message { + mi := &file_exposer_service_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RequestUpdateClients.ProtoReflect.Descriptor instead. +func (*RequestUpdateClients) Descriptor() ([]byte, []int) { + return file_exposer_service_proto_rawDescGZIP(), []int{7} +} + +func (x *RequestUpdateClients) GetChainId() string { + if x != nil { + return x.ChainId + } + return "" +} + +type ResponseUpdateClients struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *ResponseUpdateClients) Reset() { + *x = ResponseUpdateClients{} + mi := &file_exposer_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResponseUpdateClients) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResponseUpdateClients) ProtoMessage() {} + +func (x *ResponseUpdateClients) ProtoReflect() protoreflect.Message { + mi := &file_exposer_service_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResponseUpdateClients.ProtoReflect.Descriptor instead. +func (*ResponseUpdateClients) Descriptor() ([]byte, []int) { + return file_exposer_service_proto_rawDescGZIP(), []int{8} +} + +func (x *ResponseUpdateClients) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + +type RequestUpdateAllClients struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RequestUpdateAllClients) Reset() { + *x = RequestUpdateAllClients{} + mi := &file_exposer_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RequestUpdateAllClients) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RequestUpdateAllClients) ProtoMessage() {} + +func (x *RequestUpdateAllClients) ProtoReflect() protoreflect.Message { + mi := &file_exposer_service_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RequestUpdateAllClients.ProtoReflect.Descriptor instead. +func (*RequestUpdateAllClients) Descriptor() ([]byte, []int) { + return file_exposer_service_proto_rawDescGZIP(), []int{9} +} + +type ResponseUpdateAllClients struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *ResponseUpdateAllClients) Reset() { + *x = ResponseUpdateAllClients{} + mi := &file_exposer_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResponseUpdateAllClients) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResponseUpdateAllClients) ProtoMessage() {} + +func (x *ResponseUpdateAllClients) ProtoReflect() protoreflect.Message { + mi := &file_exposer_service_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResponseUpdateAllClients.ProtoReflect.Descriptor instead. +func (*ResponseUpdateAllClients) Descriptor() ([]byte, []int) { + return file_exposer_service_proto_rawDescGZIP(), []int{10} +} + +func (x *ResponseUpdateAllClients) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + var File_exposer_service_proto protoreflect.FileDescriptor var file_exposer_service_proto_rawDesc = []byte{ @@ -365,60 +616,97 @@ var file_exposer_service_proto_rawDesc = []byte{ 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x22, 0x2f, 0x0a, 0x15, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x32, - 0xb8, 0x05, 0x0a, 0x07, 0x45, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x12, 0x4e, 0x0a, 0x09, 0x47, - 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x44, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x1a, 0x17, 0x2e, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x44, 0x22, 0x10, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x0a, 0x12, 0x08, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x12, 0x4e, 0x0a, 0x09, 0x47, - 0x65, 0x74, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x1a, 0x17, 0x2e, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x22, 0x10, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x0a, 0x12, 0x08, 0x2f, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x12, 0x53, 0x0a, 0x0e, 0x47, - 0x65, 0x74, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x16, 0x2e, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, + 0x2f, 0x0a, 0x11, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, + 0x22, 0x2e, 0x0a, 0x12, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x47, 0x65, 0x74, 0x43, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, + 0x22, 0x32, 0x0a, 0x14, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x5f, 0x69, 0x64, 0x22, 0x2f, 0x0a, 0x15, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x16, 0x0a, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x19, 0x0a, 0x17, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x6c, 0x6c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, + 0x22, 0x32, 0x0a, 0x18, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x41, 0x6c, 0x6c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x16, 0x0a, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x32, 0xfa, 0x07, 0x0a, 0x07, 0x45, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x72, + 0x12, 0x4e, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x44, 0x12, 0x16, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x17, 0x2e, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x2e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x44, 0x22, 0x10, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0a, 0x12, 0x08, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, + 0x12, 0x4e, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x22, 0x10, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0a, 0x12, 0x08, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, - 0x12, 0x3f, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, - 0x70, 0x74, 0x79, 0x1a, 0x0d, 0x2e, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x2e, 0x4b, 0x65, - 0x79, 0x73, 0x22, 0x0d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x07, 0x12, 0x05, 0x2f, 0x6b, 0x65, 0x79, - 0x73, 0x12, 0x53, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x50, 0x72, 0x69, 0x76, 0x4b, 0x65, 0x79, 0x12, - 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x19, 0x2e, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, - 0x72, 0x2e, 0x50, 0x72, 0x69, 0x76, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x4b, - 0x65, 0x79, 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x2f, 0x70, 0x72, 0x69, - 0x76, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x12, 0x6b, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x50, 0x72, 0x69, - 0x76, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, - 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1b, 0x2e, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, - 0x72, 0x2e, 0x50, 0x72, 0x69, 0x76, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x70, - 0x72, 0x69, 0x76, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x12, 0x49, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x4b, 0x65, - 0x79, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x10, 0x2e, 0x65, 0x78, 0x70, 0x6f, - 0x73, 0x65, 0x72, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x4b, 0x65, 0x79, 0x22, 0x11, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x0b, 0x12, 0x09, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x12, 0x6a, - 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, - 0x1d, 0x2e, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x1e, - 0x2e, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x22, 0x1a, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x3a, 0x01, 0x2a, 0x22, 0x0f, 0x2f, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x42, 0x83, 0x01, 0x0a, 0x0b, 0x63, - 0x6f, 0x6d, 0x2e, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x42, 0x0c, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x6c, 0x6f, 0x67, 0x79, - 0x2d, 0x74, 0x65, 0x63, 0x68, 0x2f, 0x73, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x2f, 0x65, - 0x78, 0x70, 0x6f, 0x73, 0x65, 0x72, 0xa2, 0x02, 0x03, 0x45, 0x58, 0x58, 0xaa, 0x02, 0x07, 0x45, - 0x78, 0x70, 0x6f, 0x73, 0x65, 0x72, 0xca, 0x02, 0x07, 0x45, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x72, - 0xe2, 0x02, 0x13, 0x45, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x45, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x72, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x17, 0x2e, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x2e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x22, 0x10, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0a, 0x12, 0x08, 0x2f, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, + 0x12, 0x53, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x46, 0x69, + 0x6c, 0x65, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x17, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, + 0x75, 0x63, 0x74, 0x22, 0x10, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0a, 0x12, 0x08, 0x2f, 0x67, 0x65, + 0x6e, 0x65, 0x73, 0x69, 0x73, 0x12, 0x3f, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, + 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x0d, 0x2e, 0x65, 0x78, 0x70, 0x6f, 0x73, + 0x65, 0x72, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x22, 0x0d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x07, 0x12, + 0x05, 0x2f, 0x6b, 0x65, 0x79, 0x73, 0x12, 0x53, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x50, 0x72, 0x69, + 0x76, 0x4b, 0x65, 0x79, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x19, 0x2e, 0x65, + 0x78, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x2e, 0x50, 0x72, 0x69, 0x76, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x4b, 0x65, 0x79, 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c, 0x12, + 0x0a, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x12, 0x6b, 0x0a, 0x15, 0x47, + 0x65, 0x74, 0x50, 0x72, 0x69, 0x76, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1b, 0x2e, 0x65, + 0x78, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x2e, 0x50, 0x72, 0x69, 0x76, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x17, 0x12, 0x15, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x49, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x4e, + 0x6f, 0x64, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x10, + 0x2e, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x4b, 0x65, 0x79, + 0x22, 0x11, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0b, 0x12, 0x09, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, + 0x6b, 0x65, 0x79, 0x12, 0x6a, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, + 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x1d, 0x2e, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x2e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, + 0x6e, 0x65, 0x6c, 0x1a, 0x1e, 0x2e, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x2e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, + 0x6e, 0x65, 0x6c, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x3a, 0x01, 0x2a, 0x22, 0x0f, + 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, + 0x6c, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x6c, 0x6c, 0x43, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x73, 0x12, 0x20, 0x2e, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x2e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x6c, 0x6c, 0x43, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0x21, 0x2e, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x2e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x6c, + 0x6c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, + 0x3a, 0x01, 0x2a, 0x22, 0x08, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x62, 0x0a, + 0x0a, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1a, 0x2e, 0x65, 0x78, + 0x70, 0x6f, 0x73, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x47, 0x65, 0x74, + 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0x1b, 0x2e, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, + 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x73, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x63, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, + 0x7d, 0x12, 0x6e, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x73, 0x12, 0x1d, 0x2e, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x73, 0x1a, 0x1e, 0x2e, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x73, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x3a, 0x01, 0x2a, 0x22, 0x13, 0x2f, 0x63, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, + 0x7d, 0x42, 0x83, 0x01, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x2e, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, + 0x72, 0x42, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x2d, 0x74, 0x65, 0x63, 0x68, 0x2f, 0x73, 0x74, 0x61, + 0x72, 0x73, 0x68, 0x69, 0x70, 0x2f, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x72, 0xa2, 0x02, 0x03, + 0x45, 0x58, 0x58, 0xaa, 0x02, 0x07, 0x45, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x72, 0xca, 0x02, 0x07, + 0x45, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x72, 0xe2, 0x02, 0x13, 0x45, 0x78, 0x70, 0x6f, 0x73, 0x65, + 0x72, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, + 0x45, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -433,39 +721,51 @@ func file_exposer_service_proto_rawDescGZIP() []byte { return file_exposer_service_proto_rawDescData } -var file_exposer_service_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_exposer_service_proto_msgTypes = make([]protoimpl.MessageInfo, 11) var file_exposer_service_proto_goTypes = []any{ - (*ResponseNodeID)(nil), // 0: exposer.ResponseNodeID - (*ResponsePubKey)(nil), // 1: exposer.ResponsePubKey - (*ResponseFileData)(nil), // 2: exposer.ResponseFileData - (*RequestCreateChannel)(nil), // 3: exposer.RequestCreateChannel - (*ResponseCreateChannel)(nil), // 4: exposer.ResponseCreateChannel - (*emptypb.Empty)(nil), // 5: google.protobuf.Empty - (*structpb.Struct)(nil), // 6: google.protobuf.Struct - (*Keys)(nil), // 7: exposer.Keys - (*PrivValidatorKey)(nil), // 8: exposer.PrivValidatorKey - (*PrivValidatorState)(nil), // 9: exposer.PrivValidatorState - (*NodeKey)(nil), // 10: exposer.NodeKey + (*ResponseNodeID)(nil), // 0: exposer.ResponseNodeID + (*ResponsePubKey)(nil), // 1: exposer.ResponsePubKey + (*ResponseFileData)(nil), // 2: exposer.ResponseFileData + (*RequestCreateChannel)(nil), // 3: exposer.RequestCreateChannel + (*ResponseCreateChannel)(nil), // 4: exposer.ResponseCreateChannel + (*RequestGetClients)(nil), // 5: exposer.RequestGetClients + (*ResponseGetClients)(nil), // 6: exposer.ResponseGetClients + (*RequestUpdateClients)(nil), // 7: exposer.RequestUpdateClients + (*ResponseUpdateClients)(nil), // 8: exposer.ResponseUpdateClients + (*RequestUpdateAllClients)(nil), // 9: exposer.RequestUpdateAllClients + (*ResponseUpdateAllClients)(nil), // 10: exposer.ResponseUpdateAllClients + (*emptypb.Empty)(nil), // 11: google.protobuf.Empty + (*structpb.Struct)(nil), // 12: google.protobuf.Struct + (*Keys)(nil), // 13: exposer.Keys + (*PrivValidatorKey)(nil), // 14: exposer.PrivValidatorKey + (*PrivValidatorState)(nil), // 15: exposer.PrivValidatorState + (*NodeKey)(nil), // 16: exposer.NodeKey } var file_exposer_service_proto_depIdxs = []int32{ - 5, // 0: exposer.Exposer.GetNodeID:input_type -> google.protobuf.Empty - 5, // 1: exposer.Exposer.GetPubKey:input_type -> google.protobuf.Empty - 5, // 2: exposer.Exposer.GetGenesisFile:input_type -> google.protobuf.Empty - 5, // 3: exposer.Exposer.GetKeys:input_type -> google.protobuf.Empty - 5, // 4: exposer.Exposer.GetPrivKey:input_type -> google.protobuf.Empty - 5, // 5: exposer.Exposer.GetPrivValidatorState:input_type -> google.protobuf.Empty - 5, // 6: exposer.Exposer.GetNodeKey:input_type -> google.protobuf.Empty + 11, // 0: exposer.Exposer.GetNodeID:input_type -> google.protobuf.Empty + 11, // 1: exposer.Exposer.GetPubKey:input_type -> google.protobuf.Empty + 11, // 2: exposer.Exposer.GetGenesisFile:input_type -> google.protobuf.Empty + 11, // 3: exposer.Exposer.GetKeys:input_type -> google.protobuf.Empty + 11, // 4: exposer.Exposer.GetPrivKey:input_type -> google.protobuf.Empty + 11, // 5: exposer.Exposer.GetPrivValidatorState:input_type -> google.protobuf.Empty + 11, // 6: exposer.Exposer.GetNodeKey:input_type -> google.protobuf.Empty 3, // 7: exposer.Exposer.CreateChannel:input_type -> exposer.RequestCreateChannel - 0, // 8: exposer.Exposer.GetNodeID:output_type -> exposer.ResponseNodeID - 1, // 9: exposer.Exposer.GetPubKey:output_type -> exposer.ResponsePubKey - 6, // 10: exposer.Exposer.GetGenesisFile:output_type -> google.protobuf.Struct - 7, // 11: exposer.Exposer.GetKeys:output_type -> exposer.Keys - 8, // 12: exposer.Exposer.GetPrivKey:output_type -> exposer.PrivValidatorKey - 9, // 13: exposer.Exposer.GetPrivValidatorState:output_type -> exposer.PrivValidatorState - 10, // 14: exposer.Exposer.GetNodeKey:output_type -> exposer.NodeKey - 4, // 15: exposer.Exposer.CreateChannel:output_type -> exposer.ResponseCreateChannel - 8, // [8:16] is the sub-list for method output_type - 0, // [0:8] is the sub-list for method input_type + 9, // 8: exposer.Exposer.UpdateAllClients:input_type -> exposer.RequestUpdateAllClients + 5, // 9: exposer.Exposer.GetClients:input_type -> exposer.RequestGetClients + 7, // 10: exposer.Exposer.UpdateClients:input_type -> exposer.RequestUpdateClients + 0, // 11: exposer.Exposer.GetNodeID:output_type -> exposer.ResponseNodeID + 1, // 12: exposer.Exposer.GetPubKey:output_type -> exposer.ResponsePubKey + 12, // 13: exposer.Exposer.GetGenesisFile:output_type -> google.protobuf.Struct + 13, // 14: exposer.Exposer.GetKeys:output_type -> exposer.Keys + 14, // 15: exposer.Exposer.GetPrivKey:output_type -> exposer.PrivValidatorKey + 15, // 16: exposer.Exposer.GetPrivValidatorState:output_type -> exposer.PrivValidatorState + 16, // 17: exposer.Exposer.GetNodeKey:output_type -> exposer.NodeKey + 4, // 18: exposer.Exposer.CreateChannel:output_type -> exposer.ResponseCreateChannel + 10, // 19: exposer.Exposer.UpdateAllClients:output_type -> exposer.ResponseUpdateAllClients + 6, // 20: exposer.Exposer.GetClients:output_type -> exposer.ResponseGetClients + 8, // 21: exposer.Exposer.UpdateClients:output_type -> exposer.ResponseUpdateClients + 11, // [11:22] is the sub-list for method output_type + 0, // [0:11] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name @@ -478,68 +778,6 @@ func file_exposer_service_proto_init() { } file_exposer_mnemonic_proto_init() file_exposer_node_proto_init() - if !protoimpl.UnsafeEnabled { - file_exposer_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ResponseNodeID); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_exposer_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ResponsePubKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_exposer_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ResponseFileData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_exposer_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*RequestCreateChannel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_exposer_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ResponseCreateChannel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_exposer_service_proto_msgTypes[3].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ @@ -547,7 +785,7 @@ func file_exposer_service_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_exposer_service_proto_rawDesc, NumEnums: 0, - NumMessages: 5, + NumMessages: 11, NumExtensions: 0, NumServices: 1, }, diff --git a/starship/exposer/exposer/service.pb.gw.go b/starship/exposer/exposer/service.pb.gw.go index 7a6690edf..c4afbc35b 100644 --- a/starship/exposer/exposer/service.pb.gw.go +++ b/starship/exposer/exposer/service.pb.gw.go @@ -184,10 +184,149 @@ func local_request_Exposer_CreateChannel_0(ctx context.Context, marshaler runtim } +func request_Exposer_UpdateAllClients_0(ctx context.Context, marshaler runtime.Marshaler, client ExposerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RequestUpdateAllClients + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.UpdateAllClients(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Exposer_UpdateAllClients_0(ctx context.Context, marshaler runtime.Marshaler, server ExposerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RequestUpdateAllClients + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.UpdateAllClients(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Exposer_GetClients_0(ctx context.Context, marshaler runtime.Marshaler, client ExposerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RequestGetClients + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["chain_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "chain_id") + } + + protoReq.ChainId, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "chain_id", err) + } + + msg, err := client.GetClients(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Exposer_GetClients_0(ctx context.Context, marshaler runtime.Marshaler, server ExposerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RequestGetClients + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["chain_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "chain_id") + } + + protoReq.ChainId, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "chain_id", err) + } + + msg, err := server.GetClients(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Exposer_UpdateClients_0(ctx context.Context, marshaler runtime.Marshaler, client ExposerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RequestUpdateClients + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["chain_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "chain_id") + } + + protoReq.ChainId, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "chain_id", err) + } + + msg, err := client.UpdateClients(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Exposer_UpdateClients_0(ctx context.Context, marshaler runtime.Marshaler, server ExposerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RequestUpdateClients + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["chain_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "chain_id") + } + + protoReq.ChainId, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "chain_id", err) + } + + msg, err := server.UpdateClients(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterExposerHandlerServer registers the http handlers for service Exposer to "mux". // UnaryRPC :call ExposerServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterExposerHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterExposerHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ExposerServer) error { mux.Handle("GET", pattern_Exposer_GetNodeID_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -390,6 +529,81 @@ func RegisterExposerHandlerServer(ctx context.Context, mux *runtime.ServeMux, se }) + mux.Handle("POST", pattern_Exposer_UpdateAllClients_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/exposer.Exposer/UpdateAllClients", runtime.WithHTTPPathPattern("/clients")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Exposer_UpdateAllClients_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Exposer_UpdateAllClients_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Exposer_GetClients_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/exposer.Exposer/GetClients", runtime.WithHTTPPathPattern("/clients/{chain_id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Exposer_GetClients_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Exposer_GetClients_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Exposer_UpdateClients_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/exposer.Exposer/UpdateClients", runtime.WithHTTPPathPattern("/clients/{chain_id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Exposer_UpdateClients_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Exposer_UpdateClients_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -428,7 +642,7 @@ func RegisterExposerHandler(ctx context.Context, mux *runtime.ServeMux, conn *gr // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ExposerClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ExposerClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "ExposerClient" to call the correct interceptors. +// "ExposerClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterExposerHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ExposerClient) error { mux.Handle("GET", pattern_Exposer_GetNodeID_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -607,6 +821,72 @@ func RegisterExposerHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl }) + mux.Handle("POST", pattern_Exposer_UpdateAllClients_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/exposer.Exposer/UpdateAllClients", runtime.WithHTTPPathPattern("/clients")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Exposer_UpdateAllClients_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Exposer_UpdateAllClients_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Exposer_GetClients_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/exposer.Exposer/GetClients", runtime.WithHTTPPathPattern("/clients/{chain_id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Exposer_GetClients_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Exposer_GetClients_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Exposer_UpdateClients_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/exposer.Exposer/UpdateClients", runtime.WithHTTPPathPattern("/clients/{chain_id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Exposer_UpdateClients_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Exposer_UpdateClients_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -626,6 +906,12 @@ var ( pattern_Exposer_GetNodeKey_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"node_key"}, "")) pattern_Exposer_CreateChannel_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"create_channel"}, "")) + + pattern_Exposer_UpdateAllClients_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"clients"}, "")) + + pattern_Exposer_GetClients_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"clients", "chain_id"}, "")) + + pattern_Exposer_UpdateClients_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"clients", "chain_id"}, "")) ) var ( @@ -644,4 +930,10 @@ var ( forward_Exposer_GetNodeKey_0 = runtime.ForwardResponseMessage forward_Exposer_CreateChannel_0 = runtime.ForwardResponseMessage + + forward_Exposer_UpdateAllClients_0 = runtime.ForwardResponseMessage + + forward_Exposer_GetClients_0 = runtime.ForwardResponseMessage + + forward_Exposer_UpdateClients_0 = runtime.ForwardResponseMessage ) diff --git a/starship/exposer/exposer/service_grpc.pb.go b/starship/exposer/exposer/service_grpc.pb.go index a1c3fcd32..acd1ee040 100644 --- a/starship/exposer/exposer/service_grpc.pb.go +++ b/starship/exposer/exposer/service_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.4.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: exposer/service.proto @@ -17,8 +17,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.62.0 or later. -const _ = grpc.SupportPackageIsVersion8 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Exposer_GetNodeID_FullMethodName = "/exposer.Exposer/GetNodeID" @@ -29,6 +29,9 @@ const ( Exposer_GetPrivValidatorState_FullMethodName = "/exposer.Exposer/GetPrivValidatorState" Exposer_GetNodeKey_FullMethodName = "/exposer.Exposer/GetNodeKey" Exposer_CreateChannel_FullMethodName = "/exposer.Exposer/CreateChannel" + Exposer_UpdateAllClients_FullMethodName = "/exposer.Exposer/UpdateAllClients" + Exposer_GetClients_FullMethodName = "/exposer.Exposer/GetClients" + Exposer_UpdateClients_FullMethodName = "/exposer.Exposer/UpdateClients" ) // ExposerClient is the client API for Exposer service. @@ -54,6 +57,12 @@ type ExposerClient interface { // Service functions for Relayer // CreateChannel creates channel between 2 given chains CreateChannel(ctx context.Context, in *RequestCreateChannel, opts ...grpc.CallOption) (*ResponseCreateChannel, error) + // UpdateAllClients updates the clients of the chain + UpdateAllClients(ctx context.Context, in *RequestUpdateAllClients, opts ...grpc.CallOption) (*ResponseUpdateAllClients, error) + // GetClient updates the clients of the chain + GetClients(ctx context.Context, in *RequestGetClients, opts ...grpc.CallOption) (*ResponseGetClients, error) + // UpdateClient update the clients of the chain + UpdateClients(ctx context.Context, in *RequestUpdateClients, opts ...grpc.CallOption) (*ResponseUpdateClients, error) } type exposerClient struct { @@ -144,9 +153,39 @@ func (c *exposerClient) CreateChannel(ctx context.Context, in *RequestCreateChan return out, nil } +func (c *exposerClient) UpdateAllClients(ctx context.Context, in *RequestUpdateAllClients, opts ...grpc.CallOption) (*ResponseUpdateAllClients, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ResponseUpdateAllClients) + err := c.cc.Invoke(ctx, Exposer_UpdateAllClients_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *exposerClient) GetClients(ctx context.Context, in *RequestGetClients, opts ...grpc.CallOption) (*ResponseGetClients, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ResponseGetClients) + err := c.cc.Invoke(ctx, Exposer_GetClients_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *exposerClient) UpdateClients(ctx context.Context, in *RequestUpdateClients, opts ...grpc.CallOption) (*ResponseUpdateClients, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ResponseUpdateClients) + err := c.cc.Invoke(ctx, Exposer_UpdateClients_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + // ExposerServer is the server API for Exposer service. // All implementations must embed UnimplementedExposerServer -// for forward compatibility +// for forward compatibility. // // Interface for service type ExposerServer interface { @@ -167,12 +206,21 @@ type ExposerServer interface { // Service functions for Relayer // CreateChannel creates channel between 2 given chains CreateChannel(context.Context, *RequestCreateChannel) (*ResponseCreateChannel, error) + // UpdateAllClients updates the clients of the chain + UpdateAllClients(context.Context, *RequestUpdateAllClients) (*ResponseUpdateAllClients, error) + // GetClient updates the clients of the chain + GetClients(context.Context, *RequestGetClients) (*ResponseGetClients, error) + // UpdateClient update the clients of the chain + UpdateClients(context.Context, *RequestUpdateClients) (*ResponseUpdateClients, error) mustEmbedUnimplementedExposerServer() } -// UnimplementedExposerServer must be embedded to have forward compatible implementations. -type UnimplementedExposerServer struct { -} +// UnimplementedExposerServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedExposerServer struct{} func (UnimplementedExposerServer) GetNodeID(context.Context, *emptypb.Empty) (*ResponseNodeID, error) { return nil, status.Errorf(codes.Unimplemented, "method GetNodeID not implemented") @@ -198,7 +246,17 @@ func (UnimplementedExposerServer) GetNodeKey(context.Context, *emptypb.Empty) (* func (UnimplementedExposerServer) CreateChannel(context.Context, *RequestCreateChannel) (*ResponseCreateChannel, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateChannel not implemented") } +func (UnimplementedExposerServer) UpdateAllClients(context.Context, *RequestUpdateAllClients) (*ResponseUpdateAllClients, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateAllClients not implemented") +} +func (UnimplementedExposerServer) GetClients(context.Context, *RequestGetClients) (*ResponseGetClients, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetClients not implemented") +} +func (UnimplementedExposerServer) UpdateClients(context.Context, *RequestUpdateClients) (*ResponseUpdateClients, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateClients not implemented") +} func (UnimplementedExposerServer) mustEmbedUnimplementedExposerServer() {} +func (UnimplementedExposerServer) testEmbeddedByValue() {} // UnsafeExposerServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ExposerServer will @@ -208,6 +266,13 @@ type UnsafeExposerServer interface { } func RegisterExposerServer(s grpc.ServiceRegistrar, srv ExposerServer) { + // If the following call pancis, it indicates UnimplementedExposerServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&Exposer_ServiceDesc, srv) } @@ -355,6 +420,60 @@ func _Exposer_CreateChannel_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } +func _Exposer_UpdateAllClients_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RequestUpdateAllClients) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ExposerServer).UpdateAllClients(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Exposer_UpdateAllClients_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ExposerServer).UpdateAllClients(ctx, req.(*RequestUpdateAllClients)) + } + return interceptor(ctx, in, info, handler) +} + +func _Exposer_GetClients_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RequestGetClients) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ExposerServer).GetClients(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Exposer_GetClients_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ExposerServer).GetClients(ctx, req.(*RequestGetClients)) + } + return interceptor(ctx, in, info, handler) +} + +func _Exposer_UpdateClients_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RequestUpdateClients) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ExposerServer).UpdateClients(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Exposer_UpdateClients_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ExposerServer).UpdateClients(ctx, req.(*RequestUpdateClients)) + } + return interceptor(ctx, in, info, handler) +} + // Exposer_ServiceDesc is the grpc.ServiceDesc for Exposer service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -394,6 +513,18 @@ var Exposer_ServiceDesc = grpc.ServiceDesc{ MethodName: "CreateChannel", Handler: _Exposer_CreateChannel_Handler, }, + { + MethodName: "UpdateAllClients", + Handler: _Exposer_UpdateAllClients_Handler, + }, + { + MethodName: "GetClients", + Handler: _Exposer_GetClients_Handler, + }, + { + MethodName: "UpdateClients", + Handler: _Exposer_UpdateClients_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "exposer/service.proto", diff --git a/starship/exposer/handler_relayer.go b/starship/exposer/handler_relayer.go index f8694d6af..48133c587 100644 --- a/starship/exposer/handler_relayer.go +++ b/starship/exposer/handler_relayer.go @@ -3,9 +3,10 @@ package main import ( "context" "fmt" - "go.uber.org/zap" - pb "github.com/cosmology-tech/starship/exposer/exposer" + "go.uber.org/zap" + "regexp" + "strings" ) // CreateChannel function runs the hermes command to create a channel between 2 given chains @@ -39,3 +40,102 @@ func (a *AppServer) CreateChannel(ctx context.Context, req *pb.RequestCreateChan return &pb.ResponseCreateChannel{Status: string(output)}, nil } + +func (a *AppServer) getClients(chainID string) ([]string, error) { + getCmd := fmt.Sprintf("hermes query clients --host-chain %s", chainID) + a.logger.Debug("running command:", zap.String("cmd", getCmd)) + + output, err := runCommand(getCmd) + if err != nil { + return nil, err + } + a.logger.Debug("output from get clients:", zap.ByteString("cmdOutput", output)) + + // Regular expression to match the client_id in the output + re := regexp.MustCompile(`client_id: ClientId\(\s*"(.*?)"\s*\)`) + matches := re.FindAllStringSubmatch(string(output), -1) + + var clients []string + for _, match := range matches { + if len(match) > 1 { + clients = append(clients, match[1]) + } + } + + return clients, nil +} + +// GetClients function runs the hermes command to get the clients of a given chain +func (a *AppServer) GetClients(ctx context.Context, req *pb.RequestGetClients) (*pb.ResponseGetClients, error) { + clients, err := a.getClients(req.ChainId) + if err != nil { + return nil, err + } + + // Check if clientIds are extracted correctly + a.logger.Debug("parsed client IDs:", zap.Strings("client_ids", clients)) + + // Return the parsed client IDs in a structured response + return &pb.ResponseGetClients{Clients: clients}, nil +} + +func (a *AppServer) updateClient(ctx context.Context, chainID, clientID string) (string, error) { + // note: for cli one time txn, use `config-cli.toml` file + updateCmd := fmt.Sprintf("hermes --config /root/.hermes/config-cli.toml update client --host-chain %s --client-id %s", chainID, clientID) + a.logger.Debug("running command:", zap.String("cmd", updateCmd)) + + output, err := runCommand(updateCmd) + if err != nil { + return "", err + } + // Check if clientIds are extracted correctly + a.logger.Info("output from update client:", + zap.String("chain", chainID), + zap.String("client", clientID), + zap.ByteString("cmdOutput", output)) + + return string(output), nil +} + +// UpdateClients function runs the herjson command to update a client of a given chain +func (a *AppServer) UpdateClients(ctx context.Context, req *pb.RequestUpdateClients) (*pb.ResponseUpdateClients, error) { + clients, err := a.getClients(req.ChainId) + if err != nil { + return nil, err + } + + for _, clientID := range clients { + _, err = a.updateClient(ctx, req.ChainId, clientID) + if err != nil { + return nil, err + } + } + + return &pb.ResponseUpdateClients{Status: "ok"}, nil +} + +// UpdateAllClients function runs the hermes command to update all clients of a given chain +func (a *AppServer) UpdateAllClients(ctx context.Context, req *pb.RequestUpdateAllClients) (*pb.ResponseUpdateAllClients, error) { + ok := a.mu.TryLock() + if !ok { + return nil, ErrResourceInUse + } + defer a.mu.Unlock() + + chainIDs := strings.Split(a.config.ChainIDs, ",") + for _, chainID := range chainIDs { + clients, err := a.getClients(chainID) + if err != nil { + return nil, err + } + + for _, client := range clients { + _, err = a.updateClient(ctx, chainID, client) + if err != nil { + return nil, err + } + } + } + + return &pb.ResponseUpdateAllClients{Status: "ok"}, nil +} diff --git a/starship/faucet/faucet/service.pb.go b/starship/faucet/faucet/service.pb.go index b73765faa..7a5321d46 100644 --- a/starship/faucet/faucet/service.pb.go +++ b/starship/faucet/faucet/service.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.1 // protoc (unknown) // source: faucet/service.proto @@ -34,11 +34,9 @@ type RequestCredit struct { func (x *RequestCredit) Reset() { *x = RequestCredit{} - if protoimpl.UnsafeEnabled { - mi := &file_faucet_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_faucet_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RequestCredit) String() string { @@ -49,7 +47,7 @@ func (*RequestCredit) ProtoMessage() {} func (x *RequestCredit) ProtoReflect() protoreflect.Message { mi := &file_faucet_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -88,11 +86,9 @@ type ResponseCredit struct { func (x *ResponseCredit) Reset() { *x = ResponseCredit{} - if protoimpl.UnsafeEnabled { - mi := &file_faucet_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_faucet_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResponseCredit) String() string { @@ -103,7 +99,7 @@ func (*ResponseCredit) ProtoMessage() {} func (x *ResponseCredit) ProtoReflect() protoreflect.Message { mi := &file_faucet_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -201,32 +197,6 @@ func file_faucet_service_proto_init() { return } file_faucet_status_proto_init() - if !protoimpl.UnsafeEnabled { - file_faucet_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*RequestCredit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_faucet_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ResponseCredit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/starship/faucet/faucet/service.pb.gw.go b/starship/faucet/faucet/service.pb.gw.go index 24c6f7efe..3ab348883 100644 --- a/starship/faucet/faucet/service.pb.gw.go +++ b/starship/faucet/faucet/service.pb.gw.go @@ -80,6 +80,7 @@ func local_request_Faucet_Credit_0(ctx context.Context, marshaler runtime.Marsha // UnaryRPC :call FaucetServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterFaucetHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterFaucetHandlerServer(ctx context.Context, mux *runtime.ServeMux, server FaucetServer) error { mux.Handle("GET", pattern_Faucet_Status_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -170,7 +171,7 @@ func RegisterFaucetHandler(ctx context.Context, mux *runtime.ServeMux, conn *grp // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "FaucetClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "FaucetClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "FaucetClient" to call the correct interceptors. +// "FaucetClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterFaucetHandlerClient(ctx context.Context, mux *runtime.ServeMux, client FaucetClient) error { mux.Handle("GET", pattern_Faucet_Status_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { diff --git a/starship/faucet/faucet/service_grpc.pb.go b/starship/faucet/faucet/service_grpc.pb.go index 160763394..315695448 100644 --- a/starship/faucet/faucet/service_grpc.pb.go +++ b/starship/faucet/faucet/service_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.4.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: faucet/service.proto @@ -16,8 +16,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.62.0 or later. -const _ = grpc.SupportPackageIsVersion8 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Faucet_Status_FullMethodName = "/faucet.Faucet/Status" @@ -66,7 +66,7 @@ func (c *faucetClient) Credit(ctx context.Context, in *RequestCredit, opts ...gr // FaucetServer is the server API for Faucet service. // All implementations must embed UnimplementedFaucetServer -// for forward compatibility +// for forward compatibility. // // Interface for service type FaucetServer interface { @@ -77,9 +77,12 @@ type FaucetServer interface { mustEmbedUnimplementedFaucetServer() } -// UnimplementedFaucetServer must be embedded to have forward compatible implementations. -type UnimplementedFaucetServer struct { -} +// UnimplementedFaucetServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedFaucetServer struct{} func (UnimplementedFaucetServer) Status(context.Context, *emptypb.Empty) (*State, error) { return nil, status.Errorf(codes.Unimplemented, "method Status not implemented") @@ -88,6 +91,7 @@ func (UnimplementedFaucetServer) Credit(context.Context, *RequestCredit) (*Respo return nil, status.Errorf(codes.Unimplemented, "method Credit not implemented") } func (UnimplementedFaucetServer) mustEmbedUnimplementedFaucetServer() {} +func (UnimplementedFaucetServer) testEmbeddedByValue() {} // UnsafeFaucetServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to FaucetServer will @@ -97,6 +101,13 @@ type UnsafeFaucetServer interface { } func RegisterFaucetServer(s grpc.ServiceRegistrar, srv FaucetServer) { + // If the following call pancis, it indicates UnimplementedFaucetServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&Faucet_ServiceDesc, srv) } diff --git a/starship/faucet/faucet/status.pb.go b/starship/faucet/faucet/status.pb.go index abb0d18b0..10f9ca950 100644 --- a/starship/faucet/faucet/status.pb.go +++ b/starship/faucet/faucet/status.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.1 // protoc (unknown) // source: faucet/status.proto @@ -32,11 +32,9 @@ type Coin struct { func (x *Coin) Reset() { *x = Coin{} - if protoimpl.UnsafeEnabled { - mi := &file_faucet_status_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_faucet_status_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Coin) String() string { @@ -47,7 +45,7 @@ func (*Coin) ProtoMessage() {} func (x *Coin) ProtoReflect() protoreflect.Message { mi := &file_faucet_status_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -87,11 +85,9 @@ type AddressBalance struct { func (x *AddressBalance) Reset() { *x = AddressBalance{} - if protoimpl.UnsafeEnabled { - mi := &file_faucet_status_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_faucet_status_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddressBalance) String() string { @@ -102,7 +98,7 @@ func (*AddressBalance) ProtoMessage() {} func (x *AddressBalance) ProtoReflect() protoreflect.Message { mi := &file_faucet_status_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -147,11 +143,9 @@ type State struct { func (x *State) Reset() { *x = State{} - if protoimpl.UnsafeEnabled { - mi := &file_faucet_status_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_faucet_status_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *State) String() string { @@ -162,7 +156,7 @@ func (*State) ProtoMessage() {} func (x *State) ProtoReflect() protoreflect.Message { mi := &file_faucet_status_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -304,44 +298,6 @@ func file_faucet_status_proto_init() { if File_faucet_status_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_faucet_status_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Coin); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_faucet_status_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AddressBalance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_faucet_status_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*State); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/starship/proto/exposer/service.proto b/starship/proto/exposer/service.proto index 55ba7e0f9..822ec32fb 100644 --- a/starship/proto/exposer/service.proto +++ b/starship/proto/exposer/service.proto @@ -47,6 +47,21 @@ service Exposer { rpc CreateChannel(RequestCreateChannel) returns (ResponseCreateChannel) { option (google.api.http) = { post: "/create_channel", body: "*" }; } + + // UpdateAllClients updates the clients of the chain + rpc UpdateAllClients(RequestUpdateAllClients) returns (ResponseUpdateAllClients) { + option (google.api.http) = { post: "/clients", body: "*" }; + } + + // GetClient updates the clients of the chain + rpc GetClients(RequestGetClients) returns (ResponseGetClients) { + option (google.api.http) = { get: "/clients/{chain_id}" }; + } + + // UpdateClient update the clients of the chain + rpc UpdateClients(RequestUpdateClients) returns (ResponseUpdateClients) { + option (google.api.http) = { post: "/clients/{chain_id}", body: "*" }; + } } message ResponseNodeID { @@ -77,3 +92,25 @@ message RequestCreateChannel { message ResponseCreateChannel { string status = 1; } + +message RequestGetClients { + string chain_id = 1 [ json_name = "chain_id" ]; +} + +message ResponseGetClients { + repeated string clients = 1; +} + +message RequestUpdateClients { + string chain_id = 1 [ json_name = "chain_id" ]; +} + +message ResponseUpdateClients { + string status = 1; +} + +message RequestUpdateAllClients {} + +message ResponseUpdateAllClients { + string status = 1; +} diff --git a/starship/registry/registry/chain.pb.go b/starship/registry/registry/chain.pb.go index bb666f3bd..cc3c6970e 100644 --- a/starship/registry/registry/chain.pb.go +++ b/starship/registry/registry/chain.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.1 // protoc (unknown) // source: registry/chain.proto @@ -35,11 +35,9 @@ type FeeTokens struct { func (x *FeeTokens) Reset() { *x = FeeTokens{} - if protoimpl.UnsafeEnabled { - mi := &file_registry_chain_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_registry_chain_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeeTokens) String() string { @@ -50,7 +48,7 @@ func (*FeeTokens) ProtoMessage() {} func (x *FeeTokens) ProtoReflect() protoreflect.Message { mi := &file_registry_chain_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -110,11 +108,9 @@ type Fees struct { func (x *Fees) Reset() { *x = Fees{} - if protoimpl.UnsafeEnabled { - mi := &file_registry_chain_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_registry_chain_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Fees) String() string { @@ -125,7 +121,7 @@ func (*Fees) ProtoMessage() {} func (x *Fees) ProtoReflect() protoreflect.Message { mi := &file_registry_chain_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -157,11 +153,9 @@ type StakingTokens struct { func (x *StakingTokens) Reset() { *x = StakingTokens{} - if protoimpl.UnsafeEnabled { - mi := &file_registry_chain_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_registry_chain_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StakingTokens) String() string { @@ -172,7 +166,7 @@ func (*StakingTokens) ProtoMessage() {} func (x *StakingTokens) ProtoReflect() protoreflect.Message { mi := &file_registry_chain_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -208,11 +202,9 @@ type LockDuration struct { func (x *LockDuration) Reset() { *x = LockDuration{} - if protoimpl.UnsafeEnabled { - mi := &file_registry_chain_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_registry_chain_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LockDuration) String() string { @@ -223,7 +215,7 @@ func (*LockDuration) ProtoMessage() {} func (x *LockDuration) ProtoReflect() protoreflect.Message { mi := &file_registry_chain_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -286,11 +278,9 @@ type Staking struct { func (x *Staking) Reset() { *x = Staking{} - if protoimpl.UnsafeEnabled { - mi := &file_registry_chain_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_registry_chain_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Staking) String() string { @@ -301,7 +291,7 @@ func (*Staking) ProtoMessage() {} func (x *Staking) ProtoReflect() protoreflect.Message { mi := &file_registry_chain_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -342,11 +332,9 @@ type Genesis struct { func (x *Genesis) Reset() { *x = Genesis{} - if protoimpl.UnsafeEnabled { - mi := &file_registry_chain_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_registry_chain_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Genesis) String() string { @@ -357,7 +345,7 @@ func (*Genesis) ProtoMessage() {} func (x *Genesis) ProtoReflect() protoreflect.Message { mi := &file_registry_chain_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -419,11 +407,9 @@ type Versions struct { func (x *Versions) Reset() { *x = Versions{} - if protoimpl.UnsafeEnabled { - mi := &file_registry_chain_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_registry_chain_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Versions) String() string { @@ -434,7 +420,7 @@ func (*Versions) ProtoMessage() {} func (x *Versions) ProtoReflect() protoreflect.Message { mi := &file_registry_chain_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -590,11 +576,9 @@ type Codebase struct { func (x *Codebase) Reset() { *x = Codebase{} - if protoimpl.UnsafeEnabled { - mi := &file_registry_chain_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_registry_chain_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Codebase) String() string { @@ -605,7 +589,7 @@ func (*Codebase) ProtoMessage() {} func (x *Codebase) ProtoReflect() protoreflect.Message { mi := &file_registry_chain_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -722,11 +706,9 @@ type LogoURIs struct { func (x *LogoURIs) Reset() { *x = LogoURIs{} - if protoimpl.UnsafeEnabled { - mi := &file_registry_chain_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_registry_chain_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogoURIs) String() string { @@ -737,7 +719,7 @@ func (*LogoURIs) ProtoMessage() {} func (x *LogoURIs) ProtoReflect() protoreflect.Message { mi := &file_registry_chain_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -777,11 +759,9 @@ type Image struct { func (x *Image) Reset() { *x = Image{} - if protoimpl.UnsafeEnabled { - mi := &file_registry_chain_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_registry_chain_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Image) String() string { @@ -792,7 +772,7 @@ func (*Image) ProtoMessage() {} func (x *Image) ProtoReflect() protoreflect.Message { mi := &file_registry_chain_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -833,11 +813,9 @@ type Peer struct { func (x *Peer) Reset() { *x = Peer{} - if protoimpl.UnsafeEnabled { - mi := &file_registry_chain_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_registry_chain_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Peer) String() string { @@ -848,7 +826,7 @@ func (*Peer) ProtoMessage() {} func (x *Peer) ProtoReflect() protoreflect.Message { mi := &file_registry_chain_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -895,11 +873,9 @@ type Peers struct { func (x *Peers) Reset() { *x = Peers{} - if protoimpl.UnsafeEnabled { - mi := &file_registry_chain_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_registry_chain_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Peers) String() string { @@ -910,7 +886,7 @@ func (*Peers) ProtoMessage() {} func (x *Peers) ProtoReflect() protoreflect.Message { mi := &file_registry_chain_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -954,11 +930,9 @@ type APIs struct { func (x *APIs) Reset() { *x = APIs{} - if protoimpl.UnsafeEnabled { - mi := &file_registry_chain_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_registry_chain_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *APIs) String() string { @@ -969,7 +943,7 @@ func (*APIs) ProtoMessage() {} func (x *APIs) ProtoReflect() protoreflect.Message { mi := &file_registry_chain_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1042,11 +1016,9 @@ type Explorer struct { func (x *Explorer) Reset() { *x = Explorer{} - if protoimpl.UnsafeEnabled { - mi := &file_registry_chain_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_registry_chain_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Explorer) String() string { @@ -1057,7 +1029,7 @@ func (*Explorer) ProtoMessage() {} func (x *Explorer) ProtoReflect() protoreflect.Message { mi := &file_registry_chain_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1156,11 +1128,9 @@ type ChainRegistry struct { func (x *ChainRegistry) Reset() { *x = ChainRegistry{} - if protoimpl.UnsafeEnabled { - mi := &file_registry_chain_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_registry_chain_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ChainRegistry) String() string { @@ -1171,7 +1141,7 @@ func (*ChainRegistry) ProtoMessage() {} func (x *ChainRegistry) ProtoReflect() protoreflect.Message { mi := &file_registry_chain_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1381,11 +1351,9 @@ type DenomUnit struct { func (x *DenomUnit) Reset() { *x = DenomUnit{} - if protoimpl.UnsafeEnabled { - mi := &file_registry_chain_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_registry_chain_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DenomUnit) String() string { @@ -1396,7 +1364,7 @@ func (*DenomUnit) ProtoMessage() {} func (x *DenomUnit) ProtoReflect() protoreflect.Message { mi := &file_registry_chain_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1450,11 +1418,9 @@ type ChainAsset struct { func (x *ChainAsset) Reset() { *x = ChainAsset{} - if protoimpl.UnsafeEnabled { - mi := &file_registry_chain_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_registry_chain_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ChainAsset) String() string { @@ -1465,7 +1431,7 @@ func (*ChainAsset) ProtoMessage() {} func (x *ChainAsset) ProtoReflect() protoreflect.Message { mi := &file_registry_chain_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1554,11 +1520,9 @@ type AssetList struct { func (x *AssetList) Reset() { *x = AssetList{} - if protoimpl.UnsafeEnabled { - mi := &file_registry_chain_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_registry_chain_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AssetList) String() string { @@ -1569,7 +1533,7 @@ func (*AssetList) ProtoMessage() {} func (x *AssetList) ProtoReflect() protoreflect.Message { mi := &file_registry_chain_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1609,11 +1573,9 @@ type Versions_Consensus struct { func (x *Versions_Consensus) Reset() { *x = Versions_Consensus{} - if protoimpl.UnsafeEnabled { - mi := &file_registry_chain_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_registry_chain_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Versions_Consensus) String() string { @@ -1624,7 +1586,7 @@ func (*Versions_Consensus) ProtoMessage() {} func (x *Versions_Consensus) ProtoReflect() protoreflect.Message { mi := &file_registry_chain_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1668,11 +1630,9 @@ type Versions_Binaries struct { func (x *Versions_Binaries) Reset() { *x = Versions_Binaries{} - if protoimpl.UnsafeEnabled { - mi := &file_registry_chain_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_registry_chain_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Versions_Binaries) String() string { @@ -1683,7 +1643,7 @@ func (*Versions_Binaries) ProtoMessage() {} func (x *Versions_Binaries) ProtoReflect() protoreflect.Message { mi := &file_registry_chain_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1751,11 +1711,9 @@ type Codebase_Consensus struct { func (x *Codebase_Consensus) Reset() { *x = Codebase_Consensus{} - if protoimpl.UnsafeEnabled { - mi := &file_registry_chain_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_registry_chain_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Codebase_Consensus) String() string { @@ -1766,7 +1724,7 @@ func (*Codebase_Consensus) ProtoMessage() {} func (x *Codebase_Consensus) ProtoReflect() protoreflect.Message { mi := &file_registry_chain_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1807,11 +1765,9 @@ type APIs_API struct { func (x *APIs_API) Reset() { *x = APIs_API{} - if protoimpl.UnsafeEnabled { - mi := &file_registry_chain_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_registry_chain_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *APIs_API) String() string { @@ -1822,7 +1778,7 @@ func (*APIs_API) ProtoMessage() {} func (x *APIs_API) ProtoReflect() protoreflect.Message { mi := &file_registry_chain_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1873,11 +1829,9 @@ type ChainRegistry_Bech32Config struct { func (x *ChainRegistry_Bech32Config) Reset() { *x = ChainRegistry_Bech32Config{} - if protoimpl.UnsafeEnabled { - mi := &file_registry_chain_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_registry_chain_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ChainRegistry_Bech32Config) String() string { @@ -1888,7 +1842,7 @@ func (*ChainRegistry_Bech32Config) ProtoMessage() {} func (x *ChainRegistry_Bech32Config) ProtoReflect() protoreflect.Message { mi := &file_registry_chain_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2441,284 +2395,6 @@ func file_registry_chain_proto_init() { if File_registry_chain_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_registry_chain_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*FeeTokens); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_registry_chain_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Fees); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_registry_chain_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*StakingTokens); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_registry_chain_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*LockDuration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_registry_chain_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Staking); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_registry_chain_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Genesis); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_registry_chain_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Versions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_registry_chain_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Codebase); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_registry_chain_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*LogoURIs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_registry_chain_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Image); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_registry_chain_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*Peer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_registry_chain_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*Peers); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_registry_chain_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*APIs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_registry_chain_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Explorer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_registry_chain_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ChainRegistry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_registry_chain_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*DenomUnit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_registry_chain_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ChainAsset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_registry_chain_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*AssetList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_registry_chain_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*Versions_Consensus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_registry_chain_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*Versions_Binaries); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_registry_chain_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*Codebase_Consensus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_registry_chain_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*APIs_API); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_registry_chain_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*ChainRegistry_Bech32Config); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_registry_chain_proto_msgTypes[3].OneofWrappers = []any{ (*LockDuration_Blocks)(nil), (*LockDuration_Time)(nil), diff --git a/starship/registry/registry/ibc.pb.go b/starship/registry/registry/ibc.pb.go index 833762323..65be1adbf 100644 --- a/starship/registry/registry/ibc.pb.go +++ b/starship/registry/registry/ibc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.1 // protoc (unknown) // source: registry/ibc.proto @@ -33,11 +33,9 @@ type IBCChain struct { func (x *IBCChain) Reset() { *x = IBCChain{} - if protoimpl.UnsafeEnabled { - mi := &file_registry_ibc_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_registry_ibc_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IBCChain) String() string { @@ -48,7 +46,7 @@ func (*IBCChain) ProtoMessage() {} func (x *IBCChain) ProtoReflect() protoreflect.Message { mi := &file_registry_ibc_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -98,11 +96,9 @@ type ChannelData struct { func (x *ChannelData) Reset() { *x = ChannelData{} - if protoimpl.UnsafeEnabled { - mi := &file_registry_ibc_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_registry_ibc_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ChannelData) String() string { @@ -113,7 +109,7 @@ func (*ChannelData) ProtoMessage() {} func (x *ChannelData) ProtoReflect() protoreflect.Message { mi := &file_registry_ibc_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -176,11 +172,9 @@ type IBCData struct { func (x *IBCData) Reset() { *x = IBCData{} - if protoimpl.UnsafeEnabled { - mi := &file_registry_ibc_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_registry_ibc_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IBCData) String() string { @@ -191,7 +185,7 @@ func (*IBCData) ProtoMessage() {} func (x *IBCData) ProtoReflect() protoreflect.Message { mi := &file_registry_ibc_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -245,11 +239,9 @@ type ChannelData_ChannelPort struct { func (x *ChannelData_ChannelPort) Reset() { *x = ChannelData_ChannelPort{} - if protoimpl.UnsafeEnabled { - mi := &file_registry_ibc_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_registry_ibc_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ChannelData_ChannelPort) String() string { @@ -260,7 +252,7 @@ func (*ChannelData_ChannelPort) ProtoMessage() {} func (x *ChannelData_ChannelPort) ProtoReflect() protoreflect.Message { mi := &file_registry_ibc_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -301,11 +293,9 @@ type ChannelData_Tags struct { func (x *ChannelData_Tags) Reset() { *x = ChannelData_Tags{} - if protoimpl.UnsafeEnabled { - mi := &file_registry_ibc_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_registry_ibc_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ChannelData_Tags) String() string { @@ -316,7 +306,7 @@ func (*ChannelData_Tags) ProtoMessage() {} func (x *ChannelData_Tags) ProtoReflect() protoreflect.Message { mi := &file_registry_ibc_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -452,68 +442,6 @@ func file_registry_ibc_proto_init() { if File_registry_ibc_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_registry_ibc_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*IBCChain); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_registry_ibc_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ChannelData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_registry_ibc_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*IBCData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_registry_ibc_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ChannelData_ChannelPort); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_registry_ibc_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ChannelData_Tags); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/starship/registry/registry/mnemonic.pb.go b/starship/registry/registry/mnemonic.pb.go index 980b1c90c..65d9694d5 100644 --- a/starship/registry/registry/mnemonic.pb.go +++ b/starship/registry/registry/mnemonic.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.1 // protoc (unknown) // source: registry/mnemonic.proto @@ -32,11 +32,9 @@ type Mnemonic struct { func (x *Mnemonic) Reset() { *x = Mnemonic{} - if protoimpl.UnsafeEnabled { - mi := &file_registry_mnemonic_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_registry_mnemonic_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Mnemonic) String() string { @@ -47,7 +45,7 @@ func (*Mnemonic) ProtoMessage() {} func (x *Mnemonic) ProtoReflect() protoreflect.Message { mi := &file_registry_mnemonic_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -98,11 +96,9 @@ type Keys struct { func (x *Keys) Reset() { *x = Keys{} - if protoimpl.UnsafeEnabled { - mi := &file_registry_mnemonic_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_registry_mnemonic_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Keys) String() string { @@ -113,7 +109,7 @@ func (*Keys) ProtoMessage() {} func (x *Keys) ProtoReflect() protoreflect.Message { mi := &file_registry_mnemonic_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -181,11 +177,9 @@ type TypeKey struct { func (x *TypeKey) Reset() { *x = TypeKey{} - if protoimpl.UnsafeEnabled { - mi := &file_registry_mnemonic_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_registry_mnemonic_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TypeKey) String() string { @@ -196,7 +190,7 @@ func (*TypeKey) ProtoMessage() {} func (x *TypeKey) ProtoReflect() protoreflect.Message { mi := &file_registry_mnemonic_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -237,11 +231,9 @@ type PrivValidatorKey struct { func (x *PrivValidatorKey) Reset() { *x = PrivValidatorKey{} - if protoimpl.UnsafeEnabled { - mi := &file_registry_mnemonic_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_registry_mnemonic_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrivValidatorKey) String() string { @@ -252,7 +244,7 @@ func (*PrivValidatorKey) ProtoMessage() {} func (x *PrivValidatorKey) ProtoReflect() protoreflect.Message { mi := &file_registry_mnemonic_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -380,56 +372,6 @@ func file_registry_mnemonic_proto_init() { if File_registry_mnemonic_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_registry_mnemonic_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Mnemonic); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_registry_mnemonic_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Keys); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_registry_mnemonic_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*TypeKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_registry_mnemonic_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*PrivValidatorKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/starship/registry/registry/service.pb.go b/starship/registry/registry/service.pb.go index ff4621912..f0638cac3 100644 --- a/starship/registry/registry/service.pb.go +++ b/starship/registry/registry/service.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.1 // protoc (unknown) // source: registry/service.proto @@ -33,11 +33,9 @@ type ResponseChains struct { func (x *ResponseChains) Reset() { *x = ResponseChains{} - if protoimpl.UnsafeEnabled { - mi := &file_registry_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_registry_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResponseChains) String() string { @@ -48,7 +46,7 @@ func (*ResponseChains) ProtoMessage() {} func (x *ResponseChains) ProtoReflect() protoreflect.Message { mi := &file_registry_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -80,11 +78,9 @@ type ResponseChainIDs struct { func (x *ResponseChainIDs) Reset() { *x = ResponseChainIDs{} - if protoimpl.UnsafeEnabled { - mi := &file_registry_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_registry_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResponseChainIDs) String() string { @@ -95,7 +91,7 @@ func (*ResponseChainIDs) ProtoMessage() {} func (x *ResponseChainIDs) ProtoReflect() protoreflect.Message { mi := &file_registry_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -127,11 +123,9 @@ type RequestChain struct { func (x *RequestChain) Reset() { *x = RequestChain{} - if protoimpl.UnsafeEnabled { - mi := &file_registry_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_registry_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RequestChain) String() string { @@ -142,7 +136,7 @@ func (*RequestChain) ProtoMessage() {} func (x *RequestChain) ProtoReflect() protoreflect.Message { mi := &file_registry_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -176,11 +170,9 @@ type ResponseChainAssets struct { func (x *ResponseChainAssets) Reset() { *x = ResponseChainAssets{} - if protoimpl.UnsafeEnabled { - mi := &file_registry_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_registry_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResponseChainAssets) String() string { @@ -191,7 +183,7 @@ func (*ResponseChainAssets) ProtoMessage() {} func (x *ResponseChainAssets) ProtoReflect() protoreflect.Message { mi := &file_registry_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -237,11 +229,9 @@ type ResponseListIBC struct { func (x *ResponseListIBC) Reset() { *x = ResponseListIBC{} - if protoimpl.UnsafeEnabled { - mi := &file_registry_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_registry_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResponseListIBC) String() string { @@ -252,7 +242,7 @@ func (*ResponseListIBC) ProtoMessage() {} func (x *ResponseListIBC) ProtoReflect() protoreflect.Message { mi := &file_registry_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -285,11 +275,9 @@ type RequestIBCInfo struct { func (x *RequestIBCInfo) Reset() { *x = RequestIBCInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_registry_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_registry_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RequestIBCInfo) String() string { @@ -300,7 +288,7 @@ func (*RequestIBCInfo) ProtoMessage() {} func (x *RequestIBCInfo) ProtoReflect() protoreflect.Message { mi := &file_registry_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -504,80 +492,6 @@ func file_registry_service_proto_init() { file_registry_chain_proto_init() file_registry_ibc_proto_init() file_registry_mnemonic_proto_init() - if !protoimpl.UnsafeEnabled { - file_registry_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ResponseChains); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_registry_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ResponseChainIDs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_registry_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*RequestChain); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_registry_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ResponseChainAssets); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_registry_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ResponseListIBC); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_registry_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*RequestIBCInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/starship/registry/registry/service.pb.gw.go b/starship/registry/registry/service.pb.gw.go index 5f76eaefd..3b93df867 100644 --- a/starship/registry/registry/service.pb.gw.go +++ b/starship/registry/registry/service.pb.gw.go @@ -474,6 +474,7 @@ func local_request_Registry_GetIBCInfo_0(ctx context.Context, marshaler runtime. // UnaryRPC :call RegistryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterRegistryHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterRegistryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RegistryServer) error { mux.Handle("GET", pattern_Registry_ListChainIDs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -764,7 +765,7 @@ func RegisterRegistryHandler(ctx context.Context, mux *runtime.ServeMux, conn *g // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "RegistryClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "RegistryClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "RegistryClient" to call the correct interceptors. +// "RegistryClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterRegistryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RegistryClient) error { mux.Handle("GET", pattern_Registry_ListChainIDs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { diff --git a/starship/registry/registry/service_grpc.pb.go b/starship/registry/registry/service_grpc.pb.go index 71cadc7f2..c76337592 100644 --- a/starship/registry/registry/service_grpc.pb.go +++ b/starship/registry/registry/service_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.4.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: registry/service.proto @@ -16,8 +16,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.62.0 or later. -const _ = grpc.SupportPackageIsVersion8 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Registry_ListChainIDs_FullMethodName = "/registry.Registry/ListChainIDs" @@ -168,7 +168,7 @@ func (c *registryClient) GetIBCInfo(ctx context.Context, in *RequestIBCInfo, opt // RegistryServer is the server API for Registry service. // All implementations must embed UnimplementedRegistryServer -// for forward compatibility +// for forward compatibility. // // Interface for service type RegistryServer interface { @@ -193,9 +193,12 @@ type RegistryServer interface { mustEmbedUnimplementedRegistryServer() } -// UnimplementedRegistryServer must be embedded to have forward compatible implementations. -type UnimplementedRegistryServer struct { -} +// UnimplementedRegistryServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedRegistryServer struct{} func (UnimplementedRegistryServer) ListChainIDs(context.Context, *emptypb.Empty) (*ResponseChainIDs, error) { return nil, status.Errorf(codes.Unimplemented, "method ListChainIDs not implemented") @@ -228,6 +231,7 @@ func (UnimplementedRegistryServer) GetIBCInfo(context.Context, *RequestIBCInfo) return nil, status.Errorf(codes.Unimplemented, "method GetIBCInfo not implemented") } func (UnimplementedRegistryServer) mustEmbedUnimplementedRegistryServer() {} +func (UnimplementedRegistryServer) testEmbeddedByValue() {} // UnsafeRegistryServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to RegistryServer will @@ -237,6 +241,13 @@ type UnsafeRegistryServer interface { } func RegisterRegistryServer(s grpc.ServiceRegistrar, srv RegistryServer) { + // If the following call pancis, it indicates UnimplementedRegistryServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&Registry_ServiceDesc, srv) } diff --git a/starship/tests/e2e/configs/three-chain.yaml b/starship/tests/e2e/configs/three-chain.yaml index 0778907e0..c9a26345a 100644 --- a/starship/tests/e2e/configs/three-chain.yaml +++ b/starship/tests/e2e/configs/three-chain.yaml @@ -58,3 +58,6 @@ registry: ports: rest: 8081 grpc: 9091 + +exposer: + image: anmol1696/exposer:20241029-640808d From 2dcaa2247de6221e9147a51bf501229c663562ba Mon Sep 17 00:00:00 2001 From: Anmol1696 Date: Tue, 29 Oct 2024 15:57:14 +0400 Subject: [PATCH 2/5] fix regex for fetching client --- starship/exposer/handler_relayer.go | 2 +- starship/tests/e2e/configs/three-chain.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/starship/exposer/handler_relayer.go b/starship/exposer/handler_relayer.go index 48133c587..6478dc84c 100644 --- a/starship/exposer/handler_relayer.go +++ b/starship/exposer/handler_relayer.go @@ -52,7 +52,7 @@ func (a *AppServer) getClients(chainID string) ([]string, error) { a.logger.Debug("output from get clients:", zap.ByteString("cmdOutput", output)) // Regular expression to match the client_id in the output - re := regexp.MustCompile(`client_id: ClientId\(\s*"(.*?)"\s*\)`) + re := regexp.MustCompile(`client_id:\s*ClientId\(\s*"([^"]+)"\s*\)`) matches := re.FindAllStringSubmatch(string(output), -1) var clients []string diff --git a/starship/tests/e2e/configs/three-chain.yaml b/starship/tests/e2e/configs/three-chain.yaml index c9a26345a..3ee15b8d8 100644 --- a/starship/tests/e2e/configs/three-chain.yaml +++ b/starship/tests/e2e/configs/three-chain.yaml @@ -60,4 +60,4 @@ registry: grpc: 9091 exposer: - image: anmol1696/exposer:20241029-640808d + image: anmol1696/exposer:20241029-793fcee From 46dcda9aef49f711d8c119354f19e64e40814fc1 Mon Sep 17 00:00:00 2001 From: Anmol1696 Date: Tue, 29 Oct 2024 16:10:12 +0400 Subject: [PATCH 3/5] update regex yet again --- starship/exposer/handler_relayer.go | 2 +- starship/tests/e2e/configs/three-chain.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/starship/exposer/handler_relayer.go b/starship/exposer/handler_relayer.go index 6478dc84c..455d1338a 100644 --- a/starship/exposer/handler_relayer.go +++ b/starship/exposer/handler_relayer.go @@ -52,7 +52,7 @@ func (a *AppServer) getClients(chainID string) ([]string, error) { a.logger.Debug("output from get clients:", zap.ByteString("cmdOutput", output)) // Regular expression to match the client_id in the output - re := regexp.MustCompile(`client_id:\s*ClientId\(\s*"([^"]+)"\s*\)`) + re := regexp.MustCompile(`(?m)^\s*client_id:\s*ClientId\(\s*"([^"]+)"`) matches := re.FindAllStringSubmatch(string(output), -1) var clients []string diff --git a/starship/tests/e2e/configs/three-chain.yaml b/starship/tests/e2e/configs/three-chain.yaml index 3ee15b8d8..42f239f11 100644 --- a/starship/tests/e2e/configs/three-chain.yaml +++ b/starship/tests/e2e/configs/three-chain.yaml @@ -60,4 +60,4 @@ registry: grpc: 9091 exposer: - image: anmol1696/exposer:20241029-793fcee + image: anmol1696/exposer:20241029-2dcaa22 From 611cbaf64381b7befd2d66b6e0ee9a90b3a311c7 Mon Sep 17 00:00:00 2001 From: Anmol1696 Date: Tue, 29 Oct 2024 16:23:33 +0400 Subject: [PATCH 4/5] fix updateClient command --- starship/exposer/handler_relayer.go | 2 +- starship/tests/e2e/configs/three-chain.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/starship/exposer/handler_relayer.go b/starship/exposer/handler_relayer.go index 455d1338a..d8dbb3daa 100644 --- a/starship/exposer/handler_relayer.go +++ b/starship/exposer/handler_relayer.go @@ -81,7 +81,7 @@ func (a *AppServer) GetClients(ctx context.Context, req *pb.RequestGetClients) ( func (a *AppServer) updateClient(ctx context.Context, chainID, clientID string) (string, error) { // note: for cli one time txn, use `config-cli.toml` file - updateCmd := fmt.Sprintf("hermes --config /root/.hermes/config-cli.toml update client --host-chain %s --client-id %s", chainID, clientID) + updateCmd := fmt.Sprintf("hermes --config /root/.hermes/config-cli.toml update client --host-chain %s --client %s", chainID, clientID) a.logger.Debug("running command:", zap.String("cmd", updateCmd)) output, err := runCommand(updateCmd) diff --git a/starship/tests/e2e/configs/three-chain.yaml b/starship/tests/e2e/configs/three-chain.yaml index 42f239f11..d4cd38972 100644 --- a/starship/tests/e2e/configs/three-chain.yaml +++ b/starship/tests/e2e/configs/three-chain.yaml @@ -60,4 +60,4 @@ registry: grpc: 9091 exposer: - image: anmol1696/exposer:20241029-2dcaa22 + image: anmol1696/exposer:20241029-46dcda9 From 8780325bae2671c663014f5e8d3616b9a89c6e4c Mon Sep 17 00:00:00 2001 From: Anmol1696 Date: Wed, 30 Oct 2024 20:22:38 +0400 Subject: [PATCH 5/5] update defaults --- starship/charts/devnet/scripts/default/update-genesis.sh | 2 +- .../devnet/templates/relayers/go-relayer/configmap.yaml | 2 +- .../charts/devnet/templates/relayers/hermes/configmap.yaml | 4 ++-- starship/tests/e2e/configs/three-chain.yaml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/starship/charts/devnet/scripts/default/update-genesis.sh b/starship/charts/devnet/scripts/default/update-genesis.sh index 1bdd24676..692abb1bf 100644 --- a/starship/charts/devnet/scripts/default/update-genesis.sh +++ b/starship/charts/devnet/scripts/default/update-genesis.sh @@ -16,7 +16,7 @@ echo "Update max gas param" jq -r '.consensus_params.block.max_gas |= "100000000000"' $CHAIN_DIR/config/genesis.json > /tmp/genesis.json; mv /tmp/genesis.json $CHAIN_DIR/config/genesis.json echo "Update staking unbonding time and slashing jail time" -jq -r '.app_state.staking.params.unbonding_time |= "300s"' $CHAIN_DIR/config/genesis.json > /tmp/genesis.json; mv /tmp/genesis.json $CHAIN_DIR/config/genesis.json +jq -r '.app_state.staking.params.unbonding_time |= "800s"' $CHAIN_DIR/config/genesis.json > /tmp/genesis.json; mv /tmp/genesis.json $CHAIN_DIR/config/genesis.json jq -r '.app_state.slashing.params.downtime_jail_duration |= "60s"' $CHAIN_DIR/config/genesis.json > /tmp/genesis.json; mv /tmp/genesis.json $CHAIN_DIR/config/genesis.json # overrides for older sdk versions, before 0.47 diff --git a/starship/charts/devnet/templates/relayers/go-relayer/configmap.yaml b/starship/charts/devnet/templates/relayers/go-relayer/configmap.yaml index 1bf6fef24..ba8e57f79 100644 --- a/starship/charts/devnet/templates/relayers/go-relayer/configmap.yaml +++ b/starship/charts/devnet/templates/relayers/go-relayer/configmap.yaml @@ -36,7 +36,7 @@ data: "gas-prices": "0.025{{ $fullchain.denom }}", "min-gas-amount": 1, "debug": true, - "timeout": "20s", + "timeout": "600s", "output-format": "json", "sign-mode": "direct" } diff --git a/starship/charts/devnet/templates/relayers/hermes/configmap.yaml b/starship/charts/devnet/templates/relayers/hermes/configmap.yaml index f33451b64..756a8e5ef 100644 --- a/starship/charts/devnet/templates/relayers/hermes/configmap.yaml +++ b/starship/charts/devnet/templates/relayers/hermes/configmap.yaml @@ -124,7 +124,7 @@ data: max_tx_size = {{ $chainConfig.max_tx_size | default 2097152 }} clock_drift = "{{ $chainConfig.clock_drift | default "5s" }}" max_block_time = "{{ $chainConfig.max_block_time | default "30s" }}" - trusting_period = "{{ $chainConfig.trusting_period | default "75s" }}" + trusting_period = "{{ $chainConfig.trusting_period | default "600s" }}" trust_threshold = { numerator = "{{ ($chainConfig.trust_threshold | default dict).numerator | default "2" }}", denominator = "{{ ($chainConfig.trust_threshold | default dict).denominator | default "3" }}" } {{- if eq $fullchain.name "evmos" }} address_type = { derivation = 'ethermint', proto_type = { pk_type = '/ethermint.crypto.v1.ethsecp256k1.PubKey' } } @@ -253,7 +253,7 @@ data: max_tx_size = {{ $chainConfig.max_tx_size | default 2097152 }} clock_drift = "{{ $chainConfig.clock_drift | default "5s" }}" max_block_time = "{{ $chainConfig.max_block_time | default "30s" }}" - trusting_period = "{{ $chainConfig.trusting_period | default "75s" }}" + trusting_period = "{{ $chainConfig.trusting_period | default "600s" }}" trust_threshold = { numerator = "{{ ($chainConfig.trust_threshold | default dict).numerator | default "2" }}", denominator = "{{ ($chainConfig.trust_threshold | default dict).denominator | default "3" }}" } {{- if eq $fullchain.name "evmos" }} address_type = { derivation = 'ethermint', proto_type = { pk_type = '/ethermint.crypto.v1.ethsecp256k1.PubKey' } } diff --git a/starship/tests/e2e/configs/three-chain.yaml b/starship/tests/e2e/configs/three-chain.yaml index d4cd38972..4e52a0b43 100644 --- a/starship/tests/e2e/configs/three-chain.yaml +++ b/starship/tests/e2e/configs/three-chain.yaml @@ -60,4 +60,4 @@ registry: grpc: 9091 exposer: - image: anmol1696/exposer:20241029-46dcda9 + image: anmol1696/exposer:20241029-611cbaf