@Override
  public TransactionSelectionResult evaluateTransactionPreProcessing(
      final TransactionEvaluationContext evaluationContext) {

    final var tx = evaluationContext.getTransaction();
    if (tx.getType().supportsBlob()) {

      final var cumulativeBlobGasUsed = getWorkingState();

      final var remainingBlobGas =
          context.gasLimitCalculator().currentBlobGasLimit() - cumulativeBlobGasUsed;

      if (remainingBlobGas == 0) {
        LOG.atTrace()
            .setMessage(
                "The block already contains the max number of allowed blobs, pending tx: {}")
            .addArgument(evaluationContext.getPendingTransaction()::toTraceLog)
            .log();
        return TransactionSelectionResult.BLOBS_FULL;
      }

      final long requestedBlobGas = context.gasCalculator().blobGasCost(tx.getBlobCount());

      if (requestedBlobGas > remainingBlobGas) {
        LOG.atTrace()
            .setMessage(
                "There is not enough blob gas available to fit the blobs of the transaction {} in the block."
                    + " Available {} / Requested {}")
            .addArgument(evaluationContext.getPendingTransaction()::toTraceLog)
            .addArgument(remainingBlobGas)
            .addArgument(requestedBlobGas)
            .log();
        return TransactionSelectionResult.TX_TOO_LARGE_FOR_REMAINING_BLOB_GAS;
      }
    }
    return TransactionSelectionResult.SELECTED;
  }
Evaluates a transaction considering other transactions in the same block. If the tx does not
support blobs, no check is performed, and SELECTED is returned, otherwise SELECTED is returned
only if there is enough remaining blob gas to fit the blobs of the tx, otherwise a specific not
selected result is returned, depending on the fact that the block already contains the max
number of blobs or not.

@param evaluationContext The current selection session data.
@return The result of the transaction selection.
ethereum/blockcreation/src/main/java/org/hyperledger/besu/ethereum/blockcreation/txselection/selectors/BlobSizeTransactionSelector.java