flow-go-sdk icon indicating copy to clipboard operation
flow-go-sdk copied to clipboard

RLP Implementation

Open devbugging opened this issue 3 years ago • 3 comments

Currently, the SDK uses RLP implementation from go-ethereum package which is huge!. I believe we would benefit from implementing RLP ourselves since that big dependency would be removed. Also RLP is something that wouldn't change.

devbugging avatar Oct 19 '21 08:10 devbugging

There has been some work done for RLP integration in flow-go https://github.com/onflow/flow-go/pull/2011 Keep an 👁️ on it

devbugging avatar Feb 23 '22 14:02 devbugging

I agree with you 100%, from a performance perspective. RLP only requires about 8 code files, plus tests.

In addition to the heap thrashing addressed in https://github.com/onflow/flow-go/pull/2011, the use of reflection and heap for walking the object graph is worth avoiding. Other forums online have suggested creating a kind of IDL -- a parser that will generate the appropriate code for generating struct and data object graph serialization. It's actually not hard to do, so it's on the radar. It would be much better if RLP code were forked (or appropriated somehow) to make this happen.

jwinkler2083233 avatar Feb 23 '22 18:02 jwinkler2083233

Is there any plan in the flow-go to do that? The forking/our implementation?

devbugging avatar Feb 24 '22 08:02 devbugging