go-ethereum
go-ethereum copied to clipboard
core/types: add SSZ encoders/decoders for BAL types from EIP 7928
This adds the SSZ types in the EIP and also adds encoder/decoder generation using https://github.com/ferranbt/fastssz.
There are a couple of issues so far:
- I cannot use out-of-package types in the encoder types. This means that I cannot re-use common go-ethereum types like
common.Hashandcommon.Addresswhere they should be used. - I cannot specify tags on type declarations. Defining ssz max elements for arrays is done this way. This means that for standalone array types, this means we will have to write custom encoders which respect the max sizes defined in the EIP.