Chinese version located at: https://community.nebulas.io/d/657-faq-tech-support-faq-for-node-strategy
The following information is a supplementary guide for those facing issues with node mining configuring. For a short guide on how to compile Nebulas and it’s dependencies, visit https://github.com/nebulasio/go-nebulas/tree/testnet
Node execution environment?
- The node’s execution environment requires the golang (go) environment to be installed. For go installation, refer to the official installation documentation at: https://golang.org/
- Go Installation
- The version of go installed must be at minimum v1.13 and installed via a super user (e.g. root). Installing go via a package manager (eg: ubuntu: sudo apt install golang) will not have the required permissions for a successful build.
Compiling a node’s code requires the latest testnet source code via the Nebulas Github:
- Pulled code must be from the testnet branch
- You can check that you have the latest code via the commit id of (as of this post): c12689d1ff9c658c1dd527c5289b2ce447ef9d71
- This can be verified with the command
git log|grep -c c12689d1ff9c658c1dd527c5289b2ce447ef9d71
- Which should return “1”
- The testnet branch is located at: https://github.com/nebulasio/go-nebulas/tree/testnet
Building node dependent package installation
- The dependency of node compilation consists of two parts:
- The system requires rocksdb v5.18.3 (use source setup.sh to install all dependencies or or the shell script
install-rocksdb.sh directly; non Debian/Ubuntu based systems can refer to the official installation documentation https://github.com/facebook/rocksdb/blob/v5.18.3/INSTALL.md);
- Dynamic Connection Library requires nvm to be loaded. This is completed via the command
After rocksdb installation, you can use the following command to check for successful installation
ldconfig -p|grep rocksdb
The NVM dependent package is compiled by default and added to the dynamic link library after
source setup.sh; This step must be completed prior to compiling (
make build) Neb.
Test Network Snapshot Download
All nodes must be synchronized to participate in block generation. To accelerate the synchronization process, a block data snapshot is available at: https://github.com/nebulasio/wiki/blob/master/testnet.md#synchronization
The snapshot needs to be extracted after download and placed in the ‘datadir’ directory specified in the utilized configuration file.
Mining node configuration
Node port selection
- The node port listed in your config file needs to be available for the node to startup. If the port is occupied, the port needs to be modified.
Configure node for mining
- The following settings must be set accordingly in your used config file:
- start_mine: true
- This is required for your node to be a miner. By default this is set to false (not a miner).
- coinbase: YOUR_ADDRESS_HERE
- This is the address where your block reward will be placed. The coinbase address is the same address that you use to manage your node at node.nebulas.io
- miner: YOUR_ADDRESS_HERE
- The node’s miner address must be consistent with the miner address entered via your node control panel at node.nebulas.io. The keystore for this address must be available in the ‘keydir’ directory specified in the configuration file(by default, keydir is within the go-nebulas directory).
- passphrase: YOUR_KEYSTORE_PASSPHRASE
- This is the password you entered when you created the miner address keystore file.
Check network/block synchronization
- To check the synchronization status of a local node, you can use the rpc to query the status of the local node via:
curl -i -H 'Content-Type: application/json' -X GET http://localhost:8685/v1/user/nebstate
- Note: the port listed here must match the port entered in your config file. This example utilizes the default port.
Example of the data returned:
If “synchronized” equals false, the node is not synchronized.
How to diagnose a unsynchronized node
- Verify the node startup uses the correct config file (currently using the testnet profile); Example:
./neb -c testnet/conf/config.conf
- Be sure to download the blockchain snapshot and extract it in the correct folder prior to beginning the synchronization process
- Example: enter the testnet directory and download the data.db.tar file (visit https://github.com/nebulasio/wiki/blob/master/testnet.md#synchronization for mirrors); once downloaded, extract it via
tar xvf data.db.tar and once extraction is competed, there should be a data.db directory in the testnet directory. At this point, you can remove the downloaded file (
rm data.db.tar). If you have configured your node to use a different directory for the chain data, extract the file to that directory.
- Verify that you have built neb with the latest code from the testnet branch (instructions above).
Reasons why the node is not listed on the node platform
- Your node has not pledge enough NAS and/or NAX (20,000NAS and 100,000NAX).
- If your node is subject to a penalty (review PoD documentation) and you must add additional NAS to retain the minimum level quantity (listed above).
- If your node is still not listed on the node platform, send an email to email@example.com.
Why a node is marked as being offline after the node is operating
- There is not enough NAS and/or NAX pledge after node registration.
- The node is still in the process of synchronizing.
- The used node configuration file is not correctly setup or the mining address is incorrect.
Why a docker node will not start