qos

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BackendServiceType_name = map[int32]string{
		0: "BACKEND_SERVICE_TYPE_UNSPECIFIED",
		1: "BACKEND_SERVICE_TYPE_JSONRPC",
		2: "BACKEND_SERVICE_TYPE_REST",
		3: "BACKEND_SERVICE_TYPE_COMETBFT",
	}
	BackendServiceType_value = map[string]int32{
		"BACKEND_SERVICE_TYPE_UNSPECIFIED": 0,
		"BACKEND_SERVICE_TYPE_JSONRPC":     1,
		"BACKEND_SERVICE_TYPE_REST":        2,
		"BACKEND_SERVICE_TYPE_COMETBFT":    3,
	}
)

Enum value maps for BackendServiceType.

View Source
var (
	CosmosResponseValidationError_name = map[int32]string{
		0: "COSMOS_RESPONSE_VALIDATION_ERROR_UNSPECIFIED",
		1: "COSMOS_RESPONSE_VALIDATION_ERROR_EMPTY",
		2: "COSMOS_RESPONSE_VALIDATION_ERROR_UNMARSHAL",
		3: "COSMOS_RESPONSE_VALIDATION_ERROR_FORMAT_MISMATCH",
	}
	CosmosResponseValidationError_value = map[string]int32{
		"COSMOS_RESPONSE_VALIDATION_ERROR_UNSPECIFIED":     0,
		"COSMOS_RESPONSE_VALIDATION_ERROR_EMPTY":           1,
		"COSMOS_RESPONSE_VALIDATION_ERROR_UNMARSHAL":       2,
		"COSMOS_RESPONSE_VALIDATION_ERROR_FORMAT_MISMATCH": 3,
	}
)

Enum value maps for CosmosResponseValidationError.

View Source
var (
	CosmosResponseValidationType_name = map[int32]string{
		0: "COSMOS_RESPONSE_VALIDATION_TYPE_UNSPECIFIED",
		1: "COSMOS_RESPONSE_VALIDATION_TYPE_JSONRPC",
		2: "COSMOS_RESPONSE_VALIDATION_TYPE_JSON",
		3: "COSMOS_RESPONSE_VALIDATION_TYPE_UNSTRUCTURED",
	}
	CosmosResponseValidationType_value = map[string]int32{
		"COSMOS_RESPONSE_VALIDATION_TYPE_UNSPECIFIED":  0,
		"COSMOS_RESPONSE_VALIDATION_TYPE_JSONRPC":      1,
		"COSMOS_RESPONSE_VALIDATION_TYPE_JSON":         2,
		"COSMOS_RESPONSE_VALIDATION_TYPE_UNSTRUCTURED": 3,
	}
)

Enum value maps for CosmosResponseValidationType.

View Source
var (
	EndpointValidationFailureReason_name = map[int32]string{
		0: "ENDPOINT_VALIDATION_FAILURE_REASON_UNSPECIFIED",
		1: "ENDPOINT_VALIDATION_FAILURE_REASON_EMPTY_RESPONSE_HISTORY",
		2: "ENDPOINT_VALIDATION_FAILURE_REASON_RECENT_INVALID_RESPONSE",
		3: "ENDPOINT_VALIDATION_FAILURE_REASON_BLOCK_NUMBER_BEHIND",
		4: "ENDPOINT_VALIDATION_FAILURE_REASON_CHAIN_ID_MISMATCH",
		5: "ENDPOINT_VALIDATION_FAILURE_REASON_NO_BLOCK_NUMBER_OBSERVATION",
		6: "ENDPOINT_VALIDATION_FAILURE_REASON_NO_CHAIN_ID_OBSERVATION",
		7: "ENDPOINT_VALIDATION_FAILURE_REASON_ARCHIVAL_CHECK_FAILED",
		8: "ENDPOINT_VALIDATION_FAILURE_REASON_ENDPOINT_NOT_FOUND",
		9: "ENDPOINT_VALIDATION_FAILURE_REASON_UNKNOWN",
	}
	EndpointValidationFailureReason_value = map[string]int32{
		"ENDPOINT_VALIDATION_FAILURE_REASON_UNSPECIFIED":                 0,
		"ENDPOINT_VALIDATION_FAILURE_REASON_EMPTY_RESPONSE_HISTORY":      1,
		"ENDPOINT_VALIDATION_FAILURE_REASON_RECENT_INVALID_RESPONSE":     2,
		"ENDPOINT_VALIDATION_FAILURE_REASON_BLOCK_NUMBER_BEHIND":         3,
		"ENDPOINT_VALIDATION_FAILURE_REASON_CHAIN_ID_MISMATCH":           4,
		"ENDPOINT_VALIDATION_FAILURE_REASON_NO_BLOCK_NUMBER_OBSERVATION": 5,
		"ENDPOINT_VALIDATION_FAILURE_REASON_NO_CHAIN_ID_OBSERVATION":     6,
		"ENDPOINT_VALIDATION_FAILURE_REASON_ARCHIVAL_CHECK_FAILED":       7,
		"ENDPOINT_VALIDATION_FAILURE_REASON_ENDPOINT_NOT_FOUND":          8,
		"ENDPOINT_VALIDATION_FAILURE_REASON_UNKNOWN":                     9,
	}
)

Enum value maps for EndpointValidationFailureReason.

View Source
var (
	EVMRequestValidationError_name = map[int32]string{
		0: "EVM_REQUEST_VALIDATION_ERROR_UNSPECIFIED",
		1: "EVM_REQUEST_VALIDATION_ERROR_HTTP_BODY_READ_FAILURE",
		2: "EVM_REQUEST_VALIDATION_ERROR_REQUEST_UNMARSHALING_FAILURE",
	}
	EVMRequestValidationError_value = map[string]int32{
		"EVM_REQUEST_VALIDATION_ERROR_UNSPECIFIED":                  0,
		"EVM_REQUEST_VALIDATION_ERROR_HTTP_BODY_READ_FAILURE":       1,
		"EVM_REQUEST_VALIDATION_ERROR_REQUEST_UNMARSHALING_FAILURE": 2,
	}
)

Enum value maps for EVMRequestValidationError.

View Source
var (
	EVMResponseValidationError_name = map[int32]string{
		0: "EVM_RESPONSE_VALIDATION_ERROR_UNSPECIFIED",
		1: "EVM_RESPONSE_VALIDATION_ERROR_EMPTY",
		2: "EVM_RESPONSE_VALIDATION_ERROR_UNMARSHAL",
		3: "EVM_RESPONSE_VALIDATION_ERROR_NO_RESPONSE",
	}
	EVMResponseValidationError_value = map[string]int32{
		"EVM_RESPONSE_VALIDATION_ERROR_UNSPECIFIED": 0,
		"EVM_RESPONSE_VALIDATION_ERROR_EMPTY":       1,
		"EVM_RESPONSE_VALIDATION_ERROR_UNMARSHAL":   2,
		"EVM_RESPONSE_VALIDATION_ERROR_NO_RESPONSE": 3,
	}
)

Enum value maps for EVMResponseValidationError.

View Source
var (
	// TODO_REFACTOR(@adshmh): Consider consolidating all errors in the qos package into a single file.
	ErrEVMNoObservations              = errors.New("no observations available")
	ErrEVMNoEndpointObservationsFound = errors.New("no endpoint observations listed")
)
View Source
var (
	JsonRpcValidationErrorType_name = map[int32]string{
		0: "JSON_RPC_VALIDATION_ERROR_TYPE_UNSPECIFIED",
		1: "JSON_RPC_VALIDATION_ERROR_TYPE_NON_JSONRPC_RESPONSE",
	}
	JsonRpcValidationErrorType_value = map[string]int32{
		"JSON_RPC_VALIDATION_ERROR_TYPE_UNSPECIFIED":          0,
		"JSON_RPC_VALIDATION_ERROR_TYPE_NON_JSONRPC_RESPONSE": 1,
	}
)

Enum value maps for JsonRpcValidationErrorType.

View Source
var (
	RequestErrorKind_name = map[int32]string{
		0: "REQUEST_ERROR_UNSPECIFIED",
		1: "REQUEST_ERROR_INTERNAL_READ_HTTP_ERROR",
		2: "REQUEST_ERROR_INTERNAL_PROTOCOL_ERROR",
		3: "REQUEST_ERROR_USER_ERROR_JSONRPC_PARSE_ERROR",
		4: "REQUEST_ERROR_USER_ERROR_JSONRPC_SERVICE_DETECTION_ERROR",
		5: "REQUEST_ERROR_USER_ERROR_JSONRPC_UNSUPPORTED_RPC_TYPE",
		6: "REQUEST_ERROR_INTERNAL_JSONRPC_PAYLOAD_BUILD_ERROR",
		7: "REQUEST_ERROR_USER_ERROR_REST_SERVICE_DETECTION_ERROR",
		8: "REQUEST_ERROR_USER_ERROR_REST_UNSUPPORTED_RPC_TYPE",
		9: "REQUEST_ERROR_INTERNAL_JSONRPC_BACKEND_SERVICE_UNMARSHAL_ERROR",
	}
	RequestErrorKind_value = map[string]int32{
		"REQUEST_ERROR_UNSPECIFIED":                                      0,
		"REQUEST_ERROR_INTERNAL_READ_HTTP_ERROR":                         1,
		"REQUEST_ERROR_INTERNAL_PROTOCOL_ERROR":                          2,
		"REQUEST_ERROR_USER_ERROR_JSONRPC_PARSE_ERROR":                   3,
		"REQUEST_ERROR_USER_ERROR_JSONRPC_SERVICE_DETECTION_ERROR":       4,
		"REQUEST_ERROR_USER_ERROR_JSONRPC_UNSUPPORTED_RPC_TYPE":          5,
		"REQUEST_ERROR_INTERNAL_JSONRPC_PAYLOAD_BUILD_ERROR":             6,
		"REQUEST_ERROR_USER_ERROR_REST_SERVICE_DETECTION_ERROR":          7,
		"REQUEST_ERROR_USER_ERROR_REST_UNSUPPORTED_RPC_TYPE":             8,
		"REQUEST_ERROR_INTERNAL_JSONRPC_BACKEND_SERVICE_UNMARSHAL_ERROR": 9,
	}
)

Enum value maps for RequestErrorKind.

View Source
var (
	RequestOrigin_name = map[int32]string{
		0: "REQUEST_ORIGIN_UNSPECIFIED",
		1: "REQUEST_ORIGIN_ORGANIC",
		2: "REQUEST_ORIGIN_SYNTHETIC",
	}
	RequestOrigin_value = map[string]int32{
		"REQUEST_ORIGIN_UNSPECIFIED": 0,
		"REQUEST_ORIGIN_ORGANIC":     1,
		"REQUEST_ORIGIN_SYNTHETIC":   2,
	}
)

Enum value maps for RequestOrigin.

View Source
var File_path_qos_cosmos_proto protoreflect.FileDescriptor
View Source
var File_path_qos_cosmos_request_proto protoreflect.FileDescriptor
View Source
var File_path_qos_cosmos_response_proto protoreflect.FileDescriptor
View Source
var File_path_qos_endpoint_selection_metadata_proto protoreflect.FileDescriptor
View Source
var File_path_qos_evm_proto protoreflect.FileDescriptor
View Source
var File_path_qos_jsonrpc_proto protoreflect.FileDescriptor
View Source
var File_path_qos_jsonrpc_validation_error_proto protoreflect.FileDescriptor
View Source
var File_path_qos_observations_proto protoreflect.FileDescriptor
View Source
var File_path_qos_request_error_proto protoreflect.FileDescriptor
View Source
var File_path_qos_request_origin_proto protoreflect.FileDescriptor
View Source
var File_path_qos_solana_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type BackendServiceDetails

type BackendServiceDetails struct {
	BackendServiceType BackendServiceType `` /* 151-byte string literal not displayed */
	SelectionReason    string             `protobuf:"bytes,2,opt,name=selection_reason,json=selectionReason,proto3" json:"selection_reason,omitempty"`
	// contains filtered or unexported fields
}

BackendServiceDetails contains metadata about backend service selection

func (*BackendServiceDetails) Descriptor deprecated

func (*BackendServiceDetails) Descriptor() ([]byte, []int)

Deprecated: Use BackendServiceDetails.ProtoReflect.Descriptor instead.

func (*BackendServiceDetails) GetBackendServiceType

func (x *BackendServiceDetails) GetBackendServiceType() BackendServiceType

func (*BackendServiceDetails) GetSelectionReason

func (x *BackendServiceDetails) GetSelectionReason() string

func (*BackendServiceDetails) ProtoMessage

func (*BackendServiceDetails) ProtoMessage()

func (*BackendServiceDetails) ProtoReflect

func (x *BackendServiceDetails) ProtoReflect() protoreflect.Message

func (*BackendServiceDetails) Reset

func (x *BackendServiceDetails) Reset()

func (*BackendServiceDetails) String

func (x *BackendServiceDetails) String() string

type BackendServiceType

type BackendServiceType int32

BackendServiceType enumerates the types of backend services that can handle requests

const (
	BackendServiceType_BACKEND_SERVICE_TYPE_UNSPECIFIED BackendServiceType = 0
	BackendServiceType_BACKEND_SERVICE_TYPE_JSONRPC     BackendServiceType = 1 // Backend service using JSON-RPC protocol
	BackendServiceType_BACKEND_SERVICE_TYPE_REST        BackendServiceType = 2 // Backend service using REST API
	BackendServiceType_BACKEND_SERVICE_TYPE_COMETBFT    BackendServiceType = 3 // Backend service using CometBFT RPC
)

func (BackendServiceType) Descriptor

func (BackendServiceType) Enum

func (BackendServiceType) EnumDescriptor deprecated

func (BackendServiceType) EnumDescriptor() ([]byte, []int)

Deprecated: Use BackendServiceType.Descriptor instead.

func (BackendServiceType) Number

func (BackendServiceType) String

func (x BackendServiceType) String() string

func (BackendServiceType) Type

type CosmosEndpointObservation

