-
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
Ecmul Precompile #1829
Ecmul Precompile #1829
Conversation
EIPS/eip-ecmul-precompile.md
Outdated
discussions-to: https://ethereum-magicians.org/t/ewasm-precompile-for-general-elliptic-curve-math/2581 | ||
status: Draft | ||
type: Core | ||
replaces: EIP-196 (in some cases), EIP 665, EIP 1108 (partially), https://github.com/ethereum/EIPs/issues/603 |
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.
Unfortunately this can only use an EIP number and that must be merged (cannot be an unmerged draft). For #603 I'd suggest you refer to it in a "References" or "Prior art" section.
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 actually don't think the replaces
field is appropriate here. Perhaps it is as field not applicable to the EIP process we're following.
EIPS/eip-ecmul-precompile.md
Outdated
@@ -0,0 +1,151 @@ | |||
--- | |||
eip: To be assigned |
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.
You can change this to 1829 and also rename the file.
EIPS/eip-ecmul-precompile.md
Outdated
status: Draft | ||
type: Core | ||
replaces: EIP-196 (in some cases), EIP 665, EIP 1108 (partially), https://github.com/ethereum/EIPs/issues/603 | ||
author: Remco Bloemen <[email protected]> |
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.
Could order these fields the same way the template has it?
EIPS/eip-ecmul-precompile.md
Outdated
MUL_GAS = ... | ||
``` | ||
|
||
The total gas cost is `BASE_GAS` plus `ADD_GAS` for each $s_i$ that is $1$ and `MUL_GAS` for each $s_i > 1$ ($s_0 = 0$ is free). |
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.
Not sure markdown renders $..$
but you could use backticks instead?
@axic Thank you! I believe I have addressed all the comments. |
The Travis error does not seem related to the PR. |
The thing that has always stopped me from proposing a similar thing is, what happens if someone submits a non-prime modulus? There are different ways to implement elliptic curve addition and multiplication, and in general I don't expect that the different libraries have been tested to ensure that they fail in the same cases when the modulus ends up being composite, and this seems like a large and deep potential source of consensus failures. Unfortunately primality tests that take into account weird edge cases like Carmichael numbers but are also clean and efficient don't really exist. |
EDIT: Response moved to the discussion thread to keep the conversation in one place: https://ethereum-magicians.org/t/precompile-for-general-elliptic-curve-linear-combinations/2581/14?u=recmo |
No description provided.