Skip to content

Conversation

@pk910
Copy link
Contributor

@pk910 pk910 commented Sep 23, 2025

WIP - just for vibe check ;)

This PR changes the code generator for ssz code to dynamic-ssz.
The dynamic-ssz code generator is reflection based, which comes with major advantages for type resolution as the go linker does all the heavy work.
The disadvantage of this architecture is, that we need a bunch of codegen.go files that reference the types and are used to generate appropriate ssz code on execution.

The code generated by dynamic-ssz is currently slightly slower than the code generated by fastssz.
This is mainly coming from call overheads due to the dynamic function approach that the dynssz lib uses. I'm working on flattening the code to resolve this issue.

Biggest benefit of switching to the dynssz codegen: no more pre- and post work to get the damn ssz code generated. The code generator just works out of the box 🎉. It uses types properly and does not require manual edits, which is a huge pain with the existing fastssz code generator.

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