protected int getG2Discount(final int k) {
    // `k * multiplication_cost * discount / multiplier` where `multiplier = 1000`
    // multiplication_cost and multiplier are folded into one constant as a long and placed first to
    // prevent int32 overflow
    // there was a table prepared for discount in case of k <= 128 points in the multiexponentiation
    // with a discount cup max_discount for k > 128.

    if (k >= G2_DISCOUNT_TABLE.length) {
      return G2_MAX_DISCOUNT;
    }
    return G2_DISCOUNT_TABLE[k];
  }
Gets G2 MSM discount.

@param k the k
@return the discount
evm/src/main/java/org/hyperledger/besu/evm/precompile/AbstractBLS12PrecompiledContract.java