Skip to content

Commit

Permalink
update l1 db entry for curie transition block
Browse files Browse the repository at this point in the history
  • Loading branch information
Thegaram committed Jun 18, 2024
1 parent fc9db9f commit 6febd35
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions miner/scroll_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -465,18 +465,24 @@ func (w *worker) startNewPipeline(timestamp int64) {
if w.chainConfig.CurieBlock != nil && w.chainConfig.CurieBlock.Cmp(header.Number) == 0 {
misc.ApplyCurieHardFork(parentState)

var nextL1MsgIndex uint64
if dbVal := rawdb.ReadFirstQueueIndexNotInL2Block(w.eth.ChainDb(), header.ParentHash); dbVal != nil {
nextL1MsgIndex = *dbVal
}

// zkEVM requirement: Curie transition block contains 0 transactions, bypass pipeline.
err = w.commit(&pipeline.Result{
// Note: Signer nodes will not store CCC results for empty blocks in their database.
// In practice, this is acceptable, since this block will never overflow, and follower
// nodes will still store CCC results.
Rows: &types.RowConsumption{},
FinalBlock: &pipeline.BlockCandidate{
Header: header,
State: parentState,
Txs: types.Transactions{},
Receipts: types.Receipts{},
CoalescedLogs: []*types.Log{},
Header: header,
State: parentState,
Txs: types.Transactions{},
Receipts: types.Receipts{},
CoalescedLogs: []*types.Log{},
NextL1MsgIndex: nextL1MsgIndex,
},
})

Expand Down

0 comments on commit 6febd35

Please sign in to comment.