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

Don't serialize immutable Validator data #228

Open
dapplion opened this issue Jan 18, 2022 · 0 comments
Open

Don't serialize immutable Validator data #228

dapplion opened this issue Jan 18, 2022 · 0 comments

Comments

@dapplion
Copy link
Contributor

Nimbus uses a very nice optimization that we should implement too:

When serializing state, don't serialize + deserialize Validator object fields withdrawal_credentials and pubkey. Instead store this data is a separate global append-only list.

  • Reduce disk size usage significantly
  • Reduce serialization + de-serialization time by +50%
  • Ensure data de-duplication when doing regen

To implement in SSZ, Container type must have some option to exclude certain fields from serialization. Then after reading the state, all validator object values must be iterated and mutated to append the immutable properties.

Nimbus references:

WIP branch

@dapplion dapplion removed their assignment Jul 11, 2022
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