Skip to content

Bookkeeping Node Deployment

DavidthePangwaer edited this page Oct 8, 2016 · 13 revisions

###Antshares Blockchain Bookkeeping Node Deployment on Windows Server

  1. System
  • CPU: Dual-Core+
  • RAM: 4G+
  • Bandwidth: 5M+
  • OS:
AntSharesUI AntSharesDaemon Miner
Windows 7 SP1 x64
Windows Server 2008 R2
  1. Environment
  1. Installation
  • Compile [Miner], or download it from our official website.
  • Copy [Miner] to the target server
  • Enable Firewall Port: 10332,10333,20332,20333
  • Run Miner.exe to initiate
    Miner.exe activates one bookkeeping node Miner.exe /rpc activates one bookkeeping node with RPC server

###Antshares Blockchain Bookkeeping Node Deployment in Linux

  1. System
  • CPU: Dual-Core
  • RAM: 4G+
  • Bandwidth: 5M+
  • OS:
AntSharesUI AntSharesDaemon Miner
Ubuntu 14.04
Ubuntu 16.04
CentOS 7.1
Red Hat 7.1
  1. Linux Deployment Explained

The bookkeeping program is currently written in C#, thus an appropriate running environment is required to successfully run in Linux. The deployment comprises 2 steps.

  • Complete .Net Core running environment
  • Bookkeeping Node Deployment
  1. For .Net Core environment, check: .Net Core
  • Ubuntu 14.04
    • sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list'
    • sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893
    • sudo apt-get update
    • sudo apt-get install dotnet-dev-1.0.0-preview2-003131
  • Ubuntu 16.04
    • sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list'
    • sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893
    • sudo apt-get update
    • sudo apt-get install dotnet-dev-1.0.0-preview2-003131
  • CentOS 7.1
    • sudo yum install libunwind libicu
    • curl -sSL -o dotnet.tar.gz https://go.microsoft.com/fwlink/?LinkID=827529
    • sudo mkdir -p /opt/dotnet && sudo tar zxf dotnet.tar.gz -C /opt/dotnet
    • sudo ln -s /opt/dotnet/dotnet /usr/local/bin
  • RedHat Enterprise Linux 7 Server
    • subscription-manager repos --enable=rhel-7-server-dotnet-rpms
    • yum install scl-utils
    • yum install rh-dotnetcore10
    • scl enable rh-dotnetcore10 bash
  • If the installation is successful, check if the dotnet core environment is successfully installed with the following command:
    • mkdir hwapp
    • cd hwapp
    • dotnet new
    • dotnet restore
    • dotnet run
      image
  1. Bookkeeping Node Deployment
  • Compile [Miner], or download it from our official website.
  • Copy [Miner] to the target server
  • Enable Firewall Port: 10332,10333,20332,20333
  • Run Miner.dll to initiate
    dotnet Miner.dll activates one bookkeeping node
    dotnet Miner.dll /rpc activates one bookkeeping node with rpc server

###Antshares Blockchain Private Chain Deployment

A private Antshares Blockchain requires at least 4 servers to deploy with the same aforementioned system requirements. Each server corresponds to one bookkeeping node. The configuration is as the following:

  • server: 192.168.1.1 192.168.1.2
    192.168.1.3
    192.168.1.4

  • Generate 4 wallets corresponding to 4 servers with the Antshares Client:

Server Wallet File
192.168.1.1 1.db1
192.168.1.2 2.db1
192.168.1.3 3.db1
192.168.1.4 4.db1

Detailed Info. as follows:

1.db3
Address ATZrEyk9GohKinGVbpRAZoSK1ckKWYTQNV
Private Key L2Rw1BvoGEDbzAkzVeq289Fkzccnm8YTKtVmts7SywAcxdZnwqZC
Public Key 02e0a3e4d9b70af8b96e0ad6b43189bf1c191309e4c15b7ce6b0c7f35650c36ed2
2.db3
Address AbW7LLZ5uzBjDUPC1Ef5EpQ3aHJRvdFrEf
Private Key Kz4MNpnM5kA3BUr8ddvDb3YNy7qLeKzK1RxwdHJkJnteAn8fztn1
Public Key 02a0f6540a8a97332ba39d03abcc7f331f6959ee132172fe673ff57a2a83db7a1c
3.db3
Address AQED2Gsz47CFzKjgS9ZS6xcY5dZ3bDmjAV
Private Key L21MTE9opL21aqjyspQdEp7xTuSf7djfugTJysNxL5or6WmS5vBP
Public Key 025657e6dc48f99bc79125a14ca9218f3bc4ada8a83611ecde3ba2d77a2a4b9ba3
4.db3
Address ANbTZqQd1Harod4nsKtNb8ZWErqgPV1of1
Private Key L2bqrxNQeWzXjC83ALZU6ipsAAtwDUvD5MHGRJwwHfKtVpLmfJBR
Public Key 03dc1d4b35a0d7a72b167cc650bc0c61ecbbf7a83595a956dd88369853cf8cd415

Deploy Private Antshares Blockchain in Linux or on Windows Server

  1. Change the Seed Node IP(...\AntShares\AntSharesCore\network\localnode.cs) image

  2. Change the Standingby Bookkeeper...\AntShares\AntSharesCore\Core\Blockchain.cs) image

  3. Change the magic value(...\AntShares\AntSharesCore\network\message.cs) image

  4. Compile the project

  5. Copy the compiled project files and wallet files to the 4 servers

  6. Run Command to initiate the nodes (also activates rpc service)

  • dotnet Miner.dll /rpc
    image
  1. Initiate Consensus on the 4 servers
Server Command
192.168.1.1 open wallet /home/antshares/wallets/1.db3
192.168.1.2 open wallet /home/antshares/wallets/2.db3
192.168.1.3 open wallet /home/antshares/wallets/3.db3
192.168.1.4 open wallet /home/antshares/wallets/4.db3

Wallet Password required to initiate. If successful, the 4 nodes will commence the consensus (start mining), as shown below: image

###Command Guide

  1. Command Lines
    version Shows current version of the software clear Clears the screen exit To exit the program
  2. Checking Node Info. show node Shows currently linked node addresses and ports show state Shows current blockchain synchronization status
  3. Wallet Operations create wallet <path> Creates wallet files open wallet <path> Opens wallet files list account Lists all accounts in a wallet list address Lists all contract addresses in a wallet

Clone this wiki locally