Versions in this module Expand all Collapse all v1 v1.4.2 Oct 4, 2021 v1.4.1 Oct 4, 2021 Changes in this version + var TestBackendFactory backendtest.TestBackendFactory = testBackendFactoryImpl + func AppendValidatorsToGenesisBlock(genesis *core.Genesis, validators []istanbul.ValidatorData) + func DecryptFn(key *ecdsa.PrivateKey) istanbul.DecryptFn + func New(config *istanbul.Config, db ethdb.Database) consensus.Istanbul + func SignBLSFn(key *ecdsa.PrivateKey) istanbul.BLSSignerFn + func SignFn(key *ecdsa.PrivateKey) istanbul.SignerFn + func SignHashFn(key *ecdsa.PrivateKey) istanbul.HashSignerFn + type API struct + func (api *API) AddProxy(url, externalUrl string) (bool, error) + func (api *API) ForceRoundChange() (bool, error) + func (api *API) GetCurrentReplicaState() (*replica.ReplicaStateSummary, error) + func (api *API) GetCurrentRoundState() (*core.RoundStateSummary, error) + func (api *API) GetLookbackWindow(number *rpc.BlockNumber) (uint64, error) + func (api *API) GetProposer(sequence *rpc.BlockNumber, round *uint64) (common.Address, error) + func (api *API) GetProxiedValidators() ([]*proxy.ProxiedValidatorInfo, error) + func (api *API) GetProxiesInfo() ([]*proxy.ProxyInfo, error) + func (api *API) GetSnapshot(number *rpc.BlockNumber) (*Snapshot, error) + func (api *API) GetValEnodeTable() (map[string]*vet.ValEnodeEntryInfo, error) + func (api *API) GetValidators(number *rpc.BlockNumber) ([]common.Address, error) + func (api *API) GetValidatorsBLSPublicKeys(number *rpc.BlockNumber) ([]blscrypto.SerializedPublicKey, error) + func (api *API) GetVersionCertificateTableInfo() (map[string]*vet.VersionCertificateEntryInfo, error) + func (api *API) IsValidating() bool + func (api *API) RemoveProxy(url string) (bool, error) + func (api *API) StartValidating() error + func (api *API) StartValidatingAtBlock(blockNumber int64) error + func (api *API) StopValidating() error + func (api *API) StopValidatingAtBlock(blockNumber int64) error + type AddressProvider interface + IsValidating func() bool + SelfNode func() *enode.Node + ValidatorAddress func() common.Address + type AnnounceManager struct + func NewAnnounceManager(config AnnounceManagerConfig, network AnnounceNetwork, ...) *AnnounceManager + func (m *AnnounceManager) Close() error + func (m *AnnounceManager) GetVersionCertificateTableInfo() (map[string]*enodes.VersionCertificateEntryInfo, error) + func (m *AnnounceManager) RetrieveEnodeCertificateMsgMap() map[enode.ID]*istanbul.EnodeCertMsg + func (m *AnnounceManager) SendVersionCertificateTable(peer consensus.Peer) error + func (m *AnnounceManager) SetEnodeCertificateMsgMap(enodeCertMsgMap map[enode.ID]*istanbul.EnodeCertMsg) error + type AnnounceManagerConfig struct + AWallets *atomic.Value + IsProxiedValidator bool + VcDbPath string + type AnnounceNetwork interface + Gossip func(payload []byte, ethMsgCode uint64) error + Multicast func(destAddresses []common.Address, payload []byte, ethMsgCode uint64, ...) error + RetrieveValidatorConnSet func() (map[common.Address]bool, error) + type Backend struct + func (sb *Backend) APIs(chain consensus.ChainHeaderReader) []rpc.API + func (sb *Backend) AddPeer(node *enode.Node, purpose p2p.PurposeFlag) + func (sb *Backend) AddProxy(node, externalNode *enode.Node) error + func (sb *Backend) Address() common.Address + func (sb *Backend) Author(header *types.Header) (common.Address, error) + func (sb *Backend) AuthorForBlock(number uint64) common.Address + func (sb *Backend) Authorize(ecdsaAddress, blsAddress common.Address, publicKey *ecdsa.PublicKey, ...) + func (sb *Backend) ChainConfig() *params.ChainConfig + func (sb *Backend) CheckSignature(data []byte, address common.Address, sig []byte) error + func (sb *Backend) Close() error + func (sb *Backend) Commit(proposal istanbul.Proposal, aggregatedSeal types.IstanbulAggregatedSeal, ...) error + func (sb *Backend) EpochSize() uint64 + func (sb *Backend) EventMux() *event.TypeMux + func (sb *Backend) Finalize(chain consensus.ChainHeaderReader, header *types.Header, state *state.StateDB, ...) + func (sb *Backend) FinalizeAndAssemble(chain consensus.ChainHeaderReader, header *types.Header, state *state.StateDB, ...) (*types.Block, error) + func (sb *Backend) GenerateRandomness(parentHash common.Hash) (common.Hash, common.Hash, error) + func (sb *Backend) GetAnnounceVersion() uint + func (sb *Backend) GetCurrentHeadBlock() istanbul.Proposal + func (sb *Backend) GetCurrentHeadBlockAndAuthor() (istanbul.Proposal, common.Address) + func (sb *Backend) GetProxiedValidatorEngine() proxy.ProxiedValidatorEngine + func (sb *Backend) GetProxyEngine() proxy.ProxyEngine + func (sb *Backend) GetValEnodeTableEntries(valAddresses []common.Address) (map[common.Address]*istanbul.AddressEntry, error) + func (sb *Backend) GetValidators(blockNumber *big.Int, headerHash common.Hash) []istanbul.Validator + func (sb *Backend) Gossip(payload []byte, ethMsgCode uint64) error + func (sb *Backend) HandleMsg(addr common.Address, msg p2p.Msg, peer consensus.Peer) (bool, error) + func (sb *Backend) Handshake(peer consensus.Peer) (bool, error) + func (sb *Backend) HasBlock(hash common.Hash, number *big.Int) bool + func (sb *Backend) HashForBlock(number uint64) common.Hash + func (sb *Backend) IsLastBlockOfEpoch(header *types.Header) bool + func (sb *Backend) IsPrimary() bool + func (sb *Backend) IsPrimaryForSeq(seq *big.Int) bool + func (sb *Backend) IsProxiedValidator() bool + func (sb *Backend) IsProxy() bool + func (sb *Backend) IsValidating() bool + func (sb *Backend) IsValidator() bool + func (sb *Backend) LastSubject() (istanbul.Subject, error) + func (sb *Backend) LookbackWindow(header *types.Header, state *state.StateDB) uint64 + func (sb *Backend) MakePrimary() error + func (sb *Backend) MakeReplica() error + func (sb *Backend) Multicast(destAddresses []common.Address, payload []byte, ethMsgCode uint64, ...) error + func (sb *Backend) NewWork() error + func (sb *Backend) NextBlockValidators(proposal istanbul.Proposal) (istanbul.ValidatorSet, error) + func (sb *Backend) ParentBlockValidators(proposal istanbul.Proposal) istanbul.ValidatorSet + func (sb *Backend) Prepare(chain consensus.ChainHeaderReader, header *types.Header) error + func (sb *Backend) RefreshValPeers() error + func (sb *Backend) RegisterPeer(peer consensus.Peer, isProxiedPeer bool) error + func (sb *Backend) RemovePeer(node *enode.Node, purpose p2p.PurposeFlag) + func (sb *Backend) RemoveProxy(node *enode.Node) error + func (sb *Backend) RetrieveEnodeCertificateMsgMap() map[enode.ID]*istanbul.EnodeCertMsg + func (sb *Backend) RetrieveValidatorConnSet() (map[common.Address]bool, error) + func (sb *Backend) RewriteValEnodeTableEntries(entries map[common.Address]*istanbul.AddressEntry) error + func (sb *Backend) Seal(chain consensus.ChainHeaderReader, block *types.Block) error + func (sb *Backend) SelfNode() *enode.Node + func (sb *Backend) SendDelegateSignMsgToProxiedValidator(msg []byte) error + func (sb *Backend) SendDelegateSignMsgToProxy(msg []byte, peerID enode.ID) error + func (sb *Backend) SetBroadcaster(broadcaster consensus.Broadcaster) + func (sb *Backend) SetCallBacks(hasBadBlock func(common.Hash) bool, ...) error + func (sb *Backend) SetChain(chain consensus.ChainContext, currentBlock func() *types.Block, ...) + func (sb *Backend) SetEnodeCertificateMsgMap(enodeCertMsgMap map[enode.ID]*istanbul.EnodeCertMsg) error + func (sb *Backend) SetP2PServer(p2pserver consensus.P2PServer) + func (sb *Backend) SetStartValidatingBlock(blockNumber *big.Int) error + func (sb *Backend) SetStopValidatingBlock(blockNumber *big.Int) error + func (sb *Backend) Sign(data []byte) ([]byte, error) + func (sb *Backend) SignBLS(data []byte, extra []byte, useComposite, cip22 bool) (blscrypto.SerializedSignature, error) + func (sb *Backend) StartAnnouncing() error + func (sb *Backend) StartProxiedValidatorEngine() error + func (sb *Backend) StartValidating() error + func (sb *Backend) StopAnnouncing() error + func (sb *Backend) StopProxiedValidatorEngine() error + func (sb *Backend) StopValidating() error + func (sb *Backend) SubscribeNewDelegateSignEvent(ch chan<- istanbul.MessageWithPeerIDEvent) event.Subscription + func (sb *Backend) Unicast(peer consensus.Peer, payload []byte, ethMsgCode uint64) + func (sb *Backend) UnregisterPeer(peer consensus.Peer, isProxiedPeer bool) + func (sb *Backend) UpdateAnnounceVersion() + func (sb *Backend) UpdateMetricsForParentOfBlock(child *types.Block) + func (sb *Backend) UpdateReplicaState(seq *big.Int) + func (sb *Backend) UpdateValSetDiff(chain consensus.ChainHeaderReader, header *types.Header, state *state.StateDB) error + func (sb *Backend) ValidatorAddress() common.Address + func (sb *Backend) Validators(proposal istanbul.Proposal) istanbul.ValidatorSet + func (sb *Backend) Verify(proposal istanbul.Proposal) (*istanbulCore.StateProcessResult, time.Duration, error) + func (sb *Backend) VerifyHeader(chain consensus.ChainHeaderReader, header *types.Header, seal bool) error + func (sb *Backend) VerifyHeaders(chain consensus.ChainHeaderReader, headers []*types.Header, seals []bool) (chan<- struct{}, <-chan error) + func (sb *Backend) VerifyPendingBlockValidatorSignature(data []byte, sig []byte) (common.Address, error) + func (sb *Backend) VerifySeal(header *types.Header) error + func (sb *Backend) VerifyValidatorConnectionSetSignature(data []byte, sig []byte) (common.Address, error) + type BlsInfo struct + Address common.Address + func (bi *BlsInfo) Sign(data []byte, extra []byte, useComposite, cip22 bool) (blscrypto.SerializedSignature, error) + type EcdsaInfo struct + Address common.Address + PublicKey *ecdsa.PublicKey + func (ei EcdsaInfo) Decrypt(payload []byte) ([]byte, error) + func (ei EcdsaInfo) Sign(data []byte) ([]byte, error) + func (ei EcdsaInfo) SignHash(hash common.Hash) ([]byte, error) + type GossipCache interface + CheckIfMessageProcessedByPeer func(peerNodeAddr common.Address, payload []byte) bool + CheckIfMessageProcessedBySelf func(payload []byte) bool + MarkMessageProcessedByPeer func(peerNodeAddr common.Address, payload []byte) + MarkMessageProcessedBySelf func(payload []byte) + type Keys []*ecdsa.PrivateKey + func (slice Keys) Len() int + func (slice Keys) Less(i, j int) bool + func (slice Keys) Swap(i, j int) + type LRUGossipCache struct + func NewLRUGossipCache(peerCacheSize, selfCacheSize int) *LRUGossipCache + func (gc *LRUGossipCache) CheckIfMessageProcessedByPeer(peerNodeAddr common.Address, payload []byte) bool + func (gc *LRUGossipCache) CheckIfMessageProcessedBySelf(payload []byte) bool + func (gc *LRUGossipCache) MarkMessageProcessedByPeer(peerNodeAddr common.Address, payload []byte) + func (gc *LRUGossipCache) MarkMessageProcessedBySelf(payload []byte) + type ProxyContext interface + GetProxiedValidatorEngine func() proxy.ProxiedValidatorEngine + type QueryEnodeGossipFrequencyState int + const HighFreqAfterFirstPeerState + const HighFreqBeforeFirstPeerState + const LowFreqState + type Snapshot struct + Epoch uint64 + Hash common.Hash + Number uint64 + ValSet istanbul.ValidatorSet + func (s *Snapshot) MarshalJSON() ([]byte, error) + func (s *Snapshot) UnmarshalJSON(b []byte) error + type Wallets struct + Bls BlsInfo + Ecdsa EcdsaInfo