params

package
v0.5.0-dirty Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvCustomNetwork = "CELESTIA_CUSTOM"
)

Variables

View Source
var ErrInvalidNetwork = errors.New("params: invalid network")

ErrInvalidNetwork is thrown when unknown network is used.

Functions

func GenesisFor

func GenesisFor(net Network) (string, error)

GenesisFor reports a hash of a genesis block for a given network. Genesis is strictly defined and can't be modified.

func ListProvidedNetworks added in v0.3.0

func ListProvidedNetworks() string

ListProvidedNetworks provides a string listing all known long-standing networks for things like command hints.

func SetDefaultNetwork added in v0.3.0

func SetDefaultNetwork(net Network) error

Types

type Bootstrappers

type Bootstrappers []peer.AddrInfo

Bootstrappers is a type definition for nodes that will be used as bootstrappers.

func BootstrappersFor

func BootstrappersFor(net Network) (Bootstrappers, error)

BootstrappersFor returns address information of bootstrap peers for a given network.

type Network

type Network string

Network is a type definition for DA network run by Celestia Node.

const (
	// Arabica testnet. See: celestiaorg/networks.
	Arabica Network = "arabica"
	// Mamaki testnet. See: celestiaorg/networks.
	Mamaki Network = "mamaki"
	// Private can be used to set up any private network, including local testing setups.
	Private Network = "private"
	// BlockTime is a network block time.
	// TODO @renaynay @Wondertan (#790)
	BlockTime = time.Second * 30
)

NOTE: Every time we add a new long-running network, it has to be added here.

func DefaultNetwork

func DefaultNetwork() Network

DefaultNetwork returns the network of the current build.

func (Network) Validate

func (n Network) Validate() error

Validate the network.

Jump to

Keyboard shortcuts

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