From 04e40995d9898ae84e11ba6ec2354c1a4d5e5ee9 Mon Sep 17 00:00:00 2001 From: DELENE-TCHIO <119831304+DELENE-TCHIO-ROMUALD@users.noreply.github.com> Date: Tue, 7 Apr 2026 20:55:09 +0100 Subject: [PATCH] core: merge access events for all system calls (#34637) ProcessBeaconBlockRoot (EIP-4788) and processRequestsSystemCall (EIP-7002/7251) do not merge the EVM access events into the state after execution. ProcessParentBlockHash (EIP-2935) already does this correctly at line 290-291. Without this merge, the Verkle witness will be missing the storage accesses from the beacon root and request system calls, leading to incomplete witnesses and potential consensus issues when Verkle activates. --- core/state_processor.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/state_processor.go b/core/state_processor.go index 85f106d58c..bbb1341299 100644 --- a/core/state_processor.go +++ b/core/state_processor.go @@ -260,6 +260,9 @@ func ProcessBeaconBlockRoot(beaconRoot common.Hash, evm *vm.EVM) { evm.SetTxContext(NewEVMTxContext(msg)) evm.StateDB.AddAddressToAccessList(params.BeaconRootsAddress) _, _, _ = evm.Call(msg.From, *msg.To, msg.Data, 30_000_000, common.U2560) + if evm.StateDB.AccessEvents() != nil { + evm.StateDB.AccessEvents().Merge(evm.AccessEvents) + } evm.StateDB.Finalise(true) } @@ -323,6 +326,9 @@ func processRequestsSystemCall(requests *[][]byte, evm *vm.EVM, requestType byte evm.SetTxContext(NewEVMTxContext(msg)) evm.StateDB.AddAddressToAccessList(addr) ret, _, err := evm.Call(msg.From, *msg.To, msg.Data, 30_000_000, common.U2560) + if evm.StateDB.AccessEvents() != nil { + evm.StateDB.AccessEvents().Merge(evm.AccessEvents) + } evm.StateDB.Finalise(true) if err != nil { return fmt.Errorf("system call failed to execute: %v", err)