This commit is contained in:
colinlyguo
2025-03-18 18:53:48 +08:00
parent 7e69b622a2
commit 3571c596ab
2 changed files with 5 additions and 3 deletions

View File

@@ -6,8 +6,8 @@ import (
"fmt"
"math/big"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/scroll-tech/go-ethereum/common"
"github.com/scroll-tech/go-ethereum/common/hexutil"
)
const (

View File

@@ -7,12 +7,12 @@ import (
"math/big"
"time"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/gin-gonic/gin"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
"github.com/scroll-tech/da-codec/encoding"
"github.com/scroll-tech/go-ethereum/common"
"github.com/scroll-tech/go-ethereum/common/hexutil"
"github.com/scroll-tech/go-ethereum/log"
"github.com/scroll-tech/go-ethereum/params"
"gorm.io/gorm"
@@ -290,6 +290,8 @@ func (bp *BatchProverTask) getBatchTaskDetail(dbBatch *orm.Batch, chunkInfos []*
// | bytes32 | bytes32 | bytes48 | bytes48 |
taskDetail.KzgProof = message.Byte48{Big: hexutil.Big(*new(big.Int).SetBytes(dbBatch.BlobDataProof[112:160]))}
taskDetail.KzgCommitment = message.Byte48{Big: hexutil.Big(*new(big.Int).SetBytes(dbBatch.BlobDataProof[64:112]))}
taskDetail.ChallengeDigest = common.BytesToHash(dbBatch.BlobDataProof[0:32]) // FIXME: Challenge = ChallengeDigest % BLS_MODULUS, get the original ChallengeDigest.
// FIXME: Challenge = ChallengeDigest % BLS_MODULUS, get the original ChallengeDigest.
// Currently this is bypassed by disabling the sanity checks in the prover.
taskDetail.ChallengeDigest = common.BytesToHash(dbBatch.BlobDataProof[0:32])
return taskDetail, nil
}