diff --git a/docs/openapi/openapi.swagger.yaml b/docs/openapi/openapi.swagger.yaml index c99139f2c9..9fe28a6926 100644 --- a/docs/openapi/openapi.swagger.yaml +++ b/docs/openapi/openapi.swagger.yaml @@ -27520,6 +27520,30 @@ paths: $ref: '#/definitions/googlerpcStatus' tags: - Query + /zeta-chain/observer/has_voted/{ballot_identifier}/{voter_address}: + get: + summary: Query if a voter has voted for a ballot + operationId: Query_HasVoted + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/observerQueryHasVotedResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: ballot_identifier + in: path + required: true + type: string + - name: voter_address + in: path + required: true + type: string + tags: + - Query /zeta-chain/observer/keygen: get: summary: Queries a keygen by index. @@ -51296,6 +51320,11 @@ definitions: properties: node_account: $ref: '#/definitions/observerNodeAccount' + observerQueryHasVotedResponse: + type: object + properties: + has_voted: + type: boolean observerQueryObserversByChainResponse: type: object properties: diff --git a/proto/observer/query.proto b/proto/observer/query.proto index 2f4b26a8f7..236fd1676b 100644 --- a/proto/observer/query.proto +++ b/proto/observer/query.proto @@ -21,6 +21,10 @@ service Query { rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { option (google.api.http).get = "/zeta-chain/observer/params"; } + // Query if a voter has voted for a ballot + rpc HasVoted(QueryHasVotedRequest) returns (QueryHasVotedResponse) { + option (google.api.http).get = "/zeta-chain/observer/has_voted/{ballot_identifier}/{voter_address}"; + } // Queries a list of VoterByIdentifier items. rpc BallotByIdentifier(QueryBallotByIdentifierRequest) returns (QueryBallotByIdentifierResponse) { option (google.api.http).get = "/zeta-chain/observer/ballot_by_identifier/{ballot_identifier}"; @@ -119,6 +123,15 @@ message QueryParamsResponse { Params params = 1 [(gogoproto.nullable) = false]; } +message QueryHasVotedRequest { + string ballot_identifier = 1; + string voter_address = 2; +} + +message QueryHasVotedResponse { + bool has_voted = 1; +} + message QueryBallotByIdentifierRequest { string ballot_identifier = 1; } diff --git a/x/observer/keeper/ballot.go b/x/observer/keeper/ballot.go index 4dbeb277c5..ac9b6ac3f3 100644 --- a/x/observer/keeper/ballot.go +++ b/x/observer/keeper/ballot.go @@ -77,6 +77,24 @@ func (k Keeper) GetMaturedBallotList(ctx sdk.Context) []string { // Queries +func (k Keeper) HasVoted(goCtx context.Context, req *types.QueryHasVotedRequest) (*types.QueryHasVotedResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + ctx := sdk.UnwrapSDKContext(goCtx) + ballot, found := k.GetBallot(ctx, req.BallotIdentifier) + if !found { + return &types.QueryHasVotedResponse{ + HasVoted: false, + }, nil + } + hasVoted := ballot.HasVoted(req.VoterAddress) + + return &types.QueryHasVotedResponse{ + HasVoted: hasVoted, + }, nil +} + func (k Keeper) BallotByIdentifier(goCtx context.Context, req *types.QueryBallotByIdentifierRequest) (*types.QueryBallotByIdentifierResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") diff --git a/x/observer/types/query.pb.go b/x/observer/types/query.pb.go index cb9c9a1953..5504b9d1ea 100644 --- a/x/observer/types/query.pb.go +++ b/x/observer/types/query.pb.go @@ -234,6 +234,102 @@ func (m *QueryParamsResponse) GetParams() Params { return Params{} } +type QueryHasVotedRequest struct { + BallotIdentifier string `protobuf:"bytes,1,opt,name=ballot_identifier,json=ballotIdentifier,proto3" json:"ballot_identifier,omitempty"` + VoterAddress string `protobuf:"bytes,2,opt,name=voter_address,json=voterAddress,proto3" json:"voter_address,omitempty"` +} + +func (m *QueryHasVotedRequest) Reset() { *m = QueryHasVotedRequest{} } +func (m *QueryHasVotedRequest) String() string { return proto.CompactTextString(m) } +func (*QueryHasVotedRequest) ProtoMessage() {} +func (*QueryHasVotedRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_dcb801e455adaee4, []int{4} +} +func (m *QueryHasVotedRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryHasVotedRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryHasVotedRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryHasVotedRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryHasVotedRequest.Merge(m, src) +} +func (m *QueryHasVotedRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryHasVotedRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryHasVotedRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryHasVotedRequest proto.InternalMessageInfo + +func (m *QueryHasVotedRequest) GetBallotIdentifier() string { + if m != nil { + return m.BallotIdentifier + } + return "" +} + +func (m *QueryHasVotedRequest) GetVoterAddress() string { + if m != nil { + return m.VoterAddress + } + return "" +} + +type QueryHasVotedResponse struct { + HasVoted bool `protobuf:"varint,1,opt,name=has_voted,json=hasVoted,proto3" json:"has_voted,omitempty"` +} + +func (m *QueryHasVotedResponse) Reset() { *m = QueryHasVotedResponse{} } +func (m *QueryHasVotedResponse) String() string { return proto.CompactTextString(m) } +func (*QueryHasVotedResponse) ProtoMessage() {} +func (*QueryHasVotedResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_dcb801e455adaee4, []int{5} +} +func (m *QueryHasVotedResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryHasVotedResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryHasVotedResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryHasVotedResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryHasVotedResponse.Merge(m, src) +} +func (m *QueryHasVotedResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryHasVotedResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryHasVotedResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryHasVotedResponse proto.InternalMessageInfo + +func (m *QueryHasVotedResponse) GetHasVoted() bool { + if m != nil { + return m.HasVoted + } + return false +} + type QueryBallotByIdentifierRequest struct { BallotIdentifier string `protobuf:"bytes,1,opt,name=ballot_identifier,json=ballotIdentifier,proto3" json:"ballot_identifier,omitempty"` } @@ -242,7 +338,7 @@ func (m *QueryBallotByIdentifierRequest) Reset() { *m = QueryBallotByIde func (m *QueryBallotByIdentifierRequest) String() string { return proto.CompactTextString(m) } func (*QueryBallotByIdentifierRequest) ProtoMessage() {} func (*QueryBallotByIdentifierRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dcb801e455adaee4, []int{4} + return fileDescriptor_dcb801e455adaee4, []int{6} } func (m *QueryBallotByIdentifierRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -287,7 +383,7 @@ func (m *VoterList) Reset() { *m = VoterList{} } func (m *VoterList) String() string { return proto.CompactTextString(m) } func (*VoterList) ProtoMessage() {} func (*VoterList) Descriptor() ([]byte, []int) { - return fileDescriptor_dcb801e455adaee4, []int{5} + return fileDescriptor_dcb801e455adaee4, []int{7} } func (m *VoterList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -341,7 +437,7 @@ func (m *QueryBallotByIdentifierResponse) Reset() { *m = QueryBallotById func (m *QueryBallotByIdentifierResponse) String() string { return proto.CompactTextString(m) } func (*QueryBallotByIdentifierResponse) ProtoMessage() {} func (*QueryBallotByIdentifierResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dcb801e455adaee4, []int{6} + return fileDescriptor_dcb801e455adaee4, []int{8} } func (m *QueryBallotByIdentifierResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -406,7 +502,7 @@ func (m *QueryObserversByChainRequest) Reset() { *m = QueryObserversByCh func (m *QueryObserversByChainRequest) String() string { return proto.CompactTextString(m) } func (*QueryObserversByChainRequest) ProtoMessage() {} func (*QueryObserversByChainRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dcb801e455adaee4, []int{7} + return fileDescriptor_dcb801e455adaee4, []int{9} } func (m *QueryObserversByChainRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -450,7 +546,7 @@ func (m *QueryObserversByChainResponse) Reset() { *m = QueryObserversByC func (m *QueryObserversByChainResponse) String() string { return proto.CompactTextString(m) } func (*QueryObserversByChainResponse) ProtoMessage() {} func (*QueryObserversByChainResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dcb801e455adaee4, []int{8} + return fileDescriptor_dcb801e455adaee4, []int{10} } func (m *QueryObserversByChainResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -493,7 +589,7 @@ func (m *QueryAllObserverMappersRequest) Reset() { *m = QueryAllObserver func (m *QueryAllObserverMappersRequest) String() string { return proto.CompactTextString(m) } func (*QueryAllObserverMappersRequest) ProtoMessage() {} func (*QueryAllObserverMappersRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dcb801e455adaee4, []int{9} + return fileDescriptor_dcb801e455adaee4, []int{11} } func (m *QueryAllObserverMappersRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -530,7 +626,7 @@ func (m *QueryAllObserverMappersResponse) Reset() { *m = QueryAllObserve func (m *QueryAllObserverMappersResponse) String() string { return proto.CompactTextString(m) } func (*QueryAllObserverMappersResponse) ProtoMessage() {} func (*QueryAllObserverMappersResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dcb801e455adaee4, []int{10} + return fileDescriptor_dcb801e455adaee4, []int{12} } func (m *QueryAllObserverMappersResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -573,7 +669,7 @@ func (m *QuerySupportedChains) Reset() { *m = QuerySupportedChains{} } func (m *QuerySupportedChains) String() string { return proto.CompactTextString(m) } func (*QuerySupportedChains) ProtoMessage() {} func (*QuerySupportedChains) Descriptor() ([]byte, []int) { - return fileDescriptor_dcb801e455adaee4, []int{11} + return fileDescriptor_dcb801e455adaee4, []int{13} } func (m *QuerySupportedChains) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -610,7 +706,7 @@ func (m *QuerySupportedChainsResponse) Reset() { *m = QuerySupportedChai func (m *QuerySupportedChainsResponse) String() string { return proto.CompactTextString(m) } func (*QuerySupportedChainsResponse) ProtoMessage() {} func (*QuerySupportedChainsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dcb801e455adaee4, []int{12} + return fileDescriptor_dcb801e455adaee4, []int{14} } func (m *QuerySupportedChainsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -654,7 +750,7 @@ func (m *QueryGetCoreParamsForChainRequest) Reset() { *m = QueryGetCoreP func (m *QueryGetCoreParamsForChainRequest) String() string { return proto.CompactTextString(m) } func (*QueryGetCoreParamsForChainRequest) ProtoMessage() {} func (*QueryGetCoreParamsForChainRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dcb801e455adaee4, []int{13} + return fileDescriptor_dcb801e455adaee4, []int{15} } func (m *QueryGetCoreParamsForChainRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -698,7 +794,7 @@ func (m *QueryGetCoreParamsForChainResponse) Reset() { *m = QueryGetCore func (m *QueryGetCoreParamsForChainResponse) String() string { return proto.CompactTextString(m) } func (*QueryGetCoreParamsForChainResponse) ProtoMessage() {} func (*QueryGetCoreParamsForChainResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dcb801e455adaee4, []int{14} + return fileDescriptor_dcb801e455adaee4, []int{16} } func (m *QueryGetCoreParamsForChainResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -741,7 +837,7 @@ func (m *QueryGetCoreParamsRequest) Reset() { *m = QueryGetCoreParamsReq func (m *QueryGetCoreParamsRequest) String() string { return proto.CompactTextString(m) } func (*QueryGetCoreParamsRequest) ProtoMessage() {} func (*QueryGetCoreParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dcb801e455adaee4, []int{15} + return fileDescriptor_dcb801e455adaee4, []int{17} } func (m *QueryGetCoreParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -778,7 +874,7 @@ func (m *QueryGetCoreParamsResponse) Reset() { *m = QueryGetCoreParamsRe func (m *QueryGetCoreParamsResponse) String() string { return proto.CompactTextString(m) } func (*QueryGetCoreParamsResponse) ProtoMessage() {} func (*QueryGetCoreParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dcb801e455adaee4, []int{16} + return fileDescriptor_dcb801e455adaee4, []int{18} } func (m *QueryGetCoreParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -822,7 +918,7 @@ func (m *QueryGetNodeAccountRequest) Reset() { *m = QueryGetNodeAccountR func (m *QueryGetNodeAccountRequest) String() string { return proto.CompactTextString(m) } func (*QueryGetNodeAccountRequest) ProtoMessage() {} func (*QueryGetNodeAccountRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dcb801e455adaee4, []int{17} + return fileDescriptor_dcb801e455adaee4, []int{19} } func (m *QueryGetNodeAccountRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -866,7 +962,7 @@ func (m *QueryGetNodeAccountResponse) Reset() { *m = QueryGetNodeAccount func (m *QueryGetNodeAccountResponse) String() string { return proto.CompactTextString(m) } func (*QueryGetNodeAccountResponse) ProtoMessage() {} func (*QueryGetNodeAccountResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dcb801e455adaee4, []int{18} + return fileDescriptor_dcb801e455adaee4, []int{20} } func (m *QueryGetNodeAccountResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -910,7 +1006,7 @@ func (m *QueryAllNodeAccountRequest) Reset() { *m = QueryAllNodeAccountR func (m *QueryAllNodeAccountRequest) String() string { return proto.CompactTextString(m) } func (*QueryAllNodeAccountRequest) ProtoMessage() {} func (*QueryAllNodeAccountRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dcb801e455adaee4, []int{19} + return fileDescriptor_dcb801e455adaee4, []int{21} } func (m *QueryAllNodeAccountRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -955,7 +1051,7 @@ func (m *QueryAllNodeAccountResponse) Reset() { *m = QueryAllNodeAccount func (m *QueryAllNodeAccountResponse) String() string { return proto.CompactTextString(m) } func (*QueryAllNodeAccountResponse) ProtoMessage() {} func (*QueryAllNodeAccountResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dcb801e455adaee4, []int{20} + return fileDescriptor_dcb801e455adaee4, []int{22} } func (m *QueryAllNodeAccountResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1005,7 +1101,7 @@ func (m *QueryGetCrosschainFlagsRequest) Reset() { *m = QueryGetCrosscha func (m *QueryGetCrosschainFlagsRequest) String() string { return proto.CompactTextString(m) } func (*QueryGetCrosschainFlagsRequest) ProtoMessage() {} func (*QueryGetCrosschainFlagsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dcb801e455adaee4, []int{21} + return fileDescriptor_dcb801e455adaee4, []int{23} } func (m *QueryGetCrosschainFlagsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1042,7 +1138,7 @@ func (m *QueryGetCrosschainFlagsResponse) Reset() { *m = QueryGetCrossch func (m *QueryGetCrosschainFlagsResponse) String() string { return proto.CompactTextString(m) } func (*QueryGetCrosschainFlagsResponse) ProtoMessage() {} func (*QueryGetCrosschainFlagsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dcb801e455adaee4, []int{22} + return fileDescriptor_dcb801e455adaee4, []int{24} } func (m *QueryGetCrosschainFlagsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1085,7 +1181,7 @@ func (m *QueryGetKeygenRequest) Reset() { *m = QueryGetKeygenRequest{} } func (m *QueryGetKeygenRequest) String() string { return proto.CompactTextString(m) } func (*QueryGetKeygenRequest) ProtoMessage() {} func (*QueryGetKeygenRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dcb801e455adaee4, []int{23} + return fileDescriptor_dcb801e455adaee4, []int{25} } func (m *QueryGetKeygenRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1122,7 +1218,7 @@ func (m *QueryGetKeygenResponse) Reset() { *m = QueryGetKeygenResponse{} func (m *QueryGetKeygenResponse) String() string { return proto.CompactTextString(m) } func (*QueryGetKeygenResponse) ProtoMessage() {} func (*QueryGetKeygenResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dcb801e455adaee4, []int{24} + return fileDescriptor_dcb801e455adaee4, []int{26} } func (m *QueryGetKeygenResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1165,7 +1261,7 @@ func (m *QueryShowObserverCountRequest) Reset() { *m = QueryShowObserver func (m *QueryShowObserverCountRequest) String() string { return proto.CompactTextString(m) } func (*QueryShowObserverCountRequest) ProtoMessage() {} func (*QueryShowObserverCountRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dcb801e455adaee4, []int{25} + return fileDescriptor_dcb801e455adaee4, []int{27} } func (m *QueryShowObserverCountRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1202,7 +1298,7 @@ func (m *QueryShowObserverCountResponse) Reset() { *m = QueryShowObserve func (m *QueryShowObserverCountResponse) String() string { return proto.CompactTextString(m) } func (*QueryShowObserverCountResponse) ProtoMessage() {} func (*QueryShowObserverCountResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dcb801e455adaee4, []int{26} + return fileDescriptor_dcb801e455adaee4, []int{28} } func (m *QueryShowObserverCountResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1246,7 +1342,7 @@ func (m *QueryBlameByIdentifierRequest) Reset() { *m = QueryBlameByIdent func (m *QueryBlameByIdentifierRequest) String() string { return proto.CompactTextString(m) } func (*QueryBlameByIdentifierRequest) ProtoMessage() {} func (*QueryBlameByIdentifierRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dcb801e455adaee4, []int{27} + return fileDescriptor_dcb801e455adaee4, []int{29} } func (m *QueryBlameByIdentifierRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1290,7 +1386,7 @@ func (m *QueryBlameByIdentifierResponse) Reset() { *m = QueryBlameByIden func (m *QueryBlameByIdentifierResponse) String() string { return proto.CompactTextString(m) } func (*QueryBlameByIdentifierResponse) ProtoMessage() {} func (*QueryBlameByIdentifierResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dcb801e455adaee4, []int{28} + return fileDescriptor_dcb801e455adaee4, []int{30} } func (m *QueryBlameByIdentifierResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1333,7 +1429,7 @@ func (m *QueryAllBlameRecordsRequest) Reset() { *m = QueryAllBlameRecord func (m *QueryAllBlameRecordsRequest) String() string { return proto.CompactTextString(m) } func (*QueryAllBlameRecordsRequest) ProtoMessage() {} func (*QueryAllBlameRecordsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dcb801e455adaee4, []int{29} + return fileDescriptor_dcb801e455adaee4, []int{31} } func (m *QueryAllBlameRecordsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1370,7 +1466,7 @@ func (m *QueryAllBlameRecordsResponse) Reset() { *m = QueryAllBlameRecor func (m *QueryAllBlameRecordsResponse) String() string { return proto.CompactTextString(m) } func (*QueryAllBlameRecordsResponse) ProtoMessage() {} func (*QueryAllBlameRecordsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dcb801e455adaee4, []int{30} + return fileDescriptor_dcb801e455adaee4, []int{32} } func (m *QueryAllBlameRecordsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1415,7 +1511,7 @@ func (m *QueryBlameByChainAndNonceRequest) Reset() { *m = QueryBlameByCh func (m *QueryBlameByChainAndNonceRequest) String() string { return proto.CompactTextString(m) } func (*QueryBlameByChainAndNonceRequest) ProtoMessage() {} func (*QueryBlameByChainAndNonceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dcb801e455adaee4, []int{31} + return fileDescriptor_dcb801e455adaee4, []int{33} } func (m *QueryBlameByChainAndNonceRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1466,7 +1562,7 @@ func (m *QueryBlameByChainAndNonceResponse) Reset() { *m = QueryBlameByC func (m *QueryBlameByChainAndNonceResponse) String() string { return proto.CompactTextString(m) } func (*QueryBlameByChainAndNonceResponse) ProtoMessage() {} func (*QueryBlameByChainAndNonceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dcb801e455adaee4, []int{32} + return fileDescriptor_dcb801e455adaee4, []int{34} } func (m *QueryBlameByChainAndNonceResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1510,7 +1606,7 @@ func (m *QueryAllBlockHeaderRequest) Reset() { *m = QueryAllBlockHeaderR func (m *QueryAllBlockHeaderRequest) String() string { return proto.CompactTextString(m) } func (*QueryAllBlockHeaderRequest) ProtoMessage() {} func (*QueryAllBlockHeaderRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dcb801e455adaee4, []int{33} + return fileDescriptor_dcb801e455adaee4, []int{35} } func (m *QueryAllBlockHeaderRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1555,7 +1651,7 @@ func (m *QueryAllBlockHeaderResponse) Reset() { *m = QueryAllBlockHeader func (m *QueryAllBlockHeaderResponse) String() string { return proto.CompactTextString(m) } func (*QueryAllBlockHeaderResponse) ProtoMessage() {} func (*QueryAllBlockHeaderResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dcb801e455adaee4, []int{34} + return fileDescriptor_dcb801e455adaee4, []int{36} } func (m *QueryAllBlockHeaderResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1606,7 +1702,7 @@ func (m *QueryGetBlockHeaderByHashRequest) Reset() { *m = QueryGetBlockH func (m *QueryGetBlockHeaderByHashRequest) String() string { return proto.CompactTextString(m) } func (*QueryGetBlockHeaderByHashRequest) ProtoMessage() {} func (*QueryGetBlockHeaderByHashRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dcb801e455adaee4, []int{35} + return fileDescriptor_dcb801e455adaee4, []int{37} } func (m *QueryGetBlockHeaderByHashRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1650,7 +1746,7 @@ func (m *QueryGetBlockHeaderByHashResponse) Reset() { *m = QueryGetBlock func (m *QueryGetBlockHeaderByHashResponse) String() string { return proto.CompactTextString(m) } func (*QueryGetBlockHeaderByHashResponse) ProtoMessage() {} func (*QueryGetBlockHeaderByHashResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dcb801e455adaee4, []int{36} + return fileDescriptor_dcb801e455adaee4, []int{38} } func (m *QueryGetBlockHeaderByHashResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1691,6 +1787,8 @@ func init() { proto.RegisterType((*QueryProveResponse)(nil), "zetachain.zetacore.observer.QueryProveResponse") proto.RegisterType((*QueryParamsRequest)(nil), "zetachain.zetacore.observer.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "zetachain.zetacore.observer.QueryParamsResponse") + proto.RegisterType((*QueryHasVotedRequest)(nil), "zetachain.zetacore.observer.QueryHasVotedRequest") + proto.RegisterType((*QueryHasVotedResponse)(nil), "zetachain.zetacore.observer.QueryHasVotedResponse") proto.RegisterType((*QueryBallotByIdentifierRequest)(nil), "zetachain.zetacore.observer.QueryBallotByIdentifierRequest") proto.RegisterType((*VoterList)(nil), "zetachain.zetacore.observer.VoterList") proto.RegisterType((*QueryBallotByIdentifierResponse)(nil), "zetachain.zetacore.observer.QueryBallotByIdentifierResponse") @@ -1729,125 +1827,129 @@ func init() { func init() { proto.RegisterFile("observer/query.proto", fileDescriptor_dcb801e455adaee4) } var fileDescriptor_dcb801e455adaee4 = []byte{ - // 1881 bytes of a gzipped FileDescriptorProto + // 1949 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x59, 0xcf, 0x6f, 0x1b, 0xc7, - 0x15, 0xd6, 0x4a, 0x11, 0x23, 0x3d, 0x4a, 0x96, 0x34, 0xa2, 0x62, 0x79, 0x25, 0x51, 0xea, 0xa8, - 0x76, 0x64, 0xc9, 0xe1, 0x46, 0x34, 0x90, 0xd8, 0x51, 0xa4, 0x94, 0x14, 0x62, 0x59, 0xb1, 0xe3, - 0xb8, 0x54, 0x9b, 0x16, 0x2d, 0x5a, 0x62, 0x49, 0x8e, 0x28, 0x26, 0xab, 0x1d, 0x66, 0x77, 0x25, - 0x8b, 0x15, 0x04, 0x14, 0x3d, 0xf7, 0x60, 0xa0, 0x40, 0xcf, 0x3d, 0xf5, 0xd6, 0x1e, 0x7c, 0xe9, - 0xa1, 0xe8, 0xa5, 0x97, 0xfa, 0x54, 0xb8, 0x28, 0x50, 0xb4, 0x87, 0x16, 0x86, 0xdd, 0x3f, 0xa0, - 0x7f, 0x42, 0x31, 0x3f, 0x76, 0x39, 0x5c, 0xee, 0x92, 0x4b, 0xc1, 0x27, 0x71, 0x67, 0xe6, 0xbd, - 0xf9, 0xbe, 0x37, 0x33, 0xef, 0xbd, 0x0f, 0x82, 0x0c, 0xad, 0xb8, 0xc4, 0x39, 0x25, 0x8e, 0xf1, - 0xcd, 0x09, 0x71, 0x5a, 0xb9, 0xa6, 0x43, 0x3d, 0x8a, 0x16, 0x7e, 0x46, 0x3c, 0xb3, 0x7a, 0x64, - 0x36, 0xec, 0x1c, 0xff, 0x45, 0x1d, 0x92, 0xf3, 0x17, 0xea, 0xb3, 0x55, 0x7a, 0x7c, 0x4c, 0x6d, - 0x43, 0xfc, 0x11, 0x16, 0xfa, 0x7a, 0x95, 0xba, 0xc7, 0xd4, 0x35, 0x2a, 0xa6, 0x4b, 0x84, 0x2b, - 0xe3, 0x74, 0xb3, 0x42, 0x3c, 0x73, 0xd3, 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x77, 0x47, 0x5d, 0x61, 0xd7, 0xaf, 0x57, 0xa4, 0x0e, 0x34, 0x5e, 0x29, 0xe7, 0x50, 0x8e, 0x1c, + 0x89, 0xba, 0x14, 0x6f, 0x91, 0xa1, 0x84, 0xde, 0xce, 0x99, 0xe8, 0xa4, 0xc8, 0xb3, 0x6f, 0x8d, + 0x6e, 0x38, 0xe2, 0x06, 0x19, 0xca, 0x8e, 0xfc, 0xdb, 0x82, 0xc5, 0x34, 0x81, 0x94, 0x67, 0x7f, + 0x06, 0x68, 0x33, 0x7b, 0xe3, 0xb8, 0xe6, 0xc8, 0xa5, 0x24, 0xb9, 0xbc, 0x4b, 0xde, 0xc9, 0xe4, + 0x62, 0xf2, 0x10, 0x5b, 0x25, 0x44, 0xa0, 0xb8, 0x42, 0x5a, 0x10, 0x1e, 0x91, 0x5f, 0x5a, 0x30, + 0x2e, 0xff, 0x51, 0x45, 0x0a, 0x39, 0x74, 0x96, 0xf1, 0x9f, 0x37, 0xdb, 0xc9, 0xbd, 0x1e, 0xe1, + 0x52, 0x09, 0x77, 0x99, 0xd8, 0xe9, 0xb2, 0x4c, 0xac, 0x2d, 0x3d, 0xfc, 0xf2, 0xf9, 0x8a, 0xf5, + 0xd5, 0xf3, 0x15, 0xeb, 0xeb, 0xe7, 0x2b, 0xd6, 0xe7, 0x2f, 0x56, 0x4e, 0x7c, 0xf5, 0x62, 0xe5, + 0xc4, 0xbf, 0x5e, 0xac, 0x9c, 0xf8, 0x91, 0xd3, 0x68, 0x45, 0xcd, 0xbd, 0xaa, 0x10, 0x9d, 0xa9, + 0x65, 0xef, 0xa0, 0xeb, 0x2a, 0xea, 0xb4, 0x59, 0x58, 0x9d, 0x90, 0xff, 0x36, 0xbc, 0xf9, 0xff, + 0x00, 0x00, 0x00, 0xff, 0xff, 0xf4, 0x8a, 0x0c, 0x4a, 0x92, 0x1d, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1864,6 +1966,8 @@ const _ = grpc.SupportPackageIsVersion4 type QueryClient interface { // Parameters queries the parameters of the module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // Query if a voter has voted for a ballot + HasVoted(ctx context.Context, in *QueryHasVotedRequest, opts ...grpc.CallOption) (*QueryHasVotedResponse, error) // Queries a list of VoterByIdentifier items. BallotByIdentifier(ctx context.Context, in *QueryBallotByIdentifierRequest, opts ...grpc.CallOption) (*QueryBallotByIdentifierResponse, error) // Queries a list of ObserversByChainAndType items. @@ -1912,6 +2016,15 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . return out, nil } +func (c *queryClient) HasVoted(ctx context.Context, in *QueryHasVotedRequest, opts ...grpc.CallOption) (*QueryHasVotedResponse, error) { + out := new(QueryHasVotedResponse) + err := c.cc.Invoke(ctx, "/zetachain.zetacore.observer.Query/HasVoted", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) BallotByIdentifier(ctx context.Context, in *QueryBallotByIdentifierRequest, opts ...grpc.CallOption) (*QueryBallotByIdentifierResponse, error) { out := new(QueryBallotByIdentifierResponse) err := c.cc.Invoke(ctx, "/zetachain.zetacore.observer.Query/BallotByIdentifier", in, out, opts...) @@ -2069,6 +2182,8 @@ func (c *queryClient) Prove(ctx context.Context, in *QueryProveRequest, opts ... type QueryServer interface { // Parameters queries the parameters of the module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // Query if a voter has voted for a ballot + HasVoted(context.Context, *QueryHasVotedRequest) (*QueryHasVotedResponse, error) // Queries a list of VoterByIdentifier items. BallotByIdentifier(context.Context, *QueryBallotByIdentifierRequest) (*QueryBallotByIdentifierResponse, error) // Queries a list of ObserversByChainAndType items. @@ -2107,6 +2222,9 @@ type UnimplementedQueryServer struct { func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } +func (*UnimplementedQueryServer) HasVoted(ctx context.Context, req *QueryHasVotedRequest) (*QueryHasVotedResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method HasVoted not implemented") +} func (*UnimplementedQueryServer) BallotByIdentifier(ctx context.Context, req *QueryBallotByIdentifierRequest) (*QueryBallotByIdentifierResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method BallotByIdentifier not implemented") } @@ -2181,6 +2299,24 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } +func _Query_HasVoted_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryHasVotedRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).HasVoted(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/zetachain.zetacore.observer.Query/HasVoted", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).HasVoted(ctx, req.(*QueryHasVotedRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_BallotByIdentifier_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryBallotByIdentifierRequest) if err := dec(in); err != nil { @@ -2495,6 +2631,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "Params", Handler: _Query_Params_Handler, }, + { + MethodName: "HasVoted", + Handler: _Query_HasVoted_Handler, + }, { MethodName: "BallotByIdentifier", Handler: _Query_BallotByIdentifier_Handler, @@ -2716,6 +2856,76 @@ func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *QueryHasVotedRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryHasVotedRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryHasVotedRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.VoterAddress) > 0 { + i -= len(m.VoterAddress) + copy(dAtA[i:], m.VoterAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.VoterAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.BallotIdentifier) > 0 { + i -= len(m.BallotIdentifier) + copy(dAtA[i:], m.BallotIdentifier) + i = encodeVarintQuery(dAtA, i, uint64(len(m.BallotIdentifier))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryHasVotedResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryHasVotedResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryHasVotedResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.HasVoted { + i-- + if m.HasVoted { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func (m *QueryBallotByIdentifierRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -3873,6 +4083,35 @@ func (m *QueryParamsResponse) Size() (n int) { return n } +func (m *QueryHasVotedRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.BallotIdentifier) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.VoterAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryHasVotedResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.HasVoted { + n += 2 + } + return n +} + func (m *QueryBallotByIdentifierRequest) Size() (n int) { if m == nil { return 0 @@ -4707,6 +4946,190 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryHasVotedRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryHasVotedRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryHasVotedRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BallotIdentifier", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BallotIdentifier = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VoterAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.VoterAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryHasVotedResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryHasVotedResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryHasVotedResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HasVoted", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.HasVoted = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *QueryBallotByIdentifierRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/observer/types/query.pb.gw.go b/x/observer/types/query.pb.gw.go index 232b97d9c7..1649745307 100644 --- a/x/observer/types/query.pb.gw.go +++ b/x/observer/types/query.pb.gw.go @@ -51,6 +51,82 @@ func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshal } +func request_Query_HasVoted_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryHasVotedRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["ballot_identifier"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "ballot_identifier") + } + + protoReq.BallotIdentifier, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "ballot_identifier", err) + } + + val, ok = pathParams["voter_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "voter_address") + } + + protoReq.VoterAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "voter_address", err) + } + + msg, err := client.HasVoted(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_HasVoted_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryHasVotedRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["ballot_identifier"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "ballot_identifier") + } + + protoReq.BallotIdentifier, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "ballot_identifier", err) + } + + val, ok = pathParams["voter_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "voter_address") + } + + protoReq.VoterAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "voter_address", err) + } + + msg, err := server.HasVoted(ctx, &protoReq) + return msg, metadata, err + +} + func request_Query_BallotByIdentifier_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryBallotByIdentifierRequest var metadata runtime.ServerMetadata @@ -714,6 +790,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_HasVoted_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) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_HasVoted_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_HasVoted_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_BallotByIdentifier_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1166,6 +1265,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_HasVoted_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) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_HasVoted_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_HasVoted_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_BallotByIdentifier_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1512,6 +1631,8 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie var ( pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"zeta-chain", "observer", "params"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_HasVoted_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4}, []string{"zeta-chain", "observer", "has_voted", "ballot_identifier", "voter_address"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_BallotByIdentifier_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"zeta-chain", "observer", "ballot_by_identifier", "ballot_identifier"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_ObserversByChain_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"zeta-chain", "observer", "observers_by_chain", "observation_chain"}, "", runtime.AssumeColonVerbOpt(false))) @@ -1550,6 +1671,8 @@ var ( var ( forward_Query_Params_0 = runtime.ForwardResponseMessage + forward_Query_HasVoted_0 = runtime.ForwardResponseMessage + forward_Query_BallotByIdentifier_0 = runtime.ForwardResponseMessage forward_Query_ObserversByChain_0 = runtime.ForwardResponseMessage diff --git a/zetaclient/bitcoin_client.go b/zetaclient/bitcoin_client.go index 66b7ea185e..e4d4a31fe1 100644 --- a/zetaclient/bitcoin_client.go +++ b/zetaclient/bitcoin_client.go @@ -438,7 +438,7 @@ func (ob *BitcoinChainClient) IsSendOutTxProcessed(sendHash string, nonce uint64 ) if err != nil { logger.Error().Err(err).Msgf("IsSendOutTxProcessed: error confirming bitcoin outTx %s outTxID %s", res.TxID, outTxID) - } else { + } else if zetaHash != "" { logger.Info().Msgf("IsSendOutTxProcessed: confirmed bitcoin outTx %s outTxID %s, zeta tx hash %s", res.TxID, outTxID, zetaHash) } return true, true, nil diff --git a/zetaclient/evm_client.go b/zetaclient/evm_client.go index 750c4afc30..558a97d992 100644 --- a/zetaclient/evm_client.go +++ b/zetaclient/evm_client.go @@ -257,8 +257,9 @@ func (ob *EVMChainClient) IsSendOutTxProcessed(sendHash string, nonce uint64, co ) if err != nil { logger.Error().Err(err).Msgf("error posting confirmation to meta core for cctx %s nonce %d", sendHash, nonce) + } else if zetaHash != "" { + logger.Info().Msgf("Zeta tx hash: %s cctx %s nonce %d", zetaHash, sendHash, nonce) } - logger.Info().Msgf("Zeta tx hash: %s cctx %s nonce %d", zetaHash, sendHash, nonce) return true, true, nil } else if cointype == common.CoinType_Gas { // the outbound is a regular Ether/BNB/Matic transfer; no need to check events @@ -278,8 +279,9 @@ func (ob *EVMChainClient) IsSendOutTxProcessed(sendHash string, nonce uint64, co ) if err != nil { logger.Error().Err(err).Msgf("error posting confirmation to meta core for cctx %s nonce %d", sendHash, nonce) + } else if zetaHash != "" { + logger.Info().Msgf("Zeta tx hash: %s cctx %s nonce %d", zetaHash, sendHash, nonce) } - logger.Info().Msgf("Zeta tx hash: %s cctx %s nonce %d", zetaHash, sendHash, nonce) return true, true, nil } else if receipt.Status == 0 { // the same as below events flow logger.Info().Msgf("Found (failed tx) sendHash %s on chain %s txhash %s", sendHash, ob.chain.String(), receipt.TxHash.Hex()) @@ -298,8 +300,9 @@ func (ob *EVMChainClient) IsSendOutTxProcessed(sendHash string, nonce uint64, co ) if err != nil { logger.Error().Err(err).Msgf("PostReceiveConfirmation error in WatchTxHashWithTimeout; zeta tx hash %s cctx %s nonce %d", zetaTxHash, sendHash, nonce) + } else if zetaTxHash != "" { + logger.Info().Msgf("Zeta tx hash: %s cctx %s nonce %d", zetaTxHash, sendHash, nonce) } - logger.Info().Msgf("Zeta tx hash: %s cctx %s nonce %d", zetaTxHash, sendHash, nonce) return true, true, nil } } else if cointype == common.CoinType_Zeta { // the outbound is a Zeta transfer; need to check events ZetaReceived @@ -344,8 +347,9 @@ func (ob *EVMChainClient) IsSendOutTxProcessed(sendHash string, nonce uint64, co if err != nil { logger.Error().Err(err).Msgf("error posting confirmation to meta core for cctx %s nonce %d", sendHash, nonce) continue + } else if zetaHash != "" { + logger.Info().Msgf("Zeta tx hash: %s cctx %s nonce %d", zetaHash, sendHash, nonce) } - logger.Info().Msgf("Zeta tx hash: %s cctx %s nonce %d", zetaHash, sendHash, nonce) return true, true, nil } // #nosec G701 always in range @@ -380,8 +384,9 @@ func (ob *EVMChainClient) IsSendOutTxProcessed(sendHash string, nonce uint64, co if err != nil { logger.Err(err).Msgf("error posting confirmation to meta core for cctx %s nonce %d", sendHash, nonce) continue + } else if metaHash != "" { + logger.Info().Msgf("Zeta tx hash: %s cctx %s nonce %d", metaHash, sendHash, nonce) } - logger.Info().Msgf("Zeta tx hash: %s cctx %s nonce %d", metaHash, sendHash, nonce) return true, true, nil } // #nosec G701 always in range @@ -407,8 +412,9 @@ func (ob *EVMChainClient) IsSendOutTxProcessed(sendHash string, nonce uint64, co ) if err != nil { logger.Error().Err(err).Msgf("PostReceiveConfirmation error in WatchTxHashWithTimeout; zeta tx hash %s cctx %s nonce %d", zetaTxHash, sendHash, nonce) + } else if zetaTxHash != "" { + logger.Info().Msgf("Zeta tx hash: %s cctx %s nonce %d", zetaTxHash, sendHash, nonce) } - logger.Info().Msgf("Zeta tx hash: %s cctx %s nonce %d", zetaTxHash, sendHash, nonce) return true, true, nil } } else if cointype == common.CoinType_ERC20 { @@ -446,8 +452,9 @@ func (ob *EVMChainClient) IsSendOutTxProcessed(sendHash string, nonce uint64, co if err != nil { logger.Error().Err(err).Msgf("error posting confirmation to meta core for cctx %s nonce %d", sendHash, nonce) continue + } else if zetaHash != "" { + logger.Info().Msgf("Zeta tx hash: %s cctx %s nonce %d", zetaHash, sendHash, nonce) } - logger.Info().Msgf("Zeta tx hash: %s cctx %s nonce %d", zetaHash, sendHash, nonce) return true, true, nil } // #nosec G701 always in range diff --git a/zetaclient/query.go b/zetaclient/query.go index eb5338e34e..cf79cd4d7b 100644 --- a/zetaclient/query.go +++ b/zetaclient/query.go @@ -352,3 +352,15 @@ func (b *ZetaCoreBridge) Prove(blockHash string, txHash string, txIndex int64, p } return resp.Valid, nil } + +func (b *ZetaCoreBridge) HasVoted(ballotIndex string, voterAddress string) (bool, error) { + client := zetaObserverTypes.NewQueryClient(b.grpcConn) + resp, err := client.HasVoted(context.Background(), &zetaObserverTypes.QueryHasVotedRequest{ + BallotIdentifier: ballotIndex, + VoterAddress: voterAddress, + }) + if err != nil { + return false, err + } + return resp.HasVoted, nil +} diff --git a/zetaclient/tx.go b/zetaclient/tx.go index 85505d5623..1ebf4f96a4 100644 --- a/zetaclient/tx.go +++ b/zetaclient/tx.go @@ -96,11 +96,6 @@ func (b *ZetaCoreBridge) PostReceiveConfirmation( nonce uint64, coinType common.CoinType, ) (string, error) { - lastReport, found := b.lastOutTxReportTime[outTxHash] - if found && time.Since(lastReport) < 10*time.Minute { - return "", fmt.Errorf("PostReceiveConfirmation: outTxHash %s already reported in last 10min; last report %s", outTxHash, lastReport) - } - signerAddress := b.keys.GetOperatorAddress().String() msg := types.NewMsgVoteOnObservedOutboundTx( signerAddress, @@ -116,6 +111,24 @@ func (b *ZetaCoreBridge) PostReceiveConfirmation( nonce, coinType, ) + + // TODO: enable this check once zetacoind is upgraded to support it + // don't post confirmation if has already voted before + // hasVoted, err := b.HasVoted(msg.Digest(), msg.Creator) + // if err != nil { + // return "", fmt.Errorf("PostReceiveConfirmation: unable to check if already voted for ballot %s: %w", msg.Digest(), err) + // } + // if hasVoted { + // return "", nil + // } + + // TODO: remove this check once above check is enabled + // prevent uncessary confirmation + lastReport, found := b.lastOutTxReportTime[outTxHash] + if found && time.Since(lastReport) < 10*time.Minute { + return "", nil + } + authzMsg, authzSigner := b.WrapMessageWithAuthz(msg) // FIXME: remove this gas limit stuff; in the special ante handler with no gas limit, add // NewMsgReceiveConfirmation to it.