Skip to content

Commit

Permalink
Merge pull request #6759 from onflow/janez/fix-testnet-evm-replay
Browse files Browse the repository at this point in the history
Fix testnet EVM replay
  • Loading branch information
janezpodhostnik authored Nov 25, 2024
2 parents b3d0864 + 25a8af5 commit a164070
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions fvm/evm/offchain/blocks/block_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func UseBlockHashCorrection(chainID flow.ChainID, evmHeightOfCurrentBlock uint64
// array of hashes.
if chainID == flow.Mainnet && evmHeightOfCurrentBlock < blockHashListFixHCUEVMHeightMainnet {
return fixedHashes[flow.Mainnet][queriedEVMHeight%256], true
} else if chainID == flow.Testnet && blockHashListBugIntroducedHCUEVMHeightTestnet <= evmHeightOfCurrentBlock && evmHeightOfCurrentBlock < blockHashListFixHCUEVMHeightTestnet {
} else if chainID == flow.Testnet && evmHeightOfCurrentBlock < blockHashListFixHCUEVMHeightTestnet {
return fixedHashes[flow.Testnet][queriedEVMHeight%256], true
}
return gethCommon.Hash{}, false
Expand All @@ -83,11 +83,6 @@ const blockHashListFixHCUEVMHeightMainnet = 8357079
// PR: https://github.com/onflow/flow-go/pull/6734
const blockHashListFixHCUEVMHeightTestnet = 16848829

// Testnet52 - Spork
// Flow Block: 218215350 cc7188f0bdac4c442cc3ee072557d7f7c8ca4462537da945b148d5d0efa7a1ff
// PR: https://github.com/onflow/flow-go/pull/6377
const blockHashListBugIntroducedHCUEVMHeightTestnet = 7038679

// Testnet51 - Height Coordinated Upgrade 1
// Flow Block: 212562161 1a520608c5457f228405c4c30fc39c8a0af7cf915fb2ede7ec5ccffc2a000f57
// PR: https://github.com/onflow/flow-go/pull/6380
Expand Down

0 comments on commit a164070

Please sign in to comment.