Pundi
Pundi AIPundi X
  • 🤖Pundi AI overview
  • 🈁Pundi AI Data Platform
    • Data stakeholders
    • Data Labelling
    • Pundi AI Data Platform (Alpha Testnet) - User Guide
    • FAQ
  • 🦾Pundi AIFX Omnilayer
    • Pundi AIFX
    • Installation Pundi AIFX
    • Setup Node
      • Full node with Binaries
      • Full node with Docker
      • Snapshot Guide
      • Node Monitoring Device
    • Validators
      • Validator Overview
      • Setting Up a Validator for Pundi AIFX
      • Validator Recovery
      • Validator FAQ
      • Validator Security Notice
      • Migration Best Practices
      • Transfer Validator Permissions
    • Delegators
      • Delegators FAQ
      • Delegator CLI Guide
      • Delegator Security Notice
    • Pundi AIFX Tutorials
      • Pundi AIFX CLI Commands
      • Cloud Setup
      • Testnet faucet
      • Ledger Integration for fxcored
      • Sentry Nodes
      • Account Migration Guide (CLI)
    • Upgrade Instructions
      • Cosmovisor Upgrade Guide v8.5.x
        • Cosmovisor Integration - Binaries
        • Cosmovisor Integration - Docker
      • Manual Upgrade Guide v8.5.x
        • Binaries - Upgrading Your Node
        • Docker - Upgrading Your Node
      • Upgrade Versions
        • v2.2.0 Upgrade Instructions
        • v3.1.0 Upgrade Instructions
        • v4.2.1 Upgrade Instructions
        • v5.0.0 Upgrade Instructions
      • Upgrade FAQ
    • Deploying on Pundi AIFX EVM
      • Products
      • MetaMask
        • Download and Install MetaMask
        • Add Network
        • Configure Custom Tokens
        • Create and Import Accounts
      • Connect Wallet to Dapps
        • Connect using MetaMask
        • Connect using Pundi Wallet (Wallet Connect)
      • With Remix
      • With Truffle
      • With Hardhat
      • Cross-Chain Bridges
        • Bridging Tokens from other networks
        • Pundi Gravity Bridge
    • DApps and Infra
      • Margin X Swap
      • Pundi Wallet
      • PundiScan
      • Baklava Space
      • Safe Multisig
      • PortfolioX
      • Token Factory
    • Developers
      • Pundi AIFX Network
      • Pundi AIFX Modules
      • Pundi AIFX JSON RPC
      • Pundi AIFX REST API
      • Web3 JSON RPC
        • JSON RPC Server
        • Namespaces
        • JSON RPC Methods
        • Events
      • Support Leap
      • Third Party Price Oracles
      • Contract Deployments
      • Pundi AIFX Cross Chain
        • sendToFx
        • f(x)Core
        • ibc
        • Target
      • Precompiled Contracts
        • CrossChain Precompiled
        • Staking-V2 Precompiled
      • Pundi AIFX SDKs
        • Python SDK
        • JavaScript SDK
      • Contract Monitoring
    • Pundi X Chain (under Pundi X)
      • Getting Started
        • Install Pundi X (PundiXChain)
        • Setup Node
          • Full node with Binaries
          • Full node with Docker
          • Snapshot Guide
          • Node Monitoring Device
          • Node Peers
      • Validators
        • Validator Overview
        • Setting Up a Validator for PundiXChain
        • Validator Recovery
        • Validator FAQ
        • Validator Security
        • Sentry Nodes
      • Delegators
        • Delegator FAQ
        • Delegator Overview
        • Delegator CLI Guide
      • Pundi X Tutorials
        • Pundi X CLI Guide
        • Ledger Integration for pundixd
        • Testnet Faucet
        • Cloud Setup
      • Upgrade Instructions
        • Cosmovisor Integration - Binaries
        • Cosmovisor Integration - Docker
        • Support keplr
      • Developers
        • Pundi X Network
        • Pundi X Protobuf
        • Pundi X gRPC & REST
        • Pundi X JSON RPC
        • Pundi X Cross Chain
          • ibc
  • 👛PURSE+
    • Purse Box
      • How many NFTs can I mint?
      • Minting (Etherscan)
      • Minting (Pursetoken.com)
    • PURSE+
      • Links
    • Bridging
      • BSC -> Ethereum
    • Protocols
      • LP Restaking Farms
        • How to Use Farms
        • Contract on BscScan
      • PURSE Staking
      • PURSE Staking Rewards
        • Campaigns
      • PURSE Retroactive Rewards
        • Campaigns
    • Contracts
      • Ethereum
      • Binance
      • Function X
    • IBC
      • PUNDIX Chain
    • PURSE Token
      • Background
      • ERC404 intro
      • Accounting of Balances
      • Minting PURSE NFT(s)
      • Transferring PURSE
      • Maintaining PURSE NFT(s)
      • NFTs in Queue
      • Token IDs
  • 🎡Pundi AI MM Agent
    • Why Market Making
    • Traditional MM vs. AMM
    • AI MM Agent: Bridging the Gap
    • Use Cases
    • Train & Launch (Step 1 & 2)
    • Flywheel (Step 3)
    • How the AI MM Agent Works in Detail
    • Why This is Powerful
  • 🛍️Pundi AI Data Marketplace (soon)
  • 🥇PUNDIAI Token Overview
    • Revenue generation flywheel
    • vePUNDIAI
      • how to bribe with vePUNDIAI
    • Protocol pool
  • Governance
    • Governance Proposal Information
      • EGF Info
      • EGF Grants Program
      • Application Template
      • Successful Grant Applicants
      • Launching an EGF Proposal
  • Links
