mirror of
				https://github.com/ChristopherA/Learning-Bitcoin-from-the-Command-Line.git
				synced 2025-10-31 02:17:24 +00:00 
			
		
		
		
	
						commit
						1fff738b0d
					
				| @ -41,13 +41,13 @@ We also suggest that you choose a Debian 8 image when you're creating your machi | ||||
| 
 | ||||
| Afterward, boot your VPS. | ||||
| 
 | ||||
| > **TESTNET vs MAINNET:** The various possible setups require 5-15G of storage and 2-3G of memory. The non-Pruned Mainnet is the only setup that requires considerably more: about 120G of storage to hold the current blockchain. | ||||
| > **TESTNET vs MAINNET:** The various possible setups require 5-15G of storage and 2-3G of memory. The non-Pruned Mainnet is the only setup that requires considerably more: about 170G of storage to hold the current blockchain. | ||||
| > | ||||
| > Following are suggestions for machine requirements: | ||||
| > | ||||
| > | Setup | Memory | Storage | | ||||
| > |-------|--------|---------| | ||||
| > | Mainnet | 2-3G | 120G | | ||||
| > | Mainnet | 2-3G | 170G | | ||||
| > | Pruned Mainnet | 2-3G | ~5G | | ||||
| > | Testnet | 2-3G | ~15G | | ||||
| > | Pruned Testnet | 2-3G | ~5G | | ||||
| @ -294,9 +294,9 @@ $ source ~/.bash_profile | ||||
| 
 | ||||
| We suggest setting up two variables to make this installation more automatic. | ||||
| 
 | ||||
| The first variable, $BITCOIN, should be set to the current version of Bitcoin. It was 0.14.1 when we wrote this. The second will then automatically generate a truncated form used by some of the files. | ||||
| The first variable, $BITCOIN, should be set to the current version of Bitcoin. It was 0.15.1 when we wrote this. The second will then automatically generate a truncated form used by some of the files. | ||||
| ``` | ||||
| $ export BITCOIN=bitcoin-core-0.14.1 | ||||
| $ export BITCOIN=bitcoin-core-0.15.1 | ||||
| $ export BITCOINPLAIN=`echo $BITCOIN | sed 's/bitcoin-core/bitcoin/'` | ||||
| ``` | ||||
| 
 | ||||
| @ -390,7 +390,7 @@ But wait, your Bitcoin daemon is probably still downloading blocks. This alias, | ||||
| ``` | ||||
| $ btcblock | ||||
| ``` | ||||
| 0.14.1 is quite fast to download blocks, but it might still take an hour to download the unpruned testnet. It might be time for a few more espressos. | ||||
| 0.15.1 is quite fast to download blocks, but it might still take an hour to download the unpruned testnet. It might be time for a few more espressos. | ||||
| 
 | ||||
| > **TESTNET vs MAINNET:** An unpruned mainnet will take hours longer. | ||||
| 
 | ||||
|  | ||||
| @ -148,7 +148,7 @@ You will know the StackScripts are done when a BITCOIN-IS-READY file appears in | ||||
| 
 | ||||
| ``` | ||||
| $ ls | ||||
| bitcoin-0.14.1-x86_64-linux-gnu.tar.gz    laanwj-releases.asc | ||||
| bitcoin-0.15.1-x86_64-linux-gnu.tar.gz    laanwj-releases.asc | ||||
| BITCOIN-IS-READY            SHA256SUMS.asc | ||||
| ``` | ||||
| 
 | ||||
|  | ||||
| @ -23,7 +23,7 @@ | ||||
| # CURRENT BITCOIN RELEASE: | ||||
| # Change as necessary | ||||
| 
 | ||||
| export BITCOIN=bitcoin-core-0.14.2 | ||||
| export BITCOIN=bitcoin-core-0.15.1 | ||||
| 
 | ||||
