File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1170,8 +1170,6 @@ static ProtocolSpecBuilder amsterdamDefinition(
11701170 isBlockAccessListEnabled ,
11711171 metricsSystem )
11721172 .blockAccessListFactory (new BlockAccessListFactory (isBlockAccessListEnabled , true ))
1173- // TODO: Currently we will be starting the BAL state root future on Amsterdam even if
1174- // Forest is enabled so will not be used
11751173 .stateRootCommitterFactory (new StateRootCommitterFactoryBal (false , BAL_ROOT_TIMEOUT ))
11761174 .hardforkId (AMSTERDAM );
11771175 }
Original file line number Diff line number Diff line change 1818import org .hyperledger .besu .ethereum .ProtocolContext ;
1919import org .hyperledger .besu .ethereum .core .BlockHeader ;
2020import org .hyperledger .besu .ethereum .mainnet .block .access .list .BlockAccessList ;
21+ import org .hyperledger .besu .ethereum .trie .pathbased .bonsai .BonsaiWorldStateProvider ;
2122import org .hyperledger .besu .ethereum .trie .pathbased .bonsai .worldview .BlockAccessListStateRootHashCalculator ;
2223
2324import java .time .Duration ;
@@ -49,6 +50,11 @@ public StateRootCommitter forBlock(
4950 return new StateRootCommitterImplSync ();
5051 }
5152
53+ // This is temporary workaround to not launch state root pre-computation in Forest mode
54+ if (!(protocolContext .getWorldStateArchive () instanceof BonsaiWorldStateProvider )) {
55+ return new StateRootCommitterImplSync ();
56+ }
57+
5258 final CompletableFuture <Hash > balRootFuture =
5359 BlockAccessListStateRootHashCalculator .computeStateRootFromBlockAccessListAsync (
5460 protocolContext , blockHeader , maybeBal .get ());
You can’t perform that action at this time.
0 commit comments