注:系统要求 :Ubuntu18.04,
因为BSV最新版本要求glibc-2.25版本,而Ubuntu16.04支持最高版本是2.23,所以系统要选择Ubuntu8.04最合适
1、下载BSV包
https://download.bitcoinsv.io/bitcoinsv/
root@coin:/data/coins/BSV# wget https://download.bitcoinsv.io/bitcoinsv/1.0.6/bitcoin-sv-1.0.6-x86_64-linux-gnu.tar.gz
--2021-01-26 14:19:43-- https://download.bitcoinsv.io/bitcoinsv/1.0.6/bitcoin-sv-1.0.6-x86_64-linux-gnu.tar.gz
Resolving download.bitcoinsv.io (download.bitcoinsv.io)... 104.21.90.83, 172.67.197.175, 2606:4700:3031::ac43:c5af, ...
Connecting to download.bitcoinsv.io (download.bitcoinsv.io)|104.21.90.83|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 21023631 (20M) [application/octet-stream]
Saving to: ‘bitcoin-sv-1.0.6-x86_64-linux-gnu.tar.gz’
bitcoin-sv-1.0.6-x86_64-linux-gnu.tar.gz 100%[=============================================================================================>] 20.05M 397KB/s in 39s
2021-01-26 14:20:23 (530 KB/s) - ‘bitcoin-sv-1.0.6-x86_64-linux-gnu.tar.gz’ saved [21023631/21023631]
2、解压tar包
root@coin:/data/coins# tar -xf bitcoin-sv-0.1.1-x86_64-linux-gnu.tar.gz
root@coin:/data/coins# mv bitcoin-sv-0.1.1 BSV
3、添加配置文件
vim bsvcoin.conf
dbcache=4000
# Must set txindex=1 so Bitcoin keeps the full index
txindex=1
datadir=/data/coins/BSV/bsvdata
# [rpc]
# Accept command line and JSON-RPC commands.
server=1
# Default Username and Password for JSON-RPC connections
# Planaria uses these values by default, but if you can change the settings
# When you run 'pc start'
rpcuser=bsvrpc
rpcpassword=admin
# If you want to allow remote JSON-RPC access
rpcallowip=0.0.0.0/0
rpcbind=0.0.0.0
# [wallet]
# disablewallet=1
rpcport=8333
port=8332
# [ZeroMQ]
# ZeroMQ messages power the realtime Planaria crawler
# so it's important to set the endpoint
zmqpubhashtx=tcp://0.0.0.0:28332
zmqpubhashblock=tcp://0.0.0.0:28332
# Planaria makes heavy use of JSON-RPC so it's set to a higher number
# But you can tweak this number as you want
rpcworkqueue=512
# Support large mempool
maxmempool=4000
excessiveblocksize=0
maxstackmemoryusageconsensus=0
# Support large pushdata
datacarriersize=100000
# Long mempool chain support
limitancestorsize=100000
limitdescendantsize=100000
addnode=104.215.14.250
addnode=13.231.139.183
addnode=13.231.20.63
addnode=13.231.92.219
addnode=54.95.24.226
addnode=52.195.19.127
4、启动节点
便于识别将程序名称给成bsv
cd /data/coins/BSV/bin && ls
bitcoin-tx bitcoind bsvcoin-cli bsvcoin-miner bsvcoin-seeder test_bitcoin
mv bitcoin-cli bsvcoin-cli
mv bitcoin-miner bsvcoin-miner
mv bitcoin-seeder bsvcoin-seeder
mv test_bitcoin test_bsvcoin
root@coin:/data/coins/BSV# cd bin/
root@coin:/data/coins/BSV/bin# mv bitcoin-cli bsvcoin-cli
root@coin:/data/coins/BSV/bin# mv bitcoind bsvcoind
root@coin:/data/coins/BSV/bin# ./bsvcoind --conf=/data/coins/BSV/bsvcoin.conf --daemon
Bitcoin server starting
root@coin:/data/coins/BSV/bin# ps -ef |grep bsv
root 18712 1 0 12:29 ? 00:00:00 ./bsvcoind --conf=/data/coins/BSV/bsvcoin.conf --daemon
5、BSV钱包节点加密
root@coin:/data/coins/BSV/bitcoin-sv-1.0.6/bin# ./bsvcoin-cli --conf=/data/coins/BSV/bsvcoin.conf encryptwallet "123456"
wallet encrypted; Bitcoin server stopping, restart to run with encrypted wallet. The keypool has been flushed and a new HD seed was generated (if you are using HD). You need to make a new backup.
测试节点加密情况
root@coin:/data/coins/BSV/bitcoin-sv-1.0.6/bin# /data/coins/BSV/bitcoin-sv-1.0.6/bin/bsvcoin-cli -conf=/data/coins/BSV/bsvcoin.conf walletpassphrase 123456 30
6、节点验证
1)查询节点同步信息
root@coin:/data/coins/BSV/bin# ./bsvcoin-cli --conf=/data/coins/BSV/bsvcoin.conf getinfo
{
"version": 101000600,
"protocolversion": 70015,
"blocks": 122969,
"timeoffset": 0,
"connections": 9,
"proxy": "",
"difficulty": 109670.1332924774,
"testnet": false,
"stn": false,
"paytxfee": 0.00000000,
"relayfee": 0.00000250,
"errors": "Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues. A large valid fork has been detected.",
"maxblocksize": 9223372036854775807,
"maxminedblocksize": 128000000,
"maxstackmemoryusagepolicy": 100000000,
"maxstackmemoryusageconsensus": 9223372036854775807
}
2)查看进程的端口
root@coin:/data/coins/BSV/bin# netstat -antpu |grep 18712
tcp 0 0 0.0.0.0:28332 0.0.0.0:* LISTEN 18712/./bsvcoind
tcp 0 0 0.0.0.0:8332 0.0.0.0:* LISTEN 18712/./bsvcoind
tcp 0 0 0.0.0.0:8333 0.0.0.0:* LISTEN 18712/./bsvcoind
tcp 0 0 192.168.0.140:33808 34.243.19.193:8333 ESTABLISHED 18712/./bsvcoind
tcp 0 0 192.168.0.140:52758 157.230.41.128:8333 ESTABLISHED 18712/./bsvcoind
tcp 0 0 192.168.0.140:41060 206.189.104.98:8333 ESTABLISHED 18712/./bsvcoind
tcp 0 0 192.168.0.140:49674 88.99.146.162:8333 ESTABLISHED 18712/./bsvcoind
tcp 0 0 192.168.0.140:39452 174.138.5.253:8333 ESTABLISHED 18712/./bsvcoind
tcp 0 0 192.168.0.140:52142 13.231.92.219:8333 ESTABLISHED 18712/./bsvcoind
tcp 0 0 192.168.0.140:59438 104.248.30.60:8333 ESTABLISHED 18712/./bsvcoind
tcp 0 0 192.168.0.140:57414 95.217.93.3:8333 ESTABLISHED 18712/./bsvcoind
tcp 0 0 192.168.0.140:56750 159.65.152.200:8333 ESTABLISHED 18712/./bsvcoind
tcp6 0 0 :::8332 :::* LISTEN 18712/./bsvcoind
3)一段时间后继续查看最新高度
root@coin:/data/coins/BSV/bin# ./bsvcoin-cli --conf=/data/coins/BSV/bsvcoin.conf getinfo
{
"version": 100010100,
"protocolversion": 70015,
"blocks": 180658,
"timeoffset": 0,
"connections": 8,
"proxy": "",
"difficulty": 1733207.513848385,
"testnet": false,
"stn": false,
"paytxfee": 0.00000000,
"relayfee": 0.00001000,
"errors": "",
"maxblocksize": 128000000,
"maxminedblocksize": 32000000
}