Thanks a lot for the guide. It really helps a lot but I have a few issues if you can help me out please
I followed the instructions and I'm getting the error about immature table not existed when running the pool
I also can't access my miner details (workers, payment made, hashrate graph etc) in web portal
When I run the pool, I can see it's showing pool fee 0% in the log, but the web portal is showing pool fee 1%
pool db schema was upgraded from this guide. you need:
go to bitok-pool/pool-server and run:
PGPASSWORD='YOUR_PG_PASSWORD' psql -h localhost -U bitokpool -d bitok_pool -f sql/schema.sql
verify
PGPASSWORD='YOUR_PG_PASSWORD' psql -h localhost -U bitokpool -d bitok_pool -c "\dt"
Expected output:
List of relations
Schema | Name | Type | Owner
--------+-------------+-------+-----------
public | blocks | table | bitokpool
public | miners | table | bitokpool
public | payments | table | bitokpool
public | pool_stats | table | bitokpool
public | shares | table | bitokpool
Verify the miners table has all required columns:
PGPASSWORD='YOUR_PG_PASSWORD' psql -h localhost -U bitokpool -d bitok_pool -c "\d miners"
the output must include `balance` and `immature` columns. If they are missing, drop and recreate the tables using the schema file (safe to do on a fresh install with no data).
Verify the blocks table:
PGPASSWORD='YOUR_PG_PASSWORD' psql -h localhost -U bitokpool -d bitok_pool -c "\d blocks"
The output must include `paid` and `credited` columns.
*or run all migrations
https://github.com/antitongpu/bitok-stratum-pool/tree/main/pool-server/sql/migrations from pool-server folder:
# Migration 1: Adds error_message and blocks_included to payments table
PGPASSWORD='YOUR_PG_PASSWORD' psql -h localhost -U bitokpool -d bitok_pool -f sql/migrations/001_update_payments_table.sql
# Migration 2: Adds paid column to blocks table
PGPASSWORD='YOUR_PG_PASSWORD' psql -h localhost -U bitokpool -d bitok_pool -f sql/migrations/002_add_paid_column.sql
# Migration 3: Adds balance and immature columns to miners table (REQUIRED)
PGPASSWORD='YOUR_PG_PASSWORD' psql -h localhost -U bitokpool -d bitok_pool -f sql/migrations/003_add_balance_tracking.sql
# Migration 4: Adds credited column to blocks table (REQUIRED)
PGPASSWORD='YOUR_PG_PASSWORD' psql -h localhost -U bitokpool -d bitok_pool -f sql/migrations/004_add_credited_column.sql
# Migration 5: Fixes credited flag for blocks that were already paid out
PGPASSWORD='YOUR_PG_PASSWORD' psql -h localhost -U bitokpool -d bitok_pool -f sql/migrations/005_fix_credited_for_paid_blocks.sql