Skip to content

Commit

Permalink
Merge pull request #1 from Adamant-im/style
Browse files Browse the repository at this point in the history
v3.0.0
  • Loading branch information
martiliones authored Jan 14, 2023
2 parents 099f5bd + 5b042c4 commit 1c470ec
Show file tree
Hide file tree
Showing 68 changed files with 12,150 additions and 1,831 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ config.test.jsonc
config.json
config.jsonc
logs
db
.vscode
23 changes: 18 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
> Read more about [Forging, delegates, Fair dPoS, and how to run your Forging pool](https://medium.com/adamant-im/earning-money-on-adm-forging-4c7b6eb15516).
# ADAMANT Forging Pool

> Read more about [Forging, delegates, Fair dPoS, and how to run your Forging pool](https://medium.com/adamant-im/earning-money-on-adm-forging-4c7b6eb15516)
> This software is a successor of outdated [v2 Forging pool](https://github.com/Adamant-im/adamant-pool)
<br>

Expand Down Expand Up @@ -33,13 +37,13 @@
Clone the repository with pool into a newly created directory:

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

Move to directory with the cloned repository:

```
cd adamant-pool
cd pool
```

Install dependencies using npm or any other package manager:
Expand Down Expand Up @@ -70,6 +74,15 @@ 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:

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

## Launching

You can start the pool using `npm` command:
Expand All @@ -81,7 +94,7 @@ npm run start
but we recommend to use a process manager to start the pool, f.e. [`pm2`](https://pm2.keymetrics.io/):

```
pm2 start npm --name "ADAMANT Pool" -- start
pm2 start ./scripts/start.sh --name "adamantpool"
```

## Add pool to cron
Expand All @@ -95,7 +108,7 @@ crontab -e
and paste the string:

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

## Contribution
Expand Down
117 changes: 64 additions & 53 deletions config.default.jsonc
Original file line number Diff line number Diff line change
@@ -1,67 +1,78 @@
{
/** List of nodes to fetch forging information, needed to count rewards.
If one become unavailable, pool will choose live one.
**/
"node_ADM": [
"https://endless.adamant.im",
"https://clown.adamant.im",
"http://23.226.231.225:36666",
"http://88.198.156.44:36666",
"https://lake.adamant.im",
"http://localhost:36666"
],
/**
List of nodes to fetch forging information.
If one become unavailable, a pool will choose live one.
**/
"node_ADM": [
"https://bid.adamant.im",
"http://localhost:36666",
"https://endless.adamant.im",
"https://clown.adamant.im",
"https://unusual.adamant.im",
"https://debate.adamant.im",
"http://23.226.231.225:36666",
"http://78.47.205.206:36666",
"https://lake.adamant.im",
"https://sunshine.adamant.im"
],

/** The pool's secret phrase. Pool's ADM address will correspond this passPhrase.
Must be a delegate of ADAMANT blockchain.
**/
"passPhrase": "",
/**
The pool's secret phrase. Pool's ADM address/account will correspond this passPhrase.
The account should be a delegate of the ADAMANT blockchain.
**/
"passPhrase": "",

/** Percentage of rewards to distribute to pool's voters **/
"reward_percentage": 80,
/** Percentage of rewards to distribute to voters **/
"reward_percentage": 80,

/** Percentage of rewards to donate to ADAMANT Foundation **/
"donate_percentage": 0,
/** Percentage of rewards to donate to the ADAMANT Foundation **/
"donate_percentage": 0,

/** Wallet for donation.
Make sure it is the same as on https://adamant.im/donate
**/
"donatewallet": "U380651761819723095",
/**
Wallet for donation.
Make sure it's the same as on https://adamant.im/donate
**/
"donatewallet": "U380651761819723095",

/** Maintenance wallet to receive (100 - reward_percentage - donate_percentage) rewards
If you wish to leave it on the pool's wallet, set to empty string
**/
"maintenancewallet": "",
/**
Maintenance wallet to receive (100 - reward_percentage - donate_percentage) rewards.
If you wish to leave it on the pool's wallet, set to empty string.
**/
"maintenancewallet": "",

/** How often pool will do payouts. All at 00:00.
1d -> every day
5d -> days 1, 5, 10, 15, 20, 25 of the month
10d -> days 1, 10, 20 of the month
15d -> days 1, 15 of the month
30d -> 30th of each month
Mon, Tue, Wed, Thu, Fri, Sat or Sun -> every week
**/
"payoutperiod": "Sun",
/**
How often the pool will do payouts. All at 00:00.
1d -> every day
5d -> days 1, 5, 10, 15, 20, 25 of the month
10d -> days 1, 10, 20 of the month
15d -> days 1, 15 of the month
30d -> 30th of each month
Mon, Tue, Wed, Thu, Fri, Sat or Sun -> every week
**/
"payoutperiod": "Sun",

/** Minimum amount in ADM for payouts. Must be not less, than 0.51.
If at the end of payoutperiod a voter's reward is less than minpayout, it will be pending for next period.
Voter pays a transaction fee.
**/
"minpayout": 10,
/**
Minimum amount in ADM for a payout. Must be not less, than 0.51.
If at the end of a payoutperiod a voter's reward is less than minpayout, it will be pending for the next period.
Voter pays a transaction fee.
**/
"minpayout": 10,

/** If delegate can vote for himself and this will count in rewards distribution **/
"considerownvote": false,
/** If delegate can vote for himself and this will account in reward distribution **/
"considerownvote": false,

/** ADAMANT address for monitoring notifications **/
"adamant_notify": "",
/** ADAMANT address for monitoring notifications **/
"adamant_notify": "",

/** Slack key for monitoring notifications **/
"slack": "",
/** Slack key for monitoring notifications **/
"slack": "",

/** The software will use verbosity according to log_level.
It can be none < error < warn < info < log.
**/
"log_level": "log",
/**
The software will use verbosity according to log_level.
It can be none < error < warn < info < log.
**/
"log_level": "log",

/** Port for pool's public Web panel **/
"port": 36667
/** Port for pool's public Web panel **/
"port": 36667
}
Loading

0 comments on commit 1c470ec

Please sign in to comment.