You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When sending a P2P message to another node, a simple but easily missable step is that besides encoding the data for the message itself,
you need to also encode the code assigned to the message. For example, the P2P message "getAccountRange", has code 0x21, which needs to be encoded alongside the data it sends. Currently, this code encoding is done a bit 'manually', like in this example.
It would be better to have a centralized way (a function plus a match, maybe) to add said codes when encoding the messages, or maybe add it to the RLPxEncode trait itself.
The text was updated successfully, but these errors were encountered:
When sending a P2P message to another node, a simple but easily missable step is that besides encoding the data for the message itself,
you need to also encode the code assigned to the message. For example, the P2P message "getAccountRange", has code 0x21, which needs to be encoded alongside the data it sends. Currently, this code encoding is done a bit 'manually', like in this example.
It would be better to have a centralized way (a function plus a match, maybe) to add said codes when encoding the messages, or maybe add it to the RLPxEncode trait itself.
The text was updated successfully, but these errors were encountered: