merge upstream, add back get_blobs logic

This commit is contained in:
realbigsean
2023-02-13 16:29:21 -05:00
parent c6dfa7a1ac
commit 28702c9d5d
20 changed files with 434 additions and 130 deletions

View File

@@ -218,7 +218,10 @@ impl BlockId {
chain: &BeaconChain<T>,
) -> Result<Arc<BlobsSidecar<T::EthSpec>>, warp::Rejection> {
let root = self.root(chain)?.0;
match chain.store.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(None) => Err(warp_utils::reject::custom_not_found(format!(
"Blob with block root {} is not in the store",