Deprecated since Fusaka
(kvIndex uint64, kzgCommitment []byte, blobHash common.Hash)
| 197 | |
| 198 | // Deprecated since Fusaka |
| 199 | func (a *API) buildSidecar(kvIndex uint64, kzgCommitment []byte, blobHash common.Hash) (*BlobSidecar, *httpError) { |
| 200 | blobData, found, err := a.storageMgr.TryRead(kvIndex, int(a.storageMgr.MaxKvSize()), blobHash) |
| 201 | if err != nil { |
| 202 | a.lg.Error("Failed to read blob", "err", err) |
| 203 | return nil, errServerError |
| 204 | } |
| 205 | if !found { |
| 206 | a.lg.Info("Blob not found by storage manager", "kvIndex", kvIndex, "blobHash", blobHash) |
| 207 | return nil, errBlobNotInES |
| 208 | } |
| 209 | blob := kzg4844.Blob(blobData) |
| 210 | kzgProof, err := kzg4844.ComputeBlobProof(&blob, kzg4844.Commitment(kzgCommitment)) |
| 211 | if err != nil { |
| 212 | a.lg.Error("Failed to get kzg proof", "err", err) |
| 213 | return nil, errServerError |
| 214 | } |
| 215 | return &BlobSidecar{ |
| 216 | Blob: [blobs.BlobLength]byte(blobData), |
| 217 | KZGCommitment: [48]byte(kzgCommitment), |
| 218 | KZGProof: [48]byte(kzgProof), |
| 219 | }, nil |
| 220 | } |
no test coverage detected