private GenesisState getGenesisState(
      final Optional<BlockHeader> maybeGenesisBlockHeader,
      final ProtocolSchedule protocolSchedule) {
    final Optional<Hash> maybeGenesisStateRoot =
        genesisStateHashCacheEnabled
            ? maybeGenesisBlockHeader.map(BlockHeader::getStateRoot)
            : Optional.empty();

    return maybeGenesisStateRoot
        .map(
            genesisStateRoot ->
                GenesisState.fromStorage(genesisStateRoot, genesisConfig, protocolSchedule))
        .orElseGet(
            () ->
                GenesisState.fromConfig(dataStorageConfiguration, genesisConfig, protocolSchedule));
  }
Build besu controller.

@return the besu controller
app/src/main/java/org/hyperledger/besu/controller/BesuControllerBuilder.java