@@ -607,7 +607,7 @@ func outputDenebBlockText(ctx context.Context,
607607 }
608608 res .WriteString (tmp )
609609
610- tmp , err = outputBlobInfo (ctx , data .verbose , blobs )
610+ tmp , err = outputBlobInfo (ctx , data .verbose , signedBlock . Message . Body . BlobKZGCommitments , blobs )
611611 if err != nil {
612612 return "" , err
613613 }
@@ -717,7 +717,7 @@ func outputElectraBlockText(ctx context.Context,
717717 }
718718 res .WriteString (tmp )
719719
720- tmp , err = outputBlobInfo (ctx , data .verbose , blobs )
720+ tmp , err = outputBlobInfo (ctx , data .verbose , signedBlock . Message . Body . BlobKZGCommitments , blobs )
721721 if err != nil {
722722 return "" , err
723723 }
@@ -1160,20 +1160,24 @@ func outputElectraBlockExecutionRequests(_ context.Context,
11601160
11611161func outputBlobInfo (_ context.Context ,
11621162 verbose bool ,
1163+ commitments []deneb.KZGCommitment ,
11631164 blobs []* deneb.BlobSidecar ,
11641165) (
11651166 string ,
11661167 error ,
11671168) {
11681169 res := strings.Builder {}
11691170
1170- res .WriteString (fmt .Sprintf ("Blobs: %d\n " , len (blobs )))
1171-
1172- if verbose {
1173- for i , blob := range blobs {
1174- res .WriteString (fmt .Sprintf ("%3d:\n " , i ))
1175- res .WriteString (fmt .Sprintf (" KZG proof: %s\n " , blob .KZGProof .String ()))
1176- res .WriteString (fmt .Sprintf (" KZG commitment: %s\n " , blob .KZGCommitment .String ()))
1171+ if len (blobs ) == 0 && len (commitments ) > 0 {
1172+ res .WriteString (fmt .Sprintf ("Blobs: %d (but no blobs obtained from the beacon node)\n " , len (commitments )))
1173+ } else {
1174+ res .WriteString (fmt .Sprintf ("Blobs: %d\n " , len (blobs )))
1175+ if verbose {
1176+ for i , blob := range blobs {
1177+ res .WriteString (fmt .Sprintf ("%3d:\n " , i ))
1178+ res .WriteString (fmt .Sprintf (" KZG proof: %s\n " , blob .KZGProof .String ()))
1179+ res .WriteString (fmt .Sprintf (" KZG commitment: %s\n " , blob .KZGCommitment .String ()))
1180+ }
11771181 }
11781182 }
11791183
0 commit comments