type CosmosEndpointObservation struct {

	// Address of the endpoint handling the request
	EndpointAddr string `protobuf:"bytes,1,opt,name=endpoint_addr,json=endpointAddr,proto3" json:"endpoint_addr,omitempty"`
	// Result of validating the endpoint response.
	// Examples:
	//   - invalid JSONRPC response
	//   - unexpected format of response to REST request.
	EndpointResponseValidationResult *CosmosEndpointResponseValidationResult `` /* 161-byte string literal not displayed */
	// contains filtered or unexported fields
}

CosmosEndpointObservation stores a single observation from an endpoint

func (*CosmosEndpointObservation) Descriptor deprecated

func (*CosmosEndpointObservation) Descriptor() ([]byte, []int)

Deprecated: Use CosmosEndpointObservation.ProtoReflect.Descriptor instead.

func (*CosmosEndpointObservation) GetEndpointAddr

func (x *CosmosEndpointObservation) GetEndpointAddr() string

func (*CosmosEndpointObservation) GetEndpointResponseValidationResult

func (x *CosmosEndpointObservation) GetEndpointResponseValidationResult() *CosmosEndpointResponseValidationResult

func (*CosmosEndpointObservation) ProtoMessage

func (*CosmosEndpointObservation) ProtoMessage()

func (*CosmosEndpointObservation) ProtoReflect

func (*CosmosEndpointObservation) Reset

func (x *CosmosEndpointObservation) Reset()

func (*CosmosEndpointObservation) String

func (x *CosmosEndpointObservation) String() string

type CosmosEndpointResponseValidationResult

type CosmosEndpointResponseValidationResult struct {

	// The type of response expected.
	// Examples: JSONRPC, JSON, integer, etc.
	ResponseValidationType CosmosResponseValidationType `` /* 173-byte string literal not displayed */
	// HTTP status code returned to the user.
	// It is derived from the endpoint response payload and/or HTTP status code.
	// e.g. for JSONRPC, it is based on the error code of the JSONRPC response.
	HttpStatusCode int32 `protobuf:"varint,2,opt,name=http_status_code,json=httpStatusCode,proto3" json:"http_status_code,omitempty"`
	// Validation error, if any.
	// This is set if parsing the endpoint response fails.
	ValidationError *CosmosResponseValidationError `` /* 157-byte string literal not displayed */
	// TODO_TECHDEBT(@adshmh): Replace the parsed_response and user_response with request-type-specific messages, i.e. separate message type for:
	// - single JSONRPC requests
	// - RESTful API requests
	//
	// Tracks the JSONRPC response returned to the user
	// Only set for JSONRPC requests.
	UserJsonrpcResponse *JsonRpcResponse `` /* 127-byte string literal not displayed */
	// The parsed response; JSON, JSONRPC, REST, unstructured, etc..
	// Only set if validation succeeded.
	//
	// Types that are valid to be assigned to ParsedResponse:
	//
	//	*CosmosEndpointResponseValidationResult_ResponseJsonrpc
	//	*CosmosEndpointResponseValidationResult_ResponseUnrecognized
	//	*CosmosEndpointResponseValidationResult_ResponseCometBftHealth
	//	*CosmosEndpointResponseValidationResult_ResponseCometBftStatus
	//	*CosmosEndpointResponseValidationResult_ResponseCosmosSdkStatus
	//	*CosmosEndpointResponseValidationResult_ResponseEvmJsonrpcChainId
	ParsedResponse isCosmosEndpointResponseValidationResult_ParsedResponse `protobuf_oneof:"parsed_response"`
	// contains filtered or unexported fields
}

CosmosEndpointResponseValidationResult contains the outcome of contacting an endpoint

func (*CosmosEndpointResponseValidationResult) Descriptor deprecated

func (*CosmosEndpointResponseValidationResult) Descriptor() ([]byte, []int)

Deprecated: Use CosmosEndpointResponseValidationResult.ProtoReflect.Descriptor instead.

func (*CosmosEndpointResponseValidationResult) GetHttpStatusCode

func (x *CosmosEndpointResponseValidationResult) GetHttpStatusCode() int32

func (*CosmosEndpointResponseValidationResult) GetParsedResponse

func (x *CosmosEndpointResponseValidationResult) GetParsedResponse() isCosmosEndpointResponseValidationResult_ParsedResponse

func (*CosmosEndpointResponseValidationResult) GetResponseCometBftHealth

func (*CosmosEndpointResponseValidationResult) GetResponseCometBftStatus

func (*CosmosEndpointResponseValidationResult) GetResponseCosmosSdkStatus

func (*CosmosEndpointResponseValidationResult) GetResponseEvmJsonrpcChainId

func (*CosmosEndpointResponseValidationResult) GetResponseJsonrpc

func (*CosmosEndpointResponseValidationResult) GetResponseUnrecognized

func (x *CosmosEndpointResponseValidationResult) GetResponseUnrecognized() *UnrecognizedResponse

func (*CosmosEndpointResponseValidationResult) GetResponseValidationType

func (*CosmosEndpointResponseValidationResult) GetUserJsonrpcResponse

func (x *CosmosEndpointResponseValidationResult) GetUserJsonrpcResponse() *JsonRpcResponse

func (*CosmosEndpointResponseValidationResult) GetValidationError

func (*CosmosEndpointResponseValidationResult) ProtoMessage

func (*CosmosEndpointResponseValidationResult) ProtoReflect

func (*CosmosEndpointResponseValidationResult) Reset

func (*CosmosEndpointResponseValidationResult) String

type CosmosEndpointResponseValidationResult_ResponseCometBftHealth

type CosmosEndpointResponseValidationResult_ResponseCometBftHealth struct {
	// Response to CometBFT request using method `health`
	// Reference: https://docs.cometbft.com/v1.0/spec/rpc/#health
	ResponseCometBftHealth *CosmosResponseCometBFTHealth `protobuf:"bytes,8,opt,name=response_comet_bft_health,json=responseCometBftHealth,proto3,oneof"`
}

type CosmosEndpointResponseValidationResult_ResponseCometBftStatus

type CosmosEndpointResponseValidationResult_ResponseCometBftStatus struct {
	// Response to CometBFT request using method `status`
	// Reference: https://docs.cometbft.com/v1.0/spec/rpc/#status
	ResponseCometBftStatus *CosmosResponseCometBFTStatus `protobuf:"bytes,9,opt,name=response_comet_bft_status,json=responseCometBftStatus,proto3,oneof"`
}

type CosmosEndpointResponseValidationResult_ResponseCosmosSdkStatus

type CosmosEndpointResponseValidationResult_ResponseCosmosSdkStatus struct {
	// Response to CosmosSDK request against API path `/cosmos/base/node/v1beta1/status`
	// Reference: https://docs.cosmos.network/api#tag/Service/operation/Status
	ResponseCosmosSdkStatus *CosmosResponseCosmosSDKStatus `protobuf:"bytes,10,opt,name=response_cosmos_sdk_status,json=responseCosmosSdkStatus,proto3,oneof"`
}

type CosmosEndpointResponseValidationResult_ResponseEvmJsonrpcChainId

type CosmosEndpointResponseValidationResult_ResponseEvmJsonrpcChainId struct {
	// Response to Ethereum JSONRPC request using method `eth_chainId`
	// Reference: https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid
	ResponseEvmJsonrpcChainId *CosmosResponseEVMJSONRPCChainID `protobuf:"bytes,11,opt,name=response_evm_jsonrpc_chain_id,json=responseEvmJsonrpcChainId,proto3,oneof"`
}

type CosmosEndpointResponseValidationResult_ResponseJsonrpc

type CosmosEndpointResponseValidationResult_ResponseJsonrpc struct {
	// JSONRPC response
	ResponseJsonrpc *JsonRpcResponse `protobuf:"bytes,4,opt,name=response_jsonrpc,json=responseJsonrpc,proto3,oneof"`
}

type CosmosEndpointResponseValidationResult_ResponseUnrecognized

type CosmosEndpointResponseValidationResult_ResponseUnrecognized struct {
	// For unrecognized responses.
	// These are returned as-is to the user.
	ResponseUnrecognized *UnrecognizedResponse `protobuf:"bytes,7,opt,name=response_unrecognized,json=responseUnrecognized,proto3,oneof"`
}

type CosmosRequestObservations

type CosmosRequestObservations struct {

	// cosmos_chain_id is the blockchain identifier in the Cosmos ecosystem.
	CosmosChainId string `protobuf:"bytes,8,opt,name=cosmos_chain_id,json=cosmosChainId,proto3" json:"cosmos_chain_id,omitempty"`
	// evm_chain_id is the EVM blockchain identifier for the Cosmos chain that has native EVM support, e.g. XRPLEVM, etc...
	EvmChainId string `protobuf:"bytes,7,opt,name=evm_chain_id,json=evmChainId,proto3" json:"evm_chain_id,omitempty"`
	// service_id is the Pocket Network service identifier.
	ServiceId string `protobuf:"bytes,2,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"`
	// The origin of the request
	RequestOrigin RequestOrigin `` /* 129-byte string literal not displayed */
	// Profiles of the requests: backend service selection and format determination
	// This field supports batch requests where multiple request profiles can be processed
	RequestProfiles []*CosmosRequestProfile `protobuf:"bytes,9,rep,name=request_profiles,json=requestProfiles,proto3" json:"request_profiles,omitempty"`
	// Request-level error, i.e. failed without any endpoint responses.
	// Examples:
	//   - Failed to parse request
	//   - No endpoint response received, i.e. any protocol-level error.
	RequestLevelError *RequestError `protobuf:"bytes,5,opt,name=request_level_error,json=requestLevelError,proto3,oneof" json:"request_level_error,omitempty"`
	// Cosmos-specific observations from endpoint(s) that responded to the service request.
	EndpointObservations []*CosmosEndpointObservation `protobuf:"bytes,6,rep,name=endpoint_observations,json=endpointObservations,proto3" json:"endpoint_observations,omitempty"`
	// contains filtered or unexported fields
}

CosmosRequestObservations captures all observations made while serving a single Cosmos blockchain service request.

func (*CosmosRequestObservations) Descriptor deprecated

func (*CosmosRequestObservations) Descriptor() ([]byte, []int)

Deprecated: Use CosmosRequestObservations.ProtoReflect.Descriptor instead.

func (*CosmosRequestObservations) GetCosmosChainId

func (x *CosmosRequestObservations) GetCosmosChainId() string

func (*CosmosRequestObservations) GetEndpointObservations

func (x *CosmosRequestObservations) GetEndpointObservations() []*CosmosEndpointObservation

func (*CosmosRequestObservations) GetEvmChainId

func (x *CosmosRequestObservations) GetEvmChainId() string

func (*CosmosRequestObservations) GetRequestLevelError

func (x *CosmosRequestObservations) GetRequestLevelError() *RequestError

func (*CosmosRequestObservations) GetRequestOrigin

func (x *CosmosRequestObservations) GetRequestOrigin() RequestOrigin

func (*CosmosRequestObservations) GetRequestProfiles

func (x *CosmosRequestObservations) GetRequestProfiles() []*CosmosRequestProfile

func (*CosmosRequestObservations) GetServiceId

func (x *CosmosRequestObservations) GetServiceId() string

func (*CosmosRequestObservations) ProtoMessage

func (*CosmosRequestObservations) ProtoMessage()

func (*CosmosRequestObservations) ProtoReflect

func (*CosmosRequestObservations) Reset

func (x *CosmosRequestObservations) Reset()

func (*CosmosRequestObservations) String

func (x *CosmosRequestObservations) String() string

type CosmosRequestProfile

type CosmosRequestProfile struct {

	// Backend service configuration and selection details
	BackendServiceDetails *BackendServiceDetails `` /* 126-byte string literal not displayed */
	// Parsed request payload by format type
	//
	// Types that are valid to be assigned to ParsedRequest:
	//
	//	*CosmosRequestProfile_RestRequest
	//	*CosmosRequestProfile_JsonrpcRequest
	ParsedRequest isCosmosRequestProfile_ParsedRequest `protobuf_oneof:"parsed_request"`
	// contains filtered or unexported fields
}

CosmosRequestProfile contains: - Target backend service selection - Request format determination (JSONRPC vs REST) - Parsed and validated request payload

func (*CosmosRequestProfile) Descriptor deprecated

func (*CosmosRequestProfile) Descriptor() ([]byte, []int)

Deprecated: Use CosmosRequestProfile.ProtoReflect.Descriptor instead.

func (*CosmosRequestProfile) GetBackendServiceDetails

func (x *CosmosRequestProfile) GetBackendServiceDetails() *BackendServiceDetails

func (*CosmosRequestProfile) GetJsonrpcRequest

func (x *CosmosRequestProfile) GetJsonrpcRequest() *JsonRpcRequest

func (*CosmosRequestProfile) GetParsedRequest

func (x *CosmosRequestProfile) GetParsedRequest() isCosmosRequestProfile_ParsedRequest

func (*CosmosRequestProfile) GetRestRequest

func (x *CosmosRequestProfile) GetRestRequest() *RESTRequest

func (*CosmosRequestProfile) ProtoMessage

func (*CosmosRequestProfile) ProtoMessage()

func (*CosmosRequestProfile) ProtoReflect

func (x *CosmosRequestProfile) ProtoReflect() protoreflect.Message

func (*CosmosRequestProfile) Reset

func (x *CosmosRequestProfile) Reset()

func (*CosmosRequestProfile) String

func (x *CosmosRequestProfile) String() string

type CosmosRequestProfile_JsonrpcRequest

type CosmosRequestProfile_JsonrpcRequest struct {
	JsonrpcRequest *JsonRpcRequest `protobuf:"bytes,3,opt,name=jsonrpc_request,json=jsonrpcRequest,proto3,oneof"`
}

type CosmosRequestProfile_RestRequest

type CosmosRequestProfile_RestRequest struct {
	RestRequest *RESTRequest `protobuf:"bytes,2,opt,name=rest_request,json=restRequest,proto3,oneof"`
}

type CosmosResponseCometBFTHealth

type CosmosResponseCometBFTHealth struct {
	HealthStatus bool `protobuf:"varint,1,opt,name=health_status,json=healthStatus,proto3" json:"health_status,omitempty"`
	// contains filtered or unexported fields
}