| # Set the variable $IPADDR to the IP address the new Linode receives. | ||||
| IPADDR=$(/sbin/ifconfig eth0 | awk '/inet / { print $2 }' | sed 's/addr://') | ||||
|  | ||||
| @ -32,57 +32,64 @@ Most of your early work will be done with the `bitcoin-cli` command, which offer | ||||
| $ bitcoin-cli help | ||||
| == Blockchain == | ||||
| getbestblockhash | ||||
| getblock "hash" ( verbose ) | ||||
| getblock "blockhash" ( verbosity ) | ||||
| getblockchaininfo | ||||
| getblockcount | ||||
| getblockhash index | ||||
| getblockhash height | ||||
| getblockheader "hash" ( verbose ) | ||||
| getchaintips | ||||
| getchaintxstats ( nblocks blockhash ) | ||||
| getdifficulty | ||||
| getmempoolancestors txid (verbose) | ||||
| getmempooldescendants txid (verbose) | ||||
| getmempoolentry txid | ||||
| getmempoolinfo | ||||
| getrawmempool ( verbose ) | ||||
| gettxout "txid" n ( includemempool ) | ||||
| gettxout "txid" n ( include_mempool ) | ||||
| gettxoutproof ["txid",...] ( blockhash ) | ||||
| gettxoutsetinfo | ||||
| verifychain ( checklevel numblocks ) | ||||
| preciousblock "blockhash" | ||||
| pruneblockchain | ||||
| verifychain ( checklevel nblocks ) | ||||
| verifytxoutproof "proof" | ||||
| 
 | ||||
| == Control == | ||||
| getinfo | ||||
| getmemoryinfo ("mode") | ||||
| help ( "command" ) | ||||
| stop | ||||
| uptime | ||||
| 
 | ||||
| == Generating == | ||||
| generate numblocks ( maxtries ) | ||||
| generatetoaddress numblocks address (maxtries) | ||||
| generate nblocks ( maxtries ) | ||||
| generatetoaddress nblocks address (maxtries) | ||||
| 
 | ||||
| == Mining == | ||||
| getblocktemplate ( TemplateRequest ) | ||||
| getmininginfo | ||||
| getnetworkhashps ( blocks height ) | ||||
| prioritisetransaction <txid> <priority delta> <fee delta> | ||||
| submitblock "hexdata" ( "jsonparametersobject" ) | ||||
| getnetworkhashps ( nblocks height ) | ||||
| prioritisetransaction <txid> <dummy value> <fee delta> | ||||
| submitblock "hexdata"  ( "dummy" ) | ||||
| 
 | ||||
| == Network == | ||||
| addnode "node" "add|remove|onetry" | ||||
| clearbanned | ||||
| disconnectnode "node"  | ||||
| getaddednodeinfo dummy ( "node" ) | ||||
| disconnectnode "[address]" [nodeid] | ||||
| getaddednodeinfo ( "node" ) | ||||
| getconnectioncount | ||||
| getnettotals | ||||
| getnetworkinfo | ||||
| getpeerinfo | ||||
| listbanned | ||||
| ping | ||||
| setban "ip(/netmask)" "add|remove" (bantime) (absolute) | ||||
| setban "subnet" "add|remove" (bantime) (absolute) | ||||
| setnetworkactive true|false | ||||
| 
 | ||||
