nasa8x / node-genesis-block

Create Genesis Block for Bitcoin, Litcoin, Dash, X11, X13, X15, X17, Geek, Quark, Keccak, Qubit, NeoScrypt, Scrypt...
https://morioh.com/topic/blockchain
39 stars 92 forks source link

Different results with the same input #24

Closed callvm closed 4 years ago

callvm commented 4 years ago

Im trying to run this script and getting different merkle and genesis blocks each time, using the same inputs. This is causing assertion errors in the C++ codebase. I am using Ubuntu 16.04 and Node version 6.1.0.

In the snippets below, the pubkey has been swapped out with "myPubkey" for readability. Any ideas? I get the same result when leaving out the nonce and pubkey flags, too.

I know the current version is recommended to be used with Node 12, but I have reverted back a few commits to when this still worked with older versions of Node.

Run 1

node genesis -a quark -z TestTimestamp -n 21561600 -t 1580928267 -v 0 -p myPubkey
---------------
algorithm: quark
pzTimestamp: TestTimestamp
pubkey: myPubkey
bits: 504365040
time: 1580928267
merkle root hash: e352d2d43e0972d3152b619919e84a1909160959cdabd2ce22bceb5e9be5c49a
nonce: 23763932
genesis hash: 00000164a6cc3631e927a5a4d6f7af699b391d1e284038c5797194452322e096

Run 2

node genesis -a quark -z TestTimestamp -n 21561600 -t 1580928267 -v 0 -p myPubkey
---------------
algorithm: quark
pzTimestamp: TestTimestamp
pubkey: myPubkey
bits: 504365040
time: 1580928267
merkle root hash: 19c9b4e29df146b59742324ef5ab1a040042de384c4a6b7a532e2c87673199f0
nonce: 21901961
genesis hash: 00000d4b3e68c0e3c58e4245120e92669c20e33c42351f0f9f5be71836d7ff02
callvm commented 4 years ago

Well, I bit the bullet and changed over to node 12, pulled latest commits, and hey, it works...