althea-net / serde-rlp

Ethereum's RLP encoding implemented as a Serde data format
Apache License 2.0
13 stars 10 forks source link

Deserialize data #9

Closed mpapierski closed 6 years ago

mpapierski commented 6 years ago

This is required to implement althea-mesh/clarity#14 where test fixtures contains raw "RLP" data and it should be compared both ways i.e. compare deserialized RLP with the "filler" values (svr, data, value, gas, etc.), and serialize RLP based on the filler values (this is done as serialization works well).

There are many strange corner cases, and rust's checked arithmetic made complicated to handle few cases, but I believe it would work for our purpose.

There are quite a few test cases for decoder including wrong & valid serialized Eth transactions.