From 82352435fdd4a756173d3ec27010bc27bc8ecfbb Mon Sep 17 00:00:00 2001 From: Yoichi Hirai Date: Mon, 24 Jul 2017 11:38:34 +0200 Subject: [PATCH] Update expmod gas schedule, according to https://github.com/ethereum/EIPs/commit/4d4d8fb --- Paper.tex | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Paper.tex b/Paper.tex index dcdd60d9..36131d4e 100644 --- a/Paper.tex +++ b/Paper.tex @@ -1407,7 +1407,12 @@ \section{Precompiled Contracts}\label{app:precompiled} \begin{eqnarray} \Xi_{\mathtt{EXPMOD}} &\equiv& \Xi_{\mathtt{PRE}} \quad \text{except:} \\ -g_r &=& \Big\lfloor\frac{\max(\ell_M,\ell_B)^2\max(\ell'_E,1)}{G_{quaddivisor}}\Big\rfloor \\ +g_r &=& \Big\lfloor\frac{f\big(\max(\ell_M,\ell_B)\big)\max(\ell'_E,1)}{G_{quaddivisor}}\Big\rfloor \\ +f(x) &\equiv& \begin{cases} +x^2 & \text{if}\ x \le 64 \\ +\Big\lfloor\dfrac{x^2}{4}\Big\rfloor + 96 x - 3072 & \text{if}\ 64 < x \le 1024 \\ +\Big\lfloor\dfrac{x^2}{16}\Big\rfloor + 480x - 199680 & \text{otherwise} +\end{cases}\\ \ell'_E &=& \begin{cases} 0 & \text{if}\ \ell_E\le 32\wedge E=0 \\ \lfloor \log_2(E)\rfloor &\text{if}\ \ell_E\le 32 \wedge E \neq 0 \\