From f3922c467c8daaecc8d99e9fc1a8896687ca3d1d Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Fri, 17 May 2024 12:22:42 +0200 Subject: [PATCH] core/vm/runtime: set random to enable merge-opcodes --- core/vm/runtime/runtime.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/vm/runtime/runtime.go b/core/vm/runtime/runtime.go index b587d6d5a0..63fb3332d1 100644 --- a/core/vm/runtime/runtime.go +++ b/core/vm/runtime/runtime.go @@ -101,6 +101,10 @@ func setDefaults(cfg *Config) { if cfg.BlobBaseFee == nil { cfg.BlobBaseFee = big.NewInt(params.BlobTxMinBlobGasprice) } + // Merge indicators + if t := cfg.ChainConfig.ShanghaiTime; cfg.ChainConfig.TerminalTotalDifficultyPassed || (t != nil && *t == 0) { + cfg.Random = &(common.Hash{}) + } } // Execute executes the code using the input as call data during the execution.