From 0f20cd1a52c2a93c586e44625fba18c4f0997741 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Moraczy=C5=84ski?= Date: Fri, 6 Dec 2024 11:58:20 +0100 Subject: [PATCH 1/6] [EIP-2537] Gas pricing MUL and ADD operations --- EIPS/eip-2537.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/EIPS/eip-2537.md b/EIPS/eip-2537.md index 66351841c9a8b..96d5a28d382ea 100644 --- a/EIPS/eip-2537.md +++ b/EIPS/eip-2537.md @@ -253,11 +253,11 @@ 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 @@ -265,11 +265,11 @@ Assuming a constant `30 MGas/second`, the following prices are suggested. #### G2 addition -`800` gas +`600` gas #### G2 multiplication -`45000` gas +`22500` gas #### G1/G2 MSM From 02a7adfc2b87700c54ac8d91c9f98ed76a471ac2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Moraczy=C5=84ski?= Date: Fri, 6 Dec 2024 15:30:56 +0100 Subject: [PATCH 2/6] Fp-to-G1 --- EIPS/eip-2537.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/eip-2537.md b/EIPS/eip-2537.md index 96d5a28d382ea..c4599524a6cb2 100644 --- a/EIPS/eip-2537.md +++ b/EIPS/eip-2537.md @@ -291,7 +291,7 @@ 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 From 33434ec4f686a329e68dce12e7308e2fc01b7676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Moraczy=C5=84ski?= Date: Fri, 6 Dec 2024 21:07:06 +0100 Subject: [PATCH 3/6] Update EIP-2537: Gas pricing FP2-to-G2 mapping --- EIPS/eip-2537.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/eip-2537.md b/EIPS/eip-2537.md index c4599524a6cb2..94911e0d03f91 100644 --- a/EIPS/eip-2537.md +++ b/EIPS/eip-2537.md @@ -295,7 +295,7 @@ Fp -> G1 mapping is `4125` gas. #### Fp2-to-G2 mapping operation -Fp2 -> G2 mapping is `75000` gas +Fp2 -> G2 mapping is `15000` gas #### Gas schedule clarifications for the variable-length input From 439d8fab81ebfef7c0343ec72b4ae04436c213b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Moraczy=C5=84ski?= Date: Fri, 6 Dec 2024 21:13:44 +0100 Subject: [PATCH 4/6] Update eip-2537.md --- EIPS/eip-2537.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/eip-2537.md b/EIPS/eip-2537.md index 94911e0d03f91..6adb1934db8dc 100644 --- a/EIPS/eip-2537.md +++ b/EIPS/eip-2537.md @@ -295,7 +295,7 @@ Fp -> G1 mapping is `4125` gas. #### Fp2-to-G2 mapping operation -Fp2 -> G2 mapping is `15000` gas +Fp2 -> G2 mapping is `14055` gas #### Gas schedule clarifications for the variable-length input From dfc68a715c29bcb46cef66cd4f7fe9503227e038 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Moraczy=C5=84ski?= Date: Mon, 9 Dec 2024 11:19:37 +0100 Subject: [PATCH 5/6] Update eip-2537.md --- EIPS/eip-2537.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/eip-2537.md b/EIPS/eip-2537.md index 6adb1934db8dc..8c1b126b994d7 100644 --- a/EIPS/eip-2537.md +++ b/EIPS/eip-2537.md @@ -295,7 +295,7 @@ Fp -> G1 mapping is `4125` gas. #### Fp2-to-G2 mapping operation -Fp2 -> G2 mapping is `14055` gas +Fp2 -> G2 mapping is `17000` gas #### Gas schedule clarifications for the variable-length input From 92c94cfe46de9888298e5a183e7fd85932fc51ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Moraczy=C5=84ski?= Date: Wed, 11 Dec 2024 14:32:38 +0100 Subject: [PATCH 6/6] Update eip-2537.md --- EIPS/eip-2537.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/EIPS/eip-2537.md b/EIPS/eip-2537.md index 8c1b126b994d7..beabc85dced3a 100644 --- a/EIPS/eip-2537.md +++ b/EIPS/eip-2537.md @@ -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 `4125` gas. +Fp -> G1 mapping is `5500` gas. #### Fp2-to-G2 mapping operation -Fp2 -> G2 mapping is `17000` gas +Fp2 -> G2 mapping is `23800` gas #### Gas schedule clarifications for the variable-length input