public static ProtocolSchedule create(
      final GenesisConfigOptions config,
      final ForksSchedule<CliqueConfigOptions> forksSchedule,
      final NodeKey nodeKey,
      final boolean isRevertReasonEnabled,
      final EvmConfiguration evmConfiguration,
      final MiningConfiguration miningConfiguration,
      final BadBlockManager badBlockManager,
      final boolean isParallelTxProcessingEnabled,
      final MetricsSystem metricsSystem) {

    final CliqueConfigOptions cliqueConfig = config.getCliqueConfigOptions();

    final Address localNodeAddress = Util.publicKeyToAddress(nodeKey.getPublicKey());

    if (cliqueConfig.getEpochLength() <= 0) {
      throw new IllegalArgumentException("Epoch length in config must be greater than zero");
    }

    final EpochManager epochManager = new EpochManager(cliqueConfig.getEpochLength());

    final Map<Long, Function<ProtocolSpecBuilder, ProtocolSpecBuilder>> specMap = new HashMap<>();
    forksSchedule
        .getForks()
        .forEach(
            forkSpec ->
                specMap.put(
                    forkSpec.getBlock(),
                    builder ->
                        applyCliqueSpecificModifications(
                            epochManager,
                            forkSpec.getValue().getBlockPeriodSeconds(),
                            forkSpec.getValue().getCreateEmptyBlocks(),
                            localNodeAddress,
                            builder)));
    final ProtocolSpecAdapters specAdapters = new ProtocolSpecAdapters(specMap);

    return new ProtocolScheduleBuilder(
            config,
            Optional.of(DEFAULT_CHAIN_ID),
            specAdapters,
            isRevertReasonEnabled,
            evmConfiguration,
            miningConfiguration,
            badBlockManager,
            isParallelTxProcessingEnabled,
            metricsSystem)
        .createProtocolSchedule();
  }
Create protocol schedule.

@param config the config
@param forksSchedule the transitions
@param nodeKey the node key
@param isRevertReasonEnabled the is revert reason enabled
@param evmConfiguration the evm configuration
@param miningConfiguration the mining configuration
@param badBlockManager the cache to use to keep invalid blocks
@param isParallelTxProcessingEnabled indicates whether parallel transaction is enabled
@param metricsSystem A metricSystem instance to be able to expose metrics in the underlying
    calls
@return the protocol schedule
consensus/clique/src/main/java/org/hyperledger/besu/consensus/clique/CliqueProtocolSchedule.java