-
Notifications
You must be signed in to change notification settings - Fork 864
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
EIP-2315 change gascosts and update opcode #995
EIP-2315 change gascosts and update opcode #995
Conversation
Signed-off-by: Karim TAAM <[email protected]>
Signed-off-by: Karim TAAM <[email protected]>
Signed-off-by: Karim TAAM <[email protected]>
@@ -36,7 +36,7 @@ public AbstractPrecompiledContractTest( | |||
registryFactory | |||
.apply( | |||
new PrecompiledContractConfiguration( | |||
new BerlinGasCalculator(), PrivacyParameters.DEFAULT)) |
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'm not sure about this, would love other opinions, but do we want to still have a BerlinGasCalculator
that just delegates to IstanbulGasCalculator
? I think it makes it more obvious which parts of the code have been updated if we use this convention.
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.
That thought crossed my mind. However I think making a no-op gas calculator might imply to the casual reader that there were gas cost changes in Berlin when in fact there are not currently.
If the two gas cost EIPs do make an appearance we can return it.
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 also had a doubt regarding this part. but I think that if we don't change anything it's not useful to have a GasCalculator per fork but only when we change something IMO
Change gascosts - JUMPSUB -> 10 (high tier gas cost) - RETURNSUB -> 5 (low tier gas cost) - BEGINSUB -> 2 (base tier gas cost) Update opcode - 0x5c BEGINSUB - 0x5d RETURNSUB - 0x5e JUMPSUB Signed-off-by: Karim TAAM <[email protected]> Signed-off-by: Sally MacFarlane <[email protected]>
Signed-off-by: Karim TAAM [email protected]
PR description
Change gascosts (2315: changes in gascosts ethereum/EIPs#2676)
Remove useless BerlinGasCalculator
Update opcode (EIP2315: update opcodes ethereum/EIPs#2682)