Skip to content

Commit b1ecaf0

Browse files
committed
fix linter errors
1 parent f663968 commit b1ecaf0

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

rollup/cmd/permissionless_batches/app/app.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ func action(ctx *cli.Context) error {
8787

8888
minCodecVersion := encoding.CodecVersion(ctx.Uint(utils.MinCodecVersionFlag.Name))
8989
chunkProposer := watcher.NewChunkProposer(subCtx, cfg.L2Config.ChunkProposerConfig, minCodecVersion, genesis.Config, db, registry)
90-
batchProposer := watcher.NewBatchProposer(subCtx, cfg.L2Config.BatchProposerConfig, minCodecVersion, genesis.Config, db, registry)
90+
batchProposer := watcher.NewBatchProposer(subCtx, cfg.L2Config.BatchProposerConfig, minCodecVersion, genesis.Config, db, false, registry)
9191
bundleProposer := watcher.NewBundleProposer(subCtx, cfg.L2Config.BundleProposerConfig, minCodecVersion, genesis.Config, db, registry)
9292

9393
// Init l2geth connection

rollup/internal/controller/permissionless_batches/submitter.go

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -109,16 +109,14 @@ func (s *Submitter) Submit(withProof bool) error {
109109
return fmt.Errorf("failed to get end chunk with index %d of batch: %w", batch.EndChunkIndex, err)
110110
}
111111

112-
var aggProof message.BundleProof
112+
var aggProof *message.OpenVMBundleProof
113113
if withProof {
114114
firstChunk, err := s.chunkOrm.GetChunkByIndex(s.ctx, batch.StartChunkIndex)
115115
if err != nil || firstChunk == nil {
116116
return fmt.Errorf("failed to get first chunk %d of batch: %w", batch.StartChunkIndex, err)
117117
}
118118

119-
hardForkName := encoding.GetHardforkName(s.chainCfg, firstChunk.StartBlockNumber, firstChunk.StartBlockTime)
120-
121-
aggProof, err = s.bundleOrm.GetVerifiedProofByHash(s.ctx, bundle.Hash, hardForkName)
119+
aggProof, err = s.bundleOrm.GetVerifiedProofByHash(s.ctx, bundle.Hash)
122120
if err != nil {
123121
return fmt.Errorf("failed to get verified proof by bundle index: %d, err: %w", bundle.Index, err)
124122
}
@@ -139,11 +137,9 @@ func (s *Submitter) Submit(withProof bool) error {
139137
default:
140138
return fmt.Errorf("unsupported codec version in finalizeBundle, bundle index: %v, version: %d", bundle.Index, bundle.CodecVersion)
141139
}
142-
//
143-
fmt.Println(len(blob))
144-
txHash, err := s.finalizeSender.SendTransaction("commitAndFinalize-"+bundle.Hash, &s.cfg.RollupContractAddress, calldata, []*kzg4844.Blob{blob}, 0)
140+
141+
txHash, _, err := s.finalizeSender.SendTransaction("commitAndFinalize-"+bundle.Hash, &s.cfg.RollupContractAddress, calldata, []*kzg4844.Blob{blob})
145142
if err != nil {
146-
//fmt.Println("blob", common.Bytes2Hex(blob[:]))
147143
log.Error("commitAndFinalize in layer1 failed", "with proof", withProof, "index", bundle.Index,
148144
"batch index", bundle.StartBatchIndex,
149145
"RollupContractAddress", s.cfg.RollupContractAddress, "err", err, "calldata", common.Bytes2Hex(calldata))
@@ -206,7 +202,7 @@ func (s *Submitter) Submit(withProof bool) error {
206202
return nil
207203
}
208204

209-
func (s *Submitter) constructCommitAndFinalizeCalldataAndBlob(batch *orm.Batch, endChunk *orm.Chunk, aggProof message.BundleProof) ([]byte, *kzg4844.Blob, error) {
205+
func (s *Submitter) constructCommitAndFinalizeCalldataAndBlob(batch *orm.Batch, endChunk *orm.Chunk, aggProof *message.OpenVMBundleProof) ([]byte, *kzg4844.Blob, error) {
210206
// Create the FinalizeStruct tuple as an abi-compatible struct
211207
finalizeStruct := struct {
212208
BatchHeader []byte

rollup/internal/controller/relayer/full_recovery.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ func (f *FullRecovery) insertBatchIntoDB(batch *batchEvents, codec encoding.Code
401401
encBatch.Chunks = []*encoding.Chunk{&chunk}
402402
encBatch.Blocks = blocks
403403

404-
batchMetrics, err := butils.CalculateBatchMetrics(&encBatch, codec.Version())
404+
batchMetrics, err := butils.CalculateBatchMetrics(&encBatch, codec.Version(), false)
405405
if err != nil {
406406
return fmt.Errorf("failed to calculate batch metrics: %w", err)
407407
}

0 commit comments

Comments
 (0)