Advanced Appendix B: The Anatomy of a P2P Message
From TeachMeBitcoin, the free encyclopedia
Reading time: 1 min
22. Advanced Appendix B: The Anatomy of a P2P Message
When your node talks to another, they exchange binary messages. Understanding these is the key to network troubleshooting.
-
version: The first message. Contains your node's version and the current time. -
verack: The acknowledgment of the version. -
inv(Inventory): "I have these 5 new blocks and 100 new transactions. Do you want them?" -
getdata: "Yes, please send me block #840231." -
block: The actual raw block data.
☕ Help support TeachMeBitcoin
TeachMeBitcoin is an ad-free, open-source educational repository curated by a passionate team of Bitcoin researchers and educators for public benefit. If you found our articles helpful, please consider supporting our hosting and ongoing content updates with a clean donation:
Ethereum:
0x578417C51783663D8A6A811B3544E1f779D39A85
Bitcoin:
bc1q77k9e95rn669kpzyjr8ke9w95zhk7pa5s63qzz
Solana:
4ycT2ayqeMucixj3wS8Ay8Tq9NRDYRPKYbj3UGESyQ4J