-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update EIP-3026: Move to Draft #7006
Conversation
File
|
cefe594
to
e63e4d4
Compare
@hujw77 you're adding yourself as an author to an EIP, can you please have one of the current authors approve this PR so we know it is acceptable to authorize you to make changes to the EIP? |
No objection from me! This has fallen far down my priority list since we began the EIP, so it's nice to see someone else take it up. @yelhousni any objections? |
The commit c408acf (as a parent of ef17098) contains errors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see the approval comment from @iAmMichaelConnor.
To make editing this a bit easier on @hujw77, I'm going to override the bot and allow this to merge. Please do fix all of the errors on the Checks tab.
* EIP-3026 gas meter * Update * Update * Update * Lint * Lint * Update * Update * Update
* EIP-3026 gas meter * Update * Update * Update * Lint * Lint * Update * Update * Update
* EIP-3026 gas meter * Update * Update * Update * Lint * Lint * Update * Update * Update
* EIP-3026 gas meter * Update * Update * Update * Lint * Lint * Update * Update * Update
* EIP-3026 gas meter * Update * Update * Update * Lint * Lint * Update * Update * Update
Gas estimation repo
https://github.com/hujw77/eip-test-gen/tree/main/eip-3026
Gas estimation strategy
Gas cost is derived by taking the average timing of the same operations over different implementations and assuming a constant
51 MGas/second
. Since the execution time is machine-specific, this constant is determined based on execution times of ECRECOVER and BNPAIR precompiles on my machine and their proposed gas price (63.8 MGas/s
for ECRECOVER and37.8 MGas/s
for BNPAIR). Following are the proposed methods to time the precompile operations:k <= 128
points in the multiexponentiation with a discount cupmax_discount
fork > 128
. To avoid non-integer arithmetic call cost is calculated ask * multiplication_cost * discount / multiplier
wheremultiplier = 1000
,k
is a number of (scalar, point) pairs for the call,multiplication_cost
is a corresponding single multiplication call cost for G1/G2.Gas estimation result
https://github.com/hujw77/eip-test-gen/blob/main/eip-3026/benches/BENCHMARKS.md
https://github.com/hujw77/eip-test-gen/blob/main/eip-3026/gas-meter/benches.md