RLP zero should be 0x80
See original GitHub issueorg/kethereum/functions/rlp/RLPTestData.kt
0.toRLP() to "00"
but https://github.com/ethereum/tests/blob/develop/RLPTests/rlptest.json
"zero": {
"in": 0,
"out": "0x80"
}
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
RLP encoding of 0 (zero) as 0x80 #4284 - GitHub
"Deserialized positive integers with leading zeroes get treated as invalid. The integer representation of string length must also be encoded ...
Read more >RLP encoding of 0 - Ethereum Stack Exchange
Empty byte array has length < 56, so it's length is encoded as 0+128 which is 0x80 in hex. @bozzle as you quoted...
Read more >Recursive-length prefix (RLP) serialization - Ethereum.org
Otherwise, if a string is 0-55 bytes long, the RLP encoding consists of a single byte with value 0x80 (dec. 128) plus the...
Read more >Ethereum Under the Hood- Part 2 (RLP Encoding)-ver 0.3
Rule 2: When encoding a string (in byte array) that falls between 0 and 55 bytes apply the following logic. 0x80+length(string),string string " ......
Read more >rlp - Go Packages
Boolean values are encoded as the unsigned integers zero (false) and one (true). ... To decode into an unsigned integer type, the input...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Interestingly parity and web3j also resolves it to 0x00 —>
https://github.com/paritytech/parity-common/blob/master/rlp/tests/tests.rs#L237
and
https://github.com/web3j/web3j/blob/master/rlp/src/test/java/org/web3j/rlp/RlpEncoderTest.java#L70
some more context to this issue: https://github.com/ethereum/tests/pull/485