executor

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2021 License: LGPL-3.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CrossChainPackageEventType          = "IBCPackage"
	CorssChainPackageInfoAttributeKey   = "IBCPackageInfo"
	CorssChainPackageInfoAttributeValue = "%d" + separator + "%d" + separator + "%d" // destChainID channelID sequence

	DefaultGasPrice = 20000000000 // 20 GWei
)

Variables

View Source
var (
	PureHeaderSyncChannelID relayercommon.CrossChainChannelID = -1
)

Functions

This section is empty.

Types

type BBCExecutor

type BBCExecutor struct {
	RpcClients []*rpc.HTTP
	Config     *config.Config
	// contains filtered or unexported fields
}

func NewBBCExecutor

func NewBBCExecutor(cfg *config.Config, networkType ctypes.ChainNetwork) (*BBCExecutor, error)

func (*BBCExecutor) GetClient added in v1.1.0

func (executor *BBCExecutor) GetClient() *rpc.HTTP

func (*BBCExecutor) GetInitConsensusState

func (executor *BBCExecutor) GetInitConsensusState(height int64) (*common.ConsensusState, error)

func (*BBCExecutor) GetNextSequence

func (executor *BBCExecutor) GetNextSequence(channelID common.CrossChainChannelID, height int64) (uint64, error)

func (*BBCExecutor) MonitorCrossChainPackage

func (executor *BBCExecutor) MonitorCrossChainPackage(height int64, preValidatorsHash cmn.HexBytes) (*common.TaskSet, cmn.HexBytes, error)

func (*BBCExecutor) MonitorValidatorSetChange

func (executor *BBCExecutor) MonitorValidatorSetChange(height int64, preValidatorsHash cmn.HexBytes) (bool, cmn.HexBytes, error)

func (*BBCExecutor) QueryKeyWithProof

func (executor *BBCExecutor) QueryKeyWithProof(key []byte, height int64) (int64, []byte, []byte, []byte, error)

func (*BBCExecutor) QueryTendermintHeader

func (executor *BBCExecutor) QueryTendermintHeader(height int64) (*common.Header, error)

func (*BBCExecutor) SubmitEvidence

func (executor *BBCExecutor) SubmitEvidence(headers []*bsc.Header) (*coretypes.ResultBroadcastTx, error)

type BSCExecutor

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

func NewBSCExecutor

func NewBSCExecutor(db *gorm.DB, bbcExecutor *BBCExecutor, cfg *config.Config) (*BSCExecutor, error)

func (*BSCExecutor) BatchRelayCrossChainPackages

func (executor *BSCExecutor) BatchRelayCrossChainPackages(channelID relayercommon.CrossChainChannelID, startSequence, endSequence, height uint64) ([]common.Hash, error)

func (*BSCExecutor) CallBuildInSystemContract

func (executor *BSCExecutor) CallBuildInSystemContract(channelID relayercommon.CrossChainChannelID, height, sequence uint64, msgBytes, proofBytes []byte) (common.Hash, error)

func (*BSCExecutor) ClaimReward added in v1.1.0

func (executor *BSCExecutor) ClaimReward() (common.Hash, error)

func (*BSCExecutor) GetClient added in v1.1.0

func (executor *BSCExecutor) GetClient() *ethclient.Client

func (*BSCExecutor) GetNextSequence

func (executor *BSCExecutor) GetNextSequence(channelID relayercommon.CrossChainChannelID) (uint64, error)

func (*BSCExecutor) GetPackage

func (executor *BSCExecutor) GetPackage(channelID relayercommon.CrossChainChannelID, sequence, height uint64) ([]byte, []byte, error)

func (*BSCExecutor) GetRelayerBalance

func (executor *BSCExecutor) GetRelayerBalance() (*big.Int, error)

func (*BSCExecutor) GetTxRecipient

func (executor *BSCExecutor) GetTxRecipient(txHash common.Hash) (*types.Receipt, error)

func (*BSCExecutor) IsRelayer

func (executor *BSCExecutor) IsRelayer() (bool, error)

func (*BSCExecutor) QueryReward added in v1.1.0

func (executor *BSCExecutor) QueryReward() (*big.Int, error)

func (*BSCExecutor) RegisterRelayer

func (executor *BSCExecutor) RegisterRelayer() (common.Hash, error)

func (*BSCExecutor) RelayCrossChainPackage

func (executor *BSCExecutor) RelayCrossChainPackage(channelID relayercommon.CrossChainChannelID, sequence, height uint64) (common.Hash, error)

func (*BSCExecutor) SyncTendermintLightClientHeader

func (executor *BSCExecutor) SyncTendermintLightClientHeader(height uint64) (common.Hash, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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