types

package
v0.0.45 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: MIT Imports: 42 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	VotesThresholdNumerator   = 2
	VotesThresholdDenominator = 3
)

VotesThresholdNumerator / VotesThresholdDenominator give the >2/3 quorum used chain-wide. Mirrors x/uexecutor's constants so read ballots finalize on the same threshold as inbound and outbound ones.

View Source
const (
	MethodFulfillExternalCallback = "fulfillExternalCallback"

	// MethodReportCallbackGas settles an EXECUTED request against the gas its
	// callback consumed, and returns that figure clamped to the request's budget.
	MethodReportCallbackGas = "reportCallbackGas"

	MethodExpireExternalRead = "expireExternalRead"
)

Method names on UniversalCallback. All are module-gated: the contract admits only the x/ucallback module account as caller.

View Source
const (
	ModuleName = "ucallback"

	StoreKey = ModuleName

	QuerierRoute = ModuleName
)
View Source
const DefaultIndex uint64 = 1

DefaultIndex is the default global index

Variables

View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	// ParamsKey saves the current module params.
	ParamsKey = collections.NewPrefix(0)

	// UniversalReadsKey is the canonical record for every read request,
	// keyed by requestId. Everything else in this module is an index over it.
	UniversalReadsKey = collections.NewPrefix(1)

	// PendingByExpiryKey indexes unsettled reads by the Push Chain height they
	// expire at. Key is (expiryHeight, requestId). Entries are removed the moment
	// a read settles, which makes this the module's set of in-flight work.
	PendingByExpiryKey = collections.NewPrefix(2)

	// ReadsByTxHashKey indexes reads by the Push Chain tx that requested them.
	// One transaction can emit several ReadRequested logs; each becomes its own
	// UniversalRead, and this index is what reassembles the batch.
	// Key is (pushTxHash, requestId).
	ReadsByTxHashKey = collections.NewPrefix(3)

	// ModuleAccountNonceKey tracks the EVM nonce of the x/ucallback module
	// account. x/ucallback owns this counter because it owns the account: the
	// UniversalCallback contract's access control is keyed to this module's
	// address, so no other module ever sends from it.
	// AbortedReadsKey indexes reads the chain gave up on — expiry that never
	// landed after MaxExpiryAttempts. Small and operationally meaningful: these are
	// exactly the requests needing manual intervention, and enumerating them by
	// scanning UniversalReads would mean walking every read the chain has ever
	// seen. Mirrors x/uexecutor's ExpiredInbounds.
	AbortedReadsKey = collections.NewPrefix(5)

	ModuleAccountNonceKey  = collections.NewPrefix(4)
	ModuleAccountNonceName = "module_account_nonce"
)
View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTypes        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTypes          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	AminoCdc = codec.NewAminoCodec(amino)
)
View Source
var ReadBallotDomain = collections.NewPrefix(1)

ReadBallotDomain separates read-result ballot keys from every other ballot namespace on the chain, so a digest collision across modules is not possible.

View Source
var ReadErrorCode_name = map[int32]string{
	0: "READ_ERROR_UNSPECIFIED",
	1: "READ_ERROR_INVALID_QUERY",
	2: "READ_ERROR_UNSUPPORTED",
	3: "READ_ERROR_REVERTED",
	4: "READ_ERROR_NOT_FOUND",
	5: "READ_ERROR_INVALID_RESULT",
	6: "READ_ERROR_REJECTED",
}
View Source
var ReadErrorCode_value = map[string]int32{
	"READ_ERROR_UNSPECIFIED":    0,
	"READ_ERROR_INVALID_QUERY":  1,
	"READ_ERROR_UNSUPPORTED":    2,
	"READ_ERROR_REVERTED":       3,
	"READ_ERROR_NOT_FOUND":      4,
	"READ_ERROR_INVALID_RESULT": 5,
	"READ_ERROR_REJECTED":       6,
}
View Source
var (

	// ReadRequestedEventSig is topic0 for ReadRequested, derived from the ABI above.
	ReadRequestedEventSig common.Hash
)
View Source
var ReadStatus_name = map[int32]string{
	0: "READ_STATUS_UNSPECIFIED",
	1: "READ_STATUS_SUCCESS",
	2: "READ_STATUS_ERROR",
}
View Source
var ReadStatus_value = map[string]int32{
	"READ_STATUS_UNSPECIFIED": 0,
	"READ_STATUS_SUCCESS":     1,
	"READ_STATUS_ERROR":       2,
}
View Source
var UniversalReadStatus_name = map[int32]string{
	0: "UNIVERSAL_READ_STATUS_UNSPECIFIED",
	1: "UNIVERSAL_READ_STATUS_PENDING",
	2: "UNIVERSAL_READ_STATUS_VOTING",
	3: "UNIVERSAL_READ_STATUS_FULFILLED",
	4: "UNIVERSAL_READ_STATUS_EXPIRED",
	5: "UNIVERSAL_READ_STATUS_FAILED",
	6: "UNIVERSAL_READ_STATUS_ABORTED",
}
View Source
var UniversalReadStatus_value = map[string]int32{
	"UNIVERSAL_READ_STATUS_UNSPECIFIED": 0,
	"UNIVERSAL_READ_STATUS_PENDING":     1,
	"UNIVERSAL_READ_STATUS_VOTING":      2,
	"UNIVERSAL_READ_STATUS_FULFILLED":   3,
	"UNIVERSAL_READ_STATUS_EXPIRED":     4,
	"UNIVERSAL_READ_STATUS_FAILED":      5,
	"UNIVERSAL_READ_STATUS_ABORTED":     6,
}

Functions

func BallotExpiryAfterBlocks

func BallotExpiryAfterBlocks(expiryHeight uint64, currentHeight int64) int64

BallotExpiryAfterBlocks converts a read request's absolute deadline into the relative argument VoteOnBallot expects.

x/uvalidator stores BlockHeightExpiry as createdHeight + expiryAfterBlocks (types/ballot.go:109), so an absolute target has to be expressed as a delta from the height the ballot is created at.

The two clocks are deliberately fused: the ballot expires exactly when the request does. x/uexecutor instead passes an inert 100M-block expiry to keep ballots alive indefinitely, but a read has a real deadline of its own — set by the app, enforced by the contract at UniversalCallback.sol:207 — and a ballot that outlived it could only ever finalize into a request no longer worth fulfilling.

Returns at least 1 so a ballot is never created already expired. Callers reject past-deadline requests before reaching here; this is the backstop.

func CallerIsNotUCallbackModuleSelector

func CallerIsNotUCallbackModuleSelector() [4]byte

CallerIsNotUCallbackModuleSelector exposes the access-control revert prefix so tests can assert which revert a call produced. The contract pairs itself with a single module address at construction; getting this wrong makes every callback fail, so it is worth asserting against the real deployed bytecode.

func GetReadBallotKey

func GetReadBallotKey(requestID string, result *ReadResult) (string, error)

GetReadBallotKey derives the ballot a (requestId, observation) pair votes on.

The ballot model is binary: validators vote SUCCESS or FAILURE on a key that already encodes the observation. Agreement is therefore expressed by arriving at the same key — two validators reporting different result data produce different ballots, and neither reaches quorum until enough validators agree.

Two consequences follow, and both are load-bearing:

  1. Every field that callers must agree on has to be in this digest. Omitting one would let validators finalize a ballot while disagreeing about it.

  2. Nothing validator-local may be in it. This is why ReadResult carries no error message: free-text error strings differ per validator, so including one would scatter honest validators across distinct ballots and quorum would never form. x/uexecutor's outbound key does hash an ErrorMsg (keys.go:158) — we deliberately do not follow it there.

Aggregates are excluded, see readResultFields.

func ParseUniversalCallbackABI

func ParseUniversalCallbackABI() (abi.ABI, error)

ParseUniversalCallbackABI returns the parsed fragment for UniversalCallback.

func ReadRequestedEventInputs

func ReadRequestedEventInputs() abi.Arguments

ReadRequestedEventInputs exposes the parsed event inputs so a test can compare them against the compiled contract field by field.

func ReadRequestedEventSigName

func ReadRequestedEventSigName() string

ReadRequestedEventSigName is the human-readable signature topic0 is derived from, for error messages that need to show what we expected.

func RegisterInterfaces

func RegisterInterfaces(registry types.InterfaceRegistry)

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec registers concrete types on the LegacyAmino codec

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterQueryHandlerClient

func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error

RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.

func RegisterQueryHandlerFromEndpoint

func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterQueryHandlerServer

func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error

RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

func ValidateReadResult

func ValidateReadResult(r *ReadResult) error

ValidateReadResult rejects observations that cannot be honest, before they reach a ballot.

These are not defensive niceties: each rejected shape would produce a ballot key that no other validator observing the same thing could reach, so an accepted one would sit alone and never reach quorum. Failing loudly at submission turns a silent stall into an error the operator can see.

Types

type AccountKeeper

type AccountKeeper interface {
	GetModuleAccount(ctx context.Context, moduleName string) sdk.ModuleAccountI
}

AccountKeeper resolves the x/ucallback module account, whose address is the caller UniversalCallback's access control admits.

type AggregateValue

type AggregateValue struct {
	ExtractIndex uint32 `protobuf:"varint,1,opt,name=extract_index,json=extractIndex,proto3" json:"extract_index,omitempty"`
	Mode         uint32 `protobuf:"varint,2,opt,name=mode,proto3" json:"mode,omitempty"`
	Value        []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
}

AggregateValue is one field the module combines across validators instead of requiring byte-equality on — a price, say, where honest nodes legitimately differ.

