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

SSZ gen #13372

Open
yperbasis opened this issue Jan 10, 2025 · 1 comment
Open

SSZ gen #13372

yperbasis opened this issue Jan 10, 2025 · 1 comment
Labels
caplin imp2 Medium importance

Comments

@yperbasis
Copy link
Member

Similar to rlpgen, but for SSZ. Ideally we should be able to (de)serialize the same type both into RLP and SSZ, w/o translating between an RLP-specific type and an SSZ-specific type.

@yperbasis yperbasis added the imp2 Medium importance label Jan 10, 2025
@yperbasis
Copy link
Member Author

From Discord:
funnygiulio — Today at 11:51
i would like more details on what this means
[11:52]
this ticket seems to affect both RLP and SSZ

Andrew Ashikhmin — Today at 11:53
Say you have a simple structure, like Withdrawal. Then you can generate code that serializes & deserializes it into RLP (see #13341) and into SSZ.

Mark Holt — Today at 11:53
It means having a common marshalling system for types in erigon. So you can just do AsSSZ, or AsRLP on a type without needing to navigate several implementations - which have differing semantics.

funnygiulio — Today at 11:54
ooooh, yeah - there is a library that does codegen for that

Mark Holt — Today at 11:54
I think it becomes more important as we deal with additional implementations. For example we currently store all polygon types in the DB as json. The main motivation fro this is anything else is too complicated.

funnygiulio — Today at 11:54
i suggest this fork: https://github.com/prysmaticlabs/fastssz. (edited)

@mark Holt
I think it becomes more important as we deal with additional implementations. For example we currently store all polygon types in the DB as json. The main motivation fro this is anything else is too complicated.

funnygiulio — Today at 11:55
you can use gob
[11:55]
gob is built-in go
[11:55]
or cbor so that you can keep it compatible with silkworm. anyway json is the best if it is not too inneficient (edited)
[11:56]
so i personally do not see a problem with it

funnygiulio
i suggest this fork: https://github.com/prysmaticlabs/fastssz. (edited)

funnygiulio — Today at 11:58
back to this: this is a code-gen with faster merkelization than the main fastssz
[11:58]
https://github.com/karalabe/ssz there is also this but this is not codegen (edited)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
caplin imp2 Medium importance
Projects
None yet
Development

No branches or pull requests

1 participant