From 991f1115506fad9692f2ab31ffcf5f7846fd11bb Mon Sep 17 00:00:00 2001 From: Logan Nguyen Date: Tue, 23 Apr 2024 16:54:58 -0400 Subject: [PATCH] deterministic: ci test Signed-off-by: Logan Nguyen --- .github/workflows/acceptance.yml | 16 ++--- .../tests/acceptance/rpc_batch1.spec.ts | 71 ++++++++++--------- 2 files changed, 44 insertions(+), 43 deletions(-) diff --git a/.github/workflows/acceptance.yml b/.github/workflows/acceptance.yml index 58db2e24ff..1b4354efb6 100644 --- a/.github/workflows/acceptance.yml +++ b/.github/workflows/acceptance.yml @@ -17,7 +17,6 @@ jobs: uses: ./.github/workflows/acceptance-workflow.yml with: testfilter: api_batch1 - networkTag: 0.49.0-alpha.3 # api_batch_2: # name: API Batch 2 @@ -73,13 +72,12 @@ jobs: # with: # testfilter: precompile-calls - websocket: - name: Websocket - uses: ./.github/workflows/acceptance-workflow.yml - with: - testfilter: ws - test_ws_server: true - networkTag: 0.49.0-alpha.3 + # websocket: + # name: Websocket + # uses: ./.github/workflows/acceptance-workflow.yml + # with: + # testfilter: ws + # test_ws_server: true # cacheservice: # name: Cache Service @@ -101,7 +99,7 @@ jobs: # - tokenmanagement # - htsprecompilev1 # - precompilecalls - - websocket + # - websocket # - cacheservice runs-on: ubuntu-latest diff --git a/packages/server/tests/acceptance/rpc_batch1.spec.ts b/packages/server/tests/acceptance/rpc_batch1.spec.ts index e2e2bdf447..c511ea9183 100644 --- a/packages/server/tests/acceptance/rpc_batch1.spec.ts +++ b/packages/server/tests/acceptance/rpc_batch1.spec.ts @@ -853,40 +853,43 @@ describe('@api-batch-1 RPC Server Acceptance Tests', function () { // is not 0, it means the DETERMINISTIC_DEPLOYER_TRANSACTION has already been submitted, and the DETERMINISTIC_PROXY_CONTRACT // has already been deployed to the network. Therefore, it only matters to test this flow once. const signerNonce = await relay.getAccountNonce(constants.DETERMINISTIC_DEPLOYMENT_SIGNER, requestId); - if (signerNonce === 0) { - const deployerBalance = await relay.getBalance( - constants.DETERMINISTIC_DEPLOYMENT_SIGNER, - 'latest', - requestId, - ); - expect(deployerBalance).to.not.eq(0); - - // send transaction to deploy proxy transaction - const deterministicDeployTransactionHash = await relay.sendRawTransaction( - constants.DETERMINISTIC_DEPLOYER_TRANSACTION, - requestId, - ); - const receipt = await mirrorNode.get(`/contracts/results/${deterministicDeployTransactionHash}`, requestId); - - const fromAccountInfo = await global.mirrorNode.get(`/accounts/${receipt.from}`); - const toAccountInfo = await global.mirrorNode.get(`/accounts/${receipt.to}`); - - expect(receipt).to.exist; - expect(fromAccountInfo.evm_address).to.eq(constants.DETERMINISTIC_DEPLOYMENT_SIGNER); - expect(toAccountInfo.evm_address).to.eq(constants.DETERMINISTIC_PROXY_CONTRACT); - expect(receipt.address).to.eq(constants.DETERMINISTIC_PROXY_CONTRACT); - } else { - try { - await relay.sendRawTransaction(constants.DETERMINISTIC_DEPLOYER_TRANSACTION, requestId); - expect(true).to.be.false; - } catch (error) { - const expectedNonceTooLowError = predefined.NONCE_TOO_LOW(0, signerNonce); - const errObj = JSON.parse(error.info.responseBody).error; - expect(errObj.code).to.eq(expectedNonceTooLowError.code); - expect(errObj.name).to.eq(expectedNonceTooLowError.name); - expect(errObj.message).to.contain(expectedNonceTooLowError.message); - } - } + console.log(`signerNoncesignerNoncesignerNoncesignerNonce`); + console.log(signerNonce); + + // if (signerNonce === 0) { + // const deployerBalance = await relay.getBalance( + // constants.DETERMINISTIC_DEPLOYMENT_SIGNER, + // 'latest', + // requestId, + // ); + // expect(deployerBalance).to.not.eq(0); + + // // send transaction to deploy proxy transaction + // const deterministicDeployTransactionHash = await relay.sendRawTransaction( + // constants.DETERMINISTIC_DEPLOYER_TRANSACTION, + // requestId, + // ); + // const receipt = await mirrorNode.get(`/contracts/results/${deterministicDeployTransactionHash}`, requestId); + + // const fromAccountInfo = await global.mirrorNode.get(`/accounts/${receipt.from}`); + // const toAccountInfo = await global.mirrorNode.get(`/accounts/${receipt.to}`); + + // expect(receipt).to.exist; + // expect(fromAccountInfo.evm_address).to.eq(constants.DETERMINISTIC_DEPLOYMENT_SIGNER); + // expect(toAccountInfo.evm_address).to.eq(constants.DETERMINISTIC_PROXY_CONTRACT); + // expect(receipt.address).to.eq(constants.DETERMINISTIC_PROXY_CONTRACT); + // } else { + // try { + // await relay.sendRawTransaction(constants.DETERMINISTIC_DEPLOYER_TRANSACTION, requestId); + // expect(true).to.be.false; + // } catch (error) { + // const expectedNonceTooLowError = predefined.NONCE_TOO_LOW(0, signerNonce); + // const errObj = JSON.parse(error.info.responseBody).error; + // expect(errObj.code).to.eq(expectedNonceTooLowError.code); + // expect(errObj.name).to.eq(expectedNonceTooLowError.name); + // expect(errObj.message).to.contain(expectedNonceTooLowError.message); + // } + // } }); it('@release should execute "eth_sendRawTransaction" for legacy EIP 155 transactions', async function () {