Skip to content

Commit 2b318ec

Browse files
author
colinlyguo
committed
add zero padding in BlobBytes
1 parent 4c2a755 commit 2b318ec

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

coordinator/internal/logic/provertask/batch_prover_task.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,10 @@ func (bp *BatchProverTask) getBatchTaskDetail(dbBatch *orm.Batch, chunkInfos []*
288288
}
289289
taskDetail.BatchHeader = batchHeader
290290
taskDetail.BlobBytes = dbBatch.BlobBytes
291+
if hardForkName == message.EuclidV2Fork && len(taskDetail.BlobBytes) < 126976 {
292+
zeroPadding := make([]byte, 126976-len(taskDetail.BlobBytes))
293+
taskDetail.BlobBytes = append(taskDetail.BlobBytes, zeroPadding...)
294+
}
291295

292296
if len(dbBatch.BlobDataProof) < 160 {
293297
return nil, fmt.Errorf("blob data proof length is less than 160 bytes = %d, taskID: %s: %s", len(dbBatch.BlobDataProof), dbBatch.Hash, common.Bytes2Hex(dbBatch.BlobDataProof))

0 commit comments

Comments
 (0)