-
Notifications
You must be signed in to change notification settings - Fork 114
test(systemtests): add appside mempool e2e test #580
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
Merged
Merged
Changes from 36 commits
Commits
Show all changes
52 commits
Select commit
Hold shift + click to select a range
6e76883
test(mempool): setup e2e test suite for mempool testing
cloudgray 8b68d43
WIP
cloudgray 7ae8b16
test(mempool): refactor test
cloudgray 6700051
test(mempool): refactor system test suite
cloudgray 3681758
test(systemtest): refactor mempool test
cloudgray b41028a
Merge branch 'main' into teest/appside-mempool-e2e
cloudgray d8368f1
Merge branch 'main' into teest/appside-mempool-e2e
cloudgray 87ec45e
test(systemtests): add cosmosClient
cloudgray 51cb60f
test(systemtests): refactor mempool test
cloudgray 2d41eeb
test(systemtests): refactor mempool test
cloudgray a4d24e2
test(systemtests): refactor mempool test
cloudgray f552c38
test(systemtests): add txpool content verification to mempool tests
cloudgray 173541c
test(systemtests): fix mempool test suite
cloudgray adc5533
test(systemtests): fix mempool test suite
cloudgray 6a3b03e
test(systemtests): fix mempool tests
cloudgray 6d8d240
test(systemtests): fix mempool test suite
cloudgray 14ef6a9
test(systemtests): fix mempool test suite
cloudgray 9fbe143
test(systemtests): fix mempool test suite
cloudgray 48de3af
test(systemtests): add mempool test cases
cloudgray e33650a
test(systemtests): add comments
cloudgray a4fe745
test(systemtests): chore: enable replacement tests
cloudgray 25e65d4
chore: modify names of test cases
cloudgray 8f5d4a4
test(systemtests): enhance helper functions
cloudgray 06fc10a
test(systemtests): fix mempool test
cloudgray ac74377
chore(systemtests): change test name and add readme.md
cloudgray 230e422
Merge branch 'main' into teest/appside-mempool-e2e
cloudgray de46b7f
chore: update CHANGELOG.md
cloudgray bf6db75
fix(proto): restore removed data field during merge
cloudgray 2ecece2
test(systemtests): refactor
cloudgray 58d1e7d
test(systemtests): fix map iteration
cloudgray e6085fd
chore(systemtests): fix build tag
cloudgray 1c55fb9
test(systemtests): add test case for mempool
cloudgray a55ad3d
test(systemtests): fix map iteration
cloudgray d139dd7
test(systemtests): refactor and add test case for --minimum-gas-price…
cloudgray ffbb84d
test(systemtests): enhance validation
cloudgray 57a8d10
Merge branch 'main' into teest/appside-mempool-e2e
aljo242 d089213
fix: restore removed changes from merge
cloudgray f4fe8af
fix: restore removed changes from merge
cloudgray 88d36bc
fix: restore removed changes from merge
cloudgray 95c6dfd
fix: restore removed changes from merge
cloudgray e566f7a
chore(systemtests): rename test suite hooks
cloudgray 58e97d8
fix(systemtests): fix test cases
cloudgray 5d2b2fd
Merge branch 'main' into teest/appside-mempool-e2e
cloudgray 14a4cf8
chore: modify mempool e2e test README.md
cloudgray 23d361d
test(systemtests): enhance post check of mempool test
cloudgray 11c6152
chore: apply codeQL feedback
cloudgray c08dee6
Merge branch 'main' into teest/appside-mempool-e2e
vladjdk 1ad3a2e
Merge branch 'main' into teest/appside-mempool-e2e
cloudgray 7ee7940
chore: update tests/systemtests/go.sum
cloudgray cacee64
chore: go mod tidy
cloudgray 217732e
fix(rpc): SendRawTransaction doesn't return error when tx.nonce is lo…
cloudgray d00de60
chore(systemtests): remove unused fields of RPCTransaction type
cloudgray File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| # Getting started with a new system test | ||
|
|
||
| ## Overview | ||
|
|
||
| The systemtests suite is an end-to-end test suite that runs the evmd process and sends RPC requests from separate Ethereum/Cosmos clients. The systemtests for cosmos/evm use the `cosmossdk.io/systemtests` package by default. For more details, please refer to https://github.com/cosmos/cosmos-sdk/tree/main/tests/systemtests. | ||
|
|
||
| ## Preparation | ||
|
|
||
| Build a new binary from current branch and copy it to the `tests/systemtests/binaries` folder by running system tests. | ||
|
|
||
| ```shell | ||
| make test-system | ||
| ``` | ||
|
|
||
| Or via manual steps | ||
|
|
||
| ```shell | ||
| make build | ||
| mkdir -= ./tests/systemtests/binaries | ||
| cp ./build/evmd ./tests/systemtests/binaries | ||
| cp ./build/evmd ./tests/systemtests/binaries/v0.4 | ||
| ``` | ||
|
|
||
| ## Run Individual test | ||
|
|
||
| ### Run test cases for txs ordering | ||
|
|
||
| ```shell | ||
| go test -p 1 -parallel 1 -mod=readonly -tags='system_test' -v ./... | ||
| --run TestTxsOrdering --verbose --binary evmd --block-time 5s --chain-id local-4221 | ||
| ``` | ||
|
|
||
| ### Run test cases for txs replacement | ||
|
|
||
| ```shell | ||
| go test -p 1 -parallel 1 -mod=readonly -tags='system_test' -v ./... | ||
| --run TestTxsReplacement --verbose --binary evmd --block-time 5s --chain-id local-4221 | ||
| ``` | ||
|
|
||
| ### Run test exceptions | ||
|
|
||
| ```shell | ||
| go test -p 1 -parallel 1 -mod=readonly -tags='system_test' -v ./... | ||
| --run TestExceptions --verbose --binary evmd --block-time 5s --chain-id local-4221 | ||
| ``` | ||
|
|
||
| ## Run Entire test | ||
|
|
||
| ```shell | ||
| make test | ||
| ``` |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| package clients | ||
|
|
||
| import ( | ||
| "fmt" | ||
| "math/big" | ||
| ) | ||
|
|
||
| /** | ||
| # ---------------- dev mnemonics source ---------------- | ||
| # dev0 address 0xC6Fe5D33615a1C52c08018c47E8Bc53646A0E101 | cosmos1cml96vmptgw99syqrrz8az79xer2pcgp84pdun | ||
| # dev0's private key: 0x88cbead91aee890d27bf06e003ade3d4e952427e88f88d31d61d3ef5e5d54305 # gitleaks:allow | ||
|
|
||
| # dev1 address 0x963EBDf2e1f8DB8707D05FC75bfeFFBa1B5BaC17 | cosmos1jcltmuhplrdcwp7stlr4hlhlhgd4htqh3a79sq | ||
| # dev1's private key: 0x741de4f8988ea941d3ff0287911ca4074e62b7d45c991a51186455366f10b544 # gitleaks:allow | ||
|
|
||
| # dev2 address 0x40a0cb1C63e026A81B55EE1308586E21eec1eFa9 | cosmos1gzsvk8rruqn2sx64acfsskrwy8hvrmafqkaze8 | ||
| # dev2's private key: 0x3b7955d25189c99a7468192fcbc6429205c158834053ebe3f78f4512ab432db9 # gitleaks:allow | ||
|
|
||
| # dev3 address 0x498B5AeC5D439b733dC2F58AB489783A23FB26dA | cosmos1fx944mzagwdhx0wz7k9tfztc8g3lkfk6rrgv6l | ||
| # dev3's private key: 0x8a36c69d940a92fcea94b36d0f2928c7a0ee19a90073eda769693298dfa9603b # gitleaks:allow | ||
| */ | ||
|
|
||
| const ( | ||
| ChainID = "local-4221" | ||
| EVMChainID = "262144" | ||
|
|
||
| Acc0PrivKey = "88cbead91aee890d27bf06e003ade3d4e952427e88f88d31d61d3ef5e5d54305" | ||
| Acc1PrivKey = "741de4f8988ea941d3ff0287911ca4074e62b7d45c991a51186455366f10b544" | ||
| Acc2PrivKey = "3b7955d25189c99a7468192fcbc6429205c158834053ebe3f78f4512ab432db9" | ||
| Acc3PrivKey = "8a36c69d940a92fcea94b36d0f2928c7a0ee19a90073eda769693298dfa9603b" | ||
|
|
||
| JsonRPCUrl0 = "http://127.0.0.1:8545" | ||
| JsonRPCUrl1 = "http://127.0.0.1:8555" | ||
| JsonRPCUrl2 = "http://127.0.0.1:8565" | ||
| JsonRPCUrl3 = "http://127.0.0.1:8575" | ||
|
|
||
| NodeRPCUrl0 = "http://127.0.0.1:26657" | ||
| NodeRPCUrl1 = "http://127.0.0.1:26658" | ||
| NodeRPCUrl2 = "http://127.0.0.1:26659" | ||
| NodeRPCUrl3 = "http://127.0.0.1:26660" | ||
| ) | ||
|
|
||
| type Config struct { | ||
| ChainID string | ||
| EVMChainID *big.Int | ||
| PrivKeys []string | ||
| JsonRPCUrls []string | ||
| NodeRPCUrls []string | ||
| } | ||
|
|
||
| // NewConfig creates a new Config instance. | ||
| func NewConfig() (*Config, error) { | ||
| // evm chainID | ||
| evmChainID, ok := new(big.Int).SetString(EVMChainID, 10) | ||
| if !ok { | ||
| return nil, fmt.Errorf("error whilte setting chain id") | ||
| } | ||
|
|
||
| // private keys of test accounts | ||
| privKeys := []string{Acc0PrivKey, Acc1PrivKey, Acc2PrivKey, Acc3PrivKey} | ||
|
|
||
| // jsonrpc urls of testnet nodes | ||
| jsonRPCUrls := []string{JsonRPCUrl0, JsonRPCUrl1, JsonRPCUrl2, JsonRPCUrl3} | ||
|
|
||
| // rpc urls of test nodes | ||
| nodeRPCUrls := []string{NodeRPCUrl0, NodeRPCUrl1, NodeRPCUrl2, NodeRPCUrl3} | ||
|
|
||
| return &Config{ | ||
| ChainID: ChainID, | ||
| EVMChainID: evmChainID, | ||
| PrivKeys: privKeys, | ||
| JsonRPCUrls: jsonRPCUrls, | ||
| NodeRPCUrls: nodeRPCUrls, | ||
| }, nil | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.