-
Notifications
You must be signed in to change notification settings - Fork 1k
Bookkeeping Node Deployment
###Antshares Blockchain Bookkeeping Node Deployment on Windows Server
- System
- CPU: Dual-Core
- RAM: 4G+
- Bandwidth: 5M+
- OS:
| AntSharesUI | AntSharesDaemon | Miner | |
|---|---|---|---|
| Windows 7 SP1 x64 | ✅ | ✅ | ✅ |
| Windows Server 2008 R2 | ✅ | ✅ |
- Environment
- 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.exeactivates one bookkeeping nodeMiner.exe /rpcactivates one bookkeeping node with RPC server
###Antshares Blockchain Bookkeeping Node Deployment in Linux
- 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 | ✅ | ✅ |
- 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
- 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 417A0893sudo apt-get updatesudo 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 417A0893sudo apt-get updatesudo apt-get install dotnet-dev-1.0.0-preview2-003131
- CentOS 7.1
sudo yum install libunwind libicucurl -sSL -o dotnet.tar.gz https://go.microsoft.com/fwlink/?LinkID=827529sudo mkdir -p /opt/dotnet && sudo tar zxf dotnet.tar.gz -C /opt/dotnetsudo ln -s /opt/dotnet/dotnet /usr/local/bin
- RedHat Enterprise Linux 7 Server
subscription-manager repos --enable=rhel-7-server-dotnet-rpmsyum install scl-utilsyum install rh-dotnetcore10scl enable rh-dotnetcore10 bash
- If the installation is successful, check if the dotnet core environment is successfully installed with the following command:
mkdir hwappcd hwappdotnet newdotnet restore-
dotnet run
- 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.dllactivates one bookkeeping node
dotnet Miner.dll /rpcactivates 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
-
Change the Seed Node IP(...\AntShares\AntSharesCore\network\localnode.cs)
-
Change the Standingby Bookkeeper...\AntShares\AntSharesCore\Core\Blockchain.cs)
-
Change the magic value(...\AntShares\AntSharesCore\network\message.cs)
-
Compile the project
-
Copy the compiled project files and wallet files to the 4 servers
-
Run Command to initiate the nodes (also activates rpc service)
- dotnet Miner.dll /rpc
- 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:
###Command Guide
- Command Lines
versionShows current version of the softwareclearClears the screenexitTo exit the program - Checking Node Info.
show nodeShows currently linked node addresses and portsshow stateShows current blockchain synchronization status - Wallet Operations
create wallet <path>Creates wallet filesopen wallet <path>Opens wallet fileslist accountLists all accounts in a walletlist addressLists all contract addresses in a wallet



