nodecmd

package
v1.10.2 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2023 License: GPL-3.0 Imports: 36 Imported by: 51

Documentation

Overview

Package nodecmd contains command definitions and related functions used for node cmds, such as kcn, kpn, and ken.

Source Files

Each file contains following contents

  • accountcmd.go : Provides functions for creating, updating and importing an account.
  • chaincmd.go : Provides functions to `init` a block chain,
  • consolecmd.go : Provides console functions `attach` and `console`
  • migrationcmd.go : Provides functions of DB migration
  • defaultcmd.go : Provides functions to start a node
  • dumpconfigcmd.go : Provides functions to dump and print current config to stdout
  • nodeflags.go : Defines various flags that configure the node
  • versioncmd.go : Provides functions to print application's version

Index

Constants

This section is empty.

Variables

View Source
var (
	InitCommand = cli.Command{
		Action:    utils.MigrateFlags(initGenesis),
		Name:      "init",
		Usage:     "Bootstrap and initialize a new genesis block",
		ArgsUsage: "<genesisPath>",
		Flags: []cli.Flag{
			utils.DbTypeFlag,
			utils.SingleDBFlag,
			utils.NumStateTrieShardsFlag,
			utils.DynamoDBTableNameFlag,
			utils.DynamoDBRegionFlag,
			utils.DynamoDBIsProvisionedFlag,
			utils.DynamoDBReadCapacityFlag,
			utils.DynamoDBWriteCapacityFlag,
			utils.DynamoDBReadOnlyFlag,
			utils.LevelDBCompressionTypeFlag,
			utils.DataDirFlag,
			utils.OverwriteGenesisFlag,
		},
		Category: "BLOCKCHAIN COMMANDS",
		Description: `
The init command initializes a new genesis block and definition for the network.
This is a destructive action and changes the network in which you will be
participating.

It expects the genesis file as argument.`,
	}

	DumpGenesisCommand = cli.Command{
		Action:    utils.MigrateFlags(dumpGenesis),
		Name:      "dumpgenesis",
		Usage:     "Dumps genesis block JSON configuration to stdout",
		ArgsUsage: "",
		Flags: []cli.Flag{
			utils.CypressFlag,
			utils.BaobabFlag,
		},
		Category: "BLOCKCHAIN COMMANDS",
		Description: `
The dumpgenesis command dumps the genesis block configuration in JSON format to stdout.`,
	}
)
View Source
var (
	ConsoleFlags = []cli.Flag{
		altsrc.NewStringFlag(utils.JSpathFlag),
		altsrc.NewStringFlag(utils.ExecFlag),
		altsrc.NewStringFlag(utils.PreloadJSFlag),
	}

	AttachCommand = cli.Command{
		Action:    utils.MigrateFlags(remoteConsole),
		Name:      "attach",
		Usage:     "Start an interactive JavaScript environment (connect to node)",
		ArgsUsage: "[endpoint]",
		Flags:     append(ConsoleFlags, utils.DataDirFlag),
		Category:  "CONSOLE COMMANDS",
		Description: `
The Klaytn console is an interactive shell for the JavaScript runtime environment
which exposes a node admin interface as well as the Ðapp JavaScript API.
See https://github.com/ethereum/go-ethereum/wiki/JavaScript-Console.
This command allows to open a console on a running Klaytn node.`,
	}
)
View Source
var AccountCommand = cli.Command{
	Name:     "account",
	Usage:    "Manage accounts",
	Category: "ACCOUNT COMMANDS",
	Description: `

Manage accounts, list all existing accounts, import a private key into a new
account, create a new account or update an existing account.

It supports interactive mode, when you are prompted for password as well as
non-interactive mode where passwords are supplied via a given password file.
Non-interactive mode is only meant for scripted use on test networks or known
safe environments.

Make sure you remember the password you gave when creating a new account (with
either new or import). Without it you are not able to unlock your account.

Note that exporting your key in unencrypted format is NOT supported.

Keys are stored under <DATADIR>/keystore.
It is safe to transfer the entire directory or the individual keys therein
between klay nodes by simply copying.

Make sure you backup your keys regularly.`,
	Subcommands: []cli.Command{
		{
			Name:   "list",
			Usage:  "Print summary of existing accounts",
			Action: utils.MigrateFlags(accountList),
			Flags: []cli.Flag{
				utils.DataDirFlag,
				utils.KeyStoreDirFlag,
			},
			Description: `
Print a short summary of all accounts`,
		},
		{
			Name:   "new",
			Usage:  "Create a new account",
			Action: utils.MigrateFlags(accountCreate),
			Flags: []cli.Flag{
				utils.DataDirFlag,
				utils.KeyStoreDirFlag,
				utils.PasswordFileFlag,
				utils.LightKDFFlag,
			},
			Description: `
    klay account new

Creates a new account and prints the address.

The account is saved in encrypted format, you are prompted for a passphrase.

You must remember this passphrase to unlock your account in the future.

For non-interactive use the passphrase can be specified with the --password flag:

Note, this is meant to be used for testing only, it is a bad idea to save your
password to file or expose in any other way.
`,
		},
		{
			Name:      "update",
			Usage:     "Update an existing account",
			Action:    utils.MigrateFlags(accountUpdate),
			ArgsUsage: "<address>",
			Flags: []cli.Flag{
				utils.DataDirFlag,
				utils.KeyStoreDirFlag,
				utils.LightKDFFlag,
			},
			Description: `
    klay account update <address>

Update an existing account.

The account is saved in the newest version in encrypted format, you are prompted
for a passphrase to unlock the account and another to save the updated file.

This same command can therefore be used to migrate an account of a deprecated
format to the newest format or change the password for an account.

For non-interactive use the passphrase can be specified with the --password flag:

    klay account update [options] <address>

Since only one password can be given, only format update can be performed,
changing your password is only possible interactively.
`,
		},
		{
			Name:   "import",
			Usage:  "Import a private key into a new account",
			Action: utils.MigrateFlags(accountImport),
			Flags: []cli.Flag{
				utils.DataDirFlag,
				utils.KeyStoreDirFlag,
				utils.PasswordFileFlag,
				utils.LightKDFFlag,
			},
			ArgsUsage: "<keyFile>",
			Description: `
    klay account import <keyfile>

Imports an unencrypted private key from <keyfile> and creates a new account.
Prints the address.

The keyfile is assumed to contain an unencrypted private key in hexadecimal format.

The account is saved in encrypted format, you are prompted for a passphrase.

You must remember this passphrase to unlock your account in the future.

For non-interactive use the passphrase can be specified with the -password flag:

    klay account import [options] <keyfile>

Note:
As you can directly copy your encrypted accounts to another klay instance,
this import mechanism is not needed when you transfer an account between
nodes.
`,
		},
	},
}
View Source
var ChainDataFetcherFlags = []cli.Flag{
	altsrc.NewBoolFlag(utils.EnableChainDataFetcherFlag),
	altsrc.NewStringFlag(utils.ChainDataFetcherMode),
	altsrc.NewBoolFlag(utils.ChainDataFetcherNoDefault),
	altsrc.NewIntFlag(utils.ChainDataFetcherNumHandlers),
	altsrc.NewIntFlag(utils.ChainDataFetcherJobChannelSize),
	altsrc.NewIntFlag(utils.ChainDataFetcherChainEventSizeFlag),
	altsrc.NewIntFlag(utils.ChainDataFetcherMaxProcessingDataSize),
	altsrc.NewStringFlag(utils.ChainDataFetcherKASDBHostFlag),
	altsrc.NewStringFlag(utils.ChainDataFetcherKASDBPortFlag),
	altsrc.NewStringFlag(utils.ChainDataFetcherKASDBNameFlag),
	altsrc.NewStringFlag(utils.ChainDataFetcherKASDBUserFlag),
	altsrc.NewStringFlag(utils.ChainDataFetcherKASDBPasswordFlag),
	altsrc.NewBoolFlag(utils.ChainDataFetcherKASCacheUse),
	altsrc.NewStringFlag(utils.ChainDataFetcherKASCacheURLFlag),
	altsrc.NewStringFlag(utils.ChainDataFetcherKASXChainIdFlag),
	altsrc.NewStringFlag(utils.ChainDataFetcherKASBasicAuthParamFlag),
	altsrc.NewInt64Flag(utils.ChainDataFetcherKafkaReplicasFlag),
	altsrc.NewStringSliceFlag(utils.ChainDataFetcherKafkaBrokersFlag),
	altsrc.NewIntFlag(utils.ChainDataFetcherKafkaPartitionsFlag),
	altsrc.NewStringFlag(utils.ChainDataFetcherKafkaTopicResourceFlag),
	altsrc.NewStringFlag(utils.ChainDataFetcherKafkaTopicEnvironmentFlag),
	altsrc.NewInt64Flag(utils.ChainDataFetcherKafkaMaxMessageBytesFlag),
	altsrc.NewIntFlag(utils.ChainDataFetcherKafkaSegmentSizeBytesFlag),
	altsrc.NewIntFlag(utils.ChainDataFetcherKafkaRequiredAcksFlag),
	altsrc.NewStringFlag(utils.ChainDataFetcherKafkaMessageVersionFlag),
	altsrc.NewStringFlag(utils.ChainDataFetcherKafkaProducerIdFlag),
}
View Source
var CommonNodeFlags = []cli.Flag{
	utils.ConfFlag,
	altsrc.NewBoolFlag(utils.NtpDisableFlag),
	altsrc.NewStringFlag(utils.NtpServerFlag),
	altsrc.NewStringFlag(utils.BootnodesFlag),
	altsrc.NewStringFlag(utils.IdentityFlag),
	altsrc.NewStringFlag(utils.UnlockedAccountFlag),
	altsrc.NewStringFlag(utils.PasswordFileFlag),
	altsrc.NewStringFlag(utils.DbTypeFlag),
	utils.NewWrappedDirectoryFlag(utils.DataDirFlag),
	altsrc.NewBoolFlag(utils.OverwriteGenesisFlag),
	altsrc.NewUint64Flag(utils.StartBlockNumberFlag),
	utils.NewWrappedDirectoryFlag(utils.KeyStoreDirFlag),
	altsrc.NewBoolFlag(utils.TxPoolNoLocalsFlag),
	altsrc.NewBoolFlag(utils.TxPoolAllowLocalAnchorTxFlag),
	altsrc.NewBoolFlag(utils.TxPoolDenyRemoteTxFlag),
	altsrc.NewStringFlag(utils.TxPoolJournalFlag),
	altsrc.NewDurationFlag(utils.TxPoolJournalIntervalFlag),
	altsrc.NewUint64Flag(utils.TxPoolPriceLimitFlag),
	altsrc.NewUint64Flag(utils.TxPoolPriceBumpFlag),
	altsrc.NewUint64Flag(utils.TxPoolExecSlotsAccountFlag),
	altsrc.NewUint64Flag(utils.TxPoolExecSlotsAllFlag),
	altsrc.NewUint64Flag(utils.TxPoolNonExecSlotsAccountFlag),
	altsrc.NewUint64Flag(utils.TxPoolNonExecSlotsAllFlag),
	altsrc.NewDurationFlag(utils.TxPoolLifetimeFlag),
	altsrc.NewBoolFlag(utils.TxPoolKeepLocalsFlag),
	utils.NewWrappedTextMarshalerFlag(utils.SyncModeFlag),
	altsrc.NewStringFlag(utils.GCModeFlag),
	altsrc.NewBoolFlag(utils.LightKDFFlag),
	altsrc.NewBoolFlag(utils.SingleDBFlag),
	altsrc.NewUintFlag(utils.NumStateTrieShardsFlag),
	altsrc.NewIntFlag(utils.LevelDBCompressionTypeFlag),
	altsrc.NewBoolFlag(utils.LevelDBNoBufferPoolFlag),
	altsrc.NewBoolFlag(utils.DBNoPerformanceMetricsFlag),
	altsrc.NewStringFlag(utils.DynamoDBTableNameFlag),
	altsrc.NewStringFlag(utils.DynamoDBRegionFlag),
	altsrc.NewBoolFlag(utils.DynamoDBIsProvisionedFlag),
	altsrc.NewInt64Flag(utils.DynamoDBReadCapacityFlag),
	altsrc.NewInt64Flag(utils.DynamoDBWriteCapacityFlag),
	altsrc.NewBoolFlag(utils.DynamoDBReadOnlyFlag),
	altsrc.NewIntFlag(utils.LevelDBCacheSizeFlag),
	altsrc.NewBoolFlag(utils.NoParallelDBWriteFlag),
	altsrc.NewBoolFlag(utils.SenderTxHashIndexingFlag),
	altsrc.NewIntFlag(utils.TrieMemoryCacheSizeFlag),
	altsrc.NewUintFlag(utils.TrieBlockIntervalFlag),
	altsrc.NewUint64Flag(utils.TriesInMemoryFlag),
	altsrc.NewIntFlag(utils.CacheTypeFlag),
	altsrc.NewIntFlag(utils.CacheScaleFlag),
	altsrc.NewStringFlag(utils.CacheUsageLevelFlag),
	altsrc.NewIntFlag(utils.MemorySizeFlag),
	altsrc.NewStringFlag(utils.TrieNodeCacheTypeFlag),
	altsrc.NewIntFlag(utils.NumFetcherPrefetchWorkerFlag),
	altsrc.NewBoolFlag(utils.UseSnapshotForPrefetchFlag),
	altsrc.NewIntFlag(utils.TrieNodeCacheLimitFlag),
	altsrc.NewDurationFlag(utils.TrieNodeCacheSavePeriodFlag),
	altsrc.NewStringSliceFlag(utils.TrieNodeCacheRedisEndpointsFlag),
	altsrc.NewBoolFlag(utils.TrieNodeCacheRedisClusterFlag),
	altsrc.NewBoolFlag(utils.TrieNodeCacheRedisPublishBlockFlag),
	altsrc.NewBoolFlag(utils.TrieNodeCacheRedisSubscribeBlockFlag),
	altsrc.NewIntFlag(utils.ListenPortFlag),
	altsrc.NewIntFlag(utils.SubListenPortFlag),
	altsrc.NewBoolFlag(utils.MultiChannelUseFlag),
	altsrc.NewIntFlag(utils.MaxConnectionsFlag),
	altsrc.NewIntFlag(utils.MaxRequestContentLengthFlag),
	altsrc.NewIntFlag(utils.MaxPendingPeersFlag),
	altsrc.NewUint64Flag(utils.TargetGasLimitFlag),
	altsrc.NewStringFlag(utils.NATFlag),
	altsrc.NewBoolFlag(utils.NoDiscoverFlag),
	altsrc.NewDurationFlag(utils.RWTimerWaitTimeFlag),
	altsrc.NewUint64Flag(utils.RWTimerIntervalFlag),
	altsrc.NewStringFlag(utils.NetrestrictFlag),
	altsrc.NewStringFlag(utils.NodeKeyFileFlag),
	altsrc.NewStringFlag(utils.NodeKeyHexFlag),
	altsrc.NewBoolFlag(utils.VMEnableDebugFlag),
	altsrc.NewIntFlag(utils.VMLogTargetFlag),
	altsrc.NewBoolFlag(utils.VMTraceInternalTxFlag),
	altsrc.NewUint64Flag(utils.NetworkIdFlag),
	altsrc.NewStringFlag(utils.RPCCORSDomainFlag),
	altsrc.NewStringFlag(utils.RPCVirtualHostsFlag),
	altsrc.NewBoolFlag(utils.RPCNonEthCompatibleFlag),
	altsrc.NewBoolFlag(utils.MetricsEnabledFlag),
	altsrc.NewBoolFlag(utils.PrometheusExporterFlag),
	altsrc.NewIntFlag(utils.PrometheusExporterPortFlag),
	altsrc.NewStringFlag(utils.ExtraDataFlag),
	altsrc.NewStringFlag(utils.SrvTypeFlag),
	altsrc.NewBoolFlag(utils.AutoRestartFlag),
	altsrc.NewDurationFlag(utils.RestartTimeOutFlag),
	altsrc.NewStringFlag(utils.DaemonPathFlag),
	altsrc.NewStringFlag(utils.ConfigFileFlag),
	altsrc.NewIntFlag(utils.APIFilterGetLogsMaxItemsFlag),
	altsrc.NewDurationFlag(utils.APIFilterGetLogsDeadlineFlag),
	altsrc.NewUint64Flag(utils.OpcodeComputationCostLimitFlag),
	altsrc.NewBoolFlag(utils.SnapshotFlag),
	altsrc.NewIntFlag(utils.SnapshotCacheSizeFlag),
	altsrc.NewBoolTFlag(utils.SnapshotAsyncGen),
}