NOT USED IN v1. The universal client rejects any extract mode other than IDENTICAL (externalchains/web2/read_envelope.go), so this list is always empty today. The field is reserved now because adding it later would change how ballots are keyed on a live chain, which is consensus-breaking. In v1 the ballot key covers all of fields 1-4; in v2 it must cover only fields 1-4 with `aggregates` EXCLUDED, so computing the key over "the identical subset" from the start keeps v2 purely additive.

v2 ALSO REQUIRES REPLACING THE BALLOT MECHANISM, not just populating this field. Ballots today store a binary VoteResult{SUCCESS|FAILURE} against an ID that encodes the observation, so distinct observations produce distinct ballots and none reaches quorum when validators report different numbers. Ballots therefore cannot retain per-validator values, which is exactly what a median needs. v2 has to keep each validator's AggregateValue set in module state and reduce at quorum — the pattern x/uexecutor already uses for gas-price medians in keeper/chain_meta.go, which bypasses ballots for the same reason.

func (*AggregateValue) Descriptor

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

func (*AggregateValue) Equal

func (this *AggregateValue) Equal(that interface{}) bool

func (*AggregateValue) GetExtractIndex

func (m *AggregateValue) GetExtractIndex() uint32

func (*AggregateValue) GetMode

func (m *AggregateValue) GetMode() uint32

func (*AggregateValue) GetValue

func (m *AggregateValue) GetValue() []byte

func (*AggregateValue) Marshal

func (m *AggregateValue) Marshal() (dAtA []byte, err error)

func (*AggregateValue) MarshalTo

func (m *AggregateValue) MarshalTo(dAtA []byte) (int, error)

func (*AggregateValue) MarshalToSizedBuffer

func (m *AggregateValue) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*AggregateValue) ProtoMessage

func (*AggregateValue) ProtoMessage()

func (*AggregateValue) Reset

func (m *AggregateValue) Reset()

func (*AggregateValue) Size

func (m *AggregateValue) Size() (n int)

func (*AggregateValue) String

func (m *AggregateValue) String() string

func (*AggregateValue) Unmarshal

func (m *AggregateValue) Unmarshal(dAtA []byte) error

func (*AggregateValue) XXX_DiscardUnknown

func (m *AggregateValue) XXX_DiscardUnknown()

func (*AggregateValue) XXX_Marshal

func (m *AggregateValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AggregateValue) XXX_Merge

func (m *AggregateValue) XXX_Merge(src proto.Message)

func (*AggregateValue) XXX_Size

func (m *AggregateValue) XXX_Size() int

func (*AggregateValue) XXX_Unmarshal

func (m *AggregateValue) XXX_Unmarshal(b []byte) error

type BankKeeper

type BankKeeper interface {
	SendCoinsFromAccountToModule(ctx context.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
	BurnCoins(ctx context.Context, moduleName string, amt sdk.Coins) error
	GetBalance(ctx context.Context, addr sdk.AccAddress, denom string) sdk.Coin
}

BankKeeper covers moving the consumed callback budget out of the contract and destroying it.

The contract deliberately leaves itself over-collateralised by the burned amount after reportCallbackGas, expecting the module to take it. A contract's balance is an ordinary bank balance, so this needs no contract-side API — the same shape as x/uexecutor's DeductAndBurnFees.

type CallOutcome

type CallOutcome int

CallOutcome classifies what happened to a call into UniversalCallback, because the right response differs sharply between them — and the difference is invisible from "the call failed" alone.

const (
	// CallOK — the transaction succeeded. Note this includes the app's callback
	// reverting: the contract catches that with .call, so the outer tx still
	// succeeds and the request is settled.
	CallOK CallOutcome = iota

	// CallAlreadySettled — RequestAlreadyFulfilled or InvalidCallbackTarget. The
	// contract closed this request by another route and already ran _settle, so the
	// funder has their refund. Nothing left to do; safe to mark terminal.
	CallAlreadySettled

	// CallOutOfGas — the outer transaction ran out. Nothing persisted, but real gas
	// was burned. The only outcome where the user's allowance was consumed without
	// the contract recording it.
	CallOutOfGas

	// CallUnsettled — everything else: wrong module address, the vault refusing the
	// protocol fee, an intrinsic-gas rejection, a dispatch error. Nothing executed
	// or nothing persisted, the deposit is still escrowed, and expiry must stay
	// reachable so the funder can be refunded.
	CallUnsettled
)

func ClassifyCall

func ClassifyCall(vmError string, revertData []byte, callErr error) CallOutcome

ClassifyCall maps a DerivedEVMCallWithData result onto a CallOutcome.

vmError distinguishes out-of-gas ("out of gas") from a revert ("execution reverted"); revertData carries the custom error's 4-byte selector on a revert. Both come straight off MsgEthereumTxResponse.

func (CallOutcome) String

func (o CallOutcome) String() string

type EVMKeeper

type EVMKeeper interface {
	DerivedEVMCallWithData(
		ctx sdk.Context,
		from common.Address,
		contract *common.Address,
		data []byte,
		commit, gasless, isModuleSender bool,
		value, gasLimit *big.Int,
		manualNonce *uint64,
	) (*evmtypes.MsgEthereumTxResponse, error)
}

EVMKeeper is the slice of x/vm needed to call UniversalCallback. Only the derived-call entry point is required — reads never deploy or write state directly.

DerivedEVMCallWithData, and deliberately NOT the ABI-typed DerivedEVMCall wrapper that sits above it. On a revert that wrapper returns (nil, err), discarding the response and with it res.Ret — the revert data ClassifyCall reads to tell "already settled" from "try again". Leaving it off this interface makes reaching for it a compile error rather than something a reviewer has to catch.

type FeeMarketKeeper

type FeeMarketKeeper interface {
	GetBaseFee(ctx sdk.Context) math.LegacyDec
}

FeeMarketKeeper supplies the base fee used to price callback gas. Same source x/uexecutor uses in CalculateGasCost, so a read and a UEA execution are valued identically.

Satisfied by a value, not a pointer to the app field: the keeper is constructed after x/feemarket, so there is nothing left to populate.

type GenesisState

type GenesisState struct {
	// Params defines all the parameters of the module.
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	// universal_reads are key-value pairs from the UniversalReads map.
	//
	// Only the canonical records are exported. PendingByExpiry and ReadsByTxHash
	// are indexes derived from these, and are rebuilt during InitGenesis rather
	// than exported — so they cannot be imported out of sync with the records they
	// point at.
	UniversalReads []UniversalReadEntry `protobuf:"bytes,2,rep,name=universal_reads,json=universalReads,proto3" json:"universal_reads"`
	// module_account_nonce is the EVM nonce of the x/ucallback module account.
	//
	// Must round-trip through genesis: it is the nonce of a real EVM account, and
	// exporting state without it would make every module call after an import reuse
	// nonces the chain had already consumed.
	ModuleAccountNonce uint64 `protobuf:"varint,3,opt,name=module_account_nonce,json=moduleAccountNonce,proto3" json:"module_account_nonce,omitempty"`
}

GenesisState defines the module genesis state

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default genesis state

func (*GenesisState) Descriptor

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

func (*GenesisState) GetModuleAccountNonce

func (m *GenesisState) GetModuleAccountNonce() uint64

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

func (*GenesisState) GetUniversalReads

func (m *GenesisState) GetUniversalReads() []UniversalReadEntry

func (*GenesisState) Marshal

func (m *GenesisState) Marshal() (dAtA []byte, err error)

func (*GenesisState) MarshalTo

func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)

func (*GenesisState) MarshalToSizedBuffer

func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

func (m *GenesisState) Size() (n int)

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

func (m *GenesisState) Unmarshal(dAtA []byte) error

func (GenesisState) Validate

func (gs GenesisState) Validate() error

Validate performs basic genesis state validation returning an error upon any failure.

func (*GenesisState) XXX_DiscardUnknown

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal

func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GenesisState) XXX_Merge

func (m *GenesisState) XXX_Merge(src proto.Message)

func (*GenesisState) XXX_Size

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal

func (m *GenesisState) XXX_Unmarshal(b []byte) error

type MsgClient

type MsgClient interface {
	// VoteReadResult submits one universal validator's observation of a read
	// request's outcome on the destination chain.
	VoteReadResult(ctx context.Context, in *MsgVoteReadResult, opts ...grpc.CallOption) (*MsgVoteReadResultResponse, error)
	// RetryReadExpiry reopens the expiry of a read the chain abandoned.
	RetryReadExpiry(ctx context.Context, in *MsgRetryReadExpiry, opts ...grpc.CallOption) (*MsgRetryReadExpiryResponse, error)
	// UpdateParams defines a governance operation for updating the parameters.
	//
	// Since: cosmos-sdk 0.47
	UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
}

MsgClient is the client API for Msg service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewMsgClient

func NewMsgClient(cc grpc1.ClientConn) MsgClient

type MsgRetryReadExpiry

