Full node with Binaries
This guide will explain how to install the pundixd command line interface (CLI) on your system with Binaries option. With these installed on a server, you can participate on the mainnet or testnet as a Validator.
Install PundiX (Pundi X Chain)
Setup PundiX
Initializing PundiX:
pundixd init <your_name> pundixd init <your_name> --chain-id payalebarInitializing pundixd will result in the creation of a few directories and most importantly the .pundix directory (for more information on the directory tree, refer to the validator-recovery section). This will be where your validator keys are stored and this is important for recovery of your validator.
Fetching genesis file (copy this entire line of code and hit ENTER):
wget https://raw.githubusercontent.com/pundix/pundix/main/public/mainnet/genesis.json -O ~/.pundix/config/genesis.jsonwget https://raw.githubusercontent.com/pundix/pundix/main/public/testnet/genesis.json -O ~/.pundix/config/genesis.jsonSet Peers
pundixd config config.toml p2p.seeds 78d3eb3f15a20ab1d567660d35776abe0dee71d0@pundix-mainnet-seed-node-1.pundix.com:26656,3c37c6c42dfd9094117549794299a62d49c122eb@pundix-mainnet-seed-node-2.pundix.com:26656
pundixd config config.toml p2p.persistent_peers 8bd41ea9f8ba7cfee4d19887cab487cdfc1177f4@pundix-mainnet-node-1.pundix.com:26656,6c1738220234a5e1b3caf94403ecd651e9759952@pundix-mainnet-node-2.pundix.com:26656,23abe2346d40f82cf0606e47931e58752f8b9348@pundix-mainnet-node-3.pundix.com:26656,20d275af6d025be144765291db5337ea059cce18@pundix-mainnet-node-4.pundix.com:26656,47f97d7baf028ddfd3b223baab0fa062eae75310@pundix-mainnet-node-5.pundix.com:26656pundixd config config.toml p2p.seeds c77303a511a90a41c562d5925b170d7a68975569@payalebar-seed-node-1.pundix.com:26656,777fba974bb085daea6b83b6e76c6619d96eed50@payalebar-node-1.pundix.com:26656,9a296821d069a3c599ea2be5cd8698ec927ca5ce@payalebar-node-2.pundix.com:26656
pundixd config config.toml p2p.persistent_peers "" Start Node:
Check logs:
Open another terminal in the same folder. View more startup configurations:
For example, Start and open the 1317 restful service port:
Then excute the command line in terminal:
The execution of the previous command will return something like this (this is to check the status of nodes and which blocks are being synced/are syncing):
To check if pundix is synced:
Return:
To ensure that the blocks are synced up with your node, under "sync_info", "catching_up value" should be false "catching_up value": false. This may take a few hours and your node has to be fully synced up before proceeding to the next step. You may cross reference the latest block you are synced to "sync_info": "latest_block_height" and the latest block height of our Testnet blockchain on our Testnet blockchain explorer or our Mainnet.
Stop Node (will be running in the background if not stopped):
Running Server
It is important to keep pundixd running at all times. There are several ways to achieve this, and the simplest solution we recommend is to register pundixd as a systemd service so that it will automatically get started upon system reboots and other events.
Register pundixd as a service
pundixd as a serviceFirst, create a service definition file in /etc/systemd/system.
Run this command to create the sample file above in the file path/etc/systemd/system/pundixd.service (if you are in the pundix directory):
hit the ENTER button on your keyboard and copy and paste the contents of the file below into the command line:
Sample file
Then hit the ENTER button on your keyboard before using Ctrl+D on your keyboard, your file with the above contents will be created. It should look like this:
Modify the Service section from the given sample above to suit your settings. Note that even if we raised the number of open files for a process, we still need to include LimitNOFILE.
After creating a service definition file, you should execute:
Controlling the service
Use systemctl to control (start, stop, restart) in Linux/Ubuntu:
To start the node, run sudo systemctl start pundixd, and thereafter run journalctl -u pundixd -n 100 -f to see the latest and continuous logs.
Accessing logs
Concluding tips: It is always better to sync PundiX using the Daemon method because this ensures stability and that your syncing is continuously running in the background.
Secret and updating consensus key
Use this at your own risk❗ I suggest trying it out on testnet first and also backing up your priv_validator_key.json if you already have this set up for a validator. The file can be found in this file path ~/.pundix/config/priv_validator_key.json.
Updating your consensus key and tagging it to a pin
Before setting up your validator if you would like to have a backup of your keys with a pin. You may run the following command:
Running the above command will return:
After inputting y, your priv_validator_key.json will be replaced with a new file. This means you will have a new consensus private key and it will be tagged to your <secret> pin.
Checking to see if the pin works
If your .pundix folder is in the root directory
Record the previous output before running the next command!
Remove this file:
The following command will recover your original consensus key:
Match this output with the previous output above:
Last updated