Skip to content

Commit

Permalink
Merge branch 'develop' into feat-alt-gas-token
Browse files Browse the repository at this point in the history
  • Loading branch information
georgehao authored Aug 15, 2024
2 parents 7d8a7ab + 0313f16 commit 6fe427e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion common/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"runtime/debug"
)

var tag = "v4.4.43"
var tag = "v4.4.44"

var commit = func() string {
if info, ok := debug.ReadBuildInfo(); ok {
Expand Down
9 changes: 7 additions & 2 deletions rollup/internal/controller/relayer/l2_relayer.go
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,6 @@ func (r *Layer2Relayer) ProcessCommittedBatches() {
}

case types.ProvingTaskVerified:
log.Info("Start to roll up zk proof", "hash", batch.Hash)
r.metrics.rollupL2RelayerProcessCommittedBatchesFinalizedTotal.Inc()
if err := r.finalizeBatch(batch, true); err != nil {
log.Error("Failed to finalize batch with proof", "index", batch.Index, "hash", batch.Hash, "err", err)
Expand Down Expand Up @@ -531,7 +530,7 @@ func (r *Layer2Relayer) ProcessPendingBundles() {
}

case types.ProvingTaskVerified:
log.Info("Start to roll up zk proof", "hash", bundle.Hash)
log.Info("Start to roll up zk proof", "bundle hash", bundle.Hash)
r.metrics.rollupL2RelayerProcessPendingBundlesFinalizedTotal.Inc()
if err := r.finalizeBundle(bundle, true); err != nil {
log.Error("Failed to finalize bundle with proof", "index", bundle.Index, "start batch index", bundle.StartBatchIndex, "end batch index", bundle.EndBatchIndex, "err", err)
Expand Down Expand Up @@ -598,11 +597,15 @@ func (r *Layer2Relayer) finalizeBatch(dbBatch *orm.Batch, withProof bool) error

var calldata []byte
if !r.chainCfg.IsBernoulli(new(big.Int).SetUint64(dbChunks[0].StartBlockNumber)) { // codecv0
log.Info("Start to roll up zk proof", "batch hash", dbBatch.Hash)

calldata, err = r.constructFinalizeBatchPayloadCodecV0(dbBatch, dbParentBatch, aggProof)
if err != nil {
return fmt.Errorf("failed to construct finalizeBatch payload codecv0, index: %v, err: %w", dbBatch.Index, err)
}
} else if !r.chainCfg.IsCurie(new(big.Int).SetUint64(dbChunks[0].StartBlockNumber)) { // codecv1
log.Info("Start to roll up zk proof", "batch hash", dbBatch.Hash)

chunks := make([]*encoding.Chunk, len(dbChunks))
for i, c := range dbChunks {
blocks, dbErr := r.l2BlockOrm.GetL2BlocksInRange(r.ctx, c.StartBlockNumber, c.EndBlockNumber)
Expand All @@ -617,6 +620,8 @@ func (r *Layer2Relayer) finalizeBatch(dbBatch *orm.Batch, withProof bool) error
return fmt.Errorf("failed to construct finalizeBatch payload codecv1, index: %v, err: %w", dbBatch.Index, err)
}
} else if !r.chainCfg.IsDarwin(dbChunks[0].StartBlockTime) { // codecv2
log.Info("Start to roll up zk proof", "batch hash", dbBatch.Hash)

chunks := make([]*encoding.Chunk, len(dbChunks))
for i, c := range dbChunks {
blocks, dbErr := r.l2BlockOrm.GetL2BlocksInRange(r.ctx, c.StartBlockNumber, c.EndBlockNumber)
Expand Down

0 comments on commit 6fe427e

Please sign in to comment.