CosmosResponseCometBFTHealth stores the response to a CometBFT `health` method request

func (*CosmosResponseCometBFTHealth) Descriptor deprecated

func (*CosmosResponseCometBFTHealth) Descriptor() ([]byte, []int)

Deprecated: Use CosmosResponseCometBFTHealth.ProtoReflect.Descriptor instead.

func (*CosmosResponseCometBFTHealth) GetHealthStatus

func (x *CosmosResponseCometBFTHealth) GetHealthStatus() bool

func (*CosmosResponseCometBFTHealth) ProtoMessage

func (*CosmosResponseCometBFTHealth) ProtoMessage()

func (*CosmosResponseCometBFTHealth) ProtoReflect

func (*CosmosResponseCometBFTHealth) Reset

func (x *CosmosResponseCometBFTHealth) Reset()

func (*CosmosResponseCometBFTHealth) String

type CosmosResponseCometBFTStatus

type CosmosResponseCometBFTStatus struct {
	ChainId           string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
	CatchingUp        bool   `protobuf:"varint,2,opt,name=catching_up,json=catchingUp,proto3" json:"catching_up,omitempty"`
	LatestBlockHeight string `protobuf:"bytes,3,opt,name=latest_block_height,json=latestBlockHeight,proto3" json:"latest_block_height,omitempty"`
	// contains filtered or unexported fields
}

CosmosResponseCometBFTStatus stores the response to a CometBFT `status` method request

func (*CosmosResponseCometBFTStatus) Descriptor deprecated

func (*CosmosResponseCometBFTStatus) Descriptor() ([]byte, []int)

Deprecated: Use CosmosResponseCometBFTStatus.ProtoReflect.Descriptor instead.

func (*CosmosResponseCometBFTStatus) GetCatchingUp

func (x *CosmosResponseCometBFTStatus) GetCatchingUp() bool

func (*CosmosResponseCometBFTStatus) GetChainId

func (x *CosmosResponseCometBFTStatus) GetChainId() string

func (*CosmosResponseCometBFTStatus) GetLatestBlockHeight

func (x *CosmosResponseCometBFTStatus) GetLatestBlockHeight() string

func (*CosmosResponseCometBFTStatus) ProtoMessage

func (*CosmosResponseCometBFTStatus) ProtoMessage()

func (*CosmosResponseCometBFTStatus) ProtoReflect

func (*CosmosResponseCometBFTStatus) Reset

func (x *CosmosResponseCometBFTStatus) Reset()

func (*CosmosResponseCometBFTStatus) String

type CosmosResponseCosmosSDKStatus

type CosmosResponseCosmosSDKStatus struct {
	LatestBlockHeight uint64 `protobuf:"varint,1,opt,name=latest_block_height,json=latestBlockHeight,proto3" json:"latest_block_height,omitempty"`
	// contains filtered or unexported fields
}

CosmosResponseCosmosSDKStatus stores the response to a CosmosSDK `/cosmos/base/node/v1beta1/status` request

func (*CosmosResponseCosmosSDKStatus) Descriptor deprecated

func (*CosmosResponseCosmosSDKStatus) Descriptor() ([]byte, []int)

Deprecated: Use CosmosResponseCosmosSDKStatus.ProtoReflect.Descriptor instead.

func (*CosmosResponseCosmosSDKStatus) GetLatestBlockHeight

func (x *CosmosResponseCosmosSDKStatus) GetLatestBlockHeight() uint64

func (*CosmosResponseCosmosSDKStatus) ProtoMessage

func (*CosmosResponseCosmosSDKStatus) ProtoMessage()

func (*CosmosResponseCosmosSDKStatus) ProtoReflect

func (*CosmosResponseCosmosSDKStatus) Reset

func (x *CosmosResponseCosmosSDKStatus) Reset()

func (*CosmosResponseCosmosSDKStatus) String

type CosmosResponseEVMJSONRPCChainID

type CosmosResponseEVMJSONRPCChainID struct {

	// The HTTP status code received from the endpoint
	HttpStatusCode int32 `protobuf:"varint,1,opt,name=http_status_code,json=httpStatusCode,proto3" json:"http_status_code,omitempty"`
	// The chain ID value returned in the response
	EvmChainId string `protobuf:"bytes,2,opt,name=evm_chain_id,json=evmChainId,proto3" json:"evm_chain_id,omitempty"`
	// contains filtered or unexported fields
}

CosmosResponseEVMJSONRPCChainID stores the response to an `eth_chainId` request https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid

func (*CosmosResponseEVMJSONRPCChainID) Descriptor deprecated

func (*CosmosResponseEVMJSONRPCChainID) Descriptor() ([]byte, []int)

Deprecated: Use CosmosResponseEVMJSONRPCChainID.ProtoReflect.Descriptor instead.

func (*CosmosResponseEVMJSONRPCChainID) GetEvmChainId

func (x *CosmosResponseEVMJSONRPCChainID) GetEvmChainId() string

func (*CosmosResponseEVMJSONRPCChainID) GetHttpStatusCode

func (x *CosmosResponseEVMJSONRPCChainID) GetHttpStatusCode() int32

func (*CosmosResponseEVMJSONRPCChainID) ProtoMessage

func (*CosmosResponseEVMJSONRPCChainID) ProtoMessage()

func (*CosmosResponseEVMJSONRPCChainID) ProtoReflect

func (*CosmosResponseEVMJSONRPCChainID) Reset

func (*CosmosResponseEVMJSONRPCChainID) String

type CosmosResponseValidationError

type CosmosResponseValidationError int32

CosmosResponseValidationError defines why an endpoint response was rejected.

const (
	CosmosResponseValidationError_COSMOS_RESPONSE_VALIDATION_ERROR_UNSPECIFIED     CosmosResponseValidationError = 0
	CosmosResponseValidationError_COSMOS_RESPONSE_VALIDATION_ERROR_EMPTY           CosmosResponseValidationError = 1 // Response with no data.
	CosmosResponseValidationError_COSMOS_RESPONSE_VALIDATION_ERROR_UNMARSHAL       CosmosResponseValidationError = 2 // Response parsing failed
	CosmosResponseValidationError_COSMOS_RESPONSE_VALIDATION_ERROR_FORMAT_MISMATCH CosmosResponseValidationError = 3 // Expected JSON-RPC but got JSON, etc.
)

func (CosmosResponseValidationError) Descriptor

func (CosmosResponseValidationError) Enum

func (CosmosResponseValidationError) EnumDescriptor deprecated

func (CosmosResponseValidationError) EnumDescriptor() ([]byte, []int)

Deprecated: Use CosmosResponseValidationError.Descriptor instead.

func (CosmosResponseValidationError) Number

func (CosmosResponseValidationError) String

func (CosmosResponseValidationError) Type

type CosmosResponseValidationType

type CosmosResponseValidationType int32

CosmosResponseValidationType determines the format/protocol of the endpoint response

const (
	CosmosResponseValidationType_COSMOS_RESPONSE_VALIDATION_TYPE_UNSPECIFIED  CosmosResponseValidationType = 0
	CosmosResponseValidationType_COSMOS_RESPONSE_VALIDATION_TYPE_JSONRPC      CosmosResponseValidationType = 1 // JSONRPC response
	CosmosResponseValidationType_COSMOS_RESPONSE_VALIDATION_TYPE_JSON         CosmosResponseValidationType = 2 // JSON response
	CosmosResponseValidationType_COSMOS_RESPONSE_VALIDATION_TYPE_UNSTRUCTURED CosmosResponseValidationType = 3 // Unrecognized response format: no validation is performed.
)

func (CosmosResponseValidationType) Descriptor

func (CosmosResponseValidationType) Enum

func (CosmosResponseValidationType) EnumDescriptor deprecated

func (CosmosResponseValidationType) EnumDescriptor() ([]byte, []int)

Deprecated: Use CosmosResponseValidationType.Descriptor instead.

func (CosmosResponseValidationType) Number

func (CosmosResponseValidationType) String

func (CosmosResponseValidationType) Type

type CosmosSDKObservationInterpreter

type CosmosSDKObservationInterpreter struct {
	// Logger for reporting issues during interpretation
	Logger polylog.Logger

	// Observations contains the raw CosmosSDK request data
	Observations *CosmosRequestObservations
}

CosmosSDKObservationInterpreter extracts and interprets data from CosmosSDK request observations. It provides methods to access metrics-relevant information for Prometheus reporting.

func (*CosmosSDKObservationInterpreter) GetCosmosChainID

func (i *CosmosSDKObservationInterpreter) GetCosmosChainID() string

GetChainID returns the blockchain identifier from observations.

func (*CosmosSDKObservationInterpreter) GetEVMChainID

func (i *CosmosSDKObservationInterpreter) GetEVMChainID() string

GetEVMChainID returns the EVM chain identifier from observations.

func (*CosmosSDKObservationInterpreter) GetEndpointDomain

func (i *CosmosSDKObservationInterpreter) GetEndpointDomain() string

GetEndpointDomain returns the domain of the endpoint that served the request.

If multiple endpoint observations are present, it returns the domain of the first endpoint observation. If no endpoint observations are present, it returns an empty string.

TODO_TECHDEBT: Consolidate this with the business logic of other "GetEndpointDomain" implementations.

func (*CosmosSDKObservationInterpreter) GetJSONRPCErrorCode

func (i *CosmosSDKObservationInterpreter) GetJSONRPCErrorCode() (int, bool)

GetJSONRPCErrorCode extracts the JSON-RPC error code from the last endpoint observation. Returns (errorCode, true) if a JSON-RPC error is present in the user_jsonrpc_response Returns (0, false) if no error is present or user_jsonrpc_response is nil

func (*CosmosSDKObservationInterpreter) GetRPCType

func (i *CosmosSDKObservationInterpreter) GetRPCType() string

GetRPCType returns the RPC type from the backend service details.

func (*CosmosSDKObservationInterpreter) GetRequestErrorType

func (i *CosmosSDKObservationInterpreter) GetRequestErrorType() string

GetRequestErrorType returns the error type if request failed or empty string if successful. GetRequestErrorType returns the error type if request failed or empty string if successful. If no request-level error exists, it checks the last endpoint observation for validation errors.

func (*CosmosSDKObservationInterpreter) GetRequestHTTPStatus

func (i *CosmosSDKObservationInterpreter) GetRequestHTTPStatus() int32

TODO_TECHDEBT(@adshmh): Update proto messages to make the HTTP Status code explicit on each request. Removes the need for reasoning in the observations/metrics logic.

GetRequestHTTPStatus returns the HTTP status code from the request error or endpoint responses. Returns 200 if request was successful, 0 if observations are nil.

func (*CosmosSDKObservationInterpreter) GetRequestMethods

func (i *CosmosSDKObservationInterpreter) GetRequestMethods() ([]string, bool)

TODO_TECHDEBT(@adshmh): Drop this method once separate proto messages are added for single and batch JSONRPC requests.

TODO_TECHDEBT: For batch requests, this will only return one of the methods in the batch. GetRequestMethod returns the CosmosSDK RPC method name from the request profile.

func (*CosmosSDKObservationInterpreter) GetRequestStatus

func (i *CosmosSDKObservationInterpreter) GetRequestStatus() (int32, *RequestError, error)

GetRequestStatus interprets the observations to determine request status information. Returns: (httpStatusCode, requestError, err) - httpStatusCode: the suggested HTTP status code to return to the client - requestError: error details (nil if successful) - err: error if interpreter cannot determine status (e.g., nil observations)

func (*CosmosSDKObservationInterpreter) GetServiceID

func (i *CosmosSDKObservationInterpreter) GetServiceID() string

GetServiceID returns the service identifier from observations.

func (*CosmosSDKObservationInterpreter) GetTotalRequestPayloadLength

func (i *CosmosSDKObservationInterpreter) GetTotalRequestPayloadLength() uint32

GetTotalRequestPayloadLength calculates the total payload length across all request profiles. For Cosmos SDK requests, this aggregates payload lengths from both REST and JSON-RPC requests.

func (*CosmosSDKObservationInterpreter) IsRequestSuccessful

func (i *CosmosSDKObservationInterpreter) IsRequestSuccessful() bool

IsRequestSuccessful determines if the request completed without errors.

type EVMBlockNumberResponse

type EVMBlockNumberResponse struct {

	// The HTTP status code received from the endpoint
	HttpStatusCode int32 `protobuf:"varint,1,opt,name=http_status_code,json=httpStatusCode,proto3" json:"http_status_code,omitempty"`
	// The block number value returned in the response
	BlockNumberResponse string `protobuf:"bytes,2,opt,name=block_number_response,json=blockNumberResponse,proto3" json:"block_number_response,omitempty"`
	// Why the response failed QoS validation
	// If not set, the response is considered valid
	ResponseValidationError *EVMResponseValidationError `` /* 180-byte string literal not displayed */
	// contains filtered or unexported fields
}

EVMBlockNumberResponse stores the response to an `eth_getBlockNumber` request https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber

func (*EVMBlockNumberResponse) Descriptor deprecated

func (*EVMBlockNumberResponse) Descriptor() ([]byte, []int)

Deprecated: Use EVMBlockNumberResponse.ProtoReflect.Descriptor instead.

func (*EVMBlockNumberResponse) GetBlockNumberResponse

func (x *EVMBlockNumberResponse) GetBlockNumberResponse() string

func (*EVMBlockNumberResponse) GetHttpStatusCode

func (x *EVMBlockNumberResponse) GetHttpStatusCode() int32

func (*EVMBlockNumberResponse) GetResponseValidationError

func (x *EVMBlockNumberResponse) GetResponseValidationError() EVMResponseValidationError

func (*EVMBlockNumberResponse) ProtoMessage

func (*EVMBlockNumberResponse) ProtoMessage()

func (*EVMBlockNumberResponse) ProtoReflect

func (x *EVMBlockNumberResponse) ProtoReflect() protoreflect.Message

func (*EVMBlockNumberResponse) Reset

func (x *EVMBlockNumberResponse) Reset()

func (*EVMBlockNumberResponse) String

func (x *EVMBlockNumberResponse) String() string

type EVMChainIDResponse

