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

Temp Check: SSZ #21

Open
itsdevbear opened this issue Mar 6, 2024 · 5 comments
Open

Temp Check: SSZ #21

itsdevbear opened this issue Mar 6, 2024 · 5 comments

Comments

@itsdevbear
Copy link

@fjl are you open to adding SSZ here?

I can implement.

@itsdevbear
Copy link
Author

can either homeroll or use fastssz

@fjl
Copy link
Owner

fjl commented Mar 6, 2024

Yeah, why not. Question is mostly, how it will be done. Does fastssz support encoding by reflection?

@fjl
Copy link
Owner

fjl commented Mar 6, 2024

Looking at fastssz, it doesn't seem so easy. ssz.Marshal expects a Marshaler as argument, which is supposed to perform the encoding and also should be able to compute the encoded size. So I guess your idea would be to generate a Marshaler implementation? Then you're basically reimplementing the sszgen tool.

@fjl
Copy link
Owner

fjl commented Mar 6, 2024

The main purpose of gencodec is features such as 'required fields' and the 'override type'. If you need these, I think you'd be much better off just implementing them in sszgen.

@itsdevbear
Copy link
Author

@fjl we are playing around with something internally, will share our findings in the next couple weeks

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

2 participants