區塊鏈系列教程——geth命令詳解
本文是區塊鏈系列的第二篇,上一篇區塊鏈系列教程——建立屬於自己的區塊鏈 大概介紹了區塊鏈的基本內容,並且使用geth客戶端建立了私鏈,給了各位讀者較為直觀的感受。本文簡單介紹geth命令,這對後面的教程來說是一個基礎。
geth用法簡介
在安裝有geth的環境下,使用命令即可檢視geth的所有操作引數:
geth -help
其用法為:
geth [options] command [command options] [arguments...]
geth命令簡介
其中,command部分主要有:
accountManage accounts attachStart an interactive JavaScript environment (connect to node) bugopens a window to report a bug on the geth repo consoleStart an interactive JavaScript environment copydbCreate a local chain from a target chaindata folder dumpDump a specific block from storage dumpconfigShow configuration values exportExport blockchain into file export-preimagesExport the preimage database into an RLP stream importImport a blockchain file import-preimagesImport the preimage database from an RLP stream initBootstrap and initialize a new genesis block jsExecute the specified JavaScript files licenseDisplay license information makecacheGenerate ethash verification cache (for testing) makedagGenerate ethash mining DAG (for testing) monitorMonitor and visualize node metrics removedbRemove blockchain and state databases versionPrint version numbers walletManage Ethereum presale wallets help, hShows a list of commands or help for one command
此處主要講解部分高頻使用的命令。
1. account
該命令用於對節點中的賬戶進行管理,比如使用命令建立新的賬戶:
hadoop@tomcat:~/blockchain$ geth account new INFO [05-02|22:34:35.822] Maximum peer countETH=25 LES=0 total=25 Your new account is locked with a password. Please give a password. Do not forget this password. Passphrase: Repeat passphrase: Address: {0661ae6f3586b5d06f72631d40b576572df58cf8}
比如列出所建立的所有賬戶資訊:
hadoop@tomcat:~/blockchain$ geth account list INFO [05-02|22:36:56.617] Maximum peer countETH=25 LES=0 total=25 Account #0: {39270dca851f877e25de0b3dd2bc362a56c93d14} keystore:///home/hadoop/.ethereum/keystore/UTC--2018-11-08T07-51-54.537198312Z--39270dca851f877e25de0b3dd2bc362a56c93d14 Account #1: {3ad29039e3a403bec76f72f49df9c695132b7413} keystore:///home/hadoop/.ethereum/keystore/UTC--2019-03-08T03-01-21.222439496Z--3ad29039e3a403bec76f72f49df9c695132b7413 Account #2: {76522ed9030ecdbc2adcf9db101ee351841a026d} keystore:///home/hadoop/.ethereum/keystore/UTC--2019-03-08T03-02-18.142740162Z--76522ed9030ecdbc2adcf9db101ee351841a026d Account #3: {0eb26f508cb4366cca769f5b42a2db53ac3411bc} keystore:///home/hadoop/.ethereum/keystore/UTC--2019-03-08T03-06-41.861044859Z--0eb26f508cb4366cca769f5b42a2db53ac3411bc Account #4: {03b753d082b2c65054b5ac0a624c3c206a8384ce} keystore:///home/hadoop/.ethereum/keystore/UTC--2019-03-08T13-43-43.058685461Z--03b753d082b2c65054b5ac0a624c3c206a8384ce Account #5: {69e5860b1b7b2fbbb5e99c856ccf1daa3d99cceb} keystore:///home/hadoop/.ethereum/keystore/UTC--2019-03-08T14-36-59.127976359Z--69e5860b1b7b2fbbb5e99c856ccf1daa3d99cceb Account #6: {49fc0574f7e149a5e772ca0144df1177af56a544} keystore:///home/hadoop/.ethereum/keystore/UTC--2019-03-08T14-42-36.761539434Z--49fc0574f7e149a5e772ca0144df1177af56a544 Account #7: {36606041ff9727c15337aa68493c62a9f4fe721c} keystore:///home/hadoop/.ethereum/keystore/UTC--2019-03-08T14-45-17.989230302Z--36606041ff9727c15337aa68493c62a9f4fe721c Account #8: {c20302e3423fdc2d451c1f989978c82ddcb3d25d} keystore:///home/hadoop/.ethereum/keystore/UTC--2019-03-08T14-49-35.136771402Z--c20302e3423fdc2d451c1f989978c82ddcb3d25d Account #9: {0ee10994abc4ad567ae660c38dece6b66316e8f2} keystore:///home/hadoop/.ethereum/keystore/UTC--2019-03-09T03-02-59.629189896Z--0ee10994abc4ad567ae660c38dece6b66316e8f2 Account #10: {dfad42736734d1e943cb3390ebab0f3f9b6cd956} keystore:///home/hadoop/.ethereum/keystore/UTC--2019-03-09T03-08-56.185678319Z--dfad42736734d1e943cb3390ebab0f3f9b6cd956 Account #11: {b1d16776a90ab4acfa12c253821d39f4e72c8ede} keystore:///home/hadoop/.ethereum/keystore/UTC--2019-03-09T03-10-18.698606526Z--b1d16776a90ab4acfa12c253821d39f4e72c8ede Account #12: {0661ae6f3586b5d06f72631d40b576572df58cf8} keystore:///home/hadoop/.ethereum/keystore/UTC--2019-05-02T14-35-39.394844103Z--0661ae6f3586b5d06f72631d40b576572df58cf8
2. attach
attach命令主要用於連線到一個正在執行的節點,並且會開啟一個控制檯用於互動:
hadoop@tomcat:~/blockchain/test$ ls gethgeth.ipchistorykeystore hadoop@tomcat:~/blockchain/test$ geth attach geth.ipc Welcome to the Geth JavaScript console! instance: Geth/v1.8.17-stable-8bbe7207/linux-amd64/go1.10 coinbase: 0x6393bb737b95465ccd9e4597df0647cdcd09775f at block: 11 (Wed, 01 May 2019 21:40:53 CST) datadir: /home/hadoop/blockchain/test modules: admin:1.0 debug:1.0 eth:1.0 ethash:1.0 miner:1.0 net:1.0 personal:1.0 rpc:1.0 txpool:1.0 web3:1.0 >
3. console
console命令用於開啟控制檯用於互動,與attach有所不同,console一般是在區塊鏈執行時開啟,而attach是在節點執行的前提下連線到節點進行互動,兩者可以並存。該命令具體用法在上一篇已經展示:
hadoop@tomcat:~/blockchain$ geth --datadir test/ --networkid 10 console INFO [05-02|22:38:40.954] Maximum peer countETH=25 LES=0 total=25 INFO [05-02|22:38:40.955] Starting peer-to-peer nodeinstance=Geth/v1.8.17-stable-8bbe7207/linux-amd64/go1.10 INFO [05-02|22:38:40.955] Allocated cache and file handlesdatabase=/home/hadoop/blockchain/test/geth/chaindata cache=768 handles=512 INFO [05-02|22:38:41.045] Initialised chain configurationconfig="{ChainID: 10 Homestead: 0 DAO: <nil> DAOSupport: false EIP150: <nil> EIP155: 0 EIP158: 0 Byzantium: <nil> Constantinople: <nil> Engine: unknown}" INFO [05-02|22:38:41.045] Disk storage enabled for ethash cachesdir=/home/hadoop/blockchain/test/geth/ethash count=3 INFO [05-02|22:38:41.045] Disk storage enabled for ethash DAGsdir=/home/hadoop/.ethashcount=2 INFO [05-02|22:38:41.045] Initialising Ethereum protocolversions="[63 62]" network=10 INFO [05-02|22:38:41.047] Loaded most recent local headernumber=11 hash=4c92d8…336e91 td=382991890 age=1d57m48s INFO [05-02|22:38:41.047] Loaded most recent local full blocknumber=11 hash=4c92d8…336e91 td=382991890 age=1d57m48s INFO [05-02|22:38:41.047] Loaded most recent local fast blocknumber=11 hash=4c92d8…336e91 td=382991890 age=1d57m48s INFO [05-02|22:38:41.048] Loaded local transaction journaltransactions=1 dropped=1 INFO [05-02|22:38:41.048] Regenerated local transaction journaltransactions=0 accounts=0 WARN [05-02|22:38:41.048] Blockchain not empty, fast sync disabled INFO [05-02|22:38:41.049] Starting P2P networking INFO [05-02|22:38:43.272] Mapped network portproto=udp extport=30303 intport=30303 interface="UPNP IGDv1-IP1" INFO [05-02|22:38:43.383] UDP listener upself=enode://21d2a8209dc9aeadd15d94c2df30128dd7bd4b772f34e61e8f76afb893a2f7735a77c9061b64076ca61b5635b5d434fa32600af0e56f833fd7e582bff94e679d@222.201.145.179:30303 INFO [05-02|22:38:43.383] RLPx listener upself=enode://21d2a8209dc9aeadd15d94c2df30128dd7bd4b772f34e61e8f76afb893a2f7735a77c9061b64076ca61b5635b5d434fa32600af0e56f833fd7e582bff94e679d@222.201.145.179:30303 INFO [05-02|22:38:43.386] IPC endpoint openedurl=/home/hadoop/blockchain/test/geth.ipc INFO [05-02|22:38:43.418] Mapped network portproto=tcp extport=30303 intport=30303 interface="UPNP IGDv1-IP1" Welcome to the Geth JavaScript console! instance: Geth/v1.8.17-stable-8bbe7207/linux-amd64/go1.10 INFO [05-02|22:38:43.485] Etherbase automatically configuredaddress=0x6393Bb737b95465cCD9E4597dF0647CdcD09775f coinbase: 0x6393bb737b95465ccd9e4597df0647cdcd09775f at block: 11 (Wed, 01 May 2019 21:40:53 CST) datadir: /home/hadoop/blockchain/test modules: admin:1.0 debug:1.0 eth:1.0 ethash:1.0 miner:1.0 net:1.0 personal:1.0 rpc:1.0 txpool:1.0 web3:1.0 >
4. init
init命令是用於初始化一個區塊鏈的,通常將genesis.json檔案中的初始區塊資訊載入到區塊鏈中:
hadoop@tomcat:~/blockchain$ mkdir test2 hadoop@tomcat:~/blockchain$ geth --datadir test2init genesis.json INFO [05-02|22:45:45.306] Maximum peer countETH=25 LES=0 total=25 INFO [05-02|22:45:45.306] Allocated cache and file handlesdatabase=/home/hadoop/blockchain/test2/geth/chaindata cache=16 handles=16 INFO [05-02|22:45:45.389] Writing custom genesis block INFO [05-02|22:45:45.389] Persisted trie from memory databasenodes=0 size=0.00B time=5.821µs gcnodes=0 gcsize=0.00B gctime=0s livenodes=1 livesize=0.00B INFO [05-02|22:45:45.390] Successfully wrote genesis statedatabase=chaindatahash=b123b8…4077eb INFO [05-02|22:45:45.390] Allocated cache and file handlesdatabase=/home/hadoop/blockchain/test2/geth/lightchaindata cache=16 handles=16 INFO [05-02|22:45:45.394] Writing custom genesis block INFO [05-02|22:45:45.394] Persisted trie from memory databasenodes=0 size=0.00B time=3.963µs gcnodes=0 gcsize=0.00B gctime=0s livenodes=1 livesize=0.00B INFO [05-02|22:45:45.395] Successfully wrote genesis statedatabase=lightchaindatahash=b123b8…4077eb
5. js
js命令用於載入一個js檔案:
hadoop@tomcat:~/blockchain$ geth js t.js INFO [05-02|22:51:21.166] Maximum peer countETH=25 LES=0 total=25 INFO [05-02|22:51:21.167] Starting peer-to-peer nodeinstance=Geth/v1.8.17-stable-8bbe7207/linux-amd64/go1.10 INFO [05-02|22:51:21.167] Allocated cache and file handlesdatabase=/home/hadoop/.ethereum/geth/chaindata cache=768 handles=512 INFO [05-02|22:51:21.180] Initialised chain configurationconfig="{ChainID: 1 Homestead: 1150000 DAO: 1920000 DAOSupport: true EIP150: 2463000 EIP155: 2675000 EIP158: 2675000 Byzantium: 4370000 Constantinople: <nil> Engine: ethash}" INFO [05-02|22:51:21.180] Disk storage enabled for ethash cachesdir=/home/hadoop/.ethereum/geth/ethash count=3 INFO [05-02|22:51:21.180] Disk storage enabled for ethash DAGsdir=/home/hadoop/.ethashcount=2 INFO [05-02|22:51:21.180] Initialising Ethereum protocolversions="[63 62]" network=1 INFO [05-02|22:51:21.181] Loaded most recent local headernumber=192 hash=723899…123390 td=3453055867795 age=3y9mo3w INFO [05-02|22:51:21.181] Loaded most recent local full blocknumber=0hash=d4e567…cb8fa3 td=17179869184age=50y2w4d INFO [05-02|22:51:21.182] Loaded most recent local fast blocknumber=2hash=b495a1…4698c9 td=51514445824age=3y9mo3w INFO [05-02|22:51:21.182] Loaded local transaction journaltransactions=0 dropped=0 INFO [05-02|22:51:21.182] Regenerated local transaction journaltransactions=0 accounts=0 INFO [05-02|22:51:21.183] Starting P2P networking INFO [05-02|22:51:23.318] Mapped network portproto=udp extport=30303 intport=30303 interface="UPNP IGDv2-IP1" INFO [05-02|22:51:23.319] UDP listener upself=enode://d592b7cef587ea2350632e2811807a59026e31fc0b8dda1d7ab6ebbd7fa7a7f838848f456be0ad0b69f2cabc2f08b8e0747f64c723b547bac459d7c06b7189ef@222.201.145.179:30303 INFO [05-02|22:51:23.319] RLPx listener upself=enode://d592b7cef587ea2350632e2811807a59026e31fc0b8dda1d7ab6ebbd7fa7a7f838848f456be0ad0b69f2cabc2f08b8e0747f64c723b547bac459d7c06b7189ef@222.201.145.179:30303 INFO [05-02|22:51:23.320] IPC endpoint openedurl=/home/hadoop/.ethereum/geth.ipc INFO [05-02|22:51:23.346] Mapped network portproto=tcp extport=30303 intport=30303 interface="UPNP IGDv2-IP1" INFO [05-02|22:51:23.423] Etherbase automatically configuredaddress=0x39270dCA851f877e25DE0B3dD2bC362a56c93d14 INFO [05-02|22:51:23.424] IPC endpoint closedendpoint=/home/hadoop/.ethereum/geth.ipc INFO [05-02|22:51:23.424] Blockchain manager stopped INFO [05-02|22:51:23.424] Stopping Ethereum protocol INFO [05-02|22:51:23.424] Ethereum protocol stopped INFO [05-02|22:51:23.424] Transaction pool stopped INFO [05-02|22:51:23.424] Database closeddatabase=/home/hadoop/.ethereum/geth/chaindata
options簡介
options的內容相對更多:
ETHEREUM OPTIONS: --config valueTOML configuration file --datadir "/home/hadoop/.ethereum"Data directory for the databases and keystore --keystoreDirectory for the keystore (default = inside the datadir) --nousbDisables monitoring for and managing USB hardware wallets --networkid valueNetwork identifier (integer, 1=Frontier, 2=Morden (disused), 3=Ropsten, 4=Rinkeby) (default: 1) --testnetRopsten network: pre-configured proof-of-work test network --rinkebyRinkeby network: pre-configured proof-of-authority test network --syncmode "fast"Blockchain sync mode ("fast", "full", or "light") --gcmode valueBlockchain garbage collection mode ("full", "archive") (default: "full") --ethstats valueReporting URL of a ethstats service (nodename:secret@host:port) --identity valueCustom node name --lightserv valueMaximum percentage of time allowed for serving LES requests (0-90) (default: 0) --lightpeers valueMaximum number of LES client peers (default: 100) --lightkdfReduce key-derivation RAM & CPU usage at some expense of KDF strength DEVELOPER CHAIN OPTIONS: --devEphemeral proof-of-authority network with a pre-funded developer account, mining enabled --dev.period valueBlock period to use in developer mode (0 = mine only if transaction pending) (default: 0) ETHASH OPTIONS: --ethash.cachedirDirectory to store the ethash verification caches (default = inside the datadir) --ethash.cachesinmem valueNumber of recent ethash caches to keep in memory (16MB each) (default: 2) --ethash.cachesondisk valueNumber of recent ethash caches to keep on disk (16MB each) (default: 3) --ethash.dagdir "/home/hadoop/.ethash"Directory to store the ethash mining DAGs (default = inside home folder) --ethash.dagsinmem valueNumber of recent ethash mining DAGs to keep in memory (1+GB each) (default: 1) --ethash.dagsondisk valueNumber of recent ethash mining DAGs to keep on disk (1+GB each) (default: 2) TRANSACTION POOL OPTIONS: --txpool.locals valueComma separated accounts to treat as locals (no flush, priority inclusion) --txpool.nolocalsDisables price exemptions for locally submitted transactions --txpool.journal valueDisk journal for local transaction to survive node restarts (default: "transactions.rlp") --txpool.rejournal valueTime interval to regenerate the local transaction journal (default: 1h0m0s) --txpool.pricelimit valueMinimum gas price limit to enforce for acceptance into the pool (default: 1) --txpool.pricebump valuePrice bump percentage to replace an already existing transaction (default: 10) --txpool.accountslots valueMinimum number of executable transaction slots guaranteed per account (default: 16) --txpool.globalslots valueMaximum number of executable transaction slots for all accounts (default: 4096) --txpool.accountqueue valueMaximum number of non-executable transaction slots permitted per account (default: 64) --txpool.globalqueue valueMaximum number of non-executable transaction slots for all accounts (default: 1024) --txpool.lifetime valueMaximum amount of time non-executable transaction are queued (default: 3h0m0s) PERFORMANCE TUNING OPTIONS: --cache valueMegabytes of memory allocated to internal caching (default: 1024) --cache.database valuePercentage of cache memory allowance to use for database io (default: 75) --cache.gc valuePercentage of cache memory allowance to use for trie pruning (default: 25) --trie-cache-gens valueNumber of trie node generations to keep in memory (default: 120) ACCOUNT OPTIONS: --unlock valueComma separated list of accounts to unlock --password valuePassword file to use for non-interactive password input API AND CONSOLE OPTIONS: --rpcEnable the HTTP-RPC server --rpcaddr valueHTTP-RPC server listening interface (default: "localhost") --rpcport valueHTTP-RPC server listening port (default: 8545) --rpcapi valueAPI's offered over the HTTP-RPC interface --wsEnable the WS-RPC server --wsaddr valueWS-RPC server listening interface (default: "localhost") --wsport valueWS-RPC server listening port (default: 8546) --wsapi valueAPI's offered over the WS-RPC interface --wsorigins valueOrigins from which to accept websockets requests --ipcdisableDisable the IPC-RPC server --ipcpathFilename for IPC socket/pipe within the datadir (explicit paths escape it) --rpccorsdomain valueComma separated list of domains from which to accept cross origin requests (browser enforced) --rpcvhosts valueComma separated list of virtual hostnames from which to accept requests (server enforced). Accepts '*' wildcard. (default: "localhost") --jspath loadScriptJavaScript root path for loadScript (default: ".") --exec valueExecute JavaScript statement --preload valueComma separated list of JavaScript files to preload into the console NETWORKING OPTIONS: --bootnodes valueComma separated enode URLs for P2P discovery bootstrap (set v4+v5 instead for light servers) --bootnodesv4 valueComma separated enode URLs for P2P v4 discovery bootstrap (light server, full nodes) --bootnodesv5 valueComma separated enode URLs for P2P v5 discovery bootstrap (light server, light nodes) --port valueNetwork listening port (default: 30303) --maxpeers valueMaximum number of network peers (network disabled if set to 0) (default: 25) --maxpendpeers valueMaximum number of pending connection attempts (defaults used if set to 0) (default: 0) --nat valueNAT port mapping mechanism (any|none|upnp|pmp|extip:<IP>) (default: "any") --nodiscoverDisables the peer discovery mechanism (manual peer addition) --v5discEnables the experimental RLPx V5 (Topic Discovery) mechanism --netrestrict valueRestricts network communication to the given IP networks (CIDR masks) --nodekey valueP2P node key file --nodekeyhex valueP2P node key as hex (for testing) MINER OPTIONS: --mineEnable mining --miner.threads valueNumber of CPU threads to use for mining (default: 0) --miner.notify valueComma separated HTTP URL list to notify of new work packages --miner.gasprice "1000000000"Minimum gas price for mining a transaction --miner.gastarget valueTarget gas floor for mined blocks (default: 8000000) --miner.gaslimit valueTarget gas ceiling for mined blocks (default: 8000000) --miner.etherbase valuePublic address for block mining rewards (default = first account) (default: "0") --miner.extradata valueBlock extra data set by the miner (default = client version) --miner.recommit valueTime interval to recreate the block being mined (default: 3s) --miner.noverifyDisable remote sealing verification GAS PRICE ORACLE OPTIONS: --gpoblocks valueNumber of recent blocks to check for gas prices (default: 20) --gpopercentile valueSuggested gas price is the given percentile of a set of recent transaction gas prices (default: 60) VIRTUAL MACHINE OPTIONS: --vmdebugRecord information useful for VM and contract debugging --vm.evm valueExternal EVM configuration (default = built-in interpreter) --vm.ewasm valueExternal ewasm configuration (default = built-in interpreter) LOGGING AND DEBUGGING OPTIONS: --fakepowDisables proof-of-work verification --nocompactionDisables db compaction after import --verbosity valueLogging verbosity: 0=silent, 1=error, 2=warn, 3=info, 4=debug, 5=detail (default: 3) --vmodule valuePer-module verbosity: comma-separated list of <pattern>=<level> (e.g. eth/*=5,p2p=4) --backtrace valueRequest a stack trace at a specific logging statement (e.g. "block.go:271") --debugPrepends log messages with call-site location (file and line number) --pprofEnable the pprof HTTP server --pprofaddr valuepprof HTTP server listening interface (default: "127.0.0.1") --pprofport valuepprof HTTP server listening port (default: 6060) --memprofilerate valueTurn on memory profiling with the given rate (default: 524288) --blockprofilerate valueTurn on block profiling with the given rate (default: 0) --cpuprofile valueWrite CPU profile to the given file --trace valueWrite execution trace to the given file METRICS AND STATS OPTIONS: --metricsEnable metrics collection and reporting --metrics.influxdbEnable metrics export/push to an external InfluxDB database --metrics.influxdb.endpoint valueInfluxDB API endpoint to report metrics to (default: "http://localhost:8086") --metrics.influxdb.database valueInfluxDB database name to push reported metrics to (default: "geth") --metrics.influxdb.username valueUsername to authorize access to the database (default: "test") --metrics.influxdb.password valuePassword to authorize access to the database (default: "test") --metrics.influxdb.host.tag hostInfluxDB host tag attached to all measurements (default: "localhost") WHISPER (EXPERIMENTAL) OPTIONS: --shhEnable Whisper --shh.maxmessagesize valueMax message size accepted (default: 1048576) --shh.pow valueMinimum POW accepted (default: 0.2) --shh.restrict-lightRestrict connection between two whisper light clients DEPRECATED OPTIONS: --minerthreads valueNumber of CPU threads to use for mining (deprecated, use --miner.threads) (default: 0) --targetgaslimit valueTarget gas floor for mined blocks (deprecated, use --miner.gastarget) (default: 8000000) --gasprice "1000000000"Minimum gas price for mining a transaction (deprecated, use --miner.gasprice) --etherbase valuePublic address for block mining rewards (default = first account, deprecated, use --miner.etherbase) (default: "0") --extradata valueBlock extra data set by the miner (default = client version, deprecated, use --miner.extradata) MISC OPTIONS: --help, -hshow help
options的內容較多,此處也是簡略介紹部分用得到的內容。
1. --datadir
該命令用於指定區塊鏈資料的儲存資料夾,在區塊鏈啟動過程中需要自定義資料資料夾的情況下都會用到該選項,在上一篇中已經經過實踐展示。
2. --testnet和--rinkeby
這兩個選項用於選擇網路型別,在建立私鏈的情況下不會使用到,是以太坊的兩個測試公鏈。
3. --syncmode
用於指示同步模式,有"fast"/"full"/"light"三種選項,分別表示全節點模式,快速同步模式和輕節點模式,全節點會同步區塊鏈中的所有資料;快速同步模式採取先同步完成再校驗狀態的方法;輕節點只同步區塊頭資訊,不擁有完整的交易資訊和狀態資訊,但是可以通過區塊頭中的交易樹和狀態樹根節點hash值來驗證交易資訊和狀態資訊的有效性。
4. --unlock和--password
這兩個引數用於解鎖某個賬戶。
5. --rpc、--rpcaddr、--rpcport和--rpcapi
第一個引數用於開啟rpc支援;其後三個引數分別指定rpc服務地址、rpc服務埠和rpc支援的介面。
6. --bootnodes
該引數可用於與其他節點進行連線並且資訊互動。
7. --port
該引數指定P2P服務埠。
8. --mine
該引數用於啟動挖礦程序。
聯絡與交流
歡迎小夥伴與我討論哦~
本文歡迎轉載,請註明本文地址:https://www.jianshu.com/p/d07ebc80506b