FourthState / plasma-mvp-sidechain

Cosmos SDK (Tendermint consensus) side-chain implementation for plasma
Apache License 2.0
112 stars 35 forks source link

Better Tx Decoder #169

Open hamdiallam opened 5 years ago

hamdiallam commented 5 years ago

Summary

The current Tx decoder brute forces decoding the tx with RLP

Proposal

Have transaction bytes encoded to a json format

{
 "type": "<msg name>",
 "tx": "<rlp bytes>"
}
hamdiallam commented 4 years ago

@colin-axner

do you think amino is an appropriate use case for this? Or use json directly.

I know amino effectively does this same thing for de-serializing types structs

colin-axner commented 4 years ago

Yea I think you could just wrap the RLP encoded bytes into a struct and register that type on the codec and it should work, but these extra bytes would be included into blocks then, so maybe not?

hamdiallam commented 4 years ago

Yeah, I realized this last night. I'll leave this until after the release