Skip to content
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

Merged
merged 17 commits into from Aug 22, 2023
Merged

Conversation

hujw77
Copy link
Contributor

@hujw77 hujw77 commented May 10, 2023

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 and 37.8 MGas/s for BNPAIR). Following are the proposed methods to time the precompile operations:

  • G1 addition: Average timing of 1000 random samples.
  • G1 multiplication: Average timing of 1000 samples of random worst-case of double-and-add algorithm (scalar of max bit length and max hamming weight and random base points in G1)
  • G2 addition: Average timing of 1000 random samples
  • G2 multiplication: Average timing of 1000 samples of radnom worst-case of double-and-add algorithm (scalar of max bit length and max hamming weight and random base points in G2)
  • G1 and G2 multiexponentiations: Expected to be performed by the Peppinger algorithm, with a table prepared for discount in case of k <= 128 points in the multiexponentiation with a discount cup max_discount for k > 128. To avoid non-integer arithmetic call cost is calculated as k * multiplication_cost * discount / multiplier where multiplier = 1000, k is a number of (scalar, point) pairs for the call, multiplication_cost is a corresponding single multiplication call cost for G1/G2.
  • Pairing: Average timing of 1000 random samples (random points in G1 and G2) for different number of pairs with linear lifting.

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

@hujw77 hujw77 requested a review from eth-bot as a code owner May 10, 2023 08:50
@github-actions github-actions bot added c-update Modifies an existing proposal s-stagnant This EIP is Stagnant t-core labels May 10, 2023
@eth-bot
Copy link
Collaborator

eth-bot commented May 10, 2023

File EIPS/eip-3026.md

Requires 1 more reviewers from @iAmMichaelConnor, @yelhousni
Requires 1 more reviewers from @axic, @g11tech, @gcolvin, @lightclient, @Pandapip1, @SamWilsn

@eth-bot eth-bot added the a-review Waiting on author to review label May 10, 2023
@github-actions github-actions bot added w-ci Waiting on CI to pass and removed w-ci Waiting on CI to pass labels May 10, 2023
@github-actions github-actions bot added the w-ci Waiting on CI to pass label May 10, 2023
@github-actions github-actions bot removed the w-ci Waiting on CI to pass label May 10, 2023
@lightclient
Copy link
Member

@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?

EIPS/eip-3026.md Outdated Show resolved Hide resolved
EIPS/eip-3026.md Outdated Show resolved Hide resolved
@iAmMichaelConnor
Copy link

@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?

@github-actions github-actions bot added c-status Changes a proposal's status s-draft This EIP is a Draft and removed c-update Modifies an existing proposal s-stagnant This EIP is Stagnant labels Aug 1, 2023
@eth-bot eth-bot changed the title Update EIP-3026: Gas meter Update EIP-3026: Move to Draft Aug 1, 2023
@github-actions github-actions bot added the w-ci Waiting on CI to pass label Aug 1, 2023
@github-actions
Copy link

github-actions bot commented Aug 1, 2023

The commit c408acf (as a parent of ef17098) contains errors.
Please inspect the Run Summary for details.

Copy link
Contributor

@SamWilsn SamWilsn left a 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.

@SamWilsn SamWilsn merged commit e11f887 into ethereum:master Aug 22, 2023
9 of 10 checks passed
streamnft-tech pushed a commit to streamnft-tech/EIPs that referenced this pull request Oct 27, 2023
* EIP-3026 gas meter

* Update

* Update

* Update

* Lint

* Lint

* Update

* Update

* Update
RaphaelHardFork pushed a commit to RaphaelHardFork/EIPs that referenced this pull request Jan 30, 2024
* EIP-3026 gas meter

* Update

* Update

* Update

* Lint

* Lint

* Update

* Update

* Update
just-a-node pushed a commit to connext/EIPs that referenced this pull request Feb 17, 2024
* EIP-3026 gas meter

* Update

* Update

* Update

* Lint

* Lint

* Update

* Update

* Update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-review Waiting on author to review c-status Changes a proposal's status s-draft This EIP is a Draft t-core w-ci Waiting on CI to pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants