Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 7 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions miner/scroll_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -404,18 +404,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
}

omerfirmak marked this conversation as resolved.
Show resolved Hide resolved
// 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
2 changes: 1 addition & 1 deletion params/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand Down