Skip to content

Commit

Permalink
remove handling of "the bug" for fork 12 (#1296)
Browse files Browse the repository at this point in the history
  • Loading branch information
hexoscott authored Oct 9, 2024
1 parent 9ded83e commit e4a34d7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
4 changes: 3 additions & 1 deletion core/blockchain_zkevm.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ func ExecuteBlockEphemerallyZk(
}

localReceipt := CreateReceiptForBlockInfoTree(receipt, chainConfig, blockNum, execResult)
ProcessReceiptForBlockExecution(receipt, roHermezDb, chainConfig, blockNum, header, tx)
if err = ProcessReceiptForBlockExecution(receipt, roHermezDb, chainConfig, blockNum, header, tx); err != nil {
return nil, err
}

if err != nil {
if !vmConfig.StatelessExec {
Expand Down
7 changes: 6 additions & 1 deletion core/types/log_zkevm.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,15 @@ func (_this *Log) Clone() *Log {
}

func (_this *Log) ApplyPaddingToLogsData(isForkId8, isForkId12 bool) {
if isForkId12 {
// we want to skip this behaviour completely for fork 12
return
}

d := _this.Data
mSize := len(d)

if isForkId8 && !isForkId12 {
if isForkId8 {
d = applyHexPadBug(d, mSize)
} else {
// [zkEvm] fill 0 at the end
Expand Down
6 changes: 0 additions & 6 deletions zk/stages/stage_sequence_execute_blocks.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,6 @@ func finaliseBlock(
return nil, err
}

if batchState.isL1Recovery() {
for i, receipt := range builtBlockElements.receipts {
core.ProcessReceiptForBlockExecution(receipt, batchContext.sdb.hermezDb.HermezDbReader, batchContext.cfg.chainConfig, newHeader.Number.Uint64(), newHeader, builtBlockElements.transactions[i])
}
}

finalBlock, finalTransactions, finalReceipts, err := core.FinalizeBlockExecution(
batchContext.cfg.engine,
batchContext.sdb.stateReader,
Expand Down

0 comments on commit e4a34d7

Please sign in to comment.