Versions in this module Expand all Collapse all v0 v0.0.1 Sep 25, 2024 Changes in this version + const ClaimRewardInterval + const DataSeedDenyServiceThreshold + const DefaultGasPrice + const EstimatedTxExtraMetaSize + const FallBehindThreshold + const GasLimitRatio + const GnfdGasPrice + const MaxTxSizeForFixGasLimit + const RPCTimeout + const RelayerBytesLength + const SleepSecondForUpdateClient + const UpdateCachedValidatorsInterval + var BNBDecimal = big.NewInt(1000000000000000000) + var BSCBalanceThreshold = big.NewInt(1) + var BSCRewardThreshold = big.NewInt(100000000000000000) + func ApplyLightBlock(cs *ConsensusState, block *tmtypes.LightBlock) (bool, error) + func EncodeLightBlockValidationResult(validatorSetChanged bool, consensusStateBytes []byte) []byte + func GetTestConfig() *config.Config + func InitExecutors() (*BSCExecutor, *GreenfieldExecutor) + type BSCClient struct + type BSCExecutor struct + GreenfieldExecutor *GreenfieldExecutor + func NewBSCExecutor(cfg *config.Config, metricService *metric.MetricService) *BSCExecutor + func (e *BSCExecutor) CallBuildInSystemContract(blsSignature []byte, validatorSet *big.Int, msgBytes []byte, nonce uint64) (common.Hash, error) + func (e *BSCExecutor) ClaimRewardLoop() + func (e *BSCExecutor) GetBlockHeaderAtHeight(height uint64) (*types.Header, error) + func (e *BSCExecutor) GetEthClient() *ethclient.Client + func (e *BSCExecutor) GetGreenfieldLightClient() *greenfieldlightclient.Greenfieldlightclient + func (e *BSCExecutor) GetInturnRelayer() (*rtypes.InturnRelayer, error) + func (e *BSCExecutor) GetLatestBlockHeightWithRetry() (latestHeight uint64, err error) + func (e *BSCExecutor) GetLatestFinalizedBlockHeightWithRetry() (latestHeight uint64, err error) + func (e *BSCExecutor) GetLightClientLatestHeight() (uint64, error) + func (e *BSCExecutor) GetNextDeliveryOracleSequenceWithRetry(chainId sdk.ChainID) (sequence uint64, err error) + func (e *BSCExecutor) GetNextReceiveSequenceForChannelWithRetry(channelID rtypes.ChannelId) (sequence uint64, err error) + func (e *BSCExecutor) GetNextSendSequenceForChannelWithRetry() (sequence uint64, err error) + func (e *BSCExecutor) GetNonce() (uint64, error) + func (e *BSCExecutor) GetRpcClient() *rpc.Client + func (e *BSCExecutor) GetValidatorsBlsPublicKey() ([]string, error) + func (e *BSCExecutor) QueryCachedLatestValidators() ([]rtypes.Validator, error) + func (e *BSCExecutor) QueryLatestTendermintHeaderWithRetry() (lightBlockBts []byte, err error) + func (e *BSCExecutor) QueryLatestValidators() ([]rtypes.Validator, error) + func (e *BSCExecutor) QueryTendermintLightBlockWithRetry(height int64) (lightBlock tmtypes.LightBlock, 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 ConsensusState struct + ChainID string + Height uint64 + NextValidatorSetHash []byte + ValidatorSet *cbfttypes.ValidatorSet + func DecodeConsensusState(input []byte) (ConsensusState, error) + func DecodeLightBlockValidationInput(input []byte) (*ConsensusState, error) + type GnfdCompositeClients struct + func NewGnfdCompositClients(rpcAddrs []string, chainId string, account *types.Account, useWebsocket bool, ...) GnfdCompositeClients + func (gc *GnfdCompositeClients) GetClient() *GreenfieldClient + type GreenfieldClient struct + Height int64 + type GreenfieldExecutor struct + BlsPrivateKey []byte + BlsPubKey []byte + BscExecutor *BSCExecutor + func NewGreenfieldExecutor(cfg *config.Config) *GreenfieldExecutor + func (e *GreenfieldExecutor) BroadcastVote(v *votepool.Vote) error + func (e *GreenfieldExecutor) CallZkmeSBTAckMintedContract(chainId uint32, user ethcommon.Address, status uint8, nonce uint64) (ethcommon.Hash, error) + func (e *GreenfieldExecutor) ClaimPackages(client *GreenfieldClient, payloadBts []byte, aggregatedSig []byte, ...) (string, error) + func (e *GreenfieldExecutor) GetBlockAndBlockResultAtHeight(height int64) (*tmtypes.Block, *ctypes.ResultBlockResults, error) + func (e *GreenfieldExecutor) GetEthClient() *ethclient.Client + func (e *GreenfieldExecutor) GetGnfdClient() *GreenfieldClient + func (e *GreenfieldExecutor) GetInturnRelayer(srcChain oracletypes.ClaimSrcChain) (*oracletypes.QueryInturnRelayerResponse, error) + func (e *GreenfieldExecutor) GetLatestBlockHeight() (latestHeight uint64, err error) + func (e *GreenfieldExecutor) GetNextDeliverySequenceForChannelWithRetry(channelID types.ChannelId) (sequence uint64, err error) + func (e *GreenfieldExecutor) GetNextReceiveOracleSequence(destChainId sdk.ChainID) (uint64, error) + func (e *GreenfieldExecutor) GetNextReceiveSequenceForChannel(destChainId sdk.ChainID, channelId types.ChannelId) (uint64, error) + func (e *GreenfieldExecutor) GetNextSendSequenceForChannelWithRetry(destChainID sdk.ChainID, channelID types.ChannelId) (sequence uint64, err error) + func (e *GreenfieldExecutor) GetNonce() (uint64, error) + func (e *GreenfieldExecutor) GetNonceOnNextBlock() (uint64, error) + func (e *GreenfieldExecutor) GetValidatorsBlsPublicKey() ([]string, error) + func (e *GreenfieldExecutor) QueryCachedLatestValidators() ([]*tmtypes.Validator, error) + func (e *GreenfieldExecutor) QueryTendermintLightBlock(height int64) (tmtypes.LightBlock, error) + func (e *GreenfieldExecutor) QueryValidatorsAtHeight(height uint64) ([]*tmtypes.Validator, error) + func (e *GreenfieldExecutor) QueryVotesByEventHashAndType(eventHash []byte, eventType votepool.EventType) ([]*votepool.Vote, error) + func (e *GreenfieldExecutor) SetBSCExecutor(be *BSCExecutor) + func (e *GreenfieldExecutor) UpdateCachedLatestValidatorsLoop()