Powered by GitBook
On this page
  • Install Pundi AIFX
  • Running Server as a Daemon
  • Register fxcored as a service
  • Controlling the service
  • Accessing logs
  • Secret and updating consensus key
  • Updating your consensus key and tagging it to a pin
  • Checking to see if the pin works
  1. Pundi AIFX Omnilayer
  2. Setup Node

Full node with Binaries

PreviousSetup NodeNextFull node with Docker

Last updated 3 months ago

This guide will explain how to install the fxcored mainnet or fxcored testnet 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 .

Install Pundi AIFX

You need to before you go further

Setup Pundi AIFX

Initializing fxcore:

fxcored init <custom-moniker> --chain-id fxcore
fxcored init <custom-moniker> --chain-id dhobyghaut

Note: Monikers can contain only ASCII characters. Using Unicode characters is not supported and renders the node unreachable.

The moniker can be edited in the ~/.fxcore/config/config.toml file:

# A custom human readable name for this node
moniker = "<custom_moniker>"

Initializing fxcored will result in the creation of a few directories and most importantly the .fxcore 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/PundiAI/fx-core/main/public/mainnet/genesis.json -O ~/.fxcore/config/genesis.json
wget https://raw.githubusercontent.com/PundiAI/fx-core/main/public/testnet/genesis.json -O ~/.fxcore/config/genesis.json

Upon startup the node will need to connect to peers. you can add peers to the config.toml config file:

fxcored config config.toml p2p.seeds "c5877d9d243af1a504caf5b7f7a9c915b3ae94ae@fxcore-mainnet-seed-node-1.functionx.io:26656,b289311ece065c813287e3a25835bb6378999aa5@fxcore-mainnet-seed-node-2.functionx.io:26656,96f04dffc25ffcce11e179581d2a3ab6cb5535d5@fxcore-mainnet-node-1.functionx.io:26656,836ded83bac83a4ac8511826fa1ad4ca2238f960@fxcore-mainnet-node-2.functionx.io:26656,7c7a260eeefda37eac896ae423e78cf345a2ef70@fxcore-mainnet-node-3.functionx.io:26656,0fee38117655b6961319950d6beb929fb194217c@fxcore-mainnet-node-4.functionx.io:26656,6e8818051a2ca9b8be67a6f2ba48c33d8c489d5c@fxcore-mainnet-node-5.functionx.io:26656"
fxcored config config.toml p2p.seeds "e922b34e660976a64d6024bde495666752141992@dhobyghaut-seed-node-1.functionx.io:26656,a817685c010402703820be2b5a90d9e07bc5c2d3@dhobyghaut-node-1.functionx.io:26656"

you can optionally download the . Make sure to move this to ~/.fxcore/config/addrbook.json.

** IMPORTANT At this stage **BEFORE **starting the node, please download the latest snapshot, refer to this .

Additionally, what is important is that your validator keys that is stored in a .json file for you to do a recovery in the future. For more how to access the files.

Also, you can consider generating a new consensus key and .

Start Node:

nohup fxcored start 2>&1 > fxcore.log &

Check logs:

tail -f fxcore.log

View more startup configurations:

fxcored start -h

For example, Start and open the 1317 restful service port:

nohup fxcored start --api.enable true --address 0.0.0.0:1317 2>&1 > fxcore.log &

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):

5:05PM INF minted coins from module account amount=21043599215998775405FX from=mint module=x/bank
5:05PM INF indexed block height=12893 module=txindex
5:05PM INF executed block height=12894 module=state num_invalid_txs=0 num_valid_txs=0
5:05PM INF commit synced commit=436F6D6D697449447B5B32382032362035392036332037352031313920323920343520313230203137203137203630203438203133322032352031303220313734203134392038362039203139203138332031383520323332203136382039312031323420313234203220313320313138203137305D3A333235457D
5:05PM INF committed state app_hash=1C1A3B3F4B771D2D7811113C30841966AE95560913B7B9E8A85B7C7C020D76AA height=12894 module=state num_txs=0
5:05PM INF indexed block height=12894 module=txindex
5:05PM INF minted coins from module account amount=21043602938137090338FX from=mint module=x/bank
5:05PM INF executed block height=12895 module=state num_invalid_txs=0 num_valid_txs=0
5:05PM INF commit synced commit=436F6D6D697449447B5B32343320323039203634203234332031393220343120313238203138302034352031363720313038203135382031363520313430203338203233302032203136372032303720333320313535203138322031373020313738203234322035392031333220362031323720393920313132203132305D3A333235467D

