I have following this guide here: Why can’t the genesis block coinbase be spent?

Tries to unlock the Genesis transaction in Litecoin version

Step 1 – Disable skipping the genesis block (which is intended to keep the bug as part of consensus), Line 1818:

// Special case for the genesis block, skipping connection of its transactions // (its coinbase is unspendable) if (block.GetHash() == chainparams.GetConsensus().hashGenesisBlock) { if (!fJustCheck) view.SetBestBlock(pindex->GetBlockHash()); // return true; <- comment this line out

Step 2 – Skip assertion of previous block for genesis block, Line 1874:

if (block.GetHash() != chainparams.GetConsensus().hashGenesisBlock) { assert(pindex->pprev);

Step 3 – Skip writing undo data for genesis block, Line 1989:

if (block.GetHash() != chainparams.GetConsensus().hashGenesisBlock)
{ if (!WriteUndoDataForBlock(blockundo, state, pindex, chainparams)) return false;

So far the compilation and implementation of the changes worked. But now the core won’t start anymore.

2023-02-03T04:05:55Z Using obfuscation key for /home/fluffelbuff/.litecoin/blocks/index: 0000000000000000
2023-02-03T04:05:55Z LoadBlockIndexDB: last block file = 0 2023-02-03T04:05:55Z LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=0, size=0, heights=0...0, time=1970-01-01...1970-01-01) 2023-02-03T04:05:55Z Checking all blk files are present... 2023-02-03T04:05:55Z Initializing databases... 2023-02-03T04:05:55Z Pre-allocating up to position 0x1000000 in blk00000.dat 2023-02-03T04:05:55Z Opening LevelDB in /home/fluffelbuff/.litecoin/chainstate 2023-02-03T04:05:55Z Opened LevelDB successfully 2023-02-03T04:05:55Z Using obfuscation key for /home/fluffelbuff/.litecoin/chainstate: 3a7426d6c4a7385a 2023-02-03T04:05:55Z init message: Rewinding blocks... 2023-02-03T04:05:55Z block index 18ms 2023-02-03T04:05:55Z loadblk thread start

The program is then terminated with the message Memory access error (memory dump written). I have more than 12GB free, so it can’t be that.

Did I forget to change something?

I have not changed the Litcoin genesis block and am using a completely empty folder for each attempt.

Leave a Reply

Your email address will not be published. Required fields are marked *