I am reading through the wiki on RLP (https://github.com/ethereum/wiki/wiki/RLP) and think I am missing something fundamental.

For byte arrays (not lists) greater than 55 bytes, the RLP encoding is 0xb7 plus the length in bytes of the byte array in binary form, plus the length of the byte array plus the byte array.

Is there a difference between the length in binary form and the length in general? I would assume they are the same? Is this a typo, or am I missing something fundamental?

The wiki actually uses the term string instead of byte array, but since they are interchangable I though it more suitable.

1 Answer 1


It is just once the length of the byte array - the wiki describes it a bit confusing. Better look at the yellowpaper PDF (appendix RLP):


Or an implementation: https://github.com/walleth/kethereum/blob/master/rlp/src/main/java/org/kethereum/functions/rlp/RLPFun.kt#L24

  • Nice little bit of sunday reading :)
    – jojeyh
    Nov 19, 2017 at 16:27
  • Enjoy - and always happy about constructive comments of the kotlin implementation
    – ligi
    Nov 19, 2017 at 16:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.