type MsgRetryReadExpiry struct {
	// signer must equal uvalidator Params.Admin
	Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"`
	// request_id of the abandoned read.
	RequestId string `protobuf:"bytes,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
}

MsgRetryReadExpiry is an admin escape hatch. For a read left ABORTED after MaxExpiryAttempts, this makes one more attempt at expireExternalRead.

Needed because ABORTED is a dead end that nothing else can leave. The contract may still hold the request as pending with the funder's refund uncredited, and expireExternalRead is module-gated — no user, relayer or admin can call it directly. The sweeper will not retry either: ABORTED is terminal, so the record is out of PendingByExpiry.

Each message is worth exactly one attempt: the attempt count is the record's own PCTx history, which is already at the limit, so a failure returns it to ABORTED with the new reason rather than granting a fresh budget.

func (*MsgRetryReadExpiry) Descriptor

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

func (*MsgRetryReadExpiry) GetRequestId

func (m *MsgRetryReadExpiry) GetRequestId() string

func (*MsgRetryReadExpiry) GetSigner

func (m *MsgRetryReadExpiry) GetSigner() string

func (*MsgRetryReadExpiry) Marshal

func (m *MsgRetryReadExpiry) Marshal() (dAtA []byte, err error)

func (*MsgRetryReadExpiry) MarshalTo

func (m *MsgRetryReadExpiry) MarshalTo(dAtA []byte) (int, error)

func (*MsgRetryReadExpiry) MarshalToSizedBuffer

func (m *MsgRetryReadExpiry) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgRetryReadExpiry) ProtoMessage

func (*MsgRetryReadExpiry) ProtoMessage()

func (*MsgRetryReadExpiry) Reset

func (m *MsgRetryReadExpiry) Reset()

func (*MsgRetryReadExpiry) Size

func (m *MsgRetryReadExpiry) Size() (n int)

func (*MsgRetryReadExpiry) String

func (m *MsgRetryReadExpiry) String() string

func (*MsgRetryReadExpiry) Unmarshal

func (m *MsgRetryReadExpiry) Unmarshal(dAtA []byte) error

func (*MsgRetryReadExpiry) XXX_DiscardUnknown

func (m *MsgRetryReadExpiry) XXX_DiscardUnknown()

func (*MsgRetryReadExpiry) XXX_Marshal

func (m *MsgRetryReadExpiry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgRetryReadExpiry) XXX_Merge

func (m *MsgRetryReadExpiry) XXX_Merge(src proto.Message)

func (*MsgRetryReadExpiry) XXX_Size

func (m *MsgRetryReadExpiry) XXX_Size() int

func (*MsgRetryReadExpiry) XXX_Unmarshal

func (m *MsgRetryReadExpiry) XXX_Unmarshal(b []byte) error

type MsgRetryReadExpiryResponse

type MsgRetryReadExpiryResponse struct {
	// settled reports whether the contract accepted the expiry this time.
	Settled bool `protobuf:"varint,1,opt,name=settled,proto3" json:"settled,omitempty"`
}

func (*MsgRetryReadExpiryResponse) Descriptor

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

func (*MsgRetryReadExpiryResponse) GetSettled

func (m *MsgRetryReadExpiryResponse) GetSettled() bool

func (*MsgRetryReadExpiryResponse) Marshal

func (m *MsgRetryReadExpiryResponse) Marshal() (dAtA []byte, err error)

func (*MsgRetryReadExpiryResponse) MarshalTo

func (m *MsgRetryReadExpiryResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgRetryReadExpiryResponse) MarshalToSizedBuffer

func (m *MsgRetryReadExpiryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgRetryReadExpiryResponse) ProtoMessage

func (*MsgRetryReadExpiryResponse) ProtoMessage()

func (*MsgRetryReadExpiryResponse) Reset

func (m *MsgRetryReadExpiryResponse) Reset()

func (*MsgRetryReadExpiryResponse) Size

func (m *MsgRetryReadExpiryResponse) Size() (n int)

func (*MsgRetryReadExpiryResponse) String

func (m *MsgRetryReadExpiryResponse) String() string

func (*MsgRetryReadExpiryResponse) Unmarshal

func (m *MsgRetryReadExpiryResponse) Unmarshal(dAtA []byte) error

func (*MsgRetryReadExpiryResponse) XXX_DiscardUnknown

func (m *MsgRetryReadExpiryResponse) XXX_DiscardUnknown()

func (*MsgRetryReadExpiryResponse) XXX_Marshal

func (m *MsgRetryReadExpiryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgRetryReadExpiryResponse) XXX_Merge

func (m *MsgRetryReadExpiryResponse) XXX_Merge(src proto.Message)

func (*MsgRetryReadExpiryResponse) XXX_Size

func (m *MsgRetryReadExpiryResponse) XXX_Size() int

func (*MsgRetryReadExpiryResponse) XXX_Unmarshal

func (m *MsgRetryReadExpiryResponse) XXX_Unmarshal(b []byte) error

type MsgServer

type MsgServer interface {
	// VoteReadResult submits one universal validator's observation of a read
	// request's outcome on the destination chain.
	VoteReadResult(context.Context, *MsgVoteReadResult) (*MsgVoteReadResultResponse, error)
	// RetryReadExpiry reopens the expiry of a read the chain abandoned.
	RetryReadExpiry(context.Context, *MsgRetryReadExpiry) (*MsgRetryReadExpiryResponse, error)
	// UpdateParams defines a governance operation for updating the parameters.
	//
	// Since: cosmos-sdk 0.47
	UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
}

MsgServer is the server API for Msg service.

type MsgUpdateParams

type MsgUpdateParams struct {
	// authority is the address of the governance account.
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// params defines the parameters to update.
	//
	// NOTE: All parameters must be supplied.
	Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"`
}

MsgUpdateParams is the Msg/UpdateParams request type.

Since: cosmos-sdk 0.47

func NewMsgUpdateParams

func NewMsgUpdateParams(
	sender sdk.Address,
	someValue bool,
) *MsgUpdateParams

NewMsgUpdateParams creates new instance of MsgUpdateParams

func (*MsgUpdateParams) Descriptor

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

func (*MsgUpdateParams) GetAuthority

func (m *MsgUpdateParams) GetAuthority() string

func (*MsgUpdateParams) GetParams

func (m *MsgUpdateParams) GetParams() Params

func (MsgUpdateParams) GetSignBytes

func (msg MsgUpdateParams) GetSignBytes() []byte

GetSignBytes implements the LegacyMsg interface.

func (*MsgUpdateParams) GetSigners

func (msg *MsgUpdateParams) GetSigners() []sdk.AccAddress

GetSigners returns the expected signers for a MsgUpdateParams message.

func (*MsgUpdateParams) Marshal

func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error)

func (*MsgUpdateParams) MarshalTo

func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error)

func (*MsgUpdateParams) MarshalToSizedBuffer

func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgUpdateParams) ProtoMessage

func (*MsgUpdateParams) ProtoMessage()

func (*MsgUpdateParams) Reset

func (m *MsgUpdateParams) Reset()

func (MsgUpdateParams) Route

func (msg MsgUpdateParams) Route() string

Route returns the name of the module

func (*MsgUpdateParams) Size

func (m *MsgUpdateParams) Size() (n int)

func (*MsgUpdateParams) String

func (m *MsgUpdateParams) String() string

func (MsgUpdateParams) Type

func (msg MsgUpdateParams) Type() string

Type returns the the action

func (*MsgUpdateParams) Unmarshal

func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error

func (*MsgUpdateParams) Validate

func (msg *MsgUpdateParams) Validate() error

ValidateBasic does a sanity check on the provided data.

func (*MsgUpdateParams) XXX_DiscardUnknown

func (m *MsgUpdateParams) XXX_DiscardUnknown()

func (*MsgUpdateParams) XXX_Marshal

func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgUpdateParams) XXX_Merge

func (m *MsgUpdateParams) XXX_Merge(src proto.Message)

func (*MsgUpdateParams) XXX_Size

func (m *MsgUpdateParams) XXX_Size() int

func (*MsgUpdateParams) XXX_Unmarshal

func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error

type MsgUpdateParamsResponse

type MsgUpdateParamsResponse struct {
}

MsgUpdateParamsResponse defines the response structure for executing a MsgUpdateParams message.

Since: cosmos-sdk 0.47

func (*MsgUpdateParamsResponse) Descriptor

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

func (*MsgUpdateParamsResponse) Marshal

func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error)

func (*MsgUpdateParamsResponse) MarshalTo

func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgUpdateParamsResponse) MarshalToSizedBuffer

func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgUpdateParamsResponse) ProtoMessage

func (*MsgUpdateParamsResponse) ProtoMessage()

func (*MsgUpdateParamsResponse) Reset

func (m *MsgUpdateParamsResponse) Reset()

func (*MsgUpdateParamsResponse) Size

func (m *MsgUpdateParamsResponse) Size() (n int)

func (*MsgUpdateParamsResponse) String

func (m *MsgUpdateParamsResponse) String() string

func (*MsgUpdateParamsResponse) Unmarshal

func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error

func (*MsgUpdateParamsResponse) XXX_DiscardUnknown

func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown()

func (*MsgUpdateParamsResponse) XXX_Marshal

func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgUpdateParamsResponse) XXX_Merge

func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message)

func (*MsgUpdateParamsResponse) XXX_Size

func (m *MsgUpdateParamsResponse) XXX_Size() int

func (*MsgUpdateParamsResponse) XXX_Unmarshal

func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error

type MsgVoteReadResult

