From 497b96f5b78fcde9d95a138c961a47ec2284defc Mon Sep 17 00:00:00 2001 From: Csaba Kiraly Date: Wed, 3 Sep 2025 12:18:06 +0200 Subject: [PATCH 1/4] core/txpool/blobpool: handle more errors internally on getblobsv1 Signed-off-by: Csaba Kiraly --- core/txpool/blobpool/blobpool.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/core/txpool/blobpool/blobpool.go b/core/txpool/blobpool/blobpool.go index 68ea5576336f..612529e55e82 100644 --- a/core/txpool/blobpool/blobpool.go +++ b/core/txpool/blobpool/blobpool.go @@ -1334,17 +1334,20 @@ func (p *BlobPool) GetBlobs(vhashes []common.Hash, version byte) ([]*kzg4844.Blo } data, err := p.store.Get(txID) if err != nil { - return nil, nil, nil, err + log.Error("Tracked blob transaction missing from store", "id", txID, "err", err) + continue } // Decode the blob transaction tx := new(types.Transaction) if err := rlp.DecodeBytes(data, tx); err != nil { - return nil, nil, nil, err + log.Error("Blobs corrupted for traced transaction", "id", txID, "err", err) + continue } sidecar := tx.BlobTxSidecar() if sidecar == nil { - return nil, nil, nil, fmt.Errorf("blob tx without sidecar %x", tx.Hash()) + log.Error("Blob tx without sidecar", "id", txID) + continue } // Traverse the blobs in the transaction for i, hash := range tx.BlobHashes() { From ac2a6b22183989d81a4a60ca766efeacf14711e0 Mon Sep 17 00:00:00 2001 From: Csaba Kiraly Date: Wed, 3 Sep 2025 12:28:16 +0200 Subject: [PATCH 2/4] eth/catalyst: enforce all blobs or nil on getBlobsV2 Signed-off-by: Csaba Kiraly --- eth/catalyst/api.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/eth/catalyst/api.go b/eth/catalyst/api.go index 07ce523462e1..dca245ccf19a 100644 --- a/eth/catalyst/api.go +++ b/eth/catalyst/api.go @@ -541,12 +541,21 @@ func (api *ConsensusAPI) GetBlobsV2(hashes []common.Hash) ([]*engine.BlobAndProo getBlobsV2RequestMiss.Inc(1) return nil, nil } - getBlobsV2RequestHit.Inc(1) blobs, _, proofs, err := api.eth.BlobTxPool().GetBlobs(hashes, types.BlobSidecarVersion1) if err != nil { return nil, engine.InvalidParams.With(err) } + + // To comply with API spec, check again that we really got all data needed + for _, blob := range blobs { + if blob == nil { + getBlobsV2RequestMiss.Inc(1) + return nil, nil + } + } + getBlobsV2RequestHit.Inc(1) + res := make([]*engine.BlobAndProofV2, len(hashes)) for i := 0; i < len(blobs); i++ { // the blob is missing, return null as response. It should From 14b6c739e8be0f250dcf32ddfda49f057665c0c4 Mon Sep 17 00:00:00 2001 From: rjl493456442 Date: Thu, 4 Sep 2025 11:01:09 +0800 Subject: [PATCH 3/4] Enhance error logging for blob transactions --- core/txpool/blobpool/blobpool.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/txpool/blobpool/blobpool.go b/core/txpool/blobpool/blobpool.go index 612529e55e82..edc8eb3e55c8 100644 --- a/core/txpool/blobpool/blobpool.go +++ b/core/txpool/blobpool/blobpool.go @@ -1346,7 +1346,7 @@ func (p *BlobPool) GetBlobs(vhashes []common.Hash, version byte) ([]*kzg4844.Blo } sidecar := tx.BlobTxSidecar() if sidecar == nil { - log.Error("Blob tx without sidecar", "id", txID) + log.Error("Blob tx without sidecar", "hash", tx.Hash(), "id", txID) continue } // Traverse the blobs in the transaction From 7079e12d794a73f1086f2cf70c765f0b4c96317c Mon Sep 17 00:00:00 2001 From: rjl493456442 Date: Thu, 4 Sep 2025 11:04:00 +0800 Subject: [PATCH 4/4] Remove nil blob check from response logic Removed check for nil blobs in response handling. --- eth/catalyst/api.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/eth/catalyst/api.go b/eth/catalyst/api.go index dca245ccf19a..b40698b999d2 100644 --- a/eth/catalyst/api.go +++ b/eth/catalyst/api.go @@ -558,12 +558,6 @@ func (api *ConsensusAPI) GetBlobsV2(hashes []common.Hash) ([]*engine.BlobAndProo res := make([]*engine.BlobAndProofV2, len(hashes)) for i := 0; i < len(blobs); i++ { - // the blob is missing, return null as response. It should - // be caught by `AvailableBlobs` though, perhaps data race - // occurs between two calls. - if blobs[i] == nil { - return nil, nil - } var cellProofs []hexutil.Bytes for _, proof := range proofs[i] { cellProofs = append(cellProofs, proof[:])