Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: piotr_n on December 18, 2016, 10:34:45 AM



Title: 5 bytes long sendcmpct message
Post by: piotr_n on December 18, 2016, 10:34:45 AM
Recently I see more and more nodes, introducing themselves as "/Satoshi:0.13.1/" but sending me sendcmpct message that is only 5 bytes long.

Can anyone say if they are legitimate bitcoin core nodes, or just some other stuff pretending to be the latest release of core?

What shall I do with sendcmpct message that carry only 5 bytes of data?

Some example logs below

Code:
42314 139.59.208.241:8333 /Satoshi:0.13.1/ sendcmpct 0002000000
42314 139.59.208.241:8333 /Satoshi:0.13.1/ sendcmpct 0001000000
42453 46.101.99.121:8333 /Satoshi:0.13.1/ sendcmpct 0002000000
42453 46.101.99.121:8333 /Satoshi:0.13.1/ sendcmpct 0001000000
42454 46.101.99.121:8333 /Satoshi:0.13.1/ sendcmpct 0002000000
42454 46.101.99.121:8333 /Satoshi:0.13.1/ sendcmpct 0001000000
42698 138.68.66.47:8333 /Satoshi:0.13.1/ sendcmpct 0002000000
42698 138.68.66.47:8333 /Satoshi:0.13.1/ sendcmpct 0001000000
42866 139.59.209.199:8333 /Satoshi:0.13.1/ sendcmpct 0002000000
42866 139.59.209.199:8333 /Satoshi:0.13.1/ sendcmpct 0001000000
42923 46.101.109.46:8333 /Satoshi:0.13.1/ sendcmpct 0002000000
42923 46.101.109.46:8333 /Satoshi:0.13.1/ sendcmpct 0001000000
43048 139.59.157.246:8333 /Satoshi:0.13.1/ sendcmpct 0002000000
43048 139.59.157.246:8333 /Satoshi:0.13.1/ sendcmpct 0001000000
43513 138.68.64.28:8333 /Satoshi:0.13.1/ sendcmpct 0002000000
43513 138.68.64.28:8333 /Satoshi:0.13.1/ sendcmpct 0001000000
43788 46.101.228.246:8333 /Satoshi:0.13.1/ sendcmpct 0002000000
43788 46.101.228.246:8333 /Satoshi:0.13.1/ sendcmpct 0001000000
43997 139.59.208.241:8333 /Satoshi:0.13.1/ sendcmpct 0002000000
43997 139.59.208.241:8333 /Satoshi:0.13.1/ sendcmpct 0001000000
44088 188.166.161.228:8333 /Satoshi:0.13.1/ sendcmpct 0002000000
44088 188.166.161.228:8333 /Satoshi:0.13.1/ sendcmpct 0001000000


Title: Re: 5 bytes long sendcmpct message
Post by: ScripterRon on December 18, 2016, 02:21:43 PM
My code rejects the message since it is too short (message decode fails)


Title: Re: 5 bytes long sendcmpct message
Post by: piotr_n on December 18, 2016, 02:27:20 PM
My code rejects the message since it is too short (message decode fails)

Yes, mine too.

But maybe it shouldn't?


Title: Re: 5 bytes long sendcmpct message
Post by: achow101 on December 18, 2016, 04:55:28 PM
My code rejects the message since it is too short (message decode fails)

Yes, mine too.

But maybe it shouldn't?
I think it should be failing. sendcmpct is supposed to be 9 bytes (1 byte boolean 8 byte uint64).

My guess is that someone wrote their own node software, set the user agent to be /Satoshi:0.13.1/ for some reason, and then did not realize that the version integer is uint64 instead of uint32.


Title: Re: 5 bytes long sendcmpct message
Post by: chjj on December 19, 2016, 06:36:54 AM
Been seeing this as well. Very strange. My code just ignores the compact block functionality and increases ban score by 10 (I actually do this for any message that fails parsing).