type MsgVoteReadResult struct {
	// signer is the Cosmos address of the voting universal validator.
	Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"`
	// request_id identifies the read request being voted on.
	RequestId string `protobuf:"bytes,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
	// result is the observation. Every field participates in the ballot key.
	Result *ReadResult `protobuf:"bytes,3,opt,name=result,proto3" json:"result,omitempty"`
}

MsgVoteReadResult is broadcast by a universal validator that has executed a read request against the destination chain.

The ballot the vote lands on is derived from (request_id, result), so two validators reporting the same observation converge on one ballot and any disagreement produces a distinct ballot that never reaches quorum. Nothing validator-local may appear in `result` for that reason — notably there is no error message field.

func (*MsgVoteReadResult) Descriptor

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

func (*MsgVoteReadResult) GetRequestId

func (m *MsgVoteReadResult) GetRequestId() string

func (*MsgVoteReadResult) GetResult

func (m *MsgVoteReadResult) GetResult() *ReadResult

func (*MsgVoteReadResult) GetSigner

func (m *MsgVoteReadResult) GetSigner() string

func (*MsgVoteReadResult) Marshal

func (m *MsgVoteReadResult) Marshal() (dAtA []byte, err error)

func (*MsgVoteReadResult) MarshalTo

func (m *MsgVoteReadResult) MarshalTo(dAtA []byte) (int, error)

func (*MsgVoteReadResult) MarshalToSizedBuffer

func (m *MsgVoteReadResult) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgVoteReadResult) ProtoMessage

func (*MsgVoteReadResult) ProtoMessage()

func (*MsgVoteReadResult) Reset

func (m *MsgVoteReadResult) Reset()

func (*MsgVoteReadResult) Size

func (m *MsgVoteReadResult) Size() (n int)

func (*MsgVoteReadResult) String

func (m *MsgVoteReadResult) String() string

func (*MsgVoteReadResult) Unmarshal

func (m *MsgVoteReadResult) Unmarshal(dAtA []byte) error

func (*MsgVoteReadResult) XXX_DiscardUnknown

func (m *MsgVoteReadResult) XXX_DiscardUnknown()

func (*MsgVoteReadResult) XXX_Marshal

func (m *MsgVoteReadResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgVoteReadResult) XXX_Merge

func (m *MsgVoteReadResult) XXX_Merge(src proto.Message)

func (*MsgVoteReadResult) XXX_Size

func (m *MsgVoteReadResult) XXX_Size() int

func (*MsgVoteReadResult) XXX_Unmarshal

func (m *MsgVoteReadResult) XXX_Unmarshal(b []byte) error

type MsgVoteReadResultResponse

type MsgVoteReadResultResponse struct {
	// finalized reports whether this vote carried the ballot to quorum.
	Finalized bool `protobuf:"varint,1,opt,name=finalized,proto3" json:"finalized,omitempty"`
}

func (*MsgVoteReadResultResponse) Descriptor

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

func (*MsgVoteReadResultResponse) GetFinalized

func (m *MsgVoteReadResultResponse) GetFinalized() bool

func (*MsgVoteReadResultResponse) Marshal

func (m *MsgVoteReadResultResponse) Marshal() (dAtA []byte, err error)

func (*MsgVoteReadResultResponse) MarshalTo

func (m *MsgVoteReadResultResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgVoteReadResultResponse) MarshalToSizedBuffer

func (m *MsgVoteReadResultResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgVoteReadResultResponse) ProtoMessage

func (*MsgVoteReadResultResponse) ProtoMessage()

func (*MsgVoteReadResultResponse) Reset

func (m *MsgVoteReadResultResponse) Reset()

func (*MsgVoteReadResultResponse) Size

func (m *MsgVoteReadResultResponse) Size() (n int)

func (*MsgVoteReadResultResponse) String

func (m *MsgVoteReadResultResponse) String() string

func (*MsgVoteReadResultResponse) Unmarshal

func (m *MsgVoteReadResultResponse) Unmarshal(dAtA []byte) error

func (*MsgVoteReadResultResponse) XXX_DiscardUnknown

func (m *MsgVoteReadResultResponse) XXX_DiscardUnknown()

func (*MsgVoteReadResultResponse) XXX_Marshal

func (m *MsgVoteReadResultResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgVoteReadResultResponse) XXX_Merge

func (m *MsgVoteReadResultResponse) XXX_Merge(src proto.Message)

func (*MsgVoteReadResultResponse) XXX_Size

func (m *MsgVoteReadResultResponse) XXX_Size() int

func (*MsgVoteReadResultResponse) XXX_Unmarshal

func (m *MsgVoteReadResultResponse) XXX_Unmarshal(b []byte) error

type Params

type Params struct {
	SomeValue bool `protobuf:"varint,2,opt,name=some_value,json=someValue,proto3" json:"some_value,omitempty"`
}

Params defines the set of module parameters.

func DefaultParams

func DefaultParams() Params

DefaultParams returns default module parameters.

func (*Params) Descriptor

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

func (*Params) Equal

func (this *Params) Equal(that interface{}) bool

func (*Params) GetSomeValue

func (m *Params) GetSomeValue() bool

func (*Params) Marshal

func (m *Params) Marshal() (dAtA []byte, err error)

func (*Params) MarshalTo

func (m *Params) MarshalTo(dAtA []byte) (int, error)

func (*Params) MarshalToSizedBuffer

func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

func (m *Params) Size() (n int)

func (Params) String

func (p Params) String() string

Stringer method for Params.

func (*Params) Unmarshal

func (m *Params) Unmarshal(dAtA []byte) error

func (Params) Validate

func (p Params) Validate() error

Validate does the sanity check on the params.

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Params) XXX_Merge

func (m *Params) XXX_Merge(src proto.Message)

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

func (m *Params) XXX_Unmarshal(b []byte) error

type QueryAllAbortedReadRequestsRequest

type QueryAllAbortedReadRequestsRequest struct {
	Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*QueryAllAbortedReadRequestsRequest) Descriptor

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

func (*QueryAllAbortedReadRequestsRequest) GetPagination

func (*QueryAllAbortedReadRequestsRequest) Marshal

func (m *QueryAllAbortedReadRequestsRequest) Marshal() (dAtA []byte, err error)

func (*QueryAllAbortedReadRequestsRequest) MarshalTo

func (m *QueryAllAbortedReadRequestsRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryAllAbortedReadRequestsRequest) MarshalToSizedBuffer

func (m *QueryAllAbortedReadRequestsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryAllAbortedReadRequestsRequest) ProtoMessage

func (*QueryAllAbortedReadRequestsRequest) ProtoMessage()

func (*QueryAllAbortedReadRequestsRequest) Reset

func (*QueryAllAbortedReadRequestsRequest) Size

func (*QueryAllAbortedReadRequestsRequest) String

func (*QueryAllAbortedReadRequestsRequest) Unmarshal

func (m *QueryAllAbortedReadRequestsRequest) Unmarshal(dAtA []byte) error

func (*QueryAllAbortedReadRequestsRequest) XXX_DiscardUnknown

func (m *QueryAllAbortedReadRequestsRequest) XXX_DiscardUnknown()

func (*QueryAllAbortedReadRequestsRequest) XXX_Marshal

func (m *QueryAllAbortedReadRequestsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryAllAbortedReadRequestsRequest) XXX_Merge

func (*QueryAllAbortedReadRequestsRequest) XXX_Size

func (*QueryAllAbortedReadRequestsRequest) XXX_Unmarshal

func (m *QueryAllAbortedReadRequestsRequest) XXX_Unmarshal(b []byte) error

type QueryAllAbortedReadRequestsResponse

type QueryAllAbortedReadRequestsResponse struct {
	// Reads whose expiry call never landed. Each carries error_msg explaining why.
	Reads      []UniversalRead     `protobuf:"bytes,1,rep,name=reads,proto3" json:"reads"`
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*QueryAllAbortedReadRequestsResponse) Descriptor

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

func (*QueryAllAbortedReadRequestsResponse) GetPagination

func (*QueryAllAbortedReadRequestsResponse) GetReads

func (*QueryAllAbortedReadRequestsResponse) Marshal

func (m *QueryAllAbortedReadRequestsResponse) Marshal() (dAtA []byte, err error)

func (*QueryAllAbortedReadRequestsResponse) MarshalTo

func (m *QueryAllAbortedReadRequestsResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryAllAbortedReadRequestsResponse) MarshalToSizedBuffer

func (m *QueryAllAbortedReadRequestsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryAllAbortedReadRequestsResponse) ProtoMessage

func (*QueryAllAbortedReadRequestsResponse) ProtoMessage()

func (*QueryAllAbortedReadRequestsResponse) Reset

func (*QueryAllAbortedReadRequestsResponse) Size

func (*QueryAllAbortedReadRequestsResponse) String

func (*QueryAllAbortedReadRequestsResponse) Unmarshal

func (m *QueryAllAbortedReadRequestsResponse) Unmarshal(dAtA []byte) error

func (*QueryAllAbortedReadRequestsResponse) XXX_DiscardUnknown

func (m *QueryAllAbortedReadRequestsResponse) XXX_DiscardUnknown()

func (*QueryAllAbortedReadRequestsResponse) XXX_Marshal

func (m *QueryAllAbortedReadRequestsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryAllAbortedReadRequestsResponse) XXX_Merge

func (*QueryAllAbortedReadRequestsResponse) XXX_Size

func (*QueryAllAbortedReadRequestsResponse) XXX_Unmarshal

func (m *QueryAllAbortedReadRequestsResponse) XXX_Unmarshal(b []byte) error

type QueryAllPendingReadRequestsRequest

type QueryAllPendingReadRequestsRequest struct {
	Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*QueryAllPendingReadRequestsRequest) Descriptor

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

func (*QueryAllPendingReadRequestsRequest) GetPagination

func (*QueryAllPendingReadRequestsRequest) Marshal

func (m *QueryAllPendingReadRequestsRequest) Marshal() (dAtA []byte, err error)

func (*QueryAllPendingReadRequestsRequest) MarshalTo

func (m *QueryAllPendingReadRequestsRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryAllPendingReadRequestsRequest) MarshalToSizedBuffer

func (m *QueryAllPendingReadRequestsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryAllPendingReadRequestsRequest) ProtoMessage

func (*QueryAllPendingReadRequestsRequest) ProtoMessage()

func (*QueryAllPendingReadRequestsRequest) Reset

func (*QueryAllPendingReadRequestsRequest) Size

func (*QueryAllPendingReadRequestsRequest) String

func (*QueryAllPendingReadRequestsRequest) Unmarshal

func (m *QueryAllPendingReadRequestsRequest) Unmarshal(dAtA []byte) error

func (*QueryAllPendingReadRequestsRequest) XXX_DiscardUnknown

func (m *QueryAllPendingReadRequestsRequest) XXX_DiscardUnknown()

func (*QueryAllPendingReadRequestsRequest) XXX_Marshal

func (m *QueryAllPendingReadRequestsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryAllPendingReadRequestsRequest) XXX_Merge

func (*QueryAllPendingReadRequestsRequest) XXX_Size

func (*QueryAllPendingReadRequestsRequest) XXX_Unmarshal

func (m *QueryAllPendingReadRequestsRequest) XXX_Unmarshal(b []byte) error

type QueryAllPendingReadRequestsResponse

type QueryAllPendingReadRequestsResponse struct {
	// Reads that are unsettled AND not yet past their expiry height. Requests past
	// expiry are withheld here even before the sweeper retires them, so validators
	// never take on work that can no longer be fulfilled in time.
	Reads      []UniversalRead     `protobuf:"bytes,1,rep,name=reads,proto3" json:"reads"`
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*QueryAllPendingReadRequestsResponse) Descriptor

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

func (*QueryAllPendingReadRequestsResponse) GetPagination

func (*QueryAllPendingReadRequestsResponse) GetReads

func (*QueryAllPendingReadRequestsResponse) Marshal

func (m *QueryAllPendingReadRequestsResponse) Marshal() (dAtA []byte, err error)

func (*QueryAllPendingReadRequestsResponse) MarshalTo

func (m *QueryAllPendingReadRequestsResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryAllPendingReadRequestsResponse) MarshalToSizedBuffer

func (m *QueryAllPendingReadRequestsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryAllPendingReadRequestsResponse) ProtoMessage

func (*QueryAllPendingReadRequestsResponse) ProtoMessage()

func (*QueryAllPendingReadRequestsResponse) Reset

func (*QueryAllPendingReadRequestsResponse) Size

func (*QueryAllPendingReadRequestsResponse) String

func (*QueryAllPendingReadRequestsResponse) Unmarshal

func (m *QueryAllPendingReadRequestsResponse) Unmarshal(dAtA []byte) error

func (*QueryAllPendingReadRequestsResponse) XXX_DiscardUnknown

func (m *QueryAllPendingReadRequestsResponse) XXX_DiscardUnknown()

func (*QueryAllPendingReadRequestsResponse) XXX_Marshal

func (m *QueryAllPendingReadRequestsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryAllPendingReadRequestsResponse) XXX_Merge

func (*QueryAllPendingReadRequestsResponse) XXX_Size

func (*QueryAllPendingReadRequestsResponse) XXX_Unmarshal

func (m *QueryAllPendingReadRequestsResponse) XXX_Unmarshal(b []byte) error

type QueryClient

type QueryClient interface {
	// Params queries all parameters of the module.
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
	// AllPendingReadRequests lists read requests still awaiting an observation.
	// This is the endpoint universal validators poll.
	AllPendingReadRequests(ctx context.Context, in *QueryAllPendingReadRequestsRequest, opts ...grpc.CallOption) (*QueryAllPendingReadRequestsResponse, error)
	// UniversalRead returns one read by request id, at any point in its lifecycle.
	UniversalRead(ctx context.Context, in *QueryUniversalReadRequest, opts ...grpc.CallOption) (*QueryUniversalReadResponse, error)
	// AllAbortedReadRequests lists reads the chain gave up on. These need manual
	// intervention: the contract may still hold them as pending and the funder's
	// refund is unsettled.
	AllAbortedReadRequests(ctx context.Context, in *QueryAllAbortedReadRequestsRequest, opts ...grpc.CallOption) (*QueryAllAbortedReadRequestsResponse, error)
	// ReadsByTxHash returns every read requested by one Push transaction. A single
	// transaction can emit several ReadRequested logs; this reassembles that batch.
	ReadsByTx(ctx context.Context, in *QueryReadsByTxRequest, opts ...grpc.CallOption) (*QueryReadsByTxResponse, error)
}

QueryClient is the client API for Query service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewQueryClient

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryParamsRequest

type QueryParamsRequest struct {
}

QueryParamsRequest is the request type for the Query/Params RPC method.

func (*QueryParamsRequest) Descriptor

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

func (*QueryParamsRequest) Marshal

func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)

func (*QueryParamsRequest) MarshalTo

func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryParamsRequest) MarshalToSizedBuffer

func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryParamsRequest) ProtoMessage

func (*QueryParamsRequest) ProtoMessage()

func (*QueryParamsRequest) Reset

func (m *QueryParamsRequest) Reset()

func (*QueryParamsRequest) Size

func (m *QueryParamsRequest) Size() (n int)

func (*QueryParamsRequest) String

func (m *QueryParamsRequest) String() string

func (*QueryParamsRequest) Unmarshal

func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error

func (*QueryParamsRequest) XXX_DiscardUnknown

func (m *QueryParamsRequest) XXX_DiscardUnknown()

func (*QueryParamsRequest) XXX_Marshal

func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryParamsRequest) XXX_Merge

func (m *QueryParamsRequest) XXX_Merge(src proto.Message)

func (*QueryParamsRequest) XXX_Size

func (m *QueryParamsRequest) XXX_Size() int

func (*QueryParamsRequest) XXX_Unmarshal

func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error

type QueryParamsResponse

type QueryParamsResponse struct {
	// params defines the parameters of the module.
	Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"`
}

