Skip to content
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

Dynamic struct tags to support different chain specifications #177

Open
pinebit opened this issue Aug 15, 2024 · 0 comments
Open

Dynamic struct tags to support different chain specifications #177

pinebit opened this issue Aug 15, 2024 · 0 comments

Comments

@pinebit
Copy link
Contributor

pinebit commented Aug 15, 2024

For some chains like Gnosis, different field specs are defined (example).
A notable example is

Withdrawals   []*Withdrawal ssz-max:"16"`

which has ssz-max=16 for Ethereum networks and ssz-max=8 for Gnosis (yet there are other differences). This changes serialization and hashing results, which makes derived products not supporting chains other than Ethereum.

Is there a workaround for such the specific chains (Gnosis)?
The only viable option as it seems is to build two/three/more copies of objects (structs) having different struct attributes..

Other projects (Lodestar, Teku..) do support this. Here is how the above example is handled by Teku: https://github.com/Consensys/teku/blob/777c9dc7bbaa2f563e870b5fa277e48472e234ae/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/execution/versions/capella/ExecutionPayloadSchemaCapella.java#L104

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

No branches or pull requests

1 participant