1
Upon receiving a newly mined block, the block timestamp validation is performed here:
https://github.com/bitcoin/bitcoin/blob/master/src/validation.cpp#L3263-L3270
Q1: As for the second check (block timestamp too far in the future), what prevents a miner broadcasting a block that's near the limit in the future and having some of the nodes accept the block, while some other nodes reject the block?
Q2: If a part of the network accepts a block and the other part of the network rejects a block (i.e., not record the block it in its blocktree due to invalid time stamp), can the network recover from this in any way?
Thanks for tackling this, but it doesn't really address the questions, here's why: in the case of a "usual" fork you are referring to, the block trees of differing nodes contain both blocks, whereas in this case, the block trees are essentially different and as such they can't sync/switch to a branch with more proof of work. As for miner's incentive when it comes to timestamp manipulation, sure, the miner is not incentivized, but the question is whether this is theoretically possible or not. – bgd223 – 2018-07-23T20:39:19.113