EIP-1108 updated with the new gas costs#1452
Conversation
We benchmarked Parity client and adjusted proposed new gas costs to the results. (Parity is slower than Go-Ethereum) - proposed `ECADD` cost has been updated to 150 - proposed `ECMUL` cost has been updated to 6 000 - proposed pairing check cost has been updated to 28 300k + 35 450. Pairing check cost has been scaled down by 2.82 factor, since Parity, after the recent updates is `~2.82` times faster for pairing check.
EIPS/eip-1108.md
Outdated
| | Pairing check | `0x08` | 80 000k + 100 000<sup>[2]</sup>| 5 500k + 80 000 | | ||
| | `ECADD` | `0x06` | 500<sup>[1]</sup> | 150 | | ||
| | `ECMUL` | `0x07` | 40 000<sup>[1]</sup> | 6 000 | | ||
| | Pairing check | `0x08` | 80 000k + 100 000<sup>[2]</sup>| 28 300k + 35 450 | |
There was a problem hiding this comment.
Is this really 28300k = 28300000 gas ?
There was a problem hiding this comment.
This is a bit misleading but if you look at the EIP referenced in [2], the cost is expressed as:
The gas costs of the precompiled contract are 80 000 * k + 100 000, where k is the number of points or, equivalently, the length of the input divided by 192.
The k seems like a wrong choice of a letter but we did not want to move away from that notation to do not cause even more confusion.
There was a problem hiding this comment.
To be clear the cost is expressed as 80 000 * k + 100 000. I'd suggest you use the same notation to avoid confusion, that is, do not omit the multiplication sign :)
There was a problem hiding this comment.
Oh, yeah! My fault. Will fix it in a second...
|
@Shadowfiend can you please review and approve if you agree? |
|
Hi! I'm a bot, and I wanted to automerge your PR, but couldn't because of the following issue(s):
|
`k` represents the number of points we want to check the pairing for. The `80 000k` is confusing so we are altering the gas cost to `80 000 * k`
Shadowfiend
left a comment
There was a problem hiding this comment.
Looks good to me, benchmarks are pretty comprehensive as well and glad we can link to them from the EIP; that was a big missing component before.
We benchmarked Parity client and adjusted proposed new gas costs to the
results. (Parity is slower than Go-Ethereum)
ECADDcost has been updated to 150ECMULcost has been updated to 6 000Pairing check cost has been scaled down by 2.82 factor, since Parity,
after the recent updates, is
~2.82times faster for pairing check.