genesis

package
v0.0.0-...-5632959 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FileOutputFlag = cli.StringFlag{
		Name:  "file",
		Usage: "File to write the testnet ID to ",
		Value: "",
	}
	BlockchainFlag = cli.StringFlag{
		Name:  "blockchain",
		Usage: "[artemis|lighthouse|lodestar|prysm]",
		Value: "prysm",
	}
	LogFolderFlag = cli.StringFlag{
		Name:  "logFolder",
		Usage: "/var/log/testnet123",
	}
	NumberOfNodesFlag = cli.IntFlag{
		Name:  "numNodes",
		Usage: "Number of nodes to deploy",
		Value: 4,
	}
	VolumesFlag = cli.StringSliceFlag{
		Name:  "volume",
		Usage: "Volumes to be mounted on all nodes. This flag can be used multiple times.",
		Value: nil,
	}
	PortsFlag = cli.StringSliceFlag{
		Name:  "ports",
		Usage: "Ports to be exposed on nodes. This flag can be used multiple times.",
		Value: nil,
	}
	TestnetName = cli.StringFlag{
		Name:  "testnet",
		Usage: "ID of the testnet to destroy",
	}
	ContractFlag = cli.StringFlag{
		Name:  "contract",
		Usage: "Address of the deposit contract",
	}
	ValidatorsPassword = cli.StringFlag{
		Name:  "validatorsPassword",
		Usage: "Password for validators keystore",
		Value: "password",
	}
)
View Source
var (
	GenesisCommand = cli.Command{
		Name:        "genesis",
		Usage:       "Commands to set up genesis",
		Description: `Commands to set up and test genesis`,
		Subcommands: []cli.Command{
			cli.Command{
				Name:        "up",
				Usage:       "Tests genesis is available",
				Description: `Tests that genesis is available on port 8000`,
				Action:      testGenesisAvailable,
				Flags:       []cli.Flag{},
			},
			cli.Command{
				Name:        "destroy",
				Usage:       "Destroys a tesnet",
				Description: `Destroys the nodes of a testnet`,
				Action:      destroyTestnet,
				Flags: []cli.Flag{
					TestnetName,
				},
			},
			cli.Command{
				Name:        "testnet",
				Usage:       "Deploys a new testnet",
				Description: `Deploys a new testnet to genesis`,
				Action:      deployTestnet,
				Flags: []cli.Flag{
					BlockchainFlag,
					FileOutputFlag,
					LogFolderFlag,
					NumberOfNodesFlag,
					PortsFlag,
					VolumesFlag,
					ContractFlag,
					ValidatorsPassword,
				},
			},
			cli.Command{
				Name:        "build-status",
				Usage:       "Provides information on the current state of the build in genesis, and waits for the build to complete",
				Description: "This command queries genesis for the status of the build, and displays the information, every 5s, until the build completes or errors out",
				Action:      buildStatus,
				Flags: []cli.Flag{
					TestnetName,
				},
			},
		},
	}
)

Functions

This section is empty.

Types

type BuildStatus

type BuildStatus struct {
	Progress float32     `json:"progress"`
	Error    interface{} `json:"error"`
	Stage    string      `json:"stage"`
	Frozen   bool        `json:"frozen"`
}

{"progress":100.000000,"error":null,"stage":"Finished","frozen":false}

Jump to

Keyboard shortcuts

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