Skip to content

core/types: add SSZ encoders/decoders for BAL types from EIP 7928 #31948

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jwasinger
Copy link
Contributor

@jwasinger jwasinger commented Jun 2, 2025

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.Hash and common.Address where 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.

@jwasinger jwasinger closed this Jun 2, 2025
@jwasinger jwasinger reopened this Jun 3, 2025
@jwasinger jwasinger changed the title core/types: add SSZ codec for BAL types from EIP 7928 core/types: add SSZ encoders/decoders for BAL types from EIP 7928 Jun 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant