Author

Topic: Need help for Reddcoin - 1 BTC bounty for solution (Read 685 times)

kjj
legendary
Activity: 1302
Merit: 1025
If your code is similar to the reference client...

CBlock contains a vector of CTransaction, vtx.  The first element of it is the generation transaction.  CTransaction includes a vector of CTxIn, vin.  CTxIn includes a CScript, scriptSig.  The first element of the scriptSig should be the block height.
full member
Activity: 159
Merit: 100
Hi

We need some help with Reddcoin. We had a bug in our code, 2 lines were commented so the verification of block we're not done properly.

https://github.com/reddcoin/reddcoin/commit/88fc5fe0bf522e384b7aebfebced12b75e207e80

Someone exploited that error and he was able to grab 7k block in 1 hours. We were able to delete those block but we still need to use the block before 44877, and fix the bug for future block.


What we need to do is this. We need to get nHeight in this function so we can ask the code to check only after block 44877.

in main.cpp, function

bool CBlock::CheckBlock(CValidationState &state, bool fCheckPOW, bool fCheckMerkleRoot) const

I need to get access to the nHeight of the block and that's it to fix the problem.

You can look at our source code to make some test at

https://github.com/reddcoin/reddcoin

1 BTC bounty for anyone who can fix this.

Thanks

Reddcoin
Jump to: