{"id":367,"date":"2020-09-29T22:04:25","date_gmt":"2020-09-29T22:04:25","guid":{"rendered":"http:\/\/bitcoinsv-io.bitproton.com\/?post_type=miner_document&p=367"},"modified":"2020-09-29T19:30:47","modified_gmt":"2020-09-29T19:30:47","slug":"bitcoind","status":"publish","type":"miner_document","link":"https:\/\/bitcoinsv.io\/documentation\/miners\/installation\/bitcoind\/","title":{"rendered":"Bitcoind"},"content":{"rendered":"\n
The following instructions describe installing Bitcoin SV Node using tools available in most mainstream Linux distributions. The assumption has been made that you are using a Bourne-like shell such as To start the install of Bitcoin, make sure you use an account that can use Download the zipped release of your choosing, for this example we are using 1.0.5 which is the latest release at the time of writing:<\/p>\n\n\n\n Confirm downloaded file sha hash matches those provided at download.bitcoinsv.io<\/a> for the version you have downloaded.<\/p>\n\n\n\n Locate the file you downloaded and extract it using the Create a symbolic link from a new directory called Create a Create a Below is an example A full list of available options can be seen by running To run Bitcoind, pass in the location of the configuration file as well as the location of where to store the bitcoin data:<\/p>\n\n\n\n (In our example the user test was used)<\/p>\n\n\n\n Create the (be sure to replace Then start:<\/p>\n\n\n\n Included in this repo are docker images for the Bitcoin SV Node implementation. Thanks to Josh Ellithorpe and his repository<\/a>, which provided the base for this repo.<\/p>\n\n\n\n This Docker image provides bash<\/code>.<\/p>\n\n\n\n
su<\/code> or
sudo<\/code> to install software into directories owned by the root user.<\/p>\n\n\n\n
Download<\/h2>\n\n\n\n
$ wget https:\/\/download.bitcoinsv.io\/bitcoinsv\/1.0.5\/bitcoin-sv-1.0.5-x86_64-linux-gnu.tar.gz\n<\/pre>\n\n\n\n
$ sha256sum bitcoin-sv-1.0.5-x86_64-linux-gnu.tar.gz\n\/\/Expected Output \n96f7c56c7ebd4ecb2dcd664297fcf0511169ac33eaf216407ebc49dae2535578 bitcoin-sv-1.0.5-x86_64-linux-gnu.tar.gz\n<\/pre>\n\n\n\n
Setup<\/h2>\n\n\n\n
tar<\/code> command followed by the argument
xzf<\/code> followed by the file name. The argument
xzf<\/code> means eXtract the gZipped tar archive file. For example, for a 64-bit tar archive in your current directory, the command is:<\/p>\n\n\n\n
$ tar xvf bitcoin-sv-1.0.5-x86_64-linux-gnu.tar.gz\n<\/pre>\n\n\n\n
bitcoin<\/code> to the
bitcoin-sv-1.0.5<\/code> directory you just made by unzipping for easier use and updates:<\/p>\n\n\n\n
$ ln -s bitcoin-sv-1.0.5 bitcoin\n<\/pre>\n\n\n\n
bitcoin-data<\/code> directory to put bitcoin data in (or else Bitcoin will put data in
~\/.bitcoin<\/code> by default):<\/p>\n\n\n\n
$ mkdir bitcoin-data\n<\/pre>\n\n\n\n
bitcoin.conf<\/code> file in the directory to configure the settings to run your node using:<\/p>\n\n\n\n
$ cd bitcoin-data\/\n$ vim bitcoin.conf\n<\/pre>\n\n\n\n
bitcoin.conf<\/code> file used by a node on the STN<\/strong>:<\/p>\n\n\n\n
bitcoind --help<\/code><\/p>\n\n\n\n
#start in background\ndaemon=1\n\n#select network -- comment out both for mainnet\n#testnet=1\nstn=1\n\n#Required Consensus Rules for Genesis\nexcessiveblocksize=10000000000 #10GB\nmaxstackmemoryusageconsensus=100000000 #100MB\n\n#Mining\n#biggest block size you want to mine\nblockmaxsize=4000000000 \nblockassembler=journaling #journaling is default as of 1.0.5\n\n#preload mempool\npreload=1\n\n#mempool usage allowance\nmaxmempool=8000 #8G\ndbcache=8192 #8G\n\n#Pruning -- Uncomment to trim the chain in an effort to keep disk usage below the figure set\n#prune=100000 #100GB\n\n#orphan transaction storage \n#blockreconstructionextratxn=200000\n#maxorphantxsize=10000\n\n#transaction options\n#maxsigcachesize=260\n#maxscriptcachesize=260\n#minrelaytxfee=0.00000001\n#mintxfee=0.00000001\n#dustrelayfee=0.00000001\n#blockmintxfee=0.00000001\n#relaypriority=0\n#feefilter=0\n#limitfreerelay=1000\n#maxscriptsizepolicy=500000\n\n#OP Return max size\n#datacarriersize=100000 #Genesis default is UINT32_MAX\n\n#Max number and size of related Child and Parent transactions per block template \nlimitancestorcount=100\nlimitdescendantcount=100\n#limitancestorsize=25000000\n#limitdescendantsize=25000000\n\n#connection options\nmaxconnections=80\n\n#ZMQ\n#zmqpubhashtx=tcp:\/\/127.0.0.1:28332\n#zmqpubhashblock=tcp:\/\/127.0.0.1:28332\n\n#Ports - Leave commented for defaults\n#port=9333\n#rpcport=9332\n\n#rpc settings\nrpcworkqueue=600\nrpcthreads=16\n#rpcallowip=0.0.0.0\/0 \nrpcuser=CHANGE_ME\nrpcpassword=CHANGE_ME\n\n#debug options\n#can be: net, tor,\n# mempool, http, bench, zmq, db, rpc, addrman, selectcoins,\n# reindex, cmpctblock, rand, prune, proxy, mempoolrej, libevent,\n# coindb, leveldb, txnprop, txnsrc, journal, txnval.\n# 1 = all options enabled.\n# 0 = off which is default\n#debug=1\n\n#debugexclude to ignore set log items, can be used to keep log file a bit cleaner\ndebugexclude=libevent\ndebugexclude=leveldb\ndebugexclude=zmq\ndebugexclude=txnsrc\ndebugexclude=net\n\n#shrinkdebugfile=0 # Setting to 1 prevents bitcoind from clearning the log file on restart. 0\/off is default\n\n#multi-threaded options\n#threadsperblock=32\n#maxparallelblocks\n#scriptvalidatormaxbatchsize\n#maxparallelblocksperpeer\nmaxstdtxvalidationduration=15\nmaxcollectedoutpoints=1000000\nmaxstdtxnsperthreadratio=10000\n#maxnonstdtxvalidationduration\n<\/pre>\n\n\n\n
Run<\/h2>\n\n\n\n
Run directly<\/h3>\n\n\n\n
$ \/home\/test\/bitcoin\/bin\/bitcoind -conf=<\/strong>\/home\/test\/bitcoin-data\/bitcoin.conf -datadir=<\/strong>\/home\/test\/bitcoin-data -daemon\n<\/pre>\n\n\n\n
Run with
systemctl<\/code><\/h3>\n\n\n\n
bitcoind.service<\/code> file:<\/p>\n\n\n\n
$ sudo vim \/etc\/systemd\/system\/bitcoind.service\n<\/pre>\n\n\n\n
bitcoind.service<\/code>:<\/p>\n\n\n\n
[Unit]<\/strong>\nDescription=<\/strong>Bitcoin service\nAfter=<\/strong>network.target\n[Service]<\/strong>\nType=<\/strong>forking\nExecStart=<\/strong>\/home\/test\/bitcoin\/bin\/bitcoind -conf=\/home\/test\/bitcoin-data\/bitcoin.conf -datadir=\/home\/test\/bitcoin-data -daemon\nExecStop=<\/strong>\/home\/test\/bitcoin\/bin\/bitcoin-cli -conf=\/home\/test\/bitcoin-data\/bitcoin.conf -datadir=\/home\/test\/bitcoin-data stop\nExecReload=<\/strong>\/bin\/kill -s HUP $MAINPID\nRestart=<\/strong>on-abnormal\nTimeoutStopSec=<\/strong>120\nKillMode=<\/strong>none\nPrivateTmp=<\/strong>true\nUser=<\/strong>test\n[Install]<\/strong>\nWantedBy=<\/strong>multi-user.target\n<\/pre>\n\n\n\n
test<\/code> in the above with your logged user)<\/p>\n\n\n\n
$ sudo systemctl start bitcoind.service\n<\/pre>\n\n\n\n
Run with Docker<\/h3>\n\n\n\n
bitcoind<\/code>,
bitcoin-cli<\/code> and
bitcoin-tx<\/code> which can be used to run and interact with a Bitcoin server.<\/p>\n\n\n\n