Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use the Geth command

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article is about how to use the Geth command. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Command usage geth [options] command [command options] [parameters …] Version: 1.7.3-stable command: account management account attach starts interactive JavaScript environment (connect to node) bug escalates bug Issuesconsole starts interactive JavaScript environment copydb creates local chain from folder dump Dump (analysis) a specific block storage dumpconfig display configuration value export export block chain to file import import a block chain file init startup Move and initialize a new Genesis block js to execute the specified JavaScript file (multiple) license display license information makecache generate ethash verification cache (for testing) makedag generate ethash mining DAG (for testing) monitor monitoring and visualization node indicators removedb delete block chain and state database version print version number wallet management Ethereum pre-sale wallet help H display a command or help a list of commands ETHEREUM options:-- config value TOML configuration file-- data directory for datadir "xxx" database and keystore keys-- keystore keystore storage directory (default in datadir)-- nousb disable monitoring and management of USB hardware wallets-- networkid value network identifiers (integer, 1=Frontier, 2=Morden (deprecated), 3=Ropsten 4=Rinkeby) (default: 1)-- testnet Ropsten network: preconfigured POW (proof-of-work) test network-- rinkeby Rinkeby network: pre-configured POA (proof-of-authority) test network-- syncmode "fast" synchronization mode ("fast", "full") Or "light")-- ethstats value reports ethstats service URL (nodename:secret [@ host] (https://my.oschina.net/u/116016):port)--identity value Custom Node name-- maximum percentage of LES request time allowed by lightserv value (0-90) (default: 0)-- maximum number of LES client peers in lightpeers value (default: 20)-- lightkdf Reduce key-derivation RAM&CPU usage developer (mode) option in KDF intensity consumption:-- dev uses POA consensus network A developer account is pre-allocated by default and mining is automatically opened. -- Mining cycle in dev.period value developer mode (0 = only when trading) (default: 0) ETHASH option:-- ethash.cachedir ethash verification cache directory (default = datadir directory)-- recent number of ethash caches saved by ethash.cachesinmem value in memory (each cache 16MB) (default: 2)-- ethash.cachesondisk value The most recent number of ethash caches saved on disk (16MB per cache) (default: 3)-- ethash.dagdir "" save ethash DAGs directory (default = user hom directory)-- recent number of ethash DAGs saved by ethash.dagsinmem value in memory (above each 1GB) (default: 1)-- ethash.dagsondisk value When the most recent number of ethash DAGs saved on disk (more than each 1GB) (default: 2) transaction pool option:-- txpool.nolocals disables price exemption for locally submitted transactions-- disk logs for txpool.journal value local transactions: for node restart (default: "transactions.rlp")-when txpool.rejournal value regenerates local transaction logs Interval (default: 1 hour)-minimum gas price limit for txpool.pricelimit value to join the trading pool (default: 1)-percentage of txpool.pricebump value price fluctuation (relative to previous transactions) (default: 10)-minimum number of trading slots that can be executed per txpool.accountslots value account (default: 16)-maximum number of executable trading slots for all txpool.globalslots value accounts Number of trading slots (default: 4096)-maximum number of non-executable trading slots allowed per txpool.accountqueue value account (default: 64)-maximum number of non-executable trading slots for all accounts in txpool.globalqueue value (default: 1024)-maximum queue time for txpool.lifetime value non-executable transactions (default: 3 hours) performance tuning option:-- cache value Number of memory MB allocated to internal cache Cache value (minimum 16 mb / database mandatory)-trie-cache-gens value maintains the number of trie node generated in memory (default: 120) account option:-- unlock value needs to be unlocked account separated by comma-- password value password file API for non-interactive password entry and console option:-- rpc Enable HTTP-RPC server-rpcaddr value HTTP-RPC server interface address (default: "localhost")-rpcport value HTTP-RPC server listening port (default: 8545)-rpcapi value enable WS-RPC server based on API--ws provided by HTTP-RPC interface-wsaddr value WS-RPC server listening interface address (default: "localhost")-- wsport value WS-RPC server listening port (default: 8546)-- Source allowed for API--wsorigins value websockets requests provided by wsapi value WS-RPC-based interfaces-- ipcdisable disabled IPC-RPC server-- ipcpath IPC socket/pipe file name included in datadir (escaped explicit path)-- list of domain names that rpccorsdomain value allows cross-domain requests (comma-separated) (browser enforcement)-- Root path of jspath loadScript JavaScript load script (default: ".")-exec value executes JavaScript statements (can only be used with console/attach)-preload value List of JavaScript files preloaded into the console (comma separated) network option:-- enode urls (comma separated) for bootnodes value for P2P discovery boot (v4+v5 for light servers)-bootnodesv4 value for enode urls (comma separated) for P2P v4 discovery boot (light server) All nodes)-enode urls (comma separated) (light server, light nodes) used by bootnodesv5 value for P2P v5 discovery boot-port value Nic listening port (default: 30303)-maximum number of network nodes in maxpeers value (if set to 0 The network will be disabled (default: 25)-the maximum number of connections attempted by maxpendpeers value (if set to 0 The default value will be used) (default: 0)-nat value NAT port mapping mechanism (any | none | upnp | pmp | extip:) (default: "any")-nodiscover disables node discovery mechanism (manually add nodes)-v5disc enables experimental RLPx V5 (Topic discovery) mechanism-nodekey value P2P node key file-nodekeyhex value Hexadecimal P2P node key (for testing) miners option:-- mine open mining-number of CPU threads used for minerthreads value mining (default: 8)-etherbase value mining reward address (default = first created account) (default: "0")-targetgaslimit value target gas limit: set the minimum gas limit (below this will not be dug? ) (default: "4712388")-- lowest gas price for gasprice value mining to accept transactions-- extra block data set by extradata value miners (default = client version) GAS price option:-- number of recent blocks used by gpoblocks value to check the gas price (default: 10)-- gpopercentile value recommends that the gas price refer to the percentile of the recently traded gas price (default: 50) options for virtual machines:-- vmdebug records VM and contract debugging information logs and debugging options:-- metrics enables metrics collection and reporting-- fakepow disables proof-of-work verification-- verbosity value log details: 0=silent, 1=error, 2=warn, 3=info, 4=debug 5=detail (default: 3)-- vmodule value details of each module: separate the list with commas of = (such as eth/*=6 P2p=5)-- backtrace value request specific logging stack trace (such as "block.go:271")-- debug highlights the call location log (file name and line number)-- pprof enables pprof HTTP server-- pprofaddr value pprof HTTP server listening interface (default: 127.0.0.1)-- pprofport value Pprof HTTP server listening port (default: 6060)-- memprofilerate value opens memory profiling at specified frequency (default: 524288)-- blockprofilerate value opens block profiling at specified frequency (default: 0)-- cpuprofile value writes CPU profile to specified file-- trace value writes execution trace to specified file WHISPER Experimental option:-- shh Enable maximum acceptable message size for Whisper--shh.maxmessagesize value (default: 1048576)-minimum acceptable POW for shh.pow value (default: 0.2) deprecate option:-- fast enables fast synchronization-- light enables light client mode other options:-help -h display help copyright: Copyright 2013-2017 The go-ethereum Authors Thank you for reading! This is the end of this article on "how to use Geth commands". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report