QueryParamsResponse is the response type for the Query/Params RPC method.

func (*QueryParamsResponse) Descriptor

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

func (*QueryParamsResponse) GetParams

func (m *QueryParamsResponse) GetParams() *Params

func (*QueryParamsResponse) Marshal

func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)

func (*QueryParamsResponse) MarshalTo

func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryParamsResponse) MarshalToSizedBuffer

func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryParamsResponse) ProtoMessage

func (*QueryParamsResponse) ProtoMessage()

func (*QueryParamsResponse) Reset

func (m *QueryParamsResponse) Reset()

func (*QueryParamsResponse) Size

func (m *QueryParamsResponse) Size() (n int)

func (*QueryParamsResponse) String

func (m *QueryParamsResponse) String() string

func (*QueryParamsResponse) Unmarshal

func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error

func (*QueryParamsResponse) XXX_DiscardUnknown

func (m *QueryParamsResponse) XXX_DiscardUnknown()

func (*QueryParamsResponse) XXX_Marshal

func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryParamsResponse) XXX_Merge

func (m *QueryParamsResponse) XXX_Merge(src proto.Message)

func (*QueryParamsResponse) XXX_Size

func (m *QueryParamsResponse) XXX_Size() int

func (*QueryParamsResponse) XXX_Unmarshal

func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error

type QueryReadsByTxRequest

type QueryReadsByTxRequest struct {
	TxHash string `protobuf:"bytes,1,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"`
}

func (*QueryReadsByTxRequest) Descriptor

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

func (*QueryReadsByTxRequest) GetTxHash

func (m *QueryReadsByTxRequest) GetTxHash() string

func (*QueryReadsByTxRequest) Marshal

func (m *QueryReadsByTxRequest) Marshal() (dAtA []byte, err error)

func (*QueryReadsByTxRequest) MarshalTo

func (m *QueryReadsByTxRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryReadsByTxRequest) MarshalToSizedBuffer

func (m *QueryReadsByTxRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryReadsByTxRequest) ProtoMessage

func (*QueryReadsByTxRequest) ProtoMessage()

func (*QueryReadsByTxRequest) Reset

func (m *QueryReadsByTxRequest) Reset()

func (*QueryReadsByTxRequest) Size

func (m *QueryReadsByTxRequest) Size() (n int)

func (*QueryReadsByTxRequest) String

func (m *QueryReadsByTxRequest) String() string

func (*QueryReadsByTxRequest) Unmarshal

func (m *QueryReadsByTxRequest) Unmarshal(dAtA []byte) error

func (*QueryReadsByTxRequest) XXX_DiscardUnknown

func (m *QueryReadsByTxRequest) XXX_DiscardUnknown()

func (*QueryReadsByTxRequest) XXX_Marshal

func (m *QueryReadsByTxRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryReadsByTxRequest) XXX_Merge

func (m *QueryReadsByTxRequest) XXX_Merge(src proto.Message)

func (*QueryReadsByTxRequest) XXX_Size

func (m *QueryReadsByTxRequest) XXX_Size() int

func (*QueryReadsByTxRequest) XXX_Unmarshal

func (m *QueryReadsByTxRequest) XXX_Unmarshal(b []byte) error

type QueryReadsByTxResponse

type QueryReadsByTxResponse struct {
	// Every read the transaction requested, settled or not, in request-id order.
	Reads []UniversalRead `protobuf:"bytes,1,rep,name=reads,proto3" json:"reads"`
}

func (*QueryReadsByTxResponse) Descriptor

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

func (*QueryReadsByTxResponse) GetReads

