Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
49fcde4
chore: add dev files and dirs
confleux Jul 18, 2025
1913b95
chore: update dev deps
confleux Jul 18, 2025
62b84fe
chore: update eslint 8 -> 9
confleux Jul 18, 2025
1d61952
chore: init husky again to remove deprecated stuff
confleux Jul 18, 2025
b30c12e
chore: add tests script
confleux Jul 18, 2025
4102daa
chore: minor update of dep
confleux Jul 18, 2025
ca532f3
chore: update vite v4 -> v7
confleux Jul 18, 2025
1f0ed27
feat: add link to explorer at address cell
confleux Jul 18, 2025
54befdd
chore: add links at transation table
confleux Jul 18, 2025
5fd6489
chore: mark whole number part bold
confleux Jul 18, 2025
18055f2
chore: mark whole number part bold
confleux Jul 18, 2025
d476ed8
chore: update enpoints naming
confleux Jul 18, 2025
e5dba6b
chore: update svelte 3 -> 5
confleux Jul 18, 2025
9da85d9
chore: update adamant-api
confleux Jul 21, 2025
4630d1b
fix: refresh button
confleux Jul 21, 2025
3a3f2e6
chore: minor deps update
confleux Jul 21, 2025
7517342
chore: update small deps
confleux Jul 21, 2025
6c605b1
chore: update eslint to v9
confleux Jul 21, 2025
82ad86b
chore: update express
confleux Jul 21, 2025
d7b895c
chore: update lowdb
confleux Jul 21, 2025
e2e4f5a
chore: add tags to README
confleux Jul 24, 2025
c3ed183
chore: update npm scripts and resolve eslint issues
confleux Jul 24, 2025
778c2b5
chore: update husky pre-commit
confleux Jul 24, 2025
3e853ba
fix: setInterval
confleux Aug 19, 2025
f491c5c
fix: setIntreval ms
confleux Aug 19, 2025
b0ca1b8
chore: add stylistic config
confleux Aug 21, 2025
c35a1b2
chore: rename, make exit code constant
confleux Aug 21, 2025
1ee272c
chore: update cors options
confleux Aug 21, 2025
bd7d477
chore: update naming
confleux Aug 21, 2025
9f7cf67
refactor: restructure, use Error instead of 0s and -1s
confleux Aug 21, 2025
3d74c61
refactor: remove unused
confleux Aug 21, 2025
a99bf15
fix: import, naming
confleux Aug 21, 2025
cbc76b1
refactor: naming
confleux Aug 21, 2025
67fc23d
refactor: make db async
confleux Aug 21, 2025
1aa2491
refactor: lowdb -> mongodb
confleux Aug 21, 2025
74f3427
refactor: remove unused LowDB queries
confleux Aug 23, 2025
adf0171
refactor: move lowb related code to repository dir
confleux Aug 23, 2025
7f0bd49
fix: import
confleux Aug 23, 2025
13058f9
chore: update mongo queries error handling
confleux Aug 23, 2025
c87bbe6
chore: make mongodb params configurable
confleux Aug 23, 2025
ef511ae
chore: add comments
confleux Aug 23, 2025
a0f90e7
fix: blocks checking
confleux Aug 23, 2025
502c468
chore: add migration guide
confleux Aug 25, 2025
e9c8968
chore: add indexes
confleux Aug 26, 2025
3bfae61
fix: payouts
confleux Sep 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
node_modules
node_modules/

config.test.jsonc
config.json
config.jsonc
logs
.vscode

logs/

.vscode/
.idea/

.DS_Store
4 changes: 0 additions & 4 deletions .husky/commit-msg

This file was deleted.

5 changes: 1 addition & 4 deletions .husky/pre-commit
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run --prefix ./web lint && npm run --prefix ./server lint
npm run lint
52 changes: 40 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,80 +36,108 @@

Clone the repository with pool into a newly created directory:

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

Move to directory with the cloned repository:

```
```bash
cd pool
```

Install dependencies using npm or any other package manager:

```
```bash
npm install
```

Build a website:

```
```bash
npm run build:web
```

### Pre-launch tuning

Copy default config as `config.jsonc`:

```
```bash
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`:

```
```bash
nano config.jsonc
```

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

### Migration from v2
### Migration from v2 to v3

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

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

In order for the changes to take effect, you will need to restart your pool.

### Migration from v3 to v4

To migrate a database from v3 prepare the migration script:

```bash
$ cd scripts/migrate-lowdb-mongodb
$ npm i
```

Configure MongoDB connection string and LowDB storage path with environment variables and run the migration script, e.g.:

```bash
$ MONGODB_URI=mongodb://localhost:27017 LOWDB_STORAGE_PATH=../../server/db node index.js
```

Specify MongoDB connection parameters at your config file:

```jsonc
...,
/** MongoDB connection parameters **/
"mongodb": {
"uri": "mongodb://localhost:27017",
"dbName": "adamant-pool"
}
```

In order for the changes to take effect, you will need to restart your pool.

## Launching

You can start the pool using `npm` command:

```
```bash
npm run start
```

but we recommend to use a process manager to start the pool, f.e. [`pm2`](https://pm2.keymetrics.io/):

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

## Add pool to cron

Edit crontab file using the command below:

```
```bash
crontab -e
```

and paste the string:

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

Expand Down
16 changes: 14 additions & 2 deletions config.default.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
**/
"maintenancewallet": "",

/**
/**
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
Expand Down Expand Up @@ -74,5 +74,17 @@
"log_level": "log",

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

/** Express server CORS configuration **/
"cors": {
"origin": "*",
"credentials": true
},

/** MongoDB connection parameters **/
"mongodb": {
"uri": "mongodb://localhost:27017",
"dbName": "adamant-pool"
}
}
Loading