What happens when a node cannot find the base Block of a newly received Block This particular question has been bugging my mind for sometime now. Suppose there an adversary miner who mines a Block with one of his transactions. The miner would only send the updated Block to a known peer minor (Ma). And right after sending out the first Block to a known peer(Not to the whole network), the miner hits the jackpot and was able to generate another Block with the same transaction. It is highly unlike that the adversary could mine another block immediately after mining the previous block but it is doable. 

Network --> [B1]->[B2]->[B3]->[S1]->[B4]  Ma --> [B1]->[B2]->[B3]->[S2],

Adversary -->[B1]->[B2]->[B3]->[S1]

As I've shown above, once Ma receives B4, it has no way of knowing what the predecessor Block (S1) of B4 is.

Could someone please explain how Bitcoin handles these sort of issues ?
Without knowing the parent, the node will hold onto the block and only do validation that can be done without context (i.e. the parent). It will also ask its peers for the parent block, and once it receives it, it will connect both blocks to its blockchain if they have more cumulative work than the node's current blockchain.

Otherwise the node ignores that block.



Keep in mind that this scenario is extremely unlikely, and not because a miner is unlikely to find two conflicting blocks nearly simultaneously. Rather nodes will relay blocks once they verify them, there is no such thing as "send to a peer but not the network". Sending a block to a peer sends it to the network as that peer will relay it to its peers and so on. So when Ma receives the block, unless it has been sybil attacked by the Adversary, it will relay that block to the network.

When Ma's peers receive S1 and B4, they will relay it to Ma and Ma will update its blockchain accordingly.