func (m *QueryReadsByTxResponse) GetReads() []UniversalRead

func (*QueryReadsByTxResponse) Marshal

func (m *QueryReadsByTxResponse) Marshal() (dAtA []byte, err error)

func (*QueryReadsByTxResponse) MarshalTo

func (m *QueryReadsByTxResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryReadsByTxResponse) MarshalToSizedBuffer

func (m *QueryReadsByTxResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryReadsByTxResponse) ProtoMessage

func (*QueryReadsByTxResponse) ProtoMessage()

func (*QueryReadsByTxResponse) Reset

func (m *QueryReadsByTxResponse) Reset()

func (*QueryReadsByTxResponse) Size

func (m *QueryReadsByTxResponse) Size() (n int)

func (*QueryReadsByTxResponse) String

func (m *QueryReadsByTxResponse) String() string

func (*QueryReadsByTxResponse) Unmarshal

func (m *QueryReadsByTxResponse) Unmarshal(dAtA []byte) error

func (*QueryReadsByTxResponse) XXX_DiscardUnknown

func (m *QueryReadsByTxResponse) XXX_DiscardUnknown()

func (*QueryReadsByTxResponse) XXX_Marshal

func (m *QueryReadsByTxResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryReadsByTxResponse) XXX_Merge

func (m *QueryReadsByTxResponse) XXX_Merge(src proto.Message)

func (*QueryReadsByTxResponse) XXX_Size

func (m *QueryReadsByTxResponse) XXX_Size() int

func (*QueryReadsByTxResponse) XXX_Unmarshal

func (m *QueryReadsByTxResponse) XXX_Unmarshal(b []byte) error

type QueryServer

type QueryServer interface {
	// Params queries all parameters of the module.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
	// AllPendingReadRequests lists read requests still awaiting an observation.
	// This is the endpoint universal validators poll.
	AllPendingReadRequests(context.Context, *QueryAllPendingReadRequestsRequest) (*QueryAllPendingReadRequestsResponse, error)
	// UniversalRead returns one read by request id, at any point in its lifecycle.
	UniversalRead(context.Context, *QueryUniversalReadRequest) (*QueryUniversalReadResponse, error)
	// AllAbortedReadRequests lists reads the chain gave up on. These need manual
	// intervention: the contract may still hold them as pending and the funder's
	// refund is unsettled.
	AllAbortedReadRequests(context.Context, *QueryAllAbortedReadRequestsRequest) (*QueryAllAbortedReadRequestsResponse, error)
	// ReadsByTxHash returns every read requested by one Push transaction. A single
	// transaction can emit several ReadRequested logs; this reassembles that batch.
	ReadsByTx(context.Context, *QueryReadsByTxRequest) (*QueryReadsByTxResponse, error)
}

QueryServer is the server API for Query service.

type QueryUniversalReadRequest

type QueryUniversalReadRequest struct {
	RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
}

func (*QueryUniversalReadRequest) Descriptor

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

func (*QueryUniversalReadRequest) GetRequestId

func (m *QueryUniversalReadRequest) GetRequestId() string

func (*QueryUniversalReadRequest) Marshal

func (m *QueryUniversalReadRequest) Marshal() (dAtA []byte, err error)

func (*QueryUniversalReadRequest) MarshalTo

func (m *QueryUniversalReadRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryUniversalReadRequest) MarshalToSizedBuffer

func (m *QueryUniversalReadRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryUniversalReadRequest) ProtoMessage

func (*QueryUniversalReadRequest) ProtoMessage()

func (*QueryUniversalReadRequest) Reset

func (m *QueryUniversalReadRequest) Reset()

func (*QueryUniversalReadRequest) Size

func (m *QueryUniversalReadRequest) Size() (n int)

func (*QueryUniversalReadRequest) String

func (m *QueryUniversalReadRequest) String() string

func (*QueryUniversalReadRequest) Unmarshal

func (m *QueryUniversalReadRequest) Unmarshal(dAtA []byte) error

func (*QueryUniversalReadRequest) XXX_DiscardUnknown

func (m *QueryUniversalReadRequest) XXX_DiscardUnknown()

func (*QueryUniversalReadRequest) XXX_Marshal

func (m *QueryUniversalReadRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryUniversalReadRequest) XXX_Merge

func (m *QueryUniversalReadRequest) XXX_Merge(src proto.Message)

func (*QueryUniversalReadRequest) XXX_Size

func (m *QueryUniversalReadRequest) XXX_Size() int

func (*QueryUniversalReadRequest) XXX_Unmarshal

func (m *QueryUniversalReadRequest) XXX_Unmarshal(b []byte) error

type QueryUniversalReadResponse

type QueryUniversalReadResponse struct {
	Read UniversalRead `protobuf:"bytes,1,opt,name=read,proto3" json:"read"`
}

func (*QueryUniversalReadResponse) Descriptor

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

func (*QueryUniversalReadResponse) GetRead

func (*QueryUniversalReadResponse) Marshal

func (m *QueryUniversalReadResponse) Marshal() (dAtA []byte, err error)

func (*QueryUniversalReadResponse) MarshalTo

func (m *QueryUniversalReadResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryUniversalReadResponse) MarshalToSizedBuffer

func (m *QueryUniversalReadResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryUniversalReadResponse) ProtoMessage

func (*QueryUniversalReadResponse) ProtoMessage()

func (*QueryUniversalReadResponse) Reset

func (m *QueryUniversalReadResponse) Reset()

func (*QueryUniversalReadResponse) Size

func (m *QueryUniversalReadResponse) Size() (n int)

func (*QueryUniversalReadResponse) String

func (m *QueryUniversalReadResponse) String() string

func (*QueryUniversalReadResponse) Unmarshal

func (m *QueryUniversalReadResponse) Unmarshal(dAtA []byte) error

func (*QueryUniversalReadResponse) XXX_DiscardUnknown

func (m *QueryUniversalReadResponse) XXX_DiscardUnknown()

func (*QueryUniversalReadResponse) XXX_Marshal

func (m *QueryUniversalReadResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryUniversalReadResponse) XXX_Merge

func (m *QueryUniversalReadResponse) XXX_Merge(src proto.Message)

func (*QueryUniversalReadResponse) XXX_Size

func (m *QueryUniversalReadResponse) XXX_Size() int

func (*QueryUniversalReadResponse) XXX_Unmarshal

func (m *QueryUniversalReadResponse) XXX_Unmarshal(b []byte) error

type ReadErrorCode

type ReadErrorCode int32

ReadStatus is the outcome a universal validator observed for a read. ReadErrorCode is the deterministic reason a read produced an ERROR observation. Only non-transient failures appear here; transient failures never vote — the validator retries locally instead.

const (
	ReadErrorCode_READ_ERROR_UNSPECIFIED    ReadErrorCode = 0
	ReadErrorCode_READ_ERROR_INVALID_QUERY  ReadErrorCode = 1
	ReadErrorCode_READ_ERROR_UNSUPPORTED    ReadErrorCode = 2
	ReadErrorCode_READ_ERROR_REVERTED       ReadErrorCode = 3
	ReadErrorCode_READ_ERROR_NOT_FOUND      ReadErrorCode = 4
	ReadErrorCode_READ_ERROR_INVALID_RESULT ReadErrorCode = 5
	ReadErrorCode_READ_ERROR_REJECTED       ReadErrorCode = 6
)

func (ReadErrorCode) EnumDescriptor

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

func (ReadErrorCode) String

func (x ReadErrorCode) String() string

type ReadRequest

type ReadRequest struct {
	RequestId              string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
	DestinationChain       string `protobuf:"bytes,2,opt,name=destination_chain,json=destinationChain,proto3" json:"destination_chain,omitempty"`
	Owner                  []byte `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"`
	Query                  []byte `protobuf:"bytes,4,opt,name=query,proto3" json:"query,omitempty"`
	MinConfirmations       uint32 `protobuf:"varint,5,opt,name=min_confirmations,json=minConfirmations,proto3" json:"min_confirmations,omitempty"`
	DestinationBlockHeight uint64 `` /* 130-byte string literal not displayed */
	ExpiryBlockHeight      uint64 `protobuf:"varint,7,opt,name=expiry_block_height,json=expiryBlockHeight,proto3" json:"expiry_block_height,omitempty"`
	CreatedAtHeight        uint64 `protobuf:"varint,8,opt,name=created_at_height,json=createdAtHeight,proto3" json:"created_at_height,omitempty"`
	// Bookkeeping — recorded for operators, not consumed by universal validators.
	CallbackTarget    string `protobuf:"bytes,9,opt,name=callback_target,json=callbackTarget,proto3" json:"callback_target,omitempty"`
	OriginalFunder    string `protobuf:"bytes,10,opt,name=original_funder,json=originalFunder,proto3" json:"original_funder,omitempty"`
	FeesDeposited     string `protobuf:"bytes,11,opt,name=fees_deposited,json=feesDeposited,proto3" json:"fees_deposited,omitempty"`
	MaxFee            string `protobuf:"bytes,12,opt,name=max_fee,json=maxFee,proto3" json:"max_fee,omitempty"`
	RequestedTxHash   string `protobuf:"bytes,13,opt,name=requested_tx_hash,json=requestedTxHash,proto3" json:"requested_tx_hash,omitempty"`
	RequestedLogIndex uint64 `protobuf:"varint,14,opt,name=requested_log_index,json=requestedLogIndex,proto3" json:"requested_log_index,omitempty"`
	// Fee split, taken from ReadRequested. protocol_fee is already in VaultPC by the
	// time we see the log; only callback_budget is still escrowed on the contract.
	ProtocolFee    string `protobuf:"bytes,15,opt,name=protocol_fee,json=protocolFee,proto3" json:"protocol_fee,omitempty"`
	CallbackBudget string `protobuf:"bytes,16,opt,name=callback_budget,json=callbackBudget,proto3" json:"callback_budget,omitempty"`
	// Gas ceiling the app declared for its own callback. The contract caps the inner
	// call at this; we size the fulfil transaction from it.
	CallbackGasLimit uint64 `protobuf:"varint,17,opt,name=callback_gas_limit,json=callbackGasLimit,proto3" json:"callback_gas_limit,omitempty"`
	// Where an unspent budget is refunded. From ReadSpec, not necessarily the funder.
	RevertRecipient string `protobuf:"bytes,18,opt,name=revert_recipient,json=revertRecipient,proto3" json:"revert_recipient,omitempty"`
}

