Compare commits

...

2 Commits

Author SHA1 Message Date
colinlyguo
0b89ae696c add dumping blob data proof log 2024-04-01 12:59:58 +08:00
HAOYUatHZ
b95db7dc9b log batch data hash 2024-04-01 10:07:19 +08:00
2 changed files with 8 additions and 0 deletions

View File

@@ -2,6 +2,7 @@ package relayer
import (
"context"
"encoding/hex"
"fmt"
"math/big"
"sort"
@@ -817,6 +818,8 @@ func (r *Layer2Relayer) constructFinalizeBatchPayloadCodecV1(dbBatch *orm.Batch,
return nil, fmt.Errorf("failed to get blob data proof: %w", getErr)
}
log.Info("daBatch.BlobDataProof", "batchIndex", batch.Index, "batchHash", dbBatch.Hash, "dataProof", hex.EncodeToString(blobDataProof))
if aggProof != nil { // finalizeBatch4844 with proof.
calldata, packErr := r.l1RollupABI.Pack(
"finalizeBatchWithProof4844",

View File

@@ -8,6 +8,7 @@ import (
"github.com/scroll-tech/go-ethereum/common"
"github.com/scroll-tech/go-ethereum/core/types"
"github.com/scroll-tech/go-ethereum/crypto"
"github.com/scroll-tech/go-ethereum/log"
"scroll-tech/common/types/encoding"
"scroll-tech/common/types/encoding/codecv0"
@@ -236,6 +237,8 @@ func GetBatchMetadata(batch *encoding.Batch, codecVersion encoding.CodecVersion)
if err != nil {
return nil, fmt.Errorf("failed to get codecv0 end DA chunk hash: %w", err)
}
log.Info("GetBatchMetadata", "batchIndex", batch.Index, "batchHash", batchMeta.BatchHash.Hex(), "batchDataHash", daBatch.DataHash.Hex())
return batchMeta, nil
case encoding.CodecV1:
daBatch, err := codecv1.NewDABatch(batch)
@@ -267,6 +270,8 @@ func GetBatchMetadata(batch *encoding.Batch, codecVersion encoding.CodecVersion)
if err != nil {
return nil, fmt.Errorf("failed to get codecv1 end DA chunk hash: %w", err)
}
log.Info("GetBatchMetadata", "batchIndex", batch.Index, "batchHash", batchMeta.BatchHash.Hex(), "batchDataHash", daBatch.DataHash.Hex())
return batchMeta, nil
default:
return nil, fmt.Errorf("unsupported codec version: %v", codecVersion)