@Override
  protected Object resultByBlockNumber(
      final JsonRpcRequestContext requestContext, final long blockNumber) {
    final CallParameter callParams = CallParameterUtil.validateAndGetCallParams(requestContext);
    final TraceOptions traceOptions = getTraceOptions(requestContext);
    final String blockNumberString = String.valueOf(blockNumber);
    LOG.atTrace()
        .setMessage("Received RPC rpcName={} callParams={} block={} traceTypes={}")
        .addArgument(this::getName)
        .addArgument(callParams)
        .addArgument(blockNumberString)
        .addArgument(traceOptions)
        .log();

    final Optional<BlockHeader> maybeBlockHeader =
        blockchainQueriesSupplier.get().getBlockHeaderByNumber(blockNumber);

    if (maybeBlockHeader.isEmpty()) {
      return new JsonRpcErrorResponse(requestContext.getRequest().getId(), BLOCK_NOT_FOUND);
    }

    final DebugOperationTracer tracer = new DebugOperationTracer(traceOptions, recordChildCallGas);
    return transactionSimulator
        .process(
            callParams,
            buildTransactionValidationParams(),
            tracer,
            getSimulatorResultHandler(requestContext, tracer),
            maybeBlockHeader.get())
        .orElseGet(
            () -> new JsonRpcErrorResponse(requestContext.getRequest().getId(), INTERNAL_ERROR));
  }
A flag to indicate if call operations should trace just the operation cost (false, Geth style,
debug_ series RPCs) or the operation cost and all gas granted to the child call (true, Parity
style, trace_ series RPCs)
ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/AbstractTraceCall.java