private TrieLogPruner createTrieLogPruner(
      final WorldStateKeyValueStorage worldStateStorage,
      final Blockchain blockchain,
      final EthScheduler scheduler) {
    final boolean isProofOfStake = genesisConfigOptions.getTerminalTotalDifficulty().isPresent();
    final PathBasedExtraStorageConfiguration subStorageConfiguration =
        dataStorageConfiguration.getPathBasedExtraStorageConfiguration();
    final TrieLogPruner trieLogPruner =
        new TrieLogPruner(
            (BonsaiWorldStateKeyValueStorage) worldStateStorage,
            blockchain,
            scheduler::executeServiceTask,
            subStorageConfiguration.getMaxLayersToLoad(),
            subStorageConfiguration.getTrieLogPruningWindowSize(),
            isProofOfStake,
            metricsSystem);
    trieLogPruner.initialize();

    return trieLogPruner;
  }
Build besu controller.

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