Documentation ¶
Index ¶
- func DASer(lc fx.Lifecycle, avail share.Availability, sub header.Subscriber, ...) *das.DASer
- func FullAvailability(bServ blockservice.BlockService) share.Availability
- func HeaderExchangeP2P(cfg Config) func(params.Bootstrappers, host.Host) (header.Exchange, error)
- func HeaderP2PExchangeServer(lc fx.Lifecycle, host host.Host, store header.Store) *p2p.ExchangeServer
- func HeaderService(syncer *sync.Syncer, sub header.Subscriber, p2pServer *p2p.ExchangeServer, ...) *headerservice.Service
- func HeaderStore(lc fx.Lifecycle, ds datastore.Batching) (header.Store, error)
- func HeaderStoreInit(cfg *Config) func(context.Context, params.Network, header.Store, header.Exchange) error
- func HeaderSyncer(lc fx.Lifecycle, ex header.Exchange, store header.Store, sub header.Subscriber) (*sync.Syncer, error)
- func LightAvailability(ctx context.Context, lc fx.Lifecycle, bServ blockservice.BlockService) share.Availability
- func P2PSubscriber(lc fx.Lifecycle, sub *pubsub.PubSub) (*p2p.Subscriber, *p2p.Subscriber)
- func ShareService(lc fx.Lifecycle, bServ blockservice.BlockService, avail share.Availability) *share.Service
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DASer ¶
func DASer( lc fx.Lifecycle, avail share.Availability, sub header.Subscriber, hstore header.Store, ds datastore.Batching, ) *das.DASer
DASer constructs a new Data Availability Sampler.
func FullAvailability ¶ added in v0.2.0
func FullAvailability(bServ blockservice.BlockService) share.Availability
func HeaderExchangeP2P ¶
HeaderExchangeP2P constructs new Exchange for headers.
func HeaderP2PExchangeServer ¶ added in v0.2.0
func HeaderP2PExchangeServer(lc fx.Lifecycle, host host.Host, store header.Store) *p2p.ExchangeServer
HeaderP2PExchangeServer creates a new header/p2p.ExchangeServer.
func HeaderService ¶
func HeaderService( syncer *sync.Syncer, sub header.Subscriber, p2pServer *p2p.ExchangeServer, ex header.Exchange, store header.Store, ) *headerservice.Service
HeaderService creates a new header.Service.
func HeaderStore ¶
HeaderStore creates and initializes new header.Store.
func HeaderStoreInit ¶ added in v0.2.0
func HeaderStoreInit(cfg *Config) func(context.Context, params.Network, header.Store, header.Exchange) error
HeaderStoreInit initializes the store.
func HeaderSyncer ¶
func HeaderSyncer( lc fx.Lifecycle, ex header.Exchange, store header.Store, sub header.Subscriber, ) (*sync.Syncer, error)
HeaderSyncer creates a new Syncer.
func LightAvailability ¶
func LightAvailability(ctx context.Context, lc fx.Lifecycle, bServ blockservice.BlockService) share.Availability
LightAvailability constructs light share availability.
func P2PSubscriber ¶ added in v0.2.0
func P2PSubscriber(lc fx.Lifecycle, sub *pubsub.PubSub) (*p2p.Subscriber, *p2p.Subscriber)
P2PSubscriber creates a new p2p.Subscriber.
func ShareService ¶
func ShareService(lc fx.Lifecycle, bServ blockservice.BlockService, avail share.Availability) *share.Service
ShareService constructs new share.Service.
Types ¶
type Config ¶
type Config struct { // TrustedHash is the Block/Header hash that Nodes use as starting point for header synchronization. // Only affects the node once on initial sync. TrustedHash string // TrustedPeers are the peers we trust to fetch headers from. // Note: The trusted does *not* imply Headers are not verified, but trusted as reliable to fetch headers // at any moment. TrustedPeers []string }
func DefaultConfig ¶
func DefaultConfig() Config
Click to show internal directories.
Click to hide internal directories.