Common flags that configure the node

Common RPC flags

View Source
var KSENFlags = []cli.Flag{
	altsrc.NewStringFlag(utils.ServiceChainSignerFlag),
	altsrc.NewBoolFlag(utils.ChildChainIndexingFlag),
	altsrc.NewBoolFlag(utils.MainBridgeFlag),
	altsrc.NewIntFlag(utils.MainBridgeListenPortFlag),
	altsrc.NewBoolFlag(utils.SubBridgeFlag),
	altsrc.NewIntFlag(utils.SubBridgeListenPortFlag),
	altsrc.NewUint64Flag(utils.AnchoringPeriodFlag),
	altsrc.NewUint64Flag(utils.SentChainTxsLimit),
	altsrc.NewIntFlag(utils.ParentChainIDFlag),
	altsrc.NewBoolFlag(utils.VTRecoveryFlag),
	altsrc.NewUint64Flag(utils.VTRecoveryIntervalFlag),
	altsrc.NewBoolFlag(utils.ServiceChainAnchoringFlag),
	altsrc.NewBoolFlag(utils.KESNodeTypeServiceFlag),
	altsrc.NewUint64Flag(utils.ServiceChainParentOperatorTxGasLimitFlag),
	altsrc.NewUint64Flag(utils.ServiceChainChildOperatorTxGasLimitFlag),

	altsrc.NewBoolFlag(utils.KASServiceChainAnchorFlag),
	altsrc.NewUint64Flag(utils.KASServiceChainAnchorPeriodFlag),
	altsrc.NewStringFlag(utils.KASServiceChainAnchorUrlFlag),
	altsrc.NewStringFlag(utils.KASServiceChainAnchorOperatorFlag),
	altsrc.NewStringFlag(utils.KASServiceChainSecretKeyFlag),
	altsrc.NewStringFlag(utils.KASServiceChainAccessKeyFlag),
	altsrc.NewStringFlag(utils.KASServiceChainXChainIdFlag),
	altsrc.NewDurationFlag(utils.KASServiceChainAnchorRequestTimeoutFlag),

	altsrc.NewBoolFlag(utils.EnableDBSyncerFlag),
	altsrc.NewStringFlag(utils.DBHostFlag),
	altsrc.NewStringFlag(utils.DBPortFlag),
	altsrc.NewStringFlag(utils.DBNameFlag),
	altsrc.NewStringFlag(utils.DBUserFlag),
	altsrc.NewStringFlag(utils.DBPasswordFlag),
	altsrc.NewBoolFlag(utils.EnabledLogModeFlag),
	altsrc.NewIntFlag(utils.MaxIdleConnsFlag),
	altsrc.NewIntFlag(utils.MaxOpenConnsFlag),
	altsrc.NewDurationFlag(utils.ConnMaxLifeTimeFlag),
	altsrc.NewIntFlag(utils.BlockSyncChannelSizeFlag),
	altsrc.NewStringFlag(utils.DBSyncerModeFlag),
	altsrc.NewIntFlag(utils.GenQueryThreadFlag),
	altsrc.NewIntFlag(utils.InsertThreadFlag),
	altsrc.NewIntFlag(utils.BulkInsertSizeFlag),
	altsrc.NewStringFlag(utils.EventModeFlag),
	altsrc.NewUint64Flag(utils.MaxBlockDiffFlag),
	altsrc.NewUint64Flag(utils.TxResendIntervalFlag),
	altsrc.NewIntFlag(utils.TxResendCountFlag),
	altsrc.NewBoolFlag(utils.TxResendUseLegacyFlag),
}
View Source
var (
	MigrationCommand = cli.Command{
		Name:     "db-migration",
		Usage:    "db migration",
		Flags:    []cli.Flag{},
		Category: "DB MIGRATION COMMANDS",
		Description: `
The migration command migrates a DB to another DB.
The type of DBs can be different.
(e.g. LevelDB -> LevelDB, LevelDB -> BadgerDB, LevelDB -> DynamoDB)
Note: This feature is only provided when srcDB is single LevelDB.
Note: Do not use db migration while a node is executing.
`,
		Subcommands: []cli.Command{
			{
				Name:   "start",
				Usage:  "Start db migration",
				Flags:  dbMigrationFlags,
				Action: utils.MigrateFlags(startMigration),
				Description: `
This command starts DB migration.

Even if db dir names are changed in srcDB, the original db dir names are used in dstDB.
(e.g. use 'statetrie' instead of 'statetrie_migrated_xxxxx')
If dst db is singleDB, you should set dst.datadir or db.dst.dynamo.tablename
to the original db dir name.
(e.g. Data dir : 'chaindata/klay/statetrie', Dynamo table name : 'klaytn-statetrie')

Note: This feature is only provided when srcDB is single LevelDB.`,
			},
		},
	}
)
View Source
var SnapshotCommand = cli.Command{
	Name:        "snapshot",
	Usage:       "A set of commands based on the snapshot",
	Description: "",
	Subcommands: []cli.Command{
		{
			Name:      "verify-state",
			Usage:     "Recalculate state hash based on the snapshot for verification",
			ArgsUsage: "<root>",
			Action:    utils.MigrateFlags(verifyState),
			Flags: []cli.Flag{
				utils.DbTypeFlag,
				utils.SingleDBFlag,
				utils.NumStateTrieShardsFlag,
				utils.DynamoDBTableNameFlag,
				utils.DynamoDBRegionFlag,
				utils.DynamoDBIsProvisionedFlag,
				utils.DynamoDBReadCapacityFlag,
				utils.DynamoDBWriteCapacityFlag,
				utils.LevelDBCompressionTypeFlag,
				utils.DataDirFlag,
			},
			Description: `
klay snapshot verify-state <state-root>
will traverse the whole accounts and storages set based on the specified
snapshot and recalculate the root hash of state for verification.
In other words, this command does the snapshot to trie conversion.
`,
		},
		{
			Name:      "trace-trie",
			Usage:     "trace all trie nodes for verification",
			ArgsUsage: "<root>",
			Action:    utils.MigrateFlags(traceTrie),
			Flags: []cli.Flag{
				utils.DbTypeFlag,
				utils.SingleDBFlag,
				utils.NumStateTrieShardsFlag,
				utils.DynamoDBTableNameFlag,
				utils.DynamoDBRegionFlag,
				utils.DynamoDBIsProvisionedFlag,
				utils.DynamoDBReadCapacityFlag,
				utils.DynamoDBWriteCapacityFlag,
				utils.LevelDBCompressionTypeFlag,
				utils.DataDirFlag,
			},
			Description: `
klaytn statedb trace-trie <state-root>
trace all account and storage nodes to find missing data
during the migration process.
Start tracing from the state root of the last block,
reading all nodes and logging the missing nodes.
`,
		},
		{
			Name:      "iterate-triedb",
			Usage:     "Iterate StateTrie DB for node count",
			ArgsUsage: "<root>",
			Action:    utils.MigrateFlags(iterateTrie),
			Flags: []cli.Flag{
				utils.DbTypeFlag,
				utils.SingleDBFlag,
				utils.NumStateTrieShardsFlag,
				utils.DynamoDBTableNameFlag,
				utils.DynamoDBRegionFlag,
				utils.DynamoDBIsProvisionedFlag,
				utils.DynamoDBReadCapacityFlag,
				utils.DynamoDBWriteCapacityFlag,
				utils.LevelDBCompressionTypeFlag,
				utils.DataDirFlag,
			},
			Description: `
klaytn statedb iterate-triedb
Count the number of nodes in the state-trie db.
`,
		},
	},
}
View Source
var VersionCommand = cli.Command{
	Action:    utils.MigrateFlags(version),
	Name:      "version",
	Usage:     "Show version number",
	ArgsUsage: " ",
	Category:  "MISCELLANEOUS COMMANDS",
}

