From 323d5fbb3c996bb94b3da3ceaad1abcf4da386a0 Mon Sep 17 00:00:00 2001 From: Tommy Verrall <60836166+tommyv1987@users.noreply.github.com> Date: Thu, 23 Feb 2023 12:10:39 +0100 Subject: [PATCH 01/34] Create ci-binary-checker.yml --- .github/workflows/ci-binary-checker.yml | 54 +++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/ci-binary-checker.yml diff --git a/.github/workflows/ci-binary-checker.yml b/.github/workflows/ci-binary-checker.yml new file mode 100644 index 0000000000..6fcf976192 --- /dev/null +++ b/.github/workflows/ci-binary-checker.yml @@ -0,0 +1,54 @@ +name: Run config checks on all binaries + +on: + workflow_dispatch: + push: + paths: + - 'clients/**' + - 'common/**' + - 'contracts/**' + - 'integrations/**' + - 'mixnode/**' + - 'sdk/rust/nym-sdk/**' + - 'service-providers/**' + pull_request: + paths: + - 'clients/**' + - 'common/**' + - 'gateway/**' + - 'integrations/**' + - 'mixnode/**' + - 'sdk/rust/nym-sdk/**' + - 'service-providers/**' + +env: + NETWORK: mainnet + +jobs: + publish-nym: + strategy: + fail-fast: false + matrix: + platform: [ubuntu-20.04] + + runs-on: ${{ matrix.platform }} + steps: + - uses: actions/checkout@v3 + + - name: Install Dependencies (Linux) + run: sudo apt-get update && sudo apt-get -y install libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libudev-dev squashfs-tools + continue-on-error: true + + - name: Install Rust stable + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + + - name: Branch name + run: echo running on branch ${GITHUB_REF##*/} + + - name: Run tests against binaries + run: ./build_and_run.sh ${GITHUB_REF##*/} "v1.1.11" + working-directory: tests/ + + From 02a621ed8bfa2a90aadaf06c4ef012cae46d46cf Mon Sep 17 00:00:00 2001 From: Tommy Verrall <60836166+tommyv1987@users.noreply.github.com> Date: Thu, 23 Feb 2023 12:16:50 +0100 Subject: [PATCH 02/34] Update ci-binary-checker.yml --- .github/workflows/ci-binary-checker.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci-binary-checker.yml b/.github/workflows/ci-binary-checker.yml index 6fcf976192..82bce3a881 100644 --- a/.github/workflows/ci-binary-checker.yml +++ b/.github/workflows/ci-binary-checker.yml @@ -2,6 +2,8 @@ name: Run config checks on all binaries on: workflow_dispatch: + release: + types: [created] push: paths: - 'clients/**' From ea161329dcda423035779d4cf011ea4c684cc558 Mon Sep 17 00:00:00 2001 From: Tommy Verrall <60836166+tommyv1987@users.noreply.github.com> Date: Thu, 23 Feb 2023 12:34:26 +0100 Subject: [PATCH 03/34] Update ci-binary-checker.yml testing manually the changes for the timebeing --- .github/workflows/ci-binary-checker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-binary-checker.yml b/.github/workflows/ci-binary-checker.yml index 82bce3a881..fdf8adabb2 100644 --- a/.github/workflows/ci-binary-checker.yml +++ b/.github/workflows/ci-binary-checker.yml @@ -50,7 +50,7 @@ jobs: run: echo running on branch ${GITHUB_REF##*/} - name: Run tests against binaries - run: ./build_and_run.sh ${GITHUB_REF##*/} "v1.1.11" + run: ./build_and_run.sh ${GITHUB_REF##*/} "v1.1.10" working-directory: tests/ From 18a3366cf353f9b7e2a618f0e404c7b664066365 Mon Sep 17 00:00:00 2001 From: Tommy Verrall <60836166+tommyv1987@users.noreply.github.com> Date: Thu, 23 Feb 2023 12:37:41 +0100 Subject: [PATCH 04/34] Update ci-binary-checker.yml --- .github/workflows/ci-binary-checker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-binary-checker.yml b/.github/workflows/ci-binary-checker.yml index fdf8adabb2..2080697a64 100644 --- a/.github/workflows/ci-binary-checker.yml +++ b/.github/workflows/ci-binary-checker.yml @@ -50,7 +50,7 @@ jobs: run: echo running on branch ${GITHUB_REF##*/} - name: Run tests against binaries - run: ./build_and_run.sh ${GITHUB_REF##*/} "v1.1.10" + run: ./build_and_run.sh release/v1.1.11 "v1.1.10" working-directory: tests/ From dc556706c19e9119a149c7ea6243eb6dda701c21 Mon Sep 17 00:00:00 2001 From: Tommy Verrall <60836166+tommyv1987@users.noreply.github.com> Date: Thu, 23 Feb 2023 13:25:46 +0100 Subject: [PATCH 05/34] Update ci-binary-checker.yml update the to run from the branch --- .github/workflows/ci-binary-checker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-binary-checker.yml b/.github/workflows/ci-binary-checker.yml index 2080697a64..c7e2f8ec6f 100644 --- a/.github/workflows/ci-binary-checker.yml +++ b/.github/workflows/ci-binary-checker.yml @@ -50,7 +50,7 @@ jobs: run: echo running on branch ${GITHUB_REF##*/} - name: Run tests against binaries - run: ./build_and_run.sh release/v1.1.11 "v1.1.10" + run: ./build_and_run.sh ${{ github.head_ref || github.ref_name }} working-directory: tests/ From 6428f90b5ad32a2fd15d3747322f638fd9894d33 Mon Sep 17 00:00:00 2001 From: Tommy Verrall <60836166+tommyv1987@users.noreply.github.com> Date: Thu, 23 Feb 2023 15:38:20 +0100 Subject: [PATCH 06/34] Update README.md --- tests/README.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tests/README.md b/tests/README.md index fa6f675a54..b0477e60d6 100644 --- a/tests/README.md +++ b/tests/README.md @@ -2,16 +2,12 @@ A simple tool to ensure that all binaries init with the correct format, using the `assert.sh` library -Simply run `./build_and_run.sh $RELEASE_BRANCH` `$CURRENT_PRODUCTION_RELEASE_VERSION` - +Simply run `./build_and_run.sh $WORKING_BRANCH` For example: -`./build_and_run.sh release/v1.1.11 v1.1.10` +`./build_and_run.sh release/v1.1.11` Currently, this is run on linux based machines as the nym-core binaries are published via a linux build agent This will run through all the binaries and check the fields that we expect to be initialised when passing the parameters into nyms core binaries - -## TODO - - Create GH workflow and Run in CI From f36cb3a00bd4104d88debaf3d1fa95acfdfb2d5a Mon Sep 17 00:00:00 2001 From: Tommy Verrall <60836166+tommyv1987@users.noreply.github.com> Date: Thu, 23 Feb 2023 16:50:02 +0100 Subject: [PATCH 07/34] Update ci-binary-checker.yml use custom runner --- .github/workflows/ci-binary-checker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-binary-checker.yml b/.github/workflows/ci-binary-checker.yml index c7e2f8ec6f..02e6dc6a8a 100644 --- a/.github/workflows/ci-binary-checker.yml +++ b/.github/workflows/ci-binary-checker.yml @@ -31,7 +31,7 @@ jobs: strategy: fail-fast: false matrix: - platform: [ubuntu-20.04] + platform: [custom-runner-linux] runs-on: ${{ matrix.platform }} steps: From d759462e4e853c6769ac534a23f09a6e77fbdd4e Mon Sep 17 00:00:00 2001 From: Tommy Verrall <60836166+tommyv1987@users.noreply.github.com> Date: Thu, 23 Feb 2023 16:53:23 +0100 Subject: [PATCH 08/34] Update ci-binary-checker.yml install jq --- .github/workflows/ci-binary-checker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-binary-checker.yml b/.github/workflows/ci-binary-checker.yml index 02e6dc6a8a..74e2905fa4 100644 --- a/.github/workflows/ci-binary-checker.yml +++ b/.github/workflows/ci-binary-checker.yml @@ -38,7 +38,7 @@ jobs: - uses: actions/checkout@v3 - name: Install Dependencies (Linux) - run: sudo apt-get update && sudo apt-get -y install libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libudev-dev squashfs-tools + run: sudo apt-get update && sudo apt-get -y jq vim install libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libudev-dev squashfs-tools continue-on-error: true - name: Install Rust stable From 0deef37778adbc85a0fbab412fc5f0ff29163be8 Mon Sep 17 00:00:00 2001 From: Tommy Verrall <60836166+tommyv1987@users.noreply.github.com> Date: Thu, 23 Feb 2023 16:56:25 +0100 Subject: [PATCH 09/34] Update ci-binary-checker.yml correct positioning on install --- .github/workflows/ci-binary-checker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-binary-checker.yml b/.github/workflows/ci-binary-checker.yml index 74e2905fa4..167f6dcad9 100644 --- a/.github/workflows/ci-binary-checker.yml +++ b/.github/workflows/ci-binary-checker.yml @@ -38,7 +38,7 @@ jobs: - uses: actions/checkout@v3 - name: Install Dependencies (Linux) - run: sudo apt-get update && sudo apt-get -y jq vim install libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libudev-dev squashfs-tools + run: sudo apt-get update && sudo apt-get -y install jq vim libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libudev-dev squashfs-tools continue-on-error: true - name: Install Rust stable From 8ed808124e19d23c507424182d6bec26cd39b1c6 Mon Sep 17 00:00:00 2001 From: Tommy Verrall <60836166+tommyv1987@users.noreply.github.com> Date: Thu, 23 Feb 2023 17:15:32 +0100 Subject: [PATCH 10/34] Update build-and-upload-binaries-ci.yml publish credential binary --- .github/workflows/build-and-upload-binaries-ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-upload-binaries-ci.yml b/.github/workflows/build-and-upload-binaries-ci.yml index 448b947179..812c24f16e 100644 --- a/.github/workflows/build-and-upload-binaries-ci.yml +++ b/.github/workflows/build-and-upload-binaries-ci.yml @@ -69,7 +69,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: build - args: --workspace --release + args: --workspace --release --all - name: Install Rust stable uses: actions-rs/toolchain@v1 @@ -95,7 +95,8 @@ jobs: cp target/release/nym-network-requester $OUTPUT_DIR cp target/release/nym-network-statistics $OUTPUT_DIR cp target/release/nym-cli $OUTPUT_DIR - + cp target/release/credential $OUTPUT_DIR + cp contracts/target/wasm32-unknown-unknown/release/mixnet_contract.wasm $OUTPUT_DIR cp contracts/target/wasm32-unknown-unknown/release/vesting_contract.wasm $OUTPUT_DIR From 2178f2b509d6ccfc7643746a4ee0715b1e3ecba6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Walther?= Date: Fri, 24 Feb 2023 11:12:53 +0100 Subject: [PATCH 11/34] Github Actions: fix notification display issue --- .../support-files/network-explorer/templates/failure | 5 +++++ .../support-files/network-explorer/templates/success | 6 ++++++ .github/workflows/support-files/nightly/index.js | 2 +- .../workflows/support-files/nightly/templates/failure | 6 ++++++ .../workflows/support-files/nightly/templates/success | 8 +++++++- .../notifications/send_message_to_matrix.js | 5 ++++- .../support-files/nym-connect/templates/failure | 5 +++++ .../support-files/nym-connect/templates/success | 5 +++++ .../support-files/nym-wallet/templates/failure | 5 +++++ .../support-files/nym-wallet/templates/success | 9 +++++++-- .github/workflows/support-files/package.json | 1 + .../support-files/ts-packages/templates/failure | 5 +++++ .../support-files/ts-packages/templates/success | 10 ++++++++-- 13 files changed, 65 insertions(+), 7 deletions(-) diff --git a/.github/workflows/support-files/network-explorer/templates/failure b/.github/workflows/support-files/network-explorer/templates/failure index adc2896ace..0db23cefaa 100644 --- a/.github/workflows/support-files/network-explorer/templates/failure +++ b/.github/workflows/support-files/network-explorer/templates/failure @@ -1,9 +1,14 @@ πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯ > :rocket: {{ env.NYM_PROJECT_NAME }} +> > πŸ”΄ **FAILURE** :cry: +> > `branch` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/tree/{{ env.GIT_BRANCH_NAME }} +> > `commit` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/commit/{{ env.GITHUB_SHA }} +> > `build ` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }} +> Commit message: ``` diff --git a/.github/workflows/support-files/network-explorer/templates/success b/.github/workflows/support-files/network-explorer/templates/success index 1f380b79b9..69dd64e140 100644 --- a/.github/workflows/support-files/network-explorer/templates/success +++ b/.github/workflows/support-files/network-explorer/templates/success @@ -1,10 +1,16 @@ 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 > :rocket: {{ env.NYM_PROJECT_NAME }} ➑️➑️➑️➑️➑️ **View output:** https://{{ env.NYM_CI_WWW_LOCATION }}.{{ env.NYM_CI_WWW_BASE }}/ +> > `storybook`: https://{{ env.NYM_CI_WWW_LOCATION_STORYBOOK }}.{{ env.NYM_CI_WWW_BASE }} +> > βœ… **SUCCESS** +> > `branch` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/tree/{{ env.GIT_BRANCH_NAME }} +> > `commit` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/commit/{{ env.GITHUB_SHA }} +> > `build ` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }} +> Commit message by `{{ env.GITHUB_ACTOR }}` at {{ timestamp }}: ``` diff --git a/.github/workflows/support-files/nightly/index.js b/.github/workflows/support-files/nightly/index.js index 3bf2516092..913aa0e7c5 100644 --- a/.github/workflows/support-files/nightly/index.js +++ b/.github/workflows/support-files/nightly/index.js @@ -151,7 +151,7 @@ async function getMessageBody(context) { return `${icon} ${job.conclusion}: ${job.name} - ${job.html_url}`; }) // and join with newlines for display in the template - .join('\n'); + .join('\n\n'); return template({ ...context, jobResults }); } diff --git a/.github/workflows/support-files/nightly/templates/failure b/.github/workflows/support-files/nightly/templates/failure index 01ad9e7a00..1a8272b6c3 100644 --- a/.github/workflows/support-files/nightly/templates/failure +++ b/.github/workflows/support-files/nightly/templates/failure @@ -1,9 +1,15 @@ πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯ > :rocket: {{ env.NYM_PROJECT_NAME }} +> > πŸ”΄ **FAILURE** :cry: +> > `when` {{ timestamp }} +> > `branch` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/tree/{{ env.GIT_BRANCH_NAME }} +> > `commit` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/commit/{{ env.GITHUB_SHA }} +> > `build ` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }} +> {{ jobResults }} diff --git a/.github/workflows/support-files/nightly/templates/success b/.github/workflows/support-files/nightly/templates/success index 064d1ccd36..8901076548 100644 --- a/.github/workflows/support-files/nightly/templates/success +++ b/.github/workflows/support-files/nightly/templates/success @@ -1,9 +1,15 @@ 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 > :rocket: {{ env.NYM_PROJECT_NAME }} +> > βœ… **SUCCESS** +> > `when` {{ timestamp }} +> > `branch` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/tree/{{ env.GIT_BRANCH_NAME }} +> > `commit` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/commit/{{ env.GITHUB_SHA }} +> > `build ` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }} +> -{{ jobResults }} \ No newline at end of file +{{ jobResults }} diff --git a/.github/workflows/support-files/notifications/send_message_to_matrix.js b/.github/workflows/support-files/notifications/send_message_to_matrix.js index aabd1d57aa..002af92350 100644 --- a/.github/workflows/support-files/notifications/send_message_to_matrix.js +++ b/.github/workflows/support-files/notifications/send_message_to_matrix.js @@ -5,6 +5,7 @@ const localStorage = new LocalStorage('./scratch'); const { LocalStorageCryptoStore, } = require('matrix-js-sdk/lib/crypto/store/localStorage-crypto-store'); +var showdown = require('showdown'); // hide all matrix client output console.error = (error) => console.log('❌ error: ', error); @@ -54,7 +55,9 @@ function createClient(context, room, message) { } async function sendMatrixMessage(contextArg, messageAsMarkdown, roomId) { - const client = createClient(contextArg, roomId, messageAsMarkdown); + const converter = new showdown.Converter(); + const messageAsHtml = converter.makeHtml(messageAsMarkdown); + const client = createClient(contextArg, roomId, messageAsHtml); await client.initCrypto(); await client.startClient({ initialSyncLimit: 1 }); } diff --git a/.github/workflows/support-files/nym-connect/templates/failure b/.github/workflows/support-files/nym-connect/templates/failure index adc2896ace..0db23cefaa 100644 --- a/.github/workflows/support-files/nym-connect/templates/failure +++ b/.github/workflows/support-files/nym-connect/templates/failure @@ -1,9 +1,14 @@ πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯ > :rocket: {{ env.NYM_PROJECT_NAME }} +> > πŸ”΄ **FAILURE** :cry: +> > `branch` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/tree/{{ env.GIT_BRANCH_NAME }} +> > `commit` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/commit/{{ env.GITHUB_SHA }} +> > `build ` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }} +> Commit message: ``` diff --git a/.github/workflows/support-files/nym-connect/templates/success b/.github/workflows/support-files/nym-connect/templates/success index dbd26d69b8..4b547cb375 100644 --- a/.github/workflows/support-files/nym-connect/templates/success +++ b/.github/workflows/support-files/nym-connect/templates/success @@ -1,9 +1,14 @@ 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 > :rocket: {{ env.NYM_PROJECT_NAME }} ➑️➑️➑️➑️➑️ **View storybook:** https://{{ env.NYM_CI_WWW_LOCATION }}.{{ env.NYM_CI_WWW_BASE }}/ +> > βœ… **SUCCESS** +> > `branch` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/tree/{{ env.GIT_BRANCH_NAME }} +> > `commit` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/commit/{{ env.GITHUB_SHA }} +> > `build ` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }} +> Commit message by `{{ env.GITHUB_ACTOR }}` at {{ timestamp }}: ``` diff --git a/.github/workflows/support-files/nym-wallet/templates/failure b/.github/workflows/support-files/nym-wallet/templates/failure index adc2896ace..0db23cefaa 100644 --- a/.github/workflows/support-files/nym-wallet/templates/failure +++ b/.github/workflows/support-files/nym-wallet/templates/failure @@ -1,9 +1,14 @@ πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯ > :rocket: {{ env.NYM_PROJECT_NAME }} +> > πŸ”΄ **FAILURE** :cry: +> > `branch` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/tree/{{ env.GIT_BRANCH_NAME }} +> > `commit` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/commit/{{ env.GITHUB_SHA }} +> > `build ` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }} +> Commit message: ``` diff --git a/.github/workflows/support-files/nym-wallet/templates/success b/.github/workflows/support-files/nym-wallet/templates/success index 826f75e977..49f7787042 100644 --- a/.github/workflows/support-files/nym-wallet/templates/success +++ b/.github/workflows/support-files/nym-wallet/templates/success @@ -1,13 +1,18 @@ 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 > :rocket: {{ env.NYM_PROJECT_NAME }} +> > βœ… **SUCCESS** - +> > ➑️➑️➑️➑️➑️ **View output:** +> > `storybook`: https://{{ env.NYM_CI_WWW_LOCATION }}.{{ env.NYM_CI_WWW_BASE }} - +> > `branch` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/tree/{{ env.GIT_BRANCH_NAME }} +> > `commit` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/commit/{{ env.GITHUB_SHA }} +> > `build ` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }} +> Commit message by `{{ env.GITHUB_ACTOR }}` at {{ timestamp }}: ``` diff --git a/.github/workflows/support-files/package.json b/.github/workflows/support-files/package.json index 801d8e9bdd..01470a49b9 100644 --- a/.github/workflows/support-files/package.json +++ b/.github/workflows/support-files/package.json @@ -17,6 +17,7 @@ "remark-emoji": "^2.2.0", "remark-html": "^13.0.2", "remark-parse": "^9.0.0", + "showdown": "^2.1.0", "to-vfile": "^6.1.0", "unified": "^9.2.2" }, diff --git a/.github/workflows/support-files/ts-packages/templates/failure b/.github/workflows/support-files/ts-packages/templates/failure index adc2896ace..0db23cefaa 100644 --- a/.github/workflows/support-files/ts-packages/templates/failure +++ b/.github/workflows/support-files/ts-packages/templates/failure @@ -1,9 +1,14 @@ πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯πŸŸ₯ > :rocket: {{ env.NYM_PROJECT_NAME }} +> > πŸ”΄ **FAILURE** :cry: +> > `branch` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/tree/{{ env.GIT_BRANCH_NAME }} +> > `commit` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/commit/{{ env.GITHUB_SHA }} +> > `build ` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }} +> Commit message: ``` diff --git a/.github/workflows/support-files/ts-packages/templates/success b/.github/workflows/support-files/ts-packages/templates/success index bab42a29f8..48da9fee60 100644 --- a/.github/workflows/support-files/ts-packages/templates/success +++ b/.github/workflows/support-files/ts-packages/templates/success @@ -1,14 +1,20 @@ 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 > :rocket: {{ env.NYM_PROJECT_NAME }} +> > βœ… **SUCCESS** - +> > ➑️➑️➑️➑️➑️ **View output:** +> > `storybook`: https://{{ env.NYM_CI_WWW_LOCATION }}.{{ env.NYM_CI_WWW_BASE }} +> > `example`: https://{{ env.NYM_CI_WWW_LOCATION }}-example.{{ env.NYM_CI_WWW_BASE }} - +> > `branch` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/tree/{{ env.GIT_BRANCH_NAME }} +> > `commit` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/commit/{{ env.GITHUB_SHA }} +> > `build ` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }} +> Commit message by `{{ env.GITHUB_ACTOR }}` at {{ timestamp }}: ``` From 7e1e86bc77bb8d6438ba27f0e7a1f49288e4e28c Mon Sep 17 00:00:00 2001 From: Pierre Dommerc Date: Fri, 24 Feb 2023 14:06:41 +0100 Subject: [PATCH 12/34] build(nc-mobile): prepare for fdroid inclusion (#3102) * ci(nc-android): remove uneeded deps * chore(nc-mobile): improve android build * ci(nc-mobile): remove useless system deps * ci(nc-mobile): remove useless system deps * Revert "ci(nc-mobile): remove useless system deps" This reverts commit 011db2c58ed1361538376b2c9a2560cdde194ef7. * ci(nc-mobile): restore uneeded sys deps (<3 debian based distro) --- .github/workflows/connect-android-build.yml | 10 +- .github/workflows/connect-mobile.yml | 1 - nym-connect/mobile/package.json | 3 +- .../mobile/src-tauri/.cargo/config.toml | 41 --------- nym-connect/mobile/src-tauri/.cargo/libgcc.a | 1 - nym-connect/mobile/src-tauri/.gitignore | 1 + nym-connect/mobile/src-tauri/Cargo.lock | 91 ++++++++++--------- .../gen/android/nym_connect/.gitignore | 1 + .../src/main/jniLibs/x86_64/libnym_connect.so | 1 - .../nymtech/nym_connect/kotlin/BuildTask.kt | 11 ++- 10 files changed, 64 insertions(+), 97 deletions(-) delete mode 100644 nym-connect/mobile/src-tauri/.cargo/config.toml delete mode 100644 nym-connect/mobile/src-tauri/.cargo/libgcc.a delete mode 120000 nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/jniLibs/x86_64/libnym_connect.so diff --git a/.github/workflows/connect-android-build.yml b/.github/workflows/connect-android-build.yml index b2e2e8178e..fb8f837268 100644 --- a/.github/workflows/connect-android-build.yml +++ b/.github/workflows/connect-android-build.yml @@ -23,15 +23,12 @@ jobs: run: | sudo apt-get update sudo apt-get -y install \ - libwebkit2gtk-4.0-dev \ build-essential \ unzip \ curl \ wget \ libssl-dev \ - libgtk-3-dev \ squashfs-tools \ - libayatana-appindicator3-dev \ librsvg2-dev - name: Checkout @@ -64,6 +61,11 @@ jobs: - name: Install Rust toolchain uses: dtolnay/rust-toolchain@stable + # TODO this step takes a considerable amount of time + # We could avoid to compile from source tauri-cli and use instead + # pre-compiled binary provided by the node package `@tauri-apps/cli` + # But when using the later the build fails for some reason + # so keep installing and using tauri-cli - name: Install tauri cli run: cargo install tauri-cli --version "^2.0.0-alpha.2" @@ -93,11 +95,13 @@ jobs: - name: Build APK working-directory: nym-connect/mobile env: + # NODE_TAURI_CLI=${{ github.workspace }}/nym-connect/mobile/node_modules/.bin/tauri ANDROID_SDK_ROOT: ${{ env.ANDROID_HOME }} WRY_ANDROID_PACKAGE: net.nymtech.nym_connect WRY_ANDROID_LIBRARY: nym_connect # TODO build with release profile (--release), it will requires # to sign the APK. For now build with debug profile to avoid that + # TODO build using `yarn tauri`, provide NODE_TAURI_CLI, see TODO notes above run: cargo tauri android build --debug --apk --split-per-abi -t aarch64 # TODO add the version number to APK name diff --git a/.github/workflows/connect-mobile.yml b/.github/workflows/connect-mobile.yml index ccbd7203c4..05f0add6e2 100644 --- a/.github/workflows/connect-mobile.yml +++ b/.github/workflows/connect-mobile.yml @@ -49,7 +49,6 @@ jobs: librsvg2-dev \ libsoup-3.0-dev \ libjavascriptcoregtk-4.1-dev - #continue-on-error: true - name: Checkout uses: actions/checkout@v3 diff --git a/nym-connect/mobile/package.json b/nym-connect/mobile/package.json index 09df008b57..704f710c55 100644 --- a/nym-connect/mobile/package.json +++ b/nym-connect/mobile/package.json @@ -26,7 +26,8 @@ "clean:dist": "rm -rf dist", "clean:node": "rm -rf node_modules", "clean:rust": "cargo clean --manifest-path src-tauri/Cargo.toml", - "clean:": "run-p clean:node clean:rust" + "clean:android": "cd src-tauri/gen/android/nym_connect/ && gradlew clean", + "clean:": "run-p clean:node clean:rust clean:android" }, "dependencies": { "@emotion/react": "^11.7.0", diff --git a/nym-connect/mobile/src-tauri/.cargo/config.toml b/nym-connect/mobile/src-tauri/.cargo/config.toml deleted file mode 100644 index be3873a8cf..0000000000 --- a/nym-connect/mobile/src-tauri/.cargo/config.toml +++ /dev/null @@ -1,41 +0,0 @@ -[build] -target = 'x86_64-unknown-linux-gnu' -[target.aarch64-linux-android] -linker = '/home/pierre/.local/share/android/sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android24-clang' -rustflags = [ - '-L', - '/home/pierre/Documents/nym/nym/nym-connect-new/mobile/src-tauri/.cargo', - '-Clink-arg=-landroid', - '-Clink-arg=-llog', - '-Clink-arg=-lOpenSLES', -] - -[target.armv7-linux-androideabi] -linker = '/home/pierre/.local/share/android/sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi24-clang' -rustflags = [ - '-L', - '/home/pierre/Documents/nym/nym/nym-connect-new/mobile/src-tauri/.cargo', - '-Clink-arg=-landroid', - '-Clink-arg=-llog', - '-Clink-arg=-lOpenSLES', -] - -[target.i686-linux-android] -linker = '/home/pierre/.local/share/android/sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/i686-linux-android24-clang' -rustflags = [ - '-L', - '/home/pierre/Documents/nym/nym/nym-connect-new/mobile/src-tauri/.cargo', - '-Clink-arg=-landroid', - '-Clink-arg=-llog', - '-Clink-arg=-lOpenSLES', -] - -[target.x86_64-linux-android] -linker = '/home/pierre/.local/share/android/sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android24-clang' -rustflags = [ - '-L', - '/home/pierre/Documents/nym/nym/nym-connect-new/mobile/src-tauri/.cargo', - '-Clink-arg=-landroid', - '-Clink-arg=-llog', - '-Clink-arg=-lOpenSLES', -] diff --git a/nym-connect/mobile/src-tauri/.cargo/libgcc.a b/nym-connect/mobile/src-tauri/.cargo/libgcc.a deleted file mode 100644 index a5f3b046c1..0000000000 --- a/nym-connect/mobile/src-tauri/.cargo/libgcc.a +++ /dev/null @@ -1 +0,0 @@ -INPUT(-lunwind) \ No newline at end of file diff --git a/nym-connect/mobile/src-tauri/.gitignore b/nym-connect/mobile/src-tauri/.gitignore index c123704591..296ceb2535 100644 --- a/nym-connect/mobile/src-tauri/.gitignore +++ b/nym-connect/mobile/src-tauri/.gitignore @@ -2,3 +2,4 @@ # will have compiled files and executables /target/ WixTools +/.cargo/ diff --git a/nym-connect/mobile/src-tauri/Cargo.lock b/nym-connect/mobile/src-tauri/Cargo.lock index 1b1d0b29e7..f4efc94970 100644 --- a/nym-connect/mobile/src-tauri/Cargo.lock +++ b/nym-connect/mobile/src-tauri/Cargo.lock @@ -245,9 +245,9 @@ dependencies = [ [[package]] name = "bip39" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e89470017230c38e52b82b3ee3f530db1856ba1d434e3a67a3456a8a8dec5f" +checksum = "f5b9d9748b5770d1539657653dc5ac3cd9353549e74238dc0d96c22919128b94" dependencies = [ "bitcoin_hashes", "rand 0.6.5", @@ -258,9 +258,9 @@ dependencies = [ [[package]] name = "bitcoin_hashes" -version = "0.9.7" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ce18265ec2324ad075345d5814fbeed4f41f0a660055dc78840b74d19b874b1" +checksum = "90064b8dee6815a6470d60bad07bbbaee885c0e12d04177138fa3291a01b7bc4" [[package]] name = "bitflags" @@ -397,9 +397,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7f0778972c64420fdedc63f09919c8a88bda7b25135357fd25a5d9f3257e832" +checksum = "5ffdb39cb703212f3c11973452c2861b972f757b021158f3516ba10f2fa8b2c1" dependencies = [ "memchr", "serde", @@ -571,9 +571,9 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.1.2" +version = "4.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd125be87bf4c255ebc50de0b7f4d2a6201e8ac3dc86e39c0ad081dc5e7236fe" +checksum = "0012995dc3a54314f4710f5631d74767e73c534b8757221708303e48eef7a19b" dependencies = [ "clap", ] @@ -603,9 +603,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "783fe232adfca04f90f56201b26d79682d4cd2625e0bc7290b95123afe558ade" +checksum = "350b9cf31731f9957399229e9b2adc51eeabdfbe9d71d9a0552275fd12710d09" dependencies = [ "os_str_bytes", ] @@ -636,7 +636,7 @@ dependencies = [ "sqlx 0.6.2", "tap", "thiserror", - "time 0.3.18", + "time 0.3.19", "tokio", "tokio-stream", "url", @@ -2040,15 +2040,15 @@ dependencies = [ [[package]] name = "generator" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d266041a359dfa931b370ef684cceb84b166beb14f7f0421f4a6a3d0c446d12e" +checksum = "33a20a288a94683f5f4da0adecdbe095c94a77c295e514cc6484e9394dd8376e" dependencies = [ "cc", "libc", "log", "rustversion", - "windows 0.39.0", + "windows 0.44.0", ] [[package]] @@ -2533,9 +2533,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" +checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" dependencies = [ "bytes", "fnv", @@ -2826,9 +2826,9 @@ checksum = "30e22bd8629359895450b59ea7a776c850561b96a3b1d31321c1949d9e6c9146" [[package]] name = "is-terminal" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22e18b0a45d56fe973d6db23972bf5bc46f988a4a2385deac9cc29572f09daef" +checksum = "21b6b32576413a8e69b90e952e4a026476040d81017b80445deda5f2d3921857" dependencies = [ "hermit-abi 0.3.1", "io-lifetimes", @@ -3159,7 +3159,7 @@ dependencies = [ "dirs-next", "objc-foundation", "objc_id", - "time 0.3.18", + "time 0.3.19", ] [[package]] @@ -3355,11 +3355,12 @@ dependencies = [ [[package]] name = "notify-rust" -version = "4.7.1" +version = "4.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "260208751689b605138bb55ab6af43ad75f628619a7e0b818d63bf6629e59467" +checksum = "2bfa211d18e360f08e36c364308f394b5eb23a6629150690e109a916dc6f610e" dependencies = [ "dbus", + "log", "mac-notification-sys", "tauri-winrt-notification", ] @@ -3428,18 +3429,18 @@ dependencies = [ [[package]] name = "num_enum" -version = "0.5.9" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d829733185c1ca374f17e52b762f24f535ec625d2cc1f070e34c8a9068f341b" +checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" dependencies = [ "num_enum_derive", ] [[package]] name = "num_enum_derive" -version = "0.5.9" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2be1598bf1c313dcdd12092e3f1920f463462525a21b7b4e11b4168353d0123e" +checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -3584,7 +3585,7 @@ dependencies = [ "serde_json", "serde_repr", "thiserror", - "time 0.3.18", + "time 0.3.19", ] [[package]] @@ -4348,16 +4349,16 @@ checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" [[package]] name = "plist" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5329b8f106a176ab0dce4aae5da86bfcb139bb74fb00882859e03745011f3635" +checksum = "9469799ca90293a376f68f6fcb8f11990d9cff55602cfba0ba83893c973a7f46" dependencies = [ - "base64 0.13.1", + "base64 0.21.0", "indexmap", "line-wrap", "quick-xml 0.26.0", "serde", - "time 0.3.18", + "time 0.3.19", ] [[package]] @@ -5444,9 +5445,9 @@ checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" [[package]] name = "slab" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" dependencies = [ "autocfg 1.1.0", ] @@ -5873,9 +5874,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.107" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ "proc-macro2", "quote", @@ -6073,7 +6074,7 @@ dependencies = [ "sha2 0.10.6", "tauri-utils", "thiserror", - "time 0.3.18", + "time 0.3.19", "url", "uuid 1.3.0", "walkdir", @@ -6213,7 +6214,7 @@ dependencies = [ "subtle 2.4.1", "subtle-encoding", "tendermint-proto", - "time 0.3.18", + "time 0.3.19", "zeroize", ] @@ -6246,7 +6247,7 @@ dependencies = [ "serde", "serde_bytes", "subtle-encoding", - "time 0.3.18", + "time 0.3.19", ] [[package]] @@ -6274,7 +6275,7 @@ dependencies = [ "tendermint-config", "tendermint-proto", "thiserror", - "time 0.3.18", + "time 0.3.19", "tokio", "tracing", "url", @@ -6351,9 +6352,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.18" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af0097eaf301d576d0b2aead7a59facab6d53cc636340f0291fab8446a2e8613" +checksum = "53250a3b3fed8ff8fd988587d8925d26a83ac3845d9e03b220b37f34c2b8d6c2" dependencies = [ "itoa 1.0.5", "js-sys", @@ -6370,9 +6371,9 @@ checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" [[package]] name = "time-macros" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d967f99f534ca7e495c575c62638eebc2898a8c84c119b89e250477bc4ba16b2" +checksum = "a460aeb8de6dcb0f381e1ee05f1cd56fcf5a5f6eb8187ff3d8f0b11078d38b7c" dependencies = [ "time-core", ] @@ -6453,9 +6454,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d660770404473ccd7bc9f8b28494a811bc18542b915c0855c51e8f419d5223ce" +checksum = "8fb52b74f05dbf495a8fba459fdc331812b96aa086d9eb78101fa0d4569c3313" dependencies = [ "futures-core", "pin-project-lite", @@ -6839,7 +6840,7 @@ dependencies = [ "rustc_version 0.4.0", "rustversion", "thiserror", - "time 0.3.18", + "time 0.3.19", ] [[package]] diff --git a/nym-connect/mobile/src-tauri/gen/android/nym_connect/.gitignore b/nym-connect/mobile/src-tauri/gen/android/nym_connect/.gitignore index b2ed2681b2..edf9888947 100644 --- a/nym-connect/mobile/src-tauri/gen/android/nym_connect/.gitignore +++ b/nym-connect/mobile/src-tauri/gen/android/nym_connect/.gitignore @@ -13,3 +13,4 @@ build .externalNativeBuild .cxx local.properties +app/src/main/jniLibs/** diff --git a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/jniLibs/x86_64/libnym_connect.so b/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/jniLibs/x86_64/libnym_connect.so deleted file mode 120000 index faa3a3d96f..0000000000 --- a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/jniLibs/x86_64/libnym_connect.so +++ /dev/null @@ -1 +0,0 @@ -/home/pierre/Documents/nym/nym/nym-connect-new/mobile/src-tauri/target/x86_64-linux-android/debug/libnym_connect.so \ No newline at end of file diff --git a/nym-connect/mobile/src-tauri/gen/android/nym_connect/buildSrc/src/main/java/net/nymtech/nym_connect/kotlin/BuildTask.kt b/nym-connect/mobile/src-tauri/gen/android/nym_connect/buildSrc/src/main/java/net/nymtech/nym_connect/kotlin/BuildTask.kt index 1fe737b980..5f63ba21c5 100644 --- a/nym-connect/mobile/src-tauri/gen/android/nym_connect/buildSrc/src/main/java/net/nymtech/nym_connect/kotlin/BuildTask.kt +++ b/nym-connect/mobile/src-tauri/gen/android/nym_connect/buildSrc/src/main/java/net/nymtech/nym_connect/kotlin/BuildTask.kt @@ -26,17 +26,20 @@ open class BuildTask : DefaultTask() { val rootDirRel = rootDirRel ?: throw GradleException("rootDirRel cannot be null") val target = target ?: throw GradleException("target cannot be null") val release = release ?: throw GradleException("release cannot be null") + val nodeExecutable = System.getenv("NODE_TAURI_CLI") val home = (System.getenv("HOME") ?: "") val cargoHome = (System.getenv("CARGO_HOME") ?: "$home/.cargo") - val tauriCli = "$cargoHome/bin/cargo-tauri" - if (!File(tauriCli).isFile()) { - throw GradleException("$tauriCli no shuch file") + val rustExecutable = "$cargoHome/bin/cargo-tauri" + val tauriCli = when { + !nodeExecutable.isNullOrEmpty() && File(nodeExecutable).isFile() -> nodeExecutable + File(rustExecutable).isFile() -> rustExecutable + else -> throw GradleException("couldn't find tauri-cli executable") } println("gradle Rust plugin, using tauri cli executable: $tauriCli") project.exec { workingDir(File(project.projectDir, rootDirRel.path)) executable(tauriCli) - args(listOf("tauri", "android", "android-studio-script")) + args(listOf("android", "android-studio-script")) if (project.logger.isEnabled(LogLevel.DEBUG)) { args("-vv") } else if (project.logger.isEnabled(LogLevel.INFO)) { From cd9cdfa5bb00aafef94cd6780b64f987f8a82f42 Mon Sep 17 00:00:00 2001 From: benedettadavico Date: Fri, 24 Feb 2023 14:06:56 +0100 Subject: [PATCH 13/34] some small api test fixes --- .../mixnode/contract-cache-mixnode.test.ts | 4 +-- .../status/status-gateway.test.ts | 17 ++++++++----- .../status/status-mixnode.test.ts | 19 ++++++++------ nym-api/tests/src/config/config.yaml | 2 +- nym-api/tests/src/endpoints/Status.ts | 5 ++-- nym-api/tests/src/types/StatusInterfaces.ts | 25 +++++++++++++------ 6 files changed, 46 insertions(+), 26 deletions(-) diff --git a/nym-api/tests/functional_test/contract_cache/mixnode/contract-cache-mixnode.test.ts b/nym-api/tests/functional_test/contract_cache/mixnode/contract-cache-mixnode.test.ts index 1605cd0bf4..31fb8d959d 100644 --- a/nym-api/tests/functional_test/contract_cache/mixnode/contract-cache-mixnode.test.ts +++ b/nym-api/tests/functional_test/contract_cache/mixnode/contract-cache-mixnode.test.ts @@ -34,7 +34,7 @@ describe("Get mixnode data", (): void => { expect(typeof mixnode.bond_information.mix_node.verloc_port).toBe("number"); expect(typeof mixnode.bond_information.mix_node.mix_port).toBe("number"); expect(mixnode.bond_information.mix_node.mix_port).toStrictEqual(1789); - expect(mixnode.bond_information.mix_node.verloc_port).toStrictEqual(1790); + expect(typeof mixnode.bond_information.mix_node.verloc_port).toBe("number"); const identitykey = mixnode.bond_information.mix_node.identity_key; if (typeof identitykey === "string") { @@ -96,7 +96,7 @@ describe("Get mixnode data", (): void => { expect(typeof mixnode.mixnode_details.bond_information.mix_node.verloc_port).toBe("number"); expect(typeof mixnode.mixnode_details.bond_information.mix_node.mix_port).toBe("number"); expect(mixnode.mixnode_details.bond_information.mix_node.mix_port).toStrictEqual(1789); - expect(mixnode.mixnode_details.bond_information.mix_node.verloc_port).toStrictEqual(1790); + expect(typeof mixnode.mixnode_details.bond_information.mix_node.verloc_port).toBe("number"); const identitykey2 = mixnode.mixnode_details.bond_information.mix_node.identity_key if (typeof identitykey2 === "string") { diff --git a/nym-api/tests/functional_test/status/status-gateway.test.ts b/nym-api/tests/functional_test/status/status-gateway.test.ts index b14b71ddb8..ead1da8278 100644 --- a/nym-api/tests/functional_test/status/status-gateway.test.ts +++ b/nym-api/tests/functional_test/status/status-gateway.test.ts @@ -15,19 +15,24 @@ describe("Get gateway data", (): void => { response.forEach((x) => { expect(typeof x.gateway_bond.owner).toBe("string"); expect(typeof x.performance).toBe("string"); + expect(typeof x.node_performance.last_24h).toBe("string"); }); }); it("Get a gateway history", async (): Promise => { const identity_key = config.environmnetConfig.gateway_identity; const response = await status.getGatewayHistory(identity_key); - response.history.forEach((x) => { - expect(typeof x.date).toBe("string"); - expect(typeof x.uptime).toBe("number"); - }); - expect(identity_key).toStrictEqual(response.identity); - expect(typeof response.owner).toBe("string"); + if ("identity" in response) { + response.history.forEach((x) => { + expect(typeof x.date).toBe("string"); + expect(typeof x.uptime).toBe("number"); + }); + expect(identity_key).toStrictEqual(response.identity); + expect(typeof response.owner).toBe("string"); + } else if ("message" in response) { + expect(response.message).toContain("could not find uptime history associated with gateway"); + } }); it("Get gateway core status count", async (): Promise => { diff --git a/nym-api/tests/functional_test/status/status-mixnode.test.ts b/nym-api/tests/functional_test/status/status-mixnode.test.ts index 1a6b02f655..8f8306e740 100644 --- a/nym-api/tests/functional_test/status/status-mixnode.test.ts +++ b/nym-api/tests/functional_test/status/status-mixnode.test.ts @@ -39,13 +39,16 @@ describe("Get mixnode data", (): void => { const identity_key = config.environmnetConfig.mix_id; const response = await status.getMixnodeHistory(identity_key); - response.history.forEach((x) => { - expect(typeof x.date).toBe("string"); - expect(typeof x.uptime).toBe("number"); - }); - - expect(identity_key).toStrictEqual(response.mix_id); - expect(typeof response.owner).toBe("string"); + if ("mix_id" in response) { + response.history.forEach((x) => { + expect(typeof x.date).toBe("string"); + expect(typeof x.uptime).toBe("number"); + }); + expect(identity_key).toStrictEqual(response.mix_id); + expect(typeof response.owner).toBe("string"); + } else if ("message" in response) { + expect(response.message).toContain("could not find uptime history associated with mixnode"); + } }); it("Get a mixnode core count", async (): Promise => { @@ -109,7 +112,7 @@ describe("Compute mixnode reward estimation", (): void => { config = ConfigHandler.getInstance(); }); it("with correct data", async (): Promise => { - const response = await status.sendMixnodeRewardEstimatedComputation(7); + const response = await status.sendMixnodeRewardEstimatedComputation(63); expect(typeof response.estimation.delegates).toBe("string"); }); diff --git a/nym-api/tests/src/config/config.yaml b/nym-api/tests/src/config/config.yaml index 8a0007600e..83a9d3fa92 100644 --- a/nym-api/tests/src/config/config.yaml +++ b/nym-api/tests/src/config/config.yaml @@ -4,7 +4,7 @@ common: Content-Type: application/json qa: api_base_url: https://qwerty-validator-api.qa.nymte.ch/api/v1 - mix_id: 7 + mix_id: 63 identity_key: 4Yr4qmEHd9sgsuQ83191FR2hD88RfsbMmB4tzhhZWriz gateway_identity: 336yuXAeGEgedRfqTJZsG2YV7P13QH1bHv1SjCZYarc9 log_level: error diff --git a/nym-api/tests/src/endpoints/Status.ts b/nym-api/tests/src/endpoints/Status.ts index de6aa7da9c..096e90cd88 100644 --- a/nym-api/tests/src/endpoints/Status.ts +++ b/nym-api/tests/src/endpoints/Status.ts @@ -7,6 +7,7 @@ import { InclusionProbabilities, InclusionProbability, NodeHistory, + NoUptime, Report, RewardEstimation, StakeSaturation, @@ -36,7 +37,7 @@ export default class Status extends APIClient { return response.data; } - public async getGatewayHistory(identity_key: string): Promise { + public async getGatewayHistory(identity_key: string): Promise { const response = await this.restClient.sendGet({ route: `/gateway/${identity_key}/history`, }); @@ -111,7 +112,7 @@ export default class Status extends APIClient { return response.data; } - public async getMixnodeHistory(mix_id: number): Promise { + public async getMixnodeHistory(mix_id: number): Promise { const response = await this.restClient.sendGet({ route: `/mixnode/${mix_id}/history`, }); diff --git a/nym-api/tests/src/types/StatusInterfaces.ts b/nym-api/tests/src/types/StatusInterfaces.ts index 3c14f0c485..069c509ace 100644 --- a/nym-api/tests/src/types/StatusInterfaces.ts +++ b/nym-api/tests/src/types/StatusInterfaces.ts @@ -27,13 +27,6 @@ export interface Node { in_active_set: boolean; } -export interface RewardEstimation { - estimation: Estimation; - reward_params: RewardParams; - epoch: Epoch; - as_at: number; -} - export interface Estimation { total_node_reward: string; operator: string; @@ -41,6 +34,13 @@ export interface Estimation { operating_cost: string; } +export interface RewardEstimation { + estimation: Estimation; + reward_params: RewardParams; + epoch: Epoch; + as_at: number; +} + export interface RewardParams { interval: Interval; rewarded_set_size: number; @@ -129,6 +129,10 @@ export interface NodeHistory { history: History[]; } +export interface NoUptime { + message: string; +} + export interface CoreCount { mix_id: number; identity: string; @@ -162,9 +166,16 @@ export interface GatewayBond { proxy?: any; } +export interface nodePerformance { + most_recent: string; + last_hour: string; + last_24h: string; +} + export interface DetailedGateway { gateway_bond: GatewayBond; performance: string; + node_performance: nodePerformance; } export interface OriginalPledge { From dc08b1170a789c1358cea47c86ef1ab8a7f3eb59 Mon Sep 17 00:00:00 2001 From: farbanas Date: Mon, 27 Feb 2023 10:03:28 +0100 Subject: [PATCH 14/34] add gitlab agent --- .gitlab/agents/websites-agent/config.yaml | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .gitlab/agents/websites-agent/config.yaml diff --git a/.gitlab/agents/websites-agent/config.yaml b/.gitlab/agents/websites-agent/config.yaml new file mode 100644 index 0000000000..e69de29bb2 From 1ba6444e722e7757f1175a296bed6e31e25b8db8 Mon Sep 17 00:00:00 2001 From: farbanas Date: Mon, 27 Feb 2023 10:10:42 +0100 Subject: [PATCH 15/34] delete gitlab agent --- .gitlab/agents/websites-agent/config.yaml | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .gitlab/agents/websites-agent/config.yaml diff --git a/.gitlab/agents/websites-agent/config.yaml b/.gitlab/agents/websites-agent/config.yaml deleted file mode 100644 index e69de29bb2..0000000000 From 14a7b5bdc892688ef93585443ce1d48ced17d843 Mon Sep 17 00:00:00 2001 From: Mark Sinclair Date: Mon, 27 Feb 2023 17:55:41 +0000 Subject: [PATCH 16/34] Typescript SDK 1.1.7 --- .../examples/plain-html/src/index.ts | 5 ++++ sdk/typescript/packages/sdk/package.json | 2 +- .../packages/sdk/src/mixnet/wasm/index.ts | 7 +++++ .../packages/sdk/src/mixnet/wasm/types.ts | 26 +++++++++++++++---- .../packages/sdk/src/mixnet/wasm/worker.ts | 19 +++++++++++++- 5 files changed, 52 insertions(+), 7 deletions(-) diff --git a/sdk/typescript/examples/plain-html/src/index.ts b/sdk/typescript/examples/plain-html/src/index.ts index 3871d1c0a7..a0e429beb1 100644 --- a/sdk/typescript/examples/plain-html/src/index.ts +++ b/sdk/typescript/examples/plain-html/src/index.ts @@ -9,6 +9,9 @@ let nym: NymMixnetClient | null = null; async function main() { nym = await createNymMixnetClient(); + // add nym client to the Window globally, so that it can be used from the dev tools console + (window as any).nym = nym; + if (!nym) { console.error('Oh no! Could not create client'); return; @@ -38,6 +41,8 @@ async function main() { }; } + nym.events.subscribeToRawMessageReceivedEvent((e) => console.log('Received: ', e.args.payload)); + // start up the client await nym.client.start({ clientId: 'My awesome client', diff --git a/sdk/typescript/packages/sdk/package.json b/sdk/typescript/packages/sdk/package.json index 2fa4497f03..90622cc3e0 100644 --- a/sdk/typescript/packages/sdk/package.json +++ b/sdk/typescript/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@nymproject/sdk", - "version": "1.1.6", + "version": "1.1.7", "license": "Apache-2.0", "author": "Nym Technologies SA", "type": "module", diff --git a/sdk/typescript/packages/sdk/src/mixnet/wasm/index.ts b/sdk/typescript/packages/sdk/src/mixnet/wasm/index.ts index 042c273791..b60550aee0 100644 --- a/sdk/typescript/packages/sdk/src/mixnet/wasm/index.ts +++ b/sdk/typescript/packages/sdk/src/mixnet/wasm/index.ts @@ -11,6 +11,7 @@ import { LoadedEvent, MimeTypes, StringMessageReceivedEvent, + RawMessageReceivedEvent, } from './types'; /** @@ -89,6 +90,12 @@ export const createNymMixnetClient = async (options?: { getSubscriptions(EventKinds.BinaryMessageReceived).unshift(handler); }; }, + subscribeToRawMessageReceivedEvent: (handler) => { + getSubscriptions(EventKinds.RawMessageReceived).push(handler); + return () => { + getSubscriptions(EventKinds.RawMessageReceived).unshift(handler); + }; + }, }; // let comlink handle interop with the web worker diff --git a/sdk/typescript/packages/sdk/src/mixnet/wasm/types.ts b/sdk/typescript/packages/sdk/src/mixnet/wasm/types.ts index ce4a4cd20d..2360414075 100644 --- a/sdk/typescript/packages/sdk/src/mixnet/wasm/types.ts +++ b/sdk/typescript/packages/sdk/src/mixnet/wasm/types.ts @@ -60,19 +60,24 @@ export interface Debug { * This is going to be superseded by key rotation once implemented. */ maximum_reply_surb_age_ms: bigint; + /** + * Defines maximum amount of time the client is going to wait for reply surbs before + * deciding it's never going to get them and would drop all pending messages + */ + maximum_reply_surb_drop_waiting_period_ms: bigint; /** * Defines the maximum number of reply surbs the client would request. */ maximum_reply_surb_request_size: number; - /** - * Defines the maximum number of reply surbs the client wants to keep in its storage at any times. - */ - maximum_reply_surb_storage_threshold: number; /** * Defines maximum amount of time the client is going to wait for reply surbs before explicitly asking * for more even though in theory they wouldn't need to. */ - maximum_reply_surb_waiting_period_ms: bigint; + maximum_reply_surb_rerequest_waiting_period_ms: bigint; + /** + * Defines the maximum number of reply surbs the client wants to keep in its storage at any times. + */ + maximum_reply_surb_storage_threshold: number; /** * The parameter of Poisson distribution determining how long, on average, * it is going to take another 'real traffic stream' message to be sent. @@ -167,6 +172,7 @@ export interface IWebWorker { setTextMimeTypes: (mimeTypes: string[]) => void; getTextMimeTypes: () => string[]; send: (args: { payload: Payload; recipient: string; replySurbs?: number }) => void; + rawSend: (args: { payload: Uint8Array; recipient: string; replySurbs?: number }) => void; } export interface IWebWorkerAsync { @@ -176,6 +182,7 @@ export interface IWebWorkerAsync { setTextMimeTypes: (mimeTypes: string[]) => void; getTextMimeTypes: () => Promise; send: (args: { payload: Payload; recipient: string; replySurbs?: number }) => Promise; + rawSend: (args: { payload: Uint8Array; recipient: string; replySurbs?: number }) => Promise; } export enum EventKinds { @@ -183,6 +190,7 @@ export enum EventKinds { Connected = 'Connected', StringMessageReceived = 'StringMessageReceived', BinaryMessageReceived = 'BinaryMessageReceived', + RawMessageReceived = 'RawMessageReceived', } export interface LoadedEvent { @@ -218,9 +226,17 @@ export interface BinaryMessageReceivedEvent { }; } +export interface RawMessageReceivedEvent { + kind: EventKinds.RawMessageReceived; + args: { + payload: Uint8Array; + }; +} + export interface IWebWorkerEvents { subscribeToLoaded: EventHandlerSubscribeFn; subscribeToConnected: EventHandlerSubscribeFn; subscribeToTextMessageReceivedEvent: EventHandlerSubscribeFn; subscribeToBinaryMessageReceivedEvent: EventHandlerSubscribeFn; + subscribeToRawMessageReceivedEvent: EventHandlerSubscribeFn; } diff --git a/sdk/typescript/packages/sdk/src/mixnet/wasm/worker.ts b/sdk/typescript/packages/sdk/src/mixnet/wasm/worker.ts index dbc9ae36d7..4b663b9500 100644 --- a/sdk/typescript/packages/sdk/src/mixnet/wasm/worker.ts +++ b/sdk/typescript/packages/sdk/src/mixnet/wasm/worker.ts @@ -34,6 +34,7 @@ import type { LoadedEvent, NymClientConfig, OnRawPayloadFn, + RawMessageReceivedEvent, StringMessageReceivedEvent, } from './types'; import { EventKinds, MimeTypes } from './types'; @@ -136,8 +137,8 @@ class ClientWrapper { recipient, replySurbs = 0, }: { - recipient: string; payload: Uint8Array; + recipient: string; replySurbs?: number; }) => { if (!this.client) { @@ -170,7 +171,14 @@ init(wasmBytes()) wrapper.init( new Config(config.clientId, config.nymApiUrl, gatewayEndpoint, config.debug || default_debug()), async (message) => { + // fire an event with the raw message + postMessageWithType({ + kind: EventKinds.RawMessageReceived, + args: { payload: message }, + }); + try { + // try to decode the payload to extract the mime-type, headers and payload body const decodedPayload = decode_payload(message); const { payload, headers } = decodedPayload; const mimeType = decodedPayload.mimeType as MimeTypes; @@ -178,6 +186,8 @@ init(wasmBytes()) if (wrapper.getTextMimeTypes().includes(mimeType)) { const stringMessage = parse_utf8_string(payload); + // the payload is a string type (in the options at creation time, string mime-types are set, or fall back + // to defaults, such as `text/plain`, `application/json`, etc) postMessageWithType({ kind: EventKinds.StringMessageReceived, args: { mimeType, payload: stringMessage, payloadRaw: payload, headers }, @@ -185,6 +195,7 @@ init(wasmBytes()) return; } + // the payload is a binary type postMessageWithType({ kind: EventKinds.BinaryMessageReceived, args: { mimeType, payload, headers }, @@ -247,6 +258,12 @@ init(wasmBytes()) .send({ payload, recipient, replySurbs }) .catch((e) => console.error('[Nym WASM client] Failed to send message', e)); }, + rawSend(args) { + const { recipient, payload, replySurbs } = args; + wrapper + .send({ payload, replySurbs, recipient }) + .catch((e) => console.error('[Nym WASM client] Failed to send message', e)); + }, }; // start comlink listening for messages and handle them above From b8ee3465f86cb3b85e891b547ade4e8bbe9268d6 Mon Sep 17 00:00:00 2001 From: Tommy Verrall <60836166+tommyv1987@users.noreply.github.com> Date: Tue, 28 Feb 2023 10:33:45 +0100 Subject: [PATCH 17/34] Update build_and_run.sh remove unnecessary environment variable --- tests/build_and_run.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/build_and_run.sh b/tests/build_and_run.sh index b86c74cced..6c492b4ea9 100755 --- a/tests/build_and_run.sh +++ b/tests/build_and_run.sh @@ -2,7 +2,6 @@ PWD="../" GIT_BRANCH=$1 -VERSION_NUMBER=$2 # run the script from the correct location From bc5bb271d874a6cf4270e87ad03b4fcb86ed7240 Mon Sep 17 00:00:00 2001 From: farbanas Date: Tue, 28 Feb 2023 17:26:39 +0100 Subject: [PATCH 18/34] feat: remove unused workflows, update a couple of if conditions in github workflows and add the command for optimizing contract sizes to Makefile --- .github/workflows/contracts-build.yml | 5 +- .github/workflows/network-explorer-api.yml | 57 ------------------- .github/workflows/nym-cli-publish.yml | 50 ---------------- .../workflows/nym-connect-publish-macos.yml | 2 +- .../workflows/nym-connect-publish-ubuntu.yml | 2 +- .github/workflows/nym-release-publish.yml | 2 +- .../workflows/nym-wallet-publish-macos.yml | 2 +- .../workflows/nym-wallet-publish-ubuntu.yml | 2 +- Makefile | 2 + 9 files changed, 11 insertions(+), 113 deletions(-) delete mode 100644 .github/workflows/network-explorer-api.yml delete mode 100644 .github/workflows/nym-cli-publish.yml diff --git a/.github/workflows/contracts-build.yml b/.github/workflows/contracts-build.yml index efe1230175..839a8804e6 100644 --- a/.github/workflows/contracts-build.yml +++ b/.github/workflows/contracts-build.yml @@ -6,7 +6,7 @@ on: jobs: build: - if: ${{ startsWith(github.ref, 'refs/tags/nym-contracts-') && github.event_name == 'release' }} + if: ${{ (startsWith(github.ref, 'refs/tags/nym-contracts-') && github.event_name == 'release') || github.event_name == 'workflow_dispatch' }} runs-on: [self-hosted, custom-runner-linux] steps: - uses: actions/checkout@v2 @@ -19,6 +19,9 @@ jobs: override: true components: rustfmt, clippy + - name: Install wasm-opt + run: cargo install wasm-opt + - name: Build release contracts run: make wasm diff --git a/.github/workflows/network-explorer-api.yml b/.github/workflows/network-explorer-api.yml deleted file mode 100644 index 6a23d5baf9..0000000000 --- a/.github/workflows/network-explorer-api.yml +++ /dev/null @@ -1,57 +0,0 @@ -name: CI for Network Explorer API - -on: - workflow_dispatch: - release: - types: [created] - -env: - NETWORK: mainnet - -jobs: - publish-nym: - if: ${{ startsWith(github.ref, 'refs/tags/nym-explorer-api-') && (github.event_name == 'release' || github.event_name == 'workflow_dispatch') }} - strategy: - fail-fast: false - matrix: - platform: [ubuntu-20.04] - - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - - name: Install Dependencies (Linux) - run: sudo apt-get update && sudo apt-get -y install libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libudev-dev squashfs-tools - continue-on-error: true - - - name: Check the release tag starts with `nym-explorer-api-` - uses: actions/github-script@v3 - with: - script: | - core.setFailed('Release tag did not start with nym-explorer-api-...') - - - name: Install Rust stable - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - - name: Build all explorer-api - uses: actions-rs/cargo@v1 - with: - command: build - args: --manifest-path explorer-api/Cargo.toml --workspace --release - - - name: Upload Artifact - uses: actions/upload-artifact@v3 - with: - name: my-artifact - path: | - target/release/explorer-api - retention-days: 30 - - - name: Upload to release based on tag name - uses: softprops/action-gh-release@v1 - if: github.event_name == 'release' - with: - files: | - target/release/explorer-api diff --git a/.github/workflows/nym-cli-publish.yml b/.github/workflows/nym-cli-publish.yml deleted file mode 100644 index dab51eea24..0000000000 --- a/.github/workflows/nym-cli-publish.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Publish Nym CLI binaries - -on: - workflow_dispatch: - release: - types: [created] - -env: - NETWORK: mainnet - -jobs: - publish-nym-cli: - if: ${{ startsWith(github.ref, 'refs/tags/nym-cli-') && (github.event_name == 'release' || github.event_name == 'workflow_dispatch') }} - strategy: - fail-fast: false - matrix: - platform: [ubuntu-20.04, windows-latest, macos-latest] - - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - - name: Check the release tag starts with `nym-cli-` - uses: actions/github-script@v3 - with: - script: | - core.setFailed('Release tag did not start with nym-cli-...') - - - name: Install Rust stable - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - - name: Build binary - run: make build-nym-cli - - - name: Upload Artifact - uses: actions/upload-artifact@v3 - with: - name: nym-cli-${{ matrix.platform }} - path: | - target/release/nym-cli* - retention-days: 30 - - - name: Upload to release based on tag name - uses: softprops/action-gh-release@v1 - if: github.event_name == 'release' - with: - files: | - target/release/nym-cli diff --git a/.github/workflows/nym-connect-publish-macos.yml b/.github/workflows/nym-connect-publish-macos.yml index faff21a30c..0c9b33e416 100644 --- a/.github/workflows/nym-connect-publish-macos.yml +++ b/.github/workflows/nym-connect-publish-macos.yml @@ -10,7 +10,7 @@ defaults: jobs: publish-tauri: - if: ${{ startsWith(github.ref, 'refs/tags/nym-connect-') && github.event_name == 'release' }} + if: ${{ (startsWith(github.ref, 'refs/tags/nym-connect-') && github.event_name == 'release') || github.event_name == 'workflow_dispatch' }} strategy: fail-fast: false matrix: diff --git a/.github/workflows/nym-connect-publish-ubuntu.yml b/.github/workflows/nym-connect-publish-ubuntu.yml index fd36ca4909..473371c9e0 100644 --- a/.github/workflows/nym-connect-publish-ubuntu.yml +++ b/.github/workflows/nym-connect-publish-ubuntu.yml @@ -10,7 +10,7 @@ defaults: jobs: publish-tauri: - if: ${{ startsWith(github.ref, 'refs/tags/nym-connect-') && github.event_name == 'release' }} + if: ${{ (startsWith(github.ref, 'refs/tags/nym-connect-') && github.event_name == 'release') || github.event_name == 'workflow_dispatch' }} strategy: fail-fast: false matrix: diff --git a/.github/workflows/nym-release-publish.yml b/.github/workflows/nym-release-publish.yml index 09b4caa9b8..a73eabfcb3 100644 --- a/.github/workflows/nym-release-publish.yml +++ b/.github/workflows/nym-release-publish.yml @@ -16,7 +16,7 @@ env: jobs: publish-nym: - if: ${{ startsWith(github.ref, 'refs/tags/nym-binaries-') && github.event_name == 'release' }} + if: ${{ (startsWith(github.ref, 'refs/tags/nym-binaries-') && github.event_name == 'release') || github.event_name == 'workflow_dispatch' }} strategy: fail-fast: false matrix: diff --git a/.github/workflows/nym-wallet-publish-macos.yml b/.github/workflows/nym-wallet-publish-macos.yml index db55bc9754..d3ef82759e 100644 --- a/.github/workflows/nym-wallet-publish-macos.yml +++ b/.github/workflows/nym-wallet-publish-macos.yml @@ -10,7 +10,7 @@ defaults: jobs: publish-tauri: - if: ${{ startsWith(github.ref, 'refs/tags/nym-wallet-') && github.event_name == 'release' }} + if: ${{ (startsWith(github.ref, 'refs/tags/nym-wallet-') && github.event_name == 'release') || github.event_name == 'workflow_dispatch' }} strategy: fail-fast: false matrix: diff --git a/.github/workflows/nym-wallet-publish-ubuntu.yml b/.github/workflows/nym-wallet-publish-ubuntu.yml index c27a9f0233..2b5a55c37a 100644 --- a/.github/workflows/nym-wallet-publish-ubuntu.yml +++ b/.github/workflows/nym-wallet-publish-ubuntu.yml @@ -9,7 +9,7 @@ defaults: jobs: publish-tauri: - if: ${{ startsWith(github.ref, 'refs/tags/nym-wallet-') && github.event_name == 'release' }} + if: ${{ (startsWith(github.ref, 'refs/tags/nym-wallet-') && github.event_name == 'release') || github.event_name == 'workflow_dispatch' }} strategy: fail-fast: false matrix: diff --git a/Makefile b/Makefile index a13100f7ba..a3a51f4e6b 100644 --- a/Makefile +++ b/Makefile @@ -126,6 +126,8 @@ fmt-wasm-client: wasm: RUSTFLAGS='-C link-arg=-s' cargo build --manifest-path contracts/Cargo.toml --release --target wasm32-unknown-unknown + wasm-opt -Os contracts/target/wasm32-unknown-unknown/release/vesting_contract.wasm -o contracts/target/wasm32-unknown-unknown/release/vesting_contract.wasm + wasm-opt -Os contracts/target/wasm32-unknown-unknown/release/mixnet_contract.wasm -o contracts/target/wasm32-unknown-unknown/release/mixnet_contract.wasm mixnet-opt: wasm cd contracts/mixnet && make opt From 3d7c9ee2b88ed300fcfc6e7a262de7d51a1a81f2 Mon Sep 17 00:00:00 2001 From: Fouad Date: Wed, 1 Mar 2023 15:21:33 +0000 Subject: [PATCH 19/34] NE - fix gateways' version number sorting on the gateway list page (#3131) * fix filter input sizes * reorder gateway columns * update tooltips * fix column sorting in explorer lists fix lint errors --- .../src/components/CustomColumnHeading.tsx | 21 +--- explorer/src/components/TableToolbar.tsx | 50 +++++----- .../src/components/Universal-DataGrid.tsx | 1 - explorer/src/pages/GatewayDetail/index.tsx | 4 +- explorer/src/pages/Gateways/index.tsx | 96 ++++++++++++------- explorer/src/pages/Mixnodes/index.tsx | 11 +++ explorer/src/styles.css | 20 ++-- 7 files changed, 111 insertions(+), 92 deletions(-) diff --git a/explorer/src/components/CustomColumnHeading.tsx b/explorer/src/components/CustomColumnHeading.tsx index c15ef27f9b..1f85806fa2 100644 --- a/explorer/src/components/CustomColumnHeading.tsx +++ b/explorer/src/components/CustomColumnHeading.tsx @@ -1,6 +1,5 @@ import * as React from 'react'; import { Box, Typography } from '@mui/material'; -import { ExpandLess, ExpandMore } from '@mui/icons-material'; import { useTheme } from '@mui/material/styles'; import { Tooltip } from '@nymproject/react/tooltip/Tooltip'; @@ -8,14 +7,10 @@ export const CustomColumnHeading: FCWithChildren<{ headingTitle: string; tooltip headingTitle, tooltipInfo, }) => { - const [filter, toggleFilter] = React.useState(false); const theme = useTheme(); - const handleClick = () => { - toggleFilter(!filter); - }; return ( - + {tooltipInfo && ( )} - - {headingTitle}  + + {headingTitle} - {filter ? : } ); }; diff --git a/explorer/src/components/TableToolbar.tsx b/explorer/src/components/TableToolbar.tsx index dc3b8a3e78..aaa9f9b510 100644 --- a/explorer/src/components/TableToolbar.tsx +++ b/explorer/src/components/TableToolbar.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { Box, TextField, MenuItem } from '@mui/material'; +import { Box, TextField, MenuItem, FormControl } from '@mui/material'; import Select, { SelectChangeEvent } from '@mui/material/Select'; import { Filters } from './Filters/Filters'; import { useIsMobile } from '../hooks/useIsMobile'; @@ -39,36 +39,36 @@ export const TableToolbar: FCWithChildren = ({ {childrenBefore} - + + + :not(style)': { - height: fieldsHeight, - }, }} + size="small" value={searchTerm} data-testid="search-box" placeholder="search" diff --git a/explorer/src/components/Universal-DataGrid.tsx b/explorer/src/components/Universal-DataGrid.tsx index 928eb62e94..e545229a8c 100644 --- a/explorer/src/components/Universal-DataGrid.tsx +++ b/explorer/src/components/Universal-DataGrid.tsx @@ -62,7 +62,6 @@ export const UniversalDataGrid: FCWithChildren = ({ rows, columns }} columns={columns} pageSize={Number(pageSize)} - rowsPerPageOptions={[5]} disableSelectionOnClick autoHeight hideFooter={!pagination} diff --git a/explorer/src/pages/GatewayDetail/index.tsx b/explorer/src/pages/GatewayDetail/index.tsx index 8995b1733f..24f0186ef2 100644 --- a/explorer/src/pages/GatewayDetail/index.tsx +++ b/explorer/src/pages/GatewayDetail/index.tsx @@ -31,14 +31,14 @@ const columns: ColumnsType[] = [ flex: 1, headerAlign: 'left', tooltipInfo: - 'Routing score is relative to that of the network. Each time a gateway is tested, the test packets have to go through the full path of the network (gateway + 3 nodes). If a node in the path drop packets it will affect the score of the gateway and other nodes in the test.', + "Gateway's most recent score (measured in the last 15 minutes). Routing score is relative to that of the network. Each time a gateway is tested, the test packets have to go through the full path of the network (gateway + 3 nodes). If a node in the path drop packets it will affect the score of the gateway and other nodes in the test", }, { field: 'avgUptime', title: 'Avg. Score', flex: 1, headerAlign: 'left', - tooltipInfo: 'Is the average routing score in the last 24 hours', + tooltipInfo: "Gateway's average routing score in the last 24 hours", }, { field: 'host', diff --git a/explorer/src/pages/Gateways/index.tsx b/explorer/src/pages/Gateways/index.tsx index 98e14be808..5c52f4a5b3 100644 --- a/explorer/src/pages/Gateways/index.tsx +++ b/explorer/src/pages/Gateways/index.tsx @@ -1,10 +1,12 @@ import * as React from 'react'; import { Link as RRDLink } from 'react-router-dom'; import { Box, Card, Grid, Link as MuiLink } from '@mui/material'; +import { useTheme } from '@mui/material/styles'; import { CopyToClipboard } from '@nymproject/react/clipboard/CopyToClipboard'; import { GridColDef, GridRenderCellParams } from '@mui/x-data-grid'; import { SelectChangeEvent } from '@mui/material/Select'; -import { diff, rcompare } from 'semver'; +import { diff, gte, rcompare } from 'semver'; +import { Tooltip as InfoTooltip } from '@nymproject/react/tooltip/Tooltip'; import { useMainContext } from '../../context/main'; import { gatewayToGridRow } from '../../components/Gateways'; import { GatewayResponse } from '../../typeDefs/explorer-api'; @@ -25,6 +27,8 @@ export const PageGateways: FCWithChildren = () => { const [searchTerm, setSearchTerm] = React.useState(''); const [versionFilter, setVersionFilter] = React.useState(VersionSelectOptions.latestVersion); + const theme = useTheme(); + const handleSearch = (str: string) => { setSearchTerm(str.toLowerCase()); }; @@ -89,6 +93,7 @@ export const PageGateways: FCWithChildren = () => { renderHeader: () => , headerClassName: 'MuiDataGrid-header-override', width: 380, + disableColumnMenu: true, headerAlign: 'left', renderCell: (params: GridRenderCellParams) => ( <> @@ -107,28 +112,24 @@ export const PageGateways: FCWithChildren = () => { ), }, - { - field: 'bond', - width: 150, - type: 'number', - renderHeader: () => , - headerClassName: 'MuiDataGrid-header-override', - headerAlign: 'left', - renderCell: (params: GridRenderCellParams) => ( - - {unymToNym(params.value, 6)} - - ), - }, { field: 'node_performance', - renderHeader: () => , - width: 150, + renderHeader: () => ( + <> + + + + ), + width: 175, + disableColumnMenu: true, headerAlign: 'left', headerClassName: 'MuiDataGrid-header-override', renderCell: (params: GridRenderCellParams) => ( @@ -143,26 +144,32 @@ export const PageGateways: FCWithChildren = () => { ), }, { - field: 'host', - renderHeader: () => , - width: 180, + field: 'version', + renderHeader: () => , + width: 150, + disableColumnMenu: true, headerAlign: 'left', headerClassName: 'MuiDataGrid-header-override', renderCell: (params: GridRenderCellParams) => ( {params.value} ), + sortComparator: (a, b) => { + if (gte(a, b)) return 1; + return -1; + }, }, { field: 'location', renderHeader: () => , width: 180, + disableColumnMenu: true, headerAlign: 'left', headerClassName: 'MuiDataGrid-header-override', renderCell: (params: GridRenderCellParams) => ( @@ -185,11 +192,30 @@ export const PageGateways: FCWithChildren = () => { ), }, + { + field: 'host', + renderHeader: () => , + width: 180, + disableColumnMenu: true, + headerAlign: 'left', + headerClassName: 'MuiDataGrid-header-override', + renderCell: (params: GridRenderCellParams) => ( + + {params.value} + + ), + }, { field: 'owner', headerName: 'Owner', renderHeader: () => , width: 180, + disableColumnMenu: true, headerAlign: 'left', headerClassName: 'MuiDataGrid-header-override', renderCell: (params: GridRenderCellParams) => ( @@ -204,19 +230,21 @@ export const PageGateways: FCWithChildren = () => { ), }, { - field: 'version', - renderHeader: () => , + field: 'bond', width: 150, - headerAlign: 'left', + disableColumnMenu: true, + type: 'number', + renderHeader: () => , headerClassName: 'MuiDataGrid-header-override', + headerAlign: 'left', renderCell: (params: GridRenderCellParams) => ( - {params.value} + {unymToNym(params.value, 6)} ), }, diff --git a/explorer/src/pages/Mixnodes/index.tsx b/explorer/src/pages/Mixnodes/index.tsx index 5aaa02640f..50d85583b1 100644 --- a/explorer/src/pages/Mixnodes/index.tsx +++ b/explorer/src/pages/Mixnodes/index.tsx @@ -85,6 +85,7 @@ export const PageMixnodes: FCWithChildren = () => { { field: 'mix_id', headerName: 'Mix ID', + disableColumnMenu: true, renderHeader: () => , headerClassName: 'MuiDataGrid-header-override', width: 100, @@ -103,6 +104,7 @@ export const PageMixnodes: FCWithChildren = () => { { field: 'identity_key', headerName: 'Identity Key', + disableColumnMenu: true, renderHeader: () => , headerClassName: 'MuiDataGrid-header-override', width: 170, @@ -128,6 +130,7 @@ export const PageMixnodes: FCWithChildren = () => { { field: 'bond', headerName: 'Stake', + disableColumnMenu: true, renderHeader: () => , type: 'number', headerClassName: 'MuiDataGrid-header-override', @@ -146,6 +149,7 @@ export const PageMixnodes: FCWithChildren = () => { { field: 'stake_saturation', headerName: 'Stake Saturation', + disableColumnMenu: true, renderHeader: () => ( { { field: 'pledge_amount', headerName: 'Bond', + disableColumnMenu: true, width: 175, headerClassName: 'MuiDataGrid-header-override', renderHeader: () => , @@ -189,6 +194,7 @@ export const PageMixnodes: FCWithChildren = () => { { field: 'profit_percentage', headerName: 'Profit Margin', + disableColumnMenu: true, renderHeader: () => ( { headerClassName: 'MuiDataGrid-header-override', width: 170, headerAlign: 'left', + disableColumnMenu: true, renderCell: (params: GridRenderCellParams) => ( { { field: 'avg_uptime', headerName: 'Routing Score', + disableColumnMenu: true, renderHeader: () => ( { { field: 'owner', headerName: 'Owner', + disableColumnMenu: true, renderHeader: () => , width: 120, headerAlign: 'left', @@ -274,6 +283,7 @@ export const PageMixnodes: FCWithChildren = () => { field: 'location', headerName: 'Location', renderHeader: () => , + disableColumnMenu: true, width: 120, headerAlign: 'left', headerClassName: 'MuiDataGrid-header-override', @@ -303,6 +313,7 @@ export const PageMixnodes: FCWithChildren = () => { field: 'host', headerName: 'Host', renderHeader: () => , + disableColumnMenu: true, headerClassName: 'MuiDataGrid-header-override', width: 130, headerAlign: 'left', diff --git a/explorer/src/styles.css b/explorer/src/styles.css index e06c314f6b..818211ccea 100644 --- a/explorer/src/styles.css +++ b/explorer/src/styles.css @@ -4,31 +4,27 @@ the theme declaration in index.tsx or the style prop in */ -.MuiDataGrid-sortIcon, .MuiDataGrid-menuIcon, .MuiDataGrid-iconButtonContainer{ - display: none !important; -} - .MuiDataGrid-columnSeparator { - visibility: hidden; + visibility: hidden; } /* TODO - this should be managed somehow in MUI DataGrid but documentation doesnt offer a way to do it. Possibly only included in Data Grid Pro package */ .MuiDataGrid-header-override { - height: 55px; - min-height: 55px; + height: 55px; + min-height: 55px; } /* Again, no offered way to add sx to this specific div to kill the padding which puts it out of sync with other (sx styled) cells */ div div.MuiDataGrid-root .MuiDataGrid-columnHeaderTitleContainer { - padding-left: 0; + padding-left: 0; } @media screen and (max-width: 900px) { - .MuiDrawer-paperAnchorLeft { - min-width: 100vw; - margin-top: 58px; - } + .MuiDrawer-paperAnchorLeft { + min-width: 100vw; + margin-top: 58px; + } } From ccf5990bc7ffcb45d80a02c21e65df06bea5787e Mon Sep 17 00:00:00 2001 From: Fouad Date: Wed, 1 Mar 2023 15:22:52 +0000 Subject: [PATCH 20/34] update selected service provider description style (#3128) --- Cargo.lock | 20 +++++++++---------- .../menu/settings/ServiceProviderSettings.tsx | 9 +++++++-- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4f0fab00f8..9f2d2f7a14 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -677,7 +677,7 @@ dependencies = [ [[package]] name = "client-core" -version = "1.1.10" +version = "1.1.11" dependencies = [ "async-trait", "dashmap 5.4.0", @@ -1802,7 +1802,7 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "explorer-api" -version = "1.1.10" +version = "1.1.11" dependencies = [ "chrono", "clap 4.1.4", @@ -3281,7 +3281,7 @@ dependencies = [ [[package]] name = "nym-api" -version = "1.1.11" +version = "1.1.12" dependencies = [ "anyhow", "async-trait", @@ -3391,7 +3391,7 @@ dependencies = [ [[package]] name = "nym-cli" -version = "1.1.10" +version = "1.1.11" dependencies = [ "anyhow", "base64 0.13.1", @@ -3449,7 +3449,7 @@ dependencies = [ [[package]] name = "nym-client" -version = "1.1.10" +version = "1.1.11" dependencies = [ "clap 4.1.4", "client-core", @@ -3543,7 +3543,7 @@ dependencies = [ [[package]] name = "nym-gateway" -version = "1.1.10" +version = "1.1.11" dependencies = [ "anyhow", "async-trait", @@ -3620,7 +3620,7 @@ dependencies = [ [[package]] name = "nym-mixnode" -version = "1.1.11" +version = "1.1.12" dependencies = [ "anyhow", "atty", @@ -3675,7 +3675,7 @@ dependencies = [ [[package]] name = "nym-network-requester" -version = "1.1.10" +version = "1.1.11" dependencies = [ "async-trait", "clap 4.1.4", @@ -3713,7 +3713,7 @@ dependencies = [ [[package]] name = "nym-network-statistics" -version = "1.1.10" +version = "1.1.11" dependencies = [ "dirs", "log", @@ -3788,7 +3788,7 @@ dependencies = [ [[package]] name = "nym-socks5-client" -version = "1.1.10" +version = "1.1.11" dependencies = [ "clap 4.1.4", "client-core", diff --git a/nym-connect/desktop/src/pages/menu/settings/ServiceProviderSettings.tsx b/nym-connect/desktop/src/pages/menu/settings/ServiceProviderSettings.tsx index 8f18caaacd..0d0a0cdd20 100644 --- a/nym-connect/desktop/src/pages/menu/settings/ServiceProviderSettings.tsx +++ b/nym-connect/desktop/src/pages/menu/settings/ServiceProviderSettings.tsx @@ -30,7 +30,7 @@ export const ServiceProviderSettings = () => { if (match) return match.description; - return 'The service provider specified is not in our known list.'; + return 'N/A'; }; const validateInput = (value: string) => { @@ -86,7 +86,12 @@ export const ServiceProviderSettings = () => { )} {userDefinedSPAddress.address && userDefinedSPAddress.isActive && ( - {getSPDescription(userDefinedSPAddress.address)} + + Name of Service Provider + + {getSPDescription(userDefinedSPAddress.address)} + + )} From 04e652441eed0f3d75d6f2f95a2270f06549d251 Mon Sep 17 00:00:00 2001 From: Pierre Dommerc Date: Wed, 1 Mar 2023 15:16:40 +0100 Subject: [PATCH 21/34] fix(explorer): fix layout responsiveness in mixnode details view (#3130) --- .../src/components/MixNodes/DetailSection.tsx | 28 +++++++++++++------ 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/explorer/src/components/MixNodes/DetailSection.tsx b/explorer/src/components/MixNodes/DetailSection.tsx index dcf0f830b5..a07a6fb7d8 100644 --- a/explorer/src/components/MixNodes/DetailSection.tsx +++ b/explorer/src/components/MixNodes/DetailSection.tsx @@ -18,8 +18,8 @@ export const MixNodeDetailSection: FCWithChildren = ({ mixNo const statusText = React.useMemo(() => getMixNodeStatusText(mixNodeRow.status), [mixNodeRow.status]); return ( - - + + = ({ mixNo > - + {mixnodeDescription.name} {(mixnodeDescription.description || '').slice(0, 1000)}