z-classic / z-nomp

z-nomp is mining pool software for Zcash and Zclassic so you can create internet money in your home!
MIT License
287 stars 442 forks source link

Z-Nomp Stuck Downloading in regtest at height 0 #383

Closed dondreytaylor closed 4 years ago

dondreytaylor commented 6 years ago

It appears that when you start z-nomp pool with two full nodes connected to it on regtest, the pool stays in a perpetual download state and is not capable of starting the mining process. I can get the mining process to start but only after I manually create the first block above the genesis block. Using the command generate 1 on the cli.

The following appears when you run npm start to start the pool.

(Thread 1) Downloaded NaN% of blockchain from 2 peers
(Thread 1) Downloaded NaN% of blockchain from 2 peers
(Thread 1) Downloaded NaN% of blockchain from 2 peers
(Thread 1) Downloaded NaN% of blockchain from 2 peers
(Thread 1) Downloaded NaN% of blockchain from 2 peers

It doesn't seem to matter what coin I use as the daemon, though the coin I'm using in this case is BTG (Bitcoin Gold).

Here is the config I'm using on each of the full nodes

regtest=1
listen=1
txindex=1 # Enable if this daemon is used by an explorer
server=1 # Allows this daemon to accept JSON-RPC requests
daemon=1 # Runs this process in the background
rpcuser=username  # Username needed for RPC requests
rpcpassword=password  # Password needed for RPC requests
rpcallowip=0.0.0.0/0  # Whitelist for IPs for RPC
rpcport=8332 # RPC listening port

Was curious if anyone else faced this issue when running z-nomp using regtest. Is this intended functionality and if so, does this mean that the first block after the genesis block cannot be pool mined? I'm thinking it has to be submitted manually via the submitblock method with the CLI?

nicebbs commented 4 years ago

Have you solved the problem yet?

dondreytaylor commented 4 years ago

Yes I did @nicebbs. It turns out that the Initial Block Download is never marked as finished in regtest mode because the highest block has not been produced on the network yet. Essentially, the initial block in regtest mode cannot be pool mined using z-nomp, you can only produce it through the CLI to kick start the process.