Home > Blockchain >  The third block chain locations (MOAC BlockChain) node installation tutorial
The third block chain locations (MOAC BlockChain) node installation tutorial

Time:09-23

Beijing time on April 30, 2018, stone block chain (MOAC BlockChain) officially launched, stable running,

?

1. The preparation work

Stone block chain (MOAC BlockChain) system software package download address is:

https://github.com/MOACChain/moac-core/releases

The current with the latest official version for nuwa1.0.5,

Nuwa (nuwa) is a code, 1.0.5 as the version number,

Windows version is suitable for 64/32-bit Windows 7 and above system,

In this paper, the actual operating environment for: 10 Chinese version 64 - bit Windows,

?

2. The node installation

Unzip the download package nuwa1.0.5. Win. Zip to the local hard drive, directory contains two folders under Windows,

Description:

SCS: substring node program, there are three files; An executable program scsserver - Windows 64-4.0 - amd64. Exe, 32-bit executable program scsserver - Windows - 4.0-386. Exe and configuration files userconfig. Json;
Vnode: main chain node program, there are five documents; An executable program moac - Windows 64-4.0 - amd64. Exe, 32-bit executable program moac - Windows - 4.0-386. Exe, configuration file vnodeconfig. Json, part of the function code McTest. Js and specifications for the README. TXT.
2.1 check the help

Open a command (CMD) terminal, to extract the directory locations, executed on the command line:

D: \ nuwa1.0.5. Win, win, vnode& gt; Moac -- help \ \ the corresponding version of the executable program was renamed moac. Exe, after with
2.2 installation node

Open a command (CMD) terminal, to the current directory, scholars in the command line:

D: \ nuwa1.0.5. Win, win, vnode& gt; Moac//mainnet

D: \ nuwa1.0.5. Win, win, vnode& gt; Moac - testnet//testnet
Programmed to install itself to the directory: C: \ Users \ \ AppData \ Roaming \ [userName] MoacNode, this directory contains folders moac and keystore,

If it is to be installed to test network locations, programmed to install itself to the directory: C: \ Users \ \ AppData \ Roaming \ [userName] MoacNode \ testnet,

If the network is normal, the node will automatically start synchronization,

Note:

Only at the time of installation moac node using moac command with no arguments;
Test network installation node, each moac command needs to add - testnet;
If the node synchronization is slow, others have synchronization can be a good node MoacNode \ moac directory directly copied to use,
2.3 to start the existing node

System shutdown or take the initiative to shut down the node, if you need to restart the node, and executed on the command line:

D: \ nuwa1.0.5. Win, win, vnode& gt; Moac console
The command is executed, the node will automatically since the last synchronization block synchronous data



If the node is installed in the cloud, is usually a Linux environment, start node command:

Nohup./moac -- -- the RPC - rpcaddr=0.0.0.0 - rpcport=8545 - rpcapi="chain3, MC,.net, db, personal, debug, vnode, SCS" & amp;


2.4 attach into the node interface

Nodes of the console interface has been synchronized data because, scrolling speed faster, is not convenient to receive commands and see the command output effect, need to open another command (CMD) terminal, to the current directory locations, executed on the command line:

D: \ nuwa1.0.5. Win, win, vnode& gt; Moac attach

./moac attach/http://127.0.0.1:8545/MAC
This command depends on the node has run up, after entering, without scrolling action, convenient user input commands and view the output results,



If is a Windows system, you may need to add the ipc endpoint, perform in terminal command line:

//centOS
[root vnode] #./moac - Linux - amd64 attach/root/moac testnet/moac. Ipc//testnet
[root vnode] #./moac - Linux - amd64 attach/root/moac/moac. Ipc//mainnet
Or Mac:



3. The substring service configuration

Vnode files in the directory vnodeconfig. Json is main chain service configuration file,

{
"IP" : "localhost",
"ShowToPublic" : true,
"VnodeServiceCfg" : ":" 50062,
"SCSservice" : true,
"VnodeBeneficialAddress" : "0 xd814f2ac2c4ca49b33066582e4e97ebae02f2ab9
"}
"IP" :?

? ? ? Allow external users through the IP address to connect to the VNODE, the default value is localhost native,

: "ShowToPublic"?

False - don't allow external users connected to the SCS;
True? - allow external users connected via the vnode SCS, also need to configure the IP address of the effective value,
"VnodeServiceCfg" :

? ? ? SCS communication IP address and port, the default value is 50062,

: "SCSservice"?

False - does not support the SCS connection;
True? - support SCS connection, allowing the VNODE support chain, to provide the service after the need to provide a valid address returns,
"VnodeBeneficialAddress" :

? ? ? This account address for receiving get rewarded for sub chain service revenue, you need to "SCSservice" is set to true,

?

4. Dig

4.1 to establish a new account

Dig node must have set up an account before,

Enter moac console interface, execute the command to create a new account:

& gt; The personal newAccount ()
System will be prompted to enter a password, such as "passwd", and enter the same password again confirmed, will display a string, starting with 0 x is MOAC account address,

System at the same time in the following directory record an account file: C: \ Users \ userName \ AppData \ Roaming \ MoacNode \ keystore,

Please save the file, and keep in mind the password, used for decryption account and after the operation,

Also can be directly in order to bring the password, such as:

& gt; The personal newAccount (" 123456 ")
4.2 check the account

Enter the MOAC console interface, execute the command:

& gt; MC. Accounts
Can view all accounts under this node,

4.3 check the account balance

Enter the MOAC console interface, execute the command:

& gt; MC. The getBalance (MC) accounts [0])
Can check the account balance of this node 0 indicates the first account, is also the default mining account,

Or: import under the condition of "McTest. Js", execute the command:

& gt; LoadScript (" McTest. Js ")
& gt; CheckBalance ()
This command is used to view the current node all account balances,

McTest. Js is a node of a file, inside the packaging the function of parts, need loadScript using the import command, can directly use interface,

Can also through the browser to check the account balance, etc.,

? ? ? ? Stone block chain browser: http://explorer.moac.io/home;

? ? ? ? Testing web browser: http://47.75.144.55:3000/home,

4.4 check the mining state

Enter the MOAC console interface, execute the command:

& gt; MC. Mining,
Returning true indicates that the node is dig, false showed no dig node,

4.5 began to dig

Enter the MOAC console interface, execute the command:

& gt; Miner. The start ()
Start a state of mining, the console interface will be a prompt began to dig,

4.6 stop mining

Enter the MOAC console interface, execute the command:

& gt; Miner. Stop ()
Note: because the main strength, it is difficult to use ordinary desktop or laptop dig ore in the form of a command line, in the test network can be easier to dig to mine,

?

5. Deal

5.1 read the function

McTest. Js is a node of a file, inside the packaging the function of parts, need loadScript using the import command, can directly use interface,

Enter the MOAC console interface, execute the command:

& gt; nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related