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?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.