Skip to content

Commit

Permalink
fix(bug): ensure bug height detection is done properly (0xPolygonHerm…
Browse files Browse the repository at this point in the history
  • Loading branch information
revitteth authored Jun 6, 2024
1 parent c6ad989 commit dd21966
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions core/vm/instructions_zkevm.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,14 +172,11 @@ func makeLog_zkevm(size int, logIndexPerTx bool) executionFunc {

d := scope.Memory.GetCopy(int64(mStart.Uint64()), int64(mSize.Uint64()))

forkBlock := uint64(0)
if interpreter.evm.ChainConfig().ForkID88ElderberryBlock != nil {
forkBlock = interpreter.VM.evm.ChainConfig().ForkID88ElderberryBlock.Uint64()
}
blockNo := interpreter.VM.evm.Context().BlockNumber
bugHeight := interpreter.evm.ChainConfig().IsForkID8Elderberry(blockNo)

// [hack] APPLY BUG ONLY ABOVE FORKID9
if forkBlock == 0 || blockNo < forkBlock {
// [hack] APPLY BUG ONLY ABOVE FORKID8
if !bugHeight {
// [zkEvm] fill 0 at the end
dataLen := len(d)
lenMod32 := dataLen & 31
Expand Down

0 comments on commit dd21966

Please sign in to comment.