Merge branch 'gloas-containers' into gloas-envelope-processing

This commit is contained in:
Mark Mackey
2025-11-28 14:40:55 -06:00
101 changed files with 3693 additions and 3689 deletions

View File

@@ -649,9 +649,15 @@ impl<E: EthSpec, Hot: ItemStore<E>, Cold: ItemStore<E>> HotColdDB<E, Hot, Cold>
.inspect(|cache| cache.lock().put_block(*block_root, full_block.clone()));
DatabaseBlock::Full(full_block)
} else if !self.config.prune_payloads {
} else if !self.config.prune_payloads || *block_root == split.block_root {
// If payload pruning is disabled there's a chance we may have the payload of
// this finalized block. Attempt to load it but don't error in case it's missing.
//
// We also allow for the split block's payload to be loaded *if it exists*. This is
// necessary on startup when syncing from an unaligned checkpoint (a checkpoint state
// at a skipped slot), and then loading the canonical head (with payload). If we modify
// payload pruning in future so that it doesn't prune the split block's payload, then
// this case could move to the case above where we error if the payload is missing.
let fork_name = blinded_block.fork_name(&self.spec)?;
if let Some(payload) = self.get_execution_payload(block_root, fork_name)? {
DatabaseBlock::Full(
@@ -1308,8 +1314,13 @@ impl<E: EthSpec, Hot: ItemStore<E>, Cold: ItemStore<E>> HotColdDB<E, Hot, Cold>
state_root.as_slice().to_vec(),
));
if let Some(slot) = slot {
match self.hot_storage_strategy(slot)? {
// NOTE: `hot_storage_strategy` can error if there are states in the database
// prior to the `anchor_slot`. This can happen if checkpoint sync has been
// botched and left some states in the database prior to completing.
if let Some(slot) = slot
&& let Ok(strategy) = self.hot_storage_strategy(slot)
{
match strategy {
StorageStrategy::Snapshot => {
// Full state stored in this position
key_value_batch.push(KeyValueStoreOp::DeleteKey(