3

I am trying to generate a simple hello packet for handshaking with a remote Ethereum client using the encode method from the rlp library.

from rlp import encode

hello = bytearray(encode([0x00, 4, "cVersion", [["eth", 63], ["eth", 62], ["eth", 61]], myIntegerPortNumberHere, "0c00000d0a00051bb4b8f983c142eecf7d43e65c69b23cdbc908ddcd0cdc786b"]))

Could you tell me if this format complies with the specified protocol? Or, if it is broken, could you show me an example encoding for hello packet in Python.

Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.