-
Notifications
You must be signed in to change notification settings - Fork 1k
Private Chain Deployment
#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 |
structured as follows:
deploy Antshares Private Chain on Windows Server or Linux
- Copy node files and wallet files to 4 servers, decompress the node files and find the config file protocol.json(...\AntSharesCore\AntSharesDaemon\protocol.json)
- change the value of magic(Magic)
- change the standingby bookkeepers(StandbyMiners)
- change the IP info of the seed nodes(SeedList)
as follows:
- run the following to initiate(and enable rpc services)
dotnet AntSharesDaemon.dll /rpc
- open wallet on 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 |
7.Initiate the Consensus
Open the wallet and initiate the consensus start consensus
should the above being successful, the 4 nodes shall now begin the consensus (or start mining), see:
8.Test RPC services
Should the private chain deployment being successful, the block height will increase and you can rpc call to acquire current blockchain height, see:
RPC call current block height:
{"jsonrpc": "2.0", "method": "getblockcount", "params": [], "id": 5}
response as:
{"jsonrpc": "2.0", "id": 5, "result": 490490}
This tells the rpc of the priv chain is functional.
###Commands
- Commands
version
show current software versionhelp
help menu
clear
clear the screen
exit
exit the program - Wallet Ops
create wallet <path>
Create wallet file
open wallet <path>
Open wallet file
rebuild index
rebuild wallet indexlist account
list all accounts in the wallet
list address
list all contract adds in the walletlist asset
list all assets in the wallet - Check Node Info
show state
Show current sync statusshow node
show nodes and ports currently linked
show pool
show pending tx - Advanced
start consensus
Initiate the Consensus