hnsd icon indicating copy to clipboard operation
hnsd copied to clipboard

Uncaught Exception while receiving invalid headers from a node.

Open Anunayj opened this issue 4 years ago • 1 comments

While Running the master (c4d0a9ffd823cd605c7ba8358982157071d64137) branch on a device today, I encountered this error:

chain (15998): adding block: 00000000000001620090cea3b412d19512989cadfc13643d424fc5608cdb4034
chain (15999):   added to main chain
chain (15999):   new height: 15999
chain (15999): adding block: 000000000000041a9be251ab14c46e664e7ded73253449167e631b101c1883aa
chain (16000):   added to main chain
chain (16000):   new height: 16000
peer 0 (139.162.183.168:44806): requesting more headers
peer 0 (139.162.183.168:44806): sending getheaders
pool: size: 2 active: 1
peer 3 (165.22.151.242:44806): connected
[libsecp256k1] illegal argument: !hsk_secp256k1_fe_is_zero(&ge->x)
Aborted

Which exited the process. I was able to reproduce it on the subsequent attempts where the crash happened when connecting to this node 165.22.151.242:44806.

Anunayj avatar Apr 09 '21 11:04 Anunayj

Funny, that is a node I run and also I've seen the same error when connecting to that same node. The node has 247 inbound connections and great uptime, I'm not sure what could be causing the error. Looking at libsecp256k1 this argument check is ensuring that that a "field element (fe) is not zero" -- it's hard to believe that my hsd node is "sometimes" (?) sending an invalid brontide key? This may be pretty hard to investigate.

pinheadmz avatar Apr 09 '21 12:04 pinheadmz