type EVMChainIDResponse struct {

	// The HTTP status code received from the endpoint
	HttpStatusCode int32 `protobuf:"varint,1,opt,name=http_status_code,json=httpStatusCode,proto3" json:"http_status_code,omitempty"`
	// The chain ID value returned in the response
	ChainIdResponse string `protobuf:"bytes,2,opt,name=chain_id_response,json=chainIdResponse,proto3" json:"chain_id_response,omitempty"`
	// Why the response failed QoS validation
	// If not set, the response is considered valid
	ResponseValidationError *EVMResponseValidationError `` /* 180-byte string literal not displayed */
	// contains filtered or unexported fields
}

TODO_MVP(@adshmh): Implement a consolidated SanctionObservation message structure that:

  1. Contains both SanctionType enum and RecommendedSanction field
  2. Can be embedded as a single field within all qos/Response.proto messages
  3. Ensures sanction policies are explicitly documented within message definitions
  4. Search for all instances of RecommendedSanction in the codebase and use this new structure instead

EVMChainIDResponse stores the response to an `eth_chainId` request https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid

func (*EVMChainIDResponse) Descriptor deprecated

func (*EVMChainIDResponse) Descriptor() ([]byte, []int)

Deprecated: Use EVMChainIDResponse.ProtoReflect.Descriptor instead.

func (*EVMChainIDResponse) GetChainIdResponse

func (x *EVMChainIDResponse) GetChainIdResponse() string

func (*EVMChainIDResponse) GetHttpStatusCode

func (x *EVMChainIDResponse) GetHttpStatusCode() int32

func (*EVMChainIDResponse) GetResponseValidationError

func (x *EVMChainIDResponse) GetResponseValidationError() EVMResponseValidationError

func (*EVMChainIDResponse) ProtoMessage

func (*EVMChainIDResponse) ProtoMessage()

func (*EVMChainIDResponse) ProtoReflect

func (x *EVMChainIDResponse) ProtoReflect() protoreflect.Message

func (*EVMChainIDResponse) Reset

func (x *EVMChainIDResponse) Reset()

func (*EVMChainIDResponse) String

func (x *EVMChainIDResponse) String() string

type EVMEmptyResponse

type EVMEmptyResponse struct {

	// The HTTP status code represents the status code sent to the client when the chosen endpoint returns an empty response.
	HttpStatusCode int32 `protobuf:"varint,1,opt,name=http_status_code,json=httpStatusCode,proto3" json:"http_status_code,omitempty"`
	// Always set to EMPTY for empty responses
	ResponseValidationError EVMResponseValidationError `` /* 174-byte string literal not displayed */
	// contains filtered or unexported fields
}

EVMEmptyResponse represents an endpoint's empty response, which triggers automatic endpoint disqualification by EVM QoS processors.

func (*EVMEmptyResponse) Descriptor deprecated

func (*EVMEmptyResponse) Descriptor() ([]byte, []int)

Deprecated: Use EVMEmptyResponse.ProtoReflect.Descriptor instead.

func (*EVMEmptyResponse) GetHttpStatusCode

func (x *EVMEmptyResponse) GetHttpStatusCode() int32

func (*EVMEmptyResponse) GetResponseValidationError

func (x *EVMEmptyResponse) GetResponseValidationError() EVMResponseValidationError

func (*EVMEmptyResponse) ProtoMessage

func (*EVMEmptyResponse) ProtoMessage()

func (*EVMEmptyResponse) ProtoReflect

func (x *EVMEmptyResponse) ProtoReflect() protoreflect.Message

func (*EVMEmptyResponse) Reset

func (x *EVMEmptyResponse) Reset()

func (*EVMEmptyResponse) String

func (x *EVMEmptyResponse) String() string

type EVMEndpointObservation

type EVMEndpointObservation struct {

	// Address of the endpoint handling the request (e.g., onchain address of a Pocket Shannon node)
	EndpointAddr string `protobuf:"bytes,1,opt,name=endpoint_addr,json=endpointAddr,proto3" json:"endpoint_addr,omitempty"`
	// Details of the response received from the endpoint
	//
	// Types that are valid to be assigned to ResponseObservation:
	//
	//	*EVMEndpointObservation_ChainIdResponse
	//	*EVMEndpointObservation_BlockNumberResponse
	//	*EVMEndpointObservation_GetBalanceResponse
	//	*EVMEndpointObservation_UnrecognizedResponse
	//	*EVMEndpointObservation_EmptyResponse
	//	*EVMEndpointObservation_NoResponse
	ResponseObservation isEVMEndpointObservation_ResponseObservation `protobuf_oneof:"response_observation"`
	// Only set if the endpoint returned a valid JSONRPC response.
	ParsedJsonrpcResponse *JsonRpcResponse `` /* 132-byte string literal not displayed */
	// contains filtered or unexported fields
}

EVMEndpointObservation stores a single observation from an endpoint servicing the protocol response. Example: A Pocket node on Shannon backed by an Ethereum data node servicing an `eth_getBlockNumber` request.

func (*EVMEndpointObservation) Descriptor deprecated

func (*EVMEndpointObservation) Descriptor() ([]byte, []int)

Deprecated: Use EVMEndpointObservation.ProtoReflect.Descriptor instead.

func (*EVMEndpointObservation) GetBlockNumberResponse

func (x *EVMEndpointObservation) GetBlockNumberResponse() *EVMBlockNumberResponse

func (*EVMEndpointObservation) GetChainIdResponse

func (x *EVMEndpointObservation) GetChainIdResponse() *EVMChainIDResponse

func (*EVMEndpointObservation) GetEmptyResponse

func (x *EVMEndpointObservation) GetEmptyResponse() *EVMEmptyResponse

func (*EVMEndpointObservation) GetEndpointAddr

func (x *EVMEndpointObservation) GetEndpointAddr() string

func (*EVMEndpointObservation) GetGetBalanceResponse

func (x *EVMEndpointObservation) GetGetBalanceResponse() *EVMGetBalanceResponse

func (*EVMEndpointObservation) GetNoResponse

func (x *EVMEndpointObservation) GetNoResponse() *EVMNoResponse

func (*EVMEndpointObservation) GetParsedJsonrpcResponse

func (x *EVMEndpointObservation) GetParsedJsonrpcResponse() *JsonRpcResponse

func (*EVMEndpointObservation) GetResponseObservation

func (x *EVMEndpointObservation) GetResponseObservation() isEVMEndpointObservation_ResponseObservation

func (*EVMEndpointObservation) GetUnrecognizedResponse

func (x *EVMEndpointObservation) GetUnrecognizedResponse() *EVMUnrecognizedResponse

func (*EVMEndpointObservation) ProtoMessage

func (*EVMEndpointObservation) ProtoMessage()

func (*EVMEndpointObservation) ProtoReflect

func (x *EVMEndpointObservation) ProtoReflect() protoreflect.Message

func (*EVMEndpointObservation) Reset

func (x *EVMEndpointObservation) Reset()

func (*EVMEndpointObservation) String

func (x *EVMEndpointObservation) String() string

type EVMEndpointObservation_BlockNumberResponse

type EVMEndpointObservation_BlockNumberResponse struct {
	// Response to `eth_blockNumber` request
	// References:
	// * https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber
	// * Chain IDs: https://chainlist.org
	BlockNumberResponse *EVMBlockNumberResponse `protobuf:"bytes,3,opt,name=block_number_response,json=blockNumberResponse,proto3,oneof"`
}

type EVMEndpointObservation_ChainIdResponse

type EVMEndpointObservation_ChainIdResponse struct {
	// Response to `eth_chainId` request
	// Reference: https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid
	ChainIdResponse *EVMChainIDResponse `protobuf:"bytes,2,opt,name=chain_id_response,json=chainIdResponse,proto3,oneof"`
}

type EVMEndpointObservation_EmptyResponse

type EVMEndpointObservation_EmptyResponse struct {
	// EVMEmptyResponse indicates an endpoint returned no data.
	// Used to:
	//   - Disqualify endpoints that return empty responses
	//   - Track metrics for empty response patterns
	EmptyResponse *EVMEmptyResponse `protobuf:"bytes,6,opt,name=empty_response,json=emptyResponse,proto3,oneof"`
}

type EVMEndpointObservation_GetBalanceResponse

type EVMEndpointObservation_GetBalanceResponse struct {
	// Response to `eth_getBalance` request, which may be used to update archival state.
	// See the EVMGetBalanceResponse message for more details.
	// References:
	// * https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getbalance
	GetBalanceResponse *EVMGetBalanceResponse `protobuf:"bytes,4,opt,name=get_balance_response,json=getBalanceResponse,proto3,oneof"`
}

type EVMEndpointObservation_NoResponse

type EVMEndpointObservation_NoResponse struct {
	// EVMNoResponse indicates no response was received from any endpoint.
	// This differs from EVMEmptyResponse as no response was reported by the protocol.
	NoResponse *EVMNoResponse `protobuf:"bytes,7,opt,name=no_response,json=noResponse,proto3,oneof"`
}

type EVMEndpointObservation_UnrecognizedResponse

type EVMEndpointObservation_UnrecognizedResponse struct {
	// Responses not used in endpoint validation (e.g., JSONRPC ID field from `eth_call`)
	UnrecognizedResponse *EVMUnrecognizedResponse `protobuf:"bytes,5,opt,name=unrecognized_response,json=unrecognizedResponse,proto3,oneof"`
}

type EVMGetBalanceResponse

type EVMGetBalanceResponse struct {

	// The HTTP status code received from the endpoint
	HttpStatusCode int32 `protobuf:"varint,1,opt,name=http_status_code,json=httpStatusCode,proto3" json:"http_status_code,omitempty"`
	// The contract address for which the the balance is checked.
	ContractAddress string `protobuf:"bytes,2,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"`
	// The block number at which the balance is checked.
	BlockNumber string `protobuf:"bytes,3,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"`
	// The balance value at the block number for the address provided.
	Balance string `protobuf:"bytes,4,opt,name=balance,proto3" json:"balance,omitempty"`
	// Why the response failed QoS validation
	// If not set, the response is considered valid
	ResponseValidationError *EVMResponseValidationError `` /* 180-byte string literal not displayed */
	// contains filtered or unexported fields
}

EVMGetBalanceResponse stores the response to an `eth_getBalance` request. https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getbalance

func (*EVMGetBalanceResponse) Descriptor deprecated

func (*EVMGetBalanceResponse) Descriptor() ([]byte, []int)

Deprecated: Use EVMGetBalanceResponse.ProtoReflect.Descriptor instead.

func (*EVMGetBalanceResponse) GetBalance

func (x *EVMGetBalanceResponse) GetBalance() string

func (*EVMGetBalanceResponse) GetBlockNumber

func (x *EVMGetBalanceResponse) GetBlockNumber() string

func (*EVMGetBalanceResponse) GetContractAddress

func (x *EVMGetBalanceResponse) GetContractAddress() string

func (*EVMGetBalanceResponse) GetHttpStatusCode

func (x *EVMGetBalanceResponse) GetHttpStatusCode() int32

func (*EVMGetBalanceResponse) GetResponseValidationError

func (x *EVMGetBalanceResponse) GetResponseValidationError() EVMResponseValidationError

func (*EVMGetBalanceResponse) ProtoMessage

func (*EVMGetBalanceResponse) ProtoMessage()

func (*EVMGetBalanceResponse) ProtoReflect

func (x *EVMGetBalanceResponse) ProtoReflect() protoreflect.Message

func (*EVMGetBalanceResponse) Reset

func (x *EVMGetBalanceResponse) Reset()

func (*EVMGetBalanceResponse) String

func (x *EVMGetBalanceResponse) String() string

type EVMHTTPBodyReadFailure

type EVMHTTPBodyReadFailure struct {

	// The HTTP status code to return to the client - typically 500 Internal Server Error
	HttpStatusCode int32 `protobuf:"varint,1,opt,name=http_status_code,json=httpStatusCode,proto3" json:"http_status_code,omitempty"`
	// The specific type of request validation error
	ValidationError EVMRequestValidationError `` /* 147-byte string literal not displayed */
	// Additional error details if available
	ErrorDetails *string `protobuf:"bytes,3,opt,name=error_details,json=errorDetails,proto3,oneof" json:"error_details,omitempty"`
	// contains filtered or unexported fields
}

TODO_MVP(@adshmh): Remove HTTP body read validation once QoS interface is updated to receive request payload directly rather than reading from the HTTP request body.

EVMHTTPBodyReadFailure represents a validation failure due to internal server error while attempting to read the HTTP request body.

func (*EVMHTTPBodyReadFailure) Descriptor deprecated

func (*EVMHTTPBodyReadFailure) Descriptor() ([]byte, []int)

Deprecated: Use EVMHTTPBodyReadFailure.ProtoReflect.Descriptor instead.

func (*EVMHTTPBodyReadFailure) GetErrorDetails

func (x *EVMHTTPBodyReadFailure) GetErrorDetails() string

func (*EVMHTTPBodyReadFailure) GetHttpStatusCode

func (x *EVMHTTPBodyReadFailure) GetHttpStatusCode() int32

func (*EVMHTTPBodyReadFailure) GetValidationError

func (x *EVMHTTPBodyReadFailure) GetValidationError() EVMRequestValidationError

func (*EVMHTTPBodyReadFailure) ProtoMessage

func (*EVMHTTPBodyReadFailure) ProtoMessage()

func (*EVMHTTPBodyReadFailure) ProtoReflect

func (x *EVMHTTPBodyReadFailure) ProtoReflect() protoreflect.Message

func (*EVMHTTPBodyReadFailure) Reset

func (x *EVMHTTPBodyReadFailure) Reset()

func (*EVMHTTPBodyReadFailure) String

func (x *EVMHTTPBodyReadFailure) String() string

type EVMNoResponse

type EVMNoResponse struct {

	// The HTTP status code to return, typically 503 Service Unavailable
	HttpStatusCode int32 `protobuf:"varint,1,opt,name=http_status_code,json=httpStatusCode,proto3" json:"http_status_code,omitempty"`
	// Always set to NO_RESPONSE for this scenario
	ResponseValidationError EVMResponseValidationError `` /* 174-byte string literal not displayed */
	// contains filtered or unexported fields
}

