@Override
  public Bytes createExtraData(final int round, final BlockHeader parentHeader) {
    if (forksSchedule.getFork(parentHeader.getNumber() + 1L).getValue().isValidatorContractMode()) {
      // vote and validators will come from contract instead of block
      final BftExtraData extraData =
          new BftExtraData(
              ConsensusHelpers.zeroLeftPad(
                  miningConfiguration.getExtraData(), BftExtraDataCodec.EXTRA_VANITY_LENGTH),
              Collections.emptyList(),
              Optional.empty(),
              round,
              Collections.emptyList());
      return bftExtraDataCodec.encode(extraData);
    }

    return super.createExtraData(round, parentHeader);
  }
Instantiates a new Qbft block creator factory.

@param transactionPool the pending transactions
@param protocolContext the protocol context
@param protocolSchedule the protocol schedule
@param forksSchedule the forks schedule
@param miningParams the mining params
@param localAddress the local address
@param bftExtraDataCodec the bft extra data codec
@param ethScheduler the scheduler for asynchronous block creation tasks
consensus/qbft/src/main/java/org/hyperledger/besu/consensus/qbft/blockcreation/QbftBlockCreatorFactory.java