Store orphan block roots
This commit is contained in:
parent
c7f53a9062
commit
8752deeced
@ -573,6 +573,7 @@ impl<E: EthSpec, Hot: ItemStore<E>, Cold: ItemStore<E>> BackgroundMigrator<E, Ho
|
|||||||
StoreOp::DeleteBlock(block_root),
|
StoreOp::DeleteBlock(block_root),
|
||||||
StoreOp::DeleteExecutionPayload(block_root),
|
StoreOp::DeleteExecutionPayload(block_root),
|
||||||
StoreOp::DeleteBlobs(block_root),
|
StoreOp::DeleteBlobs(block_root),
|
||||||
|
StoreOp::PutOrphanedBlobs(block_root),
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
.chain(
|
.chain(
|
||||||
|
@ -822,6 +822,12 @@ impl<E: EthSpec, Hot: ItemStore<E>, Cold: ItemStore<E>> HotColdDB<E, Hot, Cold>
|
|||||||
let key = get_key_for_col(DBColumn::ExecPayload.into(), block_root.as_bytes());
|
let key = get_key_for_col(DBColumn::ExecPayload.into(), block_root.as_bytes());
|
||||||
key_value_batch.push(KeyValueStoreOp::DeleteKey(key));
|
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)
|
Ok(key_value_batch)
|
||||||
@ -862,6 +868,8 @@ impl<E: EthSpec, Hot: ItemStore<E>, Cold: ItemStore<E>> HotColdDB<E, Hot, Cold>
|
|||||||
StoreOp::DeleteState(_, _) => (),
|
StoreOp::DeleteState(_, _) => (),
|
||||||
|
|
||||||
StoreOp::DeleteExecutionPayload(_) => (),
|
StoreOp::DeleteExecutionPayload(_) => (),
|
||||||
|
|
||||||
|
StoreOp::PutOrphanedBlobs(_) => (),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -158,6 +158,7 @@ pub enum StoreOp<'a, E: EthSpec> {
|
|||||||
PutBlock(Hash256, Arc<SignedBeaconBlock<E>>),
|
PutBlock(Hash256, Arc<SignedBeaconBlock<E>>),
|
||||||
PutState(Hash256, &'a BeaconState<E>),
|
PutState(Hash256, &'a BeaconState<E>),
|
||||||
PutBlobs(Hash256, Arc<BlobsSidecar<E>>),
|
PutBlobs(Hash256, Arc<BlobsSidecar<E>>),
|
||||||
|
PutOrphanedBlobs(Hash256),
|
||||||
PutStateSummary(Hash256, HotStateSummary),
|
PutStateSummary(Hash256, HotStateSummary),
|
||||||
PutStateTemporaryFlag(Hash256),
|
PutStateTemporaryFlag(Hash256),
|
||||||
DeleteStateTemporaryFlag(Hash256),
|
DeleteStateTemporaryFlag(Hash256),
|
||||||
@ -177,6 +178,9 @@ pub enum DBColumn {
|
|||||||
BeaconBlock,
|
BeaconBlock,
|
||||||
#[strum(serialize = "blb")]
|
#[strum(serialize = "blb")]
|
||||||
BeaconBlob,
|
BeaconBlob,
|
||||||
|
/// Block roots of orphaned beacon blobs.
|
||||||
|
#[strum(serialize = "blbo")]
|
||||||
|
BeaconBlobOrphan,
|
||||||
/// For full `BeaconState`s in the hot database (finalized or fork-boundary states).
|
/// For full `BeaconState`s in the hot database (finalized or fork-boundary states).
|
||||||
#[strum(serialize = "ste")]
|
#[strum(serialize = "ste")]
|
||||||
BeaconState,
|
BeaconState,
|
||||||
|
Loading…
Reference in New Issue
Block a user