erigon icon indicating copy to clipboard operation
erigon copied to clipboard

rlp: keep only one lib

Open yperbasis opened this issue 1 year ago • 2 comments

Current state:

  • We have low-level functions in erigon-lib/rlp and rlp libs (historically). Target is to use only rlp package.
  • We have tx and txpool/tx types (2-nd is subset of 1st).

ToDo:

  • [x] low-level functions in rlp. Added: ReadBytes, MoreDataInList. By https://github.com/erigontech/erigon/pull/16036 and https://github.com/erigontech/erigon/pull/16067
  • [x] unused new RLP package erigon-lib/rlp2. removed.
  • [ ] Move TxPool to use tx type (it will automatically use rlp package)
  • [ ] Add rlpgen from geth (see #11116) - but we must change it - to adopt for existing Erigon's codebase. Don't loose our improvements. Rlpgen itself is small - likely easy to change.
  • [ ] rlpgen inhereted
  • [ ] Get inspiration from Silkworm's RLP code
  • [ ] Get inspiration from MarshalJSONTo(*jsontext.Encoder) error https://go.dev/blog/jsonv2-exp
  • [x] merge erigon-lib module into Erigon

yperbasis avatar Sep 06 '24 11:09 yperbasis

another thing I would like to add is to add the ability to implement reusable buffers

Giulio2002 avatar Sep 06 '24 19:09 Giulio2002

TODO: merge rlp/encode.go & rlp/encode2.go.

yperbasis avatar Dec 08 '25 13:12 yperbasis