I have always just take it that the nodes and clients will download the data from the "network". The full nodes will download the entire blockchain state while the light clients will download only the root hash of all the blocks from the "network". But I have never truly understood deeper how all of these will happen.
- Since there isn't a centralised endpoint to signal to everyone else that a new node or client is about to join the network, how does the decentralised network knows that a node or client has joined the network and hence should "gossip" with or transmit any new transactions to it?
- Since the network is decentralised by nature, how and where exactly will a new node or clients know where to download their state data from? Again, there isn't like a designated endpoint to make a call to and say "I would like to download the state data." Without a designated endpoint, how does a client or node know which other nodes or clients they can download those data from and whether that particular source they will download from is reliable or malicious?
- For example, what if a light client downloaded a bunch of fake root hashes? The light client could verify the root hashes but, again, what if the light client somehow retrieved the proofs from the same malicious full node which then provide fake proofs which match up with the fake root hashes? Would the light client just think that everything is verified and good?