-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Store Blinded Beacon Blocks by Default for New Prysm Databases #11591
Conversation
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.
Has this been run in our infrastructure? Has it been run in prod?
Can you add the design doc link to the description, if you have one?
|
||
var migrationBlindedBeaconBlocksKey = []byte("blinded-beacon-blocks-enabled") | ||
|
||
func migrateBlindedBeaconBlocksEnabled(ctx context.Context, db *bolt.DB) error { |
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.
How do users opt-in to this feature with an old database without a migration?
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.
It is far too error prone to create a full migration logic, as it is expensive and slow. Instead, we are only enabling this for new databases. Thankfully, checkpoint sync exists and helps us quickly resync if users want to leverage this feature and reduce their disk use
beacon-chain/db/kv/blocks.go
Outdated
var encodedBlock []byte | ||
var err error | ||
blockToSave := blk | ||
if features.Get().EnableOnlyBlindedBeaconBlocks { | ||
if saveBlindedBlocks { |
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.
I set this if branch to always be true and no tests failed. Are you sure you have enough test coverage on marshalBlock with this new functionality?
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.
After refactoring, confirmed we now have have coverage in both branches. It has been split into two functions and we now have them covered
Blocking until we can test in Capella devnets / current testnets / and mainnet as it changes default behavior for Prysm |
PTAL again @prestonvanloon if you have some time |
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.
LGTM
This doc is inaccessible to people outside your Notion org. Would it be possible to open it up or somehow share the contents? |
This PR sets up new Prysm beacon node databases to store blocks in blinded format, which is far better for long-term storage requirements of Prysm. There is no need to store full execution payloads when these can be retrieved from the execution client at anytime. This PR aims to be minimally disruptive to existing Prysm users and does not require a database migration.
We estimate savings of at least 150Gb from using this feature with geth nodes
A design document for this PR along with trade-offs is linked here
Here are the invariants we enforce, and each is covered by a unit test.
Existing Databases
--save-full-execution-payloads
flag, we throw an error and fail to start the node. We point the user to resync if desired and recommend checkpoint syncNew Databases
--save-full-execution-payloads
flag is enabled, we store full beacon blocks