Bitcoin Forum
May 29, 2024, 10:14:39 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Need help for Reddcoin - 1 BTC bounty for solution  (Read 684 times)
ReddCoin (OP)
Full Member
***
Offline Offline

Activity: 159
Merit: 100


View Profile WWW
March 06, 2014, 03:34:50 AM
Last edit: March 06, 2014, 12:08:46 PM by ReddCoin
 #1

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

REDDCOIN - THE SOCIAL CURRENCY
www.reddcoin.com
kjj
Legendary
*
Offline Offline

Activity: 1302
Merit: 1025



View Profile
March 06, 2014, 05:06:32 AM
 #2

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.

17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8
I routinely ignore posters with paid advertising in their sigs.  You should too.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!