What is the minimum amount of network messaging needed to get the latest block hash from a node?

1

Reference: https://en.bitcoin.it/wiki/Protocol_documentation#inv

I want to be able to write the simplest possible script that is able to contact a Bitcoin full node (given it's IP and port) and get the latest block hash.

I don't need to verify blocks or send transactions or even be a good peer.

Are the messages all http? And how many messages (handshake? Network magic bytes? Service bits?) are required to get to the point where I can get useful information?

pinhead

Posted 2017-10-12T01:15:56.657

Reputation: 2 356

No answers