beacon, eth: null for missing cell

This commit is contained in:
healthykim 2026-06-10 01:40:10 +02:00
parent 8389557759
commit 4fbdd4c189
2 changed files with 8 additions and 6 deletions

View file

@ -158,8 +158,8 @@ type BlobAndProofV2 struct {
} }
type BlobCellsAndProofsV1 struct { type BlobCellsAndProofsV1 struct {
BlobCells []hexutil.Bytes `json:"blob_cells"` BlobCells []*hexutil.Bytes `json:"blob_cells"`
Proofs []hexutil.Bytes `json:"proofs"` Proofs []*hexutil.Bytes `json:"proofs"`
} }
// JSON type overrides for ExecutionPayloadEnvelope. // JSON type overrides for ExecutionPayloadEnvelope.

View file

@ -709,16 +709,18 @@ func (api *ConsensusAPI) GetBlobsV4(hashes []common.Hash, indicesBitarray types.
continue continue
} }
hitCount++ hitCount++
blobCells := make([]hexutil.Bytes, len(cells[i])) blobCells := make([]*hexutil.Bytes, len(cells[i]))
for j, cell := range cells[i] { for j, cell := range cells[i] {
if cell != nil { if cell != nil {
blobCells[j] = cell[:] b := hexutil.Bytes(cell[:])
blobCells[j] = &b
} }
} }
blobProofs := make([]hexutil.Bytes, len(proofs[i])) blobProofs := make([]*hexutil.Bytes, len(proofs[i]))
for j, proof := range proofs[i] { for j, proof := range proofs[i] {
if proof != nil { if proof != nil {
blobProofs[j] = proof[:] b := hexutil.Bytes(proof[:])
blobProofs[j] = &b
} }
} }
res[i] = &engine.BlobCellsAndProofsV1{ res[i] = &engine.BlobCellsAndProofsV1{