0

I have been trying for a while to understand how the bitcoin network works, which I (kind of) do on a high level. However, all of the sources I read don't go into the details of the protocol that nodes use in order to communicate with each other.

I'm trying to make a client that directly asks other nodes for the last few blocks in the blockchain and displays it to the user. I know this isn't nearly as secure tracing all the blocks back to the genesis block, but I'm doing this mostly for fun and education. So I don't care that much about security.

I can't find any clear specifications for the protocol. There must be something obvious I'm missing, but I don't know what it is.

Where can I start, or how do I know what should be sent to other nodes in order to request a block?

Thanks in advance.


Sorry if sound too stupid, it's just that I'm new to programming blockchain nodes and I don't know where to start...

2