Documentation ¶
Index ¶
- Constants
- Variables
- type BBCClient
- type BBCExecutor
- func (executor *BBCExecutor) FindValidatorSetChangeHeight(start, end int64, startValidatorHash, endValidatorHash cmn.HexBytes) (height int64, err error)
- func (executor *BBCExecutor) GetClient() *rpc.HTTP
- func (executor *BBCExecutor) GetInitConsensusState(height int64) (*common.ConsensusState, error)
- func (executor *BBCExecutor) GetLatestBlockHeight(client rpc.Client) (int64, error)
- func (executor *BBCExecutor) GetNextSequence(channelID common.CrossChainChannelID, height int64) (uint64, error)
- func (executor *BBCExecutor) MonitorCrossChainPackage(height int64, preValidatorsHash cmn.HexBytes) (*common.TaskSet, cmn.HexBytes, error)
- func (executor *BBCExecutor) MonitorValidatorSetChange(height int64, preValidatorsHash cmn.HexBytes) (bool, cmn.HexBytes, error)
- func (executor *BBCExecutor) QueryKeyWithProof(key []byte, height int64) (int64, []byte, []byte, []byte, error)
- func (executor *BBCExecutor) QueryTendermintHeader(height int64) (*common.Header, error)
- func (executor *BBCExecutor) SubmitEvidence(headers []*bsc.Header) (*coretypes.ResultBroadcastTx, error)
- func (executor *BBCExecutor) SwitchBCClient()
- func (executor *BBCExecutor) UpdateClients()
- func (executor *BBCExecutor) VerifyValidatorSetChangeAtHeight(height int64) error
- type BSCClient
- type BSCExecutor
- func (executor *BSCExecutor) BatchRelayCrossChainPackages(channelID relayercommon.CrossChainChannelID, ...) ([]common.Hash, error)
- func (executor *BSCExecutor) CallBuildInSystemContract(channelID relayercommon.CrossChainChannelID, height, sequence uint64, ...) (common.Hash, error)
- func (executor *BSCExecutor) ClaimReward() (common.Hash, error)
- func (executor *BSCExecutor) GetClient() *ethclient.Client
- func (executor *BSCExecutor) GetLatestBlockHeight(client *ethclient.Client) (int64, error)
- func (executor *BSCExecutor) GetLightClientLatestHeight() (uint64, error)
- func (executor *BSCExecutor) GetNextSequence(channelID relayercommon.CrossChainChannelID) (uint64, error)
- func (executor *BSCExecutor) GetPackage(channelID relayercommon.CrossChainChannelID, sequence, height uint64) ([]byte, []byte, error)
- func (executor *BSCExecutor) GetRelayerBalance() (*big.Int, error)
- func (executor *BSCExecutor) GetTxRecipient(txHash common.Hash) (*types.Receipt, error)
- func (executor *BSCExecutor) IsRelayer() (bool, error)
- func (executor *BSCExecutor) QueryReward() (*big.Int, error)
- func (executor *BSCExecutor) RegisterRelayer() (common.Hash, error)
- func (executor *BSCExecutor) RelayCrossChainPackage(channelID relayercommon.CrossChainChannelID, sequence, height uint64) (common.Hash, error)
- func (executor *BSCExecutor) SwitchBSCClient()
- func (executor *BSCExecutor) SyncTendermintLightClientHeader(height uint64) (common.Hash, error)
- func (executor *BSCExecutor) UpdateClients()
Constants ¶
View Source
const ( CrossChainPackageEventType = "IBCPackage" CorssChainPackageInfoAttributeKey = "IBCPackageInfo" CorssChainPackageInfoAttributeValue = "%d" + separator + "%d" + separator + "%d" // destChainID channelID sequence DefaultGasPrice = 20000000000 // 20 GWei FallBehindThreshold = 5 SleepSecondForUpdateClient = 10 DataSeedDenyServiceThreshold = 60 )
Variables ¶
View Source
var (
PureHeaderSyncChannelID relayercommon.CrossChainChannelID = -1
)
Functions ¶
This section is empty.
Types ¶
type BBCExecutor ¶
type BBCExecutor struct { BBCClients []*BBCClient Config *config.Config // contains filtered or unexported fields }
func NewBBCExecutor ¶
func NewBBCExecutor(cfg *config.Config, networkType ctypes.ChainNetwork) (*BBCExecutor, error)
func (*BBCExecutor) FindValidatorSetChangeHeight ¶
func (*BBCExecutor) GetClient ¶
func (executor *BBCExecutor) GetClient() *rpc.HTTP
func (*BBCExecutor) GetInitConsensusState ¶
func (executor *BBCExecutor) GetInitConsensusState(height int64) (*common.ConsensusState, error)
func (*BBCExecutor) GetLatestBlockHeight ¶
func (executor *BBCExecutor) GetLatestBlockHeight(client rpc.Client) (int64, error)
func (*BBCExecutor) GetNextSequence ¶
func (executor *BBCExecutor) GetNextSequence(channelID common.CrossChainChannelID, height int64) (uint64, error)
func (*BBCExecutor) MonitorCrossChainPackage ¶
func (*BBCExecutor) MonitorValidatorSetChange ¶
func (*BBCExecutor) QueryKeyWithProof ¶
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)
func (*BBCExecutor) SwitchBCClient ¶
func (executor *BBCExecutor) SwitchBCClient()
func (*BBCExecutor) UpdateClients ¶
func (executor *BBCExecutor) UpdateClients()
func (*BBCExecutor) VerifyValidatorSetChangeAtHeight ¶
func (executor *BBCExecutor) VerifyValidatorSetChangeAtHeight(height int64) 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, nonce uint64) (common.Hash, error)
func (*BSCExecutor) ClaimReward ¶
func (executor *BSCExecutor) ClaimReward() (common.Hash, error)
func (*BSCExecutor) GetClient ¶
func (executor *BSCExecutor) GetClient() *ethclient.Client
func (*BSCExecutor) GetLatestBlockHeight ¶
func (executor *BSCExecutor) GetLatestBlockHeight(client *ethclient.Client) (int64, error)
func (*BSCExecutor) GetLightClientLatestHeight ¶
func (executor *BSCExecutor) GetLightClientLatestHeight() (uint64, error)
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 (*BSCExecutor) IsRelayer ¶
func (executor *BSCExecutor) IsRelayer() (bool, error)
func (*BSCExecutor) QueryReward ¶
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) SwitchBSCClient ¶
func (executor *BSCExecutor) SwitchBSCClient()
func (*BSCExecutor) SyncTendermintLightClientHeader ¶
func (executor *BSCExecutor) SyncTendermintLightClientHeader(height uint64) (common.Hash, error)
func (*BSCExecutor) UpdateClients ¶
func (executor *BSCExecutor) UpdateClients()
Click to show internal directories.
Click to hide internal directories.