fix: update l1 db entry for curie transition block (#835)

This commit is contained in:
Péter Garamvölgyi 2024-06-20 14:00:07 +02:00 committed by GitHub
parent 4e3bf2f58e
commit c00352023b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 6 deletions

View file

@ -404,6 +404,11 @@ 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.
@ -411,11 +416,12 @@ func (w *worker) startNewPipeline(timestamp int64) {
// 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,
},
})

View file

@ -24,7 +24,7 @@ import (
const (
VersionMajor = 5 // Major version component of the current release
VersionMinor = 4 // Minor version component of the current release
VersionPatch = 5 // Patch version component of the current release
VersionPatch = 6 // Patch version component of the current release
VersionMeta = "mainnet" // Version metadata to append to the version string
)