protected boolean mineBlock() throws InterruptedException {
    // Ensure the block is allowed to be mined - i.e. the timestamp on the new block is sufficiently
    // ahead of the parent, and still within allowable clock tolerance.
    final var timing = new BlockCreationTiming();

    LOG.trace("Started a mining operation.");

    final long newBlockTimestamp = scheduler.waitUntilNextBlockCanBeMined(parentHeader);
    timing.register("protocolWait");

    LOG.trace("Mining a new block with timestamp {}", newBlockTimestamp);

    final var blockCreationResult = minerBlockCreator.createBlock(newBlockTimestamp, parentHeader);
    timing.registerAll(blockCreationResult.getBlockCreationTimings());

    final Block block = blockCreationResult.getBlock();
    LOG.trace(
        "Block created, importing to local chain, block includes {} transactions",
        block.getBody().getTransactions().size());

    if (!shouldImportBlock(block)) {
      return false;
    }

    final BlockImporter importer =
        protocolSchedule.getByBlockHeader(block.getHeader()).getBlockImporter();
    final BlockImportResult blockImportResult =
        importer.importBlock(protocolContext, block, HeaderValidationMode.FULL);
    timing.register("importingBlock");
    if (blockImportResult.isImported()) {
      notifyNewBlockListeners(block);
      timing.register("notifyListeners");
      logProducedBlock(block, timing);
    } else {
      LOG.error("Illegal block mined, could not be imported to local chain.");
    }
    return blockImportResult.isImported();
  }
Create a block with the given timestamp.

@param parentHeader The header of the parent of the block to be produced
@param timestamp unix timestamp of the new block.
@return the newly created block.
ethereum/blockcreation/src/main/java/org/hyperledger/besu/ethereum/blockcreation/BlockMiner.java