Skip to main content

Join Alaya

Overview#

The Alaya main network will be officially launched on October 24, 2020 Beijing time, and the ChainID is 201018; The other is the Alaya develop network(Chainid 201030).

Preparation#

Before joining the Alaya public network, please ensure that the server has the following conditions:

  • The Alaya node has been installed and the wallet file and node key have been created according to the instructions of Installing a Node.

This section assumes that the server is Ubuntu 18.04, and the working directory of the executable file is ~/alaya-node. Note that all subsequent commands should be run under the same working directory.

Join the Alaya Main Network#

Anyone and any organization can join the Alaya main network.

Start as a validator node#

Execute the following command to join the Alaya as a validator node

cd ~/alaya-node/ && nohup alaya --identity alaya-node --datadir ./data --port 16789 --rpcport 6789 --rpcapi "platon,net,web3,admin,personal" --rpc --nodekey ./data/nodekey --cbft.blskey ./data/blskey --verbosity 1 --rpcaddr 127.0.0.1 --syncmode "fast" > ./data/alaya.log 2>&1 &

Prompt:

ParametersDescription
--identitySpecify the network name
--datadirSpecify the data directory path
--portSpecifying the P2P protocol communication port
--rpcaddrSpecify rpc server address
--rpcportSpecifying the RPC protocol communication port
--rpcapiSpecify the rpcapi name open by the node
--rpcSpecify http-rpc communication method
--nodekeySpecify the node private key file
--cbft.blskeySpecify the node bls private key file
--verbosityThe level of logging, 0: CRIT; 1: ERROR; 2: WARN; 3: INFO; 4: DEBUG; 5: TRACE
--syncmodefast: Fast synchronization mode, full: All synchronous mode
--db.nogcEnable archive mode

See more parameters with the command alaya --help;

Join the Alaya Develop Network#

The development network provides a development test environment for the developer or node.There may be instability and a network reset.The current version of the development network is 0.15.1.

Develop network related resources#

Initialize the genesis block#

  • Save the genesis block file

    Save the following to the genesis.json file:

    cd ~/alaya-node && wget https://download.alaya.network/alaya/platon/0.16.0/genesis.json 
  • Initialize the genesis block file

    Executive command:

    cd ~/alaya-node && alaya --datadir ./data init genesis.json

    Description:

    A prompt for Successfully wrote genesis state indicates that the initialization creation information is complete.

Start as a validator node#

Please refer to Install node section to create a nodekey: nodekey, blskey, and then execute the following command to start the verification node to join the Alaya development network;If you need to become a verification node, please apply for a large test ATP by following instructions (the development network will be reset irregularly according to the test needs, and the ATP of the test network has no practical value).

cd ~/alaya-node/ && nohup alaya --identity alaya-node --datadir ./data --port 16789 --rpcport 6789 --rpcapi "platon,net,web3,admin,personal" --rpc --nodekey ./data/nodekey --cbft.blskey ./data/blskey --verbosity 1 --rpcaddr 127.0.0.1 --bootnodes enode://48f9ebd7559b7849f80e00d89d87fb92604c74a541a7d76fcef9f2bcc67043042dfab0cfbaeb5386f921208ed9192c403f438934a0a39f4cad53c55d8272e5fb@devnetnode1.alaya.network:16789 --syncmode "fast" > ./data/alaya.log 2>&1 &

Other#

If you need to receive large amount of test ATP, please send an email to support@latticex.foundation according to the format requirements. The email requirements are:

Title: Alaya Test Network Token ApplicationName:Contact Information:WeChat ID (or other instant messaging software) :Application amount:USES:Receipt account:Remark:

View node status#

When Alaya is successfully started, under normal circumstances, it will automatically establish a connection with the node closest to it through the node discovery protocol. After the connection is successful, block synchronization will be started. You can determine whether joining the network successfully by looking at the peers of the node and confirming whether the block height of the node is increasing.

If the key is not generated in advance, the node is automatically generated in the node's data directory at startup. If it is automatically generated, only the node private key and BLS private key will be generated, and the relevant public key will not be automatically generated.

Enter Alaya console#

alaya attach http://localhost:6789

View peers of a node#

admin.peers

View the current block height#

You can get the block height of the current node by executing the following command in the Alaya console.

platon.blockNumber

A series of Alaya network nodes appear in the node list and the block height is increasing, which means the connection is successful! (Since the new node needs to be synchronized, there may be a delay)

Type exit to exit the console.