In Bitcoin, many forks occur when multiple miners mine blocks at the same time. Then there will be multiple blocks at the same block height.
I was looking at the Bitcoin P2P developer guide at https://developer.bitcoin.org/devguide/p2p_network.html
For propagating blocks, a relay sends an “inv” message to its peers. The peers request header info with “getheaders” and relay responds with “headers” message. Then the peers request block info with “getdata” and relay responds with “block” message.
In this case, how can peers be assured of getting multiple blocks at the same block height? A relay could deliberately propagate “inv” and “headers” messages for only one of the blocks at the same block height.
How can peers even know that a fork happened? Is getting the information about the fork the responsibility of the relay or the peer?