In this article we showcase a new way to greatly enhance the cost of the Miller loop and final exponentiation of pairings in circuit by extensively using hints and moving away from the traditional towered extension approach.
It uses a combination of the Fiat-Shamir Heurisitic, the Schwartz-Zippel lemma, and a polynomial commitment scheme.
The work has been done in CairoZero inside the Garaga library^1 for the bn254 curve. Equivalent optimisations to BLS12-381 will be applied in the near future.
1. Coming back to direct extensions
Usually in almost all efficient pairings implementations, a tower of field extension is used to obtain fast formulas for $\mathbb F_{p^{12}}$ arithmetics.
For example, the following tower is used for the Bn254 curve in Gnark^3 :
$$
\begin{aligned}