-
Notifications
You must be signed in to change notification settings - Fork 930
Persist only custody columns in db #8188
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
Changes from 5 commits
bd181a3
9fab592
aa64356
8c3ebaf
84a4c15
92f2e5a
1b6bf9b
f6fb3e5
cb74cce
47773f5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -3957,7 +3957,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> { | |||||
| // See https://github.com/sigp/lighthouse/issues/2028 | ||||||
| let (_, signed_block, block_data) = signed_block.deconstruct(); | ||||||
|
|
||||||
| match self.get_blobs_or_columns_store_op(block_root, block_data) { | ||||||
| match self.get_blobs_or_columns_store_op(block_root, signed_block.slot(), block_data) { | ||||||
| Ok(Some(blobs_or_columns_store_op)) => { | ||||||
| ops.push(blobs_or_columns_store_op); | ||||||
| } | ||||||
|
|
@@ -7163,6 +7163,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> { | |||||
| pub(crate) fn get_blobs_or_columns_store_op( | ||||||
| &self, | ||||||
| block_root: Hash256, | ||||||
| block_slot: Slot, | ||||||
| block_data: AvailableBlockData<T::EthSpec>, | ||||||
| ) -> Result<Option<StoreOp<'_, T::EthSpec>>, String> { | ||||||
| match block_data { | ||||||
|
|
@@ -7175,7 +7176,15 @@ impl<T: BeaconChainTypes> BeaconChain<T> { | |||||
| ); | ||||||
| Ok(Some(StoreOp::PutBlobs(block_root, blobs))) | ||||||
| } | ||||||
| AvailableBlockData::DataColumns(data_columns) => { | ||||||
| AvailableBlockData::DataColumns(mut data_columns) => { | ||||||
| let columns_to_custody = self.custody_columns_for_epoch(Some( | ||||||
| block_slot.epoch(T::EthSpec::slots_per_epoch()), | ||||||
| )); | ||||||
| // Supernodes need to persist all sampled custody columns | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
I would update in the comment the mention of supernode. In the future, nodes custodying >50% of columns and doing reconstruction may be supernodes? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is fine, supernode is explicitly defined here in the spec |
||||||
| if columns_to_custody.len() != self.spec.number_of_custody_groups as usize { | ||||||
| data_columns | ||||||
| .retain(|data_column| columns_to_custody.contains(&data_column.index)); | ||||||
| } | ||||||
| debug!( | ||||||
| %block_root, | ||||||
| count = data_columns.len(), | ||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.