Documentation ¶
Index ¶
- func Cleanup(_ context.Context, testnet *Testnet) error
- func GetHeights(ctx context.Context, testnet *Testnet) ([]int64, error)
- func InitNode(node *Node, genesis types.GenesisDoc, rootDir string) error
- func MakeAppConfig(_ *Node) (*serverconfig.Config, error)
- func MakeConfig(node *Node) (*config.Config, error)
- func MakeGenesis(testnet *Testnet) (types.GenesisDoc, error)
- func Setup(ctx context.Context, testnet *Testnet) error
- func SetupImages(ctx context.Context, testnet *Testnet) error
- func Start(ctx context.Context, testnet *Testnet) error
- func Stop(_ context.Context, testnet *Testnet) error
- func WaitForHeight(ctx context.Context, testnet *Testnet, height int64) error
- func WaitForNBlocks(ctx context.Context, testnet *Testnet, blocks int64) error
- func WriteAddressBook(peers []string, file string) error
- func WriteDockerCompose(testnet *Testnet, file string) error
- type Account
- type Manifest
- type ManifestAccount
- type ManifestNode
- type Node
- type Testnet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetHeights ¶
GetHeights loops through all running nodes and returns an array of heights in order of highest to lowest.
func MakeAppConfig ¶
func MakeAppConfig(_ *Node) (*serverconfig.Config, error)
func MakeGenesis ¶
func MakeGenesis(testnet *Testnet) (types.GenesisDoc, error)
func SetupImages ¶
SetupImages ensures that all the requisite docker images for each used celestia consensus version.
func WaitForHeight ¶
WaitForHeight waits until the first node reaches the height specified. If no progress is made within a 20 second window then the function times out with an error.
func WaitForNBlocks ¶
WaitForNBlocks queries the current latest height and waits until the network progresses to "blocks" blocks ahead.
func WriteAddressBook ¶
func WriteDockerCompose ¶
Types ¶
type Manifest ¶
type Manifest struct { Nodes map[string]*ManifestNode `toml:"node"` Accounts map[string]*ManifestAccount `toml:"account"` }
func LoadManifest ¶
LoadManifest loads a testnet manifest from a file.
type ManifestAccount ¶
type ManifestAccount struct { // Tokens symbolizes the genesis supply of liquid tokens to that account Tokens int64 `toml:"tokens"` // The key type to derive the account key from. Defaults to secp256k1 KeyType string `toml:"key_type"` }
ManifestAccounts represent SDK accounts that sign and submit transactions. If the account has the same name as the node it is the operator address for the validator. Unless specified it will have a default self delegation All accounts specfied are created at genesis.
type ManifestNode ¶
type ManifestNode struct { // Versions is an array of binary versions that the node // will run in it's lifetime. A series of upgrades can be // triggered by the upgrade command or will happen automatically // across a testnet. // // Version strings are used to pull docker images from ghcr.io. // Alternatively, use "current", if you want to use the binary // based on the current branch. You must have the image built by // running "make docker". Default set to "current" Versions []string `toml:"versions"` // The height that the node will start at StartHeight int64 `toml:"start_height"` // Peers are the set of peers that initially populate the address // book. Persistent peers and seeds are currently not supported // By default all nodes declared in the manifest are included Peers []string `toml:"peers"` // SelfDelegation is the delegation of the validator when they // first come up. If set to 0, the node is not considered a validator SelfDelegation int64 `toml:"self_delegation"` }
type Node ¶
type Node struct { Name string Versions []string StartHeight int64 Peers []string SignerKey crypto.PrivKey NetworkKey crypto.PrivKey AccountKey crypto.PrivKey IP net.IP ProxyPort uint32 SelfDelegation int64 }
func (Node) AddressP2P ¶
Address returns a P2P endpoint address for the node.
func (Node) AddressRPC ¶
Address returns an RPC endpoint address for the node.