tendermint: github.com/tendermint/tendermint/cmd/tendermint/commands Index | Files

package commands

import "github.com/tendermint/tendermint/cmd/tendermint/commands"

Index

Package Files

codec.go gen_node_key.go gen_validator.go init.go lite.go probe_upnp.go replay.go reset_priv_validator.go root.go run_node.go show_node_id.go show_validator.go testnet.go version.go

Variables

var GenNodeKeyCmd = &cobra.Command{
    Use:   "gen_node_key",
    Short: "Generate a node key for this node and print its ID",
    RunE:  genNodeKey,
}

GenNodeKeyCmd allows the generation of a node key. It prints node's ID to the standard output.

var GenValidatorCmd = &cobra.Command{
    Use:   "gen_validator",
    Short: "Generate new validator keypair",
    Run:   genValidator,
}

GenValidatorCmd allows the generation of a keypair for a validator.

var InitFilesCmd = &cobra.Command{
    Use:   "init",
    Short: "Initialize Tendermint",
    RunE:  initFiles,
}

InitFilesCmd initialises a fresh Tendermint Core instance.

var LiteCmd = &cobra.Command{
    Use:   "lite",
    Short: "Run lite-client proxy server, verifying tendermint rpc",
    Long:  "" /* 306 byte string literal not displayed */,

    RunE:         runProxy,
    SilenceUsage: true,
}

LiteCmd represents the base command when called without any subcommands

var ProbeUpnpCmd = &cobra.Command{
    Use:   "probe_upnp",
    Short: "Test UPnP functionality",
    RunE:  probeUpnp,
}

ProbeUpnpCmd adds capabilities to test the UPnP functionality.

var ReplayCmd = &cobra.Command{
    Use:   "replay",
    Short: "Replay messages from WAL",
    Run: func(cmd *cobra.Command, args []string) {
        consensus.RunReplayFile(config.BaseConfig, config.Consensus, false)
    },
}

ReplayCmd allows replaying of messages from the WAL.

var ReplayConsoleCmd = &cobra.Command{
    Use:   "replay_console",
    Short: "Replay messages from WAL in a console",
    Run: func(cmd *cobra.Command, args []string) {
        consensus.RunReplayFile(config.BaseConfig, config.Consensus, true)
    },
}

ReplayConsoleCmd allows replaying of messages from the WAL in a console.

var ResetAllCmd = &cobra.Command{
    Use:   "unsafe_reset_all",
    Short: "(unsafe) Remove all the data and WAL, reset this node's validator to genesis state",
    Run:   resetAll,
}

ResetAllCmd removes the database of this Tendermint core instance.

var ResetPrivValidatorCmd = &cobra.Command{
    Use:   "unsafe_reset_priv_validator",
    Short: "(unsafe) Reset this node's validator to genesis state",
    Run:   resetPrivValidator,
}

ResetPrivValidatorCmd resets the private validator files.

var RootCmd = &cobra.Command{
    Use:   "tendermint",
    Short: "Tendermint Core (BFT Consensus) in Go",
    PersistentPreRunE: func(cmd *cobra.Command, args []string) (err error) {
        if cmd.Name() == VersionCmd.Name() {
            return nil
        }
        config, err = ParseConfig()
        if err != nil {
            return err
        }
        if config.LogFormat == cfg.LogFormatJSON {
            logger = log.NewTMJSONLogger(log.NewSyncWriter(os.Stdout))
        }
        logger, err = tmflags.ParseLogLevel(config.LogLevel, logger, cfg.DefaultLogLevel())
        if err != nil {
            return err
        }
        if viper.GetBool(cli.TraceFlag) {
            logger = log.NewTracingLogger(logger)
        }
        logger = logger.With("module", "main")
        return nil
    },
}

RootCmd is the root command for Tendermint core.

var ShowNodeIDCmd = &cobra.Command{
    Use:   "show_node_id",
    Short: "Show this node's ID",
    RunE:  showNodeID,
}

ShowNodeIDCmd dumps node's ID to the standard output.

var ShowValidatorCmd = &cobra.Command{
    Use:   "show_validator",
    Short: "Show this node's validator info",
    RunE:  showValidator,
}

ShowValidatorCmd adds capabilities for showing the validator info.

var TestnetFilesCmd = &cobra.Command{
    Use:   "testnet",
    Short: "Initialize files for a Tendermint testnet",
    Long:  "" /* 422 byte string literal not displayed */,

    RunE: testnetFiles,
}

TestnetFilesCmd allows initialisation of files for a Tendermint testnet.

var VersionCmd = &cobra.Command{
    Use:   "version",
    Short: "Show version info",
    Run: func(cmd *cobra.Command, args []string) {
        fmt.Println(version.Version)
    },
}

VersionCmd ...

func AddNodeFlags Uses

func AddNodeFlags(cmd *cobra.Command)

AddNodeFlags exposes some common configuration options on the command-line These are exposed for convenience of commands embedding a tendermint node

func EnsureAddrHasSchemeOrDefaultToTCP Uses

func EnsureAddrHasSchemeOrDefaultToTCP(addr string) (string, error)

func NewRunNodeCmd Uses

func NewRunNodeCmd(nodeProvider nm.NodeProvider) *cobra.Command

NewRunNodeCmd returns the command that allows the CLI to start a node. It can be used with a custom PrivValidator and in-process ABCI application.

func ParseConfig Uses

func ParseConfig() (*cfg.Config, error)

ParseConfig retrieves the default environment configuration, sets up the Tendermint root and ensures that the root exists

func ResetAll Uses

func ResetAll(dbDir, addrBookFile, privValKeyFile, privValStateFile string, logger log.Logger)

ResetAll removes address book files plus all data, and resets the privValdiator data. Exported so other CLI tools can use it.

Package commands imports 26 packages (graph) and is imported by 14 packages. Updated 2019-08-12. Refresh now. Tools for package owners.