Skip to content
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

[action] add evm london test #3402

Merged
merged 17 commits into from
Jun 23, 2022

Conversation

huof6829
Copy link
Contributor

@huof6829 huof6829 commented May 20, 2022

Description

add testdata-london for evm London version. see #3081

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • [] Bug fix (non-breaking change which fixes an issue)
  • [] New feature (non-breaking change which adds functionality)
  • [] Code refactor or improvement
  • [] Breaking change (fix or feature that would cause a new or changed behavior of existing functionality)
  • [] This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • [] Test A
  • [] Test B

Test Configuration:

  • Firmware version:
  • Hardware:
  • Toolchain:
  • SDK:

Checklist:

  • [] My code follows the style guidelines of this project
  • [] I have performed a self-review of my code
  • [] I have commented my code, particularly in hard-to-understand areas
  • [] I have made corresponding changes to the documentation
  • [] My changes generate no new warnings
  • [] I have added tests that prove my fix is effective or that my feature works
  • [] New and existing unit tests pass locally with my changes
  • [] Any dependent changes have been merged and published in downstream modules

@huof6829 huof6829 requested a review from a team as a code owner May 20, 2022 15:26
@codecov
Copy link

codecov bot commented May 20, 2022

Codecov Report

Merging #3402 (f8c7554) into master (1f10a0f) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #3402   +/-   ##
=======================================
  Coverage   75.28%   75.28%           
=======================================
  Files         241      241           
  Lines       22258    22258           
=======================================
  Hits        16758    16758           
  Misses       4597     4597           
  Partials      903      903           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1f10a0f...f8c7554. Read the comment docs.

@huof6829
Copy link
Contributor Author

maxtime.json
storage-test.json
storage-test.json
these tests have many storageKeys, consumed gas reduce a lot obviously

@@ -109,6 +109,11 @@ func (ex *Execution) Payload() []byte { return ex.data }
// AccessList returns the access list
func (ex *Execution) AccessList() types.AccessList { return ex.accessList }

// SetAccessList set the access list
func (ex *Execution) SetAccessList(list types.AccessList) {
ex.accessList = list
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

latest master added NewExecutionWithAccessList, pls rebase and use it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, done

@Liuhaai
Copy link
Member

Liuhaai commented Jun 10, 2022

I don't think a new testdata folder is needed for dulplicated data

@huof6829
Copy link
Contributor Author

I don't think a new testdata folder is needed for dulplicated data

evm version is changed and the consumed gas of every contract is different from other version like Istanbul. So add a new dir just for London .

@Liuhaai
Copy link
Member

Liuhaai commented Jun 14, 2022

ok. what are changed in the new folder

they are the same test as in \iceland folder, but running with London EVM with adjusted test result (b/c consumed/returned gas amount changed)

@@ -63,6 +65,7 @@ type (

// GenesisBlockHeight defines an genesis blockHeight
GenesisBlockHeight struct {
IsLondon bool `json:"isLondon"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move to line 71

@@ -358,6 +386,9 @@ func (sct *SmartContractTest) prepareBlockchain(

cfg.Chain.TrieDBPath = testTriePath
cfg.ActPool.MinGasPriceStr = "0"
if sct.InitGenesis.IsLondon {
cfg.Genesis.Blockchain.ToBeEnabledBlockHeight = 0
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move to line 407

@@ -1018,6 +1049,86 @@ func TestIstanbulEVM(t *testing.T) {
})
}

func TestLondonEVM(t *testing.T) {
cfg := config.Default
config.SetEVMNetworkID(cfg.Chain.EVMNetworkID)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

config.SetEVMNetworkID is no longer needed after this commit: 7d66698

@@ -0,0 +1,36 @@
{
"initGenesis": {
"isLondon" : true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move to line 6

@@ -0,0 +1,45 @@
{
"initGenesis": {
"isLondon" : true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix all these

@Liuhaai
Copy link
Member

Liuhaai commented Jun 23, 2022

ok. what are changed in the new folder

they are the same test as in \iceland folder, but running with London EVM with adjusted test result (b/c consumed/returned gas amount changed)

The rawbytecode of the contract is different from the one in another folder. So its ok to leave the solidity source code here

@dustinxie dustinxie merged commit 6e33753 into iotexproject:master Jun 23, 2022
@huof6829 huof6829 deleted the evm_testdata_london branch June 24, 2022 01:44
pocockn added a commit to pocockn/iotex-core that referenced this pull request Jul 4, 2022
* upstream/master: (24 commits)
  account type with zero init nonce (iotexproject#3387)
  [api] Separate Server and Server Handler (iotexproject#3485)
  [ioctl] Build hdwallet derive command line into new ioctl (iotexproject#3418)
  [ioctl] Build hdwallet create command line into new ioctl (iotexproject#3470)
  [makefile] add go mod tidy (iotexproject#3471)
  [api] update chain metrics (iotexproject#3484)
  remove config.EVMNetworkID() (iotexproject#3460)
  [filedao] remove checkMasterChainDBFile() (iotexproject#3463)
  [api] add crashlog (iotexproject#3456)
  [api] Move generateBlockMeta to grpcserver.go (iotexproject#3303)
  [ioctl] Build action hash command line into new ioctl (iotexproject#3425)
  [ioctl] Build hdwallet export command line into new ioctl (iotexproject#3423)
  [ioctl] Refactor nodereward command in new ioctl (iotexproject#3416)
  [ioctl] Cleanup TestNewNodeDelegateCmd (iotexproject#3421)
  [blockchain] Remove BoltDBDaoOption (iotexproject#3465)
  remove InMemDaoOption (iotexproject#3464)
  [action] add evm london test (iotexproject#3402)
  [ioctl] create main for ioctl/newcmd (iotexproject#3296)
  [ioctl] Build block bucket command line into new ioctl (iotexproject#3386)
  [ioctl] Build hdwallet import command line into new ioctl (iotexproject#3419)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants