private BlockReplay.TransactionAction<TransactionTrace> prepareReplayAction(
      final MutableWorldState mutableWorldState, final DebugOperationTracer tracer) {
    return (transaction, header, blockchain, transactionProcessor, blobGasPrice) -> {
      // if we have no prior updater, it must be the first TX, so use the block's initial state
      if (chainedUpdater == null) {
        chainedUpdater = mutableWorldState.updater();
      } else {
        chainedUpdater.markTransactionBoundary();
      }
      // create an updater for just this tx
      chainedUpdater = chainedUpdater.updater();
      final TransactionProcessingResult result =
          transactionProcessor.processTransaction(
              chainedUpdater,
              header,
              transaction,
              header.getCoinbase(),
              tracer,
              blockReplay
                  .getProtocolSpec(header)
                  .getBlockHashProcessor()
                  .createBlockHashLookup(blockchain, header),
              blobGasPrice);
      final List<TraceFrame> traceFrames = tracer.copyTraceFrames();
      tracer.reset();
      return new TransactionTrace(transaction, result, traceFrames);
    };
  }
Used to produce debug traces of blocks
ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/processor/BlockTracer.java