params

package
v0.3.1-dirty Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvCustomNetwork  = "CELESTIA_CUSTOM"
	EnvPrivateGenesis = "CELESTIA_PRIVATE_GENESIS"
)

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. To run a custom genesis private network use CELESTIA_PRIVATE_GENESIS env var.

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 (
	// Mamaki testnet. See: celestiaorg/networks.
	Mamaki Network = "mamaki"
	// Private can be used to set up any private network, including local testing setups.
	// Use CELESTIA_PRIVATE_GENESIS env var to enable Private by specifying its genesis block hash.
	Private Network = "private"
)

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