Hacker News new | past | comments | ask | show | jobs | submit login

You need to check two things. First you need to check that this block had a timestamp higher than the median of the past 11 blocks (it's a consensus rule). Second you need to check that the timestamp is not unacceptably far in the future. For historic blocks, it definitely won't be because the timestamp will be far in the past (as the block was created far in the past).

Latest block or not, it just needs to follow those rules. That does mean it's possible for a block with an invalid timestamp to become valid after some time has passed. But if it is invalid, nobody will be mining on it, so it's unlikely to remain part of the longest chain.




The median thing makes sense, thanks!




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: