Versions in this module Expand all Collapse all v1 v1.8.4 Feb 22, 2022 v1.8.3 Feb 22, 2022 Changes in this version + const MaxOutstandingBootstrapRequests + const MaxOutstandingGetAncestorsRequests + const MaxTimeFetchingAncestors + const NoLock + const ReadLock + const StatusUpdateFrequency + const WriteLock + type AcceptedFrontierHandler interface + AcceptedFrontier func(validatorID ids.ShortID, requestID uint32, containerIDs []ids.ID) error + GetAcceptedFrontierFailed func(validatorID ids.ShortID, requestID uint32) error + func NewNoOpAcceptedFrontierHandler(log logging.Logger) AcceptedFrontierHandler + type AcceptedHandler interface + Accepted func(validatorID ids.ShortID, requestID uint32, containerIDs []ids.ID) error + GetAcceptedFailed func(validatorID ids.ShortID, requestID uint32) error + func NewNoOpAcceptedHandler(log logging.Logger) AcceptedHandler + type AcceptedSender interface + SendAccepted func(nodeID ids.ShortID, requestID uint32, containerIDs []ids.ID) + SendGetAccepted func(nodeIDs ids.ShortSet, requestID uint32, containerIDs []ids.ID) + type AllGetsServer interface + type AncestorsHandler interface + Ancestors func(validatorID ids.ShortID, requestID uint32, containers [][]byte) error + GetAncestorsFailed func(validatorID ids.ShortID, requestID uint32) error + func NewNoOpAncestorsHandler(log logging.Logger) AncestorsHandler + type AppHandler interface + AppGossip func(nodeID ids.ShortID, msg []byte) error + AppRequest func(nodeID ids.ShortID, requestID uint32, deadline time.Time, request []byte) error + AppRequestFailed func(nodeID ids.ShortID, requestID uint32) error + AppResponse func(nodeID ids.ShortID, requestID uint32, response []byte) error + func NewNoOpAppHandler(log logging.Logger) AppHandler + type AppSender interface + SendAppGossip func(appGossipBytes []byte) error + SendAppGossipSpecific func(nodeIDs ids.ShortSet, appGossipBytes []byte) error + SendAppRequest func(nodeIDs ids.ShortSet, requestID uint32, appRequestBytes []byte) error + SendAppResponse func(nodeID ids.ShortID, requestID uint32, appResponseBytes []byte) error + type Bootstrapable interface + Clear func() error + ForceAccepted func(acceptedContainerIDs []ids.ID) error + type BootstrapableEngine interface + type BootstrapableTest struct + CantClear bool + CantForceAccepted bool + ClearF func() error + ForceAcceptedF func(acceptedContainerIDs []ids.ID) error + T *testing.T + func (b *BootstrapableTest) Clear() error + func (b *BootstrapableTest) Default(cant bool) + func (b *BootstrapableTest) ForceAccepted(containerIDs []ids.ID) error + type Bootstrapper interface + Restart func(reset bool) error + Startup func() error + func NewCommonBootstrapper(config Config) Bootstrapper + type BootstrapperTest struct + func (b *BootstrapperTest) Default(cant bool) + type ChitsHandler interface + Chits func(validatorID ids.ShortID, requestID uint32, containerIDs []ids.ID) error + QueryFailed func(validatorID ids.ShortID, requestID uint32) error + func NewNoOpChitsHandler(log logging.Logger) ChitsHandler + type Config struct + Alpha uint64 + AncestorsMaxContainersReceived int + AncestorsMaxContainersSent int + Beacons validators.Set + Bootstrapable Bootstrapable + Ctx *snow.ConsensusContext + MaxTimeGetAncestors time.Duration + RetryBootstrap bool + RetryBootstrapWarnFrequency int + SampleK int + Sender Sender + SharedCfg *SharedConfig + StartupAlpha uint64 + Subnet Subnet + Timer Timer + Validators validators.Set + func DefaultConfigTest() Config + func (c *Config) Context() *snow.ConsensusContext + func (c *Config) IsBootstrapped() bool + type Engine interface + Context func() *snow.ConsensusContext + GetVM func() VM + Start func(startReqID uint32) error + type EngineTest struct + AcceptedF func(nodeID ids.ShortID, requestID uint32, containerIDs []ids.ID) error + AcceptedFrontierF func(nodeID ids.ShortID, requestID uint32, containerIDs []ids.ID) error + AncestorsF func(nodeID ids.ShortID, requestID uint32, containers [][]byte) error + AppGossipF func(nodeID ids.ShortID, msg []byte) error + AppRequestF func(nodeID ids.ShortID, requestID uint32, msg []byte) error + AppRequestFailedF func(nodeID ids.ShortID, requestID uint32) error + AppResponseF func(nodeID ids.ShortID, requestID uint32, msg []byte) error + CantAccepted bool + CantAcceptedFrontier bool + CantAncestors bool + CantAppGossip bool + CantAppRequest bool + CantAppRequestFailed bool + CantAppResponse bool + CantChits bool + CantConnected bool + CantContext bool + CantDisconnected bool + CantGet bool + CantGetAccepted bool + CantGetAcceptedFailed bool + CantGetAcceptedFrontier bool + CantGetAcceptedFrontierFailed bool + CantGetAncestors bool + CantGetAncestorsFailed bool + CantGetFailed bool + CantGetVM bool + CantGossip bool + CantHalt bool + CantHealth bool + CantIsBootstrapped bool + CantNotify bool + CantPullQuery bool + CantPushQuery bool + CantPut bool + CantQueryFailed bool + CantShutdown bool + CantStart bool + CantTimeout bool + ChitsF func(nodeID ids.ShortID, requestID uint32, containerIDs []ids.ID) error + ConnectedF func(nodeID ids.ShortID, nodeVersion version.Application) error + ContextF func() *snow.ConsensusContext + DisconnectedF func(nodeID ids.ShortID) error + GetAcceptedF func(nodeID ids.ShortID, requestID uint32, containerIDs []ids.ID) error + GetAcceptedFailedF func(nodeID ids.ShortID, requestID uint32) error + GetAcceptedFrontierF func(nodeID ids.ShortID, requestID uint32) error + GetAcceptedFrontierFailedF func(nodeID ids.ShortID, requestID uint32) error + GetAncestorsF func(nodeID ids.ShortID, requestID uint32, containerID ids.ID) error + GetAncestorsFailedF func(nodeID ids.ShortID, requestID uint32) error + GetF func(nodeID ids.ShortID, requestID uint32, containerID ids.ID) error + GetFailedF func(nodeID ids.ShortID, requestID uint32) error + GetVMF func() VM + GossipF func() error + HaltF func() + HealthF func() (interface{}, error) + IsBootstrappedF func() bool + NotifyF func(Message) error + PullQueryF func(nodeID ids.ShortID, requestID uint32, containerID ids.ID) error + PushQueryF func(nodeID ids.ShortID, requestID uint32, container []byte) error + PutF func(nodeID ids.ShortID, requestID uint32, container []byte) error + QueryFailedF func(nodeID ids.ShortID, requestID uint32) error + ShutdownF func() error + StartF func(startReqID uint32) error + T *testing.T + TimeoutF func() error + func (e *EngineTest) Accepted(nodeID ids.ShortID, requestID uint32, containerIDs []ids.ID) error + func (e *EngineTest) AcceptedFrontier(nodeID ids.ShortID, requestID uint32, containerIDs []ids.ID) error + func (e *EngineTest) Ancestors(nodeID ids.ShortID, requestID uint32, containers [][]byte) error + func (e *EngineTest) AppGossip(nodeID ids.ShortID, msg []byte) error + func (e *EngineTest) AppRequest(nodeID ids.ShortID, requestID uint32, deadline time.Time, request []byte) error + func (e *EngineTest) AppRequestFailed(nodeID ids.ShortID, requestID uint32) error + func (e *EngineTest) AppResponse(nodeID ids.ShortID, requestID uint32, response []byte) error + func (e *EngineTest) Chits(nodeID ids.ShortID, requestID uint32, containerIDs []ids.ID) error + func (e *EngineTest) Connected(nodeID ids.ShortID, nodeVersion version.Application) error + func (e *EngineTest) Context() *snow.ConsensusContext + func (e *EngineTest) Default(cant bool) + func (e *EngineTest) Disconnected(nodeID ids.ShortID) error + func (e *EngineTest) Get(nodeID ids.ShortID, requestID uint32, containerID ids.ID) error + func (e *EngineTest) GetAccepted(nodeID ids.ShortID, requestID uint32, containerIDs []ids.ID) error + func (e *EngineTest) GetAcceptedFailed(nodeID ids.ShortID, requestID uint32) error + func (e *EngineTest) GetAcceptedFrontier(nodeID ids.ShortID, requestID uint32) error + func (e *EngineTest) GetAcceptedFrontierFailed(nodeID ids.ShortID, requestID uint32) error + func (e *EngineTest) GetAncestors(nodeID ids.ShortID, requestID uint32, containerID ids.ID) error + func (e *EngineTest) GetAncestorsFailed(nodeID ids.ShortID, requestID uint32) error + func (e *EngineTest) GetFailed(nodeID ids.ShortID, requestID uint32) error + func (e *EngineTest) GetVM() VM + func (e *EngineTest) Gossip() error + func (e *EngineTest) Halt() + func (e *EngineTest) HealthCheck() (interface{}, error) + func (e *EngineTest) Notify(msg Message) error + func (e *EngineTest) PullQuery(nodeID ids.ShortID, requestID uint32, containerID ids.ID) error + func (e *EngineTest) PushQuery(nodeID ids.ShortID, requestID uint32, container []byte) error + func (e *EngineTest) Put(nodeID ids.ShortID, requestID uint32, container []byte) error + func (e *EngineTest) QueryFailed(nodeID ids.ShortID, requestID uint32) error + func (e *EngineTest) Shutdown() error + func (e *EngineTest) Start(startReqID uint32) error + func (e *EngineTest) Timeout() error + type FetchSender interface + SendAncestors func(nodeID ids.ShortID, requestID uint32, containers [][]byte) + SendGet func(nodeID ids.ShortID, requestID uint32, containerID ids.ID) + SendGetAncestors func(nodeID ids.ShortID, requestID uint32, containerID ids.ID) + SendPut func(nodeID ids.ShortID, requestID uint32, containerID ids.ID, container []byte) + type Fetcher struct + OnFinished func(lastReqID uint32) error + OutstandingRequests Requests + type FrontierSender interface + SendAcceptedFrontier func(nodeID ids.ShortID, requestID uint32, containerIDs []ids.ID) + SendGetAcceptedFrontier func(nodeIDs ids.ShortSet, requestID uint32) + type Fx struct + Fx interface{} + ID ids.ID + type GetAcceptedFrontierHandler interface + GetAcceptedFrontier func(validatorID ids.ShortID, requestID uint32) error + type GetAcceptedHandler interface + GetAccepted func(validatorID ids.ShortID, requestID uint32, containerIDs []ids.ID) error + type GetAncestorsHandler interface + GetAncestors func(validatorID ids.ShortID, requestID uint32, containerID ids.ID) error + type GetHandler interface + Get func(validatorID ids.ShortID, requestID uint32, containerID ids.ID) error + type Gossiper interface + SendGossip func(containerID ids.ID, container []byte) + type HTTPHandler struct + Handler http.Handler + LockOptions LockOption + type Haltable interface + Halt func() + Halted func() bool + type Halter struct + func (h *Halter) Halt() + func (h *Halter) Halted() bool + type Handler interface + type InternalHandler interface + Gossip func() error + Halt func() + Notify func(Message) error + Shutdown func() error + Timeout func() error + type LockOption uint32 + type Message uint32 + const PendingTxs + func (msg Message) String() string + type PutHandler interface + GetFailed func(validatorID ids.ShortID, requestID uint32) error + Put func(validatorID ids.ShortID, requestID uint32, container []byte) error + func NewNoOpPutHandler(log logging.Logger) PutHandler + type QueryHandler interface + PullQuery func(validatorID ids.ShortID, requestID uint32, containerID ids.ID) error + PushQuery func(validatorID ids.ShortID, requestID uint32, container []byte) error + func NewNoOpQueryHandler(log logging.Logger) QueryHandler + type QuerySender interface + SendChits func(nodeID ids.ShortID, requestID uint32, votes []ids.ID) + SendPullQuery func(nodeIDs ids.ShortSet, requestID uint32, containerID ids.ID) + SendPushQuery func(nodeIDs ids.ShortSet, requestID uint32, containerID ids.ID, container []byte) + type Requests struct + func (r *Requests) Add(vdr ids.ShortID, requestID uint32, containerID ids.ID) + func (r *Requests) Contains(containerID ids.ID) bool + func (r *Requests) Len() int + func (r *Requests) Remove(vdr ids.ShortID, requestID uint32) (ids.ID, bool) + func (r *Requests) RemoveAny(containerID ids.ID) bool + func (r Requests) String() string + type Sender interface + type SenderTest struct + CantSendAccepted bool + CantSendAcceptedFrontier bool + CantSendAncestors bool + CantSendAppGossip bool + CantSendAppGossipSpecific bool + CantSendAppRequest bool + CantSendAppResponse bool + CantSendChits bool + CantSendGet bool + CantSendGetAccepted bool + CantSendGetAcceptedFrontier bool + CantSendGetAncestors bool + CantSendGossip bool + CantSendPullQuery bool + CantSendPushQuery bool + CantSendPut bool + SendAcceptedF func(ids.ShortID, uint32, []ids.ID) + SendAcceptedFrontierF func(ids.ShortID, uint32, []ids.ID) + SendAncestorsF func(ids.ShortID, uint32, [][]byte) + SendAppGossipF func([]byte) error + SendAppGossipSpecificF func(ids.ShortSet, []byte) error + SendAppRequestF func(ids.ShortSet, uint32, []byte) error + SendAppResponseF func(ids.ShortID, uint32, []byte) error + SendChitsF func(ids.ShortID, uint32, []ids.ID) + SendGetAcceptedF func(ids.ShortSet, uint32, []ids.ID) + SendGetAcceptedFrontierF func(ids.ShortSet, uint32) + SendGetAncestorsF func(ids.ShortID, uint32, ids.ID) + SendGetF func(ids.ShortID, uint32, ids.ID) + SendGossipF func(ids.ID, []byte) + SendPullQueryF func(ids.ShortSet, uint32, ids.ID) + SendPushQueryF func(ids.ShortSet, uint32, ids.ID, []byte) + SendPutF func(ids.ShortID, uint32, ids.ID, []byte) + T *testing.T + func (s *SenderTest) Default(cant bool) + func (s *SenderTest) SendAccepted(validatorID ids.ShortID, requestID uint32, containerIDs []ids.ID) + func (s *SenderTest) SendAcceptedFrontier(validatorID ids.ShortID, requestID uint32, containerIDs []ids.ID) + func (s *SenderTest) SendAncestors(vdr ids.ShortID, requestID uint32, vtxs [][]byte) + func (s *SenderTest) SendAppGossip(appGossipBytes []byte) error + func (s *SenderTest) SendAppGossipSpecific(nodeIDs ids.ShortSet, appGossipBytes []byte) error + func (s *SenderTest) SendAppRequest(nodeIDs ids.ShortSet, requestID uint32, appRequestBytes []byte) error + func (s *SenderTest) SendAppResponse(nodeID ids.ShortID, requestID uint32, appResponseBytes []byte) error + func (s *SenderTest) SendChits(vdr ids.ShortID, requestID uint32, votes []ids.ID) + func (s *SenderTest) SendGet(vdr ids.ShortID, requestID uint32, vtxID ids.ID) + func (s *SenderTest) SendGetAccepted(nodeIDs ids.ShortSet, requestID uint32, containerIDs []ids.ID) + func (s *SenderTest) SendGetAcceptedFrontier(validatorIDs ids.ShortSet, requestID uint32) + func (s *SenderTest) SendGetAncestors(validatorID ids.ShortID, requestID uint32, vtxID ids.ID) + func (s *SenderTest) SendGossip(containerID ids.ID, container []byte) + func (s *SenderTest) SendPullQuery(vdrs ids.ShortSet, requestID uint32, vtxID ids.ID) + func (s *SenderTest) SendPushQuery(vdrs ids.ShortSet, requestID uint32, vtxID ids.ID, vtx []byte) + func (s *SenderTest) SendPut(vdr ids.ShortID, requestID uint32, vtxID ids.ID, vtx []byte) + type SharedConfig struct + RequestID uint32 + Restarted bool + type Subnet interface + Bootstrapped func(chainID ids.ID) + IsBootstrapped func() bool + type SubnetTest struct + BootstrappedF func(ids.ID) + CantBootstrapped bool + CantIsBootstrapped bool + IsBootstrappedF func() bool + T *testing.T + func (s *SubnetTest) Bootstrapped(chainID ids.ID) + func (s *SubnetTest) Default(cant bool) + func (s *SubnetTest) IsBootstrapped() bool + type TestVM struct + AppGossipF func(nodeID ids.ShortID, msg []byte) error + AppRequestF func(nodeID ids.ShortID, requestID uint32, deadline time.Time, msg []byte) error + AppRequestFailedF func(nodeID ids.ShortID, requestID uint32) error + AppResponseF func(nodeID ids.ShortID, requestID uint32, msg []byte) error + CantAppGossip bool + CantAppRequest bool + CantAppRequestFailed bool + CantAppResponse bool + CantConnected bool + CantCreateHandlers bool + CantCreateStaticHandlers bool + CantDisconnected bool + CantHealthCheck bool + CantInitialize bool + CantSetState bool + CantShutdown bool + CantVersion bool + ConnectedF func(nodeID ids.ShortID, nodeVersion version.Application) error + CreateHandlersF func() (map[string]*HTTPHandler, error) + CreateStaticHandlersF func() (map[string]*HTTPHandler, error) + DisconnectedF func(nodeID ids.ShortID) error + HealthCheckF func() (interface{}, error) + InitializeF func(*snow.Context, manager.Manager, []byte, []byte, []byte, chan<- Message, []*Fx, ...) error + SetStateF func(snow.State) error + ShutdownF func() error + T *testing.T + VersionF func() (string, error) + func (vm *TestVM) AppGossip(nodeID ids.ShortID, msg []byte) error + func (vm *TestVM) AppRequest(nodeID ids.ShortID, requestID uint32, deadline time.Time, request []byte) error + func (vm *TestVM) AppRequestFailed(nodeID ids.ShortID, requestID uint32) error + func (vm *TestVM) AppResponse(nodeID ids.ShortID, requestID uint32, response []byte) error + func (vm *TestVM) Connected(id ids.ShortID, nodeVersion version.Application) error + func (vm *TestVM) CreateHandlers() (map[string]*HTTPHandler, error) + func (vm *TestVM) CreateStaticHandlers() (map[string]*HTTPHandler, error) + func (vm *TestVM) Default(cant bool) + func (vm *TestVM) Disconnected(id ids.ShortID) error + func (vm *TestVM) HealthCheck() (interface{}, error) + func (vm *TestVM) Initialize(ctx *snow.Context, db manager.Manager, ...) error + func (vm *TestVM) SetState(state snow.State) error + func (vm *TestVM) Shutdown() error + func (vm *TestVM) Version() (string, error) + type Timer interface + RegisterTimeout func(time.Duration) + type TimerTest struct + CantRegisterTimout bool + RegisterTimeoutF func(time.Duration) + T *testing.T + func (t *TimerTest) Default(cant bool) + func (t *TimerTest) RegisterTimeout(delay time.Duration) + type VM interface + CreateHandlers func() (map[string]*HTTPHandler, error) + CreateStaticHandlers func() (map[string]*HTTPHandler, error) + Initialize func(ctx *snow.Context, dbManager manager.Manager, genesisBytes []byte, ...) error + SetState func(state snow.State) error + Shutdown func() error + Version func() (string, error)