Functions

func BeforeRunBootnode

func BeforeRunBootnode(ctx *cli.Context) error

func BeforeRunNode added in v1.9.1

func BeforeRunNode(ctx *cli.Context) error

func CheckCommands

func CheckCommands(ctx *cli.Context) error

func CommandNotExist

func CommandNotExist(ctx *cli.Context, s string)

func FlagsFromYaml added in v1.9.1

func FlagsFromYaml(ctx *cli.Context) error

func GetConsoleCommand

func GetConsoleCommand(nodeFlags, rpcFlags []cli.Flag) cli.Command

GetConsoleCommand returns cli.Command `console` whose flags are initialized with nodeFlags, rpcFlags, and ConsoleFlags.

func GetDumpConfigCommand

func GetDumpConfigCommand(nodeFlags, rpcFlags []cli.Flag) cli.Command

GetDumpConfigCommand returns cli.Command `dumpconfig` whose flags are initialized with nodeFlags and rpcFlags.

func GetGitCommit

func GetGitCommit() string

GetGitCommit returns gitCommit set by linker flags.

func KcnAppFlags added in v1.9.1

func KcnAppFlags() []cli.Flag

func KcnNodeFlags added in v1.9.1

func KcnNodeFlags() []cli.Flag

All flags used for each node type

