-
Notifications
You must be signed in to change notification settings - Fork 111
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
ci: 2598 artillery based stress testing is inaccurate due to misconfiguration #2953
ci: 2598 artillery based stress testing is inaccurate due to misconfiguration #2953
Conversation
… protocol (#2904) * e2e tests and modifications for authenticated call * extend test with sender check and revert case * separate tests into separate files * cleanup * withdraw and call support and tests * bump protocol contracts * split tests into separate files * small cleanup * fmt * generate * lint * changelog * PR comments * fix case in proto * bump vote inbound gas limit in zetaclient * fix test * generate * fixing tests * call options non empty * generate * test fix * rename gateway caller * pr comments rename tests * PR comment * generate * tests * update tests fixes * tests fixes * fix * test fix
* feat: bank precompile * feat: add deposit * feat: extend deposit * PoC: spend amount on behalf of EOA * feat: expand deposit with transferFrom * use CallEVM instead on ZRC20 bindings * divide the contract into different files * initialize e2e testing * remove duplicated funding * add codecov * expand e2e * fix: wait for deposit tx to be mined * apply first round of reviews * cover al error types test * fixes using time.Since * Include CallContract interface * fix eth events in deposit precompile method * emit Deposit event * add withdraw function * finalize withdraw * pack event arguments generically * add high level event function * first round of review fixes * second round of reviews * create bank account when instantiating bank * e2e: add good and bad scenarios * modify fmt * chore: group input into eventData struct * docs: document bank's methods * chore: generate files with suffix .gen.go * chore: assert errors with errorIs * chore: reset e2e test by resetting allowance * test: add first batch of unit test * test: cover all cases * test: complete unit test cases * include review suggestions * include e2e through contract * test: add e2e through contract complete * test: revert balance between tests * Update precompiles/bank/const.go Co-authored-by: Lucas Bertrand <lucas.bertrand.22@gmail.com> * fix: changed coin denom --------- Co-authored-by: skosito <skostic9242@gmail.com> Co-authored-by: Lucas Bertrand <lucas.bertrand.22@gmail.com>
* e2e tests and modifications for authenticated call * extend test with sender check and revert case * separate tests into separate files * cleanup * withdraw and call support and tests * bump protocol contracts * split tests into separate files * small cleanup * fmt * generate * lint * changelog * PR comments * fix case in proto * bump vote inbound gas limit in zetaclient * fix test * generate * fixing tests * call options non empty * generate * test fix * rename gateway caller * pr comments rename tests * PR comment * generate * tests * add sender in test contract * extend e2e tests * generate * changelog * PR comment * generate * update tests fixes * tests fixes * fix * test fix * gas limit fixes * PR comment fix * fix bad merge
* ci: add option to enable monitoring stack * start prometheus faster * update
* ci: add rpcimportable test * add ci * fmt * use github.com/btcsuite/btcd/btcutil in pkg/chains * remove app imports types tests * use standalone sdkconfig package * fix policies test * move crosschain keeper tests from types to keeper * never seal config in tests * use zeta-chain/ethermint#126 * add some comments * use merged ethermint hash * show resulting go.mod
* add semgrep sarif upload to GHAS * added comment to clairfy the usage of the utility script * use ghcr.io instead * add tag to image * bad org name --------- Co-authored-by: jkan2 <5862123+jkan2@users.noreply.github.com>
…arting a node from block 1 (#2925) * add recover to InitChainer * generate files * add docs link to error message * move InitChainErrorMessage to app.go * Update app/app.go Co-authored-by: Francisco de Borja Aranda Castillejo <borja@zetachain.com> * use const for message --------- Co-authored-by: Francisco de Borja Aranda Castillejo <borja@zetachain.com>
* add wait for block to tss migration test * add comments * refactor identifiers * rename checkNumberOfTssGenerated to checkNumberOfTSSGenerated
* add gateway upgrade * change reference * add v2 setup for all tests * test v2 in light upgrade * refactor setup to use custody v2 directly
* chore: improve localnet build performance * propagate NODE_VERSION and NODE_COMMIT
…accurate-due-to-misconfiguration
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 📝 Walkthrough📝 WalkthroughWalkthroughThe pull request introduces modifications to the performance testing configuration in the Changes
Suggested labels
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
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.
Actionable comments posted: 2
🧹 Outside diff range and nitpick comments (14)
.github/actions/performance-tests/art.yaml (14)
12-13
: Enhance plugin configuration for improved clarity.The addition of the
expect
andensure
plugins is a positive change that will enhance the test validation capabilities. However, to improve clarity and maintainability, consider explicitly defining the configuration options for these plugins, even if they are currently using default settings.Consider updating the plugin configuration as follows:
plugins: expect: outputFormat: "json" # or any other relevant options ensure: thresholds: [] # or any other relevant optionsThis approach will make it easier for future maintainers to understand and modify the configuration as needed.
41-47
: Approve changes and suggest error message capture.The modifications to the
web3_clientVersion
scenario enhance its readability and error-checking capabilities. The use of a list for status codes in theensure
section provides flexibility, and the addition of theexpect
section improves error detection.To further enhance error handling, consider capturing the error message when present:
expect: - notHasProperty: "{{ response.error }}" - statusCode: - 200 - 201 capture: - json: "$.error.message" as: errorMessage when: "{{ response.error }}"This approach will allow for more detailed error reporting in case of test failures.
99-108
: Approve changes and suggest type-aware comparison.The modifications to the
net_listening
scenario are consistent with previous improvements and include an additional expectation to validate the result.To enhance the robustness of the test, consider using a type-aware comparison:
expect: - notHasProperty: "{{ response.error }}" - equals: - true - "{{ JSON.parse(response.result) }}"This approach ensures that the comparison is performed against a boolean
true
rather than the string "true", which is more accurate for JSON-RPC responses.
177-187
: Approve changes and suggest parameterization for improved flexibility.The addition of a specific block hash in the
eth_getTransactionByBlockHashAndIndex
scenario makes the test more concrete. The changes to theensure
andexpect
sections are consistent with previous improvements.To enhance the flexibility of the test, consider parameterizing the block hash:
config: variables: testBlockHash: "0xbd8bd16e5d4375ed4bab633c4fb8aca58fdf7ed6c340853b20cfa91ed9a3b9e1" scenarios: - name: eth_getTransactionByBlockHashAndIndex flow: - post: # ... params: - "{{ testBlockHash }}" - "0x0"This approach allows for easier updates and potential dynamic generation of test data.
261-273
: Approve changes and suggest parameterization for improved flexibility.The addition of specific filter parameters in the
eth_newFilter
scenario, including a concrete address, enhances the test's specificity. The changes to theensure
andexpect
sections maintain consistency with previous improvements.To improve the test's flexibility and reusability, consider parameterizing the filter options:
config: variables: testAddress: "0x81eF14691E9ea2f711cf56a9f0889c49C5Fe995a" scenarios: - name: eth_newFilter flow: - post: # ... params: - fromBlock: "{{ fromBlock | default('latest') }}" toBlock: "{{ toBlock | default('latest') }}" address: "{{ testAddress }}" topics: "{{ topics | default([]) }}"This approach allows for easier updates and potential dynamic generation of test data, enhancing the scenario's adaptability to different test cases.
284-293
: Approve changes and suggest dynamic filter ID generation.The addition of a specific filter ID in the
eth_getFilterChanges
scenario enhances test specificity. The modifications to theensure
andexpect
sections maintain consistency with previous improvements.To improve the test's flexibility and ensure it uses a valid filter ID, consider dynamically generating the filter ID:
scenarios: - name: eth_newFilter flow: - post: # ... (previous eth_newFilter scenario) - capture: - json: "$.result" as: filterId - name: eth_getFilterChanges flow: - post: # ... params: - "{{ filterId }}"This approach ensures that the
eth_getFilterChanges
call uses a filter ID created by a precedingeth_newFilter
call, making the test more robust and realistic.
343-353
: Approve changes and suggest dynamic block hash retrieval.The addition of a specific block hash in the
eth_getBlockByHash
scenario enhances test specificity. The modifications to theensure
andexpect
sections maintain consistency with previous improvements.To improve the test's flexibility and ensure it uses a valid, recent block hash, consider dynamically retrieving a block hash:
scenarios: - name: eth_getBlockByNumber flow: - post: # ... (eth_getBlockByNumber scenario) - capture: - json: "$.result.hash" as: recentBlockHash - name: eth_getBlockByHash flow: - post: # ... params: - "{{ recentBlockHash }}" - trueThis approach ensures that the
eth_getBlockByHash
call uses a recent, valid block hash, making the test more robust and adaptable to different network states.
385-394
: Approve changes and suggest reuse of dynamic block hash.The addition of a specific block hash in the
eth_getBlockTransactionCountByHash
scenario enhances test specificity. The modifications to theensure
andexpect
sections maintain consistency with previous improvements.To improve the test's flexibility and maintain consistency with other scenarios, consider reusing the dynamically retrieved block hash suggested in the
eth_getBlockByHash
scenario:scenarios: - name: eth_getBlockTransactionCountByHash flow: - post: # ... params: - "{{ recentBlockHash }}"This approach ensures that the
eth_getBlockTransactionCountByHash
call uses the same recent, valid block hash as other scenarios, maintaining consistency across the test suite and adapting to different network states.
425-435
: Approve changes and suggest parameterization of contract address.The addition of a specific contract address in the
eth_getCode
scenario enhances test specificity. The modifications to theensure
andexpect
sections maintain consistency with previous improvements.To improve the test's flexibility and reusability, consider parameterizing the contract address:
config: variables: testContractAddress: "0x0cbe0dF132a6c6B4a2974Fa1b7Fb953CF0Cc798a" scenarios: - name: eth_getCode flow: - post: # ... params: - "{{ testContractAddress }}" - "latest"This approach allows for easier updates and potential dynamic generation of test data, enhancing the scenario's adaptability to different test cases or contract deployments.
446-455
: Approve changes and suggest dynamic transaction hash retrieval.The addition of a specific transaction hash in the
eth_getTransactionByHash
scenario enhances test specificity. The modifications to theensure
andexpect
sections maintain consistency with previous improvements.To improve the test's flexibility and ensure it uses a valid, recent transaction hash, consider dynamically retrieving a transaction hash:
scenarios: - name: eth_getBlockByNumber flow: - post: # ... (eth_getBlockByNumber scenario) - capture: - json: "$.result.transactions[0]" as: recentTransactionHash - name: eth_getTransactionByHash flow: - post: # ... params: - "{{ recentTransactionHash }}"This approach ensures that the
eth_getTransactionByHash
call uses a recent, valid transaction hash, making the test more robust and adaptable to different network states.
466-475
: Approve changes and suggest reuse of dynamic transaction hash.The addition of a specific transaction hash in the
eth_getTransactionReceipt
scenario enhances test specificity. The modifications to theensure
andexpect
sections maintain consistency with previous improvements.To improve the test's flexibility and maintain consistency with other scenarios, consider reusing the dynamically retrieved transaction hash suggested in the
eth_getTransactionByHash
scenario:scenarios: - name: eth_getTransactionReceipt flow: - post: # ... params: - "{{ recentTransactionHash }}"This approach ensures that the
eth_getTransactionReceipt
call uses the same recent, valid transaction hash as other scenarios, maintaining consistency across the test suite and adapting to different network states.
486-495
: Approve changes and suggest parameterization of contract address.The addition of a specific contract address in the
eth_getLogs
scenario enhances test specificity. The modifications to theensure
andexpect
sections maintain consistency with previous improvements.To improve the test's flexibility and reusability, consider parameterizing the contract address and reusing the variable suggested in the
eth_getCode
scenario:scenarios: - name: eth_getLogs flow: - post: # ... params: - address: "{{ testContractAddress }}" fromBlock: "{{ fromBlock | default('latest') }}" toBlock: "{{ toBlock | default('latest') }}"This approach allows for easier updates and potential dynamic generation of test data, enhancing the scenario's adaptability to different test cases or contract deployments while maintaining consistency with other scenarios.
506-516
: Approve changes and suggest parameterization of account address.The addition of a specific account address in the
eth_getBalance
scenario enhances test specificity. The modifications to theensure
andexpect
sections maintain consistency with previous improvements.To improve the test's flexibility and reusability, consider parameterizing the account address:
config: variables: testAccountAddress: "0x735b14BB79463307AAcBED86DAf3322B1e6226aB" scenarios: - name: eth_getBalance flow: - post: # ... params: - "{{ testAccountAddress }}" - "latest"This approach allows for easier updates and potential dynamic generation of test data, enhancing the scenario's adaptability to different test cases or account states.
527-537
: Approve changes and suggest parameterization of addresses.The addition of specific 'from' and 'to' addresses in the
eth_estimateGas
scenario enhances test specificity. The modifications to theensure
andexpect
sections maintain consistency with previous improvements.To improve the test's flexibility and reusability, consider parameterizing the addresses:
config: variables: testFromAddress: "0x239e96c8f17C85c30100AC26F635Ea15f23E9c67" testToAddress: "0x0cbe0dF132a6c6B4a2974Fa1b7Fb953CF0Cc798a" scenarios: - name: eth_estimateGas flow: - post: # ... params: - from: "{{ testFromAddress }}" to: "{{ testToAddress }}" value: "0x0" # Consider adding a parameterized valueThis approach allows for easier updates and potential dynamic generation of test data, enhancing the scenario's adaptability to different test cases or account states.
🧰 Tools
🪛 yamllint
[error] 537-537: no new line character at the end of file
(new-line-at-end-of-file)
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (1)
- .github/actions/performance-tests/art.yaml (27 hunks)
🧰 Additional context used
🪛 yamllint
.github/actions/performance-tests/art.yaml
[warning] 67-67: wrong indentation: expected 12 but found 10
(indentation)
[error] 537-537: no new line character at the end of file
(new-line-at-end-of-file)
🔇 Additional comments (1)
.github/actions/performance-tests/art.yaml (1)
61-67
: Consistent improvements applied to web3_sha3 scenario.The changes to the
web3_sha3
scenario are consistent with the improvements made to theweb3_clientVersion
scenario, enhancing readability and error-checking capabilities.Please refer to the suggestion made for the
web3_clientVersion
scenario regarding error message capture, as it applies here as well.🧰 Tools
🪛 yamllint
[warning] 67-67: wrong indentation: expected 12 but found 10
(indentation)
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.
Can you share a link to see the before and after ?
…accurate-due-to-misconfiguration
Description
How Has This Been Tested?
Summary by CodeRabbit
New Features
Bug Fixes
Documentation