-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Implement EIP-2046 Reduced gas cost for static calls made to precompiles in LegacyVM #5699
Conversation
6e05686
to
f2d070e
Compare
Codecov Report
@@ Coverage Diff @@
## master #5699 +/- ##
==========================================
+ Coverage 63.85% 63.92% +0.06%
==========================================
Files 359 359
Lines 30609 30667 +58
Branches 3406 3410 +4
==========================================
+ Hits 19545 19603 +58
Misses 9838 9838
Partials 1226 1226 |
This is also not accepted yet, so shouldn't be merged. |
56e933d
to
fffd80e
Compare
This is rebased and ready for review. |
fffd80e
to
13e0660
Compare
Rebased once again and updated changelog. |
|
||
void testCallHasCorrectCost() | ||
{ | ||
// let r := call(10000, 0x4, 0, 0, 0, 0, 0) |
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.
(Nit) can we document these args e.g.:
call(10000 /* gas /, 0x4 / address /, 0 / value */, ...)
Makes the test code a little more readable 😀
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, just one minor question/comment 😀
@halfalicious Thanks for the review, this shouldn't be merged yet, as this EIP was not accepted for Istanbul, but probably will go into the next hard fork. I will either put it into Experimental fork or create a new EVMSchedule for Berlin, next hard fork. |
95e11aa
to
6308d72
Compare
Rebased. |
6308d72
to
2f1464b
Compare
Moved to Berlin fork. |
daf150f
to
e2d46b3
Compare
Reduced gas cost for static calls made to precompiles.
e2d46b3
to
b92624b
Compare
b92624b
to
df6a681
Compare
https://eips.ethereum.org/EIPS/eip-2046
Note that it puts repricing behind account versioning, i.e. reduced cost will be in effect only in contracts deployed with external transaction after Istanbul fork.If it's decided that it should be in effect for version 0, we'll need to introduce anotherEVMSchedule
("between" currentConstantinopleFixSchedule
andIstanbulSchedule
)Account versioning is disabled in Istanbul.