To check if fxcore is synced:

curl localhost:26657/status
or
fxcored status

Return:

{
  "jsonrpc": "2.0",
  "id": -1,
  "result": {
    "node_info": {
      "protocol_version": {
        "p2p": "8",
        "block": "11",
        "app": "0"
      },
      "id": "123868554adafd679f5dc6367bddea39aa5adb94",
      "listen_addr": "tcp://0.0.0.0:26656",
      "network": "fxcore",
      "version": "0.38.13",
      "channels": "40202122233038606100",
      "moniker": "moniker",
      "other": {
        "tx_index": "on",
        "rpc_address": "tcp://0.0.0.0:26657"
      }
    },
    "sync_info": {
      "latest_block_hash": "239609FE5FD475389C1ACFCEF46DCF6B0343F0C04E43A7968677809C2D489F3F",
      "latest_app_hash": "0D2F1299950E0DE86BFF1CDEEEDE3BA57F7899EF1492A6E6809DF3060164046D",
      "latest_block_height": "810805",
      "latest_block_time": "2021-09-01T07:56:29.166926257Z",
      "earliest_block_hash": "12B0FB286BD34C077CACF97D3D2757B27C49E63FB81E6262399FF11A3C3C002E",
      "earliest_app_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
      "earliest_block_height": "1",
      "earliest_block_time": "2021-07-12T07:42:23.292429Z",
      "catching_up": false
    },
    "validator_info": {
      "address": "214999E9412502DE8DE13F626F9D32D41C1B5015",
      "pub_key": {
        "type": "tendermint/PubKeyEd25519",
        "value": "fUlPjsYSLi04vwzeNiFObBVabV6TKhB6WB3c65iEayU="
      },
      "voting_power": "0"
    }
  }

Stop Node (will be running in the background if not stopped):

ps -ef | grep fxcored
kill -9 <PID>

Running Server as a Daemon

It is important to keep fxcored running at all times. There are several ways to achieve this, and the simplest solution we recommend is to register fxcored as a systemd service so that it will automatically get started upon system reboots and other events.

Register fxcored as a service

First, 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/fxcored.service (if you are in the fx-core directory):

cat > /etc/systemd/system/fxcored.service

hit the ENTER button on your keyboard and copy and paste the contents of the file below into the command line:

Sample file:

fxcored.service
[Unit]
Description=Pundi AIFX Node
After=network.target
[Service]
Type=simple
User=root
WorkingDirectory=/root
ExecStart=/root/go/bin/fxcored start --home /root/.fxcore
Restart=on-failure
RestartSec=3
LimitNOFILE=4096
[Install]
WantedBy=multi-user.target

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:

run the command:which fxcored and replace the ExecStart file path with the return value of the command

root@XXXXXXXXXXXXXXX:~# cat > /etc/systemd/system/fxcored.service
[Unit]
Description=Pundi AIFX Node
After=network.target
[Service]
Type=simple
User=root
WorkingDirectory=/root
ExecStart=/root/go/bin/fxcored start --home /root/.fxcore
Restart=on-failure
RestartSec=3
LimitNOFILE=4096
[Install]
WantedBy=multi-user.target

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:

sudo systemctl daemon-reload
sudo systemctl enable fxcored

Controlling the service

Use systemctl to control (start, stop, restart)

sudo systemctl start fxcored
sudo systemctl stop fxcored
sudo systemctl restart fxcored
sudo systemctl status fxcored

To start the node, run sudo systemctl start fxcored, and thereafter run journalctl -t fxcored -f to see the latest and continuous logs.

Accessing logs

journalctl -u fxcored
journalctl -u fxcored -r
journalctl -u fxcored -f

Concluding tips: It is always better to sync Pundi AIFX 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 ~/.fxcore/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:

fxcored tendermint unsafe-reset-priv-validator <secret>

the <secret> key here must be longer than 32 characters

Running the above command will return:

WARNING: The consensus private key of the node will be replaced.
Ensure that the backup is complete.
USE AT YOUR OWN RISK. Continue? [y/N]

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 .fxcore folder is in the root directory

cat ~/.fxcore/config/priv_validator_key.json

Record the previous output before running the next command to remove this file:

rm ~/.fxcore/config/priv_validator_key.json

The following command will recover your original consensus key:

fxcored tendermint unsafe-reset-priv-validator <secret>

Match this output with the previous output above:

cat ~/.fxcore/config/priv_validator_key.json

For a more stable way of setting up via

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 or our .

🦾
Testnet blockchain explorer
Mainnet
Validator
install Pundi AIFX
address book
link
information
backing it up using a pin
running a daemon