-
Notifications
You must be signed in to change notification settings - Fork 786
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
[Merged by Bors] - Optimise slasher DB layout and switch to MDBX #2776
[Merged by Bors] - Optimise slasher DB layout and switch to MDBX #2776
Conversation
I've just pushed a commit that shrinks the attester records even further to a mere 6 bytes! This means that our attesters table is now 13 bytes per entry rather than 80! 🎉 There seems to be a slight hit to batch processing time, as we now have to load indexed attestations to check for double votes in the case where we process two distinct indexed attestations for the same validator. This shouldn't occur too often anymore because of de-duplication, and I've added the I'm going to observe the performance and storage growth over a longer period before marking this ready for review |
f94079f
to
9eed024
Compare
Threw an LRU cache in there to reduce the number of unnecessary reads. It hasn't impacted total running time as much as I thought, but it's still looking pretty low, and the slasher seems to settle into its happy path sooner after start up. |
aee885e
to
73c34e7
Compare
53cb4db
to
b59bf47
Compare
b59bf47
to
87ab60b
Compare
This is ready for review and merge (although I understand we may want to prioritise merging Kintsugi) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, I couldn't fault it! 🚀
Glorious! Thank you!! bors r+ |
## Issue Addressed Closes #2286 Closes #2538 Closes #2342 ## Proposed Changes Part II of major slasher optimisations after #2767 These changes will be backwards-incompatible due to the move to MDBX (and the schema change) 😱 * [x] Shrink attester keys from 16 bytes to 7 bytes. * [x] Shrink attester records from 64 bytes to 6 bytes. * [x] Separate `DiskConfig` from regular `Config`. * [x] Add configuration for the LRU cache size. * [x] Add a "migration" that deletes any legacy LMDB database.
Build failed (retrying...): |
Fixing up some Rust 1.57.0 lints |
Canceled. |
Let's try again bors r+ |
## Issue Addressed Closes #2286 Closes #2538 Closes #2342 ## Proposed Changes Part II of major slasher optimisations after #2767 These changes will be backwards-incompatible due to the move to MDBX (and the schema change) 😱 * [x] Shrink attester keys from 16 bytes to 7 bytes. * [x] Shrink attester records from 64 bytes to 6 bytes. * [x] Separate `DiskConfig` from regular `Config`. * [x] Add configuration for the LRU cache size. * [x] Add a "migration" that deletes any legacy LMDB database.
Pull request successfully merged into unstable. Build succeeded: |
Issue Addressed
Closes #2286
Closes #2538
Closes #2342
Proposed Changes
Part II of major slasher optimisations after #2767
These changes will be backwards-incompatible due to the move to MDBX (and the schema change) 😱
DiskConfig
from regularConfig
.