From 019820ce1ecf732daeb03127b6bb2d7f9bd3f210 Mon Sep 17 00:00:00 2001 From: tkernell Date: Fri, 22 Mar 2024 17:38:05 -0500 Subject: [PATCH 01/18] bridge v derivation --- evm/test/Bridge-TestsManual.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/evm/test/Bridge-TestsManual.js b/evm/test/Bridge-TestsManual.js index c32a56d7b..069a90aa7 100644 --- a/evm/test/Bridge-TestsManual.js +++ b/evm/test/Bridge-TestsManual.js @@ -488,7 +488,7 @@ describe("BlobstreamO - Manual Function and e2e Tests", function () { }) - it("query layer api, deploy and verify with real params", async function () { + it.only("query layer api, deploy and verify with real params", async function () { // get val timestamp from api: http://localhost:1317/layer/bridge/get_validator_timestamp_by_index/0 vts0 = await h.getValsetTimestampByIndex(0) vp0 = await h.getValsetCheckpointParams(vts0) @@ -544,10 +544,7 @@ describe("BlobstreamO - Manual Function and e2e Tests", function () { dataDigest = await h.domainSeparateOracleAttestationData(currentEthUsdVal, vp1.checkpoint) console.log("dataDigest: ", dataDigest) - // oAttestations = await h.getOracleAttestations(ETH_USD_QUERY_ID, currentEthUsdVal.report.timestamp, valSet1, dataDigest) - oAttestations = await h.getOracleAttestationsCheat(ETH_USD_QUERY_ID, currentEthUsdVal.report.timestamp) - oAttestations[0].v = 28 - oAttestations[1].v = 27 + oAttestations = await h.getOracleAttestations(ETH_USD_QUERY_ID, currentEthUsdVal.report.timestamp, valSet1, dataDigest) console.log("oAttestations: ", oAttestations) await bridge.verifyOracleData( currentEthUsdVal, @@ -673,7 +670,7 @@ describe("BlobstreamO - Manual Function and e2e Tests", function () { }) - it.only("simulate cosmos evm address derivation", async function () { + it("simulate cosmos evm address derivation", async function () { signerAcct = accounts[3] console.log("signerAcct.address: ", signerAcct.address) From a273ee8db56aec50df8f4b70ecc1e562fbd8ace1 Mon Sep 17 00:00:00 2001 From: tkernell Date: Fri, 22 Mar 2024 17:38:39 -0500 Subject: [PATCH 02/18] use addr matching method for evm addr --- app/extend_vote.go | 69 +- app/proposal_handler.go | 9 +- docs/static/openapi.yml | 3658 +---------------------------- start_scripts/start_two_chains.sh | 6 + x/bridge/keeper/keeper.go | 136 +- 5 files changed, 263 insertions(+), 3615 deletions(-) diff --git a/app/extend_vote.go b/app/extend_vote.go index 132c2cdfe..0e021da97 100644 --- a/app/extend_vote.go +++ b/app/extend_vote.go @@ -1,7 +1,6 @@ package app import ( - "bytes" "context" "crypto/sha256" "encoding/hex" @@ -18,6 +17,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" "github.com/spf13/viper" bridgetypes "github.com/tellor-io/layer/x/bridge/types" @@ -38,6 +38,7 @@ type BridgeKeeper interface { Logger(ctx context.Context) log.Logger GetEVMAddressByOperator(ctx sdk.Context, operatorAddress string) (string, error) EVMAddressFromSignature(ctx sdk.Context, sigHexString string) (string, error) + EVMAddressFromSignatures(ctx sdk.Context, sigA []byte, sigB []byte) (common.Address, error) SetEVMAddressByOperator(ctx sdk.Context, operatorAddr string, evmAddr string) error GetValidatorSetSignaturesFromStorage(ctx sdk.Context, timestamp uint64) (*bridgetypes.BridgeValsetSignatures, error) SetBridgeValsetSignature(ctx sdk.Context, operatorAddress string, timestamp uint64, signature string) error @@ -68,7 +69,8 @@ type OracleAttestation struct { } type InitialSignature struct { - Signature []byte + SignatureA []byte + SignatureB []byte } type BridgeValsetSignature struct { @@ -102,14 +104,15 @@ func (h *VoteExtHandler) ExtendVoteHandler(ctx sdk.Context, req *abci.RequestExt if err != nil { h.logger.Info("EVM address not found for operator address", "operatorAddress", operatorAddress) h.logger.Info("Error message", "error", err) - initialSig, err := h.SignInitialMessage() + initialSigA, initialSigB, err := h.SignInitialMessage() if err != nil { h.logger.Info("Failed to sign initial message", "error", err) return nil, err } // include the initial sig in the vote extension initialSignature := InitialSignature{ - Signature: initialSig, + SignatureA: initialSigA, + SignatureB: initialSigB, } voteExt.InitialSignature = initialSignature } @@ -194,31 +197,8 @@ func (h *VoteExtHandler) ExtendVoteHandler(ctx sdk.Context, req *abci.RequestExt } func (h *VoteExtHandler) VerifyVoteExtensionHandler(ctx sdk.Context, req *abci.RequestVerifyVoteExtension) (*abci.ResponseVerifyVoteExtension, error) { - h.logger.Info("@VerifyVoteExtensionHandler", "req", req) - // logic for verifying oracle sigs - extension := req.GetVoteExtension() - // unmarshal vote extension - voteExt := BridgeVoteExtension{} - err := json.Unmarshal(extension, &voteExt) - if err != nil { - return nil, fmt.Errorf("failed to unmarshal vote extension: %w", err) - } - // check for initial sig - if len(voteExt.InitialSignature.Signature) > 0 { - // verify initial sig - sigHexString := hex.EncodeToString(voteExt.InitialSignature.Signature) - evmAddress, err := h.bridgeKeeper.EVMAddressFromSignature(ctx, sigHexString) - if err != nil { - return nil, err - } - h.logger.Info("EVM address from initial sig", "evmAddress", evmAddress) - } - - if bytes.Equal(extension, []byte("vote extension data")) { - return &abci.ResponseVerifyVoteExtension{Status: abci.ResponseVerifyVoteExtension_ACCEPT}, nil - } else { - return &abci.ResponseVerifyVoteExtension{Status: abci.ResponseVerifyVoteExtension_ACCEPT}, nil - } + // TODO: implement the logic to verify the vote extension + return &abci.ResponseVerifyVoteExtension{Status: abci.ResponseVerifyVoteExtension_ACCEPT}, nil } func (h *VoteExtHandler) EncodeOracleAttestationData( @@ -364,21 +344,34 @@ func (h *VoteExtHandler) SignMessage(msg []byte) ([]byte, error) { return sig, nil } -func (h *VoteExtHandler) SignInitialMessage() ([]byte, error) { - message := "TellorLayer: Initial bridge daemon signature" +func (h *VoteExtHandler) SignInitialMessage() ([]byte, []byte, error) { + messageA := "TellorLayer: Initial bridge signature A" + messageB := "TellorLayer: Initial bridge signature B" + // convert message to bytes - msgBytes := []byte(message) + msgBytesA := []byte(messageA) + msgBytesB := []byte(messageB) + // hash message - msgHashBytes32 := sha256.Sum256(msgBytes) + msgHashABytes32 := sha256.Sum256(msgBytesA) + msgHashBBytes32 := sha256.Sum256(msgBytesB) + // convert [32]byte to []byte - msgHashBytes := msgHashBytes32[:] + msgHashABytes := msgHashABytes32[:] + msgHashBBytes := msgHashBBytes32[:] + // sign message - sig, err := h.SignMessage(msgHashBytes) + sigA, err := h.SignMessage(msgHashABytes) if err != nil { - return nil, err + return nil, nil, err } - sig = append(sig, 0) - return sig, nil + // sigA = append(sigA, 0) + + sigB, err := h.SignMessage(msgHashBBytes) + if err != nil { + return nil, nil, err + } + return sigA, sigB, nil } func (h *VoteExtHandler) GetOperatorAddress() (string, error) { diff --git a/app/proposal_handler.go b/app/proposal_handler.go index 07b900a97..9bcab17e8 100644 --- a/app/proposal_handler.go +++ b/app/proposal_handler.go @@ -199,10 +199,11 @@ func (h *ProposalHandler) CheckInitialSignaturesFromLastCommit(ctx sdk.Context, } // check for initial sig - if len(voteExt.InitialSignature.Signature) > 0 { + if len(voteExt.InitialSignature.SignatureA) > 0 { // verify initial sig - sigHexString := hex.EncodeToString(voteExt.InitialSignature.Signature) - evmAddress, err := h.bridgeKeeper.EVMAddressFromSignature(ctx, sigHexString) + // sigHexString := hex.EncodeToString(voteExt.InitialSignature.SignatureA) + // evmAddress, err := h.bridgeKeeper.EVMAddressFromSignature(ctx, sigHexString) + evmAddress, err := h.bridgeKeeper.EVMAddressFromSignatures(ctx, voteExt.InitialSignature.SignatureA, voteExt.InitialSignature.SignatureB) if err != nil { h.logger.Error("failed to get evm address from initial sig", "error", err) return nil, nil, err @@ -215,7 +216,7 @@ func (h *ProposalHandler) CheckInitialSignaturesFromLastCommit(ctx sdk.Context, } operatorAddresses = append(operatorAddresses, operatorAddress) - evmAddresses = append(evmAddresses, evmAddress) + evmAddresses = append(evmAddresses, evmAddress.Hex()) } } diff --git a/docs/static/openapi.yml b/docs/static/openapi.yml index 68d63560c..fd9777ba9 100644 --- a/docs/static/openapi.yml +++ b/docs/static/openapi.yml @@ -3,2739 +3,6 @@ info: title: HTTP API Console name: '' description: '' -paths: - /tellor-io/layer/dispute/params: - get: - summary: Parameters queries the parameters of the module. - operationId: LayerDisputeParams - responses: - '200': - description: A successful response. - schema: - type: object - properties: - params: - description: params holds all the parameters of this module. - type: object - description: >- - QueryParamsResponse is response type for the Query/Params RPC - method. - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - additionalProperties: {} - tags: - - Query - /layer/oracle/get_reportsby_qid/{queryId}: - get: - summary: Queries a list of GetReportsbyQid items. - operationId: LayerOracleGetReportsbyQid - responses: - '200': - description: A successful response. - schema: - type: object - properties: - reports: - type: object - properties: - microReports: - type: array - items: - type: object - properties: - reporter: - type: string - title: reporter is the address of the reporter - power: - type: string - format: int64 - title: >- - the power of the reporter based on total tokens - normalized - query_type: - type: string - title: string identifier of the data spec - query_id: - type: string - title: hash of the query data - aggregate_method: - type: string - title: >- - aggregate method to use for aggregating all the - reports for the query id - value: - type: string - title: hex string of the response value - timestamp: - type: string - format: date-time - title: timestamp of when the report was created - cyclelist: - type: boolean - title: >- - indicates if the report's query id is in the - cyclelist - block_number: - type: string - format: int64 - title: block number of when the report was created - title: MicroReport represents data for a single report - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - additionalProperties: {} - parameters: - - name: queryId - in: path - required: true - type: string - tags: - - Query - /layer/oracle/get_reportsby_reporter/{reporter}: - get: - operationId: LayerOracleGetReportsbyReporter - responses: - '200': - description: A successful response. - schema: - type: object - properties: - microReports: - type: array - items: - type: object - properties: - reporter: - type: string - title: reporter is the address of the reporter - power: - type: string - format: int64 - title: >- - the power of the reporter based on total tokens - normalized - query_type: - type: string - title: string identifier of the data spec - query_id: - type: string - title: hash of the query data - aggregate_method: - type: string - title: >- - aggregate method to use for aggregating all the reports - for the query id - value: - type: string - title: hex string of the response value - timestamp: - type: string - format: date-time - title: timestamp of when the report was created - cyclelist: - type: boolean - title: indicates if the report's query id is in the cyclelist - block_number: - type: string - format: int64 - title: block number of when the report was created - title: MicroReport represents data for a single report - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - additionalProperties: {} - parameters: - - name: reporter - in: path - required: true - type: string - tags: - - Query - /layer/oracle/get_reportsby_reporter_qid/{reporter}/{queryId}: - get: - operationId: LayerOracleGetReportsbyReporterQid - responses: - '200': - description: A successful response. - schema: - type: object - properties: - reports: - type: object - properties: - microReports: - type: array - items: - type: object - properties: - reporter: - type: string - title: reporter is the address of the reporter - power: - type: string - format: int64 - title: >- - the power of the reporter based on total tokens - normalized - query_type: - type: string - title: string identifier of the data spec - query_id: - type: string - title: hash of the query data - aggregate_method: - type: string - title: >- - aggregate method to use for aggregating all the - reports for the query id - value: - type: string - title: hex string of the response value - timestamp: - type: string - format: date-time - title: timestamp of when the report was created - cyclelist: - type: boolean - title: >- - indicates if the report's query id is in the - cyclelist - block_number: - type: string - format: int64 - title: block number of when the report was created - title: MicroReport represents data for a single report - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - additionalProperties: {} - parameters: - - name: reporter - in: path - required: true - type: string - - name: queryId - in: path - required: true - type: string - tags: - - Query - /layer/oracle/params: - get: - summary: Parameters queries the parameters of the module. - operationId: LayerOracleParams - responses: - '200': - description: A successful response. - schema: - type: object - properties: - params: - description: params holds all the parameters of this module. - type: object - properties: - minStakeAmount: - type: string - description: >- - QueryParamsResponse is response type for the Query/Params RPC - method. - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - additionalProperties: {} - tags: - - Query - /tellor-io/layer/oracle/GetDataBefore/{queryId}/{timestamp}: - get: - summary: Queries a list of GetAggregatedReport items. - operationId: LayerOracleGetDataBefore - responses: - '200': - description: A successful response. - schema: - type: object - properties: - report: - type: object - properties: - queryId: - type: string - aggregateValue: - type: string - aggregateReporter: - type: string - reporterPower: - type: string - format: int64 - standardDeviation: - type: number - format: double - reporters: - type: array - items: - type: object - properties: - reporter: - type: string - power: - type: string - format: int64 - flagged: - type: boolean - nonce: - type: string - format: uint64 - aggregateReportIndex: - type: string - format: int64 - height: - type: string - format: int64 - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - additionalProperties: {} - parameters: - - name: queryId - in: path - required: true - type: string - - name: timestamp - in: path - required: true - type: string - format: int64 - tags: - - Query - /tellor-io/layer/oracle/current_cyclelist_query: - get: - summary: Queries a list of CurrentCyclelistQuery items. - operationId: LayerOracleCurrentCyclelistQuery - responses: - '200': - description: A successful response. - schema: - type: object - properties: - querydata: - type: string - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - additionalProperties: {} - tags: - - Query - /tellor-io/layer/oracle/get_aggregated_report/{queryId}: - get: - summary: Queries a list of GetAggregatedReport items. - operationId: LayerOracleGetAggregatedReport - responses: - '200': - description: A successful response. - schema: - type: object - properties: - report: - type: object - properties: - queryId: - type: string - aggregateValue: - type: string - aggregateReporter: - type: string - reporterPower: - type: string - format: int64 - standardDeviation: - type: number - format: double - reporters: - type: array - items: - type: object - properties: - reporter: - type: string - power: - type: string - format: int64 - flagged: - type: boolean - nonce: - type: string - format: uint64 - aggregateReportIndex: - type: string - format: int64 - height: - type: string - format: int64 - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - additionalProperties: {} - parameters: - - name: queryId - in: path - required: true - type: string - tags: - - Query - /tellor-io/layer/oracle/get_current_tip/{queryData}: - get: - summary: Queries a list of GetCurrentTip items. - operationId: LayerOracleGetCurrentTip - responses: - '200': - description: A successful response. - schema: - type: object - properties: - tips: - type: object - properties: - query_data: - type: string - title: queryData is the query data that was tipped - amount: - type: string - title: the amount that was tipped - total_tips: - type: string - title: >- - totalTips is the total amount of tips for this query data - so far - title: >- - Tips is a struct that contains the query data and the amount - it was tipped - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - additionalProperties: {} - parameters: - - name: queryData - in: path - required: true - type: string - tags: - - Query - /tellor-io/layer/oracle/get_time_based_rewards: - get: - summary: Queries a list of GetTimeBasedRewards items. - operationId: LayerOracleGetTimeBasedRewards - responses: - '200': - description: A successful response. - schema: - type: object - properties: - reward: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - Coin defines a token with a denomination and an amount. - - - NOTE: The amount field is an Int which implements the custom - method - - signatures required by gogoproto. - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - additionalProperties: {} - tags: - - Query - /tellor-io/layer/oracle/get_user_tip_total/{tipper}/{queryData}: - get: - summary: Queries a list of GetUserTipTotal items. - operationId: LayerOracleGetUserTipTotal - responses: - '200': - description: A successful response. - schema: - type: object - properties: - totalTips: - type: object - properties: - address: - type: string - total: - type: string - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - additionalProperties: {} - parameters: - - name: tipper - in: path - required: true - type: string - - name: queryData - in: path - required: true - type: string - tags: - - Query - /layer/registry/decode_querydata/{querydata}: - get: - summary: Queries a list of DecodeQuerydata items. - operationId: LayerRegistryDecodeQuerydata - responses: - '200': - description: A successful response. - schema: - type: object - properties: - spec: - type: string - description: >- - spec is the decoded json represention of the query data hex - string. - description: >- - QueryDecodeQuerydataResponse is response type for the - Query/DecodeQuerydata RPC method. - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - additionalProperties: {} - parameters: - - name: querydata - description: querydata is the query data hex string to be decoded. - in: path - required: true - type: string - tags: - - Query - /layer/registry/decode_value/{queryType}/{value}: - get: - summary: Queries a list of DecodeValue items. - operationId: LayerRegistryDecodeValue - responses: - '200': - description: A successful response. - schema: - type: object - properties: - decodedValue: - type: string - description: decodedValue is the decoded value of the hex string. - description: >- - QueryDecodeValueResponse is response type for the - Query/DecodeValue RPC method. - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - additionalProperties: {} - parameters: - - name: queryType - description: queryType is the key to fetch a the corresponding data spec. - in: path - required: true - type: string - - name: value - description: value is the value hex string to be decoded. - in: path - required: true - type: string - tags: - - Query - /layer/registry/generate_querydata/{querytype}/{parameters}: - get: - summary: Queries a list of GenerateQuerydata items. - operationId: LayerRegistryGenerateQuerydata - responses: - '200': - description: A successful response. - schema: - type: object - properties: - querydata: - type: string - description: querydata is the generated querydata hex string. - description: >- - QueryGenerateQuerydataResponse is response type for the - Query/GenerateQuerydata RPC method. - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - additionalProperties: {} - parameters: - - name: querytype - description: querytype for which querydata is to be generated. - in: path - required: true - type: string - - name: parameters - description: parameters for which querydata is to be generated. - in: path - required: true - type: string - tags: - - Query - /layer/registry/get_data_spec/{query_type}: - get: - summary: Queries a list of GetDataSpec items. - operationId: LayerRegistryGetDataSpec - responses: - '200': - description: A successful response. - schema: - $ref: '#/definitions/layer.registry.QueryGetDataSpecResponse' - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - additionalProperties: {} - parameters: - - name: query_type - description: queryType is the key to fetch a the corresponding data spec. - in: path - required: true - type: string - tags: - - Query - /layer/registry/params: - get: - summary: Parameters queries the parameters of the module. - operationId: LayerRegistryParams - responses: - '200': - description: A successful response. - schema: - type: object - properties: - params: - description: params holds all the parameters of this module. - type: object - description: >- - QueryParamsResponse is response type for the Query/Params RPC - method. - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - additionalProperties: {} - tags: - - Query - /tellor-io/layer/reporter/commission/{reporter_address}: - get: - summary: ReporterCommission queries accumulated commission for a reporter. - operationId: LayerReporterReporterCommission - responses: - '200': - description: A successful response. - schema: - type: object - properties: - commission: - description: commission defines the commission the reporter received. - type: object - properties: - commission: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - DecCoin defines a token with a denomination and a - decimal amount. - - - NOTE: The amount field is an Dec which implements the - custom method - - signatures required by gogoproto. - title: commission is the accumulated commission for the reporter - title: >- - ReporterAccumulatedCommission represents accumulated - commission for a reporter - title: |- - QueryReporterCommissionResponse is the response type for the - Query/ReporterCommission RPC method - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's path - must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in - a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary - all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can optionally - set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in - the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - additionalProperties: {} - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values - in the form - - of utility functions or additional generated methods of the - Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - // or ... - if (any.isSameTypeAs(Foo.getDefaultInstance())) { - foo = any.unpack(Foo.getDefaultInstance()); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield - type - - name "y.z". - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with - an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom - JSON - - representation, that representation will be embedded adding - a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - parameters: - - name: reporter_address - description: reporter_address defines the reporter address to query for. - in: path - required: true - type: string - tags: - - Query - /tellor-io/layer/reporter/delegation-rewards/{delegator_address}/{reporter_address}: - get: - summary: DelegationRewards queries the total rewards accrued by a delegation. - operationId: LayerReporterDelegationRewards - responses: - '200': - description: A successful response. - schema: - type: object - properties: - rewards: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - DecCoin defines a token with a denomination and a decimal - amount. - - - NOTE: The amount field is an Dec which implements the custom - method - - signatures required by gogoproto. - description: rewards defines the rewards accrued by a delegation. - description: |- - QueryDelegationRewardsResponse is the response type for the - Query/DelegationRewards RPC method. - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's path - must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in - a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary - all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can optionally - set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in - the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - additionalProperties: {} - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values - in the form - - of utility functions or additional generated methods of the - Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - // or ... - if (any.isSameTypeAs(Foo.getDefaultInstance())) { - foo = any.unpack(Foo.getDefaultInstance()); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield - type - - name "y.z". - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with - an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom - JSON - - representation, that representation will be embedded adding - a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - parameters: - - name: delegator_address - description: delegator_address defines the delegator address to query for. - in: path - required: true - type: string - - name: reporter_address - description: reporter_address defines the reporter address to query for. - in: path - required: true - type: string - tags: - - Query - /tellor-io/layer/reporter/delegator-reporter/{delegator_address}: - get: - summary: DelegatorReporter queries the reporter of a delegator. - operationId: LayerReporterDelegatorReporter - responses: - '200': - description: A successful response. - schema: - type: object - properties: - reporter: - type: string - description: reporter defines the reporter of a delegator. - description: |- - QueryDelegatorReporterResponse is the response type for the - Query/DelegatorReporter RPC method. - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's path - must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in - a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary - all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can optionally - set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in - the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - additionalProperties: {} - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values - in the form - - of utility functions or additional generated methods of the - Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - // or ... - if (any.isSameTypeAs(Foo.getDefaultInstance())) { - foo = any.unpack(Foo.getDefaultInstance()); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield - type - - name "y.z". - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with - an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom - JSON - - representation, that representation will be embedded adding - a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - parameters: - - name: delegator_address - description: delegator_address defines the delegator address to query for. - in: path - required: true - type: string - tags: - - Query - /tellor-io/layer/reporter/outstanding-rewards/{reporter_address}: - get: - summary: ReporterOutstandingRewards queries rewards of a reporter address. - operationId: LayerReporterReporterOutstandingRewards - responses: - '200': - description: A successful response. - schema: - type: object - properties: - rewards: - type: object - properties: - rewards: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - DecCoin defines a token with a denomination and a - decimal amount. - - - NOTE: The amount field is an Dec which implements the - custom method - - signatures required by gogoproto. - title: rewards is the outstanding rewards for the reporter - description: >- - ReporterOutstandingRewards represents outstanding - (un-withdrawn) rewards - - for a reporter inexpensive to track, allows simple sanity - checks. - description: >- - QueryReporterOutstandingRewardsResponse is the response type for - the - - Query/ReporterOutstandingRewards RPC method. - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's path - must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in - a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary - all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can optionally - set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in - the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - additionalProperties: {} - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values - in the form - - of utility functions or additional generated methods of the - Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - // or ... - if (any.isSameTypeAs(Foo.getDefaultInstance())) { - foo = any.unpack(Foo.getDefaultInstance()); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield - type - - name "y.z". - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with - an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom - JSON - - representation, that representation will be embedded adding - a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - parameters: - - name: reporter_address - description: reporter_address defines the reporter address to query for. - in: path - required: true - type: string - tags: - - Query - /tellor-io/layer/reporter/params: - get: - summary: Parameters queries the parameters of the module. - operationId: LayerReporterParams - responses: - '200': - description: A successful response. - schema: - type: object - properties: - params: - description: params holds all the parameters of this module. - type: object - properties: - min_commission_rate: - type: string - title: >- - min_commission_rate, adopted from staking module, is the - minimum commission rate a reporter can their delegators - description: >- - QueryParamsResponse is response type for the Query/Params RPC - method. - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's path - must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in - a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary - all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can optionally - set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in - the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - additionalProperties: {} - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values - in the form - - of utility functions or additional generated methods of the - Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - // or ... - if (any.isSameTypeAs(Foo.getDefaultInstance())) { - foo = any.unpack(Foo.getDefaultInstance()); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield - type - - name "y.z". - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with - an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom - JSON - - representation, that representation will be embedded adding - a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - tags: - - Query - /tellor-io/layer/reporter/reporter-stake/{reporter_address}: - get: - summary: ReporterStake queries the total tokens of a reporter. - operationId: LayerReporterReporterStake - responses: - '200': - description: A successful response. - schema: - type: object - properties: - stake: - type: string - description: stake defines the total tokens of a reporter. - description: |- - QueryReporterStakeResponse is the response type for the - Query/ReporterStake RPC method. - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's path - must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in - a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary - all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can optionally - set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in - the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - additionalProperties: {} - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values - in the form - - of utility functions or additional generated methods of the - Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - // or ... - if (any.isSameTypeAs(Foo.getDefaultInstance())) { - foo = any.unpack(Foo.getDefaultInstance()); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield - type - - name "y.z". - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with - an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom - JSON - - representation, that representation will be embedded adding - a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - parameters: - - name: reporter_address - description: reporter_address defines the reporter address to query for. - in: path - required: true - type: string - tags: - - Query - /tellor-io/layer/reporter/reporters: - get: - summary: Reporters queries all the staked reporters. - operationId: LayerReporterReporters - responses: - '200': - description: A successful response. - schema: - type: object - properties: - reporters: - type: array - items: - type: object - properties: - reporter: - type: string - title: reporter is the address of the reporter - total_tokens: - type: string - title: tokens is the amount of tokens the reporter has - commission: - title: commission for the reporter - type: object - properties: - commission_rates: - description: >- - commission_rates defines the initial commission - rates to be used for creating a validator. - type: object - properties: - rate: - type: string - description: >- - rate is the commission rate charged to - delegators, as a fraction. - max_rate: - type: string - description: >- - max_rate defines the maximum commission rate - which validator can ever charge, as a fraction. - max_change_rate: - type: string - description: >- - max_change_rate defines the maximum daily - increase of the validator commission, as a - fraction. - update_time: - type: string - format: date-time - description: >- - update_time is the last time the commission rate was - changed. - description: >- - Commission defines commission parameters for a given - validator. - jailed: - type: boolean - title: jailed is a bool whether the reporter is jailed or not - jailed_until: - type: string - format: date-time - title: jailed_until is the time the reporter is jailed until - title: >- - OracleReporter is the struct that holds the data for a - reporter - description: all the reporters. - description: >- - QueryReportersResponse is the response type for the - Query/Reporters RPC method. - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's path - must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in - a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary - all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can optionally - set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in - the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - additionalProperties: {} - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values - in the form - - of utility functions or additional generated methods of the - Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - // or ... - if (any.isSameTypeAs(Foo.getDefaultInstance())) { - foo = any.unpack(Foo.getDefaultInstance()); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield - type - - name "y.z". - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with - an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom - JSON - - representation, that representation will be embedded adding - a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - tags: - - Query - /tellor-io/layer/reporter/{reporter_address}: - get: - summary: Reporter queries the reporter of a reporter address. - operationId: LayerReporterReporter - responses: - '200': - description: A successful response. - schema: - type: object - properties: - reporter: - type: object - properties: - reporter: - type: string - title: reporter is the address of the reporter - total_tokens: - type: string - title: tokens is the amount of tokens the reporter has - commission: - title: commission for the reporter - type: object - properties: - commission_rates: - description: >- - commission_rates defines the initial commission rates - to be used for creating a validator. - type: object - properties: - rate: - type: string - description: >- - rate is the commission rate charged to delegators, - as a fraction. - max_rate: - type: string - description: >- - max_rate defines the maximum commission rate which - validator can ever charge, as a fraction. - max_change_rate: - type: string - description: >- - max_change_rate defines the maximum daily increase - of the validator commission, as a fraction. - update_time: - type: string - format: date-time - description: >- - update_time is the last time the commission rate was - changed. - description: >- - Commission defines commission parameters for a given - validator. - jailed: - type: boolean - title: jailed is a bool whether the reporter is jailed or not - jailed_until: - type: string - format: date-time - title: jailed_until is the time the reporter is jailed until - title: >- - OracleReporter is the struct that holds the data for a - reporter - description: >- - QueryReporterResponse is the response type for the Query/Reporter - RPC method. - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's path - must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in - a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary - all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can optionally - set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in - the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - additionalProperties: {} - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values - in the form - - of utility functions or additional generated methods of the - Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - // or ... - if (any.isSameTypeAs(Foo.getDefaultInstance())) { - foo = any.unpack(Foo.getDefaultInstance()); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield - type - - name "y.z". - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with - an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom - JSON - - representation, that representation will be embedded adding - a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - parameters: - - name: reporter_address - description: reporter_address defines the reporter address to query for. - in: path - required: true - type: string - tags: - - Query definitions: cosmos.auth.v1beta1.MsgUpdateParamsResponse: type: object @@ -4673,476 +1940,98 @@ definitions: title: |- MerklePrefix is merkle path prefixed to the key. The constructed key from the Path and the key will be append(Path.KeyPath, - append(Path.KeyPrefix, key...)) - ibc.core.connection.v1.Counterparty: - type: object - properties: - client_id: - type: string - description: >- - identifies the client on the counterparty chain associated with a - given - - connection. - connection_id: - type: string - description: >- - identifies the connection end on the counterparty chain associated - with a - - given connection. - prefix: - description: commitment merkle prefix of the counterparty chain. - type: object - properties: - key_prefix: - type: string - format: byte - title: >- - MerklePrefix is merkle path prefixed to the key. - - The constructed key from the Path and the key will be - append(Path.KeyPath, - - append(Path.KeyPrefix, key...)) - description: >- - Counterparty defines the counterparty chain associated with a connection - end. - ibc.core.connection.v1.MsgConnectionOpenAckResponse: - type: object - description: >- - MsgConnectionOpenAckResponse defines the Msg/ConnectionOpenAck response - type. - ibc.core.connection.v1.MsgConnectionOpenConfirmResponse: - type: object - description: |- - MsgConnectionOpenConfirmResponse defines the Msg/ConnectionOpenConfirm - response type. - ibc.core.connection.v1.MsgConnectionOpenInitResponse: - type: object - description: |- - MsgConnectionOpenInitResponse defines the Msg/ConnectionOpenInit response - type. - ibc.core.connection.v1.MsgConnectionOpenTryResponse: - type: object - description: >- - MsgConnectionOpenTryResponse defines the Msg/ConnectionOpenTry response - type. - ibc.core.connection.v1.MsgUpdateParamsResponse: - type: object - description: MsgUpdateParamsResponse defines the MsgUpdateParams response type. - ibc.core.connection.v1.Params: - type: object - properties: - max_expected_time_per_block: - type: string - format: uint64 - description: >- - maximum expected time per block (in nanoseconds), used to enforce - block delay. This parameter should reflect the - - largest amount of time that the chain might reasonably take to produce - the next block under normal operating - - conditions. A safe choice is 3-5x the expected time per block. - description: Params defines the set of Connection parameters. - ibc.core.connection.v1.Version: - type: object - properties: - identifier: - type: string - title: unique version identifier - features: - type: array - items: - type: string - title: list of features compatible with the specified identifier - description: |- - Version defines the versioning scheme used to negotiate the IBC verison in - the connection handshake. - layer.bridge.MsgRegisterOperatorPubkeyResponse: - type: object - layer.bridge.MsgSubmitBridgeValsetSignatureResponse: - type: object - layer.bridge.MsgSubmitOracleAttestationResponse: - type: object - layer.dispute.Params: - type: object - description: Params defines the parameters for the module. - layer.dispute.QueryParamsResponse: - type: object - properties: - params: - description: params holds all the parameters of this module. - type: object - description: QueryParamsResponse is response type for the Query/Params RPC method. - layer.dispute.DisputeCategory: - type: string - enum: - - DISPUTE_CATEGORY_UNSPECIFIED - - DISPUTE_CATEGORY_WARNING - - DISPUTE_CATEGORY_MINOR - - DISPUTE_CATEGORY_MAJOR - default: DISPUTE_CATEGORY_UNSPECIFIED - description: |- - DisputeCategory defines the severity of a dispute. - - - DISPUTE_CATEGORY_UNSPECIFIED: UNSPECIFIED defines an invalid dispute category. - - DISPUTE_CATEGORY_WARNING: WARNING defines a 1 percent slashing. - - DISPUTE_CATEGORY_MINOR: MINOR defines a 5 percent slashing. - - DISPUTE_CATEGORY_MAJOR: MAJOR defines a 100 percent slashing. - layer.dispute.MsgAddFeeToDisputeResponse: - type: object - layer.dispute.MsgProposeDisputeResponse: - type: object - layer.dispute.MsgVoteResponse: - type: object - layer.dispute.VoteEnum: - type: string - enum: - - VOTE_INVALID - - VOTE_SUPPORT - - VOTE_AGAINST - default: VOTE_INVALID - layer.oracle.MicroReport: - type: object - properties: - reporter: - type: string - title: reporter is the address of the reporter - power: - type: string - format: int64 - title: the power of the reporter based on total tokens normalized - query_type: - type: string - title: string identifier of the data spec - query_id: - type: string - title: hash of the query data - aggregate_method: - type: string - title: >- - aggregate method to use for aggregating all the reports for the query - id - value: - type: string - title: hex string of the response value - timestamp: - type: string - format: date-time - title: timestamp of when the report was created - cyclelist: - type: boolean - title: indicates if the report's query id is in the cyclelist - block_number: - type: string - format: int64 - title: block number of when the report was created - title: MicroReport represents data for a single report - layer.oracle.Aggregate: - type: object - properties: - queryId: - type: string - aggregateValue: - type: string - aggregateReporter: - type: string - reporterPower: - type: string - format: int64 - standardDeviation: - type: number - format: double - reporters: - type: array - items: - type: object - properties: - reporter: - type: string - power: - type: string - format: int64 - flagged: - type: boolean - nonce: - type: string - format: uint64 - aggregateReportIndex: - type: string - format: int64 - height: - type: string - format: int64 - layer.oracle.AggregateReporter: - type: object - properties: - reporter: - type: string - power: - type: string - format: int64 - layer.oracle.Params: - type: object - properties: - minStakeAmount: - type: string - description: Params defines the parameters for the module. - layer.oracle.QueryCurrentCyclelistQueryResponse: - type: object - properties: - querydata: - type: string - layer.oracle.QueryGetAggregatedReportResponse: - type: object - properties: - report: - type: object - properties: - queryId: - type: string - aggregateValue: - type: string - aggregateReporter: - type: string - reporterPower: - type: string - format: int64 - standardDeviation: - type: number - format: double - reporters: - type: array - items: - type: object - properties: - reporter: - type: string - power: - type: string - format: int64 - flagged: - type: boolean - nonce: - type: string - format: uint64 - aggregateReportIndex: - type: string - format: int64 - height: - type: string - format: int64 - layer.oracle.QueryGetCurrentTipResponse: - type: object - properties: - tips: - type: object - properties: - query_data: - type: string - title: queryData is the query data that was tipped - amount: - type: string - title: the amount that was tipped - total_tips: - type: string - title: totalTips is the total amount of tips for this query data so far - title: >- - Tips is a struct that contains the query data and the amount it was - tipped - layer.oracle.QueryGetReportsbyQidResponse: - type: object - properties: - reports: - type: object - properties: - microReports: - type: array - items: - type: object - properties: - reporter: - type: string - title: reporter is the address of the reporter - power: - type: string - format: int64 - title: the power of the reporter based on total tokens normalized - query_type: - type: string - title: string identifier of the data spec - query_id: - type: string - title: hash of the query data - aggregate_method: - type: string - title: >- - aggregate method to use for aggregating all the reports for - the query id - value: - type: string - title: hex string of the response value - timestamp: - type: string - format: date-time - title: timestamp of when the report was created - cyclelist: - type: boolean - title: indicates if the report's query id is in the cyclelist - block_number: - type: string - format: int64 - title: block number of when the report was created - title: MicroReport represents data for a single report - layer.oracle.QueryGetReportsbyReporterResponse: - type: object - properties: - microReports: - type: array - items: - type: object - properties: - reporter: - type: string - title: reporter is the address of the reporter - power: - type: string - format: int64 - title: the power of the reporter based on total tokens normalized - query_type: - type: string - title: string identifier of the data spec - query_id: - type: string - title: hash of the query data - aggregate_method: - type: string - title: >- - aggregate method to use for aggregating all the reports for the - query id - value: - type: string - title: hex string of the response value - timestamp: - type: string - format: date-time - title: timestamp of when the report was created - cyclelist: - type: boolean - title: indicates if the report's query id is in the cyclelist - block_number: - type: string - format: int64 - title: block number of when the report was created - title: MicroReport represents data for a single report - layer.oracle.QueryGetTimeBasedRewardsResponse: - type: object - properties: - reward: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. - - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - layer.oracle.QueryGetUserTipTotalResponse: + append(Path.KeyPrefix, key...)) + ibc.core.connection.v1.Counterparty: type: object properties: - totalTips: + client_id: + type: string + description: >- + identifies the client on the counterparty chain associated with a + given + + connection. + connection_id: + type: string + description: >- + identifies the connection end on the counterparty chain associated + with a + + given connection. + prefix: + description: commitment merkle prefix of the counterparty chain. type: object properties: - address: - type: string - total: + key_prefix: type: string - layer.oracle.QueryParamsResponse: + format: byte + title: >- + MerklePrefix is merkle path prefixed to the key. + + The constructed key from the Path and the key will be + append(Path.KeyPath, + + append(Path.KeyPrefix, key...)) + description: >- + Counterparty defines the counterparty chain associated with a connection + end. + ibc.core.connection.v1.MsgConnectionOpenAckResponse: type: object - properties: - params: - description: params holds all the parameters of this module. - type: object - properties: - minStakeAmount: - type: string - description: QueryParamsResponse is response type for the Query/Params RPC method. - layer.oracle.Reports: + description: >- + MsgConnectionOpenAckResponse defines the Msg/ConnectionOpenAck response + type. + ibc.core.connection.v1.MsgConnectionOpenConfirmResponse: type: object - properties: - microReports: - type: array - items: - type: object - properties: - reporter: - type: string - title: reporter is the address of the reporter - power: - type: string - format: int64 - title: the power of the reporter based on total tokens normalized - query_type: - type: string - title: string identifier of the data spec - query_id: - type: string - title: hash of the query data - aggregate_method: - type: string - title: >- - aggregate method to use for aggregating all the reports for the - query id - value: - type: string - title: hex string of the response value - timestamp: - type: string - format: date-time - title: timestamp of when the report was created - cyclelist: - type: boolean - title: indicates if the report's query id is in the cyclelist - block_number: - type: string - format: int64 - title: block number of when the report was created - title: MicroReport represents data for a single report - layer.oracle.Tips: + description: |- + MsgConnectionOpenConfirmResponse defines the Msg/ConnectionOpenConfirm + response type. + ibc.core.connection.v1.MsgConnectionOpenInitResponse: + type: object + description: |- + MsgConnectionOpenInitResponse defines the Msg/ConnectionOpenInit response + type. + ibc.core.connection.v1.MsgConnectionOpenTryResponse: + type: object + description: >- + MsgConnectionOpenTryResponse defines the Msg/ConnectionOpenTry response + type. + ibc.core.connection.v1.MsgUpdateParamsResponse: + type: object + description: MsgUpdateParamsResponse defines the MsgUpdateParams response type. + ibc.core.connection.v1.Params: type: object properties: - query_data: - type: string - title: queryData is the query data that was tipped - amount: - type: string - title: the amount that was tipped - total_tips: + max_expected_time_per_block: type: string - title: totalTips is the total amount of tips for this query data so far - title: Tips is a struct that contains the query data and the amount it was tipped - layer.oracle.UserTipTotal: + format: uint64 + description: >- + maximum expected time per block (in nanoseconds), used to enforce + block delay. This parameter should reflect the + + largest amount of time that the chain might reasonably take to produce + the next block under normal operating + + conditions. A safe choice is 3-5x the expected time per block. + description: Params defines the set of Connection parameters. + ibc.core.connection.v1.Version: type: object properties: - address: - type: string - total: + identifier: type: string - layer.oracle.MsgCommitReportResponse: - type: object - layer.oracle.MsgSubmitValueResponse: - type: object - layer.oracle.MsgTipResponse: + title: unique version identifier + features: + type: array + items: + type: string + title: list of features compatible with the specified identifier + description: |- + Version defines the versioning scheme used to negotiate the IBC verison in + the connection handshake. + layer.bridge.MsgRegisterOperatorPubkeyResponse: type: object - layer.oracle.MsgUpdateCyclelistResponse: + layer.bridge.MsgSubmitBridgeValsetSignatureResponse: type: object - description: MsgUpdateCycleResponse defines the Msg/UpdateCycle response type. - layer.oracle.MsgUpdateParamsResponse: + layer.bridge.MsgSubmitOracleAttestationResponse: type: object layer.registry.ABIComponent: type: object @@ -5203,69 +2092,11 @@ definitions: extensions: treat as a golang time.duration, don't allow nil values, don't omit empty values title: DataSpec is a specification for how to interpret and aggregate data - layer.registry.Params: - type: object - description: Params defines the parameters for the module. - layer.registry.QueryDecodeQuerydataResponse: - type: object - properties: - spec: - type: string - description: spec is the decoded json represention of the query data hex string. - description: >- - QueryDecodeQuerydataResponse is response type for the - Query/DecodeQuerydata RPC method. - layer.registry.QueryDecodeValueResponse: - type: object - properties: - decodedValue: - type: string - description: decodedValue is the decoded value of the hex string. - description: >- - QueryDecodeValueResponse is response type for the Query/DecodeValue RPC - method. - layer.registry.QueryGenerateQuerydataResponse: - type: object - properties: - querydata: - type: string - description: querydata is the generated querydata hex string. - description: >- - QueryGenerateQuerydataResponse is response type for the - Query/GenerateQuerydata RPC method. - layer.registry.QueryGetDataSpecResponse: - type: object - properties: - spec: - $ref: '#/definitions/layer.registry.DataSpec' - description: spec is the data spec corresponding to the query type. - description: >- - QueryGetDataSpecResponse is response type for the Query/GetDataSpec RPC - method. - layer.registry.QueryParamsResponse: - type: object - properties: - params: - description: params holds all the parameters of this module. - type: object - description: QueryParamsResponse is response type for the Query/Params RPC method. layer.registry.MsgRegisterSpecResponse: type: object description: MsgRegisterSpecResponse defines the Msg/RegisterSpec response type. layer.registry.MsgUpdateDataSpecResponse: type: object - cosmos.base.v1beta1.DecCoin: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - DecCoin defines a token with a denomination and a decimal amount. - - NOTE: The amount field is an Dec which implements the custom method - signatures required by gogoproto. cosmos.staking.v1beta1.Commission: type: object properties: @@ -5293,332 +2124,6 @@ definitions: format: date-time description: update_time is the last time the commission rate was changed. description: Commission defines commission parameters for a given validator. - layer.reporter.OracleReporter: - type: object - properties: - reporter: - type: string - title: reporter is the address of the reporter - total_tokens: - type: string - title: tokens is the amount of tokens the reporter has - commission: - title: commission for the reporter - type: object - properties: - commission_rates: - description: >- - commission_rates defines the initial commission rates to be used - for creating a validator. - type: object - properties: - rate: - type: string - description: >- - rate is the commission rate charged to delegators, as a - fraction. - max_rate: - type: string - description: >- - max_rate defines the maximum commission rate which validator - can ever charge, as a fraction. - max_change_rate: - type: string - description: >- - max_change_rate defines the maximum daily increase of the - validator commission, as a fraction. - update_time: - type: string - format: date-time - description: update_time is the last time the commission rate was changed. - description: Commission defines commission parameters for a given validator. - jailed: - type: boolean - title: jailed is a bool whether the reporter is jailed or not - jailed_until: - type: string - format: date-time - title: jailed_until is the time the reporter is jailed until - title: OracleReporter is the struct that holds the data for a reporter - layer.reporter.Params: - type: object - properties: - min_commission_rate: - type: string - title: >- - min_commission_rate, adopted from staking module, is the minimum - commission rate a reporter can their delegators - description: Params defines the parameters for the module. - layer.reporter.QueryDelegationRewardsResponse: - type: object - properties: - rewards: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - DecCoin defines a token with a denomination and a decimal amount. - - NOTE: The amount field is an Dec which implements the custom method - signatures required by gogoproto. - description: rewards defines the rewards accrued by a delegation. - description: |- - QueryDelegationRewardsResponse is the response type for the - Query/DelegationRewards RPC method. - layer.reporter.QueryDelegatorReporterResponse: - type: object - properties: - reporter: - type: string - description: reporter defines the reporter of a delegator. - description: |- - QueryDelegatorReporterResponse is the response type for the - Query/DelegatorReporter RPC method. - layer.reporter.QueryParamsResponse: - type: object - properties: - params: - description: params holds all the parameters of this module. - type: object - properties: - min_commission_rate: - type: string - title: >- - min_commission_rate, adopted from staking module, is the minimum - commission rate a reporter can their delegators - description: QueryParamsResponse is response type for the Query/Params RPC method. - layer.reporter.QueryReporterCommissionResponse: - type: object - properties: - commission: - description: commission defines the commission the reporter received. - type: object - properties: - commission: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - DecCoin defines a token with a denomination and a decimal - amount. - - - NOTE: The amount field is an Dec which implements the custom - method - - signatures required by gogoproto. - title: commission is the accumulated commission for the reporter - title: >- - ReporterAccumulatedCommission represents accumulated commission for a - reporter - title: |- - QueryReporterCommissionResponse is the response type for the - Query/ReporterCommission RPC method - layer.reporter.QueryReporterOutstandingRewardsResponse: - type: object - properties: - rewards: - type: object - properties: - rewards: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - DecCoin defines a token with a denomination and a decimal - amount. - - - NOTE: The amount field is an Dec which implements the custom - method - - signatures required by gogoproto. - title: rewards is the outstanding rewards for the reporter - description: >- - ReporterOutstandingRewards represents outstanding (un-withdrawn) - rewards - - for a reporter inexpensive to track, allows simple sanity checks. - description: |- - QueryReporterOutstandingRewardsResponse is the response type for the - Query/ReporterOutstandingRewards RPC method. - layer.reporter.QueryReporterResponse: - type: object - properties: - reporter: - type: object - properties: - reporter: - type: string - title: reporter is the address of the reporter - total_tokens: - type: string - title: tokens is the amount of tokens the reporter has - commission: - title: commission for the reporter - type: object - properties: - commission_rates: - description: >- - commission_rates defines the initial commission rates to be - used for creating a validator. - type: object - properties: - rate: - type: string - description: >- - rate is the commission rate charged to delegators, as a - fraction. - max_rate: - type: string - description: >- - max_rate defines the maximum commission rate which - validator can ever charge, as a fraction. - max_change_rate: - type: string - description: >- - max_change_rate defines the maximum daily increase of the - validator commission, as a fraction. - update_time: - type: string - format: date-time - description: update_time is the last time the commission rate was changed. - description: Commission defines commission parameters for a given validator. - jailed: - type: boolean - title: jailed is a bool whether the reporter is jailed or not - jailed_until: - type: string - format: date-time - title: jailed_until is the time the reporter is jailed until - title: OracleReporter is the struct that holds the data for a reporter - description: >- - QueryReporterResponse is the response type for the Query/Reporter RPC - method. - layer.reporter.QueryReporterStakeResponse: - type: object - properties: - stake: - type: string - description: stake defines the total tokens of a reporter. - description: |- - QueryReporterStakeResponse is the response type for the - Query/ReporterStake RPC method. - layer.reporter.QueryReportersResponse: - type: object - properties: - reporters: - type: array - items: - type: object - properties: - reporter: - type: string - title: reporter is the address of the reporter - total_tokens: - type: string - title: tokens is the amount of tokens the reporter has - commission: - title: commission for the reporter - type: object - properties: - commission_rates: - description: >- - commission_rates defines the initial commission rates to be - used for creating a validator. - type: object - properties: - rate: - type: string - description: >- - rate is the commission rate charged to delegators, as a - fraction. - max_rate: - type: string - description: >- - max_rate defines the maximum commission rate which - validator can ever charge, as a fraction. - max_change_rate: - type: string - description: >- - max_change_rate defines the maximum daily increase of - the validator commission, as a fraction. - update_time: - type: string - format: date-time - description: >- - update_time is the last time the commission rate was - changed. - description: Commission defines commission parameters for a given validator. - jailed: - type: boolean - title: jailed is a bool whether the reporter is jailed or not - jailed_until: - type: string - format: date-time - title: jailed_until is the time the reporter is jailed until - title: OracleReporter is the struct that holds the data for a reporter - description: all the reporters. - description: >- - QueryReportersResponse is the response type for the Query/Reporters RPC - method. - layer.reporter.ReporterAccumulatedCommission: - type: object - properties: - commission: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - DecCoin defines a token with a denomination and a decimal amount. - - NOTE: The amount field is an Dec which implements the custom method - signatures required by gogoproto. - title: commission is the accumulated commission for the reporter - title: >- - ReporterAccumulatedCommission represents accumulated commission for a - reporter - layer.reporter.ReporterOutstandingRewards: - type: object - properties: - rewards: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - DecCoin defines a token with a denomination and a decimal amount. - - NOTE: The amount field is an Dec which implements the custom method - signatures required by gogoproto. - title: rewards is the outstanding rewards for the reporter - description: |- - ReporterOutstandingRewards represents outstanding (un-withdrawn) rewards - for a reporter inexpensive to track, allows simple sanity checks. layer.reporter.MsgCreateReporterResponse: type: object layer.reporter.MsgDelegateReporterResponse: @@ -5679,6 +2184,15 @@ definitions: layer.reporter.MsgWithdrawTipResponse: type: object description: MsgWithdrawTipResponse defines the Msg/WithdrawTip response type. + layer.reporter.Params: + type: object + properties: + min_commission_rate: + type: string + title: >- + min_commission_rate, adopted from staking module, is the minimum + commission rate a reporter can their delegators + description: Params defines the parameters for the module. layer.reporter.TokenOrigin: type: object properties: diff --git a/start_scripts/start_two_chains.sh b/start_scripts/start_two_chains.sh index 99b8a52b0..9b98c4f70 100755 --- a/start_scripts/start_two_chains.sh +++ b/start_scripts/start_two_chains.sh @@ -73,5 +73,11 @@ echo $PASSWORD | ./layerd keys export bill --keyring-backend $KEYRING_BACKEND -- echo "Importing bill key to test backend..." echo $PASSWORD | ./layerd keys import bill ~/Desktop/bill_keyfile --keyring-backend test --home ~/.layer/bill +# Modify timeout_commit in config.toml for alice +echo "Modifying timeout_commit in config.toml for alice..." +sed -i '' 's/timeout_commit = "5s"/timeout_commit = "500ms"/' ~/.layer/alice/config/config.toml + +# sleep 30 + echo "Start chain..." ./layerd start --home ~/.layer/alice --api.enable --api.swagger diff --git a/x/bridge/keeper/keeper.go b/x/bridge/keeper/keeper.go index fa92347aa..4b6971f06 100644 --- a/x/bridge/keeper/keeper.go +++ b/x/bridge/keeper/keeper.go @@ -483,7 +483,7 @@ func (k Keeper) PowerDiff(ctx sdk.Context, b types.BridgeValidatorSet, c types.B } func (k Keeper) EVMAddressFromSignature(ctx sdk.Context, sigHexString string) (string, error) { - message := "TellorLayer: Initial bridge daemon signature" + message := "TellorLayer: Initial bridge signature A" // convert message to bytes msgBytes := []byte(message) // hash message @@ -516,6 +516,140 @@ func (k Keeper) EVMAddressFromSignature(ctx sdk.Context, sigHexString string) (s return recoveredAddr.Hex(), nil } +func (k Keeper) EVMAddressFromSignatures(ctx sdk.Context, sigA []byte, sigB []byte) (common.Address, error) { + k.Logger(ctx).Info("@EVMAddressFromSignatures") + k.Logger(ctx).Info("sigA", "sigA", hex.EncodeToString(sigA)) + k.Logger(ctx).Info("sigB", "sigB", hex.EncodeToString(sigB)) + msgA := "TellorLayer: Initial bridge signature A" + msgB := "TellorLayer: Initial bridge signature B" + + // convert messages to bytes + msgBytesA := []byte(msgA) + msgBytesB := []byte(msgB) + + // hash messages + msgHashBytes32A := sha256.Sum256(msgBytesA) + msgHashBytesA := msgHashBytes32A[:] + + msgHashBytes32B := sha256.Sum256(msgBytesB) + msgHashBytesB := msgHashBytes32B[:] + + // hash the hash, since the keyring signer automatically hashes the message + msgDoubleHashBytes32A := sha256.Sum256(msgHashBytesA) + msgDoubleHashBytesA := msgDoubleHashBytes32A[:] + + msgDoubleHashBytes32B := sha256.Sum256(msgHashBytesB) + msgDoubleHashBytesB := msgDoubleHashBytes32B[:] + + // append recovery id's to signatures + sigA00 := append(sigA, 0x00) + k.Logger(ctx).Info("sigA00", "sigA00", hex.EncodeToString(sigA00)) + sigA01 := append(sigA, 0x01) + k.Logger(ctx).Info("sigA01", "sigA01", hex.EncodeToString(sigA01)) + sigB00 := append(sigB, 0x00) + k.Logger(ctx).Info("sigB00", "sigB00", hex.EncodeToString(sigB00)) + sigB01 := append(sigB, 0x01) + k.Logger(ctx).Info("sigB01", "sigB01", hex.EncodeToString(sigB01)) + + // recover evm addresses from signatures + recoveredAddrA00, err := k.recoverEvmAddressFromSig(ctx, sigA00, msgDoubleHashBytesA) + if err != nil { + k.Logger(ctx).Warn("Error recovering EVM address from signature A00", "error", err) + return common.Address{}, err + } + recoveredAddrA01, err := k.recoverEvmAddressFromSig(ctx, sigA01, msgDoubleHashBytesA) + if err != nil { + k.Logger(ctx).Warn("Error recovering EVM address from signature A01", "error", err) + return common.Address{}, err + } + recoveredAddrB00, err := k.recoverEvmAddressFromSig(ctx, sigB00, msgDoubleHashBytesB) + if err != nil { + k.Logger(ctx).Warn("Error recovering EVM address from signature B00", "error", err) + return common.Address{}, err + } + recoveredAddrB01, err := k.recoverEvmAddressFromSig(ctx, sigB01, msgDoubleHashBytesB) + if err != nil { + k.Logger(ctx).Warn("Error recovering EVM address from signature B01", "error", err) + return common.Address{}, err + } + + // log everything. delete later + k.Logger(ctx).Info("Recovered EVM addresses", "A00", recoveredAddrA00.Hex(), "A01", recoveredAddrA01.Hex(), "B00", recoveredAddrB00.Hex(), "B01", recoveredAddrB01.Hex()) + k.Logger(ctx).Info("signatures", "A00", hex.EncodeToString(sigA00), "A01", hex.EncodeToString(sigA01), "B00", hex.EncodeToString(sigB00), "B01", hex.EncodeToString(sigB01)) + k.Logger(ctx).Info("original sigs", "A", hex.EncodeToString(sigA), "B", hex.EncodeToString(sigB)) + + addressesA, err := k.tryRecoverAddressWithBothIDs(ctx, sigA, msgDoubleHashBytesA) + if err != nil { + k.Logger(ctx).Warn("Error trying to recover address with both IDs", "error", err) + return common.Address{}, err + } + addressesB, err := k.tryRecoverAddressWithBothIDs(ctx, sigB, msgDoubleHashBytesB) + if err != nil { + k.Logger(ctx).Warn("Error trying to recover address with both IDs", "error", err) + return common.Address{}, err + } + + // // log addresses. delete later + // k.Logger(ctx).Info("Addresses from both IDs", "A00", addressesA[0].Hex(), "A01", addressesA[1].Hex(), "B00", addressesB[0].Hex(), "B01", addressesB[1].Hex()) + + // // check if addresses match + // if bytes.Equal(recoveredAddrA00.Bytes(), recoveredAddrB00.Bytes()) || bytes.Equal(recoveredAddrA00.Bytes(), recoveredAddrB01.Bytes()) { + // k.Logger(ctx).Info("EVM addresses match", "address", recoveredAddrA00.Hex()) + // return recoveredAddrA00, nil + // } else if bytes.Equal(recoveredAddrA01.Bytes(), recoveredAddrB00.Bytes()) || bytes.Equal(recoveredAddrA01.Bytes(), recoveredAddrB01.Bytes()) { + // k.Logger(ctx).Info("EVM addresses match", "address", recoveredAddrA01.Hex()) + // return recoveredAddrA01, nil + // } else { + // k.Logger(ctx).Warn("EVM addresses do not match") + // return common.Address{}, fmt.Errorf("EVM addresses do not match") + // } + + // check if addresses match + if bytes.Equal(addressesA[0].Bytes(), addressesB[0].Bytes()) || bytes.Equal(addressesA[0].Bytes(), addressesB[1].Bytes()) { + k.Logger(ctx).Info("EVM addresses match", "address", addressesA[0].Hex()) + return addressesA[0], nil + } else if bytes.Equal(addressesA[1].Bytes(), addressesB[0].Bytes()) || bytes.Equal(addressesA[1].Bytes(), addressesB[1].Bytes()) { + k.Logger(ctx).Info("EVM addresses match", "address", addressesA[1].Hex()) + return addressesA[1], nil + } else { + k.Logger(ctx).Warn("EVM addresses do not match") + return common.Address{}, fmt.Errorf("EVM addresses do not match") + } +} + +func (k Keeper) recoverEvmAddressFromSig(ctx context.Context, sig []byte, msg []byte) (common.Address, error) { + k.Logger(ctx).Info("@recoverEvmAddressFromSig") + // recover pubkey + pubKey, err := crypto.SigToPub(msg, sig) + if err != nil { + return common.Address{}, err + } + + // get address from pubkey + recoveredAddr := crypto.PubkeyToAddress(*pubKey) + k.Logger(ctx).Info("sig", "sig", hex.EncodeToString(sig)) + k.Logger(ctx).Info("msg", "msg", hex.EncodeToString(msg)) + k.Logger(ctx).Info("Recovered EVM address", "address", recoveredAddr.Hex()) + + return recoveredAddr, nil +} + +func (k Keeper) tryRecoverAddressWithBothIDs(ctx sdk.Context, sig []byte, msgHash []byte) ([]common.Address, error) { + k.Logger(ctx).Info("@tryRecoverAddressWithBothIDs") + var addrs []common.Address + for _, id := range []byte{0, 1} { + sigWithID := append(sig[:64], id) + k.Logger(ctx).Info("sigWithID", "sigWithID", hex.EncodeToString(sigWithID)) + pubKey, err := crypto.SigToPub(msgHash, sigWithID) + if err != nil { + return []common.Address{}, err + } + recoveredAddr := crypto.PubkeyToAddress(*pubKey) + addrs = append(addrs, recoveredAddr) + } + return addrs, nil +} + func (k Keeper) SetEVMAddressByOperator(ctx sdk.Context, operatorAddr string, evmAddr string) error { evmAddrBytes := common.HexToAddress(evmAddr).Bytes() evmAddrType := types.EVMAddress{ From 6676809f613bd18ab988f94a889e0872825db555 Mon Sep 17 00:00:00 2001 From: tkernell Date: Mon, 25 Mar 2024 13:56:26 -0500 Subject: [PATCH 03/18] add evm auto tests --- evm/contracts/testing/TellorUser.sol | 25 ++ evm/test/Bridge-TestsAuto.js | 541 +++++++++++++++++++++++++++ evm/test/Bridge-TestsManual.js | 252 ------------- x/oracle/keeper/aggregate_test.go | 4 +- 4 files changed, 568 insertions(+), 254 deletions(-) create mode 100644 evm/contracts/testing/TellorUser.sol create mode 100644 evm/test/Bridge-TestsAuto.js diff --git a/evm/contracts/testing/TellorUser.sol b/evm/contracts/testing/TellorUser.sol new file mode 100644 index 000000000..2bc02e7ac --- /dev/null +++ b/evm/contracts/testing/TellorUser.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +// import "../usingtellor/UsingTellor.sol"; + +// contract TellorUser is UsingTellor { +// uint256 public ethPrice; +// uint256 public ethPriceTimestamp; +// BlobstreamO public bridge; + +// constructor(address _bridge) UsingTellor(_bridge) { +// bridge = BlobstreamO(_bridge); +// } + +// function updateEthPrice( +// OracleAttestationData calldata _attest, +// Validator[] calldata _currentValidatorSet, +// Signature[] calldata _sigs +// ) public { +// require(isCurrentConsensusValue(_attest, _currentValidatorSet, _sigs), "Invalid attestation"); +// ethPrice = abi.decode(_attest.report.value, (uint256)); +// ethPriceTimestamp = _attest.report.timestamp; +// } +// } + diff --git a/evm/test/Bridge-TestsAuto.js b/evm/test/Bridge-TestsAuto.js new file mode 100644 index 000000000..2d5cd9258 --- /dev/null +++ b/evm/test/Bridge-TestsAuto.js @@ -0,0 +1,541 @@ +const { expect } = require("chai"); +const { ethers, network } = require("hardhat"); +const h = require("./helpers/helpers"); +var assert = require('assert'); +const web3 = require('web3'); +const { prependOnceListener } = require("process"); +const BN = ethers.BigNumber.from +const abiCoder = new ethers.utils.AbiCoder(); +const axios = require('axios'); + + +describe("BlobstreamO - Manual Function and e2e Tests", function () { + + let bridge, valPower, accounts, validators, powers, initialValAddrs, + initialPowers, threshold, valCheckpoint, valTimestamp, guardian, + bridgeCaller; + const UNBONDING_PERIOD = 86400 * 7 * 3; // 3 weeks + + const ETH_USD_QUERY_ID = "0x83a7f3d48786ac2667503a61e8c415438ed2922eb86a2906e4ee66d9a2ce4992" + + beforeEach(async function () { + accounts = await ethers.getSigners(); + guardian = accounts[10] + initialValAddrs = [accounts[1].address, accounts[2].address] + initialPowers = [1, 2] + threshold = 2 + blocky = await h.getBlock() + valTimestamp = blocky.timestamp - 2 + valCheckpoint = h.calculateValCheckpoint(initialValAddrs, initialPowers, threshold, valTimestamp) + + const Bridge = await ethers.getContractFactory("BlobstreamO"); + bridge = await Bridge.deploy(threshold, valTimestamp, UNBONDING_PERIOD, valCheckpoint, guardian.address); + await bridge.deployed(); + + const BridgeCaller = await ethers.getContractFactory("BridgeCaller"); + bridgeCaller = await BridgeCaller.deploy(bridge.address); + await bridgeCaller.deployed(); + }); + + it("constructor", async function () { + assert.equal(await bridge.powerThreshold(), threshold) + assert.equal(await bridge.validatorTimestamp(), valTimestamp) + assert.equal(await bridge.unbondingPeriod(), UNBONDING_PERIOD) + assert.equal(await bridge.lastValidatorSetCheckpoint(), valCheckpoint) + }) + + it("updateValidatorSet", async function () { + newValAddrs = [accounts[1].address, accounts[2].address, accounts[3].address] + newPowers = [1, 2, 3] + newThreshold = 4 + newValHash = await h.calculateValHash(newValAddrs, newPowers) + blocky = await h.getBlock() + newValTimestamp = blocky.timestamp - 1 + newValCheckpoint = h.calculateValCheckpoint(newValAddrs, newPowers, newThreshold, newValTimestamp) + currentValSetArray = await h.getValSetStructArray(initialValAddrs, initialPowers) + sig1 = await accounts[1].signMessage(ethers.utils.arrayify(newValCheckpoint)) + sig2 = await accounts[2].signMessage(ethers.utils.arrayify(newValCheckpoint)) + sigStructArray = await h.getSigStructArray([sig1, sig2]) + await bridge.updateValidatorSet(newValHash, newThreshold, newValTimestamp, currentValSetArray, sigStructArray); + }) + + it("verifyOracleData", async function () { + queryId = h.hash("myquery") + value = abiCoder.encode(["uint256"], [2000]) + blocky = await h.getBlock() + timestamp = blocky.timestamp - 2 + aggregatePower = 3 + attestTimestamp = timestamp + 1 + previousTimestamp = 0 + nextTimestamp = 0 + valCheckpoint = h.calculateValCheckpoint(initialValAddrs, initialPowers, threshold, valTimestamp) + + dataDigest = await h.getDataDigest( + queryId, + value, + timestamp, + aggregatePower, + previousTimestamp, + nextTimestamp, + valCheckpoint, + attestTimestamp + ) + + currentValSetArray = await h.getValSetStructArray(initialValAddrs, initialPowers) + sig1 = await accounts[1].signMessage(ethers.utils.arrayify(dataDigest)) + sig2 = await accounts[2].signMessage(ethers.utils.arrayify(dataDigest)) + sigStructArray = await h.getSigStructArray([sig1, sig2]) + oracleDataStruct = await h.getOracleDataStruct( + queryId, + value, + timestamp, + aggregatePower, + previousTimestamp, + nextTimestamp, + attestTimestamp + ) + + await bridge.verifyOracleData( + oracleDataStruct, + currentValSetArray, + sigStructArray + ) + }) + + it("verifyConsensusOracleData", async function () { + queryId = h.hash("myquery") + value = abiCoder.encode(["uint256"], [2000]) + blocky = await h.getBlock() + timestamp = blocky.timestamp - 2 + aggregatePower = 3 + attestTimestamp = timestamp + 1 + previousTimestamp = 0 + nextTimestamp = 0 + valCheckpoint = h.calculateValCheckpoint(initialValAddrs, initialPowers, threshold, valTimestamp) + + dataDigest = await h.getDataDigest( + queryId, + value, + timestamp, + aggregatePower, + previousTimestamp, + nextTimestamp, + valCheckpoint, + attestTimestamp + ) + + currentValSetArray = await h.getValSetStructArray(initialValAddrs, initialPowers) + sig1 = await accounts[1].signMessage(ethers.utils.arrayify(dataDigest)) + sig2 = await accounts[2].signMessage(ethers.utils.arrayify(dataDigest)) + sigStructArray = await h.getSigStructArray([sig1, sig2]) + oracleDataStruct = await h.getOracleDataStruct( + queryId, + value, + timestamp, + aggregatePower, + previousTimestamp, + nextTimestamp, + attestTimestamp + ) + + await bridge.verifyConsensusOracleData( + oracleDataStruct, + currentValSetArray, + sigStructArray + ) + + // update validator set + newValAddrs = [accounts[1].address, accounts[2].address, accounts[3].address] + newPowers = [1, 2, 3] + newThreshold = 4 + newValHash = await h.calculateValHash(newValAddrs, newPowers) + blocky = await h.getBlock() + newValTimestamp = blocky.timestamp - 1 + newValCheckpoint = h.calculateValCheckpoint(newValAddrs, newPowers, newThreshold, newValTimestamp) + sig1 = await accounts[1].signMessage(ethers.utils.arrayify(newValCheckpoint)) + sig2 = await accounts[2].signMessage(ethers.utils.arrayify(newValCheckpoint)) + sigStructArray = await h.getSigStructArray([sig1, sig2]) + await bridge.updateValidatorSet(newValHash, newThreshold, newValTimestamp, currentValSetArray, sigStructArray); + + // verify non-consensus oracle data + value2 = abiCoder.encode(["uint256"], [3000]) + blocky = await h.getBlock() + timestamp2 = blocky.timestamp - 2 + aggregatePower2 = 3 + attestTimestamp2 = timestamp2 + 1 + previousTimestamp2 = timestamp + nextTimestamp2 = 0 + valCheckpoint2 = newValCheckpoint + + dataDigest2 = await h.getDataDigest( + queryId, + value2, + timestamp2, + aggregatePower2, + previousTimestamp2, + nextTimestamp2, + valCheckpoint2, + attestTimestamp2 + ) + + currentValSetArray2 = await h.getValSetStructArray(newValAddrs, newPowers) + sig1 = await accounts[1].signMessage(ethers.utils.arrayify(dataDigest2)) + sig2 = await accounts[2].signMessage(ethers.utils.arrayify(dataDigest2)) + sig3 = await accounts[3].signMessage(ethers.utils.arrayify(dataDigest2)) + sigStructArray2 = await h.getSigStructArray([sig1, sig2, sig3]) + oracleDataStruct2 = await h.getOracleDataStruct( + queryId, + value2, + timestamp2, + aggregatePower2, + previousTimestamp2, + nextTimestamp2, + attestTimestamp2 + ) + await bridge.verifyOracleData( + oracleDataStruct2, + currentValSetArray2, + sigStructArray2 + ) + + await h.expectThrow(bridge.verifyConsensusOracleData( + oracleDataStruct2, + currentValSetArray2, + sigStructArray2 + )) + }) + + it("guardianResetValidatorSet", async function () { + newValAddrs = [accounts[1].address, accounts[2].address, accounts[3].address] + newPowers = [1, 2, 3] + newThreshold = 4 + newValHash = await h.calculateValHash(newValAddrs, newPowers) + blocky = await h.getBlock() + newValTimestamp = blocky.timestamp - 1 + newValCheckpoint = h.calculateValCheckpoint(newValAddrs, newPowers, newThreshold, newValTimestamp) + currentValSetArray = await h.getValSetStructArray(initialValAddrs, initialPowers) + sig1 = await accounts[1].signMessage(ethers.utils.arrayify(newValCheckpoint)) + sig2 = await accounts[2].signMessage(ethers.utils.arrayify(newValCheckpoint)) + sigStructArray = await h.getSigStructArray([sig1, sig2]) + await h.expectThrow(bridge.connect(guardian).guardianResetValidatorSet(newThreshold, newValTimestamp, newValCheckpoint)); + + await h.advanceTime(UNBONDING_PERIOD + 1) + + await h.expectThrow(bridge.guardianResetValidatorSet(newThreshold, newValTimestamp, newValCheckpoint)); + await bridge.connect(guardian).guardianResetValidatorSet(newThreshold, newValTimestamp, newValCheckpoint); + }) + + it("updateValidatorSet twice", async function () { + newValAddrs = [accounts[1].address, accounts[2].address, accounts[3].address] + newPowers = [1, 2, 3] + newThreshold = 4 + newValHash = await h.calculateValHash(newValAddrs, newPowers) + blocky = await h.getBlock() + newValTimestamp = blocky.timestamp - 1 + newValCheckpoint = h.calculateValCheckpoint(newValAddrs, newPowers, newThreshold, newValTimestamp) + newDigest = await h.getEthSignedMessageHash(newValCheckpoint) + currentValSetArray = await h.getValSetStructArray(initialValAddrs, initialPowers) + sig1 = await accounts[1].signMessage(ethers.utils.arrayify(newValCheckpoint)) + sig2 = await accounts[2].signMessage(ethers.utils.arrayify(newValCheckpoint)) + sigStructArray = await h.getSigStructArray([sig1, sig2]) + await bridge.updateValidatorSet(newValHash, newThreshold, newValTimestamp, currentValSetArray, sigStructArray); + + newValAddrs2 = [accounts[4].address, accounts[5].address, accounts[6].address, accounts[7].address] + newPowers2 = [4, 5, 6, 7] + newThreshold2 = 15 + newValHash2 = await h.calculateValHash(newValAddrs2, newPowers2) + blocky = await h.getBlock() + newValTimestamp2 = blocky.timestamp - 1 + newValCheckpoint2 = h.calculateValCheckpoint(newValAddrs2, newPowers2, newThreshold2, newValTimestamp2) + newDigest2 = await h.getEthSignedMessageHash(newValCheckpoint2) + currentValSetArray2 = await h.getValSetStructArray(newValAddrs, newPowers) + sig1 = await accounts[1].signMessage(ethers.utils.arrayify(newValCheckpoint2)) + sig2 = await accounts[2].signMessage(ethers.utils.arrayify(newValCheckpoint2)) + sig3 = await accounts[3].signMessage(ethers.utils.arrayify(newValCheckpoint2)) + sigStructArray2 = await h.getSigStructArray([sig1, sig2, sig3]) + await bridge.updateValidatorSet(newValHash2, newThreshold2, newValTimestamp2, currentValSetArray2, sigStructArray2); + }) + + it("alternating validator set updates and verify oracle data", async function () { + // verify oracle data + queryId1 = h.hash("eth-usd") + value1 = abiCoder.encode(["uint256"], [2000]) + blocky = await h.getBlock() + timestamp1 = blocky.timestamp - 2 // report timestamp + aggregatePower1 = 3 + attestTimestamp1 = timestamp1 + 1 + previousTimestamp1 = 0 + nextTimestamp1 = 0 + valCheckpoint1 = h.calculateValCheckpoint(initialValAddrs, initialPowers, threshold, valTimestamp) + + dataDigest1 = await h.getDataDigest( + queryId1, + value1, + timestamp1, + aggregatePower1, + previousTimestamp1, + nextTimestamp1, + valCheckpoint1, + attestTimestamp1 + ) + + currentValSetArray1 = await h.getValSetStructArray(initialValAddrs, initialPowers) + sig1 = await accounts[1].signMessage(ethers.utils.arrayify(dataDigest1)) + sig2 = await accounts[2].signMessage(ethers.utils.arrayify(dataDigest1)) + sigStructArray1 = await h.getSigStructArray([sig1, sig2]) + oracleDataStruct1 = await h.getOracleDataStruct( + queryId1, + value1, + timestamp1, + aggregatePower1, + previousTimestamp1, + nextTimestamp1, + attestTimestamp1 + ) + + await bridge.verifyOracleData( + oracleDataStruct1, + currentValSetArray1, + sigStructArray1 + ) + + // update validator set + newValAddrs = [accounts[1].address, accounts[2].address, accounts[3].address] + newPowers = [1, 2, 3] + newThreshold = 4 + newValHash = await h.calculateValHash(newValAddrs, newPowers) + blocky = await h.getBlock() + newValTimestamp = blocky.timestamp - 1 + newValCheckpoint = h.calculateValCheckpoint(newValAddrs, newPowers, newThreshold, newValTimestamp) + sig1 = await accounts[1].signMessage(ethers.utils.arrayify(newValCheckpoint)) + sig2 = await accounts[2].signMessage(ethers.utils.arrayify(newValCheckpoint)) + sigStructArray = await h.getSigStructArray([sig1, sig2]) + await bridge.updateValidatorSet(newValHash, newThreshold, newValTimestamp, currentValSetArray1, sigStructArray); + + // verify oracle data + value2 = abiCoder.encode(["uint256"], [3000]) + blocky = await h.getBlock() + timestamp2 = blocky.timestamp - 2 + aggregatePower2 = 6 + attestTimestamp2 = timestamp2 + 1 + previousTimestamp2 = timestamp1 + nextTimestamp2 = 0 + valCheckpoint2 = newValCheckpoint + + dataDigest2 = await h.getDataDigest( + queryId1, + value2, + timestamp2, + aggregatePower2, + previousTimestamp2, + nextTimestamp2, + valCheckpoint2, + attestTimestamp2 + ) + + currentValSetArray2 = await h.getValSetStructArray(newValAddrs, newPowers) + sig1 = await accounts[1].signMessage(ethers.utils.arrayify(dataDigest2)) + sig2 = await accounts[2].signMessage(ethers.utils.arrayify(dataDigest2)) + sig3 = await accounts[3].signMessage(ethers.utils.arrayify(dataDigest2)) + sigStructArray2 = await h.getSigStructArray([sig1, sig2, sig3]) + oracleDataStruct2 = await h.getOracleDataStruct( + queryId1, + value2, + timestamp2, + aggregatePower2, + previousTimestamp2, + nextTimestamp2, + attestTimestamp2 + ) + + await bridge.verifyOracleData( + oracleDataStruct2, + currentValSetArray2, + sigStructArray2 + ) + + // update validator set + newValAddrs2 = [accounts[4].address, accounts[5].address, accounts[6].address, accounts[7].address] + newPowers2 = [4, 5, 6, 7] + newThreshold2 = 15 + newValHash2 = await h.calculateValHash(newValAddrs2, newPowers2) + blocky = await h.getBlock() + newValTimestamp2 = blocky.timestamp - 1 + newValCheckpoint2 = h.calculateValCheckpoint(newValAddrs2, newPowers2, newThreshold2, newValTimestamp2) + sig1 = await accounts[1].signMessage(ethers.utils.arrayify(newValCheckpoint2)) + sig2 = await accounts[2].signMessage(ethers.utils.arrayify(newValCheckpoint2)) + sig3 = await accounts[3].signMessage(ethers.utils.arrayify(newValCheckpoint2)) + sigStructArray2 = await h.getSigStructArray([sig1, sig2, sig3]) + await bridge.updateValidatorSet(newValHash2, newThreshold2, newValTimestamp2, currentValSetArray2, sigStructArray2); + + // verify oracle data + value3 = abiCoder.encode(["uint256"], [4000]) + blocky = await h.getBlock() + timestamp3 = blocky.timestamp - 2 + aggregatePower3 = 22 + attestTimestamp3 = timestamp3 + 1 + previousTimestamp3 = timestamp2 + nextTimestamp3 = 0 + valCheckpoint3 = newValCheckpoint2 + + dataDigest3 = await h.getDataDigest( + queryId1, + value3, + timestamp3, + aggregatePower3, + previousTimestamp3, + nextTimestamp3, + valCheckpoint3, + attestTimestamp3 + ) + + currentValSetArray3 = await h.getValSetStructArray(newValAddrs2, newPowers2) + sig1 = await accounts[4].signMessage(ethers.utils.arrayify(dataDigest3)) + sig2 = await accounts[5].signMessage(ethers.utils.arrayify(dataDigest3)) + sig3 = await accounts[6].signMessage(ethers.utils.arrayify(dataDigest3)) + sig4 = await accounts[7].signMessage(ethers.utils.arrayify(dataDigest3)) + sigStructArray3 = await h.getSigStructArray([sig1, sig2, sig3, sig4]) + oracleDataStruct3 = await h.getOracleDataStruct( + queryId1, + value3, + timestamp3, + aggregatePower3, + previousTimestamp3, + nextTimestamp3, + attestTimestamp3 + ) + + await bridge.verifyOracleData( + oracleDataStruct3, + currentValSetArray3, + sigStructArray3 + ) + }) + + it("update validator set to 100+ validators", async function () { + nVals = 158 + let wallets = [] + for (i = 0; i < nVals; i++) { + wallets.push(await ethers.Wallet.createRandom()) + } + + newValAddrs = [] + newValPowers = [] + for (i = 0; i < nVals; i++) { + newValAddrs.push(wallets[i].address) + newValPowers.push(1) + } + newValHash = await h.calculateValHash(newValAddrs, newValPowers) + + newThreshold = Math.ceil(nVals * 2 / 3) + blocky = await h.getBlock() + newValTimestamp = blocky.timestamp - 1 + newValCheckpoint = h.calculateValCheckpoint(newValAddrs, newValPowers, newThreshold, newValTimestamp) + currentValSetArray = await h.getValSetStructArray(initialValAddrs, initialPowers) + sig1 = await accounts[1].signMessage(ethers.utils.arrayify(newValCheckpoint)) + sig2 = await accounts[2].signMessage(ethers.utils.arrayify(newValCheckpoint)) + sigStructArray = await h.getSigStructArray([sig1, sig2]) + await bridge.updateValidatorSet(newValHash, newThreshold, newValTimestamp, currentValSetArray, sigStructArray); + + // verify oracle data + queryId1 = h.hash("eth-usd") + value1 = abiCoder.encode(["uint256"], [2000]) + blocky = await h.getBlock() + timestamp1 = blocky.timestamp - 2 // report timestamp + aggregatePower1 = 3 + attestTimestamp1 = timestamp1 + 1 + previousTimestamp1 = 0 + nextTimestamp1 = 0 + + dataDigest1 = await h.getDataDigest( + queryId1, + value1, + timestamp1, + aggregatePower1, + previousTimestamp1, + nextTimestamp1, + newValCheckpoint, + attestTimestamp1 + ) + + currentValSetArray1 = await h.getValSetStructArray(newValAddrs, newValPowers) + sigs = [] + for (i = 0; i < nVals; i++) { + sigs.push(await wallets[i].signMessage(ethers.utils.arrayify(dataDigest1))) + } + sigStructArray1 = await h.getSigStructArray(sigs) + oracleDataStruct1 = await h.getOracleDataStruct( + queryId1, + value1, + timestamp1, + aggregatePower1, + previousTimestamp1, + nextTimestamp1, + attestTimestamp1 + ) + + await bridge.verifyOracleData( + oracleDataStruct1, + currentValSetArray1, + sigStructArray1 + ) + + await bridgeCaller.verifyAndSaveOracleData( + oracleDataStruct1, + currentValSetArray1, + sigStructArray1 + ) + + }) + + it.only("query layer api, deploy and verify with real params", async function () { + vts0 = await h.getValsetTimestampByIndex(0) + vp0 = await h.getValsetCheckpointParams(vts0) + console.log("valsetTimestamp0: ", vts0) + console.log("valsetCheckpointParams0: ", vp0) + + console.log("deploying bridge...") + const Bridge = await ethers.getContractFactory("BlobstreamO"); + bridge = await Bridge.deploy(vp0.powerThreshold, vp0.timestamp, UNBONDING_PERIOD, vp0.checkpoint, guardian.address); + await bridge.deployed(); + + vts1 = await h.getValsetTimestampByIndex(1) + vp1 = await h.getValsetCheckpointParams(vts1) + console.log("valsetTimestamp1: ", vts1) + console.log("valsetCheckpointParams1: ", vp1) + valSet0 = await h.getValset(vp0.timestamp) + valSet1 = await h.getValset(vp1.timestamp) + console.log("valSet0: ", valSet0) + console.log("valSet1: ", valSet1) + + vsigs1old = await h.getValsetSigs(vp1.timestamp) + vsigs1 = await h.getValsetSigs2(vp1.timestamp, valSet0, vp1.checkpoint) + console.log("valsetSigs1: ", vsigs1) + console.log("valsetSigs1old: ", vsigs1old) + + + await bridge.updateValidatorSet(vp1.valsetHash, vp1.powerThreshold, vp1.timestamp, valSet0, vsigs1); + + currentEthUsdVal = await h.getCurrentAggregateReport(ETH_USD_QUERY_ID) + console.log("currentEthUsdVal: ", currentEthUsdVal) + + dataBefore = await h.getDataBefore(ETH_USD_QUERY_ID, currentEthUsdVal.report.timestamp) + console.log("dataBefore: ", dataBefore) + + currentEthUsdVal.report.previousTimestamp = dataBefore.timestamp + console.log("currentEthUsdVal: ", currentEthUsdVal) + dataDigest = await h.domainSeparateOracleAttestationData(currentEthUsdVal, vp1.checkpoint) + console.log("dataDigest: ", dataDigest) + + oAttestations = await h.getOracleAttestations(ETH_USD_QUERY_ID, currentEthUsdVal.report.timestamp, valSet1, dataDigest) + console.log("oAttestations: ", oAttestations) + await bridge.verifyOracleData( + currentEthUsdVal, + valSet1, + oAttestations, + ) + + + }) + +}) diff --git a/evm/test/Bridge-TestsManual.js b/evm/test/Bridge-TestsManual.js index 069a90aa7..ba7bb2331 100644 --- a/evm/test/Bridge-TestsManual.js +++ b/evm/test/Bridge-TestsManual.js @@ -487,256 +487,4 @@ describe("BlobstreamO - Manual Function and e2e Tests", function () { ) }) - - it.only("query layer api, deploy and verify with real params", async function () { - // get val timestamp from api: http://localhost:1317/layer/bridge/get_validator_timestamp_by_index/0 - vts0 = await h.getValsetTimestampByIndex(0) - vp0 = await h.getValsetCheckpointParams(vts0) - console.log("valsetTimestamp0: ", vts0) - console.log("valsetCheckpointParams0: ", vp0) - - console.log("deploying bridge...") - const Bridge = await ethers.getContractFactory("BlobstreamO"); - bridge = await Bridge.deploy(vp0.powerThreshold, vp0.timestamp, UNBONDING_PERIOD, vp0.checkpoint, guardian.address); - await bridge.deployed(); - - vts1 = await h.getValsetTimestampByIndex(1) - vp1 = await h.getValsetCheckpointParams(vts1) - console.log("valsetTimestamp1: ", vts1) - console.log("valsetCheckpointParams1: ", vp1) - valSet0 = await h.getValset(vp0.timestamp) - valSet1 = await h.getValset(vp1.timestamp) - console.log("valSet0: ", valSet0) - console.log("valSet1: ", valSet1) - - vsigs1old = await h.getValsetSigs(vp1.timestamp) - vsigs1 = await h.getValsetSigs2(vp1.timestamp, valSet0, vp1.checkpoint) - console.log("valsetSigs1: ", vsigs1) - console.log("valsetSigs1old: ", vsigs1old) - - - // addrRecovered0 = await bridge.verifySig2(vp1.checkpoint, vsigs1) - // console.log("addrRecovered0: ", addrRecovered0) - - // console.log("using old sig") - // addrRecovered0 = await bridge.verifySig2(vp1.checkpoint, vsigs1old) - - // vsigs1[0]["v"] = 27 - // console.log("getting 27, vsigs1: ", vsigs1) - // addrRecovered27 = await bridge.verifySig2(vp1.checkpoint, vsigs1) - // console.log("addrRecovered27: ", addrRecovered27) - - // vsigs1[0]["v"] = 28 - // addrRecovered28 = await bridge.verifySig2(vp1.checkpoint, vsigs1) - // console.log("addrRecovered28: ", addrRecovered28) - - - await bridge.updateValidatorSet(vp1.valsetHash, vp1.powerThreshold, vp1.timestamp, valSet0, vsigs1); - - currentEthUsdVal = await h.getCurrentAggregateReport(ETH_USD_QUERY_ID) - console.log("currentEthUsdVal: ", currentEthUsdVal) - - dataBefore = await h.getDataBefore(ETH_USD_QUERY_ID, currentEthUsdVal.report.timestamp) - console.log("dataBefore: ", dataBefore) - - currentEthUsdVal.report.previousTimestamp = dataBefore.timestamp - console.log("currentEthUsdVal: ", currentEthUsdVal) - dataDigest = await h.domainSeparateOracleAttestationData(currentEthUsdVal, vp1.checkpoint) - console.log("dataDigest: ", dataDigest) - - oAttestations = await h.getOracleAttestations(ETH_USD_QUERY_ID, currentEthUsdVal.report.timestamp, valSet1, dataDigest) - console.log("oAttestations: ", oAttestations) - await bridge.verifyOracleData( - currentEthUsdVal, - valSet1, - oAttestations, - ) - - - - }) - - it("signing exploration", async function () { - signerAcct = accounts[5] - console.log("signerAcct.address: ", signerAcct.address) - msg1 = h.hash("msg1") - msg2 = h.hash("msg2") - msg3 = h.hash("msg3") - msg4 = h.hash("msg4") - msg5 = h.hash("msg5") - - console.log("msg1: ", msg1) - - sig1flat = await signerAcct.signMessage(ethers.utils.arrayify(msg1)) - sig2flat = await signerAcct.signMessage(ethers.utils.arrayify(msg2)) - sig3flat = await signerAcct.signMessage(ethers.utils.arrayify(msg3)) - sig4flat = await signerAcct.signMessage(ethers.utils.arrayify(msg4)) - sig5flat = await signerAcct.signMessage(ethers.utils.arrayify(msg5)) - - sig1 = ethers.utils.splitSignature(sig1flat) - sig2 = ethers.utils.splitSignature(sig2flat) - sig3 = ethers.utils.splitSignature(sig3flat) - sig4 = ethers.utils.splitSignature(sig4flat) - sig5 = ethers.utils.splitSignature(sig5flat) - - console.log("sig1: ", sig1) - console.log("sig2: ", sig2) - console.log("sig3: ", sig3) - console.log("sig4: ", sig4) - console.log("sig5: ", sig5) - - - recovered1_27 = ethers.utils.recoverAddress(msg1, { - r: sig1.r, - s: sig1.s, - v: 27 - }); - recovered1_28 = ethers.utils.recoverAddress(msg1, { - r: sig1.r, - s: sig1.s, - v: 28 - }); - - recovered2_27 = ethers.utils.recoverAddress(msg2, { - r: sig2.r, - s: sig2.s, - v: 27 - }); - recovered2_28 = ethers.utils.recoverAddress(msg2, { - r: sig2.r, - s: sig2.s, - v: 28 - }); - - recovered3_27 = ethers.utils.recoverAddress(msg3, { - r: sig3.r, - s: sig3.s, - v: 27 - }); - recovered3_28 = ethers.utils.recoverAddress(msg3, { - r: sig3.r, - s: sig3.s, - v: 28 - }); - - recovered4_27 = ethers.utils.recoverAddress(msg4, { - r: sig4.r, - s: sig4.s, - v: 27 - }); - recovered4_28 = ethers.utils.recoverAddress(msg4, { - r: sig4.r, - s: sig4.s, - v: 28 - }); - - recovered5_27 = ethers.utils.recoverAddress(msg5, { - r: sig5.r, - s: sig5.s, - v: 27 - }); - recovered5_28 = ethers.utils.recoverAddress(msg5, { - r: sig5.r, - s: sig5.s, - v: 28 - }); - - console.log("msg 1 original v: ", sig1.v) - console.log("recovered1_27: ", recovered1_27) - console.log("recovered1_28: ", recovered1_28) - - console.log("msg 2 original v: ", sig2.v) - console.log("recovered2_27: ", recovered2_27) - console.log("recovered2_28: ", recovered2_28) - - console.log("msg 3 original v: ", sig3.v) - console.log("recovered3_27: ", recovered3_27) - console.log("recovered3_28: ", recovered3_28) - - console.log("msg 4 original v: ", sig4.v) - console.log("recovered4_27: ", recovered4_27) - console.log("recovered4_28: ", recovered4_28) - - console.log("msg 5 original v: ", sig5.v) - console.log("recovered5_27: ", recovered5_27) - console.log("recovered5_28: ", recovered5_28) - - console.log(ethers.utils.recoverAddress(msg1, sig1flat)) - - console.log("ethers.utils.recoverAddress(await h.getEthSignedMessageHash(msg1), sig1flat): ", ethers.utils.recoverAddress(await h.getEthSignedMessageHash(msg1), sig1flat)) - - - - - }) - - it("simulate cosmos evm address derivation", async function () { - signerAcct = accounts[3] - console.log("signerAcct.address: ", signerAcct.address) - - msg1 = h.hash("msg1") - msg2 = h.hash("msg2") - - console.log("msg1: ", msg1) - console.log("msg2: ", msg2) - - sig1flat = await signerAcct.signMessage(ethers.utils.arrayify(msg1)) - sig2flat = await signerAcct.signMessage(ethers.utils.arrayify(msg2)) - - sig1 = ethers.utils.splitSignature(sig1flat) - sig2 = ethers.utils.splitSignature(sig2flat) - - console.log("sig1: ", sig1) - console.log("sig2: ", sig2) - - sig1v27 = { - r: sig1.r, - s: sig1.s, - v: 27 - } - sig1v28 = { - r: sig1.r, - s: sig1.s, - v: 28 - } - - sig2v27 = { - r: sig2.r, - s: sig2.s, - v: 27 - } - sig2v28 = { - r: sig2.r, - s: sig2.s, - v: 28 - } - - recovered1_27 = ethers.utils.recoverAddress(await h.getEthSignedMessageHash(msg1), sig1v27); - recovered1_28 = ethers.utils.recoverAddress(await h.getEthSignedMessageHash(msg1), sig1v28); - - recovered2_27 = ethers.utils.recoverAddress(await h.getEthSignedMessageHash(msg2), sig2v27); - recovered2_28 = ethers.utils.recoverAddress(await h.getEthSignedMessageHash(msg2), sig2v28); - - console.log("recovered1_27: ", recovered1_27) - console.log("recovered1_28: ", recovered1_28) - console.log("recovered2_27: ", recovered2_27) - console.log("recovered2_28: ", recovered2_28) - - let realAddr; - if (recovered1_27 == recovered2_27 || recovered1_27 == recovered2_28) { - realAddr = recovered1_27; - } else if (recovered1_28 == recovered2_27 || recovered1_28 == recovered2_28) { - realAddr = recovered1_28; - } else { - console.log("no match") - } - console.log("realAddr: ", realAddr) - - if (realAddr == signerAcct.address) { - console.log("SUCCESS!") - } else { - console.log("FAILURE!") - } - }) - }) diff --git a/x/oracle/keeper/aggregate_test.go b/x/oracle/keeper/aggregate_test.go index 2af1e364d..9ea4ed0dd 100644 --- a/x/oracle/keeper/aggregate_test.go +++ b/x/oracle/keeper/aggregate_test.go @@ -37,7 +37,7 @@ func (s *KeeperTestSuite) TestFindTimestampBefore() { name: "Multiple timestamps, target present", timestamps: []time.Time{time.Unix(50, 0), time.Unix(100, 0), time.Unix(150, 0)}, target: time.Unix(100, 0), - expectedTs: time.Unix(100, 0), + expectedTs: time.Unix(50, 0), }, { name: "Multiple timestamps, target not present", @@ -115,7 +115,7 @@ func (s *KeeperTestSuite) TestFindTimestampAfter() { name: "Multiple timestamps, target present", timestamps: []time.Time{time.Unix(50, 0), time.Unix(100, 0), time.Unix(150, 0)}, target: time.Unix(100, 0), - expectedTs: time.Unix(100, 0), + expectedTs: time.Unix(150, 0), }, { name: "Multiple timestamps, target not present", From f3a4860353d5b045e8cf49852c373da17b132102 Mon Sep 17 00:00:00 2001 From: tkernell Date: Fri, 29 Mar 2024 08:03:44 -0500 Subject: [PATCH 04/18] multinode reporter daemon --- app/app.go | 2 + app/extend_vote.go | 15 +++--- daemons/flags/flags.go | 22 +++++++- daemons/reporter/client/client.go | 80 ++++++++++++++++++++++-------- start_scripts/start_bill.sh | 11 ++-- start_scripts/start_two_chains.sh | 4 +- x/oracle/keeper/weighted_median.go | 6 ++- 7 files changed, 102 insertions(+), 38 deletions(-) diff --git a/app/app.go b/app/app.go index 20ceb5e88..cae3fdc13 100644 --- a/app/app.go +++ b/app/app.go @@ -679,6 +679,8 @@ func New( &daemontypes.GrpcClientImpl{}, marketParamsConfig, indexPriceCache, + app.CreateQueryContext, + *app.StakingKeeper, ); err != nil { panic(err) } diff --git a/app/extend_vote.go b/app/extend_vote.go index 0e021da97..d4511df13 100644 --- a/app/extend_vote.go +++ b/app/extend_vote.go @@ -8,6 +8,7 @@ import ( "fmt" "math/big" "os" + "strings" "time" "cosmossdk.io/log" @@ -423,14 +424,14 @@ func (h *VoteExtHandler) GetOperatorAddress() (string, error) { func (h *VoteExtHandler) GetKeyName() string { globalHome := os.ExpandEnv("$HOME/.layer") homeDir := viper.GetString("home") - // if home is global/alice, then the key name is alice - if homeDir == globalHome+"/alice" { - return "alice" - } else if homeDir == globalHome+"/bill" { - return "bill" - } else { - return "" + + // check if homeDir starts with globalHome and has a trailing name + if strings.HasPrefix(homeDir, globalHome+"/") { + // Extract the name after "/.layer/" + name := strings.TrimPrefix(homeDir, globalHome+"/") + return name } + return "" } func (h *VoteExtHandler) CheckAndSignValidatorCheckpoint(ctx sdk.Context) (signature []byte, timestamp uint64, err error) { diff --git a/daemons/flags/flags.go b/daemons/flags/flags.go index e9df15153..831655e89 100644 --- a/daemons/flags/flags.go +++ b/daemons/flags/flags.go @@ -1,6 +1,9 @@ package flags import ( + "os" + "strings" + servertypes "github.com/cosmos/cosmos-sdk/server/types" "github.com/spf13/cast" "github.com/spf13/cobra" @@ -56,6 +59,11 @@ var defaultDaemonFlags *DaemonFlags // GetDefaultDaemonFlags returns the default values for the Daemon Flags using a singleton pattern. func GetDefaultDaemonFlags() DaemonFlags { if defaultDaemonFlags == nil { + accountName := GetKeyName() + if accountName == "" { + accountName = "alice" + } + defaultDaemonFlags = &DaemonFlags{ Shared: SharedFlags{ SocketAddress: "/tmp/daemons.sock", @@ -69,7 +77,7 @@ func GetDefaultDaemonFlags() DaemonFlags { Reporter: ReporterFlags{ Enabled: true, // Account `alice` was initialized during `ignite chain serve` - AccountName: "alice", + AccountName: GetKeyName(), }, } } @@ -166,3 +174,15 @@ func GetDaemonFlagValuesFromOptions( return result } + +func GetKeyName() string { + globalHome := os.ExpandEnv("$HOME/.layer") + homeDir := os.Getenv("LAYERD_NODE_HOME") + + if strings.HasPrefix(homeDir, globalHome+"/") { + + name := strings.TrimPrefix(homeDir, globalHome+"/") + return name + } + return "" +} diff --git a/daemons/reporter/client/client.go b/daemons/reporter/client/client.go index 5b5a85bb1..e3594201d 100644 --- a/daemons/reporter/client/client.go +++ b/daemons/reporter/client/client.go @@ -3,6 +3,8 @@ package client import ( "context" "fmt" + "os" + "strings" "time" "cosmossdk.io/log" @@ -20,6 +22,7 @@ import ( pricefeedtypes "github.com/tellor-io/layer/daemons/pricefeed/client/types" pricefeedservertypes "github.com/tellor-io/layer/daemons/server/types/pricefeed" + stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" oracleutils "github.com/tellor-io/layer/x/oracle/utils" ) @@ -37,6 +40,8 @@ type Client struct { MarketParams []pricefeedtypes.MarketParam MarketToExchange *pricefeedservertypes.MarketToExchangePrices + StakingKeeper stakingkeeper.Keeper + accAddr sdk.AccAddress // logger is the logger for the daemon. logger log.Logger @@ -57,14 +62,18 @@ func (c *Client) Start( grpcClient daemontypes.GrpcClient, marketParams []pricefeedtypes.MarketParam, marketToExchange *pricefeedservertypes.MarketToExchangePrices, + ctxGetter func(int64, bool) (sdk.Context, error), + stakingKeeper stakingkeeper.Keeper, ) error { // Log the daemon flags. c.logger.Info( "Starting reporter daemon with flags", "ReportersFlags", flags.Reporter, ) + c.MarketParams = marketParams c.MarketToExchange = marketToExchange + c.StakingKeeper = stakingKeeper // Make a connection to the Cosmos gRPC query services. queryConn, err := grpcClient.NewTcpConnection(ctx, appFlags.GrpcAddress) @@ -89,9 +98,16 @@ func (c *Client) Start( // get account accountName := c.AccountName c.cosmosCtx = c.cosmosCtx.WithChainID("layer") + homeDir := c.GetNodeHomeDir() + if homeDir != "" { + c.cosmosCtx = c.cosmosCtx.WithHomeDir(homeDir) + } else { + panic("homeDir is empty") + } fromAddr, fromName, _, err := client.GetFromFields(c.cosmosCtx, c.cosmosCtx.Keyring, accountName) if err != nil { panic(fmt.Errorf("error getting address from keyring: %v", err)) + } else { } c.cosmosCtx = c.cosmosCtx.WithFrom(accountName).WithFromAddress(fromAddr).WithFromName(fromName) c.accAddr = c.cosmosCtx.GetFromAddress() @@ -104,6 +120,7 @@ func (c *Client) Start( flags, ticker, stop, + ctxGetter, ) return nil @@ -117,9 +134,10 @@ func StartReporterDaemonTaskLoop( flags flags.DaemonFlags, ticker *time.Ticker, stop <-chan bool, + ctxGetter func(int64, bool) (sdk.Context, error), ) { - if err := client.CreateReporter(ctx); err != nil { - client.logger.Error("Error creating reporter: %w", err) + if err := client.CreateReporter(ctx, ctxGetter); err != nil { + client.logger.Error("Error creating reporter: %w", "err", err) panic(err) } @@ -142,7 +160,7 @@ func StartReporterDaemonTaskLoop( } // MsgCreateReporter creates a staked reporter -func (c *Client) CreateReporter(ctx context.Context) error { +func (c *Client) CreateReporter(ctx context.Context, ctxGetter func(int64, bool) (sdk.Context, error)) error { for { latestHeight, err := c.LatestBlockHeight(ctx) if err != nil { @@ -150,7 +168,28 @@ func (c *Client) CreateReporter(ctx context.Context) error { panic(err) } - if latestHeight < 1 { + if latestHeight < 2 { + time.Sleep(time.Second) + continue + } + + appCtx, err := ctxGetter(0, false) + if err != nil { + c.logger.Error("Error getting context: %v", err) + time.Sleep(time.Second * 5) + appCtx, err = ctxGetter(0, false) + if err != nil { + c.logger.Error("Error getting context: %v", err) + panic(err) + } + } + + validators, err := c.StakingKeeper.GetDelegatorValidators(appCtx, c.accAddr, 1) + if err != nil { + return err + } + if len(validators.Validators) == 0 { + c.logger.Info("No validators found, waiting for validators to be available") time.Sleep(time.Second) } else { break @@ -158,29 +197,20 @@ func (c *Client) CreateReporter(ctx context.Context) error { } // get reporter - req := &reportertypes.QueryReporterRequest{ReporterAddress: c.accAddr.String()} - reporter, err := c.ReporterClient.Reporter(ctx, req) - if err == nil { - return nil + appCtx, err := ctxGetter(0, false) + if err != nil { + return err } - c.logger.Info("ReporterDaemon", "reporter address", reporter.GetReporter()) - - // just getting the first validator, should probably require user to specify validator/s when creating reporter - valreq := &stakingtypes.QueryDelegatorValidatorsRequest{ - DelegatorAddr: c.accAddr.String(), - Pagination: nil, - } - resp, err := c.StakingClient.DelegatorValidators(ctx, valreq) + validators, err := c.StakingKeeper.GetDelegatorValidators(appCtx, c.accAddr, 1) if err != nil { return err } - val := resp.Validators[0] - c.logger.Info("ReporterDaemon", "staked tokens source validator", val.GetOperator()) - // stake reporter transaction, reporter is alice + val := validators.Validators[0] - // should make this configurable by user :todo + // stake reporter transaction, reporter is determined by LAYERD_NODE_HOME environment variable + // should make this configurable by user :time.Sleep(time.Second)todo // staking 1 TRB amtToStake := math.NewInt(1_000_000) // one TRB commission := reportertypes.NewCommissionWithTime(math.LegacyNewDecWithPrec(1, 1), math.LegacyNewDecWithPrec(3, 1), @@ -239,3 +269,13 @@ func (c *Client) SubmitReport(ctx context.Context) error { seq++ return c.sendTx(ctx, msgSubmit, &seq) } + +func (c *Client) GetNodeHomeDir() string { + globalHome := os.ExpandEnv("$HOME/.layer") + nodeHome := os.Getenv("LAYERD_NODE_HOME") + + if strings.HasPrefix(nodeHome, globalHome+"/") { + return nodeHome + } + return "" +} diff --git a/start_scripts/start_bill.sh b/start_scripts/start_bill.sh index 86b41eb7e..8cf8a8d88 100755 --- a/start_scripts/start_bill.sh +++ b/start_scripts/start_bill.sh @@ -15,6 +15,9 @@ NODE2_HOME_DIR="$HOME/.layer/bill" NODE1_CONFIG_DIR=$NODE1_HOME_DIR"/config" NODE2_CONFIG_DIR=$NODE2_HOME_DIR"/config" +# Define bill's node home dir to be read by reporter daemon +export LAYERD_NODE_HOME=$NODE2_HOME_DIR + # Copy the configuration files from node 1 to node 2 echo "Copying configuration files..." cp $NODE1_CONFIG_DIR/genesis.json $NODE2_CONFIG_DIR/ @@ -61,13 +64,6 @@ sed -i '' "s/persistent_peers = \"\"/persistent_peers = \"$PEER_ADDR\"/" $NODE2_ echo "Seeds/persistent_peers set." - -# send tokens from alice to bill: -# echo "Sending tokens from alice to bill..." -# ./layerd tx bank send $(./layerd keys show alice -a --keyring-backend test) $(layerd keys show bill -a --keyring-backend test) 1000000000000loya --chain-id layer --home $HOME/.layer/alice --keyring-dir $HOME/.layer --keyring-backend test -# ./layerd tx bank send $(./layerd keys show alice -a --keyring-backend $KEYRING_BACKEND --home ~/.layer/alice) $(./layerd keys show bill -a --keyring-backend $KEYRING_BACKEND --home ~/.layer/bill) 1000000000000loya --chain-id layer --home $HOME/.layer/alice --keyring-dir $HOME/.layer/alice --keyring-backend $KEYRING_BACKEND - - # get bill's validator pubkey echo "Getting bill's validator pubkey..." BILL_VAL_PUBKEY=$(./layerd tendermint show-validator --home $NODE2_HOME_DIR) @@ -105,4 +101,3 @@ echo "Staking bill as a validator..." echo "Starting the second node..." ./layerd start --home $NODE2_HOME_DIR --api.enable - diff --git a/start_scripts/start_two_chains.sh b/start_scripts/start_two_chains.sh index 9b98c4f70..d541f0289 100755 --- a/start_scripts/start_two_chains.sh +++ b/start_scripts/start_two_chains.sh @@ -9,6 +9,8 @@ set -e KEYRING_BACKEND="os" PASSWORD="password" +export LAYERD_NODE_HOME="$HOME/.layer/alice" + # Remove old test chains (if present) echo "Removing old test chain data..." rm -rf ~/.layer @@ -80,4 +82,4 @@ sed -i '' 's/timeout_commit = "5s"/timeout_commit = "500ms"/' ~/.layer/alice/con # sleep 30 echo "Start chain..." -./layerd start --home ~/.layer/alice --api.enable --api.swagger +./layerd start --home $LAYERD_NODE_HOME --api.enable --api.swagger diff --git a/x/oracle/keeper/weighted_median.go b/x/oracle/keeper/weighted_median.go index bbfe7dc9b..d8878224f 100644 --- a/x/oracle/keeper/weighted_median.go +++ b/x/oracle/keeper/weighted_median.go @@ -11,6 +11,7 @@ import ( ) func (k Keeper) WeightedMedian(ctx sdk.Context, reports []types.MicroReport) (*types.Aggregate, error) { + k.Logger(ctx).Info("@WeightedMedian", "reports", reports) var medianReport types.Aggregate values := make(map[string]*big.Int) @@ -30,6 +31,7 @@ func (k Keeper) WeightedMedian(ctx sdk.Context, reports []types.MicroReport) (*t var totalReporterPower, weightedSum big.Int for _, r := range reports { + k.Logger(ctx).Info("Reporter", "reporter", r.Reporter, "power", r.Power, "queryId", r.QueryId, "value", r.Value) weightedSum.Add(&weightedSum, new(big.Int).Mul(values[r.Reporter], big.NewInt(r.Power))) totalReporterPower.Add(&totalReporterPower, big.NewInt(r.Power)) medianReport.Reporters = append(medianReport.Reporters, &types.AggregateReporter{Reporter: r.Reporter, Power: r.Power}) @@ -38,11 +40,13 @@ func (k Keeper) WeightedMedian(ctx sdk.Context, reports []types.MicroReport) (*t halfTotalPower := new(big.Int).Div(&totalReporterPower, big.NewInt(2)) cumulativePower := new(big.Int) + k.Logger(ctx).Info("TotalReporterPower", "totalReporterPower", totalReporterPower.Int64()) + // Find the weighted median for i, s := range reports { cumulativePower.Add(cumulativePower, big.NewInt(s.Power)) if cumulativePower.Cmp(halfTotalPower) >= 0 { - medianReport.ReporterPower = s.Power + medianReport.ReporterPower = totalReporterPower.Int64() medianReport.AggregateReporter = s.Reporter medianReport.AggregateValue = s.Value medianReport.QueryId = s.QueryId From 8f094f1fd5df63a854b6f09d01652cd60d4297e0 Mon Sep 17 00:00:00 2001 From: tkernell Date: Fri, 29 Mar 2024 14:53:26 -0500 Subject: [PATCH 05/18] use full report agg power, extend reporting expiration window --- x/oracle/keeper/cycle_list.go | 3 +++ x/oracle/keeper/keeper.go | 2 +- x/oracle/keeper/msg_server_commit_report.go | 18 +++++++++++++++++- x/oracle/keeper/weighted_median.go | 5 ++++- 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/x/oracle/keeper/cycle_list.go b/x/oracle/keeper/cycle_list.go index 230c949f7..ac6bd435f 100644 --- a/x/oracle/keeper/cycle_list.go +++ b/x/oracle/keeper/cycle_list.go @@ -4,6 +4,7 @@ import ( "context" "encoding/hex" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/tellor-io/layer/utils" "github.com/tellor-io/layer/x/oracle/types" ) @@ -72,6 +73,8 @@ func (k Keeper) InitCycleListQuery(ctx context.Context, queries []string) error if err != nil { return err } + sdkctx := sdk.UnwrapSDKContext(ctx) + query.Expiration = sdkctx.BlockTime().Add(query.RegistrySpecTimeframe) err = k.Query.Set(ctx, queryId, query) if err != nil { return err diff --git a/x/oracle/keeper/keeper.go b/x/oracle/keeper/keeper.go index f477c4865..f660be9ba 100644 --- a/x/oracle/keeper/keeper.go +++ b/x/oracle/keeper/keeper.go @@ -18,7 +18,7 @@ import ( regTypes "github.com/tellor-io/layer/x/registry/types" ) -var offset = time.Second * 6 +var offset = time.Second * 8 type ( Keeper struct { diff --git a/x/oracle/keeper/msg_server_commit_report.go b/x/oracle/keeper/msg_server_commit_report.go index e240c44ca..681e85dc4 100644 --- a/x/oracle/keeper/msg_server_commit_report.go +++ b/x/oracle/keeper/msg_server_commit_report.go @@ -63,6 +63,22 @@ func (k msgServer) CommitReport(goCtx context.Context, msg *types.MsgCommitRepor // bool to check if query is in cycle incycle := msg.QueryData == cycleQuery + if !incycle { + k.Logger(ctx).Info("query not in cycle") + } + + k.Logger(ctx).Info("Expiration", "exp", query.Expiration) + k.Logger(ctx).Info("BlockTime", "blocktime", ctx.BlockTime()) + k.Logger(ctx).Info("offset", "offset", offset) + + if query.Expiration.Before(ctx.BlockTime()) { + k.Logger(ctx).Info("query expired") + } + + if query.Amount.IsZero() { + k.Logger(ctx).Info("query does not have tips and is not in cycle") + } + if query.Amount.IsZero() && query.Expiration.Before(ctx.BlockTime()) && !incycle { return nil, types.ErrNoTipsNotInCycle.Wrapf("query does not have tips and is not in cycle") } @@ -84,7 +100,7 @@ func (k msgServer) CommitReport(goCtx context.Context, msg *types.MsgCommitRepor query.Id = nextId // reset query fields when generating next id query.HasRevealedReports = false - query.Expiration = ctx.BlockTime().Add(query.RegistrySpecTimeframe) + query.Expiration = ctx.BlockTime().Add(offset) err = k.Query.Set(ctx, queryId, query) if err != nil { return nil, err diff --git a/x/oracle/keeper/weighted_median.go b/x/oracle/keeper/weighted_median.go index d8878224f..39548009c 100644 --- a/x/oracle/keeper/weighted_median.go +++ b/x/oracle/keeper/weighted_median.go @@ -6,7 +6,9 @@ import ( "math/big" "sort" + cosmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" + layertypes "github.com/tellor-io/layer/types" "github.com/tellor-io/layer/x/oracle/types" ) @@ -43,10 +45,11 @@ func (k Keeper) WeightedMedian(ctx sdk.Context, reports []types.MicroReport) (*t k.Logger(ctx).Info("TotalReporterPower", "totalReporterPower", totalReporterPower.Int64()) // Find the weighted median + totalReporterPowerMathInt := cosmath.NewInt(totalReporterPower.Int64()) for i, s := range reports { cumulativePower.Add(cumulativePower, big.NewInt(s.Power)) if cumulativePower.Cmp(halfTotalPower) >= 0 { - medianReport.ReporterPower = totalReporterPower.Int64() + medianReport.ReporterPower = totalReporterPowerMathInt.Mul(layertypes.PowerReduction).Int64() medianReport.AggregateReporter = s.Reporter medianReport.AggregateValue = s.Value medianReport.QueryId = s.QueryId From a29c946b93de25fb34d17c4c2c1defcdf10fb711 Mon Sep 17 00:00:00 2001 From: tkernell Date: Fri, 29 Mar 2024 16:23:30 -0500 Subject: [PATCH 06/18] add snapshot logic for attestations --- x/bridge/keeper/keeper.go | 211 ++++++++++++++++++++ x/bridge/types/attestation_snapshot_data.go | 28 +++ x/bridge/types/attestation_snapshots.go | 37 ++++ x/bridge/types/checkpoint_idx.go | 2 +- x/bridge/types/expected_keepers.go | 3 + x/bridge/types/keys.go | 3 + x/oracle/keeper/aggregate.go | 26 +++ 7 files changed, 309 insertions(+), 1 deletion(-) create mode 100644 x/bridge/types/attestation_snapshot_data.go create mode 100644 x/bridge/types/attestation_snapshots.go diff --git a/x/bridge/keeper/keeper.go b/x/bridge/keeper/keeper.go index 4b6971f06..dc927d76c 100644 --- a/x/bridge/keeper/keeper.go +++ b/x/bridge/keeper/keeper.go @@ -8,6 +8,7 @@ import ( "encoding/hex" "fmt" "math/big" + "time" gomath "math" @@ -44,6 +45,9 @@ type ( OracleAttestationsMap collections.Map[string, types.OracleAttestations] BridgeValsetByTimestampMap collections.Map[uint64, types.BridgeValidatorSet] ValsetTimestampToIdxMap collections.Map[uint64, types.CheckpointIdx] + AttestSnapshotsByReportMap collections.Map[string, types.AttestationSnapshots] + AttestSnapshotDataMap collections.Map[string, types.AttestationSnapshotData] + SnapshotToAttestationsMap collections.Map[string, types.OracleAttestations] stakingKeeper types.StakingKeeper slashingKeeper types.SlashingKeeper @@ -73,6 +77,9 @@ func NewKeeper( OracleAttestationsMap: collections.NewMap(sb, types.OracleAttestationsMapKey, "oracle_attestations_map", collections.StringKey, codec.CollValue[types.OracleAttestations](cdc)), BridgeValsetByTimestampMap: collections.NewMap(sb, types.BridgeValsetByTimestampMapKey, "bridge_valset_by_timestamp_map", collections.Uint64Key, codec.CollValue[types.BridgeValidatorSet](cdc)), ValsetTimestampToIdxMap: collections.NewMap(sb, types.ValsetTimestampToIdxMapKey, "valset_timestamp_to_idx_map", collections.Uint64Key, codec.CollValue[types.CheckpointIdx](cdc)), + AttestSnapshotsByReportMap: collections.NewMap(sb, types.AttestSnapshotsByReportMapKey, "attest_snapshots_by_report_map", collections.StringKey, codec.CollValue[types.AttestationSnapshots](cdc)), + AttestSnapshotDataMap: collections.NewMap(sb, types.AttestSnapshotDataMapKey, "attest_snapshot_data_map", collections.StringKey, codec.CollValue[types.AttestationSnapshotData](cdc)), + SnapshotToAttestationsMap: collections.NewMap(sb, types.SnapshotToAttestationsMapKey, "snapshot_to_attestations_map", collections.StringKey, codec.CollValue[types.OracleAttestations](cdc)), stakingKeeper: stakingKeeper, slashingKeeper: slashingKeeper, @@ -872,3 +879,207 @@ func (k Keeper) GetValidatorDidSignCheckpoint(ctx sdk.Context, operatorAddr stri } return false, -1, nil } + +func (k Keeper) CreateSnapshot(ctx sdk.Context, queryId []byte, timestamp time.Time) error { + aggReport, err := k.oracleKeeper.GetAggregateByTimestamp(ctx, queryId, timestamp) + if err != nil { + k.Logger(ctx).Info("Error getting aggregate report by timestamp", "error", err) + return err + } + // get the current validator checkpoint + validatorCheckpoint, err := k.GetValidatorCheckpointFromStorage(ctx) + if err != nil { + k.Logger(ctx).Info("Error getting validator checkpoint from storage", "error", err) + return err + } + + tsBefore, err := k.oracleKeeper.GetTimestampBefore(ctx, queryId, timestamp) + if err != nil { + tsBefore = time.Unix(0, 0) + } + + tsAfter, err := k.oracleKeeper.GetTimestampAfter(ctx, queryId, timestamp) + if err != nil { + tsAfter = time.Unix(0, 0) + } + + snapshotBytes, err := k.EncodeOracleAttestationData( + hex.EncodeToString(queryId), + aggReport.AggregateValue, + timestamp.Unix(), + aggReport.ReporterPower, + tsBefore.Unix(), + tsAfter.Unix(), + hex.EncodeToString(validatorCheckpoint.Checkpoint), + timestamp.Unix(), + ) + if err != nil { + k.Logger(ctx).Info("Error encoding oracle attestation data", "error", err) + return err + } + + // set snapshot by report + key := hex.EncodeToString(crypto.Keccak256([]byte(hex.EncodeToString(queryId) + fmt.Sprint(timestamp.Unix())))) + // check if map for this key exists, otherwise create a new map + exists, err := k.AttestSnapshotsByReportMap.Has(ctx, key) + if err != nil { + k.Logger(ctx).Info("Error checking if attestation snapshots by report map exists", "error", err) + return err + } + if !exists { + attestationSnapshots := types.NewAttestationSnapshots() + err = k.AttestSnapshotsByReportMap.Set(ctx, key, *attestationSnapshots) + if err != nil { + k.Logger(ctx).Info("Error setting attestation snapshots by report", "error", err) + return err + } + } + attestationSnapshots, err := k.AttestSnapshotsByReportMap.Get(ctx, key) + if err != nil { + k.Logger(ctx).Info("Error getting attestation snapshots by report", "error", err) + return err + } + // set the snapshot by report + attestationSnapshots.SetSnapshot(snapshotBytes) + err = k.AttestSnapshotsByReportMap.Set(ctx, key, attestationSnapshots) + if err != nil { + k.Logger(ctx).Info("Error setting attestation snapshots by report", "error", err) + return err + } + + // set snapshot to snapshot data map + snapshotData := types.AttestationSnapshotData{ + ValidatorCheckpoint: validatorCheckpoint.Checkpoint, + AttestationTimestamp: timestamp.Unix(), + PrevReportTimestamp: tsBefore.Unix(), + NextReportTimestamp: tsAfter.Unix(), + } + err = k.AttestSnapshotDataMap.Set(ctx, hex.EncodeToString(snapshotBytes), snapshotData) + if err != nil { + k.Logger(ctx).Info("Error setting attestation snapshot data", "error", err) + return err + } + + // initialize snapshot to attestations map + lastSavedBridgeValidators, err := k.BridgeValset.Get(ctx) + if err != nil { + k.Logger(ctx).Info("Error getting last saved bridge validators", "error", err) + return err + } + oracleAttestations := types.NewOracleAttestations(len(lastSavedBridgeValidators.BridgeValidatorSet)) + // set the map + err = k.SnapshotToAttestationsMap.Set(ctx, hex.EncodeToString(snapshotBytes), *oracleAttestations) + if err != nil { + k.Logger(ctx).Info("Error setting snapshot to attestations map", "error", err) + return err + } + return nil +} + +func (k Keeper) EncodeOracleAttestationData( + queryId string, + value string, + timestamp int64, + aggregatePower int64, + previousTimestamp int64, + nextTimestamp int64, + valsetCheckpoint string, + attestationTimestamp int64, +) ([]byte, error) { + // domainSeparator is bytes "tellorNewReport" + domainSep := "74656c6c6f7243757272656e744174746573746174696f6e0000000000000000" + NEW_REPORT_ATTESTATION_DOMAIN_SEPERATOR, err := hex.DecodeString(domainSep) + if err != nil { + return nil, err + } + // Convert domain separator to bytes32 + var domainSepBytes32 [32]byte + copy(domainSepBytes32[:], NEW_REPORT_ATTESTATION_DOMAIN_SEPERATOR) + + // Convert queryId to bytes32 + queryIdBytes, err := hex.DecodeString(queryId) + if err != nil { + return nil, err + } + var queryIdBytes32 [32]byte + copy(queryIdBytes32[:], queryIdBytes) + + // Convert value to bytes + valueBytes, err := hex.DecodeString(value) + if err != nil { + return nil, err + } + + // Convert timestamp to uint64 + timestampUint64 := new(big.Int) + timestampUint64.SetInt64(timestamp) + + // Convert aggregatePower to uint64 + aggregatePowerUint64 := new(big.Int) + aggregatePowerUint64.SetInt64(aggregatePower) + + // Convert previousTimestamp to uint64 + previousTimestampUint64 := new(big.Int) + previousTimestampUint64.SetInt64(previousTimestamp) + + // Convert nextTimestamp to uint64 + nextTimestampUint64 := new(big.Int) + nextTimestampUint64.SetInt64(nextTimestamp) + + // Convert valsetCheckpoint to bytes32 + valsetCheckpointBytes, err := hex.DecodeString(valsetCheckpoint) + if err != nil { + return nil, err + } + var valsetCheckpointBytes32 [32]byte + copy(valsetCheckpointBytes32[:], valsetCheckpointBytes) + + // Convert attestationTimestamp to uint64 + attestationTimestampUint64 := new(big.Int) + attestationTimestampUint64.SetInt64(attestationTimestamp) + + // Prepare Encoding + Bytes32Type, err := abi.NewType("bytes32", "", nil) + if err != nil { + return nil, err + } + Uint256Type, err := abi.NewType("uint256", "", nil) + if err != nil { + return nil, err + } + BytesType, err := abi.NewType("bytes", "", nil) + if err != nil { + return nil, err + } + + arguments := abi.Arguments{ + {Type: Bytes32Type}, + {Type: Bytes32Type}, + {Type: BytesType}, + {Type: Uint256Type}, + {Type: Uint256Type}, + {Type: Uint256Type}, + {Type: Uint256Type}, + {Type: Bytes32Type}, + {Type: Uint256Type}, + } + + // Encode the data + encodedData, err := arguments.Pack( + domainSepBytes32, + queryIdBytes32, + valueBytes, + timestampUint64, + aggregatePowerUint64, + previousTimestampUint64, + nextTimestampUint64, + valsetCheckpointBytes32, + attestationTimestampUint64, + ) + if err != nil { + return nil, err + } + + oracleAttestationHash := crypto.Keccak256(encodedData) + return oracleAttestationHash, nil +} diff --git a/x/bridge/types/attestation_snapshot_data.go b/x/bridge/types/attestation_snapshot_data.go new file mode 100644 index 000000000..1de9aff66 --- /dev/null +++ b/x/bridge/types/attestation_snapshot_data.go @@ -0,0 +1,28 @@ +package types + +import ( + "github.com/gogo/protobuf/proto" +) + +// AttestationSnapshots holds the snapshots of attestations. +// Each attestation's snapshots are stored in a slice of bytes. +type AttestationSnapshotData struct { + ValidatorCheckpoint []byte `protobuf:"bytes,1,rep,name=validator_checkpoint,proto3"` + AttestationTimestamp int64 `protobuf:"int64,2,rep,name=attestation_timestamp,proto3"` + PrevReportTimestamp int64 `protobuf:"int64,3,rep,name=prev_report_timestamp,proto3"` + NextReportTimestamp int64 `protobuf:"int64,4,rep,name=next_report_timestamp,proto3"` +} + +// Ensure AttestationSnapshotData implements proto.Message +var _ proto.Message = &AttestationSnapshotData{} + +// ProtoMessage is a no-op method to satisfy the proto.Message interface +func (*AttestationSnapshotData) ProtoMessage() {} + +// Reset is a no-op method to satisfy the proto.Message interface +func (*AttestationSnapshotData) Reset() {} + +// String returns a string representation, satisfying the proto.Message interface +func (m *AttestationSnapshotData) String() string { + return proto.CompactTextString(m) +} diff --git a/x/bridge/types/attestation_snapshots.go b/x/bridge/types/attestation_snapshots.go new file mode 100644 index 000000000..9dfb80f6d --- /dev/null +++ b/x/bridge/types/attestation_snapshots.go @@ -0,0 +1,37 @@ +package types + +import ( + "github.com/gogo/protobuf/proto" +) + +// AttestationSnapshots holds the snapshots of attestations. +// Each attestation's snapshots are stored in a slice of bytes. +type AttestationSnapshots struct { + Snapshots [][]byte `protobuf:"bytes,1,rep,name=snapshots,proto3"` +} + +// NewAttestationSnapshots initializes a AttestationSnapshots with a given size. +func NewAttestationSnapshots() *AttestationSnapshots { + snapshots := make([][]byte, 0) // Initialize with empty slice, adjust according to needs + return &AttestationSnapshots{Snapshots: snapshots} +} + +// SetSnapshot appends an attestation snapshot to the list of snapshots for a given aggregate report. +// `snapshot` is the attestation's snapshot. +func (b *AttestationSnapshots) SetSnapshot(snapshot []byte) { + b.Snapshots = append(b.Snapshots, snapshot) +} + +// Ensure AttestationSnapshots implements proto.Message +var _ proto.Message = &AttestationSnapshots{} + +// ProtoMessage is a no-op method to satisfy the proto.Message interface +func (*AttestationSnapshots) ProtoMessage() {} + +// Reset is a no-op method to satisfy the proto.Message interface +func (*AttestationSnapshots) Reset() {} + +// String returns a string representation, satisfying the proto.Message interface +func (m *AttestationSnapshots) String() string { + return proto.CompactTextString(m) +} diff --git a/x/bridge/types/checkpoint_idx.go b/x/bridge/types/checkpoint_idx.go index 984d2b839..2d7609701 100644 --- a/x/bridge/types/checkpoint_idx.go +++ b/x/bridge/types/checkpoint_idx.go @@ -6,7 +6,7 @@ import ( // CheckpointIdx wraps a uint64 to be used with the codec type CheckpointIdx struct { - Index uint64 `protobuf:"varint,1,opt,name=timestamp,proto3"` + Index uint64 `protobuf:"varint,1,opt,name=index,proto3"` } // Ensure CheckpointIdx implements proto.Message diff --git a/x/bridge/types/expected_keepers.go b/x/bridge/types/expected_keepers.go index c343e8c6d..55dc3393a 100644 --- a/x/bridge/types/expected_keepers.go +++ b/x/bridge/types/expected_keepers.go @@ -35,4 +35,7 @@ type BankKeeper interface { type OracleKeeper interface { GetCurrentAggregateReport(ctx sdk.Context, queryId []byte) (aggregate *oracletypes.Aggregate, timestamp time.Time) GetAggregateBefore(ctx sdk.Context, queryId []byte, timestampBefore time.Time) (aggregate *oracletypes.Aggregate, timestamp time.Time, err error) + GetAggregateByTimestamp(ctx sdk.Context, queryId []byte, timestamp time.Time) (aggregate *oracletypes.Aggregate, err error) + GetTimestampBefore(ctx sdk.Context, queryId []byte, timestamp time.Time) (time.Time, error) + GetTimestampAfter(ctx sdk.Context, queryId []byte, timestamp time.Time) (time.Time, error) } diff --git a/x/bridge/types/keys.go b/x/bridge/types/keys.go index ee5703e8b..60487dfc1 100644 --- a/x/bridge/types/keys.go +++ b/x/bridge/types/keys.go @@ -28,4 +28,7 @@ var ( OracleAttestationsMapKey = collections.NewPrefix(8) // Prefix for oracle_attestations_map key BridgeValsetByTimestampMapKey = collections.NewPrefix(9) // Prefix for bridge_valset_by_timestamp_map key ValsetTimestampToIdxMapKey = collections.NewPrefix(10) // Prefix for valset_timestamp_to_idx_map key + AttestSnapshotsByReportMapKey = collections.NewPrefix(11) // Prefix for attest_snapshots_by_report_map key + AttestSnapshotDataMapKey = collections.NewPrefix(12) // Prefix for attest_snapshot_data_map key + SnapshotToAttestationsMapKey = collections.NewPrefix(13) // Prefix for snapshot_to_attestations_map key ) diff --git a/x/oracle/keeper/aggregate.go b/x/oracle/keeper/aggregate.go index be43eb5a2..d41248512 100644 --- a/x/oracle/keeper/aggregate.go +++ b/x/oracle/keeper/aggregate.go @@ -253,3 +253,29 @@ func (k Keeper) GetAggregateBefore(ctx sdk.Context, queryId []byte, timestampBef timestamp = time.Unix(mostRecentTimestamp, 0) return mostRecent, timestamp, nil } + +func (k Keeper) GetAggregateByTimestamp(ctx sdk.Context, queryId []byte, timestamp time.Time) (aggregate *types.Aggregate, err error) { + timestampUnix := timestamp.Unix() + + // Create a range that specifically targets the exact timestamp + rng := collections.NewPrefixedPairRange[[]byte, int64](queryId).StartInclusive(timestampUnix).EndInclusive(timestampUnix) + + // Walk through the aggregates to find the one that exactly matches the timestamp + err = k.Aggregates.Walk(ctx, rng, func(key collections.Pair[[]byte, int64], value types.Aggregate) (stop bool, err error) { + if key.K2() == timestampUnix { + aggregate = &value + return true, nil // Stop when the exact match is found + } + return false, nil // Continue if this is not the exact match + }) + + if err != nil { + return nil, err + } + + if aggregate == nil { + return nil, fmt.Errorf("no aggregate report found at timestamp %v for query id %s", timestamp, hex.EncodeToString(queryId)) + } + + return aggregate, nil +} From 7bf129f15682110d829a5aae478864b63c7467d3 Mon Sep 17 00:00:00 2001 From: tkernell Date: Tue, 2 Apr 2024 08:52:05 -0500 Subject: [PATCH 07/18] auto snapshot new reports --- x/bridge/keeper/keeper.go | 46 +++++++++++++++++++-- x/bridge/module.go | 1 + x/bridge/types/attestation_snapshot_data.go | 6 +-- x/bridge/types/expected_keepers.go | 1 + 4 files changed, 48 insertions(+), 6 deletions(-) diff --git a/x/bridge/keeper/keeper.go b/x/bridge/keeper/keeper.go index dc927d76c..9be5889fc 100644 --- a/x/bridge/keeper/keeper.go +++ b/x/bridge/keeper/keeper.go @@ -880,12 +880,41 @@ func (k Keeper) GetValidatorDidSignCheckpoint(ctx sdk.Context, operatorAddr stri return false, -1, nil } +func (k Keeper) CreateNewReportSnapshots(ctx sdk.Context) error { + k.Logger(ctx).Info("@CreateNewReportSnapshots") + blockHeight := ctx.BlockHeight() - 1 + if blockHeight > 0 { + reports := k.oracleKeeper.GetAggregatedReportsByHeight(ctx, blockHeight) + for _, report := range reports { + queryId, err := hex.DecodeString(report.QueryId) + if err != nil { + return err + } + timeNow := time.Now().Add(time.Second) + reportTime, err := k.oracleKeeper.GetTimestampBefore(ctx, queryId, timeNow) + if err != nil { + return nil + } + err = k.CreateSnapshot(ctx, queryId, reportTime) + if err != nil { + return err + } + } + } + return nil +} + +// Called with each new agg report and with new request for optimistic attestations func (k Keeper) CreateSnapshot(ctx sdk.Context, queryId []byte, timestamp time.Time) error { + k.Logger(ctx).Info("@CreateSnapshot") + k.Logger(ctx).Info("getting agg report...") + // GetAggregateByTimestamp(ctx sdk.Context, queryId []byte, timestamp time.Time) (aggregate *types.Aggregate, err error) aggReport, err := k.oracleKeeper.GetAggregateByTimestamp(ctx, queryId, timestamp) if err != nil { k.Logger(ctx).Info("Error getting aggregate report by timestamp", "error", err) return err } + k.Logger(ctx).Info(("getting validator checkpoint...")) // get the current validator checkpoint validatorCheckpoint, err := k.GetValidatorCheckpointFromStorage(ctx) if err != nil { @@ -893,16 +922,19 @@ func (k Keeper) CreateSnapshot(ctx sdk.Context, queryId []byte, timestamp time.T return err } + k.Logger(ctx).Info("getting previous timestamp...") tsBefore, err := k.oracleKeeper.GetTimestampBefore(ctx, queryId, timestamp) if err != nil { tsBefore = time.Unix(0, 0) } + k.Logger(ctx).Info("getting next timestamp...") tsAfter, err := k.oracleKeeper.GetTimestampAfter(ctx, queryId, timestamp) if err != nil { tsAfter = time.Unix(0, 0) } + k.Logger(ctx).Info("encoding oracle attestation data...") snapshotBytes, err := k.EncodeOracleAttestationData( hex.EncodeToString(queryId), aggReport.AggregateValue, @@ -918,6 +950,7 @@ func (k Keeper) CreateSnapshot(ctx sdk.Context, queryId []byte, timestamp time.T return err } + k.Logger(ctx).Info("encoding attest snapshots by report map key...") // set snapshot by report key := hex.EncodeToString(crypto.Keccak256([]byte(hex.EncodeToString(queryId) + fmt.Sprint(timestamp.Unix())))) // check if map for this key exists, otherwise create a new map @@ -927,6 +960,7 @@ func (k Keeper) CreateSnapshot(ctx sdk.Context, queryId []byte, timestamp time.T return err } if !exists { + k.Logger(ctx).Info("attestation snapshots by report map does not exist, creating new map...") attestationSnapshots := types.NewAttestationSnapshots() err = k.AttestSnapshotsByReportMap.Set(ctx, key, *attestationSnapshots) if err != nil { @@ -939,6 +973,7 @@ func (k Keeper) CreateSnapshot(ctx sdk.Context, queryId []byte, timestamp time.T k.Logger(ctx).Info("Error getting attestation snapshots by report", "error", err) return err } + k.Logger(ctx).Info("setting snapshot by report...") // set the snapshot by report attestationSnapshots.SetSnapshot(snapshotBytes) err = k.AttestSnapshotsByReportMap.Set(ctx, key, attestationSnapshots) @@ -947,19 +982,22 @@ func (k Keeper) CreateSnapshot(ctx sdk.Context, queryId []byte, timestamp time.T return err } + k.Logger(ctx).Info("encoding snapshot to attestations map data...") // set snapshot to snapshot data map snapshotData := types.AttestationSnapshotData{ ValidatorCheckpoint: validatorCheckpoint.Checkpoint, - AttestationTimestamp: timestamp.Unix(), - PrevReportTimestamp: tsBefore.Unix(), - NextReportTimestamp: tsAfter.Unix(), + AttestationTimestamp: int64(timestamp.Unix()), + PrevReportTimestamp: int64(tsBefore.Unix()), + NextReportTimestamp: int64(tsAfter.Unix()), } + k.Logger(ctx).Info("setting snapshot data...") err = k.AttestSnapshotDataMap.Set(ctx, hex.EncodeToString(snapshotBytes), snapshotData) if err != nil { k.Logger(ctx).Info("Error setting attestation snapshot data", "error", err) return err } + k.Logger(ctx).Info("getting last saved valset...") // initialize snapshot to attestations map lastSavedBridgeValidators, err := k.BridgeValset.Get(ctx) if err != nil { @@ -968,11 +1006,13 @@ func (k Keeper) CreateSnapshot(ctx sdk.Context, queryId []byte, timestamp time.T } oracleAttestations := types.NewOracleAttestations(len(lastSavedBridgeValidators.BridgeValidatorSet)) // set the map + k.Logger(ctx).Info("setting snapshot to attestations map...") err = k.SnapshotToAttestationsMap.Set(ctx, hex.EncodeToString(snapshotBytes), *oracleAttestations) if err != nil { k.Logger(ctx).Info("Error setting snapshot to attestations map", "error", err) return err } + k.Logger(ctx).Info("Snapshot created", "queryId", hex.EncodeToString(queryId), "timestamp", timestamp.Unix(), "snapshot", hex.EncodeToString(snapshotBytes)) return nil } diff --git a/x/bridge/module.go b/x/bridge/module.go index decd746bd..0ecd6391a 100644 --- a/x/bridge/module.go +++ b/x/bridge/module.go @@ -152,5 +152,6 @@ func (AppModule) ConsensusVersion() uint64 { return 1 } func (am AppModule) EndBlock(ctx context.Context) error { sdkCtx := sdk.UnwrapSDKContext(ctx) am.keeper.CompareBridgeValidators(sdkCtx) + am.keeper.CreateNewReportSnapshots(sdkCtx) return nil } diff --git a/x/bridge/types/attestation_snapshot_data.go b/x/bridge/types/attestation_snapshot_data.go index 1de9aff66..0a07eecc3 100644 --- a/x/bridge/types/attestation_snapshot_data.go +++ b/x/bridge/types/attestation_snapshot_data.go @@ -8,9 +8,9 @@ import ( // Each attestation's snapshots are stored in a slice of bytes. type AttestationSnapshotData struct { ValidatorCheckpoint []byte `protobuf:"bytes,1,rep,name=validator_checkpoint,proto3"` - AttestationTimestamp int64 `protobuf:"int64,2,rep,name=attestation_timestamp,proto3"` - PrevReportTimestamp int64 `protobuf:"int64,3,rep,name=prev_report_timestamp,proto3"` - NextReportTimestamp int64 `protobuf:"int64,4,rep,name=next_report_timestamp,proto3"` + AttestationTimestamp int64 `protobuf:"varint,2,rep,name=attestation_timestamp,proto3"` + PrevReportTimestamp int64 `protobuf:"varint,3,rep,name=prev_report_timestamp,proto3"` + NextReportTimestamp int64 `protobuf:"varint,4,rep,name=next_report_timestamp,proto3"` } // Ensure AttestationSnapshotData implements proto.Message diff --git a/x/bridge/types/expected_keepers.go b/x/bridge/types/expected_keepers.go index 55dc3393a..65f760bde 100644 --- a/x/bridge/types/expected_keepers.go +++ b/x/bridge/types/expected_keepers.go @@ -38,4 +38,5 @@ type OracleKeeper interface { GetAggregateByTimestamp(ctx sdk.Context, queryId []byte, timestamp time.Time) (aggregate *oracletypes.Aggregate, err error) GetTimestampBefore(ctx sdk.Context, queryId []byte, timestamp time.Time) (time.Time, error) GetTimestampAfter(ctx sdk.Context, queryId []byte, timestamp time.Time) (time.Time, error) + GetAggregatedReportsByHeight(ctx sdk.Context, height int64) []oracletypes.Aggregate } From e11401c6fe84599c6b87e16a276e209325e224a4 Mon Sep 17 00:00:00 2001 From: tkernell Date: Tue, 2 Apr 2024 12:08:44 -0500 Subject: [PATCH 08/18] add attestation request logic --- api/layer/bridge/tx.pulsar.go | 1106 ++++++++++++++++- api/layer/bridge/tx_grpc.pb.go | 36 + proto/layer/bridge/tx.proto | 13 +- x/bridge/client/cli/tx.go | 1 + .../client/cli/tx_request_attestations.go | 42 + x/bridge/keeper/keeper.go | 41 +- .../keeper/msg_server_request_attestations.go | 33 + x/bridge/types/attestation_requests.go | 36 + x/bridge/types/keys.go | 1 + .../types/message_request_attestations.go | 48 + x/bridge/types/tx.pb.go | 484 +++++++- 11 files changed, 1771 insertions(+), 70 deletions(-) create mode 100644 x/bridge/client/cli/tx_request_attestations.go create mode 100644 x/bridge/keeper/msg_server_request_attestations.go create mode 100644 x/bridge/types/attestation_requests.go create mode 100644 x/bridge/types/message_request_attestations.go diff --git a/api/layer/bridge/tx.pulsar.go b/api/layer/bridge/tx.pulsar.go index 8919293d6..6e0534938 100644 --- a/api/layer/bridge/tx.pulsar.go +++ b/api/layer/bridge/tx.pulsar.go @@ -2725,6 +2725,910 @@ func (x *fastReflection_MsgSubmitOracleAttestationResponse) ProtoMethods() *prot } } +var ( + md_MsgRequestAttestations protoreflect.MessageDescriptor + fd_MsgRequestAttestations_creator protoreflect.FieldDescriptor + fd_MsgRequestAttestations_queryId protoreflect.FieldDescriptor + fd_MsgRequestAttestations_timestamp protoreflect.FieldDescriptor +) + +func init() { + file_layer_bridge_tx_proto_init() + md_MsgRequestAttestations = File_layer_bridge_tx_proto.Messages().ByName("MsgRequestAttestations") + fd_MsgRequestAttestations_creator = md_MsgRequestAttestations.Fields().ByName("creator") + fd_MsgRequestAttestations_queryId = md_MsgRequestAttestations.Fields().ByName("queryId") + fd_MsgRequestAttestations_timestamp = md_MsgRequestAttestations.Fields().ByName("timestamp") +} + +var _ protoreflect.Message = (*fastReflection_MsgRequestAttestations)(nil) + +type fastReflection_MsgRequestAttestations MsgRequestAttestations + +func (x *MsgRequestAttestations) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgRequestAttestations)(x) +} + +func (x *MsgRequestAttestations) slowProtoReflect() protoreflect.Message { + mi := &file_layer_bridge_tx_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 _fastReflection_MsgRequestAttestations_messageType fastReflection_MsgRequestAttestations_messageType +var _ protoreflect.MessageType = fastReflection_MsgRequestAttestations_messageType{} + +type fastReflection_MsgRequestAttestations_messageType struct{} + +func (x fastReflection_MsgRequestAttestations_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgRequestAttestations)(nil) +} +func (x fastReflection_MsgRequestAttestations_messageType) New() protoreflect.Message { + return new(fastReflection_MsgRequestAttestations) +} +func (x fastReflection_MsgRequestAttestations_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRequestAttestations +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgRequestAttestations) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRequestAttestations +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgRequestAttestations) Type() protoreflect.MessageType { + return _fastReflection_MsgRequestAttestations_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgRequestAttestations) New() protoreflect.Message { + return new(fastReflection_MsgRequestAttestations) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgRequestAttestations) Interface() protoreflect.ProtoMessage { + return (*MsgRequestAttestations)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgRequestAttestations) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Creator != "" { + value := protoreflect.ValueOfString(x.Creator) + if !f(fd_MsgRequestAttestations_creator, value) { + return + } + } + if x.QueryId != "" { + value := protoreflect.ValueOfString(x.QueryId) + if !f(fd_MsgRequestAttestations_queryId, value) { + return + } + } + if x.Timestamp != "" { + value := protoreflect.ValueOfString(x.Timestamp) + if !f(fd_MsgRequestAttestations_timestamp, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgRequestAttestations) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "layer.bridge.MsgRequestAttestations.creator": + return x.Creator != "" + case "layer.bridge.MsgRequestAttestations.queryId": + return x.QueryId != "" + case "layer.bridge.MsgRequestAttestations.timestamp": + return x.Timestamp != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgRequestAttestations")) + } + panic(fmt.Errorf("message layer.bridge.MsgRequestAttestations does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRequestAttestations) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "layer.bridge.MsgRequestAttestations.creator": + x.Creator = "" + case "layer.bridge.MsgRequestAttestations.queryId": + x.QueryId = "" + case "layer.bridge.MsgRequestAttestations.timestamp": + x.Timestamp = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgRequestAttestations")) + } + panic(fmt.Errorf("message layer.bridge.MsgRequestAttestations does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgRequestAttestations) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "layer.bridge.MsgRequestAttestations.creator": + value := x.Creator + return protoreflect.ValueOfString(value) + case "layer.bridge.MsgRequestAttestations.queryId": + value := x.QueryId + return protoreflect.ValueOfString(value) + case "layer.bridge.MsgRequestAttestations.timestamp": + value := x.Timestamp + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgRequestAttestations")) + } + panic(fmt.Errorf("message layer.bridge.MsgRequestAttestations does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRequestAttestations) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "layer.bridge.MsgRequestAttestations.creator": + x.Creator = value.Interface().(string) + case "layer.bridge.MsgRequestAttestations.queryId": + x.QueryId = value.Interface().(string) + case "layer.bridge.MsgRequestAttestations.timestamp": + x.Timestamp = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgRequestAttestations")) + } + panic(fmt.Errorf("message layer.bridge.MsgRequestAttestations does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRequestAttestations) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "layer.bridge.MsgRequestAttestations.creator": + panic(fmt.Errorf("field creator of message layer.bridge.MsgRequestAttestations is not mutable")) + case "layer.bridge.MsgRequestAttestations.queryId": + panic(fmt.Errorf("field queryId of message layer.bridge.MsgRequestAttestations is not mutable")) + case "layer.bridge.MsgRequestAttestations.timestamp": + panic(fmt.Errorf("field timestamp of message layer.bridge.MsgRequestAttestations is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgRequestAttestations")) + } + panic(fmt.Errorf("message layer.bridge.MsgRequestAttestations does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgRequestAttestations) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "layer.bridge.MsgRequestAttestations.creator": + return protoreflect.ValueOfString("") + case "layer.bridge.MsgRequestAttestations.queryId": + return protoreflect.ValueOfString("") + case "layer.bridge.MsgRequestAttestations.timestamp": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgRequestAttestations")) + } + panic(fmt.Errorf("message layer.bridge.MsgRequestAttestations does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgRequestAttestations) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in layer.bridge.MsgRequestAttestations", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgRequestAttestations) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRequestAttestations) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgRequestAttestations) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgRequestAttestations) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgRequestAttestations) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Creator) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.QueryId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Timestamp) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgRequestAttestations) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Timestamp) > 0 { + i -= len(x.Timestamp) + copy(dAtA[i:], x.Timestamp) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Timestamp))) + i-- + dAtA[i] = 0x1a + } + if len(x.QueryId) > 0 { + i -= len(x.QueryId) + copy(dAtA[i:], x.QueryId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.QueryId))) + i-- + dAtA[i] = 0x12 + } + if len(x.Creator) > 0 { + i -= len(x.Creator) + copy(dAtA[i:], x.Creator) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgRequestAttestations) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRequestAttestations: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRequestAttestations: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field QueryId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.QueryId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Timestamp = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgRequestAttestationsResponse protoreflect.MessageDescriptor +) + +func init() { + file_layer_bridge_tx_proto_init() + md_MsgRequestAttestationsResponse = File_layer_bridge_tx_proto.Messages().ByName("MsgRequestAttestationsResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgRequestAttestationsResponse)(nil) + +type fastReflection_MsgRequestAttestationsResponse MsgRequestAttestationsResponse + +func (x *MsgRequestAttestationsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgRequestAttestationsResponse)(x) +} + +func (x *MsgRequestAttestationsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_layer_bridge_tx_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 _fastReflection_MsgRequestAttestationsResponse_messageType fastReflection_MsgRequestAttestationsResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgRequestAttestationsResponse_messageType{} + +type fastReflection_MsgRequestAttestationsResponse_messageType struct{} + +func (x fastReflection_MsgRequestAttestationsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgRequestAttestationsResponse)(nil) +} +func (x fastReflection_MsgRequestAttestationsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgRequestAttestationsResponse) +} +func (x fastReflection_MsgRequestAttestationsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRequestAttestationsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgRequestAttestationsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRequestAttestationsResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgRequestAttestationsResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgRequestAttestationsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgRequestAttestationsResponse) New() protoreflect.Message { + return new(fastReflection_MsgRequestAttestationsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgRequestAttestationsResponse) Interface() protoreflect.ProtoMessage { + return (*MsgRequestAttestationsResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgRequestAttestationsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgRequestAttestationsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgRequestAttestationsResponse")) + } + panic(fmt.Errorf("message layer.bridge.MsgRequestAttestationsResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRequestAttestationsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgRequestAttestationsResponse")) + } + panic(fmt.Errorf("message layer.bridge.MsgRequestAttestationsResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgRequestAttestationsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgRequestAttestationsResponse")) + } + panic(fmt.Errorf("message layer.bridge.MsgRequestAttestationsResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRequestAttestationsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgRequestAttestationsResponse")) + } + panic(fmt.Errorf("message layer.bridge.MsgRequestAttestationsResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRequestAttestationsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgRequestAttestationsResponse")) + } + panic(fmt.Errorf("message layer.bridge.MsgRequestAttestationsResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgRequestAttestationsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgRequestAttestationsResponse")) + } + panic(fmt.Errorf("message layer.bridge.MsgRequestAttestationsResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgRequestAttestationsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in layer.bridge.MsgRequestAttestationsResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgRequestAttestationsResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRequestAttestationsResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgRequestAttestationsResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgRequestAttestationsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgRequestAttestationsResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgRequestAttestationsResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgRequestAttestationsResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRequestAttestationsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRequestAttestationsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 @@ -2969,6 +3873,83 @@ func (*MsgSubmitOracleAttestationResponse) Descriptor() ([]byte, []int) { return file_layer_bridge_tx_proto_rawDescGZIP(), []int{5} } +type MsgRequestAttestations struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + QueryId string `protobuf:"bytes,2,opt,name=queryId,proto3" json:"queryId,omitempty"` + Timestamp string `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (x *MsgRequestAttestations) Reset() { + *x = MsgRequestAttestations{} + if protoimpl.UnsafeEnabled { + mi := &file_layer_bridge_tx_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgRequestAttestations) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgRequestAttestations) ProtoMessage() {} + +// Deprecated: Use MsgRequestAttestations.ProtoReflect.Descriptor instead. +func (*MsgRequestAttestations) Descriptor() ([]byte, []int) { + return file_layer_bridge_tx_proto_rawDescGZIP(), []int{6} +} + +func (x *MsgRequestAttestations) GetCreator() string { + if x != nil { + return x.Creator + } + return "" +} + +func (x *MsgRequestAttestations) GetQueryId() string { + if x != nil { + return x.QueryId + } + return "" +} + +func (x *MsgRequestAttestations) GetTimestamp() string { + if x != nil { + return x.Timestamp + } + return "" +} + +type MsgRequestAttestationsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgRequestAttestationsResponse) Reset() { + *x = MsgRequestAttestationsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_layer_bridge_tx_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgRequestAttestationsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgRequestAttestationsResponse) ProtoMessage() {} + +// Deprecated: Use MsgRequestAttestationsResponse.ProtoReflect.Descriptor instead. +func (*MsgRequestAttestationsResponse) Descriptor() ([]byte, []int) { + return file_layer_bridge_tx_proto_rawDescGZIP(), []int{7} +} + var File_layer_bridge_tx_proto protoreflect.FileDescriptor var file_layer_bridge_tx_proto_rawDesc = []byte{ @@ -3008,40 +3989,57 @@ var file_layer_bridge_tx_proto_rawDesc = []byte{ 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x24, 0x0a, 0x22, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xf4, 0x02, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x72, 0x0a, 0x16, - 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, - 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x27, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, - 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, - 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x1a, - 0x2f, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x4d, - 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, - 0x6f, 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x81, 0x01, 0x0a, 0x1b, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x72, 0x69, 0x64, 0x67, - 0x65, 0x56, 0x61, 0x6c, 0x73, 0x65, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x12, 0x2c, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, - 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x56, - 0x61, 0x6c, 0x73, 0x65, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x34, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x78, 0x0a, 0x16, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x18, + 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x20, + 0x0a, 0x1e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x74, 0x74, 0x65, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x32, 0xdf, 0x03, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x72, 0x0a, 0x16, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x75, 0x62, 0x6b, + 0x65, 0x79, 0x12, 0x27, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, + 0x65, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x1a, 0x2f, 0x2e, 0x6c, 0x61, + 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x75, + 0x62, 0x6b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x81, 0x01, 0x0a, + 0x1b, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x56, 0x61, 0x6c, + 0x73, 0x65, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x2c, 0x2e, 0x6c, + 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x4d, 0x73, 0x67, 0x53, + 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x56, 0x61, 0x6c, 0x73, 0x65, + 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x34, 0x2e, 0x6c, 0x61, 0x79, + 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, + 0x6d, 0x69, 0x74, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x56, 0x61, 0x6c, 0x73, 0x65, 0x74, 0x53, + 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x75, 0x0a, 0x17, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, + 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x2e, 0x6c, 0x61, + 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, + 0x62, 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x30, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, + 0x69, 0x64, 0x67, 0x65, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4f, 0x72, + 0x61, 0x63, 0x6c, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x69, 0x0a, 0x13, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x24, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x4d, 0x73, - 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x56, 0x61, 0x6c, - 0x73, 0x65, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x75, 0x0a, 0x17, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4f, 0x72, - 0x61, 0x63, 0x6c, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x28, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x4d, - 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x41, 0x74, - 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x30, 0x2e, 0x6c, 0x61, 0x79, 0x65, - 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, - 0x69, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x99, 0x01, 0x0a, 0x10, - 0x63, 0x6f, 0x6d, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, - 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x65, 0x6c, 0x6c, 0x6f, 0x72, 0x2d, 0x69, - 0x6f, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6c, 0x61, 0x79, 0x65, - 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0xa2, 0x02, 0x03, 0x4c, 0x42, 0x58, 0xaa, 0x02, - 0x0c, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0xca, 0x02, 0x0c, - 0x4c, 0x61, 0x79, 0x65, 0x72, 0x5c, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0xe2, 0x02, 0x18, 0x4c, - 0x61, 0x79, 0x65, 0x72, 0x5c, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x3a, - 0x3a, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x2c, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, + 0x64, 0x67, 0x65, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x74, + 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x42, 0x99, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, + 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, + 0x65, 0x6c, 0x6c, 0x6f, 0x72, 0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0xa2, + 0x02, 0x03, 0x4c, 0x42, 0x58, 0xaa, 0x02, 0x0c, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x42, 0x72, + 0x69, 0x64, 0x67, 0x65, 0xca, 0x02, 0x0c, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x5c, 0x42, 0x72, 0x69, + 0x64, 0x67, 0x65, 0xe2, 0x02, 0x18, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x5c, 0x42, 0x72, 0x69, 0x64, + 0x67, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x0d, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x3a, 0x3a, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3056,7 +4054,7 @@ func file_layer_bridge_tx_proto_rawDescGZIP() []byte { return file_layer_bridge_tx_proto_rawDescData } -var file_layer_bridge_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_layer_bridge_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_layer_bridge_tx_proto_goTypes = []interface{}{ (*MsgRegisterOperatorPubkey)(nil), // 0: layer.bridge.MsgRegisterOperatorPubkey (*MsgRegisterOperatorPubkeyResponse)(nil), // 1: layer.bridge.MsgRegisterOperatorPubkeyResponse @@ -3064,16 +4062,20 @@ var file_layer_bridge_tx_proto_goTypes = []interface{}{ (*MsgSubmitBridgeValsetSignatureResponse)(nil), // 3: layer.bridge.MsgSubmitBridgeValsetSignatureResponse (*MsgSubmitOracleAttestation)(nil), // 4: layer.bridge.MsgSubmitOracleAttestation (*MsgSubmitOracleAttestationResponse)(nil), // 5: layer.bridge.MsgSubmitOracleAttestationResponse + (*MsgRequestAttestations)(nil), // 6: layer.bridge.MsgRequestAttestations + (*MsgRequestAttestationsResponse)(nil), // 7: layer.bridge.MsgRequestAttestationsResponse } var file_layer_bridge_tx_proto_depIdxs = []int32{ 0, // 0: layer.bridge.Msg.RegisterOperatorPubkey:input_type -> layer.bridge.MsgRegisterOperatorPubkey 2, // 1: layer.bridge.Msg.SubmitBridgeValsetSignature:input_type -> layer.bridge.MsgSubmitBridgeValsetSignature 4, // 2: layer.bridge.Msg.SubmitOracleAttestation:input_type -> layer.bridge.MsgSubmitOracleAttestation - 1, // 3: layer.bridge.Msg.RegisterOperatorPubkey:output_type -> layer.bridge.MsgRegisterOperatorPubkeyResponse - 3, // 4: layer.bridge.Msg.SubmitBridgeValsetSignature:output_type -> layer.bridge.MsgSubmitBridgeValsetSignatureResponse - 5, // 5: layer.bridge.Msg.SubmitOracleAttestation:output_type -> layer.bridge.MsgSubmitOracleAttestationResponse - 3, // [3:6] is the sub-list for method output_type - 0, // [0:3] is the sub-list for method input_type + 6, // 3: layer.bridge.Msg.RequestAttestations:input_type -> layer.bridge.MsgRequestAttestations + 1, // 4: layer.bridge.Msg.RegisterOperatorPubkey:output_type -> layer.bridge.MsgRegisterOperatorPubkeyResponse + 3, // 5: layer.bridge.Msg.SubmitBridgeValsetSignature:output_type -> layer.bridge.MsgSubmitBridgeValsetSignatureResponse + 5, // 6: layer.bridge.Msg.SubmitOracleAttestation:output_type -> layer.bridge.MsgSubmitOracleAttestationResponse + 7, // 7: layer.bridge.Msg.RequestAttestations:output_type -> layer.bridge.MsgRequestAttestationsResponse + 4, // [4:8] is the sub-list for method output_type + 0, // [0:4] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name @@ -3157,6 +4159,30 @@ func file_layer_bridge_tx_proto_init() { return nil } } + file_layer_bridge_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgRequestAttestations); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_layer_bridge_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgRequestAttestationsResponse); 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{ @@ -3164,7 +4190,7 @@ func file_layer_bridge_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_layer_bridge_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 8, NumExtensions: 0, NumServices: 1, }, diff --git a/api/layer/bridge/tx_grpc.pb.go b/api/layer/bridge/tx_grpc.pb.go index 5ab4e16d4..726d0dc56 100644 --- a/api/layer/bridge/tx_grpc.pb.go +++ b/api/layer/bridge/tx_grpc.pb.go @@ -21,6 +21,7 @@ type MsgClient interface { RegisterOperatorPubkey(ctx context.Context, in *MsgRegisterOperatorPubkey, opts ...grpc.CallOption) (*MsgRegisterOperatorPubkeyResponse, error) SubmitBridgeValsetSignature(ctx context.Context, in *MsgSubmitBridgeValsetSignature, opts ...grpc.CallOption) (*MsgSubmitBridgeValsetSignatureResponse, error) SubmitOracleAttestation(ctx context.Context, in *MsgSubmitOracleAttestation, opts ...grpc.CallOption) (*MsgSubmitOracleAttestationResponse, error) + RequestAttestations(ctx context.Context, in *MsgRequestAttestations, opts ...grpc.CallOption) (*MsgRequestAttestationsResponse, error) } type msgClient struct { @@ -58,6 +59,15 @@ func (c *msgClient) SubmitOracleAttestation(ctx context.Context, in *MsgSubmitOr return out, nil } +func (c *msgClient) RequestAttestations(ctx context.Context, in *MsgRequestAttestations, opts ...grpc.CallOption) (*MsgRequestAttestationsResponse, error) { + out := new(MsgRequestAttestationsResponse) + err := c.cc.Invoke(ctx, "/layer.bridge.Msg/RequestAttestations", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. // All implementations must embed UnimplementedMsgServer // for forward compatibility @@ -65,6 +75,7 @@ type MsgServer interface { RegisterOperatorPubkey(context.Context, *MsgRegisterOperatorPubkey) (*MsgRegisterOperatorPubkeyResponse, error) SubmitBridgeValsetSignature(context.Context, *MsgSubmitBridgeValsetSignature) (*MsgSubmitBridgeValsetSignatureResponse, error) SubmitOracleAttestation(context.Context, *MsgSubmitOracleAttestation) (*MsgSubmitOracleAttestationResponse, error) + RequestAttestations(context.Context, *MsgRequestAttestations) (*MsgRequestAttestationsResponse, error) mustEmbedUnimplementedMsgServer() } @@ -81,6 +92,9 @@ func (UnimplementedMsgServer) SubmitBridgeValsetSignature(context.Context, *MsgS func (UnimplementedMsgServer) SubmitOracleAttestation(context.Context, *MsgSubmitOracleAttestation) (*MsgSubmitOracleAttestationResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SubmitOracleAttestation not implemented") } +func (UnimplementedMsgServer) RequestAttestations(context.Context, *MsgRequestAttestations) (*MsgRequestAttestationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RequestAttestations not implemented") +} func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. @@ -148,6 +162,24 @@ func _Msg_SubmitOracleAttestation_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _Msg_RequestAttestations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRequestAttestations) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).RequestAttestations(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/layer.bridge.Msg/RequestAttestations", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RequestAttestations(ctx, req.(*MsgRequestAttestations)) + } + return interceptor(ctx, in, info, handler) +} + // Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -167,6 +199,10 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "SubmitOracleAttestation", Handler: _Msg_SubmitOracleAttestation_Handler, }, + { + MethodName: "RequestAttestations", + Handler: _Msg_RequestAttestations_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "layer/bridge/tx.proto", diff --git a/proto/layer/bridge/tx.proto b/proto/layer/bridge/tx.proto index e67808dfc..f17203c8a 100644 --- a/proto/layer/bridge/tx.proto +++ b/proto/layer/bridge/tx.proto @@ -9,6 +9,7 @@ service Msg { rpc RegisterOperatorPubkey (MsgRegisterOperatorPubkey) returns (MsgRegisterOperatorPubkeyResponse); rpc SubmitBridgeValsetSignature (MsgSubmitBridgeValsetSignature) returns (MsgSubmitBridgeValsetSignatureResponse); rpc SubmitOracleAttestation (MsgSubmitOracleAttestation) returns (MsgSubmitOracleAttestationResponse); + rpc RequestAttestations (MsgRequestAttestations) returns (MsgRequestAttestationsResponse); } message MsgRegisterOperatorPubkey { @@ -39,4 +40,14 @@ message MsgSubmitOracleAttestation { string signature = 4; } -message MsgSubmitOracleAttestationResponse {} \ No newline at end of file +message MsgSubmitOracleAttestationResponse {} + +message MsgRequestAttestations { + option (cosmos.msg.v1.signer) = "creator"; + + string creator = 1; + string queryId = 2; + string timestamp = 3; +} + +message MsgRequestAttestationsResponse {} diff --git a/x/bridge/client/cli/tx.go b/x/bridge/client/cli/tx.go index 4809f2093..3910c1978 100644 --- a/x/bridge/client/cli/tx.go +++ b/x/bridge/client/cli/tx.go @@ -34,5 +34,6 @@ func GetTxCmd() *cobra.Command { cmd.AddCommand(CmdRegisterOperatorPubkey()) cmd.AddCommand(CmdSubmitBridgeValsetSignature()) cmd.AddCommand(CmdSubmitOracleAttestation()) + cmd.AddCommand(CmdRequestAttestations()) return cmd } diff --git a/x/bridge/client/cli/tx_request_attestations.go b/x/bridge/client/cli/tx_request_attestations.go new file mode 100644 index 000000000..f4e2b4327 --- /dev/null +++ b/x/bridge/client/cli/tx_request_attestations.go @@ -0,0 +1,42 @@ +package cli + +import ( + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/client/tx" + "github.com/spf13/cobra" + "github.com/tellor-io/layer/x/bridge/types" +) + +// CmdRequestAttestations creates a CLI command for MsgRequestAttestations. +func CmdRequestAttestations() *cobra.Command { + cmd := &cobra.Command{ + Use: "request-attestations [queryId] [timestamp]", + Short: "Request attestations for a given queryId and timestamp", + Args: cobra.ExactArgs(2), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + queryId := args[0] + timestamp := args[1] + + msg := types.NewMsgRequestAttestations( + clientCtx.GetFromAddress().String(), + queryId, + timestamp, + ) + if err := msg.ValidateBasic(); err != nil { + return err + } + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} diff --git a/x/bridge/keeper/keeper.go b/x/bridge/keeper/keeper.go index 9be5889fc..29dc3942b 100644 --- a/x/bridge/keeper/keeper.go +++ b/x/bridge/keeper/keeper.go @@ -48,6 +48,7 @@ type ( AttestSnapshotsByReportMap collections.Map[string, types.AttestationSnapshots] AttestSnapshotDataMap collections.Map[string, types.AttestationSnapshotData] SnapshotToAttestationsMap collections.Map[string, types.OracleAttestations] + AttestRequestsByHeightMap collections.Map[uint64, types.AttestationRequests] stakingKeeper types.StakingKeeper slashingKeeper types.SlashingKeeper @@ -80,6 +81,7 @@ func NewKeeper( AttestSnapshotsByReportMap: collections.NewMap(sb, types.AttestSnapshotsByReportMapKey, "attest_snapshots_by_report_map", collections.StringKey, codec.CollValue[types.AttestationSnapshots](cdc)), AttestSnapshotDataMap: collections.NewMap(sb, types.AttestSnapshotDataMapKey, "attest_snapshot_data_map", collections.StringKey, codec.CollValue[types.AttestationSnapshotData](cdc)), SnapshotToAttestationsMap: collections.NewMap(sb, types.SnapshotToAttestationsMapKey, "snapshot_to_attestations_map", collections.StringKey, codec.CollValue[types.OracleAttestations](cdc)), + AttestRequestsByHeightMap: collections.NewMap(sb, types.AttestRequestsByHeightMapKey, "attest_requests_by_height_map", collections.Uint64Key, codec.CollValue[types.AttestationRequests](cdc)), stakingKeeper: stakingKeeper, slashingKeeper: slashingKeeper, @@ -1012,8 +1014,34 @@ func (k Keeper) CreateSnapshot(ctx sdk.Context, queryId []byte, timestamp time.T k.Logger(ctx).Info("Error setting snapshot to attestations map", "error", err) return err } - k.Logger(ctx).Info("Snapshot created", "queryId", hex.EncodeToString(queryId), "timestamp", timestamp.Unix(), "snapshot", hex.EncodeToString(snapshotBytes)) - return nil + + // add to attestation requests + blockHeight := uint64(ctx.BlockHeight()) + exists, err = k.AttestRequestsByHeightMap.Has(ctx, blockHeight) + if err != nil { + k.Logger(ctx).Info("Error checking if attestation requests by height map exists", "error", err) + return err + } + if !exists { + attestRequests := types.AttestationRequests{} + err = k.AttestRequestsByHeightMap.Set(ctx, blockHeight, attestRequests) + if err != nil { + k.Logger(ctx).Info("Error setting attestation requests by height", "error", err) + return err + } + } + attestRequests, err := k.AttestRequestsByHeightMap.Get(ctx, blockHeight) + if err != nil { + k.Logger(ctx).Info("Error getting attestation requests by height", "error", err) + return err + } + request := types.AttestationRequest{ + Snapshot: snapshotBytes, + QueryId: queryId, + Timestamp: uint64(timestamp.Unix()), + } + attestRequests.AddRequest(&request) + return k.AttestRequestsByHeightMap.Set(ctx, blockHeight, attestRequests) } func (k Keeper) EncodeOracleAttestationData( @@ -1123,3 +1151,12 @@ func (k Keeper) EncodeOracleAttestationData( oracleAttestationHash := crypto.Keccak256(encodedData) return oracleAttestationHash, nil } + +func (k Keeper) GetAttestationRequestsByHeight(ctx sdk.Context, height uint64) (*types.AttestationRequests, error) { + attestRequests, err := k.AttestRequestsByHeightMap.Get(ctx, height) + if err != nil { + k.Logger(ctx).Info("Error getting attestation requests by height", "error", err) + return nil, err + } + return &attestRequests, nil +} diff --git a/x/bridge/keeper/msg_server_request_attestations.go b/x/bridge/keeper/msg_server_request_attestations.go new file mode 100644 index 000000000..36e49bacd --- /dev/null +++ b/x/bridge/keeper/msg_server_request_attestations.go @@ -0,0 +1,33 @@ +package keeper + +import ( + "context" + "encoding/hex" + "strconv" + "time" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/tellor-io/layer/x/bridge/types" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +func (k msgServer) RequestAttestations(ctx context.Context, msg *types.MsgRequestAttestations) (*types.MsgRequestAttestationsResponse, error) { + sdkCtx := sdk.UnwrapSDKContext(ctx) + + queryId, err := hex.DecodeString(msg.QueryId) + if err != nil { + k.Keeper.Logger(sdkCtx).Error("failed to decode query id", "error", err) + return nil, status.Error(codes.InvalidArgument, err.Error()) + } + + timestampInt, err := strconv.ParseUint(msg.Timestamp, 10, 64) + if err != nil { + k.Keeper.Logger(sdkCtx).Error("failed to parse timestamp", "error", err) + return nil, status.Error(codes.InvalidArgument, err.Error()) + } + timestamp := time.Unix(int64(timestampInt), 0) + k.Keeper.CreateSnapshot(sdkCtx, queryId, timestamp) + + return &types.MsgRequestAttestationsResponse{}, nil +} diff --git a/x/bridge/types/attestation_requests.go b/x/bridge/types/attestation_requests.go new file mode 100644 index 000000000..543d68ee6 --- /dev/null +++ b/x/bridge/types/attestation_requests.go @@ -0,0 +1,36 @@ +package types + +import ( + "github.com/gogo/protobuf/proto" +) + +type AttestationRequest struct { + Snapshot []byte `protobuf:"bytes,1,opt,name=snapshot,proto3"` + QueryId []byte `protobuf:"bytes,2,opt,name=query_id,proto3"` + Timestamp uint64 `protobuf:"varint,3,opt,name=timestamp,proto3"` +} + +// AttestationRequests holds requests for attestations. +type AttestationRequests struct { + Requests []*AttestationRequest `protobuf:"bytes,1,rep,name=requests,proto3"` +} + +// AddRequest adds a request for an attestation to the list of requests. +// `request` is the request for an attestation. +func (b *AttestationRequests) AddRequest(request *AttestationRequest) { + b.Requests = append(b.Requests, request) +} + +// Ensure OracleAttestations implements proto.Message +var _ proto.Message = &AttestationRequests{} + +// ProtoMessage is a no-op method to satisfy the proto.Message interface +func (*AttestationRequests) ProtoMessage() {} + +// Reset is a no-op method to satisfy the proto.Message interface +func (*AttestationRequests) Reset() {} + +// String returns a string representation, satisfying the proto.Message interface +func (m *AttestationRequests) String() string { + return proto.CompactTextString(m) +} diff --git a/x/bridge/types/keys.go b/x/bridge/types/keys.go index 60487dfc1..4ee297d2b 100644 --- a/x/bridge/types/keys.go +++ b/x/bridge/types/keys.go @@ -31,4 +31,5 @@ var ( AttestSnapshotsByReportMapKey = collections.NewPrefix(11) // Prefix for attest_snapshots_by_report_map key AttestSnapshotDataMapKey = collections.NewPrefix(12) // Prefix for attest_snapshot_data_map key SnapshotToAttestationsMapKey = collections.NewPrefix(13) // Prefix for snapshot_to_attestations_map key + AttestRequestsByHeightMapKey = collections.NewPrefix(14) // Prefix for attest_requests_by_height_map key ) diff --git a/x/bridge/types/message_request_attestations.go b/x/bridge/types/message_request_attestations.go new file mode 100644 index 000000000..44fbbd5b5 --- /dev/null +++ b/x/bridge/types/message_request_attestations.go @@ -0,0 +1,48 @@ +package types + +import ( + errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +const TypeMsgRequestAttestations = "request_attestations" + +var _ sdk.Msg = &MsgRequestAttestations{} + +func NewMsgRequestAttestations(creator string, queryId string, timestamp string) *MsgRequestAttestations { + return &MsgRequestAttestations{ + Creator: creator, + QueryId: queryId, + Timestamp: timestamp, + } +} + +func (msg *MsgRequestAttestations) Route() string { + return RouterKey +} + +func (msg *MsgRequestAttestations) Type() string { + return TypeMsgRequestAttestations +} + +func (msg *MsgRequestAttestations) GetSigners() []sdk.AccAddress { + creator, err := sdk.AccAddressFromBech32(msg.Creator) + if err != nil { + panic(err) + } + return []sdk.AccAddress{creator} +} + +func (msg *MsgRequestAttestations) GetSignBytes() []byte { + bz := ModuleCdc.MustMarshalJSON(msg) + return sdk.MustSortJSON(bz) +} + +func (msg *MsgRequestAttestations) ValidateBasic() error { + _, err := sdk.AccAddressFromBech32(msg.Creator) + if err != nil { + return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) + } + return nil +} diff --git a/x/bridge/types/tx.pb.go b/x/bridge/types/tx.pb.go index 0ffee78de..ed90e83bd 100644 --- a/x/bridge/types/tx.pb.go +++ b/x/bridge/types/tx.pb.go @@ -318,6 +318,102 @@ func (m *MsgSubmitOracleAttestationResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgSubmitOracleAttestationResponse proto.InternalMessageInfo +type MsgRequestAttestations struct { + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + QueryId string `protobuf:"bytes,2,opt,name=queryId,proto3" json:"queryId,omitempty"` + Timestamp string `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (m *MsgRequestAttestations) Reset() { *m = MsgRequestAttestations{} } +func (m *MsgRequestAttestations) String() string { return proto.CompactTextString(m) } +func (*MsgRequestAttestations) ProtoMessage() {} +func (*MsgRequestAttestations) Descriptor() ([]byte, []int) { + return fileDescriptor_cb4091a52ebadfca, []int{6} +} +func (m *MsgRequestAttestations) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRequestAttestations) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRequestAttestations.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgRequestAttestations) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRequestAttestations.Merge(m, src) +} +func (m *MsgRequestAttestations) XXX_Size() int { + return m.Size() +} +func (m *MsgRequestAttestations) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRequestAttestations.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRequestAttestations proto.InternalMessageInfo + +func (m *MsgRequestAttestations) GetCreator() string { + if m != nil { + return m.Creator + } + return "" +} + +func (m *MsgRequestAttestations) GetQueryId() string { + if m != nil { + return m.QueryId + } + return "" +} + +func (m *MsgRequestAttestations) GetTimestamp() string { + if m != nil { + return m.Timestamp + } + return "" +} + +type MsgRequestAttestationsResponse struct { +} + +func (m *MsgRequestAttestationsResponse) Reset() { *m = MsgRequestAttestationsResponse{} } +func (m *MsgRequestAttestationsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgRequestAttestationsResponse) ProtoMessage() {} +func (*MsgRequestAttestationsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_cb4091a52ebadfca, []int{7} +} +func (m *MsgRequestAttestationsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRequestAttestationsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRequestAttestationsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgRequestAttestationsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRequestAttestationsResponse.Merge(m, src) +} +func (m *MsgRequestAttestationsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgRequestAttestationsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRequestAttestationsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRequestAttestationsResponse proto.InternalMessageInfo + func init() { proto.RegisterType((*MsgRegisterOperatorPubkey)(nil), "layer.bridge.MsgRegisterOperatorPubkey") proto.RegisterType((*MsgRegisterOperatorPubkeyResponse)(nil), "layer.bridge.MsgRegisterOperatorPubkeyResponse") @@ -325,38 +421,43 @@ func init() { proto.RegisterType((*MsgSubmitBridgeValsetSignatureResponse)(nil), "layer.bridge.MsgSubmitBridgeValsetSignatureResponse") proto.RegisterType((*MsgSubmitOracleAttestation)(nil), "layer.bridge.MsgSubmitOracleAttestation") proto.RegisterType((*MsgSubmitOracleAttestationResponse)(nil), "layer.bridge.MsgSubmitOracleAttestationResponse") + proto.RegisterType((*MsgRequestAttestations)(nil), "layer.bridge.MsgRequestAttestations") + proto.RegisterType((*MsgRequestAttestationsResponse)(nil), "layer.bridge.MsgRequestAttestationsResponse") } func init() { proto.RegisterFile("layer/bridge/tx.proto", fileDescriptor_cb4091a52ebadfca) } var fileDescriptor_cb4091a52ebadfca = []byte{ - // 414 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0x4f, 0x6e, 0xda, 0x40, - 0x14, 0xc6, 0x19, 0xa8, 0x8a, 0x18, 0xa1, 0x2e, 0x2c, 0xb5, 0xb8, 0x6e, 0x65, 0xb5, 0x6e, 0x45, - 0x69, 0xd5, 0xda, 0xfd, 0xb7, 0xca, 0x2e, 0x64, 0x95, 0x05, 0x22, 0x02, 0x29, 0x8b, 0xec, 0x6c, - 0xf3, 0x34, 0x19, 0x61, 0x33, 0xce, 0xcc, 0x38, 0xc2, 0xcb, 0x44, 0x39, 0x40, 0xd6, 0x39, 0x45, - 0x8e, 0x91, 0x25, 0xcb, 0x2c, 0x23, 0x58, 0xe4, 0x02, 0x39, 0x40, 0x64, 0x1b, 0x3b, 0x01, 0x64, - 0x8b, 0xac, 0xac, 0xf9, 0xe6, 0xf3, 0x7b, 0xbf, 0x4f, 0x6f, 0x1e, 0x7e, 0xeb, 0xd9, 0x11, 0x70, - 0xcb, 0xe1, 0x74, 0x44, 0xc0, 0x92, 0x53, 0x33, 0xe0, 0x4c, 0x32, 0xa5, 0x99, 0xc8, 0x66, 0x2a, - 0x6b, 0x2d, 0x97, 0x09, 0x9f, 0x09, 0xcb, 0x17, 0xc4, 0x3a, 0xfd, 0x13, 0x7f, 0x52, 0x9b, 0x31, - 0xc6, 0xef, 0x7b, 0x82, 0x0c, 0x80, 0x50, 0x21, 0x81, 0xf7, 0x03, 0xe0, 0xb6, 0x64, 0xfc, 0x20, - 0x74, 0xc6, 0x10, 0x29, 0x2a, 0xae, 0xbb, 0x1c, 0x62, 0x41, 0x45, 0x9f, 0x50, 0xa7, 0x31, 0xc8, - 0x8e, 0x4a, 0x1b, 0xbf, 0x61, 0x2b, 0x5e, 0xb5, 0x9a, 0x18, 0xd6, 0xd4, 0x9d, 0xe6, 0xf9, 0xfd, - 0xf5, 0x8f, 0xec, 0x2f, 0xe3, 0x0b, 0xfe, 0x5c, 0xd8, 0x6c, 0x00, 0x22, 0x60, 0x13, 0x01, 0xc6, - 0x05, 0xc2, 0x7a, 0x4f, 0x90, 0x61, 0xe8, 0xf8, 0x54, 0x76, 0x13, 0xfc, 0x43, 0xdb, 0x13, 0x20, - 0x87, 0x94, 0x4c, 0x6c, 0x19, 0x72, 0x28, 0xe1, 0xfa, 0x88, 0x1b, 0x92, 0xfa, 0x20, 0xa4, 0xed, - 0x07, 0x4b, 0xa4, 0x27, 0x21, 0xbe, 0x15, 0x59, 0x11, 0xb5, 0x96, 0xde, 0xe6, 0xc2, 0x1a, 0x6b, - 0x07, 0xb7, 0xcb, 0x29, 0x72, 0xe0, 0x2b, 0x84, 0xb5, 0xdc, 0xda, 0xe7, 0xb6, 0xeb, 0xc1, 0xae, - 0x94, 0x71, 0x4b, 0x49, 0xd9, 0xa4, 0x04, 0x56, 0xc5, 0xf5, 0x93, 0x10, 0x78, 0xb4, 0x3f, 0x5a, - 0xa2, 0x66, 0xc7, 0xd5, 0x18, 0xb5, 0xd2, 0x18, 0xaf, 0xca, 0x63, 0x7c, 0xc5, 0x46, 0x31, 0x5b, - 0x16, 0xe1, 0xef, 0x43, 0x15, 0xd7, 0x7a, 0x82, 0x28, 0x1c, 0xbf, 0x2b, 0x78, 0x0a, 0xdf, 0xcc, - 0xe7, 0xef, 0xc9, 0x2c, 0x1c, 0xa3, 0x66, 0x6d, 0x69, 0xcc, 0x7a, 0x2b, 0x67, 0x08, 0x7f, 0x28, - 0x1b, 0xf6, 0xcf, 0x8d, 0x82, 0x25, 0x6e, 0xed, 0xff, 0x4b, 0xdc, 0x39, 0x43, 0x88, 0x5b, 0x45, - 0xe3, 0xeb, 0x14, 0x14, 0xdc, 0x70, 0x6a, 0xbf, 0xb7, 0x75, 0x66, 0x6d, 0xbb, 0x7b, 0x37, 0x73, - 0x1d, 0xcd, 0xe6, 0x3a, 0xba, 0x9b, 0xeb, 0xe8, 0x72, 0xa1, 0x57, 0x66, 0x0b, 0xbd, 0x72, 0xbb, - 0xd0, 0x2b, 0x47, 0xdf, 0x09, 0x95, 0xc7, 0xa1, 0x63, 0xba, 0xcc, 0xb7, 0x24, 0x78, 0x1e, 0xe3, - 0xbf, 0x28, 0xb3, 0xd2, 0x4d, 0x9f, 0xe6, 0xbb, 0x1e, 0x05, 0x20, 0x9c, 0xd7, 0xc9, 0x22, 0xff, - 0x7b, 0x0c, 0x00, 0x00, 0xff, 0xff, 0x8e, 0xbf, 0x32, 0xf5, 0x08, 0x04, 0x00, 0x00, + // 451 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0xbd, 0x8e, 0xd3, 0x40, + 0x10, 0xc7, 0xb3, 0x18, 0x71, 0xba, 0xd1, 0x89, 0xc2, 0x88, 0x3b, 0x63, 0x90, 0x75, 0x98, 0xd3, + 0x11, 0x50, 0xb0, 0xf9, 0xaa, 0xe8, 0x08, 0x15, 0x45, 0x14, 0x94, 0x48, 0x14, 0x74, 0xb6, 0x33, + 0x5a, 0x56, 0xb1, 0xb3, 0xce, 0xee, 0x1a, 0xc5, 0x25, 0x88, 0x07, 0xa0, 0xe6, 0x29, 0x78, 0x0c, + 0xca, 0x94, 0x74, 0xa0, 0xa4, 0xe0, 0x35, 0x90, 0xed, 0xd8, 0xe4, 0xcb, 0x56, 0x90, 0xa8, 0xa2, + 0x9d, 0xfd, 0x65, 0xe7, 0x37, 0xde, 0xbf, 0x16, 0x6e, 0x86, 0x5e, 0x8a, 0xc2, 0xf5, 0x05, 0x1b, + 0x51, 0x74, 0xd5, 0xcc, 0x89, 0x05, 0x57, 0x5c, 0x3f, 0xc9, 0xcb, 0x4e, 0x51, 0x36, 0xcf, 0x02, + 0x2e, 0x23, 0x2e, 0xdd, 0x48, 0x52, 0xf7, 0xc3, 0x93, 0xec, 0xa7, 0xc0, 0xec, 0x31, 0xdc, 0xea, + 0x49, 0x3a, 0x40, 0xca, 0xa4, 0x42, 0xd1, 0x8f, 0x51, 0x78, 0x8a, 0x8b, 0x37, 0x89, 0x3f, 0xc6, + 0x54, 0x37, 0xe0, 0x28, 0x10, 0x98, 0x15, 0x0c, 0x72, 0x4e, 0xda, 0xc7, 0x83, 0x72, 0xa9, 0x5f, + 0xc2, 0x75, 0xbe, 0xc1, 0x1a, 0x57, 0x72, 0x60, 0xab, 0xfa, 0xe2, 0xe4, 0xd3, 0xef, 0x6f, 0x0f, + 0xcb, 0x7f, 0xd9, 0xf7, 0xe0, 0x6e, 0x6d, 0xb3, 0x01, 0xca, 0x98, 0x4f, 0x24, 0xda, 0x9f, 0x09, + 0x58, 0x3d, 0x49, 0x87, 0x89, 0x1f, 0x31, 0xd5, 0xcd, 0xf5, 0xdf, 0x7a, 0xa1, 0x44, 0x35, 0x64, + 0x74, 0xe2, 0xa9, 0x44, 0x60, 0x83, 0xd7, 0x1d, 0x38, 0x56, 0x2c, 0x42, 0xa9, 0xbc, 0x28, 0x5e, + 0x29, 0xfd, 0x2d, 0x64, 0xbb, 0xb2, 0x3c, 0xc4, 0xd0, 0x8a, 0xdd, 0xaa, 0xb0, 0xe5, 0xda, 0x86, + 0xcb, 0x66, 0x8b, 0x4a, 0xf8, 0x2b, 0x01, 0xb3, 0x42, 0xfb, 0xc2, 0x0b, 0x42, 0x7c, 0xa9, 0x54, + 0xd6, 0x52, 0x31, 0x3e, 0x69, 0x90, 0x35, 0xe0, 0x68, 0x9a, 0xa0, 0x48, 0x5f, 0x8f, 0x56, 0xaa, + 0xe5, 0x72, 0x73, 0x0c, 0xad, 0x71, 0x8c, 0xab, 0xcd, 0x63, 0x5c, 0x80, 0x5d, 0xef, 0x56, 0x8d, + 0x30, 0x83, 0xd3, 0xfc, 0x62, 0xa6, 0x09, 0x4a, 0xb5, 0x06, 0xc8, 0xff, 0x6f, 0xbf, 0xe5, 0x77, + 0x9e, 0x5f, 0xf6, 0x9e, 0xce, 0xa5, 0xdb, 0xd3, 0x9f, 0x1a, 0x68, 0x3d, 0x49, 0x75, 0x01, 0xa7, + 0x35, 0x31, 0xbd, 0xef, 0xac, 0x67, 0xdd, 0xa9, 0x8d, 0x98, 0xe9, 0x1e, 0x08, 0x96, 0xbd, 0xf5, + 0x8f, 0x04, 0x6e, 0x37, 0x05, 0xb1, 0xb3, 0x73, 0x60, 0x03, 0x6d, 0x3e, 0xff, 0x17, 0xba, 0x72, + 0x48, 0xe0, 0xac, 0x2e, 0x5a, 0xed, 0x9a, 0x03, 0x77, 0x48, 0xf3, 0xf1, 0xa1, 0x64, 0xd5, 0x96, + 0xc1, 0x8d, 0x7d, 0x79, 0xb8, 0xd8, 0xf3, 0x09, 0x77, 0x28, 0xb3, 0x73, 0x08, 0x55, 0xb6, 0xea, + 0xbe, 0xfa, 0xbe, 0xb0, 0xc8, 0x7c, 0x61, 0x91, 0x5f, 0x0b, 0x8b, 0x7c, 0x59, 0x5a, 0xad, 0xf9, + 0xd2, 0x6a, 0xfd, 0x58, 0x5a, 0xad, 0x77, 0x0f, 0x28, 0x53, 0xef, 0x13, 0xdf, 0x09, 0x78, 0xe4, + 0x2a, 0x0c, 0x43, 0x2e, 0x1e, 0x31, 0xee, 0x16, 0x0f, 0xde, 0xac, 0x7a, 0xf2, 0xd2, 0x18, 0xa5, + 0x7f, 0x2d, 0x7f, 0xcf, 0x9e, 0xfd, 0x09, 0x00, 0x00, 0xff, 0xff, 0x8d, 0x97, 0xe9, 0xad, 0x0f, + 0x05, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -374,6 +475,7 @@ type MsgClient interface { RegisterOperatorPubkey(ctx context.Context, in *MsgRegisterOperatorPubkey, opts ...grpc.CallOption) (*MsgRegisterOperatorPubkeyResponse, error) SubmitBridgeValsetSignature(ctx context.Context, in *MsgSubmitBridgeValsetSignature, opts ...grpc.CallOption) (*MsgSubmitBridgeValsetSignatureResponse, error) SubmitOracleAttestation(ctx context.Context, in *MsgSubmitOracleAttestation, opts ...grpc.CallOption) (*MsgSubmitOracleAttestationResponse, error) + RequestAttestations(ctx context.Context, in *MsgRequestAttestations, opts ...grpc.CallOption) (*MsgRequestAttestationsResponse, error) } type msgClient struct { @@ -411,11 +513,21 @@ func (c *msgClient) SubmitOracleAttestation(ctx context.Context, in *MsgSubmitOr return out, nil } +func (c *msgClient) RequestAttestations(ctx context.Context, in *MsgRequestAttestations, opts ...grpc.CallOption) (*MsgRequestAttestationsResponse, error) { + out := new(MsgRequestAttestationsResponse) + err := c.cc.Invoke(ctx, "/layer.bridge.Msg/RequestAttestations", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { RegisterOperatorPubkey(context.Context, *MsgRegisterOperatorPubkey) (*MsgRegisterOperatorPubkeyResponse, error) SubmitBridgeValsetSignature(context.Context, *MsgSubmitBridgeValsetSignature) (*MsgSubmitBridgeValsetSignatureResponse, error) SubmitOracleAttestation(context.Context, *MsgSubmitOracleAttestation) (*MsgSubmitOracleAttestationResponse, error) + RequestAttestations(context.Context, *MsgRequestAttestations) (*MsgRequestAttestationsResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -431,6 +543,9 @@ func (*UnimplementedMsgServer) SubmitBridgeValsetSignature(ctx context.Context, func (*UnimplementedMsgServer) SubmitOracleAttestation(ctx context.Context, req *MsgSubmitOracleAttestation) (*MsgSubmitOracleAttestationResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SubmitOracleAttestation not implemented") } +func (*UnimplementedMsgServer) RequestAttestations(ctx context.Context, req *MsgRequestAttestations) (*MsgRequestAttestationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RequestAttestations not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -490,6 +605,24 @@ func _Msg_SubmitOracleAttestation_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _Msg_RequestAttestations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRequestAttestations) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).RequestAttestations(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/layer.bridge.Msg/RequestAttestations", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RequestAttestations(ctx, req.(*MsgRequestAttestations)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "layer.bridge.Msg", HandlerType: (*MsgServer)(nil), @@ -506,6 +639,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "SubmitOracleAttestation", Handler: _Msg_SubmitOracleAttestation_Handler, }, + { + MethodName: "RequestAttestations", + Handler: _Msg_RequestAttestations_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "layer/bridge/tx.proto", @@ -712,6 +849,73 @@ func (m *MsgSubmitOracleAttestationResponse) MarshalToSizedBuffer(dAtA []byte) ( return len(dAtA) - i, nil } +func (m *MsgRequestAttestations) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgRequestAttestations) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRequestAttestations) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Timestamp) > 0 { + i -= len(m.Timestamp) + copy(dAtA[i:], m.Timestamp) + i = encodeVarintTx(dAtA, i, uint64(len(m.Timestamp))) + i-- + dAtA[i] = 0x1a + } + if len(m.QueryId) > 0 { + i -= len(m.QueryId) + copy(dAtA[i:], m.QueryId) + i = encodeVarintTx(dAtA, i, uint64(len(m.QueryId))) + i-- + dAtA[i] = 0x12 + } + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgRequestAttestationsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgRequestAttestationsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRequestAttestationsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func encodeVarintTx(dAtA []byte, offset int, v uint64) int { offset -= sovTx(v) base := offset @@ -813,6 +1017,36 @@ func (m *MsgSubmitOracleAttestationResponse) Size() (n int) { return n } +func (m *MsgRequestAttestations) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.QueryId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Timestamp) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgRequestAttestationsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func sovTx(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1407,6 +1641,202 @@ func (m *MsgSubmitOracleAttestationResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgRequestAttestations) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgRequestAttestations: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRequestAttestations: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field QueryId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.QueryId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Timestamp = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgRequestAttestationsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgRequestAttestationsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRequestAttestationsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipTx(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 From 258d54300bba8b6c78283ce9ebe63fa9de3e0581 Mon Sep 17 00:00:00 2001 From: tkernell Date: Thu, 4 Apr 2024 17:04:38 -0500 Subject: [PATCH 09/18] set attestations by snapshot --- app/extend_vote.go | 79 ++++++------------ app/proposal_handler.go | 39 +++++---- start_scripts/start_two_chains.sh | 4 + x/bridge/keeper/keeper.go | 81 ++++++++++++++----- .../keeper/msg_server_request_attestations.go | 1 + x/bridge/types/attestation_requests.go | 4 +- x/bridge/types/attestation_snapshot_data.go | 2 + x/oracle/keeper/cycle_list.go | 3 - x/oracle/keeper/keeper.go | 2 +- x/oracle/keeper/msg_server_commit_report.go | 18 +---- 10 files changed, 115 insertions(+), 118 deletions(-) diff --git a/app/extend_vote.go b/app/extend_vote.go index d4511df13..554f51b0e 100644 --- a/app/extend_vote.go +++ b/app/extend_vote.go @@ -47,8 +47,9 @@ type BridgeKeeper interface { GetBridgeValsetByTimestamp(ctx sdk.Context, timestamp uint64) (*bridgetypes.BridgeValidatorSet, error) GetValidatorTimestampByIdxFromStorage(ctx sdk.Context, checkpointIdx uint64) (*bridgetypes.CheckpointTimestamp, error) GetValidatorCheckpointParamsFromStorage(ctx sdk.Context, timestamp uint64) (*bridgetypes.ValidatorCheckpointParams, error) - SetOracleAttestation(ctx sdk.Context, operatorAddress string, queryId string, timestamp uint64, signature string) error GetValidatorDidSignCheckpoint(ctx sdk.Context, operatorAddr string, checkpointTimestamp uint64) (didSign bool, prevValsetIndex int64, err error) + GetAttestationRequestsByHeight(ctx sdk.Context, height uint64) (*bridgetypes.AttestationRequests, error) + SetOracleAttestation2(ctx sdk.Context, operatorAddress string, snapshot []byte, sig []byte) error } type StakingKeeper interface { @@ -64,8 +65,7 @@ type VoteExtHandler struct { } type OracleAttestation struct { - QueryId string - Timestamp uint64 + Snapshot []byte Attestation []byte } @@ -95,6 +95,7 @@ func NewVoteExtHandler(logger log.Logger, appCodec codec.Codec, oracleKeeper Ora } func (h *VoteExtHandler) ExtendVoteHandler(ctx sdk.Context, req *abci.RequestExtendVote) (*abci.ResponseExtendVote, error) { + h.logger.Info("@ExtendVoteHandler") // check if evm address by operator exists voteExt := BridgeVoteExtension{} operatorAddress, err := h.GetOperatorAddress() @@ -117,60 +118,31 @@ func (h *VoteExtHandler) ExtendVoteHandler(ctx sdk.Context, req *abci.RequestExt } voteExt.InitialSignature = initialSignature } - // logic for generating oracle sigs and including them via vote extensions + // generate oracle attestations and include them via vote extensions blockHeight := ctx.BlockHeight() - 1 - reports := h.oracleKeeper.GetAggregatedReportsByHeight(ctx, int64(blockHeight)) - // iterate through reports and generate sigs - if len(reports) > 0 { - valsetCheckpoint, err := h.bridgeKeeper.GetValidatorCheckpointFromStorage(ctx) - if err != nil { + // reports := h.oracleKeeper.GetAggregatedReportsByHeight(ctx, int64(blockHeight)) + attestationRequests, err := h.bridgeKeeper.GetAttestationRequestsByHeight(ctx, uint64(blockHeight)) + if err != nil { + if strings.Contains(err.Error(), "collections: not found") { + h.logger.Info("No attestation requests found for height", "height", blockHeight) + } else { return nil, err } - for _, aggReport := range reports { - currentTime := time.Now() - ts := currentTime.Unix() + 100 - queryId, err := hex.DecodeString(aggReport.QueryId) - if err != nil { - panic(err) - } - reportTime, err := h.oracleKeeper.GetTimestampBefore(ctx, queryId, time.Unix(ts, 0)) - if err != nil { - return nil, err - } - tsBefore, err := h.oracleKeeper.GetTimestampBefore(ctx, queryId, reportTime) - if err != nil { - // set to 0 - tsBefore = time.Unix(0, 0) - } - tsAfter, err := h.oracleKeeper.GetTimestampAfter(ctx, queryId, reportTime) - if err != nil { - // set to 0 - tsAfter = time.Unix(0, 0) - } - oracleAttestationHash, err := h.EncodeOracleAttestationData( - aggReport.QueryId, - aggReport.AggregateValue, - reportTime.Unix(), - aggReport.ReporterPower, - tsBefore.Unix(), - tsAfter.Unix(), - hex.EncodeToString(valsetCheckpoint.Checkpoint), - reportTime.Unix(), - ) - if err != nil { - return nil, err - } - // sign the oracleAttestationHash - sig, err := h.SignMessage(oracleAttestationHash) - if err != nil { - return nil, err - } - oracleAttestation := OracleAttestation{ - Attestation: sig, - QueryId: aggReport.QueryId, - Timestamp: uint64(reportTime.Unix()), + } else { + snapshots := attestationRequests.Requests + // iterate through snapshots and generate sigs + if len(snapshots) > 0 { + for _, snapshot := range snapshots { + sig, err := h.SignMessage(snapshot.Snapshot) + if err != nil { + return nil, err + } + oracleAttestation := OracleAttestation{ + Snapshot: snapshot.Snapshot, + Attestation: sig, + } + voteExt.OracleAttestations = append(voteExt.OracleAttestations, oracleAttestation) } - voteExt.OracleAttestations = append(voteExt.OracleAttestations, oracleAttestation) } } // include the valset sig in the vote extension @@ -198,6 +170,7 @@ func (h *VoteExtHandler) ExtendVoteHandler(ctx sdk.Context, req *abci.RequestExt } func (h *VoteExtHandler) VerifyVoteExtensionHandler(ctx sdk.Context, req *abci.RequestVerifyVoteExtension) (*abci.ResponseVerifyVoteExtension, error) { + h.logger.Info("@VerifyVoteExtensionHandler") // TODO: implement the logic to verify the vote extension return &abci.ResponseVerifyVoteExtension{Status: abci.ResponseVerifyVoteExtension_ACCEPT}, nil } diff --git a/app/proposal_handler.go b/app/proposal_handler.go index 9bcab17e8..05289fabe 100644 --- a/app/proposal_handler.go +++ b/app/proposal_handler.go @@ -34,9 +34,8 @@ type ValsetSignatures struct { type OracleAttestations struct { OperatorAddresses []string `json:"operator_addresses"` - Attestations []string `json:"attestations"` - QueryIds []string `json:"query_ids"` - Timestamps []int64 `json:"timestamps"` + Attestations [][]byte `json:"attestations"` + Snapshots [][]byte `json:"snapshots"` } type VoteExtTx struct { @@ -57,6 +56,7 @@ func NewProposalHandler(logger log.Logger, valStore baseapp.ValidatorStore, appC } func (h *ProposalHandler) PrepareProposalHandler(ctx sdk.Context, req *abci.RequestPrepareProposal) (*abci.ResponsePrepareProposal, error) { + h.logger.Info("@PrepareProposalHandler") err := baseapp.ValidateVoteExtensions(ctx, h.valStore, req.Height, ctx.ChainID(), req.LocalLastCommit) if err != nil { h.logger.Info("failed to validate vote extensions", "error", err) @@ -103,7 +103,7 @@ func (h *ProposalHandler) PrepareProposalHandler(ctx sdk.Context, req *abci.Requ Signatures: valsetSignatures, } - oracleSigs, oracleQueryIds, oracleOperatorAddresses, oracleTimestamps, err := h.CheckOracleAttestationsFromLastCommit(ctx, req.LocalLastCommit) + oracleSigs, oracleSnapshots, oracleOperatorAddresses, err := h.CheckOracleAttestationsFromLastCommit(ctx, req.LocalLastCommit) if err != nil { h.logger.Info("failed to check oracle attestations from last commit", "error", err) } @@ -111,8 +111,7 @@ func (h *ProposalHandler) PrepareProposalHandler(ctx sdk.Context, req *abci.Requ oracleAttestations := OracleAttestations{ OperatorAddresses: oracleOperatorAddresses, Attestations: oracleSigs, - QueryIds: oracleQueryIds, - Timestamps: oracleTimestamps, + Snapshots: oracleSnapshots, } injectedVoteExtTx := VoteExtTx{ @@ -136,10 +135,12 @@ func (h *ProposalHandler) PrepareProposalHandler(ctx sdk.Context, req *abci.Requ } func (h *ProposalHandler) ProcessProposalHandler(ctx sdk.Context, req *abci.RequestProcessProposal) (*abci.ResponseProcessProposal, error) { + h.logger.Info("@ProcessProposalHandler") return &abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_ACCEPT}, nil } func (h *ProposalHandler) PreBlocker(ctx sdk.Context, req *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error) { + h.logger.Info("@PreBlocker") res := &sdk.ResponsePreBlock{} if len(req.Txs) == 0 { return res, nil @@ -171,10 +172,9 @@ func (h *ProposalHandler) PreBlocker(ctx sdk.Context, req *abci.RequestFinalizeB if len(injectedVoteExtTx.OracleAttestations.OperatorAddresses) > 0 { for i, operatorAddress := range injectedVoteExtTx.OracleAttestations.OperatorAddresses { - queryId := injectedVoteExtTx.OracleAttestations.QueryIds[i] + snapshot := injectedVoteExtTx.OracleAttestations.Snapshots[i] attestation := injectedVoteExtTx.OracleAttestations.Attestations[i] - timestamp := injectedVoteExtTx.OracleAttestations.Timestamps[i] - err := h.bridgeKeeper.SetOracleAttestation(ctx, operatorAddress, queryId, uint64(timestamp), attestation) + err := h.bridgeKeeper.SetOracleAttestation2(ctx, operatorAddress, snapshot, attestation) if err != nil { return nil, err } @@ -286,11 +286,10 @@ func (h *ProposalHandler) ValidatorOperatorAddressFromVote(ctx sdk.Context, vote return operatorAddress, nil } -func (h *ProposalHandler) CheckOracleAttestationsFromLastCommit(ctx sdk.Context, commit abci.ExtendedCommitInfo) ([]string, []string, []string, []int64, error) { - var attestations []string - var timestamps []int64 +func (h *ProposalHandler) CheckOracleAttestationsFromLastCommit(ctx sdk.Context, commit abci.ExtendedCommitInfo) ([][]byte, [][]byte, []string, error) { + var attestations [][]byte var operatorAddresses []string - var queryIds []string + var snapshots [][]byte for _, vote := range commit.Votes { extension := vote.GetVoteExtension() @@ -299,7 +298,7 @@ func (h *ProposalHandler) CheckOracleAttestationsFromLastCommit(ctx sdk.Context, err := json.Unmarshal(extension, &voteExt) if err != nil { h.logger.Error("failed to unmarshal vote extension", "error", err) - return nil, nil, nil, nil, errors.New("failed to unmarshal vote extension") + return nil, nil, nil, errors.New("failed to unmarshal vote extension") } // check for oracle attestation @@ -309,20 +308,18 @@ func (h *ProposalHandler) CheckOracleAttestationsFromLastCommit(ctx sdk.Context, operatorAddress, err := h.ValidatorOperatorAddressFromVote(ctx, vote) if err != nil { h.logger.Error("failed to get operator address from vote", "error", err) - return nil, nil, nil, nil, err + return nil, nil, nil, err } h.logger.Info("Operator address from oracle attestation", "operatorAddress", operatorAddress) operatorAddresses = append(operatorAddresses, operatorAddress) - queryId := attestation.QueryId - queryIds = append(queryIds, queryId) + snapshot := attestation.Snapshot + snapshots = append(snapshots, snapshot) - attestations = append(attestations, hex.EncodeToString(attestation.Attestation)) - timestamps = append(timestamps, int64(attestation.Timestamp)) - h.logger.Info("Oracle attestation added to proposal", "queryId", queryId, "attestation", hex.EncodeToString(attestation.Attestation), "timestamp", attestation.Timestamp) + attestations = append(attestations, attestation.Attestation) } } } - return attestations, queryIds, operatorAddresses, timestamps, nil + return attestations, snapshots, operatorAddresses, nil } diff --git a/start_scripts/start_two_chains.sh b/start_scripts/start_two_chains.sh index d541f0289..776fb5fc9 100755 --- a/start_scripts/start_two_chains.sh +++ b/start_scripts/start_two_chains.sh @@ -36,6 +36,8 @@ echo "alice..." ./layerd keys add alice --keyring-backend $KEYRING_BACKEND --home ~/.layer/alice echo "bill..." ./layerd keys add bill --keyring-backend $KEYRING_BACKEND --home ~/.layer/bill +echo "charlie..." +./layerd keys add charlie --keyring-backend $KEYRING_BACKEND --home ~/.layer/alice # Update vote_extensions_enable_height in genesis.json @@ -53,6 +55,8 @@ echo "alice..." ./layerd genesis add-genesis-account $(./layerd keys show alice -a --keyring-backend $KEYRING_BACKEND --home ~/.layer/alice) 10000000000000loya --keyring-backend $KEYRING_BACKEND --home ~/.layer/alice echo "bill..." ./layerd genesis add-genesis-account $(./layerd keys show bill -a --keyring-backend $KEYRING_BACKEND --home ~/.layer/bill) 10000000000000loya --keyring-backend $KEYRING_BACKEND --home ~/.layer/alice +echo "charlie..." +./layerd genesis add-genesis-account $(./layerd keys show charlie -a --keyring-backend $KEYRING_BACKEND --home ~/.layer/alice) 10000000000000loya --keyring-backend $KEYRING_BACKEND --home ~/.layer/alice # ./layerd genesis add-genesis-account $(./layerd keys show bill -a --keyring-backend os --home ~/.layer/bill) 10000000000000loya --keyring-backend os --home ~/.layer/bill # Create a tx to stake some loyas for alice diff --git a/x/bridge/keeper/keeper.go b/x/bridge/keeper/keeper.go index 29dc3942b..5d4f0a0dc 100644 --- a/x/bridge/keeper/keeper.go +++ b/x/bridge/keeper/keeper.go @@ -793,6 +793,40 @@ func (k Keeper) SetOracleAttestation(ctx sdk.Context, operatorAddress string, qu return nil } +func (k Keeper) SetOracleAttestation2(ctx sdk.Context, operatorAddress string, snapshot []byte, sig []byte) error { + // get the evm address associated with the operator address + ethAddress, err := k.OperatorToEVMAddressMap.Get(ctx, operatorAddress) + if err != nil { + k.Logger(ctx).Info("Error getting EVM address from operator address", "error", err) + return err + } + // get the last saved bridge validator set + lastSavedBridgeValidators, err := k.BridgeValset.Get(ctx) + if err != nil { + k.Logger(ctx).Info("Error getting last saved bridge validators", "error", err) + return err + } + // set the signature in the oracle attestation map by finding the index of the operator address + ethAddressHex := hex.EncodeToString(ethAddress.EVMAddress) + snapshotHex := hex.EncodeToString(snapshot) + for i, val := range lastSavedBridgeValidators.BridgeValidatorSet { + if val.EthereumAddress == ethAddressHex { + snapshotToSigsMap, err := k.SnapshotToAttestationsMap.Get(ctx, snapshotHex) + if err != nil { + k.Logger(ctx).Info("Error getting snapshot to attestations map", "error", err) + return err + } + snapshotToSigsMap.SetAttestation(i, sig) + err = k.SnapshotToAttestationsMap.Set(ctx, snapshotHex, snapshotToSigsMap) + if err != nil { + k.Logger(ctx).Info("Error setting snapshot to attestations map", "error", err) + return err + } + } + } + return nil +} + func (k Keeper) GetEVMAddressByOperator(ctx sdk.Context, operatorAddress string) (string, error) { ethAddress, err := k.OperatorToEVMAddressMap.Get(ctx, operatorAddress) if err != nil { @@ -884,31 +918,35 @@ func (k Keeper) GetValidatorDidSignCheckpoint(ctx sdk.Context, operatorAddr stri func (k Keeper) CreateNewReportSnapshots(ctx sdk.Context) error { k.Logger(ctx).Info("@CreateNewReportSnapshots") - blockHeight := ctx.BlockHeight() - 1 - if blockHeight > 0 { - reports := k.oracleKeeper.GetAggregatedReportsByHeight(ctx, blockHeight) - for _, report := range reports { - queryId, err := hex.DecodeString(report.QueryId) - if err != nil { - return err - } - timeNow := time.Now().Add(time.Second) - reportTime, err := k.oracleKeeper.GetTimestampBefore(ctx, queryId, timeNow) - if err != nil { - return nil - } - err = k.CreateSnapshot(ctx, queryId, reportTime) - if err != nil { - return err - } + blockHeight := ctx.BlockHeight() + k.Logger(ctx).Info("block height", "blockHeight", blockHeight) + + reports := k.oracleKeeper.GetAggregatedReportsByHeight(ctx, blockHeight) + k.Logger(ctx).Info("num reports", "reports", len(reports)) + for _, report := range reports { + queryId, err := hex.DecodeString(report.QueryId) + if err != nil { + return err + } + timeNow := time.Now().Add(time.Second) + reportTime, err := k.oracleKeeper.GetTimestampBefore(ctx, queryId, timeNow) + if err != nil { + return nil + } + err = k.CreateSnapshot(ctx, queryId, reportTime) + if err != nil { + return err } } + return nil } // Called with each new agg report and with new request for optimistic attestations func (k Keeper) CreateSnapshot(ctx sdk.Context, queryId []byte, timestamp time.Time) error { k.Logger(ctx).Info("@CreateSnapshot") + k.Logger(ctx).Info("queryId", "queryId", hex.EncodeToString(queryId)) + k.Logger(ctx).Info("timestamp", "timestamp", fmt.Sprint(timestamp.Unix())) k.Logger(ctx).Info("getting agg report...") // GetAggregateByTimestamp(ctx sdk.Context, queryId []byte, timestamp time.Time) (aggregate *types.Aggregate, err error) aggReport, err := k.oracleKeeper.GetAggregateByTimestamp(ctx, queryId, timestamp) @@ -991,6 +1029,8 @@ func (k Keeper) CreateSnapshot(ctx sdk.Context, queryId []byte, timestamp time.T AttestationTimestamp: int64(timestamp.Unix()), PrevReportTimestamp: int64(tsBefore.Unix()), NextReportTimestamp: int64(tsAfter.Unix()), + QueryId: queryId, + Timestamp: int64(timestamp.Unix()), } k.Logger(ctx).Info("setting snapshot data...") err = k.AttestSnapshotDataMap.Set(ctx, hex.EncodeToString(snapshotBytes), snapshotData) @@ -1015,14 +1055,17 @@ func (k Keeper) CreateSnapshot(ctx sdk.Context, queryId []byte, timestamp time.T return err } + k.Logger(ctx).Info("getting attestation requests by height...") // add to attestation requests blockHeight := uint64(ctx.BlockHeight()) + k.Logger(ctx).Info("block height", "blockHeight", blockHeight) exists, err = k.AttestRequestsByHeightMap.Has(ctx, blockHeight) if err != nil { k.Logger(ctx).Info("Error checking if attestation requests by height map exists", "error", err) return err } if !exists { + k.Logger(ctx).Info("attestation requests by height map does not exist, creating new map...") attestRequests := types.AttestationRequests{} err = k.AttestRequestsByHeightMap.Set(ctx, blockHeight, attestRequests) if err != nil { @@ -1036,9 +1079,7 @@ func (k Keeper) CreateSnapshot(ctx sdk.Context, queryId []byte, timestamp time.T return err } request := types.AttestationRequest{ - Snapshot: snapshotBytes, - QueryId: queryId, - Timestamp: uint64(timestamp.Unix()), + Snapshot: snapshotBytes, } attestRequests.AddRequest(&request) return k.AttestRequestsByHeightMap.Set(ctx, blockHeight, attestRequests) diff --git a/x/bridge/keeper/msg_server_request_attestations.go b/x/bridge/keeper/msg_server_request_attestations.go index 36e49bacd..535543212 100644 --- a/x/bridge/keeper/msg_server_request_attestations.go +++ b/x/bridge/keeper/msg_server_request_attestations.go @@ -13,6 +13,7 @@ import ( ) func (k msgServer) RequestAttestations(ctx context.Context, msg *types.MsgRequestAttestations) (*types.MsgRequestAttestationsResponse, error) { + k.Keeper.Logger(sdk.UnwrapSDKContext(ctx)).Info("@RequestAttestations", "queryId", msg.QueryId, "timestamp", msg.Timestamp) sdkCtx := sdk.UnwrapSDKContext(ctx) queryId, err := hex.DecodeString(msg.QueryId) diff --git a/x/bridge/types/attestation_requests.go b/x/bridge/types/attestation_requests.go index 543d68ee6..198f43db3 100644 --- a/x/bridge/types/attestation_requests.go +++ b/x/bridge/types/attestation_requests.go @@ -5,9 +5,7 @@ import ( ) type AttestationRequest struct { - Snapshot []byte `protobuf:"bytes,1,opt,name=snapshot,proto3"` - QueryId []byte `protobuf:"bytes,2,opt,name=query_id,proto3"` - Timestamp uint64 `protobuf:"varint,3,opt,name=timestamp,proto3"` + Snapshot []byte `protobuf:"bytes,1,opt,name=snapshot,proto3"` } // AttestationRequests holds requests for attestations. diff --git a/x/bridge/types/attestation_snapshot_data.go b/x/bridge/types/attestation_snapshot_data.go index 0a07eecc3..defb5cc50 100644 --- a/x/bridge/types/attestation_snapshot_data.go +++ b/x/bridge/types/attestation_snapshot_data.go @@ -11,6 +11,8 @@ type AttestationSnapshotData struct { AttestationTimestamp int64 `protobuf:"varint,2,rep,name=attestation_timestamp,proto3"` PrevReportTimestamp int64 `protobuf:"varint,3,rep,name=prev_report_timestamp,proto3"` NextReportTimestamp int64 `protobuf:"varint,4,rep,name=next_report_timestamp,proto3"` + QueryId []byte `protobuf:"bytes,5,rep,name=query_id,proto3"` + Timestamp int64 `protobuf:"varint,6,rep,name=timestamp,proto3"` } // Ensure AttestationSnapshotData implements proto.Message diff --git a/x/oracle/keeper/cycle_list.go b/x/oracle/keeper/cycle_list.go index ac6bd435f..230c949f7 100644 --- a/x/oracle/keeper/cycle_list.go +++ b/x/oracle/keeper/cycle_list.go @@ -4,7 +4,6 @@ import ( "context" "encoding/hex" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/tellor-io/layer/utils" "github.com/tellor-io/layer/x/oracle/types" ) @@ -73,8 +72,6 @@ func (k Keeper) InitCycleListQuery(ctx context.Context, queries []string) error if err != nil { return err } - sdkctx := sdk.UnwrapSDKContext(ctx) - query.Expiration = sdkctx.BlockTime().Add(query.RegistrySpecTimeframe) err = k.Query.Set(ctx, queryId, query) if err != nil { return err diff --git a/x/oracle/keeper/keeper.go b/x/oracle/keeper/keeper.go index f660be9ba..b6fd7e749 100644 --- a/x/oracle/keeper/keeper.go +++ b/x/oracle/keeper/keeper.go @@ -18,7 +18,7 @@ import ( regTypes "github.com/tellor-io/layer/x/registry/types" ) -var offset = time.Second * 8 +var offset = time.Second * 3 type ( Keeper struct { diff --git a/x/oracle/keeper/msg_server_commit_report.go b/x/oracle/keeper/msg_server_commit_report.go index 681e85dc4..e240c44ca 100644 --- a/x/oracle/keeper/msg_server_commit_report.go +++ b/x/oracle/keeper/msg_server_commit_report.go @@ -63,22 +63,6 @@ func (k msgServer) CommitReport(goCtx context.Context, msg *types.MsgCommitRepor // bool to check if query is in cycle incycle := msg.QueryData == cycleQuery - if !incycle { - k.Logger(ctx).Info("query not in cycle") - } - - k.Logger(ctx).Info("Expiration", "exp", query.Expiration) - k.Logger(ctx).Info("BlockTime", "blocktime", ctx.BlockTime()) - k.Logger(ctx).Info("offset", "offset", offset) - - if query.Expiration.Before(ctx.BlockTime()) { - k.Logger(ctx).Info("query expired") - } - - if query.Amount.IsZero() { - k.Logger(ctx).Info("query does not have tips and is not in cycle") - } - if query.Amount.IsZero() && query.Expiration.Before(ctx.BlockTime()) && !incycle { return nil, types.ErrNoTipsNotInCycle.Wrapf("query does not have tips and is not in cycle") } @@ -100,7 +84,7 @@ func (k msgServer) CommitReport(goCtx context.Context, msg *types.MsgCommitRepor query.Id = nextId // reset query fields when generating next id query.HasRevealedReports = false - query.Expiration = ctx.BlockTime().Add(offset) + query.Expiration = ctx.BlockTime().Add(query.RegistrySpecTimeframe) err = k.Query.Set(ctx, queryId, query) if err != nil { return nil, err From 98956344552d9b2df6bbfd511c653baedacc6f6a Mon Sep 17 00:00:00 2001 From: tkernell Date: Fri, 5 Apr 2024 08:59:00 -0500 Subject: [PATCH 10/18] snapshots and attestations cli --- api/layer/bridge/query.pulsar.go | 3657 ++++++++++++++++- api/layer/bridge/query_grpc.pb.go | 108 + proto/layer/bridge/query.proto | 51 +- x/bridge/client/cli/query.go | 4 +- .../query_get_attestation_data_by_snapshot.go | 45 + .../cli/query_get_attestations_by_snapshot.go | 44 + .../cli/query_get_snapshots.by_report.go | 44 + .../query_get_attestation_data_by_snapshot.go | 46 + .../query_get_attestations_by_snapshot.go | 33 + .../keeper/query_get_snapshots_by_report.go | 47 + x/bridge/types/query.pb.go | 1807 +++++++- x/bridge/types/query.pb.gw.go | 325 ++ 12 files changed, 6049 insertions(+), 162 deletions(-) create mode 100644 x/bridge/client/cli/query_get_attestation_data_by_snapshot.go create mode 100644 x/bridge/client/cli/query_get_attestations_by_snapshot.go create mode 100644 x/bridge/client/cli/query_get_snapshots.by_report.go create mode 100644 x/bridge/keeper/query_get_attestation_data_by_snapshot.go create mode 100644 x/bridge/keeper/query_get_attestations_by_snapshot.go create mode 100644 x/bridge/keeper/query_get_snapshots_by_report.go diff --git a/api/layer/bridge/query.pulsar.go b/api/layer/bridge/query.pulsar.go index 16bf395a2..0cc16bdda 100644 --- a/api/layer/bridge/query.pulsar.go +++ b/api/layer/bridge/query.pulsar.go @@ -13657,6 +13657,3158 @@ func (x *fastReflection_QueryGetDataBeforeResponse) ProtoMethods() *protoiface.M } } +var ( + md_QueryGetSnapshotsByReportRequest protoreflect.MessageDescriptor + fd_QueryGetSnapshotsByReportRequest_queryId protoreflect.FieldDescriptor + fd_QueryGetSnapshotsByReportRequest_timestamp protoreflect.FieldDescriptor +) + +func init() { + file_layer_bridge_query_proto_init() + md_QueryGetSnapshotsByReportRequest = File_layer_bridge_query_proto.Messages().ByName("QueryGetSnapshotsByReportRequest") + fd_QueryGetSnapshotsByReportRequest_queryId = md_QueryGetSnapshotsByReportRequest.Fields().ByName("queryId") + fd_QueryGetSnapshotsByReportRequest_timestamp = md_QueryGetSnapshotsByReportRequest.Fields().ByName("timestamp") +} + +var _ protoreflect.Message = (*fastReflection_QueryGetSnapshotsByReportRequest)(nil) + +type fastReflection_QueryGetSnapshotsByReportRequest QueryGetSnapshotsByReportRequest + +func (x *QueryGetSnapshotsByReportRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryGetSnapshotsByReportRequest)(x) +} + +func (x *QueryGetSnapshotsByReportRequest) slowProtoReflect() protoreflect.Message { + mi := &file_layer_bridge_query_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 _fastReflection_QueryGetSnapshotsByReportRequest_messageType fastReflection_QueryGetSnapshotsByReportRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryGetSnapshotsByReportRequest_messageType{} + +type fastReflection_QueryGetSnapshotsByReportRequest_messageType struct{} + +func (x fastReflection_QueryGetSnapshotsByReportRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryGetSnapshotsByReportRequest)(nil) +} +func (x fastReflection_QueryGetSnapshotsByReportRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryGetSnapshotsByReportRequest) +} +func (x fastReflection_QueryGetSnapshotsByReportRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryGetSnapshotsByReportRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryGetSnapshotsByReportRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryGetSnapshotsByReportRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryGetSnapshotsByReportRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryGetSnapshotsByReportRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryGetSnapshotsByReportRequest) New() protoreflect.Message { + return new(fastReflection_QueryGetSnapshotsByReportRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryGetSnapshotsByReportRequest) Interface() protoreflect.ProtoMessage { + return (*QueryGetSnapshotsByReportRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryGetSnapshotsByReportRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.QueryId != "" { + value := protoreflect.ValueOfString(x.QueryId) + if !f(fd_QueryGetSnapshotsByReportRequest_queryId, value) { + return + } + } + if x.Timestamp != "" { + value := protoreflect.ValueOfString(x.Timestamp) + if !f(fd_QueryGetSnapshotsByReportRequest_timestamp, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryGetSnapshotsByReportRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "layer.bridge.QueryGetSnapshotsByReportRequest.queryId": + return x.QueryId != "" + case "layer.bridge.QueryGetSnapshotsByReportRequest.timestamp": + return x.Timestamp != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetSnapshotsByReportRequest")) + } + panic(fmt.Errorf("message layer.bridge.QueryGetSnapshotsByReportRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryGetSnapshotsByReportRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "layer.bridge.QueryGetSnapshotsByReportRequest.queryId": + x.QueryId = "" + case "layer.bridge.QueryGetSnapshotsByReportRequest.timestamp": + x.Timestamp = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetSnapshotsByReportRequest")) + } + panic(fmt.Errorf("message layer.bridge.QueryGetSnapshotsByReportRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryGetSnapshotsByReportRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "layer.bridge.QueryGetSnapshotsByReportRequest.queryId": + value := x.QueryId + return protoreflect.ValueOfString(value) + case "layer.bridge.QueryGetSnapshotsByReportRequest.timestamp": + value := x.Timestamp + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetSnapshotsByReportRequest")) + } + panic(fmt.Errorf("message layer.bridge.QueryGetSnapshotsByReportRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryGetSnapshotsByReportRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "layer.bridge.QueryGetSnapshotsByReportRequest.queryId": + x.QueryId = value.Interface().(string) + case "layer.bridge.QueryGetSnapshotsByReportRequest.timestamp": + x.Timestamp = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetSnapshotsByReportRequest")) + } + panic(fmt.Errorf("message layer.bridge.QueryGetSnapshotsByReportRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryGetSnapshotsByReportRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "layer.bridge.QueryGetSnapshotsByReportRequest.queryId": + panic(fmt.Errorf("field queryId of message layer.bridge.QueryGetSnapshotsByReportRequest is not mutable")) + case "layer.bridge.QueryGetSnapshotsByReportRequest.timestamp": + panic(fmt.Errorf("field timestamp of message layer.bridge.QueryGetSnapshotsByReportRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetSnapshotsByReportRequest")) + } + panic(fmt.Errorf("message layer.bridge.QueryGetSnapshotsByReportRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryGetSnapshotsByReportRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "layer.bridge.QueryGetSnapshotsByReportRequest.queryId": + return protoreflect.ValueOfString("") + case "layer.bridge.QueryGetSnapshotsByReportRequest.timestamp": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetSnapshotsByReportRequest")) + } + panic(fmt.Errorf("message layer.bridge.QueryGetSnapshotsByReportRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryGetSnapshotsByReportRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in layer.bridge.QueryGetSnapshotsByReportRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryGetSnapshotsByReportRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryGetSnapshotsByReportRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryGetSnapshotsByReportRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryGetSnapshotsByReportRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryGetSnapshotsByReportRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.QueryId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Timestamp) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryGetSnapshotsByReportRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Timestamp) > 0 { + i -= len(x.Timestamp) + copy(dAtA[i:], x.Timestamp) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Timestamp))) + i-- + dAtA[i] = 0x12 + } + if len(x.QueryId) > 0 { + i -= len(x.QueryId) + copy(dAtA[i:], x.QueryId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.QueryId))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryGetSnapshotsByReportRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetSnapshotsByReportRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetSnapshotsByReportRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field QueryId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.QueryId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Timestamp = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryGetSnapshotsByReportResponse_1_list)(nil) + +type _QueryGetSnapshotsByReportResponse_1_list struct { + list *[]string +} + +func (x *_QueryGetSnapshotsByReportResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryGetSnapshotsByReportResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_QueryGetSnapshotsByReportResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_QueryGetSnapshotsByReportResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryGetSnapshotsByReportResponse_1_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message QueryGetSnapshotsByReportResponse at list field Snapshots as it is not of Message kind")) +} + +func (x *_QueryGetSnapshotsByReportResponse_1_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_QueryGetSnapshotsByReportResponse_1_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_QueryGetSnapshotsByReportResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryGetSnapshotsByReportResponse protoreflect.MessageDescriptor + fd_QueryGetSnapshotsByReportResponse_snapshots protoreflect.FieldDescriptor +) + +func init() { + file_layer_bridge_query_proto_init() + md_QueryGetSnapshotsByReportResponse = File_layer_bridge_query_proto.Messages().ByName("QueryGetSnapshotsByReportResponse") + fd_QueryGetSnapshotsByReportResponse_snapshots = md_QueryGetSnapshotsByReportResponse.Fields().ByName("snapshots") +} + +var _ protoreflect.Message = (*fastReflection_QueryGetSnapshotsByReportResponse)(nil) + +type fastReflection_QueryGetSnapshotsByReportResponse QueryGetSnapshotsByReportResponse + +func (x *QueryGetSnapshotsByReportResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryGetSnapshotsByReportResponse)(x) +} + +func (x *QueryGetSnapshotsByReportResponse) slowProtoReflect() protoreflect.Message { + mi := &file_layer_bridge_query_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 _fastReflection_QueryGetSnapshotsByReportResponse_messageType fastReflection_QueryGetSnapshotsByReportResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryGetSnapshotsByReportResponse_messageType{} + +type fastReflection_QueryGetSnapshotsByReportResponse_messageType struct{} + +func (x fastReflection_QueryGetSnapshotsByReportResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryGetSnapshotsByReportResponse)(nil) +} +func (x fastReflection_QueryGetSnapshotsByReportResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryGetSnapshotsByReportResponse) +} +func (x fastReflection_QueryGetSnapshotsByReportResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryGetSnapshotsByReportResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryGetSnapshotsByReportResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryGetSnapshotsByReportResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryGetSnapshotsByReportResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryGetSnapshotsByReportResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryGetSnapshotsByReportResponse) New() protoreflect.Message { + return new(fastReflection_QueryGetSnapshotsByReportResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryGetSnapshotsByReportResponse) Interface() protoreflect.ProtoMessage { + return (*QueryGetSnapshotsByReportResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryGetSnapshotsByReportResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Snapshots) != 0 { + value := protoreflect.ValueOfList(&_QueryGetSnapshotsByReportResponse_1_list{list: &x.Snapshots}) + if !f(fd_QueryGetSnapshotsByReportResponse_snapshots, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryGetSnapshotsByReportResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "layer.bridge.QueryGetSnapshotsByReportResponse.snapshots": + return len(x.Snapshots) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetSnapshotsByReportResponse")) + } + panic(fmt.Errorf("message layer.bridge.QueryGetSnapshotsByReportResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryGetSnapshotsByReportResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "layer.bridge.QueryGetSnapshotsByReportResponse.snapshots": + x.Snapshots = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetSnapshotsByReportResponse")) + } + panic(fmt.Errorf("message layer.bridge.QueryGetSnapshotsByReportResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryGetSnapshotsByReportResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "layer.bridge.QueryGetSnapshotsByReportResponse.snapshots": + if len(x.Snapshots) == 0 { + return protoreflect.ValueOfList(&_QueryGetSnapshotsByReportResponse_1_list{}) + } + listValue := &_QueryGetSnapshotsByReportResponse_1_list{list: &x.Snapshots} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetSnapshotsByReportResponse")) + } + panic(fmt.Errorf("message layer.bridge.QueryGetSnapshotsByReportResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryGetSnapshotsByReportResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "layer.bridge.QueryGetSnapshotsByReportResponse.snapshots": + lv := value.List() + clv := lv.(*_QueryGetSnapshotsByReportResponse_1_list) + x.Snapshots = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetSnapshotsByReportResponse")) + } + panic(fmt.Errorf("message layer.bridge.QueryGetSnapshotsByReportResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryGetSnapshotsByReportResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "layer.bridge.QueryGetSnapshotsByReportResponse.snapshots": + if x.Snapshots == nil { + x.Snapshots = []string{} + } + value := &_QueryGetSnapshotsByReportResponse_1_list{list: &x.Snapshots} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetSnapshotsByReportResponse")) + } + panic(fmt.Errorf("message layer.bridge.QueryGetSnapshotsByReportResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryGetSnapshotsByReportResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "layer.bridge.QueryGetSnapshotsByReportResponse.snapshots": + list := []string{} + return protoreflect.ValueOfList(&_QueryGetSnapshotsByReportResponse_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetSnapshotsByReportResponse")) + } + panic(fmt.Errorf("message layer.bridge.QueryGetSnapshotsByReportResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryGetSnapshotsByReportResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in layer.bridge.QueryGetSnapshotsByReportResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryGetSnapshotsByReportResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryGetSnapshotsByReportResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryGetSnapshotsByReportResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryGetSnapshotsByReportResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryGetSnapshotsByReportResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Snapshots) > 0 { + for _, s := range x.Snapshots { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryGetSnapshotsByReportResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Snapshots) > 0 { + for iNdEx := len(x.Snapshots) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Snapshots[iNdEx]) + copy(dAtA[i:], x.Snapshots[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Snapshots[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryGetSnapshotsByReportResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetSnapshotsByReportResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetSnapshotsByReportResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Snapshots", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Snapshots = append(x.Snapshots, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryGetAttestationDataBySnapshotRequest protoreflect.MessageDescriptor + fd_QueryGetAttestationDataBySnapshotRequest_snapshot protoreflect.FieldDescriptor +) + +func init() { + file_layer_bridge_query_proto_init() + md_QueryGetAttestationDataBySnapshotRequest = File_layer_bridge_query_proto.Messages().ByName("QueryGetAttestationDataBySnapshotRequest") + fd_QueryGetAttestationDataBySnapshotRequest_snapshot = md_QueryGetAttestationDataBySnapshotRequest.Fields().ByName("snapshot") +} + +var _ protoreflect.Message = (*fastReflection_QueryGetAttestationDataBySnapshotRequest)(nil) + +type fastReflection_QueryGetAttestationDataBySnapshotRequest QueryGetAttestationDataBySnapshotRequest + +func (x *QueryGetAttestationDataBySnapshotRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryGetAttestationDataBySnapshotRequest)(x) +} + +func (x *QueryGetAttestationDataBySnapshotRequest) slowProtoReflect() protoreflect.Message { + mi := &file_layer_bridge_query_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 _fastReflection_QueryGetAttestationDataBySnapshotRequest_messageType fastReflection_QueryGetAttestationDataBySnapshotRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryGetAttestationDataBySnapshotRequest_messageType{} + +type fastReflection_QueryGetAttestationDataBySnapshotRequest_messageType struct{} + +func (x fastReflection_QueryGetAttestationDataBySnapshotRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryGetAttestationDataBySnapshotRequest)(nil) +} +func (x fastReflection_QueryGetAttestationDataBySnapshotRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryGetAttestationDataBySnapshotRequest) +} +func (x fastReflection_QueryGetAttestationDataBySnapshotRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryGetAttestationDataBySnapshotRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryGetAttestationDataBySnapshotRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryGetAttestationDataBySnapshotRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryGetAttestationDataBySnapshotRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryGetAttestationDataBySnapshotRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryGetAttestationDataBySnapshotRequest) New() protoreflect.Message { + return new(fastReflection_QueryGetAttestationDataBySnapshotRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryGetAttestationDataBySnapshotRequest) Interface() protoreflect.ProtoMessage { + return (*QueryGetAttestationDataBySnapshotRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryGetAttestationDataBySnapshotRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Snapshot != "" { + value := protoreflect.ValueOfString(x.Snapshot) + if !f(fd_QueryGetAttestationDataBySnapshotRequest_snapshot, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryGetAttestationDataBySnapshotRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "layer.bridge.QueryGetAttestationDataBySnapshotRequest.snapshot": + return x.Snapshot != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetAttestationDataBySnapshotRequest")) + } + panic(fmt.Errorf("message layer.bridge.QueryGetAttestationDataBySnapshotRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryGetAttestationDataBySnapshotRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "layer.bridge.QueryGetAttestationDataBySnapshotRequest.snapshot": + x.Snapshot = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetAttestationDataBySnapshotRequest")) + } + panic(fmt.Errorf("message layer.bridge.QueryGetAttestationDataBySnapshotRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryGetAttestationDataBySnapshotRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "layer.bridge.QueryGetAttestationDataBySnapshotRequest.snapshot": + value := x.Snapshot + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetAttestationDataBySnapshotRequest")) + } + panic(fmt.Errorf("message layer.bridge.QueryGetAttestationDataBySnapshotRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryGetAttestationDataBySnapshotRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "layer.bridge.QueryGetAttestationDataBySnapshotRequest.snapshot": + x.Snapshot = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetAttestationDataBySnapshotRequest")) + } + panic(fmt.Errorf("message layer.bridge.QueryGetAttestationDataBySnapshotRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryGetAttestationDataBySnapshotRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "layer.bridge.QueryGetAttestationDataBySnapshotRequest.snapshot": + panic(fmt.Errorf("field snapshot of message layer.bridge.QueryGetAttestationDataBySnapshotRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetAttestationDataBySnapshotRequest")) + } + panic(fmt.Errorf("message layer.bridge.QueryGetAttestationDataBySnapshotRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryGetAttestationDataBySnapshotRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "layer.bridge.QueryGetAttestationDataBySnapshotRequest.snapshot": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetAttestationDataBySnapshotRequest")) + } + panic(fmt.Errorf("message layer.bridge.QueryGetAttestationDataBySnapshotRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryGetAttestationDataBySnapshotRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in layer.bridge.QueryGetAttestationDataBySnapshotRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryGetAttestationDataBySnapshotRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryGetAttestationDataBySnapshotRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryGetAttestationDataBySnapshotRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryGetAttestationDataBySnapshotRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryGetAttestationDataBySnapshotRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Snapshot) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryGetAttestationDataBySnapshotRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Snapshot) > 0 { + i -= len(x.Snapshot) + copy(dAtA[i:], x.Snapshot) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Snapshot))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryGetAttestationDataBySnapshotRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetAttestationDataBySnapshotRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetAttestationDataBySnapshotRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Snapshot", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Snapshot = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryGetAttestationDataBySnapshotResponse protoreflect.MessageDescriptor + fd_QueryGetAttestationDataBySnapshotResponse_queryId protoreflect.FieldDescriptor + fd_QueryGetAttestationDataBySnapshotResponse_timestamp protoreflect.FieldDescriptor + fd_QueryGetAttestationDataBySnapshotResponse_aggregateValue protoreflect.FieldDescriptor + fd_QueryGetAttestationDataBySnapshotResponse_aggregatePower protoreflect.FieldDescriptor + fd_QueryGetAttestationDataBySnapshotResponse_checkpoint protoreflect.FieldDescriptor + fd_QueryGetAttestationDataBySnapshotResponse_attestationTimestamp protoreflect.FieldDescriptor + fd_QueryGetAttestationDataBySnapshotResponse_previousReportTimestamp protoreflect.FieldDescriptor + fd_QueryGetAttestationDataBySnapshotResponse_nextReportTimestamp protoreflect.FieldDescriptor +) + +func init() { + file_layer_bridge_query_proto_init() + md_QueryGetAttestationDataBySnapshotResponse = File_layer_bridge_query_proto.Messages().ByName("QueryGetAttestationDataBySnapshotResponse") + fd_QueryGetAttestationDataBySnapshotResponse_queryId = md_QueryGetAttestationDataBySnapshotResponse.Fields().ByName("queryId") + fd_QueryGetAttestationDataBySnapshotResponse_timestamp = md_QueryGetAttestationDataBySnapshotResponse.Fields().ByName("timestamp") + fd_QueryGetAttestationDataBySnapshotResponse_aggregateValue = md_QueryGetAttestationDataBySnapshotResponse.Fields().ByName("aggregateValue") + fd_QueryGetAttestationDataBySnapshotResponse_aggregatePower = md_QueryGetAttestationDataBySnapshotResponse.Fields().ByName("aggregatePower") + fd_QueryGetAttestationDataBySnapshotResponse_checkpoint = md_QueryGetAttestationDataBySnapshotResponse.Fields().ByName("checkpoint") + fd_QueryGetAttestationDataBySnapshotResponse_attestationTimestamp = md_QueryGetAttestationDataBySnapshotResponse.Fields().ByName("attestationTimestamp") + fd_QueryGetAttestationDataBySnapshotResponse_previousReportTimestamp = md_QueryGetAttestationDataBySnapshotResponse.Fields().ByName("previousReportTimestamp") + fd_QueryGetAttestationDataBySnapshotResponse_nextReportTimestamp = md_QueryGetAttestationDataBySnapshotResponse.Fields().ByName("nextReportTimestamp") +} + +var _ protoreflect.Message = (*fastReflection_QueryGetAttestationDataBySnapshotResponse)(nil) + +type fastReflection_QueryGetAttestationDataBySnapshotResponse QueryGetAttestationDataBySnapshotResponse + +func (x *QueryGetAttestationDataBySnapshotResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryGetAttestationDataBySnapshotResponse)(x) +} + +func (x *QueryGetAttestationDataBySnapshotResponse) slowProtoReflect() protoreflect.Message { + mi := &file_layer_bridge_query_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 _fastReflection_QueryGetAttestationDataBySnapshotResponse_messageType fastReflection_QueryGetAttestationDataBySnapshotResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryGetAttestationDataBySnapshotResponse_messageType{} + +type fastReflection_QueryGetAttestationDataBySnapshotResponse_messageType struct{} + +func (x fastReflection_QueryGetAttestationDataBySnapshotResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryGetAttestationDataBySnapshotResponse)(nil) +} +func (x fastReflection_QueryGetAttestationDataBySnapshotResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryGetAttestationDataBySnapshotResponse) +} +func (x fastReflection_QueryGetAttestationDataBySnapshotResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryGetAttestationDataBySnapshotResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryGetAttestationDataBySnapshotResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryGetAttestationDataBySnapshotResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryGetAttestationDataBySnapshotResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryGetAttestationDataBySnapshotResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryGetAttestationDataBySnapshotResponse) New() protoreflect.Message { + return new(fastReflection_QueryGetAttestationDataBySnapshotResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryGetAttestationDataBySnapshotResponse) Interface() protoreflect.ProtoMessage { + return (*QueryGetAttestationDataBySnapshotResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryGetAttestationDataBySnapshotResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.QueryId != "" { + value := protoreflect.ValueOfString(x.QueryId) + if !f(fd_QueryGetAttestationDataBySnapshotResponse_queryId, value) { + return + } + } + if x.Timestamp != "" { + value := protoreflect.ValueOfString(x.Timestamp) + if !f(fd_QueryGetAttestationDataBySnapshotResponse_timestamp, value) { + return + } + } + if x.AggregateValue != "" { + value := protoreflect.ValueOfString(x.AggregateValue) + if !f(fd_QueryGetAttestationDataBySnapshotResponse_aggregateValue, value) { + return + } + } + if x.AggregatePower != "" { + value := protoreflect.ValueOfString(x.AggregatePower) + if !f(fd_QueryGetAttestationDataBySnapshotResponse_aggregatePower, value) { + return + } + } + if x.Checkpoint != "" { + value := protoreflect.ValueOfString(x.Checkpoint) + if !f(fd_QueryGetAttestationDataBySnapshotResponse_checkpoint, value) { + return + } + } + if x.AttestationTimestamp != "" { + value := protoreflect.ValueOfString(x.AttestationTimestamp) + if !f(fd_QueryGetAttestationDataBySnapshotResponse_attestationTimestamp, value) { + return + } + } + if x.PreviousReportTimestamp != "" { + value := protoreflect.ValueOfString(x.PreviousReportTimestamp) + if !f(fd_QueryGetAttestationDataBySnapshotResponse_previousReportTimestamp, value) { + return + } + } + if x.NextReportTimestamp != "" { + value := protoreflect.ValueOfString(x.NextReportTimestamp) + if !f(fd_QueryGetAttestationDataBySnapshotResponse_nextReportTimestamp, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryGetAttestationDataBySnapshotResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.queryId": + return x.QueryId != "" + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.timestamp": + return x.Timestamp != "" + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.aggregateValue": + return x.AggregateValue != "" + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.aggregatePower": + return x.AggregatePower != "" + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.checkpoint": + return x.Checkpoint != "" + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.attestationTimestamp": + return x.AttestationTimestamp != "" + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.previousReportTimestamp": + return x.PreviousReportTimestamp != "" + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.nextReportTimestamp": + return x.NextReportTimestamp != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetAttestationDataBySnapshotResponse")) + } + panic(fmt.Errorf("message layer.bridge.QueryGetAttestationDataBySnapshotResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryGetAttestationDataBySnapshotResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.queryId": + x.QueryId = "" + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.timestamp": + x.Timestamp = "" + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.aggregateValue": + x.AggregateValue = "" + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.aggregatePower": + x.AggregatePower = "" + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.checkpoint": + x.Checkpoint = "" + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.attestationTimestamp": + x.AttestationTimestamp = "" + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.previousReportTimestamp": + x.PreviousReportTimestamp = "" + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.nextReportTimestamp": + x.NextReportTimestamp = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetAttestationDataBySnapshotResponse")) + } + panic(fmt.Errorf("message layer.bridge.QueryGetAttestationDataBySnapshotResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryGetAttestationDataBySnapshotResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.queryId": + value := x.QueryId + return protoreflect.ValueOfString(value) + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.timestamp": + value := x.Timestamp + return protoreflect.ValueOfString(value) + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.aggregateValue": + value := x.AggregateValue + return protoreflect.ValueOfString(value) + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.aggregatePower": + value := x.AggregatePower + return protoreflect.ValueOfString(value) + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.checkpoint": + value := x.Checkpoint + return protoreflect.ValueOfString(value) + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.attestationTimestamp": + value := x.AttestationTimestamp + return protoreflect.ValueOfString(value) + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.previousReportTimestamp": + value := x.PreviousReportTimestamp + return protoreflect.ValueOfString(value) + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.nextReportTimestamp": + value := x.NextReportTimestamp + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetAttestationDataBySnapshotResponse")) + } + panic(fmt.Errorf("message layer.bridge.QueryGetAttestationDataBySnapshotResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryGetAttestationDataBySnapshotResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.queryId": + x.QueryId = value.Interface().(string) + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.timestamp": + x.Timestamp = value.Interface().(string) + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.aggregateValue": + x.AggregateValue = value.Interface().(string) + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.aggregatePower": + x.AggregatePower = value.Interface().(string) + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.checkpoint": + x.Checkpoint = value.Interface().(string) + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.attestationTimestamp": + x.AttestationTimestamp = value.Interface().(string) + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.previousReportTimestamp": + x.PreviousReportTimestamp = value.Interface().(string) + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.nextReportTimestamp": + x.NextReportTimestamp = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetAttestationDataBySnapshotResponse")) + } + panic(fmt.Errorf("message layer.bridge.QueryGetAttestationDataBySnapshotResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryGetAttestationDataBySnapshotResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.queryId": + panic(fmt.Errorf("field queryId of message layer.bridge.QueryGetAttestationDataBySnapshotResponse is not mutable")) + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.timestamp": + panic(fmt.Errorf("field timestamp of message layer.bridge.QueryGetAttestationDataBySnapshotResponse is not mutable")) + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.aggregateValue": + panic(fmt.Errorf("field aggregateValue of message layer.bridge.QueryGetAttestationDataBySnapshotResponse is not mutable")) + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.aggregatePower": + panic(fmt.Errorf("field aggregatePower of message layer.bridge.QueryGetAttestationDataBySnapshotResponse is not mutable")) + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.checkpoint": + panic(fmt.Errorf("field checkpoint of message layer.bridge.QueryGetAttestationDataBySnapshotResponse is not mutable")) + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.attestationTimestamp": + panic(fmt.Errorf("field attestationTimestamp of message layer.bridge.QueryGetAttestationDataBySnapshotResponse is not mutable")) + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.previousReportTimestamp": + panic(fmt.Errorf("field previousReportTimestamp of message layer.bridge.QueryGetAttestationDataBySnapshotResponse is not mutable")) + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.nextReportTimestamp": + panic(fmt.Errorf("field nextReportTimestamp of message layer.bridge.QueryGetAttestationDataBySnapshotResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetAttestationDataBySnapshotResponse")) + } + panic(fmt.Errorf("message layer.bridge.QueryGetAttestationDataBySnapshotResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryGetAttestationDataBySnapshotResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.queryId": + return protoreflect.ValueOfString("") + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.timestamp": + return protoreflect.ValueOfString("") + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.aggregateValue": + return protoreflect.ValueOfString("") + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.aggregatePower": + return protoreflect.ValueOfString("") + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.checkpoint": + return protoreflect.ValueOfString("") + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.attestationTimestamp": + return protoreflect.ValueOfString("") + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.previousReportTimestamp": + return protoreflect.ValueOfString("") + case "layer.bridge.QueryGetAttestationDataBySnapshotResponse.nextReportTimestamp": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetAttestationDataBySnapshotResponse")) + } + panic(fmt.Errorf("message layer.bridge.QueryGetAttestationDataBySnapshotResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryGetAttestationDataBySnapshotResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in layer.bridge.QueryGetAttestationDataBySnapshotResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryGetAttestationDataBySnapshotResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryGetAttestationDataBySnapshotResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryGetAttestationDataBySnapshotResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryGetAttestationDataBySnapshotResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryGetAttestationDataBySnapshotResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.QueryId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Timestamp) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.AggregateValue) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.AggregatePower) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Checkpoint) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.AttestationTimestamp) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.PreviousReportTimestamp) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.NextReportTimestamp) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryGetAttestationDataBySnapshotResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.NextReportTimestamp) > 0 { + i -= len(x.NextReportTimestamp) + copy(dAtA[i:], x.NextReportTimestamp) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NextReportTimestamp))) + i-- + dAtA[i] = 0x42 + } + if len(x.PreviousReportTimestamp) > 0 { + i -= len(x.PreviousReportTimestamp) + copy(dAtA[i:], x.PreviousReportTimestamp) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PreviousReportTimestamp))) + i-- + dAtA[i] = 0x3a + } + if len(x.AttestationTimestamp) > 0 { + i -= len(x.AttestationTimestamp) + copy(dAtA[i:], x.AttestationTimestamp) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AttestationTimestamp))) + i-- + dAtA[i] = 0x32 + } + if len(x.Checkpoint) > 0 { + i -= len(x.Checkpoint) + copy(dAtA[i:], x.Checkpoint) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Checkpoint))) + i-- + dAtA[i] = 0x2a + } + if len(x.AggregatePower) > 0 { + i -= len(x.AggregatePower) + copy(dAtA[i:], x.AggregatePower) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AggregatePower))) + i-- + dAtA[i] = 0x22 + } + if len(x.AggregateValue) > 0 { + i -= len(x.AggregateValue) + copy(dAtA[i:], x.AggregateValue) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AggregateValue))) + i-- + dAtA[i] = 0x1a + } + if len(x.Timestamp) > 0 { + i -= len(x.Timestamp) + copy(dAtA[i:], x.Timestamp) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Timestamp))) + i-- + dAtA[i] = 0x12 + } + if len(x.QueryId) > 0 { + i -= len(x.QueryId) + copy(dAtA[i:], x.QueryId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.QueryId))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryGetAttestationDataBySnapshotResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetAttestationDataBySnapshotResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetAttestationDataBySnapshotResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field QueryId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.QueryId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Timestamp = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AggregateValue", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.AggregateValue = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AggregatePower", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.AggregatePower = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Checkpoint", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Checkpoint = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AttestationTimestamp", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.AttestationTimestamp = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PreviousReportTimestamp", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.PreviousReportTimestamp = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NextReportTimestamp", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.NextReportTimestamp = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryGetAttestationsBySnapshotRequest protoreflect.MessageDescriptor + fd_QueryGetAttestationsBySnapshotRequest_snapshot protoreflect.FieldDescriptor +) + +func init() { + file_layer_bridge_query_proto_init() + md_QueryGetAttestationsBySnapshotRequest = File_layer_bridge_query_proto.Messages().ByName("QueryGetAttestationsBySnapshotRequest") + fd_QueryGetAttestationsBySnapshotRequest_snapshot = md_QueryGetAttestationsBySnapshotRequest.Fields().ByName("snapshot") +} + +var _ protoreflect.Message = (*fastReflection_QueryGetAttestationsBySnapshotRequest)(nil) + +type fastReflection_QueryGetAttestationsBySnapshotRequest QueryGetAttestationsBySnapshotRequest + +func (x *QueryGetAttestationsBySnapshotRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryGetAttestationsBySnapshotRequest)(x) +} + +func (x *QueryGetAttestationsBySnapshotRequest) slowProtoReflect() protoreflect.Message { + mi := &file_layer_bridge_query_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 _fastReflection_QueryGetAttestationsBySnapshotRequest_messageType fastReflection_QueryGetAttestationsBySnapshotRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryGetAttestationsBySnapshotRequest_messageType{} + +type fastReflection_QueryGetAttestationsBySnapshotRequest_messageType struct{} + +func (x fastReflection_QueryGetAttestationsBySnapshotRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryGetAttestationsBySnapshotRequest)(nil) +} +func (x fastReflection_QueryGetAttestationsBySnapshotRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryGetAttestationsBySnapshotRequest) +} +func (x fastReflection_QueryGetAttestationsBySnapshotRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryGetAttestationsBySnapshotRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryGetAttestationsBySnapshotRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryGetAttestationsBySnapshotRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryGetAttestationsBySnapshotRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryGetAttestationsBySnapshotRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryGetAttestationsBySnapshotRequest) New() protoreflect.Message { + return new(fastReflection_QueryGetAttestationsBySnapshotRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryGetAttestationsBySnapshotRequest) Interface() protoreflect.ProtoMessage { + return (*QueryGetAttestationsBySnapshotRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryGetAttestationsBySnapshotRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Snapshot != "" { + value := protoreflect.ValueOfString(x.Snapshot) + if !f(fd_QueryGetAttestationsBySnapshotRequest_snapshot, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryGetAttestationsBySnapshotRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "layer.bridge.QueryGetAttestationsBySnapshotRequest.snapshot": + return x.Snapshot != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetAttestationsBySnapshotRequest")) + } + panic(fmt.Errorf("message layer.bridge.QueryGetAttestationsBySnapshotRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryGetAttestationsBySnapshotRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "layer.bridge.QueryGetAttestationsBySnapshotRequest.snapshot": + x.Snapshot = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetAttestationsBySnapshotRequest")) + } + panic(fmt.Errorf("message layer.bridge.QueryGetAttestationsBySnapshotRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryGetAttestationsBySnapshotRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "layer.bridge.QueryGetAttestationsBySnapshotRequest.snapshot": + value := x.Snapshot + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetAttestationsBySnapshotRequest")) + } + panic(fmt.Errorf("message layer.bridge.QueryGetAttestationsBySnapshotRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryGetAttestationsBySnapshotRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "layer.bridge.QueryGetAttestationsBySnapshotRequest.snapshot": + x.Snapshot = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetAttestationsBySnapshotRequest")) + } + panic(fmt.Errorf("message layer.bridge.QueryGetAttestationsBySnapshotRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryGetAttestationsBySnapshotRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "layer.bridge.QueryGetAttestationsBySnapshotRequest.snapshot": + panic(fmt.Errorf("field snapshot of message layer.bridge.QueryGetAttestationsBySnapshotRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetAttestationsBySnapshotRequest")) + } + panic(fmt.Errorf("message layer.bridge.QueryGetAttestationsBySnapshotRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryGetAttestationsBySnapshotRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "layer.bridge.QueryGetAttestationsBySnapshotRequest.snapshot": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetAttestationsBySnapshotRequest")) + } + panic(fmt.Errorf("message layer.bridge.QueryGetAttestationsBySnapshotRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryGetAttestationsBySnapshotRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in layer.bridge.QueryGetAttestationsBySnapshotRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryGetAttestationsBySnapshotRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryGetAttestationsBySnapshotRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryGetAttestationsBySnapshotRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryGetAttestationsBySnapshotRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryGetAttestationsBySnapshotRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Snapshot) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryGetAttestationsBySnapshotRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Snapshot) > 0 { + i -= len(x.Snapshot) + copy(dAtA[i:], x.Snapshot) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Snapshot))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryGetAttestationsBySnapshotRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetAttestationsBySnapshotRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetAttestationsBySnapshotRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Snapshot", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Snapshot = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryGetAttestationsBySnapshotResponse_1_list)(nil) + +type _QueryGetAttestationsBySnapshotResponse_1_list struct { + list *[]string +} + +func (x *_QueryGetAttestationsBySnapshotResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryGetAttestationsBySnapshotResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_QueryGetAttestationsBySnapshotResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_QueryGetAttestationsBySnapshotResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryGetAttestationsBySnapshotResponse_1_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message QueryGetAttestationsBySnapshotResponse at list field Attestations as it is not of Message kind")) +} + +func (x *_QueryGetAttestationsBySnapshotResponse_1_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_QueryGetAttestationsBySnapshotResponse_1_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_QueryGetAttestationsBySnapshotResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryGetAttestationsBySnapshotResponse protoreflect.MessageDescriptor + fd_QueryGetAttestationsBySnapshotResponse_attestations protoreflect.FieldDescriptor +) + +func init() { + file_layer_bridge_query_proto_init() + md_QueryGetAttestationsBySnapshotResponse = File_layer_bridge_query_proto.Messages().ByName("QueryGetAttestationsBySnapshotResponse") + fd_QueryGetAttestationsBySnapshotResponse_attestations = md_QueryGetAttestationsBySnapshotResponse.Fields().ByName("attestations") +} + +var _ protoreflect.Message = (*fastReflection_QueryGetAttestationsBySnapshotResponse)(nil) + +type fastReflection_QueryGetAttestationsBySnapshotResponse QueryGetAttestationsBySnapshotResponse + +func (x *QueryGetAttestationsBySnapshotResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryGetAttestationsBySnapshotResponse)(x) +} + +func (x *QueryGetAttestationsBySnapshotResponse) slowProtoReflect() protoreflect.Message { + mi := &file_layer_bridge_query_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) +} + +var _fastReflection_QueryGetAttestationsBySnapshotResponse_messageType fastReflection_QueryGetAttestationsBySnapshotResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryGetAttestationsBySnapshotResponse_messageType{} + +type fastReflection_QueryGetAttestationsBySnapshotResponse_messageType struct{} + +func (x fastReflection_QueryGetAttestationsBySnapshotResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryGetAttestationsBySnapshotResponse)(nil) +} +func (x fastReflection_QueryGetAttestationsBySnapshotResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryGetAttestationsBySnapshotResponse) +} +func (x fastReflection_QueryGetAttestationsBySnapshotResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryGetAttestationsBySnapshotResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryGetAttestationsBySnapshotResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryGetAttestationsBySnapshotResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryGetAttestationsBySnapshotResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryGetAttestationsBySnapshotResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryGetAttestationsBySnapshotResponse) New() protoreflect.Message { + return new(fastReflection_QueryGetAttestationsBySnapshotResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryGetAttestationsBySnapshotResponse) Interface() protoreflect.ProtoMessage { + return (*QueryGetAttestationsBySnapshotResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryGetAttestationsBySnapshotResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Attestations) != 0 { + value := protoreflect.ValueOfList(&_QueryGetAttestationsBySnapshotResponse_1_list{list: &x.Attestations}) + if !f(fd_QueryGetAttestationsBySnapshotResponse_attestations, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryGetAttestationsBySnapshotResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "layer.bridge.QueryGetAttestationsBySnapshotResponse.attestations": + return len(x.Attestations) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetAttestationsBySnapshotResponse")) + } + panic(fmt.Errorf("message layer.bridge.QueryGetAttestationsBySnapshotResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryGetAttestationsBySnapshotResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "layer.bridge.QueryGetAttestationsBySnapshotResponse.attestations": + x.Attestations = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetAttestationsBySnapshotResponse")) + } + panic(fmt.Errorf("message layer.bridge.QueryGetAttestationsBySnapshotResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryGetAttestationsBySnapshotResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "layer.bridge.QueryGetAttestationsBySnapshotResponse.attestations": + if len(x.Attestations) == 0 { + return protoreflect.ValueOfList(&_QueryGetAttestationsBySnapshotResponse_1_list{}) + } + listValue := &_QueryGetAttestationsBySnapshotResponse_1_list{list: &x.Attestations} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetAttestationsBySnapshotResponse")) + } + panic(fmt.Errorf("message layer.bridge.QueryGetAttestationsBySnapshotResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryGetAttestationsBySnapshotResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "layer.bridge.QueryGetAttestationsBySnapshotResponse.attestations": + lv := value.List() + clv := lv.(*_QueryGetAttestationsBySnapshotResponse_1_list) + x.Attestations = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetAttestationsBySnapshotResponse")) + } + panic(fmt.Errorf("message layer.bridge.QueryGetAttestationsBySnapshotResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryGetAttestationsBySnapshotResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "layer.bridge.QueryGetAttestationsBySnapshotResponse.attestations": + if x.Attestations == nil { + x.Attestations = []string{} + } + value := &_QueryGetAttestationsBySnapshotResponse_1_list{list: &x.Attestations} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetAttestationsBySnapshotResponse")) + } + panic(fmt.Errorf("message layer.bridge.QueryGetAttestationsBySnapshotResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryGetAttestationsBySnapshotResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "layer.bridge.QueryGetAttestationsBySnapshotResponse.attestations": + list := []string{} + return protoreflect.ValueOfList(&_QueryGetAttestationsBySnapshotResponse_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetAttestationsBySnapshotResponse")) + } + panic(fmt.Errorf("message layer.bridge.QueryGetAttestationsBySnapshotResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryGetAttestationsBySnapshotResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in layer.bridge.QueryGetAttestationsBySnapshotResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryGetAttestationsBySnapshotResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryGetAttestationsBySnapshotResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryGetAttestationsBySnapshotResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryGetAttestationsBySnapshotResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryGetAttestationsBySnapshotResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Attestations) > 0 { + for _, s := range x.Attestations { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryGetAttestationsBySnapshotResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Attestations) > 0 { + for iNdEx := len(x.Attestations) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Attestations[iNdEx]) + copy(dAtA[i:], x.Attestations[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Attestations[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryGetAttestationsBySnapshotResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetAttestationsBySnapshotResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetAttestationsBySnapshotResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Attestations", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Attestations = append(x.Attestations, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 @@ -14853,6 +18005,280 @@ func (x *QueryGetDataBeforeResponse) GetTimestamp() uint64 { return 0 } +type QueryGetSnapshotsByReportRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + QueryId string `protobuf:"bytes,1,opt,name=queryId,proto3" json:"queryId,omitempty"` + Timestamp string `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (x *QueryGetSnapshotsByReportRequest) Reset() { + *x = QueryGetSnapshotsByReportRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_layer_bridge_query_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryGetSnapshotsByReportRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryGetSnapshotsByReportRequest) ProtoMessage() {} + +// Deprecated: Use QueryGetSnapshotsByReportRequest.ProtoReflect.Descriptor instead. +func (*QueryGetSnapshotsByReportRequest) Descriptor() ([]byte, []int) { + return file_layer_bridge_query_proto_rawDescGZIP(), []int{29} +} + +func (x *QueryGetSnapshotsByReportRequest) GetQueryId() string { + if x != nil { + return x.QueryId + } + return "" +} + +func (x *QueryGetSnapshotsByReportRequest) GetTimestamp() string { + if x != nil { + return x.Timestamp + } + return "" +} + +type QueryGetSnapshotsByReportResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Snapshots []string `protobuf:"bytes,1,rep,name=snapshots,proto3" json:"snapshots,omitempty"` +} + +func (x *QueryGetSnapshotsByReportResponse) Reset() { + *x = QueryGetSnapshotsByReportResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_layer_bridge_query_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryGetSnapshotsByReportResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryGetSnapshotsByReportResponse) ProtoMessage() {} + +// Deprecated: Use QueryGetSnapshotsByReportResponse.ProtoReflect.Descriptor instead. +func (*QueryGetSnapshotsByReportResponse) Descriptor() ([]byte, []int) { + return file_layer_bridge_query_proto_rawDescGZIP(), []int{30} +} + +func (x *QueryGetSnapshotsByReportResponse) GetSnapshots() []string { + if x != nil { + return x.Snapshots + } + return nil +} + +type QueryGetAttestationDataBySnapshotRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Snapshot string `protobuf:"bytes,1,opt,name=snapshot,proto3" json:"snapshot,omitempty"` +} + +func (x *QueryGetAttestationDataBySnapshotRequest) Reset() { + *x = QueryGetAttestationDataBySnapshotRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_layer_bridge_query_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryGetAttestationDataBySnapshotRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryGetAttestationDataBySnapshotRequest) ProtoMessage() {} + +// Deprecated: Use QueryGetAttestationDataBySnapshotRequest.ProtoReflect.Descriptor instead. +func (*QueryGetAttestationDataBySnapshotRequest) Descriptor() ([]byte, []int) { + return file_layer_bridge_query_proto_rawDescGZIP(), []int{31} +} + +func (x *QueryGetAttestationDataBySnapshotRequest) GetSnapshot() string { + if x != nil { + return x.Snapshot + } + return "" +} + +type QueryGetAttestationDataBySnapshotResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + QueryId string `protobuf:"bytes,1,opt,name=queryId,proto3" json:"queryId,omitempty"` + Timestamp string `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + AggregateValue string `protobuf:"bytes,3,opt,name=aggregateValue,proto3" json:"aggregateValue,omitempty"` + AggregatePower string `protobuf:"bytes,4,opt,name=aggregatePower,proto3" json:"aggregatePower,omitempty"` + Checkpoint string `protobuf:"bytes,5,opt,name=checkpoint,proto3" json:"checkpoint,omitempty"` + AttestationTimestamp string `protobuf:"bytes,6,opt,name=attestationTimestamp,proto3" json:"attestationTimestamp,omitempty"` + PreviousReportTimestamp string `protobuf:"bytes,7,opt,name=previousReportTimestamp,proto3" json:"previousReportTimestamp,omitempty"` + NextReportTimestamp string `protobuf:"bytes,8,opt,name=nextReportTimestamp,proto3" json:"nextReportTimestamp,omitempty"` +} + +func (x *QueryGetAttestationDataBySnapshotResponse) Reset() { + *x = QueryGetAttestationDataBySnapshotResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_layer_bridge_query_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryGetAttestationDataBySnapshotResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryGetAttestationDataBySnapshotResponse) ProtoMessage() {} + +// Deprecated: Use QueryGetAttestationDataBySnapshotResponse.ProtoReflect.Descriptor instead. +func (*QueryGetAttestationDataBySnapshotResponse) Descriptor() ([]byte, []int) { + return file_layer_bridge_query_proto_rawDescGZIP(), []int{32} +} + +func (x *QueryGetAttestationDataBySnapshotResponse) GetQueryId() string { + if x != nil { + return x.QueryId + } + return "" +} + +func (x *QueryGetAttestationDataBySnapshotResponse) GetTimestamp() string { + if x != nil { + return x.Timestamp + } + return "" +} + +func (x *QueryGetAttestationDataBySnapshotResponse) GetAggregateValue() string { + if x != nil { + return x.AggregateValue + } + return "" +} + +func (x *QueryGetAttestationDataBySnapshotResponse) GetAggregatePower() string { + if x != nil { + return x.AggregatePower + } + return "" +} + +func (x *QueryGetAttestationDataBySnapshotResponse) GetCheckpoint() string { + if x != nil { + return x.Checkpoint + } + return "" +} + +func (x *QueryGetAttestationDataBySnapshotResponse) GetAttestationTimestamp() string { + if x != nil { + return x.AttestationTimestamp + } + return "" +} + +func (x *QueryGetAttestationDataBySnapshotResponse) GetPreviousReportTimestamp() string { + if x != nil { + return x.PreviousReportTimestamp + } + return "" +} + +func (x *QueryGetAttestationDataBySnapshotResponse) GetNextReportTimestamp() string { + if x != nil { + return x.NextReportTimestamp + } + return "" +} + +type QueryGetAttestationsBySnapshotRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Snapshot string `protobuf:"bytes,1,opt,name=snapshot,proto3" json:"snapshot,omitempty"` +} + +func (x *QueryGetAttestationsBySnapshotRequest) Reset() { + *x = QueryGetAttestationsBySnapshotRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_layer_bridge_query_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryGetAttestationsBySnapshotRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryGetAttestationsBySnapshotRequest) ProtoMessage() {} + +// Deprecated: Use QueryGetAttestationsBySnapshotRequest.ProtoReflect.Descriptor instead. +func (*QueryGetAttestationsBySnapshotRequest) Descriptor() ([]byte, []int) { + return file_layer_bridge_query_proto_rawDescGZIP(), []int{33} +} + +func (x *QueryGetAttestationsBySnapshotRequest) GetSnapshot() string { + if x != nil { + return x.Snapshot + } + return "" +} + +type QueryGetAttestationsBySnapshotResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Attestations []string `protobuf:"bytes,1,rep,name=attestations,proto3" json:"attestations,omitempty"` +} + +func (x *QueryGetAttestationsBySnapshotResponse) Reset() { + *x = QueryGetAttestationsBySnapshotResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_layer_bridge_query_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryGetAttestationsBySnapshotResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryGetAttestationsBySnapshotResponse) ProtoMessage() {} + +// Deprecated: Use QueryGetAttestationsBySnapshotResponse.ProtoReflect.Descriptor instead. +func (*QueryGetAttestationsBySnapshotResponse) Descriptor() ([]byte, []int) { + return file_layer_bridge_query_proto_rawDescGZIP(), []int{34} +} + +func (x *QueryGetAttestationsBySnapshotResponse) GetAttestations() []string { + if x != nil { + return x.Attestations + } + return nil +} + var File_layer_bridge_query_proto protoreflect.FileDescriptor var file_layer_bridge_query_proto_rawDesc = []byte{ @@ -15057,7 +18483,54 @@ var file_layer_bridge_query_proto_rawDesc = []byte{ 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x09, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x32, 0xc5, 0x0f, 0x0a, 0x05, 0x51, 0x75, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x5a, 0x0a, 0x20, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x47, 0x65, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x42, 0x79, + 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, + 0x07, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x41, 0x0a, 0x21, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, + 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x42, 0x79, 0x52, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x73, + 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x22, 0x46, 0x0a, 0x28, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, + 0x61, 0x74, 0x61, 0x42, 0x79, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x22, 0xf3, 0x02, 0x0a, 0x29, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, + 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x42, 0x79, 0x53, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, + 0x0a, 0x07, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x26, 0x0a, 0x0e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, + 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x26, + 0x0a, 0x0e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x77, 0x65, 0x72, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, + 0x65, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x68, 0x65, 0x63, + 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x32, 0x0a, 0x14, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x38, 0x0a, 0x17, 0x70, 0x72, + 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x70, 0x72, 0x65, + 0x76, 0x69, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x12, 0x30, 0x0a, 0x13, 0x6e, 0x65, 0x78, 0x74, 0x52, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x13, 0x6e, 0x65, 0x78, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x43, 0x0a, 0x25, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, + 0x65, 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, + 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1a, 0x0a, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x22, 0x4c, 0x0a, 0x26, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x74, 0x74, + 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0xa1, 0x14, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x6b, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, @@ -15182,17 +18655,55 @@ var file_layer_bridge_query_proto_rawDesc = []byte{ 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x2f, 0x7b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x7d, 0x2f, 0x7b, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x7d, 0x42, 0x9c, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, - 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x74, 0x65, 0x6c, 0x6c, 0x6f, 0x72, 0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, - 0x65, 0xa2, 0x02, 0x03, 0x4c, 0x42, 0x58, 0xaa, 0x02, 0x0c, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x2e, - 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0xca, 0x02, 0x0c, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x5c, 0x42, - 0x72, 0x69, 0x64, 0x67, 0x65, 0xe2, 0x02, 0x18, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x5c, 0x42, 0x72, - 0x69, 0x64, 0x67, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x0d, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x3a, 0x3a, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x7d, 0x12, 0xbc, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, + 0x74, 0x73, 0x42, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x2e, 0x2e, 0x6c, 0x61, 0x79, + 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, + 0x65, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x42, 0x79, 0x52, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x6c, 0x61, 0x79, + 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, + 0x65, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x42, 0x79, 0x52, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x43, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x3d, 0x12, 0x3b, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, + 0x67, 0x65, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, + 0x5f, 0x62, 0x79, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x7b, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x49, 0x64, 0x7d, 0x2f, 0x7b, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x7d, + 0x12, 0xd2, 0x01, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x42, 0x79, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, + 0x74, 0x12, 0x36, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x42, 0x79, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x6c, 0x61, 0x79, 0x65, + 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, + 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, + 0x42, 0x79, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x41, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x12, 0x39, 0x2f, 0x6c, 0x61, 0x79, + 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x61, 0x74, + 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x62, + 0x79, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2f, 0x7b, 0x73, 0x6e, 0x61, 0x70, + 0x73, 0x68, 0x6f, 0x74, 0x7d, 0x12, 0xc5, 0x01, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, + 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x53, 0x6e, 0x61, 0x70, 0x73, + 0x68, 0x6f, 0x74, 0x12, 0x33, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, + 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, + 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, + 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x53, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3d, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x37, 0x12, 0x35, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, + 0x72, 0x69, 0x64, 0x67, 0x65, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x2f, 0x7b, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x7d, 0x42, 0x9c, 0x01, + 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, + 0x67, 0x65, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x65, 0x6c, + 0x6c, 0x6f, 0x72, 0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0xa2, 0x02, 0x03, + 0x4c, 0x42, 0x58, 0xaa, 0x02, 0x0c, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x42, 0x72, 0x69, 0x64, + 0x67, 0x65, 0xca, 0x02, 0x0c, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x5c, 0x42, 0x72, 0x69, 0x64, 0x67, + 0x65, 0xe2, 0x02, 0x18, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x5c, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x4c, + 0x61, 0x79, 0x65, 0x72, 0x3a, 0x3a, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -15207,7 +18718,7 @@ func file_layer_bridge_query_proto_rawDescGZIP() []byte { return file_layer_bridge_query_proto_rawDescData } -var file_layer_bridge_query_proto_msgTypes = make([]protoimpl.MessageInfo, 29) +var file_layer_bridge_query_proto_msgTypes = make([]protoimpl.MessageInfo, 35) var file_layer_bridge_query_proto_goTypes = []interface{}{ (*QueryParamsRequest)(nil), // 0: layer.bridge.QueryParamsRequest (*QueryParamsResponse)(nil), // 1: layer.bridge.QueryParamsResponse @@ -15238,18 +18749,24 @@ var file_layer_bridge_query_proto_goTypes = []interface{}{ (*AggregateReporter)(nil), // 26: layer.bridge.AggregateReporter (*QueryGetDataBeforeRequest)(nil), // 27: layer.bridge.QueryGetDataBeforeRequest (*QueryGetDataBeforeResponse)(nil), // 28: layer.bridge.QueryGetDataBeforeResponse - (*Params)(nil), // 29: layer.bridge.Params - (*oracle.Aggregate)(nil), // 30: layer.oracle.Aggregate + (*QueryGetSnapshotsByReportRequest)(nil), // 29: layer.bridge.QueryGetSnapshotsByReportRequest + (*QueryGetSnapshotsByReportResponse)(nil), // 30: layer.bridge.QueryGetSnapshotsByReportResponse + (*QueryGetAttestationDataBySnapshotRequest)(nil), // 31: layer.bridge.QueryGetAttestationDataBySnapshotRequest + (*QueryGetAttestationDataBySnapshotResponse)(nil), // 32: layer.bridge.QueryGetAttestationDataBySnapshotResponse + (*QueryGetAttestationsBySnapshotRequest)(nil), // 33: layer.bridge.QueryGetAttestationsBySnapshotRequest + (*QueryGetAttestationsBySnapshotResponse)(nil), // 34: layer.bridge.QueryGetAttestationsBySnapshotResponse + (*Params)(nil), // 35: layer.bridge.Params + (*oracle.Aggregate)(nil), // 36: layer.oracle.Aggregate } var file_layer_bridge_query_proto_depIdxs = []int32{ - 29, // 0: layer.bridge.QueryParamsResponse.params:type_name -> layer.bridge.Params + 35, // 0: layer.bridge.QueryParamsResponse.params:type_name -> layer.bridge.Params 6, // 1: layer.bridge.QueryGetEvmValidatorsResponse.bridgeValidatorSet:type_name -> layer.bridge.BridgeValidator 6, // 2: layer.bridge.BridgeValidatorSet.bridgeValidatorSet:type_name -> layer.bridge.BridgeValidator 7, // 3: layer.bridge.BridgeValidatorSetParams.bridgeValidatorSet:type_name -> layer.bridge.BridgeValidatorSet 6, // 4: layer.bridge.QueryGetValsetByTimestampResponse.bridgeValidatorSet:type_name -> layer.bridge.BridgeValidator 25, // 5: layer.bridge.QueryGetCurrentAggregateReportResponse.aggregate:type_name -> layer.bridge.Aggregate 26, // 6: layer.bridge.Aggregate.reporters:type_name -> layer.bridge.AggregateReporter - 30, // 7: layer.bridge.QueryGetDataBeforeResponse.aggregate:type_name -> layer.oracle.Aggregate + 36, // 7: layer.bridge.QueryGetDataBeforeResponse.aggregate:type_name -> layer.oracle.Aggregate 0, // 8: layer.bridge.Query.Params:input_type -> layer.bridge.QueryParamsRequest 2, // 9: layer.bridge.Query.GetEvmValidators:input_type -> layer.bridge.QueryGetEvmValidatorsRequest 4, // 10: layer.bridge.Query.GetValidatorCheckpoint:input_type -> layer.bridge.QueryGetValidatorCheckpointRequest @@ -15261,19 +18778,25 @@ var file_layer_bridge_query_proto_depIdxs = []int32{ 21, // 16: layer.bridge.Query.GetValsetByTimestamp:input_type -> layer.bridge.QueryGetValsetByTimestampRequest 23, // 17: layer.bridge.Query.GetCurrentAggregateReport:input_type -> layer.bridge.QueryGetCurrentAggregateReportRequest 27, // 18: layer.bridge.Query.GetDataBefore:input_type -> layer.bridge.QueryGetDataBeforeRequest - 1, // 19: layer.bridge.Query.Params:output_type -> layer.bridge.QueryParamsResponse - 3, // 20: layer.bridge.Query.GetEvmValidators:output_type -> layer.bridge.QueryGetEvmValidatorsResponse - 5, // 21: layer.bridge.Query.GetValidatorCheckpoint:output_type -> layer.bridge.QueryGetValidatorCheckpointResponse - 12, // 22: layer.bridge.Query.GetValidatorCheckpointParams:output_type -> layer.bridge.QueryGetValidatorCheckpointParamsResponse - 14, // 23: layer.bridge.Query.GetValidatorTimestampByIndex:output_type -> layer.bridge.QueryGetValidatorTimestampByIndexResponse - 16, // 24: layer.bridge.Query.GetValsetSigs:output_type -> layer.bridge.QueryGetValsetSigsResponse - 18, // 25: layer.bridge.Query.GetOracleAttestations:output_type -> layer.bridge.QueryGetOracleAttestationsResponse - 20, // 26: layer.bridge.Query.GetEvmAddressByValidatorAddress:output_type -> layer.bridge.QueryGetEvmAddressByValidatorAddressResponse - 22, // 27: layer.bridge.Query.GetValsetByTimestamp:output_type -> layer.bridge.QueryGetValsetByTimestampResponse - 24, // 28: layer.bridge.Query.GetCurrentAggregateReport:output_type -> layer.bridge.QueryGetCurrentAggregateReportResponse - 28, // 29: layer.bridge.Query.GetDataBefore:output_type -> layer.bridge.QueryGetDataBeforeResponse - 19, // [19:30] is the sub-list for method output_type - 8, // [8:19] is the sub-list for method input_type + 29, // 19: layer.bridge.Query.GetSnapshotsByReport:input_type -> layer.bridge.QueryGetSnapshotsByReportRequest + 31, // 20: layer.bridge.Query.GetAttestationDataBySnapshot:input_type -> layer.bridge.QueryGetAttestationDataBySnapshotRequest + 33, // 21: layer.bridge.Query.GetAttestationsBySnapshot:input_type -> layer.bridge.QueryGetAttestationsBySnapshotRequest + 1, // 22: layer.bridge.Query.Params:output_type -> layer.bridge.QueryParamsResponse + 3, // 23: layer.bridge.Query.GetEvmValidators:output_type -> layer.bridge.QueryGetEvmValidatorsResponse + 5, // 24: layer.bridge.Query.GetValidatorCheckpoint:output_type -> layer.bridge.QueryGetValidatorCheckpointResponse + 12, // 25: layer.bridge.Query.GetValidatorCheckpointParams:output_type -> layer.bridge.QueryGetValidatorCheckpointParamsResponse + 14, // 26: layer.bridge.Query.GetValidatorTimestampByIndex:output_type -> layer.bridge.QueryGetValidatorTimestampByIndexResponse + 16, // 27: layer.bridge.Query.GetValsetSigs:output_type -> layer.bridge.QueryGetValsetSigsResponse + 18, // 28: layer.bridge.Query.GetOracleAttestations:output_type -> layer.bridge.QueryGetOracleAttestationsResponse + 20, // 29: layer.bridge.Query.GetEvmAddressByValidatorAddress:output_type -> layer.bridge.QueryGetEvmAddressByValidatorAddressResponse + 22, // 30: layer.bridge.Query.GetValsetByTimestamp:output_type -> layer.bridge.QueryGetValsetByTimestampResponse + 24, // 31: layer.bridge.Query.GetCurrentAggregateReport:output_type -> layer.bridge.QueryGetCurrentAggregateReportResponse + 28, // 32: layer.bridge.Query.GetDataBefore:output_type -> layer.bridge.QueryGetDataBeforeResponse + 30, // 33: layer.bridge.Query.GetSnapshotsByReport:output_type -> layer.bridge.QueryGetSnapshotsByReportResponse + 32, // 34: layer.bridge.Query.GetAttestationDataBySnapshot:output_type -> layer.bridge.QueryGetAttestationDataBySnapshotResponse + 34, // 35: layer.bridge.Query.GetAttestationsBySnapshot:output_type -> layer.bridge.QueryGetAttestationsBySnapshotResponse + 22, // [22:36] is the sub-list for method output_type + 8, // [8:22] is the sub-list for method input_type 8, // [8:8] is the sub-list for extension type_name 8, // [8:8] is the sub-list for extension extendee 0, // [0:8] is the sub-list for field type_name @@ -15634,6 +19157,78 @@ func file_layer_bridge_query_proto_init() { return nil } } + file_layer_bridge_query_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryGetSnapshotsByReportRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_layer_bridge_query_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryGetSnapshotsByReportResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_layer_bridge_query_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryGetAttestationDataBySnapshotRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_layer_bridge_query_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryGetAttestationDataBySnapshotResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_layer_bridge_query_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryGetAttestationsBySnapshotRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_layer_bridge_query_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryGetAttestationsBySnapshotResponse); 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{ @@ -15641,7 +19236,7 @@ func file_layer_bridge_query_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_layer_bridge_query_proto_rawDesc, NumEnums: 0, - NumMessages: 29, + NumMessages: 35, NumExtensions: 0, NumServices: 1, }, diff --git a/api/layer/bridge/query_grpc.pb.go b/api/layer/bridge/query_grpc.pb.go index 7f5613600..41e4f5dc9 100644 --- a/api/layer/bridge/query_grpc.pb.go +++ b/api/layer/bridge/query_grpc.pb.go @@ -31,6 +31,9 @@ type QueryClient interface { GetValsetByTimestamp(ctx context.Context, in *QueryGetValsetByTimestampRequest, opts ...grpc.CallOption) (*QueryGetValsetByTimestampResponse, error) GetCurrentAggregateReport(ctx context.Context, in *QueryGetCurrentAggregateReportRequest, opts ...grpc.CallOption) (*QueryGetCurrentAggregateReportResponse, error) GetDataBefore(ctx context.Context, in *QueryGetDataBeforeRequest, opts ...grpc.CallOption) (*QueryGetDataBeforeResponse, error) + GetSnapshotsByReport(ctx context.Context, in *QueryGetSnapshotsByReportRequest, opts ...grpc.CallOption) (*QueryGetSnapshotsByReportResponse, error) + GetAttestationDataBySnapshot(ctx context.Context, in *QueryGetAttestationDataBySnapshotRequest, opts ...grpc.CallOption) (*QueryGetAttestationDataBySnapshotResponse, error) + GetAttestationsBySnapshot(ctx context.Context, in *QueryGetAttestationsBySnapshotRequest, opts ...grpc.CallOption) (*QueryGetAttestationsBySnapshotResponse, error) } type queryClient struct { @@ -140,6 +143,33 @@ func (c *queryClient) GetDataBefore(ctx context.Context, in *QueryGetDataBeforeR return out, nil } +func (c *queryClient) GetSnapshotsByReport(ctx context.Context, in *QueryGetSnapshotsByReportRequest, opts ...grpc.CallOption) (*QueryGetSnapshotsByReportResponse, error) { + out := new(QueryGetSnapshotsByReportResponse) + err := c.cc.Invoke(ctx, "/layer.bridge.Query/GetSnapshotsByReport", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) GetAttestationDataBySnapshot(ctx context.Context, in *QueryGetAttestationDataBySnapshotRequest, opts ...grpc.CallOption) (*QueryGetAttestationDataBySnapshotResponse, error) { + out := new(QueryGetAttestationDataBySnapshotResponse) + err := c.cc.Invoke(ctx, "/layer.bridge.Query/GetAttestationDataBySnapshot", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) GetAttestationsBySnapshot(ctx context.Context, in *QueryGetAttestationsBySnapshotRequest, opts ...grpc.CallOption) (*QueryGetAttestationsBySnapshotResponse, error) { + out := new(QueryGetAttestationsBySnapshotResponse) + err := c.cc.Invoke(ctx, "/layer.bridge.Query/GetAttestationsBySnapshot", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. // All implementations must embed UnimplementedQueryServer // for forward compatibility @@ -157,6 +187,9 @@ type QueryServer interface { GetValsetByTimestamp(context.Context, *QueryGetValsetByTimestampRequest) (*QueryGetValsetByTimestampResponse, error) GetCurrentAggregateReport(context.Context, *QueryGetCurrentAggregateReportRequest) (*QueryGetCurrentAggregateReportResponse, error) GetDataBefore(context.Context, *QueryGetDataBeforeRequest) (*QueryGetDataBeforeResponse, error) + GetSnapshotsByReport(context.Context, *QueryGetSnapshotsByReportRequest) (*QueryGetSnapshotsByReportResponse, error) + GetAttestationDataBySnapshot(context.Context, *QueryGetAttestationDataBySnapshotRequest) (*QueryGetAttestationDataBySnapshotResponse, error) + GetAttestationsBySnapshot(context.Context, *QueryGetAttestationsBySnapshotRequest) (*QueryGetAttestationsBySnapshotResponse, error) mustEmbedUnimplementedQueryServer() } @@ -197,6 +230,15 @@ func (UnimplementedQueryServer) GetCurrentAggregateReport(context.Context, *Quer func (UnimplementedQueryServer) GetDataBefore(context.Context, *QueryGetDataBeforeRequest) (*QueryGetDataBeforeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetDataBefore not implemented") } +func (UnimplementedQueryServer) GetSnapshotsByReport(context.Context, *QueryGetSnapshotsByReportRequest) (*QueryGetSnapshotsByReportResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSnapshotsByReport not implemented") +} +func (UnimplementedQueryServer) GetAttestationDataBySnapshot(context.Context, *QueryGetAttestationDataBySnapshotRequest) (*QueryGetAttestationDataBySnapshotResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAttestationDataBySnapshot not implemented") +} +func (UnimplementedQueryServer) GetAttestationsBySnapshot(context.Context, *QueryGetAttestationsBySnapshotRequest) (*QueryGetAttestationsBySnapshotResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAttestationsBySnapshot not implemented") +} func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} // UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. @@ -408,6 +450,60 @@ func _Query_GetDataBefore_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } +func _Query_GetSnapshotsByReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetSnapshotsByReportRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GetSnapshotsByReport(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/layer.bridge.Query/GetSnapshotsByReport", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GetSnapshotsByReport(ctx, req.(*QueryGetSnapshotsByReportRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_GetAttestationDataBySnapshot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetAttestationDataBySnapshotRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GetAttestationDataBySnapshot(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/layer.bridge.Query/GetAttestationDataBySnapshot", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GetAttestationDataBySnapshot(ctx, req.(*QueryGetAttestationDataBySnapshotRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_GetAttestationsBySnapshot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetAttestationsBySnapshotRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GetAttestationsBySnapshot(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/layer.bridge.Query/GetAttestationsBySnapshot", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GetAttestationsBySnapshot(ctx, req.(*QueryGetAttestationsBySnapshotRequest)) + } + return interceptor(ctx, in, info, handler) +} + // Query_ServiceDesc is the grpc.ServiceDesc for Query service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -459,6 +555,18 @@ var Query_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetDataBefore", Handler: _Query_GetDataBefore_Handler, }, + { + MethodName: "GetSnapshotsByReport", + Handler: _Query_GetSnapshotsByReport_Handler, + }, + { + MethodName: "GetAttestationDataBySnapshot", + Handler: _Query_GetAttestationDataBySnapshot_Handler, + }, + { + MethodName: "GetAttestationsBySnapshot", + Handler: _Query_GetAttestationsBySnapshot_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "layer/bridge/query.proto", diff --git a/proto/layer/bridge/query.proto b/proto/layer/bridge/query.proto index ca5108eab..5f591d4a2 100644 --- a/proto/layer/bridge/query.proto +++ b/proto/layer/bridge/query.proto @@ -60,9 +60,17 @@ service Query { option (google.api.http).get = "/layer/bridge/get_data_before/{queryId}/{timestamp}"; } - // rpc GetCurrentAggregateReportTest (QueryGetCurrentAggregateReportTestRequest) returns (QueryGetCurrentAggregateReportTestResponse) { - // option (google.api.http).get = "/layer/bridge/get_current_aggregate_report_test/{queryId}"; - // } + rpc GetSnapshotsByReport (QueryGetSnapshotsByReportRequest) returns (QueryGetSnapshotsByReportResponse) { + option (google.api.http).get = "/layer/bridge/get_snapshots_by_report/{queryId}/{timestamp}"; + } + + rpc GetAttestationDataBySnapshot (QueryGetAttestationDataBySnapshotRequest) returns (QueryGetAttestationDataBySnapshotResponse) { + option (google.api.http).get = "/layer/bridge/get_attestation_data_by_snapshot/{snapshot}"; + } + + rpc GetAttestationsBySnapshot (QueryGetAttestationsBySnapshotRequest) returns (QueryGetAttestationsBySnapshotResponse) { + option (google.api.http).get = "/layer/bridge/get_attestations_by_snapshot/{snapshot}"; + } } // QueryParamsRequest is request type for the Query/Params RPC method. message QueryParamsRequest {} @@ -203,11 +211,34 @@ message QueryGetDataBeforeResponse { uint64 timestamp = 2; } -// message QueryGetCurrentAggregateReportTestRequest { -// string queryId = 1; -// } +message QueryGetSnapshotsByReportRequest { + string queryId = 1; + string timestamp = 2; +} + +message QueryGetSnapshotsByReportResponse { + repeated string snapshots = 1; +} + +message QueryGetAttestationDataBySnapshotRequest { + string snapshot = 1; +} + +message QueryGetAttestationDataBySnapshotResponse { + string queryId = 1; + string timestamp = 2; + string aggregateValue = 3; + string aggregatePower = 4; + string checkpoint = 5; + string attestationTimestamp = 6; + string previousReportTimestamp = 7; + string nextReportTimestamp = 8; +} -// message QueryGetCurrentAggregateReportTestResponse { -// layer.oracle.Aggregate aggregate = 1; -// uint64 timestamp = 2; -// } +message QueryGetAttestationsBySnapshotRequest { + string snapshot = 1; +} + +message QueryGetAttestationsBySnapshotResponse { + repeated string attestations = 1; +} diff --git a/x/bridge/client/cli/query.go b/x/bridge/client/cli/query.go index a8f5fe54b..34240d37d 100644 --- a/x/bridge/client/cli/query.go +++ b/x/bridge/client/cli/query.go @@ -32,7 +32,9 @@ func GetQueryCmd(queryRoute string) *cobra.Command { cmd.AddCommand(CmdGetValsetByTimestamp()) cmd.AddCommand(CmdGetCurrentAggregateReport()) cmd.AddCommand(CmdGetDataBefore()) - + cmd.AddCommand(CmdGetSnapshotsByReport()) + cmd.AddCommand(CmdGetAttestationDataBySnapshot()) + cmd.AddCommand(CmdGetAttestationsBySnapshot()) // this line is used by starport scaffolding # 1 return cmd diff --git a/x/bridge/client/cli/query_get_attestation_data_by_snapshot.go b/x/bridge/client/cli/query_get_attestation_data_by_snapshot.go new file mode 100644 index 000000000..a3b9f9bea --- /dev/null +++ b/x/bridge/client/cli/query_get_attestation_data_by_snapshot.go @@ -0,0 +1,45 @@ +package cli + +import ( + "strconv" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/spf13/cobra" + "github.com/tellor-io/layer/x/bridge/types" +) + +var _ = strconv.Itoa(0) + +func CmdGetSnapshotsByReport() *cobra.Command { + cmd := &cobra.Command{ + Use: "get-snapshots-by-report [queryId] [timestamp]", + Short: "Query get-snapshots-by-report", + Args: cobra.ExactArgs(2), + RunE: func(cmd *cobra.Command, args []string) (err error) { + + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + queryId := args[0] + timestamp := args[1] + + queryClient := types.NewQueryClient(clientCtx) + + params := &types.QueryGetSnapshotsByReportRequest{QueryId: queryId, Timestamp: timestamp} + + res, err := queryClient.GetSnapshotsByReport(cmd.Context(), params) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} diff --git a/x/bridge/client/cli/query_get_attestations_by_snapshot.go b/x/bridge/client/cli/query_get_attestations_by_snapshot.go new file mode 100644 index 000000000..847158067 --- /dev/null +++ b/x/bridge/client/cli/query_get_attestations_by_snapshot.go @@ -0,0 +1,44 @@ +package cli + +import ( + "strconv" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/spf13/cobra" + "github.com/tellor-io/layer/x/bridge/types" +) + +var _ = strconv.Itoa(0) + +func CmdGetAttestationsBySnapshot() *cobra.Command { + cmd := &cobra.Command{ + Use: "get-attestations-by-snapshot [snapshot]", + Short: "Query get-attestations-by-snapshot", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) (err error) { + + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + snapshot := args[0] + + queryClient := types.NewQueryClient(clientCtx) + + params := &types.QueryGetAttestationsBySnapshotRequest{Snapshot: snapshot} + + res, err := queryClient.GetAttestationsBySnapshot(cmd.Context(), params) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} diff --git a/x/bridge/client/cli/query_get_snapshots.by_report.go b/x/bridge/client/cli/query_get_snapshots.by_report.go new file mode 100644 index 000000000..dbf8e4651 --- /dev/null +++ b/x/bridge/client/cli/query_get_snapshots.by_report.go @@ -0,0 +1,44 @@ +package cli + +import ( + "strconv" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/spf13/cobra" + "github.com/tellor-io/layer/x/bridge/types" +) + +var _ = strconv.Itoa(0) + +func CmdGetAttestationDataBySnapshot() *cobra.Command { + cmd := &cobra.Command{ + Use: "get-attestation-data-by-snapshot [snapshot]", + Short: "Query get-attestation-data-by-snapshot", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) (err error) { + + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + snapshot := args[0] + + queryClient := types.NewQueryClient(clientCtx) + + params := &types.QueryGetAttestationDataBySnapshotRequest{Snapshot: snapshot} + + res, err := queryClient.GetAttestationDataBySnapshot(cmd.Context(), params) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} diff --git a/x/bridge/keeper/query_get_attestation_data_by_snapshot.go b/x/bridge/keeper/query_get_attestation_data_by_snapshot.go new file mode 100644 index 000000000..8849ca2c8 --- /dev/null +++ b/x/bridge/keeper/query_get_attestation_data_by_snapshot.go @@ -0,0 +1,46 @@ +package keeper + +import ( + "context" + "encoding/hex" + "fmt" + "strconv" + "time" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/tellor-io/layer/x/bridge/types" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +func (k Keeper) GetAttestationDataBySnapshot(goCtx context.Context, req *types.QueryGetAttestationDataBySnapshotRequest) (*types.QueryGetAttestationDataBySnapshotResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + snapshot := req.Snapshot + + ctx := sdk.UnwrapSDKContext(goCtx) + + snapshotData, err := k.AttestSnapshotDataMap.Get(ctx, snapshot) + if err != nil { + return nil, status.Error(codes.InvalidArgument, fmt.Sprintf("snapshot not found for snapshot %s", snapshot)) + } + queryId := snapshotData.QueryId + timestampTime := time.Unix(snapshotData.Timestamp, 0) + + aggReport, err := k.oracleKeeper.GetAggregateByTimestamp(ctx, queryId, timestampTime) + if err != nil { + return nil, status.Error(codes.InvalidArgument, fmt.Sprintf("aggregate not found for queryId %s and timestamp %s", queryId, timestampTime)) + } + + queryIdStr := hex.EncodeToString(queryId) + timestampStr := strconv.FormatInt(snapshotData.Timestamp, 10) + aggValueStr := aggReport.AggregateValue + aggPowerStr := strconv.FormatInt(aggReport.ReporterPower, 10) + checkpointStr := hex.EncodeToString(snapshotData.ValidatorCheckpoint) + attestationTimestampStr := strconv.FormatInt(snapshotData.Timestamp, 10) + previousReportTimestampStr := strconv.FormatInt(snapshotData.PrevReportTimestamp, 10) + nextReportTimestampStr := strconv.FormatInt(snapshotData.NextReportTimestamp, 10) + + return &types.QueryGetAttestationDataBySnapshotResponse{QueryId: queryIdStr, Timestamp: timestampStr, AggregateValue: aggValueStr, AggregatePower: aggPowerStr, Checkpoint: checkpointStr, AttestationTimestamp: attestationTimestampStr, PreviousReportTimestamp: previousReportTimestampStr, NextReportTimestamp: nextReportTimestampStr}, nil +} diff --git a/x/bridge/keeper/query_get_attestations_by_snapshot.go b/x/bridge/keeper/query_get_attestations_by_snapshot.go new file mode 100644 index 000000000..ac32bc6f0 --- /dev/null +++ b/x/bridge/keeper/query_get_attestations_by_snapshot.go @@ -0,0 +1,33 @@ +package keeper + +import ( + "context" + "encoding/hex" + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/tellor-io/layer/x/bridge/types" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +func (k Keeper) GetAttestationsBySnapshot(goCtx context.Context, req *types.QueryGetAttestationsBySnapshotRequest) (*types.QueryGetAttestationsBySnapshotResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + snapshot := req.Snapshot + + ctx := sdk.UnwrapSDKContext(goCtx) + + attestations, err := k.SnapshotToAttestationsMap.Get(ctx, snapshot) + if err != nil { + return nil, status.Error(codes.InvalidArgument, fmt.Sprintf("attestations not found for snapshot %s", snapshot)) + } + + var attestationStringArray []string + for _, attestation := range attestations.Attestations { + attestationStringArray = append(attestationStringArray, hex.EncodeToString(attestation)) + } + + return &types.QueryGetAttestationsBySnapshotResponse{Attestations: attestationStringArray}, nil +} diff --git a/x/bridge/keeper/query_get_snapshots_by_report.go b/x/bridge/keeper/query_get_snapshots_by_report.go new file mode 100644 index 000000000..27ab522f7 --- /dev/null +++ b/x/bridge/keeper/query_get_snapshots_by_report.go @@ -0,0 +1,47 @@ +package keeper + +import ( + "context" + "encoding/hex" + "fmt" + "strconv" + "time" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/ethereum/go-ethereum/crypto" + "github.com/tellor-io/layer/x/bridge/types" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +func (k Keeper) GetSnapshotsByReport(goCtx context.Context, req *types.QueryGetSnapshotsByReportRequest) (*types.QueryGetSnapshotsByReportResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + queryIdStr := req.QueryId + timestampStr := req.Timestamp + queryIdBytes, err := hex.DecodeString(queryIdStr) + if err != nil { + return nil, status.Error(codes.InvalidArgument, fmt.Sprintf("invalid queryId %s", queryIdStr)) + } + timestampInt, err := strconv.ParseInt(timestampStr, 10, 64) + if err != nil { + return nil, status.Error(codes.InvalidArgument, fmt.Sprintf("invalid timestamp %s", timestampStr)) + } + timestampTime := time.Unix(timestampInt, 0) + + ctx := sdk.UnwrapSDKContext(goCtx) + key := hex.EncodeToString(crypto.Keccak256([]byte(hex.EncodeToString(queryIdBytes) + fmt.Sprint(timestampTime.Unix())))) + // key := hex.EncodeToString(crypto.Keccak256([]byte(queryId + timestamp))) + snapshots, err := k.AttestSnapshotsByReportMap.Get(ctx, key) + if err != nil { + return nil, status.Error(codes.InvalidArgument, fmt.Sprintf("snapshots not found for queryId %s and timestamp %s", queryIdStr, timestampStr)) + } + + var snapshotStringArray []string + for _, snapshot := range snapshots.Snapshots { + snapshotStringArray = append(snapshotStringArray, hex.EncodeToString(snapshot)) + } + + return &types.QueryGetSnapshotsByReportResponse{Snapshots: snapshotStringArray}, nil +} diff --git a/x/bridge/types/query.pb.go b/x/bridge/types/query.pb.go index a65c5c45f..785d2b6d3 100644 --- a/x/bridge/types/query.pb.go +++ b/x/bridge/types/query.pb.go @@ -1501,6 +1501,342 @@ func (m *QueryGetDataBeforeResponse) GetTimestamp() uint64 { return 0 } +type QueryGetSnapshotsByReportRequest struct { + QueryId string `protobuf:"bytes,1,opt,name=queryId,proto3" json:"queryId,omitempty"` + Timestamp string `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (m *QueryGetSnapshotsByReportRequest) Reset() { *m = QueryGetSnapshotsByReportRequest{} } +func (m *QueryGetSnapshotsByReportRequest) String() string { return proto.CompactTextString(m) } +func (*QueryGetSnapshotsByReportRequest) ProtoMessage() {} +func (*QueryGetSnapshotsByReportRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e48df680904493de, []int{29} +} +func (m *QueryGetSnapshotsByReportRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetSnapshotsByReportRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGetSnapshotsByReportRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryGetSnapshotsByReportRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetSnapshotsByReportRequest.Merge(m, src) +} +func (m *QueryGetSnapshotsByReportRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryGetSnapshotsByReportRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetSnapshotsByReportRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetSnapshotsByReportRequest proto.InternalMessageInfo + +func (m *QueryGetSnapshotsByReportRequest) GetQueryId() string { + if m != nil { + return m.QueryId + } + return "" +} + +func (m *QueryGetSnapshotsByReportRequest) GetTimestamp() string { + if m != nil { + return m.Timestamp + } + return "" +} + +type QueryGetSnapshotsByReportResponse struct { + Snapshots []string `protobuf:"bytes,1,rep,name=snapshots,proto3" json:"snapshots,omitempty"` +} + +func (m *QueryGetSnapshotsByReportResponse) Reset() { *m = QueryGetSnapshotsByReportResponse{} } +func (m *QueryGetSnapshotsByReportResponse) String() string { return proto.CompactTextString(m) } +func (*QueryGetSnapshotsByReportResponse) ProtoMessage() {} +func (*QueryGetSnapshotsByReportResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e48df680904493de, []int{30} +} +func (m *QueryGetSnapshotsByReportResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetSnapshotsByReportResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGetSnapshotsByReportResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryGetSnapshotsByReportResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetSnapshotsByReportResponse.Merge(m, src) +} +func (m *QueryGetSnapshotsByReportResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryGetSnapshotsByReportResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetSnapshotsByReportResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetSnapshotsByReportResponse proto.InternalMessageInfo + +func (m *QueryGetSnapshotsByReportResponse) GetSnapshots() []string { + if m != nil { + return m.Snapshots + } + return nil +} + +type QueryGetAttestationDataBySnapshotRequest struct { + Snapshot string `protobuf:"bytes,1,opt,name=snapshot,proto3" json:"snapshot,omitempty"` +} + +func (m *QueryGetAttestationDataBySnapshotRequest) Reset() { + *m = QueryGetAttestationDataBySnapshotRequest{} +} +func (m *QueryGetAttestationDataBySnapshotRequest) String() string { return proto.CompactTextString(m) } +func (*QueryGetAttestationDataBySnapshotRequest) ProtoMessage() {} +func (*QueryGetAttestationDataBySnapshotRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e48df680904493de, []int{31} +} +func (m *QueryGetAttestationDataBySnapshotRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetAttestationDataBySnapshotRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGetAttestationDataBySnapshotRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryGetAttestationDataBySnapshotRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetAttestationDataBySnapshotRequest.Merge(m, src) +} +func (m *QueryGetAttestationDataBySnapshotRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryGetAttestationDataBySnapshotRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetAttestationDataBySnapshotRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetAttestationDataBySnapshotRequest proto.InternalMessageInfo + +func (m *QueryGetAttestationDataBySnapshotRequest) GetSnapshot() string { + if m != nil { + return m.Snapshot + } + return "" +} + +type QueryGetAttestationDataBySnapshotResponse struct { + QueryId string `protobuf:"bytes,1,opt,name=queryId,proto3" json:"queryId,omitempty"` + Timestamp string `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + AggregateValue string `protobuf:"bytes,3,opt,name=aggregateValue,proto3" json:"aggregateValue,omitempty"` + AggregatePower string `protobuf:"bytes,4,opt,name=aggregatePower,proto3" json:"aggregatePower,omitempty"` + Checkpoint string `protobuf:"bytes,5,opt,name=checkpoint,proto3" json:"checkpoint,omitempty"` + AttestationTimestamp string `protobuf:"bytes,6,opt,name=attestationTimestamp,proto3" json:"attestationTimestamp,omitempty"` + PreviousReportTimestamp string `protobuf:"bytes,7,opt,name=previousReportTimestamp,proto3" json:"previousReportTimestamp,omitempty"` + NextReportTimestamp string `protobuf:"bytes,8,opt,name=nextReportTimestamp,proto3" json:"nextReportTimestamp,omitempty"` +} + +func (m *QueryGetAttestationDataBySnapshotResponse) Reset() { + *m = QueryGetAttestationDataBySnapshotResponse{} +} +func (m *QueryGetAttestationDataBySnapshotResponse) String() string { + return proto.CompactTextString(m) +} +func (*QueryGetAttestationDataBySnapshotResponse) ProtoMessage() {} +func (*QueryGetAttestationDataBySnapshotResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e48df680904493de, []int{32} +} +func (m *QueryGetAttestationDataBySnapshotResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetAttestationDataBySnapshotResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGetAttestationDataBySnapshotResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryGetAttestationDataBySnapshotResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetAttestationDataBySnapshotResponse.Merge(m, src) +} +func (m *QueryGetAttestationDataBySnapshotResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryGetAttestationDataBySnapshotResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetAttestationDataBySnapshotResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetAttestationDataBySnapshotResponse proto.InternalMessageInfo + +func (m *QueryGetAttestationDataBySnapshotResponse) GetQueryId() string { + if m != nil { + return m.QueryId + } + return "" +} + +func (m *QueryGetAttestationDataBySnapshotResponse) GetTimestamp() string { + if m != nil { + return m.Timestamp + } + return "" +} + +func (m *QueryGetAttestationDataBySnapshotResponse) GetAggregateValue() string { + if m != nil { + return m.AggregateValue + } + return "" +} + +func (m *QueryGetAttestationDataBySnapshotResponse) GetAggregatePower() string { + if m != nil { + return m.AggregatePower + } + return "" +} + +func (m *QueryGetAttestationDataBySnapshotResponse) GetCheckpoint() string { + if m != nil { + return m.Checkpoint + } + return "" +} + +func (m *QueryGetAttestationDataBySnapshotResponse) GetAttestationTimestamp() string { + if m != nil { + return m.AttestationTimestamp + } + return "" +} + +func (m *QueryGetAttestationDataBySnapshotResponse) GetPreviousReportTimestamp() string { + if m != nil { + return m.PreviousReportTimestamp + } + return "" +} + +func (m *QueryGetAttestationDataBySnapshotResponse) GetNextReportTimestamp() string { + if m != nil { + return m.NextReportTimestamp + } + return "" +} + +type QueryGetAttestationsBySnapshotRequest struct { + Snapshot string `protobuf:"bytes,1,opt,name=snapshot,proto3" json:"snapshot,omitempty"` +} + +func (m *QueryGetAttestationsBySnapshotRequest) Reset() { *m = QueryGetAttestationsBySnapshotRequest{} } +func (m *QueryGetAttestationsBySnapshotRequest) String() string { return proto.CompactTextString(m) } +func (*QueryGetAttestationsBySnapshotRequest) ProtoMessage() {} +func (*QueryGetAttestationsBySnapshotRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e48df680904493de, []int{33} +} +func (m *QueryGetAttestationsBySnapshotRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetAttestationsBySnapshotRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGetAttestationsBySnapshotRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryGetAttestationsBySnapshotRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetAttestationsBySnapshotRequest.Merge(m, src) +} +func (m *QueryGetAttestationsBySnapshotRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryGetAttestationsBySnapshotRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetAttestationsBySnapshotRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetAttestationsBySnapshotRequest proto.InternalMessageInfo + +func (m *QueryGetAttestationsBySnapshotRequest) GetSnapshot() string { + if m != nil { + return m.Snapshot + } + return "" +} + +type QueryGetAttestationsBySnapshotResponse struct { + Attestations []string `protobuf:"bytes,1,rep,name=attestations,proto3" json:"attestations,omitempty"` +} + +func (m *QueryGetAttestationsBySnapshotResponse) Reset() { + *m = QueryGetAttestationsBySnapshotResponse{} +} +func (m *QueryGetAttestationsBySnapshotResponse) String() string { return proto.CompactTextString(m) } +func (*QueryGetAttestationsBySnapshotResponse) ProtoMessage() {} +func (*QueryGetAttestationsBySnapshotResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e48df680904493de, []int{34} +} +func (m *QueryGetAttestationsBySnapshotResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetAttestationsBySnapshotResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGetAttestationsBySnapshotResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryGetAttestationsBySnapshotResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetAttestationsBySnapshotResponse.Merge(m, src) +} +func (m *QueryGetAttestationsBySnapshotResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryGetAttestationsBySnapshotResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetAttestationsBySnapshotResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetAttestationsBySnapshotResponse proto.InternalMessageInfo + +func (m *QueryGetAttestationsBySnapshotResponse) GetAttestations() []string { + if m != nil { + return m.Attestations + } + return nil +} + func init() { proto.RegisterType((*QueryParamsRequest)(nil), "layer.bridge.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "layer.bridge.QueryParamsResponse") @@ -1531,102 +1867,123 @@ func init() { proto.RegisterType((*AggregateReporter)(nil), "layer.bridge.AggregateReporter") proto.RegisterType((*QueryGetDataBeforeRequest)(nil), "layer.bridge.QueryGetDataBeforeRequest") proto.RegisterType((*QueryGetDataBeforeResponse)(nil), "layer.bridge.QueryGetDataBeforeResponse") + proto.RegisterType((*QueryGetSnapshotsByReportRequest)(nil), "layer.bridge.QueryGetSnapshotsByReportRequest") + proto.RegisterType((*QueryGetSnapshotsByReportResponse)(nil), "layer.bridge.QueryGetSnapshotsByReportResponse") + proto.RegisterType((*QueryGetAttestationDataBySnapshotRequest)(nil), "layer.bridge.QueryGetAttestationDataBySnapshotRequest") + proto.RegisterType((*QueryGetAttestationDataBySnapshotResponse)(nil), "layer.bridge.QueryGetAttestationDataBySnapshotResponse") + proto.RegisterType((*QueryGetAttestationsBySnapshotRequest)(nil), "layer.bridge.QueryGetAttestationsBySnapshotRequest") + proto.RegisterType((*QueryGetAttestationsBySnapshotResponse)(nil), "layer.bridge.QueryGetAttestationsBySnapshotResponse") } func init() { proto.RegisterFile("layer/bridge/query.proto", fileDescriptor_e48df680904493de) } var fileDescriptor_e48df680904493de = []byte{ - // 1432 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0xcf, 0x6f, 0x1b, 0xc5, - 0x17, 0xcf, 0xc6, 0x49, 0x5a, 0xbf, 0xfe, 0x9e, 0xfa, 0xdb, 0x6e, 0x2d, 0xd7, 0x75, 0xf7, 0x5b, - 0x82, 0xfb, 0x03, 0x6f, 0x93, 0xb4, 0xa5, 0xa1, 0x2d, 0x6a, 0x9c, 0x56, 0x6d, 0x0e, 0x85, 0x74, - 0x53, 0x15, 0x01, 0x07, 0x6b, 0x6c, 0x4f, 0xd7, 0xab, 0xda, 0xbb, 0xee, 0xee, 0xd8, 0xd4, 0x8a, - 0x72, 0xe1, 0xc8, 0x09, 0x09, 0x71, 0xe6, 0x2f, 0xe0, 0x00, 0xe2, 0xc4, 0x85, 0x0b, 0x48, 0xbd, - 0x51, 0xc1, 0x85, 0x13, 0x42, 0x2d, 0x12, 0xff, 0x06, 0xda, 0xd9, 0xd9, 0xdf, 0xb3, 0xb6, 0x13, - 0xe0, 0xd4, 0xec, 0xfb, 0xf9, 0xf9, 0xbc, 0x79, 0xf3, 0xe6, 0xb9, 0x20, 0x77, 0xf1, 0x88, 0xd8, - 0x6a, 0xd3, 0x36, 0xda, 0x3a, 0x51, 0x9f, 0x0d, 0x88, 0x3d, 0xaa, 0xf5, 0x6d, 0x8b, 0x5a, 0xe8, - 0x20, 0xd3, 0xd4, 0x3c, 0x4d, 0xb1, 0xa0, 0x5b, 0xba, 0xc5, 0x14, 0xaa, 0xfb, 0x97, 0x67, 0x53, - 0x2c, 0xe9, 0x96, 0xa5, 0x77, 0x89, 0x8a, 0xfb, 0x86, 0x8a, 0x4d, 0xd3, 0xa2, 0x98, 0x1a, 0x96, - 0xe9, 0x70, 0xed, 0x85, 0x96, 0xe5, 0xf4, 0x2c, 0x47, 0x6d, 0x62, 0x87, 0x87, 0x56, 0x87, 0x4b, - 0x4d, 0x42, 0xf1, 0x92, 0xda, 0xc7, 0xba, 0x61, 0x32, 0x63, 0x6e, 0x7b, 0x2a, 0x86, 0xa3, 0x8f, - 0x6d, 0xdc, 0xf3, 0xc3, 0x94, 0x3c, 0x95, 0x65, 0xe3, 0x96, 0x9b, 0x4a, 0xd7, 0x6d, 0xa2, 0x63, - 0x4a, 0x3c, 0xad, 0x52, 0x00, 0xf4, 0xd0, 0x0d, 0xbd, 0xc9, 0x5c, 0x34, 0xf2, 0x6c, 0x40, 0x1c, - 0xaa, 0x6c, 0xc0, 0xf1, 0x98, 0xd4, 0xe9, 0x5b, 0xa6, 0x43, 0xd0, 0x32, 0x2c, 0x78, 0xa1, 0x65, - 0xa9, 0x22, 0x55, 0x0f, 0x2c, 0x17, 0x6a, 0x51, 0x92, 0x35, 0xcf, 0xba, 0x3e, 0xf7, 0xe2, 0xf7, - 0x33, 0x33, 0x1a, 0xb7, 0x54, 0xca, 0x50, 0x62, 0xa1, 0xee, 0x11, 0x7a, 0x77, 0xd8, 0x7b, 0x8c, - 0xbb, 0x46, 0x1b, 0x53, 0xcb, 0x0e, 0x52, 0x99, 0x70, 0x3a, 0x43, 0xcf, 0x93, 0x3e, 0x00, 0xe4, - 0xc5, 0x0f, 0x74, 0x5b, 0x84, 0xca, 0x52, 0x25, 0x57, 0x3d, 0xb0, 0x7c, 0x3a, 0x0e, 0xa0, 0x1e, - 0xb7, 0xd3, 0x04, 0x8e, 0xca, 0x39, 0x50, 0xfc, 0x7c, 0x81, 0x7c, 0xbd, 0x43, 0x5a, 0x4f, 0xfb, - 0x96, 0x61, 0x52, 0x1f, 0xd5, 0x07, 0xf0, 0xff, 0xb1, 0x56, 0x1c, 0xdb, 0x65, 0x38, 0x3e, 0x4c, - 0xab, 0x59, 0x75, 0xf2, 0x9a, 0x48, 0xa5, 0x3c, 0x84, 0x23, 0x09, 0x94, 0xa8, 0x0a, 0x47, 0x08, - 0xed, 0x10, 0x9b, 0x0c, 0x7a, 0x6b, 0xed, 0xb6, 0x4d, 0x1c, 0x87, 0x07, 0x48, 0x8a, 0x51, 0x01, - 0xe6, 0xfb, 0xd6, 0x27, 0xc4, 0x96, 0x67, 0x2b, 0x52, 0x75, 0x4e, 0xf3, 0x3e, 0x94, 0x16, 0xa0, - 0x7a, 0x8a, 0xe7, 0xbf, 0x5d, 0xb6, 0xef, 0x66, 0x41, 0x4e, 0x67, 0xf1, 0x4e, 0x1c, 0x6d, 0x66, - 0xe4, 0x72, 0x7b, 0xa4, 0x32, 0x36, 0xd7, 0x16, 0xa1, 0xa2, 0x74, 0xa8, 0x06, 0x28, 0xa8, 0xde, - 0x23, 0xa3, 0x47, 0x1c, 0x8a, 0x7b, 0x7d, 0x46, 0x3b, 0xa7, 0x09, 0x34, 0xe8, 0x3a, 0x9c, 0x0c, - 0xa4, 0x9b, 0x6e, 0x55, 0x1e, 0x75, 0x6c, 0xe2, 0x74, 0xac, 0x6e, 0x5b, 0xce, 0x31, 0xa7, 0x2c, - 0x35, 0xba, 0x00, 0x47, 0x87, 0x91, 0xcc, 0xf7, 0xb1, 0xd3, 0x91, 0xe7, 0x2a, 0x52, 0xf5, 0xa0, - 0x96, 0x92, 0x67, 0x1d, 0xf7, 0x3c, 0x33, 0x17, 0x1e, 0xf7, 0xf7, 0x12, 0x28, 0x69, 0xca, 0xa1, - 0x01, 0x2f, 0xa0, 0x98, 0xae, 0xb4, 0x17, 0xba, 0xb3, 0xbb, 0xa7, 0x9b, 0x13, 0xd3, 0x55, 0x36, - 0xa1, 0x34, 0x0e, 0xfb, 0xb8, 0xee, 0xcf, 0x28, 0xc7, 0x7d, 0xa8, 0x8e, 0xb9, 0x56, 0xb1, 0x19, - 0x84, 0x4a, 0x90, 0xa7, 0x89, 0x52, 0x84, 0x02, 0xe5, 0x1b, 0x09, 0xce, 0x4f, 0x11, 0x8a, 0xdf, - 0xd3, 0x32, 0x40, 0x2b, 0x79, 0x3d, 0x23, 0x12, 0x57, 0x3f, 0xc4, 0x5d, 0x87, 0xd7, 0x63, 0xd6, - 0xd3, 0x87, 0x92, 0x38, 0x96, 0x5c, 0x02, 0x0b, 0x5a, 0x84, 0xc3, 0xfd, 0xf8, 0x21, 0xcc, 0x31, - 0x93, 0x84, 0x54, 0xb9, 0x2d, 0x60, 0x1f, 0x9c, 0x69, 0x7d, 0xb4, 0x61, 0xb6, 0xc9, 0x73, 0x9f, - 0x7d, 0x01, 0xe6, 0x0d, 0xf7, 0x9b, 0x33, 0xf7, 0x3e, 0x94, 0x0d, 0x01, 0xe9, 0x74, 0x04, 0x4e, - 0x7a, 0x7c, 0x01, 0x57, 0xe1, 0x54, 0x24, 0x94, 0x43, 0xe8, 0x96, 0xa1, 0x4f, 0x59, 0xfb, 0x9b, - 0x50, 0x14, 0xb9, 0x86, 0xb5, 0x76, 0x0c, 0xdd, 0xc4, 0x74, 0x60, 0x13, 0x87, 0x0d, 0x9c, 0xbc, - 0x16, 0x91, 0x28, 0x1f, 0xc3, 0x59, 0xdf, 0xfb, 0x7d, 0xf6, 0x26, 0xad, 0x51, 0xea, 0x06, 0x66, - 0x4f, 0x9f, 0x0f, 0x40, 0x86, 0x7d, 0xec, 0xc5, 0xdb, 0x68, 0xf3, 0xd3, 0xf2, 0x3f, 0xe3, 0xd0, - 0x66, 0x93, 0xd0, 0xee, 0x87, 0xd3, 0x5d, 0x14, 0x9c, 0x43, 0x54, 0xe0, 0x20, 0x8e, 0xc8, 0x39, - 0xc8, 0x98, 0x4c, 0xf9, 0x10, 0x2e, 0x46, 0xde, 0x25, 0x3e, 0x81, 0xeb, 0xa3, 0xa0, 0xec, 0x5c, - 0xe2, 0x03, 0x8e, 0xde, 0xab, 0xf8, 0x14, 0x4f, 0xc9, 0x95, 0xf7, 0xe0, 0xd2, 0x74, 0xa1, 0xc3, - 0x8a, 0x92, 0x61, 0xe2, 0x6d, 0x88, 0x48, 0x94, 0xdb, 0x50, 0x89, 0x9f, 0x47, 0x7d, 0x14, 0x34, - 0xc5, 0x74, 0x27, 0x6a, 0x87, 0x67, 0x22, 0x88, 0xf0, 0xdf, 0x3c, 0xc4, 0x6b, 0xf0, 0x86, 0x9f, - 0x73, 0x7d, 0x60, 0xdb, 0xc4, 0xa4, 0x6b, 0xfe, 0x6e, 0xa2, 0x91, 0xbe, 0x65, 0xd3, 0x89, 0xbd, - 0xa0, 0xec, 0xc0, 0xe2, 0xa4, 0x10, 0x1c, 0xfb, 0x55, 0xc8, 0x07, 0x9b, 0x0f, 0x7f, 0x98, 0x4e, - 0xc6, 0x21, 0x87, 0x9e, 0xa1, 0x65, 0xba, 0xd9, 0xe6, 0xa2, 0x55, 0xfb, 0x2c, 0x07, 0xf9, 0xc0, - 0x6d, 0x4c, 0xcb, 0x2e, 0xc2, 0xe1, 0x20, 0xe4, 0x63, 0xdc, 0x1d, 0x10, 0x3e, 0x61, 0x12, 0x52, - 0x74, 0x09, 0x8e, 0xe1, 0x38, 0x7e, 0x62, 0xb3, 0x69, 0x93, 0xd7, 0xd2, 0x0a, 0x74, 0x0e, 0x0e, - 0xd9, 0xfc, 0x6f, 0x36, 0xe3, 0xf9, 0xd0, 0x89, 0x0b, 0xdd, 0x98, 0x0e, 0xc5, 0x66, 0x1b, 0xdb, - 0xed, 0x3b, 0x64, 0x68, 0xb0, 0xe6, 0x66, 0x0f, 0x96, 0xa4, 0xa5, 0x15, 0xe8, 0x16, 0xe4, 0x7d, - 0x77, 0x47, 0x5e, 0x60, 0x27, 0x7b, 0x26, 0xab, 0x4c, 0xdc, 0x4e, 0x0b, 0x3d, 0xdc, 0x12, 0x3c, - 0xe9, 0x62, 0x5d, 0x27, 0x6d, 0x79, 0x5f, 0x45, 0xaa, 0xee, 0xd7, 0xfc, 0x4f, 0x77, 0x9c, 0x99, - 0x96, 0xd9, 0x22, 0xf2, 0x7e, 0x6f, 0x9c, 0xb1, 0x0f, 0xb4, 0x0c, 0x85, 0x04, 0x2f, 0x36, 0xc1, - 0xe4, 0x3c, 0x33, 0x12, 0xea, 0xd0, 0x09, 0x58, 0xe8, 0x10, 0x43, 0xef, 0x50, 0x19, 0x98, 0x15, - 0xff, 0x52, 0xee, 0xc2, 0xb1, 0x14, 0x36, 0x54, 0x84, 0xfd, 0x3e, 0x3a, 0x7e, 0x28, 0xc1, 0x77, - 0x7c, 0x99, 0xca, 0xf9, 0xcb, 0xd4, 0x56, 0x38, 0x16, 0xef, 0x60, 0x8a, 0xeb, 0xe4, 0x89, 0x65, - 0x93, 0x7f, 0x3a, 0x95, 0x9e, 0x85, 0x03, 0x33, 0x1a, 0x74, 0x72, 0x6f, 0x7a, 0x4b, 0xfb, 0x1e, - 0x7a, 0x73, 0xf9, 0xa7, 0x23, 0x30, 0xcf, 0x72, 0xa2, 0xa7, 0xb0, 0xc0, 0xb7, 0x8c, 0xc4, 0x2a, - 0x96, 0xde, 0xfb, 0x8b, 0x67, 0xc7, 0x58, 0x78, 0x68, 0x95, 0xd2, 0xa7, 0xbf, 0xfe, 0xf9, 0xc5, - 0xec, 0x09, 0x54, 0x50, 0x05, 0x3f, 0x39, 0xd0, 0x97, 0x12, 0x1c, 0x4d, 0x6e, 0xf2, 0xe8, 0x82, - 0x20, 0x6a, 0xc6, 0xcf, 0x81, 0xe2, 0xc5, 0xa9, 0x6c, 0x39, 0x96, 0x2a, 0xc3, 0xa2, 0xa0, 0x4a, - 0x1c, 0x8b, 0x4e, 0x68, 0x83, 0x0c, 0x7b, 0x8d, 0x61, 0x08, 0xe1, 0x6b, 0x09, 0x4e, 0x88, 0x37, - 0x05, 0x74, 0x59, 0x9c, 0x31, 0xfb, 0xc7, 0x41, 0x71, 0x69, 0x17, 0x1e, 0x1c, 0x69, 0x8d, 0x21, - 0xad, 0xa2, 0xc5, 0x34, 0xd2, 0x00, 0x65, 0x23, 0xb2, 0x90, 0xfc, 0x22, 0x41, 0x69, 0xdc, 0x66, - 0x83, 0xae, 0x4d, 0x8d, 0x21, 0x7e, 0xc2, 0x6f, 0xef, 0xda, 0x8f, 0x33, 0x58, 0x63, 0x0c, 0x6e, - 0xa0, 0xd5, 0xe9, 0x18, 0x34, 0xbc, 0x86, 0x50, 0xb7, 0x83, 0x96, 0xdc, 0x41, 0x3f, 0x27, 0x48, - 0x25, 0x37, 0x97, 0x89, 0xa4, 0x32, 0x96, 0xa5, 0x89, 0xa4, 0xb2, 0x56, 0x24, 0xe5, 0x5d, 0x46, - 0xea, 0x3a, 0xba, 0x36, 0x8e, 0x54, 0xc0, 0xa0, 0xd1, 0x1c, 0x35, 0xd8, 0x1e, 0xa6, 0x6e, 0xb3, - 0x7f, 0x76, 0xdc, 0x76, 0x3f, 0x14, 0xdb, 0x82, 0xd0, 0x9b, 0x99, 0x50, 0xe2, 0x2b, 0x56, 0xb1, - 0x3a, 0xd9, 0x90, 0x83, 0x5c, 0x62, 0x20, 0x2f, 0xa2, 0xf3, 0x42, 0x90, 0x0e, 0xa1, 0x0d, 0xc7, - 0xd0, 0xe3, 0x95, 0xfe, 0x41, 0x82, 0xff, 0x09, 0x57, 0x20, 0xa4, 0x8a, 0xd3, 0x66, 0x6e, 0x62, - 0xc5, 0xcb, 0xd3, 0x3b, 0x70, 0xbc, 0xeb, 0x0c, 0xef, 0x2d, 0x74, 0x23, 0x8d, 0xd7, 0x9b, 0x67, - 0x8d, 0xe8, 0xa2, 0xa5, 0x6e, 0xf3, 0x19, 0xba, 0x13, 0x63, 0xf0, 0x97, 0x04, 0x67, 0x26, 0xec, - 0x47, 0x68, 0x35, 0x73, 0x56, 0x4c, 0x5a, 0xd7, 0x8a, 0xef, 0xec, 0xc5, 0x95, 0xf3, 0x7b, 0xc0, - 0xf8, 0xdd, 0x43, 0x77, 0xc5, 0x53, 0x07, 0x7b, 0xe6, 0x6e, 0xb3, 0x84, 0x3d, 0xc4, 0x85, 0xea, - 0x76, 0x72, 0x19, 0xdc, 0x41, 0xdf, 0x4a, 0x50, 0x10, 0xed, 0x5d, 0xa8, 0x36, 0xae, 0x43, 0xd2, - 0x2b, 0x5e, 0x51, 0x9d, 0xda, 0x9e, 0x13, 0x59, 0x65, 0x44, 0x56, 0xd0, 0x52, 0x66, 0x63, 0x35, - 0x47, 0x61, 0xf7, 0xc7, 0x8e, 0xe7, 0x47, 0x09, 0x4e, 0x65, 0x6e, 0x5d, 0x68, 0x45, 0x8c, 0x64, - 0xec, 0x9a, 0x57, 0xbc, 0xb2, 0x3b, 0x27, 0xce, 0xe1, 0x26, 0xe3, 0x70, 0x0d, 0x5d, 0x49, 0x73, - 0x68, 0x79, 0x9e, 0x8d, 0xe0, 0xc9, 0x6c, 0x78, 0x6f, 0x7f, 0xd8, 0x71, 0xe8, 0x2b, 0xef, 0xfe, - 0x86, 0x8f, 0x72, 0xd6, 0xfd, 0x4d, 0xed, 0x02, 0x59, 0xf7, 0x37, 0xfd, 0xbe, 0x2b, 0x37, 0x18, - 0xc4, 0xab, 0x68, 0x25, 0x0d, 0xb1, 0x8d, 0x29, 0x6e, 0x34, 0x99, 0xb9, 0xf8, 0x1e, 0xd4, 0xd7, - 0x5f, 0xbc, 0x2a, 0x4b, 0x2f, 0x5f, 0x95, 0xa5, 0x3f, 0x5e, 0x95, 0xa5, 0xcf, 0x5f, 0x97, 0x67, - 0x5e, 0xbe, 0x2e, 0xcf, 0xfc, 0xf6, 0xba, 0x3c, 0xf3, 0xd1, 0x79, 0xdd, 0xa0, 0x9d, 0x41, 0xb3, - 0xd6, 0xb2, 0x7a, 0x2a, 0x25, 0xdd, 0xae, 0x65, 0xbf, 0x65, 0x58, 0x3c, 0xc5, 0x73, 0x3f, 0x09, - 0x1d, 0xf5, 0x89, 0xd3, 0x5c, 0x60, 0xff, 0xd7, 0xb7, 0xf2, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x40, 0xc4, 0x95, 0x02, 0xae, 0x14, 0x00, 0x00, + // 1677 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0xcd, 0x6f, 0x1b, 0x45, + 0x1b, 0xcf, 0xc6, 0x49, 0x1a, 0x3f, 0xfd, 0x9e, 0xfa, 0x6d, 0x5d, 0xcb, 0x75, 0xdd, 0x7d, 0xfb, + 0xe6, 0x75, 0x3f, 0xf0, 0x36, 0x49, 0xbf, 0x42, 0x5b, 0xd4, 0x38, 0x2d, 0x6d, 0x24, 0x0a, 0xa9, + 0x53, 0x15, 0x51, 0x0e, 0xd6, 0xda, 0x9e, 0xae, 0x57, 0xb5, 0x77, 0xdd, 0xdd, 0xb1, 0xa9, 0x15, + 0xe5, 0xc2, 0x91, 0x13, 0x12, 0xe2, 0x8c, 0xf8, 0x03, 0x38, 0x80, 0x38, 0x21, 0x24, 0x2e, 0x20, + 0xf5, 0x46, 0x05, 0x17, 0x4e, 0x08, 0xb5, 0x48, 0xfc, 0x01, 0xfc, 0x03, 0x68, 0x67, 0x67, 0xbf, + 0x67, 0xd6, 0x4e, 0x80, 0x53, 0xbc, 0xf3, 0x7c, 0xcc, 0xef, 0xf7, 0xcc, 0x33, 0xcf, 0x3c, 0x8f, + 0x02, 0xf9, 0xae, 0x3a, 0xc2, 0x96, 0xd2, 0xb4, 0xf4, 0xb6, 0x86, 0x95, 0xa7, 0x03, 0x6c, 0x8d, + 0xaa, 0x7d, 0xcb, 0x24, 0x26, 0xda, 0x47, 0x25, 0x55, 0x57, 0x52, 0xc8, 0x69, 0xa6, 0x66, 0x52, + 0x81, 0xe2, 0xfc, 0x72, 0x75, 0x0a, 0x45, 0xcd, 0x34, 0xb5, 0x2e, 0x56, 0xd4, 0xbe, 0xae, 0xa8, + 0x86, 0x61, 0x12, 0x95, 0xe8, 0xa6, 0x61, 0x33, 0xe9, 0xd9, 0x96, 0x69, 0xf7, 0x4c, 0x5b, 0x69, + 0xaa, 0x36, 0x73, 0xad, 0x0c, 0x17, 0x9b, 0x98, 0xa8, 0x8b, 0x4a, 0x5f, 0xd5, 0x74, 0x83, 0x2a, + 0x33, 0xdd, 0xe3, 0x11, 0x1c, 0x7d, 0xd5, 0x52, 0x7b, 0x9e, 0x9b, 0xa2, 0x2b, 0x32, 0x2d, 0xb5, + 0xe5, 0x6c, 0xa5, 0x69, 0x16, 0xd6, 0x54, 0x82, 0x5d, 0xa9, 0x9c, 0x03, 0x74, 0xdf, 0x71, 0xbd, + 0x41, 0x4d, 0xea, 0xf8, 0xe9, 0x00, 0xdb, 0x44, 0x5e, 0x87, 0x23, 0x91, 0x55, 0xbb, 0x6f, 0x1a, + 0x36, 0x46, 0x4b, 0x30, 0xe7, 0xba, 0xce, 0x4b, 0x65, 0xa9, 0xb2, 0x77, 0x29, 0x57, 0x0d, 0x93, + 0xac, 0xba, 0xda, 0xb5, 0x99, 0xe7, 0xbf, 0x9e, 0x9c, 0xaa, 0x33, 0x4d, 0xb9, 0x04, 0x45, 0xea, + 0xea, 0x0e, 0x26, 0xb7, 0x87, 0xbd, 0x87, 0x6a, 0x57, 0x6f, 0xab, 0xc4, 0xb4, 0xfc, 0xad, 0x0c, + 0x38, 0x21, 0x90, 0xb3, 0x4d, 0xef, 0x01, 0x72, 0xfd, 0xfb, 0xb2, 0x4d, 0x4c, 0xf2, 0x52, 0x39, + 0x53, 0xd9, 0xbb, 0x74, 0x22, 0x0a, 0xa0, 0x16, 0xd5, 0xab, 0x73, 0x0c, 0xe5, 0xd3, 0x20, 0x7b, + 0xfb, 0xf9, 0xeb, 0x6b, 0x1d, 0xdc, 0x7a, 0xd2, 0x37, 0x75, 0x83, 0x78, 0xa8, 0xde, 0x85, 0xff, + 0xa6, 0x6a, 0x31, 0x6c, 0x17, 0xe0, 0xc8, 0x30, 0x29, 0xa6, 0xd1, 0xc9, 0xd6, 0x79, 0x22, 0xf9, + 0x3e, 0x1c, 0x8c, 0xa1, 0x44, 0x15, 0x38, 0x88, 0x49, 0x07, 0x5b, 0x78, 0xd0, 0x5b, 0x6d, 0xb7, + 0x2d, 0x6c, 0xdb, 0xcc, 0x41, 0x7c, 0x19, 0xe5, 0x60, 0xb6, 0x6f, 0x7e, 0x80, 0xad, 0xfc, 0x74, + 0x59, 0xaa, 0xcc, 0xd4, 0xdd, 0x0f, 0xb9, 0x05, 0xa8, 0x96, 0xe0, 0xf9, 0x4f, 0x87, 0xed, 0xeb, + 0x69, 0xc8, 0x27, 0x77, 0x71, 0x4f, 0x1c, 0x6d, 0x08, 0xf6, 0x72, 0x72, 0xa4, 0x9c, 0xba, 0xd7, + 0x26, 0x26, 0xbc, 0xed, 0x50, 0x15, 0x90, 0x1f, 0xbd, 0x07, 0x7a, 0x0f, 0xdb, 0x44, 0xed, 0xf5, + 0x29, 0xed, 0x4c, 0x9d, 0x23, 0x41, 0x57, 0xe1, 0x98, 0xbf, 0xba, 0xe1, 0x44, 0xe5, 0x41, 0xc7, + 0xc2, 0x76, 0xc7, 0xec, 0xb6, 0xf3, 0x19, 0x6a, 0x24, 0x12, 0xa3, 0xb3, 0x70, 0x68, 0x18, 0xda, + 0xf9, 0xae, 0x6a, 0x77, 0xf2, 0x33, 0x65, 0xa9, 0xb2, 0xaf, 0x9e, 0x58, 0x17, 0x1d, 0xf7, 0x2c, + 0x55, 0xe7, 0x1e, 0xf7, 0x37, 0x12, 0xc8, 0x49, 0xca, 0x81, 0x02, 0x0b, 0x20, 0x9f, 0xae, 0xb4, + 0x1b, 0xba, 0xd3, 0x3b, 0xa7, 0x9b, 0xe1, 0xd3, 0x95, 0x37, 0xa0, 0x98, 0x86, 0x3d, 0x2d, 0xfb, + 0x05, 0xe1, 0xb8, 0x0b, 0x95, 0x94, 0x6b, 0x15, 0xa9, 0x41, 0xa8, 0x08, 0x59, 0x12, 0x0b, 0x45, + 0xb0, 0x20, 0x7f, 0x29, 0xc1, 0x99, 0x09, 0x5c, 0xb1, 0x7b, 0x5a, 0x02, 0x68, 0xc5, 0xaf, 0x67, + 0x68, 0xc5, 0x91, 0x0f, 0xd5, 0xae, 0xcd, 0xe2, 0x31, 0xed, 0xca, 0x83, 0x95, 0x28, 0x96, 0x4c, + 0x0c, 0x0b, 0x5a, 0x80, 0x03, 0xfd, 0xe8, 0x21, 0xcc, 0x50, 0x95, 0xd8, 0xaa, 0x7c, 0x93, 0xc3, + 0xde, 0x3f, 0xd3, 0xda, 0x68, 0xdd, 0x68, 0xe3, 0x67, 0x1e, 0xfb, 0x1c, 0xcc, 0xea, 0xce, 0x37, + 0x63, 0xee, 0x7e, 0xc8, 0xeb, 0x1c, 0xd2, 0x49, 0x0f, 0x8c, 0x74, 0x7a, 0x00, 0x57, 0xe0, 0x78, + 0xc8, 0x95, 0x8d, 0xc9, 0xa6, 0xae, 0x4d, 0x18, 0xfb, 0xeb, 0x50, 0xe0, 0x99, 0x06, 0xb1, 0xb6, + 0x75, 0xcd, 0x50, 0xc9, 0xc0, 0xc2, 0x36, 0x2d, 0x38, 0xd9, 0x7a, 0x68, 0x45, 0x7e, 0x1f, 0x4e, + 0x79, 0xd6, 0xef, 0xd0, 0x37, 0x69, 0x95, 0x10, 0xc7, 0x31, 0x7d, 0xfa, 0x3c, 0x00, 0x79, 0xd8, + 0x43, 0x5f, 0xbc, 0xf5, 0x36, 0x3b, 0x2d, 0xef, 0x33, 0x0a, 0x6d, 0x3a, 0x0e, 0xed, 0x6e, 0x50, + 0xdd, 0x79, 0xce, 0x19, 0x44, 0x19, 0xf6, 0xa9, 0xa1, 0x75, 0x06, 0x32, 0xb2, 0x26, 0xbf, 0x07, + 0xe7, 0x42, 0xef, 0x12, 0xab, 0xc0, 0xb5, 0x91, 0x1f, 0x76, 0xb6, 0xe2, 0x01, 0x0e, 0xdf, 0xab, + 0x68, 0x15, 0x4f, 0xac, 0xcb, 0x6f, 0xc3, 0xf9, 0xc9, 0x5c, 0x07, 0x11, 0xc5, 0xc3, 0xd8, 0xdb, + 0x10, 0x5a, 0x91, 0x6f, 0x42, 0x39, 0x7a, 0x1e, 0xb5, 0x91, 0x9f, 0x14, 0x93, 0x9d, 0xa8, 0x15, + 0x9c, 0x09, 0xc7, 0xc3, 0xbf, 0xf3, 0x10, 0xaf, 0xc2, 0xff, 0xbc, 0x3d, 0xd7, 0x06, 0x96, 0x85, + 0x0d, 0xb2, 0xea, 0xf5, 0x26, 0x75, 0xdc, 0x37, 0x2d, 0x32, 0x36, 0x17, 0xe4, 0x6d, 0x58, 0x18, + 0xe7, 0x82, 0x61, 0xbf, 0x04, 0x59, 0xbf, 0xf3, 0x61, 0x0f, 0xd3, 0xb1, 0x28, 0xe4, 0xc0, 0x32, + 0xd0, 0x4c, 0x26, 0xdb, 0x4c, 0x38, 0x6a, 0x1f, 0x65, 0x20, 0xeb, 0x9b, 0xa5, 0xa4, 0xec, 0x02, + 0x1c, 0xf0, 0x5d, 0x3e, 0x54, 0xbb, 0x03, 0xcc, 0x2a, 0x4c, 0x6c, 0x15, 0x9d, 0x87, 0xc3, 0x6a, + 0x14, 0x3f, 0xb6, 0x68, 0xb5, 0xc9, 0xd6, 0x93, 0x02, 0x74, 0x1a, 0xf6, 0x5b, 0xec, 0x37, 0xad, + 0xf1, 0xac, 0xe8, 0x44, 0x17, 0x1d, 0x9f, 0x36, 0x51, 0x8d, 0xb6, 0x6a, 0xb5, 0x6f, 0xe1, 0xa1, + 0x4e, 0x93, 0x9b, 0x3e, 0x58, 0x52, 0x3d, 0x29, 0x40, 0x37, 0x20, 0xeb, 0x99, 0xdb, 0xf9, 0x39, + 0x7a, 0xb2, 0x27, 0x45, 0x61, 0x62, 0x7a, 0xf5, 0xc0, 0xc2, 0x09, 0xc1, 0xe3, 0xae, 0xaa, 0x69, + 0xb8, 0x9d, 0xdf, 0x53, 0x96, 0x2a, 0xf3, 0x75, 0xef, 0xd3, 0x29, 0x67, 0x86, 0x69, 0xb4, 0x70, + 0x7e, 0xde, 0x2d, 0x67, 0xf4, 0x03, 0x2d, 0x41, 0x2e, 0xc6, 0x8b, 0x56, 0xb0, 0x7c, 0x96, 0x2a, + 0x71, 0x65, 0xe8, 0x28, 0xcc, 0x75, 0xb0, 0xae, 0x75, 0x48, 0x1e, 0xa8, 0x16, 0xfb, 0x92, 0x6f, + 0xc3, 0xe1, 0x04, 0x36, 0x54, 0x80, 0x79, 0x0f, 0x1d, 0x3b, 0x14, 0xff, 0x3b, 0xda, 0x4c, 0x65, + 0xbc, 0x66, 0x6a, 0x33, 0x28, 0x8b, 0xb7, 0x54, 0xa2, 0xd6, 0xf0, 0x63, 0xd3, 0xc2, 0x7f, 0xb7, + 0x2a, 0x3d, 0x0d, 0x0a, 0x66, 0xd8, 0xe9, 0xf8, 0xdc, 0x74, 0x9b, 0xf6, 0xdd, 0xe4, 0xe6, 0xa3, + 0xa0, 0x26, 0x6c, 0x1a, 0x6a, 0xdf, 0xee, 0x98, 0xc4, 0xae, 0x8d, 0x26, 0xbc, 0x58, 0x49, 0xdf, + 0xd9, 0xb0, 0xef, 0xd5, 0xa0, 0x5a, 0x70, 0x7c, 0x07, 0xaf, 0x8f, 0xed, 0x09, 0x59, 0x81, 0x0d, + 0x16, 0xe4, 0x37, 0x83, 0xa7, 0x30, 0x54, 0xa1, 0x69, 0x70, 0x46, 0x9e, 0x4f, 0x0f, 0x66, 0x01, + 0xe6, 0x3d, 0x43, 0xef, 0x10, 0xbd, 0x6f, 0xf9, 0xcf, 0xe9, 0xe0, 0x45, 0x4c, 0x71, 0xc4, 0x30, + 0xed, 0x92, 0x30, 0xe7, 0x02, 0x67, 0xb8, 0x17, 0x38, 0xac, 0x17, 0xdc, 0xc9, 0xb0, 0x9e, 0x7b, + 0x29, 0xa3, 0xed, 0xc8, 0x6c, 0xa2, 0x1d, 0x71, 0xee, 0x45, 0x40, 0x26, 0x68, 0x08, 0xe7, 0xa8, + 0x26, 0x57, 0xe6, 0xb4, 0x84, 0x7d, 0x0b, 0x0f, 0x75, 0x73, 0x60, 0xbb, 0x27, 0x11, 0x98, 0xed, + 0xa1, 0x66, 0x22, 0xb1, 0xd3, 0xc6, 0x19, 0xf8, 0x19, 0x89, 0x5b, 0xcd, 0xbb, 0x43, 0x0c, 0x47, + 0x24, 0xaf, 0x05, 0xa5, 0x3b, 0xfc, 0xbe, 0xee, 0xec, 0xe8, 0xde, 0x0a, 0x8a, 0xb7, 0xc8, 0xc9, + 0xe4, 0xcf, 0xf5, 0xd2, 0xe7, 0x39, 0x98, 0xa5, 0xee, 0xd0, 0x13, 0x98, 0x63, 0x5d, 0x75, 0x6c, + 0xf4, 0x48, 0xce, 0xb9, 0x85, 0x53, 0x29, 0x1a, 0xee, 0xe6, 0x72, 0xf1, 0xc3, 0x9f, 0x7f, 0xff, + 0x64, 0xfa, 0x28, 0xca, 0x29, 0x9c, 0x11, 0x1b, 0x7d, 0x2a, 0xc1, 0xa1, 0xf8, 0xe4, 0x8a, 0xce, + 0x72, 0xbc, 0x0a, 0xc6, 0xdf, 0xc2, 0xb9, 0x89, 0x74, 0x19, 0x96, 0x0a, 0xc5, 0x22, 0xa3, 0x72, + 0x14, 0x8b, 0x86, 0x49, 0x03, 0x0f, 0x7b, 0x8d, 0x61, 0x00, 0xe1, 0x0b, 0x09, 0x8e, 0xf2, 0x3b, + 0x63, 0x74, 0x81, 0xbf, 0xa3, 0x78, 0x18, 0x2e, 0x2c, 0xee, 0xc0, 0x82, 0x21, 0xad, 0x52, 0xa4, + 0x15, 0xb4, 0x90, 0x44, 0xea, 0xa3, 0x6c, 0x84, 0x32, 0xfe, 0x27, 0x09, 0x8a, 0x69, 0x9d, 0x3c, + 0xba, 0x3c, 0x31, 0x86, 0xe8, 0x09, 0x5f, 0xd9, 0xb1, 0x1d, 0x63, 0xb0, 0x4a, 0x19, 0x5c, 0x43, + 0x2b, 0x93, 0x31, 0x68, 0xb8, 0x09, 0xa1, 0x6c, 0xf9, 0x55, 0x63, 0x1b, 0xfd, 0x18, 0x23, 0x15, + 0xef, 0xd4, 0xc7, 0x92, 0x12, 0x0c, 0x07, 0x63, 0x49, 0x89, 0x46, 0x02, 0xf9, 0x0d, 0x4a, 0xea, + 0x2a, 0xba, 0x9c, 0x46, 0xca, 0x67, 0xd0, 0x68, 0x8e, 0x1a, 0x74, 0xee, 0x50, 0xb6, 0xe8, 0x9f, + 0x6d, 0x27, 0xdd, 0xf7, 0x47, 0xba, 0x7e, 0xf4, 0x7f, 0x21, 0x94, 0xe8, 0x48, 0x51, 0xa8, 0x8c, + 0x57, 0x64, 0x20, 0x17, 0x29, 0xc8, 0x73, 0xe8, 0x0c, 0x17, 0xa4, 0x8d, 0x49, 0xc3, 0xd6, 0xb5, + 0x68, 0xa4, 0xbf, 0x93, 0xe0, 0x3f, 0xdc, 0x96, 0x1f, 0x29, 0xfc, 0x6d, 0x85, 0x93, 0x47, 0xe1, + 0xc2, 0xe4, 0x06, 0x0c, 0xef, 0x1a, 0xc5, 0x7b, 0x03, 0x5d, 0x4b, 0xe2, 0x75, 0xdf, 0xef, 0x46, + 0xb8, 0x52, 0x29, 0x5b, 0xec, 0xcd, 0xd9, 0x8e, 0x30, 0xf8, 0x43, 0x82, 0x93, 0x63, 0xe6, 0x01, + 0xb4, 0x22, 0xac, 0x15, 0xe3, 0xc6, 0x93, 0xc2, 0xeb, 0xbb, 0x31, 0x65, 0xfc, 0xee, 0x51, 0x7e, + 0x77, 0xd0, 0x6d, 0x7e, 0xd5, 0x51, 0x5d, 0x75, 0x27, 0x59, 0x82, 0x1c, 0x62, 0x8b, 0xca, 0x56, + 0x7c, 0xf8, 0xd9, 0x46, 0x5f, 0x49, 0x90, 0xe3, 0xcd, 0x19, 0xa8, 0x9a, 0x96, 0x21, 0xc9, 0x91, + 0xa6, 0xa0, 0x4c, 0xac, 0xcf, 0x88, 0xac, 0x50, 0x22, 0xcb, 0x68, 0x51, 0x98, 0x58, 0xcd, 0x51, + 0x90, 0xfd, 0x91, 0xe3, 0xf9, 0x5e, 0x82, 0xe3, 0xc2, 0x29, 0x03, 0x2d, 0xf3, 0x91, 0xa4, 0x8e, + 0x35, 0x85, 0x8b, 0x3b, 0x33, 0x62, 0x1c, 0xae, 0x53, 0x0e, 0x97, 0xd1, 0xc5, 0x24, 0x87, 0x96, + 0x6b, 0xd9, 0xf0, 0x9b, 0x8d, 0x86, 0xdb, 0xeb, 0x06, 0x19, 0x87, 0x3e, 0x73, 0xef, 0x6f, 0xd0, + 0x84, 0x8a, 0xee, 0x6f, 0xa2, 0xf7, 0x15, 0xdd, 0xdf, 0x64, 0x3f, 0x2b, 0x5f, 0xa3, 0x10, 0x2f, + 0xa1, 0xe5, 0x24, 0xc4, 0xb6, 0x4a, 0xd4, 0x46, 0x93, 0xaa, 0x0b, 0xee, 0xc1, 0xb7, 0x6e, 0x76, + 0x24, 0xfa, 0x4a, 0x51, 0x76, 0x88, 0x9a, 0x5b, 0x51, 0x76, 0x08, 0x1b, 0xd6, 0xb4, 0x6b, 0xec, + 0xf7, 0xad, 0x4e, 0x82, 0xc4, 0x83, 0x1a, 0x81, 0xcf, 0xde, 0x31, 0x61, 0x2b, 0x2a, 0x2a, 0xf9, + 0xe3, 0x9a, 0x60, 0x51, 0xc9, 0x1f, 0xdb, 0xf3, 0xa6, 0xbd, 0x63, 0xa1, 0xb2, 0xc4, 0x4e, 0x66, + 0xe4, 0x53, 0x55, 0xb6, 0xbc, 0x5f, 0xdb, 0xe8, 0x07, 0x37, 0xf9, 0xf9, 0x5d, 0x9a, 0x28, 0xf9, + 0x53, 0x1b, 0x43, 0x51, 0xf2, 0xa7, 0x37, 0x82, 0xf2, 0x0d, 0xca, 0xe5, 0x0a, 0xba, 0x94, 0xca, + 0xc5, 0x16, 0xf0, 0xa8, 0xad, 0x3d, 0x7f, 0x59, 0x92, 0x5e, 0xbc, 0x2c, 0x49, 0xbf, 0xbd, 0x2c, + 0x49, 0x1f, 0xbf, 0x2a, 0x4d, 0xbd, 0x78, 0x55, 0x9a, 0xfa, 0xe5, 0x55, 0x69, 0xea, 0xd1, 0x19, + 0x4d, 0x27, 0x9d, 0x41, 0xb3, 0xda, 0x32, 0x7b, 0x0a, 0xc1, 0xdd, 0xae, 0x69, 0xbd, 0xa6, 0x9b, + 0x6c, 0x93, 0x67, 0xde, 0x36, 0x64, 0xd4, 0xc7, 0x76, 0x73, 0x8e, 0xfe, 0xdf, 0x64, 0xf9, 0xaf, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x2b, 0x5c, 0x05, 0xd0, 0xfa, 0x19, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1654,6 +2011,9 @@ type QueryClient interface { GetValsetByTimestamp(ctx context.Context, in *QueryGetValsetByTimestampRequest, opts ...grpc.CallOption) (*QueryGetValsetByTimestampResponse, error) GetCurrentAggregateReport(ctx context.Context, in *QueryGetCurrentAggregateReportRequest, opts ...grpc.CallOption) (*QueryGetCurrentAggregateReportResponse, error) GetDataBefore(ctx context.Context, in *QueryGetDataBeforeRequest, opts ...grpc.CallOption) (*QueryGetDataBeforeResponse, error) + GetSnapshotsByReport(ctx context.Context, in *QueryGetSnapshotsByReportRequest, opts ...grpc.CallOption) (*QueryGetSnapshotsByReportResponse, error) + GetAttestationDataBySnapshot(ctx context.Context, in *QueryGetAttestationDataBySnapshotRequest, opts ...grpc.CallOption) (*QueryGetAttestationDataBySnapshotResponse, error) + GetAttestationsBySnapshot(ctx context.Context, in *QueryGetAttestationsBySnapshotRequest, opts ...grpc.CallOption) (*QueryGetAttestationsBySnapshotResponse, error) } type queryClient struct { @@ -1763,6 +2123,33 @@ func (c *queryClient) GetDataBefore(ctx context.Context, in *QueryGetDataBeforeR return out, nil } +func (c *queryClient) GetSnapshotsByReport(ctx context.Context, in *QueryGetSnapshotsByReportRequest, opts ...grpc.CallOption) (*QueryGetSnapshotsByReportResponse, error) { + out := new(QueryGetSnapshotsByReportResponse) + err := c.cc.Invoke(ctx, "/layer.bridge.Query/GetSnapshotsByReport", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) GetAttestationDataBySnapshot(ctx context.Context, in *QueryGetAttestationDataBySnapshotRequest, opts ...grpc.CallOption) (*QueryGetAttestationDataBySnapshotResponse, error) { + out := new(QueryGetAttestationDataBySnapshotResponse) + err := c.cc.Invoke(ctx, "/layer.bridge.Query/GetAttestationDataBySnapshot", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) GetAttestationsBySnapshot(ctx context.Context, in *QueryGetAttestationsBySnapshotRequest, opts ...grpc.CallOption) (*QueryGetAttestationsBySnapshotResponse, error) { + out := new(QueryGetAttestationsBySnapshotResponse) + err := c.cc.Invoke(ctx, "/layer.bridge.Query/GetAttestationsBySnapshot", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // Parameters queries the parameters of the module. @@ -1778,6 +2165,9 @@ type QueryServer interface { GetValsetByTimestamp(context.Context, *QueryGetValsetByTimestampRequest) (*QueryGetValsetByTimestampResponse, error) GetCurrentAggregateReport(context.Context, *QueryGetCurrentAggregateReportRequest) (*QueryGetCurrentAggregateReportResponse, error) GetDataBefore(context.Context, *QueryGetDataBeforeRequest) (*QueryGetDataBeforeResponse, error) + GetSnapshotsByReport(context.Context, *QueryGetSnapshotsByReportRequest) (*QueryGetSnapshotsByReportResponse, error) + GetAttestationDataBySnapshot(context.Context, *QueryGetAttestationDataBySnapshotRequest) (*QueryGetAttestationDataBySnapshotResponse, error) + GetAttestationsBySnapshot(context.Context, *QueryGetAttestationsBySnapshotRequest) (*QueryGetAttestationsBySnapshotResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -1817,6 +2207,15 @@ func (*UnimplementedQueryServer) GetCurrentAggregateReport(ctx context.Context, func (*UnimplementedQueryServer) GetDataBefore(ctx context.Context, req *QueryGetDataBeforeRequest) (*QueryGetDataBeforeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetDataBefore not implemented") } +func (*UnimplementedQueryServer) GetSnapshotsByReport(ctx context.Context, req *QueryGetSnapshotsByReportRequest) (*QueryGetSnapshotsByReportResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSnapshotsByReport not implemented") +} +func (*UnimplementedQueryServer) GetAttestationDataBySnapshot(ctx context.Context, req *QueryGetAttestationDataBySnapshotRequest) (*QueryGetAttestationDataBySnapshotResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAttestationDataBySnapshot not implemented") +} +func (*UnimplementedQueryServer) GetAttestationsBySnapshot(ctx context.Context, req *QueryGetAttestationsBySnapshotRequest) (*QueryGetAttestationsBySnapshotResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAttestationsBySnapshot not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -2020,31 +2419,85 @@ func _Query_GetDataBefore_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } -var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "layer.bridge.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Params", - Handler: _Query_Params_Handler, - }, - { - MethodName: "GetEvmValidators", - Handler: _Query_GetEvmValidators_Handler, - }, - { - MethodName: "GetValidatorCheckpoint", - Handler: _Query_GetValidatorCheckpoint_Handler, - }, - { - MethodName: "GetValidatorCheckpointParams", - Handler: _Query_GetValidatorCheckpointParams_Handler, - }, - { - MethodName: "GetValidatorTimestampByIndex", - Handler: _Query_GetValidatorTimestampByIndex_Handler, - }, - { +func _Query_GetSnapshotsByReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetSnapshotsByReportRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GetSnapshotsByReport(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/layer.bridge.Query/GetSnapshotsByReport", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GetSnapshotsByReport(ctx, req.(*QueryGetSnapshotsByReportRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_GetAttestationDataBySnapshot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetAttestationDataBySnapshotRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GetAttestationDataBySnapshot(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/layer.bridge.Query/GetAttestationDataBySnapshot", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GetAttestationDataBySnapshot(ctx, req.(*QueryGetAttestationDataBySnapshotRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_GetAttestationsBySnapshot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetAttestationsBySnapshotRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GetAttestationsBySnapshot(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/layer.bridge.Query/GetAttestationsBySnapshot", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GetAttestationsBySnapshot(ctx, req.(*QueryGetAttestationsBySnapshotRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "layer.bridge.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + { + MethodName: "GetEvmValidators", + Handler: _Query_GetEvmValidators_Handler, + }, + { + MethodName: "GetValidatorCheckpoint", + Handler: _Query_GetValidatorCheckpoint_Handler, + }, + { + MethodName: "GetValidatorCheckpointParams", + Handler: _Query_GetValidatorCheckpointParams_Handler, + }, + { + MethodName: "GetValidatorTimestampByIndex", + Handler: _Query_GetValidatorTimestampByIndex_Handler, + }, + { MethodName: "GetValsetSigs", Handler: _Query_GetValsetSigs_Handler, }, @@ -2068,6 +2521,18 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "GetDataBefore", Handler: _Query_GetDataBefore_Handler, }, + { + MethodName: "GetSnapshotsByReport", + Handler: _Query_GetSnapshotsByReport_Handler, + }, + { + MethodName: "GetAttestationDataBySnapshot", + Handler: _Query_GetAttestationDataBySnapshot_Handler, + }, + { + MethodName: "GetAttestationsBySnapshot", + Handler: _Query_GetAttestationsBySnapshot_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "layer/bridge/query.proto", @@ -3100,6 +3565,246 @@ func (m *QueryGetDataBeforeResponse) MarshalToSizedBuffer(dAtA []byte) (int, err return len(dAtA) - i, nil } +func (m *QueryGetSnapshotsByReportRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryGetSnapshotsByReportRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetSnapshotsByReportRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Timestamp) > 0 { + i -= len(m.Timestamp) + copy(dAtA[i:], m.Timestamp) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Timestamp))) + i-- + dAtA[i] = 0x12 + } + if len(m.QueryId) > 0 { + i -= len(m.QueryId) + copy(dAtA[i:], m.QueryId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.QueryId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryGetSnapshotsByReportResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryGetSnapshotsByReportResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetSnapshotsByReportResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Snapshots) > 0 { + for iNdEx := len(m.Snapshots) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Snapshots[iNdEx]) + copy(dAtA[i:], m.Snapshots[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Snapshots[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryGetAttestationDataBySnapshotRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryGetAttestationDataBySnapshotRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetAttestationDataBySnapshotRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Snapshot) > 0 { + i -= len(m.Snapshot) + copy(dAtA[i:], m.Snapshot) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Snapshot))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryGetAttestationDataBySnapshotResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryGetAttestationDataBySnapshotResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetAttestationDataBySnapshotResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.NextReportTimestamp) > 0 { + i -= len(m.NextReportTimestamp) + copy(dAtA[i:], m.NextReportTimestamp) + i = encodeVarintQuery(dAtA, i, uint64(len(m.NextReportTimestamp))) + i-- + dAtA[i] = 0x42 + } + if len(m.PreviousReportTimestamp) > 0 { + i -= len(m.PreviousReportTimestamp) + copy(dAtA[i:], m.PreviousReportTimestamp) + i = encodeVarintQuery(dAtA, i, uint64(len(m.PreviousReportTimestamp))) + i-- + dAtA[i] = 0x3a + } + if len(m.AttestationTimestamp) > 0 { + i -= len(m.AttestationTimestamp) + copy(dAtA[i:], m.AttestationTimestamp) + i = encodeVarintQuery(dAtA, i, uint64(len(m.AttestationTimestamp))) + i-- + dAtA[i] = 0x32 + } + if len(m.Checkpoint) > 0 { + i -= len(m.Checkpoint) + copy(dAtA[i:], m.Checkpoint) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Checkpoint))) + i-- + dAtA[i] = 0x2a + } + if len(m.AggregatePower) > 0 { + i -= len(m.AggregatePower) + copy(dAtA[i:], m.AggregatePower) + i = encodeVarintQuery(dAtA, i, uint64(len(m.AggregatePower))) + i-- + dAtA[i] = 0x22 + } + if len(m.AggregateValue) > 0 { + i -= len(m.AggregateValue) + copy(dAtA[i:], m.AggregateValue) + i = encodeVarintQuery(dAtA, i, uint64(len(m.AggregateValue))) + i-- + dAtA[i] = 0x1a + } + if len(m.Timestamp) > 0 { + i -= len(m.Timestamp) + copy(dAtA[i:], m.Timestamp) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Timestamp))) + i-- + dAtA[i] = 0x12 + } + if len(m.QueryId) > 0 { + i -= len(m.QueryId) + copy(dAtA[i:], m.QueryId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.QueryId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryGetAttestationsBySnapshotRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryGetAttestationsBySnapshotRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetAttestationsBySnapshotRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Snapshot) > 0 { + i -= len(m.Snapshot) + copy(dAtA[i:], m.Snapshot) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Snapshot))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryGetAttestationsBySnapshotResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryGetAttestationsBySnapshotResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetAttestationsBySnapshotResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Attestations) > 0 { + for iNdEx := len(m.Attestations) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Attestations[iNdEx]) + copy(dAtA[i:], m.Attestations[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Attestations[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -3559,10 +4264,124 @@ func (m *QueryGetDataBeforeResponse) Size() (n int) { return n } -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozQuery(x uint64) (n int) { +func (m *QueryGetSnapshotsByReportRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.QueryId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Timestamp) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGetSnapshotsByReportResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Snapshots) > 0 { + for _, s := range m.Snapshots { + l = len(s) + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryGetAttestationDataBySnapshotRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Snapshot) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGetAttestationDataBySnapshotResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.QueryId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Timestamp) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.AggregateValue) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.AggregatePower) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Checkpoint) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.AttestationTimestamp) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.PreviousReportTimestamp) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.NextReportTimestamp) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGetAttestationsBySnapshotRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Snapshot) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGetAttestationsBySnapshotResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Attestations) > 0 { + for _, s := range m.Attestations { + l = len(s) + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { @@ -6338,6 +7157,754 @@ func (m *QueryGetDataBeforeResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryGetSnapshotsByReportRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGetSnapshotsByReportRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetSnapshotsByReportRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field QueryId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.QueryId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Timestamp = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGetSnapshotsByReportResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGetSnapshotsByReportResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetSnapshotsByReportResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Snapshots", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Snapshots = append(m.Snapshots, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGetAttestationDataBySnapshotRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGetAttestationDataBySnapshotRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetAttestationDataBySnapshotRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Snapshot", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Snapshot = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGetAttestationDataBySnapshotResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGetAttestationDataBySnapshotResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetAttestationDataBySnapshotResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field QueryId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.QueryId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Timestamp = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AggregateValue", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AggregateValue = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AggregatePower", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AggregatePower = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Checkpoint", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Checkpoint = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AttestationTimestamp", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AttestationTimestamp = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PreviousReportTimestamp", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PreviousReportTimestamp = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NextReportTimestamp", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NextReportTimestamp = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGetAttestationsBySnapshotRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGetAttestationsBySnapshotRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetAttestationsBySnapshotRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Snapshot", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Snapshot = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGetAttestationsBySnapshotResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGetAttestationsBySnapshotResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetAttestationsBySnapshotResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attestations", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attestations = append(m.Attestations, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/bridge/types/query.pb.gw.go b/x/bridge/types/query.pb.gw.go index ebb0e6ab9..ad019acf6 100644 --- a/x/bridge/types/query.pb.gw.go +++ b/x/bridge/types/query.pb.gw.go @@ -563,6 +563,190 @@ func local_request_Query_GetDataBefore_0(ctx context.Context, marshaler runtime. } +func request_Query_GetSnapshotsByReport_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetSnapshotsByReportRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["queryId"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "queryId") + } + + protoReq.QueryId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "queryId", err) + } + + val, ok = pathParams["timestamp"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "timestamp") + } + + protoReq.Timestamp, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "timestamp", err) + } + + msg, err := client.GetSnapshotsByReport(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_GetSnapshotsByReport_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetSnapshotsByReportRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["queryId"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "queryId") + } + + protoReq.QueryId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "queryId", err) + } + + val, ok = pathParams["timestamp"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "timestamp") + } + + protoReq.Timestamp, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "timestamp", err) + } + + msg, err := server.GetSnapshotsByReport(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_GetAttestationDataBySnapshot_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetAttestationDataBySnapshotRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["snapshot"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "snapshot") + } + + protoReq.Snapshot, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "snapshot", err) + } + + msg, err := client.GetAttestationDataBySnapshot(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_GetAttestationDataBySnapshot_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetAttestationDataBySnapshotRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["snapshot"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "snapshot") + } + + protoReq.Snapshot, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "snapshot", err) + } + + msg, err := server.GetAttestationDataBySnapshot(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_GetAttestationsBySnapshot_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetAttestationsBySnapshotRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["snapshot"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "snapshot") + } + + protoReq.Snapshot, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "snapshot", err) + } + + msg, err := client.GetAttestationsBySnapshot(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_GetAttestationsBySnapshot_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetAttestationsBySnapshotRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["snapshot"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "snapshot") + } + + protoReq.Snapshot, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "snapshot", err) + } + + msg, err := server.GetAttestationsBySnapshot(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -822,6 +1006,75 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_GetSnapshotsByReport_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_GetSnapshotsByReport_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_GetSnapshotsByReport_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_GetAttestationDataBySnapshot_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_GetAttestationDataBySnapshot_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_GetAttestationDataBySnapshot_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_GetAttestationsBySnapshot_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_GetAttestationsBySnapshot_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_GetAttestationsBySnapshot_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1083,6 +1336,66 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_GetSnapshotsByReport_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_GetSnapshotsByReport_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_GetSnapshotsByReport_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_GetAttestationDataBySnapshot_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_GetAttestationDataBySnapshot_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_GetAttestationDataBySnapshot_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_GetAttestationsBySnapshot_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_GetAttestationsBySnapshot_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_GetAttestationsBySnapshot_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1108,6 +1421,12 @@ var ( pattern_Query_GetCurrentAggregateReport_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"layer", "bridge", "get_current_aggregate_report", "queryId"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_GetDataBefore_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4}, []string{"layer", "bridge", "get_data_before", "queryId", "timestamp"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_GetSnapshotsByReport_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4}, []string{"layer", "bridge", "get_snapshots_by_report", "queryId", "timestamp"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_GetAttestationDataBySnapshot_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"layer", "bridge", "get_attestation_data_by_snapshot", "snapshot"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_GetAttestationsBySnapshot_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"layer", "bridge", "get_attestations_by_snapshot", "snapshot"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -1132,4 +1451,10 @@ var ( forward_Query_GetCurrentAggregateReport_0 = runtime.ForwardResponseMessage forward_Query_GetDataBefore_0 = runtime.ForwardResponseMessage + + forward_Query_GetSnapshotsByReport_0 = runtime.ForwardResponseMessage + + forward_Query_GetAttestationDataBySnapshot_0 = runtime.ForwardResponseMessage + + forward_Query_GetAttestationsBySnapshot_0 = runtime.ForwardResponseMessage ) From a14621abac83d57f34796f14a610a418bb5d9bbf Mon Sep 17 00:00:00 2001 From: tkernell Date: Fri, 5 Apr 2024 15:32:51 -0500 Subject: [PATCH 11/18] update hardhat tests for snapshot --- evm/contracts/bridge/BlobstreamO.sol | 39 ++--- evm/test/Bridge-TestsAuto.js | 62 +++++++- evm/test/helpers/helpers.js | 138 +++++++++++------- .../query_get_attestation_data_by_snapshot.go | 15 +- ...rt.go => query_get_snapshots_by_report.go} | 15 +- 5 files changed, 171 insertions(+), 98 deletions(-) rename x/bridge/client/cli/{query_get_snapshots.by_report.go => query_get_snapshots_by_report.go} (60%) diff --git a/evm/contracts/bridge/BlobstreamO.sol b/evm/contracts/bridge/BlobstreamO.sol index d4677d63e..addc2c4a9 100644 --- a/evm/contracts/bridge/BlobstreamO.sol +++ b/evm/contracts/bridge/BlobstreamO.sol @@ -196,7 +196,7 @@ contract BlobstreamO is ECDSA { continue; } // Check that the current validator has signed off on the hash. - if (!_verifySig2(_currentValidators[i].addr, _digest, _sigs[i])) { + if (!_verifySig(_currentValidators[i].addr, _digest, _sigs[i])) { revert InvalidSignature(); } _cumulativePower += _currentValidators[i].power; @@ -263,8 +263,11 @@ contract BlobstreamO is ECDSA { } /// @notice Used for verifying oracle data attestations + /// @param _attestData The oracle attestation data + /// @param _currentValidatorSet The current validator set + /// @param _sigs The attestations function _verifyOracleData( - OracleAttestationData calldata _attest, + OracleAttestationData calldata _attestData, Validator[] calldata _currentValidatorSet, Signature[] calldata _sigs ) internal view returns (bool) { @@ -284,7 +287,7 @@ contract BlobstreamO is ECDSA { ) { revert SuppliedValidatorSetInvalid(); } - bytes32 _dataDigest = _domainSeparateOracleAttestationData(_attest); + bytes32 _dataDigest = _domainSeparateOracleAttestationData(_attestData); _checkValidatorSignatures( _currentValidatorSet, _sigs, @@ -294,7 +297,7 @@ contract BlobstreamO is ECDSA { return true; } - /// @notice Utility function to verify EIP-191 signatures. + /// @notice Utility function to verify Tellor Layer signatures /// @param _signer The address that signed the message. /// @param _digest The digest that was signed. /// @param _sig The signature. @@ -304,31 +307,7 @@ contract BlobstreamO is ECDSA { bytes32 _digest, Signature calldata _sig ) internal pure returns (bool) { - bytes32 digest_eip191 = ECDSA.toEthSignedMessageHash(_digest); - return _signer == ECDSA.recover(digest_eip191, _sig.v, _sig.r, _sig.s); - } - - function _verifySig2( - address _signer, - bytes32 _digest, - Signature calldata _sig - ) internal pure returns (bool) { - bytes32 digest_eip191 = sha256(abi.encodePacked(_digest)); - address recovered = ECDSA.recover( - digest_eip191, - _sig.v, - _sig.r, - _sig.s - ); - console.log("Recovered: %s", recovered); - return _signer == ECDSA.recover(digest_eip191, _sig.v, _sig.r, _sig.s); - } - - function verifySig2( - bytes32 _digest, - Signature calldata _sig - ) external pure returns (address recovered) { - bytes32 digest_eip191 = sha256(abi.encodePacked(_digest)); - recovered = ecrecover(digest_eip191, _sig.v, _sig.r, _sig.s); + bytes32 _digestSha256 = sha256(abi.encodePacked(_digest)); + return _signer == ECDSA.recover(_digestSha256, _sig.v, _sig.r, _sig.s); } } diff --git a/evm/test/Bridge-TestsAuto.js b/evm/test/Bridge-TestsAuto.js index 2d5cd9258..487d6d17b 100644 --- a/evm/test/Bridge-TestsAuto.js +++ b/evm/test/Bridge-TestsAuto.js @@ -488,7 +488,7 @@ describe("BlobstreamO - Manual Function and e2e Tests", function () { }) - it.only("query layer api, deploy and verify with real params", async function () { + it("query layer api, deploy and verify with real params OLD", async function () { vts0 = await h.getValsetTimestampByIndex(0) vp0 = await h.getValsetCheckpointParams(vts0) console.log("valsetTimestamp0: ", vts0) @@ -508,10 +508,10 @@ describe("BlobstreamO - Manual Function and e2e Tests", function () { console.log("valSet0: ", valSet0) console.log("valSet1: ", valSet1) - vsigs1old = await h.getValsetSigs(vp1.timestamp) - vsigs1 = await h.getValsetSigs2(vp1.timestamp, valSet0, vp1.checkpoint) + // vsigs1old = await h.getValsetSigs(vp1.timestamp) + vsigs1 = await h.getValsetSigs(vp1.timestamp, valSet0, vp1.checkpoint) console.log("valsetSigs1: ", vsigs1) - console.log("valsetSigs1old: ", vsigs1old) + // console.log("valsetSigs1old: ", vsigs1old) await bridge.updateValidatorSet(vp1.valsetHash, vp1.powerThreshold, vp1.timestamp, valSet0, vsigs1); @@ -537,5 +537,59 @@ describe("BlobstreamO - Manual Function and e2e Tests", function () { }) + + it.only("query layer api, deploy and verify with real params", async function () { + vts0 = await h.getValsetTimestampByIndex(0) + vp0 = await h.getValsetCheckpointParams(vts0) + console.log("valsetTimestamp0: ", vts0) + console.log("valsetCheckpointParams0: ", vp0) + + console.log("deploying bridge...") + const Bridge = await ethers.getContractFactory("BlobstreamO"); + bridge = await Bridge.deploy(vp0.powerThreshold, vp0.timestamp, UNBONDING_PERIOD, vp0.checkpoint, guardian.address); + await bridge.deployed(); + + vts1 = await h.getValsetTimestampByIndex(1) + vp1 = await h.getValsetCheckpointParams(vts1) + valSet0 = await h.getValset(vp0.timestamp) + valSet1 = await h.getValset(vp1.timestamp) + console.log("valSet0: ", valSet0) + console.log("valSet1: ", valSet1) + + vsigs1 = await h.getValsetSigs(vp1.timestamp, valSet0, vp1.checkpoint) + + console.log("updating validator set...") + await bridge.updateValidatorSet(vp1.valsetHash, vp1.powerThreshold, vp1.timestamp, valSet0, vsigs1); + ethUsdRep0 = await h.getCurrentAggregateReport(ETH_USD_QUERY_ID) + snapshots = await h.getSnapshotsByReport(ETH_USD_QUERY_ID, ethUsdRep0.report.timestamp) + console.log("snapshots: ", snapshots) + lastSnapshot = snapshots[snapshots.length - 1] + attestationData = await h.getAttestationDataBySnapshot(lastSnapshot) + console.log("attestationData: ", attestationData) + + oattests = await h.getAttestationsBySnapshot(lastSnapshot, valSet1) + if (oattests.length == 0) { + sleeptime = 2 + console.log("no attestations found, sleeping for ", sleeptime, " seconds...") + await h.sleep(2) + oattests = await h.getAttestationsBySnapshot(lastSnapshot, valSet1) + } + console.log("oattests: ", oattests) + + console.log("verifying oracle data...") + await bridge.verifyOracleData( + attestationData, + valSet1, + oattests, + ) + + // request new attestations + currentBlock = await h.getBlock() + currentTime = currentBlock.timestamp + console.log("currentTime: ", currentTime) + pastReport = await h.getDataBefore(ETH_USD_QUERY_ID, currentTime) + console.log("pastReport: ", pastReport) + await h.requestAttestations(ETH_USD_QUERY_ID, pastReport.timestamp) + }) }) diff --git a/evm/test/helpers/helpers.js b/evm/test/helpers/helpers.js index d1a59240a..13e96db4c 100644 --- a/evm/test/helpers/helpers.js +++ b/evm/test/helpers/helpers.js @@ -3,6 +3,7 @@ const { ethers, network } = require("hardhat"); const BigNumber = ethers.BigNumber const BN = web3.utils.BN; const axios = require('axios') +const { exec } = require("child_process"); const hash = web3.utils.keccak256; var assert = require('assert'); @@ -64,37 +65,7 @@ getValset = async (timestamp) => { } } -getValsetSigs = async (timestamp) => { - url = "http://localhost:1317/layer/bridge/get_valset_sigs/" + timestamp - try { - const response = await axios.get(url) - sigsResponse = response.data.signatures - sigs = [] - for (i = 0; i < sigsResponse.length; i++) { - if (sigsResponse[i].length == 130) { - sigs.push({ - v: 28, - r: - '0x' + sigsResponse[i].slice(2, 66), - s: - '0x' + sigsResponse[i].slice(66, 130) - }) - } else { - sigs.push({ - v: 0, - r: '0x0000000000000000000000000000000000000000000000000000000000000000', - s: '0x0000000000000000000000000000000000000000000000000000000000000000' - }) - } - - } - return sigs - } catch (error) { - console.log(error) - } -} - -getValsetSigs2 = async (timestamp, valset, digest) => { +getValsetSigs = async (timestamp, valset, checkpoint) => { const url = "http://localhost:1317/layer/bridge/get_valset_sigs/" + timestamp; try { const response = await axios.get(url); @@ -103,7 +74,7 @@ getValsetSigs2 = async (timestamp, valset, digest) => { // get sha256 hash of the message // const digestArrayified = ethers.utils.arrayify(digest); // messageHash = ethers.utils.sha256Hash(digestArrayified); - const messageHash = ethers.utils.sha256(digest); + const messageHash = ethers.utils.sha256(checkpoint); for (let i = 0; i < sigsResponse.length; i++) { const signature = sigsResponse[i]; if (signature.length === 130) { @@ -250,30 +221,77 @@ getOracleAttestations = async (queryId, timestamp, valset, digest) => { } } -getOracleAttestationsCheat = async (queryId, timestamp) => { +getSnapshotsByReport = async (queryId, timestamp) => { const formattedQueryId = queryId.startsWith("0x") ? queryId.slice(2) : queryId; - url = "http://localhost:1317/layer/bridge/get_oracle_attestations/" + formattedQueryId + "/" + timestamp + url = "http://localhost:1317/layer/bridge/get_snapshots_by_report/" + formattedQueryId + "/" + timestamp + try { + const response = await axios.get(url) + snapshots = response.data.snapshots + return snapshots + } catch (error) { + console.log(error) + } +} + +getAttestationDataBySnapshot = async (snapshot) => { + url = "http://localhost:1317/layer/bridge/get_attestation_data_by_snapshot/" + snapshot + try { + const response = await axios.get(url) + attestationDataReturned = response.data + attestationData = { + queryId: '0x' + attestationDataReturned.queryId, + report: { + value: '0x' + attestationDataReturned.aggregateValue, + timestamp: attestationDataReturned.timestamp, + aggregatePower: attestationDataReturned.aggregatePower, + previousTimestamp: attestationDataReturned.previousReportTimestamp, + nextTimestamp: attestationDataReturned.nextReportTimestamp + }, + attestTimestamp: attestationDataReturned.attestationTimestamp + } + return attestationData + } catch (error) { + console.log(error) + } +} + +getAttestationsBySnapshot = async (snapshot, valset) => { + url = "http://localhost:1317/layer/bridge/get_attestations_by_snapshot/" + snapshot + const messageHash = ethers.utils.sha256('0x' + snapshot); try { const response = await axios.get(url) attestsResponse = response.data.attestations attestations = [] for (i = 0; i < attestsResponse.length; i++) { - attestation = attestsResponse[i] + attestation = '0x' + attestsResponse[i] if (attestation.length == 130) { - let v = 28 + // try v = 27 + let v = 27 let r = '0x' + attestation.slice(2, 66) let s = '0x' + attestation.slice(66, 130) + let recoveredAddress = ethers.utils.recoverAddress(messageHash, { + r: r, + s: s, + v: v + }) + if (recoveredAddress.toLowerCase() != valset[i].addr.toLowerCase()) { + v = 28 + recoveredAddress = ethers.utils.recoverAddress(messageHash, { + r: r, + s: s, + v: v + }) + if (recoveredAddress.toLowerCase() != valset[i].addr.toLowerCase()) { + v = 0; + r = '0x0000000000000000000000000000000000000000000000000000000000000000'; + s = '0x0000000000000000000000000000000000000000000000000000000000000000'; + } + } attestations.push({ v: v, r: r, s: s }) - } else { - attestations.push({ - v: 0, - r: '0x0000000000000000000000000000000000000000000000000000000000000000', - s: '0x0000000000000000000000000000000000000000000000000000000000000000' - }) } } return attestations @@ -282,11 +300,26 @@ getOracleAttestationsCheat = async (queryId, timestamp) => { } } +requestAttestations = async (queryId, timestamp) => { + try { + const shellCommand = '../layerd tx bridge request-attestations ' + queryId + ' ' + timestamp + ' --from charlie --chain-id layer --keyring-backend test --home ~/.layer/alice --yes' + const transactionResult = await execShellCommand(shellCommand) + console.log("transactionResult: ", transactionResult) + } catch (error) { + console.log("error: ", error) + } +} - - - - +execShellCommand = async (cmd) => { + return new Promise((resolve, reject) => { + exec(cmd, (error, stdout, stderr) => { + if (error) { + console.warn(error); + } + resolve(stdout ? stdout : stderr); + }); + }); +} getValidatorSet = async (height) => { url = "http://localhost:1317/layer/bridge/blockvalidators?height=" + height @@ -508,6 +541,10 @@ function fromWei(n) { return web3.utils.fromWei(n) } +function sleep(s) { + return new Promise(resolve => setTimeout(resolve, s * 1000)); +} + module.exports = { timeTarget: 240, hash, @@ -524,6 +561,7 @@ module.exports = { toWei, fromWei, expectThrow, + sleep, getLatestBlockNumber, getValidatorSet, calculateValCheckpoint, @@ -537,11 +575,13 @@ module.exports = { getValsetCheckpointParams, getValset, getValsetSigs, - getValsetSigs2, getCurrentAggregateReport, getDataBefore, getOracleAttestations, - getOracleAttestationsCheat, - domainSeparateOracleAttestationData + domainSeparateOracleAttestationData, + getSnapshotsByReport, + getAttestationDataBySnapshot, + getAttestationsBySnapshot, + requestAttestations }; diff --git a/x/bridge/client/cli/query_get_attestation_data_by_snapshot.go b/x/bridge/client/cli/query_get_attestation_data_by_snapshot.go index a3b9f9bea..dbf8e4651 100644 --- a/x/bridge/client/cli/query_get_attestation_data_by_snapshot.go +++ b/x/bridge/client/cli/query_get_attestation_data_by_snapshot.go @@ -11,11 +11,11 @@ import ( var _ = strconv.Itoa(0) -func CmdGetSnapshotsByReport() *cobra.Command { +func CmdGetAttestationDataBySnapshot() *cobra.Command { cmd := &cobra.Command{ - Use: "get-snapshots-by-report [queryId] [timestamp]", - Short: "Query get-snapshots-by-report", - Args: cobra.ExactArgs(2), + Use: "get-attestation-data-by-snapshot [snapshot]", + Short: "Query get-attestation-data-by-snapshot", + Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) (err error) { clientCtx, err := client.GetClientQueryContext(cmd) @@ -23,14 +23,13 @@ func CmdGetSnapshotsByReport() *cobra.Command { return err } - queryId := args[0] - timestamp := args[1] + snapshot := args[0] queryClient := types.NewQueryClient(clientCtx) - params := &types.QueryGetSnapshotsByReportRequest{QueryId: queryId, Timestamp: timestamp} + params := &types.QueryGetAttestationDataBySnapshotRequest{Snapshot: snapshot} - res, err := queryClient.GetSnapshotsByReport(cmd.Context(), params) + res, err := queryClient.GetAttestationDataBySnapshot(cmd.Context(), params) if err != nil { return err } diff --git a/x/bridge/client/cli/query_get_snapshots.by_report.go b/x/bridge/client/cli/query_get_snapshots_by_report.go similarity index 60% rename from x/bridge/client/cli/query_get_snapshots.by_report.go rename to x/bridge/client/cli/query_get_snapshots_by_report.go index dbf8e4651..a3b9f9bea 100644 --- a/x/bridge/client/cli/query_get_snapshots.by_report.go +++ b/x/bridge/client/cli/query_get_snapshots_by_report.go @@ -11,11 +11,11 @@ import ( var _ = strconv.Itoa(0) -func CmdGetAttestationDataBySnapshot() *cobra.Command { +func CmdGetSnapshotsByReport() *cobra.Command { cmd := &cobra.Command{ - Use: "get-attestation-data-by-snapshot [snapshot]", - Short: "Query get-attestation-data-by-snapshot", - Args: cobra.ExactArgs(1), + Use: "get-snapshots-by-report [queryId] [timestamp]", + Short: "Query get-snapshots-by-report", + Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) (err error) { clientCtx, err := client.GetClientQueryContext(cmd) @@ -23,13 +23,14 @@ func CmdGetAttestationDataBySnapshot() *cobra.Command { return err } - snapshot := args[0] + queryId := args[0] + timestamp := args[1] queryClient := types.NewQueryClient(clientCtx) - params := &types.QueryGetAttestationDataBySnapshotRequest{Snapshot: snapshot} + params := &types.QueryGetSnapshotsByReportRequest{QueryId: queryId, Timestamp: timestamp} - res, err := queryClient.GetAttestationDataBySnapshot(cmd.Context(), params) + res, err := queryClient.GetSnapshotsByReport(cmd.Context(), params) if err != nil { return err } From efaf59c54336f8afcfd0f97b5ba3ddea94c39286 Mon Sep 17 00:00:00 2001 From: tkernell Date: Fri, 5 Apr 2024 15:33:28 -0500 Subject: [PATCH 12/18] use test backend for init script --- start_scripts/start_two_chains.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/start_scripts/start_two_chains.sh b/start_scripts/start_two_chains.sh index 776fb5fc9..6c3e14ad9 100755 --- a/start_scripts/start_two_chains.sh +++ b/start_scripts/start_two_chains.sh @@ -79,6 +79,18 @@ echo $PASSWORD | ./layerd keys export bill --keyring-backend $KEYRING_BACKEND -- echo "Importing bill key to test backend..." echo $PASSWORD | ./layerd keys import bill ~/Desktop/bill_keyfile --keyring-backend test --home ~/.layer/bill +# Export charlie key from os backend and import to test backend +echo "Exporting charlie key..." +echo $PASSWORD | ./layerd keys export charlie --keyring-backend $KEYRING_BACKEND --home ~/.layer/alice > ~/Desktop/charlie_keyfile +echo "Importing charlie key to test backend..." +echo $PASSWORD | ./layerd keys import charlie ~/Desktop/charlie_keyfile --keyring-backend test --home ~/.layer/alice + +# Delete the keyfiles +echo "Deleting keyfiles..." +rm ~/Desktop/alice_keyfile +rm ~/Desktop/bill_keyfile +rm ~/Desktop/charlie_keyfile + # Modify timeout_commit in config.toml for alice echo "Modifying timeout_commit in config.toml for alice..." sed -i '' 's/timeout_commit = "5s"/timeout_commit = "500ms"/' ~/.layer/alice/config/config.toml From 6082dc4822e08bb2bdbd93d7f9f7ef7534eea8aa Mon Sep 17 00:00:00 2001 From: tkernell Date: Mon, 8 Apr 2024 19:09:21 -0500 Subject: [PATCH 13/18] cosmjs --- evm/generated/cosmos/msg/v1/msg_pb.js | 78 + evm/generated/layer/bridge/tx_pb.js | 1366 +++++++++++++++++ evm/package.json | 8 +- evm/test/Bridge-TestsAuto.js | 68 +- evm/test/helpers/helpers.js | 84 +- start_scripts/start_two_chains.sh | 6 +- x/bridge/keeper/keeper.go | 12 +- .../query_get_attestation_data_by_snapshot.go | 2 +- 8 files changed, 1602 insertions(+), 22 deletions(-) create mode 100644 evm/generated/cosmos/msg/v1/msg_pb.js create mode 100644 evm/generated/layer/bridge/tx_pb.js diff --git a/evm/generated/cosmos/msg/v1/msg_pb.js b/evm/generated/cosmos/msg/v1/msg_pb.js new file mode 100644 index 000000000..173abf2a1 --- /dev/null +++ b/evm/generated/cosmos/msg/v1/msg_pb.js @@ -0,0 +1,78 @@ +// source: cosmos/msg/v1/msg.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); + +var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js'); +goog.object.extend(proto, google_protobuf_descriptor_pb); +goog.exportSymbol('proto.cosmos.msg.v1.service', null, global); +goog.exportSymbol('proto.cosmos.msg.v1.signerList', null, global); + +/** + * A tuple of {field number, class constructor} for the extension + * field named `service`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.cosmos.msg.v1.service = new jspb.ExtensionFieldInfo( + 11110000, + {service: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.ServiceOptions.extensionsBinary[11110000] = new jspb.ExtensionFieldBinaryInfo( + proto.cosmos.msg.v1.service, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.ServiceOptions.extensions[11110000] = proto.cosmos.msg.v1.service; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `signerList`. + * @type {!jspb.ExtensionFieldInfo>} + */ +proto.cosmos.msg.v1.signerList = new jspb.ExtensionFieldInfo( + 11110000, + {signerList: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 1); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[11110000] = new jspb.ExtensionFieldBinaryInfo( + proto.cosmos.msg.v1.signerList, + jspb.BinaryReader.prototype.readString, + jspb.BinaryWriter.prototype.writeRepeatedString, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[11110000] = proto.cosmos.msg.v1.signerList; + +goog.object.extend(exports, proto.cosmos.msg.v1); diff --git a/evm/generated/layer/bridge/tx_pb.js b/evm/generated/layer/bridge/tx_pb.js new file mode 100644 index 000000000..2b2f651c9 --- /dev/null +++ b/evm/generated/layer/bridge/tx_pb.js @@ -0,0 +1,1366 @@ +// source: layer/bridge/tx.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); + +var cosmos_msg_v1_msg_pb = require('../../cosmos/msg/v1/msg_pb.js'); +goog.object.extend(proto, cosmos_msg_v1_msg_pb); +goog.exportSymbol('proto.layer.bridge.MsgRegisterOperatorPubkey', null, global); +goog.exportSymbol('proto.layer.bridge.MsgRegisterOperatorPubkeyResponse', null, global); +goog.exportSymbol('proto.layer.bridge.MsgRequestAttestations', null, global); +goog.exportSymbol('proto.layer.bridge.MsgRequestAttestationsResponse', null, global); +goog.exportSymbol('proto.layer.bridge.MsgSubmitBridgeValsetSignature', null, global); +goog.exportSymbol('proto.layer.bridge.MsgSubmitBridgeValsetSignatureResponse', null, global); +goog.exportSymbol('proto.layer.bridge.MsgSubmitOracleAttestation', null, global); +goog.exportSymbol('proto.layer.bridge.MsgSubmitOracleAttestationResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.layer.bridge.MsgRegisterOperatorPubkey = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.layer.bridge.MsgRegisterOperatorPubkey, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.layer.bridge.MsgRegisterOperatorPubkey.displayName = 'proto.layer.bridge.MsgRegisterOperatorPubkey'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.layer.bridge.MsgRegisterOperatorPubkeyResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.layer.bridge.MsgRegisterOperatorPubkeyResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.layer.bridge.MsgRegisterOperatorPubkeyResponse.displayName = 'proto.layer.bridge.MsgRegisterOperatorPubkeyResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.layer.bridge.MsgSubmitBridgeValsetSignature = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.layer.bridge.MsgSubmitBridgeValsetSignature, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.layer.bridge.MsgSubmitBridgeValsetSignature.displayName = 'proto.layer.bridge.MsgSubmitBridgeValsetSignature'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.layer.bridge.MsgSubmitBridgeValsetSignatureResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.layer.bridge.MsgSubmitBridgeValsetSignatureResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.layer.bridge.MsgSubmitBridgeValsetSignatureResponse.displayName = 'proto.layer.bridge.MsgSubmitBridgeValsetSignatureResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.layer.bridge.MsgSubmitOracleAttestation = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.layer.bridge.MsgSubmitOracleAttestation, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.layer.bridge.MsgSubmitOracleAttestation.displayName = 'proto.layer.bridge.MsgSubmitOracleAttestation'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.layer.bridge.MsgSubmitOracleAttestationResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.layer.bridge.MsgSubmitOracleAttestationResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.layer.bridge.MsgSubmitOracleAttestationResponse.displayName = 'proto.layer.bridge.MsgSubmitOracleAttestationResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.layer.bridge.MsgRequestAttestations = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.layer.bridge.MsgRequestAttestations, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.layer.bridge.MsgRequestAttestations.displayName = 'proto.layer.bridge.MsgRequestAttestations'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.layer.bridge.MsgRequestAttestationsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.layer.bridge.MsgRequestAttestationsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.layer.bridge.MsgRequestAttestationsResponse.displayName = 'proto.layer.bridge.MsgRequestAttestationsResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.layer.bridge.MsgRegisterOperatorPubkey.prototype.toObject = function(opt_includeInstance) { + return proto.layer.bridge.MsgRegisterOperatorPubkey.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.layer.bridge.MsgRegisterOperatorPubkey} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.layer.bridge.MsgRegisterOperatorPubkey.toObject = function(includeInstance, msg) { + var f, obj = { + creator: jspb.Message.getFieldWithDefault(msg, 1, ""), + operatorpubkey: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.layer.bridge.MsgRegisterOperatorPubkey} + */ +proto.layer.bridge.MsgRegisterOperatorPubkey.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.layer.bridge.MsgRegisterOperatorPubkey; + return proto.layer.bridge.MsgRegisterOperatorPubkey.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.layer.bridge.MsgRegisterOperatorPubkey} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.layer.bridge.MsgRegisterOperatorPubkey} + */ +proto.layer.bridge.MsgRegisterOperatorPubkey.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setCreator(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setOperatorpubkey(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.layer.bridge.MsgRegisterOperatorPubkey.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.layer.bridge.MsgRegisterOperatorPubkey.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.layer.bridge.MsgRegisterOperatorPubkey} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.layer.bridge.MsgRegisterOperatorPubkey.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCreator(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getOperatorpubkey(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string creator = 1; + * @return {string} + */ +proto.layer.bridge.MsgRegisterOperatorPubkey.prototype.getCreator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.layer.bridge.MsgRegisterOperatorPubkey} returns this + */ +proto.layer.bridge.MsgRegisterOperatorPubkey.prototype.setCreator = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string operatorPubkey = 2; + * @return {string} + */ +proto.layer.bridge.MsgRegisterOperatorPubkey.prototype.getOperatorpubkey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.layer.bridge.MsgRegisterOperatorPubkey} returns this + */ +proto.layer.bridge.MsgRegisterOperatorPubkey.prototype.setOperatorpubkey = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.layer.bridge.MsgRegisterOperatorPubkeyResponse.prototype.toObject = function(opt_includeInstance) { + return proto.layer.bridge.MsgRegisterOperatorPubkeyResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.layer.bridge.MsgRegisterOperatorPubkeyResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.layer.bridge.MsgRegisterOperatorPubkeyResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.layer.bridge.MsgRegisterOperatorPubkeyResponse} + */ +proto.layer.bridge.MsgRegisterOperatorPubkeyResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.layer.bridge.MsgRegisterOperatorPubkeyResponse; + return proto.layer.bridge.MsgRegisterOperatorPubkeyResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.layer.bridge.MsgRegisterOperatorPubkeyResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.layer.bridge.MsgRegisterOperatorPubkeyResponse} + */ +proto.layer.bridge.MsgRegisterOperatorPubkeyResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.layer.bridge.MsgRegisterOperatorPubkeyResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.layer.bridge.MsgRegisterOperatorPubkeyResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.layer.bridge.MsgRegisterOperatorPubkeyResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.layer.bridge.MsgRegisterOperatorPubkeyResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.layer.bridge.MsgSubmitBridgeValsetSignature.prototype.toObject = function(opt_includeInstance) { + return proto.layer.bridge.MsgSubmitBridgeValsetSignature.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.layer.bridge.MsgSubmitBridgeValsetSignature} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.layer.bridge.MsgSubmitBridgeValsetSignature.toObject = function(includeInstance, msg) { + var f, obj = { + creator: jspb.Message.getFieldWithDefault(msg, 1, ""), + timestamp: jspb.Message.getFieldWithDefault(msg, 2, ""), + signature: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.layer.bridge.MsgSubmitBridgeValsetSignature} + */ +proto.layer.bridge.MsgSubmitBridgeValsetSignature.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.layer.bridge.MsgSubmitBridgeValsetSignature; + return proto.layer.bridge.MsgSubmitBridgeValsetSignature.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.layer.bridge.MsgSubmitBridgeValsetSignature} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.layer.bridge.MsgSubmitBridgeValsetSignature} + */ +proto.layer.bridge.MsgSubmitBridgeValsetSignature.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setCreator(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setTimestamp(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSignature(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.layer.bridge.MsgSubmitBridgeValsetSignature.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.layer.bridge.MsgSubmitBridgeValsetSignature.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.layer.bridge.MsgSubmitBridgeValsetSignature} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.layer.bridge.MsgSubmitBridgeValsetSignature.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCreator(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getTimestamp(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSignature(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string creator = 1; + * @return {string} + */ +proto.layer.bridge.MsgSubmitBridgeValsetSignature.prototype.getCreator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.layer.bridge.MsgSubmitBridgeValsetSignature} returns this + */ +proto.layer.bridge.MsgSubmitBridgeValsetSignature.prototype.setCreator = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string timestamp = 2; + * @return {string} + */ +proto.layer.bridge.MsgSubmitBridgeValsetSignature.prototype.getTimestamp = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.layer.bridge.MsgSubmitBridgeValsetSignature} returns this + */ +proto.layer.bridge.MsgSubmitBridgeValsetSignature.prototype.setTimestamp = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string signature = 3; + * @return {string} + */ +proto.layer.bridge.MsgSubmitBridgeValsetSignature.prototype.getSignature = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.layer.bridge.MsgSubmitBridgeValsetSignature} returns this + */ +proto.layer.bridge.MsgSubmitBridgeValsetSignature.prototype.setSignature = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.layer.bridge.MsgSubmitBridgeValsetSignatureResponse.prototype.toObject = function(opt_includeInstance) { + return proto.layer.bridge.MsgSubmitBridgeValsetSignatureResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.layer.bridge.MsgSubmitBridgeValsetSignatureResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.layer.bridge.MsgSubmitBridgeValsetSignatureResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.layer.bridge.MsgSubmitBridgeValsetSignatureResponse} + */ +proto.layer.bridge.MsgSubmitBridgeValsetSignatureResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.layer.bridge.MsgSubmitBridgeValsetSignatureResponse; + return proto.layer.bridge.MsgSubmitBridgeValsetSignatureResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.layer.bridge.MsgSubmitBridgeValsetSignatureResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.layer.bridge.MsgSubmitBridgeValsetSignatureResponse} + */ +proto.layer.bridge.MsgSubmitBridgeValsetSignatureResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.layer.bridge.MsgSubmitBridgeValsetSignatureResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.layer.bridge.MsgSubmitBridgeValsetSignatureResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.layer.bridge.MsgSubmitBridgeValsetSignatureResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.layer.bridge.MsgSubmitBridgeValsetSignatureResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.layer.bridge.MsgSubmitOracleAttestation.prototype.toObject = function(opt_includeInstance) { + return proto.layer.bridge.MsgSubmitOracleAttestation.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.layer.bridge.MsgSubmitOracleAttestation} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.layer.bridge.MsgSubmitOracleAttestation.toObject = function(includeInstance, msg) { + var f, obj = { + creator: jspb.Message.getFieldWithDefault(msg, 1, ""), + queryid: jspb.Message.getFieldWithDefault(msg, 2, ""), + timestamp: jspb.Message.getFieldWithDefault(msg, 3, ""), + signature: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.layer.bridge.MsgSubmitOracleAttestation} + */ +proto.layer.bridge.MsgSubmitOracleAttestation.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.layer.bridge.MsgSubmitOracleAttestation; + return proto.layer.bridge.MsgSubmitOracleAttestation.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.layer.bridge.MsgSubmitOracleAttestation} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.layer.bridge.MsgSubmitOracleAttestation} + */ +proto.layer.bridge.MsgSubmitOracleAttestation.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setCreator(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setQueryid(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setTimestamp(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setSignature(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.layer.bridge.MsgSubmitOracleAttestation.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.layer.bridge.MsgSubmitOracleAttestation.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.layer.bridge.MsgSubmitOracleAttestation} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.layer.bridge.MsgSubmitOracleAttestation.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCreator(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getQueryid(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getTimestamp(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getSignature(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string creator = 1; + * @return {string} + */ +proto.layer.bridge.MsgSubmitOracleAttestation.prototype.getCreator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.layer.bridge.MsgSubmitOracleAttestation} returns this + */ +proto.layer.bridge.MsgSubmitOracleAttestation.prototype.setCreator = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string queryId = 2; + * @return {string} + */ +proto.layer.bridge.MsgSubmitOracleAttestation.prototype.getQueryid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.layer.bridge.MsgSubmitOracleAttestation} returns this + */ +proto.layer.bridge.MsgSubmitOracleAttestation.prototype.setQueryid = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string timestamp = 3; + * @return {string} + */ +proto.layer.bridge.MsgSubmitOracleAttestation.prototype.getTimestamp = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.layer.bridge.MsgSubmitOracleAttestation} returns this + */ +proto.layer.bridge.MsgSubmitOracleAttestation.prototype.setTimestamp = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string signature = 4; + * @return {string} + */ +proto.layer.bridge.MsgSubmitOracleAttestation.prototype.getSignature = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.layer.bridge.MsgSubmitOracleAttestation} returns this + */ +proto.layer.bridge.MsgSubmitOracleAttestation.prototype.setSignature = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.layer.bridge.MsgSubmitOracleAttestationResponse.prototype.toObject = function(opt_includeInstance) { + return proto.layer.bridge.MsgSubmitOracleAttestationResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.layer.bridge.MsgSubmitOracleAttestationResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.layer.bridge.MsgSubmitOracleAttestationResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.layer.bridge.MsgSubmitOracleAttestationResponse} + */ +proto.layer.bridge.MsgSubmitOracleAttestationResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.layer.bridge.MsgSubmitOracleAttestationResponse; + return proto.layer.bridge.MsgSubmitOracleAttestationResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.layer.bridge.MsgSubmitOracleAttestationResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.layer.bridge.MsgSubmitOracleAttestationResponse} + */ +proto.layer.bridge.MsgSubmitOracleAttestationResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.layer.bridge.MsgSubmitOracleAttestationResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.layer.bridge.MsgSubmitOracleAttestationResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.layer.bridge.MsgSubmitOracleAttestationResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.layer.bridge.MsgSubmitOracleAttestationResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.layer.bridge.MsgRequestAttestations.prototype.toObject = function(opt_includeInstance) { + return proto.layer.bridge.MsgRequestAttestations.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.layer.bridge.MsgRequestAttestations} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.layer.bridge.MsgRequestAttestations.toObject = function(includeInstance, msg) { + var f, obj = { + creator: jspb.Message.getFieldWithDefault(msg, 1, ""), + queryid: jspb.Message.getFieldWithDefault(msg, 2, ""), + timestamp: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.layer.bridge.MsgRequestAttestations} + */ +proto.layer.bridge.MsgRequestAttestations.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.layer.bridge.MsgRequestAttestations; + return proto.layer.bridge.MsgRequestAttestations.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.layer.bridge.MsgRequestAttestations} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.layer.bridge.MsgRequestAttestations} + */ +proto.layer.bridge.MsgRequestAttestations.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setCreator(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setQueryid(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setTimestamp(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.layer.bridge.MsgRequestAttestations.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.layer.bridge.MsgRequestAttestations.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.layer.bridge.MsgRequestAttestations} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.layer.bridge.MsgRequestAttestations.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCreator(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getQueryid(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getTimestamp(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string creator = 1; + * @return {string} + */ +proto.layer.bridge.MsgRequestAttestations.prototype.getCreator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.layer.bridge.MsgRequestAttestations} returns this + */ +proto.layer.bridge.MsgRequestAttestations.prototype.setCreator = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string queryId = 2; + * @return {string} + */ +proto.layer.bridge.MsgRequestAttestations.prototype.getQueryid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.layer.bridge.MsgRequestAttestations} returns this + */ +proto.layer.bridge.MsgRequestAttestations.prototype.setQueryid = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string timestamp = 3; + * @return {string} + */ +proto.layer.bridge.MsgRequestAttestations.prototype.getTimestamp = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.layer.bridge.MsgRequestAttestations} returns this + */ +proto.layer.bridge.MsgRequestAttestations.prototype.setTimestamp = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.layer.bridge.MsgRequestAttestationsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.layer.bridge.MsgRequestAttestationsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.layer.bridge.MsgRequestAttestationsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.layer.bridge.MsgRequestAttestationsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.layer.bridge.MsgRequestAttestationsResponse} + */ +proto.layer.bridge.MsgRequestAttestationsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.layer.bridge.MsgRequestAttestationsResponse; + return proto.layer.bridge.MsgRequestAttestationsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.layer.bridge.MsgRequestAttestationsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.layer.bridge.MsgRequestAttestationsResponse} + */ +proto.layer.bridge.MsgRequestAttestationsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.layer.bridge.MsgRequestAttestationsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.layer.bridge.MsgRequestAttestationsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.layer.bridge.MsgRequestAttestationsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.layer.bridge.MsgRequestAttestationsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.layer.bridge); diff --git a/evm/package.json b/evm/package.json index a3400278d..a22ac1296 100644 --- a/evm/package.json +++ b/evm/package.json @@ -23,5 +23,11 @@ "hardhat-gas-reporter": "^1.0.4", "web3": "^4.2.2" }, - "mocha": {} + "mocha": {}, + "dependencies": { + "@cosmjs/proto-signing": "^0.32.3", + "@cosmjs/stargate": "^0.32.3", + "google-protobuf": "^3.21.2", + "protoc-gen-grpc-web": "^1.4.2" + } } diff --git a/evm/test/Bridge-TestsAuto.js b/evm/test/Bridge-TestsAuto.js index 487d6d17b..8e0ede4d7 100644 --- a/evm/test/Bridge-TestsAuto.js +++ b/evm/test/Bridge-TestsAuto.js @@ -538,7 +538,7 @@ describe("BlobstreamO - Manual Function and e2e Tests", function () { }) - it.only("query layer api, deploy and verify with real params", async function () { + it("query layer api, deploy and verify with real params", async function () { vts0 = await h.getValsetTimestampByIndex(0) vp0 = await h.getValsetCheckpointParams(vts0) console.log("valsetTimestamp0: ", vts0) @@ -590,6 +590,72 @@ describe("BlobstreamO - Manual Function and e2e Tests", function () { console.log("currentTime: ", currentTime) pastReport = await h.getDataBefore(ETH_USD_QUERY_ID, currentTime) console.log("pastReport: ", pastReport) + // await h.requestAttestations(ETH_USD_QUERY_ID, pastReport.timestamp) + }) + + it("query layer api, deploy and verify with real params", async function () { + vts0 = await h.getValsetTimestampByIndex(0) + vp0 = await h.getValsetCheckpointParams(vts0) + console.log("vp0: ", vp0) + + console.log("deploying bridge...") + const Bridge = await ethers.getContractFactory("BlobstreamO"); + bridge = await Bridge.deploy(vp0.powerThreshold, vp0.timestamp, UNBONDING_PERIOD, vp0.checkpoint, guardian.address); + await bridge.deployed(); + + vts1 = await h.getValsetTimestampByIndex(1) + vp1 = await h.getValsetCheckpointParams(vts1) + console.log("vp1: ", vp1) + valSet0 = await h.getValset(vp0.timestamp) + valSet1 = await h.getValset(vp1.timestamp) + + vsigs1 = await h.getValsetSigs(vp1.timestamp, valSet0, vp1.checkpoint) + + console.log("updating validator set...") + await bridge.updateValidatorSet(vp1.valsetHash, vp1.powerThreshold, vp1.timestamp, valSet0, vsigs1); + + + // request new attestations + currentBlock = await h.getBlock() + currentTime = currentBlock.timestamp + currentTime = currentTime - 100 + console.log("currentTime: ", currentTime) + pastReport = await h.getDataBefore(ETH_USD_QUERY_ID, currentTime) + console.log("pastReport: ", pastReport) + + snapshots = await h.getSnapshotsByReport(ETH_USD_QUERY_ID, 1712610958) + console.log("snapshots: ", snapshots) + lastSnapshot = snapshots[snapshots.length - 1] + attestationData = await h.getAttestationDataBySnapshot(lastSnapshot) + console.log("attestationData: ", attestationData) + + oattests = await h.getAttestationsBySnapshot(lastSnapshot, valSet1) + if (oattests.length == 0) { + sleeptime = 2 + console.log("no attestations found, sleeping for ", sleeptime, " seconds...") + await h.sleep(2) + oattests = await h.getAttestationsBySnapshot(lastSnapshot, valSet1) + } + console.log("oattests: ", oattests) + + console.log("verifying oracle data...") + await bridge.verifyOracleData( + attestationData, + valSet1, + oattests, + ) + + }) + + it.only("try wallet", async function () { + wallet = await h.createCosmosWallet() + console.log("wallet: ", wallet) + + currentBlock = await h.getBlock() + currentTime = currentBlock.timestamp - 100 + pastReport = await h.getDataBefore(ETH_USD_QUERY_ID, currentTime) + console.log("pastReport: ", pastReport) + await h.requestAttestations(ETH_USD_QUERY_ID, pastReport.timestamp) }) }) diff --git a/evm/test/helpers/helpers.js b/evm/test/helpers/helpers.js index 13e96db4c..e7a0eb7be 100644 --- a/evm/test/helpers/helpers.js +++ b/evm/test/helpers/helpers.js @@ -3,7 +3,16 @@ const { ethers, network } = require("hardhat"); const BigNumber = ethers.BigNumber const BN = web3.utils.BN; const axios = require('axios') -const { exec } = require("child_process"); +const { DirectSecp256k1HdWallet, Registry } = require('@cosmjs/proto-signing'); +const { GasPrice, StargateClient, SigningStargateClient } = require('@cosmjs/stargate'); +const os = require('os'); +const path = require('path'); +const fs = require('fs').promises; +const { MsgRequestAttestations } = require('../../generated/layer/bridge/tx_pb.js'); + +const homeDirectory = os.homedir(); +const CHARLIE_MNEMONIC_FILE = path.join(homeDirectory, 'Desktop', 'charlie_mnemonic.txt'); + const hash = web3.utils.keccak256; var assert = require('assert'); @@ -300,25 +309,67 @@ getAttestationsBySnapshot = async (snapshot, valset) => { } } -requestAttestations = async (queryId, timestamp) => { +createCosmosWallet = async () => { try { - const shellCommand = '../layerd tx bridge request-attestations ' + queryId + ' ' + timestamp + ' --from charlie --chain-id layer --keyring-backend test --home ~/.layer/alice --yes' - const transactionResult = await execShellCommand(shellCommand) - console.log("transactionResult: ", transactionResult) + // Read the mnemonic from the file + const mnemonic = await fs.readFile(CHARLIE_MNEMONIC_FILE, { encoding: 'utf8' }); + // Trim any whitespace from the mnemonic to ensure it's clean + const trimmedMnemonic = mnemonic.trim(); + + // Create a wallet using the mnemonic + const wallet = await DirectSecp256k1HdWallet.fromMnemonic(trimmedMnemonic, { + // Specify the prefix for your blockchain, "cosmos" is used for the Cosmos Hub + // You might need to change this depending on your chain + prefix: 'tellor', + }); + + // Example: Fetching the first account from the wallet + const [firstAccount] = await wallet.getAccounts(); + + console.log(`Wallet address: ${firstAccount.address}`); + // Return the wallet or the account depending on your needs + return wallet; } catch (error) { - console.log("error: ", error) + console.error('Failed to create wallet from mnemonic:', error); } } -execShellCommand = async (cmd) => { - return new Promise((resolve, reject) => { - exec(cmd, (error, stdout, stderr) => { - if (error) { - console.warn(error); - } - resolve(stdout ? stdout : stderr); - }); - }); +requestAttestations = async (queryId, timestamp) => { + const formattedQueryId = queryId.startsWith("0x") ? queryId.slice(2) : queryId; + const rpcEndpoint = 'http://localhost:26657'; + const chainId = 'layer'; + + const registry = new Registry(); + const typeUrl = "/layer.bridge.MsgRequestAttestations" + registry.register(typeUrl, MsgRequestAttestations); + const options = { registry: registry }; + + // create a wallet with charlie's mnemonic + const wallet = await createCosmosWallet(); + const [firstAccount] = await wallet.getAccounts(); + + // create a stargate client + const client = await SigningStargateClient.connectWithSigner(rpcEndpoint, wallet, options); + + // Construct the message + // NOTE: You'll need to adjust this to match the structure expected by your blockchain + let msg = new MsgRequestAttestations() + msg.setQueryid(formattedQueryId) + msg.setTimestamp(timestamp) + msg.setCreator(firstAccount.address) + + // Define the fee + const fee = { + amount: [{ denom: 'stake', amount: '2000' }], + gas: '200000', + }; + + // sign and broadcast the transaction + console.log("signing and broadcasting") + const result = await client.signAndBroadcast(firstAccount.address, [msg], fee, 'Request attestations'); + assertIsBroadcastTxSuccess(result); + + console.log('Transaction result:', result); } getValidatorSet = async (height) => { @@ -582,6 +633,7 @@ module.exports = { getSnapshotsByReport, getAttestationDataBySnapshot, getAttestationsBySnapshot, - requestAttestations + requestAttestations, + createCosmosWallet }; diff --git a/start_scripts/start_two_chains.sh b/start_scripts/start_two_chains.sh index 6c3e14ad9..3190d8783 100755 --- a/start_scripts/start_two_chains.sh +++ b/start_scripts/start_two_chains.sh @@ -37,7 +37,11 @@ echo "alice..." echo "bill..." ./layerd keys add bill --keyring-backend $KEYRING_BACKEND --home ~/.layer/bill echo "charlie..." -./layerd keys add charlie --keyring-backend $KEYRING_BACKEND --home ~/.layer/alice +yes | ./layerd keys add charlie --keyring-backend os --home ~/.layer/alice > ~/Desktop/charlie_key_info.txt 2>&1 + +# Extract the mnemonic from the key_info file +echo "Extracting charlie's mnemonic from key_info file..." +grep -A 24 'It is the only way to recover your account if you ever forget your password.' ~/Desktop/charlie_key_info.txt | tail -n 1 > ~/Desktop/charlie_mnemonic.txt # Update vote_extensions_enable_height in genesis.json diff --git a/x/bridge/keeper/keeper.go b/x/bridge/keeper/keeper.go index 5d4f0a0dc..a8263cef8 100644 --- a/x/bridge/keeper/keeper.go +++ b/x/bridge/keeper/keeper.go @@ -967,12 +967,18 @@ func (k Keeper) CreateSnapshot(ctx sdk.Context, queryId []byte, timestamp time.T if err != nil { tsBefore = time.Unix(0, 0) } + k.Logger(ctx).Info("tsBefore", "tsBefore", tsBefore.Unix()) k.Logger(ctx).Info("getting next timestamp...") tsAfter, err := k.oracleKeeper.GetTimestampAfter(ctx, queryId, timestamp) if err != nil { tsAfter = time.Unix(0, 0) } + k.Logger(ctx).Info("tsAfter", "tsAfter", tsAfter.Unix()) + + // use current block time for attestationTimestamp + attestationTimestamp := ctx.BlockTime() + k.Logger(ctx).Info("attestation timestamp", "attestationTimestamp", attestationTimestamp.Unix()) k.Logger(ctx).Info("encoding oracle attestation data...") snapshotBytes, err := k.EncodeOracleAttestationData( @@ -983,7 +989,7 @@ func (k Keeper) CreateSnapshot(ctx sdk.Context, queryId []byte, timestamp time.T tsBefore.Unix(), tsAfter.Unix(), hex.EncodeToString(validatorCheckpoint.Checkpoint), - timestamp.Unix(), + attestationTimestamp.Unix(), ) if err != nil { k.Logger(ctx).Info("Error encoding oracle attestation data", "error", err) @@ -1026,13 +1032,15 @@ func (k Keeper) CreateSnapshot(ctx sdk.Context, queryId []byte, timestamp time.T // set snapshot to snapshot data map snapshotData := types.AttestationSnapshotData{ ValidatorCheckpoint: validatorCheckpoint.Checkpoint, - AttestationTimestamp: int64(timestamp.Unix()), + AttestationTimestamp: int64(attestationTimestamp.Unix()), PrevReportTimestamp: int64(tsBefore.Unix()), NextReportTimestamp: int64(tsAfter.Unix()), QueryId: queryId, Timestamp: int64(timestamp.Unix()), } k.Logger(ctx).Info("setting snapshot data...") + k.Logger(ctx).Info("snapshot", "snapshot", hex.EncodeToString(snapshotBytes)) + k.Logger(ctx).Info("snapshot data", "snapshotData", snapshotData) err = k.AttestSnapshotDataMap.Set(ctx, hex.EncodeToString(snapshotBytes), snapshotData) if err != nil { k.Logger(ctx).Info("Error setting attestation snapshot data", "error", err) diff --git a/x/bridge/keeper/query_get_attestation_data_by_snapshot.go b/x/bridge/keeper/query_get_attestation_data_by_snapshot.go index 8849ca2c8..471b40595 100644 --- a/x/bridge/keeper/query_get_attestation_data_by_snapshot.go +++ b/x/bridge/keeper/query_get_attestation_data_by_snapshot.go @@ -38,7 +38,7 @@ func (k Keeper) GetAttestationDataBySnapshot(goCtx context.Context, req *types.Q aggValueStr := aggReport.AggregateValue aggPowerStr := strconv.FormatInt(aggReport.ReporterPower, 10) checkpointStr := hex.EncodeToString(snapshotData.ValidatorCheckpoint) - attestationTimestampStr := strconv.FormatInt(snapshotData.Timestamp, 10) + attestationTimestampStr := strconv.FormatInt(snapshotData.AttestationTimestamp, 10) previousReportTimestampStr := strconv.FormatInt(snapshotData.PrevReportTimestamp, 10) nextReportTimestampStr := strconv.FormatInt(snapshotData.NextReportTimestamp, 10) From 7c4ed9279d23e11df6173849623ad3c6878415a0 Mon Sep 17 00:00:00 2001 From: tkernell Date: Tue, 9 Apr 2024 12:16:17 -0500 Subject: [PATCH 14/18] comments --- evm/test/helpers/helpers.js | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/evm/test/helpers/helpers.js b/evm/test/helpers/helpers.js index e7a0eb7be..f6dd745cf 100644 --- a/evm/test/helpers/helpers.js +++ b/evm/test/helpers/helpers.js @@ -311,23 +311,16 @@ getAttestationsBySnapshot = async (snapshot, valset) => { createCosmosWallet = async () => { try { - // Read the mnemonic from the file const mnemonic = await fs.readFile(CHARLIE_MNEMONIC_FILE, { encoding: 'utf8' }); - // Trim any whitespace from the mnemonic to ensure it's clean const trimmedMnemonic = mnemonic.trim(); - // Create a wallet using the mnemonic const wallet = await DirectSecp256k1HdWallet.fromMnemonic(trimmedMnemonic, { - // Specify the prefix for your blockchain, "cosmos" is used for the Cosmos Hub - // You might need to change this depending on your chain prefix: 'tellor', }); - // Example: Fetching the first account from the wallet const [firstAccount] = await wallet.getAccounts(); console.log(`Wallet address: ${firstAccount.address}`); - // Return the wallet or the account depending on your needs return wallet; } catch (error) { console.error('Failed to create wallet from mnemonic:', error); @@ -348,17 +341,13 @@ requestAttestations = async (queryId, timestamp) => { const wallet = await createCosmosWallet(); const [firstAccount] = await wallet.getAccounts(); - // create a stargate client const client = await SigningStargateClient.connectWithSigner(rpcEndpoint, wallet, options); - // Construct the message - // NOTE: You'll need to adjust this to match the structure expected by your blockchain let msg = new MsgRequestAttestations() msg.setQueryid(formattedQueryId) msg.setTimestamp(timestamp) msg.setCreator(firstAccount.address) - // Define the fee const fee = { amount: [{ denom: 'stake', amount: '2000' }], gas: '200000', From e66d28a14c384d5aaa661cc6c34ba57cd3b1b987 Mon Sep 17 00:00:00 2001 From: tkernell Date: Tue, 9 Apr 2024 17:27:03 -0500 Subject: [PATCH 15/18] cleanup --- api/layer/bridge/query.pulsar.go | 1841 ++-------- api/layer/bridge/query_grpc.pb.go | 36 - api/layer/bridge/tx.pulsar.go | 3171 +---------------- api/layer/bridge/tx_grpc.pb.go | 108 - app/extend_vote.go | 3 +- app/proposal_handler.go | 4 +- proto/layer/bridge/query.proto | 13 - proto/layer/bridge/tx.proto | 33 - x/bridge/client/cli/query.go | 1 - .../cli/query_get_oracle_attestations.go | 55 - x/bridge/client/cli/tx.go | 3 - .../client/cli/tx_register_operator_pubkey.go | 40 - .../cli/tx_submit_bridge_valset_signature.go | 42 - .../cli/tx_submit_oracle_attestation.go | 44 - x/bridge/keeper/keeper.go | 201 +- .../msg_server_register_operator_pubkey.go | 69 - ...g_server_submit_bridge_valset_signature.go | 30 - .../msg_server_submit_oracle_attestation.go | 30 - .../keeper/query_get_oracle_attestations.go | 34 - .../types/message_register_operator_pubkey.go | 47 - .../message_submit_bridge_valset_signature.go | 48 - .../message_submit_oracle_attestation.go | 55 - x/bridge/types/query.pb.go | 659 +--- x/bridge/types/query.pb.gw.go | 123 - x/bridge/types/tx.pb.go | 1344 +------ 25 files changed, 572 insertions(+), 7462 deletions(-) delete mode 100644 x/bridge/client/cli/query_get_oracle_attestations.go delete mode 100644 x/bridge/client/cli/tx_register_operator_pubkey.go delete mode 100644 x/bridge/client/cli/tx_submit_bridge_valset_signature.go delete mode 100644 x/bridge/client/cli/tx_submit_oracle_attestation.go delete mode 100644 x/bridge/keeper/msg_server_register_operator_pubkey.go delete mode 100644 x/bridge/keeper/msg_server_submit_bridge_valset_signature.go delete mode 100644 x/bridge/keeper/msg_server_submit_oracle_attestation.go delete mode 100644 x/bridge/keeper/query_get_oracle_attestations.go delete mode 100644 x/bridge/types/message_register_operator_pubkey.go delete mode 100644 x/bridge/types/message_submit_bridge_valset_signature.go delete mode 100644 x/bridge/types/message_submit_oracle_attestation.go diff --git a/api/layer/bridge/query.pulsar.go b/api/layer/bridge/query.pulsar.go index 1bc7548c0..ef5a8c080 100644 --- a/api/layer/bridge/query.pulsar.go +++ b/api/layer/bridge/query.pulsar.go @@ -7676,956 +7676,6 @@ func (x *fastReflection_QueryGetValsetSigsResponse) ProtoMethods() *protoiface.M } } -var ( - md_QueryGetOracleAttestationsRequest protoreflect.MessageDescriptor - fd_QueryGetOracleAttestationsRequest_query_id protoreflect.FieldDescriptor - fd_QueryGetOracleAttestationsRequest_timestamp protoreflect.FieldDescriptor -) - -func init() { - file_layer_bridge_query_proto_init() - md_QueryGetOracleAttestationsRequest = File_layer_bridge_query_proto.Messages().ByName("QueryGetOracleAttestationsRequest") - fd_QueryGetOracleAttestationsRequest_query_id = md_QueryGetOracleAttestationsRequest.Fields().ByName("query_id") - fd_QueryGetOracleAttestationsRequest_timestamp = md_QueryGetOracleAttestationsRequest.Fields().ByName("timestamp") -} - -var _ protoreflect.Message = (*fastReflection_QueryGetOracleAttestationsRequest)(nil) - -type fastReflection_QueryGetOracleAttestationsRequest QueryGetOracleAttestationsRequest - -func (x *QueryGetOracleAttestationsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryGetOracleAttestationsRequest)(x) -} - -func (x *QueryGetOracleAttestationsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_layer_bridge_query_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 _fastReflection_QueryGetOracleAttestationsRequest_messageType fastReflection_QueryGetOracleAttestationsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryGetOracleAttestationsRequest_messageType{} - -type fastReflection_QueryGetOracleAttestationsRequest_messageType struct{} - -func (x fastReflection_QueryGetOracleAttestationsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryGetOracleAttestationsRequest)(nil) -} -func (x fastReflection_QueryGetOracleAttestationsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryGetOracleAttestationsRequest) -} -func (x fastReflection_QueryGetOracleAttestationsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGetOracleAttestationsRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryGetOracleAttestationsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGetOracleAttestationsRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryGetOracleAttestationsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryGetOracleAttestationsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryGetOracleAttestationsRequest) New() protoreflect.Message { - return new(fastReflection_QueryGetOracleAttestationsRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryGetOracleAttestationsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryGetOracleAttestationsRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryGetOracleAttestationsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.QueryId) != 0 { - value := protoreflect.ValueOfBytes(x.QueryId) - if !f(fd_QueryGetOracleAttestationsRequest_query_id, value) { - return - } - } - if x.Timestamp != int64(0) { - value := protoreflect.ValueOfInt64(x.Timestamp) - if !f(fd_QueryGetOracleAttestationsRequest_timestamp, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryGetOracleAttestationsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "layer.bridge.QueryGetOracleAttestationsRequest.query_id": - return len(x.QueryId) != 0 - case "layer.bridge.QueryGetOracleAttestationsRequest.timestamp": - return x.Timestamp != int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetOracleAttestationsRequest")) - } - panic(fmt.Errorf("message layer.bridge.QueryGetOracleAttestationsRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetOracleAttestationsRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "layer.bridge.QueryGetOracleAttestationsRequest.query_id": - x.QueryId = nil - case "layer.bridge.QueryGetOracleAttestationsRequest.timestamp": - x.Timestamp = int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetOracleAttestationsRequest")) - } - panic(fmt.Errorf("message layer.bridge.QueryGetOracleAttestationsRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryGetOracleAttestationsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "layer.bridge.QueryGetOracleAttestationsRequest.query_id": - value := x.QueryId - return protoreflect.ValueOfBytes(value) - case "layer.bridge.QueryGetOracleAttestationsRequest.timestamp": - value := x.Timestamp - return protoreflect.ValueOfInt64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetOracleAttestationsRequest")) - } - panic(fmt.Errorf("message layer.bridge.QueryGetOracleAttestationsRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetOracleAttestationsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "layer.bridge.QueryGetOracleAttestationsRequest.query_id": - x.QueryId = value.Bytes() - case "layer.bridge.QueryGetOracleAttestationsRequest.timestamp": - x.Timestamp = value.Int() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetOracleAttestationsRequest")) - } - panic(fmt.Errorf("message layer.bridge.QueryGetOracleAttestationsRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetOracleAttestationsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "layer.bridge.QueryGetOracleAttestationsRequest.query_id": - panic(fmt.Errorf("field query_id of message layer.bridge.QueryGetOracleAttestationsRequest is not mutable")) - case "layer.bridge.QueryGetOracleAttestationsRequest.timestamp": - panic(fmt.Errorf("field timestamp of message layer.bridge.QueryGetOracleAttestationsRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetOracleAttestationsRequest")) - } - panic(fmt.Errorf("message layer.bridge.QueryGetOracleAttestationsRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryGetOracleAttestationsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "layer.bridge.QueryGetOracleAttestationsRequest.query_id": - return protoreflect.ValueOfBytes(nil) - case "layer.bridge.QueryGetOracleAttestationsRequest.timestamp": - return protoreflect.ValueOfInt64(int64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetOracleAttestationsRequest")) - } - panic(fmt.Errorf("message layer.bridge.QueryGetOracleAttestationsRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryGetOracleAttestationsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in layer.bridge.QueryGetOracleAttestationsRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryGetOracleAttestationsRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetOracleAttestationsRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryGetOracleAttestationsRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryGetOracleAttestationsRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryGetOracleAttestationsRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.QueryId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Timestamp != 0 { - n += 1 + runtime.Sov(uint64(x.Timestamp)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryGetOracleAttestationsRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Timestamp != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Timestamp)) - i-- - dAtA[i] = 0x10 - } - if len(x.QueryId) > 0 { - i -= len(x.QueryId) - copy(dAtA[i:], x.QueryId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.QueryId))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryGetOracleAttestationsRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetOracleAttestationsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetOracleAttestationsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field QueryId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.QueryId = append(x.QueryId[:0], dAtA[iNdEx:postIndex]...) - if x.QueryId == nil { - x.QueryId = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - x.Timestamp = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Timestamp |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryGetOracleAttestationsResponse_1_list)(nil) - -type _QueryGetOracleAttestationsResponse_1_list struct { - list *[]string -} - -func (x *_QueryGetOracleAttestationsResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryGetOracleAttestationsResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_QueryGetOracleAttestationsResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_QueryGetOracleAttestationsResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryGetOracleAttestationsResponse_1_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message QueryGetOracleAttestationsResponse at list field Attestations as it is not of Message kind")) -} - -func (x *_QueryGetOracleAttestationsResponse_1_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_QueryGetOracleAttestationsResponse_1_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_QueryGetOracleAttestationsResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryGetOracleAttestationsResponse protoreflect.MessageDescriptor - fd_QueryGetOracleAttestationsResponse_attestations protoreflect.FieldDescriptor -) - -func init() { - file_layer_bridge_query_proto_init() - md_QueryGetOracleAttestationsResponse = File_layer_bridge_query_proto.Messages().ByName("QueryGetOracleAttestationsResponse") - fd_QueryGetOracleAttestationsResponse_attestations = md_QueryGetOracleAttestationsResponse.Fields().ByName("attestations") -} - -var _ protoreflect.Message = (*fastReflection_QueryGetOracleAttestationsResponse)(nil) - -type fastReflection_QueryGetOracleAttestationsResponse QueryGetOracleAttestationsResponse - -func (x *QueryGetOracleAttestationsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryGetOracleAttestationsResponse)(x) -} - -func (x *QueryGetOracleAttestationsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_layer_bridge_query_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 _fastReflection_QueryGetOracleAttestationsResponse_messageType fastReflection_QueryGetOracleAttestationsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryGetOracleAttestationsResponse_messageType{} - -type fastReflection_QueryGetOracleAttestationsResponse_messageType struct{} - -func (x fastReflection_QueryGetOracleAttestationsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryGetOracleAttestationsResponse)(nil) -} -func (x fastReflection_QueryGetOracleAttestationsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryGetOracleAttestationsResponse) -} -func (x fastReflection_QueryGetOracleAttestationsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGetOracleAttestationsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryGetOracleAttestationsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGetOracleAttestationsResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryGetOracleAttestationsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryGetOracleAttestationsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryGetOracleAttestationsResponse) New() protoreflect.Message { - return new(fastReflection_QueryGetOracleAttestationsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryGetOracleAttestationsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryGetOracleAttestationsResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryGetOracleAttestationsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Attestations) != 0 { - value := protoreflect.ValueOfList(&_QueryGetOracleAttestationsResponse_1_list{list: &x.Attestations}) - if !f(fd_QueryGetOracleAttestationsResponse_attestations, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryGetOracleAttestationsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "layer.bridge.QueryGetOracleAttestationsResponse.attestations": - return len(x.Attestations) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetOracleAttestationsResponse")) - } - panic(fmt.Errorf("message layer.bridge.QueryGetOracleAttestationsResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetOracleAttestationsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "layer.bridge.QueryGetOracleAttestationsResponse.attestations": - x.Attestations = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetOracleAttestationsResponse")) - } - panic(fmt.Errorf("message layer.bridge.QueryGetOracleAttestationsResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryGetOracleAttestationsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "layer.bridge.QueryGetOracleAttestationsResponse.attestations": - if len(x.Attestations) == 0 { - return protoreflect.ValueOfList(&_QueryGetOracleAttestationsResponse_1_list{}) - } - listValue := &_QueryGetOracleAttestationsResponse_1_list{list: &x.Attestations} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetOracleAttestationsResponse")) - } - panic(fmt.Errorf("message layer.bridge.QueryGetOracleAttestationsResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetOracleAttestationsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "layer.bridge.QueryGetOracleAttestationsResponse.attestations": - lv := value.List() - clv := lv.(*_QueryGetOracleAttestationsResponse_1_list) - x.Attestations = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetOracleAttestationsResponse")) - } - panic(fmt.Errorf("message layer.bridge.QueryGetOracleAttestationsResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetOracleAttestationsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "layer.bridge.QueryGetOracleAttestationsResponse.attestations": - if x.Attestations == nil { - x.Attestations = []string{} - } - value := &_QueryGetOracleAttestationsResponse_1_list{list: &x.Attestations} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetOracleAttestationsResponse")) - } - panic(fmt.Errorf("message layer.bridge.QueryGetOracleAttestationsResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryGetOracleAttestationsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "layer.bridge.QueryGetOracleAttestationsResponse.attestations": - list := []string{} - return protoreflect.ValueOfList(&_QueryGetOracleAttestationsResponse_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetOracleAttestationsResponse")) - } - panic(fmt.Errorf("message layer.bridge.QueryGetOracleAttestationsResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryGetOracleAttestationsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in layer.bridge.QueryGetOracleAttestationsResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryGetOracleAttestationsResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetOracleAttestationsResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryGetOracleAttestationsResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryGetOracleAttestationsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryGetOracleAttestationsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Attestations) > 0 { - for _, s := range x.Attestations { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryGetOracleAttestationsResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Attestations) > 0 { - for iNdEx := len(x.Attestations) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Attestations[iNdEx]) - copy(dAtA[i:], x.Attestations[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Attestations[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryGetOracleAttestationsResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetOracleAttestationsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetOracleAttestationsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Attestations", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Attestations = append(x.Attestations, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - var ( md_QueryGetEvmAddressByValidatorAddressRequest protoreflect.MessageDescriptor fd_QueryGetEvmAddressByValidatorAddressRequest_validatorAddress protoreflect.FieldDescriptor @@ -8646,7 +7696,7 @@ func (x *QueryGetEvmAddressByValidatorAddressRequest) ProtoReflect() protoreflec } func (x *QueryGetEvmAddressByValidatorAddressRequest) slowProtoReflect() protoreflect.Message { - mi := &file_layer_bridge_query_proto_msgTypes[19] + mi := &file_layer_bridge_query_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9066,7 +8116,7 @@ func (x *QueryGetEvmAddressByValidatorAddressResponse) ProtoReflect() protorefle } func (x *QueryGetEvmAddressByValidatorAddressResponse) slowProtoReflect() protoreflect.Message { - mi := &file_layer_bridge_query_proto_msgTypes[20] + mi := &file_layer_bridge_query_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9486,7 +8536,7 @@ func (x *QueryGetValsetByTimestampRequest) ProtoReflect() protoreflect.Message { } func (x *QueryGetValsetByTimestampRequest) slowProtoReflect() protoreflect.Message { - mi := &file_layer_bridge_query_proto_msgTypes[21] + mi := &file_layer_bridge_query_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9941,7 +8991,7 @@ func (x *QueryGetValsetByTimestampResponse) ProtoReflect() protoreflect.Message } func (x *QueryGetValsetByTimestampResponse) slowProtoReflect() protoreflect.Message { - mi := &file_layer_bridge_query_proto_msgTypes[22] + mi := &file_layer_bridge_query_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10384,7 +9434,7 @@ func (x *QueryGetCurrentAggregateReportRequest) ProtoReflect() protoreflect.Mess } func (x *QueryGetCurrentAggregateReportRequest) slowProtoReflect() protoreflect.Message { - mi := &file_layer_bridge_query_proto_msgTypes[23] + mi := &file_layer_bridge_query_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10808,7 +9858,7 @@ func (x *QueryGetCurrentAggregateReportResponse) ProtoReflect() protoreflect.Mes } func (x *QueryGetCurrentAggregateReportResponse) slowProtoReflect() protoreflect.Message { - mi := &file_layer_bridge_query_proto_msgTypes[24] + mi := &file_layer_bridge_query_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11358,7 +10408,7 @@ func (x *Aggregate) ProtoReflect() protoreflect.Message { } func (x *Aggregate) slowProtoReflect() protoreflect.Message { - mi := &file_layer_bridge_query_proto_msgTypes[25] + mi := &file_layer_bridge_query_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12266,7 +11316,7 @@ func (x *AggregateReporter) ProtoReflect() protoreflect.Message { } func (x *AggregateReporter) slowProtoReflect() protoreflect.Message { - mi := &file_layer_bridge_query_proto_msgTypes[26] + mi := &file_layer_bridge_query_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12734,7 +11784,7 @@ func (x *QueryGetDataBeforeRequest) ProtoReflect() protoreflect.Message { } func (x *QueryGetDataBeforeRequest) slowProtoReflect() protoreflect.Message { - mi := &file_layer_bridge_query_proto_msgTypes[27] + mi := &file_layer_bridge_query_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -13204,7 +12254,7 @@ func (x *QueryGetDataBeforeResponse) ProtoReflect() protoreflect.Message { } func (x *QueryGetDataBeforeResponse) slowProtoReflect() protoreflect.Message { - mi := &file_layer_bridge_query_proto_msgTypes[28] + mi := &file_layer_bridge_query_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -13687,7 +12737,7 @@ func (x *QueryGetSnapshotsByReportRequest) ProtoReflect() protoreflect.Message { } func (x *QueryGetSnapshotsByReportRequest) slowProtoReflect() protoreflect.Message { - mi := &file_layer_bridge_query_proto_msgTypes[29] + mi := &file_layer_bridge_query_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -14215,7 +13265,7 @@ func (x *QueryGetSnapshotsByReportResponse) ProtoReflect() protoreflect.Message } func (x *QueryGetSnapshotsByReportResponse) slowProtoReflect() protoreflect.Message { - mi := &file_layer_bridge_query_proto_msgTypes[30] + mi := &file_layer_bridge_query_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -14649,7 +13699,7 @@ func (x *QueryGetAttestationDataBySnapshotRequest) ProtoReflect() protoreflect.M } func (x *QueryGetAttestationDataBySnapshotRequest) slowProtoReflect() protoreflect.Message { - mi := &file_layer_bridge_query_proto_msgTypes[31] + mi := &file_layer_bridge_query_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15083,7 +14133,7 @@ func (x *QueryGetAttestationDataBySnapshotResponse) ProtoReflect() protoreflect. } func (x *QueryGetAttestationDataBySnapshotResponse) slowProtoReflect() protoreflect.Message { - mi := &file_layer_bridge_query_proto_msgTypes[32] + mi := &file_layer_bridge_query_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15937,7 +14987,7 @@ func (x *QueryGetAttestationsBySnapshotRequest) ProtoReflect() protoreflect.Mess } func (x *QueryGetAttestationsBySnapshotRequest) slowProtoReflect() protoreflect.Message { - mi := &file_layer_bridge_query_proto_msgTypes[33] + mi := &file_layer_bridge_query_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16403,7 +15453,7 @@ func (x *QueryGetAttestationsBySnapshotResponse) ProtoReflect() protoreflect.Mes } func (x *QueryGetAttestationsBySnapshotResponse) slowProtoReflect() protoreflect.Message { - mi := &file_layer_bridge_query_proto_msgTypes[34] + mi := &file_layer_bridge_query_proto_msgTypes[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17481,84 +16531,6 @@ func (x *QueryGetValsetSigsResponse) GetSignatures() []string { return nil } -type QueryGetOracleAttestationsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - QueryId []byte `protobuf:"bytes,1,opt,name=query_id,json=queryId,proto3" json:"query_id,omitempty"` - Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` -} - -func (x *QueryGetOracleAttestationsRequest) Reset() { - *x = QueryGetOracleAttestationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_layer_bridge_query_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryGetOracleAttestationsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryGetOracleAttestationsRequest) ProtoMessage() {} - -// Deprecated: Use QueryGetOracleAttestationsRequest.ProtoReflect.Descriptor instead. -func (*QueryGetOracleAttestationsRequest) Descriptor() ([]byte, []int) { - return file_layer_bridge_query_proto_rawDescGZIP(), []int{17} -} - -func (x *QueryGetOracleAttestationsRequest) GetQueryId() []byte { - if x != nil { - return x.QueryId - } - return nil -} - -func (x *QueryGetOracleAttestationsRequest) GetTimestamp() int64 { - if x != nil { - return x.Timestamp - } - return 0 -} - -type QueryGetOracleAttestationsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Attestations []string `protobuf:"bytes,1,rep,name=attestations,proto3" json:"attestations,omitempty"` -} - -func (x *QueryGetOracleAttestationsResponse) Reset() { - *x = QueryGetOracleAttestationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_layer_bridge_query_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryGetOracleAttestationsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryGetOracleAttestationsResponse) ProtoMessage() {} - -// Deprecated: Use QueryGetOracleAttestationsResponse.ProtoReflect.Descriptor instead. -func (*QueryGetOracleAttestationsResponse) Descriptor() ([]byte, []int) { - return file_layer_bridge_query_proto_rawDescGZIP(), []int{18} -} - -func (x *QueryGetOracleAttestationsResponse) GetAttestations() []string { - if x != nil { - return x.Attestations - } - return nil -} - type QueryGetEvmAddressByValidatorAddressRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -17570,7 +16542,7 @@ type QueryGetEvmAddressByValidatorAddressRequest struct { func (x *QueryGetEvmAddressByValidatorAddressRequest) Reset() { *x = QueryGetEvmAddressByValidatorAddressRequest{} if protoimpl.UnsafeEnabled { - mi := &file_layer_bridge_query_proto_msgTypes[19] + mi := &file_layer_bridge_query_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17584,7 +16556,7 @@ func (*QueryGetEvmAddressByValidatorAddressRequest) ProtoMessage() {} // Deprecated: Use QueryGetEvmAddressByValidatorAddressRequest.ProtoReflect.Descriptor instead. func (*QueryGetEvmAddressByValidatorAddressRequest) Descriptor() ([]byte, []int) { - return file_layer_bridge_query_proto_rawDescGZIP(), []int{19} + return file_layer_bridge_query_proto_rawDescGZIP(), []int{17} } func (x *QueryGetEvmAddressByValidatorAddressRequest) GetValidatorAddress() string { @@ -17605,7 +16577,7 @@ type QueryGetEvmAddressByValidatorAddressResponse struct { func (x *QueryGetEvmAddressByValidatorAddressResponse) Reset() { *x = QueryGetEvmAddressByValidatorAddressResponse{} if protoimpl.UnsafeEnabled { - mi := &file_layer_bridge_query_proto_msgTypes[20] + mi := &file_layer_bridge_query_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17619,7 +16591,7 @@ func (*QueryGetEvmAddressByValidatorAddressResponse) ProtoMessage() {} // Deprecated: Use QueryGetEvmAddressByValidatorAddressResponse.ProtoReflect.Descriptor instead. func (*QueryGetEvmAddressByValidatorAddressResponse) Descriptor() ([]byte, []int) { - return file_layer_bridge_query_proto_rawDescGZIP(), []int{20} + return file_layer_bridge_query_proto_rawDescGZIP(), []int{18} } func (x *QueryGetEvmAddressByValidatorAddressResponse) GetEvmAddress() string { @@ -17640,7 +16612,7 @@ type QueryGetValsetByTimestampRequest struct { func (x *QueryGetValsetByTimestampRequest) Reset() { *x = QueryGetValsetByTimestampRequest{} if protoimpl.UnsafeEnabled { - mi := &file_layer_bridge_query_proto_msgTypes[21] + mi := &file_layer_bridge_query_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17654,7 +16626,7 @@ func (*QueryGetValsetByTimestampRequest) ProtoMessage() {} // Deprecated: Use QueryGetValsetByTimestampRequest.ProtoReflect.Descriptor instead. func (*QueryGetValsetByTimestampRequest) Descriptor() ([]byte, []int) { - return file_layer_bridge_query_proto_rawDescGZIP(), []int{21} + return file_layer_bridge_query_proto_rawDescGZIP(), []int{19} } func (x *QueryGetValsetByTimestampRequest) GetTimestamp() int64 { @@ -17675,7 +16647,7 @@ type QueryGetValsetByTimestampResponse struct { func (x *QueryGetValsetByTimestampResponse) Reset() { *x = QueryGetValsetByTimestampResponse{} if protoimpl.UnsafeEnabled { - mi := &file_layer_bridge_query_proto_msgTypes[22] + mi := &file_layer_bridge_query_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17689,7 +16661,7 @@ func (*QueryGetValsetByTimestampResponse) ProtoMessage() {} // Deprecated: Use QueryGetValsetByTimestampResponse.ProtoReflect.Descriptor instead. func (*QueryGetValsetByTimestampResponse) Descriptor() ([]byte, []int) { - return file_layer_bridge_query_proto_rawDescGZIP(), []int{22} + return file_layer_bridge_query_proto_rawDescGZIP(), []int{20} } func (x *QueryGetValsetByTimestampResponse) GetBridgeValidatorSet() []*BridgeValidator { @@ -17710,7 +16682,7 @@ type QueryGetCurrentAggregateReportRequest struct { func (x *QueryGetCurrentAggregateReportRequest) Reset() { *x = QueryGetCurrentAggregateReportRequest{} if protoimpl.UnsafeEnabled { - mi := &file_layer_bridge_query_proto_msgTypes[23] + mi := &file_layer_bridge_query_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17724,7 +16696,7 @@ func (*QueryGetCurrentAggregateReportRequest) ProtoMessage() {} // Deprecated: Use QueryGetCurrentAggregateReportRequest.ProtoReflect.Descriptor instead. func (*QueryGetCurrentAggregateReportRequest) Descriptor() ([]byte, []int) { - return file_layer_bridge_query_proto_rawDescGZIP(), []int{23} + return file_layer_bridge_query_proto_rawDescGZIP(), []int{21} } func (x *QueryGetCurrentAggregateReportRequest) GetQueryId() []byte { @@ -17746,7 +16718,7 @@ type QueryGetCurrentAggregateReportResponse struct { func (x *QueryGetCurrentAggregateReportResponse) Reset() { *x = QueryGetCurrentAggregateReportResponse{} if protoimpl.UnsafeEnabled { - mi := &file_layer_bridge_query_proto_msgTypes[24] + mi := &file_layer_bridge_query_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17760,7 +16732,7 @@ func (*QueryGetCurrentAggregateReportResponse) ProtoMessage() {} // Deprecated: Use QueryGetCurrentAggregateReportResponse.ProtoReflect.Descriptor instead. func (*QueryGetCurrentAggregateReportResponse) Descriptor() ([]byte, []int) { - return file_layer_bridge_query_proto_rawDescGZIP(), []int{24} + return file_layer_bridge_query_proto_rawDescGZIP(), []int{22} } func (x *QueryGetCurrentAggregateReportResponse) GetAggregate() *Aggregate { @@ -17797,7 +16769,7 @@ type Aggregate struct { func (x *Aggregate) Reset() { *x = Aggregate{} if protoimpl.UnsafeEnabled { - mi := &file_layer_bridge_query_proto_msgTypes[25] + mi := &file_layer_bridge_query_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17811,7 +16783,7 @@ func (*Aggregate) ProtoMessage() {} // Deprecated: Use Aggregate.ProtoReflect.Descriptor instead. func (*Aggregate) Descriptor() ([]byte, []int) { - return file_layer_bridge_query_proto_rawDescGZIP(), []int{25} + return file_layer_bridge_query_proto_rawDescGZIP(), []int{23} } func (x *Aggregate) GetQueryId() []byte { @@ -17896,7 +16868,7 @@ type AggregateReporter struct { func (x *AggregateReporter) Reset() { *x = AggregateReporter{} if protoimpl.UnsafeEnabled { - mi := &file_layer_bridge_query_proto_msgTypes[26] + mi := &file_layer_bridge_query_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17910,7 +16882,7 @@ func (*AggregateReporter) ProtoMessage() {} // Deprecated: Use AggregateReporter.ProtoReflect.Descriptor instead. func (*AggregateReporter) Descriptor() ([]byte, []int) { - return file_layer_bridge_query_proto_rawDescGZIP(), []int{26} + return file_layer_bridge_query_proto_rawDescGZIP(), []int{24} } func (x *AggregateReporter) GetReporter() string { @@ -17939,7 +16911,7 @@ type QueryGetDataBeforeRequest struct { func (x *QueryGetDataBeforeRequest) Reset() { *x = QueryGetDataBeforeRequest{} if protoimpl.UnsafeEnabled { - mi := &file_layer_bridge_query_proto_msgTypes[27] + mi := &file_layer_bridge_query_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17953,7 +16925,7 @@ func (*QueryGetDataBeforeRequest) ProtoMessage() {} // Deprecated: Use QueryGetDataBeforeRequest.ProtoReflect.Descriptor instead. func (*QueryGetDataBeforeRequest) Descriptor() ([]byte, []int) { - return file_layer_bridge_query_proto_rawDescGZIP(), []int{27} + return file_layer_bridge_query_proto_rawDescGZIP(), []int{25} } func (x *QueryGetDataBeforeRequest) GetQueryId() []byte { @@ -17982,7 +16954,7 @@ type QueryGetDataBeforeResponse struct { func (x *QueryGetDataBeforeResponse) Reset() { *x = QueryGetDataBeforeResponse{} if protoimpl.UnsafeEnabled { - mi := &file_layer_bridge_query_proto_msgTypes[28] + mi := &file_layer_bridge_query_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17996,7 +16968,7 @@ func (*QueryGetDataBeforeResponse) ProtoMessage() {} // Deprecated: Use QueryGetDataBeforeResponse.ProtoReflect.Descriptor instead. func (*QueryGetDataBeforeResponse) Descriptor() ([]byte, []int) { - return file_layer_bridge_query_proto_rawDescGZIP(), []int{28} + return file_layer_bridge_query_proto_rawDescGZIP(), []int{26} } func (x *QueryGetDataBeforeResponse) GetAggregate() *oracle.Aggregate { @@ -18025,7 +16997,7 @@ type QueryGetSnapshotsByReportRequest struct { func (x *QueryGetSnapshotsByReportRequest) Reset() { *x = QueryGetSnapshotsByReportRequest{} if protoimpl.UnsafeEnabled { - mi := &file_layer_bridge_query_proto_msgTypes[29] + mi := &file_layer_bridge_query_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18039,7 +17011,7 @@ func (*QueryGetSnapshotsByReportRequest) ProtoMessage() {} // Deprecated: Use QueryGetSnapshotsByReportRequest.ProtoReflect.Descriptor instead. func (*QueryGetSnapshotsByReportRequest) Descriptor() ([]byte, []int) { - return file_layer_bridge_query_proto_rawDescGZIP(), []int{29} + return file_layer_bridge_query_proto_rawDescGZIP(), []int{27} } func (x *QueryGetSnapshotsByReportRequest) GetQueryId() string { @@ -18067,7 +17039,7 @@ type QueryGetSnapshotsByReportResponse struct { func (x *QueryGetSnapshotsByReportResponse) Reset() { *x = QueryGetSnapshotsByReportResponse{} if protoimpl.UnsafeEnabled { - mi := &file_layer_bridge_query_proto_msgTypes[30] + mi := &file_layer_bridge_query_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18081,7 +17053,7 @@ func (*QueryGetSnapshotsByReportResponse) ProtoMessage() {} // Deprecated: Use QueryGetSnapshotsByReportResponse.ProtoReflect.Descriptor instead. func (*QueryGetSnapshotsByReportResponse) Descriptor() ([]byte, []int) { - return file_layer_bridge_query_proto_rawDescGZIP(), []int{30} + return file_layer_bridge_query_proto_rawDescGZIP(), []int{28} } func (x *QueryGetSnapshotsByReportResponse) GetSnapshots() []string { @@ -18102,7 +17074,7 @@ type QueryGetAttestationDataBySnapshotRequest struct { func (x *QueryGetAttestationDataBySnapshotRequest) Reset() { *x = QueryGetAttestationDataBySnapshotRequest{} if protoimpl.UnsafeEnabled { - mi := &file_layer_bridge_query_proto_msgTypes[31] + mi := &file_layer_bridge_query_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18116,7 +17088,7 @@ func (*QueryGetAttestationDataBySnapshotRequest) ProtoMessage() {} // Deprecated: Use QueryGetAttestationDataBySnapshotRequest.ProtoReflect.Descriptor instead. func (*QueryGetAttestationDataBySnapshotRequest) Descriptor() ([]byte, []int) { - return file_layer_bridge_query_proto_rawDescGZIP(), []int{31} + return file_layer_bridge_query_proto_rawDescGZIP(), []int{29} } func (x *QueryGetAttestationDataBySnapshotRequest) GetSnapshot() string { @@ -18144,7 +17116,7 @@ type QueryGetAttestationDataBySnapshotResponse struct { func (x *QueryGetAttestationDataBySnapshotResponse) Reset() { *x = QueryGetAttestationDataBySnapshotResponse{} if protoimpl.UnsafeEnabled { - mi := &file_layer_bridge_query_proto_msgTypes[32] + mi := &file_layer_bridge_query_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18158,7 +17130,7 @@ func (*QueryGetAttestationDataBySnapshotResponse) ProtoMessage() {} // Deprecated: Use QueryGetAttestationDataBySnapshotResponse.ProtoReflect.Descriptor instead. func (*QueryGetAttestationDataBySnapshotResponse) Descriptor() ([]byte, []int) { - return file_layer_bridge_query_proto_rawDescGZIP(), []int{32} + return file_layer_bridge_query_proto_rawDescGZIP(), []int{30} } func (x *QueryGetAttestationDataBySnapshotResponse) GetQueryId() string { @@ -18228,7 +17200,7 @@ type QueryGetAttestationsBySnapshotRequest struct { func (x *QueryGetAttestationsBySnapshotRequest) Reset() { *x = QueryGetAttestationsBySnapshotRequest{} if protoimpl.UnsafeEnabled { - mi := &file_layer_bridge_query_proto_msgTypes[33] + mi := &file_layer_bridge_query_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18242,7 +17214,7 @@ func (*QueryGetAttestationsBySnapshotRequest) ProtoMessage() {} // Deprecated: Use QueryGetAttestationsBySnapshotRequest.ProtoReflect.Descriptor instead. func (*QueryGetAttestationsBySnapshotRequest) Descriptor() ([]byte, []int) { - return file_layer_bridge_query_proto_rawDescGZIP(), []int{33} + return file_layer_bridge_query_proto_rawDescGZIP(), []int{31} } func (x *QueryGetAttestationsBySnapshotRequest) GetSnapshot() string { @@ -18263,7 +17235,7 @@ type QueryGetAttestationsBySnapshotResponse struct { func (x *QueryGetAttestationsBySnapshotResponse) Reset() { *x = QueryGetAttestationsBySnapshotResponse{} if protoimpl.UnsafeEnabled { - mi := &file_layer_bridge_query_proto_msgTypes[34] + mi := &file_layer_bridge_query_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18277,7 +17249,7 @@ func (*QueryGetAttestationsBySnapshotResponse) ProtoMessage() {} // Deprecated: Use QueryGetAttestationsBySnapshotResponse.ProtoReflect.Descriptor instead. func (*QueryGetAttestationsBySnapshotResponse) Descriptor() ([]byte, []int) { - return file_layer_bridge_query_proto_rawDescGZIP(), []int{34} + return file_layer_bridge_query_proto_rawDescGZIP(), []int{32} } func (x *QueryGetAttestationsBySnapshotResponse) GetAttestations() []string { @@ -18405,313 +17377,290 @@ var file_layer_bridge_query_proto_rawDesc = []byte{ 0x74, 0x56, 0x61, 0x6c, 0x73, 0x65, 0x74, 0x53, 0x69, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x73, 0x22, 0x5c, 0x0a, 0x21, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x4f, - 0x72, 0x61, 0x63, 0x6c, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x49, 0x64, 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, 0x22, 0x48, 0x0a, 0x22, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x61, - 0x63, 0x6c, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x61, - 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x59, 0x0a, 0x2b, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x45, 0x76, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x42, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x10, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x4e, 0x0a, 0x2c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, - 0x65, 0x74, 0x45, 0x76, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x76, 0x6d, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x76, 0x6d, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x40, 0x0a, 0x20, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, - 0x65, 0x74, 0x56, 0x61, 0x6c, 0x73, 0x65, 0x74, 0x42, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x72, 0x0a, 0x21, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x73, 0x65, 0x74, 0x42, 0x79, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, - 0x12, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x53, 0x65, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6c, 0x61, 0x79, 0x65, - 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x12, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x22, 0x42, 0x0a, 0x25, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x41, - 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x69, + 0x72, 0x65, 0x73, 0x22, 0x59, 0x0a, 0x2b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x45, + 0x76, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x4e, + 0x0a, 0x2c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x45, 0x76, 0x6d, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, + 0x0a, 0x0a, 0x65, 0x76, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x65, 0x76, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x40, + 0x0a, 0x20, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x73, 0x65, 0x74, + 0x42, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x22, 0x72, 0x0a, 0x21, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x73, + 0x65, 0x74, 0x42, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x12, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1d, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, + 0x2e, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x52, 0x12, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x53, 0x65, 0x74, 0x22, 0x42, 0x0a, 0x25, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, + 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, + 0x08, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x07, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x22, 0x7d, 0x0a, 0x26, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x41, 0x67, 0x67, 0x72, 0x65, + 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x35, 0x0a, 0x09, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, + 0x69, 0x64, 0x67, 0x65, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x09, + 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x8b, 0x03, 0x0a, 0x09, 0x41, 0x67, 0x67, 0x72, + 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, - 0x22, 0x7d, 0x0a, 0x26, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x74, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, - 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x09, 0x61, 0x67, - 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x12, 0x26, 0x0a, 0x0e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x61, 0x67, 0x67, 0x72, + 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x11, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x65, 0x72, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x72, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x11, + 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x11, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, + 0x64, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3d, 0x0a, 0x09, 0x72, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x41, 0x67, 0x67, - 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x09, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, - 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, - 0x8b, 0x03, 0x0a, 0x09, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x19, 0x0a, - 0x08, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x07, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x61, 0x67, 0x67, 0x72, - 0x65, 0x67, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x12, 0x2c, 0x0a, 0x11, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, - 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x61, 0x67, 0x67, - 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x12, 0x24, - 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x50, - 0x6f, 0x77, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x11, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, - 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, - 0x11, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x3d, 0x0a, 0x09, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x73, 0x18, - 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, - 0x69, 0x64, 0x67, 0x65, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x52, 0x09, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, - 0x73, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x6c, 0x61, 0x67, 0x67, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x07, 0x66, 0x6c, 0x61, 0x67, 0x67, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6e, - 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, - 0x65, 0x12, 0x32, 0x0a, 0x14, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x70, 0x6f, 0x72, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x14, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, - 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x45, 0x0a, - 0x11, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, - 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x12, 0x14, - 0x0a, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, - 0x6f, 0x77, 0x65, 0x72, 0x22, 0x54, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, - 0x44, 0x61, 0x74, 0x61, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x19, 0x0a, 0x08, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x07, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 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, 0x22, 0x71, 0x0a, 0x1a, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x09, 0x61, 0x67, 0x67, 0x72, - 0x65, 0x67, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6c, 0x61, - 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, - 0x67, 0x61, 0x74, 0x65, 0x52, 0x09, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, - 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x5a, 0x0a, - 0x20, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, - 0x74, 0x73, 0x42, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x18, 0x0a, 0x07, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x41, 0x0a, 0x21, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x47, 0x65, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x42, 0x79, - 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, - 0x0a, 0x09, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x09, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x22, 0x46, 0x0a, 0x28, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x42, 0x79, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x6e, 0x61, 0x70, - 0x73, 0x68, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x6e, 0x61, 0x70, - 0x73, 0x68, 0x6f, 0x74, 0x22, 0xf3, 0x02, 0x0a, 0x29, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, - 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, - 0x42, 0x79, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x26, 0x0a, 0x0e, 0x61, 0x67, - 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x50, - 0x6f, 0x77, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x67, 0x67, 0x72, - 0x65, 0x67, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x68, - 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x32, 0x0a, 0x14, 0x61, 0x74, - 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x38, - 0x0a, 0x17, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x17, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x30, 0x0a, 0x13, 0x6e, 0x65, 0x78, 0x74, - 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x6e, 0x65, 0x78, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, - 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x43, 0x0a, 0x25, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x42, 0x79, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x22, - 0x4c, 0x0a, 0x26, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x74, 0x74, - 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0xa4, 0x14, - 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x6b, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, - 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, - 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2f, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x12, 0x95, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x45, 0x76, 0x6d, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x2a, 0x2e, 0x6c, 0x61, 0x79, 0x65, - 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, - 0x74, 0x45, 0x76, 0x6d, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, - 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x45, 0x76, 0x6d, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x6c, 0x61, 0x79, - 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x65, 0x76, - 0x6d, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0xad, 0x01, 0x0a, - 0x16, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x30, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, - 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x6c, 0x61, 0x79, 0x65, - 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, - 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x28, 0x12, 0x26, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, - 0x64, 0x67, 0x65, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0xd2, 0x01, 0x0a, - 0x1c, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x2e, + 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x52, 0x09, + 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x6c, 0x61, + 0x67, 0x67, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x66, 0x6c, 0x61, 0x67, + 0x67, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x32, 0x0a, 0x14, 0x61, 0x67, 0x67, + 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x49, 0x6e, 0x64, 0x65, + 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x16, 0x0a, + 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x45, 0x0a, 0x11, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x22, 0x54, 0x0a, 0x19, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x42, 0x65, 0x66, 0x6f, + 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x49, 0x64, 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, 0x22, 0x71, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x44, 0x61, + 0x74, 0x61, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x35, 0x0a, 0x09, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, + 0x6c, 0x65, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x09, 0x61, 0x67, + 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x5a, 0x0a, 0x20, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, + 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x42, 0x79, 0x52, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x22, 0x41, 0x0a, 0x21, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x53, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x42, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6e, 0x61, 0x70, 0x73, + 0x68, 0x6f, 0x74, 0x73, 0x22, 0x46, 0x0a, 0x28, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, + 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x42, + 0x79, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x22, 0xf3, 0x02, 0x0a, + 0x29, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x42, 0x79, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x12, 0x26, 0x0a, 0x0e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x67, 0x67, 0x72, + 0x65, 0x67, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x61, 0x67, + 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x77, + 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x12, 0x32, 0x0a, 0x14, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x14, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x38, 0x0a, 0x17, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, + 0x75, 0x73, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, + 0x73, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x12, 0x30, 0x0a, 0x13, 0x6e, 0x65, 0x78, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x6e, + 0x65, 0x78, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x22, 0x43, 0x0a, 0x25, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x41, 0x74, + 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x53, 0x6e, 0x61, 0x70, + 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, + 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, + 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x22, 0x4c, 0x0a, 0x26, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, + 0x79, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0xe1, 0x12, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, + 0x6b, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x61, 0x79, 0x65, + 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6c, 0x61, + 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, + 0x72, 0x69, 0x64, 0x67, 0x65, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x95, 0x01, 0x0a, + 0x10, 0x47, 0x65, 0x74, 0x45, 0x76, 0x6d, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x73, 0x12, 0x2a, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x45, 0x76, 0x6d, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, + 0x72, 0x79, 0x47, 0x65, 0x74, 0x45, 0x76, 0x6d, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x22, 0x12, 0x20, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, + 0x65, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x65, 0x76, 0x6d, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x73, 0x12, 0xad, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, + 0x30, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x31, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x12, 0x26, 0x2f, 0x6c, + 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2f, 0x67, 0x65, 0x74, 0x5f, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x12, 0xd2, 0x01, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x41, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x12, 0x39, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, - 0x72, 0x69, 0x64, 0x67, 0x65, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2f, 0x7b, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x7d, 0x12, 0xcf, 0x01, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x79, 0x49, 0x6e, 0x64, - 0x65, 0x78, 0x12, 0x36, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, - 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x79, 0x49, 0x6e, - 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x6c, 0x61, 0x79, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, + 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x41, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x12, 0x39, + 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2f, 0x67, 0x65, + 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x68, 0x65, 0x63, + 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2f, 0x7b, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x7d, 0x12, 0xcf, 0x01, 0x0a, 0x1c, 0x47, 0x65, + 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x42, 0x79, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x36, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x42, 0x79, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x3e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x12, 0x36, 0x2f, 0x6c, 0x61, - 0x79, 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x5f, 0x62, 0x79, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2f, 0x7b, 0x69, 0x6e, 0x64, - 0x65, 0x78, 0x7d, 0x12, 0x95, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x73, 0x65, - 0x74, 0x53, 0x69, 0x67, 0x73, 0x12, 0x27, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, - 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, - 0x73, 0x65, 0x74, 0x53, 0x69, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, - 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x73, 0x65, 0x74, 0x53, 0x69, 0x67, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, - 0x12, 0x29, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2f, - 0x67, 0x65, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x73, 0x65, 0x74, 0x5f, 0x73, 0x69, 0x67, 0x73, 0x2f, - 0x7b, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x7d, 0x12, 0xc0, 0x01, 0x0a, 0x15, - 0x47, 0x65, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2f, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, - 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x61, - 0x63, 0x6c, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, - 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x4f, 0x72, - 0x61, 0x63, 0x6c, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x44, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, - 0x12, 0x3c, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2f, - 0x67, 0x65, 0x74, 0x5f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x73, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x69, - 0x64, 0x7d, 0x2f, 0x7b, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x7d, 0x12, 0xe7, - 0x01, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x45, 0x76, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x42, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x12, 0x39, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, + 0x74, 0x61, 0x6d, 0x70, 0x42, 0x79, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, + 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x79, 0x49, 0x6e, + 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3e, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x38, 0x12, 0x36, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, + 0x67, 0x65, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x62, 0x79, 0x5f, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x2f, 0x7b, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x7d, 0x12, 0x95, 0x01, 0x0a, 0x0d, + 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x73, 0x65, 0x74, 0x53, 0x69, 0x67, 0x73, 0x12, 0x27, 0x2e, + 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x73, 0x65, 0x74, 0x53, 0x69, 0x67, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, + 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x56, 0x61, + 0x6c, 0x73, 0x65, 0x74, 0x53, 0x69, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x31, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x12, 0x29, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, + 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x73, + 0x65, 0x74, 0x5f, 0x73, 0x69, 0x67, 0x73, 0x2f, 0x7b, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x7d, 0x12, 0xe7, 0x01, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x45, 0x76, 0x6d, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x39, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, + 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x45, + 0x76, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x3a, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x45, 0x76, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3a, 0x2e, - 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x47, 0x65, 0x74, 0x45, 0x76, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, - 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4d, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x47, 0x12, 0x45, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, - 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x65, 0x76, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x5f, 0x62, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x2f, 0x7b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x12, 0xb2, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, - 0x56, 0x61, 0x6c, 0x73, 0x65, 0x74, 0x42, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x12, 0x2e, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x73, 0x65, 0x74, 0x42, - 0x79, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2f, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x73, 0x65, 0x74, 0x42, - 0x79, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x12, 0x31, 0x2f, 0x6c, 0x61, 0x79, - 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x76, 0x61, - 0x6c, 0x73, 0x65, 0x74, 0x5f, 0x62, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x2f, 0x7b, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x7d, 0x12, 0xc5, 0x01, - 0x0a, 0x19, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x41, 0x67, 0x67, 0x72, - 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x33, 0x2e, 0x6c, 0x61, - 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, - 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x34, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4d, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x47, 0x12, 0x45, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, + 0x72, 0x69, 0x64, 0x67, 0x65, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x65, 0x76, 0x6d, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2f, 0x7b, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x12, 0xb2, 0x01, + 0x0a, 0x14, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x73, 0x65, 0x74, 0x42, 0x79, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x2e, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, + 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x56, 0x61, + 0x6c, 0x73, 0x65, 0x74, 0x42, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, + 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x56, 0x61, + 0x6c, 0x73, 0x65, 0x74, 0x42, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x12, + 0x31, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2f, 0x67, + 0x65, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x73, 0x65, 0x74, 0x5f, 0x62, 0x79, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2f, 0x7b, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x7d, 0x12, 0xc5, 0x01, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x74, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x12, 0x33, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x37, 0x12, 0x35, - 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2f, 0x67, 0x65, - 0x74, 0x5f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, - 0x61, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x7b, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0xa0, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, - 0x61, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x12, 0x27, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, - 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x44, - 0x61, 0x74, 0x61, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x28, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x42, 0x65, 0x66, 0x6f, - 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3c, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x36, 0x12, 0x34, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, - 0x65, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, - 0x65, 0x2f, 0x7b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x7b, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x7d, 0x12, 0xbc, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, - 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x42, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, - 0x74, 0x12, 0x2e, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, - 0x74, 0x73, 0x42, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2f, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, - 0x74, 0x73, 0x42, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x43, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3d, 0x12, 0x3b, 0x2f, 0x6c, 0x61, 0x79, - 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x6e, - 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, - 0x74, 0x2f, 0x7b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x7d, 0x2f, 0x7b, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x7d, 0x12, 0xd2, 0x01, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x41, - 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x42, 0x79, - 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x36, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, - 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, - 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x42, - 0x79, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x37, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x42, 0x79, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x41, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x3b, 0x12, 0x39, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, - 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x62, 0x79, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, - 0x74, 0x2f, 0x7b, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x7d, 0x12, 0xc5, 0x01, 0x0a, - 0x19, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x42, 0x79, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x33, 0x2e, 0x6c, 0x61, 0x79, - 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, - 0x65, 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, - 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x34, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, + 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3d, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x37, 0x12, 0x35, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, + 0x67, 0x65, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x61, + 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2f, + 0x7b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0xa0, 0x01, 0x0a, 0x0d, 0x47, + 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x12, 0x27, 0x2e, 0x6c, + 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, + 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, + 0x61, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x3c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x12, 0x34, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, + 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, + 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x2f, 0x7b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, + 0x7d, 0x2f, 0x7b, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x7d, 0x12, 0xbc, 0x01, + 0x0a, 0x14, 0x47, 0x65, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x42, 0x79, + 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x2e, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, + 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x53, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x42, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, + 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x53, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x42, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x43, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3d, 0x12, + 0x3b, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2f, 0x67, + 0x65, 0x74, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x5f, 0x62, 0x79, 0x5f, + 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x7b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x7d, + 0x2f, 0x7b, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x7d, 0x12, 0xd2, 0x01, 0x0a, + 0x1c, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, + 0x61, 0x74, 0x61, 0x42, 0x79, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x36, 0x2e, + 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x44, 0x61, 0x74, 0x61, 0x42, 0x79, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, + 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, + 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x42, 0x79, 0x53, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x41, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x12, 0x39, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, + 0x72, 0x69, 0x64, 0x67, 0x65, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x62, 0x79, 0x5f, 0x73, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2f, 0x7b, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x7d, 0x12, 0xc5, 0x01, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, + 0x33, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x37, 0x12, 0x35, 0x2f, - 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2f, 0x67, 0x65, 0x74, - 0x5f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x62, 0x79, - 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2f, 0x7b, 0x73, 0x6e, 0x61, 0x70, 0x73, - 0x68, 0x6f, 0x74, 0x7d, 0x42, 0x9c, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6c, 0x61, 0x79, - 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x65, 0x6c, 0x6c, 0x6f, 0x72, 0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61, - 0x79, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, 0x72, - 0x69, 0x64, 0x67, 0x65, 0xa2, 0x02, 0x03, 0x4c, 0x42, 0x58, 0xaa, 0x02, 0x0c, 0x4c, 0x61, 0x79, - 0x65, 0x72, 0x2e, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0xca, 0x02, 0x0c, 0x4c, 0x61, 0x79, 0x65, - 0x72, 0x5c, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0xe2, 0x02, 0x18, 0x4c, 0x61, 0x79, 0x65, 0x72, - 0x5c, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x3a, 0x3a, 0x42, 0x72, 0x69, - 0x64, 0x67, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, + 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x65, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3d, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x37, 0x12, 0x35, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, + 0x65, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2f, 0x7b, + 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x7d, 0x42, 0x9c, 0x01, 0x0a, 0x10, 0x63, 0x6f, + 0x6d, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x42, 0x0a, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x65, 0x6c, 0x6c, 0x6f, 0x72, 0x2d, + 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6c, 0x61, 0x79, + 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0xa2, 0x02, 0x03, 0x4c, 0x42, 0x58, 0xaa, + 0x02, 0x0c, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0xca, 0x02, + 0x0c, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x5c, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0xe2, 0x02, 0x18, + 0x4c, 0x61, 0x79, 0x65, 0x72, 0x5c, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x4c, 0x61, 0x79, 0x65, 0x72, + 0x3a, 0x3a, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -18726,7 +17675,7 @@ func file_layer_bridge_query_proto_rawDescGZIP() []byte { return file_layer_bridge_query_proto_rawDescData } -var file_layer_bridge_query_proto_msgTypes = make([]protoimpl.MessageInfo, 35) +var file_layer_bridge_query_proto_msgTypes = make([]protoimpl.MessageInfo, 33) var file_layer_bridge_query_proto_goTypes = []interface{}{ (*QueryParamsRequest)(nil), // 0: layer.bridge.QueryParamsRequest (*QueryParamsResponse)(nil), // 1: layer.bridge.QueryParamsResponse @@ -18745,66 +17694,62 @@ var file_layer_bridge_query_proto_goTypes = []interface{}{ (*QueryGetValidatorTimestampByIndexResponse)(nil), // 14: layer.bridge.QueryGetValidatorTimestampByIndexResponse (*QueryGetValsetSigsRequest)(nil), // 15: layer.bridge.QueryGetValsetSigsRequest (*QueryGetValsetSigsResponse)(nil), // 16: layer.bridge.QueryGetValsetSigsResponse - (*QueryGetOracleAttestationsRequest)(nil), // 17: layer.bridge.QueryGetOracleAttestationsRequest - (*QueryGetOracleAttestationsResponse)(nil), // 18: layer.bridge.QueryGetOracleAttestationsResponse - (*QueryGetEvmAddressByValidatorAddressRequest)(nil), // 19: layer.bridge.QueryGetEvmAddressByValidatorAddressRequest - (*QueryGetEvmAddressByValidatorAddressResponse)(nil), // 20: layer.bridge.QueryGetEvmAddressByValidatorAddressResponse - (*QueryGetValsetByTimestampRequest)(nil), // 21: layer.bridge.QueryGetValsetByTimestampRequest - (*QueryGetValsetByTimestampResponse)(nil), // 22: layer.bridge.QueryGetValsetByTimestampResponse - (*QueryGetCurrentAggregateReportRequest)(nil), // 23: layer.bridge.QueryGetCurrentAggregateReportRequest - (*QueryGetCurrentAggregateReportResponse)(nil), // 24: layer.bridge.QueryGetCurrentAggregateReportResponse - (*Aggregate)(nil), // 25: layer.bridge.Aggregate - (*AggregateReporter)(nil), // 26: layer.bridge.AggregateReporter - (*QueryGetDataBeforeRequest)(nil), // 27: layer.bridge.QueryGetDataBeforeRequest - (*QueryGetDataBeforeResponse)(nil), // 28: layer.bridge.QueryGetDataBeforeResponse - (*QueryGetSnapshotsByReportRequest)(nil), // 29: layer.bridge.QueryGetSnapshotsByReportRequest - (*QueryGetSnapshotsByReportResponse)(nil), // 30: layer.bridge.QueryGetSnapshotsByReportResponse - (*QueryGetAttestationDataBySnapshotRequest)(nil), // 31: layer.bridge.QueryGetAttestationDataBySnapshotRequest - (*QueryGetAttestationDataBySnapshotResponse)(nil), // 32: layer.bridge.QueryGetAttestationDataBySnapshotResponse - (*QueryGetAttestationsBySnapshotRequest)(nil), // 33: layer.bridge.QueryGetAttestationsBySnapshotRequest - (*QueryGetAttestationsBySnapshotResponse)(nil), // 34: layer.bridge.QueryGetAttestationsBySnapshotResponse - (*Params)(nil), // 35: layer.bridge.Params - (*oracle.Aggregate)(nil), // 36: layer.oracle.Aggregate + (*QueryGetEvmAddressByValidatorAddressRequest)(nil), // 17: layer.bridge.QueryGetEvmAddressByValidatorAddressRequest + (*QueryGetEvmAddressByValidatorAddressResponse)(nil), // 18: layer.bridge.QueryGetEvmAddressByValidatorAddressResponse + (*QueryGetValsetByTimestampRequest)(nil), // 19: layer.bridge.QueryGetValsetByTimestampRequest + (*QueryGetValsetByTimestampResponse)(nil), // 20: layer.bridge.QueryGetValsetByTimestampResponse + (*QueryGetCurrentAggregateReportRequest)(nil), // 21: layer.bridge.QueryGetCurrentAggregateReportRequest + (*QueryGetCurrentAggregateReportResponse)(nil), // 22: layer.bridge.QueryGetCurrentAggregateReportResponse + (*Aggregate)(nil), // 23: layer.bridge.Aggregate + (*AggregateReporter)(nil), // 24: layer.bridge.AggregateReporter + (*QueryGetDataBeforeRequest)(nil), // 25: layer.bridge.QueryGetDataBeforeRequest + (*QueryGetDataBeforeResponse)(nil), // 26: layer.bridge.QueryGetDataBeforeResponse + (*QueryGetSnapshotsByReportRequest)(nil), // 27: layer.bridge.QueryGetSnapshotsByReportRequest + (*QueryGetSnapshotsByReportResponse)(nil), // 28: layer.bridge.QueryGetSnapshotsByReportResponse + (*QueryGetAttestationDataBySnapshotRequest)(nil), // 29: layer.bridge.QueryGetAttestationDataBySnapshotRequest + (*QueryGetAttestationDataBySnapshotResponse)(nil), // 30: layer.bridge.QueryGetAttestationDataBySnapshotResponse + (*QueryGetAttestationsBySnapshotRequest)(nil), // 31: layer.bridge.QueryGetAttestationsBySnapshotRequest + (*QueryGetAttestationsBySnapshotResponse)(nil), // 32: layer.bridge.QueryGetAttestationsBySnapshotResponse + (*Params)(nil), // 33: layer.bridge.Params + (*oracle.Aggregate)(nil), // 34: layer.oracle.Aggregate } var file_layer_bridge_query_proto_depIdxs = []int32{ - 35, // 0: layer.bridge.QueryParamsResponse.params:type_name -> layer.bridge.Params + 33, // 0: layer.bridge.QueryParamsResponse.params:type_name -> layer.bridge.Params 6, // 1: layer.bridge.QueryGetEvmValidatorsResponse.bridgeValidatorSet:type_name -> layer.bridge.BridgeValidator 6, // 2: layer.bridge.BridgeValidatorSet.bridgeValidatorSet:type_name -> layer.bridge.BridgeValidator 7, // 3: layer.bridge.BridgeValidatorSetParams.bridgeValidatorSet:type_name -> layer.bridge.BridgeValidatorSet 6, // 4: layer.bridge.QueryGetValsetByTimestampResponse.bridgeValidatorSet:type_name -> layer.bridge.BridgeValidator - 25, // 5: layer.bridge.QueryGetCurrentAggregateReportResponse.aggregate:type_name -> layer.bridge.Aggregate - 26, // 6: layer.bridge.Aggregate.reporters:type_name -> layer.bridge.AggregateReporter - 36, // 7: layer.bridge.QueryGetDataBeforeResponse.aggregate:type_name -> layer.oracle.Aggregate + 23, // 5: layer.bridge.QueryGetCurrentAggregateReportResponse.aggregate:type_name -> layer.bridge.Aggregate + 24, // 6: layer.bridge.Aggregate.reporters:type_name -> layer.bridge.AggregateReporter + 34, // 7: layer.bridge.QueryGetDataBeforeResponse.aggregate:type_name -> layer.oracle.Aggregate 0, // 8: layer.bridge.Query.Params:input_type -> layer.bridge.QueryParamsRequest 2, // 9: layer.bridge.Query.GetEvmValidators:input_type -> layer.bridge.QueryGetEvmValidatorsRequest 4, // 10: layer.bridge.Query.GetValidatorCheckpoint:input_type -> layer.bridge.QueryGetValidatorCheckpointRequest 11, // 11: layer.bridge.Query.GetValidatorCheckpointParams:input_type -> layer.bridge.QueryGetValidatorCheckpointParamsRequest 13, // 12: layer.bridge.Query.GetValidatorTimestampByIndex:input_type -> layer.bridge.QueryGetValidatorTimestampByIndexRequest 15, // 13: layer.bridge.Query.GetValsetSigs:input_type -> layer.bridge.QueryGetValsetSigsRequest - 17, // 14: layer.bridge.Query.GetOracleAttestations:input_type -> layer.bridge.QueryGetOracleAttestationsRequest - 19, // 15: layer.bridge.Query.GetEvmAddressByValidatorAddress:input_type -> layer.bridge.QueryGetEvmAddressByValidatorAddressRequest - 21, // 16: layer.bridge.Query.GetValsetByTimestamp:input_type -> layer.bridge.QueryGetValsetByTimestampRequest - 23, // 17: layer.bridge.Query.GetCurrentAggregateReport:input_type -> layer.bridge.QueryGetCurrentAggregateReportRequest - 27, // 18: layer.bridge.Query.GetDataBefore:input_type -> layer.bridge.QueryGetDataBeforeRequest - 29, // 19: layer.bridge.Query.GetSnapshotsByReport:input_type -> layer.bridge.QueryGetSnapshotsByReportRequest - 31, // 20: layer.bridge.Query.GetAttestationDataBySnapshot:input_type -> layer.bridge.QueryGetAttestationDataBySnapshotRequest - 33, // 21: layer.bridge.Query.GetAttestationsBySnapshot:input_type -> layer.bridge.QueryGetAttestationsBySnapshotRequest - 1, // 22: layer.bridge.Query.Params:output_type -> layer.bridge.QueryParamsResponse - 3, // 23: layer.bridge.Query.GetEvmValidators:output_type -> layer.bridge.QueryGetEvmValidatorsResponse - 5, // 24: layer.bridge.Query.GetValidatorCheckpoint:output_type -> layer.bridge.QueryGetValidatorCheckpointResponse - 12, // 25: layer.bridge.Query.GetValidatorCheckpointParams:output_type -> layer.bridge.QueryGetValidatorCheckpointParamsResponse - 14, // 26: layer.bridge.Query.GetValidatorTimestampByIndex:output_type -> layer.bridge.QueryGetValidatorTimestampByIndexResponse - 16, // 27: layer.bridge.Query.GetValsetSigs:output_type -> layer.bridge.QueryGetValsetSigsResponse - 18, // 28: layer.bridge.Query.GetOracleAttestations:output_type -> layer.bridge.QueryGetOracleAttestationsResponse - 20, // 29: layer.bridge.Query.GetEvmAddressByValidatorAddress:output_type -> layer.bridge.QueryGetEvmAddressByValidatorAddressResponse - 22, // 30: layer.bridge.Query.GetValsetByTimestamp:output_type -> layer.bridge.QueryGetValsetByTimestampResponse - 24, // 31: layer.bridge.Query.GetCurrentAggregateReport:output_type -> layer.bridge.QueryGetCurrentAggregateReportResponse - 28, // 32: layer.bridge.Query.GetDataBefore:output_type -> layer.bridge.QueryGetDataBeforeResponse - 30, // 33: layer.bridge.Query.GetSnapshotsByReport:output_type -> layer.bridge.QueryGetSnapshotsByReportResponse - 32, // 34: layer.bridge.Query.GetAttestationDataBySnapshot:output_type -> layer.bridge.QueryGetAttestationDataBySnapshotResponse - 34, // 35: layer.bridge.Query.GetAttestationsBySnapshot:output_type -> layer.bridge.QueryGetAttestationsBySnapshotResponse - 22, // [22:36] is the sub-list for method output_type - 8, // [8:22] is the sub-list for method input_type + 17, // 14: layer.bridge.Query.GetEvmAddressByValidatorAddress:input_type -> layer.bridge.QueryGetEvmAddressByValidatorAddressRequest + 19, // 15: layer.bridge.Query.GetValsetByTimestamp:input_type -> layer.bridge.QueryGetValsetByTimestampRequest + 21, // 16: layer.bridge.Query.GetCurrentAggregateReport:input_type -> layer.bridge.QueryGetCurrentAggregateReportRequest + 25, // 17: layer.bridge.Query.GetDataBefore:input_type -> layer.bridge.QueryGetDataBeforeRequest + 27, // 18: layer.bridge.Query.GetSnapshotsByReport:input_type -> layer.bridge.QueryGetSnapshotsByReportRequest + 29, // 19: layer.bridge.Query.GetAttestationDataBySnapshot:input_type -> layer.bridge.QueryGetAttestationDataBySnapshotRequest + 31, // 20: layer.bridge.Query.GetAttestationsBySnapshot:input_type -> layer.bridge.QueryGetAttestationsBySnapshotRequest + 1, // 21: layer.bridge.Query.Params:output_type -> layer.bridge.QueryParamsResponse + 3, // 22: layer.bridge.Query.GetEvmValidators:output_type -> layer.bridge.QueryGetEvmValidatorsResponse + 5, // 23: layer.bridge.Query.GetValidatorCheckpoint:output_type -> layer.bridge.QueryGetValidatorCheckpointResponse + 12, // 24: layer.bridge.Query.GetValidatorCheckpointParams:output_type -> layer.bridge.QueryGetValidatorCheckpointParamsResponse + 14, // 25: layer.bridge.Query.GetValidatorTimestampByIndex:output_type -> layer.bridge.QueryGetValidatorTimestampByIndexResponse + 16, // 26: layer.bridge.Query.GetValsetSigs:output_type -> layer.bridge.QueryGetValsetSigsResponse + 18, // 27: layer.bridge.Query.GetEvmAddressByValidatorAddress:output_type -> layer.bridge.QueryGetEvmAddressByValidatorAddressResponse + 20, // 28: layer.bridge.Query.GetValsetByTimestamp:output_type -> layer.bridge.QueryGetValsetByTimestampResponse + 22, // 29: layer.bridge.Query.GetCurrentAggregateReport:output_type -> layer.bridge.QueryGetCurrentAggregateReportResponse + 26, // 30: layer.bridge.Query.GetDataBefore:output_type -> layer.bridge.QueryGetDataBeforeResponse + 28, // 31: layer.bridge.Query.GetSnapshotsByReport:output_type -> layer.bridge.QueryGetSnapshotsByReportResponse + 30, // 32: layer.bridge.Query.GetAttestationDataBySnapshot:output_type -> layer.bridge.QueryGetAttestationDataBySnapshotResponse + 32, // 33: layer.bridge.Query.GetAttestationsBySnapshot:output_type -> layer.bridge.QueryGetAttestationsBySnapshotResponse + 21, // [21:34] is the sub-list for method output_type + 8, // [8:21] is the sub-list for method input_type 8, // [8:8] is the sub-list for extension type_name 8, // [8:8] is the sub-list for extension extendee 0, // [0:8] is the sub-list for field type_name @@ -19022,30 +17967,6 @@ func file_layer_bridge_query_proto_init() { } } file_layer_bridge_query_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryGetOracleAttestationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_layer_bridge_query_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryGetOracleAttestationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_layer_bridge_query_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryGetEvmAddressByValidatorAddressRequest); i { case 0: return &v.state @@ -19057,7 +17978,7 @@ func file_layer_bridge_query_proto_init() { return nil } } - file_layer_bridge_query_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + file_layer_bridge_query_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryGetEvmAddressByValidatorAddressResponse); i { case 0: return &v.state @@ -19069,7 +17990,7 @@ func file_layer_bridge_query_proto_init() { return nil } } - file_layer_bridge_query_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + file_layer_bridge_query_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryGetValsetByTimestampRequest); i { case 0: return &v.state @@ -19081,7 +18002,7 @@ func file_layer_bridge_query_proto_init() { return nil } } - file_layer_bridge_query_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + file_layer_bridge_query_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryGetValsetByTimestampResponse); i { case 0: return &v.state @@ -19093,7 +18014,7 @@ func file_layer_bridge_query_proto_init() { return nil } } - file_layer_bridge_query_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + file_layer_bridge_query_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryGetCurrentAggregateReportRequest); i { case 0: return &v.state @@ -19105,7 +18026,7 @@ func file_layer_bridge_query_proto_init() { return nil } } - file_layer_bridge_query_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + file_layer_bridge_query_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryGetCurrentAggregateReportResponse); i { case 0: return &v.state @@ -19117,7 +18038,7 @@ func file_layer_bridge_query_proto_init() { return nil } } - file_layer_bridge_query_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + file_layer_bridge_query_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Aggregate); i { case 0: return &v.state @@ -19129,7 +18050,7 @@ func file_layer_bridge_query_proto_init() { return nil } } - file_layer_bridge_query_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + file_layer_bridge_query_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AggregateReporter); i { case 0: return &v.state @@ -19141,7 +18062,7 @@ func file_layer_bridge_query_proto_init() { return nil } } - file_layer_bridge_query_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + file_layer_bridge_query_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryGetDataBeforeRequest); i { case 0: return &v.state @@ -19153,7 +18074,7 @@ func file_layer_bridge_query_proto_init() { return nil } } - file_layer_bridge_query_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + file_layer_bridge_query_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryGetDataBeforeResponse); i { case 0: return &v.state @@ -19165,7 +18086,7 @@ func file_layer_bridge_query_proto_init() { return nil } } - file_layer_bridge_query_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + file_layer_bridge_query_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryGetSnapshotsByReportRequest); i { case 0: return &v.state @@ -19177,7 +18098,7 @@ func file_layer_bridge_query_proto_init() { return nil } } - file_layer_bridge_query_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + file_layer_bridge_query_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryGetSnapshotsByReportResponse); i { case 0: return &v.state @@ -19189,7 +18110,7 @@ func file_layer_bridge_query_proto_init() { return nil } } - file_layer_bridge_query_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + file_layer_bridge_query_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryGetAttestationDataBySnapshotRequest); i { case 0: return &v.state @@ -19201,7 +18122,7 @@ func file_layer_bridge_query_proto_init() { return nil } } - file_layer_bridge_query_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + file_layer_bridge_query_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryGetAttestationDataBySnapshotResponse); i { case 0: return &v.state @@ -19213,7 +18134,7 @@ func file_layer_bridge_query_proto_init() { return nil } } - file_layer_bridge_query_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + file_layer_bridge_query_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryGetAttestationsBySnapshotRequest); i { case 0: return &v.state @@ -19225,7 +18146,7 @@ func file_layer_bridge_query_proto_init() { return nil } } - file_layer_bridge_query_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + file_layer_bridge_query_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryGetAttestationsBySnapshotResponse); i { case 0: return &v.state @@ -19244,7 +18165,7 @@ func file_layer_bridge_query_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_layer_bridge_query_proto_rawDesc, NumEnums: 0, - NumMessages: 35, + NumMessages: 33, NumExtensions: 0, NumServices: 1, }, diff --git a/api/layer/bridge/query_grpc.pb.go b/api/layer/bridge/query_grpc.pb.go index 41e4f5dc9..4707ce3b7 100644 --- a/api/layer/bridge/query_grpc.pb.go +++ b/api/layer/bridge/query_grpc.pb.go @@ -26,7 +26,6 @@ type QueryClient interface { GetValidatorCheckpointParams(ctx context.Context, in *QueryGetValidatorCheckpointParamsRequest, opts ...grpc.CallOption) (*QueryGetValidatorCheckpointParamsResponse, error) GetValidatorTimestampByIndex(ctx context.Context, in *QueryGetValidatorTimestampByIndexRequest, opts ...grpc.CallOption) (*QueryGetValidatorTimestampByIndexResponse, error) GetValsetSigs(ctx context.Context, in *QueryGetValsetSigsRequest, opts ...grpc.CallOption) (*QueryGetValsetSigsResponse, error) - GetOracleAttestations(ctx context.Context, in *QueryGetOracleAttestationsRequest, opts ...grpc.CallOption) (*QueryGetOracleAttestationsResponse, error) GetEvmAddressByValidatorAddress(ctx context.Context, in *QueryGetEvmAddressByValidatorAddressRequest, opts ...grpc.CallOption) (*QueryGetEvmAddressByValidatorAddressResponse, error) GetValsetByTimestamp(ctx context.Context, in *QueryGetValsetByTimestampRequest, opts ...grpc.CallOption) (*QueryGetValsetByTimestampResponse, error) GetCurrentAggregateReport(ctx context.Context, in *QueryGetCurrentAggregateReportRequest, opts ...grpc.CallOption) (*QueryGetCurrentAggregateReportResponse, error) @@ -98,15 +97,6 @@ func (c *queryClient) GetValsetSigs(ctx context.Context, in *QueryGetValsetSigsR return out, nil } -func (c *queryClient) GetOracleAttestations(ctx context.Context, in *QueryGetOracleAttestationsRequest, opts ...grpc.CallOption) (*QueryGetOracleAttestationsResponse, error) { - out := new(QueryGetOracleAttestationsResponse) - err := c.cc.Invoke(ctx, "/layer.bridge.Query/GetOracleAttestations", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *queryClient) GetEvmAddressByValidatorAddress(ctx context.Context, in *QueryGetEvmAddressByValidatorAddressRequest, opts ...grpc.CallOption) (*QueryGetEvmAddressByValidatorAddressResponse, error) { out := new(QueryGetEvmAddressByValidatorAddressResponse) err := c.cc.Invoke(ctx, "/layer.bridge.Query/GetEvmAddressByValidatorAddress", in, out, opts...) @@ -182,7 +172,6 @@ type QueryServer interface { GetValidatorCheckpointParams(context.Context, *QueryGetValidatorCheckpointParamsRequest) (*QueryGetValidatorCheckpointParamsResponse, error) GetValidatorTimestampByIndex(context.Context, *QueryGetValidatorTimestampByIndexRequest) (*QueryGetValidatorTimestampByIndexResponse, error) GetValsetSigs(context.Context, *QueryGetValsetSigsRequest) (*QueryGetValsetSigsResponse, error) - GetOracleAttestations(context.Context, *QueryGetOracleAttestationsRequest) (*QueryGetOracleAttestationsResponse, error) GetEvmAddressByValidatorAddress(context.Context, *QueryGetEvmAddressByValidatorAddressRequest) (*QueryGetEvmAddressByValidatorAddressResponse, error) GetValsetByTimestamp(context.Context, *QueryGetValsetByTimestampRequest) (*QueryGetValsetByTimestampResponse, error) GetCurrentAggregateReport(context.Context, *QueryGetCurrentAggregateReportRequest) (*QueryGetCurrentAggregateReportResponse, error) @@ -215,9 +204,6 @@ func (UnimplementedQueryServer) GetValidatorTimestampByIndex(context.Context, *Q func (UnimplementedQueryServer) GetValsetSigs(context.Context, *QueryGetValsetSigsRequest) (*QueryGetValsetSigsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetValsetSigs not implemented") } -func (UnimplementedQueryServer) GetOracleAttestations(context.Context, *QueryGetOracleAttestationsRequest) (*QueryGetOracleAttestationsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetOracleAttestations not implemented") -} func (UnimplementedQueryServer) GetEvmAddressByValidatorAddress(context.Context, *QueryGetEvmAddressByValidatorAddressRequest) (*QueryGetEvmAddressByValidatorAddressResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetEvmAddressByValidatorAddress not implemented") } @@ -360,24 +346,6 @@ func _Query_GetValsetSigs_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } -func _Query_GetOracleAttestations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGetOracleAttestationsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).GetOracleAttestations(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/layer.bridge.Query/GetOracleAttestations", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).GetOracleAttestations(ctx, req.(*QueryGetOracleAttestationsRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _Query_GetEvmAddressByValidatorAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryGetEvmAddressByValidatorAddressRequest) if err := dec(in); err != nil { @@ -535,10 +503,6 @@ var Query_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetValsetSigs", Handler: _Query_GetValsetSigs_Handler, }, - { - MethodName: "GetOracleAttestations", - Handler: _Query_GetOracleAttestations_Handler, - }, { MethodName: "GetEvmAddressByValidatorAddress", Handler: _Query_GetEvmAddressByValidatorAddress_Handler, diff --git a/api/layer/bridge/tx.pulsar.go b/api/layer/bridge/tx.pulsar.go index bd578c6e2..631afb678 100644 --- a/api/layer/bridge/tx.pulsar.go +++ b/api/layer/bridge/tx.pulsar.go @@ -13,2720 +13,6 @@ import ( sync "sync" ) -var ( - md_MsgRegisterOperatorPubkey protoreflect.MessageDescriptor - fd_MsgRegisterOperatorPubkey_creator protoreflect.FieldDescriptor - fd_MsgRegisterOperatorPubkey_operatorPubkey protoreflect.FieldDescriptor -) - -func init() { - file_layer_bridge_tx_proto_init() - md_MsgRegisterOperatorPubkey = File_layer_bridge_tx_proto.Messages().ByName("MsgRegisterOperatorPubkey") - fd_MsgRegisterOperatorPubkey_creator = md_MsgRegisterOperatorPubkey.Fields().ByName("creator") - fd_MsgRegisterOperatorPubkey_operatorPubkey = md_MsgRegisterOperatorPubkey.Fields().ByName("operatorPubkey") -} - -var _ protoreflect.Message = (*fastReflection_MsgRegisterOperatorPubkey)(nil) - -type fastReflection_MsgRegisterOperatorPubkey MsgRegisterOperatorPubkey - -func (x *MsgRegisterOperatorPubkey) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgRegisterOperatorPubkey)(x) -} - -func (x *MsgRegisterOperatorPubkey) slowProtoReflect() protoreflect.Message { - mi := &file_layer_bridge_tx_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) -} - -var _fastReflection_MsgRegisterOperatorPubkey_messageType fastReflection_MsgRegisterOperatorPubkey_messageType -var _ protoreflect.MessageType = fastReflection_MsgRegisterOperatorPubkey_messageType{} - -type fastReflection_MsgRegisterOperatorPubkey_messageType struct{} - -func (x fastReflection_MsgRegisterOperatorPubkey_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgRegisterOperatorPubkey)(nil) -} -func (x fastReflection_MsgRegisterOperatorPubkey_messageType) New() protoreflect.Message { - return new(fastReflection_MsgRegisterOperatorPubkey) -} -func (x fastReflection_MsgRegisterOperatorPubkey_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRegisterOperatorPubkey -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgRegisterOperatorPubkey) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRegisterOperatorPubkey -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgRegisterOperatorPubkey) Type() protoreflect.MessageType { - return _fastReflection_MsgRegisterOperatorPubkey_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgRegisterOperatorPubkey) New() protoreflect.Message { - return new(fastReflection_MsgRegisterOperatorPubkey) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgRegisterOperatorPubkey) Interface() protoreflect.ProtoMessage { - return (*MsgRegisterOperatorPubkey)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgRegisterOperatorPubkey) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Creator != "" { - value := protoreflect.ValueOfString(x.Creator) - if !f(fd_MsgRegisterOperatorPubkey_creator, value) { - return - } - } - if x.OperatorPubkey != "" { - value := protoreflect.ValueOfString(x.OperatorPubkey) - if !f(fd_MsgRegisterOperatorPubkey_operatorPubkey, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgRegisterOperatorPubkey) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "layer.bridge.MsgRegisterOperatorPubkey.creator": - return x.Creator != "" - case "layer.bridge.MsgRegisterOperatorPubkey.operatorPubkey": - return x.OperatorPubkey != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgRegisterOperatorPubkey")) - } - panic(fmt.Errorf("message layer.bridge.MsgRegisterOperatorPubkey does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterOperatorPubkey) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "layer.bridge.MsgRegisterOperatorPubkey.creator": - x.Creator = "" - case "layer.bridge.MsgRegisterOperatorPubkey.operatorPubkey": - x.OperatorPubkey = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgRegisterOperatorPubkey")) - } - panic(fmt.Errorf("message layer.bridge.MsgRegisterOperatorPubkey does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgRegisterOperatorPubkey) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "layer.bridge.MsgRegisterOperatorPubkey.creator": - value := x.Creator - return protoreflect.ValueOfString(value) - case "layer.bridge.MsgRegisterOperatorPubkey.operatorPubkey": - value := x.OperatorPubkey - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgRegisterOperatorPubkey")) - } - panic(fmt.Errorf("message layer.bridge.MsgRegisterOperatorPubkey does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterOperatorPubkey) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "layer.bridge.MsgRegisterOperatorPubkey.creator": - x.Creator = value.Interface().(string) - case "layer.bridge.MsgRegisterOperatorPubkey.operatorPubkey": - x.OperatorPubkey = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgRegisterOperatorPubkey")) - } - panic(fmt.Errorf("message layer.bridge.MsgRegisterOperatorPubkey does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterOperatorPubkey) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "layer.bridge.MsgRegisterOperatorPubkey.creator": - panic(fmt.Errorf("field creator of message layer.bridge.MsgRegisterOperatorPubkey is not mutable")) - case "layer.bridge.MsgRegisterOperatorPubkey.operatorPubkey": - panic(fmt.Errorf("field operatorPubkey of message layer.bridge.MsgRegisterOperatorPubkey is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgRegisterOperatorPubkey")) - } - panic(fmt.Errorf("message layer.bridge.MsgRegisterOperatorPubkey does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgRegisterOperatorPubkey) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "layer.bridge.MsgRegisterOperatorPubkey.creator": - return protoreflect.ValueOfString("") - case "layer.bridge.MsgRegisterOperatorPubkey.operatorPubkey": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgRegisterOperatorPubkey")) - } - panic(fmt.Errorf("message layer.bridge.MsgRegisterOperatorPubkey does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgRegisterOperatorPubkey) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in layer.bridge.MsgRegisterOperatorPubkey", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgRegisterOperatorPubkey) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterOperatorPubkey) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgRegisterOperatorPubkey) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgRegisterOperatorPubkey) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgRegisterOperatorPubkey) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Creator) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.OperatorPubkey) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgRegisterOperatorPubkey) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.OperatorPubkey) > 0 { - i -= len(x.OperatorPubkey) - copy(dAtA[i:], x.OperatorPubkey) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OperatorPubkey))) - i-- - dAtA[i] = 0x12 - } - if len(x.Creator) > 0 { - i -= len(x.Creator) - copy(dAtA[i:], x.Creator) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgRegisterOperatorPubkey) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterOperatorPubkey: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterOperatorPubkey: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OperatorPubkey", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.OperatorPubkey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgRegisterOperatorPubkeyResponse protoreflect.MessageDescriptor -) - -func init() { - file_layer_bridge_tx_proto_init() - md_MsgRegisterOperatorPubkeyResponse = File_layer_bridge_tx_proto.Messages().ByName("MsgRegisterOperatorPubkeyResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgRegisterOperatorPubkeyResponse)(nil) - -type fastReflection_MsgRegisterOperatorPubkeyResponse MsgRegisterOperatorPubkeyResponse - -func (x *MsgRegisterOperatorPubkeyResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgRegisterOperatorPubkeyResponse)(x) -} - -func (x *MsgRegisterOperatorPubkeyResponse) slowProtoReflect() protoreflect.Message { - mi := &file_layer_bridge_tx_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) -} - -var _fastReflection_MsgRegisterOperatorPubkeyResponse_messageType fastReflection_MsgRegisterOperatorPubkeyResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgRegisterOperatorPubkeyResponse_messageType{} - -type fastReflection_MsgRegisterOperatorPubkeyResponse_messageType struct{} - -func (x fastReflection_MsgRegisterOperatorPubkeyResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgRegisterOperatorPubkeyResponse)(nil) -} -func (x fastReflection_MsgRegisterOperatorPubkeyResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgRegisterOperatorPubkeyResponse) -} -func (x fastReflection_MsgRegisterOperatorPubkeyResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRegisterOperatorPubkeyResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgRegisterOperatorPubkeyResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRegisterOperatorPubkeyResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgRegisterOperatorPubkeyResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgRegisterOperatorPubkeyResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgRegisterOperatorPubkeyResponse) New() protoreflect.Message { - return new(fastReflection_MsgRegisterOperatorPubkeyResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgRegisterOperatorPubkeyResponse) Interface() protoreflect.ProtoMessage { - return (*MsgRegisterOperatorPubkeyResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgRegisterOperatorPubkeyResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgRegisterOperatorPubkeyResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgRegisterOperatorPubkeyResponse")) - } - panic(fmt.Errorf("message layer.bridge.MsgRegisterOperatorPubkeyResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterOperatorPubkeyResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgRegisterOperatorPubkeyResponse")) - } - panic(fmt.Errorf("message layer.bridge.MsgRegisterOperatorPubkeyResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgRegisterOperatorPubkeyResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgRegisterOperatorPubkeyResponse")) - } - panic(fmt.Errorf("message layer.bridge.MsgRegisterOperatorPubkeyResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterOperatorPubkeyResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgRegisterOperatorPubkeyResponse")) - } - panic(fmt.Errorf("message layer.bridge.MsgRegisterOperatorPubkeyResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterOperatorPubkeyResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgRegisterOperatorPubkeyResponse")) - } - panic(fmt.Errorf("message layer.bridge.MsgRegisterOperatorPubkeyResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgRegisterOperatorPubkeyResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgRegisterOperatorPubkeyResponse")) - } - panic(fmt.Errorf("message layer.bridge.MsgRegisterOperatorPubkeyResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgRegisterOperatorPubkeyResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in layer.bridge.MsgRegisterOperatorPubkeyResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgRegisterOperatorPubkeyResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterOperatorPubkeyResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgRegisterOperatorPubkeyResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgRegisterOperatorPubkeyResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgRegisterOperatorPubkeyResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgRegisterOperatorPubkeyResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgRegisterOperatorPubkeyResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterOperatorPubkeyResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterOperatorPubkeyResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgSubmitBridgeValsetSignature protoreflect.MessageDescriptor - fd_MsgSubmitBridgeValsetSignature_creator protoreflect.FieldDescriptor - fd_MsgSubmitBridgeValsetSignature_timestamp protoreflect.FieldDescriptor - fd_MsgSubmitBridgeValsetSignature_signature protoreflect.FieldDescriptor -) - -func init() { - file_layer_bridge_tx_proto_init() - md_MsgSubmitBridgeValsetSignature = File_layer_bridge_tx_proto.Messages().ByName("MsgSubmitBridgeValsetSignature") - fd_MsgSubmitBridgeValsetSignature_creator = md_MsgSubmitBridgeValsetSignature.Fields().ByName("creator") - fd_MsgSubmitBridgeValsetSignature_timestamp = md_MsgSubmitBridgeValsetSignature.Fields().ByName("timestamp") - fd_MsgSubmitBridgeValsetSignature_signature = md_MsgSubmitBridgeValsetSignature.Fields().ByName("signature") -} - -var _ protoreflect.Message = (*fastReflection_MsgSubmitBridgeValsetSignature)(nil) - -type fastReflection_MsgSubmitBridgeValsetSignature MsgSubmitBridgeValsetSignature - -func (x *MsgSubmitBridgeValsetSignature) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgSubmitBridgeValsetSignature)(x) -} - -func (x *MsgSubmitBridgeValsetSignature) slowProtoReflect() protoreflect.Message { - mi := &file_layer_bridge_tx_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) -} - -var _fastReflection_MsgSubmitBridgeValsetSignature_messageType fastReflection_MsgSubmitBridgeValsetSignature_messageType -var _ protoreflect.MessageType = fastReflection_MsgSubmitBridgeValsetSignature_messageType{} - -type fastReflection_MsgSubmitBridgeValsetSignature_messageType struct{} - -func (x fastReflection_MsgSubmitBridgeValsetSignature_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgSubmitBridgeValsetSignature)(nil) -} -func (x fastReflection_MsgSubmitBridgeValsetSignature_messageType) New() protoreflect.Message { - return new(fastReflection_MsgSubmitBridgeValsetSignature) -} -func (x fastReflection_MsgSubmitBridgeValsetSignature_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitBridgeValsetSignature -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgSubmitBridgeValsetSignature) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitBridgeValsetSignature -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgSubmitBridgeValsetSignature) Type() protoreflect.MessageType { - return _fastReflection_MsgSubmitBridgeValsetSignature_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgSubmitBridgeValsetSignature) New() protoreflect.Message { - return new(fastReflection_MsgSubmitBridgeValsetSignature) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgSubmitBridgeValsetSignature) Interface() protoreflect.ProtoMessage { - return (*MsgSubmitBridgeValsetSignature)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgSubmitBridgeValsetSignature) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Creator != "" { - value := protoreflect.ValueOfString(x.Creator) - if !f(fd_MsgSubmitBridgeValsetSignature_creator, value) { - return - } - } - if x.Timestamp != "" { - value := protoreflect.ValueOfString(x.Timestamp) - if !f(fd_MsgSubmitBridgeValsetSignature_timestamp, value) { - return - } - } - if x.Signature != "" { - value := protoreflect.ValueOfString(x.Signature) - if !f(fd_MsgSubmitBridgeValsetSignature_signature, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgSubmitBridgeValsetSignature) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "layer.bridge.MsgSubmitBridgeValsetSignature.creator": - return x.Creator != "" - case "layer.bridge.MsgSubmitBridgeValsetSignature.timestamp": - return x.Timestamp != "" - case "layer.bridge.MsgSubmitBridgeValsetSignature.signature": - return x.Signature != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgSubmitBridgeValsetSignature")) - } - panic(fmt.Errorf("message layer.bridge.MsgSubmitBridgeValsetSignature does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitBridgeValsetSignature) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "layer.bridge.MsgSubmitBridgeValsetSignature.creator": - x.Creator = "" - case "layer.bridge.MsgSubmitBridgeValsetSignature.timestamp": - x.Timestamp = "" - case "layer.bridge.MsgSubmitBridgeValsetSignature.signature": - x.Signature = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgSubmitBridgeValsetSignature")) - } - panic(fmt.Errorf("message layer.bridge.MsgSubmitBridgeValsetSignature does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgSubmitBridgeValsetSignature) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "layer.bridge.MsgSubmitBridgeValsetSignature.creator": - value := x.Creator - return protoreflect.ValueOfString(value) - case "layer.bridge.MsgSubmitBridgeValsetSignature.timestamp": - value := x.Timestamp - return protoreflect.ValueOfString(value) - case "layer.bridge.MsgSubmitBridgeValsetSignature.signature": - value := x.Signature - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgSubmitBridgeValsetSignature")) - } - panic(fmt.Errorf("message layer.bridge.MsgSubmitBridgeValsetSignature does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitBridgeValsetSignature) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "layer.bridge.MsgSubmitBridgeValsetSignature.creator": - x.Creator = value.Interface().(string) - case "layer.bridge.MsgSubmitBridgeValsetSignature.timestamp": - x.Timestamp = value.Interface().(string) - case "layer.bridge.MsgSubmitBridgeValsetSignature.signature": - x.Signature = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgSubmitBridgeValsetSignature")) - } - panic(fmt.Errorf("message layer.bridge.MsgSubmitBridgeValsetSignature does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitBridgeValsetSignature) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "layer.bridge.MsgSubmitBridgeValsetSignature.creator": - panic(fmt.Errorf("field creator of message layer.bridge.MsgSubmitBridgeValsetSignature is not mutable")) - case "layer.bridge.MsgSubmitBridgeValsetSignature.timestamp": - panic(fmt.Errorf("field timestamp of message layer.bridge.MsgSubmitBridgeValsetSignature is not mutable")) - case "layer.bridge.MsgSubmitBridgeValsetSignature.signature": - panic(fmt.Errorf("field signature of message layer.bridge.MsgSubmitBridgeValsetSignature is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgSubmitBridgeValsetSignature")) - } - panic(fmt.Errorf("message layer.bridge.MsgSubmitBridgeValsetSignature does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgSubmitBridgeValsetSignature) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "layer.bridge.MsgSubmitBridgeValsetSignature.creator": - return protoreflect.ValueOfString("") - case "layer.bridge.MsgSubmitBridgeValsetSignature.timestamp": - return protoreflect.ValueOfString("") - case "layer.bridge.MsgSubmitBridgeValsetSignature.signature": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgSubmitBridgeValsetSignature")) - } - panic(fmt.Errorf("message layer.bridge.MsgSubmitBridgeValsetSignature does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgSubmitBridgeValsetSignature) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in layer.bridge.MsgSubmitBridgeValsetSignature", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgSubmitBridgeValsetSignature) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitBridgeValsetSignature) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgSubmitBridgeValsetSignature) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgSubmitBridgeValsetSignature) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgSubmitBridgeValsetSignature) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Creator) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Timestamp) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Signature) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgSubmitBridgeValsetSignature) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Signature) > 0 { - i -= len(x.Signature) - copy(dAtA[i:], x.Signature) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signature))) - i-- - dAtA[i] = 0x1a - } - if len(x.Timestamp) > 0 { - i -= len(x.Timestamp) - copy(dAtA[i:], x.Timestamp) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Timestamp))) - i-- - dAtA[i] = 0x12 - } - if len(x.Creator) > 0 { - i -= len(x.Creator) - copy(dAtA[i:], x.Creator) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgSubmitBridgeValsetSignature) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSubmitBridgeValsetSignature: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSubmitBridgeValsetSignature: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Timestamp = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Signature = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgSubmitBridgeValsetSignatureResponse protoreflect.MessageDescriptor -) - -func init() { - file_layer_bridge_tx_proto_init() - md_MsgSubmitBridgeValsetSignatureResponse = File_layer_bridge_tx_proto.Messages().ByName("MsgSubmitBridgeValsetSignatureResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgSubmitBridgeValsetSignatureResponse)(nil) - -type fastReflection_MsgSubmitBridgeValsetSignatureResponse MsgSubmitBridgeValsetSignatureResponse - -func (x *MsgSubmitBridgeValsetSignatureResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgSubmitBridgeValsetSignatureResponse)(x) -} - -func (x *MsgSubmitBridgeValsetSignatureResponse) slowProtoReflect() protoreflect.Message { - mi := &file_layer_bridge_tx_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) -} - -var _fastReflection_MsgSubmitBridgeValsetSignatureResponse_messageType fastReflection_MsgSubmitBridgeValsetSignatureResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgSubmitBridgeValsetSignatureResponse_messageType{} - -type fastReflection_MsgSubmitBridgeValsetSignatureResponse_messageType struct{} - -func (x fastReflection_MsgSubmitBridgeValsetSignatureResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgSubmitBridgeValsetSignatureResponse)(nil) -} -func (x fastReflection_MsgSubmitBridgeValsetSignatureResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgSubmitBridgeValsetSignatureResponse) -} -func (x fastReflection_MsgSubmitBridgeValsetSignatureResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitBridgeValsetSignatureResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgSubmitBridgeValsetSignatureResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitBridgeValsetSignatureResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgSubmitBridgeValsetSignatureResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgSubmitBridgeValsetSignatureResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgSubmitBridgeValsetSignatureResponse) New() protoreflect.Message { - return new(fastReflection_MsgSubmitBridgeValsetSignatureResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgSubmitBridgeValsetSignatureResponse) Interface() protoreflect.ProtoMessage { - return (*MsgSubmitBridgeValsetSignatureResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgSubmitBridgeValsetSignatureResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgSubmitBridgeValsetSignatureResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgSubmitBridgeValsetSignatureResponse")) - } - panic(fmt.Errorf("message layer.bridge.MsgSubmitBridgeValsetSignatureResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitBridgeValsetSignatureResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgSubmitBridgeValsetSignatureResponse")) - } - panic(fmt.Errorf("message layer.bridge.MsgSubmitBridgeValsetSignatureResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgSubmitBridgeValsetSignatureResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgSubmitBridgeValsetSignatureResponse")) - } - panic(fmt.Errorf("message layer.bridge.MsgSubmitBridgeValsetSignatureResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitBridgeValsetSignatureResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgSubmitBridgeValsetSignatureResponse")) - } - panic(fmt.Errorf("message layer.bridge.MsgSubmitBridgeValsetSignatureResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitBridgeValsetSignatureResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgSubmitBridgeValsetSignatureResponse")) - } - panic(fmt.Errorf("message layer.bridge.MsgSubmitBridgeValsetSignatureResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgSubmitBridgeValsetSignatureResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgSubmitBridgeValsetSignatureResponse")) - } - panic(fmt.Errorf("message layer.bridge.MsgSubmitBridgeValsetSignatureResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgSubmitBridgeValsetSignatureResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in layer.bridge.MsgSubmitBridgeValsetSignatureResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgSubmitBridgeValsetSignatureResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitBridgeValsetSignatureResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgSubmitBridgeValsetSignatureResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgSubmitBridgeValsetSignatureResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgSubmitBridgeValsetSignatureResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgSubmitBridgeValsetSignatureResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgSubmitBridgeValsetSignatureResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSubmitBridgeValsetSignatureResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSubmitBridgeValsetSignatureResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgSubmitOracleAttestation protoreflect.MessageDescriptor - fd_MsgSubmitOracleAttestation_creator protoreflect.FieldDescriptor - fd_MsgSubmitOracleAttestation_query_id protoreflect.FieldDescriptor - fd_MsgSubmitOracleAttestation_timestamp protoreflect.FieldDescriptor - fd_MsgSubmitOracleAttestation_signature protoreflect.FieldDescriptor -) - -func init() { - file_layer_bridge_tx_proto_init() - md_MsgSubmitOracleAttestation = File_layer_bridge_tx_proto.Messages().ByName("MsgSubmitOracleAttestation") - fd_MsgSubmitOracleAttestation_creator = md_MsgSubmitOracleAttestation.Fields().ByName("creator") - fd_MsgSubmitOracleAttestation_query_id = md_MsgSubmitOracleAttestation.Fields().ByName("query_id") - fd_MsgSubmitOracleAttestation_timestamp = md_MsgSubmitOracleAttestation.Fields().ByName("timestamp") - fd_MsgSubmitOracleAttestation_signature = md_MsgSubmitOracleAttestation.Fields().ByName("signature") -} - -var _ protoreflect.Message = (*fastReflection_MsgSubmitOracleAttestation)(nil) - -type fastReflection_MsgSubmitOracleAttestation MsgSubmitOracleAttestation - -func (x *MsgSubmitOracleAttestation) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgSubmitOracleAttestation)(x) -} - -func (x *MsgSubmitOracleAttestation) slowProtoReflect() protoreflect.Message { - mi := &file_layer_bridge_tx_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 _fastReflection_MsgSubmitOracleAttestation_messageType fastReflection_MsgSubmitOracleAttestation_messageType -var _ protoreflect.MessageType = fastReflection_MsgSubmitOracleAttestation_messageType{} - -type fastReflection_MsgSubmitOracleAttestation_messageType struct{} - -func (x fastReflection_MsgSubmitOracleAttestation_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgSubmitOracleAttestation)(nil) -} -func (x fastReflection_MsgSubmitOracleAttestation_messageType) New() protoreflect.Message { - return new(fastReflection_MsgSubmitOracleAttestation) -} -func (x fastReflection_MsgSubmitOracleAttestation_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitOracleAttestation -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgSubmitOracleAttestation) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitOracleAttestation -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgSubmitOracleAttestation) Type() protoreflect.MessageType { - return _fastReflection_MsgSubmitOracleAttestation_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgSubmitOracleAttestation) New() protoreflect.Message { - return new(fastReflection_MsgSubmitOracleAttestation) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgSubmitOracleAttestation) Interface() protoreflect.ProtoMessage { - return (*MsgSubmitOracleAttestation)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgSubmitOracleAttestation) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Creator != "" { - value := protoreflect.ValueOfString(x.Creator) - if !f(fd_MsgSubmitOracleAttestation_creator, value) { - return - } - } - if len(x.QueryId) != 0 { - value := protoreflect.ValueOfBytes(x.QueryId) - if !f(fd_MsgSubmitOracleAttestation_query_id, value) { - return - } - } - if x.Timestamp != "" { - value := protoreflect.ValueOfString(x.Timestamp) - if !f(fd_MsgSubmitOracleAttestation_timestamp, value) { - return - } - } - if x.Signature != "" { - value := protoreflect.ValueOfString(x.Signature) - if !f(fd_MsgSubmitOracleAttestation_signature, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgSubmitOracleAttestation) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "layer.bridge.MsgSubmitOracleAttestation.creator": - return x.Creator != "" - case "layer.bridge.MsgSubmitOracleAttestation.query_id": - return len(x.QueryId) != 0 - case "layer.bridge.MsgSubmitOracleAttestation.timestamp": - return x.Timestamp != "" - case "layer.bridge.MsgSubmitOracleAttestation.signature": - return x.Signature != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgSubmitOracleAttestation")) - } - panic(fmt.Errorf("message layer.bridge.MsgSubmitOracleAttestation does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitOracleAttestation) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "layer.bridge.MsgSubmitOracleAttestation.creator": - x.Creator = "" - case "layer.bridge.MsgSubmitOracleAttestation.query_id": - x.QueryId = nil - case "layer.bridge.MsgSubmitOracleAttestation.timestamp": - x.Timestamp = "" - case "layer.bridge.MsgSubmitOracleAttestation.signature": - x.Signature = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgSubmitOracleAttestation")) - } - panic(fmt.Errorf("message layer.bridge.MsgSubmitOracleAttestation does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgSubmitOracleAttestation) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "layer.bridge.MsgSubmitOracleAttestation.creator": - value := x.Creator - return protoreflect.ValueOfString(value) - case "layer.bridge.MsgSubmitOracleAttestation.query_id": - value := x.QueryId - return protoreflect.ValueOfBytes(value) - case "layer.bridge.MsgSubmitOracleAttestation.timestamp": - value := x.Timestamp - return protoreflect.ValueOfString(value) - case "layer.bridge.MsgSubmitOracleAttestation.signature": - value := x.Signature - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgSubmitOracleAttestation")) - } - panic(fmt.Errorf("message layer.bridge.MsgSubmitOracleAttestation does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitOracleAttestation) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "layer.bridge.MsgSubmitOracleAttestation.creator": - x.Creator = value.Interface().(string) - case "layer.bridge.MsgSubmitOracleAttestation.query_id": - x.QueryId = value.Bytes() - case "layer.bridge.MsgSubmitOracleAttestation.timestamp": - x.Timestamp = value.Interface().(string) - case "layer.bridge.MsgSubmitOracleAttestation.signature": - x.Signature = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgSubmitOracleAttestation")) - } - panic(fmt.Errorf("message layer.bridge.MsgSubmitOracleAttestation does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitOracleAttestation) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "layer.bridge.MsgSubmitOracleAttestation.creator": - panic(fmt.Errorf("field creator of message layer.bridge.MsgSubmitOracleAttestation is not mutable")) - case "layer.bridge.MsgSubmitOracleAttestation.query_id": - panic(fmt.Errorf("field query_id of message layer.bridge.MsgSubmitOracleAttestation is not mutable")) - case "layer.bridge.MsgSubmitOracleAttestation.timestamp": - panic(fmt.Errorf("field timestamp of message layer.bridge.MsgSubmitOracleAttestation is not mutable")) - case "layer.bridge.MsgSubmitOracleAttestation.signature": - panic(fmt.Errorf("field signature of message layer.bridge.MsgSubmitOracleAttestation is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgSubmitOracleAttestation")) - } - panic(fmt.Errorf("message layer.bridge.MsgSubmitOracleAttestation does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgSubmitOracleAttestation) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "layer.bridge.MsgSubmitOracleAttestation.creator": - return protoreflect.ValueOfString("") - case "layer.bridge.MsgSubmitOracleAttestation.query_id": - return protoreflect.ValueOfBytes(nil) - case "layer.bridge.MsgSubmitOracleAttestation.timestamp": - return protoreflect.ValueOfString("") - case "layer.bridge.MsgSubmitOracleAttestation.signature": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgSubmitOracleAttestation")) - } - panic(fmt.Errorf("message layer.bridge.MsgSubmitOracleAttestation does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgSubmitOracleAttestation) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in layer.bridge.MsgSubmitOracleAttestation", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgSubmitOracleAttestation) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitOracleAttestation) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgSubmitOracleAttestation) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgSubmitOracleAttestation) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgSubmitOracleAttestation) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Creator) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.QueryId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Timestamp) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Signature) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgSubmitOracleAttestation) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Signature) > 0 { - i -= len(x.Signature) - copy(dAtA[i:], x.Signature) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signature))) - i-- - dAtA[i] = 0x22 - } - if len(x.Timestamp) > 0 { - i -= len(x.Timestamp) - copy(dAtA[i:], x.Timestamp) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Timestamp))) - i-- - dAtA[i] = 0x1a - } - if len(x.QueryId) > 0 { - i -= len(x.QueryId) - copy(dAtA[i:], x.QueryId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.QueryId))) - i-- - dAtA[i] = 0x12 - } - if len(x.Creator) > 0 { - i -= len(x.Creator) - copy(dAtA[i:], x.Creator) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgSubmitOracleAttestation) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSubmitOracleAttestation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSubmitOracleAttestation: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field QueryId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.QueryId = append(x.QueryId[:0], dAtA[iNdEx:postIndex]...) - if x.QueryId == nil { - x.QueryId = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Timestamp = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Signature = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgSubmitOracleAttestationResponse protoreflect.MessageDescriptor -) - -func init() { - file_layer_bridge_tx_proto_init() - md_MsgSubmitOracleAttestationResponse = File_layer_bridge_tx_proto.Messages().ByName("MsgSubmitOracleAttestationResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgSubmitOracleAttestationResponse)(nil) - -type fastReflection_MsgSubmitOracleAttestationResponse MsgSubmitOracleAttestationResponse - -func (x *MsgSubmitOracleAttestationResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgSubmitOracleAttestationResponse)(x) -} - -func (x *MsgSubmitOracleAttestationResponse) slowProtoReflect() protoreflect.Message { - mi := &file_layer_bridge_tx_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 _fastReflection_MsgSubmitOracleAttestationResponse_messageType fastReflection_MsgSubmitOracleAttestationResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgSubmitOracleAttestationResponse_messageType{} - -type fastReflection_MsgSubmitOracleAttestationResponse_messageType struct{} - -func (x fastReflection_MsgSubmitOracleAttestationResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgSubmitOracleAttestationResponse)(nil) -} -func (x fastReflection_MsgSubmitOracleAttestationResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgSubmitOracleAttestationResponse) -} -func (x fastReflection_MsgSubmitOracleAttestationResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitOracleAttestationResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgSubmitOracleAttestationResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitOracleAttestationResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgSubmitOracleAttestationResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgSubmitOracleAttestationResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgSubmitOracleAttestationResponse) New() protoreflect.Message { - return new(fastReflection_MsgSubmitOracleAttestationResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgSubmitOracleAttestationResponse) Interface() protoreflect.ProtoMessage { - return (*MsgSubmitOracleAttestationResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgSubmitOracleAttestationResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgSubmitOracleAttestationResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgSubmitOracleAttestationResponse")) - } - panic(fmt.Errorf("message layer.bridge.MsgSubmitOracleAttestationResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitOracleAttestationResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgSubmitOracleAttestationResponse")) - } - panic(fmt.Errorf("message layer.bridge.MsgSubmitOracleAttestationResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgSubmitOracleAttestationResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgSubmitOracleAttestationResponse")) - } - panic(fmt.Errorf("message layer.bridge.MsgSubmitOracleAttestationResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitOracleAttestationResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgSubmitOracleAttestationResponse")) - } - panic(fmt.Errorf("message layer.bridge.MsgSubmitOracleAttestationResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitOracleAttestationResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgSubmitOracleAttestationResponse")) - } - panic(fmt.Errorf("message layer.bridge.MsgSubmitOracleAttestationResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgSubmitOracleAttestationResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.MsgSubmitOracleAttestationResponse")) - } - panic(fmt.Errorf("message layer.bridge.MsgSubmitOracleAttestationResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgSubmitOracleAttestationResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in layer.bridge.MsgSubmitOracleAttestationResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgSubmitOracleAttestationResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitOracleAttestationResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgSubmitOracleAttestationResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgSubmitOracleAttestationResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgSubmitOracleAttestationResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgSubmitOracleAttestationResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgSubmitOracleAttestationResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSubmitOracleAttestationResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSubmitOracleAttestationResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - var ( md_MsgRequestAttestations protoreflect.MessageDescriptor fd_MsgRequestAttestations_creator protoreflect.FieldDescriptor @@ -2751,7 +37,7 @@ func (x *MsgRequestAttestations) ProtoReflect() protoreflect.Message { } func (x *MsgRequestAttestations) slowProtoReflect() protoreflect.Message { - mi := &file_layer_bridge_tx_proto_msgTypes[6] + mi := &file_layer_bridge_tx_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3293,7 +579,7 @@ func (x *MsgRequestAttestationsResponse) ProtoReflect() protoreflect.Message { } func (x *MsgRequestAttestationsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_layer_bridge_tx_proto_msgTypes[7] + mi := &file_layer_bridge_tx_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3644,237 +930,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type MsgRegisterOperatorPubkey struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - OperatorPubkey string `protobuf:"bytes,2,opt,name=operatorPubkey,proto3" json:"operatorPubkey,omitempty"` -} - -func (x *MsgRegisterOperatorPubkey) Reset() { - *x = MsgRegisterOperatorPubkey{} - if protoimpl.UnsafeEnabled { - mi := &file_layer_bridge_tx_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgRegisterOperatorPubkey) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgRegisterOperatorPubkey) ProtoMessage() {} - -// Deprecated: Use MsgRegisterOperatorPubkey.ProtoReflect.Descriptor instead. -func (*MsgRegisterOperatorPubkey) Descriptor() ([]byte, []int) { - return file_layer_bridge_tx_proto_rawDescGZIP(), []int{0} -} - -func (x *MsgRegisterOperatorPubkey) GetCreator() string { - if x != nil { - return x.Creator - } - return "" -} - -func (x *MsgRegisterOperatorPubkey) GetOperatorPubkey() string { - if x != nil { - return x.OperatorPubkey - } - return "" -} - -type MsgRegisterOperatorPubkeyResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgRegisterOperatorPubkeyResponse) Reset() { - *x = MsgRegisterOperatorPubkeyResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_layer_bridge_tx_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgRegisterOperatorPubkeyResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgRegisterOperatorPubkeyResponse) ProtoMessage() {} - -// Deprecated: Use MsgRegisterOperatorPubkeyResponse.ProtoReflect.Descriptor instead. -func (*MsgRegisterOperatorPubkeyResponse) Descriptor() ([]byte, []int) { - return file_layer_bridge_tx_proto_rawDescGZIP(), []int{1} -} - -type MsgSubmitBridgeValsetSignature struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - Timestamp string `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Signature string `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *MsgSubmitBridgeValsetSignature) Reset() { - *x = MsgSubmitBridgeValsetSignature{} - if protoimpl.UnsafeEnabled { - mi := &file_layer_bridge_tx_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgSubmitBridgeValsetSignature) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgSubmitBridgeValsetSignature) ProtoMessage() {} - -// Deprecated: Use MsgSubmitBridgeValsetSignature.ProtoReflect.Descriptor instead. -func (*MsgSubmitBridgeValsetSignature) Descriptor() ([]byte, []int) { - return file_layer_bridge_tx_proto_rawDescGZIP(), []int{2} -} - -func (x *MsgSubmitBridgeValsetSignature) GetCreator() string { - if x != nil { - return x.Creator - } - return "" -} - -func (x *MsgSubmitBridgeValsetSignature) GetTimestamp() string { - if x != nil { - return x.Timestamp - } - return "" -} - -func (x *MsgSubmitBridgeValsetSignature) GetSignature() string { - if x != nil { - return x.Signature - } - return "" -} - -type MsgSubmitBridgeValsetSignatureResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgSubmitBridgeValsetSignatureResponse) Reset() { - *x = MsgSubmitBridgeValsetSignatureResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_layer_bridge_tx_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgSubmitBridgeValsetSignatureResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgSubmitBridgeValsetSignatureResponse) ProtoMessage() {} - -// Deprecated: Use MsgSubmitBridgeValsetSignatureResponse.ProtoReflect.Descriptor instead. -func (*MsgSubmitBridgeValsetSignatureResponse) Descriptor() ([]byte, []int) { - return file_layer_bridge_tx_proto_rawDescGZIP(), []int{3} -} - -type MsgSubmitOracleAttestation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - QueryId []byte `protobuf:"bytes,2,opt,name=query_id,json=queryId,proto3" json:"query_id,omitempty"` - Timestamp string `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Signature string `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *MsgSubmitOracleAttestation) Reset() { - *x = MsgSubmitOracleAttestation{} - if protoimpl.UnsafeEnabled { - mi := &file_layer_bridge_tx_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgSubmitOracleAttestation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgSubmitOracleAttestation) ProtoMessage() {} - -// Deprecated: Use MsgSubmitOracleAttestation.ProtoReflect.Descriptor instead. -func (*MsgSubmitOracleAttestation) Descriptor() ([]byte, []int) { - return file_layer_bridge_tx_proto_rawDescGZIP(), []int{4} -} - -func (x *MsgSubmitOracleAttestation) GetCreator() string { - if x != nil { - return x.Creator - } - return "" -} - -func (x *MsgSubmitOracleAttestation) GetQueryId() []byte { - if x != nil { - return x.QueryId - } - return nil -} - -func (x *MsgSubmitOracleAttestation) GetTimestamp() string { - if x != nil { - return x.Timestamp - } - return "" -} - -func (x *MsgSubmitOracleAttestation) GetSignature() string { - if x != nil { - return x.Signature - } - return "" -} - -type MsgSubmitOracleAttestationResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgSubmitOracleAttestationResponse) Reset() { - *x = MsgSubmitOracleAttestationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_layer_bridge_tx_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgSubmitOracleAttestationResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgSubmitOracleAttestationResponse) ProtoMessage() {} - -// Deprecated: Use MsgSubmitOracleAttestationResponse.ProtoReflect.Descriptor instead. -func (*MsgSubmitOracleAttestationResponse) Descriptor() ([]byte, []int) { - return file_layer_bridge_tx_proto_rawDescGZIP(), []int{5} -} - type MsgRequestAttestations struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -3888,7 +943,7 @@ type MsgRequestAttestations struct { func (x *MsgRequestAttestations) Reset() { *x = MsgRequestAttestations{} if protoimpl.UnsafeEnabled { - mi := &file_layer_bridge_tx_proto_msgTypes[6] + mi := &file_layer_bridge_tx_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3902,7 +957,7 @@ func (*MsgRequestAttestations) ProtoMessage() {} // Deprecated: Use MsgRequestAttestations.ProtoReflect.Descriptor instead. func (*MsgRequestAttestations) Descriptor() ([]byte, []int) { - return file_layer_bridge_tx_proto_rawDescGZIP(), []int{6} + return file_layer_bridge_tx_proto_rawDescGZIP(), []int{0} } func (x *MsgRequestAttestations) GetCreator() string { @@ -3935,7 +990,7 @@ type MsgRequestAttestationsResponse struct { func (x *MsgRequestAttestationsResponse) Reset() { *x = MsgRequestAttestationsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_layer_bridge_tx_proto_msgTypes[7] + mi := &file_layer_bridge_tx_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3949,7 +1004,7 @@ func (*MsgRequestAttestationsResponse) ProtoMessage() {} // Deprecated: Use MsgRequestAttestationsResponse.ProtoReflect.Descriptor instead. func (*MsgRequestAttestationsResponse) Descriptor() ([]byte, []int) { - return file_layer_bridge_tx_proto_rawDescGZIP(), []int{7} + return file_layer_bridge_tx_proto_rawDescGZIP(), []int{1} } var File_layer_bridge_tx_proto protoreflect.FileDescriptor @@ -3958,90 +1013,34 @@ var file_layer_bridge_tx_proto_rawDesc = []byte{ 0x0a, 0x15, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, - 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6b, - 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x70, 0x65, - 0x72, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x26, 0x0a, 0x0e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, - 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, - 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x3a, 0x0c, 0x82, - 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x23, 0x0a, 0x21, 0x4d, - 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, - 0x6f, 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x84, 0x01, 0x0a, 0x1e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x72, - 0x69, 0x64, 0x67, 0x65, 0x56, 0x61, 0x6c, 0x73, 0x65, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1c, 0x0a, - 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x28, 0x0a, 0x26, 0x4d, 0x73, 0x67, 0x53, 0x75, - 0x62, 0x6d, 0x69, 0x74, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x56, 0x61, 0x6c, 0x73, 0x65, 0x74, - 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x9b, 0x01, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4f, - 0x72, 0x61, 0x63, 0x6c, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, - 0x24, 0x0a, 0x22, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x61, 0x63, - 0x6c, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x78, 0x0a, 0x16, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, - 0x20, 0x0a, 0x1e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x74, 0x74, - 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x32, 0xdf, 0x03, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x72, 0x0a, 0x16, 0x52, 0x65, 0x67, - 0x69, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x75, 0x62, - 0x6b, 0x65, 0x79, 0x12, 0x27, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, - 0x67, 0x65, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x70, - 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x1a, 0x2f, 0x2e, 0x6c, - 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x4d, 0x73, 0x67, 0x52, - 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x50, - 0x75, 0x62, 0x6b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x81, 0x01, - 0x0a, 0x1b, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x56, 0x61, - 0x6c, 0x73, 0x65, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x2c, 0x2e, - 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x4d, 0x73, 0x67, - 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x56, 0x61, 0x6c, 0x73, - 0x65, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x34, 0x2e, 0x6c, 0x61, - 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, - 0x62, 0x6d, 0x69, 0x74, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x56, 0x61, 0x6c, 0x73, 0x65, 0x74, - 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x75, 0x0a, 0x17, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, - 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x2e, 0x6c, - 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x4d, 0x73, 0x67, 0x53, - 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x30, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, - 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4f, - 0x72, 0x61, 0x63, 0x6c, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x69, 0x0a, 0x13, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x24, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x4d, - 0x73, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x2c, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, - 0x69, 0x64, 0x67, 0x65, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, - 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x42, 0x99, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6c, 0x61, 0x79, 0x65, - 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x74, 0x65, 0x6c, 0x6c, 0x6f, 0x72, 0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, - 0xa2, 0x02, 0x03, 0x4c, 0x42, 0x58, 0xaa, 0x02, 0x0c, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x42, - 0x72, 0x69, 0x64, 0x67, 0x65, 0xca, 0x02, 0x0c, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x5c, 0x42, 0x72, - 0x69, 0x64, 0x67, 0x65, 0xe2, 0x02, 0x18, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x5c, 0x42, 0x72, 0x69, - 0x64, 0x67, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x0d, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x3a, 0x3a, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x78, + 0x0a, 0x16, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x74, 0x74, 0x65, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, + 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x20, 0x0a, 0x1e, 0x4d, 0x73, 0x67, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x70, 0x0a, 0x03, 0x4d, 0x73, + 0x67, 0x12, 0x69, 0x0a, 0x13, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x74, 0x74, 0x65, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x24, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, + 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x2c, + 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x4d, 0x73, + 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x99, 0x01, 0x0a, + 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, + 0x65, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x65, 0x6c, 0x6c, 0x6f, 0x72, 0x2d, + 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6c, 0x61, 0x79, + 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0xa2, 0x02, 0x03, 0x4c, 0x42, 0x58, 0xaa, + 0x02, 0x0c, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0xca, 0x02, + 0x0c, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x5c, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0xe2, 0x02, 0x18, + 0x4c, 0x61, 0x79, 0x65, 0x72, 0x5c, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x4c, 0x61, 0x79, 0x65, 0x72, + 0x3a, 0x3a, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -4056,28 +1055,16 @@ func file_layer_bridge_tx_proto_rawDescGZIP() []byte { return file_layer_bridge_tx_proto_rawDescData } -var file_layer_bridge_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_layer_bridge_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_layer_bridge_tx_proto_goTypes = []interface{}{ - (*MsgRegisterOperatorPubkey)(nil), // 0: layer.bridge.MsgRegisterOperatorPubkey - (*MsgRegisterOperatorPubkeyResponse)(nil), // 1: layer.bridge.MsgRegisterOperatorPubkeyResponse - (*MsgSubmitBridgeValsetSignature)(nil), // 2: layer.bridge.MsgSubmitBridgeValsetSignature - (*MsgSubmitBridgeValsetSignatureResponse)(nil), // 3: layer.bridge.MsgSubmitBridgeValsetSignatureResponse - (*MsgSubmitOracleAttestation)(nil), // 4: layer.bridge.MsgSubmitOracleAttestation - (*MsgSubmitOracleAttestationResponse)(nil), // 5: layer.bridge.MsgSubmitOracleAttestationResponse - (*MsgRequestAttestations)(nil), // 6: layer.bridge.MsgRequestAttestations - (*MsgRequestAttestationsResponse)(nil), // 7: layer.bridge.MsgRequestAttestationsResponse + (*MsgRequestAttestations)(nil), // 0: layer.bridge.MsgRequestAttestations + (*MsgRequestAttestationsResponse)(nil), // 1: layer.bridge.MsgRequestAttestationsResponse } var file_layer_bridge_tx_proto_depIdxs = []int32{ - 0, // 0: layer.bridge.Msg.RegisterOperatorPubkey:input_type -> layer.bridge.MsgRegisterOperatorPubkey - 2, // 1: layer.bridge.Msg.SubmitBridgeValsetSignature:input_type -> layer.bridge.MsgSubmitBridgeValsetSignature - 4, // 2: layer.bridge.Msg.SubmitOracleAttestation:input_type -> layer.bridge.MsgSubmitOracleAttestation - 6, // 3: layer.bridge.Msg.RequestAttestations:input_type -> layer.bridge.MsgRequestAttestations - 1, // 4: layer.bridge.Msg.RegisterOperatorPubkey:output_type -> layer.bridge.MsgRegisterOperatorPubkeyResponse - 3, // 5: layer.bridge.Msg.SubmitBridgeValsetSignature:output_type -> layer.bridge.MsgSubmitBridgeValsetSignatureResponse - 5, // 6: layer.bridge.Msg.SubmitOracleAttestation:output_type -> layer.bridge.MsgSubmitOracleAttestationResponse - 7, // 7: layer.bridge.Msg.RequestAttestations:output_type -> layer.bridge.MsgRequestAttestationsResponse - 4, // [4:8] is the sub-list for method output_type - 0, // [0:4] is the sub-list for method input_type + 0, // 0: layer.bridge.Msg.RequestAttestations:input_type -> layer.bridge.MsgRequestAttestations + 1, // 1: layer.bridge.Msg.RequestAttestations:output_type -> layer.bridge.MsgRequestAttestationsResponse + 1, // [1:2] is the sub-list for method output_type + 0, // [0:1] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name @@ -4090,78 +1077,6 @@ func file_layer_bridge_tx_proto_init() { } if !protoimpl.UnsafeEnabled { file_layer_bridge_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgRegisterOperatorPubkey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_layer_bridge_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgRegisterOperatorPubkeyResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_layer_bridge_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSubmitBridgeValsetSignature); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_layer_bridge_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSubmitBridgeValsetSignatureResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_layer_bridge_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSubmitOracleAttestation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_layer_bridge_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSubmitOracleAttestationResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_layer_bridge_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgRequestAttestations); i { case 0: return &v.state @@ -4173,7 +1088,7 @@ func file_layer_bridge_tx_proto_init() { return nil } } - file_layer_bridge_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_layer_bridge_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgRequestAttestationsResponse); i { case 0: return &v.state @@ -4192,7 +1107,7 @@ func file_layer_bridge_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_layer_bridge_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 8, + NumMessages: 2, NumExtensions: 0, NumServices: 1, }, diff --git a/api/layer/bridge/tx_grpc.pb.go b/api/layer/bridge/tx_grpc.pb.go index 726d0dc56..785c00d34 100644 --- a/api/layer/bridge/tx_grpc.pb.go +++ b/api/layer/bridge/tx_grpc.pb.go @@ -18,9 +18,6 @@ const _ = grpc.SupportPackageIsVersion7 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type MsgClient interface { - RegisterOperatorPubkey(ctx context.Context, in *MsgRegisterOperatorPubkey, opts ...grpc.CallOption) (*MsgRegisterOperatorPubkeyResponse, error) - SubmitBridgeValsetSignature(ctx context.Context, in *MsgSubmitBridgeValsetSignature, opts ...grpc.CallOption) (*MsgSubmitBridgeValsetSignatureResponse, error) - SubmitOracleAttestation(ctx context.Context, in *MsgSubmitOracleAttestation, opts ...grpc.CallOption) (*MsgSubmitOracleAttestationResponse, error) RequestAttestations(ctx context.Context, in *MsgRequestAttestations, opts ...grpc.CallOption) (*MsgRequestAttestationsResponse, error) } @@ -32,33 +29,6 @@ func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { return &msgClient{cc} } -func (c *msgClient) RegisterOperatorPubkey(ctx context.Context, in *MsgRegisterOperatorPubkey, opts ...grpc.CallOption) (*MsgRegisterOperatorPubkeyResponse, error) { - out := new(MsgRegisterOperatorPubkeyResponse) - err := c.cc.Invoke(ctx, "/layer.bridge.Msg/RegisterOperatorPubkey", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) SubmitBridgeValsetSignature(ctx context.Context, in *MsgSubmitBridgeValsetSignature, opts ...grpc.CallOption) (*MsgSubmitBridgeValsetSignatureResponse, error) { - out := new(MsgSubmitBridgeValsetSignatureResponse) - err := c.cc.Invoke(ctx, "/layer.bridge.Msg/SubmitBridgeValsetSignature", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) SubmitOracleAttestation(ctx context.Context, in *MsgSubmitOracleAttestation, opts ...grpc.CallOption) (*MsgSubmitOracleAttestationResponse, error) { - out := new(MsgSubmitOracleAttestationResponse) - err := c.cc.Invoke(ctx, "/layer.bridge.Msg/SubmitOracleAttestation", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *msgClient) RequestAttestations(ctx context.Context, in *MsgRequestAttestations, opts ...grpc.CallOption) (*MsgRequestAttestationsResponse, error) { out := new(MsgRequestAttestationsResponse) err := c.cc.Invoke(ctx, "/layer.bridge.Msg/RequestAttestations", in, out, opts...) @@ -72,9 +42,6 @@ func (c *msgClient) RequestAttestations(ctx context.Context, in *MsgRequestAttes // All implementations must embed UnimplementedMsgServer // for forward compatibility type MsgServer interface { - RegisterOperatorPubkey(context.Context, *MsgRegisterOperatorPubkey) (*MsgRegisterOperatorPubkeyResponse, error) - SubmitBridgeValsetSignature(context.Context, *MsgSubmitBridgeValsetSignature) (*MsgSubmitBridgeValsetSignatureResponse, error) - SubmitOracleAttestation(context.Context, *MsgSubmitOracleAttestation) (*MsgSubmitOracleAttestationResponse, error) RequestAttestations(context.Context, *MsgRequestAttestations) (*MsgRequestAttestationsResponse, error) mustEmbedUnimplementedMsgServer() } @@ -83,15 +50,6 @@ type MsgServer interface { type UnimplementedMsgServer struct { } -func (UnimplementedMsgServer) RegisterOperatorPubkey(context.Context, *MsgRegisterOperatorPubkey) (*MsgRegisterOperatorPubkeyResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RegisterOperatorPubkey not implemented") -} -func (UnimplementedMsgServer) SubmitBridgeValsetSignature(context.Context, *MsgSubmitBridgeValsetSignature) (*MsgSubmitBridgeValsetSignatureResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SubmitBridgeValsetSignature not implemented") -} -func (UnimplementedMsgServer) SubmitOracleAttestation(context.Context, *MsgSubmitOracleAttestation) (*MsgSubmitOracleAttestationResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SubmitOracleAttestation not implemented") -} func (UnimplementedMsgServer) RequestAttestations(context.Context, *MsgRequestAttestations) (*MsgRequestAttestationsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RequestAttestations not implemented") } @@ -108,60 +66,6 @@ func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { s.RegisterService(&Msg_ServiceDesc, srv) } -func _Msg_RegisterOperatorPubkey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgRegisterOperatorPubkey) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).RegisterOperatorPubkey(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/layer.bridge.Msg/RegisterOperatorPubkey", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).RegisterOperatorPubkey(ctx, req.(*MsgRegisterOperatorPubkey)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_SubmitBridgeValsetSignature_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgSubmitBridgeValsetSignature) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).SubmitBridgeValsetSignature(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/layer.bridge.Msg/SubmitBridgeValsetSignature", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SubmitBridgeValsetSignature(ctx, req.(*MsgSubmitBridgeValsetSignature)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_SubmitOracleAttestation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgSubmitOracleAttestation) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).SubmitOracleAttestation(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/layer.bridge.Msg/SubmitOracleAttestation", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SubmitOracleAttestation(ctx, req.(*MsgSubmitOracleAttestation)) - } - return interceptor(ctx, in, info, handler) -} - func _Msg_RequestAttestations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgRequestAttestations) if err := dec(in); err != nil { @@ -187,18 +91,6 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ ServiceName: "layer.bridge.Msg", HandlerType: (*MsgServer)(nil), Methods: []grpc.MethodDesc{ - { - MethodName: "RegisterOperatorPubkey", - Handler: _Msg_RegisterOperatorPubkey_Handler, - }, - { - MethodName: "SubmitBridgeValsetSignature", - Handler: _Msg_SubmitBridgeValsetSignature_Handler, - }, - { - MethodName: "SubmitOracleAttestation", - Handler: _Msg_SubmitOracleAttestation_Handler, - }, { MethodName: "RequestAttestations", Handler: _Msg_RequestAttestations_Handler, diff --git a/app/extend_vote.go b/app/extend_vote.go index 9c1c8063e..031ee1178 100644 --- a/app/extend_vote.go +++ b/app/extend_vote.go @@ -38,7 +38,6 @@ type BridgeKeeper interface { GetValidatorCheckpointFromStorage(ctx context.Context) (*bridgetypes.ValidatorCheckpoint, error) Logger(ctx context.Context) log.Logger GetEVMAddressByOperator(ctx sdk.Context, operatorAddress string) (string, error) - EVMAddressFromSignature(ctx sdk.Context, sigHexString string) (string, error) EVMAddressFromSignatures(ctx sdk.Context, sigA []byte, sigB []byte) (common.Address, error) SetEVMAddressByOperator(ctx sdk.Context, operatorAddr string, evmAddr string) error GetValidatorSetSignaturesFromStorage(ctx context.Context, timestamp uint64) (*bridgetypes.BridgeValsetSignatures, error) @@ -49,7 +48,7 @@ type BridgeKeeper interface { GetValidatorCheckpointParamsFromStorage(ctx context.Context, timestamp uint64) (*bridgetypes.ValidatorCheckpointParams, error) GetValidatorDidSignCheckpoint(ctx context.Context, operatorAddr string, checkpointTimestamp uint64) (didSign bool, prevValsetIndex int64, err error) GetAttestationRequestsByHeight(ctx sdk.Context, height uint64) (*bridgetypes.AttestationRequests, error) - SetOracleAttestation2(ctx sdk.Context, operatorAddress string, snapshot []byte, sig []byte) error + SetOracleAttestation(ctx sdk.Context, operatorAddress string, snapshot []byte, sig []byte) error } type StakingKeeper interface { diff --git a/app/proposal_handler.go b/app/proposal_handler.go index 05289fabe..9715721dc 100644 --- a/app/proposal_handler.go +++ b/app/proposal_handler.go @@ -174,7 +174,7 @@ func (h *ProposalHandler) PreBlocker(ctx sdk.Context, req *abci.RequestFinalizeB for i, operatorAddress := range injectedVoteExtTx.OracleAttestations.OperatorAddresses { snapshot := injectedVoteExtTx.OracleAttestations.Snapshots[i] attestation := injectedVoteExtTx.OracleAttestations.Attestations[i] - err := h.bridgeKeeper.SetOracleAttestation2(ctx, operatorAddress, snapshot, attestation) + err := h.bridgeKeeper.SetOracleAttestation(ctx, operatorAddress, snapshot, attestation) if err != nil { return nil, err } @@ -201,8 +201,6 @@ func (h *ProposalHandler) CheckInitialSignaturesFromLastCommit(ctx sdk.Context, // check for initial sig if len(voteExt.InitialSignature.SignatureA) > 0 { // verify initial sig - // sigHexString := hex.EncodeToString(voteExt.InitialSignature.SignatureA) - // evmAddress, err := h.bridgeKeeper.EVMAddressFromSignature(ctx, sigHexString) evmAddress, err := h.bridgeKeeper.EVMAddressFromSignatures(ctx, voteExt.InitialSignature.SignatureA, voteExt.InitialSignature.SignatureB) if err != nil { h.logger.Error("failed to get evm address from initial sig", "error", err) diff --git a/proto/layer/bridge/query.proto b/proto/layer/bridge/query.proto index ce90d3035..496d1c736 100644 --- a/proto/layer/bridge/query.proto +++ b/proto/layer/bridge/query.proto @@ -40,10 +40,6 @@ service Query { option (google.api.http).get = "/layer/bridge/get_valset_sigs/{timestamp}"; } - rpc GetOracleAttestations (QueryGetOracleAttestationsRequest) returns (QueryGetOracleAttestationsResponse) { - option (google.api.http).get = "/layer/bridge/get_oracle_attestations/{query_id}/{timestamp}"; - } - rpc GetEvmAddressByValidatorAddress (QueryGetEvmAddressByValidatorAddressRequest) returns (QueryGetEvmAddressByValidatorAddressResponse) { option (google.api.http).get = "/layer/bridge/get_evm_address_by_validator_address/{validatorAddress}"; } @@ -148,15 +144,6 @@ message QueryGetValsetSigsResponse { repeated string signatures = 1; } -message QueryGetOracleAttestationsRequest { - bytes query_id = 1; - int64 timestamp = 2; -} - -message QueryGetOracleAttestationsResponse { - repeated string attestations = 1; -} - message QueryGetEvmAddressByValidatorAddressRequest { string validatorAddress = 1; } diff --git a/proto/layer/bridge/tx.proto b/proto/layer/bridge/tx.proto index d980799f6..9ea671e51 100644 --- a/proto/layer/bridge/tx.proto +++ b/proto/layer/bridge/tx.proto @@ -6,42 +6,9 @@ option go_package = "github.com/tellor-io/layer/x/bridge/types"; // Msg defines the Msg service. service Msg { - rpc RegisterOperatorPubkey (MsgRegisterOperatorPubkey) returns (MsgRegisterOperatorPubkeyResponse); - rpc SubmitBridgeValsetSignature (MsgSubmitBridgeValsetSignature) returns (MsgSubmitBridgeValsetSignatureResponse); - rpc SubmitOracleAttestation (MsgSubmitOracleAttestation) returns (MsgSubmitOracleAttestationResponse); rpc RequestAttestations (MsgRequestAttestations) returns (MsgRequestAttestationsResponse); } -message MsgRegisterOperatorPubkey { - option (cosmos.msg.v1.signer) = "creator"; - - string creator = 1; - string operatorPubkey = 2; -} - -message MsgRegisterOperatorPubkeyResponse {} - -message MsgSubmitBridgeValsetSignature { - option (cosmos.msg.v1.signer) = "creator"; - - string creator = 1; - string timestamp = 2; - string signature = 3; -} - -message MsgSubmitBridgeValsetSignatureResponse {} - -message MsgSubmitOracleAttestation { - option (cosmos.msg.v1.signer) = "creator"; - - string creator = 1; - bytes query_id = 2; - string timestamp = 3; - string signature = 4; -} - -message MsgSubmitOracleAttestationResponse {} - message MsgRequestAttestations { option (cosmos.msg.v1.signer) = "creator"; diff --git a/x/bridge/client/cli/query.go b/x/bridge/client/cli/query.go index 34240d37d..63dd0a33d 100644 --- a/x/bridge/client/cli/query.go +++ b/x/bridge/client/cli/query.go @@ -27,7 +27,6 @@ func GetQueryCmd(queryRoute string) *cobra.Command { cmd.AddCommand(CmdGetValidatorCheckpointParams()) cmd.AddCommand(CmdGetValidatorTimestampByIndex()) cmd.AddCommand(CmdGetValsetSigs()) - cmd.AddCommand(CmdGetOracleAttestations()) cmd.AddCommand(CmdGetEvmAddressByValidatorAddress()) cmd.AddCommand(CmdGetValsetByTimestamp()) cmd.AddCommand(CmdGetCurrentAggregateReport()) diff --git a/x/bridge/client/cli/query_get_oracle_attestations.go b/x/bridge/client/cli/query_get_oracle_attestations.go deleted file mode 100644 index 2ee365584..000000000 --- a/x/bridge/client/cli/query_get_oracle_attestations.go +++ /dev/null @@ -1,55 +0,0 @@ -package cli - -import ( - "strconv" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/spf13/cobra" - "github.com/tellor-io/layer/utils" - "github.com/tellor-io/layer/x/bridge/types" -) - -var _ = strconv.Itoa(0) - -func CmdGetOracleAttestations() *cobra.Command { - cmd := &cobra.Command{ - Use: "get-oracle-attestations [queryId] [timestamp]", - Short: "Query get-oracle-attestations", - Args: cobra.ExactArgs(2), - RunE: func(cmd *cobra.Command, args []string) (err error) { - - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - queryId := args[0] - - timestamp, err := strconv.ParseInt(args[1], 10, 64) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - - qIdBz, err := utils.QueryBytesFromString(queryId) - if err != nil { - return err - } - - params := &types.QueryGetOracleAttestationsRequest{QueryId: qIdBz, Timestamp: timestamp} - - res, err := queryClient.GetOracleAttestations(cmd.Context(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} diff --git a/x/bridge/client/cli/tx.go b/x/bridge/client/cli/tx.go index 3910c1978..584f6aa6c 100644 --- a/x/bridge/client/cli/tx.go +++ b/x/bridge/client/cli/tx.go @@ -31,9 +31,6 @@ func GetTxCmd() *cobra.Command { } // this line is used by starport scaffolding # 1 - cmd.AddCommand(CmdRegisterOperatorPubkey()) - cmd.AddCommand(CmdSubmitBridgeValsetSignature()) - cmd.AddCommand(CmdSubmitOracleAttestation()) cmd.AddCommand(CmdRequestAttestations()) return cmd } diff --git a/x/bridge/client/cli/tx_register_operator_pubkey.go b/x/bridge/client/cli/tx_register_operator_pubkey.go deleted file mode 100644 index 12ec5f96a..000000000 --- a/x/bridge/client/cli/tx_register_operator_pubkey.go +++ /dev/null @@ -1,40 +0,0 @@ -package cli - -import ( - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/client/tx" - "github.com/spf13/cobra" - "github.com/tellor-io/layer/x/bridge/types" -) - -// CmdRegisterOperatorPubkey creates a CLI command for MsgRegisterOperatorPubkey. -func CmdRegisterOperatorPubkey() *cobra.Command { - cmd := &cobra.Command{ - Use: "register-operator-pubkey [pubkey]", - Short: "Register a new operator public key", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - pubkey := args[0] - - msg := types.NewMsgRegisterOperatorPubkey( - clientCtx.GetFromAddress().String(), - pubkey, - ) - if err := msg.ValidateBasic(); err != nil { - return err - } - - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) - }, - } - - flags.AddTxFlagsToCmd(cmd) - - return cmd -} diff --git a/x/bridge/client/cli/tx_submit_bridge_valset_signature.go b/x/bridge/client/cli/tx_submit_bridge_valset_signature.go deleted file mode 100644 index 0cc5363ff..000000000 --- a/x/bridge/client/cli/tx_submit_bridge_valset_signature.go +++ /dev/null @@ -1,42 +0,0 @@ -package cli - -import ( - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/client/tx" - "github.com/spf13/cobra" - "github.com/tellor-io/layer/x/bridge/types" -) - -// CmdSubmitBridgeValsetSignature creates a CLI command for MsgSubmitBridgeValsetSignature. -func CmdSubmitBridgeValsetSignature() *cobra.Command { - cmd := &cobra.Command{ - Use: "submit-bridge-valset-signature [timestamp] [signature]", - Short: "Submit a new bridge valset signature", - Args: cobra.ExactArgs(2), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - timestamp := args[0] - signature := args[1] - - msg := types.NewMsgSubmitBridgeValsetSignature( - clientCtx.GetFromAddress().String(), - timestamp, - signature, - ) - if err := msg.ValidateBasic(); err != nil { - return err - } - - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) - }, - } - - flags.AddTxFlagsToCmd(cmd) - - return cmd -} diff --git a/x/bridge/client/cli/tx_submit_oracle_attestation.go b/x/bridge/client/cli/tx_submit_oracle_attestation.go deleted file mode 100644 index 0ba12a711..000000000 --- a/x/bridge/client/cli/tx_submit_oracle_attestation.go +++ /dev/null @@ -1,44 +0,0 @@ -package cli - -import ( - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/client/tx" - "github.com/spf13/cobra" - "github.com/tellor-io/layer/x/bridge/types" -) - -// CmdSubmitOracleAttestation creates a CLI command for MsgSubmitOracleAttestation. -func CmdSubmitOracleAttestation() *cobra.Command { - cmd := &cobra.Command{ - Use: "submit-oracle-attestation [queryId] [timestamp] [signature]", - Short: "Submit a new oracle attestation", - Args: cobra.ExactArgs(3), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - queryId := args[0] - timestamp := args[1] - signature := args[2] - - msg := types.NewMsgSubmitOracleAttestation( - clientCtx.GetFromAddress().String(), - queryId, - timestamp, - signature, - ) - if err := msg.ValidateBasic(); err != nil { - return err - } - - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) - }, - } - - flags.AddTxFlagsToCmd(cmd) - - return cmd -} diff --git a/x/bridge/keeper/keeper.go b/x/bridge/keeper/keeper.go index 97d358fb1..0146ff209 100644 --- a/x/bridge/keeper/keeper.go +++ b/x/bridge/keeper/keeper.go @@ -42,7 +42,6 @@ type ( ValidatorCheckpointParamsMap collections.Map[uint64, types.ValidatorCheckpointParams] ValidatorCheckpointIdxMap collections.Map[uint64, types.CheckpointTimestamp] LatestCheckpointIdx collections.Item[types.CheckpointIdx] - OracleAttestationsMap collections.Map[[]byte, types.OracleAttestations] BridgeValsetByTimestampMap collections.Map[uint64, types.BridgeValidatorSet] ValsetTimestampToIdxMap collections.Map[uint64, types.CheckpointIdx] AttestSnapshotsByReportMap collections.Map[string, types.AttestationSnapshots] @@ -75,7 +74,6 @@ func NewKeeper( ValidatorCheckpointParamsMap: collections.NewMap(sb, types.ValidatorCheckpointParamsMapKey, "validator_checkpoint_params_map", collections.Uint64Key, codec.CollValue[types.ValidatorCheckpointParams](cdc)), ValidatorCheckpointIdxMap: collections.NewMap(sb, types.ValidatorCheckpointIdxMapKey, "validator_checkpoint_idx_map", collections.Uint64Key, codec.CollValue[types.CheckpointTimestamp](cdc)), LatestCheckpointIdx: collections.NewItem(sb, types.LatestCheckpointIdxKey, "latest_checkpoint_idx", codec.CollValue[types.CheckpointIdx](cdc)), - OracleAttestationsMap: collections.NewMap(sb, types.OracleAttestationsMapKey, "oracle_attestations_map", collections.BytesKey, codec.CollValue[types.OracleAttestations](cdc)), BridgeValsetByTimestampMap: collections.NewMap(sb, types.BridgeValsetByTimestampMapKey, "bridge_valset_by_timestamp_map", collections.Uint64Key, codec.CollValue[types.BridgeValidatorSet](cdc)), ValsetTimestampToIdxMap: collections.NewMap(sb, types.ValsetTimestampToIdxMapKey, "valset_timestamp_to_idx_map", collections.Uint64Key, codec.CollValue[types.CheckpointIdx](cdc)), AttestSnapshotsByReportMap: collections.NewMap(sb, types.AttestSnapshotsByReportMapKey, "attest_snapshots_by_report_map", collections.StringKey, codec.CollValue[types.AttestationSnapshots](cdc)), @@ -400,18 +398,6 @@ func (k Keeper) GetValidatorSetSignaturesFromStorage(ctx context.Context, timest return &valsetSigs, nil } -func (k Keeper) GetOracleAttestationsFromStorage(ctx context.Context, queryId []byte, timestamp uint64) (*types.OracleAttestations, error) { - var timestampBz []byte - binary.LittleEndian.PutUint64(timestampBz, timestamp) - key := crypto.Keccak256(append(queryId, timestampBz...)) - oracleAttestations, err := k.OracleAttestationsMap.Get(ctx, key) - if err != nil { - k.Logger(ctx).Error("Failed to get oracle attestations", "error", err) - return nil, err - } - return &oracleAttestations, nil -} - func (k Keeper) EncodeAndHashValidatorSet(ctx context.Context, validatorSet *types.BridgeValidatorSet) (encodedBridgeValidatorSet []byte, bridgeValidatorSetHash []byte, err error) { // Define Go equivalent of the Solidity Validator struct type Validator struct { @@ -494,44 +480,7 @@ func (k Keeper) PowerDiff(ctx context.Context, b types.BridgeValidatorSet, c typ return gomath.Abs(delta / float64(gomath.MaxUint32)) } -func (k Keeper) EVMAddressFromSignature(ctx sdk.Context, sigHexString string) (string, error) { - message := "TellorLayer: Initial bridge signature A" - // convert message to bytes - msgBytes := []byte(message) - // hash message - msgHashBytes32 := sha256.Sum256(msgBytes) - // convert [32]byte to []byte - msgHashBytes := msgHashBytes32[:] - - // hash the hash, since the keyring signer automatically hashes the message - msgDoubleHashBytes32 := sha256.Sum256(msgHashBytes) - msgDoubleHashBytes := msgDoubleHashBytes32[:] - - // Convert the hex signature to bytes - signatureBytes, err := hex.DecodeString(sigHexString) - if err != nil { - k.Logger(ctx).Warn("Error decoding signature hex", "error", err) - return "", err - } - // append 01 - - // Recover the public key - sigPublicKey, err := crypto.SigToPub(msgDoubleHashBytes, signatureBytes) - if err != nil { - k.Logger(ctx).Warn("Error recovering public key from signature", "error", err) - return "", err - } - - // Get the address - recoveredAddr := crypto.PubkeyToAddress(*sigPublicKey) - - return recoveredAddr.Hex(), nil -} - func (k Keeper) EVMAddressFromSignatures(ctx sdk.Context, sigA []byte, sigB []byte) (common.Address, error) { - k.Logger(ctx).Info("@EVMAddressFromSignatures") - k.Logger(ctx).Info("sigA", "sigA", hex.EncodeToString(sigA)) - k.Logger(ctx).Info("sigB", "sigB", hex.EncodeToString(sigB)) msgA := "TellorLayer: Initial bridge signature A" msgB := "TellorLayer: Initial bridge signature B" @@ -553,75 +502,21 @@ func (k Keeper) EVMAddressFromSignatures(ctx sdk.Context, sigA []byte, sigB []by msgDoubleHashBytes32B := sha256.Sum256(msgHashBytesB) msgDoubleHashBytesB := msgDoubleHashBytes32B[:] - // append recovery id's to signatures - sigA00 := append(sigA, 0x00) - k.Logger(ctx).Info("sigA00", "sigA00", hex.EncodeToString(sigA00)) - sigA01 := append(sigA, 0x01) - k.Logger(ctx).Info("sigA01", "sigA01", hex.EncodeToString(sigA01)) - sigB00 := append(sigB, 0x00) - k.Logger(ctx).Info("sigB00", "sigB00", hex.EncodeToString(sigB00)) - sigB01 := append(sigB, 0x01) - k.Logger(ctx).Info("sigB01", "sigB01", hex.EncodeToString(sigB01)) - - // recover evm addresses from signatures - recoveredAddrA00, err := k.recoverEvmAddressFromSig(ctx, sigA00, msgDoubleHashBytesA) - if err != nil { - k.Logger(ctx).Warn("Error recovering EVM address from signature A00", "error", err) - return common.Address{}, err - } - recoveredAddrA01, err := k.recoverEvmAddressFromSig(ctx, sigA01, msgDoubleHashBytesA) - if err != nil { - k.Logger(ctx).Warn("Error recovering EVM address from signature A01", "error", err) - return common.Address{}, err - } - recoveredAddrB00, err := k.recoverEvmAddressFromSig(ctx, sigB00, msgDoubleHashBytesB) - if err != nil { - k.Logger(ctx).Warn("Error recovering EVM address from signature B00", "error", err) - return common.Address{}, err - } - recoveredAddrB01, err := k.recoverEvmAddressFromSig(ctx, sigB01, msgDoubleHashBytesB) - if err != nil { - k.Logger(ctx).Warn("Error recovering EVM address from signature B01", "error", err) - return common.Address{}, err - } - - // log everything. delete later - k.Logger(ctx).Info("Recovered EVM addresses", "A00", recoveredAddrA00.Hex(), "A01", recoveredAddrA01.Hex(), "B00", recoveredAddrB00.Hex(), "B01", recoveredAddrB01.Hex()) - k.Logger(ctx).Info("signatures", "A00", hex.EncodeToString(sigA00), "A01", hex.EncodeToString(sigA01), "B00", hex.EncodeToString(sigB00), "B01", hex.EncodeToString(sigB01)) - k.Logger(ctx).Info("original sigs", "A", hex.EncodeToString(sigA), "B", hex.EncodeToString(sigB)) - - addressesA, err := k.tryRecoverAddressWithBothIDs(ctx, sigA, msgDoubleHashBytesA) + addressesA, err := k.tryRecoverAddressWithBothIDs(sigA, msgDoubleHashBytesA) if err != nil { k.Logger(ctx).Warn("Error trying to recover address with both IDs", "error", err) return common.Address{}, err } - addressesB, err := k.tryRecoverAddressWithBothIDs(ctx, sigB, msgDoubleHashBytesB) + addressesB, err := k.tryRecoverAddressWithBothIDs(sigB, msgDoubleHashBytesB) if err != nil { k.Logger(ctx).Warn("Error trying to recover address with both IDs", "error", err) return common.Address{}, err } - // // log addresses. delete later - // k.Logger(ctx).Info("Addresses from both IDs", "A00", addressesA[0].Hex(), "A01", addressesA[1].Hex(), "B00", addressesB[0].Hex(), "B01", addressesB[1].Hex()) - - // // check if addresses match - // if bytes.Equal(recoveredAddrA00.Bytes(), recoveredAddrB00.Bytes()) || bytes.Equal(recoveredAddrA00.Bytes(), recoveredAddrB01.Bytes()) { - // k.Logger(ctx).Info("EVM addresses match", "address", recoveredAddrA00.Hex()) - // return recoveredAddrA00, nil - // } else if bytes.Equal(recoveredAddrA01.Bytes(), recoveredAddrB00.Bytes()) || bytes.Equal(recoveredAddrA01.Bytes(), recoveredAddrB01.Bytes()) { - // k.Logger(ctx).Info("EVM addresses match", "address", recoveredAddrA01.Hex()) - // return recoveredAddrA01, nil - // } else { - // k.Logger(ctx).Warn("EVM addresses do not match") - // return common.Address{}, fmt.Errorf("EVM addresses do not match") - // } - // check if addresses match if bytes.Equal(addressesA[0].Bytes(), addressesB[0].Bytes()) || bytes.Equal(addressesA[0].Bytes(), addressesB[1].Bytes()) { - k.Logger(ctx).Info("EVM addresses match", "address", addressesA[0].Hex()) return addressesA[0], nil } else if bytes.Equal(addressesA[1].Bytes(), addressesB[0].Bytes()) || bytes.Equal(addressesA[1].Bytes(), addressesB[1].Bytes()) { - k.Logger(ctx).Info("EVM addresses match", "address", addressesA[1].Hex()) return addressesA[1], nil } else { k.Logger(ctx).Warn("EVM addresses do not match") @@ -629,29 +524,10 @@ func (k Keeper) EVMAddressFromSignatures(ctx sdk.Context, sigA []byte, sigB []by } } -func (k Keeper) recoverEvmAddressFromSig(ctx context.Context, sig []byte, msg []byte) (common.Address, error) { - k.Logger(ctx).Info("@recoverEvmAddressFromSig") - // recover pubkey - pubKey, err := crypto.SigToPub(msg, sig) - if err != nil { - return common.Address{}, err - } - - // get address from pubkey - recoveredAddr := crypto.PubkeyToAddress(*pubKey) - k.Logger(ctx).Info("sig", "sig", hex.EncodeToString(sig)) - k.Logger(ctx).Info("msg", "msg", hex.EncodeToString(msg)) - k.Logger(ctx).Info("Recovered EVM address", "address", recoveredAddr.Hex()) - - return recoveredAddr, nil -} - -func (k Keeper) tryRecoverAddressWithBothIDs(ctx sdk.Context, sig []byte, msgHash []byte) ([]common.Address, error) { - k.Logger(ctx).Info("@tryRecoverAddressWithBothIDs") +func (k Keeper) tryRecoverAddressWithBothIDs(sig []byte, msgHash []byte) ([]common.Address, error) { var addrs []common.Address for _, id := range []byte{0, 1} { sigWithID := append(sig[:64], id) - k.Logger(ctx).Info("sigWithID", "sigWithID", hex.EncodeToString(sigWithID)) pubKey, err := crypto.SigToPub(msgHash, sigWithID) if err != nil { return []common.Address{}, err @@ -732,74 +608,7 @@ func (k Keeper) SetBridgeValsetSignature(ctx context.Context, operatorAddress st return nil } -func (k Keeper) SetOracleAttestation(ctx context.Context, operatorAddress string, queryId []byte, timestamp uint64, signature string) error { - // get the key by taking keccak256 hash of queryid and timestamp - var timestampBz []byte - binary.LittleEndian.PutUint64(timestampBz, timestamp) - key := crypto.Keccak256(append(queryId, timestampBz...)) - - // check if map for this key exists, otherwise create a new map - exists, err := k.OracleAttestationsMap.Has(ctx, key) - if err != nil { - k.Logger(ctx).Info("Error checking if oracle attestation map exists", "error", err) - return err - } - if !exists { - lastSavedBridgeValidators, err := k.BridgeValset.Get(ctx) - if err != nil { - k.Logger(ctx).Info("Error getting last saved bridge validators", "error", err) - return err - } - // create a new map - oracleAttestations := types.NewOracleAttestations(len(lastSavedBridgeValidators.BridgeValidatorSet)) - // set the map - err = k.OracleAttestationsMap.Set(ctx, key, *oracleAttestations) - if err != nil { - k.Logger(ctx).Info("Error setting oracle attestation map", "error", err) - return err - } - } - // get the map - oracleAttestations, err := k.OracleAttestationsMap.Get(ctx, key) - if err != nil { - k.Logger(ctx).Info("Error getting oracle attestation map", "error", err) - return err - } - // get the evm address associated with the operator address - ethAddress, err := k.OperatorToEVMAddressMap.Get(ctx, operatorAddress) - if err != nil { - k.Logger(ctx).Info("Error getting EVM address from operator address", "error", err) - return err - } - // decode the signature hex - signatureBytes, err := hex.DecodeString(signature) - if err != nil { - k.Logger(ctx).Info("Error decoding signature hex", "error", err) - return err - } - // get the last saved bridge validator set - lastSavedBridgeValidators, err := k.BridgeValset.Get(ctx) - if err != nil { - k.Logger(ctx).Info("Error getting last saved bridge validators", "error", err) - return err - } - // set the signature in the oracle attestation map by finding the index of the operator address - ethAddressHex := hex.EncodeToString(ethAddress.EVMAddress) - for i, val := range lastSavedBridgeValidators.BridgeValidatorSet { - if val.EthereumAddress == ethAddressHex { - oracleAttestations.SetAttestation(i, signatureBytes) - } - } - // set the valset signatures array by timestamp - err = k.OracleAttestationsMap.Set(ctx, key, oracleAttestations) - if err != nil { - k.Logger(ctx).Info("Error setting oracle attestation", "error", err) - return err - } - return nil -} - -func (k Keeper) SetOracleAttestation2(ctx sdk.Context, operatorAddress string, snapshot []byte, sig []byte) error { +func (k Keeper) SetOracleAttestation(ctx sdk.Context, operatorAddress string, snapshot []byte, sig []byte) error { // get the evm address associated with the operator address ethAddress, err := k.OperatorToEVMAddressMap.Get(ctx, operatorAddress) if err != nil { @@ -838,8 +647,6 @@ func (k Keeper) GetEVMAddressByOperator(ctx sdk.Context, operatorAddress string) if err != nil { k.Logger(ctx).Info("Error getting EVM address from operator address", "error", err) return "", err - } else { - k.Logger(ctx).Info("EVM address from operator address", "evmAddress", hex.EncodeToString(ethAddress.EVMAddress)) } return hex.EncodeToString(ethAddress.EVMAddress), nil } diff --git a/x/bridge/keeper/msg_server_register_operator_pubkey.go b/x/bridge/keeper/msg_server_register_operator_pubkey.go deleted file mode 100644 index 17494f082..000000000 --- a/x/bridge/keeper/msg_server_register_operator_pubkey.go +++ /dev/null @@ -1,69 +0,0 @@ -package keeper - -import ( - "context" - - math "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/bech32" - "github.com/tellor-io/layer/x/bridge/types" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" -) - -func (k msgServer) RegisterOperatorPubkey(ctx context.Context, msg *types.MsgRegisterOperatorPubkey) (*types.MsgRegisterOperatorPubkeyResponse, error) { - sdkCtx := sdk.UnwrapSDKContext(ctx) - - operatorAddr2, err := convertPrefix(msg.Creator, "tellorvaloper") - if err != nil { - k.Keeper.Logger(sdkCtx).Error("failed to convert operator address prefix", "error", err) - return nil, status.Error(codes.InvalidArgument, err.Error()) - } - - operatorValAddr, err := sdk.ValAddressFromBech32(operatorAddr2) - if err != nil { - k.Keeper.Logger(sdkCtx).Error("failed to get operator address", "error", err) - return nil, status.Error(codes.InvalidArgument, err.Error()) - } - - // Check if the creator is a staked validator - validator, err := k.Keeper.stakingKeeper.GetValidator(sdkCtx, operatorValAddr) - if err != nil { - k.Keeper.Logger(sdkCtx).Error("failed to get validator", "error", err) - return nil, status.Error(codes.PermissionDenied, "this validator not found") - } - consensusPower := uint64(validator.GetConsensusPower(math.NewInt(10))) - if consensusPower == 0 { - k.Keeper.Logger(sdkCtx).Error("validator is not staked", "error", err) - return nil, status.Error(codes.PermissionDenied, "this validator is not staked") - } - - // get eth address - ethAddress, err := k.Keeper.EVMAddressFromSignature(sdkCtx, msg.OperatorPubkey) - if err != nil { - k.Logger(sdkCtx).Error("failed to get eth address from operator pubkey", "error", err) - return nil, status.Error(codes.Internal, err.Error()) - } - k.Keeper.Logger(sdkCtx).Info("eth address", "address", ethAddress) - - error := k.Keeper.SetEVMAddressByOperator(sdkCtx, operatorAddr2, ethAddress) - if error != nil { - k.Keeper.Logger(sdkCtx).Error("failed to set eth address by operator", "error", error) - return nil, status.Error(codes.Internal, error.Error()) - } - - return &types.MsgRegisterOperatorPubkeyResponse{}, nil -} - -// convertPrefix converts the prefix of a bech32 encoded address -func convertPrefix(address, newPrefix string) (string, error) { - _, bz, err := bech32.DecodeAndConvert(address) - if err != nil { - return "", err - } - newAddr, err := bech32.ConvertAndEncode(newPrefix, bz) - if err != nil { - return "", err - } - return newAddr, nil -} diff --git a/x/bridge/keeper/msg_server_submit_bridge_valset_signature.go b/x/bridge/keeper/msg_server_submit_bridge_valset_signature.go deleted file mode 100644 index 43982d14c..000000000 --- a/x/bridge/keeper/msg_server_submit_bridge_valset_signature.go +++ /dev/null @@ -1,30 +0,0 @@ -package keeper - -import ( - "context" - "strconv" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/tellor-io/layer/x/bridge/types" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" -) - -func (k msgServer) SubmitBridgeValsetSignature(ctx context.Context, msg *types.MsgSubmitBridgeValsetSignature) (*types.MsgSubmitBridgeValsetSignatureResponse, error) { - sdkCtx := sdk.UnwrapSDKContext(ctx) - - operatorAddr, err := convertPrefix(msg.Creator, "tellorvaloper") - if err != nil { - k.Keeper.Logger(sdkCtx).Error("failed to convert operator address prefix", "error", err) - return nil, status.Error(codes.InvalidArgument, err.Error()) - } - - timestampUint64, err := strconv.ParseUint(msg.Timestamp, 10, 64) - if err != nil { - k.Keeper.Logger(sdkCtx).Error("failed to parse timestamp", "error", err) - return nil, status.Error(codes.InvalidArgument, err.Error()) - } - k.Keeper.SetBridgeValsetSignature(sdkCtx, operatorAddr, timestampUint64, msg.Signature) - - return &types.MsgSubmitBridgeValsetSignatureResponse{}, nil -} diff --git a/x/bridge/keeper/msg_server_submit_oracle_attestation.go b/x/bridge/keeper/msg_server_submit_oracle_attestation.go deleted file mode 100644 index cc904abce..000000000 --- a/x/bridge/keeper/msg_server_submit_oracle_attestation.go +++ /dev/null @@ -1,30 +0,0 @@ -package keeper - -import ( - "context" - "strconv" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/tellor-io/layer/x/bridge/types" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" -) - -func (k msgServer) SubmitOracleAttestation(ctx context.Context, msg *types.MsgSubmitOracleAttestation) (*types.MsgSubmitOracleAttestationResponse, error) { - sdkCtx := sdk.UnwrapSDKContext(ctx) - - operatorAddr, err := convertPrefix(msg.Creator, "tellorvaloper") - if err != nil { - k.Keeper.Logger(sdkCtx).Error("failed to convert operator address prefix", "error", err) - return nil, status.Error(codes.InvalidArgument, err.Error()) - } - - timestampUint64, err := strconv.ParseUint(msg.Timestamp, 10, 64) - if err != nil { - k.Keeper.Logger(sdkCtx).Error("failed to parse timestamp", "error", err) - return nil, status.Error(codes.InvalidArgument, err.Error()) - } - k.Keeper.SetOracleAttestation(sdkCtx, operatorAddr, msg.QueryId, timestampUint64, msg.Signature) - - return &types.MsgSubmitOracleAttestationResponse{}, nil -} diff --git a/x/bridge/keeper/query_get_oracle_attestations.go b/x/bridge/keeper/query_get_oracle_attestations.go deleted file mode 100644 index 10396100f..000000000 --- a/x/bridge/keeper/query_get_oracle_attestations.go +++ /dev/null @@ -1,34 +0,0 @@ -package keeper - -import ( - "context" - "encoding/hex" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/tellor-io/layer/x/bridge/types" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" -) - -func (k Keeper) GetOracleAttestations(goCtx context.Context, req *types.QueryGetOracleAttestationsRequest) (*types.QueryGetOracleAttestationsResponse, error) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "invalid request") - } - - ctx := sdk.UnwrapSDKContext(goCtx) - - sigs, err := k.GetOracleAttestationsFromStorage(ctx, req.QueryId, uint64(req.Timestamp)) - if err != nil { - return nil, status.Error(codes.Internal, "failed to get oracle attestations") - } - - // iterate through sigs and convert to hex + '0x' - sigsHex := make([]string, len(sigs.Attestations)) - for i, sig := range sigs.Attestations { - sigsHex[i] = "0x" + hex.EncodeToString(sig) - } - - return &types.QueryGetOracleAttestationsResponse{ - Attestations: sigsHex, - }, nil -} diff --git a/x/bridge/types/message_register_operator_pubkey.go b/x/bridge/types/message_register_operator_pubkey.go deleted file mode 100644 index 0962f7ab9..000000000 --- a/x/bridge/types/message_register_operator_pubkey.go +++ /dev/null @@ -1,47 +0,0 @@ -package types - -import ( - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" -) - -const TypeMsgRegisterOperatorPubkey = "register_operator_pubkey" - -var _ sdk.Msg = &MsgRegisterOperatorPubkey{} - -func NewMsgRegisterOperatorPubkey(creator string, operatorPubkey string) *MsgRegisterOperatorPubkey { - return &MsgRegisterOperatorPubkey{ - Creator: creator, - OperatorPubkey: operatorPubkey, - } -} - -func (msg *MsgRegisterOperatorPubkey) Route() string { - return RouterKey -} - -func (msg *MsgRegisterOperatorPubkey) Type() string { - return TypeMsgRegisterOperatorPubkey -} - -func (msg *MsgRegisterOperatorPubkey) GetSigners() []sdk.AccAddress { - creator, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - panic(err) - } - return []sdk.AccAddress{creator} -} - -func (msg *MsgRegisterOperatorPubkey) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(msg) - return sdk.MustSortJSON(bz) -} - -func (msg *MsgRegisterOperatorPubkey) ValidateBasic() error { - _, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) - } - return nil -} diff --git a/x/bridge/types/message_submit_bridge_valset_signature.go b/x/bridge/types/message_submit_bridge_valset_signature.go deleted file mode 100644 index 1463a636e..000000000 --- a/x/bridge/types/message_submit_bridge_valset_signature.go +++ /dev/null @@ -1,48 +0,0 @@ -package types - -import ( - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" -) - -const TypeMsgSubmitBridgeValsetSignature = "submit_bridge_valset_signature" - -var _ sdk.Msg = &MsgSubmitBridgeValsetSignature{} - -func NewMsgSubmitBridgeValsetSignature(creator string, timestamp string, signature string) *MsgSubmitBridgeValsetSignature { - return &MsgSubmitBridgeValsetSignature{ - Creator: creator, - Timestamp: timestamp, - Signature: signature, - } -} - -func (msg *MsgSubmitBridgeValsetSignature) Route() string { - return RouterKey -} - -func (msg *MsgSubmitBridgeValsetSignature) Type() string { - return TypeMsgSubmitBridgeValsetSignature -} - -func (msg *MsgSubmitBridgeValsetSignature) GetSigners() []sdk.AccAddress { - creator, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - panic(err) - } - return []sdk.AccAddress{creator} -} - -func (msg *MsgSubmitBridgeValsetSignature) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(msg) - return sdk.MustSortJSON(bz) -} - -func (msg *MsgSubmitBridgeValsetSignature) ValidateBasic() error { - _, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) - } - return nil -} diff --git a/x/bridge/types/message_submit_oracle_attestation.go b/x/bridge/types/message_submit_oracle_attestation.go deleted file mode 100644 index 1d34d3a68..000000000 --- a/x/bridge/types/message_submit_oracle_attestation.go +++ /dev/null @@ -1,55 +0,0 @@ -package types - -import ( - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/tellor-io/layer/utils" -) - -const TypeMsgSubmitOracleAttestation = "submit_oracle_attestation" - -var _ sdk.Msg = &MsgSubmitOracleAttestation{} - -func NewMsgSubmitOracleAttestation(creator string, queryId string, timestamp string, signature string) *MsgSubmitOracleAttestation { - queryIdBz, err := utils.QueryBytesFromString(queryId) - if err != nil { - panic(err) - } - - return &MsgSubmitOracleAttestation{ - Creator: creator, - QueryId: queryIdBz, - Timestamp: timestamp, - Signature: signature, - } -} - -func (msg *MsgSubmitOracleAttestation) Route() string { - return RouterKey -} - -func (msg *MsgSubmitOracleAttestation) Type() string { - return TypeMsgSubmitBridgeValsetSignature -} - -func (msg *MsgSubmitOracleAttestation) GetSigners() []sdk.AccAddress { - creator, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - panic(err) - } - return []sdk.AccAddress{creator} -} - -func (msg *MsgSubmitOracleAttestation) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(msg) - return sdk.MustSortJSON(bz) -} - -func (msg *MsgSubmitOracleAttestation) ValidateBasic() error { - _, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) - } - return nil -} diff --git a/x/bridge/types/query.pb.go b/x/bridge/types/query.pb.go index 081878393..d7fec9bf2 100644 --- a/x/bridge/types/query.pb.go +++ b/x/bridge/types/query.pb.go @@ -851,102 +851,6 @@ func (m *QueryGetValsetSigsResponse) GetSignatures() []string { return nil } -type QueryGetOracleAttestationsRequest struct { - QueryId []byte `protobuf:"bytes,1,opt,name=query_id,json=queryId,proto3" json:"query_id,omitempty"` - Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` -} - -func (m *QueryGetOracleAttestationsRequest) Reset() { *m = QueryGetOracleAttestationsRequest{} } -func (m *QueryGetOracleAttestationsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryGetOracleAttestationsRequest) ProtoMessage() {} -func (*QueryGetOracleAttestationsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e48df680904493de, []int{17} -} -func (m *QueryGetOracleAttestationsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGetOracleAttestationsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGetOracleAttestationsRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryGetOracleAttestationsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetOracleAttestationsRequest.Merge(m, src) -} -func (m *QueryGetOracleAttestationsRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryGetOracleAttestationsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetOracleAttestationsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGetOracleAttestationsRequest proto.InternalMessageInfo - -func (m *QueryGetOracleAttestationsRequest) GetQueryId() []byte { - if m != nil { - return m.QueryId - } - return nil -} - -func (m *QueryGetOracleAttestationsRequest) GetTimestamp() int64 { - if m != nil { - return m.Timestamp - } - return 0 -} - -type QueryGetOracleAttestationsResponse struct { - Attestations []string `protobuf:"bytes,1,rep,name=attestations,proto3" json:"attestations,omitempty"` -} - -func (m *QueryGetOracleAttestationsResponse) Reset() { *m = QueryGetOracleAttestationsResponse{} } -func (m *QueryGetOracleAttestationsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryGetOracleAttestationsResponse) ProtoMessage() {} -func (*QueryGetOracleAttestationsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e48df680904493de, []int{18} -} -func (m *QueryGetOracleAttestationsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGetOracleAttestationsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGetOracleAttestationsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryGetOracleAttestationsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetOracleAttestationsResponse.Merge(m, src) -} -func (m *QueryGetOracleAttestationsResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryGetOracleAttestationsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetOracleAttestationsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGetOracleAttestationsResponse proto.InternalMessageInfo - -func (m *QueryGetOracleAttestationsResponse) GetAttestations() []string { - if m != nil { - return m.Attestations - } - return nil -} - type QueryGetEvmAddressByValidatorAddressRequest struct { ValidatorAddress string `protobuf:"bytes,1,opt,name=validatorAddress,proto3" json:"validatorAddress,omitempty"` } @@ -959,7 +863,7 @@ func (m *QueryGetEvmAddressByValidatorAddressRequest) String() string { } func (*QueryGetEvmAddressByValidatorAddressRequest) ProtoMessage() {} func (*QueryGetEvmAddressByValidatorAddressRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e48df680904493de, []int{19} + return fileDescriptor_e48df680904493de, []int{17} } func (m *QueryGetEvmAddressByValidatorAddressRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1007,7 +911,7 @@ func (m *QueryGetEvmAddressByValidatorAddressResponse) String() string { } func (*QueryGetEvmAddressByValidatorAddressResponse) ProtoMessage() {} func (*QueryGetEvmAddressByValidatorAddressResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e48df680904493de, []int{20} + return fileDescriptor_e48df680904493de, []int{18} } func (m *QueryGetEvmAddressByValidatorAddressResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1051,7 +955,7 @@ func (m *QueryGetValsetByTimestampRequest) Reset() { *m = QueryGetValset func (m *QueryGetValsetByTimestampRequest) String() string { return proto.CompactTextString(m) } func (*QueryGetValsetByTimestampRequest) ProtoMessage() {} func (*QueryGetValsetByTimestampRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e48df680904493de, []int{21} + return fileDescriptor_e48df680904493de, []int{19} } func (m *QueryGetValsetByTimestampRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1095,7 +999,7 @@ func (m *QueryGetValsetByTimestampResponse) Reset() { *m = QueryGetValse func (m *QueryGetValsetByTimestampResponse) String() string { return proto.CompactTextString(m) } func (*QueryGetValsetByTimestampResponse) ProtoMessage() {} func (*QueryGetValsetByTimestampResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e48df680904493de, []int{22} + return fileDescriptor_e48df680904493de, []int{20} } func (m *QueryGetValsetByTimestampResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1139,7 +1043,7 @@ func (m *QueryGetCurrentAggregateReportRequest) Reset() { *m = QueryGetC func (m *QueryGetCurrentAggregateReportRequest) String() string { return proto.CompactTextString(m) } func (*QueryGetCurrentAggregateReportRequest) ProtoMessage() {} func (*QueryGetCurrentAggregateReportRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e48df680904493de, []int{23} + return fileDescriptor_e48df680904493de, []int{21} } func (m *QueryGetCurrentAggregateReportRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1186,7 +1090,7 @@ func (m *QueryGetCurrentAggregateReportResponse) Reset() { func (m *QueryGetCurrentAggregateReportResponse) String() string { return proto.CompactTextString(m) } func (*QueryGetCurrentAggregateReportResponse) ProtoMessage() {} func (*QueryGetCurrentAggregateReportResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e48df680904493de, []int{24} + return fileDescriptor_e48df680904493de, []int{22} } func (m *QueryGetCurrentAggregateReportResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1246,7 +1150,7 @@ func (m *Aggregate) Reset() { *m = Aggregate{} } func (m *Aggregate) String() string { return proto.CompactTextString(m) } func (*Aggregate) ProtoMessage() {} func (*Aggregate) Descriptor() ([]byte, []int) { - return fileDescriptor_e48df680904493de, []int{25} + return fileDescriptor_e48df680904493de, []int{23} } func (m *Aggregate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1354,7 +1258,7 @@ func (m *AggregateReporter) Reset() { *m = AggregateReporter{} } func (m *AggregateReporter) String() string { return proto.CompactTextString(m) } func (*AggregateReporter) ProtoMessage() {} func (*AggregateReporter) Descriptor() ([]byte, []int) { - return fileDescriptor_e48df680904493de, []int{26} + return fileDescriptor_e48df680904493de, []int{24} } func (m *AggregateReporter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1406,7 +1310,7 @@ func (m *QueryGetDataBeforeRequest) Reset() { *m = QueryGetDataBeforeReq func (m *QueryGetDataBeforeRequest) String() string { return proto.CompactTextString(m) } func (*QueryGetDataBeforeRequest) ProtoMessage() {} func (*QueryGetDataBeforeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e48df680904493de, []int{27} + return fileDescriptor_e48df680904493de, []int{25} } func (m *QueryGetDataBeforeRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1458,7 +1362,7 @@ func (m *QueryGetDataBeforeResponse) Reset() { *m = QueryGetDataBeforeRe func (m *QueryGetDataBeforeResponse) String() string { return proto.CompactTextString(m) } func (*QueryGetDataBeforeResponse) ProtoMessage() {} func (*QueryGetDataBeforeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e48df680904493de, []int{28} + return fileDescriptor_e48df680904493de, []int{26} } func (m *QueryGetDataBeforeResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1510,7 +1414,7 @@ func (m *QueryGetSnapshotsByReportRequest) Reset() { *m = QueryGetSnapsh func (m *QueryGetSnapshotsByReportRequest) String() string { return proto.CompactTextString(m) } func (*QueryGetSnapshotsByReportRequest) ProtoMessage() {} func (*QueryGetSnapshotsByReportRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e48df680904493de, []int{29} + return fileDescriptor_e48df680904493de, []int{27} } func (m *QueryGetSnapshotsByReportRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1561,7 +1465,7 @@ func (m *QueryGetSnapshotsByReportResponse) Reset() { *m = QueryGetSnaps func (m *QueryGetSnapshotsByReportResponse) String() string { return proto.CompactTextString(m) } func (*QueryGetSnapshotsByReportResponse) ProtoMessage() {} func (*QueryGetSnapshotsByReportResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e48df680904493de, []int{30} + return fileDescriptor_e48df680904493de, []int{28} } func (m *QueryGetSnapshotsByReportResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1607,7 +1511,7 @@ func (m *QueryGetAttestationDataBySnapshotRequest) Reset() { func (m *QueryGetAttestationDataBySnapshotRequest) String() string { return proto.CompactTextString(m) } func (*QueryGetAttestationDataBySnapshotRequest) ProtoMessage() {} func (*QueryGetAttestationDataBySnapshotRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e48df680904493de, []int{31} + return fileDescriptor_e48df680904493de, []int{29} } func (m *QueryGetAttestationDataBySnapshotRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1662,7 +1566,7 @@ func (m *QueryGetAttestationDataBySnapshotResponse) String() string { } func (*QueryGetAttestationDataBySnapshotResponse) ProtoMessage() {} func (*QueryGetAttestationDataBySnapshotResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e48df680904493de, []int{32} + return fileDescriptor_e48df680904493de, []int{30} } func (m *QueryGetAttestationDataBySnapshotResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1755,7 +1659,7 @@ func (m *QueryGetAttestationsBySnapshotRequest) Reset() { *m = QueryGetA func (m *QueryGetAttestationsBySnapshotRequest) String() string { return proto.CompactTextString(m) } func (*QueryGetAttestationsBySnapshotRequest) ProtoMessage() {} func (*QueryGetAttestationsBySnapshotRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e48df680904493de, []int{33} + return fileDescriptor_e48df680904493de, []int{31} } func (m *QueryGetAttestationsBySnapshotRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1801,7 +1705,7 @@ func (m *QueryGetAttestationsBySnapshotResponse) Reset() { func (m *QueryGetAttestationsBySnapshotResponse) String() string { return proto.CompactTextString(m) } func (*QueryGetAttestationsBySnapshotResponse) ProtoMessage() {} func (*QueryGetAttestationsBySnapshotResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e48df680904493de, []int{34} + return fileDescriptor_e48df680904493de, []int{32} } func (m *QueryGetAttestationsBySnapshotResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1855,8 +1759,6 @@ func init() { proto.RegisterType((*QueryGetValidatorTimestampByIndexResponse)(nil), "layer.bridge.QueryGetValidatorTimestampByIndexResponse") proto.RegisterType((*QueryGetValsetSigsRequest)(nil), "layer.bridge.QueryGetValsetSigsRequest") proto.RegisterType((*QueryGetValsetSigsResponse)(nil), "layer.bridge.QueryGetValsetSigsResponse") - proto.RegisterType((*QueryGetOracleAttestationsRequest)(nil), "layer.bridge.QueryGetOracleAttestationsRequest") - proto.RegisterType((*QueryGetOracleAttestationsResponse)(nil), "layer.bridge.QueryGetOracleAttestationsResponse") proto.RegisterType((*QueryGetEvmAddressByValidatorAddressRequest)(nil), "layer.bridge.QueryGetEvmAddressByValidatorAddressRequest") proto.RegisterType((*QueryGetEvmAddressByValidatorAddressResponse)(nil), "layer.bridge.QueryGetEvmAddressByValidatorAddressResponse") proto.RegisterType((*QueryGetValsetByTimestampRequest)(nil), "layer.bridge.QueryGetValsetByTimestampRequest") @@ -1878,113 +1780,109 @@ func init() { func init() { proto.RegisterFile("layer/bridge/query.proto", fileDescriptor_e48df680904493de) } var fileDescriptor_e48df680904493de = []byte{ - // 1682 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0xcb, 0x6f, 0x1b, 0x45, - 0x18, 0xcf, 0xc6, 0x79, 0xf9, 0xeb, 0x7b, 0x6a, 0x5a, 0xc7, 0x4a, 0x5d, 0x77, 0x29, 0xc1, 0x7d, - 0xe0, 0x6d, 0xd2, 0x67, 0xe8, 0x43, 0x8d, 0xd3, 0xd2, 0x46, 0xa2, 0x90, 0x3a, 0x55, 0x11, 0x15, - 0x92, 0xb5, 0xb6, 0xa7, 0xeb, 0x55, 0xed, 0x5d, 0x77, 0x77, 0x6c, 0x6a, 0x45, 0xb9, 0x70, 0xe5, - 0x82, 0x84, 0xb8, 0x73, 0xe0, 0xca, 0x01, 0xc4, 0x09, 0x71, 0xe0, 0x82, 0xd4, 0x1b, 0x15, 0x5c, - 0x38, 0x21, 0xd4, 0x22, 0xf1, 0x07, 0xf0, 0x0f, 0xa0, 0x9d, 0x9d, 0x7d, 0xcf, 0xac, 0x9d, 0x00, - 0xa7, 0x78, 0xe7, 0x7b, 0xcc, 0xef, 0xf7, 0xcd, 0x37, 0xdf, 0x7c, 0x9f, 0x02, 0xf9, 0x8e, 0x3a, - 0xc4, 0x96, 0xd2, 0xb0, 0xf4, 0x96, 0x86, 0x95, 0xa7, 0x7d, 0x6c, 0x0d, 0x2b, 0x3d, 0xcb, 0x24, - 0x26, 0xda, 0x4b, 0x25, 0x15, 0x57, 0x52, 0xc8, 0x69, 0xa6, 0x66, 0x52, 0x81, 0xe2, 0xfc, 0x72, - 0x75, 0x0a, 0x0b, 0x9a, 0x69, 0x6a, 0x1d, 0xac, 0xa8, 0x3d, 0x5d, 0x51, 0x0d, 0xc3, 0x24, 0x2a, - 0xd1, 0x4d, 0xc3, 0x66, 0xd2, 0xd3, 0x4d, 0xd3, 0xee, 0x9a, 0xb6, 0xd2, 0x50, 0x6d, 0xe6, 0x5a, - 0x19, 0x2c, 0x35, 0x30, 0x51, 0x97, 0x94, 0x9e, 0xaa, 0xe9, 0x06, 0x55, 0x66, 0xba, 0xf3, 0x11, - 0x1c, 0x3d, 0xd5, 0x52, 0xbb, 0x9e, 0x9b, 0x05, 0x57, 0x64, 0x5a, 0x6a, 0xd3, 0xd9, 0x4a, 0xd3, - 0x2c, 0xac, 0xa9, 0x04, 0xbb, 0x52, 0x39, 0x07, 0xe8, 0xbe, 0xe3, 0x7a, 0x83, 0x9a, 0xd4, 0xf0, - 0xd3, 0x3e, 0xb6, 0x89, 0xbc, 0x0e, 0x87, 0x23, 0xab, 0x76, 0xcf, 0x34, 0x6c, 0x8c, 0x96, 0x61, - 0xc6, 0x75, 0x9d, 0x97, 0x4a, 0x52, 0x79, 0xcf, 0x72, 0xae, 0x12, 0x26, 0x59, 0x71, 0xb5, 0xab, - 0x53, 0xcf, 0x7f, 0x3f, 0x3e, 0x51, 0x63, 0x9a, 0x72, 0x11, 0x16, 0xa8, 0xab, 0x3b, 0x98, 0xdc, - 0x1e, 0x74, 0x1f, 0xaa, 0x1d, 0xbd, 0xa5, 0x12, 0xd3, 0xf2, 0xb7, 0x32, 0xe0, 0x98, 0x40, 0xce, - 0x36, 0xbd, 0x07, 0xc8, 0xf5, 0xef, 0xcb, 0x36, 0x31, 0xc9, 0x4b, 0xa5, 0x4c, 0x79, 0xcf, 0xf2, - 0xb1, 0x28, 0x80, 0x6a, 0x54, 0xaf, 0xc6, 0x31, 0x94, 0x4f, 0x82, 0xec, 0xed, 0xe7, 0xaf, 0xaf, - 0xb5, 0x71, 0xf3, 0x49, 0xcf, 0xd4, 0x0d, 0xe2, 0xa1, 0xfa, 0x00, 0x5e, 0x4f, 0xd5, 0x62, 0xd8, - 0xce, 0xc1, 0xe1, 0x41, 0x52, 0x4c, 0xa3, 0x93, 0xad, 0xf1, 0x44, 0xf2, 0x7d, 0x38, 0x10, 0x43, - 0x89, 0xca, 0x70, 0x00, 0x93, 0x36, 0xb6, 0x70, 0xbf, 0xbb, 0xda, 0x6a, 0x59, 0xd8, 0xb6, 0x99, - 0x83, 0xf8, 0x32, 0xca, 0xc1, 0x74, 0xcf, 0xfc, 0x18, 0x5b, 0xf9, 0xc9, 0x92, 0x54, 0x9e, 0xaa, - 0xb9, 0x1f, 0x72, 0x13, 0x50, 0x35, 0xc1, 0xf3, 0xbf, 0x0e, 0xdb, 0x77, 0x93, 0x90, 0x4f, 0xee, - 0xe2, 0x9e, 0x38, 0xda, 0x10, 0xec, 0xe5, 0xe4, 0x48, 0x29, 0x75, 0xaf, 0x4d, 0x4c, 0x78, 0xdb, - 0xa1, 0x0a, 0x20, 0x3f, 0x7a, 0x0f, 0xf4, 0x2e, 0xb6, 0x89, 0xda, 0xed, 0x51, 0xda, 0x99, 0x1a, - 0x47, 0x82, 0xae, 0xc0, 0x51, 0x7f, 0x75, 0xc3, 0x89, 0xca, 0x83, 0xb6, 0x85, 0xed, 0xb6, 0xd9, - 0x69, 0xe5, 0x33, 0xd4, 0x48, 0x24, 0x46, 0xa7, 0xe1, 0xe0, 0x20, 0xb4, 0xf3, 0x5d, 0xd5, 0x6e, - 0xe7, 0xa7, 0x4a, 0x52, 0x79, 0x6f, 0x2d, 0xb1, 0x2e, 0x3a, 0xee, 0x69, 0xaa, 0xce, 0x3d, 0xee, - 0xef, 0x25, 0x90, 0x93, 0x94, 0x03, 0x05, 0x16, 0x40, 0x3e, 0x5d, 0x69, 0x37, 0x74, 0x27, 0x77, - 0x4e, 0x37, 0xc3, 0xa7, 0x2b, 0x6f, 0xc0, 0x42, 0x1a, 0xf6, 0xb4, 0xec, 0x17, 0x84, 0xe3, 0x2e, - 0x94, 0x53, 0xae, 0x55, 0xa4, 0x06, 0xa1, 0x05, 0xc8, 0x92, 0x58, 0x28, 0x82, 0x05, 0xf9, 0x1b, - 0x09, 0x4e, 0x8d, 0xe1, 0x8a, 0xdd, 0xd3, 0x22, 0x40, 0x33, 0x7e, 0x3d, 0x43, 0x2b, 0x8e, 0x7c, - 0xa0, 0x76, 0x6c, 0x16, 0x8f, 0x49, 0x57, 0x1e, 0xac, 0x44, 0xb1, 0x64, 0x62, 0x58, 0xd0, 0x22, - 0xec, 0xef, 0x45, 0x0f, 0x61, 0x8a, 0xaa, 0xc4, 0x56, 0xe5, 0x9b, 0x1c, 0xf6, 0xfe, 0x99, 0x56, - 0x87, 0xeb, 0x46, 0x0b, 0x3f, 0xf3, 0xd8, 0xe7, 0x60, 0x5a, 0x77, 0xbe, 0x19, 0x73, 0xf7, 0x43, - 0x5e, 0xe7, 0x90, 0x4e, 0x7a, 0x60, 0xa4, 0xd3, 0x03, 0xb8, 0x02, 0xf3, 0x21, 0x57, 0x36, 0x26, - 0x9b, 0xba, 0x36, 0x66, 0xec, 0xaf, 0x41, 0x81, 0x67, 0x1a, 0xc4, 0xda, 0xd6, 0x35, 0x43, 0x25, - 0x7d, 0x0b, 0xdb, 0xb4, 0xe0, 0x64, 0x6b, 0xa1, 0x15, 0xf9, 0x23, 0x38, 0xe1, 0x59, 0xbf, 0x4f, - 0xdf, 0xa4, 0x55, 0x42, 0x1c, 0xc7, 0xf4, 0xe9, 0xf3, 0x00, 0xcc, 0xc3, 0x1c, 0x7d, 0xf1, 0xea, - 0x7a, 0x8b, 0xe5, 0xd3, 0x2c, 0xfd, 0x5e, 0x6f, 0x45, 0xb1, 0x4d, 0xc6, 0xb1, 0xdd, 0x0d, 0xca, - 0x3b, 0xcf, 0x3b, 0xc3, 0x28, 0xc3, 0x5e, 0x35, 0xb4, 0xce, 0x50, 0x46, 0xd6, 0xe4, 0x0f, 0xe1, - 0x4c, 0xe8, 0x61, 0x62, 0x25, 0xb8, 0x3a, 0xf4, 0xe3, 0xce, 0x56, 0x3c, 0xc4, 0xe1, 0x8b, 0x15, - 0x2d, 0xe3, 0x89, 0x75, 0xf9, 0x3d, 0x38, 0x3b, 0x9e, 0xeb, 0x20, 0xa4, 0x78, 0x10, 0x7b, 0x1c, - 0x42, 0x2b, 0xf2, 0x4d, 0x28, 0x45, 0x0f, 0xa4, 0x3a, 0xf4, 0xb3, 0x62, 0xbc, 0x23, 0xb5, 0x82, - 0x43, 0xe1, 0x78, 0xf8, 0x7f, 0x5e, 0xe2, 0x2a, 0xbc, 0xe1, 0xed, 0xb9, 0xd6, 0xb7, 0x2c, 0x6c, - 0x90, 0x55, 0xaf, 0x39, 0xa9, 0xe1, 0x9e, 0x69, 0x91, 0xd1, 0xc9, 0x20, 0x6f, 0xc3, 0xe2, 0x28, - 0x1f, 0x0c, 0xfc, 0x45, 0xc8, 0xfa, 0xbd, 0x0f, 0x7b, 0x9a, 0x8e, 0x46, 0x31, 0x07, 0x96, 0x81, - 0x66, 0x32, 0xdb, 0xa6, 0xc2, 0x61, 0xfb, 0x34, 0x03, 0x59, 0xdf, 0x2c, 0x2d, 0x69, 0x17, 0x61, - 0xbf, 0xef, 0xf3, 0xa1, 0xda, 0xe9, 0x63, 0x56, 0x64, 0x62, 0xab, 0xe8, 0x2c, 0x1c, 0x52, 0xa3, - 0x04, 0xb0, 0x45, 0x0b, 0x4e, 0xb6, 0x96, 0x14, 0xa0, 0x93, 0xb0, 0xcf, 0x62, 0xbf, 0x69, 0x99, - 0x67, 0x75, 0x27, 0xba, 0xe8, 0xf8, 0xb4, 0x89, 0x6a, 0xb4, 0x54, 0xab, 0x75, 0x0b, 0x0f, 0x74, - 0x9a, 0xde, 0xf4, 0xcd, 0x92, 0x6a, 0x49, 0x01, 0xba, 0x0e, 0x59, 0xcf, 0xdc, 0xce, 0xcf, 0xd0, - 0xb3, 0x3d, 0x2e, 0x8a, 0x13, 0xd3, 0xab, 0x05, 0x16, 0x28, 0x0f, 0xb3, 0x8f, 0x3b, 0xaa, 0xa6, - 0xe1, 0x56, 0x7e, 0xb6, 0x24, 0x95, 0xe7, 0x6a, 0xde, 0xa7, 0x53, 0xd1, 0x0c, 0xd3, 0x68, 0xe2, - 0xfc, 0x9c, 0x5b, 0xd1, 0xe8, 0x07, 0x5a, 0x86, 0x5c, 0x8c, 0x17, 0x2d, 0x62, 0xf9, 0x2c, 0x55, - 0xe2, 0xca, 0xd0, 0x11, 0x98, 0x69, 0x63, 0x5d, 0x6b, 0x93, 0x3c, 0x50, 0x2d, 0xf6, 0x25, 0xdf, - 0x86, 0x43, 0x09, 0x6c, 0xa8, 0x00, 0x73, 0x1e, 0x3a, 0x76, 0x73, 0xfc, 0xef, 0x68, 0x3f, 0x95, - 0xf1, 0xfa, 0xa9, 0x07, 0x41, 0x65, 0xbc, 0xa5, 0x12, 0xb5, 0x8a, 0x1f, 0x9b, 0x16, 0xfe, 0xd7, - 0x85, 0xe9, 0x69, 0x50, 0x34, 0xc3, 0x5e, 0x47, 0x67, 0xa7, 0xdb, 0xb8, 0xef, 0x26, 0x3b, 0x1f, - 0x05, 0x65, 0x61, 0xd3, 0x50, 0x7b, 0x76, 0xdb, 0x24, 0x76, 0x75, 0x18, 0xbd, 0x5b, 0x79, 0xf0, - 0xf0, 0xb3, 0xe8, 0x88, 0xe9, 0x64, 0xc3, 0xbe, 0x57, 0x83, 0x82, 0xc1, 0xf1, 0x1d, 0xbc, 0x40, - 0xb6, 0x27, 0x64, 0x35, 0x36, 0x58, 0x90, 0xdf, 0x09, 0x9e, 0xc3, 0x50, 0x91, 0xa6, 0xc1, 0x19, - 0x7a, 0x3e, 0x3d, 0x98, 0x05, 0x98, 0xf3, 0x0c, 0xbd, 0x53, 0xf4, 0xbe, 0xe5, 0xbf, 0x27, 0x83, - 0x57, 0x31, 0xc5, 0x11, 0xc3, 0xb4, 0x4b, 0xc2, 0x9c, 0x1b, 0x9c, 0xe1, 0xde, 0xe0, 0xb0, 0x5e, - 0x70, 0x29, 0xc3, 0x7a, 0xee, 0xad, 0x8c, 0xb6, 0x24, 0xd3, 0x89, 0x96, 0xc4, 0xb9, 0x18, 0x01, - 0x99, 0xa0, 0x29, 0x9c, 0xa1, 0x9a, 0x5c, 0x99, 0xd3, 0x16, 0xf6, 0x2c, 0x3c, 0xd0, 0xcd, 0xbe, - 0xed, 0x9e, 0x44, 0x60, 0x36, 0x4b, 0xcd, 0x44, 0x62, 0xa7, 0x95, 0x33, 0xf0, 0x33, 0x12, 0xb7, - 0x9a, 0x73, 0x07, 0x19, 0x8e, 0x48, 0x5e, 0x0b, 0xaa, 0x77, 0xf8, 0x89, 0xdd, 0xd9, 0xd1, 0xbd, - 0x1b, 0x94, 0x6f, 0x91, 0x93, 0xf1, 0x5f, 0xec, 0xe5, 0xaf, 0x72, 0x30, 0x4d, 0xdd, 0xa1, 0x27, - 0x30, 0xc3, 0x3a, 0xeb, 0xd8, 0xf8, 0x91, 0x9c, 0x75, 0x0b, 0x27, 0x52, 0x34, 0xdc, 0xcd, 0xe5, - 0x85, 0x4f, 0x7e, 0xfd, 0xf3, 0xf3, 0xc9, 0x23, 0x28, 0xa7, 0x70, 0xc6, 0x6c, 0xf4, 0x85, 0x04, - 0x07, 0xe3, 0xd3, 0x2b, 0x3a, 0xcd, 0xf1, 0x2a, 0x18, 0x81, 0x0b, 0x67, 0xc6, 0xd2, 0x65, 0x58, - 0xca, 0x14, 0x8b, 0x8c, 0x4a, 0x51, 0x2c, 0x1a, 0x26, 0x75, 0x3c, 0xe8, 0xd6, 0x07, 0x01, 0x84, - 0xaf, 0x25, 0x38, 0xc2, 0xef, 0x8e, 0xd1, 0x39, 0xfe, 0x8e, 0xe2, 0x81, 0xb8, 0xb0, 0xb4, 0x03, - 0x0b, 0x86, 0xb4, 0x42, 0x91, 0x96, 0xd1, 0x62, 0x12, 0xa9, 0x8f, 0xb2, 0x1e, 0xca, 0xf8, 0x5f, - 0x24, 0x58, 0x48, 0xeb, 0xe6, 0xd1, 0xa5, 0xb1, 0x31, 0x44, 0x4f, 0xf8, 0xf2, 0x8e, 0xed, 0x18, - 0x83, 0x55, 0xca, 0xe0, 0x2a, 0x5a, 0x19, 0x8f, 0x41, 0xdd, 0x4d, 0x08, 0x65, 0xcb, 0xaf, 0x1a, - 0xdb, 0xe8, 0xe7, 0x18, 0xa9, 0x78, 0xb7, 0x3e, 0x92, 0x94, 0x60, 0x40, 0x18, 0x49, 0x4a, 0x34, - 0x16, 0xc8, 0x37, 0x28, 0xa9, 0x2b, 0xe8, 0x52, 0x1a, 0x29, 0x9f, 0x41, 0xbd, 0x31, 0xac, 0xd3, - 0xd9, 0x43, 0xd9, 0xa2, 0x7f, 0xb6, 0x9d, 0x74, 0xdf, 0x17, 0xe9, 0xfc, 0xd1, 0x9b, 0x42, 0x28, - 0xd1, 0xb1, 0xa2, 0x50, 0x1e, 0xad, 0xc8, 0x40, 0x2e, 0x51, 0x90, 0x67, 0xd0, 0x29, 0x2e, 0x48, - 0x1b, 0x93, 0xba, 0xad, 0x6b, 0xd1, 0x48, 0xff, 0x28, 0xc1, 0x6b, 0xdc, 0xae, 0x1f, 0x29, 0xfc, - 0x6d, 0x85, 0xd3, 0x47, 0xe1, 0xdc, 0xf8, 0x06, 0x0c, 0xef, 0x2d, 0x8a, 0xf7, 0x06, 0xba, 0x96, - 0xc4, 0xeb, 0xbe, 0xdf, 0xf5, 0x70, 0xa5, 0x52, 0xb6, 0xbc, 0x1e, 0x62, 0x3b, 0x42, 0xe1, 0x2f, - 0x09, 0x8e, 0x8f, 0x98, 0x09, 0xd0, 0x8a, 0xb0, 0x58, 0x8c, 0x1a, 0x51, 0x0a, 0x6f, 0xef, 0xc6, - 0x94, 0x11, 0xbc, 0x47, 0x09, 0xde, 0x41, 0xb7, 0xf9, 0x65, 0x47, 0x75, 0xd5, 0x9d, 0x6c, 0x09, - 0x92, 0x88, 0x2d, 0x2a, 0x5b, 0xf1, 0x01, 0x68, 0x1b, 0x7d, 0x2b, 0x41, 0x8e, 0x37, 0x6b, 0xa0, - 0x4a, 0x5a, 0x8a, 0x24, 0xc7, 0x9a, 0x82, 0x32, 0xb6, 0x3e, 0x23, 0xb2, 0x42, 0x89, 0x9c, 0x47, - 0x4b, 0xc2, 0xcc, 0x6a, 0x0c, 0x83, 0xf4, 0x8f, 0x1c, 0xcf, 0x4f, 0x12, 0xcc, 0x0b, 0x07, 0x0d, - 0x74, 0x9e, 0x8f, 0x24, 0x75, 0xb4, 0x29, 0x5c, 0xd8, 0x99, 0x11, 0xe3, 0x70, 0x9d, 0x72, 0xb8, - 0x8c, 0x2e, 0x26, 0x39, 0x34, 0x5d, 0xcb, 0xba, 0xdf, 0x6d, 0xd4, 0xdd, 0x6e, 0x37, 0x94, 0x72, - 0xe8, 0x4b, 0xf7, 0x06, 0x07, 0x6d, 0xa8, 0xe8, 0x06, 0x27, 0xda, 0x5f, 0xd1, 0x0d, 0x4e, 0x76, - 0xb4, 0xf2, 0x35, 0x8a, 0xf1, 0x12, 0xba, 0x90, 0xc4, 0xd8, 0x52, 0x89, 0x5a, 0x6f, 0x50, 0x75, - 0xd1, 0x4d, 0xf8, 0xc1, 0xcd, 0x8f, 0x44, 0x6b, 0x29, 0xca, 0x0f, 0x51, 0x7f, 0x2b, 0xca, 0x0f, - 0x61, 0xcf, 0x2a, 0xaf, 0x51, 0xdc, 0xd7, 0xd1, 0xd5, 0x24, 0x6e, 0xbf, 0x75, 0x75, 0x52, 0x24, - 0x12, 0xd6, 0xf5, 0x18, 0x7c, 0xf6, 0x94, 0x09, 0xbb, 0x51, 0x51, 0xd5, 0x1f, 0xd5, 0x07, 0x8b, - 0xaa, 0xfe, 0xc8, 0xb6, 0x37, 0xed, 0x29, 0x0b, 0x55, 0x26, 0x76, 0x34, 0x43, 0x9f, 0xaa, 0xb2, - 0xe5, 0xfd, 0xf2, 0xd3, 0x9f, 0xdf, 0xa8, 0x89, 0xd2, 0x3f, 0xb5, 0x37, 0x14, 0xa5, 0x7f, 0x7a, - 0x2f, 0x98, 0x96, 0xfe, 0xe1, 0x2a, 0x2b, 0xe0, 0x51, 0x5d, 0x7b, 0xfe, 0xb2, 0x28, 0xbd, 0x78, - 0x59, 0x94, 0xfe, 0x78, 0x59, 0x94, 0x3e, 0x7b, 0x55, 0x9c, 0x78, 0xf1, 0xaa, 0x38, 0xf1, 0xdb, - 0xab, 0xe2, 0xc4, 0xa3, 0x53, 0x9a, 0x4e, 0xda, 0xfd, 0x46, 0xa5, 0x69, 0x76, 0x15, 0x82, 0x3b, - 0x1d, 0xd3, 0x7a, 0x4b, 0x37, 0xd9, 0x26, 0xcf, 0xbc, 0x6d, 0xc8, 0xb0, 0x87, 0xed, 0xc6, 0x0c, - 0xfd, 0xf7, 0xc9, 0xf9, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xaa, 0x0e, 0xa0, 0xb6, 0x01, 0x1a, - 0x00, 0x00, + // 1623 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0x4b, 0x8f, 0x13, 0xc7, + 0x16, 0x9e, 0x1e, 0xcf, 0xcb, 0x07, 0xb8, 0x40, 0x61, 0x41, 0x8f, 0x65, 0x8c, 0xe9, 0xcb, 0xe5, + 0x9a, 0xc7, 0x75, 0x33, 0xc3, 0x73, 0x2e, 0x10, 0x31, 0x1e, 0x08, 0x8c, 0x14, 0xa2, 0xc1, 0x83, + 0x88, 0xc2, 0xc6, 0x2a, 0xdb, 0x45, 0xbb, 0x85, 0xdd, 0x6d, 0xba, 0xcb, 0x0e, 0xd6, 0x68, 0x36, + 0xd9, 0x66, 0x13, 0x29, 0xca, 0x3e, 0x7f, 0x20, 0x8b, 0x44, 0x59, 0x45, 0xd9, 0x46, 0x62, 0x17, + 0x94, 0x6c, 0xb2, 0x8a, 0x12, 0x88, 0x94, 0x1f, 0x90, 0x3f, 0x10, 0x75, 0x75, 0xf5, 0xbb, 0xab, + 0xed, 0x19, 0x25, 0xab, 0x71, 0xd7, 0x39, 0x75, 0xea, 0xfb, 0x4e, 0x9d, 0x3a, 0xf5, 0xd5, 0x80, + 0xdc, 0xc3, 0x63, 0x62, 0xa9, 0x2d, 0x4b, 0xef, 0x68, 0x44, 0x7d, 0x31, 0x24, 0xd6, 0xb8, 0x36, + 0xb0, 0x4c, 0x6a, 0xa2, 0x83, 0xcc, 0x52, 0x73, 0x2d, 0xc5, 0x82, 0x66, 0x6a, 0x26, 0x33, 0xa8, + 0xce, 0x2f, 0xd7, 0xa7, 0x58, 0xd2, 0x4c, 0x53, 0xeb, 0x11, 0x15, 0x0f, 0x74, 0x15, 0x1b, 0x86, + 0x49, 0x31, 0xd5, 0x4d, 0xc3, 0xe6, 0xd6, 0xf3, 0x6d, 0xd3, 0xee, 0x9b, 0xb6, 0xda, 0xc2, 0x36, + 0x0f, 0xad, 0x8e, 0x56, 0x5a, 0x84, 0xe2, 0x15, 0x75, 0x80, 0x35, 0xdd, 0x60, 0xce, 0xdc, 0x77, + 0x39, 0x82, 0x63, 0x80, 0x2d, 0xdc, 0xf7, 0xc2, 0x94, 0x5c, 0x93, 0x69, 0xe1, 0xb6, 0xb3, 0x94, + 0xa6, 0x59, 0x44, 0xc3, 0x94, 0xb8, 0x56, 0xa5, 0x00, 0xe8, 0x91, 0x13, 0x7a, 0x8b, 0x4d, 0x69, + 0x90, 0x17, 0x43, 0x62, 0x53, 0x65, 0x13, 0x8e, 0x45, 0x46, 0xed, 0x81, 0x69, 0xd8, 0x04, 0xad, + 0xc2, 0x82, 0x1b, 0x5a, 0x96, 0x2a, 0x52, 0xf5, 0xc0, 0x6a, 0xa1, 0x16, 0x26, 0x59, 0x73, 0xbd, + 0xeb, 0x73, 0xaf, 0x7e, 0x39, 0x35, 0xd3, 0xe0, 0x9e, 0x4a, 0x19, 0x4a, 0x2c, 0xd4, 0x7d, 0x42, + 0xef, 0x8d, 0xfa, 0x4f, 0x70, 0x4f, 0xef, 0x60, 0x6a, 0x5a, 0xfe, 0x52, 0x06, 0x9c, 0x14, 0xd8, + 0xf9, 0xa2, 0x0f, 0x01, 0xb9, 0xf1, 0x7d, 0xdb, 0x36, 0xa1, 0xb2, 0x54, 0xc9, 0x55, 0x0f, 0xac, + 0x9e, 0x8c, 0x02, 0xa8, 0x47, 0xfd, 0x1a, 0x29, 0x13, 0x95, 0x33, 0xa0, 0x78, 0xeb, 0xf9, 0xe3, + 0x1b, 0x5d, 0xd2, 0x7e, 0x3e, 0x30, 0x75, 0x83, 0x7a, 0xa8, 0x3e, 0x80, 0x7f, 0x67, 0x7a, 0x71, + 0x6c, 0x97, 0xe0, 0xd8, 0x28, 0x69, 0x66, 0xd9, 0xc9, 0x37, 0xd2, 0x4c, 0xca, 0x23, 0x38, 0x1c, + 0x43, 0x89, 0xaa, 0x70, 0x98, 0xd0, 0x2e, 0xb1, 0xc8, 0xb0, 0xbf, 0xde, 0xe9, 0x58, 0xc4, 0xb6, + 0x79, 0x80, 0xf8, 0x30, 0x2a, 0xc0, 0xfc, 0xc0, 0xfc, 0x88, 0x58, 0xf2, 0x6c, 0x45, 0xaa, 0xce, + 0x35, 0xdc, 0x0f, 0xa5, 0x0d, 0xa8, 0x9e, 0xe0, 0xf9, 0x77, 0xa7, 0xed, 0x9b, 0x59, 0x90, 0x93, + 0xab, 0xb8, 0x3b, 0x8e, 0xb6, 0x04, 0x6b, 0x39, 0x35, 0x52, 0xc9, 0x5c, 0x6b, 0x9b, 0xd0, 0xb4, + 0xe5, 0x50, 0x0d, 0x90, 0x9f, 0xbd, 0xc7, 0x7a, 0x9f, 0xd8, 0x14, 0xf7, 0x07, 0x8c, 0x76, 0xae, + 0x91, 0x62, 0x41, 0x37, 0xe0, 0x84, 0x3f, 0xba, 0xe5, 0x64, 0xe5, 0x71, 0xd7, 0x22, 0x76, 0xd7, + 0xec, 0x75, 0xe4, 0x1c, 0x9b, 0x24, 0x32, 0xa3, 0xf3, 0x70, 0x64, 0x14, 0x5a, 0xf9, 0x01, 0xb6, + 0xbb, 0xf2, 0x5c, 0x45, 0xaa, 0x1e, 0x6c, 0x24, 0xc6, 0x45, 0xdb, 0x3d, 0xcf, 0xdc, 0x53, 0xb7, + 0xfb, 0x5b, 0x09, 0x94, 0x24, 0xe5, 0xc0, 0x81, 0x27, 0x30, 0x9d, 0xae, 0xb4, 0x1f, 0xba, 0xb3, + 0x7b, 0xa7, 0x9b, 0x4b, 0xa7, 0xab, 0x6c, 0x41, 0x29, 0x0b, 0x7b, 0x56, 0xf5, 0x0b, 0xd2, 0xf1, + 0x00, 0xaa, 0x19, 0xc7, 0x2a, 0xd2, 0x83, 0x50, 0x09, 0xf2, 0x34, 0x96, 0x8a, 0x60, 0x40, 0xf9, + 0x4a, 0x82, 0x73, 0x53, 0x84, 0xe2, 0xe7, 0xb4, 0x0c, 0xd0, 0x8e, 0x1f, 0xcf, 0xd0, 0x88, 0x63, + 0x1f, 0xe1, 0x9e, 0xcd, 0xf3, 0x31, 0xeb, 0xda, 0x83, 0x91, 0x28, 0x96, 0x5c, 0x0c, 0x0b, 0x3a, + 0x0b, 0xff, 0x1a, 0x44, 0x37, 0x61, 0x8e, 0xb9, 0xc4, 0x46, 0x95, 0x3b, 0x29, 0xec, 0xfd, 0x3d, + 0xad, 0x8f, 0x37, 0x8d, 0x0e, 0x79, 0xe9, 0xb1, 0x2f, 0xc0, 0xbc, 0xee, 0x7c, 0x73, 0xe6, 0xee, + 0x87, 0xb2, 0x99, 0x42, 0x3a, 0x19, 0x81, 0x93, 0xce, 0x4e, 0xe0, 0x1a, 0x2c, 0x87, 0x42, 0xd9, + 0x84, 0x6e, 0xeb, 0xda, 0x94, 0xb9, 0xbf, 0x05, 0xc5, 0xb4, 0xa9, 0x41, 0xae, 0x6d, 0x5d, 0x33, + 0x30, 0x1d, 0x5a, 0xc4, 0x66, 0x0d, 0x27, 0xdf, 0x08, 0x8d, 0x28, 0x1f, 0xc2, 0x85, 0x50, 0xc3, + 0xe7, 0xad, 0xad, 0x3e, 0xf6, 0xf9, 0xf0, 0x11, 0x0f, 0x4a, 0xb8, 0x60, 0xa3, 0xed, 0x31, 0x31, + 0xae, 0xbc, 0x0f, 0x17, 0xa7, 0x0b, 0x1d, 0x40, 0x25, 0xa3, 0x58, 0xd3, 0x0d, 0x8d, 0x28, 0x77, + 0xa0, 0x12, 0x25, 0x5a, 0x1f, 0xfb, 0xd9, 0x9e, 0x2e, 0x55, 0x16, 0x9c, 0xce, 0x88, 0xf0, 0xcf, + 0xdc, 0x70, 0x75, 0xf8, 0x8f, 0xb7, 0xe6, 0xc6, 0xd0, 0xb2, 0x88, 0x41, 0xd7, 0xbd, 0x4b, 0xbf, + 0x41, 0x06, 0xa6, 0xe5, 0x5d, 0x72, 0x68, 0x19, 0x96, 0x98, 0xac, 0x68, 0xea, 0x1d, 0x7e, 0x68, + 0x17, 0xd9, 0xf7, 0x66, 0x47, 0xd9, 0x85, 0xb3, 0x93, 0x62, 0x70, 0xf0, 0x57, 0x21, 0xef, 0x6b, + 0x0a, 0xde, 0xf2, 0x4f, 0x44, 0x31, 0x07, 0x33, 0x03, 0xcf, 0x68, 0xda, 0xdc, 0xeb, 0x2c, 0x94, + 0xb6, 0x4f, 0x72, 0x90, 0xf7, 0xa7, 0x65, 0xe0, 0x74, 0x8e, 0x9e, 0x1f, 0xf3, 0x09, 0xee, 0x0d, + 0x09, 0x3f, 0xbc, 0xb1, 0x51, 0x74, 0x11, 0x8e, 0xe2, 0x28, 0x01, 0x62, 0xb1, 0x83, 0x9c, 0x6f, + 0x24, 0x0d, 0xe8, 0x0c, 0x1c, 0xb2, 0xf8, 0x6f, 0xd6, 0x3e, 0xf9, 0x79, 0x8e, 0x0e, 0x3a, 0x31, + 0x6d, 0x8a, 0x8d, 0x0e, 0xb6, 0x3a, 0x77, 0xc9, 0x48, 0x67, 0x72, 0x8c, 0xdd, 0x05, 0x52, 0x23, + 0x69, 0x40, 0xb7, 0x21, 0xef, 0x4d, 0xb7, 0xe5, 0x05, 0xb6, 0xb7, 0xa7, 0x44, 0x79, 0xe2, 0x7e, + 0x8d, 0x60, 0x06, 0x92, 0x61, 0xf1, 0x59, 0x0f, 0x6b, 0x1a, 0xe9, 0xc8, 0x8b, 0x15, 0xa9, 0xba, + 0xd4, 0xf0, 0x3e, 0x9d, 0x4e, 0x61, 0x98, 0x46, 0x9b, 0xc8, 0x4b, 0x6e, 0xa7, 0x60, 0x1f, 0x68, + 0x15, 0x0a, 0x31, 0x5e, 0xac, 0x39, 0xc8, 0x79, 0xe6, 0x94, 0x6a, 0x43, 0xc7, 0x61, 0xa1, 0x4b, + 0x74, 0xad, 0x4b, 0x65, 0x60, 0x5e, 0xfc, 0x4b, 0xb9, 0x07, 0x47, 0x13, 0xd8, 0x50, 0x11, 0x96, + 0x3c, 0x74, 0xfc, 0xe4, 0xf8, 0xdf, 0x51, 0x9d, 0x92, 0xf3, 0x74, 0xca, 0xe3, 0xa0, 0xe3, 0xdc, + 0xc5, 0x14, 0xd7, 0xc9, 0x33, 0xd3, 0x22, 0x93, 0x6b, 0x31, 0x59, 0x2a, 0x91, 0x13, 0xf6, 0x22, + 0x68, 0x46, 0xe1, 0xa8, 0x93, 0xab, 0xd3, 0x15, 0xc4, 0xfb, 0xa9, 0xce, 0xa7, 0x41, 0x5b, 0xd8, + 0x36, 0xf0, 0xc0, 0xee, 0x9a, 0xd4, 0xae, 0x8f, 0xa3, 0x67, 0x4b, 0x06, 0x0f, 0x3f, 0xcf, 0x8e, + 0x98, 0x4e, 0x3e, 0x1c, 0x7b, 0x3d, 0x68, 0x18, 0x29, 0xb1, 0x83, 0xce, 0x6e, 0x7b, 0x46, 0xde, + 0x61, 0x83, 0x01, 0xe5, 0xdd, 0xe0, 0x9a, 0x59, 0xa7, 0xd4, 0x89, 0xeb, 0x14, 0x20, 0x4b, 0xce, + 0xd8, 0x8b, 0xe9, 0xc1, 0x2c, 0xc2, 0x92, 0x37, 0xd1, 0xdb, 0x45, 0xef, 0x5b, 0xf9, 0x73, 0x36, + 0xb8, 0x6d, 0x32, 0x02, 0x71, 0x4c, 0xfb, 0x24, 0x9c, 0x72, 0x82, 0x73, 0xa9, 0x27, 0x38, 0xec, + 0x17, 0x1c, 0xca, 0xb0, 0x9f, 0x7b, 0x2a, 0xa3, 0x57, 0xfd, 0x7c, 0xe2, 0xaa, 0x77, 0x0e, 0x46, + 0x40, 0x26, 0x10, 0x5b, 0x0b, 0xcc, 0x33, 0xd5, 0xe6, 0xc8, 0xad, 0x81, 0x45, 0x46, 0xba, 0x39, + 0xb4, 0xdd, 0x9d, 0x08, 0xa6, 0x2d, 0xb2, 0x69, 0x22, 0xb3, 0x23, 0x91, 0x0c, 0xf2, 0x92, 0xc6, + 0x67, 0x2d, 0xb9, 0x0f, 0x84, 0x14, 0x93, 0xb2, 0x11, 0x74, 0xef, 0x50, 0xd2, 0xed, 0xbd, 0x6d, + 0xdd, 0x7b, 0x41, 0xfb, 0x16, 0x05, 0xe1, 0xdb, 0xa6, 0xc0, 0xc1, 0x10, 0x65, 0xaf, 0x9a, 0x22, + 0x63, 0xab, 0xbf, 0x21, 0x98, 0x67, 0xe1, 0xd0, 0x73, 0x58, 0xe0, 0x8a, 0x35, 0x26, 0xeb, 0x93, + 0x6f, 0xc8, 0xe2, 0xe9, 0x0c, 0x0f, 0x77, 0x71, 0xa5, 0xf4, 0xf1, 0x4f, 0xbf, 0x7f, 0x36, 0x7b, + 0x1c, 0x15, 0xd4, 0x94, 0xe7, 0x2b, 0xfa, 0x5c, 0x82, 0x23, 0xf1, 0x57, 0x21, 0x3a, 0x9f, 0x12, + 0x55, 0xf0, 0xb4, 0x2c, 0x5e, 0x98, 0xca, 0x97, 0x63, 0xa9, 0x32, 0x2c, 0x0a, 0xaa, 0x44, 0xb1, + 0x68, 0x84, 0x36, 0xc9, 0xa8, 0xdf, 0x1c, 0x05, 0x10, 0xbe, 0x94, 0xe0, 0x78, 0xba, 0xea, 0x44, + 0x97, 0xd2, 0x57, 0x14, 0x3f, 0x34, 0x8b, 0x2b, 0x7b, 0x98, 0xc1, 0x91, 0xd6, 0x18, 0xd2, 0x2a, + 0x3a, 0x9b, 0x44, 0xea, 0xa3, 0x6c, 0x86, 0x2a, 0xfe, 0x47, 0x09, 0x4a, 0x59, 0x2a, 0x19, 0x5d, + 0x9b, 0x1a, 0x43, 0x74, 0x87, 0xaf, 0xef, 0x79, 0x1e, 0x67, 0xb0, 0xce, 0x18, 0xdc, 0x44, 0x6b, + 0xd3, 0x31, 0x68, 0xba, 0x05, 0xa1, 0xee, 0xf8, 0x5d, 0x63, 0x17, 0xfd, 0x10, 0x23, 0x15, 0x57, + 0xc1, 0x13, 0x49, 0x09, 0x84, 0xf7, 0x44, 0x52, 0x22, 0xb9, 0xad, 0xbc, 0xc3, 0x48, 0xdd, 0x40, + 0xd7, 0xb2, 0x48, 0xf9, 0x0c, 0x9a, 0xad, 0x71, 0x93, 0x69, 0x7a, 0x75, 0x87, 0xfd, 0xd9, 0x75, + 0xca, 0xfd, 0x50, 0x44, 0x51, 0xa3, 0xff, 0x0a, 0xa1, 0x44, 0xe5, 0x7a, 0xb1, 0x3a, 0xd9, 0x91, + 0x83, 0x5c, 0x61, 0x20, 0x2f, 0xa0, 0x73, 0xa9, 0x20, 0x6d, 0x42, 0x9b, 0xb6, 0xae, 0x45, 0x33, + 0xfd, 0x87, 0x04, 0xa7, 0x26, 0x08, 0x6a, 0xb4, 0x26, 0x3c, 0x69, 0x93, 0xf4, 0x7d, 0xf1, 0xff, + 0xfb, 0x99, 0xca, 0xd9, 0x3c, 0x64, 0x6c, 0xee, 0xa3, 0x7b, 0xe9, 0x67, 0x16, 0xbb, 0xee, 0x4e, + 0xaa, 0x83, 0x1d, 0xe0, 0x83, 0xea, 0x4e, 0xfc, 0xf5, 0xb0, 0x8b, 0xbe, 0x96, 0xa0, 0x90, 0x26, + 0xd4, 0x51, 0x2d, 0x2b, 0xbf, 0xc9, 0x37, 0x41, 0x51, 0x9d, 0xda, 0x9f, 0x13, 0x59, 0x63, 0x44, + 0x2e, 0xa3, 0x15, 0xe1, 0xb6, 0xb4, 0xc6, 0x41, 0xed, 0x44, 0xb6, 0xe7, 0x7b, 0x09, 0x96, 0x85, + 0x2a, 0x1d, 0x5d, 0x4e, 0x47, 0x92, 0xf9, 0x2e, 0x28, 0x5e, 0xd9, 0xdb, 0x24, 0xce, 0xe1, 0x36, + 0xe3, 0x70, 0x1d, 0x5d, 0x4d, 0x72, 0x68, 0xbb, 0x33, 0x9b, 0xfe, 0x55, 0xdd, 0x74, 0xa5, 0xa2, + 0xba, 0xe3, 0x69, 0xbe, 0x5d, 0xf4, 0x85, 0x5b, 0xfe, 0x81, 0x86, 0x13, 0x95, 0x7f, 0x42, 0x3b, + 0x8a, 0xca, 0x3f, 0x29, 0x07, 0x95, 0x5b, 0x0c, 0xe3, 0x35, 0x74, 0x25, 0x89, 0xb1, 0x83, 0x29, + 0x6e, 0xb6, 0x98, 0x7b, 0x08, 0x56, 0x24, 0xd5, 0xdf, 0xb9, 0xf5, 0x91, 0xd0, 0x65, 0xa2, 0xfa, + 0x10, 0x89, 0x43, 0x51, 0x7d, 0x08, 0x05, 0x9f, 0xb2, 0xc1, 0x70, 0xdf, 0x46, 0x37, 0x93, 0xb8, + 0x7d, 0xdd, 0xe7, 0x94, 0x48, 0x24, 0xad, 0x9b, 0x31, 0xf8, 0xfc, 0x1e, 0x10, 0x4a, 0x39, 0x51, + 0xcb, 0x9c, 0x24, 0x22, 0x45, 0x2d, 0x73, 0xa2, 0x66, 0xcc, 0xba, 0x07, 0x42, 0x02, 0x84, 0x6f, + 0xcd, 0xd8, 0xa7, 0xaa, 0xee, 0x78, 0xbf, 0xfc, 0xf2, 0x4f, 0x57, 0x39, 0xa2, 0xf2, 0xcf, 0x14, + 0x56, 0xa2, 0xf2, 0xcf, 0x16, 0x52, 0x59, 0xe5, 0x1f, 0x16, 0x53, 0x02, 0x1e, 0xf5, 0x8d, 0x57, + 0x6f, 0xca, 0xd2, 0xeb, 0x37, 0x65, 0xe9, 0xd7, 0x37, 0x65, 0xe9, 0xd3, 0xb7, 0xe5, 0x99, 0xd7, + 0x6f, 0xcb, 0x33, 0x3f, 0xbf, 0x2d, 0xcf, 0x3c, 0x3d, 0xa7, 0xe9, 0xb4, 0x3b, 0x6c, 0xd5, 0xda, + 0x66, 0x5f, 0xa5, 0xa4, 0xd7, 0x33, 0xad, 0xff, 0xe9, 0x26, 0x5f, 0xe4, 0xa5, 0xb7, 0x0c, 0x1d, + 0x0f, 0x88, 0xdd, 0x5a, 0x60, 0xff, 0xd3, 0xbf, 0xfc, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6b, + 0x4e, 0x9f, 0xa8, 0x96, 0x18, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2007,7 +1905,6 @@ type QueryClient interface { GetValidatorCheckpointParams(ctx context.Context, in *QueryGetValidatorCheckpointParamsRequest, opts ...grpc.CallOption) (*QueryGetValidatorCheckpointParamsResponse, error) GetValidatorTimestampByIndex(ctx context.Context, in *QueryGetValidatorTimestampByIndexRequest, opts ...grpc.CallOption) (*QueryGetValidatorTimestampByIndexResponse, error) GetValsetSigs(ctx context.Context, in *QueryGetValsetSigsRequest, opts ...grpc.CallOption) (*QueryGetValsetSigsResponse, error) - GetOracleAttestations(ctx context.Context, in *QueryGetOracleAttestationsRequest, opts ...grpc.CallOption) (*QueryGetOracleAttestationsResponse, error) GetEvmAddressByValidatorAddress(ctx context.Context, in *QueryGetEvmAddressByValidatorAddressRequest, opts ...grpc.CallOption) (*QueryGetEvmAddressByValidatorAddressResponse, error) GetValsetByTimestamp(ctx context.Context, in *QueryGetValsetByTimestampRequest, opts ...grpc.CallOption) (*QueryGetValsetByTimestampResponse, error) GetCurrentAggregateReport(ctx context.Context, in *QueryGetCurrentAggregateReportRequest, opts ...grpc.CallOption) (*QueryGetCurrentAggregateReportResponse, error) @@ -2079,15 +1976,6 @@ func (c *queryClient) GetValsetSigs(ctx context.Context, in *QueryGetValsetSigsR return out, nil } -func (c *queryClient) GetOracleAttestations(ctx context.Context, in *QueryGetOracleAttestationsRequest, opts ...grpc.CallOption) (*QueryGetOracleAttestationsResponse, error) { - out := new(QueryGetOracleAttestationsResponse) - err := c.cc.Invoke(ctx, "/layer.bridge.Query/GetOracleAttestations", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *queryClient) GetEvmAddressByValidatorAddress(ctx context.Context, in *QueryGetEvmAddressByValidatorAddressRequest, opts ...grpc.CallOption) (*QueryGetEvmAddressByValidatorAddressResponse, error) { out := new(QueryGetEvmAddressByValidatorAddressResponse) err := c.cc.Invoke(ctx, "/layer.bridge.Query/GetEvmAddressByValidatorAddress", in, out, opts...) @@ -2161,7 +2049,6 @@ type QueryServer interface { GetValidatorCheckpointParams(context.Context, *QueryGetValidatorCheckpointParamsRequest) (*QueryGetValidatorCheckpointParamsResponse, error) GetValidatorTimestampByIndex(context.Context, *QueryGetValidatorTimestampByIndexRequest) (*QueryGetValidatorTimestampByIndexResponse, error) GetValsetSigs(context.Context, *QueryGetValsetSigsRequest) (*QueryGetValsetSigsResponse, error) - GetOracleAttestations(context.Context, *QueryGetOracleAttestationsRequest) (*QueryGetOracleAttestationsResponse, error) GetEvmAddressByValidatorAddress(context.Context, *QueryGetEvmAddressByValidatorAddressRequest) (*QueryGetEvmAddressByValidatorAddressResponse, error) GetValsetByTimestamp(context.Context, *QueryGetValsetByTimestampRequest) (*QueryGetValsetByTimestampResponse, error) GetCurrentAggregateReport(context.Context, *QueryGetCurrentAggregateReportRequest) (*QueryGetCurrentAggregateReportResponse, error) @@ -2193,9 +2080,6 @@ func (*UnimplementedQueryServer) GetValidatorTimestampByIndex(ctx context.Contex func (*UnimplementedQueryServer) GetValsetSigs(ctx context.Context, req *QueryGetValsetSigsRequest) (*QueryGetValsetSigsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetValsetSigs not implemented") } -func (*UnimplementedQueryServer) GetOracleAttestations(ctx context.Context, req *QueryGetOracleAttestationsRequest) (*QueryGetOracleAttestationsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetOracleAttestations not implemented") -} func (*UnimplementedQueryServer) GetEvmAddressByValidatorAddress(ctx context.Context, req *QueryGetEvmAddressByValidatorAddressRequest) (*QueryGetEvmAddressByValidatorAddressResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetEvmAddressByValidatorAddress not implemented") } @@ -2330,24 +2214,6 @@ func _Query_GetValsetSigs_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } -func _Query_GetOracleAttestations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGetOracleAttestationsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).GetOracleAttestations(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/layer.bridge.Query/GetOracleAttestations", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).GetOracleAttestations(ctx, req.(*QueryGetOracleAttestationsRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _Query_GetEvmAddressByValidatorAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryGetEvmAddressByValidatorAddressRequest) if err := dec(in); err != nil { @@ -2502,10 +2368,6 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "GetValsetSigs", Handler: _Query_GetValsetSigs_Handler, }, - { - MethodName: "GetOracleAttestations", - Handler: _Query_GetOracleAttestations_Handler, - }, { MethodName: "GetEvmAddressByValidatorAddress", Handler: _Query_GetEvmAddressByValidatorAddress_Handler, @@ -3100,73 +2962,6 @@ func (m *QueryGetValsetSigsResponse) MarshalToSizedBuffer(dAtA []byte) (int, err return len(dAtA) - i, nil } -func (m *QueryGetOracleAttestationsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryGetOracleAttestationsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryGetOracleAttestationsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Timestamp != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.Timestamp)) - i-- - dAtA[i] = 0x10 - } - if len(m.QueryId) > 0 { - i -= len(m.QueryId) - copy(dAtA[i:], m.QueryId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.QueryId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryGetOracleAttestationsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryGetOracleAttestationsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryGetOracleAttestationsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Attestations) > 0 { - for iNdEx := len(m.Attestations) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Attestations[iNdEx]) - copy(dAtA[i:], m.Attestations[iNdEx]) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Attestations[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - func (m *QueryGetEvmAddressByValidatorAddressRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -4059,37 +3854,6 @@ func (m *QueryGetValsetSigsResponse) Size() (n int) { return n } -func (m *QueryGetOracleAttestationsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.QueryId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.Timestamp != 0 { - n += 1 + sovQuery(uint64(m.Timestamp)) - } - return n -} - -func (m *QueryGetOracleAttestationsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Attestations) > 0 { - for _, s := range m.Attestations { - l = len(s) - n += 1 + l + sovQuery(uint64(l)) - } - } - return n -} - func (m *QueryGetEvmAddressByValidatorAddressRequest) Size() (n int) { if m == nil { return 0 @@ -5877,191 +5641,6 @@ func (m *QueryGetValsetSigsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryGetOracleAttestationsRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryGetOracleAttestationsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetOracleAttestationsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field QueryId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.QueryId = append(m.QueryId[:0], dAtA[iNdEx:postIndex]...) - if m.QueryId == nil { - m.QueryId = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - m.Timestamp = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Timestamp |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryGetOracleAttestationsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryGetOracleAttestationsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetOracleAttestationsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attestations", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attestations = append(m.Attestations, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *QueryGetEvmAddressByValidatorAddressRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/bridge/types/query.pb.gw.go b/x/bridge/types/query.pb.gw.go index 00db5129d..44bcf53bc 100644 --- a/x/bridge/types/query.pb.gw.go +++ b/x/bridge/types/query.pb.gw.go @@ -249,82 +249,6 @@ func local_request_Query_GetValsetSigs_0(ctx context.Context, marshaler runtime. } -func request_Query_GetOracleAttestations_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGetOracleAttestationsRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["query_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "query_id") - } - - protoReq.QueryId, err = runtime.Bytes(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "query_id", err) - } - - val, ok = pathParams["timestamp"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "timestamp") - } - - protoReq.Timestamp, err = runtime.Int64(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "timestamp", err) - } - - msg, err := client.GetOracleAttestations(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_GetOracleAttestations_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGetOracleAttestationsRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["query_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "query_id") - } - - protoReq.QueryId, err = runtime.Bytes(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "query_id", err) - } - - val, ok = pathParams["timestamp"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "timestamp") - } - - protoReq.Timestamp, err = runtime.Int64(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "timestamp", err) - } - - msg, err := server.GetOracleAttestations(ctx, &protoReq) - return msg, metadata, err - -} - func request_Query_GetEvmAddressByValidatorAddress_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryGetEvmAddressByValidatorAddressRequest var metadata runtime.ServerMetadata @@ -891,29 +815,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("GET", pattern_Query_GetOracleAttestations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_GetOracleAttestations_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_GetOracleAttestations_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_Query_GetEvmAddressByValidatorAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1236,26 +1137,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("GET", pattern_Query_GetOracleAttestations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_GetOracleAttestations_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_GetOracleAttestations_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_Query_GetEvmAddressByValidatorAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1412,8 +1293,6 @@ var ( pattern_Query_GetValsetSigs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"layer", "bridge", "get_valset_sigs", "timestamp"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_GetOracleAttestations_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4}, []string{"layer", "bridge", "get_oracle_attestations", "query_id", "timestamp"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_GetEvmAddressByValidatorAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"layer", "bridge", "get_evm_address_by_validator_address", "validatorAddress"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_GetValsetByTimestamp_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"layer", "bridge", "get_valset_by_timestamp", "timestamp"}, "", runtime.AssumeColonVerbOpt(false))) @@ -1442,8 +1321,6 @@ var ( forward_Query_GetValsetSigs_0 = runtime.ForwardResponseMessage - forward_Query_GetOracleAttestations_0 = runtime.ForwardResponseMessage - forward_Query_GetEvmAddressByValidatorAddress_0 = runtime.ForwardResponseMessage forward_Query_GetValsetByTimestamp_0 = runtime.ForwardResponseMessage diff --git a/x/bridge/types/tx.pb.go b/x/bridge/types/tx.pb.go index 9b45d6365..e0523e516 100644 --- a/x/bridge/types/tx.pb.go +++ b/x/bridge/types/tx.pb.go @@ -28,296 +28,6 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -type MsgRegisterOperatorPubkey struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - OperatorPubkey string `protobuf:"bytes,2,opt,name=operatorPubkey,proto3" json:"operatorPubkey,omitempty"` -} - -func (m *MsgRegisterOperatorPubkey) Reset() { *m = MsgRegisterOperatorPubkey{} } -func (m *MsgRegisterOperatorPubkey) String() string { return proto.CompactTextString(m) } -func (*MsgRegisterOperatorPubkey) ProtoMessage() {} -func (*MsgRegisterOperatorPubkey) Descriptor() ([]byte, []int) { - return fileDescriptor_cb4091a52ebadfca, []int{0} -} -func (m *MsgRegisterOperatorPubkey) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgRegisterOperatorPubkey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgRegisterOperatorPubkey.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgRegisterOperatorPubkey) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgRegisterOperatorPubkey.Merge(m, src) -} -func (m *MsgRegisterOperatorPubkey) XXX_Size() int { - return m.Size() -} -func (m *MsgRegisterOperatorPubkey) XXX_DiscardUnknown() { - xxx_messageInfo_MsgRegisterOperatorPubkey.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgRegisterOperatorPubkey proto.InternalMessageInfo - -func (m *MsgRegisterOperatorPubkey) GetCreator() string { - if m != nil { - return m.Creator - } - return "" -} - -func (m *MsgRegisterOperatorPubkey) GetOperatorPubkey() string { - if m != nil { - return m.OperatorPubkey - } - return "" -} - -type MsgRegisterOperatorPubkeyResponse struct { -} - -func (m *MsgRegisterOperatorPubkeyResponse) Reset() { *m = MsgRegisterOperatorPubkeyResponse{} } -func (m *MsgRegisterOperatorPubkeyResponse) String() string { return proto.CompactTextString(m) } -func (*MsgRegisterOperatorPubkeyResponse) ProtoMessage() {} -func (*MsgRegisterOperatorPubkeyResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_cb4091a52ebadfca, []int{1} -} -func (m *MsgRegisterOperatorPubkeyResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgRegisterOperatorPubkeyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgRegisterOperatorPubkeyResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgRegisterOperatorPubkeyResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgRegisterOperatorPubkeyResponse.Merge(m, src) -} -func (m *MsgRegisterOperatorPubkeyResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgRegisterOperatorPubkeyResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgRegisterOperatorPubkeyResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgRegisterOperatorPubkeyResponse proto.InternalMessageInfo - -type MsgSubmitBridgeValsetSignature struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - Timestamp string `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Signature string `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (m *MsgSubmitBridgeValsetSignature) Reset() { *m = MsgSubmitBridgeValsetSignature{} } -func (m *MsgSubmitBridgeValsetSignature) String() string { return proto.CompactTextString(m) } -func (*MsgSubmitBridgeValsetSignature) ProtoMessage() {} -func (*MsgSubmitBridgeValsetSignature) Descriptor() ([]byte, []int) { - return fileDescriptor_cb4091a52ebadfca, []int{2} -} -func (m *MsgSubmitBridgeValsetSignature) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgSubmitBridgeValsetSignature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgSubmitBridgeValsetSignature.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgSubmitBridgeValsetSignature) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSubmitBridgeValsetSignature.Merge(m, src) -} -func (m *MsgSubmitBridgeValsetSignature) XXX_Size() int { - return m.Size() -} -func (m *MsgSubmitBridgeValsetSignature) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSubmitBridgeValsetSignature.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgSubmitBridgeValsetSignature proto.InternalMessageInfo - -func (m *MsgSubmitBridgeValsetSignature) GetCreator() string { - if m != nil { - return m.Creator - } - return "" -} - -func (m *MsgSubmitBridgeValsetSignature) GetTimestamp() string { - if m != nil { - return m.Timestamp - } - return "" -} - -func (m *MsgSubmitBridgeValsetSignature) GetSignature() string { - if m != nil { - return m.Signature - } - return "" -} - -type MsgSubmitBridgeValsetSignatureResponse struct { -} - -func (m *MsgSubmitBridgeValsetSignatureResponse) Reset() { - *m = MsgSubmitBridgeValsetSignatureResponse{} -} -func (m *MsgSubmitBridgeValsetSignatureResponse) String() string { return proto.CompactTextString(m) } -func (*MsgSubmitBridgeValsetSignatureResponse) ProtoMessage() {} -func (*MsgSubmitBridgeValsetSignatureResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_cb4091a52ebadfca, []int{3} -} -func (m *MsgSubmitBridgeValsetSignatureResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgSubmitBridgeValsetSignatureResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgSubmitBridgeValsetSignatureResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgSubmitBridgeValsetSignatureResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSubmitBridgeValsetSignatureResponse.Merge(m, src) -} -func (m *MsgSubmitBridgeValsetSignatureResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgSubmitBridgeValsetSignatureResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSubmitBridgeValsetSignatureResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgSubmitBridgeValsetSignatureResponse proto.InternalMessageInfo - -type MsgSubmitOracleAttestation struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - QueryId []byte `protobuf:"bytes,2,opt,name=query_id,json=queryId,proto3" json:"query_id,omitempty"` - Timestamp string `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Signature string `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (m *MsgSubmitOracleAttestation) Reset() { *m = MsgSubmitOracleAttestation{} } -func (m *MsgSubmitOracleAttestation) String() string { return proto.CompactTextString(m) } -func (*MsgSubmitOracleAttestation) ProtoMessage() {} -func (*MsgSubmitOracleAttestation) Descriptor() ([]byte, []int) { - return fileDescriptor_cb4091a52ebadfca, []int{4} -} -func (m *MsgSubmitOracleAttestation) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgSubmitOracleAttestation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgSubmitOracleAttestation.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgSubmitOracleAttestation) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSubmitOracleAttestation.Merge(m, src) -} -func (m *MsgSubmitOracleAttestation) XXX_Size() int { - return m.Size() -} -func (m *MsgSubmitOracleAttestation) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSubmitOracleAttestation.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgSubmitOracleAttestation proto.InternalMessageInfo - -func (m *MsgSubmitOracleAttestation) GetCreator() string { - if m != nil { - return m.Creator - } - return "" -} - -func (m *MsgSubmitOracleAttestation) GetQueryId() []byte { - if m != nil { - return m.QueryId - } - return nil -} - -func (m *MsgSubmitOracleAttestation) GetTimestamp() string { - if m != nil { - return m.Timestamp - } - return "" -} - -func (m *MsgSubmitOracleAttestation) GetSignature() string { - if m != nil { - return m.Signature - } - return "" -} - -type MsgSubmitOracleAttestationResponse struct { -} - -func (m *MsgSubmitOracleAttestationResponse) Reset() { *m = MsgSubmitOracleAttestationResponse{} } -func (m *MsgSubmitOracleAttestationResponse) String() string { return proto.CompactTextString(m) } -func (*MsgSubmitOracleAttestationResponse) ProtoMessage() {} -func (*MsgSubmitOracleAttestationResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_cb4091a52ebadfca, []int{5} -} -func (m *MsgSubmitOracleAttestationResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgSubmitOracleAttestationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgSubmitOracleAttestationResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgSubmitOracleAttestationResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSubmitOracleAttestationResponse.Merge(m, src) -} -func (m *MsgSubmitOracleAttestationResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgSubmitOracleAttestationResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSubmitOracleAttestationResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgSubmitOracleAttestationResponse proto.InternalMessageInfo - type MsgRequestAttestations struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` QueryId string `protobuf:"bytes,2,opt,name=queryId,proto3" json:"queryId,omitempty"` @@ -328,7 +38,7 @@ func (m *MsgRequestAttestations) Reset() { *m = MsgRequestAttestations{} func (m *MsgRequestAttestations) String() string { return proto.CompactTextString(m) } func (*MsgRequestAttestations) ProtoMessage() {} func (*MsgRequestAttestations) Descriptor() ([]byte, []int) { - return fileDescriptor_cb4091a52ebadfca, []int{6} + return fileDescriptor_cb4091a52ebadfca, []int{0} } func (m *MsgRequestAttestations) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -385,7 +95,7 @@ func (m *MsgRequestAttestationsResponse) Reset() { *m = MsgRequestAttest func (m *MsgRequestAttestationsResponse) String() string { return proto.CompactTextString(m) } func (*MsgRequestAttestationsResponse) ProtoMessage() {} func (*MsgRequestAttestationsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_cb4091a52ebadfca, []int{7} + return fileDescriptor_cb4091a52ebadfca, []int{1} } func (m *MsgRequestAttestationsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -415,12 +125,6 @@ func (m *MsgRequestAttestationsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgRequestAttestationsResponse proto.InternalMessageInfo func init() { - proto.RegisterType((*MsgRegisterOperatorPubkey)(nil), "layer.bridge.MsgRegisterOperatorPubkey") - proto.RegisterType((*MsgRegisterOperatorPubkeyResponse)(nil), "layer.bridge.MsgRegisterOperatorPubkeyResponse") - proto.RegisterType((*MsgSubmitBridgeValsetSignature)(nil), "layer.bridge.MsgSubmitBridgeValsetSignature") - proto.RegisterType((*MsgSubmitBridgeValsetSignatureResponse)(nil), "layer.bridge.MsgSubmitBridgeValsetSignatureResponse") - proto.RegisterType((*MsgSubmitOracleAttestation)(nil), "layer.bridge.MsgSubmitOracleAttestation") - proto.RegisterType((*MsgSubmitOracleAttestationResponse)(nil), "layer.bridge.MsgSubmitOracleAttestationResponse") proto.RegisterType((*MsgRequestAttestations)(nil), "layer.bridge.MsgRequestAttestations") proto.RegisterType((*MsgRequestAttestationsResponse)(nil), "layer.bridge.MsgRequestAttestationsResponse") } @@ -428,37 +132,24 @@ func init() { func init() { proto.RegisterFile("layer/bridge/tx.proto", fileDescriptor_cb4091a52ebadfca) } var fileDescriptor_cb4091a52ebadfca = []byte{ - // 465 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0x3f, 0x6f, 0xd3, 0x40, - 0x14, 0xc0, 0x73, 0x04, 0x51, 0xfa, 0x14, 0x31, 0x18, 0xd1, 0xba, 0x06, 0x59, 0x25, 0x54, 0x25, - 0xa0, 0x62, 0xf3, 0x6f, 0x62, 0xa3, 0x4c, 0x0c, 0x51, 0x91, 0x2b, 0x31, 0xb0, 0x20, 0xdb, 0x79, - 0x3a, 0x4e, 0xb5, 0x73, 0xee, 0xdd, 0x19, 0xc5, 0x23, 0x88, 0x0f, 0xc0, 0xce, 0x97, 0xe0, 0x63, - 0x30, 0x76, 0x64, 0x03, 0x25, 0x03, 0x5f, 0x03, 0xf9, 0x5c, 0x9b, 0x36, 0x89, 0x4f, 0x66, 0xb2, - 0xee, 0xdd, 0xcf, 0xf7, 0x7e, 0xef, 0xee, 0xe9, 0xc1, 0xad, 0x24, 0x2c, 0x50, 0xf8, 0x91, 0x60, - 0x13, 0x8a, 0xbe, 0x9a, 0x79, 0x99, 0xe0, 0x8a, 0x5b, 0x03, 0x1d, 0xf6, 0xaa, 0xb0, 0xb3, 0x1d, - 0x73, 0x99, 0x72, 0xe9, 0xa7, 0x92, 0xfa, 0x1f, 0x9f, 0x94, 0x9f, 0x0a, 0x1b, 0x9e, 0xc0, 0xce, - 0x58, 0xd2, 0x00, 0x29, 0x93, 0x0a, 0xc5, 0x51, 0x86, 0x22, 0x54, 0x5c, 0xbc, 0xc9, 0xa3, 0x13, - 0x2c, 0x2c, 0x1b, 0x36, 0x62, 0x81, 0x65, 0xc0, 0x26, 0xbb, 0x64, 0xb4, 0x19, 0xd4, 0x4b, 0x6b, - 0x1f, 0x6e, 0xf0, 0x4b, 0xac, 0x7d, 0x45, 0x03, 0x4b, 0xd1, 0x17, 0x83, 0xcf, 0x7f, 0xbe, 0x3f, - 0xac, 0xff, 0x1a, 0xde, 0x83, 0xbb, 0xad, 0xc9, 0x02, 0x94, 0x19, 0x9f, 0x4a, 0x1c, 0x7e, 0x21, - 0xe0, 0x8e, 0x25, 0x3d, 0xce, 0xa3, 0x94, 0xa9, 0x43, 0xad, 0xff, 0x36, 0x4c, 0x24, 0xaa, 0x63, - 0x46, 0xa7, 0xa1, 0xca, 0x05, 0x1a, 0xbc, 0xee, 0xc0, 0xa6, 0x62, 0x29, 0x4a, 0x15, 0xa6, 0xd9, - 0xb9, 0xd2, 0xbf, 0x40, 0xb9, 0x2b, 0xeb, 0x43, 0xec, 0x7e, 0xb5, 0xdb, 0x04, 0x96, 0x5c, 0x47, - 0xb0, 0x6f, 0xb6, 0x68, 0x84, 0xbf, 0x11, 0x70, 0x1a, 0xf4, 0x48, 0x84, 0x71, 0x82, 0x2f, 0x95, - 0x2a, 0x53, 0x2a, 0xc6, 0xa7, 0x06, 0xd9, 0x1d, 0xb8, 0x7e, 0x9a, 0xa3, 0x28, 0xde, 0xb3, 0x89, - 0x76, 0x1d, 0x04, 0x1b, 0x7a, 0xfd, 0x7a, 0x72, 0xb9, 0x8e, 0xbe, 0xb1, 0x8e, 0xab, 0xe6, 0x3a, - 0xf6, 0x60, 0xd8, 0x2e, 0xd7, 0xd4, 0x30, 0x83, 0x2d, 0xfd, 0x32, 0xa7, 0x39, 0x4a, 0x75, 0x01, - 0x90, 0x06, 0x7d, 0x1b, 0x6a, 0xdd, 0xf3, 0x9b, 0xee, 0x66, 0xbf, 0xe4, 0xb7, 0xab, 0x5f, 0x7b, - 0x4d, 0xe6, 0xda, 0xed, 0xe9, 0xaf, 0x3e, 0xf4, 0xc7, 0x92, 0x5a, 0x02, 0xb6, 0x5a, 0xfa, 0xf4, - 0xbe, 0x77, 0xb1, 0xd9, 0xbd, 0xd6, 0x1e, 0x73, 0xfc, 0x8e, 0x60, 0x9d, 0xdb, 0xfa, 0x44, 0xe0, - 0xb6, 0xa9, 0x13, 0x0f, 0x56, 0x0e, 0x34, 0xd0, 0xce, 0xf3, 0xff, 0xa1, 0x1b, 0x87, 0x1c, 0xb6, - 0xdb, 0x7a, 0x6b, 0xd4, 0x72, 0xe0, 0x0a, 0xe9, 0x3c, 0xee, 0x4a, 0x36, 0x69, 0x19, 0xdc, 0x5c, - 0xd7, 0x0f, 0x7b, 0x6b, 0xae, 0x70, 0x85, 0x72, 0x0e, 0xba, 0x50, 0x75, 0xaa, 0xc3, 0x57, 0x3f, - 0xe6, 0x2e, 0x39, 0x9b, 0xbb, 0xe4, 0xf7, 0xdc, 0x25, 0x5f, 0x17, 0x6e, 0xef, 0x6c, 0xe1, 0xf6, - 0x7e, 0x2e, 0xdc, 0xde, 0xbb, 0x07, 0x94, 0xa9, 0x0f, 0x79, 0xe4, 0xc5, 0x3c, 0xf5, 0x15, 0x26, - 0x09, 0x17, 0x8f, 0x18, 0xf7, 0xab, 0x89, 0x37, 0x6b, 0x66, 0x5e, 0x91, 0xa1, 0x8c, 0xae, 0xe9, - 0x81, 0xf6, 0xec, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x2f, 0x68, 0xb9, 0xfa, 0x10, 0x05, 0x00, - 0x00, + // 266 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcd, 0x49, 0xac, 0x4c, + 0x2d, 0xd2, 0x4f, 0x2a, 0xca, 0x4c, 0x49, 0x4f, 0xd5, 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, + 0xc9, 0x17, 0xe2, 0x01, 0x0b, 0xeb, 0x41, 0x84, 0xa5, 0xc4, 0x93, 0xf3, 0x8b, 0x73, 0xf3, 0x8b, + 0xf5, 0x73, 0x8b, 0xd3, 0xf5, 0xcb, 0x0c, 0x41, 0x14, 0x44, 0x99, 0x52, 0x05, 0x97, 0x98, 0x6f, + 0x71, 0x7a, 0x50, 0x6a, 0x61, 0x69, 0x6a, 0x71, 0x89, 0x63, 0x49, 0x49, 0x6a, 0x71, 0x49, 0x62, + 0x49, 0x66, 0x7e, 0x5e, 0xb1, 0x90, 0x04, 0x17, 0x7b, 0x72, 0x51, 0x6a, 0x62, 0x49, 0x7e, 0x91, + 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x67, 0x10, 0x8c, 0x0b, 0x92, 0x29, 0x2c, 0x4d, 0x2d, 0xaa, 0xf4, + 0x4c, 0x91, 0x60, 0x82, 0xc8, 0x40, 0xb9, 0x42, 0x32, 0x5c, 0x9c, 0x25, 0x99, 0xb9, 0x20, 0x33, + 0x72, 0x0b, 0x24, 0x98, 0xc1, 0x72, 0x08, 0x01, 0x2b, 0x9e, 0xa6, 0xe7, 0x1b, 0xb4, 0x60, 0xa6, + 0x28, 0x29, 0x70, 0xc9, 0x61, 0xb7, 0x39, 0x28, 0xb5, 0xb8, 0x20, 0x3f, 0xaf, 0x38, 0xd5, 0xa8, + 0x80, 0x8b, 0xd9, 0xb7, 0x38, 0x5d, 0x28, 0x93, 0x4b, 0x18, 0x9b, 0xfb, 0x54, 0xf4, 0x90, 0x7d, + 0xa8, 0x87, 0xdd, 0x2c, 0x29, 0x1d, 0x62, 0x54, 0xc1, 0x6c, 0x74, 0x72, 0x3e, 0xf1, 0x48, 0x8e, + 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, + 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0xcd, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, + 0xfc, 0x5c, 0xfd, 0x92, 0xd4, 0x9c, 0x9c, 0xfc, 0x22, 0xdd, 0xcc, 0x7c, 0x7d, 0x48, 0xd0, 0x57, + 0xc0, 0x03, 0xbf, 0xb2, 0x20, 0xb5, 0x38, 0x89, 0x0d, 0x1c, 0xb2, 0xc6, 0x80, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xed, 0x91, 0xbe, 0xa8, 0x99, 0x01, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -473,9 +164,6 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type MsgClient interface { - RegisterOperatorPubkey(ctx context.Context, in *MsgRegisterOperatorPubkey, opts ...grpc.CallOption) (*MsgRegisterOperatorPubkeyResponse, error) - SubmitBridgeValsetSignature(ctx context.Context, in *MsgSubmitBridgeValsetSignature, opts ...grpc.CallOption) (*MsgSubmitBridgeValsetSignatureResponse, error) - SubmitOracleAttestation(ctx context.Context, in *MsgSubmitOracleAttestation, opts ...grpc.CallOption) (*MsgSubmitOracleAttestationResponse, error) RequestAttestations(ctx context.Context, in *MsgRequestAttestations, opts ...grpc.CallOption) (*MsgRequestAttestationsResponse, error) } @@ -487,33 +175,6 @@ func NewMsgClient(cc grpc1.ClientConn) MsgClient { return &msgClient{cc} } -func (c *msgClient) RegisterOperatorPubkey(ctx context.Context, in *MsgRegisterOperatorPubkey, opts ...grpc.CallOption) (*MsgRegisterOperatorPubkeyResponse, error) { - out := new(MsgRegisterOperatorPubkeyResponse) - err := c.cc.Invoke(ctx, "/layer.bridge.Msg/RegisterOperatorPubkey", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) SubmitBridgeValsetSignature(ctx context.Context, in *MsgSubmitBridgeValsetSignature, opts ...grpc.CallOption) (*MsgSubmitBridgeValsetSignatureResponse, error) { - out := new(MsgSubmitBridgeValsetSignatureResponse) - err := c.cc.Invoke(ctx, "/layer.bridge.Msg/SubmitBridgeValsetSignature", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) SubmitOracleAttestation(ctx context.Context, in *MsgSubmitOracleAttestation, opts ...grpc.CallOption) (*MsgSubmitOracleAttestationResponse, error) { - out := new(MsgSubmitOracleAttestationResponse) - err := c.cc.Invoke(ctx, "/layer.bridge.Msg/SubmitOracleAttestation", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *msgClient) RequestAttestations(ctx context.Context, in *MsgRequestAttestations, opts ...grpc.CallOption) (*MsgRequestAttestationsResponse, error) { out := new(MsgRequestAttestationsResponse) err := c.cc.Invoke(ctx, "/layer.bridge.Msg/RequestAttestations", in, out, opts...) @@ -525,9 +186,6 @@ func (c *msgClient) RequestAttestations(ctx context.Context, in *MsgRequestAttes // MsgServer is the server API for Msg service. type MsgServer interface { - RegisterOperatorPubkey(context.Context, *MsgRegisterOperatorPubkey) (*MsgRegisterOperatorPubkeyResponse, error) - SubmitBridgeValsetSignature(context.Context, *MsgSubmitBridgeValsetSignature) (*MsgSubmitBridgeValsetSignatureResponse, error) - SubmitOracleAttestation(context.Context, *MsgSubmitOracleAttestation) (*MsgSubmitOracleAttestationResponse, error) RequestAttestations(context.Context, *MsgRequestAttestations) (*MsgRequestAttestationsResponse, error) } @@ -535,15 +193,6 @@ type MsgServer interface { type UnimplementedMsgServer struct { } -func (*UnimplementedMsgServer) RegisterOperatorPubkey(ctx context.Context, req *MsgRegisterOperatorPubkey) (*MsgRegisterOperatorPubkeyResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RegisterOperatorPubkey not implemented") -} -func (*UnimplementedMsgServer) SubmitBridgeValsetSignature(ctx context.Context, req *MsgSubmitBridgeValsetSignature) (*MsgSubmitBridgeValsetSignatureResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SubmitBridgeValsetSignature not implemented") -} -func (*UnimplementedMsgServer) SubmitOracleAttestation(ctx context.Context, req *MsgSubmitOracleAttestation) (*MsgSubmitOracleAttestationResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SubmitOracleAttestation not implemented") -} func (*UnimplementedMsgServer) RequestAttestations(ctx context.Context, req *MsgRequestAttestations) (*MsgRequestAttestationsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RequestAttestations not implemented") } @@ -552,60 +201,6 @@ func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) } -func _Msg_RegisterOperatorPubkey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgRegisterOperatorPubkey) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).RegisterOperatorPubkey(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/layer.bridge.Msg/RegisterOperatorPubkey", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).RegisterOperatorPubkey(ctx, req.(*MsgRegisterOperatorPubkey)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_SubmitBridgeValsetSignature_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgSubmitBridgeValsetSignature) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).SubmitBridgeValsetSignature(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/layer.bridge.Msg/SubmitBridgeValsetSignature", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SubmitBridgeValsetSignature(ctx, req.(*MsgSubmitBridgeValsetSignature)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_SubmitOracleAttestation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgSubmitOracleAttestation) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).SubmitOracleAttestation(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/layer.bridge.Msg/SubmitOracleAttestation", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SubmitOracleAttestation(ctx, req.(*MsgSubmitOracleAttestation)) - } - return interceptor(ctx, in, info, handler) -} - func _Msg_RequestAttestations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgRequestAttestations) if err := dec(in); err != nil { @@ -628,18 +223,6 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "layer.bridge.Msg", HandlerType: (*MsgServer)(nil), Methods: []grpc.MethodDesc{ - { - MethodName: "RegisterOperatorPubkey", - Handler: _Msg_RegisterOperatorPubkey_Handler, - }, - { - MethodName: "SubmitBridgeValsetSignature", - Handler: _Msg_SubmitBridgeValsetSignature_Handler, - }, - { - MethodName: "SubmitOracleAttestation", - Handler: _Msg_SubmitOracleAttestation_Handler, - }, { MethodName: "RequestAttestations", Handler: _Msg_RequestAttestations_Handler, @@ -649,7 +232,7 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ Metadata: "layer/bridge/tx.proto", } -func (m *MsgRegisterOperatorPubkey) Marshal() (dAtA []byte, err error) { +func (m *MsgRequestAttestations) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -659,213 +242,12 @@ func (m *MsgRegisterOperatorPubkey) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgRegisterOperatorPubkey) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgRequestAttestations) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgRegisterOperatorPubkey) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.OperatorPubkey) > 0 { - i -= len(m.OperatorPubkey) - copy(dAtA[i:], m.OperatorPubkey) - i = encodeVarintTx(dAtA, i, uint64(len(m.OperatorPubkey))) - i-- - dAtA[i] = 0x12 - } - if len(m.Creator) > 0 { - i -= len(m.Creator) - copy(dAtA[i:], m.Creator) - i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgRegisterOperatorPubkeyResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgRegisterOperatorPubkeyResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgRegisterOperatorPubkeyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgSubmitBridgeValsetSignature) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgSubmitBridgeValsetSignature) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgSubmitBridgeValsetSignature) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintTx(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x1a - } - if len(m.Timestamp) > 0 { - i -= len(m.Timestamp) - copy(dAtA[i:], m.Timestamp) - i = encodeVarintTx(dAtA, i, uint64(len(m.Timestamp))) - i-- - dAtA[i] = 0x12 - } - if len(m.Creator) > 0 { - i -= len(m.Creator) - copy(dAtA[i:], m.Creator) - i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgSubmitBridgeValsetSignatureResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgSubmitBridgeValsetSignatureResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgSubmitBridgeValsetSignatureResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgSubmitOracleAttestation) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgSubmitOracleAttestation) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgSubmitOracleAttestation) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintTx(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x22 - } - if len(m.Timestamp) > 0 { - i -= len(m.Timestamp) - copy(dAtA[i:], m.Timestamp) - i = encodeVarintTx(dAtA, i, uint64(len(m.Timestamp))) - i-- - dAtA[i] = 0x1a - } - if len(m.QueryId) > 0 { - i -= len(m.QueryId) - copy(dAtA[i:], m.QueryId) - i = encodeVarintTx(dAtA, i, uint64(len(m.QueryId))) - i-- - dAtA[i] = 0x12 - } - if len(m.Creator) > 0 { - i -= len(m.Creator) - copy(dAtA[i:], m.Creator) - i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgSubmitOracleAttestationResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgSubmitOracleAttestationResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgSubmitOracleAttestationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgRequestAttestations) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgRequestAttestations) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgRequestAttestations) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgRequestAttestations) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -928,96 +310,6 @@ func encodeVarintTx(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *MsgRegisterOperatorPubkey) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.OperatorPubkey) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgRegisterOperatorPubkeyResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgSubmitBridgeValsetSignature) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Timestamp) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgSubmitBridgeValsetSignatureResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgSubmitOracleAttestation) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.QueryId) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Timestamp) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgSubmitOracleAttestationResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - func (m *MsgRequestAttestations) Size() (n int) { if m == nil { return 0 @@ -1054,596 +346,6 @@ func sovTx(x uint64) (n int) { func sozTx(x uint64) (n int) { return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *MsgRegisterOperatorPubkey) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgRegisterOperatorPubkey: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRegisterOperatorPubkey: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OperatorPubkey", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OperatorPubkey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgRegisterOperatorPubkeyResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgRegisterOperatorPubkeyResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRegisterOperatorPubkeyResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgSubmitBridgeValsetSignature) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgSubmitBridgeValsetSignature: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSubmitBridgeValsetSignature: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Timestamp = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgSubmitBridgeValsetSignatureResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgSubmitBridgeValsetSignatureResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSubmitBridgeValsetSignatureResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgSubmitOracleAttestation) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgSubmitOracleAttestation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSubmitOracleAttestation: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field QueryId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.QueryId = append(m.QueryId[:0], dAtA[iNdEx:postIndex]...) - if m.QueryId == nil { - m.QueryId = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Timestamp = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgSubmitOracleAttestationResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgSubmitOracleAttestationResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSubmitOracleAttestationResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *MsgRequestAttestations) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 From c51827a4431c0a151c4a6a87e3cb6de909b1b0e6 Mon Sep 17 00:00:00 2001 From: tkernell Date: Tue, 9 Apr 2024 18:32:46 -0500 Subject: [PATCH 16/18] remove logs --- app/extend_vote.go | 16 - app/proposal_handler.go | 5 - docs/static/openapi.yml | 2134 ++++++++++++++++- evm/test/Bridge-TestsAuto.js | 65 +- x/bridge/keeper/keeper.go | 42 +- .../keeper/msg_server_request_attestations.go | 1 - x/oracle/keeper/query_id_timestamp_pair.go | 31 - 7 files changed, 2174 insertions(+), 120 deletions(-) delete mode 100644 x/oracle/keeper/query_id_timestamp_pair.go diff --git a/app/extend_vote.go b/app/extend_vote.go index 031ee1178..9bf2390cf 100644 --- a/app/extend_vote.go +++ b/app/extend_vote.go @@ -94,7 +94,6 @@ func NewVoteExtHandler(logger log.Logger, appCodec codec.Codec, oracleKeeper Ora } func (h *VoteExtHandler) ExtendVoteHandler(ctx sdk.Context, req *abci.RequestExtendVote) (*abci.ResponseExtendVote, error) { - h.logger.Info("@ExtendVoteHandler") // check if evm address by operator exists voteExt := BridgeVoteExtension{} operatorAddress, err := h.GetOperatorAddress() @@ -104,7 +103,6 @@ func (h *VoteExtHandler) ExtendVoteHandler(ctx sdk.Context, req *abci.RequestExt _, err = h.bridgeKeeper.GetEVMAddressByOperator(ctx, operatorAddress) if err != nil { h.logger.Info("EVM address not found for operator address", "operatorAddress", operatorAddress) - h.logger.Info("Error message", "error", err) initialSigA, initialSigB, err := h.SignInitialMessage() if err != nil { h.logger.Info("Failed to sign initial message", "error", err) @@ -159,7 +157,6 @@ func (h *VoteExtHandler) ExtendVoteHandler(ctx sdk.Context, req *abci.RequestExt Timestamp: timestamp, } voteExt.ValsetSignature = valsetSignature - h.logger.Info("Vote extension data", "voteExt", voteExt) bz, err := json.Marshal(voteExt) if err != nil { @@ -169,7 +166,6 @@ func (h *VoteExtHandler) ExtendVoteHandler(ctx sdk.Context, req *abci.RequestExt } func (h *VoteExtHandler) VerifyVoteExtensionHandler(ctx sdk.Context, req *abci.RequestVerifyVoteExtension) (*abci.ResponseVerifyVoteExtension, error) { - h.logger.Info("@VerifyVoteExtensionHandler") // TODO: implement the logic to verify the vote extension return &abci.ResponseVerifyVoteExtension{Status: abci.ResponseVerifyVoteExtension_ACCEPT}, nil } @@ -291,19 +287,7 @@ func (h *VoteExtHandler) SignMessage(msg []byte) ([]byte, error) { fmt.Printf("Failed to create keyring: %v\n", err) return nil, err } - - krlist, err := kr.List() - if err != nil { - fmt.Printf("Failed to list keys: %v\n", err) - return nil, err - } - - for _, k := range krlist { - fmt.Println("name: ", k.Name) - } - // sign message - // tempmsg := []byte("hello") sig, _, err := kr.Sign(keyName, msg, 1) if err != nil { fmt.Printf("Failed to sign message: %v\n", err) diff --git a/app/proposal_handler.go b/app/proposal_handler.go index 9715721dc..b9a91a18f 100644 --- a/app/proposal_handler.go +++ b/app/proposal_handler.go @@ -56,7 +56,6 @@ func NewProposalHandler(logger log.Logger, valStore baseapp.ValidatorStore, appC } func (h *ProposalHandler) PrepareProposalHandler(ctx sdk.Context, req *abci.RequestPrepareProposal) (*abci.ResponsePrepareProposal, error) { - h.logger.Info("@PrepareProposalHandler") err := baseapp.ValidateVoteExtensions(ctx, h.valStore, req.Height, ctx.ChainID(), req.LocalLastCommit) if err != nil { h.logger.Info("failed to validate vote extensions", "error", err) @@ -135,12 +134,10 @@ func (h *ProposalHandler) PrepareProposalHandler(ctx sdk.Context, req *abci.Requ } func (h *ProposalHandler) ProcessProposalHandler(ctx sdk.Context, req *abci.RequestProcessProposal) (*abci.ResponseProcessProposal, error) { - h.logger.Info("@ProcessProposalHandler") return &abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_ACCEPT}, nil } func (h *ProposalHandler) PreBlocker(ctx sdk.Context, req *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error) { - h.logger.Info("@PreBlocker") res := &sdk.ResponsePreBlock{} if len(req.Txs) == 0 { return res, nil @@ -262,7 +259,6 @@ func (h *ProposalHandler) CheckValsetSignaturesFromLastCommit(ctx sdk.Context, c func (h *ProposalHandler) SetEVMAddresses(ctx sdk.Context, operatorAddresses []string, evmAddresses []string) error { for i, operatorAddress := range operatorAddresses { - h.logger.Info("SetEVMAddressByOperator", "operatorAddress", operatorAddress, "evmAddress", evmAddresses[i]) err := h.bridgeKeeper.SetEVMAddressByOperator(ctx, operatorAddress, evmAddresses[i]) if err != nil { h.logger.Error("failed to set evm address by operator", "error", err) @@ -308,7 +304,6 @@ func (h *ProposalHandler) CheckOracleAttestationsFromLastCommit(ctx sdk.Context, h.logger.Error("failed to get operator address from vote", "error", err) return nil, nil, nil, err } - h.logger.Info("Operator address from oracle attestation", "operatorAddress", operatorAddress) operatorAddresses = append(operatorAddresses, operatorAddress) diff --git a/docs/static/openapi.yml b/docs/static/openapi.yml index fd9777ba9..06d555e2c 100644 --- a/docs/static/openapi.yml +++ b/docs/static/openapi.yml @@ -3,6 +3,1460 @@ info: title: HTTP API Console name: '' description: '' +paths: + /layer/bridge/get_attestation_data_by_snapshot/{snapshot}: + get: + operationId: LayerBridgeGetAttestationDataBySnapshot + responses: + '200': + description: A successful response. + schema: + type: object + properties: + queryId: + type: string + timestamp: + type: string + aggregateValue: + type: string + aggregatePower: + type: string + checkpoint: + type: string + attestationTimestamp: + type: string + previousReportTimestamp: + type: string + nextReportTimestamp: + type: string + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: snapshot + in: path + required: true + type: string + tags: + - Query + /layer/bridge/get_attestations_by_snapshot/{snapshot}: + get: + operationId: LayerBridgeGetAttestationsBySnapshot + responses: + '200': + description: A successful response. + schema: + type: object + properties: + attestations: + type: array + items: + type: string + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: snapshot + in: path + required: true + type: string + tags: + - Query + /layer/bridge/get_current_aggregate_report/{query_id}: + get: + operationId: LayerBridgeGetCurrentAggregateReport + responses: + '200': + description: A successful response. + schema: + type: object + properties: + aggregate: + type: object + properties: + query_id: + type: string + format: byte + aggregateValue: + type: string + aggregateReporter: + type: string + reporterPower: + type: string + format: int64 + standardDeviation: + type: number + format: double + reporters: + type: array + items: + type: object + properties: + reporter: + type: string + power: + type: string + format: int64 + flagged: + type: boolean + nonce: + type: string + format: int64 + aggregateReportIndex: + type: string + format: int64 + height: + type: string + format: int64 + timestamp: + type: string + format: uint64 + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: query_id + in: path + required: true + type: string + format: byte + tags: + - Query + /layer/bridge/get_data_before/{query_id}/{timestamp}: + get: + operationId: LayerBridgeGetDataBefore + responses: + '200': + description: A successful response. + schema: + type: object + properties: + aggregate: + type: object + properties: + query_id: + type: string + format: byte + aggregateValue: + type: string + aggregateReporter: + type: string + reporterPower: + type: string + format: int64 + standardDeviation: + type: number + format: double + reporters: + type: array + items: + type: object + properties: + reporter: + type: string + power: + type: string + format: int64 + flagged: + type: boolean + nonce: + type: string + format: uint64 + aggregateReportIndex: + type: string + format: int64 + height: + type: string + format: int64 + timestamp: + type: string + format: uint64 + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: query_id + in: path + required: true + type: string + format: byte + - name: timestamp + in: path + required: true + type: string + format: int64 + tags: + - Query + /layer/bridge/get_evm_address_by_validator_address/{validatorAddress}: + get: + operationId: LayerBridgeGetEvmAddressByValidatorAddress + responses: + '200': + description: A successful response. + schema: + type: object + properties: + evmAddress: + type: string + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: validatorAddress + in: path + required: true + type: string + tags: + - Query + /layer/bridge/get_evm_validators: + get: + summary: Queries a list of GetEvmValidators items. + operationId: LayerBridgeGetEvmValidators + responses: + '200': + description: A successful response. + schema: + type: object + properties: + bridgeValidatorSet: + type: array + items: + type: object + properties: + ethereumAddress: + type: string + power: + type: string + format: uint64 + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - Query + /layer/bridge/get_snapshots_by_report/{queryId}/{timestamp}: + get: + operationId: LayerBridgeGetSnapshotsByReport + responses: + '200': + description: A successful response. + schema: + type: object + properties: + snapshots: + type: array + items: + type: string + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: queryId + in: path + required: true + type: string + - name: timestamp + in: path + required: true + type: string + tags: + - Query + /layer/bridge/get_validator_checkpoint: + get: + operationId: LayerBridgeGetValidatorCheckpoint + responses: + '200': + description: A successful response. + schema: + type: object + properties: + validatorCheckpoint: + type: string + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - Query + /layer/bridge/get_validator_checkpoint_params/{timestamp}: + get: + operationId: LayerBridgeGetValidatorCheckpointParams + responses: + '200': + description: A successful response. + schema: + type: object + properties: + checkpoint: + type: string + valsetHash: + type: string + timestamp: + type: string + format: int64 + powerThreshold: + type: string + format: int64 + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: timestamp + in: path + required: true + type: string + format: int64 + tags: + - Query + /layer/bridge/get_validator_timestamp_by_index/{index}: + get: + operationId: LayerBridgeGetValidatorTimestampByIndex + responses: + '200': + description: A successful response. + schema: + type: object + properties: + timestamp: + type: string + format: int64 + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: index + in: path + required: true + type: string + format: int64 + tags: + - Query + /layer/bridge/get_valset_by_timestamp/{timestamp}: + get: + operationId: LayerBridgeGetValsetByTimestamp + responses: + '200': + description: A successful response. + schema: + type: object + properties: + bridgeValidatorSet: + type: array + items: + type: object + properties: + ethereumAddress: + type: string + power: + type: string + format: uint64 + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: timestamp + in: path + required: true + type: string + format: int64 + tags: + - Query + /layer/bridge/get_valset_sigs/{timestamp}: + get: + operationId: LayerBridgeGetValsetSigs + responses: + '200': + description: A successful response. + schema: + type: object + properties: + signatures: + type: array + items: + type: string + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: timestamp + in: path + required: true + type: string + format: int64 + tags: + - Query + /layer/bridge/params: + get: + summary: Parameters queries the parameters of the module. + operationId: LayerBridgeParams + responses: + '200': + description: A successful response. + schema: + type: object + properties: + params: + description: params holds all the parameters of this module. + type: object + description: >- + QueryParamsResponse is response type for the Query/Params RPC + method. + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - Query + /tellor-io/layer/dispute/params: + get: + summary: Parameters queries the parameters of the module. + operationId: LayerDisputeParams + responses: + '200': + description: A successful response. + schema: + type: object + properties: + params: + description: params holds all the parameters of this module. + type: object + description: >- + QueryParamsResponse is response type for the Query/Params RPC + method. + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - Query + /layer/oracle/get_reportsby_qid/{query_id}: + get: + summary: Queries a list of GetReportsbyQid items. + operationId: LayerOracleGetReportsbyQid + responses: + '200': + description: A successful response. + schema: + type: object + properties: + reports: + type: object + properties: + microReports: + type: array + items: + type: object + properties: + reporter: + type: string + title: reporter is the address of the reporter + power: + type: string + format: int64 + title: >- + the power of the reporter based on total tokens + normalized + query_type: + type: string + title: string identifier of the data spec + query_id: + type: string + format: byte + title: hash of the query data + aggregate_method: + type: string + title: >- + aggregate method to use for aggregating all the + reports for the query id + value: + type: string + title: hex string of the response value + timestamp: + type: string + format: date-time + title: timestamp of when the report was created + cyclelist: + type: boolean + title: >- + indicates if the report's query id is in the + cyclelist + block_number: + type: string + format: int64 + title: block number of when the report was created + title: MicroReport represents data for a single report + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: query_id + in: path + required: true + type: string + format: byte + tags: + - Query + /layer/oracle/get_reportsby_reporter/{reporter}: + get: + operationId: LayerOracleGetReportsbyReporter + responses: + '200': + description: A successful response. + schema: + type: object + properties: + microReports: + type: array + items: + type: object + properties: + reporter: + type: string + title: reporter is the address of the reporter + power: + type: string + format: int64 + title: >- + the power of the reporter based on total tokens + normalized + query_type: + type: string + title: string identifier of the data spec + query_id: + type: string + format: byte + title: hash of the query data + aggregate_method: + type: string + title: >- + aggregate method to use for aggregating all the reports + for the query id + value: + type: string + title: hex string of the response value + timestamp: + type: string + format: date-time + title: timestamp of when the report was created + cyclelist: + type: boolean + title: indicates if the report's query id is in the cyclelist + block_number: + type: string + format: int64 + title: block number of when the report was created + title: MicroReport represents data for a single report + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: reporter + in: path + required: true + type: string + tags: + - Query + /layer/oracle/get_reportsby_reporter_qid/{reporter}/{query_id}: + get: + operationId: LayerOracleGetReportsbyReporterQid + responses: + '200': + description: A successful response. + schema: + type: object + properties: + reports: + type: object + properties: + microReports: + type: array + items: + type: object + properties: + reporter: + type: string + title: reporter is the address of the reporter + power: + type: string + format: int64 + title: >- + the power of the reporter based on total tokens + normalized + query_type: + type: string + title: string identifier of the data spec + query_id: + type: string + format: byte + title: hash of the query data + aggregate_method: + type: string + title: >- + aggregate method to use for aggregating all the + reports for the query id + value: + type: string + title: hex string of the response value + timestamp: + type: string + format: date-time + title: timestamp of when the report was created + cyclelist: + type: boolean + title: >- + indicates if the report's query id is in the + cyclelist + block_number: + type: string + format: int64 + title: block number of when the report was created + title: MicroReport represents data for a single report + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: reporter + in: path + required: true + type: string + - name: query_id + in: path + required: true + type: string + format: byte + tags: + - Query + /layer/oracle/params: + get: + summary: Parameters queries the parameters of the module. + operationId: LayerOracleParams + responses: + '200': + description: A successful response. + schema: + type: object + properties: + params: + description: params holds all the parameters of this module. + type: object + properties: + minStakeAmount: + type: string + description: >- + QueryParamsResponse is response type for the Query/Params RPC + method. + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - Query + /tellor-io/layer/oracle/GetDataBefore/{query_id}/{timestamp}: + get: + summary: Queries a list of GetAggregatedReport items. + operationId: LayerOracleGetDataBefore + responses: + '200': + description: A successful response. + schema: + type: object + properties: + report: + type: object + properties: + query_id: + type: string + format: byte + aggregateValue: + type: string + aggregateReporter: + type: string + reporterPower: + type: string + format: int64 + standardDeviation: + type: number + format: double + reporters: + type: array + items: + type: object + properties: + reporter: + type: string + power: + type: string + format: int64 + flagged: + type: boolean + nonce: + type: string + format: uint64 + aggregateReportIndex: + type: string + format: int64 + height: + type: string + format: int64 + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: query_id + in: path + required: true + type: string + format: byte + - name: timestamp + in: path + required: true + type: string + format: int64 + tags: + - Query + /tellor-io/layer/oracle/current_cyclelist_query: + get: + summary: Queries a list of CurrentCyclelistQuery items. + operationId: LayerOracleCurrentCyclelistQuery + responses: + '200': + description: A successful response. + schema: + type: object + properties: + query_data: + type: string + format: byte + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - Query + /tellor-io/layer/oracle/get_aggregated_report/{query_id}: + get: + summary: Queries a list of GetAggregatedReport items. + operationId: LayerOracleGetAggregatedReport + responses: + '200': + description: A successful response. + schema: + type: object + properties: + report: + type: object + properties: + query_id: + type: string + format: byte + aggregateValue: + type: string + aggregateReporter: + type: string + reporterPower: + type: string + format: int64 + standardDeviation: + type: number + format: double + reporters: + type: array + items: + type: object + properties: + reporter: + type: string + power: + type: string + format: int64 + flagged: + type: boolean + nonce: + type: string + format: uint64 + aggregateReportIndex: + type: string + format: int64 + height: + type: string + format: int64 + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: query_id + in: path + required: true + type: string + format: byte + tags: + - Query + /tellor-io/layer/oracle/get_current_tip/{query_data}: + get: + summary: Queries a list of GetCurrentTip items. + operationId: LayerOracleGetCurrentTip + responses: + '200': + description: A successful response. + schema: + type: object + properties: + tips: + type: object + properties: + query_data: + type: string + format: byte + title: query_data is the query data that was tipped + amount: + type: string + title: the amount that was tipped + total_tips: + type: string + title: >- + totalTips is the total amount of tips for this query data + so far + title: >- + Tips is a struct that contains the query data and the amount + it was tipped + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: query_data + in: path + required: true + type: string + format: byte + tags: + - Query + /tellor-io/layer/oracle/get_time_based_rewards: + get: + summary: Queries a list of GetTimeBasedRewards items. + operationId: LayerOracleGetTimeBasedRewards + responses: + '200': + description: A successful response. + schema: + type: object + properties: + reward: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - Query + /tellor-io/layer/oracle/get_user_tip_total/{tipper}/{query_data}: + get: + summary: Queries a list of GetUserTipTotal items. + operationId: LayerOracleGetUserTipTotal + responses: + '200': + description: A successful response. + schema: + type: object + properties: + totalTips: + type: object + properties: + address: + type: string + total: + type: string + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: tipper + in: path + required: true + type: string + - name: query_data + in: path + required: true + type: string + format: byte + tags: + - Query + /layer/registry/decode_querydata/{query_data}: + get: + summary: Queries a list of DecodeQuerydata items. + operationId: LayerRegistryDecodeQuerydata + responses: + '200': + description: A successful response. + schema: + type: object + properties: + spec: + type: string + description: >- + spec is the decoded json represention of the query data hex + string. + description: >- + QueryDecodeQuerydataResponse is response type for the + Query/DecodeQuerydata RPC method. + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: query_data + description: query_data is the query data hex string to be decoded. + in: path + required: true + type: string + format: byte + tags: + - Query + /layer/registry/decode_value/{queryType}/{value}: + get: + summary: Queries a list of DecodeValue items. + operationId: LayerRegistryDecodeValue + responses: + '200': + description: A successful response. + schema: + type: object + properties: + decodedValue: + type: string + description: decodedValue is the decoded value of the hex string. + description: >- + QueryDecodeValueResponse is response type for the + Query/DecodeValue RPC method. + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: queryType + description: queryType is the key to fetch a the corresponding data spec. + in: path + required: true + type: string + - name: value + description: value is the value hex string to be decoded. + in: path + required: true + type: string + tags: + - Query + /layer/registry/generate_querydata/{querytype}/{parameters}: + get: + summary: Queries a list of GenerateQuerydata items. + operationId: LayerRegistryGenerateQuerydata + responses: + '200': + description: A successful response. + schema: + type: object + properties: + query_data: + type: string + format: byte + description: query_data is the generated query_data hex string. + description: >- + QueryGenerateQuerydataResponse is response type for the + Query/GenerateQuerydata RPC method. + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: querytype + description: querytype for which query_data is to be generated. + in: path + required: true + type: string + - name: parameters + description: parameters for which query_data is to be generated. + in: path + required: true + type: string + tags: + - Query + /layer/registry/get_data_spec/{query_type}: + get: + summary: Queries a list of GetDataSpec items. + operationId: LayerRegistryGetDataSpec + responses: + '200': + description: A successful response. + schema: + $ref: '#/definitions/layer.registry.QueryGetDataSpecResponse' + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: query_type + description: queryType is the key to fetch a the corresponding data spec. + in: path + required: true + type: string + tags: + - Query + /layer/registry/params: + get: + summary: Parameters queries the parameters of the module. + operationId: LayerRegistryParams + responses: + '200': + description: A successful response. + schema: + type: object + properties: + params: + description: params holds all the parameters of this module. + type: object + description: >- + QueryParamsResponse is response type for the Query/Params RPC + method. + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - Query definitions: cosmos.auth.v1beta1.MsgUpdateParamsResponse: type: object @@ -2027,11 +3481,638 @@ definitions: description: |- Version defines the versioning scheme used to negotiate the IBC verison in the connection handshake. - layer.bridge.MsgRegisterOperatorPubkeyResponse: + layer.bridge.Aggregate: + type: object + properties: + query_id: + type: string + format: byte + aggregateValue: + type: string + aggregateReporter: + type: string + reporterPower: + type: string + format: int64 + standardDeviation: + type: number + format: double + reporters: + type: array + items: + type: object + properties: + reporter: + type: string + power: + type: string + format: int64 + flagged: + type: boolean + nonce: + type: string + format: int64 + aggregateReportIndex: + type: string + format: int64 + height: + type: string + format: int64 + layer.bridge.AggregateReporter: + type: object + properties: + reporter: + type: string + power: + type: string + format: int64 + layer.bridge.BridgeValidator: + type: object + properties: + ethereumAddress: + type: string + power: + type: string + format: uint64 + layer.bridge.Params: + type: object + description: Params defines the parameters for the module. + layer.bridge.QueryGetAttestationDataBySnapshotResponse: + type: object + properties: + queryId: + type: string + timestamp: + type: string + aggregateValue: + type: string + aggregatePower: + type: string + checkpoint: + type: string + attestationTimestamp: + type: string + previousReportTimestamp: + type: string + nextReportTimestamp: + type: string + layer.bridge.QueryGetAttestationsBySnapshotResponse: + type: object + properties: + attestations: + type: array + items: + type: string + layer.bridge.QueryGetCurrentAggregateReportResponse: + type: object + properties: + aggregate: + type: object + properties: + query_id: + type: string + format: byte + aggregateValue: + type: string + aggregateReporter: + type: string + reporterPower: + type: string + format: int64 + standardDeviation: + type: number + format: double + reporters: + type: array + items: + type: object + properties: + reporter: + type: string + power: + type: string + format: int64 + flagged: + type: boolean + nonce: + type: string + format: int64 + aggregateReportIndex: + type: string + format: int64 + height: + type: string + format: int64 + timestamp: + type: string + format: uint64 + layer.bridge.QueryGetDataBeforeResponse: + type: object + properties: + aggregate: + type: object + properties: + query_id: + type: string + format: byte + aggregateValue: + type: string + aggregateReporter: + type: string + reporterPower: + type: string + format: int64 + standardDeviation: + type: number + format: double + reporters: + type: array + items: + type: object + properties: + reporter: + type: string + power: + type: string + format: int64 + flagged: + type: boolean + nonce: + type: string + format: uint64 + aggregateReportIndex: + type: string + format: int64 + height: + type: string + format: int64 + timestamp: + type: string + format: uint64 + layer.bridge.QueryGetEvmAddressByValidatorAddressResponse: + type: object + properties: + evmAddress: + type: string + layer.bridge.QueryGetEvmValidatorsResponse: + type: object + properties: + bridgeValidatorSet: + type: array + items: + type: object + properties: + ethereumAddress: + type: string + power: + type: string + format: uint64 + layer.bridge.QueryGetSnapshotsByReportResponse: + type: object + properties: + snapshots: + type: array + items: + type: string + layer.bridge.QueryGetValidatorCheckpointParamsResponse: + type: object + properties: + checkpoint: + type: string + valsetHash: + type: string + timestamp: + type: string + format: int64 + powerThreshold: + type: string + format: int64 + layer.bridge.QueryGetValidatorCheckpointResponse: + type: object + properties: + validatorCheckpoint: + type: string + layer.bridge.QueryGetValidatorTimestampByIndexResponse: + type: object + properties: + timestamp: + type: string + format: int64 + layer.bridge.QueryGetValsetByTimestampResponse: + type: object + properties: + bridgeValidatorSet: + type: array + items: + type: object + properties: + ethereumAddress: + type: string + power: + type: string + format: uint64 + layer.bridge.QueryGetValsetSigsResponse: + type: object + properties: + signatures: + type: array + items: + type: string + layer.bridge.QueryParamsResponse: + type: object + properties: + params: + description: params holds all the parameters of this module. + type: object + description: QueryParamsResponse is response type for the Query/Params RPC method. + layer.oracle.Aggregate: + type: object + properties: + query_id: + type: string + format: byte + aggregateValue: + type: string + aggregateReporter: + type: string + reporterPower: + type: string + format: int64 + standardDeviation: + type: number + format: double + reporters: + type: array + items: + type: object + properties: + reporter: + type: string + power: + type: string + format: int64 + flagged: + type: boolean + nonce: + type: string + format: uint64 + aggregateReportIndex: + type: string + format: int64 + height: + type: string + format: int64 + layer.oracle.AggregateReporter: + type: object + properties: + reporter: + type: string + power: + type: string + format: int64 + layer.bridge.MsgRequestAttestationsResponse: + type: object + layer.dispute.Params: + type: object + description: Params defines the parameters for the module. + layer.dispute.QueryParamsResponse: + type: object + properties: + params: + description: params holds all the parameters of this module. + type: object + description: QueryParamsResponse is response type for the Query/Params RPC method. + layer.dispute.DisputeCategory: + type: string + enum: + - DISPUTE_CATEGORY_UNSPECIFIED + - DISPUTE_CATEGORY_WARNING + - DISPUTE_CATEGORY_MINOR + - DISPUTE_CATEGORY_MAJOR + default: DISPUTE_CATEGORY_UNSPECIFIED + description: |- + DisputeCategory defines the severity of a dispute. + + - DISPUTE_CATEGORY_UNSPECIFIED: UNSPECIFIED defines an invalid dispute category. + - DISPUTE_CATEGORY_WARNING: WARNING defines a 1 percent slashing. + - DISPUTE_CATEGORY_MINOR: MINOR defines a 5 percent slashing. + - DISPUTE_CATEGORY_MAJOR: MAJOR defines a 100 percent slashing. + layer.dispute.MsgAddFeeToDisputeResponse: + type: object + layer.dispute.MsgProposeDisputeResponse: + type: object + layer.dispute.MsgVoteResponse: + type: object + layer.dispute.VoteEnum: + type: string + enum: + - VOTE_INVALID + - VOTE_SUPPORT + - VOTE_AGAINST + default: VOTE_INVALID + layer.oracle.MicroReport: + type: object + properties: + reporter: + type: string + title: reporter is the address of the reporter + power: + type: string + format: int64 + title: the power of the reporter based on total tokens normalized + query_type: + type: string + title: string identifier of the data spec + query_id: + type: string + format: byte + title: hash of the query data + aggregate_method: + type: string + title: >- + aggregate method to use for aggregating all the reports for the query + id + value: + type: string + title: hex string of the response value + timestamp: + type: string + format: date-time + title: timestamp of when the report was created + cyclelist: + type: boolean + title: indicates if the report's query id is in the cyclelist + block_number: + type: string + format: int64 + title: block number of when the report was created + title: MicroReport represents data for a single report + layer.oracle.Params: + type: object + properties: + minStakeAmount: + type: string + description: Params defines the parameters for the module. + layer.oracle.QueryCurrentCyclelistQueryResponse: + type: object + properties: + query_data: + type: string + format: byte + layer.oracle.QueryGetAggregatedReportResponse: + type: object + properties: + report: + type: object + properties: + query_id: + type: string + format: byte + aggregateValue: + type: string + aggregateReporter: + type: string + reporterPower: + type: string + format: int64 + standardDeviation: + type: number + format: double + reporters: + type: array + items: + type: object + properties: + reporter: + type: string + power: + type: string + format: int64 + flagged: + type: boolean + nonce: + type: string + format: uint64 + aggregateReportIndex: + type: string + format: int64 + height: + type: string + format: int64 + layer.oracle.QueryGetCurrentTipResponse: + type: object + properties: + tips: + type: object + properties: + query_data: + type: string + format: byte + title: query_data is the query data that was tipped + amount: + type: string + title: the amount that was tipped + total_tips: + type: string + title: totalTips is the total amount of tips for this query data so far + title: >- + Tips is a struct that contains the query data and the amount it was + tipped + layer.oracle.QueryGetReportsbyQidResponse: + type: object + properties: + reports: + type: object + properties: + microReports: + type: array + items: + type: object + properties: + reporter: + type: string + title: reporter is the address of the reporter + power: + type: string + format: int64 + title: the power of the reporter based on total tokens normalized + query_type: + type: string + title: string identifier of the data spec + query_id: + type: string + format: byte + title: hash of the query data + aggregate_method: + type: string + title: >- + aggregate method to use for aggregating all the reports for + the query id + value: + type: string + title: hex string of the response value + timestamp: + type: string + format: date-time + title: timestamp of when the report was created + cyclelist: + type: boolean + title: indicates if the report's query id is in the cyclelist + block_number: + type: string + format: int64 + title: block number of when the report was created + title: MicroReport represents data for a single report + layer.oracle.QueryGetReportsbyReporterResponse: + type: object + properties: + microReports: + type: array + items: + type: object + properties: + reporter: + type: string + title: reporter is the address of the reporter + power: + type: string + format: int64 + title: the power of the reporter based on total tokens normalized + query_type: + type: string + title: string identifier of the data spec + query_id: + type: string + format: byte + title: hash of the query data + aggregate_method: + type: string + title: >- + aggregate method to use for aggregating all the reports for the + query id + value: + type: string + title: hex string of the response value + timestamp: + type: string + format: date-time + title: timestamp of when the report was created + cyclelist: + type: boolean + title: indicates if the report's query id is in the cyclelist + block_number: + type: string + format: int64 + title: block number of when the report was created + title: MicroReport represents data for a single report + layer.oracle.QueryGetTimeBasedRewardsResponse: + type: object + properties: + reward: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + layer.oracle.QueryGetUserTipTotalResponse: type: object - layer.bridge.MsgSubmitBridgeValsetSignatureResponse: + properties: + totalTips: + type: object + properties: + address: + type: string + total: + type: string + layer.oracle.QueryParamsResponse: type: object - layer.bridge.MsgSubmitOracleAttestationResponse: + properties: + params: + description: params holds all the parameters of this module. + type: object + properties: + minStakeAmount: + type: string + description: QueryParamsResponse is response type for the Query/Params RPC method. + layer.oracle.Reports: + type: object + properties: + microReports: + type: array + items: + type: object + properties: + reporter: + type: string + title: reporter is the address of the reporter + power: + type: string + format: int64 + title: the power of the reporter based on total tokens normalized + query_type: + type: string + title: string identifier of the data spec + query_id: + type: string + format: byte + title: hash of the query data + aggregate_method: + type: string + title: >- + aggregate method to use for aggregating all the reports for the + query id + value: + type: string + title: hex string of the response value + timestamp: + type: string + format: date-time + title: timestamp of when the report was created + cyclelist: + type: boolean + title: indicates if the report's query id is in the cyclelist + block_number: + type: string + format: int64 + title: block number of when the report was created + title: MicroReport represents data for a single report + layer.oracle.Tips: + type: object + properties: + query_data: + type: string + format: byte + title: query_data is the query data that was tipped + amount: + type: string + title: the amount that was tipped + total_tips: + type: string + title: totalTips is the total amount of tips for this query data so far + title: Tips is a struct that contains the query data and the amount it was tipped + layer.oracle.UserTipTotal: + type: object + properties: + address: + type: string + total: + type: string + layer.oracle.MsgCommitReportResponse: + type: object + layer.oracle.MsgSubmitValueResponse: + type: object + layer.oracle.MsgTipResponse: + type: object + layer.oracle.MsgUpdateCyclelistResponse: + type: object + description: MsgUpdateCycleResponse defines the Msg/UpdateCycle response type. + layer.oracle.MsgUpdateParamsResponse: type: object layer.registry.ABIComponent: type: object @@ -2097,6 +4178,53 @@ definitions: description: MsgRegisterSpecResponse defines the Msg/RegisterSpec response type. layer.registry.MsgUpdateDataSpecResponse: type: object + layer.registry.Params: + type: object + description: Params defines the parameters for the module. + layer.registry.QueryDecodeQuerydataResponse: + type: object + properties: + spec: + type: string + description: spec is the decoded json represention of the query data hex string. + description: >- + QueryDecodeQuerydataResponse is response type for the + Query/DecodeQuerydata RPC method. + layer.registry.QueryDecodeValueResponse: + type: object + properties: + decodedValue: + type: string + description: decodedValue is the decoded value of the hex string. + description: >- + QueryDecodeValueResponse is response type for the Query/DecodeValue RPC + method. + layer.registry.QueryGenerateQuerydataResponse: + type: object + properties: + query_data: + type: string + format: byte + description: query_data is the generated query_data hex string. + description: >- + QueryGenerateQuerydataResponse is response type for the + Query/GenerateQuerydata RPC method. + layer.registry.QueryGetDataSpecResponse: + type: object + properties: + spec: + $ref: '#/definitions/layer.registry.DataSpec' + description: spec is the data spec corresponding to the query type. + description: >- + QueryGetDataSpecResponse is response type for the Query/GetDataSpec RPC + method. + layer.registry.QueryParamsResponse: + type: object + properties: + params: + description: params holds all the parameters of this module. + type: object + description: QueryParamsResponse is response type for the Query/Params RPC method. cosmos.staking.v1beta1.Commission: type: object properties: diff --git a/evm/test/Bridge-TestsAuto.js b/evm/test/Bridge-TestsAuto.js index 8e0ede4d7..56e9f0f68 100644 --- a/evm/test/Bridge-TestsAuto.js +++ b/evm/test/Bridge-TestsAuto.js @@ -9,7 +9,7 @@ const abiCoder = new ethers.utils.AbiCoder(); const axios = require('axios'); -describe("BlobstreamO - Manual Function and e2e Tests", function () { +describe("BlobstreamO - Auto Function and e2e Tests", function () { let bridge, valPower, accounts, validators, powers, initialValAddrs, initialPowers, threshold, valCheckpoint, valTimestamp, guardian, @@ -538,7 +538,7 @@ describe("BlobstreamO - Manual Function and e2e Tests", function () { }) - it("query layer api, deploy and verify with real params", async function () { + it("query layer api, deploy and verify with real params 0", async function () { vts0 = await h.getValsetTimestampByIndex(0) vp0 = await h.getValsetCheckpointParams(vts0) console.log("valsetTimestamp0: ", vts0) @@ -562,35 +562,36 @@ describe("BlobstreamO - Manual Function and e2e Tests", function () { await bridge.updateValidatorSet(vp1.valsetHash, vp1.powerThreshold, vp1.timestamp, valSet0, vsigs1); ethUsdRep0 = await h.getCurrentAggregateReport(ETH_USD_QUERY_ID) - snapshots = await h.getSnapshotsByReport(ETH_USD_QUERY_ID, ethUsdRep0.report.timestamp) - console.log("snapshots: ", snapshots) - lastSnapshot = snapshots[snapshots.length - 1] - attestationData = await h.getAttestationDataBySnapshot(lastSnapshot) - console.log("attestationData: ", attestationData) - - oattests = await h.getAttestationsBySnapshot(lastSnapshot, valSet1) - if (oattests.length == 0) { - sleeptime = 2 - console.log("no attestations found, sleeping for ", sleeptime, " seconds...") - await h.sleep(2) - oattests = await h.getAttestationsBySnapshot(lastSnapshot, valSet1) - } - console.log("oattests: ", oattests) - - console.log("verifying oracle data...") - await bridge.verifyOracleData( - attestationData, - valSet1, - oattests, - ) - - // request new attestations - currentBlock = await h.getBlock() - currentTime = currentBlock.timestamp - console.log("currentTime: ", currentTime) - pastReport = await h.getDataBefore(ETH_USD_QUERY_ID, currentTime) - console.log("pastReport: ", pastReport) - // await h.requestAttestations(ETH_USD_QUERY_ID, pastReport.timestamp) + console.log("ethUsdRep0: ", ethUsdRep0) + // snapshots = await h.getSnapshotsByReport(ETH_USD_QUERY_ID, ethUsdRep0.report.timestamp) + // console.log("snapshots: ", snapshots) + // lastSnapshot = snapshots[snapshots.length - 1] + // attestationData = await h.getAttestationDataBySnapshot(lastSnapshot) + // console.log("attestationData: ", attestationData) + + // oattests = await h.getAttestationsBySnapshot(lastSnapshot, valSet1) + // if (oattests.length == 0) { + // sleeptime = 2 + // console.log("no attestations found, sleeping for ", sleeptime, " seconds...") + // await h.sleep(2) + // oattests = await h.getAttestationsBySnapshot(lastSnapshot, valSet1) + // } + // console.log("oattests: ", oattests) + + // console.log("verifying oracle data...") + // await bridge.verifyOracleData( + // attestationData, + // valSet1, + // oattests, + // ) + + // // request new attestations + // currentBlock = await h.getBlock() + // currentTime = currentBlock.timestamp + // console.log("currentTime: ", currentTime) + // pastReport = await h.getDataBefore(ETH_USD_QUERY_ID, currentTime) + // console.log("pastReport: ", pastReport) + // // await h.requestAttestations(ETH_USD_QUERY_ID, pastReport.timestamp) }) it("query layer api, deploy and verify with real params", async function () { @@ -647,7 +648,7 @@ describe("BlobstreamO - Manual Function and e2e Tests", function () { }) - it.only("try wallet", async function () { + it("try wallet", async function () { wallet = await h.createCosmosWallet() console.log("wallet: ", wallet) diff --git a/x/bridge/keeper/keeper.go b/x/bridge/keeper/keeper.go index 0146ff209..1da1d72a4 100644 --- a/x/bridge/keeper/keeper.go +++ b/x/bridge/keeper/keeper.go @@ -118,7 +118,6 @@ func (k Keeper) GetCurrentValidatorsEVMCompatible(ctx context.Context) ([]*types EthereumAddress: evmAddressHex, Power: uint64(validator.GetConsensusPower(math.NewInt(10))), } - k.Logger(ctx).Info("@GetBridgeValidators - bridge validator DDDD", "test", bridgeValset[i].EthereumAddress) } // Sort the validators @@ -460,8 +459,11 @@ func (k Keeper) EncodeAndHashValidatorSet(ctx context.Context, validatorSet *typ func (k Keeper) PowerDiff(ctx context.Context, b types.BridgeValidatorSet, c types.BridgeValidatorSet) float64 { powers := map[string]int64{} + var totalPower int64 for _, bv := range b.BridgeValidatorSet { - powers[bv.EthereumAddress] = int64(bv.GetPower()) + power := int64(bv.GetPower()) + powers[bv.EthereumAddress] = power + totalPower += power } for _, bv := range c.BridgeValidatorSet { @@ -477,7 +479,12 @@ func (k Keeper) PowerDiff(ctx context.Context, b types.BridgeValidatorSet, c typ delta += gomath.Abs(float64(v)) } - return gomath.Abs(delta / float64(gomath.MaxUint32)) + if totalPower == 0 { + return 0 + } + + relativeDiff := delta / float64(totalPower) + return relativeDiff } func (k Keeper) EVMAddressFromSignatures(ctx sdk.Context, sigA []byte, sigB []byte) (common.Address, error) { @@ -719,7 +726,6 @@ func (k Keeper) GetValidatorDidSignCheckpoint(ctx context.Context, operatorAddr if val.EthereumAddress == ethAddressHex { // check if the signature exists if len(valsetSigs.Signatures[i]) != 0 { - k.Logger(ctx).Info("Validator did sign checkpoint", "operatorAddr", operatorAddr, "checkpointTimestamp", checkpointTimestamp, "signature", hex.EncodeToString(valsetSigs.Signatures[i])) return true, int64(i), nil } else { return false, int64(i), nil @@ -730,12 +736,9 @@ func (k Keeper) GetValidatorDidSignCheckpoint(ctx context.Context, operatorAddr } func (k Keeper) CreateNewReportSnapshots(ctx sdk.Context) error { - k.Logger(ctx).Info("@CreateNewReportSnapshots") blockHeight := ctx.BlockHeight() - k.Logger(ctx).Info("block height", "blockHeight", blockHeight) reports := k.oracleKeeper.GetAggregatedReportsByHeight(ctx, blockHeight) - k.Logger(ctx).Info("num reports", "reports", len(reports)) for _, report := range reports { queryId := report.QueryId timeNow := time.Now().Add(time.Second) @@ -748,23 +751,16 @@ func (k Keeper) CreateNewReportSnapshots(ctx sdk.Context) error { return err } } - return nil } // Called with each new agg report and with new request for optimistic attestations func (k Keeper) CreateSnapshot(ctx sdk.Context, queryId []byte, timestamp time.Time) error { - k.Logger(ctx).Info("@CreateSnapshot") - k.Logger(ctx).Info("queryId", "queryId", hex.EncodeToString(queryId)) - k.Logger(ctx).Info("timestamp", "timestamp", fmt.Sprint(timestamp.Unix())) - k.Logger(ctx).Info("getting agg report...") - // GetAggregateByTimestamp(ctx sdk.Context, queryId []byte, timestamp time.Time) (aggregate *types.Aggregate, err error) aggReport, err := k.oracleKeeper.GetAggregateByTimestamp(ctx, queryId, timestamp) if err != nil { k.Logger(ctx).Info("Error getting aggregate report by timestamp", "error", err) return err } - k.Logger(ctx).Info(("getting validator checkpoint...")) // get the current validator checkpoint validatorCheckpoint, err := k.GetValidatorCheckpointFromStorage(ctx) if err != nil { @@ -772,25 +768,19 @@ func (k Keeper) CreateSnapshot(ctx sdk.Context, queryId []byte, timestamp time.T return err } - k.Logger(ctx).Info("getting previous timestamp...") tsBefore, err := k.oracleKeeper.GetTimestampBefore(ctx, queryId, timestamp) if err != nil { tsBefore = time.Unix(0, 0) } - k.Logger(ctx).Info("tsBefore", "tsBefore", tsBefore.Unix()) - k.Logger(ctx).Info("getting next timestamp...") tsAfter, err := k.oracleKeeper.GetTimestampAfter(ctx, queryId, timestamp) if err != nil { tsAfter = time.Unix(0, 0) } - k.Logger(ctx).Info("tsAfter", "tsAfter", tsAfter.Unix()) // use current block time for attestationTimestamp attestationTimestamp := ctx.BlockTime() - k.Logger(ctx).Info("attestation timestamp", "attestationTimestamp", attestationTimestamp.Unix()) - k.Logger(ctx).Info("encoding oracle attestation data...") snapshotBytes, err := k.EncodeOracleAttestationData( hex.EncodeToString(queryId), aggReport.AggregateValue, @@ -806,7 +796,6 @@ func (k Keeper) CreateSnapshot(ctx sdk.Context, queryId []byte, timestamp time.T return err } - k.Logger(ctx).Info("encoding attest snapshots by report map key...") // set snapshot by report key := hex.EncodeToString(crypto.Keccak256([]byte(hex.EncodeToString(queryId) + fmt.Sprint(timestamp.Unix())))) // check if map for this key exists, otherwise create a new map @@ -816,7 +805,6 @@ func (k Keeper) CreateSnapshot(ctx sdk.Context, queryId []byte, timestamp time.T return err } if !exists { - k.Logger(ctx).Info("attestation snapshots by report map does not exist, creating new map...") attestationSnapshots := types.NewAttestationSnapshots() err = k.AttestSnapshotsByReportMap.Set(ctx, key, *attestationSnapshots) if err != nil { @@ -829,7 +817,6 @@ func (k Keeper) CreateSnapshot(ctx sdk.Context, queryId []byte, timestamp time.T k.Logger(ctx).Info("Error getting attestation snapshots by report", "error", err) return err } - k.Logger(ctx).Info("setting snapshot by report...") // set the snapshot by report attestationSnapshots.SetSnapshot(snapshotBytes) err = k.AttestSnapshotsByReportMap.Set(ctx, key, attestationSnapshots) @@ -838,7 +825,6 @@ func (k Keeper) CreateSnapshot(ctx sdk.Context, queryId []byte, timestamp time.T return err } - k.Logger(ctx).Info("encoding snapshot to attestations map data...") // set snapshot to snapshot data map snapshotData := types.AttestationSnapshotData{ ValidatorCheckpoint: validatorCheckpoint.Checkpoint, @@ -848,16 +834,12 @@ func (k Keeper) CreateSnapshot(ctx sdk.Context, queryId []byte, timestamp time.T QueryId: queryId, Timestamp: int64(timestamp.Unix()), } - k.Logger(ctx).Info("setting snapshot data...") - k.Logger(ctx).Info("snapshot", "snapshot", hex.EncodeToString(snapshotBytes)) - k.Logger(ctx).Info("snapshot data", "snapshotData", snapshotData) err = k.AttestSnapshotDataMap.Set(ctx, hex.EncodeToString(snapshotBytes), snapshotData) if err != nil { k.Logger(ctx).Info("Error setting attestation snapshot data", "error", err) return err } - k.Logger(ctx).Info("getting last saved valset...") // initialize snapshot to attestations map lastSavedBridgeValidators, err := k.BridgeValset.Get(ctx) if err != nil { @@ -866,24 +848,20 @@ func (k Keeper) CreateSnapshot(ctx sdk.Context, queryId []byte, timestamp time.T } oracleAttestations := types.NewOracleAttestations(len(lastSavedBridgeValidators.BridgeValidatorSet)) // set the map - k.Logger(ctx).Info("setting snapshot to attestations map...") err = k.SnapshotToAttestationsMap.Set(ctx, hex.EncodeToString(snapshotBytes), *oracleAttestations) if err != nil { k.Logger(ctx).Info("Error setting snapshot to attestations map", "error", err) return err } - k.Logger(ctx).Info("getting attestation requests by height...") // add to attestation requests blockHeight := uint64(ctx.BlockHeight()) - k.Logger(ctx).Info("block height", "blockHeight", blockHeight) exists, err = k.AttestRequestsByHeightMap.Has(ctx, blockHeight) if err != nil { k.Logger(ctx).Info("Error checking if attestation requests by height map exists", "error", err) return err } if !exists { - k.Logger(ctx).Info("attestation requests by height map does not exist, creating new map...") attestRequests := types.AttestationRequests{} err = k.AttestRequestsByHeightMap.Set(ctx, blockHeight, attestRequests) if err != nil { diff --git a/x/bridge/keeper/msg_server_request_attestations.go b/x/bridge/keeper/msg_server_request_attestations.go index 0e55b80e8..c0edb1ef7 100644 --- a/x/bridge/keeper/msg_server_request_attestations.go +++ b/x/bridge/keeper/msg_server_request_attestations.go @@ -13,7 +13,6 @@ import ( ) func (k msgServer) RequestAttestations(ctx context.Context, msg *types.MsgRequestAttestations) (*types.MsgRequestAttestationsResponse, error) { - k.Keeper.Logger(sdk.UnwrapSDKContext(ctx)).Info("@RequestAttestations", "queryId", msg.QueryId, "timestamp", msg.Timestamp) sdkCtx := sdk.UnwrapSDKContext(ctx) queryId, err := hex.DecodeString(msg.QueryId) diff --git a/x/oracle/keeper/query_id_timestamp_pair.go b/x/oracle/keeper/query_id_timestamp_pair.go deleted file mode 100644 index cf47c0d2f..000000000 --- a/x/oracle/keeper/query_id_timestamp_pair.go +++ /dev/null @@ -1,31 +0,0 @@ -package keeper - -// import ( -// "time" - -// sdk "github.com/cosmos/cosmos-sdk/types" -// "github.com/tellor-io/layer/x/oracle/types" -// ) - -// func (k Keeper) SetQueryIdAndTimestampPairByBlockHeight(ctx sdk.Context, queryId string, timestamp time.Time) { -// k.Logger(ctx).Info("@SetQueryIdAndTimestampPairByBlockHeight", "queryId", queryId, "timestamp", timestamp) -// store := ctx.KVStore(k.storeKey) -// height := ctx.BlockHeight() -// key := types.QueryIdTimestampPairsByBlockHeightKey(height) -// var pairs types.QueryIdTimestampPairsArray -// if bz := store.Get(key); bz != nil { -// k.cdc.MustUnmarshal(bz, &pairs) -// } -// pairs.Pairs = append(pairs.Pairs, &types.QueryIdTimestampPair{QueryId: queryId, Timestamp: timestamp.Unix()}) -// store.Set(key, k.cdc.MustMarshal(&pairs)) -// } - -// func (k Keeper) GetQueryIdAndTimestampPairsByBlockHeight(ctx sdk.Context, height uint64) types.QueryIdTimestampPairsArray { -// store := ctx.KVStore(k.storeKey) -// key := types.QueryIdTimestampPairsByBlockHeightKey(int64(height)) -// var pairs types.QueryIdTimestampPairsArray -// if bz := store.Get(key); bz != nil { -// k.cdc.MustUnmarshal(bz, &pairs) -// } -// return pairs -// } From 02035ebc2983ae132ffc46abe5d42de03e8519a2 Mon Sep 17 00:00:00 2001 From: tkernell Date: Tue, 9 Apr 2024 18:59:54 -0500 Subject: [PATCH 17/18] get agg api update --- api/layer/bridge/query.pulsar.go | 36 ++- evm/test/Bridge-TestsAuto.js | 62 ++--- proto/layer/bridge/query.proto | 2 +- .../cli/query_get_current_aggregate_report.go | 8 +- .../query_get_current_aggregate_report.go | 9 +- x/bridge/types/query.pb.go | 226 +++++++++--------- x/bridge/types/query.pb.gw.go | 4 +- 7 files changed, 161 insertions(+), 186 deletions(-) diff --git a/api/layer/bridge/query.pulsar.go b/api/layer/bridge/query.pulsar.go index ef5a8c080..1b52a1bcc 100644 --- a/api/layer/bridge/query.pulsar.go +++ b/api/layer/bridge/query.pulsar.go @@ -9490,8 +9490,8 @@ func (x *fastReflection_QueryGetCurrentAggregateReportRequest) Interface() proto // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryGetCurrentAggregateReportRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.QueryId) != 0 { - value := protoreflect.ValueOfBytes(x.QueryId) + if x.QueryId != "" { + value := protoreflect.ValueOfString(x.QueryId) if !f(fd_QueryGetCurrentAggregateReportRequest_query_id, value) { return } @@ -9512,7 +9512,7 @@ func (x *fastReflection_QueryGetCurrentAggregateReportRequest) Range(f func(prot func (x *fastReflection_QueryGetCurrentAggregateReportRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "layer.bridge.QueryGetCurrentAggregateReportRequest.query_id": - return len(x.QueryId) != 0 + return x.QueryId != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetCurrentAggregateReportRequest")) @@ -9530,7 +9530,7 @@ func (x *fastReflection_QueryGetCurrentAggregateReportRequest) Has(fd protorefle func (x *fastReflection_QueryGetCurrentAggregateReportRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "layer.bridge.QueryGetCurrentAggregateReportRequest.query_id": - x.QueryId = nil + x.QueryId = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetCurrentAggregateReportRequest")) @@ -9549,7 +9549,7 @@ func (x *fastReflection_QueryGetCurrentAggregateReportRequest) Get(descriptor pr switch descriptor.FullName() { case "layer.bridge.QueryGetCurrentAggregateReportRequest.query_id": value := x.QueryId - return protoreflect.ValueOfBytes(value) + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetCurrentAggregateReportRequest")) @@ -9571,7 +9571,7 @@ func (x *fastReflection_QueryGetCurrentAggregateReportRequest) Get(descriptor pr func (x *fastReflection_QueryGetCurrentAggregateReportRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "layer.bridge.QueryGetCurrentAggregateReportRequest.query_id": - x.QueryId = value.Bytes() + x.QueryId = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetCurrentAggregateReportRequest")) @@ -9608,7 +9608,7 @@ func (x *fastReflection_QueryGetCurrentAggregateReportRequest) Mutable(fd protor func (x *fastReflection_QueryGetCurrentAggregateReportRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "layer.bridge.QueryGetCurrentAggregateReportRequest.query_id": - return protoreflect.ValueOfBytes(nil) + return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetCurrentAggregateReportRequest")) @@ -9771,7 +9771,7 @@ func (x *fastReflection_QueryGetCurrentAggregateReportRequest) ProtoMethods() *p if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field QueryId", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -9781,25 +9781,23 @@ func (x *fastReflection_QueryGetCurrentAggregateReportRequest) ProtoMethods() *p } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.QueryId = append(x.QueryId[:0], dAtA[iNdEx:postIndex]...) - if x.QueryId == nil { - x.QueryId = []byte{} - } + x.QueryId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -16676,7 +16674,7 @@ type QueryGetCurrentAggregateReportRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - QueryId []byte `protobuf:"bytes,1,opt,name=query_id,json=queryId,proto3" json:"query_id,omitempty"` + QueryId string `protobuf:"bytes,1,opt,name=query_id,json=queryId,proto3" json:"query_id,omitempty"` } func (x *QueryGetCurrentAggregateReportRequest) Reset() { @@ -16699,11 +16697,11 @@ func (*QueryGetCurrentAggregateReportRequest) Descriptor() ([]byte, []int) { return file_layer_bridge_query_proto_rawDescGZIP(), []int{21} } -func (x *QueryGetCurrentAggregateReportRequest) GetQueryId() []byte { +func (x *QueryGetCurrentAggregateReportRequest) GetQueryId() string { if x != nil { return x.QueryId } - return nil + return "" } type QueryGetCurrentAggregateReportResponse struct { @@ -17402,7 +17400,7 @@ var file_layer_bridge_query_proto_rawDesc = []byte{ 0x72, 0x53, 0x65, 0x74, 0x22, 0x42, 0x0a, 0x25, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, - 0x08, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x08, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x22, 0x7d, 0x0a, 0x26, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, diff --git a/evm/test/Bridge-TestsAuto.js b/evm/test/Bridge-TestsAuto.js index 56e9f0f68..8ead87fe8 100644 --- a/evm/test/Bridge-TestsAuto.js +++ b/evm/test/Bridge-TestsAuto.js @@ -563,35 +563,27 @@ describe("BlobstreamO - Auto Function and e2e Tests", function () { ethUsdRep0 = await h.getCurrentAggregateReport(ETH_USD_QUERY_ID) console.log("ethUsdRep0: ", ethUsdRep0) - // snapshots = await h.getSnapshotsByReport(ETH_USD_QUERY_ID, ethUsdRep0.report.timestamp) - // console.log("snapshots: ", snapshots) - // lastSnapshot = snapshots[snapshots.length - 1] - // attestationData = await h.getAttestationDataBySnapshot(lastSnapshot) - // console.log("attestationData: ", attestationData) - - // oattests = await h.getAttestationsBySnapshot(lastSnapshot, valSet1) - // if (oattests.length == 0) { - // sleeptime = 2 - // console.log("no attestations found, sleeping for ", sleeptime, " seconds...") - // await h.sleep(2) - // oattests = await h.getAttestationsBySnapshot(lastSnapshot, valSet1) - // } - // console.log("oattests: ", oattests) - - // console.log("verifying oracle data...") - // await bridge.verifyOracleData( - // attestationData, - // valSet1, - // oattests, - // ) - - // // request new attestations - // currentBlock = await h.getBlock() - // currentTime = currentBlock.timestamp - // console.log("currentTime: ", currentTime) - // pastReport = await h.getDataBefore(ETH_USD_QUERY_ID, currentTime) - // console.log("pastReport: ", pastReport) - // // await h.requestAttestations(ETH_USD_QUERY_ID, pastReport.timestamp) + snapshots = await h.getSnapshotsByReport(ETH_USD_QUERY_ID, ethUsdRep0.report.timestamp) + console.log("snapshots: ", snapshots) + lastSnapshot = snapshots[snapshots.length - 1] + attestationData = await h.getAttestationDataBySnapshot(lastSnapshot) + console.log("attestationData: ", attestationData) + + oattests = await h.getAttestationsBySnapshot(lastSnapshot, valSet1) + if (oattests.length == 0) { + sleeptime = 2 + console.log("no attestations found, sleeping for ", sleeptime, " seconds...") + await h.sleep(2) + oattests = await h.getAttestationsBySnapshot(lastSnapshot, valSet1) + } + console.log("oattests: ", oattests) + + console.log("verifying oracle data...") + await bridge.verifyOracleData( + attestationData, + valSet1, + oattests, + ) }) it("query layer api, deploy and verify with real params", async function () { @@ -647,16 +639,4 @@ describe("BlobstreamO - Auto Function and e2e Tests", function () { ) }) - - it("try wallet", async function () { - wallet = await h.createCosmosWallet() - console.log("wallet: ", wallet) - - currentBlock = await h.getBlock() - currentTime = currentBlock.timestamp - 100 - pastReport = await h.getDataBefore(ETH_USD_QUERY_ID, currentTime) - console.log("pastReport: ", pastReport) - - await h.requestAttestations(ETH_USD_QUERY_ID, pastReport.timestamp) - }) }) diff --git a/proto/layer/bridge/query.proto b/proto/layer/bridge/query.proto index 496d1c736..60f6dae06 100644 --- a/proto/layer/bridge/query.proto +++ b/proto/layer/bridge/query.proto @@ -161,7 +161,7 @@ message QueryGetValsetByTimestampResponse { } message QueryGetCurrentAggregateReportRequest { - bytes query_id = 1; + string query_id = 1; } message QueryGetCurrentAggregateReportResponse { diff --git a/x/bridge/client/cli/query_get_current_aggregate_report.go b/x/bridge/client/cli/query_get_current_aggregate_report.go index deb887fe1..0f8fecad5 100644 --- a/x/bridge/client/cli/query_get_current_aggregate_report.go +++ b/x/bridge/client/cli/query_get_current_aggregate_report.go @@ -6,7 +6,6 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/spf13/cobra" - "github.com/tellor-io/layer/utils" "github.com/tellor-io/layer/x/bridge/types" ) @@ -28,12 +27,7 @@ func CmdGetCurrentAggregateReport() *cobra.Command { queryClient := types.NewQueryClient(clientCtx) - qIdBz, err := utils.QueryBytesFromString(queryId) - if err != nil { - return err - } - - params := &types.QueryGetCurrentAggregateReportRequest{QueryId: qIdBz} + params := &types.QueryGetCurrentAggregateReportRequest{QueryId: queryId} res, err := queryClient.GetCurrentAggregateReport(cmd.Context(), params) if err != nil { diff --git a/x/bridge/keeper/query_get_current_aggregate_report.go b/x/bridge/keeper/query_get_current_aggregate_report.go index d4ef15177..5360c8133 100644 --- a/x/bridge/keeper/query_get_current_aggregate_report.go +++ b/x/bridge/keeper/query_get_current_aggregate_report.go @@ -2,6 +2,7 @@ package keeper import ( "context" + "encoding/hex" "github.com/tellor-io/layer/x/bridge/types" "google.golang.org/grpc/codes" @@ -13,7 +14,11 @@ func (k Keeper) GetCurrentAggregateReport(ctx context.Context, req *types.QueryG return nil, status.Error(codes.InvalidArgument, "invalid request") } - aggregate, timestamp := k.oracleKeeper.GetCurrentAggregateReport(ctx, req.QueryId) + queryId, err := hex.DecodeString(req.QueryId) + if err != nil { + return nil, status.Error(codes.InvalidArgument, "invalid query id") + } + aggregate, timestamp := k.oracleKeeper.GetCurrentAggregateReport(ctx, queryId) if aggregate == nil { return nil, status.Error(codes.NotFound, "aggregate not found") } @@ -30,7 +35,7 @@ func (k Keeper) GetCurrentAggregateReport(ctx context.Context, req *types.QueryG // convert oracletypes.Aggregate to bridgetypes.Aggregate bridgeAggregate := types.Aggregate{ - QueryId: req.QueryId, + QueryId: aggregate.QueryId, AggregateValue: aggregate.AggregateValue, AggregateReporter: aggregate.AggregateReporter, ReporterPower: aggregate.ReporterPower, diff --git a/x/bridge/types/query.pb.go b/x/bridge/types/query.pb.go index d7fec9bf2..a8349954e 100644 --- a/x/bridge/types/query.pb.go +++ b/x/bridge/types/query.pb.go @@ -1036,7 +1036,7 @@ func (m *QueryGetValsetByTimestampResponse) GetBridgeValidatorSet() []*BridgeVal } type QueryGetCurrentAggregateReportRequest struct { - QueryId []byte `protobuf:"bytes,1,opt,name=query_id,json=queryId,proto3" json:"query_id,omitempty"` + QueryId string `protobuf:"bytes,1,opt,name=query_id,json=queryId,proto3" json:"query_id,omitempty"` } func (m *QueryGetCurrentAggregateReportRequest) Reset() { *m = QueryGetCurrentAggregateReportRequest{} } @@ -1072,11 +1072,11 @@ func (m *QueryGetCurrentAggregateReportRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryGetCurrentAggregateReportRequest proto.InternalMessageInfo -func (m *QueryGetCurrentAggregateReportRequest) GetQueryId() []byte { +func (m *QueryGetCurrentAggregateReportRequest) GetQueryId() string { if m != nil { return m.QueryId } - return nil + return "" } type QueryGetCurrentAggregateReportResponse struct { @@ -1780,109 +1780,109 @@ func init() { func init() { proto.RegisterFile("layer/bridge/query.proto", fileDescriptor_e48df680904493de) } var fileDescriptor_e48df680904493de = []byte{ - // 1623 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0x4b, 0x8f, 0x13, 0xc7, - 0x16, 0x9e, 0x1e, 0xcf, 0xcb, 0x07, 0xb8, 0x40, 0x61, 0x41, 0x8f, 0x65, 0x8c, 0xe9, 0xcb, 0xe5, - 0x9a, 0xc7, 0x75, 0x33, 0xc3, 0x73, 0x2e, 0x10, 0x31, 0x1e, 0x08, 0x8c, 0x14, 0xa2, 0xc1, 0x83, - 0x88, 0xc2, 0xc6, 0x2a, 0xdb, 0x45, 0xbb, 0x85, 0xdd, 0x6d, 0xba, 0xcb, 0x0e, 0xd6, 0x68, 0x36, - 0xd9, 0x66, 0x13, 0x29, 0xca, 0x3e, 0x7f, 0x20, 0x8b, 0x44, 0x59, 0x45, 0xd9, 0x46, 0x62, 0x17, - 0x94, 0x6c, 0xb2, 0x8a, 0x12, 0x88, 0x94, 0x1f, 0x90, 0x3f, 0x10, 0x75, 0x75, 0xf5, 0xbb, 0xab, - 0xed, 0x19, 0x25, 0xab, 0x71, 0xd7, 0x39, 0x75, 0xea, 0xfb, 0x4e, 0x9d, 0x3a, 0xf5, 0xd5, 0x80, - 0xdc, 0xc3, 0x63, 0x62, 0xa9, 0x2d, 0x4b, 0xef, 0x68, 0x44, 0x7d, 0x31, 0x24, 0xd6, 0xb8, 0x36, - 0xb0, 0x4c, 0x6a, 0xa2, 0x83, 0xcc, 0x52, 0x73, 0x2d, 0xc5, 0x82, 0x66, 0x6a, 0x26, 0x33, 0xa8, - 0xce, 0x2f, 0xd7, 0xa7, 0x58, 0xd2, 0x4c, 0x53, 0xeb, 0x11, 0x15, 0x0f, 0x74, 0x15, 0x1b, 0x86, - 0x49, 0x31, 0xd5, 0x4d, 0xc3, 0xe6, 0xd6, 0xf3, 0x6d, 0xd3, 0xee, 0x9b, 0xb6, 0xda, 0xc2, 0x36, - 0x0f, 0xad, 0x8e, 0x56, 0x5a, 0x84, 0xe2, 0x15, 0x75, 0x80, 0x35, 0xdd, 0x60, 0xce, 0xdc, 0x77, - 0x39, 0x82, 0x63, 0x80, 0x2d, 0xdc, 0xf7, 0xc2, 0x94, 0x5c, 0x93, 0x69, 0xe1, 0xb6, 0xb3, 0x94, - 0xa6, 0x59, 0x44, 0xc3, 0x94, 0xb8, 0x56, 0xa5, 0x00, 0xe8, 0x91, 0x13, 0x7a, 0x8b, 0x4d, 0x69, - 0x90, 0x17, 0x43, 0x62, 0x53, 0x65, 0x13, 0x8e, 0x45, 0x46, 0xed, 0x81, 0x69, 0xd8, 0x04, 0xad, - 0xc2, 0x82, 0x1b, 0x5a, 0x96, 0x2a, 0x52, 0xf5, 0xc0, 0x6a, 0xa1, 0x16, 0x26, 0x59, 0x73, 0xbd, - 0xeb, 0x73, 0xaf, 0x7e, 0x39, 0x35, 0xd3, 0xe0, 0x9e, 0x4a, 0x19, 0x4a, 0x2c, 0xd4, 0x7d, 0x42, - 0xef, 0x8d, 0xfa, 0x4f, 0x70, 0x4f, 0xef, 0x60, 0x6a, 0x5a, 0xfe, 0x52, 0x06, 0x9c, 0x14, 0xd8, - 0xf9, 0xa2, 0x0f, 0x01, 0xb9, 0xf1, 0x7d, 0xdb, 0x36, 0xa1, 0xb2, 0x54, 0xc9, 0x55, 0x0f, 0xac, - 0x9e, 0x8c, 0x02, 0xa8, 0x47, 0xfd, 0x1a, 0x29, 0x13, 0x95, 0x33, 0xa0, 0x78, 0xeb, 0xf9, 0xe3, - 0x1b, 0x5d, 0xd2, 0x7e, 0x3e, 0x30, 0x75, 0x83, 0x7a, 0xa8, 0x3e, 0x80, 0x7f, 0x67, 0x7a, 0x71, - 0x6c, 0x97, 0xe0, 0xd8, 0x28, 0x69, 0x66, 0xd9, 0xc9, 0x37, 0xd2, 0x4c, 0xca, 0x23, 0x38, 0x1c, - 0x43, 0x89, 0xaa, 0x70, 0x98, 0xd0, 0x2e, 0xb1, 0xc8, 0xb0, 0xbf, 0xde, 0xe9, 0x58, 0xc4, 0xb6, - 0x79, 0x80, 0xf8, 0x30, 0x2a, 0xc0, 0xfc, 0xc0, 0xfc, 0x88, 0x58, 0xf2, 0x6c, 0x45, 0xaa, 0xce, - 0x35, 0xdc, 0x0f, 0xa5, 0x0d, 0xa8, 0x9e, 0xe0, 0xf9, 0x77, 0xa7, 0xed, 0x9b, 0x59, 0x90, 0x93, - 0xab, 0xb8, 0x3b, 0x8e, 0xb6, 0x04, 0x6b, 0x39, 0x35, 0x52, 0xc9, 0x5c, 0x6b, 0x9b, 0xd0, 0xb4, - 0xe5, 0x50, 0x0d, 0x90, 0x9f, 0xbd, 0xc7, 0x7a, 0x9f, 0xd8, 0x14, 0xf7, 0x07, 0x8c, 0x76, 0xae, - 0x91, 0x62, 0x41, 0x37, 0xe0, 0x84, 0x3f, 0xba, 0xe5, 0x64, 0xe5, 0x71, 0xd7, 0x22, 0x76, 0xd7, - 0xec, 0x75, 0xe4, 0x1c, 0x9b, 0x24, 0x32, 0xa3, 0xf3, 0x70, 0x64, 0x14, 0x5a, 0xf9, 0x01, 0xb6, - 0xbb, 0xf2, 0x5c, 0x45, 0xaa, 0x1e, 0x6c, 0x24, 0xc6, 0x45, 0xdb, 0x3d, 0xcf, 0xdc, 0x53, 0xb7, - 0xfb, 0x5b, 0x09, 0x94, 0x24, 0xe5, 0xc0, 0x81, 0x27, 0x30, 0x9d, 0xae, 0xb4, 0x1f, 0xba, 0xb3, - 0x7b, 0xa7, 0x9b, 0x4b, 0xa7, 0xab, 0x6c, 0x41, 0x29, 0x0b, 0x7b, 0x56, 0xf5, 0x0b, 0xd2, 0xf1, - 0x00, 0xaa, 0x19, 0xc7, 0x2a, 0xd2, 0x83, 0x50, 0x09, 0xf2, 0x34, 0x96, 0x8a, 0x60, 0x40, 0xf9, - 0x4a, 0x82, 0x73, 0x53, 0x84, 0xe2, 0xe7, 0xb4, 0x0c, 0xd0, 0x8e, 0x1f, 0xcf, 0xd0, 0x88, 0x63, - 0x1f, 0xe1, 0x9e, 0xcd, 0xf3, 0x31, 0xeb, 0xda, 0x83, 0x91, 0x28, 0x96, 0x5c, 0x0c, 0x0b, 0x3a, - 0x0b, 0xff, 0x1a, 0x44, 0x37, 0x61, 0x8e, 0xb9, 0xc4, 0x46, 0x95, 0x3b, 0x29, 0xec, 0xfd, 0x3d, - 0xad, 0x8f, 0x37, 0x8d, 0x0e, 0x79, 0xe9, 0xb1, 0x2f, 0xc0, 0xbc, 0xee, 0x7c, 0x73, 0xe6, 0xee, - 0x87, 0xb2, 0x99, 0x42, 0x3a, 0x19, 0x81, 0x93, 0xce, 0x4e, 0xe0, 0x1a, 0x2c, 0x87, 0x42, 0xd9, - 0x84, 0x6e, 0xeb, 0xda, 0x94, 0xb9, 0xbf, 0x05, 0xc5, 0xb4, 0xa9, 0x41, 0xae, 0x6d, 0x5d, 0x33, - 0x30, 0x1d, 0x5a, 0xc4, 0x66, 0x0d, 0x27, 0xdf, 0x08, 0x8d, 0x28, 0x1f, 0xc2, 0x85, 0x50, 0xc3, - 0xe7, 0xad, 0xad, 0x3e, 0xf6, 0xf9, 0xf0, 0x11, 0x0f, 0x4a, 0xb8, 0x60, 0xa3, 0xed, 0x31, 0x31, - 0xae, 0xbc, 0x0f, 0x17, 0xa7, 0x0b, 0x1d, 0x40, 0x25, 0xa3, 0x58, 0xd3, 0x0d, 0x8d, 0x28, 0x77, - 0xa0, 0x12, 0x25, 0x5a, 0x1f, 0xfb, 0xd9, 0x9e, 0x2e, 0x55, 0x16, 0x9c, 0xce, 0x88, 0xf0, 0xcf, - 0xdc, 0x70, 0x75, 0xf8, 0x8f, 0xb7, 0xe6, 0xc6, 0xd0, 0xb2, 0x88, 0x41, 0xd7, 0xbd, 0x4b, 0xbf, - 0x41, 0x06, 0xa6, 0xe5, 0x5d, 0x72, 0x68, 0x19, 0x96, 0x98, 0xac, 0x68, 0xea, 0x1d, 0x7e, 0x68, - 0x17, 0xd9, 0xf7, 0x66, 0x47, 0xd9, 0x85, 0xb3, 0x93, 0x62, 0x70, 0xf0, 0x57, 0x21, 0xef, 0x6b, - 0x0a, 0xde, 0xf2, 0x4f, 0x44, 0x31, 0x07, 0x33, 0x03, 0xcf, 0x68, 0xda, 0xdc, 0xeb, 0x2c, 0x94, - 0xb6, 0x4f, 0x72, 0x90, 0xf7, 0xa7, 0x65, 0xe0, 0x74, 0x8e, 0x9e, 0x1f, 0xf3, 0x09, 0xee, 0x0d, - 0x09, 0x3f, 0xbc, 0xb1, 0x51, 0x74, 0x11, 0x8e, 0xe2, 0x28, 0x01, 0x62, 0xb1, 0x83, 0x9c, 0x6f, - 0x24, 0x0d, 0xe8, 0x0c, 0x1c, 0xb2, 0xf8, 0x6f, 0xd6, 0x3e, 0xf9, 0x79, 0x8e, 0x0e, 0x3a, 0x31, - 0x6d, 0x8a, 0x8d, 0x0e, 0xb6, 0x3a, 0x77, 0xc9, 0x48, 0x67, 0x72, 0x8c, 0xdd, 0x05, 0x52, 0x23, - 0x69, 0x40, 0xb7, 0x21, 0xef, 0x4d, 0xb7, 0xe5, 0x05, 0xb6, 0xb7, 0xa7, 0x44, 0x79, 0xe2, 0x7e, - 0x8d, 0x60, 0x06, 0x92, 0x61, 0xf1, 0x59, 0x0f, 0x6b, 0x1a, 0xe9, 0xc8, 0x8b, 0x15, 0xa9, 0xba, - 0xd4, 0xf0, 0x3e, 0x9d, 0x4e, 0x61, 0x98, 0x46, 0x9b, 0xc8, 0x4b, 0x6e, 0xa7, 0x60, 0x1f, 0x68, - 0x15, 0x0a, 0x31, 0x5e, 0xac, 0x39, 0xc8, 0x79, 0xe6, 0x94, 0x6a, 0x43, 0xc7, 0x61, 0xa1, 0x4b, - 0x74, 0xad, 0x4b, 0x65, 0x60, 0x5e, 0xfc, 0x4b, 0xb9, 0x07, 0x47, 0x13, 0xd8, 0x50, 0x11, 0x96, - 0x3c, 0x74, 0xfc, 0xe4, 0xf8, 0xdf, 0x51, 0x9d, 0x92, 0xf3, 0x74, 0xca, 0xe3, 0xa0, 0xe3, 0xdc, - 0xc5, 0x14, 0xd7, 0xc9, 0x33, 0xd3, 0x22, 0x93, 0x6b, 0x31, 0x59, 0x2a, 0x91, 0x13, 0xf6, 0x22, - 0x68, 0x46, 0xe1, 0xa8, 0x93, 0xab, 0xd3, 0x15, 0xc4, 0xfb, 0xa9, 0xce, 0xa7, 0x41, 0x5b, 0xd8, - 0x36, 0xf0, 0xc0, 0xee, 0x9a, 0xd4, 0xae, 0x8f, 0xa3, 0x67, 0x4b, 0x06, 0x0f, 0x3f, 0xcf, 0x8e, - 0x98, 0x4e, 0x3e, 0x1c, 0x7b, 0x3d, 0x68, 0x18, 0x29, 0xb1, 0x83, 0xce, 0x6e, 0x7b, 0x46, 0xde, - 0x61, 0x83, 0x01, 0xe5, 0xdd, 0xe0, 0x9a, 0x59, 0xa7, 0xd4, 0x89, 0xeb, 0x14, 0x20, 0x4b, 0xce, - 0xd8, 0x8b, 0xe9, 0xc1, 0x2c, 0xc2, 0x92, 0x37, 0xd1, 0xdb, 0x45, 0xef, 0x5b, 0xf9, 0x73, 0x36, - 0xb8, 0x6d, 0x32, 0x02, 0x71, 0x4c, 0xfb, 0x24, 0x9c, 0x72, 0x82, 0x73, 0xa9, 0x27, 0x38, 0xec, - 0x17, 0x1c, 0xca, 0xb0, 0x9f, 0x7b, 0x2a, 0xa3, 0x57, 0xfd, 0x7c, 0xe2, 0xaa, 0x77, 0x0e, 0x46, - 0x40, 0x26, 0x10, 0x5b, 0x0b, 0xcc, 0x33, 0xd5, 0xe6, 0xc8, 0xad, 0x81, 0x45, 0x46, 0xba, 0x39, - 0xb4, 0xdd, 0x9d, 0x08, 0xa6, 0x2d, 0xb2, 0x69, 0x22, 0xb3, 0x23, 0x91, 0x0c, 0xf2, 0x92, 0xc6, - 0x67, 0x2d, 0xb9, 0x0f, 0x84, 0x14, 0x93, 0xb2, 0x11, 0x74, 0xef, 0x50, 0xd2, 0xed, 0xbd, 0x6d, - 0xdd, 0x7b, 0x41, 0xfb, 0x16, 0x05, 0xe1, 0xdb, 0xa6, 0xc0, 0xc1, 0x10, 0x65, 0xaf, 0x9a, 0x22, - 0x63, 0xab, 0xbf, 0x21, 0x98, 0x67, 0xe1, 0xd0, 0x73, 0x58, 0xe0, 0x8a, 0x35, 0x26, 0xeb, 0x93, - 0x6f, 0xc8, 0xe2, 0xe9, 0x0c, 0x0f, 0x77, 0x71, 0xa5, 0xf4, 0xf1, 0x4f, 0xbf, 0x7f, 0x36, 0x7b, - 0x1c, 0x15, 0xd4, 0x94, 0xe7, 0x2b, 0xfa, 0x5c, 0x82, 0x23, 0xf1, 0x57, 0x21, 0x3a, 0x9f, 0x12, - 0x55, 0xf0, 0xb4, 0x2c, 0x5e, 0x98, 0xca, 0x97, 0x63, 0xa9, 0x32, 0x2c, 0x0a, 0xaa, 0x44, 0xb1, - 0x68, 0x84, 0x36, 0xc9, 0xa8, 0xdf, 0x1c, 0x05, 0x10, 0xbe, 0x94, 0xe0, 0x78, 0xba, 0xea, 0x44, - 0x97, 0xd2, 0x57, 0x14, 0x3f, 0x34, 0x8b, 0x2b, 0x7b, 0x98, 0xc1, 0x91, 0xd6, 0x18, 0xd2, 0x2a, - 0x3a, 0x9b, 0x44, 0xea, 0xa3, 0x6c, 0x86, 0x2a, 0xfe, 0x47, 0x09, 0x4a, 0x59, 0x2a, 0x19, 0x5d, - 0x9b, 0x1a, 0x43, 0x74, 0x87, 0xaf, 0xef, 0x79, 0x1e, 0x67, 0xb0, 0xce, 0x18, 0xdc, 0x44, 0x6b, - 0xd3, 0x31, 0x68, 0xba, 0x05, 0xa1, 0xee, 0xf8, 0x5d, 0x63, 0x17, 0xfd, 0x10, 0x23, 0x15, 0x57, - 0xc1, 0x13, 0x49, 0x09, 0x84, 0xf7, 0x44, 0x52, 0x22, 0xb9, 0xad, 0xbc, 0xc3, 0x48, 0xdd, 0x40, - 0xd7, 0xb2, 0x48, 0xf9, 0x0c, 0x9a, 0xad, 0x71, 0x93, 0x69, 0x7a, 0x75, 0x87, 0xfd, 0xd9, 0x75, - 0xca, 0xfd, 0x50, 0x44, 0x51, 0xa3, 0xff, 0x0a, 0xa1, 0x44, 0xe5, 0x7a, 0xb1, 0x3a, 0xd9, 0x91, - 0x83, 0x5c, 0x61, 0x20, 0x2f, 0xa0, 0x73, 0xa9, 0x20, 0x6d, 0x42, 0x9b, 0xb6, 0xae, 0x45, 0x33, - 0xfd, 0x87, 0x04, 0xa7, 0x26, 0x08, 0x6a, 0xb4, 0x26, 0x3c, 0x69, 0x93, 0xf4, 0x7d, 0xf1, 0xff, - 0xfb, 0x99, 0xca, 0xd9, 0x3c, 0x64, 0x6c, 0xee, 0xa3, 0x7b, 0xe9, 0x67, 0x16, 0xbb, 0xee, 0x4e, - 0xaa, 0x83, 0x1d, 0xe0, 0x83, 0xea, 0x4e, 0xfc, 0xf5, 0xb0, 0x8b, 0xbe, 0x96, 0xa0, 0x90, 0x26, - 0xd4, 0x51, 0x2d, 0x2b, 0xbf, 0xc9, 0x37, 0x41, 0x51, 0x9d, 0xda, 0x9f, 0x13, 0x59, 0x63, 0x44, - 0x2e, 0xa3, 0x15, 0xe1, 0xb6, 0xb4, 0xc6, 0x41, 0xed, 0x44, 0xb6, 0xe7, 0x7b, 0x09, 0x96, 0x85, - 0x2a, 0x1d, 0x5d, 0x4e, 0x47, 0x92, 0xf9, 0x2e, 0x28, 0x5e, 0xd9, 0xdb, 0x24, 0xce, 0xe1, 0x36, - 0xe3, 0x70, 0x1d, 0x5d, 0x4d, 0x72, 0x68, 0xbb, 0x33, 0x9b, 0xfe, 0x55, 0xdd, 0x74, 0xa5, 0xa2, - 0xba, 0xe3, 0x69, 0xbe, 0x5d, 0xf4, 0x85, 0x5b, 0xfe, 0x81, 0x86, 0x13, 0x95, 0x7f, 0x42, 0x3b, - 0x8a, 0xca, 0x3f, 0x29, 0x07, 0x95, 0x5b, 0x0c, 0xe3, 0x35, 0x74, 0x25, 0x89, 0xb1, 0x83, 0x29, - 0x6e, 0xb6, 0x98, 0x7b, 0x08, 0x56, 0x24, 0xd5, 0xdf, 0xb9, 0xf5, 0x91, 0xd0, 0x65, 0xa2, 0xfa, - 0x10, 0x89, 0x43, 0x51, 0x7d, 0x08, 0x05, 0x9f, 0xb2, 0xc1, 0x70, 0xdf, 0x46, 0x37, 0x93, 0xb8, - 0x7d, 0xdd, 0xe7, 0x94, 0x48, 0x24, 0xad, 0x9b, 0x31, 0xf8, 0xfc, 0x1e, 0x10, 0x4a, 0x39, 0x51, - 0xcb, 0x9c, 0x24, 0x22, 0x45, 0x2d, 0x73, 0xa2, 0x66, 0xcc, 0xba, 0x07, 0x42, 0x02, 0x84, 0x6f, - 0xcd, 0xd8, 0xa7, 0xaa, 0xee, 0x78, 0xbf, 0xfc, 0xf2, 0x4f, 0x57, 0x39, 0xa2, 0xf2, 0xcf, 0x14, - 0x56, 0xa2, 0xf2, 0xcf, 0x16, 0x52, 0x59, 0xe5, 0x1f, 0x16, 0x53, 0x02, 0x1e, 0xf5, 0x8d, 0x57, - 0x6f, 0xca, 0xd2, 0xeb, 0x37, 0x65, 0xe9, 0xd7, 0x37, 0x65, 0xe9, 0xd3, 0xb7, 0xe5, 0x99, 0xd7, - 0x6f, 0xcb, 0x33, 0x3f, 0xbf, 0x2d, 0xcf, 0x3c, 0x3d, 0xa7, 0xe9, 0xb4, 0x3b, 0x6c, 0xd5, 0xda, - 0x66, 0x5f, 0xa5, 0xa4, 0xd7, 0x33, 0xad, 0xff, 0xe9, 0x26, 0x5f, 0xe4, 0xa5, 0xb7, 0x0c, 0x1d, - 0x0f, 0x88, 0xdd, 0x5a, 0x60, 0xff, 0xd3, 0xbf, 0xfc, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6b, - 0x4e, 0x9f, 0xa8, 0x96, 0x18, 0x00, 0x00, + // 1626 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0xcf, 0x6f, 0x1b, 0xc5, + 0x17, 0xcf, 0xc6, 0xf9, 0xe5, 0xd7, 0xf4, 0xdb, 0x76, 0x6a, 0xb5, 0x1b, 0x2b, 0x75, 0xdd, 0xfd, + 0x96, 0xe2, 0xfe, 0xc0, 0xdb, 0xa4, 0x3f, 0x43, 0x5b, 0xd4, 0x38, 0x2d, 0x6d, 0x24, 0x8a, 0x52, + 0xa7, 0x2a, 0xa2, 0x17, 0x6b, 0x6c, 0x4f, 0xd7, 0xab, 0xda, 0xbb, 0xee, 0xee, 0xd8, 0xd4, 0x8a, + 0x72, 0xe1, 0xca, 0x05, 0x09, 0x71, 0xe7, 0x1f, 0xe0, 0x00, 0xe2, 0x84, 0xb8, 0x22, 0xf5, 0x46, + 0x05, 0x17, 0x4e, 0x08, 0x5a, 0x24, 0xfe, 0x00, 0xfe, 0x01, 0xb4, 0xb3, 0xb3, 0xbf, 0x77, 0xd6, + 0x4e, 0x04, 0xa7, 0x78, 0xe7, 0xbd, 0x79, 0xf3, 0xf9, 0xbc, 0x79, 0xf3, 0xe6, 0x33, 0x01, 0xb9, + 0x8b, 0x47, 0xc4, 0x52, 0x9b, 0x96, 0xde, 0xd6, 0x88, 0xfa, 0x7c, 0x40, 0xac, 0x51, 0xb5, 0x6f, + 0x99, 0xd4, 0x44, 0x8b, 0xcc, 0x52, 0x75, 0x2d, 0xc5, 0x82, 0x66, 0x6a, 0x26, 0x33, 0xa8, 0xce, + 0x2f, 0xd7, 0xa7, 0xb8, 0xac, 0x99, 0xa6, 0xd6, 0x25, 0x2a, 0xee, 0xeb, 0x2a, 0x36, 0x0c, 0x93, + 0x62, 0xaa, 0x9b, 0x86, 0xcd, 0xad, 0xe7, 0x5a, 0xa6, 0xdd, 0x33, 0x6d, 0xb5, 0x89, 0x6d, 0x1e, + 0x5a, 0x1d, 0xae, 0x34, 0x09, 0xc5, 0x2b, 0x6a, 0x1f, 0x6b, 0xba, 0xc1, 0x9c, 0xb9, 0xef, 0x52, + 0x04, 0x47, 0x1f, 0x5b, 0xb8, 0xe7, 0x85, 0x59, 0x76, 0x4d, 0xa6, 0x85, 0x5b, 0xce, 0x52, 0x9a, + 0x66, 0x11, 0x0d, 0x53, 0xe2, 0x5a, 0x95, 0x02, 0xa0, 0x87, 0x4e, 0xe8, 0x2d, 0x36, 0xa5, 0x4e, + 0x9e, 0x0f, 0x88, 0x4d, 0x95, 0x4d, 0x38, 0x1a, 0x19, 0xb5, 0xfb, 0xa6, 0x61, 0x13, 0xb4, 0x0a, + 0x73, 0x6e, 0x68, 0x59, 0x2a, 0x4b, 0x95, 0x03, 0xab, 0x85, 0x6a, 0x98, 0x64, 0xd5, 0xf5, 0xae, + 0xcd, 0xbc, 0xfc, 0xed, 0xe4, 0x54, 0x9d, 0x7b, 0x2a, 0x25, 0x58, 0x66, 0xa1, 0xee, 0x11, 0x7a, + 0x77, 0xd8, 0x7b, 0x8c, 0xbb, 0x7a, 0x1b, 0x53, 0xd3, 0xf2, 0x97, 0x32, 0xe0, 0x84, 0xc0, 0xce, + 0x17, 0x7d, 0x00, 0xc8, 0x8d, 0xef, 0xdb, 0xb6, 0x09, 0x95, 0xa5, 0x72, 0xae, 0x72, 0x60, 0xf5, + 0x44, 0x14, 0x40, 0x2d, 0xea, 0x57, 0x4f, 0x99, 0xa8, 0x9c, 0x06, 0xc5, 0x5b, 0xcf, 0x1f, 0xdf, + 0xe8, 0x90, 0xd6, 0xb3, 0xbe, 0xa9, 0x1b, 0xd4, 0x43, 0xf5, 0x11, 0xfc, 0x3f, 0xd3, 0x8b, 0x63, + 0xbb, 0x08, 0x47, 0x87, 0x49, 0x33, 0xcb, 0x4e, 0xbe, 0x9e, 0x66, 0x52, 0x1e, 0xc2, 0xa1, 0x18, + 0x4a, 0x54, 0x81, 0x43, 0x84, 0x76, 0x88, 0x45, 0x06, 0xbd, 0xf5, 0x76, 0xdb, 0x22, 0xb6, 0xcd, + 0x03, 0xc4, 0x87, 0x51, 0x01, 0x66, 0xfb, 0xe6, 0x27, 0xc4, 0x92, 0xa7, 0xcb, 0x52, 0x65, 0xa6, + 0xee, 0x7e, 0x28, 0x2d, 0x40, 0xb5, 0x04, 0xcf, 0x7f, 0x3b, 0x6d, 0xdf, 0x4d, 0x83, 0x9c, 0x5c, + 0xc5, 0xdd, 0x71, 0xb4, 0x25, 0x58, 0xcb, 0xa9, 0x91, 0x72, 0xe6, 0x5a, 0xdb, 0x84, 0xa6, 0x2d, + 0x87, 0xaa, 0x80, 0xfc, 0xec, 0x3d, 0xd2, 0x7b, 0xc4, 0xa6, 0xb8, 0xd7, 0x67, 0xb4, 0x73, 0xf5, + 0x14, 0x0b, 0xba, 0x0e, 0xc7, 0xfd, 0xd1, 0x2d, 0x27, 0x2b, 0x8f, 0x3a, 0x16, 0xb1, 0x3b, 0x66, + 0xb7, 0x2d, 0xe7, 0xd8, 0x24, 0x91, 0x19, 0x9d, 0x83, 0xc3, 0xc3, 0xd0, 0xca, 0xf7, 0xb1, 0xdd, + 0x91, 0x67, 0xca, 0x52, 0x65, 0xb1, 0x9e, 0x18, 0x17, 0x6d, 0xf7, 0x2c, 0x73, 0x4f, 0xdd, 0xee, + 0xef, 0x25, 0x50, 0x92, 0x94, 0x03, 0x07, 0x9e, 0xc0, 0x74, 0xba, 0xd2, 0x7e, 0xe8, 0x4e, 0xef, + 0x9d, 0x6e, 0x2e, 0x9d, 0xae, 0xb2, 0x05, 0xcb, 0x59, 0xd8, 0xb3, 0xaa, 0x5f, 0x90, 0x8e, 0xfb, + 0x50, 0xc9, 0x38, 0x56, 0x91, 0x1e, 0x84, 0x96, 0x21, 0x4f, 0x63, 0xa9, 0x08, 0x06, 0x94, 0x6f, + 0x24, 0x38, 0x3b, 0x41, 0x28, 0x7e, 0x4e, 0x4b, 0x00, 0xad, 0xf8, 0xf1, 0x0c, 0x8d, 0x38, 0xf6, + 0x21, 0xee, 0xda, 0x3c, 0x1f, 0xd3, 0xae, 0x3d, 0x18, 0x89, 0x62, 0xc9, 0xc5, 0xb0, 0xa0, 0x33, + 0xf0, 0xbf, 0x7e, 0x74, 0x13, 0x66, 0x98, 0x4b, 0x6c, 0x54, 0xb9, 0x9d, 0xc2, 0xde, 0xdf, 0xd3, + 0xda, 0x68, 0xd3, 0x68, 0x93, 0x17, 0x1e, 0xfb, 0x02, 0xcc, 0xea, 0xce, 0x37, 0x67, 0xee, 0x7e, + 0x28, 0x9b, 0x29, 0xa4, 0x93, 0x11, 0x38, 0xe9, 0xec, 0x04, 0xae, 0xc1, 0x52, 0x28, 0x94, 0x4d, + 0xe8, 0xb6, 0xae, 0x4d, 0x98, 0xfb, 0x9b, 0x50, 0x4c, 0x9b, 0x1a, 0xe4, 0xda, 0xd6, 0x35, 0x03, + 0xd3, 0x81, 0x45, 0x6c, 0xd6, 0x70, 0xf2, 0xf5, 0xd0, 0x88, 0xf2, 0x31, 0x9c, 0x0f, 0x35, 0x7c, + 0xde, 0xda, 0x6a, 0x23, 0x9f, 0x0f, 0x1f, 0xf1, 0xa0, 0x84, 0x0b, 0x36, 0xda, 0x1e, 0x13, 0xe3, + 0xca, 0x87, 0x70, 0x61, 0xb2, 0xd0, 0x01, 0x54, 0x32, 0x8c, 0x35, 0xdd, 0xd0, 0x88, 0x72, 0x1b, + 0xca, 0x51, 0xa2, 0xb5, 0x91, 0x9f, 0xed, 0xc9, 0x52, 0x65, 0xc1, 0xa9, 0x8c, 0x08, 0xff, 0xcd, + 0x0d, 0x57, 0x83, 0xb7, 0xbc, 0x35, 0x37, 0x06, 0x96, 0x45, 0x0c, 0xba, 0xee, 0x5d, 0xfa, 0x75, + 0xd2, 0x37, 0x2d, 0xef, 0x92, 0x43, 0x4b, 0xb0, 0xc0, 0x64, 0x45, 0x43, 0x6f, 0x73, 0xf2, 0xf3, + 0xec, 0x7b, 0xb3, 0xad, 0xec, 0xc2, 0x99, 0x71, 0x31, 0x38, 0xf8, 0x2b, 0x90, 0xf7, 0x35, 0x05, + 0x6f, 0xf9, 0xc7, 0xa3, 0x98, 0x83, 0x99, 0x81, 0x67, 0x34, 0x6d, 0xee, 0x75, 0x16, 0x4a, 0xdb, + 0x67, 0x39, 0xc8, 0xfb, 0xd3, 0x12, 0x38, 0x17, 0x7d, 0x9c, 0xce, 0xd1, 0xf3, 0x63, 0x3e, 0xc6, + 0xdd, 0x01, 0xe1, 0x87, 0x37, 0x36, 0x8a, 0x2e, 0xc0, 0x11, 0x1c, 0x25, 0x40, 0x2c, 0x76, 0x90, + 0xf3, 0xf5, 0xa4, 0x01, 0x9d, 0x86, 0x83, 0x16, 0xff, 0xcd, 0xda, 0x27, 0x3f, 0xcf, 0xd1, 0x41, + 0x27, 0xa6, 0x4d, 0xb1, 0xd1, 0xc6, 0x56, 0xfb, 0x0e, 0x19, 0xea, 0x4c, 0x8e, 0xb1, 0xbb, 0x40, + 0xaa, 0x27, 0x0d, 0xe8, 0x16, 0xe4, 0xbd, 0xe9, 0xb6, 0x3c, 0xc7, 0xf6, 0xf6, 0xa4, 0x28, 0x4f, + 0xdc, 0xaf, 0x1e, 0xcc, 0x40, 0x32, 0xcc, 0x3f, 0xed, 0x62, 0x4d, 0x23, 0x6d, 0x79, 0xbe, 0x2c, + 0x55, 0x16, 0xea, 0xde, 0xa7, 0xd3, 0x29, 0x0c, 0xd3, 0x68, 0x11, 0x79, 0xc1, 0xed, 0x14, 0xec, + 0x03, 0xad, 0x42, 0x21, 0xc6, 0x8b, 0x35, 0x07, 0x39, 0xcf, 0x9c, 0x52, 0x6d, 0xe8, 0x18, 0xcc, + 0x75, 0x88, 0xae, 0x75, 0xa8, 0x0c, 0xcc, 0x8b, 0x7f, 0x29, 0x77, 0xe1, 0x48, 0x02, 0x1b, 0x2a, + 0xc2, 0x82, 0x87, 0x8e, 0x17, 0x8f, 0xff, 0x1d, 0xd5, 0x29, 0x39, 0x4f, 0xa7, 0x3c, 0x0a, 0x3a, + 0xce, 0x1d, 0x4c, 0x71, 0x8d, 0x3c, 0x35, 0x2d, 0x22, 0xaa, 0xc5, 0xd0, 0x1e, 0x27, 0x4a, 0x25, + 0x72, 0xc2, 0x9e, 0x07, 0xcd, 0x28, 0x1c, 0x75, 0x7c, 0x75, 0xba, 0x82, 0x78, 0x3f, 0xd5, 0xf9, + 0x24, 0x68, 0x0b, 0xdb, 0x06, 0xee, 0xdb, 0x1d, 0x93, 0xda, 0xb5, 0x51, 0xf4, 0x6c, 0xc9, 0xe0, + 0xe1, 0x8f, 0x1d, 0xad, 0x64, 0xec, 0x7c, 0x38, 0xf6, 0x7a, 0xd0, 0x30, 0x52, 0x62, 0x07, 0x9d, + 0xdd, 0xf6, 0x8c, 0xbc, 0xc3, 0x06, 0x03, 0xca, 0xfb, 0xc1, 0x35, 0xb3, 0x4e, 0xa9, 0x13, 0xd7, + 0x29, 0x40, 0x96, 0x9c, 0x91, 0x17, 0xd3, 0x83, 0x59, 0x84, 0x05, 0x6f, 0xa2, 0xb7, 0x8b, 0xde, + 0xb7, 0xf2, 0xf7, 0x74, 0x70, 0xdb, 0x64, 0x04, 0xe2, 0x98, 0xf6, 0x49, 0x38, 0xe5, 0x04, 0xe7, + 0x52, 0x4f, 0x70, 0xd8, 0x2f, 0x38, 0x94, 0x61, 0x3f, 0xf7, 0x54, 0x46, 0xaf, 0xfa, 0xd9, 0xc4, + 0x55, 0xef, 0x1c, 0x8c, 0x80, 0x4c, 0x20, 0xb6, 0xe6, 0x98, 0x67, 0xaa, 0xcd, 0x91, 0x5b, 0x7d, + 0x8b, 0x0c, 0x75, 0x73, 0x60, 0xbb, 0x3b, 0x11, 0x4c, 0x9b, 0x67, 0xd3, 0x44, 0x66, 0x47, 0x22, + 0x19, 0xe4, 0x05, 0x8d, 0xcf, 0x5a, 0x70, 0x1f, 0x08, 0x29, 0x26, 0x65, 0x23, 0xe8, 0xde, 0xa1, + 0xa4, 0xdb, 0x7b, 0xdb, 0xba, 0x0f, 0x82, 0xf6, 0x2d, 0x0a, 0xc2, 0xb7, 0x4d, 0x81, 0xc5, 0x10, + 0x65, 0xaf, 0x9a, 0x22, 0x63, 0xab, 0x7f, 0x20, 0x98, 0x65, 0xe1, 0xd0, 0x33, 0x98, 0xe3, 0x8a, + 0x35, 0x26, 0xeb, 0x93, 0x6f, 0xc8, 0xe2, 0xa9, 0x0c, 0x0f, 0x77, 0x71, 0x65, 0xf9, 0xd3, 0x5f, + 0xfe, 0xfc, 0x62, 0xfa, 0x18, 0x2a, 0xa8, 0x29, 0xcf, 0x57, 0xf4, 0xa5, 0x04, 0x87, 0xe3, 0xaf, + 0x42, 0x74, 0x2e, 0x25, 0xaa, 0xe0, 0x69, 0x59, 0x3c, 0x3f, 0x91, 0x2f, 0xc7, 0x52, 0x61, 0x58, + 0x14, 0x54, 0x8e, 0x62, 0xd1, 0x08, 0x6d, 0x90, 0x61, 0xaf, 0x31, 0x0c, 0x20, 0x7c, 0x2d, 0xc1, + 0xb1, 0x74, 0xd5, 0x89, 0x2e, 0xa6, 0xaf, 0x28, 0x7e, 0x68, 0x16, 0x57, 0xf6, 0x30, 0x83, 0x23, + 0xad, 0x32, 0xa4, 0x15, 0x74, 0x26, 0x89, 0xd4, 0x47, 0xd9, 0x08, 0x55, 0xfc, 0xcf, 0x12, 0x2c, + 0x67, 0xa9, 0x64, 0x74, 0x75, 0x62, 0x0c, 0xd1, 0x1d, 0xbe, 0xb6, 0xe7, 0x79, 0x9c, 0xc1, 0x3a, + 0x63, 0x70, 0x03, 0xad, 0x4d, 0xc6, 0xa0, 0xe1, 0x16, 0x84, 0xba, 0xe3, 0x77, 0x8d, 0x5d, 0xf4, + 0x53, 0x8c, 0x54, 0x5c, 0x05, 0x8f, 0x25, 0x25, 0x10, 0xde, 0x63, 0x49, 0x89, 0xe4, 0xb6, 0xf2, + 0x1e, 0x23, 0x75, 0x1d, 0x5d, 0xcd, 0x22, 0xe5, 0x33, 0x68, 0x34, 0x47, 0x0d, 0xa6, 0xe9, 0xd5, + 0x1d, 0xf6, 0x67, 0xd7, 0x29, 0xf7, 0x83, 0x11, 0x45, 0x8d, 0xde, 0x16, 0x42, 0x89, 0xca, 0xf5, + 0x62, 0x65, 0xbc, 0x23, 0x07, 0xb9, 0xc2, 0x40, 0x9e, 0x47, 0x67, 0x53, 0x41, 0xda, 0x84, 0x36, + 0x6c, 0x5d, 0x8b, 0x66, 0xfa, 0x2f, 0x09, 0x4e, 0x8e, 0x11, 0xd4, 0x68, 0x4d, 0x78, 0xd2, 0xc6, + 0xe9, 0xfb, 0xe2, 0xbb, 0xfb, 0x99, 0xca, 0xd9, 0x3c, 0x60, 0x6c, 0xee, 0xa1, 0xbb, 0xe9, 0x67, + 0x16, 0xbb, 0xee, 0x4e, 0xaa, 0x83, 0x1d, 0xe0, 0x83, 0xea, 0x4e, 0xfc, 0xf5, 0xb0, 0x8b, 0xbe, + 0x95, 0xa0, 0x90, 0x26, 0xd4, 0x51, 0x35, 0x2b, 0xbf, 0xc9, 0x37, 0x41, 0x51, 0x9d, 0xd8, 0x9f, + 0x13, 0x59, 0x63, 0x44, 0x2e, 0xa1, 0x15, 0xe1, 0xb6, 0x34, 0x47, 0x41, 0xed, 0x44, 0xb6, 0xe7, + 0x47, 0x09, 0x96, 0x84, 0x2a, 0x1d, 0x5d, 0x4a, 0x47, 0x92, 0xf9, 0x2e, 0x28, 0x5e, 0xde, 0xdb, + 0x24, 0xce, 0xe1, 0x16, 0xe3, 0x70, 0x0d, 0x5d, 0x49, 0x72, 0x68, 0xb9, 0x33, 0x1b, 0xfe, 0x55, + 0xdd, 0x70, 0xa5, 0xa2, 0xba, 0xe3, 0x69, 0xbe, 0x5d, 0xf4, 0x95, 0x5b, 0xfe, 0x81, 0x86, 0x13, + 0x95, 0x7f, 0x42, 0x3b, 0x8a, 0xca, 0x3f, 0x29, 0x07, 0x95, 0x9b, 0x0c, 0xe3, 0x55, 0x74, 0x39, + 0x89, 0xb1, 0x8d, 0x29, 0x6e, 0x34, 0x99, 0x7b, 0x08, 0x56, 0x24, 0xd5, 0x3f, 0xb8, 0xf5, 0x91, + 0xd0, 0x65, 0xa2, 0xfa, 0x10, 0x89, 0x43, 0x51, 0x7d, 0x08, 0x05, 0x9f, 0xb2, 0xc1, 0x70, 0xdf, + 0x42, 0x37, 0x92, 0xb8, 0x7d, 0xdd, 0xe7, 0x94, 0x48, 0x24, 0xad, 0x9b, 0x31, 0xf8, 0xfc, 0x1e, + 0x10, 0x4a, 0x39, 0x51, 0xcb, 0x1c, 0x27, 0x22, 0x45, 0x2d, 0x73, 0xac, 0x66, 0xcc, 0xba, 0x07, + 0x42, 0x02, 0x84, 0x6f, 0xcd, 0xc8, 0xa7, 0xaa, 0xee, 0x78, 0xbf, 0xfc, 0xf2, 0x4f, 0x57, 0x39, + 0xa2, 0xf2, 0xcf, 0x14, 0x56, 0xa2, 0xf2, 0xcf, 0x16, 0x52, 0x59, 0xe5, 0x1f, 0x16, 0x53, 0x02, + 0x1e, 0xb5, 0x8d, 0x97, 0xaf, 0x4b, 0xd2, 0xab, 0xd7, 0x25, 0xe9, 0xf7, 0xd7, 0x25, 0xe9, 0xf3, + 0x37, 0xa5, 0xa9, 0x57, 0x6f, 0x4a, 0x53, 0xbf, 0xbe, 0x29, 0x4d, 0x3d, 0x39, 0xab, 0xe9, 0xb4, + 0x33, 0x68, 0x56, 0x5b, 0x66, 0x4f, 0xa5, 0xa4, 0xdb, 0x35, 0xad, 0x77, 0x74, 0x93, 0x2f, 0xf2, + 0xc2, 0x5b, 0x86, 0x8e, 0xfa, 0xc4, 0x6e, 0xce, 0xb1, 0xff, 0xe9, 0x5f, 0xfa, 0x27, 0x00, 0x00, + 0xff, 0xff, 0x4d, 0x8c, 0xec, 0xff, 0x96, 0x18, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -5991,7 +5991,7 @@ func (m *QueryGetCurrentAggregateReportRequest) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field QueryId", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -6001,25 +6001,23 @@ func (m *QueryGetCurrentAggregateReportRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.QueryId = append(m.QueryId[:0], dAtA[iNdEx:postIndex]...) - if m.QueryId == nil { - m.QueryId = []byte{} - } + m.QueryId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex diff --git a/x/bridge/types/query.pb.gw.go b/x/bridge/types/query.pb.gw.go index 44bcf53bc..79608a112 100644 --- a/x/bridge/types/query.pb.gw.go +++ b/x/bridge/types/query.pb.gw.go @@ -373,7 +373,7 @@ func request_Query_GetCurrentAggregateReport_0(ctx context.Context, marshaler ru return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "query_id") } - protoReq.QueryId, err = runtime.Bytes(val) + protoReq.QueryId, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "query_id", err) @@ -400,7 +400,7 @@ func local_request_Query_GetCurrentAggregateReport_0(ctx context.Context, marsha return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "query_id") } - protoReq.QueryId, err = runtime.Bytes(val) + protoReq.QueryId, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "query_id", err) From 3db624682010f4ed373b71d276f693919af56b19 Mon Sep 17 00:00:00 2001 From: tkernell Date: Wed, 10 Apr 2024 11:56:22 -0500 Subject: [PATCH 18/18] tests passing --- tests/e2e/e2e_test.go | 8 ++++---- x/oracle/keeper/weighted_median_test.go | 24 ++++++++++++++++++++---- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/tests/e2e/e2e_test.go b/tests/e2e/e2e_test.go index 8daaa4011..816111439 100644 --- a/tests/e2e/e2e_test.go +++ b/tests/e2e/e2e_test.go @@ -481,7 +481,7 @@ func (s *E2ETestSuite) TestBasicReporting() { require.Equal(result1.Report.AggregateValue, encodeValue(4500)) require.Equal(result1.Report.AggregateReporter, reporter.Reporter) require.Equal(result1.Report.QueryId, queryIdEth) - require.Equal(int64(4000), result1.Report.ReporterPower) + require.Equal(int64(4000000000), result1.Report.ReporterPower) // check that tbr is no longer in timeBasedRewards module acct tbrModuleAccountBalance = s.bankKeeper.GetBalance(s.ctx, tbrModuleAccount, sdk.DefaultBondDenom) require.Equal(int64(0), tbrModuleAccountBalance.Amount.Int64()) @@ -556,7 +556,7 @@ func (s *E2ETestSuite) TestBasicReporting() { require.Equal(encodeValue(100_000), result2.Report.AggregateValue) require.Equal(reporter.Reporter, result2.Report.AggregateReporter) require.Equal(queryIdTrb, result2.Report.QueryId) - require.Equal(int64(4000), result2.Report.ReporterPower) + require.Equal(int64(4000000000), result2.Report.ReporterPower) require.Equal(int64(3), result2.Report.Height) // check that tbr is no longer in timeBasedRewards module acct tbrModuleAccountBalance = s.bankKeeper.GetBalance(s.ctx, tbrModuleAccount, sdk.DefaultBondDenom) @@ -664,7 +664,7 @@ func (s *E2ETestSuite) TestBasicReporting() { require.Equal(result1.Report.AggregateValue, encodeValue(5000)) require.Equal(result1.Report.AggregateReporter, reporter.Reporter) require.Equal(queryIdEth, result1.Report.QueryId) - require.Equal(int64(4000), result1.Report.ReporterPower) + require.Equal(int64(4000000000), result1.Report.ReporterPower) require.Equal(int64(5), result1.Report.Height) // check that the tip is in tip escrow tipEscrowAcct := s.accountKeeper.GetModuleAddress(reportertypes.TipsEscrowPool) @@ -741,7 +741,7 @@ func (s *E2ETestSuite) TestBasicReporting() { require.Equal(resultTrb.Report.AggregateValue, encodeValue(1_000_000)) require.Equal(resultTrb.Report.AggregateReporter, reporter.Reporter) require.Equal(queryIdTrb, resultTrb.Report.QueryId) - require.Equal(int64(4000), resultTrb.Report.ReporterPower) + require.Equal(int64(4000000000), resultTrb.Report.ReporterPower) require.Equal(int64(6), resultTrb.Report.Height) // check that the tip is in tip escrow tipEscrowBalance = s.bankKeeper.GetBalance(s.ctx, tipEscrowAcct, sdk.DefaultBondDenom) // 98 loya diff --git a/x/oracle/keeper/weighted_median_test.go b/x/oracle/keeper/weighted_median_test.go index 81404dd6d..3286a87fc 100644 --- a/x/oracle/keeper/weighted_median_test.go +++ b/x/oracle/keeper/weighted_median_test.go @@ -23,7 +23,11 @@ func (s *KeeperTestSuite) TestWeightedMedian() { expectedIndex := 3 expectedValue := values[expectedIndex] expectedReporter := reporters[expectedIndex].String() - expectedPower := powers[expectedIndex] + var sumPowers int64 + for _, power := range powers { + sumPowers += power + } + expectedPower := sumPowers * 1e6 currentReporters := reporters[:5] reports := testutil.GenerateReports(currentReporters, values, powers, qId) @@ -53,7 +57,11 @@ func (s *KeeperTestSuite) TestWeightedMedian() { expectedIndex = 1 expectedReporter = currentReporters[expectedIndex].String() expectedValue = values[expectedIndex] - expectedPower = 1 + sumPowers = int64(0) + for _, power := range powers { + sumPowers += power + } + expectedPower = sumPowers * 1e6 reports = testutil.GenerateReports(currentReporters, values, powers, qId) s.oracleKeeper.WeightedMedian(s.ctx, reports) res, err = s.oracleKeeper.GetAggregatedReport(s.ctx, &types.QueryGetCurrentAggregatedReportRequest{QueryId: qId}) @@ -81,7 +89,11 @@ func (s *KeeperTestSuite) TestWeightedMedian() { expectedIndex = 1 expectedReporter = currentReporters[expectedIndex].String() expectedValue = values[expectedIndex] - expectedPower = powers[expectedIndex] + sumPowers = int64(0) + for _, power := range powers { + sumPowers += power + } + expectedPower = sumPowers * 1e6 reports = testutil.GenerateReports(currentReporters, values, powers, qId) s.oracleKeeper.WeightedMedian(s.ctx, reports) res, err = s.oracleKeeper.GetAggregatedReport(s.ctx, &types.QueryGetCurrentAggregatedReportRequest{QueryId: qId}) @@ -108,7 +120,11 @@ func (s *KeeperTestSuite) TestWeightedMedian() { expectedIndex = 2 expectedReporter = currentReporters[expectedIndex].String() expectedValue = values[expectedIndex] - expectedPower = powers[expectedIndex] + sumPowers = int64(0) + for _, power := range powers { + sumPowers += power + } + expectedPower = sumPowers * 1e6 reports = testutil.GenerateReports(currentReporters, values, powers, qId) s.oracleKeeper.WeightedMedian(s.ctx, reports) res, err = s.oracleKeeper.GetAggregatedReport(s.ctx, &types.QueryGetCurrentAggregatedReportRequest{QueryId: qId})