This repository has been archived by the owner on Oct 28, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Fix mainnet and ropsten configs for correct EC precompiles cost #5830
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The cost is not linear anymore due to EIP-1108
gumb0
force-pushed
the
ec-precompiles-istnanbul-config
branch
from
November 18, 2019 11:27
68e838b
to
b88a487
Compare
Codecov Report
@@ Coverage Diff @@
## release/1.7.1 #5830 +/- ##
=================================================
- Coverage 63.88% 63.81% -0.08%
=================================================
Files 358 358
Lines 30596 30596
Branches 3406 3406
=================================================
- Hits 19547 19524 -23
- Misses 9824 9845 +21
- Partials 1225 1227 +2 |
chfast
reviewed
Nov 18, 2019
@@ -47,10 +47,10 @@ R"E( | |||
"0000000000000000000000000000000000000003": { "precompiled": { "name": "ripemd160", "linear": { "base": 600, "word": 120 } } }, | |||
"0000000000000000000000000000000000000004": { "precompiled": { "name": "identity", "linear": { "base": 15, "word": 3 } } }, | |||
"0000000000000000000000000000000000000005": { "precompiled": { "name": "modexp", "startingBlock": "0x42ae50" } }, | |||
"0000000000000000000000000000000000000006": { "precompiled": { "name": "alt_bn128_G1_add", "startingBlock": "0x42ae50", "linear": { "base": 500, "word": 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.
So where is the new cost encoded then?
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.
It's now in the code, because it needs the current block number to figure out the precompile cost
aleth/libethcore/Precompiled.cpp
Line 181 in 403dc90
return _blockNumber < _chainParams.istanbulForkBlock ? 500 : 150; |
chfast
approved these changes
Nov 18, 2019
Oh, this should be still |
chfast
pushed a commit
that referenced
this pull request
Nov 18, 2019
Fix mainnet and ropsten configs for correct EC precompiles cost
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Without this change cost of ECADD and ECADD stays the same in Istanbul.
See also EIP-1108 implementation #5705