Skip to content

Commit

Permalink
copy layered worldstate fix for eth_call (#5179)
Browse files Browse the repository at this point in the history
* copy layered worldstate fix for eth_call

Signed-off-by: garyschulte <[email protected]>
  • Loading branch information
garyschulte authored Mar 7, 2023
1 parent d0de337 commit da477e9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,13 @@ public Optional<TransactionSimulatorResult> 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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ public class TransactionSimulatorTest {

@Before
public void setUp() {
when(this.worldState.isPersistable()).thenReturn(true);
this.transactionSimulator =
new TransactionSimulator(blockchain, worldStateArchive, protocolSchedule);

Expand Down

0 comments on commit da477e9

Please sign in to comment.