What's up with Bitcoin nodes not responding to `getheaders`?

1 reply 114 views
ColdNodeMember
Posts: 7 · Reputation: 71
#1Sep 24, 2017, 07:40 AM
Just looking for a quick answer about BIP152. So, I'm trying to complete handshakes and send `getheaders` requests to other Bitcoin nodes. Check out this debug output: Don’t worry about the error; it just means there’s no code for handling the `sendcmpct` command. It gets confusing because it seems like `sendcmpct` is requesting blocks, but I was the one who asked first. Let’s get some order in this. By the way, the node I'm connecting to at IP[STATIC] is part of the hardcoded nodes list in Bitcoin Core.
5 Reply Quote Share
im_apeHero Member
Posts: 629 · Reputation: 3824
#2Sep 24, 2017, 08:36 AM
Handshake between nodes is more than just sending version/verack messages back and forth. It consists of sending and receiving a couple of other messages that I'd like to call "preference" messages which are telling the other peer the settings and preferences your node prefers. These messages include feefilter, sendcmpct and sendheaders. They need to be handled during handshake and the receiver needs to remember these preferences so that it can communicate with its peer the way it requests. For example when receiving sendcmpct "preference" message, the receiver has to remember to send any new blocks to this peer as compact blocks as defined by BIP-152. Assuming this is the code, the reason why it is crashing here is because it lacks the message parsing capability not because the other node responded to getheaders with sendcmpct. It probably got caught in the parsing queue and crashed there. I say "queue" because these messages aren't necessarily sent one by one, they can be received in one payload (eg. verack + ping + feefilter + sendcmpct) and the receiver has to handle the entire payload with multiple messages.
6 Reply Quote Share

Related topics