Bitcoin Forum
May 04, 2024, 04:56:49 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Alternate cryptocurrencies / Altcoin Discussion / Altcoin Blockchain Timestamp Oddity on: February 14, 2019, 03:07:29 AM
Background:

I recently began working on a dead altcoin (been abandoned by the developers for over 4 years) to gain some experience in cryptocurrency development. When I downloaded the last wallet provided by the devs (version 1.6.0) I began to sync with the last node left hosting the blockchain. My wallet stopped syncing after block 72160, with the following error in the log:

ERROR: AcceptBlock() : block's timestamp is too early compare to last block
ERROR: ProcessBlock() : AcceptBlock FAILED

After some further debugging, I found out that block 72161 had a timestamp of an hour before block 72160, hence the error.

When I looked at the source code for the previous version of the wallet (1.5.3), I noted that the code responsible for making sure that blocks with older timestamps did not come after newer ones was missing. Apparently, the devs did not add such functionality until the last released version of the coin.

Question:

What would be the best way to handle this situation? Obviously my end goal here is to patch the 1.6.0 wallet to be able to sync the blockchain. My initial thought is to add in logic to only apply the timestamp check after the problematic blocks. There are several more occurrences of older timestamped blocks being higher in the blockchain than newer ones, but nothing like that occurs after height 80000. However, this solution feels to me as though I am just masking a problem instead of doing a real fix. The only 'real' fixes that I can think of would involve messing with the blockchain, which I feel like would be wrong to do, and probably just break things even further. Anyone kind enough to lend some thoughts to this situation?
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!