2017 m. rugsėjo 11 d., pirmadienis

bitcoin configuration options

############################################################
#  Bitcoin-cash                                          #
#                                                          #
#  To start bitcoin:                               #
#      # systemctl start bitcoind                          #
#  To communicate with bitcoin-classic as a normal user:   #
#      $ bitcoin-cli help                                  #
#                                                          #
#  Config:        /etc/bitcoin/bitcoin.conf                #
#  Blockchain:    /var/lib/bitcoind                        #
#                                                          #
############################################################


Before running bitcoin, you can specify configuration file:
$ bitcoin-qt -conf=/home/$USER/.bitcoin/bitcoin.conf

Generating key:

To generate private key:
$ walletpassphrase your-wallet-passphrase 300


Getting key:

The easiest way is to export your private keys using the dumpprivkey functionality.
DumpPrivKey: returns the wallet-import-format (WIP) private key corresponding to an address. (But does not remove it from the wallet.) Bitcoin Developer Reference

Dump private key:
$ dumpprivkey <your bitcoin address>


-prune=<n>
Reduce storage requirements by pruning (deleting) old blocks. This mode disables wallet support and is incompatible with -txindex. Warning: Reverting this setting requires re-downloading the entire blockchain. (default: 0 = disable pruning blocks, >%u = target size in MiB to use for block files)

A value of 0 disables pruning. The minimal value above 0 is 550.Where 550 is the size in MB you want the node to ocupy in your system.



Give Higher CPU Priority to Bitcoin-Qt Process

$ sudo renice -20 -p 2202

-20 is the nice value a value between -20 and +19. The lower the nice value, the higher priority the process gets.

$ sudo renice -20 -p `pgrep bitcoin-qt`


Other interesting options:



RPC server options:
-server Accept command line and JSON-RPC commands
-rest Accept public REST requests (default: 0)
-rpcuser=<user> Username for JSON-RPC connections
-rpcpassword=<pw> Password for JSON-RPC connections
-conf=<file> Specify configuration file (default: bitcoin.conf)
-addnode=<ip> Add a node to connect to and attempt to keep the connection open
-onion=<ip:port> Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)


Connection options:
-port=<port> Listen for connections on <port> (default: 8333 or testnet: 18333)
-proxy=<ip:port> Connect through SOCKS5 proxy
-proxyrandomize Randomize credentials for every proxy connection. This enables Tor stream isolation (default: 1)
-torcontrol=<ip>:<port> Tor control port to use if onion listening enabled (default: 127.0.0.1:9051)
-torpassword=<pass> Tor control port password (default: empty)

Wallet options:

-disablewallet Do not load the wallet and disable wallet RPC calls
-mintxfee=<amt> Fees (in BTC/kB) smaller than this are considered zero fee for transaction creation (default: 0.00001)
-paytxfee=<amt> Fee (in BTC/kB) to add to transactions you send (default: 0.00)
-rescan Rescan the block chain for missing wallet transactions on startup
-salvagewallet Attempt to recover private keys from a corrupt wallet on startup
-wallet=<file> Specify wallet file (within data directory) (default: wallet.dat)


Other:
Transferring from bitcoin fullnode to electrum.
https://en.bitcoin.it/wiki/Transferring_coins_from_Bitcoin-Qt_to_Electrum