Skip to content

Commit d0cb8b9

Browse files
author
colinlyguo
committed
apply changes for sanity checks
1 parent ed05728 commit d0cb8b9

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

common/types/message/message.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ type BatchTaskDetail struct {
9797
ChunkProofs []ChunkProof `json:"chunk_proofs"`
9898
BatchHeader interface{} `json:"batch_header"`
9999
BlobBytes []byte `json:"blob_bytes"`
100-
KzgProof Byte48 `json:"kzg_proof"`
101-
KzgCommitment Byte48 `json:"kzg_commitment"`
102-
ChallengeDigest common.Hash `json:"challenge_digest"`
100+
KzgProof Byte48 `json:"kzg_proof,omitempty"`
101+
KzgCommitment Byte48 `json:"kzg_commitment,omitempty"`
102+
ChallengeDigest common.Hash `json:"challenge_digest,omitempty"`
103103
}
104104

105105
// BundleTaskDetail consists of all the information required to describe the task to generate a proof for a bundle of batches.

coordinator/internal/logic/provertask/batch_prover_task.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,9 @@ func (bp *BatchProverTask) getBatchTaskDetail(dbBatch *orm.Batch, chunkInfos []*
294294
taskDetail.KzgProof = message.Byte48{Big: hexutil.Big(*new(big.Int).SetBytes(dbBatch.BlobDataProof[112:160]))}
295295
taskDetail.KzgCommitment = message.Byte48{Big: hexutil.Big(*new(big.Int).SetBytes(dbBatch.BlobDataProof[64:112]))}
296296
// FIXME: Challenge = ChallengeDigest % BLS_MODULUS, get the original ChallengeDigest.
297-
// Currently this is bypassed by disabling the sanity checks in the prover.
297+
// Simply omit the field now to skip sanity check in prover side
298+
// Resume it later (or FIXME has worked or the prover side has relax its checking)
299+
// taskDetail.ChallengeDigest = common.BytesToHash(dbBatch.BlobDataProof[0:32])
298300
taskDetail.ChallengeDigest = common.BytesToHash(dbBatch.BlobDataProof[0:32])
299301
return taskDetail, nil
300302
}

0 commit comments

Comments
 (0)