func KenAppFlags added in v1.9.1

func KenAppFlags() []cli.Flag

func KenNodeFlags added in v1.9.1

func KenNodeFlags() []cli.Flag

func KpnAppFlags added in v1.9.1

func KpnAppFlags() []cli.Flag

func KpnNodeFlags added in v1.9.1

func KpnNodeFlags() []cli.Flag

func KscnAppFlags added in v1.9.1

func KscnAppFlags() []cli.Flag

func KscnNodeFlags added in v1.9.1

func KscnNodeFlags() []cli.Flag

func KsenAppFlags added in v1.9.1

func KsenAppFlags() []cli.Flag

func KsenNodeFlags added in v1.9.1

func KsenNodeFlags() []cli.Flag

func KspnAppFlags added in v1.9.1

func KspnAppFlags() []cli.Flag

func KspnNodeFlags added in v1.9.1

func KspnNodeFlags() []cli.Flag

func MakeFullNode

func MakeFullNode(ctx *cli.Context) *node.Node

func MakeGenesis added in v1.10.0

func MakeGenesis(ctx *cli.Context) *blockchain.Genesis

func OnUsageError

func OnUsageError(context *cli.Context, err error, isSubcommand bool) error

func RunKlaytnNode

func RunKlaytnNode(ctx *cli.Context) error

runKlaytnNode is the main entry point into the system if no special subcommand is ran. It creates a default node based on the command line arguments and runs it in blocking mode, waiting for it to be shut down.

func UnlockAccount

func UnlockAccount(ctx *cli.Context, ks *keystore.KeyStore, address string, i int, passwords []string) (accounts.Account, string)

tries unlocking the specified account a few times.

func ValidateGenesisConfig added in v1.6.0

func ValidateGenesisConfig(g *blockchain.Genesis) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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