ReadRequest is one external read requested by an app on Push Chain.

Every field is derived from the UniversalCallback.ReadRequested event, except created_at_height / requested_tx_hash / requested_log_index which come from the block the log was emitted in.

NOTE: callbackGasLimit is deliberately absent. It is an argument to requestExternalReadSelf and is stored in the contract's _pending entry, but it is NOT emitted in ReadRequested. It has to be read back via getPendingRead(requestId) at fulfilment time, when the gas budget is actually needed.

func (*ReadRequest) Descriptor

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

func (*ReadRequest) Equal

func (this *ReadRequest) Equal(that interface{}) bool

func (*ReadRequest) GetCallbackBudget

func (m *ReadRequest) GetCallbackBudget() string

func (*ReadRequest) GetCallbackGasLimit

func (m *ReadRequest) GetCallbackGasLimit() uint64

func (*ReadRequest) GetCallbackTarget

func (m *ReadRequest) GetCallbackTarget() string

func (*ReadRequest) GetCreatedAtHeight

func (m *ReadRequest) GetCreatedAtHeight() uint64

func (*ReadRequest) GetDestinationBlockHeight

func (m *ReadRequest) GetDestinationBlockHeight() uint64

func (*ReadRequest) GetDestinationChain

func (m *ReadRequest) GetDestinationChain() string

func (*ReadRequest) GetExpiryBlockHeight

func (m *ReadRequest) GetExpiryBlockHeight() uint64

func (*ReadRequest) GetFeesDeposited

func (m *ReadRequest) GetFeesDeposited() string

func (*ReadRequest) GetMaxFee

func (m *ReadRequest) GetMaxFee() string

func (*ReadRequest) GetMinConfirmations

func (m *ReadRequest) GetMinConfirmations() uint32

func (*ReadRequest) GetOriginalFunder

func (m *ReadRequest) GetOriginalFunder() string

func (*ReadRequest) GetOwner

func (m *ReadRequest) GetOwner() []byte

func (*ReadRequest) GetProtocolFee

func (m *ReadRequest) GetProtocolFee() string

func (*ReadRequest) GetQuery

func (m *ReadRequest) GetQuery() []byte

func (*ReadRequest) GetRequestId

func (m *ReadRequest) GetRequestId() string

func (*ReadRequest) GetRequestedLogIndex

func (m *ReadRequest) GetRequestedLogIndex() uint64

func (*ReadRequest) GetRequestedTxHash

func (m *ReadRequest) GetRequestedTxHash() string

func (*ReadRequest) GetRevertRecipient

func (m *ReadRequest) GetRevertRecipient() string

func (*ReadRequest) Marshal

func (m *ReadRequest) Marshal() (dAtA []byte, err error)

func (*ReadRequest) MarshalTo

func (m *ReadRequest) MarshalTo(dAtA []byte) (int, error)

func (*ReadRequest) MarshalToSizedBuffer

func (m *ReadRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ReadRequest) ProtoMessage

func (*ReadRequest) ProtoMessage()

func (*ReadRequest) Reset

func (m *ReadRequest) Reset()

func (*ReadRequest) Size

func (m *ReadRequest) Size() (n int)

func (*ReadRequest) String

func (m *ReadRequest) String() string

func (*ReadRequest) Unmarshal

func (m *ReadRequest) Unmarshal(dAtA []byte) error

func (*ReadRequest) XXX_DiscardUnknown

func (m *ReadRequest) XXX_DiscardUnknown()

func (*ReadRequest) XXX_Marshal

func (m *ReadRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ReadRequest) XXX_Merge

func (m *ReadRequest) XXX_Merge(src proto.Message)

func (*ReadRequest) XXX_Size

func (m *ReadRequest) XXX_Size() int

func (*ReadRequest) XXX_Unmarshal

func (m *ReadRequest) XXX_Unmarshal(b []byte) error

type ReadRequestedEvent

type ReadRequestedEvent struct {
	RequestID      string
	CallbackTarget string
	OriginalFunder string

	ChainNamespace string
	ChainID        string
	Owner          []byte

	Query                 []byte
	MinConfirmations      uint16
	BlockNumber           uint64
	ExpiryPushChainHeight uint64
	MaxFee                *big.Int
	RevertRecipient       string

	// Fee split. ProtocolFee has already left for VaultPC by the time this log is
	// emitted; only CallbackBudget is still escrowed on the contract.
	TotalPaid        *big.Int
	ProtocolFee      *big.Int
	CallbackBudget   *big.Int
	CallbackGasLimit uint64
}

ReadRequestedEvent is a decoded ReadRequested log.

RequestID keeps the raw 32-byte topic hex rather than a decimal string: it is handed straight back to the contract as a uint256 on fulfil/expire, and the hex form round-trips without a base conversion in the middle.

func DecodeReadRequestedFromLog

func DecodeReadRequestedFromLog(log *evmtypes.Log) (*ReadRequestedEvent, error)

DecodeReadRequestedFromLog decodes a ReadRequested log.

The caller is responsible for having checked log.Address — this function only validates the topic layout, so on its own it would happily decode a forged event from an arbitrary contract.

func (*ReadRequestedEvent) DestinationChain

func (e *ReadRequestedEvent) DestinationChain() string

DestinationChain returns the CAIP-2 identifier the event's account refers to, e.g. "eip155:11155111". The contract emits namespace and id separately; every other module keys chains by the joined form.

type ReadResult

type ReadResult struct {
	Status     ReadStatus `protobuf:"varint,1,opt,name=status,proto3,enum=ucallback.v1.ReadStatus" json:"status,omitempty"`
	ResultData []byte     `protobuf:"bytes,2,opt,name=result_data,json=resultData,proto3" json:"result_data,omitempty"`
	// v2 ONLY — always empty in v1. See AggregateValue.
	Aggregates []*AggregateValue `protobuf:"bytes,5,rep,name=aggregates,proto3" json:"aggregates,omitempty"`
	// Why the read failed. Meaningful only when status is READ_STATUS_ERROR, and
	// must be READ_ERROR_UNSPECIFIED otherwise — a SUCCESS vote carrying a code
	// would hash to a different ballot than an honest SUCCESS vote and split quorum.
	//
	// An enum rather than free text on purpose: it participates in the ballot key,
	// so it must be a value validators independently converge on. A string invites
	// fmt.Sprintf("%v", err), whose text varies by RPC provider even for identical
	// on-chain failures.
	ErrorCode ReadErrorCode `protobuf:"varint,6,opt,name=error_code,json=errorCode,proto3,enum=ucallback.v1.ReadErrorCode" json:"error_code,omitempty"`
}

ReadResult is the observation a universal validator votes on.

Every field here is covered by the ballot key, so they must be byte-identical across validators for a ballot to converge. There is deliberately no error message field: local error text differs per node and would prevent agreement.

func (*ReadResult) Descriptor

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

func (*ReadResult) Equal

func (this *ReadResult) Equal(that interface{}) bool

func (*ReadResult) GetAggregates

func (m *ReadResult) GetAggregates() []*AggregateValue

func (*ReadResult) GetErrorCode

func (m *ReadResult) GetErrorCode() ReadErrorCode

func (*ReadResult) GetResultData

func (m *ReadResult) GetResultData() []byte

func (*ReadResult) GetStatus

func (m *ReadResult) GetStatus() ReadStatus

func (*ReadResult) Marshal

func (m *ReadResult) Marshal() (dAtA []byte, err error)

func (*ReadResult) MarshalTo

func (m *ReadResult) MarshalTo(dAtA []byte) (int, error)

func (*ReadResult) MarshalToSizedBuffer

func (m *ReadResult) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ReadResult) ProtoMessage

func (*ReadResult) ProtoMessage()

func (*ReadResult) Reset

func (m *ReadResult) Reset()

func (*ReadResult) Size

func (m *ReadResult) Size() (n int)

func (*ReadResult) String

func (m *ReadResult) String() string

func (*ReadResult) Unmarshal

func (m *ReadResult) Unmarshal(dAtA []byte) error

func (*ReadResult) XXX_DiscardUnknown

func (m *ReadResult) XXX_DiscardUnknown()

func (*ReadResult) XXX_Marshal

func (m *ReadResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ReadResult) XXX_Merge

func (m *ReadResult) XXX_Merge(src proto.Message)

func (*ReadResult) XXX_Size

func (m *ReadResult) XXX_Size() int

func (*ReadResult) XXX_Unmarshal

func (m *ReadResult) XXX_Unmarshal(b []byte) error

type ReadStatus