EVMNoResponse represents a situation where no responses were reported to QoS by the protocol. This is due to protocol failures, e.g. if the selected endpoint was maxed out.

func (*EVMNoResponse) Descriptor deprecated

func (*EVMNoResponse) Descriptor() ([]byte, []int)

Deprecated: Use EVMNoResponse.ProtoReflect.Descriptor instead.

func (*EVMNoResponse) GetHttpStatusCode

func (x *EVMNoResponse) GetHttpStatusCode() int32

func (*EVMNoResponse) GetResponseValidationError

func (x *EVMNoResponse) GetResponseValidationError() EVMResponseValidationError

func (*EVMNoResponse) ProtoMessage

func (*EVMNoResponse) ProtoMessage()

func (*EVMNoResponse) ProtoReflect

func (x *EVMNoResponse) ProtoReflect() protoreflect.Message

func (*EVMNoResponse) Reset

func (x *EVMNoResponse) Reset()

func (*EVMNoResponse) String

func (x *EVMNoResponse) String() string

type EVMObservationInterpreter

type EVMObservationInterpreter struct {
	Logger polylog.Logger

	// TODO_TECHDEBT(@adshmh): Missing a logger
	Observations *EVMRequestObservations
}

EVMObservationInterpreter provides interpretation helpers for EVM QoS observations. It serves as a utility layer for the EVMRequestObservations protobuf type, making the relationships and meaning of different observation fields clear while shielding the rest of the codebase from proto type details.

The EVMRequestObservations type contains: - Various metadata (e.g., ChainID) - A single JSON-RPC request (exactly one) - A list of endpoint observations (zero or more)

This interpreter allows the rest of the code to draw conclusions about the observations without needing to understand the structure of the proto-generated types.

func (*EVMObservationInterpreter) GetChainID

func (i *EVMObservationInterpreter) GetChainID() (string, bool)

GetChainID extracts the chain ID associated with the EVM observations. Returns (chainID, true) if available Returns ("", false) if chain ID is missing or observations are nil

func (*EVMObservationInterpreter) GetEndpointDomain

func (i *EVMObservationInterpreter) GetEndpointDomain() string

GetEndpointDomain returns the domain of the endpoint that served the request.

If multiple endpoint observations are present, it returns the domain of the first endpoint observation. If no endpoint observations are present, it returns an empty string.

TODO_TECHDEBT: Consolidate this with the business logic of other "GetEndpointDomain" implementations.

func (*EVMObservationInterpreter) GetEndpointObservations

func (i *EVMObservationInterpreter) GetEndpointObservations() ([]*EVMEndpointObservation, bool)

GetEndpointObservations extracts endpoint observations and indicates success Returns (nil, false) if observations are missing or validation failed Returns (observations, true) if observations are available

func (*EVMObservationInterpreter) GetJSONRPCErrorCode

func (i *EVMObservationInterpreter) GetJSONRPCErrorCode() (int, bool)

GetJSONRPCErrorCode extracts the JSON-RPC error code from the last endpoint observation. Returns (errorCode, true) if a JSON-RPC error is present in the parsed response Returns (0, false) if no error is present or parsed_jsonrpc_response is nil

func (*EVMObservationInterpreter) GetRequestMethods

func (i *EVMObservationInterpreter) GetRequestMethods() ([]string, bool)

GetRequestMethods extracts all JSON-RPC methods from the request observations. Returns (methods, true) if extraction succeeded Returns (nil, false) if requests are invalid or missing

func (*EVMObservationInterpreter) GetRequestOrigin

func (i *EVMObservationInterpreter) GetRequestOrigin() string

GetRequestOrigin returns the Origin of the request: Organic, i.e. User requests. Synthetic, i.e. requests build by the QoS sytem to get observations on endpoints.

func (*EVMObservationInterpreter) GetRequestStatus

func (i *EVMObservationInterpreter) GetRequestStatus() (httpStatusCode int, requestError *EVMRequestError, err error)

TODO_TECHDEBT(@adshmh): Check for any request-level errors.

  • Example: no responses received from any endpoints.
  • Drop EVMRequestError struct, and use RequestError directly.

GetRequestStatus interprets the observations to determine request status information.

Returns:

  • httpStatusCode: the suggested HTTP status code to return to the client
  • requestError: error details (nil if successful)
  • err: error if interpreter cannot determine status (e.g., nil observations)

func (*EVMObservationInterpreter) GetServiceID

func (i *EVMObservationInterpreter) GetServiceID() (string, bool)

GetServiceID extracts the service ID associated with the EVM observations. Returns (serviceID, true) if available Returns ("", false) if service ID is missing or observations are nil

type EVMRequestError

type EVMRequestError struct {
	// contains filtered or unexported fields
}

EVMRequestError represents a failure in processing an EVM request or response Contains information extracted from error types defined in evm.proto

func (*EVMRequestError) Error

func (e *EVMRequestError) Error() string

Error implements the error interface

func (*EVMRequestError) GetError

func (e *EVMRequestError) GetError() string

GetError returns the error type string representation. As of #186, this is limited to request, response or unknown error.

func (*EVMRequestError) IsRequestError

func (e *EVMRequestError) IsRequestError() bool

IsRequestError returns true if this is a request validation error

func (*EVMRequestError) IsResponseError

func (e *EVMRequestError) IsResponseError() bool

IsResponseError returns true if this is a response validation error

func (*EVMRequestError) String

func (e *EVMRequestError) String() string

String returns a string representation of the error

type EVMRequestObservation

type EVMRequestObservation struct {

	// The EVM blockchain service's JSON-RPC request.
	// This field will be populated only if request validation succeeds.
	// If there is an error reading the HTTP request, there will be no jsonrpc_request.
	// TODO_TECHDEBT: Assumes EVM chains only support JSON-RPC. May need refactoring to support other protocols.
	JsonrpcRequest *JsonRpcRequest `protobuf:"bytes,5,opt,name=jsonrpc_request,json=jsonrpcRequest,proto3" json:"jsonrpc_request,omitempty"`
	// EVM-specific observations from endpoint(s) that responded to the service request.
	// Multiple observations may occur when:
	// * Original endpoint fails
	// * Request is sent to additional endpoints for data collection
	// This field will only be populated if request validation succeeds.
	EndpointObservations []*EVMEndpointObservation `protobuf:"bytes,6,rep,name=endpoint_observations,json=endpointObservations,proto3" json:"endpoint_observations,omitempty"`
	// contains filtered or unexported fields
}

EVMRequestObservation stores a single observation from an endpoint servicing the protocol response. This is necessary to support batch requests.

func (*EVMRequestObservation) Descriptor deprecated

func (*EVMRequestObservation) Descriptor() ([]byte, []int)

Deprecated: Use EVMRequestObservation.ProtoReflect.Descriptor instead.

func (*EVMRequestObservation) GetEndpointObservations

func (x *EVMRequestObservation) GetEndpointObservations() []*EVMEndpointObservation

func (*EVMRequestObservation) GetJsonrpcRequest

func (x *EVMRequestObservation) GetJsonrpcRequest() *JsonRpcRequest

func (*EVMRequestObservation) ProtoMessage

func (*EVMRequestObservation) ProtoMessage()

func (*EVMRequestObservation) ProtoReflect

func (x *EVMRequestObservation) ProtoReflect() protoreflect.Message

func (*EVMRequestObservation) Reset

func (x *EVMRequestObservation) Reset()

func (*EVMRequestObservation) String

func (x *EVMRequestObservation) String() string

type EVMRequestObservations

type EVMRequestObservations struct {

	// chain_id is the blockchain identifier for the evm QoS implementation.
	// This is preset by the processor and not determined by the request.
	// Expected as the `Result` field in eth_chainId responses.
	ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
	// service_id is the identifier for the evm QoS implementation.
	// It is the "alias" or human readable interpratation of the chain_id.
	ServiceId string `protobuf:"bytes,7,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"`
	// The origin of the request:
	// - Organic: real (i.e. user) requests
	// - Synthetic: requests built by QoS module for collecting data on endpoints (a.k.a hydrator)
	RequestOrigin RequestOrigin `` /* 129-byte string literal not displayed */
	// The length of the client's request payload, in bytes.
	RequestPayloadLength uint32 `protobuf:"varint,2,opt,name=request_payload_length,json=requestPayloadLength,proto3" json:"request_payload_length,omitempty"`
	// If this oneof IS SET, then one of the following validation failures happened:
	//   - Indicates the request failed validation
	//   - Contains details about the specific failure type
	//   - The HTTP status code in the selected failure type overrides any status codes from
	//     endpoint observations and should be returned to the client
	//
	// If this oneof IS NOT SET, then one of the following occurred:
	//   - The request passed validation
	//   - The HTTP status code from the most recent endpoint observation should be used instead
	//
	// Types that are valid to be assigned to RequestValidationFailure:
	//
	//	*EVMRequestObservations_EvmHttpBodyReadFailure
	//	*EVMRequestObservations_EvmRequestUnmarshalingFailure
	RequestValidationFailure isEVMRequestObservations_RequestValidationFailure `protobuf_oneof:"request_validation_failure"`
	// Each request may have multiple observations to support batch requests.
	RequestObservations []*EVMRequestObservation `protobuf:"bytes,10,rep,name=request_observations,json=requestObservations,proto3" json:"request_observations,omitempty"`
	// endpoint_selection_metadata contains metadata about the endpoint selection process.
	EndpointSelectionMetadata *EndpointSelectionMetadata `` /* 138-byte string literal not displayed */
	// Internal error encountered processing the request, if any.
	// Example: no endpoint responses received.
	// On single JSONRPC request: applies to the single request.
	// On batch JSONRPC requests: only set if the entire batch failed (e.g. no endpoint responses for any of the requests of the batch)
	RequestError *RequestError `protobuf:"bytes,11,opt,name=request_error,json=requestError,proto3,oneof" json:"request_error,omitempty"`
	// contains filtered or unexported fields
}

EVMRequestObservations captures all observations made while serving a single EVM blockchain service request.

func (*EVMRequestObservations) Descriptor deprecated

func (*EVMRequestObservations) Descriptor() ([]byte, []int)

Deprecated: Use EVMRequestObservations.ProtoReflect.Descriptor instead.

func (*EVMRequestObservations) GetChainId

func (x *EVMRequestObservations) GetChainId() string

func (*EVMRequestObservations) GetEndpointSelectionMetadata

func (x *EVMRequestObservations) GetEndpointSelectionMetadata() *EndpointSelectionMetadata

func (*EVMRequestObservations) GetEvmHttpBodyReadFailure

func (x *EVMRequestObservations) GetEvmHttpBodyReadFailure() *EVMHTTPBodyReadFailure

func (*EVMRequestObservations) GetEvmRequestUnmarshalingFailure

func (x *EVMRequestObservations) GetEvmRequestUnmarshalingFailure() *EVMRequestUnmarshalingFailure

func (*EVMRequestObservations) GetRequestError

func (x *EVMRequestObservations) GetRequestError() *RequestError

func (*EVMRequestObservations) GetRequestObservations

func (x *EVMRequestObservations) GetRequestObservations() []*EVMRequestObservation

func (*EVMRequestObservations) GetRequestOrigin

func (x *EVMRequestObservations) GetRequestOrigin() RequestOrigin

func (*EVMRequestObservations) GetRequestPayloadLength

func (x *EVMRequestObservations) GetRequestPayloadLength() uint32

func (*EVMRequestObservations) GetRequestValidationFailure

func (x *EVMRequestObservations) GetRequestValidationFailure() isEVMRequestObservations_RequestValidationFailure

func (*EVMRequestObservations) GetServiceId

func (x *EVMRequestObservations) GetServiceId() string

func (*EVMRequestObservations) ProtoMessage

func (*EVMRequestObservations) ProtoMessage()

func (*EVMRequestObservations) ProtoReflect

func (x *EVMRequestObservations) ProtoReflect() protoreflect.Message

func (*EVMRequestObservations) Reset

func (x *EVMRequestObservations) Reset()

func (*EVMRequestObservations) String

func (x *EVMRequestObservations) String() string

type EVMRequestObservations_EvmHttpBodyReadFailure

type EVMRequestObservations_EvmHttpBodyReadFailure struct {
	// Indicates a failure to read the HTTP request body
	EvmHttpBodyReadFailure *EVMHTTPBodyReadFailure `protobuf:"bytes,3,opt,name=evm_http_body_read_failure,json=evmHttpBodyReadFailure,proto3,oneof"`
}

type EVMRequestObservations_EvmRequestUnmarshalingFailure

type EVMRequestObservations_EvmRequestUnmarshalingFailure struct {
	// Indicates a failure to unmarshal/parse the request
	EvmRequestUnmarshalingFailure *EVMRequestUnmarshalingFailure `protobuf:"bytes,4,opt,name=evm_request_unmarshaling_failure,json=evmRequestUnmarshalingFailure,proto3,oneof"`
}

type EVMRequestUnmarshalingFailure

type EVMRequestUnmarshalingFailure struct {

	// The HTTP status code to return to the client - typically 400 Bad Request
	HttpStatusCode int32 `protobuf:"varint,1,opt,name=http_status_code,json=httpStatusCode,proto3" json:"http_status_code,omitempty"`
	// The specific type of request validation error
	ValidationError EVMRequestValidationError `` /* 147-byte string literal not displayed */
	// Additional error details if available
	ErrorDetails *string `protobuf:"bytes,3,opt,name=error_details,json=errorDetails,proto3,oneof" json:"error_details,omitempty"`
	// contains filtered or unexported fields
}

EVMRequestUnmarshalingFailure represents a validation failure due to being unable to parse the incoming request into the expected format.

func (*EVMRequestUnmarshalingFailure) Descriptor deprecated

func (*EVMRequestUnmarshalingFailure) Descriptor() ([]byte, []int)

Deprecated: Use EVMRequestUnmarshalingFailure.ProtoReflect.Descriptor instead.

func (*EVMRequestUnmarshalingFailure) GetErrorDetails

func (x *EVMRequestUnmarshalingFailure) GetErrorDetails() string

