public void validate(final CommandLine commandLine, final DataStorageFormat dataStorageFormat) {
    if (DataStorageFormat.BONSAI == dataStorageFormat) {
      if (limitTrieLogsEnabled) {
        if (maxLayersToLoad < MINIMUM_TRIE_LOG_RETENTION_LIMIT) {
          throw new CommandLine.ParameterException(
              commandLine,
              String.format(
                  MAX_LAYERS_TO_LOAD + " minimum value is %d", MINIMUM_TRIE_LOG_RETENTION_LIMIT));
        }
        if (trieLogPruningWindowSize <= 0) {
          throw new CommandLine.ParameterException(
              commandLine,
              String.format(
                  TRIE_LOG_PRUNING_WINDOW_SIZE + "=%d must be greater than 0",
                  trieLogPruningWindowSize));
        }
        if (trieLogPruningWindowSize <= maxLayersToLoad) {
          throw new CommandLine.ParameterException(
              commandLine,
              String.format(
                  TRIE_LOG_PRUNING_WINDOW_SIZE
                      + "=%d must be greater than "
                      + MAX_LAYERS_TO_LOAD
                      + "=%d",
                  trieLogPruningWindowSize,
                  maxLayersToLoad));
        }
      }
    } else {
      if (unstableOptions.isParallelTxProcessingEnabled) {
        throw new CommandLine.ParameterException(
            commandLine,
            "Transaction parallelization is not supported unless operating in a 'pathbased' mode, such as Bonsai.");
      }
    }
  }
Validates the data storage options

@param commandLine the full commandLine to check all the options specified by the user
@param dataStorageFormat the selected data storage format which determines the validation rules
    to apply.
app/src/main/java/org/hyperledger/besu/cli/options/storage/PathBasedExtraStorageOptions.java