From 5060dba6827789274f3508977bdc2d493cc462ab Mon Sep 17 00:00:00 2001 From: brewmaster012 <> Date: Thu, 14 Sep 2023 01:48:09 -0500 Subject: [PATCH] add merkle prove query RPC and smoketest for it --- .../smoketest/test_deposit_eth.go | 52 +- proto/observer/query.proto | 18 + x/observer/keeper/grpc_query_prove.go | 47 + x/observer/types/query.pb.go | 837 +++++++++++++++--- x/observer/types/query.pb.gw.go | 83 ++ zetaclient/query.go | 16 + 6 files changed, 910 insertions(+), 143 deletions(-) create mode 100644 x/observer/keeper/grpc_query_prove.go diff --git a/contrib/localnet/orchestrator/smoketest/test_deposit_eth.go b/contrib/localnet/orchestrator/smoketest/test_deposit_eth.go index b65fdb5691..1d8ea66908 100644 --- a/contrib/localnet/orchestrator/smoketest/test_deposit_eth.go +++ b/contrib/localnet/orchestrator/smoketest/test_deposit_eth.go @@ -9,15 +9,16 @@ import ( "math/big" "time" - ethcommon "github.com/ethereum/go-ethereum/common" - "github.com/zeta-chain/zetacore/x/crosschain/types" - "github.com/zeta-chain/zetacore/zetaclient" - "github.com/ethereum/go-ethereum/accounts/abi/bind" + ethcommon "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" zrc20 "github.com/zeta-chain/protocol-contracts/pkg/contracts/zevm/zrc20.sol" "github.com/zeta-chain/zetacore/common" + ethereum2 "github.com/zeta-chain/zetacore/common/ethereum" + "github.com/zeta-chain/zetacore/x/crosschain/types" + observertypes "github.com/zeta-chain/zetacore/x/observer/types" + "github.com/zeta-chain/zetacore/zetaclient" ) // this tests sending ZETA out of ZetaChain to Ethereum @@ -53,6 +54,49 @@ func (sm *SmokeTest) TestDepositEtherIntoZRC20() { fmt.Printf(" value: %d\n", signedTx.Value()) fmt.Printf(" block num: %d\n", receipt.BlockNumber) + { + LoudPrintf("Merkle Proof\n") + txHash := receipt.TxHash + blockHash := receipt.BlockHash + txIndex := int(receipt.TransactionIndex) + block, err := sm.goerliClient.BlockByHash(context.Background(), blockHash) + if err != nil { + panic(err) + } + + trie := ethereum2.NewTrie(block.Transactions()) + if trie.Hash() != block.Header().TxHash { + panic("tx root hash & block tx root mismatch") // FIXME: don't do this in production + } + txProof, err := trie.GenerateProof(txIndex) + if err != nil { + panic("error generating txProof") // FIXME: don't do this in production + } + val, err := txProof.Verify(block.TxHash(), txIndex) + if err != nil { + panic("error verifying txProof") // FIXME: don't do this in production + } + var txx ethtypes.Transaction + err = txx.UnmarshalBinary(val) + if err != nil { + panic("error unmarshalling txProof'd tx") // FIXME: don't do this in production + } + res, err := sm.observerClient.Prove(context.Background(), &observertypes.QueryProveRequest{ + BlockHash: blockHash.Hex(), + TxIndex: int64(txIndex), + TxHash: txHash.Hex(), + Proof: txProof, + ChainId: 0, + }) + if err != nil { + panic(err) + } + if !res.Valid { + panic("txProof invalid") // FIXME: don't do this in production + } + fmt.Printf("OK: txProof verified\n") + } + { tx, err := sm.SendEther(TSSAddress, big.NewInt(101000000000000000), []byte(zetaclient.DonationMessage)) if err != nil { diff --git a/proto/observer/query.proto b/proto/observer/query.proto index 959510008e..c11a48b955 100644 --- a/proto/observer/query.proto +++ b/proto/observer/query.proto @@ -2,6 +2,7 @@ syntax = "proto3"; package zetachain.zetacore.observer; import "common/common.proto"; +import "common/ethereum/ethereum.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; @@ -88,6 +89,23 @@ service Query { rpc GetBlockHeaderByHash(QueryGetBlockHeaderByHashRequest) returns (QueryGetBlockHeaderByHashResponse) { option (google.api.http).get = "/zeta-chain/observer/get_block_header_by_hash/{block_hash}"; } + + // merkle proof verification + rpc Prove(QueryProveRequest) returns (QueryProveResponse) { + option (google.api.http).get = "/zeta-chain/observer/prove"; + } +} + +message QueryProveRequest { + uint64 chain_id = 1; + string tx_hash = 4; + ethereum.Proof proof = 5; + string block_hash = 6; + int64 tx_index = 7; +} + +message QueryProveResponse { + bool valid = 1; } message QueryParamsRequest {} diff --git a/x/observer/keeper/grpc_query_prove.go b/x/observer/keeper/grpc_query_prove.go new file mode 100644 index 0000000000..c0cd1a5225 --- /dev/null +++ b/x/observer/keeper/grpc_query_prove.go @@ -0,0 +1,47 @@ +package keeper + +import ( + "context" + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + eth "github.com/ethereum/go-ethereum/common" + ethtypes "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/rlp" + "github.com/zeta-chain/zetacore/x/observer/types" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +func (k Keeper) Prove(c context.Context, req *types.QueryProveRequest) (*types.QueryProveResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + ctx := sdk.UnwrapSDKContext(c) + + blockHash := eth.HexToHash(req.BlockHash) + res, found := k.GetBlockHeader(ctx, blockHash.Bytes()) + if !found { + return nil, status.Error(codes.NotFound, "block header not found") + } + var header ethtypes.Header + err := rlp.DecodeBytes(res.Header, &header) + if err != nil { + return nil, status.Error(codes.Internal, fmt.Sprintf("failed to decode header: %s", err)) + } + proven := false + if found { + val, err := req.Proof.Verify(header.TxHash, int(req.TxIndex)) + if err == nil { + var txx ethtypes.Transaction + err = txx.UnmarshalBinary(val) + if err != nil { + return nil, status.Error(codes.Internal, fmt.Sprintf("failed to unmarshal transaction: %s", err)) + } + proven = true + } + } + return &types.QueryProveResponse{ + Valid: proven, + }, nil +} diff --git a/x/observer/types/query.pb.go b/x/observer/types/query.pb.go index a290a6d730..8ce42a69ce 100644 --- a/x/observer/types/query.pb.go +++ b/x/observer/types/query.pb.go @@ -15,6 +15,7 @@ import ( grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" common "github.com/zeta-chain/zetacore/common" + ethereum "github.com/zeta-chain/zetacore/common/ethereum" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -32,6 +33,126 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +type QueryProveRequest struct { + ChainId uint64 `protobuf:"varint,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + TxHash string `protobuf:"bytes,4,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` + Proof *ethereum.Proof `protobuf:"bytes,5,opt,name=proof,proto3" json:"proof,omitempty"` + BlockHash string `protobuf:"bytes,6,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` + TxIndex int64 `protobuf:"varint,7,opt,name=tx_index,json=txIndex,proto3" json:"tx_index,omitempty"` +} + +func (m *QueryProveRequest) Reset() { *m = QueryProveRequest{} } +func (m *QueryProveRequest) String() string { return proto.CompactTextString(m) } +func (*QueryProveRequest) ProtoMessage() {} +func (*QueryProveRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_dcb801e455adaee4, []int{0} +} +func (m *QueryProveRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryProveRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryProveRequest.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 *QueryProveRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryProveRequest.Merge(m, src) +} +func (m *QueryProveRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryProveRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryProveRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryProveRequest proto.InternalMessageInfo + +func (m *QueryProveRequest) GetChainId() uint64 { + if m != nil { + return m.ChainId + } + return 0 +} + +func (m *QueryProveRequest) GetTxHash() string { + if m != nil { + return m.TxHash + } + return "" +} + +func (m *QueryProveRequest) GetProof() *ethereum.Proof { + if m != nil { + return m.Proof + } + return nil +} + +func (m *QueryProveRequest) GetBlockHash() string { + if m != nil { + return m.BlockHash + } + return "" +} + +func (m *QueryProveRequest) GetTxIndex() int64 { + if m != nil { + return m.TxIndex + } + return 0 +} + +type QueryProveResponse struct { + Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"` +} + +func (m *QueryProveResponse) Reset() { *m = QueryProveResponse{} } +func (m *QueryProveResponse) String() string { return proto.CompactTextString(m) } +func (*QueryProveResponse) ProtoMessage() {} +func (*QueryProveResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_dcb801e455adaee4, []int{1} +} +func (m *QueryProveResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryProveResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryProveResponse.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 *QueryProveResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryProveResponse.Merge(m, src) +} +func (m *QueryProveResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryProveResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryProveResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryProveResponse proto.InternalMessageInfo + +func (m *QueryProveResponse) GetValid() bool { + if m != nil { + return m.Valid + } + return false +} + type QueryParamsRequest struct { } @@ -39,7 +160,7 @@ func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } func (*QueryParamsRequest) ProtoMessage() {} func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dcb801e455adaee4, []int{0} + return fileDescriptor_dcb801e455adaee4, []int{2} } func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -78,7 +199,7 @@ func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } func (*QueryParamsResponse) ProtoMessage() {} func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dcb801e455adaee4, []int{1} + return fileDescriptor_dcb801e455adaee4, []int{3} } func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -122,7 +243,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{2} + return fileDescriptor_dcb801e455adaee4, []int{4} } func (m *QueryBallotByIdentifierRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -167,7 +288,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{3} + return fileDescriptor_dcb801e455adaee4, []int{5} } func (m *VoterList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -221,7 +342,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{4} + return fileDescriptor_dcb801e455adaee4, []int{6} } func (m *QueryBallotByIdentifierResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -286,7 +407,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{5} + return fileDescriptor_dcb801e455adaee4, []int{7} } func (m *QueryObserversByChainRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -330,7 +451,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{6} + return fileDescriptor_dcb801e455adaee4, []int{8} } func (m *QueryObserversByChainResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -373,7 +494,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{7} + return fileDescriptor_dcb801e455adaee4, []int{9} } func (m *QueryAllObserverMappersRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -410,7 +531,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{8} + return fileDescriptor_dcb801e455adaee4, []int{10} } func (m *QueryAllObserverMappersResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -453,7 +574,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{9} + return fileDescriptor_dcb801e455adaee4, []int{11} } func (m *QuerySupportedChains) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -490,7 +611,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{10} + return fileDescriptor_dcb801e455adaee4, []int{12} } func (m *QuerySupportedChainsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -534,7 +655,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{11} + return fileDescriptor_dcb801e455adaee4, []int{13} } func (m *QueryGetCoreParamsForChainRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -578,7 +699,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{12} + return fileDescriptor_dcb801e455adaee4, []int{14} } func (m *QueryGetCoreParamsForChainResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -621,7 +742,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{13} + return fileDescriptor_dcb801e455adaee4, []int{15} } func (m *QueryGetCoreParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -658,7 +779,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{14} + return fileDescriptor_dcb801e455adaee4, []int{16} } func (m *QueryGetCoreParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -702,7 +823,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{15} + return fileDescriptor_dcb801e455adaee4, []int{17} } func (m *QueryGetNodeAccountRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -746,7 +867,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{16} + return fileDescriptor_dcb801e455adaee4, []int{18} } func (m *QueryGetNodeAccountResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -790,7 +911,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{17} + return fileDescriptor_dcb801e455adaee4, []int{19} } func (m *QueryAllNodeAccountRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -835,7 +956,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{18} + return fileDescriptor_dcb801e455adaee4, []int{20} } func (m *QueryAllNodeAccountResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -885,7 +1006,7 @@ func (m *QueryGetPermissionFlagsRequest) Reset() { *m = QueryGetPermissi func (m *QueryGetPermissionFlagsRequest) String() string { return proto.CompactTextString(m) } func (*QueryGetPermissionFlagsRequest) ProtoMessage() {} func (*QueryGetPermissionFlagsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dcb801e455adaee4, []int{19} + return fileDescriptor_dcb801e455adaee4, []int{21} } func (m *QueryGetPermissionFlagsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -922,7 +1043,7 @@ func (m *QueryGetPermissionFlagsResponse) Reset() { *m = QueryGetPermiss func (m *QueryGetPermissionFlagsResponse) String() string { return proto.CompactTextString(m) } func (*QueryGetPermissionFlagsResponse) ProtoMessage() {} func (*QueryGetPermissionFlagsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dcb801e455adaee4, []int{20} + return fileDescriptor_dcb801e455adaee4, []int{22} } func (m *QueryGetPermissionFlagsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -965,7 +1086,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{21} + return fileDescriptor_dcb801e455adaee4, []int{23} } func (m *QueryGetKeygenRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1002,7 +1123,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{22} + return fileDescriptor_dcb801e455adaee4, []int{24} } func (m *QueryGetKeygenResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1045,7 +1166,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{23} + return fileDescriptor_dcb801e455adaee4, []int{25} } func (m *QueryShowObserverCountRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1082,7 +1203,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{24} + return fileDescriptor_dcb801e455adaee4, []int{26} } func (m *QueryShowObserverCountResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1126,7 +1247,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{25} + return fileDescriptor_dcb801e455adaee4, []int{27} } func (m *QueryBlameByIdentifierRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1170,7 +1291,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{26} + return fileDescriptor_dcb801e455adaee4, []int{28} } func (m *QueryBlameByIdentifierResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1213,7 +1334,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{27} + return fileDescriptor_dcb801e455adaee4, []int{29} } func (m *QueryAllBlameRecordsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1250,7 +1371,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{28} + return fileDescriptor_dcb801e455adaee4, []int{30} } func (m *QueryAllBlameRecordsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1294,7 +1415,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{29} + return fileDescriptor_dcb801e455adaee4, []int{31} } func (m *QueryAllBlockHeaderRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1339,7 +1460,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{30} + return fileDescriptor_dcb801e455adaee4, []int{32} } func (m *QueryAllBlockHeaderResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1390,7 +1511,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{31} + return fileDescriptor_dcb801e455adaee4, []int{33} } func (m *QueryGetBlockHeaderByHashRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1434,7 +1555,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{32} + return fileDescriptor_dcb801e455adaee4, []int{34} } func (m *QueryGetBlockHeaderByHashResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1471,6 +1592,8 @@ func (m *QueryGetBlockHeaderByHashResponse) GetBlockHeader() *BlockHeader { } func init() { + proto.RegisterType((*QueryProveRequest)(nil), "zetachain.zetacore.observer.QueryProveRequest") + 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((*QueryBallotByIdentifierRequest)(nil), "zetachain.zetacore.observer.QueryBallotByIdentifierRequest") @@ -1509,112 +1632,121 @@ func init() { func init() { proto.RegisterFile("observer/query.proto", fileDescriptor_dcb801e455adaee4) } var fileDescriptor_dcb801e455adaee4 = []byte{ - // 1676 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0x5d, 0x6f, 0x13, 0x47, - 0x17, 0xce, 0x26, 0x90, 0x97, 0x4c, 0x12, 0x92, 0x0c, 0x01, 0x82, 0x43, 0x9c, 0xbc, 0xc3, 0x0b, - 0x18, 0x02, 0x5e, 0x62, 0xa4, 0x97, 0x8f, 0x90, 0x20, 0x3b, 0x82, 0xf0, 0x0d, 0x35, 0x2d, 0xad, - 0x2a, 0xb5, 0xd6, 0xda, 0x9e, 0xd8, 0x0b, 0xeb, 0x9d, 0x65, 0x77, 0x13, 0x70, 0x51, 0xa4, 0xaa, - 0xbf, 0x00, 0xa9, 0x52, 0xff, 0x45, 0x7b, 0x81, 0x54, 0xf5, 0x02, 0xf5, 0xa6, 0x37, 0xe5, 0xaa, - 0xa2, 0xaa, 0x54, 0xb5, 0x17, 0xad, 0x2a, 0xe8, 0xef, 0xa8, 0xaa, 0x9d, 0x8f, 0xdd, 0xf1, 0x7e, - 0xd8, 0xeb, 0x88, 0xab, 0x78, 0x67, 0xe6, 0x9c, 0xf3, 0x3c, 0x67, 0x66, 0xce, 0x79, 0x26, 0x60, - 0x9a, 0x54, 0x1d, 0x6c, 0x6f, 0x61, 0x5b, 0x7d, 0xbc, 0x89, 0xed, 0x76, 0xde, 0xb2, 0x89, 0x4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0x75, 0xa7, 0xe6, 0x9c, 0x4b, 0x89, 0x72, 0xb9, 0x04, 0x2f, 0x26, 0x72, 0x91, 0x79, 0x78, - 0xa7, 0xcc, 0x7b, 0x76, 0x78, 0xe7, 0x4b, 0x3c, 0x41, 0xb6, 0x4b, 0xd7, 0x5f, 0xbd, 0xc9, 0x2a, - 0xaf, 0xdf, 0x64, 0x95, 0xbf, 0xde, 0x64, 0x95, 0xe7, 0x6f, 0xb3, 0x03, 0xaf, 0xdf, 0x66, 0x07, - 0x7e, 0x7b, 0x9b, 0x1d, 0xf8, 0x58, 0x6d, 0xe8, 0x6e, 0x73, 0xb3, 0x9a, 0xaf, 0x91, 0x56, 0xec, - 0x25, 0x7c, 0x1a, 0x84, 0x72, 0xdb, 0x16, 0x76, 0xaa, 0xc3, 0xf4, 0x9f, 0xff, 0x67, 0xff, 0x0d, - 0x00, 0x00, 0xff, 0xff, 0x26, 0xe1, 0x40, 0x6b, 0x70, 0x19, 0x00, 0x00, + // 1822 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x59, 0xcd, 0x4f, 0x1b, 0xc7, + 0x1b, 0x66, 0x21, 0x18, 0x18, 0x43, 0x80, 0x09, 0x49, 0xc0, 0x80, 0xf1, 0x6f, 0xf2, 0x23, 0x71, + 0x20, 0xb1, 0x83, 0x23, 0x35, 0x1f, 0x04, 0x22, 0x8c, 0x12, 0x42, 0x3e, 0xa9, 0xd3, 0xa6, 0x55, + 0xa5, 0xd6, 0x5a, 0xdb, 0x83, 0xed, 0x64, 0xbd, 0xb3, 0xd9, 0x5d, 0x08, 0x6e, 0x84, 0x54, 0xf5, + 0xdc, 0x4a, 0x91, 0x2a, 0xf5, 0x6f, 0xe8, 0xa5, 0x3d, 0x44, 0xaa, 0x7a, 0x88, 0x7a, 0xe9, 0xa5, + 0x39, 0x55, 0xa9, 0x2a, 0x55, 0xed, 0xa1, 0x55, 0x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0x83, 0xa9, 0xd6, 0x78, 0x62, 0x99, 0x1e, 0x82, 0x98, 0xdf, 0x20, 0x07, + 0x71, 0xdb, 0x0f, 0xc4, 0x62, 0x48, 0x10, 0xf4, 0x94, 0xc9, 0x40, 0x32, 0x8d, 0x58, 0x77, 0x49, + 0x09, 0xaf, 0xb1, 0x4b, 0x49, 0x64, 0x6c, 0x02, 0xf4, 0xb3, 0x8a, 0xcc, 0xb6, 0x2c, 0x6b, 0xa0, + 0x87, 0x60, 0xda, 0xd7, 0x86, 0x03, 0xbc, 0x05, 0x86, 0xe5, 0x0b, 0x8e, 0x23, 0x4c, 0xb6, 0x45, + 0x28, 0xfb, 0x89, 0xea, 0x8d, 0x06, 0x2a, 0x71, 0x7c, 0x6b, 0x9a, 0xe6, 0x83, 0xef, 0x3a, 0x00, + 0x8d, 0x6b, 0x9f, 0x07, 0x3a, 0x99, 0x62, 0x1a, 0x21, 0xe5, 0x68, 0x84, 0x14, 0x93, 0x1b, 0x5c, + 0x23, 0xa4, 0xb6, 0xd4, 0xb2, 0xb8, 0xea, 0x72, 0x92, 0x25, 0x7a, 0xae, 0x70, 0x4a, 0xde, 0x30, + 0x9c, 0xd2, 0x4d, 0x10, 0x95, 0xba, 0xf9, 0x56, 0xec, 0x82, 0x91, 0xd4, 0x80, 0x1b, 0x4d, 0x98, + 0x7b, 0xf9, 0x1e, 0xea, 0x84, 0x99, 0x01, 0x69, 0x02, 0x2d, 0xce, 0xfb, 0x06, 0xb6, 0xb7, 0x5c, + 0x0d, 0x70, 0xdd, 0x91, 0x00, 0x62, 0x23, 0x7d, 0xa6, 0xf0, 0x03, 0xef, 0x37, 0x85, 0x53, 0xfb, + 0x18, 0x8c, 0x79, 0x15, 0x04, 0x4f, 0x64, 0xfb, 0x52, 0xeb, 0xf1, 0xc7, 0xaf, 0xc5, 0x51, 0xa3, + 0xb9, 0x1b, 0x1d, 0x07, 0x47, 0x05, 0x82, 0x5b, 0x54, 0x0c, 0x09, 0x6c, 0xef, 0x83, 0x63, 0xde, + 0x01, 0x8e, 0x68, 0x19, 0x44, 0x98, 0x6e, 0x0a, 0x75, 0x2b, 0x73, 0x63, 0x6e, 0x82, 0xe6, 0x78, + 0x0d, 0xbd, 0x5f, 0x21, 0x4f, 0x44, 0x4d, 0x5a, 0x97, 0xb6, 0x8c, 0x93, 0x93, 0x78, 0xd0, 0x0c, + 0x0e, 0xe0, 0x13, 0x70, 0x44, 0x53, 0x2d, 0x3b, 0xef, 0x16, 0x42, 0x79, 0x1f, 0xa7, 0xda, 0xa2, + 0xb9, 0xad, 0x5a, 0x76, 0xb3, 0xd3, 0x71, 0xcd, 0xdb, 0x85, 0x6e, 0x72, 0x8c, 0x59, 0x47, 0x4b, + 0xfa, 0x49, 0x86, 0xd3, 0x60, 0x8c, 0xea, 0xcc, 0xd6, 0xab, 0x76, 0x94, 0xf6, 0x4b, 0x82, 0xa1, + 0x28, 0xf4, 0x47, 0xab, 0x2f, 0x57, 0xe4, 0x00, 0xee, 0x4c, 0xdf, 0x26, 0x9c, 0x04, 0x6a, 0x7f, + 0xdf, 0x39, 0xd3, 0x1d, 0x6d, 0xe6, 0x84, 0xd2, 0xb7, 0x09, 0x9a, 0x6d, 0x9c, 0x0e, 0x36, 0x86, + 0x8b, 0xc4, 0x2c, 0xb9, 0xdb, 0x4c, 0xe5, 0x35, 0xbc, 0x65, 0x38, 0x00, 0x41, 0x5f, 0xf7, 0x08, + 0xa4, 0x32, 0x90, 0xa5, 0x92, 0x91, 0x0a, 0xee, 0xb7, 0x5d, 0x06, 0xbe, 0x57, 0x64, 0xa2, 0x52, + 0x18, 0x4e, 0xe4, 0x0e, 0x18, 0xe1, 0x12, 0x96, 0xe9, 0xfd, 0x50, 0x85, 0x40, 0x76, 0x34, 0x5c, + 0x68, 0x34, 0xac, 0xb7, 0x57, 0x09, 0xd6, 0x40, 0x42, 0x9c, 0x25, 0x29, 0x5a, 0xb6, 0xee, 0x08, + 0x6b, 0x91, 0xa3, 0x66, 0xf9, 0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 0x0a, 0x21, 0xe2, 0xa5, 0x5f, 0x29, 0x62, 0xe9, 0xd0, + 0xf3, 0x39, 0x5c, 0x44, 0xe1, 0xce, 0xc0, 0x98, 0x7f, 0xa9, 0x74, 0xe6, 0x66, 0x37, 0x5f, 0xbe, + 0x8e, 0x2b, 0xaf, 0x5e, 0xc7, 0x95, 0x7f, 0x5e, 0xc7, 0x95, 0x67, 0x6f, 0xe2, 0x3d, 0xaf, 0xde, + 0xc4, 0x7b, 0xfe, 0x78, 0x13, 0xef, 0xf9, 0x28, 0x5d, 0xae, 0xda, 0x95, 0x9d, 0x42, 0xaa, 0x48, + 0x6a, 0xbe, 0x35, 0x61, 0xaf, 0xe1, 0xca, 0xae, 0x1b, 0xd8, 0x2a, 0x44, 0xe8, 0x4f, 0x2c, 0xe7, + 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x79, 0x72, 0x26, 0xbe, 0xf6, 0x1a, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1656,6 +1788,8 @@ type QueryClient interface { GetAllBlameRecords(ctx context.Context, in *QueryAllBlameRecordsRequest, opts ...grpc.CallOption) (*QueryAllBlameRecordsResponse, error) GetAllBlockHeaders(ctx context.Context, in *QueryAllBlockHeaderRequest, opts ...grpc.CallOption) (*QueryAllBlockHeaderResponse, error) GetBlockHeaderByHash(ctx context.Context, in *QueryGetBlockHeaderByHashRequest, opts ...grpc.CallOption) (*QueryGetBlockHeaderByHashResponse, error) + // merkle proof verification + Prove(ctx context.Context, in *QueryProveRequest, opts ...grpc.CallOption) (*QueryProveResponse, error) } type queryClient struct { @@ -1810,6 +1944,15 @@ func (c *queryClient) GetBlockHeaderByHash(ctx context.Context, in *QueryGetBloc return out, nil } +func (c *queryClient) Prove(ctx context.Context, in *QueryProveRequest, opts ...grpc.CallOption) (*QueryProveResponse, error) { + out := new(QueryProveResponse) + err := c.cc.Invoke(ctx, "/zetachain.zetacore.observer.Query/Prove", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // Parameters queries the parameters of the module. @@ -1839,6 +1982,8 @@ type QueryServer interface { GetAllBlameRecords(context.Context, *QueryAllBlameRecordsRequest) (*QueryAllBlameRecordsResponse, error) GetAllBlockHeaders(context.Context, *QueryAllBlockHeaderRequest) (*QueryAllBlockHeaderResponse, error) GetBlockHeaderByHash(context.Context, *QueryGetBlockHeaderByHashRequest) (*QueryGetBlockHeaderByHashResponse, error) + // merkle proof verification + Prove(context.Context, *QueryProveRequest) (*QueryProveResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -1893,6 +2038,9 @@ func (*UnimplementedQueryServer) GetAllBlockHeaders(ctx context.Context, req *Qu func (*UnimplementedQueryServer) GetBlockHeaderByHash(ctx context.Context, req *QueryGetBlockHeaderByHashRequest) (*QueryGetBlockHeaderByHashResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetBlockHeaderByHash not implemented") } +func (*UnimplementedQueryServer) Prove(ctx context.Context, req *QueryProveRequest) (*QueryProveResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Prove not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -2186,6 +2334,24 @@ func _Query_GetBlockHeaderByHash_Handler(srv interface{}, ctx context.Context, d return interceptor(ctx, in, info, handler) } +func _Query_Prove_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryProveRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Prove(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/zetachain.zetacore.observer.Query/Prove", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Prove(ctx, req.(*QueryProveRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "zetachain.zetacore.observer.Query", HandlerType: (*QueryServer)(nil), @@ -2254,11 +2420,107 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "GetBlockHeaderByHash", Handler: _Query_GetBlockHeaderByHash_Handler, }, + { + MethodName: "Prove", + Handler: _Query_Prove_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "observer/query.proto", } +func (m *QueryProveRequest) 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 *QueryProveRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryProveRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.TxIndex != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.TxIndex)) + i-- + dAtA[i] = 0x38 + } + if len(m.BlockHash) > 0 { + i -= len(m.BlockHash) + copy(dAtA[i:], m.BlockHash) + i = encodeVarintQuery(dAtA, i, uint64(len(m.BlockHash))) + i-- + dAtA[i] = 0x32 + } + if m.Proof != nil { + { + size, err := m.Proof.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if len(m.TxHash) > 0 { + i -= len(m.TxHash) + copy(dAtA[i:], m.TxHash) + i = encodeVarintQuery(dAtA, i, uint64(len(m.TxHash))) + i-- + dAtA[i] = 0x22 + } + if m.ChainId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.ChainId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryProveResponse) 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 *QueryProveResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryProveResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Valid { + i-- + if m.Valid { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -3343,6 +3605,45 @@ func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } +func (m *QueryProveRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ChainId != 0 { + n += 1 + sovQuery(uint64(m.ChainId)) + } + l = len(m.TxHash) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Proof != nil { + l = m.Proof.Size() + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.BlockHash) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.TxIndex != 0 { + n += 1 + sovQuery(uint64(m.TxIndex)) + } + return n +} + +func (m *QueryProveResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Valid { + n += 2 + } + return n +} + func (m *QueryParamsRequest) Size() (n int) { if m == nil { return 0 @@ -3776,6 +4077,264 @@ func sovQuery(x uint64) (n int) { func sozQuery(x uint64) (n int) { return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } +func (m *QueryProveRequest) 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: QueryProveRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryProveRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) + } + m.ChainId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ChainId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TxHash", 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.TxHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Proof == nil { + m.Proof = ðereum.Proof{} + } + if err := m.Proof.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHash", 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.BlockHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TxIndex", wireType) + } + m.TxIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TxIndex |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 *QueryProveResponse) 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: QueryProveResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryProveResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Valid", 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.Valid = 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 *QueryParamsRequest) 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 141fad8e69..360d1ad447 100644 --- a/x/observer/types/query.pb.gw.go +++ b/x/observer/types/query.pb.gw.go @@ -573,6 +573,42 @@ func local_request_Query_GetBlockHeaderByHash_0(ctx context.Context, marshaler r } +var ( + filter_Query_Prove_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_Prove_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryProveRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Prove_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Prove(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Prove_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryProveRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Prove_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Prove(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -947,6 +983,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_Prove_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_Prove_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_Prove_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1308,6 +1367,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_Prove_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_Prove_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_Prove_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1343,6 +1422,8 @@ var ( pattern_Query_GetAllBlockHeaders_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"zeta-chain", "observer", "get_all_block_headers"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_GetBlockHeaderByHash_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"zeta-chain", "observer", "get_block_header_by_hash", "block_hash"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Prove_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"zeta-chain", "observer", "prove"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -1377,4 +1458,6 @@ var ( forward_Query_GetAllBlockHeaders_0 = runtime.ForwardResponseMessage forward_Query_GetBlockHeaderByHash_0 = runtime.ForwardResponseMessage + + forward_Query_Prove_0 = runtime.ForwardResponseMessage ) diff --git a/zetaclient/query.go b/zetaclient/query.go index 8e4ab27329..2fd4fecf73 100644 --- a/zetaclient/query.go +++ b/zetaclient/query.go @@ -12,6 +12,7 @@ import ( upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" tmtypes "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/common/ethereum" "github.com/zeta-chain/zetacore/x/crosschain/types" zetaObserverTypes "github.com/zeta-chain/zetacore/x/observer/types" "google.golang.org/grpc" @@ -297,3 +298,18 @@ func (b *ZetaCoreBridge) GetPendingNonces() (*types.QueryAllPendingNoncesRespons } return resp, nil } + +func (b *ZetaCoreBridge) Prove(blockHash string, txHash string, txIndex int64, proof *ethereum.Proof, chainID uint64) (bool, error) { + client := zetaObserverTypes.NewQueryClient(b.grpcConn) + resp, err := client.Prove(context.Background(), &zetaObserverTypes.QueryProveRequest{ + BlockHash: blockHash, + TxIndex: txIndex, + Proof: proof, + ChainId: chainID, + TxHash: txHash, + }) + if err != nil { + return false, err + } + return resp.Valid, nil +}