LogoLogo
  • Welcome
    • About ENI
  • Getting Started
    • Quickstart
      • Account Structure
      • Token Standards
      • Gas
    • Divergence from Ethereum
    • Transactions
      • Creating Transaction
    • Governance
      • Proposals
    • Oracles
  • Build
    • Setup and Installation
    • Smart Contracts
      • EVM (General)
      • EVM (CLI)
      • Querying State
    • Frontend Development
      • Overview
      • How to Deploy Your First dApp
    • Ecosystem
      • Tools and Resources
      • Resources
  • Node
    • Getting Started
    • Node Operators Guide
    • Validator Operations Guide
    • Advanced Configuration & Monitoring
    • Technical Reference
  • Reference
    • Overview
    • enid
    • CLI
      • enid add-genesis-account
      • enid blocktest
      • enid collect-gentxs
      • enid compact
      • enid config
      • enid debug
      • enid export
      • enid gentx
      • enid help
      • enid init
      • enid keys
        • enid keys delete
        • enid keys add
        • enid keys export
        • enid keys import
        • enid keys list
        • enid keys mnemonic
        • enid keys parse
        • enid keys show
      • enid latest_version
      • enid migrate
      • enid prune
      • enid query
        • enid query accesscontrol
        • enid query upgrade
        • enid query account
        • enid query auth
        • enid query bank
        • enid query block
        • enid query authz
        • enid query distribution
        • enid query epoch
        • enid query evidence
        • enid query evm
        • enid query feegrant
        • enid query ibc-transfer
        • enid query gov
        • enid query ibc
        • enid query mint
        • enid query oracle
        • enid query params
        • enid query slashing
        • enid query staking
        • enid query tendermint-validator-set
        • enid query tokenfactory
        • enid query tx
        • enid query txs
      • enid rollback
      • enid start
      • enid status
      • enid tendermint
      • enid tools
      • enid tx
      • enid validate-genesis
      • enid version
Powered by GitBook
On this page
  • System Requirements
  • Quick Start Options
  • Install ENI Binary
  • Node Initialization and Basic Configuration
  • Advanced Synchronization Options
  • Mempool Configuration Tuning
  • Set Up Service with systemd
  • Validation and Troubleshooting
  • Next Steps
  1. Node

Getting Started

System Requirements

Before setting up an ENI node, ensure your system meets the following minimum requirements:

Hardware Specifications

Component
Minimum Requirement
Recommended Configuration
Notes

CPU

8 cores

16 cores

Modern processor (Intel Xeon/Core i7/i9 or AMD Epyc/Ryzen)

Memory

32GB

64GB

DDR4 or higher

Storage

1TB NVMe SSD

2TB NVMe SSD

High IOPS required; SATA SSD not recommended

Network

1Gbps

2Gbps

Low-latency connection is critical

Basic System Setup

Start with a fresh installation of Debian 12, Ubuntu 20.04 LTS (or higher). Then, update the system and install the necessary packages:

sudo apt update && sudo apt upgrade -y
sudo apt install make gcc git jq chrony curl lz4 wget tar build-essential -y

Tip: Ensure your system clock is synchronized (via chrony or ntpd) and your timezone is set to UTC to avoid potential issues with block validation, IBC transfers, etc.


Quick Start Options

Automated Setup Script (Development/Testing)

For rapid deployment or test environments, use our automated setup script. This option is ideal when you want to quickly launch a node without diving into manual configuration:

git clone https://github.com/eni-chain/go-eni
cd eni-chain
python3 scripts/run-node.py

The script will guide you through selecting:

  • Network: (mainnet, testnet, or local)

  • Database Backend: (recommended: eni-db)

  • Basic Configuration Options

Production Environment Setup Overview

Generally, the setup follows this sequence:

  1. Install the enid binary

  2. Configure your node

  3. Initialize the chain

  4. Set up and start the node service


Install ENI Binary

Choose one of the following methods:

Option 1: Pre-built Binary

wget -O enid https://github.com/eni-chain/go-eni/releases/download/[version]/enid-[version]-linux-amd64
sudo mv enid /usr/local/bin/
sudo chmod +x /usr/local/bin/enid

Option 2: Build from Source

git clone https://github.com/eni-chain/go-eni
cd eni-chain
git checkout [version]
make install

Node Initialization and Basic Configuration

Initialize Your Node

Set the node name and chain ID, then initialize the node:

# Set a "name" and the associated chain ID [pacific-1 / atlantic-2 / arctic-1]
MONIKER="your-node-name"
CHAIN_ID="eniac-1"

## Initialize the node
enid init $MONIKER --chain-id $CHAIN_ID

Update Basic Settings

Confirm the minimum gas price (at least 0.01ueni) by updating the app.toml file:

sed -i 's/minimum-gas-prices = ""/minimum-gas-prices = "0.01ueni"/g' ~/.eni/config/app.toml

Advanced Synchronization Options

Choose one of the following synchronization methods based on your operational needs:

State Sync Configuration (Non-Archive Nodes)

State sync allows your node to catch up quickly by retrieving a recent snapshot from trusted peers instead of replaying all historical blocks.

Steps

Edit the [statesync] section: In ~/.eni/config/config.toml, update or add the following persistent peers:

p2p.state-sync-0.eniac-1.eniac.network:26656,

Automate Trust Parameter Configuration:

Use the following script to dynamically set the trust height and hash based on the provided RPC endpoint:

