From 90924e94d0ac420dc0eea740cb4e2d92b6239ff9 Mon Sep 17 00:00:00 2001 From: morde08 Date: Thu, 3 Oct 2024 07:14:42 -0700 Subject: [PATCH] ci: 2598 artillery based stress testing is inaccurate due to misconfiguration (#2953) * update artillery config * more fixes * feat: integrate authenticated calls smart contract functionality into 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 (#2860) * 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 * fix: changed coin denom --------- Co-authored-by: skosito Co-authored-by: Lucas Bertrand * feat: add sender to revert context (#2919) * 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 (#2927) * ci: add option to enable monitoring stack * start prometheus faster * update * ci: add rpcimportable test (#2817) * 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 https://github.com/zeta-chain/ethermint/pull/126 * add some comments * use merged ethermint hash * show resulting go.mod * ci: Add SARIF upload to GitHub Security Dashboard (#2929) * 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> * fix: add recover to InitChainer to diplay informative message when starting 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 * use const for message --------- Co-authored-by: Francisco de Borja Aranda Castillejo * test: add wait for block to tss migration test (#2931) * add wait for block to tss migration test * add comments * refactor identifiers * rename checkNumberOfTssGenerated to checkNumberOfTSSGenerated * chore: allow full zetaclient config overlay (#2945) * test(e2e): add gateway upgrade in upgrade test (#2932) * 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 (#2928) * chore: improve localnet build performance * propagate NODE_VERSION and NODE_COMMIT * update hashes --------- Co-authored-by: skosito Co-authored-by: Francisco de Borja Aranda Castillejo Co-authored-by: Lucas Bertrand Co-authored-by: Alex Gartner Co-authored-by: jkan2 Co-authored-by: jkan2 <5862123+jkan2@users.noreply.github.com> Co-authored-by: Tanmay --- .github/actions/performance-tests/art.yaml | 343 +++++++++++---------- 1 file changed, 172 insertions(+), 171 deletions(-) diff --git a/.github/actions/performance-tests/art.yaml b/.github/actions/performance-tests/art.yaml index 806a4d6321..0424eb96a1 100644 --- a/.github/actions/performance-tests/art.yaml +++ b/.github/actions/performance-tests/art.yaml @@ -9,11 +9,10 @@ config: http: timeout: 60 plugins: + expect: {} + ensure: {} metrics-by-endpoint: useOnlyRequestNames: true - ensure: - - type: "failure" - threshold: 1 publish-metrics: - type: prometheus pushgateway: 'https://pushgateway-testnet.rpc.zetachain.com/-=CLOUDFLARE_UUID=-' @@ -26,6 +25,7 @@ config: - type: "html" filename: "artillery_report.html" logLevel: debug + scenarios: - name: web3_clientVersion flow: @@ -38,13 +38,13 @@ scenarios: params: [] capture: - json: "$" - as: "response" + as: response ensure: - - statusCode: 200 - - statusCode: 201 - assert: - - subject: response.error - equals: null + - statusCode: + - 200 + - 201 + expect: + - notHasProperty: "{{ response.error }}" - name: web3_sha3 flow: @@ -58,13 +58,13 @@ scenarios: - "0x68656c6c6f20776f726c64" capture: - json: "$" - as: "response" + as: response ensure: - - statusCode: 200 - - statusCode: 201 - assert: - - subject: response.error - equals: null + - statusCode: + - 200 + - 201 + expect: + - notHasProperty: "{{ response.error }}" - name: net_version flow: @@ -77,13 +77,13 @@ scenarios: params: [] capture: - json: "$" - as: "response" + as: response ensure: - - statusCode: 200 - - statusCode: 201 - assert: - - subject: response.error - equals: null + - statusCode: + - 200 + - 201 + expect: + - notHasProperty: "{{ response.error }}" - name: net_listening flow: @@ -96,13 +96,16 @@ scenarios: params: [] capture: - json: "$" - as: "response" + as: response ensure: - - statusCode: 200 - - statusCode: 201 - assert: - - subject: response.error - equals: null + - statusCode: + - 200 + - 201 + expect: + - notHasProperty: "{{ response.error }}" + - equals: + - "true" + - "{{ response.result }}" - name: net_peerCount flow: @@ -115,13 +118,13 @@ scenarios: params: [] capture: - json: "$" - as: "response" + as: response ensure: - - statusCode: 200 - - statusCode: 201 - assert: - - subject: response.error - equals: null + - statusCode: + - 200 + - 201 + expect: + - notHasProperty: "{{ response.error }}" - name: eth_chainId flow: @@ -134,13 +137,13 @@ scenarios: params: [] capture: - json: "$" - as: "response" + as: response ensure: - - statusCode: 200 - - statusCode: 201 - assert: - - subject: response.error - equals: null + - statusCode: + - 200 + - 201 + expect: + - notHasProperty: "{{ response.error }}" - name: eth_getStorageAt flow: @@ -154,13 +157,13 @@ scenarios: - "latest" capture: - json: "$" - as: "response" + as: response ensure: - - statusCode: 200 - - statusCode: 201 - assert: - - subject: response.error - equals: null + - statusCode: + - 200 + - 201 + expect: + - notHasProperty: "{{ response.error }}" - name: eth_getTransactionByBlockHashAndIndex flow: @@ -171,16 +174,17 @@ scenarios: jsonrpc: "2.0" method: "eth_getTransactionByBlockHashAndIndex" params: + - "0xbd8bd16e5d4375ed4bab633c4fb8aca58fdf7ed6c340853b20cfa91ed9a3b9e1" - "0x0" capture: - json: "$" - as: "response" + as: response ensure: - - statusCode: 200 - - statusCode: 201 - assert: - - subject: response.error - equals: null + - statusCode: + - 200 + - 201 + expect: + - notHasProperty: "{{ response.error }}" - name: eth_getTransactionByBlockNumberAndIndex flow: @@ -195,13 +199,13 @@ scenarios: - "0x0" capture: - json: "$" - as: "response" + as: response ensure: - - statusCode: 200 - - statusCode: 201 - assert: - - subject: response.error - equals: null + - statusCode: + - 200 + - 201 + expect: + - notHasProperty: "{{ response.error }}" - name: eth_getUncleByBlockHashAndIndex flow: @@ -212,16 +216,17 @@ scenarios: jsonrpc: "2.0" method: "eth_getUncleByBlockHashAndIndex" params: + - "0xbd8bd16e5d4375ed4bab633c4fb8aca58fdf7ed6c340853b20cfa91ed9a3b9e1" - "0x0" capture: - json: "$" - as: "response" + as: response ensure: - - statusCode: 200 - - statusCode: 201 - assert: - - subject: response.error - equals: null + - statusCode: + - 200 + - 201 + expect: + - notHasProperty: "{{ response.error }}" - name: eth_getUncleByBlockNumberAndIndex flow: @@ -236,13 +241,13 @@ scenarios: - "0x0" capture: - json: "$" - as: "response" + as: response ensure: - - statusCode: 200 - - statusCode: 201 - assert: - - subject: response.error - equals: null + - statusCode: + - 200 + - 201 + expect: + - notHasProperty: "{{ response.error }}" - name: eth_newFilter flow: @@ -253,21 +258,19 @@ scenarios: jsonrpc: "2.0" method: "eth_newFilter" params: - - { - fromBlock: "latest", - toBlock: "latest", - address: "0x0", + - fromBlock: "latest" + toBlock: "latest" + address: "0x81eF14691E9ea2f711cf56a9f0889c49C5Fe995a" topics: [] - } capture: - json: "$" - as: "response" + as: response ensure: - - statusCode: 200 - - statusCode: 201 - assert: - - subject: response.error - equals: null + - statusCode: + - 200 + - 201 + expect: + - notHasProperty: "{{ response.error }}" - name: eth_getFilterChanges flow: @@ -278,16 +281,16 @@ scenarios: jsonrpc: "2.0" method: "eth_getFilterChanges" params: - - "0x0" + - "0xbd8bd16e5d4375ed4bab633c4fb8aca58fdf7ed6c340853b20cfa91ed9a3b9e1" capture: - json: "$" - as: "response" + as: response ensure: - - statusCode: 200 - - statusCode: 201 - assert: - - subject: response.error - equals: null + - statusCode: + - 200 + - 201 + expect: + - notHasProperty: "{{ response.error }}" - name: eth_getFilterLogs flow: @@ -298,16 +301,16 @@ scenarios: jsonrpc: "2.0" method: "eth_getFilterLogs" params: - - "0x0" + - "0xbd8bd16e5d4375ed4bab633c4fb8aca58fdf7ed6c340853b20cfa91ed9a3b9e1" capture: - json: "$" - as: "response" + as: response ensure: - - statusCode: 200 - - statusCode: 201 - assert: - - subject: response.error - equals: null + - statusCode: + - 200 + - 201 + expect: + - notHasProperty: "{{ response.error }}" - name: eth_blockNumber flow: @@ -320,13 +323,13 @@ scenarios: params: [] capture: - json: "$" - as: "response" + as: response ensure: - - statusCode: 200 - - statusCode: 201 - assert: - - subject: response.error - equals: null + - statusCode: + - 200 + - 201 + expect: + - notHasProperty: "{{ response.error }}" - name: eth_getBlockByHash flow: @@ -337,17 +340,17 @@ scenarios: jsonrpc: "2.0" method: "eth_getBlockByHash" params: - - "0x0" + - "0x8716674e0acdbe87bab4595ecd33436f8a1a1b32fcda721362fe98dfc764affe" - true capture: - json: "$" - as: "response" + as: response ensure: - - statusCode: 200 - - statusCode: 201 - assert: - - subject: response.error - equals: null + - statusCode: + - 200 + - 201 + expect: + - notHasProperty: "{{ response.error }}" - name: eth_getBlockByNumber flow: @@ -362,13 +365,13 @@ scenarios: - true capture: - json: "$" - as: "response" + as: response ensure: - - statusCode: 200 - - statusCode: 201 - assert: - - subject: response.error - equals: null + - statusCode: + - 200 + - 201 + expect: + - notHasProperty: "{{ response.error }}" - name: eth_getBlockTransactionCountByHash flow: @@ -379,16 +382,16 @@ scenarios: jsonrpc: "2.0" method: "eth_getBlockTransactionCountByHash" params: - - "0x0" + - "0x8716674e0acdbe87bab4595ecd33436f8a1a1b32fcda721362fe98dfc764affe" capture: - json: "$" - as: "response" + as: response ensure: - - statusCode: 200 - - statusCode: 201 - assert: - - subject: response.error - equals: null + - statusCode: + - 200 + - 201 + expect: + - notHasProperty: "{{ response.error }}" - name: eth_getBlockTransactionCountByNumber flow: @@ -402,13 +405,13 @@ scenarios: - "latest" capture: - json: "$" - as: "response" + as: response ensure: - - statusCode: 200 - - statusCode: 201 - assert: - - subject: response.error - equals: null + - statusCode: + - 200 + - 201 + expect: + - notHasProperty: "{{ response.error }}" - name: eth_getCode flow: @@ -419,17 +422,17 @@ scenarios: jsonrpc: "2.0" method: "eth_getCode" params: - - "0x0" + - "0x0cbe0dF132a6c6B4a2974Fa1b7Fb953CF0Cc798a" - "latest" capture: - json: "$" - as: "response" + as: response ensure: - - statusCode: 200 - - statusCode: 201 - assert: - - subject: response.error - equals: null + - statusCode: + - 200 + - 201 + expect: + - notHasProperty: "{{ response.error }}" - name: eth_getTransactionByHash flow: @@ -440,16 +443,16 @@ scenarios: jsonrpc: "2.0" method: "eth_getTransactionByHash" params: - - "0x0" + - "0x1a363840b12fa22aae5920edf11e2c59dde5260ffe5c9bc108250fe8380f5e75" capture: - json: "$" - as: "response" + as: response ensure: - - statusCode: 200 - - statusCode: 201 - assert: - - subject: response.error - equals: null + - statusCode: + - 200 + - 201 + expect: + - notHasProperty: "{{ response.error }}" - name: eth_getTransactionReceipt flow: @@ -460,16 +463,16 @@ scenarios: jsonrpc: "2.0" method: "eth_getTransactionReceipt" params: - - "0x0" + - "0x1a363840b12fa22aae5920edf11e2c59dde5260ffe5c9bc108250fe8380f5e75" capture: - json: "$" - as: "response" + as: response ensure: - - statusCode: 200 - - statusCode: 201 - assert: - - subject: response.error - equals: null + - statusCode: + - 200 + - 201 + expect: + - notHasProperty: "{{ response.error }}" - name: eth_getLogs flow: @@ -480,19 +483,16 @@ scenarios: jsonrpc: "2.0" method: "eth_getLogs" params: - - fromBlock: "0x1" - toBlock: "latest" - address: "0x0" - topics: ["0x0"] + - address: "0x0cbe0dF132a6c6B4a2974Fa1b7Fb953CF0Cc798a" capture: - json: "$" - as: "response" + as: response ensure: - - statusCode: 200 - - statusCode: 201 - assert: - - subject: response.error - equals: null + - statusCode: + - 200 + - 201 + expect: + - notHasProperty: "{{ response.error }}" - name: eth_getBalance flow: @@ -503,17 +503,17 @@ scenarios: jsonrpc: "2.0" method: "eth_getBalance" params: - - "0x0" + - "0x735b14BB79463307AAcBED86DAf3322B1e6226aB" - "latest" capture: - json: "$" - as: "response" + as: response ensure: - - statusCode: 200 - - statusCode: 201 - assert: - - subject: response.error - equals: null + - statusCode: + - 200 + - 201 + expect: + - notHasProperty: "{{ response.error }}" - name: eth_estimateGas flow: @@ -524,13 +524,14 @@ scenarios: jsonrpc: "2.0" method: "eth_estimateGas" params: - - from: "0x0" + - from: "0x239e96c8f17C85c30100AC26F635Ea15f23E9c67" + to: "0x0cbe0dF132a6c6B4a2974Fa1b7Fb953CF0Cc798a" capture: - json: "$" - as: "response" + as: response ensure: - - statusCode: 200 - - statusCode: 201 - assert: - - subject: response.error - equals: null + - statusCode: + - 200 + - 201 + expect: + - notHasProperty: "{{ response.error }}" \ No newline at end of file