:: Re: [Libbitcoin] testnet blockchain…
Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Amir Taaki
Fecha:  
A: libbitcoin
Asunto: Re: [Libbitcoin] testnet blockchain not keeping up to date: rule exception for testnet?
Solved the problem. The clock on my server was wrong. Blocks were being
rejected for having a timestamp too far in the future.
See link for info.

On 01/23/2015 02:25 AM, Amir Taaki wrote:
> Cross posting this here for record keeping:
>
> https://github.com/libbitcoin/libbitcoin-blockchain/issues/47
>
> ---------------
>
> On testnet my blockchain keeps falling behind but this doesn't happen on
> mainnet. It's a problem that I've tried many approaches to, until I
> noticed that many of the blocks on testnet seem to happen all at once:
>
> http://tbtc.blockr.io/
>
> And then I noticed these warnings:
>
> 00:42:14.256872 WARNING [poller]: Storing block
> 0000000013c7afcc1c74ff9a035ff195b6370a30c271ffd58c0c4b76af9f8684:
> Timestamp too far in the future
> 00:44:57.013515 WARNING [poller]: Storing block
> 0000000013c7afcc1c74ff9a035ff195b6370a30c271ffd58c0c4b76af9f8684:
> Timestamp too far in the future
> 00:55:27.380943 WARNING [poller]: Storing block
> 000000002fca961dc15d9db0bd7570673be740d3e54ebeb8d057152f07464adb:
> Timestamp too far in the future
> 00:57:32.134283 WARNING [poller]: Storing block
> 000000002fca961dc15d9db0bd7570673be740d3e54ebeb8d057152f07464adb:
> Timestamp too far in the future
> 00:59:33.896819 WARNING [poller]: Storing block
> 000000002fca961dc15d9db0bd7570673be740d3e54ebeb8d057152f07464adb:
> Timestamp too far in the future
> 01:01:31.168644 WARNING [poller]: Storing block
> 000000002fca961dc15d9db0bd7570673be740d3e54ebeb8d057152f07464adb:
> Timestamp too far in the future
>
> So obviously this rule in check_block(), does not apply to testnet:
>
> https://github.com/libbitcoin/libbitcoin-blockchain/blob/master/src/validate.cpp#L376
>
> const ptime block_time = from_time_t(blk_header.timestamp);
> const ptime two_hour_future =
>     second_clock::universal_time() + hours(2);
> if (block_time > two_hour_future)
>     return error::futuristic_timestamp;

>
> I'm trying to find where in the Satoshi source code this rule is
> excluded but haven't found it yet.
> _______________________________________________
> Libbitcoin mailing list
> Libbitcoin@???
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/libbitcoin
>