Hi, I found that RLP decoding fails when parsing long encoded string, so I modified the eth_rlp_len function and unit-tested it with an EIP-1559 transaction. It seems to be working fine.
But there are two things I'm not sure about:
In eth_rlp_array and eth_rlp_bytes, the checking of base values is removed. Maybe the better way is to check all possible values?
In eth_rlp_hex and eth_rlp_uint8/16/32/64, the default value of 0 is returned when blen is 0 (i.e. 0x80).
Besides, a free issue that could lead to memory leaks is fixed.
Please review the PR and feel free to comment. I'll fix it as soon as possible.
Hi, I found that RLP decoding fails when parsing long encoded string, so I modified the
eth_rlp_len
function and unit-tested it with an EIP-1559 transaction. It seems to be working fine.But there are two things I'm not sure about:
eth_rlp_array
andeth_rlp_bytes
, the checking of base values is removed. Maybe the better way is to check all possible values?eth_rlp_hex
andeth_rlp_uint8/16/32/64
, the default value of 0 is returned whenblen
is 0 (i.e.0x80
).Besides, a free issue that could lead to memory leaks is fixed.
Please review the PR and feel free to comment. I'll fix it as soon as possible.