commands

package
v0.0.0-...-be384fd Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: Apache-2.0 Imports: 61 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var VersionCmd *cobra.Command = func() *cobra.Command {
	verbose := false
	cmd := &cobra.Command{
		Use:   "version",
		Short: "Show version info",

		Run: func(cmd *cobra.Command, args []string) {
			cmd.Println(version.TMCoreSemVer)
			if verbose {
				cmd.Println("Go version: " + runtime.Version())
				if deadlock.Opts.Disable {
					cmd.Println("Deadlock detection: disabled")
				} else {
					cmd.Println("Deadlock detection: enabled, timeout: ", deadlock.Opts.DeadlockTimeout.String())
				}
			}
		},
	}
	cmd.Flags().BoolVarP(&verbose, "verbose", "v", false, "display additional compilation info")
	return cmd
}()

VersionCmd ...

Functions

func AddNodeFlags

func AddNodeFlags(cmd *cobra.Command, conf *cfg.Config)

AddNodeFlags exposes some common configuration options from conf in the flag set for cmd. This is a convenience for commands embedding a Tendermint node.

func MakeCompactDBCommand

func MakeCompactDBCommand(cfg *config.Config, logger log.Logger) *cobra.Command

func MakeGenNodeKeyCommand

func MakeGenNodeKeyCommand(*config.Config, log.Logger) *cobra.Command

MakeGenNodeKeyCommand creates command that allows the generation of a node key. It prints JSON-encoded NodeKey to the standard output.

func MakeGenValidatorCommand

func MakeGenValidatorCommand() *cobra.Command

MakeGenValidatorCommand allows the generation of a keypair for a validator.

func MakeInitFilesCommand

func MakeInitFilesCommand(conf *config.Config, logger log.Logger) *cobra.Command

MakeInitFilesCommand returns the command to initialize a fresh Tendermint Core instance.

func MakeInspectCommand

func MakeInspectCommand(conf *config.Config, logger log.Logger) *cobra.Command

InspectCmd constructs the command to start an inspect server.

func MakeKeyMigrateCommand

func MakeKeyMigrateCommand(conf *config.Config, logger log.Logger) *cobra.Command

func MakeLightCommand

func MakeLightCommand(conf *config.Config, logger log.Logger) *cobra.Command

LightCmd constructs the base command called when invoked without any subcommands.

func MakeReindexEventCommand

func MakeReindexEventCommand(conf *tmcfg.Config, logger log.Logger) *cobra.Command

MakeReindexEventCommand constructs a command to re-index events in a block height interval.

func MakeReplayCommand

func MakeReplayCommand(conf *config.Config, logger log.Logger) *cobra.Command

MakeReplayCommand constructs a command to replay messages from the WAL into consensus.

func MakeReplayConsoleCommand

func MakeReplayConsoleCommand(conf *config.Config, logger log.Logger) *cobra.Command

MakeReplayConsoleCommand constructs a command to replay WAL messages to stdout.

func MakeResetCommand

func MakeResetCommand(conf *config.Config, logger log.Logger) *cobra.Command

MakeResetCommand constructs a command that removes the database of the specified Tendermint core instance.

func MakeRollbackStateCommand

func MakeRollbackStateCommand(conf *config.Config) *cobra.Command

func MakeShowNodeIDCommand

func MakeShowNodeIDCommand(conf *config.Config) *cobra.Command

MakeShowNodeIDCommand constructs a command to dump the node ID to stdout.

func MakeShowValidatorCommand

func MakeShowValidatorCommand(conf *config.Config, logger log.Logger) *cobra.Command

MakeShowValidatorCommand constructs a command to show the validator info.

func MakeTestnetFilesCommand

func MakeTestnetFilesCommand(conf *cfg.Config, logger log.Logger) *cobra.Command

MakeTestnetFilesCommand constructs a command to generate testnet config files.

func NewCompletionCmd

func NewCompletionCmd(rootCmd *cobra.Command, hidden bool) *cobra.Command

NewCompletionCmd returns a cobra.Command that generates bash and zsh completion scripts for the given root command. If hidden is true, the command will not show up in the root command's list of available commands.

func NewRunNodeCmd

func NewRunNodeCmd(nodeProvider cfg.ServiceProvider, conf *cfg.Config, logger log.Logger) *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

func ParseConfig(conf *config.Config) (*config.Config, error)

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

func ResetAll

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

ResetAll removes address book files plus all data, and resets the privValdiator data. Exported for extenal CLI usage XXX: this is unsafe and should only suitable for testnets.

func ResetFilePV

func ResetFilePV(privValKeyFile, privValStateFile string, logger log.Logger, _keyType string) error

ResetFilePV loads the file private validator and resets the watermark to 0. If used on an existing network, this can cause the node to double sign. XXX: this is unsafe and should only suitable for testnets.

func ResetPeerStore

func ResetPeerStore(dbDir string) error

ResetPeerStore removes the peer store containing all information used by the tendermint networking layer In the case of a reset, new peers will need to be set either via the config or through the discovery mechanism

func ResetState

func ResetState(dbDir string, logger log.Logger) error

ResetState removes all blocks, tendermint state, indexed transactions and evidence.

func RollbackState

func RollbackState(config *config.Config) (int64, []byte, error)

RollbackState takes the state at the current height n and overwrites it with the state at height n - 1. Note state here refers to tendermint state not application state. Returns the latest state height and app hash alongside an error if there was one.

func RootCommand

func RootCommand(conf *config.Config, logger log.Logger) *cobra.Command

RootCommand constructs the root command-line entry point for Tendermint core.

func RunDatabaseMigration

func RunDatabaseMigration(ctx context.Context, logger log.Logger, conf *config.Config) error

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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