-
Notifications
You must be signed in to change notification settings - Fork 2.2k
EIP198 - Bigint modexp precompiled contract #4028
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #4028 +/- ##
===========================================
+ Coverage 65.1% 65.43% +0.33%
===========================================
Files 308 309 +1
Lines 22552 22670 +118
===========================================
+ Hits 14683 14835 +152
+ Misses 7869 7835 -34
Continue to review full report at Codecov.
|
Looks like the |
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.
Looks good to me.
I don't recall the history here, but why didn't we just add a MODEXP opcode? |
This is actually a good question, @gcolvin. Should we go to EIPs with it to ask for clarification when a features go as opcodes and when as precompiled contracts... |
@gcolvin for this particular function, the reason to choose a precompiled contract over an opcode was because the arguments can be larger than 32 bits and it would be weird to have such an opcode fetch from memory. Furthermore, I think the idea is that as much as possible should go to precompiled contracts instead of opcodes, and precompiled contracts have to be pure functions. |
#3615
ethereum/EIPs#198
boost::multiprecision::powm
is too slow