type ReadStatus int32
const (
	ReadStatus_READ_STATUS_UNSPECIFIED ReadStatus = 0
	ReadStatus_READ_STATUS_SUCCESS     ReadStatus = 1
	ReadStatus_READ_STATUS_ERROR       ReadStatus = 2
)

func (ReadStatus) EnumDescriptor

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

func (ReadStatus) String

func (x ReadStatus) String() string

type RequestStatus

type RequestStatus uint8

RequestStatus mirrors the contract's lifecycle enum (ReadTypes.sol). NONE must stay zero: every never-created requestId reads as zero on-chain.

const (
	RequestStatusNone RequestStatus = iota
	RequestStatusPending
	RequestStatusExecuted
	RequestStatusSettled
	RequestStatusExpired
)

type UValidatorKeeper

type UValidatorKeeper interface {
	IsBondedUniversalValidator(ctx context.Context, universalValidator string) (bool, error)
	IsTombstonedUniversalValidator(ctx context.Context, universalValidator string) (bool, error)
	GetEligibleVoters(ctx context.Context) ([]uvalidatortypes.UniversalValidator, error)
	GetAdmin(ctx context.Context) (string, error)
	VoteOnBallot(
		ctx context.Context,
		id string,
		ballotType uvalidatortypes.BallotObservationType,
		voter string,
		voteResult uvalidatortypes.VoteResult,
		voters []string,
		votesNeeded int64,
		expiryAfterBlocks int64,
	) (
		ballot uvalidatortypes.Ballot,
		isFinalized bool,
		isNew bool,
		err error)
}

UValidatorKeeper is the slice of x/uvalidator that x/ucallback needs: the voter set and ballot primitive for read voting, the two eligibility checks, and the admin address that gates the expiry escape hatch.

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) RetryReadExpiry

func (*UnimplementedMsgServer) UpdateParams

func (*UnimplementedMsgServer) VoteReadResult

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Params

func (*UnimplementedQueryServer) ReadsByTx

func (*UnimplementedQueryServer) UniversalRead

type UniversalRead

type UniversalRead struct {
	Id        string              `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Request   *ReadRequest        `protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"`
	Result    *ReadResult         `protobuf:"bytes,3,opt,name=result,proto3" json:"result,omitempty"`
	Status    UniversalReadStatus `protobuf:"varint,4,opt,name=status,proto3,enum=ucallback.v1.UniversalReadStatus" json:"status,omitempty"`
	BallotKey string              `protobuf:"bytes,5,opt,name=ballot_key,json=ballotKey,proto3" json:"ballot_key,omitempty"`
	// Push Chain execution attempts — fulfilExternalCallback and expireExternalRead.
	// Repeated because fulfilment can be retried and may be followed by an expiry.
	PcTx []*types.PCTx `protobuf:"bytes,6,rep,name=pc_tx,json=pcTx,proto3" json:"pc_tx,omitempty"`
	// Why the chain stopped acting on this read. Populated on the ABORTED and FAILED
	// paths from the EVM result, so it is identical on every node — this is our own
	// execution outcome, not a validator's observation, and it never touches a ballot.
	ErrorMsg string `protobuf:"bytes,7,opt,name=error_msg,json=errorMsg,proto3" json:"error_msg,omitempty"`
	// How many times the sweeper has called expireExternalRead for this read.
	//
	// An explicit counter rather than len(pc_tx): pc_tx accumulates every EVM attempt
	// on the request, including a failed fulfilment that left it in flight, so
	// counting entries would silently shorten the retry budget for exactly the reads
	// that already had trouble.
	ExpiryAttempts uint32 `protobuf:"varint,8,opt,name=expiry_attempts,json=expiryAttempts,proto3" json:"expiry_attempts,omitempty"`
}

UniversalRead is the full lifecycle record of one read request.

The read-side sibling of uexecutor's UniversalTx, but deliberately not the same shape: a read is triggered by a Push Chain event rather than an external inbound, performs no external write, and settles in exactly one Push Chain transaction.

func (*UniversalRead) Descriptor

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

func (*UniversalRead) Equal

func (this *UniversalRead) Equal(that interface{}) bool

func (*UniversalRead) GetBallotKey

func (m *UniversalRead) GetBallotKey() string

func (*UniversalRead) GetErrorMsg

func (m *UniversalRead) GetErrorMsg() string

func (*UniversalRead) GetExpiryAttempts

func (m *UniversalRead) GetExpiryAttempts() uint32

func (*UniversalRead) GetId

func (m *UniversalRead) GetId() string

func (*UniversalRead) GetPcTx

func (m *UniversalRead) GetPcTx() []*types.PCTx

func (*UniversalRead) GetRequest

func (m *UniversalRead) GetRequest() *ReadRequest

func (*UniversalRead) GetResult

func (m *UniversalRead) GetResult() *ReadResult

func (*UniversalRead) GetStatus

func (m *UniversalRead) GetStatus() UniversalReadStatus

func (*UniversalRead) Marshal

func (m *UniversalRead) Marshal() (dAtA []byte, err error)

func (*UniversalRead) MarshalTo

func (m *UniversalRead) MarshalTo(dAtA []byte) (int, error)

func (*UniversalRead) MarshalToSizedBuffer

func (m *UniversalRead) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*UniversalRead) ProtoMessage

func (*UniversalRead) ProtoMessage()

func (*UniversalRead) Reset

func (m *UniversalRead) Reset()

func (*UniversalRead) Size

func (m *UniversalRead) Size() (n int)

func (*UniversalRead) String

func (m *UniversalRead) String() string

func (*UniversalRead) Unmarshal

func (m *UniversalRead) Unmarshal(dAtA []byte) error

func (*UniversalRead) XXX_DiscardUnknown

func (m *UniversalRead) XXX_DiscardUnknown()

func (*UniversalRead) XXX_Marshal

func (m *UniversalRead) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UniversalRead) XXX_Merge

func (m *UniversalRead) XXX_Merge(src proto.Message)

func (*UniversalRead) XXX_Size

func (m *UniversalRead) XXX_Size() int

func (*UniversalRead) XXX_Unmarshal

func (m *UniversalRead) XXX_Unmarshal(b []byte) error

type UniversalReadEntry

type UniversalReadEntry struct {
	Key   string        `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value UniversalRead `protobuf:"bytes,2,opt,name=value,proto3" json:"value"`
}

UniversalReadEntry is one key-value pair from the UniversalReads map.

func (*UniversalReadEntry) Descriptor

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

func (*UniversalReadEntry) GetKey

func (m *UniversalReadEntry) GetKey() string

func (*UniversalReadEntry) GetValue

func (m *UniversalReadEntry) GetValue() UniversalRead

func (*UniversalReadEntry) Marshal

func (m *UniversalReadEntry) Marshal() (dAtA []byte, err error)

func (*UniversalReadEntry) MarshalTo

func (m *UniversalReadEntry) MarshalTo(dAtA []byte) (int, error)

func (*UniversalReadEntry) MarshalToSizedBuffer

func (m *UniversalReadEntry) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*UniversalReadEntry) ProtoMessage

func (*UniversalReadEntry) ProtoMessage()

func (*UniversalReadEntry) Reset

func (m *UniversalReadEntry) Reset()

func (*UniversalReadEntry) Size

func (m *UniversalReadEntry) Size() (n int)

func (*UniversalReadEntry) String

func (m *UniversalReadEntry) String() string

func (*UniversalReadEntry) Unmarshal

func (m *UniversalReadEntry) Unmarshal(dAtA []byte) error

func (*UniversalReadEntry) XXX_DiscardUnknown

func (m *UniversalReadEntry) XXX_DiscardUnknown()

func (*UniversalReadEntry) XXX_Marshal

func (m *UniversalReadEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UniversalReadEntry) XXX_Merge

func (m *UniversalReadEntry) XXX_Merge(src proto.Message)

func (*UniversalReadEntry) XXX_Size

func (m *UniversalReadEntry) XXX_Size() int

func (*UniversalReadEntry) XXX_Unmarshal

func (m *UniversalReadEntry) XXX_Unmarshal(b []byte) error

type UniversalReadStatus

type UniversalReadStatus int32

UniversalReadStatus is the lifecycle state of a read request on Push Chain.

const (
	UniversalReadStatus_UNIVERSAL_READ_STATUS_UNSPECIFIED UniversalReadStatus = 0
	UniversalReadStatus_UNIVERSAL_READ_STATUS_PENDING     UniversalReadStatus = 1
	UniversalReadStatus_UNIVERSAL_READ_STATUS_VOTING      UniversalReadStatus = 2
	UniversalReadStatus_UNIVERSAL_READ_STATUS_FULFILLED   UniversalReadStatus = 3
	UniversalReadStatus_UNIVERSAL_READ_STATUS_EXPIRED     UniversalReadStatus = 4
	UniversalReadStatus_UNIVERSAL_READ_STATUS_FAILED      UniversalReadStatus = 5
	// Gave up: expireExternalRead failed MaxExpiryAttempts times and the contract
	// never acknowledged the request. Distinct from EXPIRED because the contract may
	// still hold it as pending — and since expireExternalRead is module-gated, no
	// other caller can settle it. Requires manual intervention, the same sense as
	// uexecutor's ABORTED. See error_msg on UniversalRead for the last failure.
	UniversalReadStatus_UNIVERSAL_READ_STATUS_ABORTED UniversalReadStatus = 6
)

func (UniversalReadStatus) EnumDescriptor

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

func (UniversalReadStatus) String

func (x UniversalReadStatus) String() string

Jump to

Keyboard shortcuts

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