func (*EVMRequestUnmarshalingFailure) GetHttpStatusCode

func (x *EVMRequestUnmarshalingFailure) GetHttpStatusCode() int32

func (*EVMRequestUnmarshalingFailure) GetValidationError

func (*EVMRequestUnmarshalingFailure) ProtoMessage

func (*EVMRequestUnmarshalingFailure) ProtoMessage()

func (*EVMRequestUnmarshalingFailure) ProtoReflect

func (*EVMRequestUnmarshalingFailure) Reset

func (x *EVMRequestUnmarshalingFailure) Reset()

func (*EVMRequestUnmarshalingFailure) String

type EVMRequestValidationError

type EVMRequestValidationError int32

EVMRequestValidationError enumerates possible causes for EVM request rejection: Invalid request types (as of PR #186):

  1. Internal server error while reading the HTTP request body
  2. Unmarshal error when parsing request into the expected format
const (
	EVMRequestValidationError_EVM_REQUEST_VALIDATION_ERROR_UNSPECIFIED                  EVMRequestValidationError = 0
	EVMRequestValidationError_EVM_REQUEST_VALIDATION_ERROR_HTTP_BODY_READ_FAILURE       EVMRequestValidationError = 1
	EVMRequestValidationError_EVM_REQUEST_VALIDATION_ERROR_REQUEST_UNMARSHALING_FAILURE EVMRequestValidationError = 2
)

func (EVMRequestValidationError) Descriptor

func (EVMRequestValidationError) Enum

func (EVMRequestValidationError) EnumDescriptor deprecated

func (EVMRequestValidationError) EnumDescriptor() ([]byte, []int)

Deprecated: Use EVMRequestValidationError.Descriptor instead.

func (EVMRequestValidationError) Number

func (EVMRequestValidationError) String

func (x EVMRequestValidationError) String() string

func (EVMRequestValidationError) Type

type EVMResponseValidationError

type EVMResponseValidationError int32

TODO_DOCUMENT(@adshmh): Create a design document for the feature described below. TODO_MVP(@adshmh): Add EVMUserErrorType enum

Purpose: Distinguish between endpoint technical failures and user input errors

Background: - Currently we only track endpoint/technical failures - Need to identify when request seems valid but fails due to user input issues (e.g., non-existent hash)

Implementation: 1. Create new EVMUserErrorType enum with categories like RESOURCE_NOT_FOUND, INVALID_PARAMETER 2. Add user_error field to appropriate response types 3. Update HTTP status code selection logic to consider user errors

Benefits: - More accurate error reporting to clients - Appropriate HTTP status codes (e.g., 404 vs 500) - Better client debugging experience

EVMResponseValidationError defines why an endpoint response was rejected. Current invalid response types (as of PR #186):

  1. EmptyResponse - endpoint returned no data
  2. UnmarshalErr - response failed to parse into expected format
  3. NoResponse - no responses recorded by the QoS service: probably caused by protocol-level errors
const (
	EVMResponseValidationError_EVM_RESPONSE_VALIDATION_ERROR_UNSPECIFIED EVMResponseValidationError = 0
	EVMResponseValidationError_EVM_RESPONSE_VALIDATION_ERROR_EMPTY       EVMResponseValidationError = 1 // Response with no data.
	EVMResponseValidationError_EVM_RESPONSE_VALIDATION_ERROR_UNMARSHAL   EVMResponseValidationError = 2 // Response parsing failed
	EVMResponseValidationError_EVM_RESPONSE_VALIDATION_ERROR_NO_RESPONSE EVMResponseValidationError = 3 // No response received from any endpoint
)

func (EVMResponseValidationError) Descriptor

func (EVMResponseValidationError) Enum

func (EVMResponseValidationError) EnumDescriptor deprecated

func (EVMResponseValidationError) EnumDescriptor() ([]byte, []int)

Deprecated: Use EVMResponseValidationError.Descriptor instead.

func (EVMResponseValidationError) Number

func (EVMResponseValidationError) String

func (EVMResponseValidationError) Type

type EVMUnrecognizedResponse

type EVMUnrecognizedResponse struct {

	// The HTTP status code received from the endpoint
	HttpStatusCode int32 `protobuf:"varint,1,opt,name=http_status_code,json=httpStatusCode,proto3" json:"http_status_code,omitempty"`
	// The JSON-RPC response received
	JsonrpcResponse *JsonRpcResponse `protobuf:"bytes,2,opt,name=jsonrpc_response,json=jsonrpcResponse,proto3" json:"jsonrpc_response,omitempty"`
	// Why the response failed QoS validation
	// If not set, the response is considered valid
	ResponseValidationError *EVMResponseValidationError `` /* 180-byte string literal not displayed */
	// contains filtered or unexported fields
}

EVMUnrecognizedResponse handles requests with unrecognized/unvalidated response methods for QoS endpoint selection. - Example: eth_call response contents used for endpoint validation (as of PR #72) - Sanctions still apply to endpoints returning invalid responses (e.g. unparsable JSONRPC)

func (*EVMUnrecognizedResponse) Descriptor deprecated

func (*EVMUnrecognizedResponse) Descriptor() ([]byte, []int)

Deprecated: Use EVMUnrecognizedResponse.ProtoReflect.Descriptor instead.

func (*EVMUnrecognizedResponse) GetHttpStatusCode

func (x *EVMUnrecognizedResponse) GetHttpStatusCode() int32

func (*EVMUnrecognizedResponse) GetJsonrpcResponse

func (x *EVMUnrecognizedResponse) GetJsonrpcResponse() *JsonRpcResponse

func (*EVMUnrecognizedResponse) GetResponseValidationError

func (x *EVMUnrecognizedResponse) GetResponseValidationError() EVMResponseValidationError

func (*EVMUnrecognizedResponse) ProtoMessage

func (*EVMUnrecognizedResponse) ProtoMessage()

func (*EVMUnrecognizedResponse) ProtoReflect

func (x *EVMUnrecognizedResponse) ProtoReflect() protoreflect.Message

func (*EVMUnrecognizedResponse) Reset

func (x *EVMUnrecognizedResponse) Reset()

func (*EVMUnrecognizedResponse) String

func (x *EVMUnrecognizedResponse) String() string

type EndpointSelectionMetadata

type EndpointSelectionMetadata struct {

	// random_endpoint_fallback indicates random endpoint selection was used
	// when all available endpoints failed QoS validation.
	RandomEndpointFallback bool `` /* 130-byte string literal not displayed */
	// validation_results contains detailed information about each endpoint
	// validation attempt during the selection process (both successful and failed).
	//
	// Derived counts can be calculated from this field:
	// - available_endpoints_count = len(validation_results)
	// - valid_endpoints_count = count(validation_results where success = true)
	ValidationResults []*EndpointValidationResult `protobuf:"bytes,2,rep,name=validation_results,json=validationResults,proto3" json:"validation_results,omitempty"`
	// contains filtered or unexported fields
}

EndpointSelectionMetadata captures metadata about the endpoint selection process. This message can be embedded in various QoS observation types to provide consistent endpoint selection tracking across different blockchain services.

Note: Multiple endpoint validations occur during each service request processing: - All available endpoints are validated before selection - Failed endpoints are filtered out - One endpoint is selected from the valid set - This metadata captures the validation results for all endpoints checked

func (*EndpointSelectionMetadata) Descriptor deprecated

func (*EndpointSelectionMetadata) Descriptor() ([]byte, []int)

Deprecated: Use EndpointSelectionMetadata.ProtoReflect.Descriptor instead.

func (*EndpointSelectionMetadata) GetRandomEndpointFallback

func (x *EndpointSelectionMetadata) GetRandomEndpointFallback() bool

func (*EndpointSelectionMetadata) GetValidationResults

func (x *EndpointSelectionMetadata) GetValidationResults() []*EndpointValidationResult

func (*EndpointSelectionMetadata) ProtoMessage

func (*EndpointSelectionMetadata) ProtoMessage()

func (*EndpointSelectionMetadata) ProtoReflect

func (*EndpointSelectionMetadata) Reset

func (x *EndpointSelectionMetadata) Reset()

func (*EndpointSelectionMetadata) String

func (x *EndpointSelectionMetadata) String() string

type EndpointValidationFailureReason

type EndpointValidationFailureReason int32

EndpointValidationFailureReason enumerates the possible reasons why an endpoint fails validation.

const (
	EndpointValidationFailureReason_ENDPOINT_VALIDATION_FAILURE_REASON_UNSPECIFIED EndpointValidationFailureReason = 0
	// Endpoint has returned empty responses in the past
	EndpointValidationFailureReason_ENDPOINT_VALIDATION_FAILURE_REASON_EMPTY_RESPONSE_HISTORY EndpointValidationFailureReason = 1
	// Endpoint returned an invalid response within the timeout period
	EndpointValidationFailureReason_ENDPOINT_VALIDATION_FAILURE_REASON_RECENT_INVALID_RESPONSE EndpointValidationFailureReason = 2
	// Endpoint's block number is outside the sync allowance (too far behind)
	EndpointValidationFailureReason_ENDPOINT_VALIDATION_FAILURE_REASON_BLOCK_NUMBER_BEHIND EndpointValidationFailureReason = 3
	// Endpoint's chain ID doesn't match the expected chain ID
	EndpointValidationFailureReason_ENDPOINT_VALIDATION_FAILURE_REASON_CHAIN_ID_MISMATCH EndpointValidationFailureReason = 4
	// No block number observation available for the endpoint
	EndpointValidationFailureReason_ENDPOINT_VALIDATION_FAILURE_REASON_NO_BLOCK_NUMBER_OBSERVATION EndpointValidationFailureReason = 5
	// No chain ID observation available for the endpoint
	EndpointValidationFailureReason_ENDPOINT_VALIDATION_FAILURE_REASON_NO_CHAIN_ID_OBSERVATION EndpointValidationFailureReason = 6
	// Endpoint failed archival balance validation
	EndpointValidationFailureReason_ENDPOINT_VALIDATION_FAILURE_REASON_ARCHIVAL_CHECK_FAILED EndpointValidationFailureReason = 7
	// Endpoint was not found in PATH's endpoint store
	EndpointValidationFailureReason_ENDPOINT_VALIDATION_FAILURE_REASON_ENDPOINT_NOT_FOUND EndpointValidationFailureReason = 8
	// Unknown or unclassified validation failure
	EndpointValidationFailureReason_ENDPOINT_VALIDATION_FAILURE_REASON_UNKNOWN EndpointValidationFailureReason = 9
)

func (EndpointValidationFailureReason) Descriptor

func (EndpointValidationFailureReason) Enum

func (EndpointValidationFailureReason) EnumDescriptor deprecated

func (EndpointValidationFailureReason) EnumDescriptor() ([]byte, []int)

Deprecated: Use EndpointValidationFailureReason.Descriptor instead.

func (EndpointValidationFailureReason) Number

func (EndpointValidationFailureReason) String

func (EndpointValidationFailureReason) Type

type EndpointValidationResult

type EndpointValidationResult struct {

	// The endpoint address that was validated
	EndpointAddr string `protobuf:"bytes,1,opt,name=endpoint_addr,json=endpointAddr,proto3" json:"endpoint_addr,omitempty"`
	// Whether the validation was successful
	Success bool `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"`
	// The specific reason why validation failed (only set when success = false)
	FailureReason *EndpointValidationFailureReason `` /* 153-byte string literal not displayed */
	// Optional additional details about the failure (only set when success = false)
	FailureDetails *string `protobuf:"bytes,4,opt,name=failure_details,json=failureDetails,proto3,oneof" json:"failure_details,omitempty"`
	// contains filtered or unexported fields
}

EndpointValidationResult represents the result of validating a single endpoint. This captures both successful and failed validation attempts with optional failure details.

func (*EndpointValidationResult) Descriptor deprecated

func (*EndpointValidationResult) Descriptor() ([]byte, []int)

Deprecated: Use EndpointValidationResult.ProtoReflect.Descriptor instead.

func (*EndpointValidationResult) GetEndpointAddr

func (x *EndpointValidationResult) GetEndpointAddr() string

func (*EndpointValidationResult) GetFailureDetails

func (x *EndpointValidationResult) GetFailureDetails() string

func (*EndpointValidationResult) GetFailureReason

func (*EndpointValidationResult) GetSuccess

func (x *EndpointValidationResult) GetSuccess() bool

func (*EndpointValidationResult) ProtoMessage

func (*EndpointValidationResult) ProtoMessage()

func (*EndpointValidationResult) ProtoReflect

func (x *EndpointValidationResult) ProtoReflect() protoreflect.Message

func (*EndpointValidationResult) Reset

func (x *EndpointValidationResult) Reset()

func (*EndpointValidationResult) String

func (x *EndpointValidationResult) String() string

type JsonRpcRequest

type JsonRpcRequest struct {

	// Client-established identifier. Must be a String, Number, or NULL if present.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Name of the JSON-RPC method being called (e.g., eth_chainId for EVM chains)
	Method string `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"`
	// contains filtered or unexported fields
}

JsonRpcRequest represents essential fields of a JSON-RPC request for observation purposes. Reference: https://www.jsonrpc.org/specification#request_object

func (*JsonRpcRequest) Descriptor deprecated

func (*JsonRpcRequest) Descriptor() ([]byte, []int)

Deprecated: Use JsonRpcRequest.ProtoReflect.Descriptor instead.

func (*JsonRpcRequest) GetId

func (x *JsonRpcRequest) GetId() string

func (*JsonRpcRequest) GetMethod

func (x *JsonRpcRequest) GetMethod() string

func (*JsonRpcRequest) ProtoMessage

func (*JsonRpcRequest) ProtoMessage()

func (*JsonRpcRequest) ProtoReflect

func (x *JsonRpcRequest) ProtoReflect() protoreflect.Message

func (*JsonRpcRequest) Reset

func (x *JsonRpcRequest) Reset()

func (*JsonRpcRequest) String

func (x *JsonRpcRequest) String() string

type JsonRpcResponse

type JsonRpcResponse struct {

	// Must match the id value from the corresponding request
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// A preview of the JSONRPC response's `result` field.
	// It may have been truncated to reduce message size.
	ResultPreview string `protobuf:"bytes,2,opt,name=result_preview,json=resultPreview,proto3" json:"result_preview,omitempty"`
	// Error details, if the request failed
	Error *JsonRpcResponseError `protobuf:"bytes,3,opt,name=error,proto3,oneof" json:"error,omitempty"`
	// contains filtered or unexported fields
}

JsonRpcResponse represents essential fields of a JSON-RPC response for observation purposes. Reference: https://www.jsonrpc.org/specification#response_object

func (*JsonRpcResponse) Descriptor deprecated

func (*JsonRpcResponse) Descriptor() ([]byte, []int)

Deprecated: Use JsonRpcResponse.ProtoReflect.Descriptor instead.

func (*JsonRpcResponse) GetError

func (x *JsonRpcResponse) GetError() *JsonRpcResponseError

func (*JsonRpcResponse) GetId

func (x *JsonRpcResponse) GetId() string

func (*JsonRpcResponse) GetResultPreview

func (x *JsonRpcResponse) GetResultPreview() string

func (*JsonRpcResponse) ProtoMessage

func (*JsonRpcResponse) ProtoMessage()

func (*JsonRpcResponse) ProtoReflect

func (x *JsonRpcResponse) ProtoReflect() protoreflect.Message

func (*JsonRpcResponse) Reset

func (x *JsonRpcResponse) Reset()

func (*JsonRpcResponse) String

func (x *JsonRpcResponse) String() string

type JsonRpcResponseError

type JsonRpcResponseError struct {

	// Error code indicating the type of failure
	Code int64 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	// Human-readable error description
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

JsonRpcResponseError represents core error fields from a JSON-RPC response. Reference: https://www.jsonrpc.org/specification#error_object

Only includes fields required for QoS observations.

func (*JsonRpcResponseError) Descriptor deprecated

func (*JsonRpcResponseError) Descriptor() ([]byte, []int)

Deprecated: Use JsonRpcResponseError.ProtoReflect.Descriptor instead.

func (*JsonRpcResponseError) GetCode

func (x *JsonRpcResponseError) GetCode() int64

func (*JsonRpcResponseError) GetMessage

func (x *JsonRpcResponseError) GetMessage() string

func (*JsonRpcResponseError) ProtoMessage

func (*JsonRpcResponseError) ProtoMessage()

func (*JsonRpcResponseError) ProtoReflect

func (x *JsonRpcResponseError) ProtoReflect() protoreflect.Message

func (*JsonRpcResponseError) Reset

func (x *JsonRpcResponseError) Reset()

func (*JsonRpcResponseError) String

func (x *JsonRpcResponseError) String() string

type JsonRpcResponseValidationError

type JsonRpcResponseValidationError struct {

	// Type of validation error
	ErrorType JsonRpcValidationErrorType `` /* 130-byte string literal not displayed */
	// Timestamp when the validation error occurred
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

JsonRpcResponseValidationError captures validation errors for JSON-RPC responses

func (*JsonRpcResponseValidationError) Descriptor deprecated

func (*JsonRpcResponseValidationError) Descriptor() ([]byte, []int)

Deprecated: Use JsonRpcResponseValidationError.ProtoReflect.Descriptor instead.

func (*JsonRpcResponseValidationError) GetErrorType

func (*JsonRpcResponseValidationError) GetTimestamp

func (*JsonRpcResponseValidationError) ProtoMessage

func (*JsonRpcResponseValidationError) ProtoMessage()

func (*JsonRpcResponseValidationError) ProtoReflect

func (*JsonRpcResponseValidationError) Reset

func (x *JsonRpcResponseValidationError) Reset()

func (*JsonRpcResponseValidationError) String

type JsonRpcValidationErrorType

type JsonRpcValidationErrorType int32

Enum for different types of JSON-RPC validation errors

const (
	// Default/unspecified validation error
	JsonRpcValidationErrorType_JSON_RPC_VALIDATION_ERROR_TYPE_UNSPECIFIED JsonRpcValidationErrorType = 0
	// Response is not a valid JSON-RPC response
	JsonRpcValidationErrorType_JSON_RPC_VALIDATION_ERROR_TYPE_NON_JSONRPC_RESPONSE JsonRpcValidationErrorType = 1
)

func (JsonRpcValidationErrorType) Descriptor

func (JsonRpcValidationErrorType) Enum

func (JsonRpcValidationErrorType) EnumDescriptor deprecated

func (JsonRpcValidationErrorType) EnumDescriptor() ([]byte, []int)

Deprecated: Use JsonRpcValidationErrorType.Descriptor instead.

func (JsonRpcValidationErrorType) Number

func (JsonRpcValidationErrorType) String

func (JsonRpcValidationErrorType) Type

type Observations

type Observations struct {

	// service_observations contains QoS measurements specific to the service type
	//
	// Types that are valid to be assigned to ServiceObservations:
	//
	//	*Observations_Solana
	//	*Observations_Evm
	//	*Observations_Cosmos
	ServiceObservations isObservations_ServiceObservations `protobuf_oneof:"service_observations"`
	// contains filtered or unexported fields
}

Observations contains QoS measurements for a single service request. Currently supports: - Solana blockchain service - EVM blockchains service

func (*Observations) Descriptor deprecated

func (*Observations) Descriptor() ([]byte, []int)

Deprecated: Use Observations.ProtoReflect.Descriptor instead.

func (*Observations) GetCosmos

func (x *Observations) GetCosmos() *CosmosRequestObservations

func (*Observations) GetEvm

func (x *Observations) GetEvm() *EVMRequestObservations

func (*Observations) GetServiceObservations

func (x *Observations) GetServiceObservations() isObservations_ServiceObservations

func (*Observations) GetSolana

func (x *Observations) GetSolana() *SolanaRequestObservations

func (*Observations) ProtoMessage

func (*Observations) ProtoMessage()

func (*Observations) ProtoReflect

func (x *Observations) ProtoReflect() protoreflect.Message

func (*Observations) Reset

func (x *Observations) Reset()

func (*Observations) String

func (x *Observations) String() string

type Observations_Cosmos

type Observations_Cosmos struct {
	// cosmos contains QoS measurements for a single CosmosSDK blockchain request
	Cosmos *CosmosRequestObservations `protobuf:"bytes,3,opt,name=cosmos,proto3,oneof"`
}

type Observations_Evm

type Observations_Evm struct {
	// evm contains QoS measurements for a single EVM blockchain request
	Evm *EVMRequestObservations `protobuf:"bytes,2,opt,name=evm,proto3,oneof"`
}

type Observations_Solana

type Observations_Solana struct {
	// solana contains QoS measurements for a single Solana blockchain request
	Solana *SolanaRequestObservations `protobuf:"bytes,1,opt,name=solana,proto3,oneof"`
}

type RESTRequest

type RESTRequest struct {

	// API path that was called (e.g. "/", "/health", "/status")
	ApiPath string `protobuf:"bytes,1,opt,name=api_path,json=apiPath,proto3" json:"api_path,omitempty"`
	// HTTP method used (GET, POST, etc.)
	HttpMethod string `protobuf:"bytes,2,opt,name=http_method,json=httpMethod,proto3" json:"http_method,omitempty"`
	// Tracks the value of HTTP request's Content-Type header.
	ContentType string `protobuf:"bytes,3,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
	// Length of request payload: could be 0, e.g. for GET requests.
	PayloadLength uint32 `protobuf:"varint,4,opt,name=payload_length,json=payloadLength,proto3" json:"payload_length,omitempty"`
	// contains filtered or unexported fields
}

RESTRequest contains details about a REST request

func (*RESTRequest) Descriptor deprecated

func (*RESTRequest) Descriptor() ([]byte, []int)

Deprecated: Use RESTRequest.ProtoReflect.Descriptor instead.

func (*RESTRequest) GetApiPath

func (x *RESTRequest) GetApiPath() string

func (*RESTRequest) GetContentType

func (x *RESTRequest) GetContentType() string

func (*RESTRequest) GetHttpMethod

func (x *RESTRequest) GetHttpMethod() string

func (*RESTRequest) GetPayloadLength

func (x *RESTRequest) GetPayloadLength() uint32

func (*RESTRequest) ProtoMessage

func (*RESTRequest) ProtoMessage()

func (*RESTRequest) ProtoReflect

func (x *RESTRequest) ProtoReflect() protoreflect.Message

func (*RESTRequest) Reset

func (x *RESTRequest) Reset()

func (*RESTRequest) String

func (x *RESTRequest) String() string

type RequestError

type RequestError struct {

	// Tracks the kind of error: e.g. internal.
	ErrorKind RequestErrorKind `protobuf:"varint,1,opt,name=error_kind,json=errorKind,proto3,enum=path.qos.RequestErrorKind" json:"error_kind,omitempty"`
	// Tracks details of the error.
	ErrorDetails string `protobuf:"bytes,2,opt,name=error_details,json=errorDetails,proto3" json:"error_details,omitempty"`
	// TODO_MVP(@adshm): drop this in favor of JUDGE's solution:
	// store the JSONRPC Response's details (specifically the `code` field).
	// The HTTP status can be derived from the JSONRPC response.
	HttpStatusCode int32 `protobuf:"varint,3,opt,name=http_status_code,json=httpStatusCode,proto3" json:"http_status_code,omitempty"`
	// contains filtered or unexported fields
}

RequestError tracks the details of a request error.

func (*RequestError) Descriptor deprecated

func (*RequestError) Descriptor() ([]byte, []int)

Deprecated: Use RequestError.ProtoReflect.Descriptor instead.

func (*RequestError) GetErrorDetails

func (x *RequestError) GetErrorDetails() string

func (*RequestError) GetErrorKind

func (x *RequestError) GetErrorKind() RequestErrorKind

func (*RequestError) GetHttpStatusCode

func (x *RequestError) GetHttpStatusCode() int32

func (*RequestError) ProtoMessage

func (*RequestError) ProtoMessage()

func (*RequestError) ProtoReflect

func (x *RequestError) ProtoReflect() protoreflect.Message

func (*RequestError) Reset

func (x *RequestError) Reset()

func (*RequestError) String

func (x *RequestError) String() string

type RequestErrorKind

type RequestErrorKind int32

RequestErrorKind enumerates possible request errors.

const (
	RequestErrorKind_REQUEST_ERROR_UNSPECIFIED                                      RequestErrorKind = 0
	RequestErrorKind_REQUEST_ERROR_INTERNAL_READ_HTTP_ERROR                         RequestErrorKind = 1 // Internal error: reading HTTP request's body failed.
	RequestErrorKind_REQUEST_ERROR_INTERNAL_PROTOCOL_ERROR                          RequestErrorKind = 2 // Internal error: protocol error: e.g. no endpoint responses received.
	RequestErrorKind_REQUEST_ERROR_USER_ERROR_JSONRPC_PARSE_ERROR                   RequestErrorKind = 3 // User error: Request failed to parse as JSONRPC.
	RequestErrorKind_REQUEST_ERROR_USER_ERROR_JSONRPC_SERVICE_DETECTION_ERROR       RequestErrorKind = 4 // User error: Failed to detect service type from JSONRPC method.
	RequestErrorKind_REQUEST_ERROR_USER_ERROR_JSONRPC_UNSUPPORTED_RPC_TYPE          RequestErrorKind = 5 // User error: JSONRPC method maps to unsupported RPC type.
	RequestErrorKind_REQUEST_ERROR_INTERNAL_JSONRPC_PAYLOAD_BUILD_ERROR             RequestErrorKind = 6 // Internal error: Failed to build service payload from JSONRPC request.
	RequestErrorKind_REQUEST_ERROR_USER_ERROR_REST_SERVICE_DETECTION_ERROR          RequestErrorKind = 7 // User error: Failed to detect service type from REST request.
	RequestErrorKind_REQUEST_ERROR_USER_ERROR_REST_UNSUPPORTED_RPC_TYPE             RequestErrorKind = 8 // User error: unsupported service type in REST request.
	RequestErrorKind_REQUEST_ERROR_INTERNAL_JSONRPC_BACKEND_SERVICE_UNMARSHAL_ERROR RequestErrorKind = 9 // Internal error: JSONRPC backend service payload failed to unmarshal as valid JSONRPC response.
)

func (RequestErrorKind) Descriptor

func (RequestErrorKind) Enum

func (RequestErrorKind) EnumDescriptor deprecated

func (RequestErrorKind) EnumDescriptor() ([]byte, []int)

Deprecated: Use RequestErrorKind.Descriptor instead.

func (RequestErrorKind) Number

func (RequestErrorKind) String

func (x RequestErrorKind) String() string

func (RequestErrorKind) Type

type RequestOrigin

type RequestOrigin int32

TODO_DOCUMENT(@Olshansk): Standardize the language on organic vs synthetic requests across docs/comments/code.

RequestOrigin enumerates possible request origins: - Organic: the request was sent to PATH by a user - Synthetic: the request was built by the QoS service to collect data points on an endpoint.

const (
	RequestOrigin_REQUEST_ORIGIN_UNSPECIFIED RequestOrigin = 0
	RequestOrigin_REQUEST_ORIGIN_ORGANIC     RequestOrigin = 1 // Organic request, i.e. sent by user.
	RequestOrigin_REQUEST_ORIGIN_SYNTHETIC   RequestOrigin = 2 // Synthetic request, i.e. generated by the QoS Service.
)

func (RequestOrigin) Descriptor

func (RequestOrigin) Enum

func (x RequestOrigin) Enum() *RequestOrigin

func (RequestOrigin) EnumDescriptor deprecated

func (RequestOrigin) EnumDescriptor() ([]byte, []int)

Deprecated: Use RequestOrigin.Descriptor instead.

func (RequestOrigin) Number

func (RequestOrigin) String

func (x RequestOrigin) String() string

func (RequestOrigin) Type

type SolanaEndpointObservation

type SolanaEndpointObservation struct {

	// Address of the endpoint handling the request
	EndpointAddr string `protobuf:"bytes,1,opt,name=endpoint_addr,json=endpointAddr,proto3" json:"endpoint_addr,omitempty"`
	// HTTP status code returned to the user.
	// It is derived from either:
	//   - The endpoint payload parsed as a JSONRPC response.
	//   - A generic JSONRPC error response if the endpoint payload fails to parse.
	HttpStatusCode int32 `protobuf:"varint,2,opt,name=http_status_code,json=httpStatusCode,proto3" json:"http_status_code,omitempty"`
	// Types that are valid to be assigned to ResponseObservation:
	//
	//	*SolanaEndpointObservation_GetEpochInfoResponse
	//	*SolanaEndpointObservation_GetHealthResponse
	//	*SolanaEndpointObservation_UnrecognizedResponse
	ResponseObservation isSolanaEndpointObservation_ResponseObservation `protobuf_oneof:"response_observation"`
	// contains filtered or unexported fields
}

TODO_MVP(@adshmh): add unmarshaling error tracker to endpoint observations.

SolanaEndpointObservation captures a single endpoint's response to a request

func (*SolanaEndpointObservation) Descriptor deprecated

func (*SolanaEndpointObservation) Descriptor() ([]byte, []int)

Deprecated: Use SolanaEndpointObservation.ProtoReflect.Descriptor instead.

func (*SolanaEndpointObservation) GetEndpointAddr

func (x *SolanaEndpointObservation) GetEndpointAddr() string

func (*SolanaEndpointObservation) GetGetEpochInfoResponse

func (x *SolanaEndpointObservation) GetGetEpochInfoResponse() *SolanaGetEpochInfoResponse

func (*SolanaEndpointObservation) GetGetHealthResponse

func (x *SolanaEndpointObservation) GetGetHealthResponse() *SolanaGetHealthResponse

func (*SolanaEndpointObservation) GetHttpStatusCode

func (x *SolanaEndpointObservation) GetHttpStatusCode() int32

func (*SolanaEndpointObservation) GetResponseObservation

func (x *SolanaEndpointObservation) GetResponseObservation() isSolanaEndpointObservation_ResponseObservation

func (*SolanaEndpointObservation) GetUnrecognizedResponse

func (x *SolanaEndpointObservation) GetUnrecognizedResponse() *SolanaUnrecognizedResponse

func (*SolanaEndpointObservation) ProtoMessage

func (*SolanaEndpointObservation) ProtoMessage()

func (*SolanaEndpointObservation) ProtoReflect

func (*SolanaEndpointObservation) Reset

func (x *SolanaEndpointObservation) Reset()

func (*SolanaEndpointObservation) String

func (x *SolanaEndpointObservation) String() string

type SolanaEndpointObservation_GetEpochInfoResponse

type SolanaEndpointObservation_GetEpochInfoResponse struct {
	// Response from getEpochInfo
	// Docs: https://solana.com/docs/rpc/http/getepochinfo
	GetEpochInfoResponse *SolanaGetEpochInfoResponse `protobuf:"bytes,3,opt,name=get_epoch_info_response,json=getEpochInfoResponse,proto3,oneof"`
}

type SolanaEndpointObservation_GetHealthResponse

type SolanaEndpointObservation_GetHealthResponse struct {
	// Response from getHealth
	// Docs: https://solana.com/docs/rpc/http/gethealth
	GetHealthResponse *SolanaGetHealthResponse `protobuf:"bytes,4,opt,name=get_health_response,json=getHealthResponse,proto3,oneof"`
}

type SolanaEndpointObservation_UnrecognizedResponse

type SolanaEndpointObservation_UnrecognizedResponse struct {
	// Responses not used in endpoint validation (e.g., getAccountInfo)
	UnrecognizedResponse *SolanaUnrecognizedResponse `protobuf:"bytes,5,opt,name=unrecognized_response,json=unrecognizedResponse,proto3,oneof"`
}

type SolanaGetEpochInfoResponse

type SolanaGetEpochInfoResponse struct {

	// Stored as uint64 for cross-instance validation
	BlockHeight uint64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"`
	Epoch       uint64 `protobuf:"varint,2,opt,name=epoch,proto3" json:"epoch,omitempty"`
	// contains filtered or unexported fields
}

SolanaEpochInfoResponse stores getEpochInfo response data Docs: https://solana.com/docs/rpc/http/getepochinfo

func (*SolanaGetEpochInfoResponse) Descriptor deprecated

func (*SolanaGetEpochInfoResponse) Descriptor() ([]byte, []int)

Deprecated: Use SolanaGetEpochInfoResponse.ProtoReflect.Descriptor instead.

func (*SolanaGetEpochInfoResponse) GetBlockHeight

func (x *SolanaGetEpochInfoResponse) GetBlockHeight() uint64

func (*SolanaGetEpochInfoResponse) GetEpoch

func (x *SolanaGetEpochInfoResponse) GetEpoch() uint64

func (*SolanaGetEpochInfoResponse) ProtoMessage

func (*SolanaGetEpochInfoResponse) ProtoMessage()

func (*SolanaGetEpochInfoResponse) ProtoReflect

func (*SolanaGetEpochInfoResponse) Reset

func (x *SolanaGetEpochInfoResponse) Reset()

func (*SolanaGetEpochInfoResponse) String

func (x *SolanaGetEpochInfoResponse) String() string

type SolanaGetHealthResponse

type SolanaGetHealthResponse struct {
	Result string `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
	// contains filtered or unexported fields
}

SolanaGetHealthResponse stores getHealth response data Docs: https://solana.com/docs/rpc/http/gethealth

func (*SolanaGetHealthResponse) Descriptor deprecated

func (*SolanaGetHealthResponse) Descriptor() ([]byte, []int)

Deprecated: Use SolanaGetHealthResponse.ProtoReflect.Descriptor instead.

func (*SolanaGetHealthResponse) GetResult

func (x *SolanaGetHealthResponse) GetResult() string

func (*SolanaGetHealthResponse) ProtoMessage

func (*SolanaGetHealthResponse) ProtoMessage()

func (*SolanaGetHealthResponse) ProtoReflect

func (x *SolanaGetHealthResponse) ProtoReflect() protoreflect.Message

func (*SolanaGetHealthResponse) Reset

func (x *SolanaGetHealthResponse) Reset()

func (*SolanaGetHealthResponse) String

func (x *SolanaGetHealthResponse) String() string

type SolanaObservationInterpreter

type SolanaObservationInterpreter struct {
	// Logger for reporting issues during interpretation
	Logger polylog.Logger

	// Observations contains the raw Solana request data
	Observations *SolanaRequestObservations
}

SolanaObservationInterpreter extracts and interprets data from Solana request observations. It provides methods to access metrics-relevant information for Prometheus reporting.

func (*SolanaObservationInterpreter) GetChainID

func (i *SolanaObservationInterpreter) GetChainID() string

GetChainID returns the blockchain identifier from observations.

func (*SolanaObservationInterpreter) GetEndpointDomain

func (i *SolanaObservationInterpreter) GetEndpointDomain() string

GetEndpointDomain returns the domain of the endpoint that served the request.

If multiple endpoint observations are present, it returns the domain of the first endpoint observation. If no endpoint observations are present, it returns an empty string.

TODO_TECHDEBT: Consolidate this with the business logic of other "GetEndpointDomain" implementations.

func (*SolanaObservationInterpreter) GetRequestErrorType

func (i *SolanaObservationInterpreter) GetRequestErrorType() string

GetRequestErrorType returns the error type if request failed or empty string if successful.

func (*SolanaObservationInterpreter) GetRequestHTTPStatus

func (i *SolanaObservationInterpreter) GetRequestHTTPStatus() int32

GetRequestHTTPStatus returns the HTTP status code from the last endpoint observation. Returns 0 if observations are nil or no endpoint observations exist.

func (*SolanaObservationInterpreter) GetRequestMethod

func (i *SolanaObservationInterpreter) GetRequestMethod() string

GetRequestMethod returns the JSON-RPC method name from the request.

func (*SolanaObservationInterpreter) GetServiceID

func (i *SolanaObservationInterpreter) GetServiceID() string

GetServiceID returns the service identifier from observations.

func (*SolanaObservationInterpreter) IsRequestSuccessful

func (i *SolanaObservationInterpreter) IsRequestSuccessful() bool

IsRequestSuccessful determines if the request completed without errors.

type SolanaRequestObservations

type SolanaRequestObservations struct {

	// chain_id is the blockchain identifier for the QoS implementation.
	// This is preset by the processor and not determined by the request.
	// Used by metrics and data pipeline.
	ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
	// service_id is the identifier for the QoS implementation.
	// It is the "alias" or human readable interpratation of the chain_id.
	ServiceId string `protobuf:"bytes,2,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"`
	// The length of the client's request payload, in bytes.
	RequestPayloadLength uint32 `protobuf:"varint,3,opt,name=request_payload_length,json=requestPayloadLength,proto3" json:"request_payload_length,omitempty"`
	// The origin of the request: user vs. QoS service (requests built by QoS for collecting data on endpoints)
	RequestOrigin RequestOrigin `` /* 129-byte string literal not displayed */
	// Tracks request errors, if any.
	RequestError *RequestError `protobuf:"bytes,5,opt,name=request_error,json=requestError,proto3,oneof" json:"request_error,omitempty"`
	// JSON-RPC request to the Solana blockchain service.
	// Only set if the HTTP request payload was successfully parsed into JSONRPC.
	// TODO_TECHDEBT: This assumes all SolanaVM blockchains only (and always) support JSON-RPC.
	// May need expansion/refactoring for future blockchain support.
	JsonrpcRequest *JsonRpcRequest `protobuf:"bytes,6,opt,name=jsonrpc_request,json=jsonrpcRequest,proto3,oneof" json:"jsonrpc_request,omitempty"`
	// Multiple observations possible if:
	// - Original endpoint returns invalid response
	// - Retry mechanism activates
	EndpointObservations []*SolanaEndpointObservation `protobuf:"bytes,7,rep,name=endpoint_observations,json=endpointObservations,proto3" json:"endpoint_observations,omitempty"`
	// contains filtered or unexported fields
}

SolanaRequestObservations captures QoS data for a single Solana blockchain service request, including all observations made during potential retries.

func (*SolanaRequestObservations) Descriptor deprecated

func (*SolanaRequestObservations) Descriptor() ([]byte, []int)

Deprecated: Use SolanaRequestObservations.ProtoReflect.Descriptor instead.

func (*SolanaRequestObservations) GetChainId

func (x *SolanaRequestObservations) GetChainId() string

func (*SolanaRequestObservations) GetEndpointObservations

func (x *SolanaRequestObservations) GetEndpointObservations() []*SolanaEndpointObservation

func (*SolanaRequestObservations) GetJsonrpcRequest

func (x *SolanaRequestObservations) GetJsonrpcRequest() *JsonRpcRequest

func (*SolanaRequestObservations) GetRequestError

func (x *SolanaRequestObservations) GetRequestError() *RequestError

func (*SolanaRequestObservations) GetRequestOrigin

func (x *SolanaRequestObservations) GetRequestOrigin() RequestOrigin

func (*SolanaRequestObservations) GetRequestPayloadLength

func (x *SolanaRequestObservations) GetRequestPayloadLength() uint32

func (*SolanaRequestObservations) GetServiceId

func (x *SolanaRequestObservations) GetServiceId() string

func (*SolanaRequestObservations) ProtoMessage

func (*SolanaRequestObservations) ProtoMessage()

func (*SolanaRequestObservations) ProtoReflect

func (*SolanaRequestObservations) Reset

func (x *SolanaRequestObservations) Reset()

func (*SolanaRequestObservations) String

func (x *SolanaRequestObservations) String() string

type SolanaUnrecognizedResponse

type SolanaUnrecognizedResponse struct {
	JsonrpcResponse *JsonRpcResponse `protobuf:"bytes,1,opt,name=jsonrpc_response,json=jsonrpcResponse,proto3" json:"jsonrpc_response,omitempty"`
	// Optional validation error information
	ValidationError *JsonRpcResponseValidationError `protobuf:"bytes,2,opt,name=validation_error,json=validationError,proto3,oneof" json:"validation_error,omitempty"`
	// contains filtered or unexported fields
}

SolanaUnrecognizedResponse stores responses from methods not used in validation Examples: getTokenSupply, getTransaction

func (*SolanaUnrecognizedResponse) Descriptor deprecated

func (*SolanaUnrecognizedResponse) Descriptor() ([]byte, []int)

Deprecated: Use SolanaUnrecognizedResponse.ProtoReflect.Descriptor instead.

func (*SolanaUnrecognizedResponse) GetJsonrpcResponse

func (x *SolanaUnrecognizedResponse) GetJsonrpcResponse() *JsonRpcResponse

func (*SolanaUnrecognizedResponse) GetValidationError

func (*SolanaUnrecognizedResponse) ProtoMessage

func (*SolanaUnrecognizedResponse) ProtoMessage()

func (*SolanaUnrecognizedResponse) ProtoReflect

func (*SolanaUnrecognizedResponse) Reset

func (x *SolanaUnrecognizedResponse) Reset()

func (*SolanaUnrecognizedResponse) String

func (x *SolanaUnrecognizedResponse) String() string

type UnrecognizedResponse

type UnrecognizedResponse struct {

	// Length of payload received from the endpoint.
	EndpointPayloadLength uint32 `` /* 127-byte string literal not displayed */
	// contains filtered or unexported fields
}

UnrecognizedResponse handles responses that are not validated before being returned to the user.

func (*UnrecognizedResponse) Descriptor deprecated

func (*UnrecognizedResponse) Descriptor() ([]byte, []int)

Deprecated: Use UnrecognizedResponse.ProtoReflect.Descriptor instead.

func (*UnrecognizedResponse) GetEndpointPayloadLength

func (x *UnrecognizedResponse) GetEndpointPayloadLength() uint32

func (*UnrecognizedResponse) ProtoMessage

func (*UnrecognizedResponse) ProtoMessage()

func (*UnrecognizedResponse) ProtoReflect

func (x *UnrecognizedResponse) ProtoReflect() protoreflect.Message

func (*UnrecognizedResponse) Reset

func (x *UnrecognizedResponse) Reset()

func (*UnrecognizedResponse) String

func (x *UnrecognizedResponse) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL