public <U> Optional<U> process(
      final CallParameter callParams,
      final Optional<StateOverrideMap> maybeStateOverrides,
      final TransactionValidationParams transactionValidationParams,
      final OperationTracer operationTracer,
      final PreCloseStateHandler<U> preWorldStateCloseGuard,
      final BlockHeader header) {
    if (header == null) {
      return Optional.empty();
    }

    try (final MutableWorldState ws = getWorldState(header)) {

      WorldUpdater updater = getEffectiveWorldStateUpdater(ws);
      if (ws instanceof BonsaiWorldState bonsaiWorldState) {
        bonsaiWorldState.disableCacheMerkleTrieLoader();
      }
      // in order to trace the state diff we need to make sure that
      // the world updater always has a parent
      if (operationTracer instanceof DebugOperationTracer) {
        updater = updater.parentUpdater().isPresent() ? updater : updater.updater();
      }

      final var miningBeneficiary =
          protocolSchedule
              .getByBlockHeader(header)
              .getMiningBeneficiaryCalculator()
              .calculateBeneficiary(header);

      return preWorldStateCloseGuard.apply(
          ws,
          processWithWorldUpdater(
              callParams,
              maybeStateOverrides,
              transactionValidationParams,
              operationTracer,
              header,
              updater,
              miningBeneficiary));

    } catch (final Exception e) {
      return Optional.empty();
    }
  }
Processes a transaction simulation with the provided parameters and executes pre-worldstate
close actions.

@param callParams The call parameters for the transaction.
@param maybeStateOverrides The map of state overrides to apply to the state for this
    transaction.
@param transactionValidationParams The validation parameters for the transaction.
@param operationTracer The tracer for capturing operations during processing.
@param preWorldStateCloseGuard The pre-worldstate close guard for executing pre-close actions.
@param header The block header.
@return An Optional containing the result of the processing.
ethereum/core/src/main/java/org/hyperledger/besu/ethereum/transaction/TransactionSimulator.java