From 4264b5ae0712a16c00315b564bd4202b67972c89 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Sat, 15 Apr 2023 13:17:33 +0200 Subject: [PATCH] EVMHost: Support warm coinbase --- test/EVMHost.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/EVMHost.cpp b/test/EVMHost.cpp index d6cc311a01c4..d1fc2087f087 100644 --- a/test/EVMHost.cpp +++ b/test/EVMHost.cpp @@ -351,14 +351,19 @@ evmc::Result EVMHost::call(evmc_message const& _message) noexcept transfer(sender, destination, value); } - // Populate the access access list. + // Populate the access access list (enabled since Berlin). // Note, this will also properly touch the created address. // TODO: support a user supplied access list too if (m_evmRevision >= EVMC_BERLIN) { access_account(message.sender); access_account(message.recipient); + + // EIP-3651 rule + if (m_evmRevision >= EVMC_SHANGHAI) + access_account(tx_context.block_coinbase); } + evmc::Result result = m_vm.execute(*this, m_evmRevision, message, code.data(), code.size()); if (message.kind == EVMC_CREATE || message.kind == EVMC_CREATE2)