Skip to content

Commit

Permalink
Update expmod gas schedule, according to ethereum/EIPs@4d4d8fb
Browse files Browse the repository at this point in the history
  • Loading branch information
pirapira committed Jan 19, 2018
1 parent 6bfb464 commit 8235243
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Paper.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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 \\
Expand Down

0 comments on commit 8235243

Please sign in to comment.