diff --git a/beacon_node/beacon_chain/src/migrate.rs b/beacon_node/beacon_chain/src/migrate.rs index 3ef0b265a..4aa55f404 100644 --- a/beacon_node/beacon_chain/src/migrate.rs +++ b/beacon_node/beacon_chain/src/migrate.rs @@ -573,6 +573,7 @@ impl, Cold: ItemStore> BackgroundMigrator, Cold: ItemStore> HotColdDB let key = get_key_for_col(DBColumn::ExecPayload.into(), block_root.as_bytes()); key_value_batch.push(KeyValueStoreOp::DeleteKey(key)); } + + StoreOp::PutOrphanedBlobs(block_root) => { + let db_key = + get_key_for_col(DBColumn::BeaconBlobOrphan.into(), block_root.as_bytes()); + key_value_batch.push(KeyValueStoreOp::PutKeyValue(db_key, [].into())); + } } } Ok(key_value_batch) @@ -862,6 +868,8 @@ impl, Cold: ItemStore> HotColdDB StoreOp::DeleteState(_, _) => (), StoreOp::DeleteExecutionPayload(_) => (), + + StoreOp::PutOrphanedBlobs(_) => (), } } diff --git a/beacon_node/store/src/lib.rs b/beacon_node/store/src/lib.rs index e1b2c948a..7d244f5ae 100644 --- a/beacon_node/store/src/lib.rs +++ b/beacon_node/store/src/lib.rs @@ -158,6 +158,7 @@ pub enum StoreOp<'a, E: EthSpec> { PutBlock(Hash256, Arc>), PutState(Hash256, &'a BeaconState), PutBlobs(Hash256, Arc>), + PutOrphanedBlobs(Hash256), PutStateSummary(Hash256, HotStateSummary), PutStateTemporaryFlag(Hash256), DeleteStateTemporaryFlag(Hash256), @@ -177,6 +178,9 @@ pub enum DBColumn { BeaconBlock, #[strum(serialize = "blb")] BeaconBlob, + /// Block roots of orphaned beacon blobs. + #[strum(serialize = "blbo")] + BeaconBlobOrphan, /// For full `BeaconState`s in the hot database (finalized or fork-boundary states). #[strum(serialize = "ste")] BeaconState,