das

package
v0.11.0-rc7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 5, 2023 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConstructModule

func ConstructModule(tp node.Type, cfg *Config) fx.Option

func WithMetrics

func WithMetrics(d *das.DASer) error

WithMetrics is a utility function that is expected to be "invoked" by the fx lifecycle.

Types

type API

type API struct {
	Internal struct {
		SamplingStats func(ctx context.Context) (das.SamplingStats, error) `perm:"read"`
		WaitCatchUp   func(ctx context.Context) error                      `perm:"read"`
	}
}

API is a wrapper around Module for the RPC. TODO(@distractedm1nd): These structs need to be autogenerated.

func (*API) SamplingStats

func (api *API) SamplingStats(ctx context.Context) (das.SamplingStats, error)

func (*API) WaitCatchUp

func (api *API) WaitCatchUp(ctx context.Context) error

type Config

type Config das.Parameters

Config contains configuration parameters for the DASer (or DASing process)

func DefaultConfig

func DefaultConfig(tp node.Type) Config

TODO(@derrandz): parameters needs performance testing on real network to define optimal values DefaultConfig provide the optimal default configuration per node type. For the moment, there is only one default configuration for all node types but this function will provide more once #1261 is addressed.

TODO(@derrandz): Address #1261

func (*Config) Validate

func (cfg *Config) Validate() error

Validate performs basic validation of the config. Upon encountering an invalid value, Validate returns an error of type: ErrMisConfig

type Module

type Module interface {
	// SamplingStats returns the current statistics over the DA sampling process.
	SamplingStats(ctx context.Context) (das.SamplingStats, error)
	// WaitCatchUp blocks until DASer finishes catching up to the network head.
	WaitCatchUp(ctx context.Context) error
}

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL