• Setting up an Asynx node

    In this step by step guide we walk you through the basics of installing an Asynx node on Linux. In our example we are using a clean install of Ubuntu Server 18.04.

    At this point it is prudent to highlight a number of caveats. Firstly, in our example we are using the apt-get repository manager as the default which ships with Ubuntu. Other repository managers such as yum will also suffice and both apt-get and yum can be used interchangeably.

    Additionally, this tutorial does not cover security policies, firewall settings or the whole range of customisations, shortcuts and hacks available. Most System Administators for a professional setup will be well versed in these methods and will use different, more efficient methods of navigation with bash codes, such as concatenating multiple downloads, extracting, installing and removing tarballs with a single string of commands using the curl method, over the less efficient wget method, as used in this tutorial.

    Please also be aware that security policies such as open ports and custom TCP/UDP settings may be located outside of both the firewall settings and the terminal, especially when using VPS's which are usually located in your hosting control panel.

    Here is our latest Asynx Bitcoin Cash Codebase.

  • Requirements

    As a guide, we have created a list of minimum and recommended requirements. These requirements are under the assumption that you wish to run a full node and not an SVP node. For pool operators and network nodes it's recommended that you DO NOT PRUNE your blockchain. The basics of setting up your bitcoin.conf file are included in this tutorial; however pruning, reducing active connections, max transactions, keypool limits and other such configuration based limitations are only for selfish nodes, which add no benefit to the network. Whilst it is possible should you wish, we do not recommended this when running Asynx node software.

  • Minimum Specification
    • CPU Cores: 4
    • CPU Speed: 3200GHz
    • RAM: 4GB
    • Storage: 250GB
    • Network: 1GB/s
  • Recommended Specification
    • CPU Cores: 12+
    • CPU Speed: 4600GHz+
    • RAM: 64GB+
    • Storage: 4TB+
    • Network: 10GB/s+
  • Optimal Specification (Pool Operators)
    • CPU Cores: 128+
    • CPU Speed: 5200GHz+
    • RAM: 128GB+
    • Storage: 20TB+
    • Network: 25GB/s+
  • Getting Started

    On the Ubuntu Linux console, use the following commands to install the BerkleyDB package:

  • 				
      sudo apt-get upgrade
      sudo add-apt-repository ppa:bitcoin-abc/ppa
      sudo apt-get update
      sudo apt-get install libdb5.3-dev libdb5.3++-dev
    				

    You must use BerkleyDB version 5.3 for everything to work.

    Use the following commands to install the required libraries and the required packages:

    				
      sudo apt-get install libboost-all-dev libzmq3-dev libminiupnpc-dev
      sudo apt-get install curl git build-essential libtool autotools-dev
      sudo apt-get install automake pkg-config bsdmainutils python3
      sudo apt-get install software-properties-common libssl-dev libevent-dev
    				

    Create a directory to download the Asynx Bitcoin Cash node software and other required packages.

    				
      mkdir downloads
      cd /downloads
    				

    Now we're going to download then unpack our required libraries, then remove the compressed folders.

    				
      sudo wget https://asynx.io/sources/boost_1_63_0.tar.bz2
      sudo wget https://asynx.io/sources/ccache-3.3.6.tar.bz2
      sudo wget https://asynx.io/sources/zeromq-4.1.5.tar.gz
      sudo tar xvjf boost_1_63_0.tar.bz2
      sudo tar xvjf ccache-3.3.6.tar.bz2
      sudo tar xvzf zeromq-4.1.5.tar.gz
      sudo rm boost_1_63_0.tar.bz2 -r
      sudo rm ccache-3.3.6.tar.bz2 -r
      sudo rm zeromq-4.1.5.tar.gz -r
    				

    Now we can start building our muti-threaded c++ libraries. This will take about 15 minutes to install.

    				
      cd boost_1_63_0
      ./bootstrap.sh
      ./b2
    				

    Once installed, skip back to your downloads directory and install ccache 3.3.6.

    				
      cd ../ccache-3.3.6
      ./configure
      make
      sudo make install
    				

    Now we do the same for zeromq.

    				
      cd ../zeromq-4.1.5
      ./configure
      make
      sudo make install
      cd ../
    				

    This is where the real fun begins. Now we download, compile, build and install the latest version of Asynx Bitcoin Cash Node Pro. Make sure that you are in the downloads folder and follewed the last cd ../ to skip back. You can check which folder you are in by typing at any time ls. To view hidden folders, use ls -a

    				
      sudo git clone https://github.com/Theoretix/Asynx
      cd Asynx
      sudo ./autogen.sh
      sudo ./configure
      sudo make
      sudo make install
    				

    Create a Bitcoin configuration file and choose a username and a password. You can use either vi, vim, or nano. Switch the syntax below for your prefered file editor.

    				
      mkdir ~/.bitcoin
      vi $HOME/.bitcoin/bitcoin.conf
      // You can also use nano for the above if you prefer.
      
      // Create your RPC username and password
      rpcuser=myusername2018
      rpcpassword=mypassword123
      // Make sure you safely save and exit.
      // In nano it's ctrl O to write out, ctrl X to exit.
    				

    In our example, we choose the username myusername2018 and the password mypassword123.

    Start the Bitcoin Cash node daemon using the following command:.

    				
      bitcoind -daemon
    				

    That's it, your new Bitcoin Cash node should now be running! Currently the Bitcoin Cash blockchain is around 165GB in size and growing daily. Depending on your internet speed it can take anywhere from 14-48 hours to download the whole blockchain. Use bitcoin-cli -help to see the list of commands you can use in Bitcoin's Command Line Interface. Here are some useful commands:

    				
      bitcoin-cli getinfo
      bitcoin-cli getblockchaininfo
      bitcoin-cli getnetworkinfo
      bitcoin-cli getwalletinfo
      bitcoin-cli getpeerinfo
    				

    To safely stop the bitcoin daemon from running at any time, use the command:

    				
      bitcoin-cli stop
      				

    You can check for any syncing errors using the command:

    				
      tail -f ~/.bitcoin/debug.log
      				

    Here is a helpful little bitcoin.conf template:

    				
    ##
    ## bitcoin.conf configuration file. Lines beginning with # are comments.
    ##
     
    # Network-related settings:
    
    # Run on the test network instead of the real bitcoin cash network.
    #testnet=0
    
    # Run a regression test network
    #regtest=0
    
    # Connect via a SOCKS5 proxy
    #proxy=127.0.0.1:9050
    
    # Bind to given address and always listen on it. Use [host]:port notation for IPv6
    #bind=address
    
    # Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6
    #whitebind=address
    
    ##############################################################
    ##            Quick Primer on addnode vs connect            ##
    ##  Let's say for instance you use addnode=4.2.2.4          ##
    ##  addnode will connect you to and tell you about the      ##
    ##    nodes connected to 4.2.2.4.  In addition it will tell ##
    ##    the other nodes connected to it that you exist so     ##
    ##    they can connect to you.                              ##
    ##  connect will not do the above when you 'connect' to it. ##
    ##    It will *only* connect you to 4.2.2.4 and no one else.##
    ##                                                          ##
    ##  So if you're behind a firewall, or have other problems  ##
    ##  finding nodes, add some using 'addnode'.                ##
    ##                                                          ##
    ##  If you want to stay private, use 'connect' to only      ##
    ##  connect to "trusted" nodes.                             ##
    ##                                                          ##
    ##  If you run multiple nodes on a LAN, there's no need for ##
    ##  all of them to open lots of connections.  Instead       ##
    ##  'connect' them all to one node that is port forwarded   ##
    ##  and has lots of connections.                            ##
    ##                                                          ##
    ##############################################################
    
    # Use as many addnode= settings as you like to connect to specific peers
    #addnode=69.164.218.197
    #addnode=10.0.0.2:8333
    
    # Alternatively use as many connect= settings as you like to connect ONLY to specific peers
    #connect=69.164.218.197
    #connect=10.0.0.1:8333
    
    # Listening mode, enabled by default except when 'connect' is being used
    #listen=1
    
    # Maximum number of inbound+outbound connections.
    #maxconnections=
    
    #
    # JSON-RPC options (for controlling a running Bitcoin/bitcoind process)
    #
    
    # server=1 tells Bitcoin-Qt and bitcoind to accept JSON-RPC commands
    #server=0
    
    # Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6.
    # This option can be specified multiple times (default: bind to all interfaces)
    #rpcbind=address
    
    # If no rpcpassword is set, rpc cookie auth is sought. The default `-rpccookiefile` name
    # is .cookie and found in the `-datadir` being used for bitcoind. This option is typically used
    # when the server and client are run as the same user.
    #
    # If not, you must set rpcuser and rpcpassword to secure the JSON-RPC api. The first
    # method(DEPRECATED) is to set this pair for the server and client:
    #rpcuser=AsynxDemoUser1
    #rpcpassword=YourSuperGreatPasswordNumber_DO_NOT_USE_THIS_OR_YOU_WILL_GET_ROBBED_51523
    #
    # The second method `rpcauth` can be added to server startup argument. It is set at intialization time
    # using the output from the script in share/rpcuser/rpcuser.py after providing a username:
    #
    # ./share/rpcuser/rpcuser.py alice
    # String to be appended to bitcoin.conf:
    # rpcauth=alice:f7efda5c189b999524f151318c0c86$d5b51b3beffbc02b724e5d095828e0bc8b2456e9ac8757ae3211a5d9b16a22ae
    # Your password:
    # DONT_USE_THIS_YOU_WILL_GET_ROBBED_8ak1gI25KFTvjovL3gAM967mies3E=
    #
    # On client-side, you add the normal user/password pair to send commands:
    #rpcuser=alice
    #rpcpassword=DONT_USE_THIS_YOU_WILL_GET_ROBBED_8ak1gI25KFTvjovL3gAM967mies3E=
    #
    # You can even add multiple entries of these to the server conf file, and client can use any of them:
    # rpcauth=bob:b2dd077cb54591a2f3139e69a897ac$4e71f08d48b4347cf8eff3815c0e25ae2e9a4340474079f55705f40574f4ec99
    
    # How many seconds bitcoin will wait for a complete RPC HTTP request.
    # after the HTTP connection is established. 
    #rpcclienttimeout=30
    
    # By default, only RPC connections from localhost are allowed.
    # Specify as many rpcallowip= settings as you like to allow connections from other hosts,
    # either as a single IPv4/IPv6 or with a subnet specification.
    
    # NOTE: opening up the RPC port to hosts outside your local trusted network is NOT RECOMMENDED,
    # because the rpcpassword is transmitted over the network unencrypted.
    
    # server=1 tells Bitcoin-Qt to accept JSON-RPC commands.
    # it is also read by bitcoind to determine if RPC should be enabled 
    #rpcallowip=10.1.1.34/255.255.255.0
    #rpcallowip=1.2.3.4/24
    #rpcallowip=2001:db8:85a3:0:0:8a2e:370:7334/96
    
    # Listen for RPC connections on this TCP port:
    #rpcport=8332
    
    # You can use Bitcoin or bitcoind to send commands to Bitcoin/bitcoind
    # running on another host using this option:
    #rpcconnect=127.0.0.1
    
    # Create transactions that have enough fees so they are likely to begin confirmation within n blocks (default: 6).
    # This setting is over-ridden by the -paytxfee option.
    #txconfirmtarget=n
    
    # Miscellaneous options
    
    # Pre-generate this many public/private key pairs, so wallet backups will be valid for
    # both prior transactions and several dozen future transactions.
    #keypool=100
    
    # Pay an optional transaction fee every time you send bitcoins.  Transactions with fees
    # are more likely than free transactions to be included in generated blocks, so may
    # be validated sooner.
    #paytxfee=0.00
    
    # Enable pruning to reduce storage requirements by deleting old blocks. 
    # This mode is incompatible with -txindex and -rescan.
    # 0 = default (no pruning).
    # 1 = allows manual pruning via RPC.
    # must be greater than 550 = target to stay under in MiB. 
    #prune=550
    
    # User interface options
    
    # Start Bitcoin minimized
    #min=1
    
    # Minimize to the system tray
    #minimizetotray=1
      				

    Finally, if you need a list of DNS seeds, you can use the bitcoin.conf file to enter you addnodes. Here is a list of the latetest ones to get you going:

    				
    addnode=137.74.30.99
    addnode=13.231.75.87
    addnode=205.147.100.149
    addnode=195.201.124.90
    addnode=2a02:c207:1:272::1
    addnode=54.212.243.152
    addnode=35.157.227.145
    addnode=54.37.130.111
    addnode=2607:5300:60:84ec::70
    addnode=2600:1f14:486:db00:bea7:33ae:cecd:c196
    addnode=173.249.34.172
    addnode=47.254.23.25
    addnode=107.155.120.170
    addnode=47.91.218.54
    addnode=2400:6180:0:d0::3f46:2001
    addnode=220.133.9.125
    addnode=162.222.127.82
    addnode=13.231.86.47
    addnode=35.198.149.101
    addnode=139.59.3.45
    addnode=206.189.151.236
    addnode=2400:6180:0:d0::3fa8:2001
    addnode=94.130.35.227
    addnode=2604:a880:400:d0::2a31:9001
    addnode=2604:a880:cad:d0::240a:a001
    addnode=202.177.24.140
    addnode=136.243.139.120
    addnode=2001:41d0:203:23bd::
    addnode=123.51.190.194
    addnode=45.77.44.69
    addnode=2001:19f0:7001:9a1:5400:ff:fe77:69eb
    addnode=178.128.216.5
    addnode=173.212.202.33
    addnode=209.97.131.96
    addnode=18.222.101.52
    addnode=2a03:b0c0:2:f0::4c:f001
    addnode=178.128.240.143
    addnode=59.12.227.21
    addnode=47.104.214.12
    addnode=95.216.11.156
    addnode=18.204.172.164
    addnode=188.165.193.151
    addnode=47.74.223.11
    addnode=104.248.34.30
    addnode=2a01:7e01::f03c:91ff:fe3e:4f44
    addnode=180.70.92.126
    addnode=178.63.96.4
    addnode=209.97.181.74
    addnode=139.59.125.27
    addnode=94.130.16.85
    addnode=71.197.2.119
    addnode=52.211.14.233
    addnode=104.236.26.241
    addnode=146.0.231.132
    addnode=2400:8901::f03c:91ff:fe0d:1147
    addnode=13.229.154.80
    addnode=177.102.33.49
    addnode=71.197.2.119
    addnode=31.220.4.238
    addnode=118.190.25.228
    addnode=148.251.135.131
    addnode=120.27.23.196
    addnode=94.130.36.117
    addnode=147.135.131.25
    addnode=148.66.11.203
    addnode=18.236.132.181
    addnode=104.238.156.100
    addnode=144.76.202.44
    addnode=159.89.178.179
    addnode=145.239.94.183
    addnode=23.105.243.148
    addnode=178.62.34.73
    addnode=52.214.195.71
    addnode=82.202.197.224
    addnode=159.65.187.68
    addnode=45.32.79.103
    addnode=172.104.42.19
    addnode=47.52.165.108
    addnode=2a01:7e01::f03c:91ff:fefb:7bf5
    addnode=193.29.187.50
    addnode=139.59.116.38
    addnode=192.241.219.10
    addnode=47.254.75.65
    addnode=2a03:b0c0:1:d0::1a99:1001
    addnode=84.234.96.82
    addnode=5.9.20.16
    addnode=23.235.249.22
    addnode=13.65.202.254
    addnode=95.211.48.178
    addnode=80.99.163.31
    addnode=2a01:4f9:2a:1424::2
    addnode=45.40.200.200
    addnode=45.79.195.193
    addnode=95.79.35.133
    addnode=188.72.210.88
    addnode=185.100.87.206
    addnode=34.231.95.221
    addnode=13.67.38.130
    addnode=34.255.144.243
    addnode=47.91.236.52
    addnode=91.121.86.85
    addnode=18.85.22.239
    addnode=121.40.176.35
    addnode=95.216.19.219
    addnode=47.95.36.131
    addnode=178.63.93.201
    addnode=54.212.243.152
    addnode=190.123.23.13
    addnode=197.231.221.211
    addnode=2607:b400:26:0:34a3:684f:5cd7:2d8b
    addnode=54.255.254.130
    addnode=59.110.8.18
    addnode=132.148.132.9
    addnode=51.158.72.220
    addnode=51.15.106.21
    addnode=95.160.192.252
    addnode=37.189.47.141
    addnode=47.94.41.58
    addnode=148.251.80.220
    addnode=207.180.215.112
    addnode=52.178.181.38
    addnode=37.135.34.142