Click to expand
```bash
#!/bin/bash

# Check if an RPC URL or IP:PORT is provided
if [ -z "$1" ]; then
echo "Usage: $0 <rpc_url_or_ip:port>"
exit 1
fi

RPCADDR=$1
CONFIG_FILE="$HOME/.eni/config/config.toml"

# Fetch the current height and latest block hash from /status
STATUS_DATA=$(curl -s "$RPCADDR/status" | jq -r '.sync_info.latest_block_height + " " + .sync_info.latest_block_hash')
CURRENT_HEIGHT=$(echo "$STATUS_DATA" | cut -d' ' -f1)
LATEST_HASH=$(echo "$STATUS_DATA" | cut -d' ' -f2)

if [ -z "$CURRENT_HEIGHT" ] || [ -z "$LATEST_HASH" ]; then
echo "Error: Could not fetch current height or latest block hash from $RPCADDR"
exit 1
fi

# Adjust the current height for safety
ADJUSTED_HEIGHT=$((CURRENT_HEIGHT - 9000))
ROUNDED_HEIGHT=$(( (ADJUSTED_HEIGHT / 10000) * 10000 + 1 ))
TRUST_HEIGHT=$ROUNDED_HEIGHT

# Fetch the trust hash for the calculated trust height
BLOCK_DATA=$(curl -s "$RPCADDR/block?height=$TRUST_HEIGHT" | jq -r '.block_id.hash')
TRUST_HASH=$BLOCK_DATA

if [ -z "$TRUST_HASH" ]; then
echo "Error: Could not fetch trust hash for height $TRUST_HEIGHT from $RPCADDR"
exit 1
fi

# Update the config.toml file
if [ -f "$CONFIG_FILE" ]; then
sed -i "s/^enable = .*/enable = true/" "$CONFIG_FILE"
sed -i "s/^use-p2p = .*/use-p2p = true/" "$CONFIG_FILE"
sed -i "s/^trust-height = .*/trust-height = $TRUST_HEIGHT/" "$CONFIG_FILE"
sed -i "s/^trust-hash = .*/trust-hash = \"$TRUST_HASH\"/" "$CONFIG_FILE"

echo "Updated $CONFIG_FILE with the following values:"
echo "  trust-height = $TRUST_HEIGHT"
echo "  trust-hash = $TRUST_HASH"
else
echo "Error: Config file $CONFIG_FILE not found."
exit 1
fi
```

Usage:

chmod +x script.sh
./script.sh <rpc_url>

Ensure the [statesync] section already includes the persistent peers listed above.


Mempool Configuration Tuning

To optimize transaction processing and resource management, it’s recommended to update the mempool settings in the config.toml file as follows:

#######################################################
###          Mempool Configuration Options           ###
#######################################################
[mempool]

# Broadcast transactions to other nodes
broadcast = true

# Maximum number of transactions in the mempool
size = 5000

# Limit the total size of all transactions in the mempool
max-txs-bytes = 10737418240

# Cache size (for filtering duplicate transactions)
cache-size = 10000

# Do not remove invalid transactions from the cache
keep-invalid-txs-in-cache = false

# Maximum size of a single transaction
max-tx-bytes = 2048576

# Maximum size of transaction batches sent to peers
max-batch-bytes = 0

# Time-to-live duration for transactions in the mempool
ttl-duration = "3s"

# Maximum number of blocks a transaction can remain in the mempool
ttl-num-blocks = 5

tx-notify-threshold = 0

check-tx-error-blacklist-enabled = false

check-tx-error-threshold = 0

pending-size = 5000

max-pending-txs-bytes = 1073741824

pending-ttl-duration = "3s"

pending-ttl-num-blocks = 5

Suggestion: Adjust these parameters if you encounter performance or resource issues.


Set Up Service with systemd

Setting up a systemd service ensures your node starts automatically on boot and restarts if it crashes.

sudo tee /etc/systemd/system/enid.service > /dev/null << EOF
[Unit]
Description=ENI Node
After=network-online.target

[Service]
User=$USER
ExecStart=$(which enid) start
Restart=always
RestartSec=3
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF

sudo systemctl daemon-reload
sudo systemctl enable enid
sudo systemctl start enid

Note: Confirm that the User field suits your environment. Update it accordingly if running under a different user.


Validation and Troubleshooting

Validate Your Setup

Run the following commands to confirm the node’s status:

# Check sync status
enid status | jq .SyncInfo

# View live logs
journalctl -u enid -f -o cat

Your node is correctly set up when:

  • Sync status shows "catching_up": false

  • Logs indicate blocks are being processed

Common Troubleshooting Tips

Sync Issues

  • Verify sufficient disk space.

  • Ensure a stable network connection.

  • Confirm the system time is correctly synchronized.

  • Use state sync for rapid initial sync (note: not applicable for archive nodes).

Performance Issues

  • Monitor system resources (CPU, memory, I/O).

  • Evaluate disk performance and network bandwidth.

  • Adjust mempool and persistent peer settings if necessary.

Network Connectivity

  • Confirm firewall rules allow required ports (e.g., 26656, 26657, 9090).

  • Check that DNS resolution is functioning.

  • View system logs and node info via RPC [localhost:26657/net_info] to verify peer connections.


Next Steps

Once your node is up and running, consider the following:

  1. Monitoring and Alerts: Set up tools to monitor node health and performance.

  2. Security Best Practices: Harden your server (firewall, SSH keys, etc.).

  3. Backup Procedures: Regularly back up your configuration and data directories.

Additional documentation can be found at:

  • Advanced Configuration and Monitoring Guide

  • Node Operators Guide

  • Validators Guide

PreviousResourcesNextNode Operators Guide

Last updated 2 months ago