Fix rebase conflicts

This commit is contained in:
Emilia Hane 2023-02-01 17:55:24 +01:00
parent 72cd68c0a4
commit ca934b7cb5
No known key found for this signature in database
GPG Key ID: E73394F9C09206FA
3 changed files with 13 additions and 4 deletions

View File

@ -218,7 +218,10 @@ impl BlockId {
chain: &BeaconChain<T>, chain: &BeaconChain<T>,
) -> Result<Arc<BlobsSidecar<T::EthSpec>>, warp::Rejection> { ) -> Result<Arc<BlobsSidecar<T::EthSpec>>, warp::Rejection> {
let root = self.root(chain)?.0; let root = self.root(chain)?.0;
match chain.get_blobs(&root) { let Some(data_availability_boundary) = chain.data_availability_boundary() else {
return Err(warp_utils::reject::custom_not_found("Eip4844 fork disabled".into()));
};
match chain.get_blobs(&root, data_availability_boundary) {
Ok(Some(blob)) => Ok(Arc::new(blob)), Ok(Some(blob)) => Ok(Arc::new(blob)),
Ok(None) => Err(warp_utils::reject::custom_not_found(format!( Ok(None) => Err(warp_utils::reject::custom_not_found(format!(
"Blob with block root {} is not in the store", "Blob with block root {} is not in the store",

View File

@ -237,11 +237,15 @@ impl<E: EthSpec> HotColdDB<E, LevelDB<E>, LevelDB<E>> {
if let Some(path) = blobs_db_path { if let Some(path) = blobs_db_path {
let new_blob_info = if open_blobs_db { let new_blob_info = if open_blobs_db {
db.blobs_db = Some(LevelDB::open(path.as_path())?); db.blobs_db = Some(LevelDB::open(path.as_path())?);
Some(BlobInfo { blobs_db: true }) let mut new_blob_info = blob_info.clone().unwrap_or_default();
new_blob_info.blobs_db = true;
new_blob_info
} else { } else {
Some(BlobInfo { blobs_db: false }) let mut new_blob_info = blob_info.clone().unwrap_or_default();
new_blob_info.blobs_db = false;
new_blob_info
}; };
db.compare_and_set_blob_info_with_write(blob_info, new_blob_info)?; db.compare_and_set_blob_info_with_write(blob_info, Some(new_blob_info))?;
info!( info!(
db.log, db.log,
"Blobs DB initialized"; "Blobs DB initialized";

View File

@ -126,6 +126,8 @@ pub struct BlobInfo {
pub oldest_blob_slot: Option<Slot>, pub oldest_blob_slot: Option<Slot>,
/// A separate blobs database is in use. /// A separate blobs database is in use.
pub blobs_db: bool, pub blobs_db: bool,
/// The slot after which blobs are available (>=).
pub oldest_blob_slot: Option<Slot>,
} }
impl StoreItem for BlobInfo { impl StoreItem for BlobInfo {