From afb08f648dd99dbf0655f65b66c3a96db713f859 Mon Sep 17 00:00:00 2001 From: garyschulte Date: Mon, 6 Mar 2023 16:48:09 -0800 Subject: [PATCH 1/3] copy layered worldstate fix for eth_call Signed-off-by: garyschulte --- .../besu/ethereum/transaction/TransactionSimulator.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/transaction/TransactionSimulator.java b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/transaction/TransactionSimulator.java index 653a5b56d7d..a0f92b32b78 100644 --- a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/transaction/TransactionSimulator.java +++ b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/transaction/TransactionSimulator.java @@ -166,6 +166,13 @@ public Optional process( private MutableWorldState getWorldState(final BlockHeader header) { return worldStateArchive .getMutable(header.getStateRoot(), header.getHash(), false) + .map( + ws -> { + if (!ws.isPersistable()) { + return ws.copy(); + } + return ws; + }) .orElseThrow( () -> new IllegalArgumentException( From 9550583d51d160dc990d1d2fa2c34028830ce142 Mon Sep 17 00:00:00 2001 From: garyschulte Date: Mon, 6 Mar 2023 16:52:08 -0800 Subject: [PATCH 2/3] changelog entry Signed-off-by: garyschulte --- CHANGELOG.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 004e9fa6f33..e798d220386 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,8 +16,9 @@ This update is required for the Goerli Shanghai/Capella upgrade and recommended - Goerli configs for shapella [#5151](https://github.com/hyperledger/besu/pull/5151) ### Bug Fixes -- Fix engine_getPayloadV2 block value calculation https://github.com/hyperledger/besu/issues/5040 -- Moves check for init code length before balance check https://github.com/hyperledger/besu/pull/5077 +- Fix engine_getPayloadV2 block value calculation [#5040](https://github.com/hyperledger/besu/issues/5040) +- Moves check for init code length before balance check [#5077](https://github.com/hyperledger/besu/pull/5077) +- Address concurrency problems with eth_call [#5179](https://github.com/hyperledger/besu/pull/5179) ## 23.1.1-RC1 ### Sepolia Shanghai Release aka Sepolia Shapella aka Shapolia From 9d20c5117dbecb8258827dc1bbf2aaf5ebab5102 Mon Sep 17 00:00:00 2001 From: garyschulte Date: Mon, 6 Mar 2023 17:10:14 -0800 Subject: [PATCH 3/3] fix TransactionSimulatorTest worldstate mock Signed-off-by: garyschulte --- .../besu/ethereum/transaction/TransactionSimulatorTest.java | 1 + 1 file changed, 1 insertion(+) diff --git a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/transaction/TransactionSimulatorTest.java b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/transaction/TransactionSimulatorTest.java index e8b07d5d925..7aa41b01fad 100644 --- a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/transaction/TransactionSimulatorTest.java +++ b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/transaction/TransactionSimulatorTest.java @@ -89,6 +89,7 @@ public class TransactionSimulatorTest { @Before public void setUp() { + when(this.worldState.isPersistable()).thenReturn(true); this.transactionSimulator = new TransactionSimulator(blockchain, worldStateArchive, protocolSchedule);