@NotNull
  @Override
  public PrecompileContractResult computePrecompile(
      final Bytes input, @NotNull final MessageFrame messageFrame) {

    PrecompileInputResultTuple res = null;

    Integer cacheKey = null;

    if (enableResultCaching) {
      cacheKey = AbstractPrecompiledContract.getCacheKey(input);
      res = getCache().getIfPresent(cacheKey);
      if (res != null) {
        if (res.cachedInput().equals(input)) {
          cacheEventConsumer.accept(
              new AbstractPrecompiledContract.CacheEvent(
                  name, AbstractPrecompiledContract.CacheMetric.HIT));
          return res.cachedResult();
        } else {
          LOG.debug(
              "false positive {} {}, cache key {}, cached input: {}, input: {}",
              name,
              input.getClass().getSimpleName(),
              cacheKey,
              res.cachedInput().toHexString(),
              input.toHexString());

          cacheEventConsumer.accept(
              new AbstractPrecompiledContract.CacheEvent(
                  name, AbstractPrecompiledContract.CacheMetric.FALSE_POSITIVE));
        }
      } else {
        cacheEventConsumer.accept(
            new AbstractPrecompiledContract.CacheEvent(
                name, AbstractPrecompiledContract.CacheMetric.MISS));
      }
    }

    final byte[] result = new byte[LibGnarkEIP2537.EIP2537_PREALLOCATE_FOR_RESULT_BYTES];
    final byte[] error = new byte[LibGnarkEIP2537.EIP2537_PREALLOCATE_FOR_ERROR_BYTES];

    final IntByReference o_len =
        new IntByReference(LibGnarkEIP2537.EIP2537_PREALLOCATE_FOR_RESULT_BYTES);
    final IntByReference err_len =
        new IntByReference(LibGnarkEIP2537.EIP2537_PREALLOCATE_FOR_ERROR_BYTES);

    final int inputSize = Math.min(inputLimit, input.size());
    final int errorNo =
        LibGnarkEIP2537.eip2537_perform_operation(
            operationId,
            input.slice(0, inputSize).toArrayUnsafe(),
            inputSize,
            result,
            o_len,
            error,
            err_len);

    if (errorNo == 0) {
      res =
          new PrecompileInputResultTuple(
              enableResultCaching ? input.copy() : input,
              PrecompileContractResult.success(Bytes.wrap(result, 0, o_len.getValue())));
    } else {
      final String errorMessage = new String(error, 0, err_len.getValue(), UTF_8);
      messageFrame.setRevertReason(Bytes.wrap(error, 0, err_len.getValue()));
      LOG.trace("Error executing precompiled contract {}: '{}'", name, errorMessage);
      res =
          new PrecompileInputResultTuple(
              enableResultCaching ? input.copy() : input,
              PrecompileContractResult.halt(
                  null, Optional.of(ExceptionalHaltReason.PRECOMPILE_ERROR)));
    }

    if (enableResultCaching && cacheKey != null) {
      getCache().put(cacheKey, res);
    }
    return res.cachedResult();
  }
Is bls12 supported on this platform

@return true if the native library was loaded.
evm/src/main/java/org/hyperledger/besu/evm/precompile/AbstractBLS12PrecompiledContract.java