I am developping a C# based node implementation.
But I am having a problem : Remote nodes send me addr messages with an invalid checksum. (Satoshi 0.9.0, from DNS Seed)
I think there is something I am missing, because I can correctly validate all checksum from message documented in
https://en.bitcoin.it/wiki/Protocol_specification I am taking the payload, calculate the double SHA256 and take the low 4 bytes, but my checksum does not match the one in the message header I get from the network. (I can validate other addr payload from the network that get only 3 or 4 entry)
You can verify by running the Test "CanRead1000Addresses" in the unit tests of
https://github.com/NicolasDorier/NBitcoinThe test messages I can validate from the protocol specification are in the unit test CanParseMessages.
Can someone verify if this message have the correct checksum ? Alternatively, is there a way to verify if the checksum is indeed correct without having to compile/run test of the bitcoin core implementation ?
One thing I also don't understand is why the node is sending me 1000 addresses, with 952 of them set to 000000000, instead of just 48.
The faulty message is this one :
https://github.com/NicolasDorier/NBitcoin/blob/master/NBitcoin.Tests/data/1000Addresses.txtAnd I receive a lot of such message, so I don't think the problem is only from a single node.