Author

Topic: Genesis block with X11 (Read 122 times)

newbie
Activity: 13
Merit: 0
June 06, 2019, 11:03:27 AM
#2
Finally I've found the correct algorithm is QUARK  Tongue Embarrassed Lips sealed, https://github.com/nasa8x/genesis-block manage that.
newbie
Activity: 13
Merit: 0
June 05, 2019, 11:40:04 AM
#1
Hi, I try to replicate some genesis blocks with X11 algorithm, using nasa8x/genesis-block program found in Gibhub.
With the data from chainparams of darkcoin the result is perfect, but if I try with PIVX I've different hash result .....

This is the command:
python gen.py  -a X11 -z "U.S. News & World Report Jan 28 2016 With His Absence, Trump Dominates Another Debate" -t 1390095618 -p "04c10e83b2703ccf322f7dbd62dd5855ac7c10bd055814ce121ba32607d573b8810c02c0582aed0 5b4deb9c4b77b26d92428c61256cd42774babea0a073b2ed0c9" -n 28917698 -t 1454124731 -v 5000000000

This is the genesis block that I try to reproduce:
/**
         * Build the genesis block. Note that the output of the genesis coinbase cannot
         * be spent as it did not originally exist in the database.
         *
         * CBlock(hash=00000ffd590b14, ver=1, hashPrevBlock=00000000000000, hashMerkleRoot=e0028e, nTime=1390095618, nBits=1e0ffff0, nNonce=28917698, vtx=1)
         *   CTransaction(hash=e0028e, ver=1, vin.size=1, vout.size=1, nLockTime=0)
         *     CTxIn(COutPoint(000000, -1), coinbase 04ffff001d01044c5957697265642030392f4a616e2f3230313420546865204772616e642045787 06572696d656e7420476f6573204c6976653a204f76657273746f636b2e636f6d204973204e6f77 20416363657074696e6720426974636f696e73)
         *     CTxOut(nValue=50.00000000, scriptPubKey=0xA9037BAC7050C479B121CF)
         *   vMerkleTree: e0028e
         */
        const char* pszTimestamp = "U.S. News & World Report Jan 28 2016 With His Absence, Trump Dominates Another Debate";
        CMutableTransaction txNew;
        txNew.vin.resize(1);
        txNew.vout.resize(1);
        txNew.vin[0].scriptSig = CScript() << 486604799 << CScriptNum(4) << vector((const unsigned char*)pszTimestamp, (const unsigned char*)pszTimestamp + strlen(pszTimestamp));
        txNew.vout[0].nValue = 250 * COIN;
        txNew.vout[0].scriptPubKey = CScript() << ParseHex("04c10e83b2703ccf322f7dbd62dd5855ac7c10bd055814ce121ba32607d573b8810c02c0582aed0 5b4deb9c4b77b26d92428c61256cd42774babea0a073b2ed0c9") << OP_CHECKSIG;
        genesis.vtx.push_back(txNew);
        genesis.hashPrevBlock = 0;
        genesis.hashMerkleRoot = genesis.BuildMerkleTree();
        genesis.nVersion = 1;
        genesis.nTime = 1454124731;
        genesis.nBits = 0x1e0ffff0;
        genesis.nNonce = 2402015;

        hashGenesisBlock = genesis.GetHash();
        assert(hashGenesisBlock == uint256("0x0000041e482b9b9691d98eefb48473405c0b8ec31b76df3797c74a78680ef818"));
        assert(genesis.hashMerkleRoot == uint256("0x1b2ef6e2f28be914103a277377ae7729dcd125dfeb8bf97bd5964ba72b6dc39b"));


Any suggestions?
Thanks a lot
Jump to: