Ravencoin icon indicating copy to clipboard operation
Ravencoin copied to clipboard

regtest is not using kawpow algorithm

Open cyberbumble opened this issue 3 years ago • 2 comments

Describe the issue

I am running Ravencoin in regtest mode and it is not using kawpow algorithm. All blocks are set to:

"mixhash": "0000000000000000000000000000000000000000000000000000000000000000", "nonce64": 0,

Can you reliably reproduce the issue?

If so, please list the steps to reproduce below:

  1. Run in regtest mode
  2. Check blocks
  3. Missing mixhash, nonce64 (all zeroed)

Expected behaviour

Produced blocks should be with kawpow.

Actual behaviour

Older hashing algo.

What version of bitcoin-core are you using?

Latest, 4.3.2.1

Any extra information that might be useful in the debugging process.

Block examples with kawpow: Mainnet: https://rvn.cryptoscope.io/api/getblock/?index=1733924 Testnet: https://rvnt.cryptoscope.io/api/getblock/?index=700552

Regtest:

getblockhash 0 getblock 0b2c703dc93bb63a36c4e33b85be4855ddbca2ac951a7a0a29b8de0408200a3c

-snip-
"mixhash": "0000000000000000000000000000000000000000000000000000000000000000",
"nonce64": 0,
-snip-

getblockhash 99 getblock 7c66d0831d65e7329a6befe9ddcf0e1da3d306be9fb77690dcc8362ff3908cad

-snip-
"mixhash": "0000000000000000000000000000000000000000000000000000000000000000",
"nonce64": 0,
-snip-

I hope this helps!

cyberbumble avatar Apr 30 '21 17:04 cyberbumble

This is the reason. https://github.com/RavenProject/Ravencoin/blob/f31e43d7a0f9dcadab9db1a9f1bc6016609e738e/src/chainparams.cpp#L694

The comment says some tests fail if this is enabled.

I think we should enable it by default and fix the tests.

fdoving avatar Dec 25 '21 11:12 fdoving

Thanks for answering fdoving!

cyberbumble avatar Jan 19 '22 16:01 cyberbumble