Documentation
¶
Overview ¶
Package cli contains framework for building a command-line based turbo-geth node.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( DatabaseFlag = cli.StringFlag{ Name: "database", Usage: "Which database software to use? Currently supported values: lmdb|mdbx", Value: "lmdb", } CacheSizeFlag = cli.StringFlag{ Name: "cacheSize", Usage: "Cache size for the execution stage", Value: "0", } BatchSizeFlag = cli.StringFlag{ Name: "batchSize", Usage: "Batch size for the execution stage", Value: "512M", } EtlBufferSizeFlag = cli.StringFlag{ Name: "etl.bufferSize", Usage: "Buffer size for ETL operations.", Value: etl.BufferOptimalSize.String(), } PrivateApiAddr = cli.StringFlag{ Name: "private.api.addr", Usage: "private api network address, for example: 127.0.0.1:9090, empty string means not to start the listener. do not expose to public network. serves remote database interface", Value: "", } StorageModeFlag = cli.StringFlag{ Name: "storage-mode", Usage: `Configures the storage mode of the app: * h - write history to the DB * r - write receipts to the DB * t - write tx lookup index to the DB`, Value: ethdb.DefaultStorageMode.ToString(), } SnapshotModeFlag = cli.StringFlag{ Name: "snapshot.mode", Usage: `Configures the snapshot mode of the app: * h - download headers snapshot * b - download bodies snapshot * s - download state snapshot * r - download receipts snapshot `, Value: snapshotsync.DefaultSnapshotMode.ToString(), } SeedSnapshotsFlag = cli.BoolTFlag{ Name: "snapshot.seed", Usage: `Seed snapshot seeding(default: true)`, } ExternalSnapshotDownloaderAddrFlag = cli.StringFlag{ Name: "snapshot.downloader.addr", Usage: `enable external snapshot downloader`, } // LMDB flags LMDBMapSizeFlag = cli.StringFlag{ Name: "lmdb.mapSize", Usage: "Sets Memory map size. Lower it if you have issues with opening the DB", Value: ethdb.LMDBDefaultMapSize.String(), } LMDBMaxFreelistReuseFlag = cli.UintFlag{ Name: "lmdb.maxFreelistReuse", Usage: "Find a big enough contiguous page range for large values in freelist is hard just allocate new pages and even don't try to search if value is bigger than this limit. Measured in pages.", Value: ethdb.LMDBDefaultMaxFreelistReuse, } // mTLS flags TLSFlag = cli.BoolFlag{ Name: "tls", Usage: "Enable TLS handshake", } TLSCertFlag = cli.StringFlag{ Name: "tls.cert", Usage: "Specify certificate", Value: "", } TLSKeyFlag = cli.StringFlag{ Name: "tls.key", Usage: "Specify key file", Value: "", } TLSCACertFlag = cli.StringFlag{ Name: "tls.cacert", Usage: "Specify certificate authority", Value: "", } SilkwormFlag = cli.StringFlag{ Name: "silkworm", Usage: "File path of libsilkworm_tg_api dynamic library (default = do not use Silkworm)", Value: "", } )
var DefaultFlags = []cli.Flag{ utils.DataDirFlag, utils.KeyStoreDirFlag, utils.EthashDatasetDirFlag, utils.TxPoolLocalsFlag, utils.TxPoolNoLocalsFlag, utils.TxPoolJournalFlag, utils.TxPoolRejournalFlag, utils.TxPoolPriceLimitFlag, utils.TxPoolPriceBumpFlag, utils.TxPoolAccountSlotsFlag, utils.TxPoolGlobalSlotsFlag, utils.TxPoolAccountQueueFlag, utils.TxPoolGlobalQueueFlag, utils.TxPoolLifetimeFlag, utils.TxLookupLimitFlag, StorageModeFlag, SnapshotModeFlag, SeedSnapshotsFlag, ExternalSnapshotDownloaderAddrFlag, CacheSizeFlag, BatchSizeFlag, DatabaseFlag, PrivateApiAddr, EtlBufferSizeFlag, LMDBMapSizeFlag, LMDBMaxFreelistReuseFlag, TLSFlag, TLSCertFlag, TLSKeyFlag, TLSCACertFlag, utils.ListenPortFlag, utils.NATFlag, utils.NoDiscoverFlag, utils.DiscoveryV5Flag, utils.NetrestrictFlag, utils.NodeKeyFileFlag, utils.NodeKeyHexFlag, utils.DNSDiscoveryFlag, utils.RopstenFlag, utils.RinkebyFlag, utils.GoerliFlag, utils.YoloV3Flag, utils.VMEnableDebugFlag, utils.NetworkIdFlag, utils.FakePoWFlag, utils.GpoBlocksFlag, utils.GpoPercentileFlag, utils.EWASMInterpreterFlag, utils.EVMInterpreterFlag, utils.InsecureUnlockAllowedFlag, utils.MetricsEnabledFlag, utils.MetricsEnabledExpensiveFlag, utils.MetricsHTTPFlag, utils.MetricsPortFlag, utils.IdentityFlag, SilkwormFlag, }
DefaultFlags contains all flags that are used and supported by turbo-geth binary.
Functions ¶
func MakeApp ¶
MakeApp creates a cli application (based on `github.com/urlfave/cli` package). The application exits when `action` returns. Parameters: * action: the main function for the application. receives `*cli.Context` with parsed command-line flags. Returns no error, if some error could not be recovered from write to the log or panic. * cliFlags: the list of flags `cli.Flag` that the app should set and parse. By default, use `DefaultFlags()`. If you want to specify your own flag, use `append(DefaultFlags(), myFlag)` for this parameter.
Types ¶
This section is empty.