[ETCM-912] Magneto gas changes for BALANCE and *CALL codes#1084
[ETCM-912] Magneto gas changes for BALANCE and *CALL codes#1084lukasz-golebiewski merged 6 commits intodevelopfrom
Conversation
9bcbb6e to
aa23ecf
Compare
| outOffset: UInt256 = inputData.size, | ||
| outSize: UInt256 = inputData.size / 2 | ||
| outSize: UInt256 = inputData.size / 2, | ||
| toAccessed: Boolean = false |
There was a problem hiding this comment.
Actually, I had to look into the code to understand what this field was about.
I would have prefered something more descriptive like addAddressToAccessList or keepTrackOfAccessAddresses, but I tend to belong to the long-name-team.
There was a problem hiding this comment.
WDYT about toAlreadyAccessed?
|
|
||
| import Fixtures.blockchainConfig | ||
|
|
||
| class MagnetoCallOpFixture(config: EvmConfig) |
There was a problem hiding this comment.
Most of the tests seem to have be taken directly from CallOpcodesSpec.
It could be nice to keep unmodified tests in one place only, and have specific gas ones separated.
It seems to be possible to have something like that:
CallOpCodesCommonBehaviour: with the common testsCallOpCodesSpec: with the pre eip2929 gas testsCallOpCodesSpecPostEip2929: with post eip 2929 gas tests
This kind of separation seems to be possible: https://www.scalatest.org/user_guide/sharing_tests
There was a problem hiding this comment.
I reduced as much duplication as possible, moved common assertions to a trait
| postWarmGasFn: FeeSchedule => BigInt | ||
| ): BigInt = { | ||
| val currentBlockNumber = state.env.blockHeader.number | ||
| val etcFork = state.config.blockchainConfig.etcForkForBlockNumber(currentBlockNumber) |
There was a problem hiding this comment.
do you mind adding a note that ETH needs to be also handled?
aa23ecf to
3740dbd
Compare
3740dbd to
1a3ca6a
Compare
000dc2d to
e487da7
Compare
No description provided.