@Override
  public ValidationResult<TransactionInvalidReason> validate(
      final Transaction transaction,
      final Optional<Wei> baseFee,
      final Optional<Wei> blobFee,
      final TransactionValidationParams transactionValidationParams) {
    final ValidationResult<TransactionInvalidReason> signatureResult =
        validateTransactionSignature(transaction);
    if (!signatureResult.isValid()) {
      return signatureResult;
    }

    final TransactionType transactionType = transaction.getType();
    if (!acceptedTransactionTypes.contains(transactionType)) {
      return ValidationResult.invalid(
          TransactionInvalidReason.INVALID_TRANSACTION_FORMAT,
          String.format(
              "Transaction type %s is invalid, accepted transaction types are %s",
              transactionType, acceptedTransactionTypes));
    }

    if (transaction.getNonce() == MAX_NONCE) {
      return ValidationResult.invalid(
          TransactionInvalidReason.NONCE_OVERFLOW, "Nonce must be less than 2^64-1");
    }

    if (!transactionValidationParams.isAllowExceedingGasLimit()
        && transaction.getGasLimit() > gasLimitCalculator.transactionGasLimitCap()) {
      return ValidationResult.invalid(
          TransactionInvalidReason.EXCEEDS_TRANSACTION_GAS_LIMIT,
          "Transaction gas limit must be at most " + gasLimitCalculator.transactionGasLimitCap());
    }

    if (transactionType.supportsBlob()) {
      final ValidationResult<TransactionInvalidReason> blobTransactionResult =
          validateBlobTransaction(transaction);
      if (!blobTransactionResult.isValid()) {
        LOG.info(
            "Blob transaction {} validation failed: {}",
            transaction.getHash().toHexString(),
            blobTransactionResult.getErrorMessage());
        return blobTransactionResult;
      }

      if (transaction.getBlobsWithCommitments().isPresent()) {
        final ValidationResult<TransactionInvalidReason> blobsResult =
            blobsValidator.validateTransactionsBlobs(transaction);
        if (!blobsResult.isValid()) {
          return blobsResult;
        }
      }
    }

    if (transaction.isContractCreation() && transaction.getPayload().size() > maxInitcodeSize) {
      return ValidationResult.invalid(
          TransactionInvalidReason.INITCODE_TOO_LARGE,
          String.format(
              "Initcode size of %d exceeds maximum size of %s",
              transaction.getPayload().size(), maxInitcodeSize));
    }

    if (transactionType == TransactionType.DELEGATE_CODE) {
      ValidationResult<TransactionInvalidReason> codeDelegationValidation =
          validateCodeDelegation(transaction);
      if (!codeDelegationValidation.isValid()) {
        return codeDelegationValidation;
      }
    }

    return validateCostAndFee(transaction, baseFee, blobFee, transactionValidationParams);
  }
Validates a transaction based on Frontier protocol runtime requirements.

<p>The {@link MainnetTransactionValidator} performs the intrinsic gas cost check on the given
{@link Transaction}.
ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/MainnetTransactionValidator.java