diff --git a/bcs/ledger/xledger/state/state.go b/bcs/ledger/xledger/state/state.go index 13008e75..70422b29 100644 --- a/bcs/ledger/xledger/state/state.go +++ b/bcs/ledger/xledger/state/state.go @@ -4,6 +4,7 @@ package state import ( "bytes" "encoding/hex" + "encoding/json" "errors" "fmt" "math/big" @@ -914,6 +915,40 @@ func (t *State) QueryBlock(blockid []byte) (kledger.BlockHandle, error) { return NewBlockAgent(block), nil } + +func (t *State) ResolveChain(chainName string) (*pb2.CrossQueryMeta, error) { + xmReader := t.CreateXMReader() + sandBoxCfg := &contract.SandboxConfig{ + XMReader: xmReader, + } + sandBox, err := t.sctx.ContractMgr.NewStateSandbox(sandBoxCfg) + if err != nil { + return nil, err + } + contextConfig := &contract.ContextConfig{ + State: sandBox, + ResourceLimits: contract.MaxLimits, + ContractName: "crossQueryNaming", + } + + ctx, err := t.sctx.ContractMgr.NewContext(contextConfig) + if err != nil { + t.log.Warn("queryContractBannedStatus new context error", "error", err) + return nil, err + } + args := map[string][]byte{} + args["name"] = []byte(chainName) + invokeRes, invokeErr := ctx.Invoke("Resolve", args) + if invokeErr != nil { + ctx.Release() + return nil, invokeErr + } + ctx.Release() + res := &pb2.CrossQueryMeta{} + err = json.Unmarshal(invokeRes.Body, res) + return res, err +} + func (t *State) QueryTransaction(txid []byte) (*pb2.Transaction, error) { ltx, err := t.sctx.Ledger.QueryTransaction(txid) if err != nil { diff --git a/bcs/ledger/xledger/state/tx_verification.go b/bcs/ledger/xledger/state/tx_verification.go index 53cd5f43..00ea39d5 100644 --- a/bcs/ledger/xledger/state/tx_verification.go +++ b/bcs/ledger/xledger/state/tx_verification.go @@ -586,17 +586,32 @@ func (t *State) verifyTxRWSets(tx *pb.Transaction) (bool, error) { XMReader: reader, UTXOReader: utxoReader, } + sandBox, err := t.sctx.ContractMgr.NewStateSandbox(sandBoxConfig) if err != nil { t.log.Error("NewStateSandbox error", "err", err) return false, err } - transContractName, transAmount, err := txn.ParseContractTransferRequest(req) + // 构建CrossQueryCache 依据xuperchain v3.10的流程添加 + // 1.ParseCrossQuery() + crossQueries, err := sandbox.ParseCrossQuery(tx) if err != nil { + t.log.Warn("PrepareEnv ParseCrossQuery error", "err", err.Error()) return false, err } + // 2.IsCrossQueryEffective() + if ok := sandbox.IsCrossQueryEffective(crossQueries, tx); !ok { + t.log.Warn("PrepareEnv IsCrossQueryEffective error") + return false, errors.New("PrepareEnv CheckCrossQueryEffective error") + } + // 3.crossQueries 缓存赋值到 XMCache 中 + sandBox.CrossQueryCache(crossQueries) + transContractName, transAmount, err := txn.ParseContractTransferRequest(req) + if err != nil { + return false, err + } contextConfig := &contract.ContextConfig{ State: sandBox, Initiator: tx.GetInitiator(), diff --git a/go.mod b/go.mod index d92f7749..ab572ace 100644 --- a/go.mod +++ b/go.mod @@ -3,11 +3,9 @@ module github.com/xuperchain/xupercore go 1.14 require ( - github.com/ChainSafe/go-schnorrkel v0.0.0-20200626160457-b38283118816 // indirect github.com/aws/aws-sdk-go v1.32.4 github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d github.com/dgraph-io/badger/v3 v3.2103.1 - github.com/docker/go-connections v0.4.1-0.20180821093606-97c2040d34df // indirect github.com/docker/go-units v0.4.0 github.com/emirpasic/gods v1.12.1-0.20201118132343-79df803e554c github.com/fsouza/go-dockerclient v1.6.0 @@ -15,8 +13,8 @@ require ( github.com/gogo/protobuf v1.3.2 github.com/golang/protobuf v1.4.3 github.com/golang/snappy v0.0.3 - github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.2.2 + github.com/grpc-ecosystem/grpc-gateway v1.9.0 github.com/hashicorp/golang-lru v0.5.4 github.com/hyperledger/burrow v0.30.5 github.com/ipfs/go-ipfs-addr v0.0.1 @@ -39,7 +37,12 @@ require ( github.com/xuperchain/xvm v0.0.0-20210126142521-68fd016c56d7 golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2 golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9 + google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 google.golang.org/grpc v1.35.0 + google.golang.org/protobuf v1.25.0 + + github.com/tjfoc/gmsm v1.4.1 + ) replace github.com/hyperledger/burrow => github.com/xuperchain/burrow v0.30.6-0.20211229032028-fbee6a05ab0f diff --git a/go.sum b/go.sum index 614e9a17..1779a62e 100644 --- a/go.sum +++ b/go.sum @@ -227,6 +227,7 @@ github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmg github.com/grpc-ecosystem/go-grpc-middleware v1.2.2 h1:FlFbCRLd5Jr4iYXZufAvgWN6Ao0JrI5chLINnUXDDr0= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.0 h1:bM6ZAFZmc/wPFaRDi0d5L7hGEZEx/2u+Tmr2evNHDiI= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f h1:8N8XWLZelZNibkhM1FuF+3Ad3YIbgirjdMiVA0eUkaM= github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= diff --git a/kernel/consensus/mock/mock_pluggable_consensus.go b/kernel/consensus/mock/mock_pluggable_consensus.go index 8b3b14bc..9654af38 100644 --- a/kernel/consensus/mock/mock_pluggable_consensus.go +++ b/kernel/consensus/mock/mock_pluggable_consensus.go @@ -367,6 +367,9 @@ func (c *FakeKContext) QueryBlock(blockid []byte) (*xldgpb.InternalBlock, error) func (c *FakeKContext) QueryTransaction(txid []byte) (*pb.Transaction, error) { return &pb.Transaction{}, nil } +func (c *FakeKContext) CrossQuery(crossQueryRequest *pb.CrossQueryRequest, queryMeta *pb.CrossQueryMeta) (*pb.ContractResponse, error) { + return nil, nil +} type FakeManager struct { R *FakeRegistry @@ -384,6 +387,10 @@ func (m *FakeManager) GetKernRegistry() contract.KernRegistry { return m.R } +func (m *FakeManager) CrossQuery(crossQueryRequest *pb.CrossQueryRequest, queryMeta *pb.CrossQueryMeta) (*pb.ContractResponse, error) { + return nil, nil +} + type FakeRegistry struct { M map[string]contract.KernMethod } diff --git a/kernel/contract/bridge/cross_uri.go b/kernel/contract/bridge/cross_uri.go new file mode 100644 index 00000000..f965ac47 --- /dev/null +++ b/kernel/contract/bridge/cross_uri.go @@ -0,0 +1,113 @@ +package bridge + +import ( + "fmt" + "net/url" + + "github.com/xuperchain/xupercore/kernel/contract/bridge/pb" +) + +const ( + // XuperScheme define the xuper scheme + XuperScheme = "xuper" +) + +// CrossChainURI Standard +// [scheme:][//chain_name][path][?query] +// eg xuper://chain1?module=wasm&bcname=xuper&contract_name=counter&method_name=increase +type CrossChainURI struct { + *url.URL +} + +// ParseCrossChainURI will parse uri to cross chain uri instance +func ParseCrossChainURI(crossChainURI string) (*CrossChainURI, error) { + uri, err := url.Parse(crossChainURI) + if err != nil { + return nil, err + } + + return &CrossChainURI{ + uri, + }, nil +} + +// GetScheme return cross chain uri scheme +func (ccu *CrossChainURI) GetScheme() string { + return ccu.URL.Scheme +} + +// GetChainName return cross chain uri chain name +func (ccu *CrossChainURI) GetChainName() string { + return ccu.URL.Host +} + +// GetPath return cross chain uri path +func (ccu *CrossChainURI) GetPath() string { + return ccu.URL.Path +} + +// GetQuery return cross chain uri query +func (ccu *CrossChainURI) GetQuery() url.Values { + return ccu.URL.Query() +} + +// CrossChainScheme define the interface of CrossChainScheme +type CrossChainScheme interface { + GetName() string + GetCrossQueryRequest(*CrossChainURI, []*pb.ArgPair, string, []string) (*pb.CrossQueryRequest, error) +} + +// CrossXuperScheme define the xuper scheme +type CrossXuperScheme struct { +} + +// GetCrossQueryRequest return XupeScheme instance with CrossChainURI +// [scheme:][//chain_name][?query] +// eg xuper://chain1?module=wasm&bcname=xuper&contract_name=counter&method_name=increase +func (cxs *CrossXuperScheme) GetCrossQueryRequest(crossChainURI *CrossChainURI, + argPair []*pb.ArgPair, initiator string, authRequire []string) (*pb.CrossQueryRequest, error) { + if initiator == "" { + return nil, fmt.Errorf("GetCrossQueryRequest initiator is nil") + } + + querys := crossChainURI.GetQuery() + module := querys.Get("module") + bcname := querys.Get("bcname") + contractName := querys.Get("contract_name") + methodName := querys.Get("method_name") + if module == "" || bcname == "" || contractName == "" || methodName == "" { + return nil, fmt.Errorf("GetCrossQueryRequest query is nil") + } + args := make(map[string][]byte) + for _, arg := range argPair { + args[arg.GetKey()] = arg.GetValue() + } + + crossQueryRequest := &pb.CrossQueryRequest{ + Bcname: bcname, + Initiator: initiator, + AuthRequire: authRequire, + Request: &pb.InvokeRequest{ + ModuleName: module, + ContractName: contractName, + MethodName: methodName, + Args: args, + }, + } + return crossQueryRequest, nil +} + +// GetName return cross xuper scheme name +func (cxs *CrossXuperScheme) GetName() string { + return XuperScheme +} + +// GetChainScheme return chain scheme by scheme +func GetChainScheme(scheme string) CrossChainScheme { + switch scheme { + case XuperScheme: + return &CrossXuperScheme{} + default: + return &CrossXuperScheme{} + } +} diff --git a/kernel/contract/bridge/pb/contract.pb.go b/kernel/contract/bridge/pb/contract.pb.go index 65ba891e..b22731bb 100644 --- a/kernel/contract/bridge/pb/contract.pb.go +++ b/kernel/contract/bridge/pb/contract.pb.go @@ -1,1370 +1,1795 @@ // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0-rc.1 +// protoc v3.19.0 // source: contract.proto package pb import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - math "math" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +type XChainErrorEnum int32 + +const ( + XChainErrorEnum_SUCCESS XChainErrorEnum = 0 + XChainErrorEnum_UNKNOW_ERROR XChainErrorEnum = 1 + XChainErrorEnum_CONNECT_REFUSE XChainErrorEnum = 2 + XChainErrorEnum_NOT_ENOUGH_UTXO_ERROR XChainErrorEnum = 3 + XChainErrorEnum_UTXOVM_ALREADY_UNCONFIRM_ERROR XChainErrorEnum = 4 + XChainErrorEnum_UTXOVM_NOT_FOUND_ERROR XChainErrorEnum = 5 + XChainErrorEnum_INPUT_OUTPUT_NOT_EQUAL_ERROR XChainErrorEnum = 6 + XChainErrorEnum_TX_NOT_FOUND_ERROR XChainErrorEnum = 7 + XChainErrorEnum_TX_SIGN_ERROR XChainErrorEnum = 8 + XChainErrorEnum_BLOCKCHAIN_NOTEXIST XChainErrorEnum = 9 + XChainErrorEnum_VALIDATE_ERROR XChainErrorEnum = 10 + XChainErrorEnum_CANNOT_SYNC_BLOCK_ERROR XChainErrorEnum = 11 + XChainErrorEnum_CONFIRM_BLOCK_ERROR XChainErrorEnum = 12 + XChainErrorEnum_UTXOVM_PLAY_ERROR XChainErrorEnum = 13 + XChainErrorEnum_WALK_ERROR XChainErrorEnum = 14 + XChainErrorEnum_NOT_READY_ERROR XChainErrorEnum = 15 + XChainErrorEnum_BLOCK_EXIST_ERROR XChainErrorEnum = 16 + XChainErrorEnum_ROOT_BLOCK_EXIST_ERROR XChainErrorEnum = 17 + XChainErrorEnum_TX_DUPLICATE_ERROR XChainErrorEnum = 19 + XChainErrorEnum_SERVICE_REFUSED_ERROR XChainErrorEnum = 20 + XChainErrorEnum_TXDATA_SIGN_ERROR XChainErrorEnum = 21 + XChainErrorEnum_TX_SLE_ERROR XChainErrorEnum = 25 + XChainErrorEnum_TX_FEE_NOT_ENOUGH_ERROR XChainErrorEnum = 26 + XChainErrorEnum_UTXO_SIGN_ERROR XChainErrorEnum = 28 + XChainErrorEnum_DPOS_QUERY_ERROR XChainErrorEnum = 31 + XChainErrorEnum_RWSET_INVALID_ERROR XChainErrorEnum = 33 + XChainErrorEnum_RWACL_INVALID_ERROR XChainErrorEnum = 34 + XChainErrorEnum_GAS_NOT_ENOUGH_ERROR XChainErrorEnum = 35 + XChainErrorEnum_TX_VERSION_INVALID_ERROR XChainErrorEnum = 36 + XChainErrorEnum_COMPLIANCE_CHECK_NOT_APPROVED XChainErrorEnum = 37 + XChainErrorEnum_ACCOUNT_CONTRACT_STATUS_ERROR XChainErrorEnum = 38 + XChainErrorEnum_TX_VERIFICATION_ERROR XChainErrorEnum = 40 +) -type PingRequest struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +// Enum value maps for XChainErrorEnum. +var ( + XChainErrorEnum_name = map[int32]string{ + 0: "SUCCESS", + 1: "UNKNOW_ERROR", + 2: "CONNECT_REFUSE", + 3: "NOT_ENOUGH_UTXO_ERROR", + 4: "UTXOVM_ALREADY_UNCONFIRM_ERROR", + 5: "UTXOVM_NOT_FOUND_ERROR", + 6: "INPUT_OUTPUT_NOT_EQUAL_ERROR", + 7: "TX_NOT_FOUND_ERROR", + 8: "TX_SIGN_ERROR", + 9: "BLOCKCHAIN_NOTEXIST", + 10: "VALIDATE_ERROR", + 11: "CANNOT_SYNC_BLOCK_ERROR", + 12: "CONFIRM_BLOCK_ERROR", + 13: "UTXOVM_PLAY_ERROR", + 14: "WALK_ERROR", + 15: "NOT_READY_ERROR", + 16: "BLOCK_EXIST_ERROR", + 17: "ROOT_BLOCK_EXIST_ERROR", + 19: "TX_DUPLICATE_ERROR", + 20: "SERVICE_REFUSED_ERROR", + 21: "TXDATA_SIGN_ERROR", + 25: "TX_SLE_ERROR", + 26: "TX_FEE_NOT_ENOUGH_ERROR", + 28: "UTXO_SIGN_ERROR", + 31: "DPOS_QUERY_ERROR", + 33: "RWSET_INVALID_ERROR", + 34: "RWACL_INVALID_ERROR", + 35: "GAS_NOT_ENOUGH_ERROR", + 36: "TX_VERSION_INVALID_ERROR", + 37: "COMPLIANCE_CHECK_NOT_APPROVED", + 38: "ACCOUNT_CONTRACT_STATUS_ERROR", + 40: "TX_VERIFICATION_ERROR", + } + XChainErrorEnum_value = map[string]int32{ + "SUCCESS": 0, + "UNKNOW_ERROR": 1, + "CONNECT_REFUSE": 2, + "NOT_ENOUGH_UTXO_ERROR": 3, + "UTXOVM_ALREADY_UNCONFIRM_ERROR": 4, + "UTXOVM_NOT_FOUND_ERROR": 5, + "INPUT_OUTPUT_NOT_EQUAL_ERROR": 6, + "TX_NOT_FOUND_ERROR": 7, + "TX_SIGN_ERROR": 8, + "BLOCKCHAIN_NOTEXIST": 9, + "VALIDATE_ERROR": 10, + "CANNOT_SYNC_BLOCK_ERROR": 11, + "CONFIRM_BLOCK_ERROR": 12, + "UTXOVM_PLAY_ERROR": 13, + "WALK_ERROR": 14, + "NOT_READY_ERROR": 15, + "BLOCK_EXIST_ERROR": 16, + "ROOT_BLOCK_EXIST_ERROR": 17, + "TX_DUPLICATE_ERROR": 19, + "SERVICE_REFUSED_ERROR": 20, + "TXDATA_SIGN_ERROR": 21, + "TX_SLE_ERROR": 25, + "TX_FEE_NOT_ENOUGH_ERROR": 26, + "UTXO_SIGN_ERROR": 28, + "DPOS_QUERY_ERROR": 31, + "RWSET_INVALID_ERROR": 33, + "RWACL_INVALID_ERROR": 34, + "GAS_NOT_ENOUGH_ERROR": 35, + "TX_VERSION_INVALID_ERROR": 36, + "COMPLIANCE_CHECK_NOT_APPROVED": 37, + "ACCOUNT_CONTRACT_STATUS_ERROR": 38, + "TX_VERIFICATION_ERROR": 40, + } +) + +func (x XChainErrorEnum) Enum() *XChainErrorEnum { + p := new(XChainErrorEnum) + *p = x + return p } -func (m *PingRequest) Reset() { *m = PingRequest{} } -func (m *PingRequest) String() string { return proto.CompactTextString(m) } -func (*PingRequest) ProtoMessage() {} -func (*PingRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d19debeba7dea55a, []int{0} +func (x XChainErrorEnum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (m *PingRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PingRequest.Unmarshal(m, b) +func (XChainErrorEnum) Descriptor() protoreflect.EnumDescriptor { + return file_contract_proto_enumTypes[0].Descriptor() } -func (m *PingRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PingRequest.Marshal(b, m, deterministic) + +func (XChainErrorEnum) Type() protoreflect.EnumType { + return &file_contract_proto_enumTypes[0] } -func (m *PingRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_PingRequest.Merge(m, src) + +func (x XChainErrorEnum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } -func (m *PingRequest) XXX_Size() int { - return xxx_messageInfo_PingRequest.Size(m) + +// Deprecated: Use XChainErrorEnum.Descriptor instead. +func (XChainErrorEnum) EnumDescriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{0} } -func (m *PingRequest) XXX_DiscardUnknown() { - xxx_messageInfo_PingRequest.DiscardUnknown(m) + +type ResourceType int32 + +const ( + ResourceType_CPU ResourceType = 0 + ResourceType_MEMORY ResourceType = 1 + ResourceType_DISK ResourceType = 2 + ResourceType_XFEE ResourceType = 3 // the fee used in kernel contract +) + +// Enum value maps for ResourceType. +var ( + ResourceType_name = map[int32]string{ + 0: "CPU", + 1: "MEMORY", + 2: "DISK", + 3: "XFEE", + } + ResourceType_value = map[string]int32{ + "CPU": 0, + "MEMORY": 1, + "DISK": 2, + "XFEE": 3, + } +) + +func (x ResourceType) Enum() *ResourceType { + p := new(ResourceType) + *p = x + return p } -var xxx_messageInfo_PingRequest proto.InternalMessageInfo +func (x ResourceType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} -type PingResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +func (ResourceType) Descriptor() protoreflect.EnumDescriptor { + return file_contract_proto_enumTypes[1].Descriptor() } -func (m *PingResponse) Reset() { *m = PingResponse{} } -func (m *PingResponse) String() string { return proto.CompactTextString(m) } -func (*PingResponse) ProtoMessage() {} -func (*PingResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d19debeba7dea55a, []int{1} +func (ResourceType) Type() protoreflect.EnumType { + return &file_contract_proto_enumTypes[1] } -func (m *PingResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PingResponse.Unmarshal(m, b) +func (x ResourceType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } -func (m *PingResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PingResponse.Marshal(b, m, deterministic) + +// Deprecated: Use ResourceType.Descriptor instead. +func (ResourceType) EnumDescriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{1} } -func (m *PingResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_PingResponse.Merge(m, src) + +type PingRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *PingResponse) XXX_Size() int { - return xxx_messageInfo_PingResponse.Size(m) + +func (x *PingRequest) Reset() { + *x = PingRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *PingResponse) XXX_DiscardUnknown() { - xxx_messageInfo_PingResponse.DiscardUnknown(m) + +func (x *PingRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_PingResponse proto.InternalMessageInfo +func (*PingRequest) ProtoMessage() {} -type NativeCallRequest struct { - // The context id of this request - Ctxid int64 `protobuf:"varint,1,opt,name=ctxid,proto3" json:"ctxid,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +func (x *PingRequest) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *NativeCallRequest) Reset() { *m = NativeCallRequest{} } -func (m *NativeCallRequest) String() string { return proto.CompactTextString(m) } -func (*NativeCallRequest) ProtoMessage() {} -func (*NativeCallRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d19debeba7dea55a, []int{2} +// Deprecated: Use PingRequest.ProtoReflect.Descriptor instead. +func (*PingRequest) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{0} } -func (m *NativeCallRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_NativeCallRequest.Unmarshal(m, b) +type PingResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *NativeCallRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_NativeCallRequest.Marshal(b, m, deterministic) + +func (x *PingResponse) Reset() { + *x = PingResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *NativeCallRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_NativeCallRequest.Merge(m, src) + +func (x *PingResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *NativeCallRequest) XXX_Size() int { - return xxx_messageInfo_NativeCallRequest.Size(m) + +func (*PingResponse) ProtoMessage() {} + +func (x *PingResponse) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *NativeCallRequest) XXX_DiscardUnknown() { - xxx_messageInfo_NativeCallRequest.DiscardUnknown(m) + +// Deprecated: Use PingResponse.ProtoReflect.Descriptor instead. +func (*PingResponse) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{1} } -var xxx_messageInfo_NativeCallRequest proto.InternalMessageInfo +type NativeCallRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The context id of this request + Ctxid int64 `protobuf:"varint,1,opt,name=ctxid,proto3" json:"ctxid,omitempty"` +} -func (m *NativeCallRequest) GetCtxid() int64 { - if m != nil { - return m.Ctxid +func (x *NativeCallRequest) Reset() { + *x = NativeCallRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return 0 } -type NativeCallResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +func (x *NativeCallRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *NativeCallResponse) Reset() { *m = NativeCallResponse{} } -func (m *NativeCallResponse) String() string { return proto.CompactTextString(m) } -func (*NativeCallResponse) ProtoMessage() {} -func (*NativeCallResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d19debeba7dea55a, []int{3} +func (*NativeCallRequest) ProtoMessage() {} + +func (x *NativeCallRequest) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *NativeCallResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_NativeCallResponse.Unmarshal(m, b) +// Deprecated: Use NativeCallRequest.ProtoReflect.Descriptor instead. +func (*NativeCallRequest) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{2} } -func (m *NativeCallResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_NativeCallResponse.Marshal(b, m, deterministic) + +func (x *NativeCallRequest) GetCtxid() int64 { + if x != nil { + return x.Ctxid + } + return 0 } -func (m *NativeCallResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_NativeCallResponse.Merge(m, src) + +type NativeCallResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *NativeCallResponse) XXX_Size() int { - return xxx_messageInfo_NativeCallResponse.Size(m) + +func (x *NativeCallResponse) Reset() { + *x = NativeCallResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *NativeCallResponse) XXX_DiscardUnknown() { - xxx_messageInfo_NativeCallResponse.DiscardUnknown(m) + +func (x *NativeCallResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_NativeCallResponse proto.InternalMessageInfo +func (*NativeCallResponse) ProtoMessage() {} -type ArgPair struct { - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +func (x *NativeCallResponse) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *ArgPair) Reset() { *m = ArgPair{} } -func (m *ArgPair) String() string { return proto.CompactTextString(m) } -func (*ArgPair) ProtoMessage() {} -func (*ArgPair) Descriptor() ([]byte, []int) { - return fileDescriptor_d19debeba7dea55a, []int{4} +// Deprecated: Use NativeCallResponse.ProtoReflect.Descriptor instead. +func (*NativeCallResponse) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{3} } -func (m *ArgPair) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ArgPair.Unmarshal(m, b) -} -func (m *ArgPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ArgPair.Marshal(b, m, deterministic) +type ArgPair struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` } -func (m *ArgPair) XXX_Merge(src proto.Message) { - xxx_messageInfo_ArgPair.Merge(m, src) + +func (x *ArgPair) Reset() { + *x = ArgPair{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ArgPair) XXX_Size() int { - return xxx_messageInfo_ArgPair.Size(m) + +func (x *ArgPair) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ArgPair) XXX_DiscardUnknown() { - xxx_messageInfo_ArgPair.DiscardUnknown(m) + +func (*ArgPair) ProtoMessage() {} + +func (x *ArgPair) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_ArgPair proto.InternalMessageInfo +// Deprecated: Use ArgPair.ProtoReflect.Descriptor instead. +func (*ArgPair) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{4} +} -func (m *ArgPair) GetKey() string { - if m != nil { - return m.Key +func (x *ArgPair) GetKey() string { + if x != nil { + return x.Key } return "" } -func (m *ArgPair) GetValue() []byte { - if m != nil { - return m.Value +func (x *ArgPair) GetValue() []byte { + if x != nil { + return x.Value } return nil } type CallArgs struct { - Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"` - Args []*ArgPair `protobuf:"bytes,2,rep,name=args,proto3" json:"args,omitempty"` - Initiator string `protobuf:"bytes,3,opt,name=initiator,proto3" json:"initiator,omitempty"` - AuthRequire []string `protobuf:"bytes,4,rep,name=auth_require,json=authRequire,proto3" json:"auth_require,omitempty"` - TransferAmount string `protobuf:"bytes,5,opt,name=transfer_amount,json=transferAmount,proto3" json:"transfer_amount,omitempty"` - Caller string `protobuf:"bytes,6,opt,name=caller,proto3" json:"caller,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CallArgs) Reset() { *m = CallArgs{} } -func (m *CallArgs) String() string { return proto.CompactTextString(m) } -func (*CallArgs) ProtoMessage() {} -func (*CallArgs) Descriptor() ([]byte, []int) { - return fileDescriptor_d19debeba7dea55a, []int{5} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"` + Args []*ArgPair `protobuf:"bytes,2,rep,name=args,proto3" json:"args,omitempty"` + Initiator string `protobuf:"bytes,3,opt,name=initiator,proto3" json:"initiator,omitempty"` + AuthRequire []string `protobuf:"bytes,4,rep,name=auth_require,json=authRequire,proto3" json:"auth_require,omitempty"` + TransferAmount string `protobuf:"bytes,5,opt,name=transfer_amount,json=transferAmount,proto3" json:"transfer_amount,omitempty"` + Caller string `protobuf:"bytes,6,opt,name=caller,proto3" json:"caller,omitempty"` +} + +func (x *CallArgs) Reset() { + *x = CallArgs{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *CallArgs) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CallArgs.Unmarshal(m, b) -} -func (m *CallArgs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CallArgs.Marshal(b, m, deterministic) -} -func (m *CallArgs) XXX_Merge(src proto.Message) { - xxx_messageInfo_CallArgs.Merge(m, src) -} -func (m *CallArgs) XXX_Size() int { - return xxx_messageInfo_CallArgs.Size(m) +func (x *CallArgs) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *CallArgs) XXX_DiscardUnknown() { - xxx_messageInfo_CallArgs.DiscardUnknown(m) + +func (*CallArgs) ProtoMessage() {} + +func (x *CallArgs) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_CallArgs proto.InternalMessageInfo +// Deprecated: Use CallArgs.ProtoReflect.Descriptor instead. +func (*CallArgs) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{5} +} -func (m *CallArgs) GetMethod() string { - if m != nil { - return m.Method +func (x *CallArgs) GetMethod() string { + if x != nil { + return x.Method } return "" } -func (m *CallArgs) GetArgs() []*ArgPair { - if m != nil { - return m.Args +func (x *CallArgs) GetArgs() []*ArgPair { + if x != nil { + return x.Args } return nil } -func (m *CallArgs) GetInitiator() string { - if m != nil { - return m.Initiator +func (x *CallArgs) GetInitiator() string { + if x != nil { + return x.Initiator } return "" } -func (m *CallArgs) GetAuthRequire() []string { - if m != nil { - return m.AuthRequire +func (x *CallArgs) GetAuthRequire() []string { + if x != nil { + return x.AuthRequire } return nil } -func (m *CallArgs) GetTransferAmount() string { - if m != nil { - return m.TransferAmount +func (x *CallArgs) GetTransferAmount() string { + if x != nil { + return x.TransferAmount } return "" } -func (m *CallArgs) GetCaller() string { - if m != nil { - return m.Caller +func (x *CallArgs) GetCaller() string { + if x != nil { + return x.Caller } return "" } type SyscallHeader struct { - Ctxid int64 `protobuf:"varint,1,opt,name=ctxid,proto3" json:"ctxid,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *SyscallHeader) Reset() { *m = SyscallHeader{} } -func (m *SyscallHeader) String() string { return proto.CompactTextString(m) } -func (*SyscallHeader) ProtoMessage() {} -func (*SyscallHeader) Descriptor() ([]byte, []int) { - return fileDescriptor_d19debeba7dea55a, []int{6} + Ctxid int64 `protobuf:"varint,1,opt,name=ctxid,proto3" json:"ctxid,omitempty"` } -func (m *SyscallHeader) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SyscallHeader.Unmarshal(m, b) -} -func (m *SyscallHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SyscallHeader.Marshal(b, m, deterministic) -} -func (m *SyscallHeader) XXX_Merge(src proto.Message) { - xxx_messageInfo_SyscallHeader.Merge(m, src) +func (x *SyscallHeader) Reset() { + *x = SyscallHeader{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *SyscallHeader) XXX_Size() int { - return xxx_messageInfo_SyscallHeader.Size(m) + +func (x *SyscallHeader) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SyscallHeader) XXX_DiscardUnknown() { - xxx_messageInfo_SyscallHeader.DiscardUnknown(m) + +func (*SyscallHeader) ProtoMessage() {} + +func (x *SyscallHeader) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SyscallHeader proto.InternalMessageInfo +// Deprecated: Use SyscallHeader.ProtoReflect.Descriptor instead. +func (*SyscallHeader) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{6} +} -func (m *SyscallHeader) GetCtxid() int64 { - if m != nil { - return m.Ctxid +func (x *SyscallHeader) GetCtxid() int64 { + if x != nil { + return x.Ctxid } return 0 } type PutRequest struct { - Header *SyscallHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` - Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *PutRequest) Reset() { *m = PutRequest{} } -func (m *PutRequest) String() string { return proto.CompactTextString(m) } -func (*PutRequest) ProtoMessage() {} -func (*PutRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d19debeba7dea55a, []int{7} + Header *SyscallHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` + Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` } -func (m *PutRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PutRequest.Unmarshal(m, b) -} -func (m *PutRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PutRequest.Marshal(b, m, deterministic) -} -func (m *PutRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_PutRequest.Merge(m, src) +func (x *PutRequest) Reset() { + *x = PutRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *PutRequest) XXX_Size() int { - return xxx_messageInfo_PutRequest.Size(m) + +func (x *PutRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *PutRequest) XXX_DiscardUnknown() { - xxx_messageInfo_PutRequest.DiscardUnknown(m) + +func (*PutRequest) ProtoMessage() {} + +func (x *PutRequest) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_PutRequest proto.InternalMessageInfo +// Deprecated: Use PutRequest.ProtoReflect.Descriptor instead. +func (*PutRequest) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{7} +} -func (m *PutRequest) GetHeader() *SyscallHeader { - if m != nil { - return m.Header +func (x *PutRequest) GetHeader() *SyscallHeader { + if x != nil { + return x.Header } return nil } -func (m *PutRequest) GetKey() []byte { - if m != nil { - return m.Key +func (x *PutRequest) GetKey() []byte { + if x != nil { + return x.Key } return nil } -func (m *PutRequest) GetValue() []byte { - if m != nil { - return m.Value +func (x *PutRequest) GetValue() []byte { + if x != nil { + return x.Value } return nil } type PutResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *PutResponse) Reset() { *m = PutResponse{} } -func (m *PutResponse) String() string { return proto.CompactTextString(m) } -func (*PutResponse) ProtoMessage() {} -func (*PutResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d19debeba7dea55a, []int{8} +func (x *PutResponse) Reset() { + *x = PutResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *PutResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PutResponse.Unmarshal(m, b) -} -func (m *PutResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PutResponse.Marshal(b, m, deterministic) -} -func (m *PutResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_PutResponse.Merge(m, src) -} -func (m *PutResponse) XXX_Size() int { - return xxx_messageInfo_PutResponse.Size(m) -} -func (m *PutResponse) XXX_DiscardUnknown() { - xxx_messageInfo_PutResponse.DiscardUnknown(m) +func (x *PutResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_PutResponse proto.InternalMessageInfo +func (*PutResponse) ProtoMessage() {} -type GetRequest struct { - Header *SyscallHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +func (x *PutResponse) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *GetRequest) Reset() { *m = GetRequest{} } -func (m *GetRequest) String() string { return proto.CompactTextString(m) } -func (*GetRequest) ProtoMessage() {} -func (*GetRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d19debeba7dea55a, []int{9} +// Deprecated: Use PutResponse.ProtoReflect.Descriptor instead. +func (*PutResponse) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{8} } -func (m *GetRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetRequest.Unmarshal(m, b) -} -func (m *GetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetRequest.Marshal(b, m, deterministic) +type GetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Header *SyscallHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` } -func (m *GetRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetRequest.Merge(m, src) + +func (x *GetRequest) Reset() { + *x = GetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *GetRequest) XXX_Size() int { - return xxx_messageInfo_GetRequest.Size(m) + +func (x *GetRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetRequest.DiscardUnknown(m) + +func (*GetRequest) ProtoMessage() {} + +func (x *GetRequest) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_GetRequest proto.InternalMessageInfo +// Deprecated: Use GetRequest.ProtoReflect.Descriptor instead. +func (*GetRequest) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{9} +} -func (m *GetRequest) GetHeader() *SyscallHeader { - if m != nil { - return m.Header +func (x *GetRequest) GetHeader() *SyscallHeader { + if x != nil { + return x.Header } return nil } -func (m *GetRequest) GetKey() []byte { - if m != nil { - return m.Key +func (x *GetRequest) GetKey() []byte { + if x != nil { + return x.Key } return nil } type GetResponse struct { - Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *GetResponse) Reset() { *m = GetResponse{} } -func (m *GetResponse) String() string { return proto.CompactTextString(m) } -func (*GetResponse) ProtoMessage() {} -func (*GetResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d19debeba7dea55a, []int{10} + Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` } -func (m *GetResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetResponse.Unmarshal(m, b) -} -func (m *GetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetResponse.Marshal(b, m, deterministic) -} -func (m *GetResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetResponse.Merge(m, src) +func (x *GetResponse) Reset() { + *x = GetResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *GetResponse) XXX_Size() int { - return xxx_messageInfo_GetResponse.Size(m) + +func (x *GetResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetResponse.DiscardUnknown(m) + +func (*GetResponse) ProtoMessage() {} + +func (x *GetResponse) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_GetResponse proto.InternalMessageInfo +// Deprecated: Use GetResponse.ProtoReflect.Descriptor instead. +func (*GetResponse) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{10} +} -func (m *GetResponse) GetValue() []byte { - if m != nil { - return m.Value +func (x *GetResponse) GetValue() []byte { + if x != nil { + return x.Value } return nil } type DeleteRequest struct { - Header *SyscallHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *DeleteRequest) Reset() { *m = DeleteRequest{} } -func (m *DeleteRequest) String() string { return proto.CompactTextString(m) } -func (*DeleteRequest) ProtoMessage() {} -func (*DeleteRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d19debeba7dea55a, []int{11} + Header *SyscallHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` } -func (m *DeleteRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteRequest.Unmarshal(m, b) -} -func (m *DeleteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteRequest.Marshal(b, m, deterministic) -} -func (m *DeleteRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteRequest.Merge(m, src) +func (x *DeleteRequest) Reset() { + *x = DeleteRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *DeleteRequest) XXX_Size() int { - return xxx_messageInfo_DeleteRequest.Size(m) + +func (x *DeleteRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *DeleteRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteRequest.DiscardUnknown(m) + +func (*DeleteRequest) ProtoMessage() {} + +func (x *DeleteRequest) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_DeleteRequest proto.InternalMessageInfo +// Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead. +func (*DeleteRequest) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{11} +} -func (m *DeleteRequest) GetHeader() *SyscallHeader { - if m != nil { - return m.Header +func (x *DeleteRequest) GetHeader() *SyscallHeader { + if x != nil { + return x.Header } return nil } -func (m *DeleteRequest) GetKey() []byte { - if m != nil { - return m.Key +func (x *DeleteRequest) GetKey() []byte { + if x != nil { + return x.Key } return nil } type DeleteResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *DeleteResponse) Reset() { *m = DeleteResponse{} } -func (m *DeleteResponse) String() string { return proto.CompactTextString(m) } -func (*DeleteResponse) ProtoMessage() {} -func (*DeleteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d19debeba7dea55a, []int{12} +func (x *DeleteResponse) Reset() { + *x = DeleteResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *DeleteResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteResponse.Unmarshal(m, b) -} -func (m *DeleteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteResponse.Marshal(b, m, deterministic) +func (x *DeleteResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *DeleteResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteResponse.Merge(m, src) -} -func (m *DeleteResponse) XXX_Size() int { - return xxx_messageInfo_DeleteResponse.Size(m) -} -func (m *DeleteResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteResponse.DiscardUnknown(m) + +func (*DeleteResponse) ProtoMessage() {} + +func (x *DeleteResponse) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_DeleteResponse proto.InternalMessageInfo +// Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead. +func (*DeleteResponse) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{12} +} type IteratorRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + Header *SyscallHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` // start和limit为[start, limit) Start []byte `protobuf:"bytes,2,opt,name=start,proto3" json:"start,omitempty"` Limit []byte `protobuf:"bytes,3,opt,name=limit,proto3" json:"limit,omitempty"` // cap代表一次请求的最大IteratorItem个数,如果为0则采用xchain的默认配置 - Cap int32 `protobuf:"varint,4,opt,name=cap,proto3" json:"cap,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Cap int32 `protobuf:"varint,4,opt,name=cap,proto3" json:"cap,omitempty"` } -func (m *IteratorRequest) Reset() { *m = IteratorRequest{} } -func (m *IteratorRequest) String() string { return proto.CompactTextString(m) } -func (*IteratorRequest) ProtoMessage() {} -func (*IteratorRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d19debeba7dea55a, []int{13} +func (x *IteratorRequest) Reset() { + *x = IteratorRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *IteratorRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_IteratorRequest.Unmarshal(m, b) -} -func (m *IteratorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_IteratorRequest.Marshal(b, m, deterministic) -} -func (m *IteratorRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_IteratorRequest.Merge(m, src) +func (x *IteratorRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *IteratorRequest) XXX_Size() int { - return xxx_messageInfo_IteratorRequest.Size(m) -} -func (m *IteratorRequest) XXX_DiscardUnknown() { - xxx_messageInfo_IteratorRequest.DiscardUnknown(m) + +func (*IteratorRequest) ProtoMessage() {} + +func (x *IteratorRequest) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_IteratorRequest proto.InternalMessageInfo +// Deprecated: Use IteratorRequest.ProtoReflect.Descriptor instead. +func (*IteratorRequest) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{13} +} -func (m *IteratorRequest) GetHeader() *SyscallHeader { - if m != nil { - return m.Header +func (x *IteratorRequest) GetHeader() *SyscallHeader { + if x != nil { + return x.Header } return nil } -func (m *IteratorRequest) GetStart() []byte { - if m != nil { - return m.Start +func (x *IteratorRequest) GetStart() []byte { + if x != nil { + return x.Start } return nil } -func (m *IteratorRequest) GetLimit() []byte { - if m != nil { - return m.Limit +func (x *IteratorRequest) GetLimit() []byte { + if x != nil { + return x.Limit } return nil } -func (m *IteratorRequest) GetCap() int32 { - if m != nil { - return m.Cap +func (x *IteratorRequest) GetCap() int32 { + if x != nil { + return x.Cap } return 0 } type IteratorItem struct { - Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *IteratorItem) Reset() { *m = IteratorItem{} } -func (m *IteratorItem) String() string { return proto.CompactTextString(m) } -func (*IteratorItem) ProtoMessage() {} -func (*IteratorItem) Descriptor() ([]byte, []int) { - return fileDescriptor_d19debeba7dea55a, []int{14} + Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` } -func (m *IteratorItem) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_IteratorItem.Unmarshal(m, b) -} -func (m *IteratorItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_IteratorItem.Marshal(b, m, deterministic) -} -func (m *IteratorItem) XXX_Merge(src proto.Message) { - xxx_messageInfo_IteratorItem.Merge(m, src) +func (x *IteratorItem) Reset() { + *x = IteratorItem{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *IteratorItem) XXX_Size() int { - return xxx_messageInfo_IteratorItem.Size(m) + +func (x *IteratorItem) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *IteratorItem) XXX_DiscardUnknown() { - xxx_messageInfo_IteratorItem.DiscardUnknown(m) + +func (*IteratorItem) ProtoMessage() {} + +func (x *IteratorItem) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_IteratorItem proto.InternalMessageInfo +// Deprecated: Use IteratorItem.ProtoReflect.Descriptor instead. +func (*IteratorItem) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{14} +} -func (m *IteratorItem) GetKey() []byte { - if m != nil { - return m.Key +func (x *IteratorItem) GetKey() []byte { + if x != nil { + return x.Key } return nil } -func (m *IteratorItem) GetValue() []byte { - if m != nil { - return m.Value +func (x *IteratorItem) GetValue() []byte { + if x != nil { + return x.Value } return nil } type IteratorResponse struct { - Items []*IteratorItem `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *IteratorResponse) Reset() { *m = IteratorResponse{} } -func (m *IteratorResponse) String() string { return proto.CompactTextString(m) } -func (*IteratorResponse) ProtoMessage() {} -func (*IteratorResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d19debeba7dea55a, []int{15} + Items []*IteratorItem `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` } -func (m *IteratorResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_IteratorResponse.Unmarshal(m, b) -} -func (m *IteratorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_IteratorResponse.Marshal(b, m, deterministic) -} -func (m *IteratorResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_IteratorResponse.Merge(m, src) +func (x *IteratorResponse) Reset() { + *x = IteratorResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *IteratorResponse) XXX_Size() int { - return xxx_messageInfo_IteratorResponse.Size(m) + +func (x *IteratorResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *IteratorResponse) XXX_DiscardUnknown() { - xxx_messageInfo_IteratorResponse.DiscardUnknown(m) + +func (*IteratorResponse) ProtoMessage() {} + +func (x *IteratorResponse) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_IteratorResponse proto.InternalMessageInfo +// Deprecated: Use IteratorResponse.ProtoReflect.Descriptor instead. +func (*IteratorResponse) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{15} +} -func (m *IteratorResponse) GetItems() []*IteratorItem { - if m != nil { - return m.Items +func (x *IteratorResponse) GetItems() []*IteratorItem { + if x != nil { + return x.Items } return nil } type QueryTxRequest struct { - Header *SyscallHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - Txid string `protobuf:"bytes,2,opt,name=txid,proto3" json:"txid,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *QueryTxRequest) Reset() { *m = QueryTxRequest{} } -func (m *QueryTxRequest) String() string { return proto.CompactTextString(m) } -func (*QueryTxRequest) ProtoMessage() {} -func (*QueryTxRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d19debeba7dea55a, []int{16} + Header *SyscallHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + Txid string `protobuf:"bytes,2,opt,name=txid,proto3" json:"txid,omitempty"` } -func (m *QueryTxRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_QueryTxRequest.Unmarshal(m, b) -} -func (m *QueryTxRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_QueryTxRequest.Marshal(b, m, deterministic) -} -func (m *QueryTxRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryTxRequest.Merge(m, src) +func (x *QueryTxRequest) Reset() { + *x = QueryTxRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *QueryTxRequest) XXX_Size() int { - return xxx_messageInfo_QueryTxRequest.Size(m) + +func (x *QueryTxRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *QueryTxRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryTxRequest.DiscardUnknown(m) + +func (*QueryTxRequest) ProtoMessage() {} + +func (x *QueryTxRequest) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_QueryTxRequest proto.InternalMessageInfo +// Deprecated: Use QueryTxRequest.ProtoReflect.Descriptor instead. +func (*QueryTxRequest) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{16} +} -func (m *QueryTxRequest) GetHeader() *SyscallHeader { - if m != nil { - return m.Header +func (x *QueryTxRequest) GetHeader() *SyscallHeader { + if x != nil { + return x.Header } return nil } -func (m *QueryTxRequest) GetTxid() string { - if m != nil { - return m.Txid +func (x *QueryTxRequest) GetTxid() string { + if x != nil { + return x.Txid } return "" } type QueryTxResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // defined in user code - Tx *Transaction `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Tx *Transaction `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"` } -func (m *QueryTxResponse) Reset() { *m = QueryTxResponse{} } -func (m *QueryTxResponse) String() string { return proto.CompactTextString(m) } -func (*QueryTxResponse) ProtoMessage() {} -func (*QueryTxResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d19debeba7dea55a, []int{17} +func (x *QueryTxResponse) Reset() { + *x = QueryTxResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *QueryTxResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_QueryTxResponse.Unmarshal(m, b) -} -func (m *QueryTxResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_QueryTxResponse.Marshal(b, m, deterministic) +func (x *QueryTxResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *QueryTxResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryTxResponse.Merge(m, src) -} -func (m *QueryTxResponse) XXX_Size() int { - return xxx_messageInfo_QueryTxResponse.Size(m) -} -func (m *QueryTxResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryTxResponse.DiscardUnknown(m) + +func (*QueryTxResponse) ProtoMessage() {} + +func (x *QueryTxResponse) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_QueryTxResponse proto.InternalMessageInfo +// Deprecated: Use QueryTxResponse.ProtoReflect.Descriptor instead. +func (*QueryTxResponse) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{17} +} -func (m *QueryTxResponse) GetTx() *Transaction { - if m != nil { - return m.Tx +func (x *QueryTxResponse) GetTx() *Transaction { + if x != nil { + return x.Tx } return nil } type QueryBlockRequest struct { - Header *SyscallHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - Blockid string `protobuf:"bytes,2,opt,name=blockid,proto3" json:"blockid,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *QueryBlockRequest) Reset() { *m = QueryBlockRequest{} } -func (m *QueryBlockRequest) String() string { return proto.CompactTextString(m) } -func (*QueryBlockRequest) ProtoMessage() {} -func (*QueryBlockRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d19debeba7dea55a, []int{18} + Header *SyscallHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + Blockid string `protobuf:"bytes,2,opt,name=blockid,proto3" json:"blockid,omitempty"` } -func (m *QueryBlockRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_QueryBlockRequest.Unmarshal(m, b) -} -func (m *QueryBlockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_QueryBlockRequest.Marshal(b, m, deterministic) -} -func (m *QueryBlockRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryBlockRequest.Merge(m, src) +func (x *QueryBlockRequest) Reset() { + *x = QueryBlockRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *QueryBlockRequest) XXX_Size() int { - return xxx_messageInfo_QueryBlockRequest.Size(m) + +func (x *QueryBlockRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *QueryBlockRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryBlockRequest.DiscardUnknown(m) + +func (*QueryBlockRequest) ProtoMessage() {} + +func (x *QueryBlockRequest) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_QueryBlockRequest proto.InternalMessageInfo +// Deprecated: Use QueryBlockRequest.ProtoReflect.Descriptor instead. +func (*QueryBlockRequest) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{18} +} -func (m *QueryBlockRequest) GetHeader() *SyscallHeader { - if m != nil { - return m.Header +func (x *QueryBlockRequest) GetHeader() *SyscallHeader { + if x != nil { + return x.Header } return nil } -func (m *QueryBlockRequest) GetBlockid() string { - if m != nil { - return m.Blockid +func (x *QueryBlockRequest) GetBlockid() string { + if x != nil { + return x.Blockid } return "" } type QueryBlockResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // defined in user code - Block *Block `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Block *Block `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"` } -func (m *QueryBlockResponse) Reset() { *m = QueryBlockResponse{} } -func (m *QueryBlockResponse) String() string { return proto.CompactTextString(m) } -func (*QueryBlockResponse) ProtoMessage() {} -func (*QueryBlockResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d19debeba7dea55a, []int{19} +func (x *QueryBlockResponse) Reset() { + *x = QueryBlockResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *QueryBlockResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_QueryBlockResponse.Unmarshal(m, b) -} -func (m *QueryBlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_QueryBlockResponse.Marshal(b, m, deterministic) -} -func (m *QueryBlockResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryBlockResponse.Merge(m, src) -} -func (m *QueryBlockResponse) XXX_Size() int { - return xxx_messageInfo_QueryBlockResponse.Size(m) +func (x *QueryBlockResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *QueryBlockResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryBlockResponse.DiscardUnknown(m) + +func (*QueryBlockResponse) ProtoMessage() {} + +func (x *QueryBlockResponse) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_QueryBlockResponse proto.InternalMessageInfo +// Deprecated: Use QueryBlockResponse.ProtoReflect.Descriptor instead. +func (*QueryBlockResponse) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{19} +} -func (m *QueryBlockResponse) GetBlock() *Block { - if m != nil { - return m.Block +func (x *QueryBlockResponse) GetBlock() *Block { + if x != nil { + return x.Block } return nil } type TransferRequest struct { - Header *SyscallHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - From string `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` - To string `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` - Amount string `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *TransferRequest) Reset() { *m = TransferRequest{} } -func (m *TransferRequest) String() string { return proto.CompactTextString(m) } -func (*TransferRequest) ProtoMessage() {} -func (*TransferRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d19debeba7dea55a, []int{20} -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *TransferRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TransferRequest.Unmarshal(m, b) -} -func (m *TransferRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TransferRequest.Marshal(b, m, deterministic) + Header *SyscallHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + From string `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` + To string `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` + Amount string `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"` } -func (m *TransferRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransferRequest.Merge(m, src) + +func (x *TransferRequest) Reset() { + *x = TransferRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *TransferRequest) XXX_Size() int { - return xxx_messageInfo_TransferRequest.Size(m) + +func (x *TransferRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *TransferRequest) XXX_DiscardUnknown() { - xxx_messageInfo_TransferRequest.DiscardUnknown(m) + +func (*TransferRequest) ProtoMessage() {} + +func (x *TransferRequest) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_TransferRequest proto.InternalMessageInfo +// Deprecated: Use TransferRequest.ProtoReflect.Descriptor instead. +func (*TransferRequest) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{20} +} -func (m *TransferRequest) GetHeader() *SyscallHeader { - if m != nil { - return m.Header +func (x *TransferRequest) GetHeader() *SyscallHeader { + if x != nil { + return x.Header } return nil } -func (m *TransferRequest) GetFrom() string { - if m != nil { - return m.From +func (x *TransferRequest) GetFrom() string { + if x != nil { + return x.From } return "" } -func (m *TransferRequest) GetTo() string { - if m != nil { - return m.To +func (x *TransferRequest) GetTo() string { + if x != nil { + return x.To } return "" } -func (m *TransferRequest) GetAmount() string { - if m != nil { - return m.Amount +func (x *TransferRequest) GetAmount() string { + if x != nil { + return x.Amount } return "" } type TransferResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *TransferResponse) Reset() { *m = TransferResponse{} } -func (m *TransferResponse) String() string { return proto.CompactTextString(m) } -func (*TransferResponse) ProtoMessage() {} -func (*TransferResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d19debeba7dea55a, []int{21} +func (x *TransferResponse) Reset() { + *x = TransferResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *TransferResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TransferResponse.Unmarshal(m, b) -} -func (m *TransferResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TransferResponse.Marshal(b, m, deterministic) -} -func (m *TransferResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransferResponse.Merge(m, src) -} -func (m *TransferResponse) XXX_Size() int { - return xxx_messageInfo_TransferResponse.Size(m) -} -func (m *TransferResponse) XXX_DiscardUnknown() { - xxx_messageInfo_TransferResponse.DiscardUnknown(m) +func (x *TransferResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_TransferResponse proto.InternalMessageInfo +func (*TransferResponse) ProtoMessage() {} -type ContractCallRequest struct { - Header *SyscallHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - Module string `protobuf:"bytes,2,opt,name=module,proto3" json:"module,omitempty"` - Contract string `protobuf:"bytes,3,opt,name=contract,proto3" json:"contract,omitempty"` - Method string `protobuf:"bytes,4,opt,name=method,proto3" json:"method,omitempty"` - Args []*ArgPair `protobuf:"bytes,5,rep,name=args,proto3" json:"args,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ContractCallRequest) Reset() { *m = ContractCallRequest{} } -func (m *ContractCallRequest) String() string { return proto.CompactTextString(m) } -func (*ContractCallRequest) ProtoMessage() {} -func (*ContractCallRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d19debeba7dea55a, []int{22} +func (x *TransferResponse) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *ContractCallRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ContractCallRequest.Unmarshal(m, b) -} -func (m *ContractCallRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ContractCallRequest.Marshal(b, m, deterministic) +// Deprecated: Use TransferResponse.ProtoReflect.Descriptor instead. +func (*TransferResponse) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{21} } -func (m *ContractCallRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ContractCallRequest.Merge(m, src) + +type ContractCallRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Header *SyscallHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + Module string `protobuf:"bytes,2,opt,name=module,proto3" json:"module,omitempty"` + Contract string `protobuf:"bytes,3,opt,name=contract,proto3" json:"contract,omitempty"` + Method string `protobuf:"bytes,4,opt,name=method,proto3" json:"method,omitempty"` + Args []*ArgPair `protobuf:"bytes,5,rep,name=args,proto3" json:"args,omitempty"` +} + +func (x *ContractCallRequest) Reset() { + *x = ContractCallRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ContractCallRequest) XXX_Size() int { - return xxx_messageInfo_ContractCallRequest.Size(m) + +func (x *ContractCallRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ContractCallRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ContractCallRequest.DiscardUnknown(m) + +func (*ContractCallRequest) ProtoMessage() {} + +func (x *ContractCallRequest) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_ContractCallRequest proto.InternalMessageInfo +// Deprecated: Use ContractCallRequest.ProtoReflect.Descriptor instead. +func (*ContractCallRequest) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{22} +} -func (m *ContractCallRequest) GetHeader() *SyscallHeader { - if m != nil { - return m.Header +func (x *ContractCallRequest) GetHeader() *SyscallHeader { + if x != nil { + return x.Header } return nil } -func (m *ContractCallRequest) GetModule() string { - if m != nil { - return m.Module +func (x *ContractCallRequest) GetModule() string { + if x != nil { + return x.Module } return "" } -func (m *ContractCallRequest) GetContract() string { - if m != nil { - return m.Contract +func (x *ContractCallRequest) GetContract() string { + if x != nil { + return x.Contract } return "" } -func (m *ContractCallRequest) GetMethod() string { - if m != nil { - return m.Method +func (x *ContractCallRequest) GetMethod() string { + if x != nil { + return x.Method } return "" } -func (m *ContractCallRequest) GetArgs() []*ArgPair { - if m != nil { - return m.Args +func (x *ContractCallRequest) GetArgs() []*ArgPair { + if x != nil { + return x.Args } return nil } type ContractCallResponse struct { - Response *Response `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *ContractCallResponse) Reset() { *m = ContractCallResponse{} } -func (m *ContractCallResponse) String() string { return proto.CompactTextString(m) } -func (*ContractCallResponse) ProtoMessage() {} -func (*ContractCallResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d19debeba7dea55a, []int{23} + Response *Response `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` } -func (m *ContractCallResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ContractCallResponse.Unmarshal(m, b) -} -func (m *ContractCallResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ContractCallResponse.Marshal(b, m, deterministic) -} -func (m *ContractCallResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ContractCallResponse.Merge(m, src) +func (x *ContractCallResponse) Reset() { + *x = ContractCallResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ContractCallResponse) XXX_Size() int { - return xxx_messageInfo_ContractCallResponse.Size(m) + +func (x *ContractCallResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ContractCallResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ContractCallResponse.DiscardUnknown(m) + +func (*ContractCallResponse) ProtoMessage() {} + +func (x *ContractCallResponse) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_ContractCallResponse proto.InternalMessageInfo +// Deprecated: Use ContractCallResponse.ProtoReflect.Descriptor instead. +func (*ContractCallResponse) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{23} +} -func (m *ContractCallResponse) GetResponse() *Response { - if m != nil { - return m.Response +func (x *ContractCallResponse) GetResponse() *Response { + if x != nil { + return x.Response } return nil } type CrossContractQueryRequest struct { - Header *SyscallHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - Uri string `protobuf:"bytes,2,opt,name=uri,proto3" json:"uri,omitempty"` - Args []*ArgPair `protobuf:"bytes,5,rep,name=args,proto3" json:"args,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *CrossContractQueryRequest) Reset() { *m = CrossContractQueryRequest{} } -func (m *CrossContractQueryRequest) String() string { return proto.CompactTextString(m) } -func (*CrossContractQueryRequest) ProtoMessage() {} -func (*CrossContractQueryRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d19debeba7dea55a, []int{24} + Header *SyscallHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + Uri string `protobuf:"bytes,2,opt,name=uri,proto3" json:"uri,omitempty"` + Args []*ArgPair `protobuf:"bytes,5,rep,name=args,proto3" json:"args,omitempty"` } -func (m *CrossContractQueryRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CrossContractQueryRequest.Unmarshal(m, b) -} -func (m *CrossContractQueryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CrossContractQueryRequest.Marshal(b, m, deterministic) -} -func (m *CrossContractQueryRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CrossContractQueryRequest.Merge(m, src) +func (x *CrossContractQueryRequest) Reset() { + *x = CrossContractQueryRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *CrossContractQueryRequest) XXX_Size() int { - return xxx_messageInfo_CrossContractQueryRequest.Size(m) + +func (x *CrossContractQueryRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *CrossContractQueryRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CrossContractQueryRequest.DiscardUnknown(m) + +func (*CrossContractQueryRequest) ProtoMessage() {} + +func (x *CrossContractQueryRequest) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[24] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_CrossContractQueryRequest proto.InternalMessageInfo +// Deprecated: Use CrossContractQueryRequest.ProtoReflect.Descriptor instead. +func (*CrossContractQueryRequest) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{24} +} -func (m *CrossContractQueryRequest) GetHeader() *SyscallHeader { - if m != nil { - return m.Header +func (x *CrossContractQueryRequest) GetHeader() *SyscallHeader { + if x != nil { + return x.Header } return nil } -func (m *CrossContractQueryRequest) GetUri() string { - if m != nil { - return m.Uri +func (x *CrossContractQueryRequest) GetUri() string { + if x != nil { + return x.Uri } return "" } -func (m *CrossContractQueryRequest) GetArgs() []*ArgPair { - if m != nil { - return m.Args +func (x *CrossContractQueryRequest) GetArgs() []*ArgPair { + if x != nil { + return x.Args } return nil } type CrossContractQueryResponse struct { - Response *Response `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *CrossContractQueryResponse) Reset() { *m = CrossContractQueryResponse{} } -func (m *CrossContractQueryResponse) String() string { return proto.CompactTextString(m) } -func (*CrossContractQueryResponse) ProtoMessage() {} -func (*CrossContractQueryResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d19debeba7dea55a, []int{25} + Response *Response `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` } -func (m *CrossContractQueryResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CrossContractQueryResponse.Unmarshal(m, b) -} -func (m *CrossContractQueryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CrossContractQueryResponse.Marshal(b, m, deterministic) -} -func (m *CrossContractQueryResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CrossContractQueryResponse.Merge(m, src) +func (x *CrossContractQueryResponse) Reset() { + *x = CrossContractQueryResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *CrossContractQueryResponse) XXX_Size() int { - return xxx_messageInfo_CrossContractQueryResponse.Size(m) + +func (x *CrossContractQueryResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *CrossContractQueryResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CrossContractQueryResponse.DiscardUnknown(m) + +func (*CrossContractQueryResponse) ProtoMessage() {} + +func (x *CrossContractQueryResponse) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_CrossContractQueryResponse proto.InternalMessageInfo +// Deprecated: Use CrossContractQueryResponse.ProtoReflect.Descriptor instead. +func (*CrossContractQueryResponse) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{25} +} -func (m *CrossContractQueryResponse) GetResponse() *Response { - if m != nil { - return m.Response +func (x *CrossContractQueryResponse) GetResponse() *Response { + if x != nil { + return x.Response } return nil } type Response struct { - Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` - Body []byte `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *Response) Reset() { *m = Response{} } -func (m *Response) String() string { return proto.CompactTextString(m) } -func (*Response) ProtoMessage() {} -func (*Response) Descriptor() ([]byte, []int) { - return fileDescriptor_d19debeba7dea55a, []int{26} + Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + Body []byte `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"` } -func (m *Response) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Response.Unmarshal(m, b) -} -func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Response.Marshal(b, m, deterministic) -} -func (m *Response) XXX_Merge(src proto.Message) { - xxx_messageInfo_Response.Merge(m, src) +func (x *Response) Reset() { + *x = Response{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Response) XXX_Size() int { - return xxx_messageInfo_Response.Size(m) + +func (x *Response) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Response) XXX_DiscardUnknown() { - xxx_messageInfo_Response.DiscardUnknown(m) + +func (*Response) ProtoMessage() {} + +func (x *Response) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[26] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Response proto.InternalMessageInfo +// Deprecated: Use Response.ProtoReflect.Descriptor instead. +func (*Response) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{26} +} -func (m *Response) GetStatus() int32 { - if m != nil { - return m.Status +func (x *Response) GetStatus() int32 { + if x != nil { + return x.Status } return 0 } -func (m *Response) GetMessage() string { - if m != nil { - return m.Message +func (x *Response) GetMessage() string { + if x != nil { + return x.Message } return "" } -func (m *Response) GetBody() []byte { - if m != nil { - return m.Body +func (x *Response) GetBody() []byte { + if x != nil { + return x.Body } return nil } type SetOutputRequest struct { - Header *SyscallHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - Response *Response `protobuf:"bytes,2,opt,name=response,proto3" json:"response,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *SetOutputRequest) Reset() { *m = SetOutputRequest{} } -func (m *SetOutputRequest) String() string { return proto.CompactTextString(m) } -func (*SetOutputRequest) ProtoMessage() {} -func (*SetOutputRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d19debeba7dea55a, []int{27} + Header *SyscallHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + Response *Response `protobuf:"bytes,2,opt,name=response,proto3" json:"response,omitempty"` } -func (m *SetOutputRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SetOutputRequest.Unmarshal(m, b) -} -func (m *SetOutputRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SetOutputRequest.Marshal(b, m, deterministic) -} -func (m *SetOutputRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SetOutputRequest.Merge(m, src) +func (x *SetOutputRequest) Reset() { + *x = SetOutputRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *SetOutputRequest) XXX_Size() int { - return xxx_messageInfo_SetOutputRequest.Size(m) + +func (x *SetOutputRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SetOutputRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SetOutputRequest.DiscardUnknown(m) + +func (*SetOutputRequest) ProtoMessage() {} + +func (x *SetOutputRequest) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[27] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SetOutputRequest proto.InternalMessageInfo +// Deprecated: Use SetOutputRequest.ProtoReflect.Descriptor instead. +func (*SetOutputRequest) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{27} +} -func (m *SetOutputRequest) GetHeader() *SyscallHeader { - if m != nil { - return m.Header +func (x *SetOutputRequest) GetHeader() *SyscallHeader { + if x != nil { + return x.Header } return nil } -func (m *SetOutputRequest) GetResponse() *Response { - if m != nil { - return m.Response +func (x *SetOutputRequest) GetResponse() *Response { + if x != nil { + return x.Response } return nil } type SetOutputResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *SetOutputResponse) Reset() { *m = SetOutputResponse{} } -func (m *SetOutputResponse) String() string { return proto.CompactTextString(m) } -func (*SetOutputResponse) ProtoMessage() {} -func (*SetOutputResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d19debeba7dea55a, []int{28} +func (x *SetOutputResponse) Reset() { + *x = SetOutputResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *SetOutputResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SetOutputResponse.Unmarshal(m, b) -} -func (m *SetOutputResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SetOutputResponse.Marshal(b, m, deterministic) -} -func (m *SetOutputResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SetOutputResponse.Merge(m, src) -} -func (m *SetOutputResponse) XXX_Size() int { - return xxx_messageInfo_SetOutputResponse.Size(m) -} -func (m *SetOutputResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SetOutputResponse.DiscardUnknown(m) +func (x *SetOutputResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_SetOutputResponse proto.InternalMessageInfo +func (*SetOutputResponse) ProtoMessage() {} -type GetCallArgsRequest struct { - Header *SyscallHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +func (x *SetOutputResponse) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[28] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *GetCallArgsRequest) Reset() { *m = GetCallArgsRequest{} } -func (m *GetCallArgsRequest) String() string { return proto.CompactTextString(m) } -func (*GetCallArgsRequest) ProtoMessage() {} -func (*GetCallArgsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d19debeba7dea55a, []int{29} +// Deprecated: Use SetOutputResponse.ProtoReflect.Descriptor instead. +func (*SetOutputResponse) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{28} } -func (m *GetCallArgsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetCallArgsRequest.Unmarshal(m, b) -} -func (m *GetCallArgsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetCallArgsRequest.Marshal(b, m, deterministic) +type GetCallArgsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Header *SyscallHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` } -func (m *GetCallArgsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetCallArgsRequest.Merge(m, src) + +func (x *GetCallArgsRequest) Reset() { + *x = GetCallArgsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *GetCallArgsRequest) XXX_Size() int { - return xxx_messageInfo_GetCallArgsRequest.Size(m) + +func (x *GetCallArgsRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetCallArgsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetCallArgsRequest.DiscardUnknown(m) + +func (*GetCallArgsRequest) ProtoMessage() {} + +func (x *GetCallArgsRequest) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[29] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_GetCallArgsRequest proto.InternalMessageInfo +// Deprecated: Use GetCallArgsRequest.ProtoReflect.Descriptor instead. +func (*GetCallArgsRequest) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{29} +} -func (m *GetCallArgsRequest) GetHeader() *SyscallHeader { - if m != nil { - return m.Header +func (x *GetCallArgsRequest) GetHeader() *SyscallHeader { + if x != nil { + return x.Header } return nil } // Transaction input type TxInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // The transaction id referenced to RefTxid string `protobuf:"bytes,1,opt,name=ref_txid,json=refTxid,proto3" json:"ref_txid,omitempty"` // The output offset of the transaction referenced to @@ -1374,133 +1799,149 @@ type TxInput struct { // The amount of the transaction Amount string `protobuf:"bytes,6,opt,name=amount,proto3" json:"amount,omitempty"` // Frozen height - FrozenHeight int64 `protobuf:"varint,7,opt,name=frozen_height,json=frozenHeight,proto3" json:"frozen_height,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + FrozenHeight int64 `protobuf:"varint,7,opt,name=frozen_height,json=frozenHeight,proto3" json:"frozen_height,omitempty"` } -func (m *TxInput) Reset() { *m = TxInput{} } -func (m *TxInput) String() string { return proto.CompactTextString(m) } -func (*TxInput) ProtoMessage() {} -func (*TxInput) Descriptor() ([]byte, []int) { - return fileDescriptor_d19debeba7dea55a, []int{30} +func (x *TxInput) Reset() { + *x = TxInput{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *TxInput) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TxInput.Unmarshal(m, b) -} -func (m *TxInput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TxInput.Marshal(b, m, deterministic) -} -func (m *TxInput) XXX_Merge(src proto.Message) { - xxx_messageInfo_TxInput.Merge(m, src) -} -func (m *TxInput) XXX_Size() int { - return xxx_messageInfo_TxInput.Size(m) +func (x *TxInput) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *TxInput) XXX_DiscardUnknown() { - xxx_messageInfo_TxInput.DiscardUnknown(m) + +func (*TxInput) ProtoMessage() {} + +func (x *TxInput) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[30] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_TxInput proto.InternalMessageInfo +// Deprecated: Use TxInput.ProtoReflect.Descriptor instead. +func (*TxInput) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{30} +} -func (m *TxInput) GetRefTxid() string { - if m != nil { - return m.RefTxid +func (x *TxInput) GetRefTxid() string { + if x != nil { + return x.RefTxid } return "" } -func (m *TxInput) GetRefOffset() int32 { - if m != nil { - return m.RefOffset +func (x *TxInput) GetRefOffset() int32 { + if x != nil { + return x.RefOffset } return 0 } -func (m *TxInput) GetFromAddr() []byte { - if m != nil { - return m.FromAddr +func (x *TxInput) GetFromAddr() []byte { + if x != nil { + return x.FromAddr } return nil } -func (m *TxInput) GetAmount() string { - if m != nil { - return m.Amount +func (x *TxInput) GetAmount() string { + if x != nil { + return x.Amount } return "" } -func (m *TxInput) GetFrozenHeight() int64 { - if m != nil { - return m.FrozenHeight +func (x *TxInput) GetFrozenHeight() int64 { + if x != nil { + return x.FrozenHeight } return 0 } // Transaction output type TxOutput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // The amount of the transaction Amount string `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` // The address of the launcher ToAddr []byte `protobuf:"bytes,2,opt,name=to_addr,json=toAddr,proto3" json:"to_addr,omitempty"` // Fronzen height - FrozenHeight int64 `protobuf:"varint,4,opt,name=frozen_height,json=frozenHeight,proto3" json:"frozen_height,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + FrozenHeight int64 `protobuf:"varint,4,opt,name=frozen_height,json=frozenHeight,proto3" json:"frozen_height,omitempty"` } -func (m *TxOutput) Reset() { *m = TxOutput{} } -func (m *TxOutput) String() string { return proto.CompactTextString(m) } -func (*TxOutput) ProtoMessage() {} -func (*TxOutput) Descriptor() ([]byte, []int) { - return fileDescriptor_d19debeba7dea55a, []int{31} +func (x *TxOutput) Reset() { + *x = TxOutput{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *TxOutput) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TxOutput.Unmarshal(m, b) -} -func (m *TxOutput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TxOutput.Marshal(b, m, deterministic) -} -func (m *TxOutput) XXX_Merge(src proto.Message) { - xxx_messageInfo_TxOutput.Merge(m, src) +func (x *TxOutput) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *TxOutput) XXX_Size() int { - return xxx_messageInfo_TxOutput.Size(m) -} -func (m *TxOutput) XXX_DiscardUnknown() { - xxx_messageInfo_TxOutput.DiscardUnknown(m) + +func (*TxOutput) ProtoMessage() {} + +func (x *TxOutput) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[31] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_TxOutput proto.InternalMessageInfo +// Deprecated: Use TxOutput.ProtoReflect.Descriptor instead. +func (*TxOutput) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{31} +} -func (m *TxOutput) GetAmount() string { - if m != nil { - return m.Amount +func (x *TxOutput) GetAmount() string { + if x != nil { + return x.Amount } return "" } -func (m *TxOutput) GetToAddr() []byte { - if m != nil { - return m.ToAddr +func (x *TxOutput) GetToAddr() []byte { + if x != nil { + return x.ToAddr } return nil } -func (m *TxOutput) GetFrozenHeight() int64 { - if m != nil { - return m.FrozenHeight +func (x *TxOutput) GetFrozenHeight() int64 { + if x != nil { + return x.FrozenHeight } return 0 } // Transaction is the information of the transaction type Transaction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // txid is the id of this transaction Txid string `protobuf:"bytes,1,opt,name=txid,proto3" json:"txid,omitempty"` // the blockid the transaction belong to @@ -1515,88 +1956,96 @@ type Transaction struct { // 交易发起者, 可以是一个Address或者一个Account Initiator string `protobuf:"bytes,26,opt,name=initiator,proto3" json:"initiator,omitempty"` // 交易发起需要被收集签名的AddressURL集合信息,包括用于utxo转账和用于合约调用 - AuthRequire []string `protobuf:"bytes,27,rep,name=auth_require,json=authRequire,proto3" json:"auth_require,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + AuthRequire []string `protobuf:"bytes,27,rep,name=auth_require,json=authRequire,proto3" json:"auth_require,omitempty"` } -func (m *Transaction) Reset() { *m = Transaction{} } -func (m *Transaction) String() string { return proto.CompactTextString(m) } -func (*Transaction) ProtoMessage() {} -func (*Transaction) Descriptor() ([]byte, []int) { - return fileDescriptor_d19debeba7dea55a, []int{32} +func (x *Transaction) Reset() { + *x = Transaction{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Transaction) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Transaction.Unmarshal(m, b) -} -func (m *Transaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Transaction.Marshal(b, m, deterministic) -} -func (m *Transaction) XXX_Merge(src proto.Message) { - xxx_messageInfo_Transaction.Merge(m, src) +func (x *Transaction) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Transaction) XXX_Size() int { - return xxx_messageInfo_Transaction.Size(m) -} -func (m *Transaction) XXX_DiscardUnknown() { - xxx_messageInfo_Transaction.DiscardUnknown(m) + +func (*Transaction) ProtoMessage() {} + +func (x *Transaction) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[32] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Transaction proto.InternalMessageInfo +// Deprecated: Use Transaction.ProtoReflect.Descriptor instead. +func (*Transaction) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{32} +} -func (m *Transaction) GetTxid() string { - if m != nil { - return m.Txid +func (x *Transaction) GetTxid() string { + if x != nil { + return x.Txid } return "" } -func (m *Transaction) GetBlockid() string { - if m != nil { - return m.Blockid +func (x *Transaction) GetBlockid() string { + if x != nil { + return x.Blockid } return "" } -func (m *Transaction) GetTxInputs() []*TxInput { - if m != nil { - return m.TxInputs +func (x *Transaction) GetTxInputs() []*TxInput { + if x != nil { + return x.TxInputs } return nil } -func (m *Transaction) GetTxOutputs() []*TxOutput { - if m != nil { - return m.TxOutputs +func (x *Transaction) GetTxOutputs() []*TxOutput { + if x != nil { + return x.TxOutputs } return nil } -func (m *Transaction) GetDesc() []byte { - if m != nil { - return m.Desc +func (x *Transaction) GetDesc() []byte { + if x != nil { + return x.Desc } return nil } -func (m *Transaction) GetInitiator() string { - if m != nil { - return m.Initiator +func (x *Transaction) GetInitiator() string { + if x != nil { + return x.Initiator } return "" } -func (m *Transaction) GetAuthRequire() []string { - if m != nil { - return m.AuthRequire +func (x *Transaction) GetAuthRequire() []string { + if x != nil { + return x.AuthRequire } return nil } // The block struct type Block struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // blockid generate the hash sign of the block used by sha256 Blockid string `protobuf:"bytes,3,opt,name=blockid,proto3" json:"blockid,omitempty"` // pre_hash is the parent blockid of the block @@ -1619,496 +2068,2260 @@ type Block struct { // If the block is on the trunk InTrunk bool `protobuf:"varint,14,opt,name=in_trunk,json=inTrunk,proto3" json:"in_trunk,omitempty"` // Next next block which on trunk - NextHash string `protobuf:"bytes,15,opt,name=next_hash,json=nextHash,proto3" json:"next_hash,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + NextHash string `protobuf:"bytes,15,opt,name=next_hash,json=nextHash,proto3" json:"next_hash,omitempty"` } -func (m *Block) Reset() { *m = Block{} } -func (m *Block) String() string { return proto.CompactTextString(m) } -func (*Block) ProtoMessage() {} -func (*Block) Descriptor() ([]byte, []int) { - return fileDescriptor_d19debeba7dea55a, []int{33} +func (x *Block) Reset() { + *x = Block{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Block) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Block.Unmarshal(m, b) -} -func (m *Block) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Block.Marshal(b, m, deterministic) -} -func (m *Block) XXX_Merge(src proto.Message) { - xxx_messageInfo_Block.Merge(m, src) +func (x *Block) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Block) XXX_Size() int { - return xxx_messageInfo_Block.Size(m) -} -func (m *Block) XXX_DiscardUnknown() { - xxx_messageInfo_Block.DiscardUnknown(m) + +func (*Block) ProtoMessage() {} + +func (x *Block) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[33] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Block proto.InternalMessageInfo +// Deprecated: Use Block.ProtoReflect.Descriptor instead. +func (*Block) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{33} +} -func (m *Block) GetBlockid() string { - if m != nil { - return m.Blockid +func (x *Block) GetBlockid() string { + if x != nil { + return x.Blockid } return "" } -func (m *Block) GetPreHash() string { - if m != nil { - return m.PreHash +func (x *Block) GetPreHash() string { + if x != nil { + return x.PreHash } return "" } -func (m *Block) GetProposer() []byte { - if m != nil { - return m.Proposer +func (x *Block) GetProposer() []byte { + if x != nil { + return x.Proposer } return nil } -func (m *Block) GetSign() string { - if m != nil { - return m.Sign +func (x *Block) GetSign() string { + if x != nil { + return x.Sign } return "" } -func (m *Block) GetPubkey() []byte { - if m != nil { - return m.Pubkey +func (x *Block) GetPubkey() []byte { + if x != nil { + return x.Pubkey } return nil } -func (m *Block) GetHeight() int64 { - if m != nil { - return m.Height +func (x *Block) GetHeight() int64 { + if x != nil { + return x.Height } return 0 } -func (m *Block) GetTimestamp() int64 { - if m != nil { - return m.Timestamp +func (x *Block) GetTimestamp() int64 { + if x != nil { + return x.Timestamp } return 0 } -func (m *Block) GetTxids() []string { - if m != nil { - return m.Txids +func (x *Block) GetTxids() []string { + if x != nil { + return x.Txids } return nil } -func (m *Block) GetTxCount() int32 { - if m != nil { - return m.TxCount +func (x *Block) GetTxCount() int32 { + if x != nil { + return x.TxCount } return 0 } -func (m *Block) GetInTrunk() bool { - if m != nil { - return m.InTrunk +func (x *Block) GetInTrunk() bool { + if x != nil { + return x.InTrunk } return false } -func (m *Block) GetNextHash() string { - if m != nil { - return m.NextHash +func (x *Block) GetNextHash() string { + if x != nil { + return x.NextHash } return "" } type GetAccountAddressesRequest struct { - Header *SyscallHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - Account string `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Header *SyscallHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + Account string `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty"` } -func (m *GetAccountAddressesRequest) Reset() { *m = GetAccountAddressesRequest{} } -func (m *GetAccountAddressesRequest) String() string { return proto.CompactTextString(m) } -func (*GetAccountAddressesRequest) ProtoMessage() {} +func (x *GetAccountAddressesRequest) Reset() { + *x = GetAccountAddressesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAccountAddressesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAccountAddressesRequest) ProtoMessage() {} + +func (x *GetAccountAddressesRequest) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[34] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAccountAddressesRequest.ProtoReflect.Descriptor instead. func (*GetAccountAddressesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d19debeba7dea55a, []int{34} + return file_contract_proto_rawDescGZIP(), []int{34} } -func (m *GetAccountAddressesRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetAccountAddressesRequest.Unmarshal(m, b) +func (x *GetAccountAddressesRequest) GetHeader() *SyscallHeader { + if x != nil { + return x.Header + } + return nil } -func (m *GetAccountAddressesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetAccountAddressesRequest.Marshal(b, m, deterministic) + +func (x *GetAccountAddressesRequest) GetAccount() string { + if x != nil { + return x.Account + } + return "" } -func (m *GetAccountAddressesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetAccountAddressesRequest.Merge(m, src) + +type GetAccountAddressesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Addresses []string `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"` } -func (m *GetAccountAddressesRequest) XXX_Size() int { - return xxx_messageInfo_GetAccountAddressesRequest.Size(m) + +func (x *GetAccountAddressesResponse) Reset() { + *x = GetAccountAddressesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *GetAccountAddressesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetAccountAddressesRequest.DiscardUnknown(m) + +func (x *GetAccountAddressesResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_GetAccountAddressesRequest proto.InternalMessageInfo +func (*GetAccountAddressesResponse) ProtoMessage() {} -func (m *GetAccountAddressesRequest) GetHeader() *SyscallHeader { - if m != nil { - return m.Header +func (x *GetAccountAddressesResponse) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[35] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAccountAddressesResponse.ProtoReflect.Descriptor instead. +func (*GetAccountAddressesResponse) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{35} +} + +func (x *GetAccountAddressesResponse) GetAddresses() []string { + if x != nil { + return x.Addresses } return nil } -func (m *GetAccountAddressesRequest) GetAccount() string { - if m != nil { - return m.Account +type PostLogRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Header *SyscallHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + Entry string `protobuf:"bytes,2,opt,name=entry,proto3" json:"entry,omitempty"` +} + +func (x *PostLogRequest) Reset() { + *x = PostLogRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PostLogRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PostLogRequest) ProtoMessage() {} + +func (x *PostLogRequest) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[36] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PostLogRequest.ProtoReflect.Descriptor instead. +func (*PostLogRequest) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{36} +} + +func (x *PostLogRequest) GetHeader() *SyscallHeader { + if x != nil { + return x.Header + } + return nil +} + +func (x *PostLogRequest) GetEntry() string { + if x != nil { + return x.Entry } return "" } -type GetAccountAddressesResponse struct { - Addresses []string `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +type PostLogResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Entry string `protobuf:"bytes,1,opt,name=entry,proto3" json:"entry,omitempty"` } -func (m *GetAccountAddressesResponse) Reset() { *m = GetAccountAddressesResponse{} } -func (m *GetAccountAddressesResponse) String() string { return proto.CompactTextString(m) } -func (*GetAccountAddressesResponse) ProtoMessage() {} -func (*GetAccountAddressesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d19debeba7dea55a, []int{35} +func (x *PostLogResponse) Reset() { + *x = PostLogResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PostLogResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PostLogResponse) ProtoMessage() {} + +func (x *PostLogResponse) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[37] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PostLogResponse.ProtoReflect.Descriptor instead. +func (*PostLogResponse) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{37} +} + +func (x *PostLogResponse) GetEntry() string { + if x != nil { + return x.Entry + } + return "" +} + +type EmitEventRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Header *SyscallHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Body []byte `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"` } -func (m *GetAccountAddressesResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetAccountAddressesResponse.Unmarshal(m, b) +func (x *EmitEventRequest) Reset() { + *x = EmitEventRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *GetAccountAddressesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetAccountAddressesResponse.Marshal(b, m, deterministic) + +func (x *EmitEventRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetAccountAddressesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetAccountAddressesResponse.Merge(m, src) + +func (*EmitEventRequest) ProtoMessage() {} + +func (x *EmitEventRequest) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[38] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *GetAccountAddressesResponse) XXX_Size() int { - return xxx_messageInfo_GetAccountAddressesResponse.Size(m) + +// Deprecated: Use EmitEventRequest.ProtoReflect.Descriptor instead. +func (*EmitEventRequest) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{38} } -func (m *GetAccountAddressesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetAccountAddressesResponse.DiscardUnknown(m) + +func (x *EmitEventRequest) GetHeader() *SyscallHeader { + if x != nil { + return x.Header + } + return nil } -var xxx_messageInfo_GetAccountAddressesResponse proto.InternalMessageInfo +func (x *EmitEventRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} -func (m *GetAccountAddressesResponse) GetAddresses() []string { - if m != nil { - return m.Addresses +func (x *EmitEventRequest) GetBody() []byte { + if x != nil { + return x.Body } return nil } -type PostLogRequest struct { - Header *SyscallHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - Entry string `protobuf:"bytes,2,opt,name=entry,proto3" json:"entry,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +type EmitEventResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *PostLogRequest) Reset() { *m = PostLogRequest{} } -func (m *PostLogRequest) String() string { return proto.CompactTextString(m) } -func (*PostLogRequest) ProtoMessage() {} -func (*PostLogRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d19debeba7dea55a, []int{36} +func (x *EmitEventResponse) Reset() { + *x = EmitEventResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EmitEventResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EmitEventResponse) ProtoMessage() {} + +func (x *EmitEventResponse) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[39] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EmitEventResponse.ProtoReflect.Descriptor instead. +func (*EmitEventResponse) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{39} +} + +type CrossQueryRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Bcname string `protobuf:"bytes,1,opt,name=bcname,proto3" json:"bcname,omitempty"` + Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Initiator string `protobuf:"bytes,3,opt,name=initiator,proto3" json:"initiator,omitempty"` + AuthRequire []string `protobuf:"bytes,4,rep,name=auth_require,json=authRequire,proto3" json:"auth_require,omitempty"` + Request *InvokeRequest `protobuf:"bytes,5,opt,name=request,proto3" json:"request,omitempty"` } -func (m *PostLogRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PostLogRequest.Unmarshal(m, b) +func (x *CrossQueryRequest) Reset() { + *x = CrossQueryRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *PostLogRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PostLogRequest.Marshal(b, m, deterministic) + +func (x *CrossQueryRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *PostLogRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_PostLogRequest.Merge(m, src) + +func (*CrossQueryRequest) ProtoMessage() {} + +func (x *CrossQueryRequest) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[40] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CrossQueryRequest.ProtoReflect.Descriptor instead. +func (*CrossQueryRequest) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{40} +} + +func (x *CrossQueryRequest) GetBcname() string { + if x != nil { + return x.Bcname + } + return "" } -func (m *PostLogRequest) XXX_Size() int { - return xxx_messageInfo_PostLogRequest.Size(m) + +func (x *CrossQueryRequest) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 } -func (m *PostLogRequest) XXX_DiscardUnknown() { - xxx_messageInfo_PostLogRequest.DiscardUnknown(m) + +func (x *CrossQueryRequest) GetInitiator() string { + if x != nil { + return x.Initiator + } + return "" } -var xxx_messageInfo_PostLogRequest proto.InternalMessageInfo +func (x *CrossQueryRequest) GetAuthRequire() []string { + if x != nil { + return x.AuthRequire + } + return nil +} -func (m *PostLogRequest) GetHeader() *SyscallHeader { - if m != nil { - return m.Header +func (x *CrossQueryRequest) GetRequest() *InvokeRequest { + if x != nil { + return x.Request } return nil } -func (m *PostLogRequest) GetEntry() string { - if m != nil { - return m.Entry +// 预执行的请求结构 +type InvokeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ModuleName string `protobuf:"bytes,1,opt,name=module_name,json=moduleName,proto3" json:"module_name,omitempty"` + ContractName string `protobuf:"bytes,2,opt,name=contract_name,json=contractName,proto3" json:"contract_name,omitempty"` + MethodName string `protobuf:"bytes,3,opt,name=method_name,json=methodName,proto3" json:"method_name,omitempty"` + Args map[string][]byte `protobuf:"bytes,4,rep,name=args,proto3" json:"args,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + ResourceLimits []*ResourceLimit `protobuf:"bytes,5,rep,name=resource_limits,json=resourceLimits,proto3" json:"resource_limits,omitempty"` + // amount is the amount transfer to the contract + // attention: In one transaction, transfer to only one contract is allowed + Amount string `protobuf:"bytes,6,opt,name=amount,proto3" json:"amount,omitempty"` +} + +func (x *InvokeRequest) Reset() { + *x = InvokeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InvokeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InvokeRequest) ProtoMessage() {} + +func (x *InvokeRequest) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[41] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InvokeRequest.ProtoReflect.Descriptor instead. +func (*InvokeRequest) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{41} +} + +func (x *InvokeRequest) GetModuleName() string { + if x != nil { + return x.ModuleName } return "" } -type PostLogResponse struct { - Entry string `protobuf:"bytes,1,opt,name=entry,proto3" json:"entry,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +func (x *InvokeRequest) GetContractName() string { + if x != nil { + return x.ContractName + } + return "" } -func (m *PostLogResponse) Reset() { *m = PostLogResponse{} } -func (m *PostLogResponse) String() string { return proto.CompactTextString(m) } -func (*PostLogResponse) ProtoMessage() {} -func (*PostLogResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d19debeba7dea55a, []int{37} +func (x *InvokeRequest) GetMethodName() string { + if x != nil { + return x.MethodName + } + return "" +} + +func (x *InvokeRequest) GetArgs() map[string][]byte { + if x != nil { + return x.Args + } + return nil +} + +func (x *InvokeRequest) GetResourceLimits() []*ResourceLimit { + if x != nil { + return x.ResourceLimits + } + return nil +} + +func (x *InvokeRequest) GetAmount() string { + if x != nil { + return x.Amount + } + return "" +} + +type ResourceLimit struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type ResourceType `protobuf:"varint,1,opt,name=type,proto3,enum=xchain.contract.sdk.ResourceType" json:"type,omitempty"` + Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` +} + +func (x *ResourceLimit) Reset() { + *x = ResourceLimit{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResourceLimit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResourceLimit) ProtoMessage() {} + +func (x *ResourceLimit) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[42] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResourceLimit.ProtoReflect.Descriptor instead. +func (*ResourceLimit) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{42} +} + +func (x *ResourceLimit) GetType() ResourceType { + if x != nil { + return x.Type + } + return ResourceType_CPU } -func (m *PostLogResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PostLogResponse.Unmarshal(m, b) +func (x *ResourceLimit) GetLimit() int64 { + if x != nil { + return x.Limit + } + return 0 } -func (m *PostLogResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PostLogResponse.Marshal(b, m, deterministic) + +type CrossChainMeta struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + MinEndorsorNum int64 `protobuf:"varint,2,opt,name=min_endorsor_num,json=minEndorsorNum,proto3" json:"min_endorsor_num,omitempty"` } -func (m *PostLogResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_PostLogResponse.Merge(m, src) + +func (x *CrossChainMeta) Reset() { + *x = CrossChainMeta{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *PostLogResponse) XXX_Size() int { - return xxx_messageInfo_PostLogResponse.Size(m) + +func (x *CrossChainMeta) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *PostLogResponse) XXX_DiscardUnknown() { - xxx_messageInfo_PostLogResponse.DiscardUnknown(m) + +func (*CrossChainMeta) ProtoMessage() {} + +func (x *CrossChainMeta) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[43] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_PostLogResponse proto.InternalMessageInfo +// Deprecated: Use CrossChainMeta.ProtoReflect.Descriptor instead. +func (*CrossChainMeta) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{43} +} -func (m *PostLogResponse) GetEntry() string { - if m != nil { - return m.Entry +func (x *CrossChainMeta) GetType() string { + if x != nil { + return x.Type } return "" } -type EmitEventRequest struct { - Header *SyscallHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Body []byte `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +func (x *CrossChainMeta) GetMinEndorsorNum() int64 { + if x != nil { + return x.MinEndorsorNum + } + return 0 } -func (m *EmitEventRequest) Reset() { *m = EmitEventRequest{} } -func (m *EmitEventRequest) String() string { return proto.CompactTextString(m) } -func (*EmitEventRequest) ProtoMessage() {} -func (*EmitEventRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d19debeba7dea55a, []int{38} +type CrossEndorsor struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + PubKey string `protobuf:"bytes,2,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"` + // ip+port + Host string `protobuf:"bytes,3,opt,name=host,proto3" json:"host,omitempty"` } -func (m *EmitEventRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_EmitEventRequest.Unmarshal(m, b) +func (x *CrossEndorsor) Reset() { + *x = CrossEndorsor{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *EmitEventRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_EmitEventRequest.Marshal(b, m, deterministic) + +func (x *CrossEndorsor) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *EmitEventRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_EmitEventRequest.Merge(m, src) + +func (*CrossEndorsor) ProtoMessage() {} + +func (x *CrossEndorsor) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[44] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *EmitEventRequest) XXX_Size() int { - return xxx_messageInfo_EmitEventRequest.Size(m) + +// Deprecated: Use CrossEndorsor.ProtoReflect.Descriptor instead. +func (*CrossEndorsor) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{44} } -func (m *EmitEventRequest) XXX_DiscardUnknown() { - xxx_messageInfo_EmitEventRequest.DiscardUnknown(m) + +func (x *CrossEndorsor) GetAddress() string { + if x != nil { + return x.Address + } + return "" } -var xxx_messageInfo_EmitEventRequest proto.InternalMessageInfo +func (x *CrossEndorsor) GetPubKey() string { + if x != nil { + return x.PubKey + } + return "" +} -func (m *EmitEventRequest) GetHeader() *SyscallHeader { - if m != nil { - return m.Header +func (x *CrossEndorsor) GetHost() string { + if x != nil { + return x.Host + } + return "" +} + +type CrossQueryMeta struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ChainMeta *CrossChainMeta `protobuf:"bytes,1,opt,name=chain_meta,json=chainMeta,proto3" json:"chain_meta,omitempty"` + Endorsors []*CrossEndorsor `protobuf:"bytes,2,rep,name=endorsors,proto3" json:"endorsors,omitempty"` +} + +func (x *CrossQueryMeta) Reset() { + *x = CrossQueryMeta{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CrossQueryMeta) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CrossQueryMeta) ProtoMessage() {} + +func (x *CrossQueryMeta) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[45] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CrossQueryMeta.ProtoReflect.Descriptor instead. +func (*CrossQueryMeta) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{45} +} + +func (x *CrossQueryMeta) GetChainMeta() *CrossChainMeta { + if x != nil { + return x.ChainMeta + } + return nil +} + +func (x *CrossQueryMeta) GetEndorsors() []*CrossEndorsor { + if x != nil { + return x.Endorsors } return nil } -func (m *EmitEventRequest) GetName() string { - if m != nil { - return m.Name +// ContractResponse is the response returnd by contract +type ContractResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + Body []byte `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"` +} + +func (x *ContractResponse) Reset() { + *x = ContractResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ContractResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContractResponse) ProtoMessage() {} + +func (x *ContractResponse) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[46] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ContractResponse.ProtoReflect.Descriptor instead. +func (*ContractResponse) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{46} +} + +func (x *ContractResponse) GetStatus() int32 { + if x != nil { + return x.Status + } + return 0 +} + +func (x *ContractResponse) GetMessage() string { + if x != nil { + return x.Message } return "" } -func (m *EmitEventRequest) GetBody() []byte { - if m != nil { - return m.Body +func (x *ContractResponse) GetBody() []byte { + if x != nil { + return x.Body } return nil } -type EmitEventResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +type CrossQueryResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Response *ContractResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` } -func (m *EmitEventResponse) Reset() { *m = EmitEventResponse{} } -func (m *EmitEventResponse) String() string { return proto.CompactTextString(m) } -func (*EmitEventResponse) ProtoMessage() {} -func (*EmitEventResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d19debeba7dea55a, []int{39} -} - -func (m *EmitEventResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_EmitEventResponse.Unmarshal(m, b) -} -func (m *EmitEventResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_EmitEventResponse.Marshal(b, m, deterministic) -} -func (m *EmitEventResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_EmitEventResponse.Merge(m, src) -} -func (m *EmitEventResponse) XXX_Size() int { - return xxx_messageInfo_EmitEventResponse.Size(m) -} -func (m *EmitEventResponse) XXX_DiscardUnknown() { - xxx_messageInfo_EmitEventResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_EmitEventResponse proto.InternalMessageInfo - -func init() { - proto.RegisterType((*PingRequest)(nil), "xchain.contract.sdk.PingRequest") - proto.RegisterType((*PingResponse)(nil), "xchain.contract.sdk.PingResponse") - proto.RegisterType((*NativeCallRequest)(nil), "xchain.contract.sdk.NativeCallRequest") - proto.RegisterType((*NativeCallResponse)(nil), "xchain.contract.sdk.NativeCallResponse") - proto.RegisterType((*ArgPair)(nil), "xchain.contract.sdk.ArgPair") - proto.RegisterType((*CallArgs)(nil), "xchain.contract.sdk.CallArgs") - proto.RegisterType((*SyscallHeader)(nil), "xchain.contract.sdk.SyscallHeader") - proto.RegisterType((*PutRequest)(nil), "xchain.contract.sdk.PutRequest") - proto.RegisterType((*PutResponse)(nil), "xchain.contract.sdk.PutResponse") - proto.RegisterType((*GetRequest)(nil), "xchain.contract.sdk.GetRequest") - proto.RegisterType((*GetResponse)(nil), "xchain.contract.sdk.GetResponse") - proto.RegisterType((*DeleteRequest)(nil), "xchain.contract.sdk.DeleteRequest") - proto.RegisterType((*DeleteResponse)(nil), "xchain.contract.sdk.DeleteResponse") - proto.RegisterType((*IteratorRequest)(nil), "xchain.contract.sdk.IteratorRequest") - proto.RegisterType((*IteratorItem)(nil), "xchain.contract.sdk.IteratorItem") - proto.RegisterType((*IteratorResponse)(nil), "xchain.contract.sdk.IteratorResponse") - proto.RegisterType((*QueryTxRequest)(nil), "xchain.contract.sdk.QueryTxRequest") - proto.RegisterType((*QueryTxResponse)(nil), "xchain.contract.sdk.QueryTxResponse") - proto.RegisterType((*QueryBlockRequest)(nil), "xchain.contract.sdk.QueryBlockRequest") - proto.RegisterType((*QueryBlockResponse)(nil), "xchain.contract.sdk.QueryBlockResponse") - proto.RegisterType((*TransferRequest)(nil), "xchain.contract.sdk.TransferRequest") - proto.RegisterType((*TransferResponse)(nil), "xchain.contract.sdk.TransferResponse") - proto.RegisterType((*ContractCallRequest)(nil), "xchain.contract.sdk.ContractCallRequest") - proto.RegisterType((*ContractCallResponse)(nil), "xchain.contract.sdk.ContractCallResponse") - proto.RegisterType((*CrossContractQueryRequest)(nil), "xchain.contract.sdk.CrossContractQueryRequest") - proto.RegisterType((*CrossContractQueryResponse)(nil), "xchain.contract.sdk.CrossContractQueryResponse") - proto.RegisterType((*Response)(nil), "xchain.contract.sdk.Response") - proto.RegisterType((*SetOutputRequest)(nil), "xchain.contract.sdk.SetOutputRequest") - proto.RegisterType((*SetOutputResponse)(nil), "xchain.contract.sdk.SetOutputResponse") - proto.RegisterType((*GetCallArgsRequest)(nil), "xchain.contract.sdk.GetCallArgsRequest") - proto.RegisterType((*TxInput)(nil), "xchain.contract.sdk.TxInput") - proto.RegisterType((*TxOutput)(nil), "xchain.contract.sdk.TxOutput") - proto.RegisterType((*Transaction)(nil), "xchain.contract.sdk.Transaction") - proto.RegisterType((*Block)(nil), "xchain.contract.sdk.Block") - proto.RegisterType((*GetAccountAddressesRequest)(nil), "xchain.contract.sdk.GetAccountAddressesRequest") - proto.RegisterType((*GetAccountAddressesResponse)(nil), "xchain.contract.sdk.GetAccountAddressesResponse") - proto.RegisterType((*PostLogRequest)(nil), "xchain.contract.sdk.PostLogRequest") - proto.RegisterType((*PostLogResponse)(nil), "xchain.contract.sdk.PostLogResponse") - proto.RegisterType((*EmitEventRequest)(nil), "xchain.contract.sdk.EmitEventRequest") - proto.RegisterType((*EmitEventResponse)(nil), "xchain.contract.sdk.EmitEventResponse") -} - -func init() { proto.RegisterFile("contract.proto", fileDescriptor_d19debeba7dea55a) } - -var fileDescriptor_d19debeba7dea55a = []byte{ - // 1259 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xdd, 0x6e, 0xdb, 0xc6, - 0x12, 0x06, 0xf5, 0xaf, 0x91, 0x2c, 0xdb, 0xb4, 0x91, 0x43, 0x3b, 0x09, 0xa0, 0x30, 0x38, 0x88, - 0xcf, 0x8d, 0x9c, 0x93, 0x02, 0x2d, 0xd2, 0xf6, 0xc6, 0x71, 0xd3, 0x38, 0x68, 0xd1, 0x38, 0x8c, - 0x80, 0xa2, 0x01, 0x0a, 0x65, 0x45, 0xae, 0xa4, 0x85, 0x45, 0x2e, 0xb3, 0x3b, 0x34, 0xe8, 0xbe, - 0x41, 0xd0, 0x47, 0x28, 0x7a, 0xd5, 0x07, 0xea, 0x5d, 0x9f, 0xa7, 0xd8, 0x1f, 0x52, 0x34, 0xa2, - 0xa4, 0x3f, 0x51, 0xee, 0x66, 0x86, 0xb3, 0x33, 0xdf, 0xcc, 0xce, 0xcc, 0x0e, 0x61, 0x10, 0xf2, - 0x04, 0x05, 0x09, 0x71, 0x94, 0x0a, 0x8e, 0xdc, 0xdd, 0xcb, 0xc3, 0x05, 0x61, 0xc9, 0xa8, 0x14, - 0xcb, 0xe8, 0xc2, 0xdf, 0x82, 0xde, 0x39, 0x4b, 0xe6, 0x01, 0x7d, 0x9d, 0x51, 0x89, 0xfe, 0x00, - 0xfa, 0x86, 0x95, 0x29, 0x4f, 0x24, 0xf5, 0xff, 0x07, 0xbb, 0xdf, 0x11, 0x64, 0x97, 0xf4, 0x94, - 0x2c, 0x97, 0x56, 0xc9, 0xdd, 0x87, 0x66, 0x88, 0x39, 0x8b, 0x3c, 0x67, 0xe8, 0x1c, 0xd5, 0x03, - 0xc3, 0xf8, 0xfb, 0xe0, 0x56, 0x55, 0xad, 0x81, 0xff, 0x43, 0xfb, 0x44, 0xcc, 0xcf, 0x09, 0x13, - 0xee, 0x0e, 0xd4, 0x2f, 0xe8, 0x95, 0x3e, 0xd4, 0x0d, 0x14, 0xa9, 0x0c, 0x5d, 0x92, 0x65, 0x46, - 0xbd, 0xda, 0xd0, 0x39, 0xea, 0x07, 0x86, 0xf1, 0xff, 0x70, 0xa0, 0xa3, 0x6c, 0x9c, 0x88, 0xb9, - 0x74, 0x6f, 0x40, 0x2b, 0xa6, 0xb8, 0xe0, 0x91, 0x3d, 0x67, 0x39, 0xf7, 0x3e, 0x34, 0x88, 0x98, - 0x4b, 0xaf, 0x36, 0xac, 0x1f, 0xf5, 0x1e, 0xdc, 0x1a, 0xad, 0x89, 0x6d, 0x64, 0x1d, 0x07, 0x5a, - 0xd3, 0xbd, 0x05, 0x5d, 0x96, 0x30, 0x64, 0x04, 0xb9, 0xf0, 0xea, 0xda, 0xd8, 0x4a, 0xe0, 0xde, - 0x81, 0x3e, 0xc9, 0x70, 0x31, 0x11, 0xf4, 0x75, 0xc6, 0x04, 0xf5, 0x1a, 0xc3, 0xfa, 0x51, 0x37, - 0xe8, 0x29, 0x59, 0x60, 0x44, 0xee, 0x3d, 0xd8, 0x46, 0x41, 0x12, 0x39, 0xa3, 0x62, 0x42, 0x62, - 0x9e, 0x25, 0xe8, 0x35, 0xb5, 0x99, 0x41, 0x21, 0x3e, 0xd1, 0x52, 0x85, 0x39, 0x24, 0xcb, 0x25, - 0x15, 0x5e, 0xcb, 0x60, 0x36, 0x9c, 0xff, 0x5f, 0xd8, 0x7a, 0x71, 0x25, 0x15, 0x73, 0x46, 0x49, - 0x44, 0xc5, 0x3b, 0x12, 0x99, 0x02, 0x9c, 0x67, 0x58, 0x24, 0xfb, 0x73, 0x68, 0x2d, 0xb4, 0xb6, - 0x56, 0xea, 0x3d, 0xf0, 0xd7, 0x86, 0x7a, 0xcd, 0x6e, 0x60, 0x4f, 0x14, 0x19, 0x37, 0xd9, 0xbd, - 0x9e, 0xf1, 0x7a, 0x35, 0xe3, 0xaa, 0x08, 0x94, 0x47, 0x7b, 0x67, 0x2f, 0x01, 0x9e, 0xd0, 0x8f, - 0x03, 0xc0, 0xbf, 0x0b, 0x3d, 0x6d, 0xdb, 0xb8, 0x5a, 0xe1, 0x71, 0xaa, 0x78, 0x7e, 0x84, 0xad, - 0xaf, 0xe8, 0x92, 0x22, 0xfd, 0x38, 0x18, 0x76, 0x60, 0x50, 0x98, 0xb7, 0x11, 0xff, 0xec, 0xc0, - 0xf6, 0x53, 0xa4, 0x42, 0x95, 0xc2, 0x26, 0x7c, 0xee, 0x43, 0x53, 0x22, 0x11, 0x58, 0x14, 0xb6, - 0x66, 0x94, 0x74, 0xc9, 0x62, 0x86, 0x45, 0xf2, 0x35, 0xa3, 0xf0, 0x85, 0x24, 0xf5, 0x1a, 0x43, - 0xe7, 0xa8, 0x19, 0x28, 0xd2, 0xff, 0x14, 0xfa, 0x05, 0x98, 0xa7, 0x48, 0xe3, 0x6a, 0xe3, 0xf4, - 0xdf, 0xd7, 0x38, 0xdf, 0xc0, 0xce, 0x2a, 0x08, 0x9b, 0xe0, 0xcf, 0xa0, 0xc9, 0x90, 0xc6, 0xd2, - 0x73, 0x74, 0xa3, 0xdc, 0x59, 0x1b, 0x44, 0xd5, 0x5b, 0x60, 0xf4, 0xfd, 0x57, 0x30, 0x78, 0x9e, - 0x51, 0x71, 0x35, 0xce, 0x37, 0x91, 0x10, 0x17, 0x1a, 0xba, 0xd0, 0x6b, 0xba, 0x21, 0x34, 0xed, - 0x9f, 0xc2, 0x76, 0xe9, 0xc1, 0xa2, 0xbd, 0x0f, 0x35, 0xcc, 0xad, 0xf9, 0xe1, 0x5a, 0xf3, 0x63, - 0xd5, 0x6a, 0x24, 0x44, 0xc6, 0x93, 0xa0, 0x86, 0xb9, 0xcf, 0x60, 0x57, 0x1b, 0x79, 0xb4, 0xe4, - 0xe1, 0xc5, 0x26, 0x90, 0x7a, 0xd0, 0x9e, 0x2a, 0x5b, 0x25, 0xd8, 0x82, 0xf5, 0xbf, 0x06, 0xb7, - 0xea, 0xaa, 0x84, 0xdc, 0xd4, 0x0a, 0xd6, 0xd5, 0xe1, 0x5a, 0x57, 0xe6, 0x88, 0x51, 0xf4, 0xdf, - 0x38, 0xb0, 0x3d, 0xb6, 0x13, 0x63, 0x43, 0xb9, 0x9d, 0x09, 0x1e, 0x17, 0xb9, 0x55, 0xb4, 0x3b, - 0x80, 0x1a, 0x72, 0x3b, 0xe5, 0x6a, 0xc8, 0xd5, 0x48, 0xb2, 0x23, 0xab, 0x61, 0x46, 0x92, 0xe1, - 0x7c, 0x17, 0x76, 0x56, 0x50, 0x6c, 0x33, 0xfc, 0xee, 0xc0, 0xde, 0xa9, 0x75, 0x5b, 0x1d, 0xfb, - 0x1f, 0x82, 0x51, 0x8d, 0x71, 0x1e, 0x65, 0x4b, 0x6a, 0x51, 0x5a, 0xce, 0x3d, 0x84, 0x4e, 0x71, - 0xda, 0xa2, 0x2d, 0xf9, 0xca, 0xe8, 0x6f, 0xac, 0x1d, 0xfd, 0xcd, 0xbf, 0x3b, 0xfa, 0xfd, 0xe7, - 0xb0, 0x7f, 0x3d, 0x20, 0x7b, 0x77, 0x0f, 0xa1, 0x23, 0x2c, 0x6d, 0x63, 0xba, 0xbd, 0xd6, 0x5a, - 0x71, 0x20, 0x28, 0xd5, 0xfd, 0x5f, 0x1c, 0x38, 0x38, 0x15, 0x5c, 0xca, 0xc2, 0xb0, 0x2e, 0x8d, - 0x0d, 0xcd, 0xab, 0x4c, 0x30, 0x9b, 0x27, 0x45, 0xfe, 0x8b, 0x80, 0xbf, 0x87, 0xc3, 0x75, 0xe0, - 0x3e, 0x3c, 0xec, 0x73, 0xe8, 0x94, 0x66, 0x6e, 0x40, 0x4b, 0x22, 0xc1, 0x4c, 0x6a, 0x23, 0xcd, - 0xc0, 0x72, 0xaa, 0x83, 0x62, 0x2a, 0x25, 0x99, 0x17, 0x97, 0x5d, 0xb0, 0xaa, 0x52, 0xa7, 0x3c, - 0xba, 0xb2, 0xf3, 0x4f, 0xd3, 0xaa, 0x1b, 0x76, 0x5e, 0x50, 0x7c, 0x96, 0x61, 0xba, 0x99, 0x47, - 0xaf, 0x1a, 0x5d, 0xed, 0x9f, 0x45, 0xb7, 0x07, 0xbb, 0x15, 0x28, 0x65, 0xc8, 0xee, 0x13, 0x8a, - 0xc5, 0x42, 0xb2, 0x01, 0x84, 0xfe, 0xaf, 0x0e, 0xb4, 0xc7, 0xf9, 0xd3, 0x24, 0xcd, 0xd0, 0x3d, - 0x50, 0x68, 0x67, 0x93, 0x72, 0x0b, 0xe8, 0x06, 0x6d, 0x41, 0x67, 0xe3, 0x9c, 0x45, 0xee, 0x6d, - 0x00, 0xf5, 0x89, 0xcf, 0x66, 0x92, 0x9a, 0x97, 0xa4, 0x19, 0x74, 0x05, 0x9d, 0x3d, 0xd3, 0x02, - 0xf7, 0x26, 0x74, 0x55, 0xab, 0x4f, 0x48, 0x14, 0x09, 0xbd, 0x88, 0xf4, 0x83, 0x8e, 0x12, 0x9c, - 0x44, 0x91, 0xa8, 0xf4, 0x7b, 0xab, 0xda, 0xef, 0xee, 0x5d, 0xd8, 0x9a, 0x09, 0xfe, 0x13, 0x4d, - 0x26, 0x0b, 0xca, 0xe6, 0x0b, 0xf4, 0xda, 0x7a, 0xf3, 0xe8, 0x1b, 0xe1, 0x99, 0x96, 0xf9, 0xaf, - 0xa0, 0x33, 0xce, 0x4d, 0x16, 0x2a, 0x86, 0x9c, 0x6b, 0x86, 0xfe, 0x03, 0x6d, 0xe4, 0xc6, 0xb7, - 0x79, 0x83, 0x5a, 0xc8, 0xb5, 0xe7, 0xb7, 0x3c, 0x34, 0xd6, 0x78, 0x78, 0x53, 0x83, 0x5e, 0x65, - 0x92, 0x97, 0xcf, 0x83, 0xb3, 0x7a, 0x1e, 0xde, 0x3d, 0x88, 0xdd, 0x87, 0xd0, 0xc5, 0x7c, 0xc2, - 0x54, 0xfe, 0xa4, 0x57, 0x7f, 0x4f, 0x53, 0xd8, 0x24, 0x07, 0x1d, 0x34, 0x84, 0x74, 0xbf, 0x04, - 0xc0, 0x7c, 0xc2, 0x75, 0x6c, 0x52, 0x2f, 0x79, 0xef, 0x2a, 0x8f, 0x22, 0x03, 0x41, 0x17, 0x2d, - 0x25, 0x15, 0xcc, 0x88, 0xca, 0x50, 0xe7, 0xb4, 0x1f, 0x68, 0xfa, 0xfa, 0x5a, 0x79, 0xf8, 0x57, - 0x6b, 0xe5, 0xcd, 0xb7, 0xd6, 0x4a, 0xff, 0xb7, 0x1a, 0x34, 0xf5, 0xfb, 0x50, 0x8d, 0xb8, 0x7e, - 0x3d, 0xe2, 0x03, 0xe8, 0xa4, 0x82, 0x4e, 0x16, 0x44, 0x2e, 0xec, 0x30, 0x6c, 0xa7, 0x82, 0x9e, - 0x11, 0xb9, 0x50, 0x13, 0x34, 0x15, 0x3c, 0xe5, 0x92, 0x96, 0x55, 0x50, 0xf0, 0x0a, 0xaf, 0x64, - 0xf3, 0xc4, 0xd6, 0x80, 0xa6, 0xd5, 0x85, 0xa6, 0xd9, 0x54, 0xed, 0x13, 0x6d, 0x73, 0x6f, 0x86, - 0x53, 0x72, 0x7b, 0x61, 0x5d, 0x7d, 0x61, 0x96, 0x53, 0xf1, 0x21, 0x8b, 0xa9, 0x44, 0x12, 0xa7, - 0x1e, 0xe8, 0x4f, 0x2b, 0x81, 0x5a, 0x44, 0xd4, 0x65, 0x49, 0xaf, 0xa7, 0x03, 0x33, 0x8c, 0x82, - 0x8b, 0xf9, 0x24, 0xd4, 0x65, 0xd3, 0xd7, 0x75, 0xdb, 0xc6, 0xfc, 0x54, 0xd7, 0xcd, 0x01, 0x74, - 0x58, 0x32, 0x41, 0x91, 0x25, 0x17, 0xde, 0x60, 0xe8, 0x1c, 0x75, 0x82, 0x36, 0x4b, 0xc6, 0x8a, - 0x55, 0x05, 0x9d, 0xd0, 0x1c, 0x4d, 0x94, 0xdb, 0xe6, 0x31, 0x50, 0x02, 0x15, 0xa6, 0x2f, 0xe0, - 0xf0, 0x09, 0xc5, 0x93, 0x50, 0x1b, 0x55, 0x85, 0x46, 0xa5, 0xa4, 0x72, 0x43, 0x0f, 0x3e, 0x31, - 0x66, 0x8b, 0x3a, 0xb3, 0xac, 0xff, 0x05, 0xdc, 0x5c, 0xeb, 0xd3, 0xce, 0xbf, 0x5b, 0xd0, 0x25, - 0x85, 0x50, 0xaf, 0x57, 0xdd, 0x60, 0x25, 0xf0, 0xa7, 0x30, 0x38, 0xe7, 0x12, 0xbf, 0xe5, 0xf3, - 0x0d, 0x2d, 0x94, 0x34, 0x41, 0x71, 0x65, 0x21, 0x1a, 0xc6, 0xbf, 0x07, 0xdb, 0xa5, 0x8f, 0xd5, - 0x42, 0x6d, 0x14, 0x9d, 0xaa, 0xe2, 0x25, 0xec, 0x3c, 0x8e, 0x19, 0x3e, 0xbe, 0xa4, 0x09, 0x6e, - 0x68, 0xe5, 0x48, 0x48, 0x5c, 0xcc, 0x77, 0x4d, 0xaf, 0x1d, 0xee, 0x7b, 0xb0, 0x5b, 0xf1, 0x6b, - 0x20, 0x3e, 0xfa, 0x01, 0x0e, 0x43, 0x1e, 0x8f, 0xa6, 0x84, 0x45, 0xd9, 0x28, 0xcf, 0x52, 0x2a, - 0x4a, 0x97, 0xe9, 0xf4, 0xac, 0xfe, 0xf2, 0xe1, 0x9c, 0xe1, 0x22, 0x9b, 0x8e, 0x42, 0x1e, 0x1f, - 0xeb, 0xcf, 0x1a, 0x96, 0x25, 0xb9, 0xa0, 0xc7, 0x17, 0x54, 0x24, 0x74, 0x79, 0x5c, 0x1c, 0x3a, - 0x9e, 0x0a, 0x16, 0xcd, 0xe9, 0x71, 0x3a, 0x9d, 0xb6, 0xf4, 0x9f, 0xee, 0x27, 0x7f, 0x06, 0x00, - 0x00, 0xff, 0xff, 0x17, 0xf0, 0xb8, 0x06, 0xfb, 0x0e, 0x00, 0x00, +func (x *CrossQueryResponse) Reset() { + *x = CrossQueryResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CrossQueryResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CrossQueryResponse) ProtoMessage() {} + +func (x *CrossQueryResponse) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[47] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CrossQueryResponse.ProtoReflect.Descriptor instead. +func (*CrossQueryResponse) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{47} +} + +func (x *CrossQueryResponse) GetResponse() *ContractResponse { + if x != nil { + return x.Response + } + return nil +} + +// 签名详情 +type SignatureInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PublicKey string `protobuf:"bytes,1,opt,name=PublicKey,proto3" json:"PublicKey,omitempty"` + Sign []byte `protobuf:"bytes,2,opt,name=Sign,proto3" json:"Sign,omitempty"` +} + +func (x *SignatureInfo) Reset() { + *x = SignatureInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SignatureInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignatureInfo) ProtoMessage() {} + +func (x *SignatureInfo) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[48] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SignatureInfo.ProtoReflect.Descriptor instead. +func (*SignatureInfo) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{48} +} + +func (x *SignatureInfo) GetPublicKey() string { + if x != nil { + return x.PublicKey + } + return "" +} + +func (x *SignatureInfo) GetSign() []byte { + if x != nil { + return x.Sign + } + return nil +} + +type CrossQueryInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Request *CrossQueryRequest `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` + Response *CrossQueryResponse `protobuf:"bytes,2,opt,name=response,proto3" json:"response,omitempty"` + Signs []*SignatureInfo `protobuf:"bytes,3,rep,name=signs,proto3" json:"signs,omitempty"` +} + +func (x *CrossQueryInfo) Reset() { + *x = CrossQueryInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CrossQueryInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CrossQueryInfo) ProtoMessage() {} + +func (x *CrossQueryInfo) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[49] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CrossQueryInfo.ProtoReflect.Descriptor instead. +func (*CrossQueryInfo) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{49} +} + +func (x *CrossQueryInfo) GetRequest() *CrossQueryRequest { + if x != nil { + return x.Request + } + return nil +} + +func (x *CrossQueryInfo) GetResponse() *CrossQueryResponse { + if x != nil { + return x.Response + } + return nil +} + +func (x *CrossQueryInfo) GetSigns() []*SignatureInfo { + if x != nil { + return x.Signs + } + return nil +} + +type Header struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Logid string `protobuf:"bytes,1,opt,name=logid,proto3" json:"logid,omitempty"` //如果logid没填写,生成一个 + FromNode string `protobuf:"bytes,2,opt,name=from_node,json=fromNode,proto3" json:"from_node,omitempty"` // call rpc client address,客户端可以为空,节点一定要写自己的address + Error XChainErrorEnum `protobuf:"varint,3,opt,name=error,proto3,enum=xchain.contract.sdk.XChainErrorEnum" json:"error,omitempty"` +} + +func (x *Header) Reset() { + *x = Header{} + if protoimpl.UnsafeEnabled { + mi := &file_contract_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Header) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Header) ProtoMessage() {} + +func (x *Header) ProtoReflect() protoreflect.Message { + mi := &file_contract_proto_msgTypes[50] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Header.ProtoReflect.Descriptor instead. +func (*Header) Descriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{50} +} + +func (x *Header) GetLogid() string { + if x != nil { + return x.Logid + } + return "" +} + +func (x *Header) GetFromNode() string { + if x != nil { + return x.FromNode + } + return "" +} + +func (x *Header) GetError() XChainErrorEnum { + if x != nil { + return x.Error + } + return XChainErrorEnum_SUCCESS +} + +var File_contract_proto protoreflect.FileDescriptor + +var file_contract_proto_rawDesc = []byte{ + 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x13, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, + 0x74, 0x2e, 0x73, 0x64, 0x6b, 0x22, 0x0d, 0x0a, 0x0b, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x22, 0x0e, 0x0a, 0x0c, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x0a, 0x11, 0x4e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x43, 0x61, + 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x74, 0x78, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x74, 0x78, 0x69, 0x64, 0x22, + 0x14, 0x0a, 0x12, 0x4e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x0a, 0x07, 0x41, 0x72, 0x67, 0x50, 0x61, 0x69, 0x72, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xd6, 0x01, 0x0a, 0x08, 0x43, 0x61, 0x6c, + 0x6c, 0x41, 0x72, 0x67, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x30, 0x0a, + 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x78, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x73, 0x64, + 0x6b, 0x2e, 0x41, 0x72, 0x67, 0x50, 0x61, 0x69, 0x72, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x12, + 0x1c, 0x0a, 0x09, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x21, 0x0a, + 0x0c, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x75, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, + 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x5f, 0x61, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x66, 0x65, 0x72, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x61, 0x6c, + 0x6c, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x61, 0x6c, 0x6c, 0x65, + 0x72, 0x22, 0x25, 0x0a, 0x0d, 0x53, 0x79, 0x73, 0x63, 0x61, 0x6c, 0x6c, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x74, 0x78, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x05, 0x63, 0x74, 0x78, 0x69, 0x64, 0x22, 0x70, 0x0a, 0x0a, 0x50, 0x75, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x53, 0x79, 0x73, + 0x63, 0x61, 0x6c, 0x6c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x0d, 0x0a, 0x0b, 0x50, 0x75, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5a, 0x0a, 0x0a, 0x47, 0x65, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x53, 0x79, + 0x73, 0x63, 0x61, 0x6c, 0x6c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x23, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x5d, 0x0a, 0x0d, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x06, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x78, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x73, 0x64, + 0x6b, 0x2e, 0x53, 0x79, 0x73, 0x63, 0x61, 0x6c, 0x6c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, + 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x10, 0x0a, 0x0e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8b, 0x01, 0x0a, 0x0f, + 0x49, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x3a, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x22, 0x2e, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, + 0x74, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x53, 0x79, 0x73, 0x63, 0x61, 0x6c, 0x6c, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x61, 0x70, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x63, 0x61, 0x70, 0x22, 0x36, 0x0a, 0x0c, 0x49, 0x74, 0x65, + 0x72, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x22, 0x4b, 0x0a, 0x10, 0x49, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x49, 0x74, 0x65, 0x72, 0x61, + 0x74, 0x6f, 0x72, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x60, + 0x0a, 0x0e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x3a, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x22, 0x2e, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, + 0x63, 0x74, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x53, 0x79, 0x73, 0x63, 0x61, 0x6c, 0x6c, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, + 0x74, 0x78, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x78, 0x69, 0x64, + 0x22, 0x43, 0x0a, 0x0f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x02, 0x74, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x20, 0x2e, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, + 0x74, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x02, 0x74, 0x78, 0x22, 0x69, 0x0a, 0x11, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x06, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x78, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x73, 0x64, 0x6b, + 0x2e, 0x53, 0x79, 0x73, 0x63, 0x61, 0x6c, 0x6c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x64, + 0x22, 0x46, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0x89, 0x01, 0x0a, 0x0f, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x06, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x78, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x73, + 0x64, 0x6b, 0x2e, 0x53, 0x79, 0x73, 0x63, 0x61, 0x6c, 0x6c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x0e, 0x0a, 0x02, + 0x74, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x16, 0x0a, 0x06, + 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x12, 0x0a, 0x10, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xcf, 0x01, 0x0a, 0x13, 0x43, 0x6f, 0x6e, + 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x3a, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x22, 0x2e, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, + 0x63, 0x74, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x53, 0x79, 0x73, 0x63, 0x61, 0x6c, 0x6c, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, + 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x6f, + 0x64, 0x75, 0x6c, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, + 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x30, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, + 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x41, 0x72, 0x67, + 0x50, 0x61, 0x69, 0x72, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x22, 0x51, 0x0a, 0x14, 0x43, 0x6f, + 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x39, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9b, 0x01, + 0x0a, 0x19, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x06, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x78, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x73, 0x64, + 0x6b, 0x2e, 0x53, 0x79, 0x73, 0x63, 0x61, 0x6c, 0x6c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, + 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x69, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x69, 0x12, 0x30, 0x0a, 0x04, 0x61, 0x72, 0x67, + 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x41, 0x72, + 0x67, 0x50, 0x61, 0x69, 0x72, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x22, 0x57, 0x0a, 0x1a, 0x43, + 0x72, 0x6f, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x08, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x78, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x73, 0x64, + 0x6b, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x50, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x89, 0x01, 0x0a, 0x10, 0x53, 0x65, 0x74, 0x4f, 0x75, + 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x06, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x78, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x73, 0x64, + 0x6b, 0x2e, 0x53, 0x79, 0x73, 0x63, 0x61, 0x6c, 0x6c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, + 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x78, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x73, 0x64, 0x6b, 0x2e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x13, 0x0a, 0x11, 0x53, 0x65, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x50, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x43, 0x61, + 0x6c, 0x6c, 0x41, 0x72, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, + 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, + 0x73, 0x64, 0x6b, 0x2e, 0x53, 0x79, 0x73, 0x63, 0x61, 0x6c, 0x6c, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0x9d, 0x01, 0x0a, 0x07, 0x54, 0x78, + 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x72, 0x65, 0x66, 0x5f, 0x74, 0x78, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x66, 0x54, 0x78, 0x69, 0x64, + 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x66, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x72, 0x65, 0x66, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, + 0x1b, 0x0a, 0x09, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x08, 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x12, 0x16, 0x0a, 0x06, + 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x72, 0x6f, 0x7a, 0x65, 0x6e, 0x5f, 0x68, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x66, 0x72, 0x6f, + 0x7a, 0x65, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x60, 0x0a, 0x08, 0x54, 0x78, 0x4f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x17, 0x0a, + 0x07, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, + 0x74, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x72, 0x6f, 0x7a, 0x65, 0x6e, + 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x66, + 0x72, 0x6f, 0x7a, 0x65, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x89, 0x02, 0x0a, 0x0b, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, + 0x78, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x78, 0x69, 0x64, 0x12, + 0x18, 0x0a, 0x07, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x64, 0x12, 0x39, 0x0a, 0x09, 0x74, 0x78, 0x5f, + 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x78, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x73, + 0x64, 0x6b, 0x2e, 0x54, 0x78, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x52, 0x08, 0x74, 0x78, 0x49, 0x6e, + 0x70, 0x75, 0x74, 0x73, 0x12, 0x3c, 0x0a, 0x0a, 0x74, 0x78, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x78, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x54, + 0x78, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x09, 0x74, 0x78, 0x4f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x04, 0x64, 0x65, 0x73, 0x63, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, + 0x74, 0x6f, 0x72, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, 0x69, 0x74, 0x69, + 0x61, 0x74, 0x6f, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x71, + 0x75, 0x69, 0x72, 0x65, 0x18, 0x1b, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x75, 0x74, 0x68, + 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x22, 0xa3, 0x02, 0x0a, 0x05, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x70, + 0x72, 0x65, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, + 0x72, 0x65, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x67, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x73, 0x69, 0x67, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x16, + 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, + 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x78, 0x69, 0x64, 0x73, 0x18, 0x0b, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x05, 0x74, 0x78, 0x69, 0x64, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x78, + 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x74, 0x78, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x6e, 0x5f, 0x74, 0x72, 0x75, 0x6e, + 0x6b, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x6e, 0x54, 0x72, 0x75, 0x6e, 0x6b, + 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x0f, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x65, 0x78, 0x74, 0x48, 0x61, 0x73, 0x68, 0x22, 0x72, 0x0a, + 0x1a, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x06, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x78, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x73, 0x64, + 0x6b, 0x2e, 0x53, 0x79, 0x73, 0x63, 0x61, 0x6c, 0x6c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, + 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x22, 0x3b, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x22, 0x62, + 0x0a, 0x0e, 0x50, 0x6f, 0x73, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x3a, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x22, 0x2e, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, + 0x63, 0x74, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x53, 0x79, 0x73, 0x63, 0x61, 0x6c, 0x6c, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6e, 0x74, + 0x72, 0x79, 0x22, 0x27, 0x0a, 0x0f, 0x50, 0x6f, 0x73, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x76, 0x0a, 0x10, 0x45, + 0x6d, 0x69, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x3a, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x22, 0x2e, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, + 0x74, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x53, 0x79, 0x73, 0x63, 0x61, 0x6c, 0x6c, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x62, + 0x6f, 0x64, 0x79, 0x22, 0x13, 0x0a, 0x11, 0x45, 0x6d, 0x69, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xc8, 0x01, 0x0a, 0x11, 0x43, 0x72, 0x6f, + 0x73, 0x73, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, + 0x0a, 0x06, 0x62, 0x63, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x62, 0x63, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x6f, + 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, + 0x6f, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, + 0x72, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x75, 0x74, 0x68, 0x52, 0x65, + 0x71, 0x75, 0x69, 0x72, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x49, 0x6e, 0x76, + 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x22, 0xd6, 0x02, 0x0a, 0x0d, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x6f, 0x64, 0x75, + 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, + 0x63, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, + 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x04, + 0x61, 0x72, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x78, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x73, 0x64, 0x6b, + 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x41, + 0x72, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x12, 0x4b, + 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x0e, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x61, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x1a, 0x37, 0x0a, 0x09, 0x41, 0x72, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x5c, 0x0a, 0x0d, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x35, 0x0a, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x78, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x73, 0x64, + 0x6b, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x4e, 0x0a, 0x0e, 0x43, 0x72, + 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x12, 0x28, 0x0a, 0x10, 0x6d, 0x69, 0x6e, 0x5f, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x73, 0x6f, 0x72, + 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x6d, 0x69, 0x6e, 0x45, + 0x6e, 0x64, 0x6f, 0x72, 0x73, 0x6f, 0x72, 0x4e, 0x75, 0x6d, 0x22, 0x56, 0x0a, 0x0d, 0x43, 0x72, + 0x6f, 0x73, 0x73, 0x45, 0x6e, 0x64, 0x6f, 0x72, 0x73, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x12, + 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, + 0x73, 0x74, 0x22, 0x96, 0x01, 0x0a, 0x0e, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x42, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x6d, + 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x78, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x73, 0x64, 0x6b, 0x2e, + 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x09, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x40, 0x0a, 0x09, 0x65, 0x6e, 0x64, + 0x6f, 0x72, 0x73, 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x78, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x73, + 0x64, 0x6b, 0x2e, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x45, 0x6e, 0x64, 0x6f, 0x72, 0x73, 0x6f, 0x72, + 0x52, 0x09, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x73, 0x6f, 0x72, 0x73, 0x22, 0x58, 0x0a, 0x10, 0x43, + 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x57, 0x0a, 0x12, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x08, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, + 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, + 0x73, 0x64, 0x6b, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x41, + 0x0a, 0x0d, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, + 0x1c, 0x0a, 0x09, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x12, 0x0a, + 0x04, 0x53, 0x69, 0x67, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x53, 0x69, 0x67, + 0x6e, 0x22, 0xd1, 0x01, 0x0a, 0x0e, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x40, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x43, 0x72, 0x6f, 0x73, + 0x73, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x07, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x43, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x78, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x43, + 0x72, 0x6f, 0x73, 0x73, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x05, 0x73, + 0x69, 0x67, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x78, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x73, 0x64, 0x6b, + 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, + 0x73, 0x69, 0x67, 0x6e, 0x73, 0x22, 0x77, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, + 0x14, 0x0a, 0x05, 0x6c, 0x6f, 0x67, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x6c, 0x6f, 0x67, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x6e, 0x6f, + 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x6f, 0x6d, 0x4e, 0x6f, + 0x64, 0x65, 0x12, 0x3a, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x24, 0x2e, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x61, 0x63, 0x74, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x58, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2a, 0xad, + 0x06, 0x0a, 0x0f, 0x58, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x45, 0x6e, + 0x75, 0x6d, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12, + 0x10, 0x0a, 0x0c, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, + 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x5f, 0x52, 0x45, 0x46, + 0x55, 0x53, 0x45, 0x10, 0x02, 0x12, 0x19, 0x0a, 0x15, 0x4e, 0x4f, 0x54, 0x5f, 0x45, 0x4e, 0x4f, + 0x55, 0x47, 0x48, 0x5f, 0x55, 0x54, 0x58, 0x4f, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, + 0x12, 0x22, 0x0a, 0x1e, 0x55, 0x54, 0x58, 0x4f, 0x56, 0x4d, 0x5f, 0x41, 0x4c, 0x52, 0x45, 0x41, + 0x44, 0x59, 0x5f, 0x55, 0x4e, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x5f, 0x45, 0x52, 0x52, + 0x4f, 0x52, 0x10, 0x04, 0x12, 0x1a, 0x0a, 0x16, 0x55, 0x54, 0x58, 0x4f, 0x56, 0x4d, 0x5f, 0x4e, + 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x05, + 0x12, 0x20, 0x0a, 0x1c, 0x49, 0x4e, 0x50, 0x55, 0x54, 0x5f, 0x4f, 0x55, 0x54, 0x50, 0x55, 0x54, + 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x45, 0x51, 0x55, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, + 0x10, 0x06, 0x12, 0x16, 0x0a, 0x12, 0x54, 0x58, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, + 0x4e, 0x44, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x07, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x58, + 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x08, 0x12, 0x17, 0x0a, + 0x13, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x5f, 0x4e, 0x4f, 0x54, 0x45, + 0x58, 0x49, 0x53, 0x54, 0x10, 0x09, 0x12, 0x12, 0x0a, 0x0e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, + 0x54, 0x45, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x0a, 0x12, 0x1b, 0x0a, 0x17, 0x43, 0x41, + 0x4e, 0x4e, 0x4f, 0x54, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, + 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x0b, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4f, 0x4e, 0x46, 0x49, + 0x52, 0x4d, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x0c, + 0x12, 0x15, 0x0a, 0x11, 0x55, 0x54, 0x58, 0x4f, 0x56, 0x4d, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x5f, + 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x0d, 0x12, 0x0e, 0x0a, 0x0a, 0x57, 0x41, 0x4c, 0x4b, 0x5f, + 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x0e, 0x12, 0x13, 0x0a, 0x0f, 0x4e, 0x4f, 0x54, 0x5f, 0x52, + 0x45, 0x41, 0x44, 0x59, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x0f, 0x12, 0x15, 0x0a, 0x11, + 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x45, 0x58, 0x49, 0x53, 0x54, 0x5f, 0x45, 0x52, 0x52, 0x4f, + 0x52, 0x10, 0x10, 0x12, 0x1a, 0x0a, 0x16, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x42, 0x4c, 0x4f, 0x43, + 0x4b, 0x5f, 0x45, 0x58, 0x49, 0x53, 0x54, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x11, 0x12, + 0x16, 0x0a, 0x12, 0x54, 0x58, 0x5f, 0x44, 0x55, 0x50, 0x4c, 0x49, 0x43, 0x41, 0x54, 0x45, 0x5f, + 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x13, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x45, 0x52, 0x56, 0x49, + 0x43, 0x45, 0x5f, 0x52, 0x45, 0x46, 0x55, 0x53, 0x45, 0x44, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, + 0x10, 0x14, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x58, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x53, 0x49, 0x47, + 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x15, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x58, 0x5f, + 0x53, 0x4c, 0x45, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x19, 0x12, 0x1b, 0x0a, 0x17, 0x54, + 0x58, 0x5f, 0x46, 0x45, 0x45, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x45, 0x4e, 0x4f, 0x55, 0x47, 0x48, + 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x1a, 0x12, 0x13, 0x0a, 0x0f, 0x55, 0x54, 0x58, 0x4f, + 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x1c, 0x12, 0x14, 0x0a, + 0x10, 0x44, 0x50, 0x4f, 0x53, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x59, 0x5f, 0x45, 0x52, 0x52, 0x4f, + 0x52, 0x10, 0x1f, 0x12, 0x17, 0x0a, 0x13, 0x52, 0x57, 0x53, 0x45, 0x54, 0x5f, 0x49, 0x4e, 0x56, + 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x21, 0x12, 0x17, 0x0a, 0x13, + 0x52, 0x57, 0x41, 0x43, 0x4c, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x45, 0x52, + 0x52, 0x4f, 0x52, 0x10, 0x22, 0x12, 0x18, 0x0a, 0x14, 0x47, 0x41, 0x53, 0x5f, 0x4e, 0x4f, 0x54, + 0x5f, 0x45, 0x4e, 0x4f, 0x55, 0x47, 0x48, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x23, 0x12, + 0x1c, 0x0a, 0x18, 0x54, 0x58, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, + 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x24, 0x12, 0x21, 0x0a, + 0x1d, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x49, 0x41, 0x4e, 0x43, 0x45, 0x5f, 0x43, 0x48, 0x45, 0x43, + 0x4b, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x41, 0x50, 0x50, 0x52, 0x4f, 0x56, 0x45, 0x44, 0x10, 0x25, + 0x12, 0x21, 0x0a, 0x1d, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x43, 0x4f, 0x4e, 0x54, + 0x52, 0x41, 0x43, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x52, 0x52, 0x4f, + 0x52, 0x10, 0x26, 0x12, 0x19, 0x0a, 0x15, 0x54, 0x58, 0x5f, 0x56, 0x45, 0x52, 0x49, 0x46, 0x49, + 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x28, 0x2a, 0x37, + 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, + 0x0a, 0x03, 0x43, 0x50, 0x55, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x45, 0x4d, 0x4f, 0x52, + 0x59, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x49, 0x53, 0x4b, 0x10, 0x02, 0x12, 0x08, 0x0a, + 0x04, 0x58, 0x46, 0x45, 0x45, 0x10, 0x03, 0x42, 0x59, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x62, + 0x61, 0x69, 0x64, 0x75, 0x2e, 0x78, 0x75, 0x70, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x61, 0x63, 0x74, 0x70, 0x62, 0x48, 0x03, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x75, 0x70, 0x65, 0x72, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x78, + 0x75, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x2f, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2f, + 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_contract_proto_rawDescOnce sync.Once + file_contract_proto_rawDescData = file_contract_proto_rawDesc +) + +func file_contract_proto_rawDescGZIP() []byte { + file_contract_proto_rawDescOnce.Do(func() { + file_contract_proto_rawDescData = protoimpl.X.CompressGZIP(file_contract_proto_rawDescData) + }) + return file_contract_proto_rawDescData +} + +var file_contract_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_contract_proto_msgTypes = make([]protoimpl.MessageInfo, 52) +var file_contract_proto_goTypes = []interface{}{ + (XChainErrorEnum)(0), // 0: xchain.contract.sdk.XChainErrorEnum + (ResourceType)(0), // 1: xchain.contract.sdk.ResourceType + (*PingRequest)(nil), // 2: xchain.contract.sdk.PingRequest + (*PingResponse)(nil), // 3: xchain.contract.sdk.PingResponse + (*NativeCallRequest)(nil), // 4: xchain.contract.sdk.NativeCallRequest + (*NativeCallResponse)(nil), // 5: xchain.contract.sdk.NativeCallResponse + (*ArgPair)(nil), // 6: xchain.contract.sdk.ArgPair + (*CallArgs)(nil), // 7: xchain.contract.sdk.CallArgs + (*SyscallHeader)(nil), // 8: xchain.contract.sdk.SyscallHeader + (*PutRequest)(nil), // 9: xchain.contract.sdk.PutRequest + (*PutResponse)(nil), // 10: xchain.contract.sdk.PutResponse + (*GetRequest)(nil), // 11: xchain.contract.sdk.GetRequest + (*GetResponse)(nil), // 12: xchain.contract.sdk.GetResponse + (*DeleteRequest)(nil), // 13: xchain.contract.sdk.DeleteRequest + (*DeleteResponse)(nil), // 14: xchain.contract.sdk.DeleteResponse + (*IteratorRequest)(nil), // 15: xchain.contract.sdk.IteratorRequest + (*IteratorItem)(nil), // 16: xchain.contract.sdk.IteratorItem + (*IteratorResponse)(nil), // 17: xchain.contract.sdk.IteratorResponse + (*QueryTxRequest)(nil), // 18: xchain.contract.sdk.QueryTxRequest + (*QueryTxResponse)(nil), // 19: xchain.contract.sdk.QueryTxResponse + (*QueryBlockRequest)(nil), // 20: xchain.contract.sdk.QueryBlockRequest + (*QueryBlockResponse)(nil), // 21: xchain.contract.sdk.QueryBlockResponse + (*TransferRequest)(nil), // 22: xchain.contract.sdk.TransferRequest + (*TransferResponse)(nil), // 23: xchain.contract.sdk.TransferResponse + (*ContractCallRequest)(nil), // 24: xchain.contract.sdk.ContractCallRequest + (*ContractCallResponse)(nil), // 25: xchain.contract.sdk.ContractCallResponse + (*CrossContractQueryRequest)(nil), // 26: xchain.contract.sdk.CrossContractQueryRequest + (*CrossContractQueryResponse)(nil), // 27: xchain.contract.sdk.CrossContractQueryResponse + (*Response)(nil), // 28: xchain.contract.sdk.Response + (*SetOutputRequest)(nil), // 29: xchain.contract.sdk.SetOutputRequest + (*SetOutputResponse)(nil), // 30: xchain.contract.sdk.SetOutputResponse + (*GetCallArgsRequest)(nil), // 31: xchain.contract.sdk.GetCallArgsRequest + (*TxInput)(nil), // 32: xchain.contract.sdk.TxInput + (*TxOutput)(nil), // 33: xchain.contract.sdk.TxOutput + (*Transaction)(nil), // 34: xchain.contract.sdk.Transaction + (*Block)(nil), // 35: xchain.contract.sdk.Block + (*GetAccountAddressesRequest)(nil), // 36: xchain.contract.sdk.GetAccountAddressesRequest + (*GetAccountAddressesResponse)(nil), // 37: xchain.contract.sdk.GetAccountAddressesResponse + (*PostLogRequest)(nil), // 38: xchain.contract.sdk.PostLogRequest + (*PostLogResponse)(nil), // 39: xchain.contract.sdk.PostLogResponse + (*EmitEventRequest)(nil), // 40: xchain.contract.sdk.EmitEventRequest + (*EmitEventResponse)(nil), // 41: xchain.contract.sdk.EmitEventResponse + (*CrossQueryRequest)(nil), // 42: xchain.contract.sdk.CrossQueryRequest + (*InvokeRequest)(nil), // 43: xchain.contract.sdk.InvokeRequest + (*ResourceLimit)(nil), // 44: xchain.contract.sdk.ResourceLimit + (*CrossChainMeta)(nil), // 45: xchain.contract.sdk.CrossChainMeta + (*CrossEndorsor)(nil), // 46: xchain.contract.sdk.CrossEndorsor + (*CrossQueryMeta)(nil), // 47: xchain.contract.sdk.CrossQueryMeta + (*ContractResponse)(nil), // 48: xchain.contract.sdk.ContractResponse + (*CrossQueryResponse)(nil), // 49: xchain.contract.sdk.CrossQueryResponse + (*SignatureInfo)(nil), // 50: xchain.contract.sdk.SignatureInfo + (*CrossQueryInfo)(nil), // 51: xchain.contract.sdk.CrossQueryInfo + (*Header)(nil), // 52: xchain.contract.sdk.Header + nil, // 53: xchain.contract.sdk.InvokeRequest.ArgsEntry +} +var file_contract_proto_depIdxs = []int32{ + 6, // 0: xchain.contract.sdk.CallArgs.args:type_name -> xchain.contract.sdk.ArgPair + 8, // 1: xchain.contract.sdk.PutRequest.header:type_name -> xchain.contract.sdk.SyscallHeader + 8, // 2: xchain.contract.sdk.GetRequest.header:type_name -> xchain.contract.sdk.SyscallHeader + 8, // 3: xchain.contract.sdk.DeleteRequest.header:type_name -> xchain.contract.sdk.SyscallHeader + 8, // 4: xchain.contract.sdk.IteratorRequest.header:type_name -> xchain.contract.sdk.SyscallHeader + 16, // 5: xchain.contract.sdk.IteratorResponse.items:type_name -> xchain.contract.sdk.IteratorItem + 8, // 6: xchain.contract.sdk.QueryTxRequest.header:type_name -> xchain.contract.sdk.SyscallHeader + 34, // 7: xchain.contract.sdk.QueryTxResponse.tx:type_name -> xchain.contract.sdk.Transaction + 8, // 8: xchain.contract.sdk.QueryBlockRequest.header:type_name -> xchain.contract.sdk.SyscallHeader + 35, // 9: xchain.contract.sdk.QueryBlockResponse.block:type_name -> xchain.contract.sdk.Block + 8, // 10: xchain.contract.sdk.TransferRequest.header:type_name -> xchain.contract.sdk.SyscallHeader + 8, // 11: xchain.contract.sdk.ContractCallRequest.header:type_name -> xchain.contract.sdk.SyscallHeader + 6, // 12: xchain.contract.sdk.ContractCallRequest.args:type_name -> xchain.contract.sdk.ArgPair + 28, // 13: xchain.contract.sdk.ContractCallResponse.response:type_name -> xchain.contract.sdk.Response + 8, // 14: xchain.contract.sdk.CrossContractQueryRequest.header:type_name -> xchain.contract.sdk.SyscallHeader + 6, // 15: xchain.contract.sdk.CrossContractQueryRequest.args:type_name -> xchain.contract.sdk.ArgPair + 28, // 16: xchain.contract.sdk.CrossContractQueryResponse.response:type_name -> xchain.contract.sdk.Response + 8, // 17: xchain.contract.sdk.SetOutputRequest.header:type_name -> xchain.contract.sdk.SyscallHeader + 28, // 18: xchain.contract.sdk.SetOutputRequest.response:type_name -> xchain.contract.sdk.Response + 8, // 19: xchain.contract.sdk.GetCallArgsRequest.header:type_name -> xchain.contract.sdk.SyscallHeader + 32, // 20: xchain.contract.sdk.Transaction.tx_inputs:type_name -> xchain.contract.sdk.TxInput + 33, // 21: xchain.contract.sdk.Transaction.tx_outputs:type_name -> xchain.contract.sdk.TxOutput + 8, // 22: xchain.contract.sdk.GetAccountAddressesRequest.header:type_name -> xchain.contract.sdk.SyscallHeader + 8, // 23: xchain.contract.sdk.PostLogRequest.header:type_name -> xchain.contract.sdk.SyscallHeader + 8, // 24: xchain.contract.sdk.EmitEventRequest.header:type_name -> xchain.contract.sdk.SyscallHeader + 43, // 25: xchain.contract.sdk.CrossQueryRequest.request:type_name -> xchain.contract.sdk.InvokeRequest + 53, // 26: xchain.contract.sdk.InvokeRequest.args:type_name -> xchain.contract.sdk.InvokeRequest.ArgsEntry + 44, // 27: xchain.contract.sdk.InvokeRequest.resource_limits:type_name -> xchain.contract.sdk.ResourceLimit + 1, // 28: xchain.contract.sdk.ResourceLimit.type:type_name -> xchain.contract.sdk.ResourceType + 45, // 29: xchain.contract.sdk.CrossQueryMeta.chain_meta:type_name -> xchain.contract.sdk.CrossChainMeta + 46, // 30: xchain.contract.sdk.CrossQueryMeta.endorsors:type_name -> xchain.contract.sdk.CrossEndorsor + 48, // 31: xchain.contract.sdk.CrossQueryResponse.response:type_name -> xchain.contract.sdk.ContractResponse + 42, // 32: xchain.contract.sdk.CrossQueryInfo.request:type_name -> xchain.contract.sdk.CrossQueryRequest + 49, // 33: xchain.contract.sdk.CrossQueryInfo.response:type_name -> xchain.contract.sdk.CrossQueryResponse + 50, // 34: xchain.contract.sdk.CrossQueryInfo.signs:type_name -> xchain.contract.sdk.SignatureInfo + 0, // 35: xchain.contract.sdk.Header.error:type_name -> xchain.contract.sdk.XChainErrorEnum + 36, // [36:36] is the sub-list for method output_type + 36, // [36:36] is the sub-list for method input_type + 36, // [36:36] is the sub-list for extension type_name + 36, // [36:36] is the sub-list for extension extendee + 0, // [0:36] is the sub-list for field type_name +} + +func init() { file_contract_proto_init() } +func file_contract_proto_init() { + if File_contract_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_contract_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PingRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PingResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NativeCallRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NativeCallResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ArgPair); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CallArgs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SyscallHeader); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PutRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PutResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IteratorRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IteratorItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IteratorResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryTxRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryTxResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryBlockRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryBlockResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TransferRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TransferResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ContractCallRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ContractCallResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CrossContractQueryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CrossContractQueryResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Response); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetOutputRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetOutputResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetCallArgsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TxInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TxOutput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Transaction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Block); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetAccountAddressesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetAccountAddressesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PostLogRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PostLogResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EmitEventRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EmitEventResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CrossQueryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InvokeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResourceLimit); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CrossChainMeta); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CrossEndorsor); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CrossQueryMeta); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ContractResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CrossQueryResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SignatureInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CrossQueryInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_contract_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Header); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_contract_proto_rawDesc, + NumEnums: 2, + NumMessages: 52, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_contract_proto_goTypes, + DependencyIndexes: file_contract_proto_depIdxs, + EnumInfos: file_contract_proto_enumTypes, + MessageInfos: file_contract_proto_msgTypes, + }.Build() + File_contract_proto = out.File + file_contract_proto_rawDesc = nil + file_contract_proto_goTypes = nil + file_contract_proto_depIdxs = nil } diff --git a/kernel/contract/bridge/pb/contract.proto b/kernel/contract/bridge/pb/contract.proto index 20bab52b..db2f10fa 100644 --- a/kernel/contract/bridge/pb/contract.proto +++ b/kernel/contract/bridge/pb/contract.proto @@ -11,6 +11,43 @@ message PingRequest { message PingResponse { } + +enum XChainErrorEnum { + SUCCESS = 0; + UNKNOW_ERROR = 1; + CONNECT_REFUSE = 2; + NOT_ENOUGH_UTXO_ERROR = 3; + UTXOVM_ALREADY_UNCONFIRM_ERROR = 4; + UTXOVM_NOT_FOUND_ERROR = 5; + INPUT_OUTPUT_NOT_EQUAL_ERROR = 6; + TX_NOT_FOUND_ERROR = 7; + TX_SIGN_ERROR = 8; + BLOCKCHAIN_NOTEXIST = 9; + VALIDATE_ERROR = 10; + CANNOT_SYNC_BLOCK_ERROR = 11; + CONFIRM_BLOCK_ERROR = 12; + UTXOVM_PLAY_ERROR = 13; + WALK_ERROR = 14; + NOT_READY_ERROR = 15; + BLOCK_EXIST_ERROR = 16; + ROOT_BLOCK_EXIST_ERROR = 17; + TX_DUPLICATE_ERROR = 19; + SERVICE_REFUSED_ERROR = 20; + TXDATA_SIGN_ERROR = 21; + TX_SLE_ERROR = 25; + TX_FEE_NOT_ENOUGH_ERROR = 26; + UTXO_SIGN_ERROR = 28; + DPOS_QUERY_ERROR = 31; + RWSET_INVALID_ERROR = 33; + RWACL_INVALID_ERROR = 34; + GAS_NOT_ENOUGH_ERROR = 35; + TX_VERSION_INVALID_ERROR = 36; + COMPLIANCE_CHECK_NOT_APPROVED = 37; + ACCOUNT_CONTRACT_STATUS_ERROR = 38; + TX_VERIFICATION_ERROR = 40; +} + + message NativeCallRequest { // The context id of this request int64 ctxid = 1; @@ -151,8 +188,7 @@ message GetCallArgsRequest { } // Transaction input -message TxInput -{ +message TxInput{ // The transaction id referenced to string ref_txid = 1; // The output offset of the transaction referenced to @@ -166,8 +202,7 @@ message TxInput } // Transaction output -message TxOutput -{ +message TxOutput{ // The amount of the transaction string amount = 1; // The address of the launcher @@ -177,8 +212,7 @@ message TxOutput } // Transaction is the information of the transaction -message Transaction -{ +message Transaction{ // txid is the id of this transaction string txid = 1; // the blockid the transaction belong to @@ -198,8 +232,7 @@ message Transaction } // The block struct -message Block -{ +message Block{ // blockid generate the hash sign of the block used by sha256 string blockid = 3; // pre_hash is the parent blockid of the block @@ -250,4 +283,79 @@ message EmitEventRequest { } message EmitEventResponse { -} \ No newline at end of file +} + +message CrossQueryRequest { + string bcname = 1; + int64 timestamp = 2; + string initiator = 3; + repeated string auth_require = 4; + InvokeRequest request = 5; +} +// 预执行的请求结构 +message InvokeRequest { + string module_name = 1; + string contract_name = 2; + string method_name = 3; + map args = 4; + repeated ResourceLimit resource_limits = 5; + // amount is the amount transfer to the contract + // attention: In one transaction, transfer to only one contract is allowed + string amount = 6; +} + +message ResourceLimit { + ResourceType type = 1; + int64 limit = 2; +} +enum ResourceType { + CPU = 0; + MEMORY = 1; + DISK = 2; + XFEE = 3; // the fee used in kernel contract +} + + +message CrossChainMeta { + string type = 1; + int64 min_endorsor_num = 2; +} + +message CrossEndorsor { + string address = 1; + string pub_key = 2; + // ip+port + string host = 3; +} +message CrossQueryMeta { + CrossChainMeta chain_meta = 1; + repeated CrossEndorsor endorsors = 2; +} +// ContractResponse is the response returnd by contract +message ContractResponse { + int32 status = 1; + string message = 2; + bytes body = 3; +} +message CrossQueryResponse { + ContractResponse response = 1; +} + +// 签名详情 +message SignatureInfo { + string PublicKey = 1; + bytes Sign = 2; +} + +message CrossQueryInfo { + CrossQueryRequest request = 1; + CrossQueryResponse response = 2; + repeated SignatureInfo signs = 3; +} + +message Header { + string logid = 1; //如果logid没填写,生成一个 + string from_node = 2; // call rpc client address,客户端可以为空,节点一定要写自己的address + XChainErrorEnum error = 3; +} + diff --git a/kernel/contract/bridge/pb/google/api/annotations.proto b/kernel/contract/bridge/pb/google/api/annotations.proto new file mode 100644 index 00000000..85c361b4 --- /dev/null +++ b/kernel/contract/bridge/pb/google/api/annotations.proto @@ -0,0 +1,31 @@ +// Copyright (c) 2015, Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.api; + +import "google/api/http.proto"; +import "google/protobuf/descriptor.proto"; + +option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; +option java_multiple_files = true; +option java_outer_classname = "AnnotationsProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +extend google.protobuf.MethodOptions { + // See `HttpRule`. + HttpRule http = 72295728; +} diff --git a/kernel/contract/bridge/pb/google/api/http.proto b/kernel/contract/bridge/pb/google/api/http.proto new file mode 100644 index 00000000..5f8538a0 --- /dev/null +++ b/kernel/contract/bridge/pb/google/api/http.proto @@ -0,0 +1,291 @@ +// Copyright 2016 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.api; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; +option java_multiple_files = true; +option java_outer_classname = "HttpProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + + +// Defines the HTTP configuration for a service. It contains a list of +// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method +// to one or more HTTP REST API methods. +message Http { + // A list of HTTP configuration rules that apply to individual API methods. + // + // **NOTE:** All service configuration rules follow "last one wins" order. + repeated HttpRule rules = 1; +} + +// `HttpRule` defines the mapping of an RPC method to one or more HTTP +// REST APIs. The mapping determines what portions of the request +// message are populated from the path, query parameters, or body of +// the HTTP request. The mapping is typically specified as an +// `google.api.http` annotation, see "google/api/annotations.proto" +// for details. +// +// The mapping consists of a field specifying the path template and +// method kind. The path template can refer to fields in the request +// message, as in the example below which describes a REST GET +// operation on a resource collection of messages: +// +// +// service Messaging { +// rpc GetMessage(GetMessageRequest) returns (Message) { +// option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; +// } +// } +// message GetMessageRequest { +// message SubMessage { +// string subfield = 1; +// } +// string message_id = 1; // mapped to the URL +// SubMessage sub = 2; // `sub.subfield` is url-mapped +// } +// message Message { +// string text = 1; // content of the resource +// } +// +// The same http annotation can alternatively be expressed inside the +// `GRPC API Configuration` YAML file. +// +// http: +// rules: +// - selector: .Messaging.GetMessage +// get: /v1/messages/{message_id}/{sub.subfield} +// +// This definition enables an automatic, bidrectional mapping of HTTP +// JSON to RPC. Example: +// +// HTTP | RPC +// -----|----- +// `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` +// +// In general, not only fields but also field paths can be referenced +// from a path pattern. Fields mapped to the path pattern cannot be +// repeated and must have a primitive (non-message) type. +// +// Any fields in the request message which are not bound by the path +// pattern automatically become (optional) HTTP query +// parameters. Assume the following definition of the request message: +// +// +// message GetMessageRequest { +// message SubMessage { +// string subfield = 1; +// } +// string message_id = 1; // mapped to the URL +// int64 revision = 2; // becomes a parameter +// SubMessage sub = 3; // `sub.subfield` becomes a parameter +// } +// +// +// This enables a HTTP JSON to RPC mapping as below: +// +// HTTP | RPC +// -----|----- +// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` +// +// Note that fields which are mapped to HTTP parameters must have a +// primitive type or a repeated primitive type. Message types are not +// allowed. In the case of a repeated type, the parameter can be +// repeated in the URL, as in `...?param=A¶m=B`. +// +// For HTTP method kinds which allow a request body, the `body` field +// specifies the mapping. Consider a REST update method on the +// message resource collection: +// +// +// service Messaging { +// rpc UpdateMessage(UpdateMessageRequest) returns (Message) { +// option (google.api.http) = { +// put: "/v1/messages/{message_id}" +// body: "message" +// }; +// } +// } +// message UpdateMessageRequest { +// string message_id = 1; // mapped to the URL +// Message message = 2; // mapped to the body +// } +// +// +// The following HTTP JSON to RPC mapping is enabled, where the +// representation of the JSON in the request body is determined by +// protos JSON encoding: +// +// HTTP | RPC +// -----|----- +// `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` +// +// The special name `*` can be used in the body mapping to define that +// every field not bound by the path template should be mapped to the +// request body. This enables the following alternative definition of +// the update method: +// +// service Messaging { +// rpc UpdateMessage(Message) returns (Message) { +// option (google.api.http) = { +// put: "/v1/messages/{message_id}" +// body: "*" +// }; +// } +// } +// message Message { +// string message_id = 1; +// string text = 2; +// } +// +// +// The following HTTP JSON to RPC mapping is enabled: +// +// HTTP | RPC +// -----|----- +// `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` +// +// Note that when using `*` in the body mapping, it is not possible to +// have HTTP parameters, as all fields not bound by the path end in +// the body. This makes this option more rarely used in practice of +// defining REST APIs. The common usage of `*` is in custom methods +// which don't use the URL at all for transferring data. +// +// It is possible to define multiple HTTP methods for one RPC by using +// the `additional_bindings` option. Example: +// +// service Messaging { +// rpc GetMessage(GetMessageRequest) returns (Message) { +// option (google.api.http) = { +// get: "/v1/messages/{message_id}" +// additional_bindings { +// get: "/v1/users/{user_id}/messages/{message_id}" +// } +// }; +// } +// } +// message GetMessageRequest { +// string message_id = 1; +// string user_id = 2; +// } +// +// +// This enables the following two alternative HTTP JSON to RPC +// mappings: +// +// HTTP | RPC +// -----|----- +// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` +// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` +// +// # Rules for HTTP mapping +// +// The rules for mapping HTTP path, query parameters, and body fields +// to the request message are as follows: +// +// 1. The `body` field specifies either `*` or a field path, or is +// omitted. If omitted, it assumes there is no HTTP body. +// 2. Leaf fields (recursive expansion of nested messages in the +// request) can be classified into three types: +// (a) Matched in the URL template. +// (b) Covered by body (if body is `*`, everything except (a) fields; +// else everything under the body field) +// (c) All other fields. +// 3. URL query parameters found in the HTTP request are mapped to (c) fields. +// 4. Any body sent with an HTTP request can contain only (b) fields. +// +// The syntax of the path template is as follows: +// +// Template = "/" Segments [ Verb ] ; +// Segments = Segment { "/" Segment } ; +// Segment = "*" | "**" | LITERAL | Variable ; +// Variable = "{" FieldPath [ "=" Segments ] "}" ; +// FieldPath = IDENT { "." IDENT } ; +// Verb = ":" LITERAL ; +// +// The syntax `*` matches a single path segment. It follows the semantics of +// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String +// Expansion. +// +// The syntax `**` matches zero or more path segments. It follows the semantics +// of [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.3 Reserved +// Expansion. NOTE: it must be the last segment in the path except the Verb. +// +// The syntax `LITERAL` matches literal text in the URL path. +// +// The syntax `Variable` matches the entire path as specified by its template; +// this nested template must not contain further variables. If a variable +// matches a single path segment, its template may be omitted, e.g. `{var}` +// is equivalent to `{var=*}`. +// +// NOTE: the field paths in variables and in the `body` must not refer to +// repeated fields or map fields. +// +// Use CustomHttpPattern to specify any HTTP method that is not included in the +// `pattern` field, such as HEAD, or "*" to leave the HTTP method unspecified for +// a given URL path rule. The wild-card rule is useful for services that provide +// content to Web (HTML) clients. +message HttpRule { + // Selects methods to which this rule applies. + // + // Refer to [selector][google.api.DocumentationRule.selector] for syntax details. + string selector = 1; + + // Determines the URL pattern is matched by this rules. This pattern can be + // used with any of the {get|put|post|delete|patch} methods. A custom method + // can be defined using the 'custom' field. + oneof pattern { + // Used for listing and getting information about resources. + string get = 2; + + // Used for updating a resource. + string put = 3; + + // Used for creating a resource. + string post = 4; + + // Used for deleting a resource. + string delete = 5; + + // Used for updating a resource. + string patch = 6; + + // Custom pattern is used for defining custom verbs. + CustomHttpPattern custom = 8; + } + + // The name of the request field whose value is mapped to the HTTP body, or + // `*` for mapping all fields not captured by the path pattern to the HTTP + // body. NOTE: the referred field must not be a repeated field and must be + // present at the top-level of request message type. + string body = 7; + + // Additional HTTP bindings for the selector. Nested bindings must + // not contain an `additional_bindings` field themselves (that is, + // the nesting may only be one level deep). + repeated HttpRule additional_bindings = 11; +} + +// A custom pattern is used for defining custom HTTP verb. +message CustomHttpPattern { + // The name of this custom HTTP verb. + string kind = 1; + + // The path matched by this custom verb. + string path = 2; +} diff --git a/kernel/contract/bridge/pb/xendorser.pb.go b/kernel/contract/bridge/pb/xendorser.pb.go new file mode 100644 index 00000000..418489f2 --- /dev/null +++ b/kernel/contract/bridge/pb/xendorser.pb.go @@ -0,0 +1,281 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: xendorser.proto + +package pb + +import ( + context "context" + fmt "fmt" + proto "github.com/golang/protobuf/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +// 请求参数 +type EndorserRequest struct { + Header *Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + RequestName string `protobuf:"bytes,2,opt,name=RequestName,proto3" json:"RequestName,omitempty"` + BcName string `protobuf:"bytes,3,opt,name=BcName,proto3" json:"BcName,omitempty"` + Fee *Transaction `protobuf:"bytes,4,opt,name=Fee,proto3" json:"Fee,omitempty"` + RequestData []byte `protobuf:"bytes,5,opt,name=RequestData,proto3" json:"RequestData,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *EndorserRequest) Reset() { *m = EndorserRequest{} } +func (m *EndorserRequest) String() string { return proto.CompactTextString(m) } +func (*EndorserRequest) ProtoMessage() {} +func (*EndorserRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_eeaf870ebd3b57e1, []int{0} +} + +func (m *EndorserRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_EndorserRequest.Unmarshal(m, b) +} +func (m *EndorserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_EndorserRequest.Marshal(b, m, deterministic) +} +func (m *EndorserRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_EndorserRequest.Merge(m, src) +} +func (m *EndorserRequest) XXX_Size() int { + return xxx_messageInfo_EndorserRequest.Size(m) +} +func (m *EndorserRequest) XXX_DiscardUnknown() { + xxx_messageInfo_EndorserRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_EndorserRequest proto.InternalMessageInfo + +func (m *EndorserRequest) GetHeader() *Header { + if m != nil { + return m.Header + } + return nil +} + +func (m *EndorserRequest) GetRequestName() string { + if m != nil { + return m.RequestName + } + return "" +} + +func (m *EndorserRequest) GetBcName() string { + if m != nil { + return m.BcName + } + return "" +} + +func (m *EndorserRequest) GetFee() *Transaction { + if m != nil { + return m.Fee + } + return nil +} + +func (m *EndorserRequest) GetRequestData() []byte { + if m != nil { + return m.RequestData + } + return nil +} + +type EndorserResponse struct { + Header *Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + ResponseName string `protobuf:"bytes,2,opt,name=ResponseName,proto3" json:"ResponseName,omitempty"` + EndorserAddress string `protobuf:"bytes,3,opt,name=EndorserAddress,proto3" json:"EndorserAddress,omitempty"` + EndorserSign *SignatureInfo `protobuf:"bytes,4,opt,name=EndorserSign,proto3" json:"EndorserSign,omitempty"` + ResponseData []byte `protobuf:"bytes,5,opt,name=ResponseData,proto3" json:"ResponseData,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *EndorserResponse) Reset() { *m = EndorserResponse{} } +func (m *EndorserResponse) String() string { return proto.CompactTextString(m) } +func (*EndorserResponse) ProtoMessage() {} +func (*EndorserResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_eeaf870ebd3b57e1, []int{1} +} + +func (m *EndorserResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_EndorserResponse.Unmarshal(m, b) +} +func (m *EndorserResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_EndorserResponse.Marshal(b, m, deterministic) +} +func (m *EndorserResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_EndorserResponse.Merge(m, src) +} +func (m *EndorserResponse) XXX_Size() int { + return xxx_messageInfo_EndorserResponse.Size(m) +} +func (m *EndorserResponse) XXX_DiscardUnknown() { + xxx_messageInfo_EndorserResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_EndorserResponse proto.InternalMessageInfo + +func (m *EndorserResponse) GetHeader() *Header { + if m != nil { + return m.Header + } + return nil +} + +func (m *EndorserResponse) GetResponseName() string { + if m != nil { + return m.ResponseName + } + return "" +} + +func (m *EndorserResponse) GetEndorserAddress() string { + if m != nil { + return m.EndorserAddress + } + return "" +} + +func (m *EndorserResponse) GetEndorserSign() *SignatureInfo { + if m != nil { + return m.EndorserSign + } + return nil +} + +func (m *EndorserResponse) GetResponseData() []byte { + if m != nil { + return m.ResponseData + } + return nil +} + +func init() { + // proto.RegisterType((*EndorserRequest)(nil), "pb.EndorserRequest") + // proto.RegisterType((*EndorserResponse)(nil), "pb.EndorserResponse") +} + +// func init() { proto.RegisterFile("xendorser.proto", fileDescriptor_eeaf870ebd3b57e1) } + +var fileDescriptor_eeaf870ebd3b57e1 = []byte{ + // 323 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xbf, 0x4e, 0xc3, 0x30, + 0x10, 0xc6, 0xe5, 0x16, 0x2a, 0xd5, 0x8d, 0xd4, 0x62, 0xfe, 0x28, 0x2a, 0x0c, 0x21, 0x53, 0xc4, + 0xd0, 0x88, 0x22, 0x16, 0x36, 0xfe, 0x0a, 0x16, 0x86, 0x80, 0xd8, 0xaf, 0xc9, 0xd1, 0x46, 0x0a, + 0x76, 0xb0, 0x5d, 0xd4, 0x99, 0x57, 0xe0, 0x55, 0x78, 0x13, 0x1e, 0x80, 0x85, 0x07, 0x41, 0x4e, + 0x5d, 0xe2, 0x74, 0x62, 0xbc, 0xdf, 0x77, 0xfa, 0xee, 0x3b, 0x9f, 0x69, 0x7f, 0x81, 0x3c, 0x13, + 0x52, 0xa1, 0x1c, 0x95, 0x52, 0x68, 0xc1, 0x5a, 0xe5, 0x64, 0xe8, 0x2d, 0xd2, 0x19, 0xe4, 0x7c, + 0x49, 0x86, 0x07, 0x53, 0x21, 0xa6, 0x05, 0xc6, 0x50, 0xe6, 0x31, 0x70, 0x2e, 0x34, 0xe8, 0x5c, + 0x70, 0xb5, 0x54, 0xc3, 0x4f, 0x42, 0xfb, 0xd7, 0xd6, 0x22, 0xc1, 0xd7, 0x39, 0x2a, 0xcd, 0x42, + 0xda, 0x99, 0x21, 0x64, 0x28, 0x7d, 0x12, 0x90, 0xa8, 0x37, 0xa6, 0xa3, 0x72, 0x32, 0xba, 0xad, + 0x48, 0x62, 0x15, 0x16, 0xd0, 0x9e, 0x6d, 0xbf, 0x87, 0x17, 0xf4, 0x5b, 0x01, 0x89, 0xba, 0x89, + 0x8b, 0xd8, 0x1e, 0xed, 0x5c, 0xa4, 0x95, 0xd8, 0xae, 0x44, 0x5b, 0xb1, 0x43, 0xda, 0xbe, 0x41, + 0xf4, 0x37, 0x2a, 0xeb, 0xbe, 0xb1, 0x7e, 0x94, 0xc0, 0x15, 0xa4, 0x26, 0x56, 0x62, 0x34, 0xc7, + 0xfc, 0x0a, 0x34, 0xf8, 0x9b, 0x01, 0x89, 0xbc, 0xc4, 0x45, 0xe1, 0x37, 0xa1, 0x83, 0x3a, 0xb6, + 0x2a, 0x05, 0x57, 0xf8, 0xaf, 0xdc, 0x21, 0xf5, 0x56, 0xfd, 0x4e, 0xf0, 0x06, 0x63, 0x51, 0xfd, + 0x24, 0xe7, 0x59, 0x26, 0x51, 0x29, 0xbb, 0xc2, 0x3a, 0x66, 0xa7, 0xd4, 0x5b, 0xa1, 0x87, 0x7c, + 0xca, 0xed, 0x52, 0x5b, 0x66, 0xae, 0xa9, 0x41, 0xcf, 0x25, 0xde, 0xf1, 0x67, 0x91, 0x34, 0xda, + 0xdc, 0x10, 0xce, 0x82, 0x0d, 0x36, 0x4e, 0x69, 0xf7, 0xef, 0xb6, 0xec, 0xa9, 0x9e, 0x73, 0x09, + 0x45, 0xc1, 0xb6, 0xcd, 0x84, 0xb5, 0xb3, 0x0d, 0x77, 0x9a, 0x70, 0xe9, 0x15, 0xee, 0xbf, 0x7f, + 0xfd, 0x7c, 0xb4, 0x76, 0xc3, 0x41, 0xfc, 0x76, 0x1c, 0xaf, 0x0c, 0x53, 0x28, 0x8a, 0x33, 0x72, + 0x34, 0xe9, 0x54, 0x9f, 0xe0, 0xe4, 0x37, 0x00, 0x00, 0xff, 0xff, 0xbf, 0x40, 0x0c, 0x04, 0x47, + 0x02, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// XendorserClient is the client API for Xendorser service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type XendorserClient interface { + EndorserCall(ctx context.Context, in *EndorserRequest, opts ...grpc.CallOption) (*EndorserResponse, error) +} + +type xendorserClient struct { + cc grpc.ClientConnInterface +} + +func NewXendorserClient(cc grpc.ClientConnInterface) XendorserClient { + return &xendorserClient{cc} +} + +func (c *xendorserClient) EndorserCall(ctx context.Context, in *EndorserRequest, opts ...grpc.CallOption) (*EndorserResponse, error) { + out := new(EndorserResponse) + err := c.cc.Invoke(ctx, "/pb.xendorser/EndorserCall", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// XendorserServer is the server API for Xendorser service. +type XendorserServer interface { + EndorserCall(context.Context, *EndorserRequest) (*EndorserResponse, error) +} + +// UnimplementedXendorserServer can be embedded to have forward compatible implementations. +type UnimplementedXendorserServer struct { +} + +func (*UnimplementedXendorserServer) EndorserCall(ctx context.Context, req *EndorserRequest) (*EndorserResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EndorserCall not implemented") +} + +func RegisterXendorserServer(s *grpc.Server, srv XendorserServer) { + s.RegisterService(&_Xendorser_serviceDesc, srv) +} + +func _Xendorser_EndorserCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EndorserRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(XendorserServer).EndorserCall(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.xendorser/EndorserCall", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(XendorserServer).EndorserCall(ctx, req.(*EndorserRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Xendorser_serviceDesc = grpc.ServiceDesc{ + ServiceName: "pb.xendorser", + HandlerType: (*XendorserServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "EndorserCall", + Handler: _Xendorser_EndorserCall_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "xendorser.proto", +} diff --git a/kernel/contract/bridge/pb/xendorser.pb.gw.go b/kernel/contract/bridge/pb/xendorser.pb.gw.go new file mode 100644 index 00000000..fb7b432e --- /dev/null +++ b/kernel/contract/bridge/pb/xendorser.pb.gw.go @@ -0,0 +1,115 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: xendorser.proto + +/* +Package pb is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package pb + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/status" +) + +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray + +func request_Xendorser_EndorserCall_0(ctx context.Context, marshaler runtime.Marshaler, client XendorserClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq EndorserRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.EndorserCall(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +// RegisterXendorserHandlerFromEndpoint is same as RegisterXendorserHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterXendorserHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterXendorserHandler(ctx, mux, conn) +} + +// RegisterXendorserHandler registers the http handlers for service Xendorser to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterXendorserHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterXendorserHandlerClient(ctx, mux, NewXendorserClient(conn)) +} + +// RegisterXendorserHandlerClient registers the http handlers for service Xendorser +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "XendorserClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "XendorserClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "XendorserClient" to call the correct interceptors. +func RegisterXendorserHandlerClient(ctx context.Context, mux *runtime.ServeMux, client XendorserClient) error { + + mux.Handle("POST", pattern_Xendorser_EndorserCall_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_Xendorser_EndorserCall_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Xendorser_EndorserCall_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Xendorser_EndorserCall_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "endorsercall"}, "", runtime.AssumeColonVerbOpt(true))) +) + +var ( + forward_Xendorser_EndorserCall_0 = runtime.ForwardResponseMessage +) diff --git a/kernel/contract/bridge/pb/xendorser.proto b/kernel/contract/bridge/pb/xendorser.proto new file mode 100644 index 00000000..ed43a2ab --- /dev/null +++ b/kernel/contract/bridge/pb/xendorser.proto @@ -0,0 +1,30 @@ +syntax = "proto3"; +package pb; + +import "contract.proto"; +import "google/api/annotations.proto"; + +// 请求参数 +message EndorserRequest { + Header header = 1; + string RequestName = 2; // 请求名(类型) + string BcName = 3; // 请求链名 + Transaction Fee = 4; // 带签名的交易费Tx + bytes RequestData = 5; // Json打包的数据 +} +message EndorserResponse { + Header header = 1; + string ResponseName = 2; + string EndorserAddress = 3; // 背书服务地址 + SignatureInfo EndorserSign = 4; // 背书服务签名 + bytes ResponseData = 5; +} + +service xendorser { + rpc EndorserCall(EndorserRequest) returns (EndorserResponse) { + option (google.api.http) = { + post : "/v1/endorsercall" + body : "*" + }; + } +} \ No newline at end of file diff --git a/kernel/contract/bridge/syscall_service.go b/kernel/contract/bridge/syscall_service.go index 2f8a8b1f..19ab986b 100644 --- a/kernel/contract/bridge/syscall_service.go +++ b/kernel/contract/bridge/syscall_service.go @@ -198,39 +198,39 @@ func (c *SyscallService) ContractCall(ctx context.Context, in *pb.ContractCallRe // CrossContractQuery implements Syscall interface func (c *SyscallService) CrossContractQuery(ctx context.Context, in *pb.CrossContractQueryRequest) (*pb.CrossContractQueryResponse, error) { - return nil, ErrNotImplementation - // nctx, ok := c.ctxmgr.Context(in.GetHeader().Ctxid) - // if !ok { - // return nil, fmt.Errorf("bad ctx id:%d", in.Header.Ctxid) - // } - - // crossChainURI, err := ParseCrossChainURI(in.GetUri()) - // if err != nil { - // return nil, fmt.Errorf("ParseCrossChainURI error, err:%s ctx id:%d", err.Error(), in.Header.Ctxid) - // } - - // crossQueryMeta, err := nctx.Core.ResolveChain(crossChainURI.GetChainName()) - // if err != nil { - // return nil, fmt.Errorf("ResolveChain error, err:%s ctx id:%d", err.Error(), in.Header.Ctxid) - // } - - // // Assemble crossQueryRequest - // crossQueryRequest := &xchainpb.CrossQueryRequest{} - // crossScheme := GetChainScheme(crossChainURI.GetScheme()) - // crossQueryRequest, err = crossScheme.GetCrossQueryRequest(crossChainURI, in.GetArgs(), nctx.GetInitiator(), nctx.GetAuthRequire()) - // if err != nil { - // return nil, fmt.Errorf("GetCrossQueryRequest error, err:%s ctx id: %d", err.Error(), in.Header.Ctxid) - // } - - // // CrossQuery cross query from other chain - // contractResponse, err := nctx.Store.CrossQuery(crossQueryRequest, crossQueryMeta) - // return &pb.CrossContractQueryResponse{ - // Response: &pb.Response{ - // Status: contractResponse.GetStatus(), - // Message: contractResponse.GetMessage(), - // Body: contractResponse.GetBody(), - // }, - // }, err + // return nil, ErrNotImplementation + nctx, ok := c.ctxmgr.Context(in.GetHeader().Ctxid) + if !ok { + return nil, fmt.Errorf("bad ctx id:%d", in.Header.Ctxid) + } + + crossChainURI, err := ParseCrossChainURI(in.GetUri()) + if err != nil { + return nil, fmt.Errorf("ParseCrossChainURI error, err:%s ctx id:%d", err.Error(), in.Header.Ctxid) + } + + crossQueryMeta, err := nctx.Core.ResolveChain(crossChainURI.GetChainName()) + if err != nil { + return nil, fmt.Errorf("ResolveChain error, err:%s ctx id:%d", err.Error(), in.Header.Ctxid) + } + + // Assemble crossQueryRequest + crossQueryRequest := &pb.CrossQueryRequest{} + crossScheme := GetChainScheme(crossChainURI.GetScheme()) + crossQueryRequest, err = crossScheme.GetCrossQueryRequest(crossChainURI, in.GetArgs(), nctx.GetInitiator(), nctx.GetAuthRequire()) + if err != nil { + return nil, fmt.Errorf("GetCrossQueryRequest error, err:%s ctx id: %d", err.Error(), in.Header.Ctxid) + } + + // CrossQuery cross query from other chain + contractResponse, err := nctx.State.CrossQuery(crossQueryRequest, crossQueryMeta) + return &pb.CrossContractQueryResponse{ + Response: &pb.Response{ + Status: contractResponse.GetStatus(), + Message: contractResponse.GetMessage(), + Body: contractResponse.GetBody(), + }, + }, err } // PutObject implements Syscall interface diff --git a/kernel/contract/kernel.go b/kernel/contract/kernel.go index f4096c07..5fc24864 100644 --- a/kernel/contract/kernel.go +++ b/kernel/contract/kernel.go @@ -1,5 +1,7 @@ package contract +import "github.com/xuperchain/xupercore/kernel/contract/bridge/pb" + type KernRegistry interface { RegisterKernMethod(contract, method string, handler KernMethod) UnregisterKernMethod(ctract, method string) @@ -27,4 +29,6 @@ type KContext interface { // 合约异步事件调用 EmitAsyncTask(event string, args interface{}) error + + CrossQuery(crossQueryRequest *pb.CrossQueryRequest, queryMeta *pb.CrossQueryMeta) (*pb.ContractResponse, error) } diff --git a/kernel/contract/manager.go b/kernel/contract/manager.go index 6c1717dd..39d454cf 100644 --- a/kernel/contract/manager.go +++ b/kernel/contract/manager.go @@ -2,9 +2,10 @@ package contract import ( "fmt" - "github.com/xuperchain/xupercore/kernel/contract/bridge/pb" "sync" + "github.com/xuperchain/xupercore/kernel/contract/bridge/pb" + "github.com/xuperchain/xupercore/kernel/common/xconfig" "github.com/xuperchain/xupercore/kernel/ledger" ) @@ -46,7 +47,7 @@ type ChainCore interface { QueryBlock(blockid []byte) (ledger.BlockHandle, error) // ResolveChain resolve chain endorsorinfos - // ResolveChain(chainName string) (*pb.CrossQueryMeta, error) + ResolveChain(chainName string) (*pb.CrossQueryMeta, error) } func Register(name string, f NewManagerFunc) { diff --git a/kernel/contract/mock/core.go b/kernel/contract/mock/core.go index 4342898c..deafc07b 100644 --- a/kernel/contract/mock/core.go +++ b/kernel/contract/mock/core.go @@ -37,3 +37,7 @@ func (t *fakeChainCore) QueryTransaction(txid []byte) (*pb.Transaction, error) { Blockid: "testblockd", }, nil } + +func (t *fakeChainCore) ResolveChain(chainName string) (*pb.CrossQueryMeta, error) { + return &pb.CrossQueryMeta{}, nil +} diff --git a/kernel/contract/mock/helper.go b/kernel/contract/mock/helper.go index d0396517..09b58c00 100644 --- a/kernel/contract/mock/helper.go +++ b/kernel/contract/mock/helper.go @@ -3,11 +3,12 @@ package mock import ( "crypto/rand" "encoding/json" - "github.com/xuperchain/xupercore/kernel/contract/bridge" "io/ioutil" "math/big" "os" + "github.com/xuperchain/xupercore/kernel/contract/bridge" + "github.com/golang/protobuf/proto" "github.com/xuperchain/xupercore/kernel/contract" "github.com/xuperchain/xupercore/kernel/contract/sandbox" diff --git a/kernel/contract/sandbox/cross_query_cache.go b/kernel/contract/sandbox/cross_query_cache.go new file mode 100644 index 00000000..2a187a4b --- /dev/null +++ b/kernel/contract/sandbox/cross_query_cache.go @@ -0,0 +1,292 @@ +package sandbox + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "sync" + "time" + + "github.com/xuperchain/xupercore/kernel/contract/bridge/pb" + crypto_client "github.com/xuperchain/xupercore/lib/crypto/client" + "github.com/xuperchain/xupercore/lib/crypto/hash" +) + +const ( + endorserTimeOut = 6 * time.Second +) + +// CrossQueryCache cross query struct +type CrossQueryCache struct { + crossQueryCaches []*pb.CrossQueryInfo + crossQueryIdx int + isPenetrate bool +} + +type queryRes struct { + queryRes *pb.CrossQueryResponse + signs *pb.SignatureInfo +} + +// NewCrossQueryCache return CrossQuery instance while preexec +func NewCrossQueryCache() *CrossQueryCache { + return &CrossQueryCache{ + isPenetrate: true, + } +} + +// NewCrossQueryCacheWithData return CrossQuery instance while posttx +// func NewCrossQueryCacheWithData(crossQueries []*pb.CrossQueryInfo) *CrossQueryCache { +// return &CrossQueryCache{ +// crossQueryCaches: crossQueries, +// isPenetrate: false, +// } +// } + +func (cqc *CrossQueryCache) CrossQueryCache(crossQueries []*pb.CrossQueryInfo) { + cqc.crossQueryCaches = crossQueries + cqc.isPenetrate = false +} + +// CrossQuery query contract from otherchain +func (cqc *CrossQueryCache) CrossQuery( + crossQueryRequest *pb.CrossQueryRequest, + queryMeta *pb.CrossQueryMeta) (*pb.ContractResponse, error) { + + if !isQueryMetaValid(queryMeta) { + return nil, fmt.Errorf("isQueryParamValid check failed") + } + // Call endorsor for responce + if cqc.isPenetrate { + queryInfo, err := crossQueryFromEndorsor(crossQueryRequest, queryMeta) + if err != nil { + return nil, err + } + cqc.crossQueryCaches = append(cqc.crossQueryCaches, queryInfo) + return queryInfo.GetResponse().GetResponse(), nil + } + // 验证背书规则、参数有效性、时间戳有效性 + if cqc.crossQueryIdx > len(cqc.crossQueryCaches)-1 { + return nil, fmt.Errorf("len of crossQueryCaches not match the contract") + } + crossQuery := cqc.crossQueryCaches[cqc.crossQueryIdx] + + // 验证request、签名等信息 + if !isCossQueryValid(crossQueryRequest, queryMeta, crossQuery) { + return nil, fmt.Errorf("isCossQueryValid check failed") + } + cqc.crossQueryIdx++ + return crossQuery.GetResponse().GetResponse(), nil +} + +// GetCrossQueryRWSets get cross query rwsets +func (cqc *CrossQueryCache) GetCrossQueryRWSets() []*pb.CrossQueryInfo { + return cqc.crossQueryCaches +} + +// isQueryParamValid 验证 query meta 背书策略是否有效 +func isQueryMetaValid(queryMeta *pb.CrossQueryMeta) bool { + return len(queryMeta.GetEndorsors()) >= int(queryMeta.GetChainMeta().GetMinEndorsorNum()) +} + +// crossQueryFromEndorsor will query cross from endorsor +func crossQueryFromEndorsor( + crossQueryRequest *pb.CrossQueryRequest, + queryMeta *pb.CrossQueryMeta) (*pb.CrossQueryInfo, error) { + + reqData, err := json.Marshal(crossQueryRequest) + if err != nil { + return nil, err + } + + req := &pb.EndorserRequest{ + RequestName: "CrossQueryPreExec", + BcName: crossQueryRequest.GetBcname(), + RequestData: reqData, + } + + res, signs, err := endorsorQueryWithGroup(req, queryMeta) + if err != nil { + return nil, err + } + return &pb.CrossQueryInfo{ + Request: crossQueryRequest, + Response: res, + Signs: signs, + }, nil +} + +func endorsorQueryWithGroup(req *pb.EndorserRequest, queryMeta *pb.CrossQueryMeta) (*pb.CrossQueryResponse, []*pb.SignatureInfo, error) { + wg := sync.WaitGroup{} + msgChan := make(chan *queryRes, len(queryMeta.GetEndorsors())) + + for idx := range queryMeta.GetEndorsors() { + wg.Add(1) + go func(req *pb.EndorserRequest, ce *pb.CrossEndorsor) { + defer wg.Done() + res, err := endorsorQuery(req, ce) + if err != nil { + return + } + msgChan <- res + }(req, queryMeta.GetEndorsors()[idx]) + } + wg.Wait() + // 处理所有请求结果 + signs := []*pb.SignatureInfo{} + var conRes *pb.CrossQueryResponse + lenCh := len(msgChan) + if lenCh <= 0 { + // TODO 此处报错 (报错已解决) + return nil, nil, errors.New("endorsorQueryWithGroup res is nil") + } + + breakFlag := 0 + for r := range msgChan { + if breakFlag == 0 { + conRes = r.queryRes + } else { + if !isCrossQueryResponseEqual(conRes, r.queryRes) { + return conRes, signs, errors.New("endorsorQueryWithGroup ContractResponse different") + } + } + signs = append(signs, r.signs) + if breakFlag >= lenCh-1 { + break + } + breakFlag++ + } + return conRes, signs, nil +} + +func endorsorQuery(req *pb.EndorserRequest, ce *pb.CrossEndorsor) (*queryRes, error) { + + ctx, _ := context.WithTimeout(context.TODO(), endorserTimeOut) + conn, err := NewEndorsorConn(ce.GetHost()) + if err != nil { + //log.Error("endorsorQuery NewEndorsorClient error", "err", err.Error()) + return nil, err + } + defer conn.Close() + cli := pb.NewXendorserClient(conn) + endorsorRes, err := cli.EndorserCall(ctx, req) + if err != nil { + //log.Error("endorsorQuery EndorserCall error", "err", err.Error()) + return nil, err + } + res := &pb.CrossQueryResponse{} + err = json.Unmarshal(endorsorRes.GetResponseData(), res) + if err != nil { + //log.Error("endorsorQuery Unmarshal error", "err", err) + return nil, err + } + queryRes := &queryRes{ + queryRes: res, + signs: endorsorRes.GetEndorserSign(), + } + return queryRes, nil +} + +// 验证CrossQuery背书信息 +func isCossQueryValid( + crossQueryRequest *pb.CrossQueryRequest, + queryMeta *pb.CrossQueryMeta, + queryInfo *pb.CrossQueryInfo) bool { + // check req from bridge and req from preexec + if !isMsgEqual(crossQueryRequest, queryInfo.GetRequest()) { + //log.Info("isCossQueryValid isMsgEqual not equal") + return false + } + + // check endorsor info + signs, ok := isEndorsorInfoValid(queryMeta, queryInfo.GetSigns()) + if !ok { + //log.Info("isEndorsorInfoValid not ok") + return false + } + + // check endorsor sign + if !isEndorsorSignValid(signs, queryInfo) { + //log.Info("isEndorsorSignValid not ok") + return false + } + return true +} + +func isEndorsorInfoValid(queryMeta *pb.CrossQueryMeta, signs []*pb.SignatureInfo) ([]*pb.SignatureInfo, bool) { + signMap := map[string]*pb.SignatureInfo{} + for idx := range signs { + signMap[signs[idx].GetPublicKey()] = signs[idx] + } + endorsorMap := map[string]*pb.CrossEndorsor{} + endorsors := queryMeta.GetEndorsors() + for idx := range endorsors { + endorsorMap[endorsors[idx].GetPubKey()] = endorsors[idx] + } + signsValid := []*pb.SignatureInfo{} + for k, v := range signMap { + if endorsorMap[k] != nil { + signsValid = append(signsValid, v) + } + } + if len(signsValid) < int(queryMeta.GetChainMeta().GetMinEndorsorNum()) { + //log.Info("isEndorsorInfoValid failed") + return nil, false + } + return signsValid, true +} + +func isEndorsorSignValid(signsValid []*pb.SignatureInfo, queryInfo *pb.CrossQueryInfo) bool { + reqData, err := json.Marshal(queryInfo.GetRequest()) + if err != nil { + //log.Info("Marshal Request failed", "err", err) + return false + } + resData, err := json.Marshal(queryInfo.GetResponse()) + if err != nil { + //log.Info("Marshal Response failed", "err", err) + return false + } + + //bug(springrain) 需要定义一个参数,用于标示目标链的的加密方式,默认非国密 + cryptoType := crypto_client.CryptoTypeDefault + argsMap := queryInfo.GetRequest().Request.GetArgs() + if argsMap != nil { + if crypto, ok := argsMap["crypto"]; ok { + if string(crypto) == "gm" { + cryptoType = "gm" + } + } + } + cryptoClient, err := crypto_client.CreateCryptoClient(cryptoType) + data := append(reqData[:], resData[:]...) + digest := hash.UsingSha256(data) + for idx := range signsValid { + pk, err := cryptoClient.GetEcdsaPublicKeyFromJsonStr(signsValid[idx].GetPublicKey()) + if err != nil { + //log.Info("GetEcdsaPublicKeyFromJSON failed") + return false + } + ok, err := cryptoClient.VerifyECDSA(pk, signsValid[idx].GetSign(), digest) + if !ok || err != nil { + //log.Info("VerifyECDSA failed", "ok", ok, "err", err) + return false + } + } + return true +} + +func isCrossQueryResponseEqual(a, b *pb.CrossQueryResponse) bool { + if a.GetResponse().GetStatus() != b.GetResponse().GetStatus() { + return false + } + if a.GetResponse().GetMessage() != b.GetResponse().GetMessage() { + return false + } + if !bytes.Equal(a.GetResponse().GetBody(), b.GetResponse().GetBody()) { + return false + } + return true +} diff --git a/kernel/contract/sandbox/endorsor_client.go b/kernel/contract/sandbox/endorsor_client.go new file mode 100644 index 00000000..c1c5ce77 --- /dev/null +++ b/kernel/contract/sandbox/endorsor_client.go @@ -0,0 +1,18 @@ +package sandbox + +import ( + "errors" + + "google.golang.org/grpc" +) + +// NewEndorsorConn return EndorsorClient +func NewEndorsorConn(addr string) (*grpc.ClientConn, error) { + conn := &grpc.ClientConn{} + options := append([]grpc.DialOption{}, grpc.WithInsecure()) + conn, err := grpc.Dial(addr, options...) + if err != nil { + return nil, errors.New("New grpcs conn error") + } + return conn, nil +} diff --git a/kernel/contract/sandbox/message.go b/kernel/contract/sandbox/message.go new file mode 100644 index 00000000..3384ac47 --- /dev/null +++ b/kernel/contract/sandbox/message.go @@ -0,0 +1,110 @@ +package sandbox + +import ( + "bytes" + "errors" + "fmt" + "reflect" + + "github.com/golang/protobuf/proto" +) + +var ( + protoIface = reflect.TypeOf((*proto.Message)(nil)).Elem() +) + +// MarshalMessages marshal protobuf message slice +func MarshalMessages(msgs interface{}) ([]byte, error) { + if msgs == nil { + return nil, nil + } + value := reflect.ValueOf(msgs) + tp := value.Type() + if tp.Kind() != reflect.Slice { + return nil, errors.New("bad slice type") + } + if !tp.Elem().Implements(protoIface) { + return nil, errors.New("elem of slice must be protobuf message") + } + if value.Len() == 0 { + return nil, nil + } + + var buf proto.Buffer + buf.EncodeVarint(uint64(value.Len())) + for i := 0; i < value.Len(); i++ { + msg := value.Index(i).Interface().(proto.Message) + err := buf.EncodeMessage(msg) + if err != nil { + return nil, err + } + } + return buf.Bytes(), nil +} + +// UnmsarshalMessages unmarshal protobuf messages to slice, x must be a pointer to message slice +func UnmsarshalMessages(p []byte, x interface{}) error { + if p == nil { + return nil + } + tp := reflect.TypeOf(x) + // x must be a pointer to message slice + if tp.Kind() != reflect.Ptr { + return errors.New("must be slice ptr") + } + tp = tp.Elem() + if tp.Kind() != reflect.Slice { + return errors.New("must be slice ptr") + } + // element of slice must be proto.Message + if !tp.Elem().Implements(protoIface) { + return errors.New("elem of slice must be protobuf message") + } + // element of slice must be ptr type + if tp.Elem().Kind() != reflect.Ptr { + return errors.New("elem of slice must be ptr type") + } + // if tp is []*pb.TxInput then elemtp is pb.TxInput + elemtp := tp.Elem().Elem() + value := reflect.ValueOf(x).Elem() + + buf := proto.NewBuffer(p) + total, err := buf.DecodeVarint() + if err != nil { + return fmt.Errorf("error while read message length:%s", err) + } + + value.Set(reflect.MakeSlice(tp, int(total), int(total))) + for i := 0; i < int(total); i++ { + v := reflect.New(elemtp) + m := v.Interface().(proto.Message) + err = buf.DecodeMessage(m) + if err != nil { + return fmt.Errorf("error while unmsarshal message:%s", err) + } + value.Index(i).Set(v) + } + return nil +} + +func isMsgEqual(reqHead, reqIncome proto.Message) bool { + encodeHead, err := encodeMsg(reqHead) + if err != nil { + return false + } + encodeIncome, err := encodeMsg(reqIncome) + if err != nil { + return false + } + return bytes.Equal(encodeHead, encodeIncome) +} + +func encodeMsg(req proto.Message) ([]byte, error) { + var buf proto.Buffer + buf.SetDeterministic(true) + err := buf.EncodeMessage(req) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} diff --git a/kernel/contract/sandbox/xmcache.go b/kernel/contract/sandbox/xmcache.go index 66956c12..117b3494 100644 --- a/kernel/contract/sandbox/xmcache.go +++ b/kernel/contract/sandbox/xmcache.go @@ -11,6 +11,7 @@ import ( lpb "github.com/xuperchain/xupercore/bcs/ledger/xledger/xldgpb" "github.com/xuperchain/xupercore/kernel/contract" + "github.com/xuperchain/xupercore/kernel/contract/bridge/pb" "github.com/xuperchain/xupercore/kernel/ledger" "github.com/xuperchain/xupercore/protos" ) @@ -47,20 +48,19 @@ type XMCache struct { model ledger.XMReader - utxoSandbox *utxo.UTXOSandbox - // crossQueryCache *CrossQueryCache - events []*protos.ContractEvent + utxoSandbox *utxo.UTXOSandbox + crossQueryCache *CrossQueryCache + events []*protos.ContractEvent } // NewXModelCache new an instance of XModel Cache func NewXModelCache(cfg *contract.SandboxConfig) *XMCache { return &XMCache{ - model: cfg.XMReader, - inputsCache: NewMemXModel(), - outputsCache: NewMemXModel(), - utxoSandbox: utxo.NewUTXOSandbox(cfg), - - // crossQueryCache: NewCrossQueryCache(), + model: cfg.XMReader, + inputsCache: NewMemXModel(), + outputsCache: NewMemXModel(), + utxoSandbox: utxo.NewUTXOSandbox(cfg), + crossQueryCache: NewCrossQueryCache(), } } @@ -367,61 +367,65 @@ func (xc *XMCache) flushUTXORWSet() error { //} // CrossQuery will query contract from other chain -//func (xc *XMCache) CrossQuery(crossQueryRequest *pb.CrossQueryRequest, queryMeta *pb.CrossQueryMeta) (*pb.ContractResponse, error) { -// return xc.crossQueryCache.CrossQuery(crossQueryRequest, queryMeta) -//} +func (xc *XMCache) CrossQuery(crossQueryRequest *pb.CrossQueryRequest, queryMeta *pb.CrossQueryMeta) (*pb.ContractResponse, error) { + return xc.crossQueryCache.CrossQuery(crossQueryRequest, queryMeta) +} + +func (xc *XMCache) CrossQueryCache(crossQueries []*pb.CrossQueryInfo) { + xc.crossQueryCache.CrossQueryCache(crossQueries) +} // ParseCrossQuery parse cross query from tx -//func ParseCrossQuery(tx *pb.Transaction) ([]*pb.CrossQueryInfo, error) { -// var ( -// crossQueryInfos []*pb.CrossQueryInfo -// queryInfos []byte -// ) -// for _, out := range tx.GetTxOutputsExt() { -// if out.GetBucket() != TransientBucket { -// continue -// } -// if bytes.Equal(out.GetKey(), crossQueryInfosKey) { -// queryInfos = out.GetValue() -// } -// } -// if queryInfos != nil { -// err := UnmsarshalMessages(queryInfos, &crossQueryInfos) -// if err != nil { -// return nil, err -// } -// } -// return crossQueryInfos, nil -//} +func ParseCrossQuery(tx *lpb.Transaction) ([]*pb.CrossQueryInfo, error) { + var ( + crossQueryInfos []*pb.CrossQueryInfo + queryInfos []byte + ) + for _, out := range tx.GetTxOutputsExt() { + if out.GetBucket() != TransientBucket { + continue + } + if bytes.Equal(out.GetKey(), crossQueryInfosKey) { + queryInfos = out.GetValue() + } + } + if queryInfos != nil { + err := UnmsarshalMessages(queryInfos, &crossQueryInfos) + if err != nil { + return nil, err + } + } + return crossQueryInfos, nil +} // IsCrossQueryEffective check if crossQueryInfos effective // TODO: zq -//func IsCrossQueryEffective(cqi []*pb.CrossQueryInfo, tx *pb.Transaction) bool { -// return true -//} +func IsCrossQueryEffective(cqi []*pb.CrossQueryInfo, tx *lpb.Transaction) bool { + return true +} // PutCrossQueries put queryInfos to db -//func (xc *XMCache) putCrossQueries(queryInfos []*pb.CrossQueryInfo) error { -// var qi []byte -// var err error -// if len(queryInfos) != 0 { -// qi, err = MarshalMessages(queryInfos) -// if err != nil { -// return err -// } -// } -// if qi != nil { -// err = xc.Put(TransientBucket, crossQueryInfosKey, qi) -// if err != nil { -// return err -// } -// } -// return nil -//} +func (xc *XMCache) putCrossQueries(queryInfos []*pb.CrossQueryInfo) error { + var qi []byte + var err error + if len(queryInfos) != 0 { + qi, err = MarshalMessages(queryInfos) + if err != nil { + return err + } + } + if qi != nil { + err = xc.Put(TransientBucket, crossQueryInfosKey, qi) + if err != nil { + return err + } + } + return nil +} -//func (xc *XMCache) writeCrossQueriesRWSet() error { -// return xc.putCrossQueries(xc.crossQueryCache.GetCrossQueryRWSets()) -//} +func (xc *XMCache) writeCrossQueriesRWSet() error { + return xc.putCrossQueries(xc.crossQueryCache.GetCrossQueryRWSets()) +} // ParseContractEvents parse contract events from tx func ParseContractEvents(tx *lpb.Transaction) ([]*protos.ContractEvent, error) { @@ -468,10 +472,10 @@ func (xc *XMCache) Flush() error { return err } - // err = xc.writeCrossQueriesRWSet() - // if err != nil { - // return err - // } + err = xc.writeCrossQueriesRWSet() + if err != nil { + return err + } err = xc.writeEventRWSet() if err != nil { diff --git a/kernel/contract/state.go b/kernel/contract/state.go index 833bfc0e..f59c2906 100644 --- a/kernel/contract/state.go +++ b/kernel/contract/state.go @@ -1,9 +1,11 @@ package contract import ( + "math/big" + + "github.com/xuperchain/xupercore/kernel/contract/bridge/pb" "github.com/xuperchain/xupercore/kernel/ledger" "github.com/xuperchain/xupercore/protos" - "math/big" ) type SandboxConfig struct { @@ -41,6 +43,8 @@ type UTXOState interface { // CrossQueryState 对XuperBridge暴露对跨链只读合约的操作能力 type CrossQueryState interface { + CrossQuery(crossQueryRequest *pb.CrossQueryRequest, queryMeta *pb.CrossQueryMeta) (*pb.ContractResponse, error) + CrossQueryCache(crossQueries []*pb.CrossQueryInfo) } type ContractEventState interface { diff --git a/kernel/engines/xuperos/agent/chaincore.go b/kernel/engines/xuperos/agent/chaincore.go index 1225f24e..948713c6 100644 --- a/kernel/engines/xuperos/agent/chaincore.go +++ b/kernel/engines/xuperos/agent/chaincore.go @@ -43,3 +43,8 @@ func (t *ChainCoreAgent) QueryTransaction(txid []byte) (*pb.Transaction, error) func (t *ChainCoreAgent) QueryBlock(blockid []byte) (ledger.BlockHandle, error) { return t.chainCtx.State.QueryBlock(blockid) } + +// CrossQuery query contract from otherchain +func (t *ChainCoreAgent) ResolveChain(chainName string) (*pb.CrossQueryMeta, error) { + return t.chainCtx.State.ResolveChain(chainName) +} diff --git a/kernel/network/p2p/util.go b/kernel/network/p2p/util.go index 22222168..84523485 100644 --- a/kernel/network/p2p/util.go +++ b/kernel/network/p2p/util.go @@ -2,16 +2,22 @@ package p2p import ( "crypto/rand" - "crypto/tls" - "crypto/x509" + defaulttls "crypto/tls" + defaultx509 "crypto/x509" "encoding/base64" "encoding/pem" + "errors" "io/ioutil" math_rand "math/rand" "os" "path/filepath" + "strings" "time" + tls "github.com/tjfoc/gmsm/gmtls" + "github.com/tjfoc/gmsm/gmtls/gmcredentials" + "github.com/tjfoc/gmsm/x509" + iaddr "github.com/ipfs/go-ipfs-addr" "github.com/libp2p/go-libp2p-core/crypto" "github.com/libp2p/go-libp2p-core/peer" @@ -20,32 +26,79 @@ import ( "github.com/xuperchain/xupercore/kernel/network/config" ) +// serverName 为key,缓存 creds +var serverNameMap = make(map[string]credentials.TransportCredentials) + func NewTLS(path, serviceName string) (credentials.TransportCredentials, error) { + + if len(serviceName) < 1 { + return nil, errors.New("serviceName is empty") + } + + //如果缓存中有值 + if creds, ok := serverNameMap[serviceName]; ok { + return creds, nil + } + bs, err := ioutil.ReadFile(filepath.Join(path, "cacert.pem")) if err != nil { return nil, err } - - certPool := x509.NewCertPool() - ok := certPool.AppendCertsFromPEM(bs) - if !ok { + cacert, err := ioutil.ReadFile(filepath.Join(path, "cacert.pem")) + if err != nil { return nil, err } - - certificate, err := tls.LoadX509KeyPair(filepath.Join(path, "cert.pem"), filepath.Join(path, "private.key")) + pb, _ := pem.Decode(cacert) + x509cert, err := x509.ParseCertificate(pb.Bytes) if err != nil { return nil, err } - creds := credentials.NewTLS( - &tls.Config{ - ServerName: serviceName, - Certificates: []tls.Certificate{certificate}, - RootCAs: certPool, - ClientCAs: certPool, - ClientAuth: tls.RequireAndVerifyClientCert, - }) - return creds, nil + if strings.Contains(strings.ToLower(x509cert.SignatureAlgorithm.String()), "sm") { //国密 + certPool := x509.NewCertPool() + ok := certPool.AppendCertsFromPEM(bs) + if !ok { + return nil, err + } + certificate, err := tls.LoadX509KeyPair(filepath.Join(path, "cert.pem"), filepath.Join(path, "private.key")) + if err != nil { + return nil, err + } + creds := gmcredentials.NewTLS( + &tls.Config{ + GMSupport: tls.NewGMSupport(), + ServerName: serviceName, + Certificates: []tls.Certificate{certificate, certificate}, + RootCAs: certPool, + ClientCAs: certPool, + ClientAuth: tls.RequireAndVerifyClientCert, + }) + serverNameMap[serviceName] = creds + return creds, nil + } else { //非国密 + certPool := defaultx509.NewCertPool() + ok := certPool.AppendCertsFromPEM(bs) + if !ok { + return nil, err + } + + certificate, err := defaulttls.LoadX509KeyPair(filepath.Join(path, "cert.pem"), filepath.Join(path, "private.key")) + if err != nil { + return nil, err + } + + creds := credentials.NewTLS( + &defaulttls.Config{ + ServerName: serviceName, + Certificates: []defaulttls.Certificate{certificate}, + RootCAs: certPool, + ClientCAs: certPool, + ClientAuth: defaulttls.RequireAndVerifyClientCert, + }) + serverNameMap[serviceName] = creds + return creds, nil + } + } // GenerateKeyPairWithPath generate xuper net key pair