Documentation
¶
Index ¶
- Constants
- Variables
- func CheckAndUpdateXmsgGasPrice(ctx sdk.Context, k Keeper, xmsg types.Xmsg, ...) (math.Uint, math.Uint, error)
- func EmitEventChainIndex(ctx sdk.Context, chainId uint64, height uint64)
- func EmitEventInboundFinalized(ctx sdk.Context, xmsg *types.Xmsg)
- func EmitEventPellSent(ctx sdk.Context, xmsg types.Xmsg)
- func EmitEventStatusNode(ctx sdk.Context, statusNode *types.EventStatusNode)
- func EmitOutboundFailure(ctx sdk.Context, oldStatus string, newStatus string, xmsgIndex string)
- func EmitOutboundSuccess(ctx sdk.Context, oldStatus string, newStatus string, xmsgIndex string)
- func GetAbortedAmount(xmsg types.Xmsg) sdkmath.Uint
- func GetIndexStringForTssMigration(currentTssPubkey, newTssPubkey string, chainID int64, amount sdkmath.Uint, ...) string
- func IsPending(xmsg *types.Xmsg) bool
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func ParsePellSentEvent(log ethtypes.Log, connectorPEVM ethcommon.Address) (*pellconnector.PellConnectorPellSent, error)
- func SortXmsgsByHeightAndChainID(cctxs []*types.Xmsg) []*types.Xmsg
- type CheckAndUpdateXmsgGasPriceFunc
- type ConnectorEventHandler
- func (h ConnectorEventHandler) GetContractAddress(ctx sdk.Context) (ethcommon.Address, error)
- func (h ConnectorEventHandler) HandleEvent(ctx sdk.Context, _ uint64, toAddress ethcommon.Address, logs []*ethtypes.Log, ...) ([]*types.CrossChainFee, error)
- func (h ConnectorEventHandler) ParseEvent(contractAddr ethcommon.Address, log *ethtypes.Log) (interface{}, error)
- type Hooks
- type Keeper
- func (k Keeper) AddAllowedXmsgSender(goCtx context.Context, msg *types.MsgAddAllowedXmsgSender) (*types.MsgAddAllowedXmsgSenderResponse, error)
- func (k Keeper) AddFinalizedInbound(ctx sdk.Context, intxHash string, chainID int64, eventIndex uint64)
- func (k Keeper) BlockProof(c context.Context, req *types.QueryBlockProofRequest) (*types.QueryBlockProofResponse, error)
- func (k Keeper) ChainIndex(c context.Context, req *types.QueryChainIndexRequest) (*types.QueryChainIndexResponse, error)
- func (k Keeper) CrosschainFeeParamByChainId(ctx context.Context, req *types.QueryCrosschainFeeParamByChainIdRequest) (*types.QueryCrosschainFeeParamByChainIdResponse, error)
- func (k Keeper) CrosschainFeeParams(ctx context.Context, req *types.QueryCrosschainFeeParamsRequest) (*types.QueryCrosschainFeeParamsResponse, error)
- func (k Keeper) DeductFees(ctx sdk.Context, fees []*types.CrossChainFee) error
- func (k Keeper) DeleteAllowedXmsgSenders(ctx sdk.Context, builders []string)
- func (k Keeper) DeleteBlockProof(ctx sdk.Context, chainId, height uint64)
- func (k Keeper) DeleteXmsgByEventIndex(ctx sdk.Context, eventIndex string)
- func (k Keeper) GasPrice(c context.Context, req *types.QueryGetGasPriceRequest) (*types.QueryGasPriceResponse, error)
- func (k Keeper) GasPriceAll(c context.Context, req *types.QueryAllGasPriceRequest) (*types.QueryGasPriceAllResponse, error)
- func (k Keeper) GasRechargeOperationIndex(c context.Context, req *types.QueryGasRechargeOperationIndexRequest) (*types.QueryGasRechargeOperationIndexResponse, error)
- func (k Keeper) GetAllCrosschainEventFees(ctx sdk.Context) ([]types.CrosschainFeeParam, error)
- func (k Keeper) GetAllFinalizedInbound(ctx sdk.Context) (list []string)
- func (k Keeper) GetAllGasPrice(ctx sdk.Context) (list []types.GasPrice)
- func (k Keeper) GetAllInTxHashToXmsg(ctx sdk.Context) (list []types.InTxHashToXmsg)
- func (k Keeper) GetAllInTxTracker(ctx sdk.Context) (inTxTrackers []types.InTxTracker)
- func (k Keeper) GetAllInTxTrackerForChain(ctx sdk.Context, chainID int64) (list []types.InTxTracker)
- func (k Keeper) GetAllInTxTrackerForChainPaginated(ctx sdk.Context, chainID int64, pagination *query.PageRequest) (inTxTrackers []types.InTxTracker, pageRes *query.PageResponse, err error)
- func (k Keeper) GetAllInTxTrackerPaginated(ctx sdk.Context, pagination *query.PageRequest) (inTxTrackers []types.InTxTracker, pageRes *query.PageResponse, err error)
- func (k Keeper) GetAllLastBlockHeight(ctx sdk.Context) (list []types.LastBlockHeight)
- func (k Keeper) GetAllOutTxTracker(ctx sdk.Context) (list []types.OutTxTracker)
- func (k Keeper) GetAllXmsg(ctx sdk.Context) (list []types.Xmsg)
- func (k Keeper) GetAllowedXmsgSenders(ctx sdk.Context) ([]string, bool)
- func (k Keeper) GetAuthKeeper() types.AccountKeeper
- func (k Keeper) GetAuthorityKeeper() types.AuthorityKeeper
- func (k Keeper) GetBankKeeper() types.BankKeeper
- func (k Keeper) GetBlockProof(ctx sdk.Context, chainId, height uint64) (val types.BlockProof, exist bool)
- func (k Keeper) GetChainIndex(ctx sdk.Context, chainId uint64) (val types.ChainIndex, exist bool)
- func (k Keeper) GetCodec() codec.Codec
- func (k Keeper) GetCrosschainEventFee(ctx sdk.Context, chainId int64) (types.CrosschainFeeParam, bool)
- func (k Keeper) GetEventStatusNode(ctx sdk.Context, index string) (val types.EventStatusNode, found bool)
- func (k Keeper) GetGasPrice(ctx sdk.Context, chainID int64) (val types.GasPrice, found bool)
- func (k Keeper) GetGasRechargeOperationIndex(ctx sdk.Context, chainID int64) uint64
- func (k Keeper) GetInTxHashToXmsg(ctx sdk.Context, inTxHash string) (val types.InTxHashToXmsg, found bool)
- func (k Keeper) GetInTxTracker(ctx sdk.Context, chainID int64, txHash string) (val types.InTxTracker, found bool)
- func (k Keeper) GetLastBlockHeight(ctx sdk.Context, index string) (val types.LastBlockHeight, found bool)
- func (k Keeper) GetLightclientKeeper() types.LightclientKeeper
- func (k Keeper) GetMedianGasPriceInUint(ctx sdk.Context, chainID int64) (math.Uint, bool)
- func (k Keeper) GetMemKey() storetypes.StoreKey
- func (k Keeper) GetOutTxTracker(ctx sdk.Context, chainID int64, nonce uint64) (val types.OutTxTracker, found bool)
- func (k Keeper) GetPellRechargeOperationIndex(ctx sdk.Context, chainID int64) uint64
- func (k Keeper) GetPevmKeeper() types.PevmKeeper
- func (k Keeper) GetRateLimiterAssetRateList(ctx sdk.Context) (flags types.RateLimiterFlags, found bool)
- func (k Keeper) GetRateLimiterFlags(ctx sdk.Context) (val types.RateLimiterFlags, found bool)
- func (k Keeper) GetRelayerKeeper() types.RelayerKeeper
- func (k Keeper) GetRevertGasLimit(ctx sdk.Context, xmsg types.Xmsg) (uint64, error)
- func (k Keeper) GetStakingKeeper() types.StakingKeeper
- func (k Keeper) GetStoreKey() storetypes.StoreKey
- func (k Keeper) GetXmsg(ctx sdk.Context, index string) (val types.Xmsg, found bool)
- func (k Keeper) GetXmsgByEventIndex(ctx sdk.Context, eventIndex string) (val types.Xmsg, found bool)
- func (k Keeper) HandleEVMEvents(ctx sdk.Context, xmsg *types.Xmsg) (bool, error)
- func (k Keeper) Hooks() Hooks
- func (k Keeper) InTxHashToXmsg(c context.Context, req *types.QueryGetInTxHashToXmsgRequest) (*types.QueryInTxHashToXmsgResponse, error)
- func (k Keeper) InTxHashToXmsgAll(c context.Context, req *types.QueryAllInTxHashToXmsgRequest) (*types.QueryInTxHashToXmsgAllResponse, error)
- func (k Keeper) InTxHashToXmsgData(c context.Context, req *types.QueryInTxHashToXmsgDataRequest) (*types.QueryInTxHashToXmsgDataResponse, error)
- func (k Keeper) InTxTrackerAll(goCtx context.Context, req *types.QueryAllInTxTrackersRequest) (*types.QueryInTxTrackerAllResponse, error)
- func (k Keeper) InTxTrackerAllByChain(goCtx context.Context, request *types.QueryAllInTxTrackerByChainRequest) (*types.QueryInTxTrackerAllByChainResponse, error)
- func (k Keeper) IsAllowedXmsgSender(ctx sdk.Context, builder string) bool
- func (k Keeper) IsFinalizedInbound(ctx sdk.Context, intxHash string, chainID int64, eventIndex uint64) bool
- func (k Keeper) IsGasRechargeOperationIndexFinalized(ctx sdk.Context, chainID int64, voteIndex uint64) bool
- func (k Keeper) IsPellRechargeOperationIndexFinalized(ctx sdk.Context, chainID int64, voteIndex uint64) bool
- func (k Keeper) IterateAndUpdateXmsgGasPrice(ctx sdk.Context, chains []*pellchains.Chain, ...) (int, relayertypes.GasPriceIncreaseFlags)
- func (k Keeper) LastBlockHeight(c context.Context, req *types.QueryGetLastBlockHeightRequest) (*types.QueryLastBlockHeightResponse, error)
- func (k Keeper) LastBlockHeightAll(c context.Context, req *types.QueryAllLastBlockHeightRequest) (*types.QueryLastBlockHeightAllResponse, error)
- func (k Keeper) LastPellHeight(goCtx context.Context, req *types.QueryLastPellHeightRequest) (*types.QueryLastPellHeightResponse, error)
- func (k Keeper) ListAllowedXmsgSenders(ctx context.Context, req *types.QueryListAllowedXmsgSendersRequest) (*types.QueryListAllowedXmsgSendersResponse, error)
- func (k Keeper) ListPendingXmsg(c context.Context, req *types.QueryListPendingXmsgRequest) (*types.QueryListPendingXmsgResponse, error)
- func (k Keeper) ListPendingXmsgWithinRateLimit(c context.Context, req *types.QueryListPendingXmsgWithinRateLimitRequest) (res *types.QueryListPendingXmsgWithinRateLimitResponse, err error)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) MigrateTSSFundsForChain(ctx sdk.Context, chainID int64, amount sdkmath.Uint, ...) error
- func (k Keeper) OutTxTracker(c context.Context, req *types.QueryGetOutTxTrackerRequest) (*types.QueryOutTxTrackerResponse, error)
- func (k Keeper) OutTxTrackerAll(c context.Context, req *types.QueryAllOutTxTrackerRequest) (*types.QueryOutTxTrackerAllResponse, error)
- func (k Keeper) OutTxTrackerAllByChain(c context.Context, req *types.QueryAllOutTxTrackerByChainRequest) (*types.QueryOutTxTrackerAllByChainResponse, error)
- func (k Keeper) PayGasAndUpdateXmsg(ctx sdk.Context, chainID int64, xmsg *types.Xmsg) error
- func (k Keeper) PayNativeGasAndUpdateXmsg(ctx sdk.Context, chainID int64, xmsg *types.Xmsg) error
- func (k Keeper) PellRechargeOperationIndex(c context.Context, req *types.QueryPellRechargeOperationIndexRequest) (*types.QueryPellRechargeOperationIndexResponse, error)
- func (k Keeper) ProcessFailedOutbound(ctx sdk.Context, xmsg *types.Xmsg) error
- func (k Keeper) ProcessInbound(ctx sdk.Context, xmsg *types.Xmsg)
- func (k Keeper) ProcessOutbound(ctx sdk.Context, xmsg *types.Xmsg, ballotStatus relayertypes.BallotStatus) error
- func (k Keeper) ProcessPellSentEvent(ctx sdk.Context, event *pellconnector.PellConnectorPellSent, ...) error
- func (k Keeper) ProcessSuccessfulOutbound(ctx sdk.Context, xmsg *types.Xmsg)
- func (k Keeper) ProcessXmsg(ctx sdk.Context, xmsg types.Xmsg, receiverChain *chains.Chain) error
- func (k Keeper) RateLimiterFlags(c context.Context, req *types.QueryRateLimiterFlagsRequest) (*types.QueryRateLimiterFlagsResponse, error)
- func (k Keeper) RateLimiterInput(c context.Context, req *types.QueryRateLimiterInputRequest) (res *types.QueryRateLimiterInputResponse, err error)
- func (k Keeper) RemoveAllowedXmsgSender(goCtx context.Context, msg *types.MsgRemoveAllowedXmsgSender) (*types.MsgRemoveAllowedXmsgSenderResponse, error)
- func (k Keeper) RemoveGasPrice(ctx sdk.Context, index string)
- func (k Keeper) RemoveInTxHashToXmsg(ctx sdk.Context, inTxHash string)
- func (k Keeper) RemoveInTxTrackerIfExists(ctx sdk.Context, chainID int64, txHash string)
- func (k Keeper) RemoveLastBlockHeight(ctx sdk.Context, index string)
- func (k Keeper) RemoveOutTxTracker(ctx sdk.Context, chainID int64, nonce uint64)
- func (k Keeper) RemoveXmsg(ctx sdk.Context, index string)
- func (k Keeper) ResetGasMeterAndConsumeGas(ctx sdk.Context, gasUsed uint64)
- func (k Keeper) SaveAllowedXmsgSenders(ctx sdk.Context, builders []string)
- func (k Keeper) SaveFailedOutbound(ctx sdk.Context, xmsg *types.Xmsg, errMessage string, ballotIndex string)
- func (k Keeper) SaveInbound(ctx sdk.Context, xmsg *types.Xmsg, blockHeight uint64, eventIndex uint64)
- func (k Keeper) SaveOutbound(ctx sdk.Context, xmsg *types.Xmsg, ballotIndex string)
- func (k Keeper) SaveSuccessfulOutbound(ctx sdk.Context, xmsg *types.Xmsg, ballotIndex string)
- func (k Keeper) SetBlockProof(ctx sdk.Context, blockProof *types.BlockProof)
- func (k Keeper) SetChainIndex(ctx sdk.Context, chainId, height uint64)
- func (k Keeper) SetEventStatusNode(ctx sdk.Context, index string, event types.EventStatusNode)
- func (k Keeper) SetFinalizedInbound(ctx sdk.Context, finalizedInboundIndex string)
- func (k Keeper) SetGasPrice(ctx sdk.Context, gasPrice types.GasPrice)
- func (k Keeper) SetGasRechargeOperationIndex(ctx sdk.Context, chainID int64, voteIndex uint64)
- func (k Keeper) SetInTxHashToXmsg(ctx sdk.Context, inTxHashToXmsg types.InTxHashToXmsg)
- func (k Keeper) SetInTxTracker(ctx sdk.Context, InTxTracker types.InTxTracker)
- func (k *Keeper) SetInternalEventHooks(hooks ...types.InternalEventLogHooks) *Keeper
- func (k Keeper) SetLastBlockHeight(ctx sdk.Context, lastBlockHeight types.LastBlockHeight)
- func (k Keeper) SetOutTxTracker(ctx sdk.Context, outTxTracker types.OutTxTracker)
- func (k Keeper) SetPellRechargeOperationIndex(ctx sdk.Context, chainID int64, voteIndex uint64)
- func (k Keeper) SetRateLimiterFlags(ctx sdk.Context, rateLimiterFlags types.RateLimiterFlags)
- func (k Keeper) SetXmsg(ctx sdk.Context, xmsg types.Xmsg)
- func (k Keeper) SetXmsgAndNonceToXmsgAndInTxHashToXmsg(ctx sdk.Context, xmsg types.Xmsg)
- func (k Keeper) SetXmsgByEventIndex(ctx sdk.Context, eventIndex string, xmsg types.Xmsg)
- func (k *Keeper) SetXmsgResultHooks(hooks ...types.XmsgOutboundResultHook) *Keeper
- func (k Keeper) StoreCrosschainEventFee(ctx sdk.Context, crosschainEventFee types.CrosschainFeeParam)
- func (k Keeper) UpdateNonce(ctx sdk.Context, receiveChainID int64, xmsg *types.Xmsg) error
- func (k Keeper) UpsertCrosschainFeeParams(goctx context.Context, msg *types.MsgUpsertCrosschainFeeParams) (*types.MsgUpsertCrosschainFeeParamsResponse, error)
- func (k Keeper) ValidateOutboundMessage(ctx sdk.Context, msg types.MsgVoteOnObservedOutboundTx) (types.Xmsg, error)
- func (k Keeper) Xmsg(c context.Context, req *types.QueryGetXmsgRequest) (*types.QueryXmsgResponse, error)
- func (k Keeper) XmsgAll(c context.Context, req *types.QueryAllXmsgRequest) (*types.QueryXmsgAllResponse, error)
- func (k Keeper) XmsgByNonce(c context.Context, req *types.QueryGetXmsgByNonceRequest) (*types.QueryXmsgByNonceResponse, error)
- type Migrator
Constants ¶
const ( // MaxPendingXmsgs is the maximum number of pending xmsgs that can be queried MaxPendingXmsgs = 700 // MaxLookbackNonce is the maximum number of nonces to look back to find missed pending xmsgs MaxLookbackNonce = 1000 )
const (
// AbortMessage is the message to abort a stuck Xmsg
AbortMessage = "Xmsg aborted with admin cmd"
)
const MaxOutTxTrackerHashes = 2
MaxOutTxTrackerHashes is the maximum number of hashes that can be stored in the outbound transaction tracker
const ( // RemainingFeesToStabilityPoolPercent is the percentage of remaining fees used to fund the gas stability pool. // When a transaction is processed, this percentage of the fees is allocated to ensure gas price stability // across different chains. This helps in maintaining consistent cross-chain message delivery. RemainingFeesToStabilityPoolPercent = 95 )
const XMSG_EVENT_INDEX = "%d-%d"
Variables ¶
var BASE_ALLOWED_XMSG_SENDER_KEY = []byte{0}
Functions ¶
func CheckAndUpdateXmsgGasPrice ¶
func CheckAndUpdateXmsgGasPrice( ctx sdk.Context, k Keeper, xmsg types.Xmsg, gasPriceFlags relayertypes.GasPriceIncreaseFlags, ) (math.Uint, math.Uint, error)
CheckAndUpdateXmsgGasPrice checks if the retry interval is reached and updates the gas price if so The function returns the gas price increase and the additional fees paid from the gas stability pool
func EmitEventStatusNode ¶
func EmitEventStatusNode(ctx sdk.Context, statusNode *types.EventStatusNode)
func EmitOutboundFailure ¶
func EmitOutboundSuccess ¶
func GetAbortedAmount ¶
GetAbortedAmount returns the amount to refund for a given Xmsg . If the Xmsg has an outbound transaction, it returns the amount of the outbound transaction. If OutTxParams is nil or the amount is zero, it returns the amount of the inbound transaction. This is because there might be a case where the transaction is set to be aborted before paying gas or creating an outbound transaction.In such a situation we can refund the entire amount that has been locked in connector or TSS
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
func ParsePellSentEvent ¶
func ParsePellSentEvent(log ethtypes.Log, connectorPEVM ethcommon.Address) (*pellconnector.PellConnectorPellSent, error)
ParsePellSentEvent tries extracting PellSent event from the input logs using the pell send contract; It only returns a not-nil event if the event has been correctly validated as a valid PellSent event
Types ¶
type CheckAndUpdateXmsgGasPriceFunc ¶
type CheckAndUpdateXmsgGasPriceFunc func( ctx sdk.Context, k Keeper, xmsg types.Xmsg, flags relayertypes.GasPriceIncreaseFlags, ) (math.Uint, math.Uint, error)
CheckAndUpdateXmsgGasPriceFunc is a function type for checking and updating the gas price of a xmsg
type ConnectorEventHandler ¶
type ConnectorEventHandler struct {
// contains filtered or unexported fields
}
func (ConnectorEventHandler) GetContractAddress ¶
get connector contract address
func (ConnectorEventHandler) HandleEvent ¶
func (h ConnectorEventHandler) HandleEvent(ctx sdk.Context, _ uint64, toAddress ethcommon.Address, logs []*ethtypes.Log, txOrigin string) ([]*types.CrossChainFee, error)
HandleEvent handles the event from the log. It returns the crosschain fees for the event
func (ConnectorEventHandler) ParseEvent ¶
func (h ConnectorEventHandler) ParseEvent(contractAddr ethcommon.Address, log *ethtypes.Log) (interface{}, error)
parse event from log
type Hooks ¶
type Hooks struct {
// contains filtered or unexported fields
}
func (Hooks) PostTxProcessing ¶
evm hooks ----------------------------------------------------------------------------------------------------- PostTxProcessing is a wrapper for calling the EVM PostTxProcessing hook on the module keeper
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.Codec, storeKey, memKey storetypes.StoreKey, stakingKeeper types.StakingKeeper, authKeeper types.AccountKeeper, bankKeeper types.BankKeeper, relayerKeeper types.RelayerKeeper, pevmKeeper types.PevmKeeper, authorityKeeper types.AuthorityKeeper, lightclientKeeper types.LightclientKeeper, ) *Keeper
func (Keeper) AddAllowedXmsgSender ¶
func (k Keeper) AddAllowedXmsgSender(goCtx context.Context, msg *types.MsgAddAllowedXmsgSender) (*types.MsgAddAllowedXmsgSenderResponse, error)
AddAllowedXmsgSender adds a list of allowed xmsg sender to the xmsg module.
func (Keeper) AddFinalizedInbound ¶
func (Keeper) BlockProof ¶
func (k Keeper) BlockProof(c context.Context, req *types.QueryBlockProofRequest) (*types.QueryBlockProofResponse, error)
func (Keeper) ChainIndex ¶
func (k Keeper) ChainIndex(c context.Context, req *types.QueryChainIndexRequest) (*types.QueryChainIndexResponse, error)
func (Keeper) CrosschainFeeParamByChainId ¶
func (k Keeper) CrosschainFeeParamByChainId(ctx context.Context, req *types.QueryCrosschainFeeParamByChainIdRequest) (*types.QueryCrosschainFeeParamByChainIdResponse, error)
CrosschainFeeParamByChainId returns the crosschain fee param for a given chain id
func (Keeper) CrosschainFeeParams ¶
func (k Keeper) CrosschainFeeParams(ctx context.Context, req *types.QueryCrosschainFeeParamsRequest) (*types.QueryCrosschainFeeParamsResponse, error)
CrosschainFeeParams returns all crosschain fee params
func (Keeper) DeductFees ¶
func (Keeper) DeleteAllowedXmsgSenders ¶
DeleteAllowedXmsgSenders removes specified allowed xmsg senders from the store
func (Keeper) DeleteBlockProof ¶
delete block proof
func (Keeper) DeleteXmsgByEventIndex ¶
GetXmsg returns a send from its index
func (Keeper) GasPrice ¶
func (k Keeper) GasPrice(c context.Context, req *types.QueryGetGasPriceRequest) (*types.QueryGasPriceResponse, error)
func (Keeper) GasPriceAll ¶
func (k Keeper) GasPriceAll(c context.Context, req *types.QueryAllGasPriceRequest) (*types.QueryGasPriceAllResponse, error)
func (Keeper) GasRechargeOperationIndex ¶
func (k Keeper) GasRechargeOperationIndex(c context.Context, req *types.QueryGasRechargeOperationIndexRequest) (*types.QueryGasRechargeOperationIndexResponse, error)
GasRechargeOperationIndex queries the gas token increment index
func (Keeper) GetAllCrosschainEventFees ¶
GetAllCrosschainEventFees retrieves all CrosschainEventFee objects stored in the KVStore
func (Keeper) GetAllFinalizedInbound ¶
func (Keeper) GetAllGasPrice ¶
GetAllGasPrice returns all gasPrice
func (Keeper) GetAllInTxHashToXmsg ¶
func (k Keeper) GetAllInTxHashToXmsg(ctx sdk.Context) (list []types.InTxHashToXmsg)
GetAllInTxHashToXmsg returns all inTxHashToXmsg
func (Keeper) GetAllInTxTracker ¶
func (k Keeper) GetAllInTxTracker(ctx sdk.Context) (inTxTrackers []types.InTxTracker)
func (Keeper) GetAllInTxTrackerForChain ¶
func (Keeper) GetAllInTxTrackerForChainPaginated ¶
func (k Keeper) GetAllInTxTrackerForChainPaginated(ctx sdk.Context, chainID int64, pagination *query.PageRequest) (inTxTrackers []types.InTxTracker, pageRes *query.PageResponse, err error)
func (Keeper) GetAllInTxTrackerPaginated ¶
func (k Keeper) GetAllInTxTrackerPaginated(ctx sdk.Context, pagination *query.PageRequest) (inTxTrackers []types.InTxTracker, pageRes *query.PageResponse, err error)
func (Keeper) GetAllLastBlockHeight ¶
func (k Keeper) GetAllLastBlockHeight(ctx sdk.Context) (list []types.LastBlockHeight)
GetAllLastBlockHeight returns all lastBlockHeight
func (Keeper) GetAllOutTxTracker ¶
func (k Keeper) GetAllOutTxTracker(ctx sdk.Context) (list []types.OutTxTracker)
GetAllOutTxTracker returns all outTxTracker
func (Keeper) GetAllowedXmsgSenders ¶
GetAllowedXmsgSenders retrieves the list of allowed xmsg senders from the store
func (Keeper) GetAuthKeeper ¶
func (k Keeper) GetAuthKeeper() types.AccountKeeper
func (Keeper) GetAuthorityKeeper ¶
func (k Keeper) GetAuthorityKeeper() types.AuthorityKeeper
func (Keeper) GetBankKeeper ¶
func (k Keeper) GetBankKeeper() types.BankKeeper
func (Keeper) GetBlockProof ¶
func (k Keeper) GetBlockProof(ctx sdk.Context, chainId, height uint64) (val types.BlockProof, exist bool)
get block proof from chainId
func (Keeper) GetChainIndex ¶
get chain index from local store if not exist. it will try to sync from observer chainParam
func (Keeper) GetCrosschainEventFee ¶
func (k Keeper) GetCrosschainEventFee(ctx sdk.Context, chainId int64) (types.CrosschainFeeParam, bool)
GetCrosschainEventFee retrieves a CrosschainEventFee object from the KVStore by chainId
func (Keeper) GetEventStatusNode ¶
func (k Keeper) GetEventStatusNode(ctx sdk.Context, index string) (val types.EventStatusNode, found bool)
GetXmsg returns a send from its index
func (Keeper) GetGasPrice ¶
GetGasPrice returns a gasPrice from its index
func (Keeper) GetGasRechargeOperationIndex ¶
func (Keeper) GetInTxHashToXmsg ¶
func (k Keeper) GetInTxHashToXmsg( ctx sdk.Context, inTxHash string, ) (val types.InTxHashToXmsg, found bool)
GetInTxHashToXmsg returns a inTxHashToXmsg from its index
func (Keeper) GetInTxTracker ¶
func (k Keeper) GetInTxTracker(ctx sdk.Context, chainID int64, txHash string) (val types.InTxTracker, found bool)
GetInTxTracker returns a InTxTracker from its index
func (Keeper) GetLastBlockHeight ¶
func (k Keeper) GetLastBlockHeight(ctx sdk.Context, index string) (val types.LastBlockHeight, found bool)
GetLastBlockHeight returns a lastBlockHeight from its index
func (Keeper) GetLightclientKeeper ¶
func (k Keeper) GetLightclientKeeper() types.LightclientKeeper
func (Keeper) GetMedianGasPriceInUint ¶
func (Keeper) GetMemKey ¶
func (k Keeper) GetMemKey() storetypes.StoreKey
func (Keeper) GetOutTxTracker ¶
func (k Keeper) GetOutTxTracker( ctx sdk.Context, chainID int64, nonce uint64, ) (val types.OutTxTracker, found bool)
GetOutTxTracker returns a outTxTracker from its index
func (Keeper) GetPellRechargeOperationIndex ¶
func (Keeper) GetPevmKeeper ¶
func (k Keeper) GetPevmKeeper() types.PevmKeeper
func (Keeper) GetRateLimiterAssetRateList ¶
func (k Keeper) GetRateLimiterAssetRateList( ctx sdk.Context, ) (flags types.RateLimiterFlags, found bool)
GetRateLimiterAssetRateList returns a list of all foreign asset rate
func (Keeper) GetRateLimiterFlags ¶
GetRateLimiterFlags returns the rate limiter flags
func (Keeper) GetRelayerKeeper ¶
func (k Keeper) GetRelayerKeeper() types.RelayerKeeper
func (Keeper) GetRevertGasLimit ¶
GetRevertGasLimit returns the gas limit for the revert transaction in a Xmsg It returns 0 if there is no error but the gas limit can't be determined from the Xmsg data
func (Keeper) GetStakingKeeper ¶
func (k Keeper) GetStakingKeeper() types.StakingKeeper
func (Keeper) GetStoreKey ¶
func (k Keeper) GetStoreKey() storetypes.StoreKey
func (Keeper) GetXmsgByEventIndex ¶
func (k Keeper) GetXmsgByEventIndex(ctx sdk.Context, eventIndex string) (val types.Xmsg, found bool)
GetXmsg returns a send from its index
func (Keeper) HandleEVMEvents ¶
HandleEVMEvents handles all events from an inbound tx returns (isContractReverted, err) (true, non-nil) means CallEVM() reverted
func (Keeper) InTxHashToXmsg ¶
func (k Keeper) InTxHashToXmsg(c context.Context, req *types.QueryGetInTxHashToXmsgRequest) (*types.QueryInTxHashToXmsgResponse, error)
func (Keeper) InTxHashToXmsgAll ¶
func (k Keeper) InTxHashToXmsgAll(c context.Context, req *types.QueryAllInTxHashToXmsgRequest) (*types.QueryInTxHashToXmsgAllResponse, error)
func (Keeper) InTxHashToXmsgData ¶
func (k Keeper) InTxHashToXmsgData( c context.Context, req *types.QueryInTxHashToXmsgDataRequest, ) (*types.QueryInTxHashToXmsgDataResponse, error)
InTxHashToXmsgData queries the data of all xmsgs indexed by a in tx hash
func (Keeper) InTxTrackerAll ¶
func (k Keeper) InTxTrackerAll(goCtx context.Context, req *types.QueryAllInTxTrackersRequest) (*types.QueryInTxTrackerAllResponse, error)
func (Keeper) InTxTrackerAllByChain ¶
func (k Keeper) InTxTrackerAllByChain(goCtx context.Context, request *types.QueryAllInTxTrackerByChainRequest) (*types.QueryInTxTrackerAllByChainResponse, error)
func (Keeper) IsAllowedXmsgSender ¶
IsAllowedXmsgSender checks if the given allowed xmsg sender is in the list of registered allowed xmsg senders.
func (Keeper) IsFinalizedInbound ¶
func (Keeper) IsGasRechargeOperationIndexFinalized ¶
func (Keeper) IsPellRechargeOperationIndexFinalized ¶
func (Keeper) IterateAndUpdateXmsgGasPrice ¶
func (k Keeper) IterateAndUpdateXmsgGasPrice( ctx sdk.Context, chains []*pellchains.Chain, updateFunc CheckAndUpdateXmsgGasPriceFunc, ) (int, relayertypes.GasPriceIncreaseFlags)
IterateAndUpdateXmsgGasPrice iterates through all xmsg and updates the gas price if pending for too long The function returns the number of xmsgs updated and the gas price increase flags used
func (Keeper) LastBlockHeight ¶
func (k Keeper) LastBlockHeight(c context.Context, req *types.QueryGetLastBlockHeightRequest) (*types.QueryLastBlockHeightResponse, error)
func (Keeper) LastBlockHeightAll ¶
func (k Keeper) LastBlockHeightAll(c context.Context, req *types.QueryAllLastBlockHeightRequest) (*types.QueryLastBlockHeightAllResponse, error)
func (Keeper) LastPellHeight ¶
func (k Keeper) LastPellHeight(goCtx context.Context, req *types.QueryLastPellHeightRequest) (*types.QueryLastPellHeightResponse, error)
func (Keeper) ListAllowedXmsgSenders ¶
func (k Keeper) ListAllowedXmsgSenders(ctx context.Context, req *types.QueryListAllowedXmsgSendersRequest) (*types.QueryListAllowedXmsgSendersResponse, error)
ListXmsgBuilders returns a list of authorized Xmsg builder addresses. It retrieves the list of builders from the keeper and returns them in the response. This function is used to query the current set of authorized Xmsg builders in the system.
func (Keeper) ListPendingXmsg ¶
func (k Keeper) ListPendingXmsg(c context.Context, req *types.QueryListPendingXmsgRequest) (*types.QueryListPendingXmsgResponse, error)
ListPendingXmsg returns a list of pending xmsgs and the total number of pending xmsgs a limit for the number of xmsgs to return can be specified or the default is MaxPendingXmsgs
func (Keeper) ListPendingXmsgWithinRateLimit ¶
func (k Keeper) ListPendingXmsgWithinRateLimit(c context.Context, req *types.QueryListPendingXmsgWithinRateLimitRequest) (res *types.QueryListPendingXmsgWithinRateLimitResponse, err error)
ListPendingXmsgWithinRateLimit returns a list of pending cctxs that do not exceed the outbound rate limit a limit for the number of cctxs to return can be specified or the default is MaxPendingXmsgs
func (Keeper) MigrateTSSFundsForChain ¶
func (Keeper) OutTxTracker ¶
func (k Keeper) OutTxTracker(c context.Context, req *types.QueryGetOutTxTrackerRequest) (*types.QueryOutTxTrackerResponse, error)
func (Keeper) OutTxTrackerAll ¶
func (k Keeper) OutTxTrackerAll(c context.Context, req *types.QueryAllOutTxTrackerRequest) (*types.QueryOutTxTrackerAllResponse, error)
func (Keeper) OutTxTrackerAllByChain ¶
func (k Keeper) OutTxTrackerAllByChain(c context.Context, req *types.QueryAllOutTxTrackerByChainRequest) (*types.QueryOutTxTrackerAllByChainResponse, error)
func (Keeper) PayGasAndUpdateXmsg ¶
PayGasAndUpdateXmsg updates the outbound tx with the new amount after paying the gas fee **Caller should feed temporary ctx into this function** chainID is the outbound chain chain id , this can be receiver chain for regular transactions and sender-chain to reverted transactions
func (Keeper) PayNativeGasAndUpdateXmsg ¶
func (k Keeper) PayNativeGasAndUpdateXmsg( ctx sdk.Context, chainID int64, xmsg *types.Xmsg, ) error
PayGasNativeAndUpdateXmsg updates the outbound tx with the new amount subtracting the gas fee **Caller should feed temporary ctx into this function**
func (Keeper) PellRechargeOperationIndex ¶
func (k Keeper) PellRechargeOperationIndex(c context.Context, req *types.QueryPellRechargeOperationIndexRequest) (*types.QueryPellRechargeOperationIndexResponse, error)
PellRechargeOperationIndex queries the pell token increment index
func (Keeper) ProcessFailedOutbound ¶
This function sets Xmsg status , in cases where the outbound tx is successful, but tx itself fails This is done because SaveSuccessfulOutbound does not set the xmsg status For cases where the outbound tx is unsuccessful, the xmsg status is automatically set to Aborted in the ProcessFailedOutbound function, so we can just return and error to trigger that
func (Keeper) ProcessInbound ¶
ProcessInbound processes the inbound Xmsg. It does a conditional dispatch to ProcessPEVMDeposit or ProcessCrosschainMsgPassing based on the receiver chain. The internal functions handle the state changes and error handling.
func (Keeper) ProcessOutbound ¶
func (k Keeper) ProcessOutbound(ctx sdk.Context, xmsg *types.Xmsg, ballotStatus relayertypes.BallotStatus) error
ProcessOutbound processes the finalization of an outbound transaction based on the ballot status The state is committed only if the individual steps are successful
func (Keeper) ProcessPellSentEvent ¶
func (k Keeper) ProcessPellSentEvent( ctx sdk.Context, event *pellconnector.PellConnectorPellSent, emittingContract ethcommon.Address, txOrigin string, tss relayertypes.TSS, ) error
ProcessPellSentEvent creates a new Xmsg to process the pellsent event error indicates system error and non-recoverable; should abort
event PellSent(
address sourceTxOriginAddress, address indexed pellTxSenderAddress, uint256 indexed destinationChainId, bytes destinationAddress, bytes message, bytes pellParams );
func (Keeper) ProcessSuccessfulOutbound ¶
func (Keeper) ProcessXmsg ¶
func (Keeper) RateLimiterFlags ¶
func (k Keeper) RateLimiterFlags(c context.Context, req *types.QueryRateLimiterFlagsRequest) (*types.QueryRateLimiterFlagsResponse, error)
RateLimiterFlags queries the rate limiter flags
func (Keeper) RateLimiterInput ¶
func (k Keeper) RateLimiterInput( c context.Context, req *types.QueryRateLimiterInputRequest, ) (res *types.QueryRateLimiterInputResponse, err error)
RateLimiterInput collects the input data for the rate limiter
func (Keeper) RemoveAllowedXmsgSender ¶
func (k Keeper) RemoveAllowedXmsgSender(goCtx context.Context, msg *types.MsgRemoveAllowedXmsgSender) (*types.MsgRemoveAllowedXmsgSenderResponse, error)
RemoveAllowedXmsgSender removes a list of allowed xmsg sender from the xmsg module.
func (Keeper) RemoveGasPrice ¶
RemoveGasPrice removes a gasPrice from the store
func (Keeper) RemoveInTxHashToXmsg ¶
RemoveInTxHashToXmsg removes a inTxHashToXmsg from the store
func (Keeper) RemoveInTxTrackerIfExists ¶
func (Keeper) RemoveLastBlockHeight ¶
RemoveLastBlockHeight removes a lastBlockHeight from the store
func (Keeper) RemoveOutTxTracker ¶
RemoveOutTxTracker removes a outTxTracker from the store
func (Keeper) RemoveXmsg ¶
RemoveXmsg removes a send from the store
func (Keeper) ResetGasMeterAndConsumeGas ¶
ResetGasMeterAndConsumeGas reset first the gas meter consumed value to zero and set it back to the new value 'gasUsed'
func (Keeper) SaveAllowedXmsgSenders ¶
SaveAllowedXmsgSenders saves a list of allowed xmsg senders to the store If no senders exist, it creates a new entry If senders already exist, it appends the new senders to the existing list
func (Keeper) SaveFailedOutbound ¶
func (Keeper) SaveInbound ¶
func (Keeper) SaveOutbound ¶
SaveOutbound saves the outbound transaction.It does the following things in one function:
Set the ballot index for the outbound vote to the xmsg
Remove the nonce from the pending nonces
Remove the outbound tx tracker
Set the xmsg and nonce to xmsg and inTxHash to xmsg
func (Keeper) SaveSuccessfulOutbound ¶
SaveSuccessfulOutbound saves a successful outbound transaction. This function does not set the Xmsg status, therefore all successful outbound transactions need to have their status set during processing
func (Keeper) SetBlockProof ¶
func (k Keeper) SetBlockProof(ctx sdk.Context, blockProof *types.BlockProof)
store block proof
func (Keeper) SetChainIndex ¶
store chain index
func (Keeper) SetEventStatusNode ¶
SetXmsg set a specific send in the store from its index
func (Keeper) SetFinalizedInbound ¶
func (Keeper) SetGasPrice ¶
SetGasPrice set a specific gasPrice in the store from its index
func (Keeper) SetGasRechargeOperationIndex ¶
func (Keeper) SetInTxHashToXmsg ¶
func (k Keeper) SetInTxHashToXmsg(ctx sdk.Context, inTxHashToXmsg types.InTxHashToXmsg)
SetInTxHashToXmsg set a specific inTxHashToXmsg in the store from its index
func (Keeper) SetInTxTracker ¶
func (k Keeper) SetInTxTracker(ctx sdk.Context, InTxTracker types.InTxTracker)
SetInTxTracker set a specific InTxTracker in the store from its index
func (*Keeper) SetInternalEventHooks ¶
func (k *Keeper) SetInternalEventHooks(hooks ...types.InternalEventLogHooks) *Keeper
func (Keeper) SetLastBlockHeight ¶
func (k Keeper) SetLastBlockHeight(ctx sdk.Context, lastBlockHeight types.LastBlockHeight)
SetLastBlockHeight set a specific lastBlockHeight in the store from its index
func (Keeper) SetOutTxTracker ¶
func (k Keeper) SetOutTxTracker(ctx sdk.Context, outTxTracker types.OutTxTracker)
SetOutTxTracker set a specific outTxTracker in the store from its index
func (Keeper) SetPellRechargeOperationIndex ¶
func (Keeper) SetRateLimiterFlags ¶
func (k Keeper) SetRateLimiterFlags(ctx sdk.Context, rateLimiterFlags types.RateLimiterFlags)
SetRateLimiterFlags set the rate limiter flags in the store
func (Keeper) SetXmsgAndNonceToXmsgAndInTxHashToXmsg ¶
SetXmsgAndNonceToXmsgAndInTxHashToXmsg does the following things in one function: 1. set the xmsg in the store 2. set the mapping inTxHash -> xmsgIndex , one inTxHash can be connected to multiple xmsgindex 3. set the mapping nonce => xmsg 4. update the pell accounting
func (Keeper) SetXmsgByEventIndex ¶
SetXmsg set a specific send in the store from its index
func (*Keeper) SetXmsgResultHooks ¶
func (k *Keeper) SetXmsgResultHooks(hooks ...types.XmsgOutboundResultHook) *Keeper
func (Keeper) StoreCrosschainEventFee ¶
func (k Keeper) StoreCrosschainEventFee(ctx sdk.Context, crosschainEventFee types.CrosschainFeeParam)
StoreCrosschainEventFee stores a CrosschainEventFee object in the KVStore using chainId as the key
func (Keeper) UpdateNonce ¶
UpdateNonce sets the Xmsg outbound nonce to the next nonce, and updates the nonce of blockchain state. It also updates the PendingNonces that is used to track the unfulfilled outbound txs.
func (Keeper) UpsertCrosschainFeeParams ¶
func (k Keeper) UpsertCrosschainFeeParams(goctx context.Context, msg *types.MsgUpsertCrosschainFeeParams) (*types.MsgUpsertCrosschainFeeParamsResponse, error)
UpsertCrosschainFeeParams upserts crosschain fee params
func (Keeper) ValidateOutboundMessage ¶
func (Keeper) Xmsg ¶
func (k Keeper) Xmsg(c context.Context, req *types.QueryGetXmsgRequest) (*types.QueryXmsgResponse, error)
func (Keeper) XmsgAll ¶
func (k Keeper) XmsgAll(c context.Context, req *types.QueryAllXmsgRequest) (*types.QueryXmsgAllResponse, error)
func (Keeper) XmsgByNonce ¶
func (k Keeper) XmsgByNonce(c context.Context, req *types.QueryGetXmsgByNonceRequest) (*types.QueryXmsgByNonceResponse, error)
Source Files
¶
- abci.go
- allowed_xmsg_sender.go
- chain_index.go
- connector_handler.go
- events.go
- evm_deposit.go
- evm_hook.go
- evm_logs.go
- finalized_inbounds.go
- gas_payment.go
- gas_price.go
- gas_recharge_operation_index.go
- grpc_query.go
- grpc_query_block_proof.go
- grpc_query_chain_index.go
- grpc_query_crosschain_event_fee.go
- grpc_query_gas_price.go
- grpc_query_gas_recharge_operation_index.go
- grpc_query_in_tx_hash_to_xmsg.go
- grpc_query_in_tx_tracker.go
- grpc_query_last_block_height.go
- grpc_query_last_pell_height.go
- grpc_query_out_tx_tracker.go
- grpc_query_pell_recharge_operation_index.go
- grpc_query_rate_limiter_flags.go
- grpc_query_xmsg.go
- grpc_query_xmsg_builder.go
- grpc_query_xmsg_rate_limit.go
- in_tx_hash_to_xmsg.go
- in_tx_tracker.go
- keeper.go
- last_block_height.go
- migrator.go
- msg_server.go
- msg_server_abort_stuck_xmsg.go
- msg_server_add_to_intx_tracker.go
- msg_server_add_to_outtx_tracker.go
- msg_server_admin_maintaince.go
- msg_server_allowed_xmsg_sender.go
- msg_server_backfill_inbound_tx.go
- msg_server_migrate_tss_funds.go
- msg_server_remove_out_tx_tracker.go
- msg_server_update_rate_limiter_flags.go
- msg_server_update_tss.go
- msg_server_upsert_crosschain_event_fee.go
- msg_server_vote_gas_price.go
- msg_server_vote_inbound_block.go
- msg_server_vote_inbound_tx.go
- msg_server_vote_on_recharge_gas.go
- msg_server_vote_on_recharge_pell.go
- msg_server_vote_outbound_tx.go
- out_tx_tracker.go
- pell_recharge_operation_index.go
- process_inbound.go
- processs_outbound.go
- rate_limiter_flags.go
- store_crosschain_event_fee.go
- xmsg.go
- xmsg_utils.go