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

write uncompressed validator keys to database #2639

Merged
merged 3 commits into from
Jun 10, 2021
Merged

write uncompressed validator keys to database #2639

merged 3 commits into from
Jun 10, 2021

Conversation

arnetheduck
Copy link
Member

Loading 150k+ validator keys on startup in compressed format takes a lot
of time - better store them in uncompressed format which makes behaviour
just after startup faster / more predictable.

  • refactor cached validator key access
  • fix isomorphic cast to work with non-var instances
  • remove cooked pubkey cache - directly use database cache in chaindag
    as well (one less cache to keep in sync)

Loading 150k+ validator keys on startup in compressed format takes a lot
of time - better store them in uncompressed format which makes behaviour
just after startup faster / more predictable.

* refactor cached validator key access
* fix isomorphic cast to work with non-var instances
* remove cooked pubkey cache - directly use database cache in chaindag
as well (one less cache to keep in sync)
pubkey: val.pubkey.load().get().toUncompressed(),
withdrawal_credentials: val.withdrawal_credentials
))
immutableValidatorsDb1.close()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worthwhile to at some point clean up the old table from the database?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not as long as we want to maintain downgrade compatibility (or it won't be able to read the old states)

@github-actions
Copy link

github-actions bot commented Jun 9, 2021

Unit Test Results

     28 files  ±0     328 suites  ±0   17m 2s ⏱️ ±0s
   628 tests ±0     610 ✔️ ±0    18 💤 ±0  0 ❌ ±0 
3 440 runs  ±0  3 336 ✔️ ±0  104 💤 ±0  0 ❌ ±0 

Results for commit d859bc1. ± Comparison against base commit d859bc1.

♻️ This comment has been updated with latest results.

@zah zah merged commit d859bc1 into unstable Jun 10, 2021
@zah zah deleted the db-cache branch June 10, 2021 07:37
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.

None yet

3 participants