private static Hash calculateGenesisStateRoot(
      final DataStorageConfiguration dataStorageConfiguration, final GenesisConfig genesisConfig) {
    try (var worldState = createGenesisWorldState(dataStorageConfiguration)) {
      writeAccountsTo(worldState, genesisConfig.streamAllocations(), null);
      return worldState.rootHash();
    } catch (Exception e) {
      throw new RuntimeException(e);
    }
  }
Writes the genesis block's world state to the given {@link MutableWorldState}.

@param target WorldView to write genesis state to
ethereum/core/src/main/java/org/hyperledger/besu/ethereum/chain/GenesisState.java