From 73fa700a9a2a3cc7dd93d02606078e72f9c65109 Mon Sep 17 00:00:00 2001 From: Manav Darji Date: Wed, 30 Apr 2025 14:58:51 -0400 Subject: [PATCH] core: check for bor config when enabling prague requests --- core/chain_makers.go | 2 +- core/genesis.go | 2 +- core/state_processor.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/chain_makers.go b/core/chain_makers.go index ee4c29b6c3..14d90e3c4c 100644 --- a/core/chain_makers.go +++ b/core/chain_makers.go @@ -478,7 +478,7 @@ func GenerateVerkleChain(config *params.ChainConfig, parent *types.Block, engine // preState := statedb.Copy() // Pre-execution system calls. - if config.IsPrague(b.header.Number) { + if config.IsPrague(b.header.Number) && config.Bor == nil { // EIP-2935 blockContext := NewEVMBlockContext(b.header, cm, &b.header.Coinbase) vmenv := vm.NewEVM(blockContext, vm.TxContext{}, statedb, cm.config, vm.Config{}) diff --git a/core/genesis.go b/core/genesis.go index 2f4cd9e534..de71d4028a 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -511,7 +511,7 @@ func (g *Genesis) toBlockWithRoot(root common.Hash) *types.Block { head.BlobGasUsed = new(uint64) } } - if conf.IsPrague(num) { + if conf.IsPrague(num) && conf.Bor == nil { emptyRequests := [][]byte{{0x00}, {0x01}, {0x02}} rhash := types.CalcRequestsHash(emptyRequests) head.RequestsHash = &rhash diff --git a/core/state_processor.go b/core/state_processor.go index 65f2193793..66bb6f97e3 100644 --- a/core/state_processor.go +++ b/core/state_processor.go @@ -89,7 +89,7 @@ func (p *StateProcessor) Process(block *types.Block, statedb *state.StateDB, cfg if beaconRoot := block.BeaconRoot(); beaconRoot != nil { ProcessBeaconBlockRoot(*beaconRoot, vmenv, tracingStateDB) } - if p.config.IsPrague(block.Number()) { + if p.config.IsPrague(block.Number()) && p.config.Bor == nil { ProcessParentBlockHash(block.ParentHash(), vmenv, tracingStateDB) }