ENIG Smartnode

To operate a smartnode on the ENIG, participants are required to hold 900,000 ENIG as collateral, ensuring commitment and integrity to the system. In return for their contribution, smartnode operators are rewarded with ENIG, providing an incentivized and decentralized ecosystem.

To operate a Enig smartnode, you'll require a configuration consisting of:

  • 2 CPU cores

  • 4GB of RAM

  • 60GB SSD (Solid State Drive)

Smartnode Setup

1: Switch to root user, update your server and install Unzip and fail2ban.

Copy

sudo su

Copy

apt update && sudo apt upgrade -y && sudo apt install -y unzip fail2ban

2: Add a swap file

See if there's already a swap file:

Copy

swapon --show

If there's no output, it means there is no active swap file. Let's create a swap file:

Copy

sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab

3: Secure server: Enable UFW, open ports

Copy

sudo apt install ufw -y
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow ssh
sudo ufw allow 18142/tcp
sudo ufw enable

4: Secure server: Enable UFW, open ports

Open the fail2ban configuration file

Copy

sudo nano /etc/fail2ban/jail.local

Copy and paste the following:

Copy

[sshd]
enabled = true
port = 22
logpath = /var/log/auth.log
maxretry = 3

With these settings, Fail2Ban will be active for SSH, monitoring the specified log file for failed login attempts, and after three unsuccessful attempts from the same IP address, it will take appropriate action to block that IP. Next, you will reboot your server:

Copy

reboot

5: Add a system user, create a Enig Wallet Directory and download the latest daemon

Create a system user:

Copy

sudo adduser new_username

Copy

sudo su new_username

Download and unzip the latest enig daemon:

Copy

mkdir enig

Copy

cd enig

Copy

wget https://github.com/enigplay/enig/releases/download/1.8.18.24/enig-ubuntu20-1.8.18.24.tar.gz

Copy

tar -xvf enig-ubuntu20-1.8.18.24.tar.gz

Copy

sudo chmod +x enigd enig-cli

Copy

mkdir ~/.enigcore && touch ~/.enigcore/enig.conf

6: Setup wallet locally

This section of the guide is dedicated to setting up your local wallet or control wallet for Enig. If you already have the enig core wallet running, you may proceed to the next section.

  • Download the latest Enig wallet on Github: https://github.com/enigplay/enig/releases

  • Begin by opening the wallet and allowing it to complete the syncing process.

  • Next, secure your wallet by encrypting it through the "Settings" menu and selecting "Encrypt Wallet."

  • Generate a new receiving address within the wallet.

  • It is crucial to create a backup of your wallet.dat file. To do this, navigate to "File" and choose "Backup Wallet." Make sure to store this backup in multiple secure locations.

  • Send 900,000ENIG to self (this is the current collateral amount for ENIG smartnode).

  • Wait for 1 confirmation to complete the transaction.

7: Build protx command within your wallet

Below is an example of what the protx quick_setup command should look like. You can copy the example below into a Notepad and edit it with your values.

Copy

protx quick_setup "127abb1a275a4c6f80745b6945474aa0431b7323a9c21a4127859369d8d03e74" "0" "192.168.10.1:18142" "EZ9YUJ1S8e8WZwPeQyZDhTmZg68tg4VeiF"

Transaction ID: In your wallet, go to "Transactions," right-click the one you sent yourself earlier, and "Copy Transaction ID." Replace the Transaction ID in the example.

Collateral index: Go to "Tools" > "Debug console." Type "smartnode outputs" to check if it's 1 or 0. Adjust the example command if needed.

Your smartnode server IP and port: Replace the example IP with your Smartnode server. Keep the port as 18142.

Fee address: This should be any address in your wallet that contains enough ENIG to pay the fee (cannot be the address to which you sent the 900,000 ENIG). When you enter the "protx quick_setup" command, it is considered a transaction and requires a small fee. 0.0005 ENIG is enough. In the Debug console, use "listaddressbalances" to display all addresses with a balance, choose one, and replace the address in the example command.

  • Execute the "protx quick_setup" command within the Debug console. This action will generate a .conf file for that specific node in the directory where the wallet is currently located. Open the file and copy its contents for further use.

8: Complete Smartnode configuration on VPS

Now we will move our configuration over to our server.

Copy

~/enig/.enig-cli stop
nano ~/.enigcore/enig.conf

Paste the contents you copied from the .conf file generated during the execution of the "protx" command. After pasting, save the changes and proceed to exit the file.

Start your daemon:

Copy

~/enig/./enigd -daemon  

To see if your Smartnode is running successfully, run:

Copy

~/enig/./enig-cli smartnode status

Last updated