Skip to content

Adamant-im/pool

Repository files navigation

ADAMANT Forging Pool

Read more about Forging, delegates, Fair dPoS, and how to run your Forging pool

This software is a successor of outdated v2 Forging pool


Calculate and transfer voters’ rewards automatically.

  • 🌈 Easy to install
  • 🤝 Reliable, uses decentralized network advantages
  • 🛠️ Customizable (using config file)
  • 📜 History stored in local files (powered by lowdb)
  • 🚀 Minimum server requirements: 1 vCPU and 512 MB of RAM
  • 🪚 You can setup the pool on a separate machine without a node
  • 📈 Dashboard for voters with mobile version support
  • 🔔 Notification system via ADAMANT or Slack for admin

Installation

Requirements

  • NodeJS v16+ (already installed if you have a node on your machine)

Setup

Clone the repository with pool into a newly created directory:

git clone https://github.com/Adamant-im/pool

Move to directory with the cloned repository:

cd pool

Install dependencies using npm or any other package manager:

npm install

Build a website:

npm run build:web

Pre-launch tuning

Copy default config as config.jsonc:

cp config.default.jsonc config.jsonc

And edit that file by inserting the pool's secret phrase as the minimum configuration, e.g. using nano:

nano config.jsonc

See comments in config.default.jsonc for more parameters.

Migration from v2

To migrate a database from v2 run the migration script with the specified path to the target pool or database:

# or ~/adamant-pool/db
$ node scripts/migrate.mjs ~/adamant-pool

Launching

You can start the pool using npm command:

npm run start

but we recommend to use a process manager to start the pool, f.e. pm2:

pm2 start ./scripts/start.sh --name "adamantpool"

Add pool to cron

Edit crontab file using the command below:

crontab -e

and paste the string:

@reboot cd /home/adamant/pool && pm2 start /home/adamant/pool/scripts/start.sh --name "adamantpool"

Contribution

Please have a look at the CONTRIBUTING.md