diff --git a/.github/workflows/testnet-nightly-e2e.yml b/.github/workflows/testnet-nightly-e2e.yml index f876da96..08f9df4c 100644 --- a/.github/workflows/testnet-nightly-e2e.yml +++ b/.github/workflows/testnet-nightly-e2e.yml @@ -116,22 +116,4 @@ jobs: RELAYER_SIGNER_ADDRESSES: ${{ vars.CI_TESTNET_RELAYER_SIGNER_ADDRESSES }} RELAYER_SIGNING_KEYS: ${{ secrets.CI_TESTNET_RELAYER_SIGNING_KEYS }} run: | - NO_FORMATTING=true TESTNET=true ./tooling-e2e-tests/full_scenario.sh - NO_FORMATTING=true TESTNET=true ./tooling-e2e-tests/recovery_scenario.sh - NO_FORMATTING=true TESTNET=true ./tooling-e2e-tests/many_actors.sh NO_FORMATTING=true TESTNET=true ./tooling-e2e-tests/ts_sdk_tests.sh - - slack-notification: - name: Slack notification - runs-on: ubuntu-22.04 - needs: [e2e-tests] - if: > - !cancelled() && - github.event_name != 'workflow_dispatch' - steps: - - name: Send Slack message - uses: Cardinal-Cryptography/github-actions/slack-notification@v7 - with: - notify-on: "failure" - env: - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_ZKOS }} diff --git a/ts/shielder-sdk-tests/playwright.base.config.mjs b/ts/shielder-sdk-tests/playwright.base.config.mjs index cdf7c3af..8b8048bd 100644 --- a/ts/shielder-sdk-tests/playwright.base.config.mjs +++ b/ts/shielder-sdk-tests/playwright.base.config.mjs @@ -15,7 +15,7 @@ export default defineConfig({ ], reporter: process.env.CI ? "blob" : "list", retries: process.env.CI ? 2 : 0, - testMatch: ["tests/**/*.test.ts"], + testMatch: ["tests/shielder/stateSync.test.ts", "tests/chain/relayer.test.ts"], timeout: 240 * 1000, // 240 seconds use: { baseURL: url, diff --git a/ts/shielder-sdk/src/chain/relayer.ts b/ts/shielder-sdk/src/chain/relayer.ts index 8226a973..039dafd1 100644 --- a/ts/shielder-sdk/src/chain/relayer.ts +++ b/ts/shielder-sdk/src/chain/relayer.ts @@ -65,25 +65,42 @@ export class Relayer implements IRelayer { ): Promise => { let response; try { + let requestBodyTrimmed = JSON.stringify( + { + expected_contract_version: expectedContractVersion, + id_hiding: idHiding, + amount, + withdraw_address: withdrawAddress, + merkle_root: merkleRoot, + nullifier_hash: oldNullifierHash, + new_note: newNote, + proof: Array.from(proof.slice(0, 10)) + }, + (_, value: unknown) => + typeof value === "bigint" ? value.toString() : value + ); + let requestBody = JSON.stringify( + { + expected_contract_version: expectedContractVersion, + id_hiding: idHiding, + amount, + withdraw_address: withdrawAddress, + merkle_root: merkleRoot, + nullifier_hash: oldNullifierHash, + new_note: newNote, + proof: Array.from(proof) + }, + (_, value: unknown) => + typeof value === "bigint" ? value.toString() : value + ); + console.log("Withdraw request body (proof trimmed): " + requestBodyTrimmed); + response = await fetch(`${this.url}${relayPath}`, { method: "POST", headers: { "Content-Type": "application/json" }, - body: JSON.stringify( - { - expected_contract_version: expectedContractVersion, - id_hiding: idHiding, - amount, - withdraw_address: withdrawAddress, - merkle_root: merkleRoot, - nullifier_hash: oldNullifierHash, - new_note: newNote, - proof: Array.from(proof) - }, - (_, value: unknown) => - typeof value === "bigint" ? value.toString() : value - ) + body: requestBody }); } catch (error) { throw new GenericWithdrawError(`${(error as Error).message}`);