From 17137d12e9c8a669c93230ffe4f3221028e7a718 Mon Sep 17 00:00:00 2001 From: terence tsao Date: Tue, 12 Mar 2024 18:10:40 -1000 Subject: [PATCH 1/3] Add index to file path --- beacon-chain/sync/validate_blob.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beacon-chain/sync/validate_blob.go b/beacon-chain/sync/validate_blob.go index d23c9b85d13a..ebaa6ffe4169 100644 --- a/beacon-chain/sync/validate_blob.go +++ b/beacon-chain/sync/validate_blob.go @@ -176,7 +176,7 @@ func saveInvalidBlobToTemp(b blocks.ROBlob) { if !features.Get().SaveInvalidBlob { return } - filename := fmt.Sprintf("blob_sidecar_%d.ssz", b.Slot()) + filename := fmt.Sprintf("blob_sidecar_%d_%d.ssz", b.Slot(), b.Index) fp := path.Join(os.TempDir(), filename) log.Warnf("Writing invalid blob sidecar to disk at %s", fp) enc, err := b.MarshalSSZ() From 3c13c368a89bfd9e242d7eb2ba407b09663898dd Mon Sep 17 00:00:00 2001 From: terence tsao Date: Tue, 12 Mar 2024 18:23:33 -1000 Subject: [PATCH 2/3] Add block root --- beacon-chain/sync/validate_blob.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beacon-chain/sync/validate_blob.go b/beacon-chain/sync/validate_blob.go index ebaa6ffe4169..ac572edf37f6 100644 --- a/beacon-chain/sync/validate_blob.go +++ b/beacon-chain/sync/validate_blob.go @@ -176,7 +176,7 @@ func saveInvalidBlobToTemp(b blocks.ROBlob) { if !features.Get().SaveInvalidBlob { return } - filename := fmt.Sprintf("blob_sidecar_%d_%d.ssz", b.Slot(), b.Index) + filename := fmt.Sprintf("blob_sidecar_%#x_%d_%d.ssz", b.BlockRoot(), b.Slot(), b.Index) fp := path.Join(os.TempDir(), filename) log.Warnf("Writing invalid blob sidecar to disk at %s", fp) enc, err := b.MarshalSSZ() From e5ad2ffe629740396dd8999d2f54bba39000cec5 Mon Sep 17 00:00:00 2001 From: terence tsao Date: Tue, 12 Mar 2024 18:10:40 -1000 Subject: [PATCH 3/3] Add index to file path --- beacon-chain/sync/validate_blob.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beacon-chain/sync/validate_blob.go b/beacon-chain/sync/validate_blob.go index 72bb6591e2fa..bcd4aa1451d9 100644 --- a/beacon-chain/sync/validate_blob.go +++ b/beacon-chain/sync/validate_blob.go @@ -177,7 +177,7 @@ func saveInvalidBlobToTemp(b blocks.ROBlob) { if !features.Get().SaveInvalidBlob { return } - filename := fmt.Sprintf("blob_sidecar_%d.ssz", b.Slot()) + filename := fmt.Sprintf("blob_sidecar_%d_%d.ssz", b.Slot(), b.Index) fp := path.Join(os.TempDir(), filename) log.Warnf("Writing invalid blob sidecar to disk at %s", fp) enc, err := b.MarshalSSZ()