Skip to content

Ecmul Precompile#1829

Merged
nicksavers merged 10 commits intoethereum:masterfrom
0xProject:remco/eip-ecmmul-precompile
Mar 7, 2019
Merged

Ecmul Precompile#1829
nicksavers merged 10 commits intoethereum:masterfrom
0xProject:remco/eip-ecmmul-precompile

Conversation

@recmo
Copy link
Contributor

@recmo recmo commented Mar 6, 2019

No description provided.

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
Copy link
Member

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.

Copy link
Member

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.

@@ -0,0 +1,151 @@
---
eip: To be assigned
Copy link
Member

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.

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]>
Copy link
Member

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?

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).
Copy link
Member

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?

@recmo
Copy link
Contributor Author

recmo commented Mar 6, 2019

@axic Thank you! I believe I have addressed all the comments.

@recmo
Copy link
Contributor Author

recmo commented Mar 6, 2019

The Travis error does not seem related to the PR.

@nicksavers nicksavers merged commit b501ba9 into ethereum:master Mar 7, 2019
@vbuterin
Copy link
Contributor

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.

@recmo
Copy link
Contributor Author

recmo commented Mar 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants