Documentation ¶
Index ¶
- Constants
- func Cdc() *codec.ProtoCodec
- func HexToEthSecp256k1PrivKey(hexString string) (*ethsecp256k1.PrivKey, error)
- func InitExecutors() (*BSCExecutor, *GreenfieldExecutor)
- func InitTestConfig() *config.Config
- func NewRpcClient(addr string) *http.HTTP
- type BSCClient
- type BSCExecutor
- func (e *BSCExecutor) CallBuildInSystemContract(blsSignature []byte, validatorSet *big.Int, msgBytes []byte) (common.Hash, error)
- func (e *BSCExecutor) GetBlockHeaderAtHeight(height uint64) (*types.Header, error)
- func (e *BSCExecutor) GetLatestBlockHeightWithRetry() (latestHeight uint64, err error)
- func (e *BSCExecutor) GetLightClientLatestHeight() (uint64, error)
- func (e *BSCExecutor) GetNextDeliveryOracleSequence() (uint64, error)
- func (e *BSCExecutor) GetNextReceiveSequenceForChannel(channelID rtypes.ChannelId) (uint64, error)
- func (e *BSCExecutor) GetRpcClient() *ethclient.Client
- func (e *BSCExecutor) GetValidatorsBlsPublicKey() ([]string, error)
- func (e *BSCExecutor) QueryCachedLatestValidators() ([]rtypes.Validator, error)
- func (e *BSCExecutor) QueryLatestTendermintHeaderWithRetry() (lightBlock []byte, err error)
- func (e *BSCExecutor) QueryLatestValidators() ([]rtypes.Validator, error)
- func (e *BSCExecutor) QueryTendermintLightBlockWithRetry(height int64) (lightBlock []byte, err error)
- func (e *BSCExecutor) SetGreenfieldExecutor(ge *GreenfieldExecutor)
- func (e *BSCExecutor) SwitchClient()
- func (e *BSCExecutor) SyncTendermintLightBlock(height uint64) (common.Hash, error)
- func (e *BSCExecutor) UpdateCachedLatestValidatorsLoop()
- func (e *BSCExecutor) UpdateClientLoop()
- type GreenfieldClient
- type GreenfieldExecutor
- func (e *GreenfieldExecutor) ClaimPackages(payloadBts []byte, aggregatedSig []byte, voteAddressSet []uint64, ...) (string, error)
- func (e *GreenfieldExecutor) GetAccount(address string) (authtypes.AccountI, error)
- func (e *GreenfieldExecutor) GetBlockAtHeight(height int64) (*tmtypes.Block, error)
- func (e *GreenfieldExecutor) GetBlockResultAtHeight(height int64) (*ctypes.ResultBlockResults, error)
- func (e *GreenfieldExecutor) GetLatestBlockHeightWithRetry() (latestHeight uint64, err error)
- func (e *GreenfieldExecutor) GetNextDeliverySequenceForChannel(channelID types.ChannelId) (uint64, error)
- func (e *GreenfieldExecutor) GetNextReceiveOracleSequence() (uint64, error)
- func (e *GreenfieldExecutor) GetNextReceiveSequenceForChannel(channelId types.ChannelId) (uint64, error)
- func (e *GreenfieldExecutor) GetValidatorsBlsPublicKey() ([]string, error)
- func (e *GreenfieldExecutor) QueryCachedLatestValidators() ([]*tmtypes.Validator, error)
- func (e *GreenfieldExecutor) QueryTendermintLightBlock(height int64) ([]byte, error)
- func (e *GreenfieldExecutor) QueryValidatorsAtHeight(height uint64) ([]*tmtypes.Validator, error)
- func (e *GreenfieldExecutor) SetBSCExecutor(be *BSCExecutor)
- func (e *GreenfieldExecutor) UpdateCachedLatestValidatorsLoop()
- func (e *GreenfieldExecutor) UpdateClientLoop()
Constants ¶
View Source
const ( DefaultGasPrice = 20000000000 // 20 GWei FallBehindThreshold = 5 SleepSecondForUpdateClient = 10 DataSeedDenyServiceThreshold = 60 RPCTimeout = 3 * time.Second RelayerBytesLength = 48 UpdateCachedValidatorsInterval = 1 * time.Minute )
Variables ¶
This section is empty.
Functions ¶
func Cdc ¶
func Cdc() *codec.ProtoCodec
func HexToEthSecp256k1PrivKey ¶
func HexToEthSecp256k1PrivKey(hexString string) (*ethsecp256k1.PrivKey, error)
func InitExecutors ¶
func InitExecutors() (*BSCExecutor, *GreenfieldExecutor)
func InitTestConfig ¶
func NewRpcClient ¶
Types ¶
type BSCExecutor ¶
type BSCExecutor struct { GreenfieldExecutor *GreenfieldExecutor // contains filtered or unexported fields }
func NewBSCExecutor ¶
func NewBSCExecutor(cfg *config.Config) *BSCExecutor
func (*BSCExecutor) CallBuildInSystemContract ¶
func (*BSCExecutor) GetBlockHeaderAtHeight ¶
func (e *BSCExecutor) GetBlockHeaderAtHeight(height uint64) (*types.Header, error)
func (*BSCExecutor) GetLatestBlockHeightWithRetry ¶
func (e *BSCExecutor) GetLatestBlockHeightWithRetry() (latestHeight uint64, err error)
func (*BSCExecutor) GetLightClientLatestHeight ¶
func (e *BSCExecutor) GetLightClientLatestHeight() (uint64, error)
func (*BSCExecutor) GetNextDeliveryOracleSequence ¶
func (e *BSCExecutor) GetNextDeliveryOracleSequence() (uint64, error)
func (*BSCExecutor) GetNextReceiveSequenceForChannel ¶
func (e *BSCExecutor) GetNextReceiveSequenceForChannel(channelID rtypes.ChannelId) (uint64, error)
func (*BSCExecutor) GetRpcClient ¶
func (e *BSCExecutor) GetRpcClient() *ethclient.Client
func (*BSCExecutor) GetValidatorsBlsPublicKey ¶
func (e *BSCExecutor) GetValidatorsBlsPublicKey() ([]string, error)
func (*BSCExecutor) QueryCachedLatestValidators ¶
func (e *BSCExecutor) QueryCachedLatestValidators() ([]rtypes.Validator, error)
Used for gnfd -> bsc
func (*BSCExecutor) QueryLatestTendermintHeaderWithRetry ¶
func (e *BSCExecutor) QueryLatestTendermintHeaderWithRetry() (lightBlock []byte, err error)
func (*BSCExecutor) QueryLatestValidators ¶
func (e *BSCExecutor) QueryLatestValidators() ([]rtypes.Validator, error)
used for gnfd -> bsc
func (*BSCExecutor) QueryTendermintLightBlockWithRetry ¶
func (e *BSCExecutor) QueryTendermintLightBlockWithRetry(height int64) (lightBlock []byte, err error)
func (*BSCExecutor) SetGreenfieldExecutor ¶
func (e *BSCExecutor) SetGreenfieldExecutor(ge *GreenfieldExecutor)
func (*BSCExecutor) SwitchClient ¶
func (e *BSCExecutor) SwitchClient()
func (*BSCExecutor) SyncTendermintLightBlock ¶
func (e *BSCExecutor) SyncTendermintLightBlock(height uint64) (common.Hash, error)
func (*BSCExecutor) UpdateCachedLatestValidatorsLoop ¶
func (e *BSCExecutor) UpdateCachedLatestValidatorsLoop()
func (*BSCExecutor) UpdateClientLoop ¶
func (e *BSCExecutor) UpdateClientLoop()
type GreenfieldClient ¶
type GreenfieldExecutor ¶
type GreenfieldExecutor struct { BscExecutor *BSCExecutor // contains filtered or unexported fields }
func NewGreenfieldExecutor ¶
func NewGreenfieldExecutor(cfg *config.Config) *GreenfieldExecutor
func (*GreenfieldExecutor) ClaimPackages ¶
func (*GreenfieldExecutor) GetAccount ¶
func (e *GreenfieldExecutor) GetAccount(address string) (authtypes.AccountI, error)
func (*GreenfieldExecutor) GetBlockAtHeight ¶
func (e *GreenfieldExecutor) GetBlockAtHeight(height int64) (*tmtypes.Block, error)
func (*GreenfieldExecutor) GetBlockResultAtHeight ¶
func (e *GreenfieldExecutor) GetBlockResultAtHeight(height int64) (*ctypes.ResultBlockResults, error)
func (*GreenfieldExecutor) GetLatestBlockHeightWithRetry ¶
func (e *GreenfieldExecutor) GetLatestBlockHeightWithRetry() (latestHeight uint64, err error)
func (*GreenfieldExecutor) GetNextDeliverySequenceForChannel ¶
func (e *GreenfieldExecutor) GetNextDeliverySequenceForChannel(channelID types.ChannelId) (uint64, error)
GetNextDeliverySequenceForChannel call dest chain(BSC) to return a sequence# which should be used.
func (*GreenfieldExecutor) GetNextReceiveOracleSequence ¶
func (e *GreenfieldExecutor) GetNextReceiveOracleSequence() (uint64, error)
func (*GreenfieldExecutor) GetNextReceiveSequenceForChannel ¶
func (e *GreenfieldExecutor) GetNextReceiveSequenceForChannel(channelId types.ChannelId) (uint64, error)
GetNextReceiveSequenceForChannel gets the sequence specifically for cross-chain package's channel
func (*GreenfieldExecutor) GetValidatorsBlsPublicKey ¶
func (e *GreenfieldExecutor) GetValidatorsBlsPublicKey() ([]string, error)
func (*GreenfieldExecutor) QueryCachedLatestValidators ¶
func (e *GreenfieldExecutor) QueryCachedLatestValidators() ([]*tmtypes.Validator, error)
func (*GreenfieldExecutor) QueryTendermintLightBlock ¶
func (e *GreenfieldExecutor) QueryTendermintLightBlock(height int64) ([]byte, error)
func (*GreenfieldExecutor) QueryValidatorsAtHeight ¶
func (e *GreenfieldExecutor) QueryValidatorsAtHeight(height uint64) ([]*tmtypes.Validator, error)
func (*GreenfieldExecutor) SetBSCExecutor ¶
func (e *GreenfieldExecutor) SetBSCExecutor(be *BSCExecutor)
func (*GreenfieldExecutor) UpdateCachedLatestValidatorsLoop ¶
func (e *GreenfieldExecutor) UpdateCachedLatestValidatorsLoop()
func (*GreenfieldExecutor) UpdateClientLoop ¶
func (e *GreenfieldExecutor) UpdateClientLoop()
Source Files ¶
Click to show internal directories.
Click to hide internal directories.