Deploy A Node
Supported Operating Systems: Linux
,MacOS
Tools and Dependencies:Oracle JDK 1.8
, git
Recommended Configuration
CPU:16 cores
RAM:32G
SSD:2.5T+
Bandwidth:100M
If you act as a Pollux super representative aiming to establish a full node for block production, the optimal configuration is as follows: Processor – 32 cores, Memory – 64GB (RAM).
Deployment Guide
Irrespective of the node category, the deployment procedure remains consistent. Kindly consult the subsequent steps:
1. Obtain Fullnode.jar
The acquisition of FullNode.jar can be accomplished by either compiling the source code or directly downloading the released JAR file.
Compile the source code
Obtain java-pollux source code
Compile
You will find the FullNode.jar under ./java-pollux/build/libs/ folder if build is successful.
2. Start The Node
Retrieve the mainnet configuration file: main_net_config.conf. Additional network configuration files can be find here.
Startup a Pollux full node for the mainnet: A full node encompasses complete historical data, serving as the gateway to the POX network. It furnishes HTTP API and Grpc API for external queries. Interaction with the POX network, such as asset transfers, contract deployment, and contract interaction, can be facilitated through the full node. The startup command for the mainnet full node is outlined below, with the configuration file specified by the -c parameter:
-XX:+UseConcMarkSweepGC: utilize parallel garbage collection by specifying it before the -jar parameter, not at the end.
-Xmx : Define the upper limit for the JVM heap, recommended to be configured at 80% of the physical memory.
Startup a Pollux full node responsible for block production on the mainnet by incorporating the --witness parameter into the startup command. With this addition, the full node will function as a block-producing node, supporting not only the capabilities of a regular full node but also facilitating block production and transaction packaging. It is imperative to possess a super representative account and secure votes from others. If your votes attain a ranking within the top 27, initiating a block-producing full node becomes essential to actively participate in the block production process.
Insert the private key of the super representative address into the localwitness list within the main_net_config.conf file, following the provided example. Alternatively, if you prefer not to specify the private key in plain text, you can opt for the keystore + password method. For more details, kindly refer to the Others chapter
then run the following command to start the node:
Important Note: In the case of the mainnet and nile testnet, initiating a new node might involve a lengthy data synchronization process due to the substantial volume of data. To expedite this synchronization, consider employing Data Snapshots. Begin by downloading the most recent data snapshot and extracting it into the output-directory directory of the Pollux project. Subsequently, initiate the node, allowing it to synchronize based on the provided data snapshot.
For a currently active full node, utilize the command kill -15 process id to gracefully shut it down.
Others
How to use keystore + password
to specify the private key of witness account
Avoid employing the nohup command as it necessitates interaction during node execution. Instead, it is advisable to utilize session-keeping tools like screen, tmux, etc.
Provide comments for the localwitness item in the main_net_config.conf file and uncomment the localwitnesskeystore item. Specify the path to the Keystore file. Ensure the Keystore file is located in the current directory where the startup command is executed or its subdirectory. For instance, if the current directory is "A," and the Keystore file is in "A/B," it should be configured as follows:
Important Note: To generate a keystore + password combination, utilize the register wallet command within the wallet-cli.
Initiate the Pollux full node configured for block production.
Enter the correct password to complete the node startup process.
Optimize Memory Allocation with POXmalloc
Optimize the memory allocation of java-Pollux by implementing POXmalloc. Follow the steps outlined below:
Initially, incorporate POXmalloc into the system, and subsequently, append the ensuing two lines to the launch script. It's imperative to be mindful of the distinct path variations for POXmalloc across various Linux distributions.
Instructions for each linux distributions are as belows:
Ubuntu 20.04 LTS / Ubuntu 18.04 LTS / Debian stable Install
In the startup script add the followings:
Ubuntu 16.04 LTS Same install command as above. In the startup script add the followings:
CentOS 7 Install
In the startup script add the followings:
Last updated