Skip to content

How to test miners pool on FiroPow on regtest

Reuben Yap edited this page Aug 17, 2021 · 2 revisions

To test miners/pool on FiroPow on regtest prior to FiroPow testnet being up

Pull from this branch https://github.com/firoorg/firo/tree/progpow

  1. Get Unix time plus 10 minutes

T1=`date +%s`; T2=$((T1+600))

  1. If unsuccessful on previous attempt clear regtest state

rm -rf ~/.firo/regtest ~/.firo2

mkdir ~/.firo2

  1. Run two firods on regtest

src/firod -regtest -ppswitchtime=$T2 -port=28168 -rpcport=28888 -connect=127.0.0.1:28169 -server=1 -listen=1 -rpcuser=rpcuser -rpcpassword=x -daemon

src/firod -datadir=$HOME/.firo2 -regtest -ppswitchtime=$T2 -port=28169 -rpcport=28889 -connect=127.0.0.1:28168 -daemon

  1. Generate 100 blocks

src/firo-cli -regtest -rpcuser=rpcuser -rpcpassword=x generate 100

  1. Check if everything is working

src/firo-cli -regtest -rpcuser=rpcuser -rpcpassword=x getblockcount

src/firo-cli -regtest -rpcport=28889 -datadir=$HOME/.firo2 getblockcount

(both should report 100)

  1. Wait until T2

  2. Connect to daemon localhost:28888 with miner (should work on WSL2)

  3. To stop daemons use

src/firo-cli -regtest -rpcuser=rpcuser -rpcpassword=x stop

src/firo-cli -regtest -rpcport=28889 -datadir=$HOME/.firo2 stop

Clone this wiki locally