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-2537: Gas pricing MAP, MUL and ADD operations #9097

Merged
merged 6 commits into from
Dec 18, 2024
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions EIPS/eip-2537.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,23 +253,23 @@ A sane implementation of this EIP *should not* contain potential infinite loops

### Gas schedule

Assuming a constant `30 MGas/second`, the following prices are suggested.
Assuming `EcRecover` precompile as a baseline.

#### G1 addition

`500` gas
`375` gas

#### G1 multiplication

`12000` gas

#### G2 addition

`800` gas
`600` gas

#### G2 multiplication

`45000` gas
`22500` gas

#### G1/G2 MSM

Expand All @@ -291,11 +291,11 @@ The cost of the pairing check operation is `43000*k + 65000` where `k` is a numb

#### Fp-to-G1 mapping operation

Fp -> G1 mapping is `5500` gas.
Fp -> G1 mapping is `4125` gas.

#### Fp2-to-G2 mapping operation

Fp2 -> G2 mapping is `75000` gas
Fp2 -> G2 mapping is `14055` gas
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe let's put 15000 here as you have in your NUC benchmarks. This number of from my BLST benchmarks. Considering this was 5x higher originally and nobody complained...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to 17000 based on the feedback from @jwasinger


#### Gas schedule clarifications for the variable-length input

Expand Down
Loading