| == Rawtransactions == | ||||
| createrawtransaction [{"txid":"id","vout":n},...] {"address":amount,"data":"hex",...} ( locktime ) | ||||
| combinerawtransaction ["hexstring",...] | ||||
| createrawtransaction [{"txid":"id","vout":n},...] {"address":amount,"data":"hex",...} ( locktime ) ( replaceable ) | ||||
| decoderawtransaction "hexstring" | ||||
| decodescript "hex" | ||||
| decodescript "hexstring" | ||||
| fundrawtransaction "hexstring" ( options ) | ||||
| getrawtransaction "txid" ( verbose ) | ||||
| sendrawtransaction "hexstring" ( allowhighfees ) | ||||
| @ -91,55 +98,57 @@ signrawtransaction "hexstring" ( [{"txid":"id","vout":n,"scriptPubKey":"hex","re | ||||
| == Util == | ||||
| createmultisig nrequired ["key",...] | ||||
| estimatefee nblocks | ||||
| estimatepriority nblocks | ||||
| estimatesmartfee nblocks | ||||
| estimatesmartpriority nblocks | ||||
| estimatesmartfee conf_target ("estimate_mode") | ||||
| signmessagewithprivkey "privkey" "message" | ||||
| validateaddress "bitcoinaddress" | ||||
| verifymessage "bitcoinaddress" "signature" "message" | ||||
| validateaddress "address" | ||||
| verifymessage "address" "signature" "message" | ||||
| 
 | ||||
| == Wallet == | ||||
| abandontransaction "txid" | ||||
| abortrescan | ||||
| addmultisigaddress nrequired ["key",...] ( "account" ) | ||||
| addwitnessaddress "address" | ||||
| backupwallet "destination" | ||||
| dumpprivkey "bitcoinaddress" | ||||
| bumpfee "txid" ( options ) | ||||
| dumpprivkey "address" | ||||
| dumpwallet "filename" | ||||
| encryptwallet "passphrase" | ||||
| getaccount "bitcoinaddress" | ||||
| getaccount "address" | ||||
| getaccountaddress "account" | ||||
| getaddressesbyaccount "account" | ||||
| getbalance ( "account" minconf includeWatchonly ) | ||||
| getbalance ( "account" minconf include_watchonly ) | ||||
| getnewaddress ( "account" ) | ||||
| getrawchangeaddress | ||||
| getreceivedbyaccount "account" ( minconf ) | ||||
| getreceivedbyaddress "bitcoinaddress" ( minconf ) | ||||
| gettransaction "txid" ( includeWatchonly ) | ||||
| getreceivedbyaddress "address" ( minconf ) | ||||
| gettransaction "txid" ( include_watchonly ) | ||||
| getunconfirmedbalance | ||||
| getwalletinfo | ||||
| importaddress "address" ( "label" rescan p2sh ) | ||||
| importprivkey "bitcoinprivkey" ( "label" rescan ) | ||||
| importmulti "requests" ( "options" ) | ||||
| importprivkey "privkey" ( "label" ) ( rescan ) | ||||
| importprunedfunds | ||||
| importpubkey "pubkey" ( "label" rescan ) | ||||
| importwallet "filename" | ||||
| keypoolrefill ( newsize ) | ||||
| listaccounts ( minconf includeWatchonly) | ||||
| listaccounts ( minconf include_watchonly) | ||||
| listaddressgroupings | ||||
| listlockunspent | ||||
| listreceivedbyaccount ( minconf includeempty includeWatchonly) | ||||
| listreceivedbyaddress ( minconf includeempty includeWatchonly) | ||||
| listsinceblock ( "blockhash" target-confirmations includeWatchonly) | ||||
| listtransactions ( "account" count from includeWatchonly) | ||||
| listunspent ( minconf maxconf  ["address",...] ) | ||||
| listreceivedbyaccount ( minconf include_empty include_watchonly) | ||||
| listreceivedbyaddress ( minconf include_empty include_watchonly) | ||||
| listsinceblock ( "blockhash" target_confirmations include_watchonly include_removed ) | ||||
| listtransactions ( "account" count skip include_watchonly) | ||||
| listunspent ( minconf maxconf  ["addresses",...] [include_unsafe] [query_options]) | ||||
| listwallets | ||||
| lockunspent unlock ([{"txid":"txid","vout":n},...]) | ||||
| move "fromaccount" "toaccount" amount ( minconf "comment" ) | ||||
| removeprunedfunds "txid" | ||||
| sendfrom "fromaccount" "tobitcoinaddress" amount ( minconf "comment" "comment-to" ) | ||||
| sendmany "fromaccount" {"address":amount,...} ( minconf "comment" ["address",...] ) | ||||
| sendtoaddress "bitcoinaddress" amount ( "comment" "comment-to" subtractfeefromamount ) | ||||
| setaccount "bitcoinaddress" "account" | ||||
| sendfrom "fromaccount" "toaddress" amount ( minconf "comment" "comment_to" ) | ||||
| sendmany "fromaccount" {"address":amount,...} ( minconf "comment" ["address",...] replaceable conf_target "estimate_mode") | ||||
| sendtoaddress "address" amount ( "comment" "comment_to" subtractfeefromamount replaceable conf_target "estimate_mode") | ||||
| setaccount "address" "account" | ||||
| settxfee amount | ||||
| signmessage "bitcoinaddress" "message" | ||||
| signmessage "address" "message" | ||||
| ``` | ||||
| You can also type `bitcoin help [command]` to get even more extensive info on that command. For example: | ||||
| ``` | ||||
| @ -181,8 +190,8 @@ For example `bitcoin-cli getnetworkinfo` gives you a variety of information on y | ||||
| ``` | ||||
| $ bitcoin-cli getnetworkinfo | ||||
| { | ||||
|   "version": 140000, | ||||
|   "subversion": "/Satoshi:0.14.0/", | ||||
|   "version": 150100, | ||||
|   "subversion": "/Satoshi:0.15.1/", | ||||
|   "protocolversion": 70015, | ||||
|   "localservices": "000000000000000d", | ||||
|   "localrelay": false, | ||||
| @ -232,4 +241,3 @@ The ~/.bitcoin directory contains all of your files, while `bitcoin-cli help` an | ||||
| ## What's Next? | ||||
| 
 | ||||
| Continue "Understanding Your Bitcoin Setup" with [§3.3: Setting Up Your Wallet](03_3_Setting_Up_Your_Wallet.md). | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user