diff --git a/.github/mergify.yml b/.github/mergify.yml index 51f0a018a..292defc72 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -1,21 +1,21 @@ queue_rules: - name: default - conditions: + queue_conditions: - check-success=all - label=automerge - base=main - "#changes-requested-reviews-by=0" - "#approved-reviews-by>=1" - -pull_request_rules: - - name: automatic merge when CI passes on main - conditions: + merge_conditions: - check-success=all - label=automerge - base=main - "#changes-requested-reviews-by=0" - "#approved-reviews-by>=1" + merge_method: merge + +pull_request_rules: + - name: automatic merge when CI passes on main + conditions: [] actions: queue: - name: default - method: merge diff --git a/.github/workflows/arc-runner.yml b/.github/workflows/arc-runner.yml new file mode 100644 index 000000000..da56561a3 --- /dev/null +++ b/.github/workflows/arc-runner.yml @@ -0,0 +1,33 @@ +name: Test ARC Runner + +on: + workflow_dispatch: + +jobs: + test-arc-runner: + runs-on: zombienet-arc-runner + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Node.js environment + uses: actions/setup-node@v4 + with: + node-version: '22' + + - name: Install dependencies + run: npm install + + - name: Run tests + run: npm test + + - name: Upload test results + if: always() + uses: actions/upload-artifact@v3 + with: + name: test-results + path: ./test-results/ + + - name: Notify on completion + if: always() + run: echo "Test completed on zombienet-arc-runner" diff --git a/.github/workflows/build-release-manual-test.yaml b/.github/workflows/build-release-manual-test.yaml index 73f9facdb..7ddd44ced 100644 --- a/.github/workflows/build-release-manual-test.yaml +++ b/.github/workflows/build-release-manual-test.yaml @@ -23,6 +23,8 @@ jobs: node-version: '18' - run: npm install working-directory: "./javascript" + - run: npm dedupe + working-directory: "./javascript" - run: npm run build working-directory: "./javascript" - run: npm run package:linux diff --git a/.github/workflows/gitspiegel-trigger.yml b/.github/workflows/gitspiegel-trigger.yml deleted file mode 100644 index dce3aaf2f..000000000 --- a/.github/workflows/gitspiegel-trigger.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: gitspiegel sync - -# This workflow doesn't do anything, it's only use is to trigger "workflow_run" -# webhook, that'll be consumed by gitspiegel -# This way, gitspiegel won't do mirroring, unless this workflow runs, -# and running the workflow is protected by GitHub - -on: - pull_request: - types: - - opened - - synchronize - - unlocked - - ready_for_review - - reopened - -jobs: - sync: - runs-on: ubuntu-latest - steps: - - name: Do nothing - run: echo "let's go" diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml new file mode 100644 index 000000000..cfa399fab --- /dev/null +++ b/.github/workflows/integration-tests.yml @@ -0,0 +1,229 @@ +name: Zombienet Integration Tests + +on: + push: + branches: + - main + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +permissions: {} + +env: + IMAGE_NAME: paritypr/zombienet + VERSION: ${{ github.sha }} + RUN_IN_CONTAINER: 1 + FF_DISABLE_UMASK_FOR_DOCKER_EXECUTOR: 1 + GHA_CLUSTER_SERVER_ADDR: "https://kubernetes.default:443" + +jobs: + build_push_image: + name: Build and Push Docker image to Docker Hub + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - name: Check out the repo + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v.4.2.0 + + - name: npm build + run: | + cd javascript + npm install + npm dedupe + npm run clean + npm run build + + - name: Log in to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USER }} + password: ${{ secrets.DOCKERHUB_PASS }} + + - name: Build Docker image + uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6.10.0 + with: + file: ./scripts/ci/docker/zombienet_injected.Dockerfile + context: . + push: true + tags: | + ${{ env.IMAGE_NAME }}:${{ env.VERSION }} + ${{ env.IMAGE_NAME }}:latest + + set-variables: + name: Set variables + runs-on: ubuntu-latest + outputs: + VERSION: ${{ steps.version.outputs.IMAGE }} + DEBUG: ${{ steps.env.outputs.DEBUG }} + ZOMBIENET_INTEGRATION_TEST_IMAGE: ${{ steps.env.outputs.ZOMBIENET_INTEGRATION_TEST_IMAGE }} + COL_IMAGE: ${{ steps.env.outputs.COL_IMAGE }} + CUMULUS_TEST_IMAGE: ${{ steps.env.outputs.CUMULUS_TEST_IMAGE }} + steps: + - name: Define version + id: version + run: | + export IMAGE="${{ env.IMAGE_NAME }}:${{ env.VERSION }}" + echo "IMAGE=${IMAGE}" >> $GITHUB_OUTPUT + echo "set IMAGE=${IMAGE}" + - name: Define env + id: env + run: | + if [[ ${{ github.run_attempt }} -gt 1 ]]; then + # more debug in rerun + export DEBUG=zombie,zombie::js-helpers*,zombie::network-node,zombie::kube::client::logs + else + export DEBUG=zombie + fi; + echo "DEBUG=${DEBUG}" >> $GITHUB_OUTPUT + echo "set DEBUG=${DEBUG}" + export ZOMBIENET_INTEGRATION_TEST_IMAGE="docker.io/paritypr/polkadot-debug:master" + echo "ZOMBIENET_INTEGRATION_TEST_IMAGE=${ZOMBIENET_INTEGRATION_TEST_IMAGE}" >> $GITHUB_OUTPUT + echo "set ZOMBIENET_INTEGRATION_TEST_IMAGE=${ZOMBIENET_INTEGRATION_TEST_IMAGE}" + export COL_IMAGE="docker.io/paritypr/colander:master" + echo "COL_IMAGE=${COL_IMAGE}" >> $GITHUB_OUTPUT + echo "set COL_IMAGE=${COL_IMAGE}" + # TODO: add script to get latest from dockerhub + export CUMULUS_TEST_IMAGE="docker.io/paritypr/test-parachain:c90f9713b5bc73a9620b2e72b226b4d11e018190" + echo "CUMULUS_TEST_IMAGE=${CUMULUS_TEST_IMAGE}" >> $GITHUB_OUTPUT + echo "set CUMULUS_TEST_IMAGE=${CUMULUS_TEST_IMAGE}" + + zombienet-smoke: + name: Zombienet Smoke + runs-on: zombienet-arc-runner + timeout-minutes: 30 + container: + image: ${{ needs.set-variables.outputs.VERSION }} + needs: [build_push_image, set-variables] + env: + # LOCAL_DIR: "/builds/parity/mirrors/zombienet/tests" + DEBUG: ${{ needs.set-variables.outputs.DEBUG }} + ZOMBIENET_INTEGRATION_TEST_IMAGE: ${{ needs.set-variables.outputs.ZOMBIENET_INTEGRATION_TEST_IMAGE }} + COL_IMAGE: ${{ needs.set-variables.outputs.COL_IMAGE }} + CUMULUS_TEST_IMAGE: ${{ needs.set-variables.outputs.CUMULUS_TEST_IMAGE }} + steps: + - name: Check out the repo + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v.4.2.0 + + - name: smoke test + run: | + echo "Zombienet Tests" + echo "${ZOMBIENET_IMAGE}" + echo "${GH_DIR}" + echo "relay_image ${ZOMBIENET_INTEGRATION_TEST_IMAGE}" + echo "col_image ${COL_IMAGE}" + + /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh --local-dir="$(pwd)/tests" --test="0001-smoke.zndsl" + + - name: upload logs + uses: actions/upload-artifact@v4 + with: + name: zombienet-logs-smoke + path: | + /tmp/zombie*/logs/* + + zombienet-scale-net-config: + name: Zombienet Scale net + runs-on: zombienet-arc-runner + timeout-minutes: 30 + container: + image: ${{ needs.set-variables.outputs.VERSION }} + needs: [build_push_image, set-variables] + env: + # LOCAL_DIR: "/builds/parity/mirrors/zombienet/tests" + DEBUG: ${{ needs.set-variables.outputs.DEBUG }} + ZOMBIENET_INTEGRATION_TEST_IMAGE: ${{ needs.set-variables.outputs.ZOMBIENET_INTEGRATION_TEST_IMAGE }} + COL_IMAGE: ${{ needs.set-variables.outputs.COL_IMAGE }} + CUMULUS_TEST_IMAGE: ${{ needs.set-variables.outputs.CUMULUS_TEST_IMAGE }} + steps: + - name: Check out the repo + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v.4.2.0 + + - name: scale-net test + run: | + echo "Zombienet Scale Net" + echo "${ZOMBIENET_IMAGE}" + echo "${GH_DIR}" + echo "relay_image ${ZOMBIENET_INTEGRATION_TEST_IMAGE}" + echo "col_image ${COL_IMAGE}" + + /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh --local-dir="$(pwd)/tests/scale-net" --test="0001-scale-net.zndsl" + + - name: upload logs + uses: actions/upload-artifact@v4 + with: + name: zombienet-logs-scale-net + path: | + /tmp/zombie*/logs/* + + zombienet-upgrade-node: + name: Zombienet Upgrade Node + runs-on: zombienet-arc-runner + timeout-minutes: 30 + container: + image: ${{ needs.set-variables.outputs.VERSION }} + needs: [build_push_image, set-variables] + env: + # LOCAL_DIR: "/builds/parity/mirrors/zombienet/tests" + DEBUG: ${{ needs.set-variables.outputs.DEBUG }} + ZOMBIENET_INTEGRATION_TEST_IMAGE: ${{ needs.set-variables.outputs.ZOMBIENET_INTEGRATION_TEST_IMAGE }} + COL_IMAGE: ${{ needs.set-variables.outputs.COL_IMAGE }} + CUMULUS_TEST_IMAGE: ${{ needs.set-variables.outputs.CUMULUS_TEST_IMAGE }} + steps: + - name: Check out the repo + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v.4.2.0 + + - name: upgrade node test + run: | + echo "Zombienet Upgrade Node" + echo "${ZOMBIENET_IMAGE}" + echo "${GH_DIR}" + export COL_IMAGE="docker.io/paritypr/colander:4519" + echo "relay_image ${ZOMBIENET_INTEGRATION_TEST_IMAGE}" + echo "col_image ${COL_IMAGE}" + + /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh --local-dir="$(pwd)/tests/k8s" --test="0001-upgrade-node.zndsl" + + - name: upload logs + uses: actions/upload-artifact@v4 + with: + name: zombienet-logs-upgrade + path: | + /tmp/zombie*/logs/* + + zombienet-chaos-delay: + name: Zombienet Chaos Delay + runs-on: zombienet-arc-runner + timeout-minutes: 30 + container: + image: ${{ needs.set-variables.outputs.VERSION }} + needs: [build_push_image, set-variables] + env: + # LOCAL_DIR: "/builds/parity/mirrors/zombienet/tests" + DEBUG: ${{ needs.set-variables.outputs.DEBUG }} + ZOMBIENET_INTEGRATION_TEST_IMAGE: ${{ needs.set-variables.outputs.ZOMBIENET_INTEGRATION_TEST_IMAGE }} + COL_IMAGE: ${{ needs.set-variables.outputs.COL_IMAGE }} + CUMULUS_TEST_IMAGE: ${{ needs.set-variables.outputs.CUMULUS_TEST_IMAGE }} + steps: + - name: Check out the repo + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v.4.2.0 + + - name: chaos-delay test + run: | + echo "Zombienet Chaos Delay" + echo "${ZOMBIENET_IMAGE}" + echo "${GH_DIR}" + echo "relay_image ${ZOMBIENET_INTEGRATION_TEST_IMAGE}" + echo "col_image ${COL_IMAGE}" + + /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh --local-dir="$(pwd)/tests/chaos" --test="0001-delay.zndsl" + + - name: upload logs + uses: actions/upload-artifact@v4 + with: + name: zombienet-logs-chaos + path: | + /tmp/zombie*/logs/* diff --git a/.github/workflows/k8s-cleaner.yml b/.github/workflows/k8s-cleaner.yml index 94b04bf14..d39058e21 100644 --- a/.github/workflows/k8s-cleaner.yml +++ b/.github/workflows/k8s-cleaner.yml @@ -26,14 +26,14 @@ jobs: uses: actions/checkout@v4 - name: Setup gcloud CLI - uses: google-github-actions/setup-gcloud@v2.1.0 + uses: google-github-actions/setup-gcloud@v2.1.2 with: service_account_key: ${{ secrets.GCP_SA_KEY }} project_id: ${{ env.PROJECT_ID }} export_default_credentials: true - name: Login to GCP - uses: google-github-actions/auth@v2.1.3 + uses: google-github-actions/auth@v2.1.7 with: credentials_json: ${{ secrets.GCP_SA_KEY }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b900ae211..2058c0d4b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -22,6 +22,8 @@ jobs: node-version: '18' - run: npm install working-directory: "./javascript" + - run: npm dedupe + working-directory: "./javascript" - run: npm run build working-directory: "./javascript" - run: npm run package:linux @@ -103,3 +105,38 @@ jobs: asset_path: ./javascript/bins/zombienet-macos-${{ matrix.target.arch }} asset_name: zombienet-macos-${{ matrix.target.arch }} asset_content_type: application/octet-stream + build_push_image: + name: Build and Push Docker image to Docker Hub + runs-on: ubuntu-latest + timeout-minutes: 30 + environment: tags + env: + IMAGE_NAME: paritytech/zombienet + VERSION: ${{ github.ref_name }} + steps: + - name: Check out the repo + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v.4.2.0 + + - name: npm build + run: | + cd javascript + npm install + npm dedupe + npm run clean + npm run build + + - name: Log in to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USER }} + password: ${{ secrets.DOCKERHUB_PASS }} + + - name: Build Docker image + uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6.10.0 + with: + file: ./scripts/ci/docker/zombienet_injected.Dockerfile + context: . + push: true + tags: | + ${{ env.IMAGE_NAME }}:${{ env.VERSION }} + ${{ env.IMAGE_NAME }}:latest diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index b5c9eddb1..000000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,290 +0,0 @@ -default: - retry: - max: 2 - when: - - runner_system_failure - - unknown_failure - - api_failure - interruptible: true - -stages: - - build - - test - - check - - publish - - zombienet - - -variables: - CI_IMAGE: "node:18" - DOCKERFILE: scripts/ci/docker/zombienet_injected.Dockerfile - DOCKERHUB_REPO: paritytech - IMAGE_NAME: $DOCKERHUB_REPO/zombienet - # BUILDAH_IMAGE is defined in group variables - BUILDAH_COMMAND: "buildah --storage-driver overlay2" - RUN_IN_CONTAINER: "1" - # Improve gitlab cache performance - CACHE_COMPRESSION_LEVEL: "fastest" - FF_USE_FASTZIP: "true" - PUSHGATEWAY_URL: "http://zombienet-prometheus-pushgateway.managed-monitoring:9091/metrics/job/zombie-metrics" - -cache: - - key: - files: - - javascript/package-lock.json - - paths: - - javascript/packages/cli/dist - - javascript/packages/orchestrator/dist - - javascript/packages/utils/dist - - javascript/package.json - - javascript/package-lock.json - -.kubernetes-env: &kubernetes-env - image: $CI_IMAGE - tags: - - kubernetes-parity-build - -# run jobs only on PRs with changes in code. -.test-refs: &test-refs - rules: - - if: $CI_PIPELINE_SOURCE == "web" - - if: $CI_PIPELINE_SOURCE == "schedule" - - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs - - changes: - - javascript/**/* - - tests/**/* - - crates/**/* - -# run jobs always -.common-refs: &common-refs - rules: - - if: $CI_PIPELINE_SOURCE == "web" - - if: $CI_PIPELINE_SOURCE == "schedule" - - if: $CI_COMMIT_REF_NAME == "main" - - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs - - if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1 - -# run jobs only on master and publish -.publish-refs: &publish-refs - rules: - - if: $CI_PIPELINE_SOURCE == "web" - - if: $CI_PIPELINE_SOURCE == "schedule" - - if: $CI_COMMIT_REF_NAME == "main" - - if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1 - -test: - stage: test - <<: *kubernetes-env - <<: *common-refs - script: - - cd javascript - - npm install - # - npm run test - - echo testme - -build: - stage: build - <<: *kubernetes-env - <<: *common-refs - script: - - cd javascript - - npm install - - npm run clean - - npm run build - -# template task for building and pushing an image -.build-push-docker-image: &build-push-docker-image - script: - - test "$Docker_Hub_User_Parity" -a "$Docker_Hub_Pass_Parity" || - ( echo "no docker credentials provided"; exit 1 ) - - $BUILDAH_COMMAND build - --format=docker - --build-arg VCS_REF="${CI_COMMIT_SHA}" - --build-arg BUILD_DATE="$(date -u '+%Y-%m-%dT%H:%M:%SZ')" - --build-arg VERSION="$VERSION" - --tag "$IMAGE_NAME:$VERSION" - --tag "$IMAGE_NAME:latest" - --file "$DOCKERFILE" . - - echo "$Docker_Hub_Pass_Parity" | - buildah login --username "$Docker_Hub_User_Parity" --password-stdin docker.io - - $BUILDAH_COMMAND info - - echo "Effective tags = ${VERSION} latest" - - $BUILDAH_COMMAND push --format=v2s2 "$IMAGE_NAME:$VERSION" - - $BUILDAH_COMMAND push --format=v2s2 "$IMAGE_NAME:latest" - after_script: - - buildah logout --all - -#check that the image can be build -publish-test: - stage: check - <<: *test-refs - <<: *kubernetes-env - variables: - CI_IMAGE: $BUILDAH_IMAGE - script: - - $BUILDAH_COMMAND build - --format=docker - --build-arg VCS_REF="${CI_COMMIT_SHA}" - --build-arg BUILD_DATE="$(date -u '+%Y-%m-%dT%H:%M:%SZ')" - --build-arg VERSION="${CI_COMMIT_SHORT_SHA}" - --tag "$IMAGE_NAME:latest" - --file "$DOCKERFILE" . - -publish-docker-pr: - stage: publish - variables: - CI_IMAGE: $BUILDAH_IMAGE - DOCKERHUB_REPO: paritypr - before_script: - - export VERSION=${CI_COMMIT_SHORT_SHA} - - export Docker_Hub_User_Parity=$PARITYPR_USER - - export Docker_Hub_Pass_Parity=$PARITYPR_PASS - <<: *kubernetes-env - <<: *common-refs - <<: *build-push-docker-image - -publish-docker: - stage: publish - variables: - CI_IMAGE: $BUILDAH_IMAGE - before_script: - - if [[ "${CI_COMMIT_TAG}" ]]; then - VERSION=${CI_COMMIT_TAG}; - elif [[ "${CI_COMMIT_SHORT_SHA}" ]]; then - VERSION=${CI_COMMIT_SHORT_SHA}; - fi - <<: *kubernetes-env - <<: *publish-refs - <<: *build-push-docker-image - -publish-docker-image-description: - stage: publish - <<: *kubernetes-env - image: paritytech/dockerhub-description - variables: - DOCKER_USERNAME: $Docker_Hub_User_Parity - DOCKER_PASSWORD: $Docker_Hub_Pass_Parity - README_FILEPATH: $CI_PROJECT_DIR/scripts/ci/docker/Dockerfile.README.md - DOCKERHUB_REPOSITORY: $IMAGE_NAME - SHORT_DESCRIPTION: "A cli tool to easily spawn ephemeral Polkadot/Substrate networks and perform tests against them" - rules: - - if: $CI_COMMIT_REF_NAME == "main" - changes: - - scripts/ci/docker/Dockerfile.README.md - script: - - cd / && sh entrypoint.sh - - -.zombienet-common: - before_script: - - echo "Zombienet Tests Config" - - echo "${ZOMBIENET_IMAGE}" - - echo "${GH_DIR}" - - echo "${LOCAL_DIR}" - - export DEBUG=zombie - - export ZOMBIENET_INTEGRATION_TEST_IMAGE="docker.io/paritypr/polkadot-debug:master" - - export COL_IMAGE="docker.io/paritypr/colander:master" - # TODO: add script to get latest from dockerhub - - export CUMULUS_TEST_IMAGE="docker.io/paritypr/test-parachain:c90f9713b5bc73a9620b2e72b226b4d11e018190" - - echo "relay_image ${ZOMBIENET_INTEGRATION_TEST_IMAGE}" - - echo "col_image ${COL_IMAGE}" - stage: zombienet - image: "paritypr/zombienet:${CI_COMMIT_SHORT_SHA}" - needs: - - job: publish-docker-pr - extends: - - .kubernetes-env - - .test-refs - variables: - LOCAL_DIR: "/builds/parity/mirrors/zombienet/tests" - FF_DISABLE_UMASK_FOR_DOCKER_EXECUTOR: 1 - artifacts: - name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}" - when: always - expire_in: 2 days - paths: - - ./zombienet-logs - after_script: - - mkdir -p ./zombienet-logs - - cp /tmp/zombie*/logs/* ./zombienet-logs/ - retry: 2 - tags: - - zombienet-polkadot-integration-test - -zombienet-smoke: - extends: - - .zombienet-common - script: - - /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh - --local-dir="${LOCAL_DIR}" - --test="0001-smoke.zndsl" - -zombienet-scale-net-config: - extends: - - .zombienet-common - variables: - LOCAL_DIR: "/builds/parity/mirrors/zombienet/tests/scale-net" - script: - - /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh - --local-dir="${LOCAL_DIR}" - --test="0001-scale-net.zndsl" - -zombienet-upgrade-node: - extends: - - .zombienet-common - variables: - GH_DIR: "https://github.com/paritytech/zombienet/tree/${CI_COMMIT_SHORT_SHA}/tests/k8s" - - before_script: - - echo "Zombienet Upgrade node" - - echo "paritypr/zombienet:${CI_COMMIT_SHORT_SHA}" - - echo "${GH_DIR}" - - export DEBUG=zombie* - - export ZOMBIENET_INTEGRATION_TEST_IMAGE="docker.io/paritypr/polkadot-debug:master" - - export COL_IMAGE="docker.io/paritypr/colander:4519" - - echo "relay_image ${ZOMBIENET_INTEGRATION_TEST_IMAGE}" - - echo "col_image ${COL_IMAGE}" - script: - - /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh - --local-dir="${LOCAL_DIR}" - --test="0001-upgrade-node.zndsl" - -paras: - extends: - - .zombienet-common - variables: - GH_DIR: "https://github.com/paritytech/zombienet/tree/${CI_COMMIT_SHORT_SHA}/tests/paras" - - before_script: - - echo "Zombienet Paras smoke test" - - echo "paritypr/zombienet:${CI_COMMIT_SHORT_SHA}" - - echo "${GH_DIR}" - - export DEBUG=zombie - - export ZOMBIENET_INTEGRATION_TEST_IMAGE="docker.io/paritypr/polkadot-debug:master" - - export BIFROST_COL_IMAGE=docker.io/bifrostnetwork/bifrost:latest - - export MOONBEAM_COL_IMAGE=docker.io/purestake/moonbeam:v0.26 - - export OAK_COL_IMAGE=docker.io/oaknetwork/turing:latest - - script: - - /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh - --local-dir="${LOCAL_DIR}" - --test="paras.zndsl" - -# db-snapshot: -# extends: -# - .zombienet-common -# script: -# - /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh -# --local-dir="${LOCAL_DIR}" -# --test="0013-db-snapshot.zndsl" - -chaos-delay: - extends: - - .zombienet-common - variables: - LOCAL_DIR: "/builds/parity/mirrors/zombienet/tests/chaos" - script: - - /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh - --local-dir="${LOCAL_DIR}" - --test="0001-delay.zndsl" - diff --git a/README.md b/README.md index f6e23ebc6..d54f1e5c7 100644 --- a/README.md +++ b/README.md @@ -35,9 +35,44 @@ Zombienet releases are available in `github`. Each one provides an executable fo *without* having `Node.js` installed **but** each `provider` defines its own requirements (e.g. `k8s`, `podman`). -**Note:** Currently, it is only possible to use `podman` for Zombienet users on Linux machines. +**Note:** Currently, it is only possible to use `podman` for Zombienet users on Linux machines. Although `podman` comes with support for macOS, it is done using an internal VM and the Zombienet provider code expects `podman` to be running natively. +### Using Binaries on MacOS + +After you have downloaded `zombienet-macos-arm64` or `zombienet-macos-x64`, you will need to: + +- Move the binary to your working directory. +- Rename the binary to just `zombienet` without any `macos-` extension for convenience. +- Enable the binary to be executable: + ```bash + chmod +x ./zombienet + ``` +- Remove the binary from quarantine: + ```bash + xattr -d com.apple.quarantine ./zombienet + ``` + +Then you should be able to access the binary: + +```bash +./zombienet help +``` + +### Install from NPM + +If you have `Node.js`, you can install `zombienet` locally via NPM: + +```bash +npm i @zombienet/cli -g +``` + +Then you should be able to access the `zombienet` command: + +``` +zombienet help +``` + ## Status At the moment Zombienet *only* works with `local` chains (e.g. rococo-local, polkadot-local, etc). @@ -60,10 +95,12 @@ Zombienet project has it's own `k8s` cluster in GCP, to use it please ping ### With Podman +__:warning: Zombienet currently only supports podman v2 or older, for newer version you will need to apply [this patch](https://github.com/paritytech/zombienet/issues/827#issuecomment-1592000242) manually! :warning:__ + Zombienet supports [Podman](https://podman.io/) *rootless* as provider, you only need to have `podman` installed in your environment to use and either set in the *network* file or with the `--provider` flag in the cli. `Podman` for `zombienet` is currently only supported for Linux machines. -This is mostly related to paths and directories used by +This is mostly related to paths and directories used by store configuration (chain-spec) and the data directory. ### With Native @@ -200,7 +237,7 @@ message with the `node`s information like this one is shown ├─────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤ │ Prometheus Link │ http://127.0.0.1:44107/metrics │ ├─────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤ -│ Log Cmd │ tail -f /tmp/zombie-85391d4649f2829bb26b30d6c0328bcb_-15819-BNFoSs5qusWH/alice.log │ +│ Log Cmd │ tail -f /tmp/zombie-85391d4649f2829bb26b30d6c0328bcb_-15819-BNFoSs5qusWH/alice.log │ ├─────────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────┤ │ Node Information │ ├─────────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────┤ @@ -210,7 +247,7 @@ message with the `node`s information like this one is shown ├─────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤ │ Prometheus Link │ http://127.0.0.1:43831/metrics │ ├─────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤ -│ Log Cmd │ tail -f /tmp/zombie-85391d4649f2829bb26b30d6c0328bcb_-15819-BNFoSs5qusWH/bob.log │ +│ Log Cmd │ tail -f /tmp/zombie-85391d4649f2829bb26b30d6c0328bcb_-15819-BNFoSs5qusWH/bob.log │ ├─────────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────┤ │ Node Information │ ├─────────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────┤ @@ -220,7 +257,7 @@ message with the `node`s information like this one is shown ├─────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤ │ Prometheus Link │ http://127.0.0.1:38281/metrics │ ├─────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤ -│ Log Cmd │ tail -f /tmp/zombie-85391d4649f2829bb26b30d6c0328bcb_-15819-BNFoSs5qusWH/collator01.log │ +│ Log Cmd │ tail -f /tmp/zombie-85391d4649f2829bb26b30d6c0328bcb_-15819-BNFoSs5qusWH/collator01.log │ ├─────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤ │ Parachain ID │ 100 │ └─────────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────┘ @@ -346,7 +383,7 @@ For example: > Note: If you are using macOS please clone the [polkadot-sdk repo](https://github.com/paritytech/polkadot-sdk) and run it locally. At the moment there is no `polkadot` binary for MacOs. -The command above will retrieve the binaries provided and try to download and prepare those binaries for usage. +The command above will retrieve the binaries provided and try to download and prepare those binaries for usage. At the end of the download, the `setup` script will provide a command to run in your local environment in order to add the directory where the binaries were downloaded in your $PATH var, for example: ```bash @@ -379,7 +416,7 @@ Options: -c, --spawn-concurrency Number of concurrent spawning process to launch, default is 1 -p, --provider Override provider to use (choices: "podman", "kubernetes", "native") -l, --logType Type of logging - defaults to 'table' (choices: "table", "text", "silent") - -d, --dir Directory path for placing the network files instead of random temp one + -d, --dir Directory path for placing the network files instead of random temp one (e.g. -d /home/user/my-zombienet) -f, --force Force override all prompt commands -h, --help display help for command @@ -405,7 +442,6 @@ Below can be found some of the projects that are currently using Zombienet as in - [Cumulus](https://github.com/paritytech/cumulus/tree/master/zombienet/tests) - [Polkadot](https://polkadot.network/) in the [testing pipeline](https://github.com/paritytech/polkadot/blob/eafdfc36492384e16e1c253be9d5097fb3f33c60/scripts/ci/gitlab/pipeline/zombienet.yml); - [Substrate](https://github.com/paritytech/substrate/tree/master/zombienet) -- [Substrate Connect](https://github.com/paritytech/substrate-connect/tree/main/zombienet-tests) **In the Polkadot ecosystem:** diff --git a/crates/parser-wrapper/Cargo.toml b/crates/parser-wrapper/Cargo.toml index ecf4fde05..8d474d329 100644 --- a/crates/parser-wrapper/Cargo.toml +++ b/crates/parser-wrapper/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dsl-parser-wrapper" -version = "0.1.10" +version = "0.1.11" edition = "2021" description = "Zombienet DSL parser: produces a test definition, in json format, that can be used with the ZombieNet's test-runnner." license = "GPL-3.0-or-later" diff --git a/crates/parser-wrapper/todo.md b/crates/parser-wrapper/todo.md new file mode 100644 index 000000000..b85915423 --- /dev/null +++ b/crates/parser-wrapper/todo.md @@ -0,0 +1,2 @@ +wasm-pack build --target nodejs --scope zombienet +cd pkg && npm publish --access=public diff --git a/crates/parser/Cargo.toml b/crates/parser/Cargo.toml index e0789468f..3643a3f16 100644 --- a/crates/parser/Cargo.toml +++ b/crates/parser/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "parser" -version = "0.0.1" +version = "0.0.2" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/crates/parser/src/lib.rs b/crates/parser/src/lib.rs index 583680758..4a92ccc27 100644 --- a/crates/parser/src/lib.rs +++ b/crates/parser/src/lib.rs @@ -193,6 +193,9 @@ fn parse_custom_script_rule( Rule::double_quoted_string => { args = Some(inner_record.as_str().trim_matches('"').to_owned()); } + Rule::single_quoted_string => { + args = Some(inner_record.as_str().trim_matches('\'').to_owned()); + } Rule::comparison => { cmp = Some(parse_comparison(inner_record)?); } diff --git a/crates/parser/src/tests.rs b/crates/parser/src/tests.rs index 9272245dc..52f6e274c 100644 --- a/crates/parser/src/tests.rs +++ b/crates/parser/src/tests.rs @@ -578,6 +578,36 @@ fn custom_js_with_args_parse_ok() { assert_eq!(result, t); } +#[test] +fn custom_js_with_single_quotes_args_parse_ok() { + let line: &str = + r#"alice: js-script ./0008-custom.js with '{"a":1,"b":["demo"]}' within 200 seconds"#; + let data = r#"{ + "description": null, + "network": "./a.toml", + "creds": "config", + "assertions": [ + { + "original_line": "alice: js-script ./0008-custom.js with '{\"a\":1,\"b\":[\"demo\"]}' within 200 seconds", + "parsed": { + "fn": "CustomJs", + "args": { + "node_name": "alice", + "file_path": "./0008-custom.js", + "custom_args": "{\"a\":1,\"b\":[\"demo\"]}", + "timeout": 200, + "is_ts": false + } + } + } + ] + }"#; + let t: TestDefinition = serde_json::from_str(data).unwrap(); + + let result = parse(&[NETWORK, CREDS, line].join("\n")).unwrap(); + assert_eq!(result, t); +} + #[test] fn custom_ts_parse_ok() { let line: &str = r#"alice: ts-script ./0008-custom-ts.ts within 200 seconds"#; diff --git a/crates/parser/src/zombienet.pest b/crates/parser/src/zombienet.pest index c31da8831..2063d1e6b 100644 --- a/crates/parser/src/zombienet.pest +++ b/crates/parser/src/zombienet.pest @@ -73,7 +73,7 @@ log_match = { node_name ~ "log line" ~ ("contains"|"matches") ~ match_type? ~ do count_log_match = { node_name ~ "count of log lines" ~ ("containing"|"matching") ~ match_type? ~ double_quoted_string ~ "is" ~ (comparison | int+) ~ within? } trace = { node_name ~ "trace with traceID" ~ span_id ~ "contains" ~ square_brackets_strings ~ within? } system_event = { node_name ~ "system event" ~ ("contains"|"matches") ~ match_type? ~ double_quoted_string ~ within? } -custom_js = { node_name ~ "js-script" ~ file_path ~ ("with" ~ double_quoted_string)? ~ ( "return" ~ comparison )? ~ within? } +custom_js = { node_name ~ "js-script" ~ file_path ~ ("with" ~ (double_quoted_string|single_quoted_string))? ~ ( "return" ~ comparison )? ~ within? } custom_ts = { node_name ~ "ts-script" ~ file_path ~ ("with" ~ double_quoted_string)? ~ ( "return" ~ comparison )? ~ within? } custom_sh = { node_name ~ "run" ~ file_path ~ ("with" ~ double_quoted_string)? ~ ( "return" ~ comparison )? ~ within? } diff --git a/docs/src/install.md b/docs/src/install.md index 4d781f465..fc5953490 100644 --- a/docs/src/install.md +++ b/docs/src/install.md @@ -2,6 +2,41 @@ ZombieNet releases are available in [github](https://github.com/paritytech/zombienet/releases). Each release provides executables for both `linux` and `macos` created with [pkg](https://github.com/vercel/pkg) and allows running `zombienet` cli *without* having `Node.js` installed. **But** each `provider` define its own requirements (e.g. k8s, podman). +## Using Binaries on MacOS + +After you have downloaded `zombienet-macos-arm64` or `zombienet-macos-x64`, you will need to: + +- Move the binary to your working directory. +- Rename the binary to just `zombienet` without any `macos-` extension for convenience. +- Enable the binary to be executable: + ```bash + chmod +x ./zombienet + ``` +- Remove the binary from quarantine: + ```bash + xattr -d com.apple.quarantine ./zombienet + ``` + +Then you should be able to access the binary: + +```bash +./zombienet help +``` + +## Using NPM + +If you have `Node.js`, you can install `zombienet` locally via NPM: + +```bash +npm i @zombienet/cli@latest -g +``` + +Then you should be able to access the `zombienet` command: + +``` +zombienet help +``` + ## Using Nix [Nix](https://nixos.org/) is a package manager which is available for both `linux` and `macos`. diff --git a/docs/src/projects.md b/docs/src/projects.md index c4952bce1..e9a01f354 100644 --- a/docs/src/projects.md +++ b/docs/src/projects.md @@ -8,7 +8,6 @@ Below can be found some of the projects that are currently using Zombienet as in - [Cumulus](https://github.com/paritytech/cumulus/tree/master/zombienet/tests) - [Polkadot](https://polkadot.network/) in the [testing pipeline](https://github.com/paritytech/polkadot/blob/eafdfc36492384e16e1c253be9d5097fb3f33c60/scripts/ci/gitlab/pipeline/zombienet.yml); - [Substrate](https://github.com/paritytech/substrate/tree/master/zombienet) -- [Substrate Connect](https://github.com/paritytech/substrate-connect/tree/main/zombienet-tests) **In the Polkadot ecosystem:** diff --git a/examples/check_creations.sh b/examples/check_creations.sh index e1a976d73..7e8fd4d6e 100755 --- a/examples/check_creations.sh +++ b/examples/check_creations.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash KEY_ENCODED=$1 SCRIPT=$(realpath "$0") diff --git a/examples/delay_check.sh b/examples/delay_check.sh index 1af3b79c1..c4d063223 100755 --- a/examples/delay_check.sh +++ b/examples/delay_check.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ping -q -c 2 8.8.8.8 | tail -1 | awk -F "/" '{print $5}' ping -q -c 2 8.8.8.8 | tail -1 | awk -F "/" '{print $5}' diff --git a/flake-module.nix b/flake-module.nix index dca971f47..02882c8d7 100644 --- a/flake-module.nix +++ b/flake-module.nix @@ -8,7 +8,7 @@ ... }: let # this change on each change of dependencies, unfortunately this hash not yet automatically updated from SRI of package.lock - npmDepsHash = "sha256-YrUeSTDHoC0ID1zFAoSkFbw3M/MOlApYfFmUduYn6Ic="; + npmDepsHash = "sha256-j4M/Tdt28AnXmfaJZT1MHMWvtB+9+Ap24ncwofXcTWs="; #### # there is officia polkadot on nixpkgs, but it has no local rococo wasm to run diff --git a/javascript/package-lock.json b/javascript/package-lock.json index ed622184f..ab475cc84 100644 --- a/javascript/package-lock.json +++ b/javascript/package-lock.json @@ -15,9 +15,6 @@ "packages/cli" ], "dependencies": { - "@polkadot/keyring": "^12.6.2", - "@polkadot/util": "^12.5.1", - "@polkadot/util-crypto": "^12.5.1", "@types/chai": "^4.3.11", "chai": "^4.3.10" }, @@ -139,15 +136,6 @@ "node": ">=12" } }, - "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", - "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -318,21 +306,23 @@ "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.20", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", - "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", - "dev": true, + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" } }, "node_modules/@noble/curves": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.3.0.tgz", - "integrity": "sha512-t01iSXPuN+Eqzb4eBX0S5oubSqXbK/xXa1Ne18Hj8f9pStxztHCE2gfboSp/dZRLSqfuLpRK2nDXDK+W9puocA==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.6.0.tgz", + "integrity": "sha512-TlaHRXDehJuRNR9TfZDNQ45mMEd5dwUwmicsafcIX4SsNiqnCHKjE/1alYPd/lDRVhxdhUAlv8uEhMCI5zjIJQ==", "dependencies": { - "@noble/hashes": "1.3.3" + "@noble/hashes": "1.5.0" + }, + "engines": { + "node": "^14.21.3 || >=16" }, "funding": { "url": "https://paulmillr.com/funding/" @@ -350,11 +340,11 @@ ] }, "node_modules/@noble/hashes": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", - "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.5.0.tgz", + "integrity": "sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA==", "engines": { - "node": ">= 16" + "node": "^14.21.3 || >=16" }, "funding": { "url": "https://paulmillr.com/funding/" @@ -433,349 +423,353 @@ "optional": true }, "node_modules/@polkadot-api/json-rpc-provider-proxy": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/@polkadot-api/json-rpc-provider-proxy/-/json-rpc-provider-proxy-0.0.1.tgz", - "integrity": "sha512-gmVDUP8LpCH0BXewbzqXF2sdHddq1H1q+XrAW2of+KZj4woQkIGBRGTJHeBEVHe30EB+UejR1N2dT4PO/RvDdg==", + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@polkadot-api/json-rpc-provider-proxy/-/json-rpc-provider-proxy-0.1.0.tgz", + "integrity": "sha512-8GSFE5+EF73MCuLQm8tjrbCqlgclcHBSRaswvXziJ0ZW7iw3UEMsKkkKvELayWyBuOPa2T5i1nj6gFOeIsqvrg==", "optional": true }, "node_modules/@polkadot-api/metadata-builders": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/@polkadot-api/metadata-builders/-/metadata-builders-0.0.1.tgz", - "integrity": "sha512-GCI78BHDzXAF/L2pZD6Aod/yl82adqQ7ftNmKg51ixRL02JpWUA+SpUKTJE5MY1p8kiJJIo09P2um24SiJHxNA==", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@polkadot-api/metadata-builders/-/metadata-builders-0.3.2.tgz", + "integrity": "sha512-TKpfoT6vTb+513KDzMBTfCb/ORdgRnsS3TDFpOhAhZ08ikvK+hjHMt5plPiAX/OWkm1Wc9I3+K6W0hX5Ab7MVg==", "optional": true, "dependencies": { - "@polkadot-api/substrate-bindings": "0.0.1", - "@polkadot-api/utils": "0.0.1" + "@polkadot-api/substrate-bindings": "0.6.0", + "@polkadot-api/utils": "0.1.0" } }, "node_modules/@polkadot-api/observable-client": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@polkadot-api/observable-client/-/observable-client-0.1.0.tgz", - "integrity": "sha512-GBCGDRztKorTLna/unjl/9SWZcRmvV58o9jwU2Y038VuPXZcr01jcw/1O3x+yeAuwyGzbucI/mLTDa1QoEml3A==", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@polkadot-api/observable-client/-/observable-client-0.3.2.tgz", + "integrity": "sha512-HGgqWgEutVyOBXoGOPp4+IAq6CNdK/3MfQJmhCJb8YaJiaK4W6aRGrdQuQSTPHfERHCARt9BrOmEvTXAT257Ug==", "optional": true, "dependencies": { - "@polkadot-api/metadata-builders": "0.0.1", - "@polkadot-api/substrate-bindings": "0.0.1", - "@polkadot-api/substrate-client": "0.0.1", - "@polkadot-api/utils": "0.0.1" + "@polkadot-api/metadata-builders": "0.3.2", + "@polkadot-api/substrate-bindings": "0.6.0", + "@polkadot-api/utils": "0.1.0" }, "peerDependencies": { + "@polkadot-api/substrate-client": "0.1.4", "rxjs": ">=7.8.0" } }, "node_modules/@polkadot-api/substrate-bindings": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/@polkadot-api/substrate-bindings/-/substrate-bindings-0.0.1.tgz", - "integrity": "sha512-bAe7a5bOPnuFVmpv7y4BBMRpNTnMmE0jtTqRUw/+D8ZlEHNVEJQGr4wu3QQCl7k1GnSV1wfv3mzIbYjErEBocg==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@polkadot-api/substrate-bindings/-/substrate-bindings-0.6.0.tgz", + "integrity": "sha512-lGuhE74NA1/PqdN7fKFdE5C1gNYX357j1tWzdlPXI0kQ7h3kN0zfxNOpPUN7dIrPcOFZ6C0tRRVrBylXkI6xPw==", "optional": true, "dependencies": { "@noble/hashes": "^1.3.1", - "@polkadot-api/utils": "0.0.1", + "@polkadot-api/utils": "0.1.0", "@scure/base": "^1.1.1", "scale-ts": "^1.6.0" } }, "node_modules/@polkadot-api/substrate-client": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/@polkadot-api/substrate-client/-/substrate-client-0.0.1.tgz", - "integrity": "sha512-9Bg9SGc3AwE+wXONQoW8GC00N3v6lCZLW74HQzqB6ROdcm5VAHM4CB/xRzWSUF9CXL78ugiwtHx3wBcpx4H4Wg==", - "optional": true + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/@polkadot-api/substrate-client/-/substrate-client-0.1.4.tgz", + "integrity": "sha512-MljrPobN0ZWTpn++da9vOvt+Ex+NlqTlr/XT7zi9sqPtDJiQcYl+d29hFAgpaeTqbeQKZwz3WDE9xcEfLE8c5A==", + "optional": true, + "dependencies": { + "@polkadot-api/json-rpc-provider": "0.0.1", + "@polkadot-api/utils": "0.1.0" + } }, "node_modules/@polkadot-api/utils": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/@polkadot-api/utils/-/utils-0.0.1.tgz", - "integrity": "sha512-3j+pRmlF9SgiYDabSdZsBSsN5XHbpXOAce1lWj56IEEaFZVjsiCaxDOA7C9nCcgfVXuvnbxqqEGQvnY+QfBAUw==", + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@polkadot-api/utils/-/utils-0.1.0.tgz", + "integrity": "sha512-MXzWZeuGxKizPx2Xf/47wx9sr/uxKw39bVJUptTJdsaQn/TGq+z310mHzf1RCGvC1diHM8f593KrnDgc9oNbJA==", "optional": true }, "node_modules/@polkadot/api": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/@polkadot/api/-/api-11.1.1.tgz", - "integrity": "sha512-SGKIFMan0o4cjRxpndAaEG7aPb9TwAPVgjS/DKJDpzdKA7rEqDTe+SFw/vuzbt9CSl2nx1LBd10xbOeV7Ak+KA==", - "dependencies": { - "@polkadot/api-augment": "11.1.1", - "@polkadot/api-base": "11.1.1", - "@polkadot/api-derive": "11.1.1", - "@polkadot/keyring": "^12.6.2", - "@polkadot/rpc-augment": "11.1.1", - "@polkadot/rpc-core": "11.1.1", - "@polkadot/rpc-provider": "11.1.1", - "@polkadot/types": "11.1.1", - "@polkadot/types-augment": "11.1.1", - "@polkadot/types-codec": "11.1.1", - "@polkadot/types-create": "11.1.1", - "@polkadot/types-known": "11.1.1", - "@polkadot/util": "^12.6.2", - "@polkadot/util-crypto": "^12.6.2", + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/@polkadot/api/-/api-14.0.1.tgz", + "integrity": "sha512-CDSaUiJpXu9aE6MaTg14K+9Trf8K2PBHcD3Xl5m5KOvJperWgYFxoCqV3rXLIBWt69LgHhMYlq5JSPRHxejIsw==", + "dependencies": { + "@polkadot/api-augment": "14.0.1", + "@polkadot/api-base": "14.0.1", + "@polkadot/api-derive": "14.0.1", + "@polkadot/keyring": "^13.1.1", + "@polkadot/rpc-augment": "14.0.1", + "@polkadot/rpc-core": "14.0.1", + "@polkadot/rpc-provider": "14.0.1", + "@polkadot/types": "14.0.1", + "@polkadot/types-augment": "14.0.1", + "@polkadot/types-codec": "14.0.1", + "@polkadot/types-create": "14.0.1", + "@polkadot/types-known": "14.0.1", + "@polkadot/util": "^13.1.1", + "@polkadot/util-crypto": "^13.1.1", "eventemitter3": "^5.0.1", "rxjs": "^7.8.1", - "tslib": "^2.6.2" + "tslib": "^2.7.0" }, "engines": { "node": ">=18" } }, "node_modules/@polkadot/api-augment": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/@polkadot/api-augment/-/api-augment-11.1.1.tgz", - "integrity": "sha512-3rJZmW5RH/A9ajO75Fmc20FMQRFytk/hZOqFAlhik/UuRCOgtU4fNouSWaWN0a75iBT8+01/sS917XRibHDysQ==", - "dependencies": { - "@polkadot/api-base": "11.1.1", - "@polkadot/rpc-augment": "11.1.1", - "@polkadot/types": "11.1.1", - "@polkadot/types-augment": "11.1.1", - "@polkadot/types-codec": "11.1.1", - "@polkadot/util": "^12.6.2", - "tslib": "^2.6.2" + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/@polkadot/api-augment/-/api-augment-14.0.1.tgz", + "integrity": "sha512-+ZHq3JaQZ/3Q45r6/YQBeLfoP8S5ibgkOvLKnKA9cJeF7oP5Qgi6pAEnGW0accfnT9PyCEco9fD/ZOLR9Yka7w==", + "dependencies": { + "@polkadot/api-base": "14.0.1", + "@polkadot/rpc-augment": "14.0.1", + "@polkadot/types": "14.0.1", + "@polkadot/types-augment": "14.0.1", + "@polkadot/types-codec": "14.0.1", + "@polkadot/util": "^13.1.1", + "tslib": "^2.7.0" }, "engines": { "node": ">=18" } }, "node_modules/@polkadot/api-base": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/@polkadot/api-base/-/api-base-11.1.1.tgz", - "integrity": "sha512-+hH7Azj7pOj0iyjLj8ORxJVNUKAfZCH68rM9VQRs+/N9NmpxSMx8AxBKCynSgSJoiDXr84Zm862wJHoa4Ytf2g==", + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/@polkadot/api-base/-/api-base-14.0.1.tgz", + "integrity": "sha512-OVnDiztKx/1ktae9eCzO1q8lmKEfnQ71fipo8JkDJOMIN4vT1IqL9KQo4e/Xz8UtOfTJ0H8kZ6evaLqdA3ZYOA==", "dependencies": { - "@polkadot/rpc-core": "11.1.1", - "@polkadot/types": "11.1.1", - "@polkadot/util": "^12.6.2", + "@polkadot/rpc-core": "14.0.1", + "@polkadot/types": "14.0.1", + "@polkadot/util": "^13.1.1", "rxjs": "^7.8.1", - "tslib": "^2.6.2" + "tslib": "^2.7.0" }, "engines": { "node": ">=18" } }, "node_modules/@polkadot/api-derive": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/@polkadot/api-derive/-/api-derive-11.1.1.tgz", - "integrity": "sha512-OR2DfUg9Nd3JvCw3hUXbLPyiaUBPzb1mVXc2qngqdz4Y1Sg0yakTwKjSiFBEgQE7qO0Fjq9BYKLi5Ci66jciAw==", - "dependencies": { - "@polkadot/api": "11.1.1", - "@polkadot/api-augment": "11.1.1", - "@polkadot/api-base": "11.1.1", - "@polkadot/rpc-core": "11.1.1", - "@polkadot/types": "11.1.1", - "@polkadot/types-codec": "11.1.1", - "@polkadot/util": "^12.6.2", - "@polkadot/util-crypto": "^12.6.2", + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/@polkadot/api-derive/-/api-derive-14.0.1.tgz", + "integrity": "sha512-ADQMre3DRRW/0rhJqxOVhQ1vqtyafP2dSZJ0qEAsto12q2WMSF8CZWo7pXe4DxiniDkZx3zVq4z5lqw2aBRLfg==", + "dependencies": { + "@polkadot/api": "14.0.1", + "@polkadot/api-augment": "14.0.1", + "@polkadot/api-base": "14.0.1", + "@polkadot/rpc-core": "14.0.1", + "@polkadot/types": "14.0.1", + "@polkadot/types-codec": "14.0.1", + "@polkadot/util": "^13.1.1", + "@polkadot/util-crypto": "^13.1.1", "rxjs": "^7.8.1", - "tslib": "^2.6.2" + "tslib": "^2.7.0" }, "engines": { "node": ">=18" } }, "node_modules/@polkadot/keyring": { - "version": "12.6.2", - "resolved": "https://registry.npmjs.org/@polkadot/keyring/-/keyring-12.6.2.tgz", - "integrity": "sha512-O3Q7GVmRYm8q7HuB3S0+Yf/q/EB2egKRRU3fv9b3B7V+A52tKzA+vIwEmNVaD1g5FKW9oB97rmpggs0zaKFqHw==", + "version": "13.1.1", + "resolved": "https://registry.npmjs.org/@polkadot/keyring/-/keyring-13.1.1.tgz", + "integrity": "sha512-Wm+9gn946GIPjGzvueObLGBBS9s541HE6mvKdWGEmPFMzH93ESN931RZlOd67my5MWryiSP05h5SHTp7bSaQTA==", "dependencies": { - "@polkadot/util": "12.6.2", - "@polkadot/util-crypto": "12.6.2", - "tslib": "^2.6.2" + "@polkadot/util": "13.1.1", + "@polkadot/util-crypto": "13.1.1", + "tslib": "^2.7.0" }, "engines": { "node": ">=18" }, "peerDependencies": { - "@polkadot/util": "12.6.2", - "@polkadot/util-crypto": "12.6.2" + "@polkadot/util": "13.1.1", + "@polkadot/util-crypto": "13.1.1" } }, "node_modules/@polkadot/networks": { - "version": "12.6.2", - "resolved": "https://registry.npmjs.org/@polkadot/networks/-/networks-12.6.2.tgz", - "integrity": "sha512-1oWtZm1IvPWqvMrldVH6NI2gBoCndl5GEwx7lAuQWGr7eNL+6Bdc5K3Z9T0MzFvDGoi2/CBqjX9dRKo39pDC/w==", + "version": "13.1.1", + "resolved": "https://registry.npmjs.org/@polkadot/networks/-/networks-13.1.1.tgz", + "integrity": "sha512-eEQ4+Mfl1xFtApeU5PdXZ2XBhxNSvUz9yW+YQVGUCkXRjWFbqNRsTOYWGd9uFbiAOXiiiXbtqfZpxSDzIm4XOg==", "dependencies": { - "@polkadot/util": "12.6.2", - "@substrate/ss58-registry": "^1.44.0", - "tslib": "^2.6.2" + "@polkadot/util": "13.1.1", + "@substrate/ss58-registry": "^1.50.0", + "tslib": "^2.7.0" }, "engines": { "node": ">=18" } }, "node_modules/@polkadot/rpc-augment": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/@polkadot/rpc-augment/-/rpc-augment-11.1.1.tgz", - "integrity": "sha512-jkKhKAqgPivgNltmLmeD7oiMD6ekxe9bv2qOGEc1BVopSnS+PXCuGOeftTuv7Qo4rXaoEkMP1rlxmbjOZ4o3sg==", - "dependencies": { - "@polkadot/rpc-core": "11.1.1", - "@polkadot/types": "11.1.1", - "@polkadot/types-codec": "11.1.1", - "@polkadot/util": "^12.6.2", - "tslib": "^2.6.2" + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/@polkadot/rpc-augment/-/rpc-augment-14.0.1.tgz", + "integrity": "sha512-M0CbN/IScqiedYI2TmoQ+SoeEdJHfxGeQD1qJf9uYv9LILK+x1/5fyr5DrZ3uCGVmLuObWAJLnHTs0BzJcSHTQ==", + "dependencies": { + "@polkadot/rpc-core": "14.0.1", + "@polkadot/types": "14.0.1", + "@polkadot/types-codec": "14.0.1", + "@polkadot/util": "^13.1.1", + "tslib": "^2.7.0" }, "engines": { "node": ">=18" } }, "node_modules/@polkadot/rpc-core": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/@polkadot/rpc-core/-/rpc-core-11.1.1.tgz", - "integrity": "sha512-XDEIxWajwS0DIJeqImWYeSDHcMZNXUDunI+mXK/ihtZJY6/s3CY1UHo6SgdWCK05IukQhr9CjRVtKNU7DYGS4Q==", - "dependencies": { - "@polkadot/rpc-augment": "11.1.1", - "@polkadot/rpc-provider": "11.1.1", - "@polkadot/types": "11.1.1", - "@polkadot/util": "^12.6.2", + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/@polkadot/rpc-core/-/rpc-core-14.0.1.tgz", + "integrity": "sha512-SfgC6WU7RxaFFgm/GUpsqTywyaDeb7+r5GU3GlwC+QR148h3a7UcQ3sssOpB0MiZ2gIXngJuyIcIQm/3GfHnJw==", + "dependencies": { + "@polkadot/rpc-augment": "14.0.1", + "@polkadot/rpc-provider": "14.0.1", + "@polkadot/types": "14.0.1", + "@polkadot/util": "^13.1.1", "rxjs": "^7.8.1", - "tslib": "^2.6.2" + "tslib": "^2.7.0" }, "engines": { "node": ">=18" } }, "node_modules/@polkadot/rpc-provider": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/@polkadot/rpc-provider/-/rpc-provider-11.1.1.tgz", - "integrity": "sha512-m4v964Cs7dM9cLiMD5XVLPvKAT1yOcvTX618875pLe5LU67b7MLUT2xxCchXf61jvM6b3NKNKulKSMmlQJkYtw==", - "dependencies": { - "@polkadot/keyring": "^12.6.2", - "@polkadot/types": "11.1.1", - "@polkadot/types-support": "11.1.1", - "@polkadot/util": "^12.6.2", - "@polkadot/util-crypto": "^12.6.2", - "@polkadot/x-fetch": "^12.6.2", - "@polkadot/x-global": "^12.6.2", - "@polkadot/x-ws": "^12.6.2", + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/@polkadot/rpc-provider/-/rpc-provider-14.0.1.tgz", + "integrity": "sha512-mNfaKZUHPXGSY7TwgOfV05RN3Men21Dw7YXrSZDFkJYsZ55yOAYdmLg9anPZGHW100YnNWrXj+3uhQOw8JgqkA==", + "dependencies": { + "@polkadot/keyring": "^13.1.1", + "@polkadot/types": "14.0.1", + "@polkadot/types-support": "14.0.1", + "@polkadot/util": "^13.1.1", + "@polkadot/util-crypto": "^13.1.1", + "@polkadot/x-fetch": "^13.1.1", + "@polkadot/x-global": "^13.1.1", + "@polkadot/x-ws": "^13.1.1", "eventemitter3": "^5.0.1", "mock-socket": "^9.3.1", - "nock": "^13.5.0", - "tslib": "^2.6.2" + "nock": "^13.5.4", + "tslib": "^2.7.0" }, "engines": { "node": ">=18" }, "optionalDependencies": { - "@substrate/connect": "0.8.10" + "@substrate/connect": "0.8.11" } }, "node_modules/@polkadot/types": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/@polkadot/types/-/types-11.1.1.tgz", - "integrity": "sha512-v4cbkRXYGcgtESg5oF/fVFNSrkmxw+rFxWslOWVB0mDJ74ooPDyasBR0FjxrPdoMlbxtrBbs+TixFEKng63chA==", - "dependencies": { - "@polkadot/keyring": "^12.6.2", - "@polkadot/types-augment": "11.1.1", - "@polkadot/types-codec": "11.1.1", - "@polkadot/types-create": "11.1.1", - "@polkadot/util": "^12.6.2", - "@polkadot/util-crypto": "^12.6.2", + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/@polkadot/types/-/types-14.0.1.tgz", + "integrity": "sha512-DOMzHsyVbCa12FT2Fng8iGiQJhHW2ONpv5oieU+Z2o0gFQqwNmIDXWncScG5mAUBNcDMXLuvWIKLKtUDOq8msg==", + "dependencies": { + "@polkadot/keyring": "^13.1.1", + "@polkadot/types-augment": "14.0.1", + "@polkadot/types-codec": "14.0.1", + "@polkadot/types-create": "14.0.1", + "@polkadot/util": "^13.1.1", + "@polkadot/util-crypto": "^13.1.1", "rxjs": "^7.8.1", - "tslib": "^2.6.2" + "tslib": "^2.7.0" }, "engines": { "node": ">=18" } }, "node_modules/@polkadot/types-augment": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/@polkadot/types-augment/-/types-augment-11.1.1.tgz", - "integrity": "sha512-aBfM+vu76YIym8Dvy00FJZRVz9cHqeghlTj3Lj1WjolVc+GuFxAWDx87p778Sb9d+iebA3pVY0wXNF+ZlRNDtg==", + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/@polkadot/types-augment/-/types-augment-14.0.1.tgz", + "integrity": "sha512-PGo81444J5tGJxP3tu060Jx1kkeuo8SmBIt9S/w626Se49x4RLM5a7Pa5fguYVsg4TsJa9cgVPMuu6Y0F/2aCQ==", "dependencies": { - "@polkadot/types": "11.1.1", - "@polkadot/types-codec": "11.1.1", - "@polkadot/util": "^12.6.2", - "tslib": "^2.6.2" + "@polkadot/types": "14.0.1", + "@polkadot/types-codec": "14.0.1", + "@polkadot/util": "^13.1.1", + "tslib": "^2.7.0" }, "engines": { "node": ">=18" } }, "node_modules/@polkadot/types-codec": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/@polkadot/types-codec/-/types-codec-11.1.1.tgz", - "integrity": "sha512-YMLEwerOO17M++EUAnh0SQWcDQNZ/l2nGmbSSvLEUBZdjXdtfLQ8NFVZakH5ehNHD+X3t0NLOQJg0hOBlVIj4A==", + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/@polkadot/types-codec/-/types-codec-14.0.1.tgz", + "integrity": "sha512-IyUlkrRZ6uppbHVlMJL+btKP7dfgW65K06ggQxH7Y/IyRAQVDNjXecAZrCUMB/gtjUXNPyTHEIfPGDlg8E6rig==", "dependencies": { - "@polkadot/util": "^12.6.2", - "@polkadot/x-bigint": "^12.6.2", - "tslib": "^2.6.2" + "@polkadot/util": "^13.1.1", + "@polkadot/x-bigint": "^13.1.1", + "tslib": "^2.7.0" }, "engines": { "node": ">=18" } }, "node_modules/@polkadot/types-create": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/@polkadot/types-create/-/types-create-11.1.1.tgz", - "integrity": "sha512-Ro/9lYyEhGYTFoIvFUvAzdJ+0Of/tVnqewtwV35iXX9C86GazE8URJPrHFh4J/GBLQY0/JiT++PwxwFNH/kJsw==", + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/@polkadot/types-create/-/types-create-14.0.1.tgz", + "integrity": "sha512-R9/ac3CHKrFhvPKVUdpjnCDFSaGjfrNwtuY+AzvExAMIq7pM9dxo2N8UfnLbyFaG/n1hfYPXDIS3hLHvOZsLbw==", "dependencies": { - "@polkadot/types-codec": "11.1.1", - "@polkadot/util": "^12.6.2", - "tslib": "^2.6.2" + "@polkadot/types-codec": "14.0.1", + "@polkadot/util": "^13.1.1", + "tslib": "^2.7.0" }, "engines": { "node": ">=18" } }, "node_modules/@polkadot/types-known": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/@polkadot/types-known/-/types-known-11.1.1.tgz", - "integrity": "sha512-Kp+KrCIxy8FkfqzyV/KpRGJC8bBAK8eKC/ta7bCo++kmdGc9FFfpmTMPIYOtd8vxYdL71KA40bI9LqodCaopQg==", - "dependencies": { - "@polkadot/networks": "^12.6.2", - "@polkadot/types": "11.1.1", - "@polkadot/types-codec": "11.1.1", - "@polkadot/types-create": "11.1.1", - "@polkadot/util": "^12.6.2", - "tslib": "^2.6.2" + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/@polkadot/types-known/-/types-known-14.0.1.tgz", + "integrity": "sha512-oGypUOQNxZ6bq10czpVadZYeDM2NBB2kX3VFHLKLEpjaRbnVYtKXL6pl8B0uHR8GK/2Z8AmPOj6kuRjaC86qXg==", + "dependencies": { + "@polkadot/networks": "^13.1.1", + "@polkadot/types": "14.0.1", + "@polkadot/types-codec": "14.0.1", + "@polkadot/types-create": "14.0.1", + "@polkadot/util": "^13.1.1", + "tslib": "^2.7.0" }, "engines": { "node": ">=18" } }, "node_modules/@polkadot/types-support": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/@polkadot/types-support/-/types-support-11.1.1.tgz", - "integrity": "sha512-Wf1aYs5lEtwksFH8EBNZMxBJlcRFx/sewErzpwGJJFT8BGcrQpc6HlNjVXJpTdXj+0VzUBHE9B8eAWfWQl8YIA==", + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/@polkadot/types-support/-/types-support-14.0.1.tgz", + "integrity": "sha512-lcZEyOf5e3WLLtrFlLTvFfUpO0Vx/Gh5lhLLjdx1W9Xs0KJUlOxSAKxvjVieJJj6HifL0Jh6tDYOUeEc4TOrvA==", "dependencies": { - "@polkadot/util": "^12.6.2", - "tslib": "^2.6.2" + "@polkadot/util": "^13.1.1", + "tslib": "^2.7.0" }, "engines": { "node": ">=18" } }, "node_modules/@polkadot/util": { - "version": "12.6.2", - "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-12.6.2.tgz", - "integrity": "sha512-l8TubR7CLEY47240uki0TQzFvtnxFIO7uI/0GoWzpYD/O62EIAMRsuY01N4DuwgKq2ZWD59WhzsLYmA5K6ksdw==", - "dependencies": { - "@polkadot/x-bigint": "12.6.2", - "@polkadot/x-global": "12.6.2", - "@polkadot/x-textdecoder": "12.6.2", - "@polkadot/x-textencoder": "12.6.2", + "version": "13.1.1", + "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-13.1.1.tgz", + "integrity": "sha512-M4iQ5Um8tFdDmD7a96nPzfrEt+kxyWOqQDPqXyaax4QBnq/WCbq0jo8IO61uz55mdMQnGZvq8jd8uge4V6JzzQ==", + "dependencies": { + "@polkadot/x-bigint": "13.1.1", + "@polkadot/x-global": "13.1.1", + "@polkadot/x-textdecoder": "13.1.1", + "@polkadot/x-textencoder": "13.1.1", "@types/bn.js": "^5.1.5", "bn.js": "^5.2.1", - "tslib": "^2.6.2" + "tslib": "^2.7.0" }, "engines": { "node": ">=18" } }, "node_modules/@polkadot/util-crypto": { - "version": "12.6.2", - "resolved": "https://registry.npmjs.org/@polkadot/util-crypto/-/util-crypto-12.6.2.tgz", - "integrity": "sha512-FEWI/dJ7wDMNN1WOzZAjQoIcCP/3vz3wvAp5QQm+lOrzOLj0iDmaIGIcBkz8HVm3ErfSe/uKP0KS4jgV/ib+Mg==", + "version": "13.1.1", + "resolved": "https://registry.npmjs.org/@polkadot/util-crypto/-/util-crypto-13.1.1.tgz", + "integrity": "sha512-FG68rrLPdfLcscEyH10vnGkakM4O2lqr71S3GDhgc9WXaS8y9jisLgMPg8jbMHiQBJ3iKYkmtPKiLBowRslj2w==", "dependencies": { "@noble/curves": "^1.3.0", "@noble/hashes": "^1.3.3", - "@polkadot/networks": "12.6.2", - "@polkadot/util": "12.6.2", + "@polkadot/networks": "13.1.1", + "@polkadot/util": "13.1.1", "@polkadot/wasm-crypto": "^7.3.2", "@polkadot/wasm-util": "^7.3.2", - "@polkadot/x-bigint": "12.6.2", - "@polkadot/x-randomvalues": "12.6.2", - "@scure/base": "^1.1.5", - "tslib": "^2.6.2" + "@polkadot/x-bigint": "13.1.1", + "@polkadot/x-randomvalues": "13.1.1", + "@scure/base": "^1.1.7", + "tslib": "^2.7.0" }, "engines": { "node": ">=18" }, "peerDependencies": { - "@polkadot/util": "12.6.2" + "@polkadot/util": "13.1.1" } }, "node_modules/@polkadot/wasm-bridge": { @@ -877,89 +871,89 @@ } }, "node_modules/@polkadot/x-bigint": { - "version": "12.6.2", - "resolved": "https://registry.npmjs.org/@polkadot/x-bigint/-/x-bigint-12.6.2.tgz", - "integrity": "sha512-HSIk60uFPX4GOFZSnIF7VYJz7WZA7tpFJsne7SzxOooRwMTWEtw3fUpFy5cYYOeLh17/kHH1Y7SVcuxzVLc74Q==", + "version": "13.1.1", + "resolved": "https://registry.npmjs.org/@polkadot/x-bigint/-/x-bigint-13.1.1.tgz", + "integrity": "sha512-Cq4Y6fd9UWtRBZz8RX2tWEBL1IFwUtY6cL8p6HC9yhZtUR6OPjKZe6RIZQa9gSOoIuqZWd6PmtvSNGVH32yfkQ==", "dependencies": { - "@polkadot/x-global": "12.6.2", - "tslib": "^2.6.2" + "@polkadot/x-global": "13.1.1", + "tslib": "^2.7.0" }, "engines": { "node": ">=18" } }, "node_modules/@polkadot/x-fetch": { - "version": "12.6.2", - "resolved": "https://registry.npmjs.org/@polkadot/x-fetch/-/x-fetch-12.6.2.tgz", - "integrity": "sha512-8wM/Z9JJPWN1pzSpU7XxTI1ldj/AfC8hKioBlUahZ8gUiJaOF7K9XEFCrCDLis/A1BoOu7Ne6WMx/vsJJIbDWw==", + "version": "13.1.1", + "resolved": "https://registry.npmjs.org/@polkadot/x-fetch/-/x-fetch-13.1.1.tgz", + "integrity": "sha512-qA6mIUUebJbS+oWzq/EagZflmaoa9b25WvsxSFn7mCvzKngXzr+GYCY4XiDwKY/S+/pr/kvSCKZ1ia8BDqPBYQ==", "dependencies": { - "@polkadot/x-global": "12.6.2", + "@polkadot/x-global": "13.1.1", "node-fetch": "^3.3.2", - "tslib": "^2.6.2" + "tslib": "^2.7.0" }, "engines": { "node": ">=18" } }, "node_modules/@polkadot/x-global": { - "version": "12.6.2", - "resolved": "https://registry.npmjs.org/@polkadot/x-global/-/x-global-12.6.2.tgz", - "integrity": "sha512-a8d6m+PW98jmsYDtAWp88qS4dl8DyqUBsd0S+WgyfSMtpEXu6v9nXDgPZgwF5xdDvXhm+P0ZfVkVTnIGrScb5g==", + "version": "13.1.1", + "resolved": "https://registry.npmjs.org/@polkadot/x-global/-/x-global-13.1.1.tgz", + "integrity": "sha512-DViIMmmEs29Qlsp058VTg2Mn7e3/CpGazNnKJrsBa0o1Ptxl13/4Z0fjqCpNi2GB+kaOsnREzxUORrHcU+PqcQ==", "dependencies": { - "tslib": "^2.6.2" + "tslib": "^2.7.0" }, "engines": { "node": ">=18" } }, "node_modules/@polkadot/x-randomvalues": { - "version": "12.6.2", - "resolved": "https://registry.npmjs.org/@polkadot/x-randomvalues/-/x-randomvalues-12.6.2.tgz", - "integrity": "sha512-Vr8uG7rH2IcNJwtyf5ebdODMcr0XjoCpUbI91Zv6AlKVYOGKZlKLYJHIwpTaKKB+7KPWyQrk4Mlym/rS7v9feg==", + "version": "13.1.1", + "resolved": "https://registry.npmjs.org/@polkadot/x-randomvalues/-/x-randomvalues-13.1.1.tgz", + "integrity": "sha512-cXj4omwbgzQQSiBtV1ZBw+XhJUU3iz/DS6ghUnGllSZEK+fGqiyaNgeFQzDY0tKjm6kYaDpvtOHR3mHsbzDuTg==", "dependencies": { - "@polkadot/x-global": "12.6.2", - "tslib": "^2.6.2" + "@polkadot/x-global": "13.1.1", + "tslib": "^2.7.0" }, "engines": { "node": ">=18" }, "peerDependencies": { - "@polkadot/util": "12.6.2", + "@polkadot/util": "13.1.1", "@polkadot/wasm-util": "*" } }, "node_modules/@polkadot/x-textdecoder": { - "version": "12.6.2", - "resolved": "https://registry.npmjs.org/@polkadot/x-textdecoder/-/x-textdecoder-12.6.2.tgz", - "integrity": "sha512-M1Bir7tYvNappfpFWXOJcnxUhBUFWkUFIdJSyH0zs5LmFtFdbKAeiDXxSp2Swp5ddOZdZgPac294/o2TnQKN1w==", + "version": "13.1.1", + "resolved": "https://registry.npmjs.org/@polkadot/x-textdecoder/-/x-textdecoder-13.1.1.tgz", + "integrity": "sha512-LpZ9KYc6HdBH+i86bCmun4g4GWMiWN/1Pzs0hNdanlQMfqp3UGzl1Dqp0nozMvjWAlvyG7ip235VgNMd8HEbqg==", "dependencies": { - "@polkadot/x-global": "12.6.2", - "tslib": "^2.6.2" + "@polkadot/x-global": "13.1.1", + "tslib": "^2.7.0" }, "engines": { "node": ">=18" } }, "node_modules/@polkadot/x-textencoder": { - "version": "12.6.2", - "resolved": "https://registry.npmjs.org/@polkadot/x-textencoder/-/x-textencoder-12.6.2.tgz", - "integrity": "sha512-4N+3UVCpI489tUJ6cv3uf0PjOHvgGp9Dl+SZRLgFGt9mvxnvpW/7+XBADRMtlG4xi5gaRK7bgl5bmY6OMDsNdw==", + "version": "13.1.1", + "resolved": "https://registry.npmjs.org/@polkadot/x-textencoder/-/x-textencoder-13.1.1.tgz", + "integrity": "sha512-w1mT15B9ptN5CJNgN/A0CmBqD5y9OePjBdU6gmAd8KRhwXCF0MTBKcEZk1dHhXiXtX+28ULJWLrfefC5gxy69Q==", "dependencies": { - "@polkadot/x-global": "12.6.2", - "tslib": "^2.6.2" + "@polkadot/x-global": "13.1.1", + "tslib": "^2.7.0" }, "engines": { "node": ">=18" } }, "node_modules/@polkadot/x-ws": { - "version": "12.6.2", - "resolved": "https://registry.npmjs.org/@polkadot/x-ws/-/x-ws-12.6.2.tgz", - "integrity": "sha512-cGZWo7K5eRRQCRl2LrcyCYsrc3lRbTlixZh3AzgU8uX4wASVGRlNWi/Hf4TtHNe1ExCDmxabJzdIsABIfrr7xw==", + "version": "13.1.1", + "resolved": "https://registry.npmjs.org/@polkadot/x-ws/-/x-ws-13.1.1.tgz", + "integrity": "sha512-E/xFmJTiFzu+IK5M3/8W/9fnvNJFelcnunPv/IgO6UST94SDaTsN/Gbeb6SqPb6CsrTHRl3WD+AZ3ErGGwQfEA==", "dependencies": { - "@polkadot/x-global": "12.6.2", - "tslib": "^2.6.2", - "ws": "^8.15.1" + "@polkadot/x-global": "13.1.1", + "tslib": "^2.7.0", + "ws": "^8.16.0" }, "engines": { "node": ">=18" @@ -1020,29 +1014,29 @@ "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" }, "node_modules/@scure/base": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.5.tgz", - "integrity": "sha512-Brj9FiG2W1MRQSTB212YVPRrcbjkv48FoZi/u4l/zds/ieRrqsh7aUf6CLwkAq61oKXr/ZlTzlY66gLIj3TFTQ==", + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.9.tgz", + "integrity": "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg==", "funding": { "url": "https://paulmillr.com/funding/" } }, "node_modules/@sinonjs/commons": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", - "integrity": "sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", "dev": true, "dependencies": { "type-detect": "4.0.8" } }, "node_modules/@sinonjs/fake-timers": { - "version": "11.2.2", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-11.2.2.tgz", - "integrity": "sha512-G2piCSxQ7oWOxwGSAyFHfPIsyeJGXYtc6mFbnFA+kRXkiEnTl8c/8jul2S329iFBnDI9HGoeWWAZvuvOkZccgw==", + "version": "11.3.1", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-11.3.1.tgz", + "integrity": "sha512-EVJO7nW5M/F5Tur0Rf2z/QoMo+1Ia963RiMtapiQrEWvY0iBUvADo8Beegwjpnle5BHkyHuoxSTW3jF43H1XRA==", "dev": true, "dependencies": { - "@sinonjs/commons": "^3.0.0" + "@sinonjs/commons": "^3.0.1" } }, "node_modules/@sinonjs/samsam": { @@ -1072,41 +1066,42 @@ "dev": true }, "node_modules/@substrate/connect": { - "version": "0.8.10", - "resolved": "https://registry.npmjs.org/@substrate/connect/-/connect-0.8.10.tgz", - "integrity": "sha512-DIyQ13DDlXqVFnLV+S6/JDgiGowVRRrh18kahieJxhgvzcWicw5eLc6jpfQ0moVVLBYkO7rctB5Wreldwpva8w==", + "version": "0.8.11", + "resolved": "https://registry.npmjs.org/@substrate/connect/-/connect-0.8.11.tgz", + "integrity": "sha512-ofLs1PAO9AtDdPbdyTYj217Pe+lBfTLltdHDs3ds8no0BseoLeAGxpz1mHfi7zB4IxI3YyAiLjH6U8cw4pj4Nw==", + "deprecated": "versions below 1.x are no longer maintained", "optional": true, "dependencies": { "@substrate/connect-extension-protocol": "^2.0.0", - "@substrate/connect-known-chains": "^1.1.4", - "@substrate/light-client-extension-helpers": "^0.0.6", - "smoldot": "2.0.22" + "@substrate/connect-known-chains": "^1.1.5", + "@substrate/light-client-extension-helpers": "^1.0.0", + "smoldot": "2.0.26" } }, "node_modules/@substrate/connect-extension-protocol": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@substrate/connect-extension-protocol/-/connect-extension-protocol-2.0.0.tgz", - "integrity": "sha512-nKu8pDrE3LNCEgJjZe1iGXzaD6OSIDD4Xzz/yo4KO9mQ6LBvf49BVrt4qxBFGL6++NneLiWUZGoh+VSd4PyVIg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@substrate/connect-extension-protocol/-/connect-extension-protocol-2.1.0.tgz", + "integrity": "sha512-Wz5Cbn6S6P4vWfHyrsnPW7g15IAViMaXCk+jYkq4nNEMmzPtTKIEbtxrdDMBKrouOFtYKKp0znx5mh9KTCNqlA==", "optional": true }, "node_modules/@substrate/connect-known-chains": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/@substrate/connect-known-chains/-/connect-known-chains-1.1.4.tgz", - "integrity": "sha512-iT+BdKqvKl/uBLd8BAJysFM1BaMZXRkaXBP2B7V7ob/EyNs5h0EMhTVbO6MJxV/IEOg5OKsyl6FUqQK7pKnqyw==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@substrate/connect-known-chains/-/connect-known-chains-1.4.1.tgz", + "integrity": "sha512-WlFKGEE3naIa7iTyy7hJ0RV0dyGpP7Zic1Z8sXr4bJmSEzZoHcfLRbM1D3T+zFAaitffVCu6k55Vj+CFzMPw1Q==", "optional": true }, "node_modules/@substrate/light-client-extension-helpers": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/@substrate/light-client-extension-helpers/-/light-client-extension-helpers-0.0.6.tgz", - "integrity": "sha512-girltEuxQ1BvkJWmc8JJlk4ZxnlGXc/wkLcNguhY+UoDEMBK0LsdtfzQKIfrIehi4QdeSBlFEFBoI4RqPmsZzA==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@substrate/light-client-extension-helpers/-/light-client-extension-helpers-1.0.0.tgz", + "integrity": "sha512-TdKlni1mBBZptOaeVrKnusMg/UBpWUORNDv5fdCaJklP4RJiFOzBCrzC+CyVI5kQzsXBisZ+2pXm+rIjS38kHg==", "optional": true, "dependencies": { - "@polkadot-api/json-rpc-provider": "0.0.1", - "@polkadot-api/json-rpc-provider-proxy": "0.0.1", - "@polkadot-api/observable-client": "0.1.0", - "@polkadot-api/substrate-client": "0.0.1", + "@polkadot-api/json-rpc-provider": "^0.0.1", + "@polkadot-api/json-rpc-provider-proxy": "^0.1.0", + "@polkadot-api/observable-client": "^0.3.0", + "@polkadot-api/substrate-client": "^0.1.2", "@substrate/connect-extension-protocol": "^2.0.0", - "@substrate/connect-known-chains": "^1.1.4", + "@substrate/connect-known-chains": "^1.1.5", "rxjs": "^7.8.1" }, "peerDependencies": { @@ -1114,9 +1109,9 @@ } }, "node_modules/@substrate/ss58-registry": { - "version": "1.44.0", - "resolved": "https://registry.npmjs.org/@substrate/ss58-registry/-/ss58-registry-1.44.0.tgz", - "integrity": "sha512-7lQ/7mMCzVNSEfDS4BCqnRnKCFKpcOaPrxMeGTXHX1YQzM/m2BBHjbK2C3dJvjv7GYxMiaTq/HdWQj1xS6ss+A==" + "version": "1.50.0", + "resolved": "https://registry.npmjs.org/@substrate/ss58-registry/-/ss58-registry-1.50.0.tgz", + "integrity": "sha512-mkmlMlcC+MSd9rA+PN8ljGAm5fVZskvVwkXIsbx4NFwaT8kt38r7e9cyDWscG3z2Zn40POviZvEMrJSk+r2SgQ==" }, "node_modules/@tsconfig/node10": { "version": "1.0.9", @@ -1139,9 +1134,9 @@ "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==" }, "node_modules/@types/bn.js": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.5.tgz", - "integrity": "sha512-V46N0zwKRF5Q00AZ6hWtN0T8gGmDUaUzLWQvHFo5yThtVwK/VCenFY3wXVbOvNfajEpsTfQM4IN9k/d6gUVX3A==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.6.tgz", + "integrity": "sha512-Xh8vSwUeMKeYYrj3cX4lGQgFSF/N03r+tv4AiLl1SucqV+uTQpxRcnM8AkXKHwYP9ZPXOYXRr2KPXpVlIvqh9w==", "dependencies": { "@types/node": "*" } @@ -1578,9 +1573,9 @@ "link": true }, "node_modules/@zombienet/dsl-parser-wrapper": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/@zombienet/dsl-parser-wrapper/-/dsl-parser-wrapper-0.1.10.tgz", - "integrity": "sha512-2r2SjanMcNTQiiwTtj/TRO89ek4KoIKGKhgcdHm8+uXPVWuU3tIh/unN8+m51Jnm2jhCLkQQwa5aidvSC02wOg==" + "version": "0.1.11", + "resolved": "https://registry.npmjs.org/@zombienet/dsl-parser-wrapper/-/dsl-parser-wrapper-0.1.11.tgz", + "integrity": "sha512-gUDuFLMjB30ghUFWeOIP4i7S+XthPik07tkmg0EJR5Jm2WWAfHP7zaaPFGrxBFlsCwlgLlbDOLRvNfKUNMXnfg==" }, "node_modules/@zombienet/orchestrator": { "resolved": "packages/orchestrator", @@ -2220,9 +2215,9 @@ "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==" }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -2449,9 +2444,9 @@ } }, "node_modules/default-browser/node_modules/npm-run-path": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.2.0.tgz", - "integrity": "sha512-W4/tgAXFqFA0iL7fk0+uQ3g7wkL8xJmx3XdK0VGb4cHW//eZTtKGvFBBoRKVTpY7n6ze4NL9ly7rgXcHufqXKg==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", + "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", "dev": true, "dependencies": { "path-key": "^4.0.0" @@ -3366,21 +3361,6 @@ "util-deprecate": "~1.0.1" } }, - "node_modules/from2/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "node_modules/from2/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, "node_modules/fs-constants": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", @@ -3531,14 +3511,15 @@ "dev": true }, "node_modules/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" }, @@ -3732,9 +3713,9 @@ } }, "node_modules/hasown": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", - "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "dev": true, "dependencies": { "function-bind": "^1.1.2" @@ -3775,9 +3756,9 @@ } }, "node_modules/http-proxy-agent/node_modules/agent-base": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz", - "integrity": "sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", + "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", "dependencies": { "debug": "^4.3.4" }, @@ -4002,12 +3983,15 @@ } }, "node_modules/is-core-module": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", - "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", + "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", "dev": true, "dependencies": { - "hasown": "^2.0.0" + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -4353,9 +4337,9 @@ } }, "node_modules/jsdom/node_modules/agent-base": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz", - "integrity": "sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", + "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", "dependencies": { "debug": "^4.3.4" }, @@ -4364,9 +4348,9 @@ } }, "node_modules/jsdom/node_modules/https-proxy-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", - "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz", + "integrity": "sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==", "dependencies": { "agent-base": "^7.0.2", "debug": "4" @@ -4576,18 +4560,6 @@ "get-func-name": "^2.0.1" } }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/make-error": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", @@ -4665,9 +4637,9 @@ } }, "node_modules/minimatch": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", - "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -4935,18 +4907,18 @@ } }, "node_modules/nise/node_modules/@sinonjs/fake-timers/node_modules/@sinonjs/commons": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", - "integrity": "sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", "dev": true, "dependencies": { "type-detect": "4.0.8" } }, "node_modules/nock": { - "version": "13.5.4", - "resolved": "https://registry.npmjs.org/nock/-/nock-13.5.4.tgz", - "integrity": "sha512-yAyTfdeNJGGBFxWdzSKCBYxs5FxLbCg5X5Q4ets974hcQzG1+qCxvIyOo4j2Ry6MUlhWVMX4OoYDefAIIwupjw==", + "version": "13.5.5", + "resolved": "https://registry.npmjs.org/nock/-/nock-13.5.5.tgz", + "integrity": "sha512-XKYnqUrCwXC8DGG1xX4YH5yNIrlh9c065uaMZZHUoeUUINTOyt+x/G+ezYk0Ft6ExSREVIs+qBJDK503viTfFA==", "dependencies": { "debug": "^4.1.0", "json-stringify-safe": "^5.0.1", @@ -5892,23 +5864,9 @@ } }, "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "node_modules/safe-regex-test": { "version": "1.0.0", @@ -5947,13 +5905,10 @@ "optional": true }, "node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -6100,9 +6055,9 @@ } }, "node_modules/sinon/node_modules/diff": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz", - "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", + "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", "dev": true, "engines": { "node": ">=0.3.1" @@ -6118,9 +6073,9 @@ } }, "node_modules/smoldot": { - "version": "2.0.22", - "resolved": "https://registry.npmjs.org/smoldot/-/smoldot-2.0.22.tgz", - "integrity": "sha512-B50vRgTY6v3baYH6uCgL15tfaag5tcS2o/P5q1OiXcKGv1axZDfz2dzzMuIkVpyMR2ug11F6EAtQlmYBQd292g==", + "version": "2.0.26", + "resolved": "https://registry.npmjs.org/smoldot/-/smoldot-2.0.26.tgz", + "integrity": "sha512-F+qYmH4z2s2FK+CxGj8moYcd1ekSIKH8ywkdqlOz88Dat35iB1DIYL11aILN46YSGMzQW/lbJNS307zBSDN5Ig==", "optional": true, "dependencies": { "ws": "^8.8.1" @@ -6173,29 +6128,14 @@ "util-deprecate": "~1.0.1" } }, - "node_modules/stream-meter/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "node_modules/stream-meter/node_modules/string_decoder": { + "node_modules/string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, "dependencies": { "safe-buffer": "~5.1.0" } }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -6549,9 +6489,9 @@ } }, "node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==" }, "node_modules/tunnel-agent": { "version": "0.6.0", @@ -6921,12 +6861,6 @@ "node": ">=10" } }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/yaml": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.1.tgz", @@ -6998,11 +6932,11 @@ }, "packages/cli": { "name": "@zombienet/cli", - "version": "1.3.106", + "version": "1.3.116", "license": "GPL-3.0-or-later", "dependencies": { - "@zombienet/dsl-parser-wrapper": "^0.1.10", - "@zombienet/orchestrator": "^0.0.87", + "@zombienet/dsl-parser-wrapper": "^0.1.11", + "@zombienet/orchestrator": "^0.0.97", "@zombienet/utils": "^0.0.25", "cli-progress": "^3.12.0", "commander": "^11.1.0", @@ -7024,12 +6958,12 @@ }, "packages/orchestrator": { "name": "@zombienet/orchestrator", - "version": "0.0.87", + "version": "0.0.97", "license": "GPL-3.0-or-later", "dependencies": { - "@polkadot/api": "^11.1.1", - "@polkadot/keyring": "^12.6.2", - "@polkadot/util-crypto": "^12.6.1", + "@polkadot/api": "^14.0.1", + "@polkadot/keyring": "^13.1.1", + "@polkadot/util-crypto": "^13.1.1", "@zombienet/utils": "^0.0.25", "chai": "^4.3.10", "debug": "^4.3.4", diff --git a/javascript/package.json b/javascript/package.json index bca4c80a0..904655287 100644 --- a/javascript/package.json +++ b/javascript/package.json @@ -24,7 +24,7 @@ "package:macos:arm64": "npm run -w packages/cli package:macos:arm64", "zombie": "node ./packages/cli/dist/cli.js", "test": "npm run test --workspaces --if-present", - "postinstall": "if [[ -f .husky/post-install.js ]]; then cd .. && node javascript/.husky/post-install.js; fi" + "postinstall": "bash -c 'if [[ -f .husky/post-install.js ]]; then cd .. && node javascript/.husky/post-install.js; fi'" }, "engines": { "node": ">=18" @@ -33,9 +33,6 @@ "zombienet": "./packages/cli/dist/cli.js" }, "dependencies": { - "@polkadot/keyring": "^12.6.2", - "@polkadot/util": "^12.5.1", - "@polkadot/util-crypto": "^12.5.1", "@types/chai": "^4.3.11", "chai": "^4.3.10" }, diff --git a/javascript/packages/cli/package.json b/javascript/packages/cli/package.json index b4ae0986b..856f8b815 100644 --- a/javascript/packages/cli/package.json +++ b/javascript/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@zombienet/cli", - "version": "1.3.106", + "version": "1.3.117", "description": "ZombieNet aim to be a testing framework for substrate based blockchains, providing a simple cli tool that allow users to spawn and test ephemeral Substrate based networks", "main": "dist/index.js", "scripts": { @@ -55,8 +55,8 @@ "url": "https://github.com/paritytech/zombienet/issues" }, "dependencies": { - "@zombienet/dsl-parser-wrapper": "^0.1.10", - "@zombienet/orchestrator": "^0.0.87", + "@zombienet/dsl-parser-wrapper": "^0.1.11", + "@zombienet/orchestrator": "^0.0.97", "@zombienet/utils": "^0.0.25", "cli-progress": "^3.12.0", "commander": "^11.1.0", diff --git a/javascript/packages/orchestrator/package.json b/javascript/packages/orchestrator/package.json index 496f620bc..b74593423 100644 --- a/javascript/packages/orchestrator/package.json +++ b/javascript/packages/orchestrator/package.json @@ -1,6 +1,6 @@ { "name": "@zombienet/orchestrator", - "version": "0.0.87", + "version": "0.0.97", "description": "ZombieNet aim to be a testing framework for substrate based blockchains, providing a simple cli tool that allow users to spawn and test ephemeral Substrate based networks", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -37,9 +37,9 @@ "url": "https://github.com/paritytech/zombienet/issues" }, "dependencies": { - "@polkadot/api": "^11.1.1", - "@polkadot/keyring": "^12.6.2", - "@polkadot/util-crypto": "^12.6.1", + "@polkadot/api": "^14.0.1", + "@polkadot/keyring": "^13.1.1", + "@polkadot/util-crypto": "^13.1.1", "@zombienet/utils": "^0.0.25", "chai": "^4.3.10", "debug": "^4.3.4", diff --git a/javascript/packages/orchestrator/src/chain-decorators/local-v.ts b/javascript/packages/orchestrator/src/chain-decorators/local-v.ts index 945bee69d..01b280a90 100644 --- a/javascript/packages/orchestrator/src/chain-decorators/local-v.ts +++ b/javascript/packages/orchestrator/src/chain-decorators/local-v.ts @@ -54,14 +54,10 @@ export async function addCollatorSelection(specPath: string, node: Node) { try { const chainSpec = readAndParseChainSpec(specPath); const runtimeConfig = getRuntimeConfig(chainSpec); - if (!runtimeConfig?.collatorSelection?.invulnerables) return; - const { eth_account } = node.accounts; - if (runtimeConfig.collatorSelection) - runtimeConfig.collatorSelection.invulnerables.push(eth_account.address); - if (runtimeConfig.collatorStaking) - runtimeConfig.collatorStaking.invulnerables.push(eth_account.address); + runtimeConfig?.collatorSelection?.invulnerables?.push(eth_account.address); + runtimeConfig?.collatorStaking?.invulnerables?.push(eth_account.address); new CreateLogTable({ colWidths: [30, 20, 70], diff --git a/javascript/packages/orchestrator/src/chain-decorators/mainnet-local-v.ts b/javascript/packages/orchestrator/src/chain-decorators/mainnet-local-v.ts index b5668f4b4..01b280a90 100644 --- a/javascript/packages/orchestrator/src/chain-decorators/mainnet-local-v.ts +++ b/javascript/packages/orchestrator/src/chain-decorators/mainnet-local-v.ts @@ -54,11 +54,10 @@ export async function addCollatorSelection(specPath: string, node: Node) { try { const chainSpec = readAndParseChainSpec(specPath); const runtimeConfig = getRuntimeConfig(chainSpec); - if (!runtimeConfig?.collatorSelection?.invulnerables) return; - const { eth_account } = node.accounts; - runtimeConfig.collatorSelection.invulnerables.push(eth_account.address); + runtimeConfig?.collatorSelection?.invulnerables?.push(eth_account.address); + runtimeConfig?.collatorStaking?.invulnerables?.push(eth_account.address); new CreateLogTable({ colWidths: [30, 20, 70], diff --git a/javascript/packages/orchestrator/src/metrics/index.ts b/javascript/packages/orchestrator/src/metrics/index.ts index 6142fb812..bfa411d4d 100644 --- a/javascript/packages/orchestrator/src/metrics/index.ts +++ b/javascript/packages/orchestrator/src/metrics/index.ts @@ -21,10 +21,14 @@ enum metricKeysMapping { PeersCount = "sub_libp2p_peers_count", } -export async function fetchMetrics(metricUri: string): Promise { +export async function fetchMetrics( + metricUri: string, + node_name = "", +): Promise { let metrics = {}; // empty by default + const debug_msg = node_name ? `[${node_name}]` : ""; try { - debug(`fetching: ${metricUri}`); + debug([debug_msg, `fetching: ${metricUri}`].join(" ")); const fetchResult = await fetch(metricUri, { signal: TimeoutAbortController(2).signal, method: "GET", @@ -34,6 +38,9 @@ export async function fetchMetrics(metricUri: string): Promise { }); if (!fetchResult.ok) { + debug( + [debug_msg, `fetch error - status: ${fetchResult.status}`].join(" "), + ); throw new Error(`Error - status: ${fetchResult.status}`); } @@ -43,7 +50,7 @@ export async function fetchMetrics(metricUri: string): Promise { debug(`ERR: ${err}`); console.log( `\n${decorators.red(`Error`)} \t ${decorators.bright( - `fetching metrics from: ${metricUri}`, + `fetching metrics from: ${metricUri} ${debug_msg}`, )}`, ); } diff --git a/javascript/packages/orchestrator/src/network.ts b/javascript/packages/orchestrator/src/network.ts index bf437a33e..6b3732fe6 100644 --- a/javascript/packages/orchestrator/src/network.ts +++ b/javascript/packages/orchestrator/src/network.ts @@ -162,16 +162,25 @@ export class Network { async dumpLogs(showLogPath = true): Promise { const logsPath = this.tmpDir + "/logs"; // create dump directory in local temp - if (!fs.existsSync(logsPath)) fs.mkdirSync(logsPath); + try { + await fs.promises.access( + logsPath, + fs.promises.constants.R_OK | fs.promises.constants.W_OK, + ); + } catch { + // create dir + await fs.promises.mkdir(logsPath); + } + const paraNodes: NetworkNode[] = Object.values(this.paras).reduce( (memo: NetworkNode[], value) => memo.concat(value.nodes), [], ); - const dumpsPromises = this.relay.concat(paraNodes).map((node) => { - this.client.dumpLogs(this.tmpDir, node.name); - }); - await Promise.allSettled(dumpsPromises); + const dumpsNodes = this.relay.concat(paraNodes); + await Promise.allSettled( + dumpsNodes.map((node) => this.client.dumpLogs(this.tmpDir, node.name)), + ); if (showLogPath) new CreateLogTable({ colWidths: [20, 100] }).pushToPrint([ diff --git a/javascript/packages/orchestrator/src/networkNode.ts b/javascript/packages/orchestrator/src/networkNode.ts index 38156acb9..09634a1be 100644 --- a/javascript/packages/orchestrator/src/networkNode.ts +++ b/javascript/packages/orchestrator/src/networkNode.ts @@ -233,7 +233,9 @@ export class NetworkNode implements NetworkNodeInterface { desiredMetricValue === null || compare(comparator!, value, desiredMetricValue) ) { - debug(`value: ${value} ~ desiredMetricValue: ${desiredMetricValue}`); + debug( + `[${this.name}] value: ${value} ~ desiredMetricValue: ${desiredMetricValue}`, + ); return value; } } @@ -244,7 +246,9 @@ export class NetworkNode implements NetworkNodeInterface { while (!done && !timedout) { c++; await new Promise((resolve) => setTimeout(resolve, 1000)); - debug(`fetching metrics - q: ${c} time: ${new Date()}`); + debug( + `[${this.name}] Fetching metrics - q: ${c} time: ${new Date()}`, + ); this.cachedMetrics = await fetchMetrics(this.prometheusUri); value = this._getMetric(metricName, desiredMetricValue === null); @@ -256,7 +260,7 @@ export class NetworkNode implements NetworkNodeInterface { done = true; } else { debug( - `current value: ${value} for metric ${rawMetricName}, keep trying...`, + `[${this.name}] Current value: ${value} for metric ${rawMetricName}, keep trying...`, ); } } @@ -268,7 +272,7 @@ export class NetworkNode implements NetworkNodeInterface { setTimeout(() => { timedout = true; const err = new Error( - `Timeout(${timeout}), "getting desired metric value ${desiredMetricValue} within ${timeout} secs".`, + `[${this.name}] Timeout(${timeout}), "getting desired metric value ${desiredMetricValue} within ${timeout} secs".`, ); return resolve(err); }, timeout * 1000), @@ -437,16 +441,16 @@ export class NetworkNode implements NetworkNodeInterface { desiredMetricValue: number, timeout: number = DEFAULT_INDIVIDUAL_TEST_TIMEOUT, ): Promise { + let total_count = 0; try { - let total_count = 0; const re = isGlob ? makeRe(pattern) : new RegExp(pattern, "ig"); if (!re) throw new Error(`Invalid glob pattern: ${pattern} `); const client = getClient(); - const getValue = async (): Promise => { + const getValue = async (): Promise => { let done = false; while (!done) { - let value = 0; + let counter = 0; const logs = await client.getNodeLogs(this.name, undefined, true); for (let line of logs.split("\n")) { @@ -455,20 +459,17 @@ export class NetworkNode implements NetworkNodeInterface { line = line.split(" ").slice(1).join(" "); } if (re.test(line)) { - value += 1; + counter += 1; } } - // save to return - total_count = value; - if (compare(comparator, value, desiredMetricValue)) { + total_count = counter; + if (compare(comparator, counter, desiredMetricValue)) { done = true; } else { await new Promise((resolve) => setTimeout(resolve, 1000)); } } - - return total_count; }; const resp = await Promise.race([ @@ -495,7 +496,7 @@ export class NetworkNode implements NetworkNodeInterface { err?.message, )}\n`, ); - return 0; + return total_count; } } diff --git a/javascript/packages/orchestrator/src/providers/client.ts b/javascript/packages/orchestrator/src/providers/client.ts index 94785c963..70c0a364a 100644 --- a/javascript/packages/orchestrator/src/providers/client.ts +++ b/javascript/packages/orchestrator/src/providers/client.ts @@ -74,6 +74,7 @@ export abstract class Client { keystore?: string, chainSpecId?: string, dbSnapshot?: string, //delay?: DelayNetworkSettings, + longRunning?: boolean, ): Promise; abstract copyFileFromPod( identifier: string, diff --git a/javascript/packages/orchestrator/src/providers/k8s/kubeClient.ts b/javascript/packages/orchestrator/src/providers/k8s/kubeClient.ts index 5842584b4..c0e7a34d6 100644 --- a/javascript/packages/orchestrator/src/providers/k8s/kubeClient.ts +++ b/javascript/packages/orchestrator/src/providers/k8s/kubeClient.ts @@ -63,6 +63,7 @@ export class KubeClient extends Client { remoteDir: string; dataDir: string; inCI: boolean; + fileServerIP?: string; constructor(configPath: string, namespace: string, tmpDir: string) { super(configPath, namespace, tmpDir, "kubectl", "kubernetes"); @@ -120,6 +121,7 @@ export class KubeClient extends Client { keystore?: string, chainSpecId?: string, dbSnapshot?: string, + longRunning?: boolean, ): Promise { const name = podDef.metadata.name; writeLocalJsonFile(this.tmpDir, `${name}.json`, podDef); @@ -229,6 +231,15 @@ export class KubeClient extends Client { await this.putLocalMagicFile(name); await this.waitPodReady(name); + if (longRunning) + await this.runCommand([ + "wait", + "--for=condition=Ready", + // wait for 5 mins in case we need to spin a new vm + "--timeout=300s", + `Pod/${name}`, + ]); + logTable = new CreateLogTable({ colWidths: [20, 100], }); @@ -449,13 +460,11 @@ export class KubeClient extends Client { // download the file in the container const args = ["exec", identifier]; if (container) args.push("-c", container); - let extraArgs = [ - "--", - "/usr/bin/wget", - "-O", - podFilePath, - `http://fileserver/${fileHash}`, - ]; + const url = this.fileServerIP + ? `http://${this.fileServerIP}/${fileHash}` + : `http://fileserver/${fileHash}`; + + let extraArgs = ["--", "/usr/bin/wget", "-O", podFilePath, url]; debug("copyFileToPodFromFileServer", [...args, ...extraArgs]); let result = await this.runCommand([...args, ...extraArgs]); debug(result); @@ -566,14 +575,25 @@ export class KubeClient extends Client { xinfra, }); debug("waiting for pod: fileserver, to be ready"); + await this.runCommand([ + "wait", + "--for=condition=Ready", + // wait for 5 mins in case we need to spin a new vm + "--timeout=300s", + "Pod/fileserver", + ]); await this.waitPodReady("fileserver"); debug("pod: fileserver, ready"); let fileServerOk = false; let attempts = 0; // try 5 times at most for (attempts; attempts < 5; attempts++) { - if (await this.checkFileServer()) fileServerOk = true; - else sleep(1 * 1000); + if (await this.checkFileServer()) { + fileServerOk = true; + break; // ready to go! + } else { + sleep(1 * 1000); + } } if (!fileServerOk) @@ -581,6 +601,9 @@ export class KubeClient extends Client { `Can't connect to fileServer, after ${attempts} attempts`, ); + // store the fileserver ip + this.fileServerIP = await this.getNodeIP("fileserver"); + // ensure baseline resources if we are running in CI if (process.env.RUN_IN_CONTAINER === "1") await this.createStaticResource( @@ -750,6 +773,7 @@ export class KubeClient extends Client { // We should read it from host filesystem to ensure we are reading all the logs. // First get the logs files to check if we need to read from disk or not + debugLogs("getting logFiles for:", podName); const logFiles = await this.gzippedLogFiles(podName); debugLogs("logFiles", logFiles); let logs = ""; @@ -850,7 +874,7 @@ export class KubeClient extends Client { return result.stdout.split(","); } - async dumpLogs(path: string, podName: string) { + async dumpLogs(path: string, podName: string): Promise { const dstFileName = `${path}/logs/${podName}.log`; const logs = await this.getNodeLogs(podName); await fs.writeFile(dstFileName, logs); diff --git a/javascript/packages/orchestrator/src/providers/k8s/resources/bootNodeResource.ts b/javascript/packages/orchestrator/src/providers/k8s/resources/bootNodeResource.ts index 1ad5cceb5..9e3bf92e7 100644 --- a/javascript/packages/orchestrator/src/providers/k8s/resources/bootNodeResource.ts +++ b/javascript/packages/orchestrator/src/providers/k8s/resources/bootNodeResource.ts @@ -23,6 +23,7 @@ export class BootNodeResource extends NodeResource { "zombie-role": ZombieRole.BootNode, app: "zombienet", "x-infra-instance": process.env.X_INFRA_INSTANCE || "ondemand", + "managed-by": "zombienet", }, }, spec: { diff --git a/javascript/packages/orchestrator/src/providers/k8s/resources/nodeResource.ts b/javascript/packages/orchestrator/src/providers/k8s/resources/nodeResource.ts index 5d54c47e8..068e08a85 100644 --- a/javascript/packages/orchestrator/src/providers/k8s/resources/nodeResource.ts +++ b/javascript/packages/orchestrator/src/providers/k8s/resources/nodeResource.ts @@ -203,6 +203,7 @@ export class NodeResource { "app.kubernetes.io/name": this.namespace, "app.kubernetes.io/instance": name, "x-infra-instance": process.env.X_INFRA_INSTANCE || "ondemand", + "managed-by": "zombienet", }, annotations: { "prometheus.io/scrape": "true", diff --git a/javascript/packages/orchestrator/src/providers/k8s/resources/types.ts b/javascript/packages/orchestrator/src/providers/k8s/resources/types.ts index 327750872..b48d24df9 100644 --- a/javascript/packages/orchestrator/src/providers/k8s/resources/types.ts +++ b/javascript/packages/orchestrator/src/providers/k8s/resources/types.ts @@ -42,6 +42,7 @@ export interface Labels { "app.kubernetes.io/name": string; "app.kubernetes.io/instance": string; "x-infra-instance": string; + "managed-by": string; } export interface Annotations { diff --git a/javascript/packages/orchestrator/src/spawner.ts b/javascript/packages/orchestrator/src/spawner.ts index f86a5b478..1d4cc7125 100644 --- a/javascript/packages/orchestrator/src/spawner.ts +++ b/javascript/packages/orchestrator/src/spawner.ts @@ -106,6 +106,7 @@ export const spawnNode = async ( keystoreLocalDir, parachainSpecId || network.chainId, node.dbSnapshot, + true, // long running ); const [nodeIp, nodePort] = await client.getNodeInfo(podDef.metadata.name); @@ -122,16 +123,20 @@ export const spawnNode = async ( const endpointPort = RPC_WS_PORT; if (opts.inCI) { + // UPDATE: 04-10-2024 Since we have several reports of failures related to + // can't access metrics by dns, we switch back to use the pod ip. + // in CI we deploy a service (with the pod name) in front of each pod // so here we can use the name (as short dns in the ns) to connect to pod. - const nodeDns = `${podDef.metadata.name}.${namespace}.svc.cluster.local`; + // const nodeDns = `${podDef.metadata.name}.${namespace}.svc.cluster.local`; + const pod_ip = await client.getNodeIP(node.name); networkNode = new NetworkNode( node.name, - WS_URI_PATTERN.replace("{{IP}}", nodeDns).replace( + WS_URI_PATTERN.replace("{{IP}}", pod_ip).replace( "{{PORT}}", endpointPort.toString(), ), - METRICS_URI_PATTERN.replace("{{IP}}", nodeDns).replace( + METRICS_URI_PATTERN.replace("{{IP}}", pod_ip).replace( "{{PORT}}", PROMETHEUS_PORT.toString(), ), @@ -179,6 +184,8 @@ export const spawnNode = async ( } networkNode.group = node.group; + // add the full spec + networkNode.spec = node; if (parachain) { const paraId = parachain.id; diff --git a/javascript/packages/orchestrator/src/test-runner/assertions.ts b/javascript/packages/orchestrator/src/test-runner/assertions.ts index 21ca9c357..38e8395fe 100644 --- a/javascript/packages/orchestrator/src/test-runner/assertions.ts +++ b/javascript/packages/orchestrator/src/test-runner/assertions.ts @@ -272,7 +272,9 @@ const CustomJs = ({ const call_args = custom_args ? custom_args === "" ? [] - : custom_args.split(",") + : custom_args.charAt(0) === "{" // allow to pass a single quoted json + ? JSON.parse(custom_args) + : custom_args.split(",") : []; let resolvedJsFilePath = path.resolve(configBasePath, file_path!); diff --git a/javascript/packages/orchestrator/src/test-runner/index.ts b/javascript/packages/orchestrator/src/test-runner/index.ts index f125c38b0..102996380 100644 --- a/javascript/packages/orchestrator/src/test-runner/index.ts +++ b/javascript/packages/orchestrator/src/test-runner/index.ts @@ -139,7 +139,14 @@ export async function run( debug(`\t 🕰 [Test] elapsed time: ${elapsedSecs} secs`); if (inCI) await registerTotalElapsedTimeSecs(elapsedSecs); - const logsPath = await network.dumpLogs(false); + let logsPath; + try { + logsPath = await network.dumpLogs(false); + } catch (e) { + console.log(`${decorators.red("❌ Error dumping logs!")}`); + console.log(`err: ${e}`); + } + const tests = this.test?.parent?.tests; if (tests) { @@ -154,7 +161,12 @@ export async function run( // All test passed, just remove the network console.log(`\n\t ${decorators.green("Deleting network")}`); - await network.stop(); + try { + await network.stop(); + } catch (e) { + console.log(`${decorators.yellow("⚠️ Error deleting network")}`); + console.log(`err: ${e}`); + } // show logs console.log( diff --git a/javascript/packages/orchestrator/static-configs/baseline-resources.yaml b/javascript/packages/orchestrator/static-configs/baseline-resources.yaml index 97f2efcaf..78da6d4e9 100644 --- a/javascript/packages/orchestrator/static-configs/baseline-resources.yaml +++ b/javascript/packages/orchestrator/static-configs/baseline-resources.yaml @@ -5,6 +5,6 @@ metadata: spec: limits: - defaultRequest: - memory: 256Mi + memory: 1G cpu: 0.5 type: Container diff --git a/javascript/packages/orchestrator/static-configs/namespace-network-policy.yaml b/javascript/packages/orchestrator/static-configs/namespace-network-policy.yaml index a2e043178..c3bdc799b 100644 --- a/javascript/packages/orchestrator/static-configs/namespace-network-policy.yaml +++ b/javascript/packages/orchestrator/static-configs/namespace-network-policy.yaml @@ -13,6 +13,7 @@ spec: values: - {{namespace}} - gitlab + - arc-runners - loki - tempo - monitoring diff --git a/javascript/packages/orchestrator/zombie-wrapper.sh b/javascript/packages/orchestrator/zombie-wrapper.sh index 610e7d0a1..68b2f6565 100755 --- a/javascript/packages/orchestrator/zombie-wrapper.sh +++ b/javascript/packages/orchestrator/zombie-wrapper.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -uxo pipefail if [ -f /cfg/coreutils ]; then @@ -17,6 +17,7 @@ else LS="ls" KILL="kill" SLEEP="sleep" + ECHO="echo" CAT="cat" fi diff --git a/javascript/packages/utils/src/misc.ts b/javascript/packages/utils/src/misc.ts index 45326b186..89d88338f 100644 --- a/javascript/packages/utils/src/misc.ts +++ b/javascript/packages/utils/src/misc.ts @@ -155,7 +155,7 @@ export function getFilePathNameExt(filePath: string): { export function validateImageUrl(image: string): string { const regex = - /^(?(?<=^)(?:(?(?:(?:localhost|[\w-]+(?:\.[\w-]+)+)(?::\d+)?)|[\w]+:\d+)\/)?\/?(?(?:(?:[a-z0-9]+(?:(?:[._]|__|[-]*)[a-z0-9]+)*)\/)*)(?[a-z0-9-]+))[:@]?(?(?<=:)(?[\w][\w.-]{0,127})|(?<=@)(?[A-Za-z][A-Za-z0-9]*(?:[-_+.][A-Za-z][A-Za-z0-9]*)*[:][0-9A-Fa-f]{32,}))?/gm; + /^((?<=^)(?:((?:(?:localhost|[\w-]+(?:\.[\w-]+)+)(?::\d+)?)|[\w]+:\d+)\/)?\/?((?:(?:[a-z0-9]+(?:(?:[._]|__|[-]*)[a-z0-9]+)*)\/)*)([a-z0-9-]+))[:@]?((?<=:)([\w][\w.-]{0,127})|(?<=@)([A-Za-z][A-Za-z0-9]*(?:[-_+.][A-Za-z][A-Za-z0-9]*)*[:][0-9A-Fa-f]{32,}))?/gm; if (!image.match(regex)) { throw new Error("Image's URL is invalid: `" + image + "`"); diff --git a/scripts/ci/docker/zombienet_injected.Dockerfile b/scripts/ci/docker/zombienet_injected.Dockerfile index 5a41a38fa..f60647ea7 100644 --- a/scripts/ci/docker/zombienet_injected.Dockerfile +++ b/scripts/ci/docker/zombienet_injected.Dockerfile @@ -1,4 +1,4 @@ -FROM docker.io/library/node:18-bullseye-slim +FROM docker.io/library/node:20-bullseye-slim LABEL io.parity.image.authors="devops-team@parity.io" \ io.parity.image.vendor="Parity Technologies" \ @@ -29,13 +29,14 @@ RUN gcloud components install kubectl # # Static GID/UID is also useful for chown'ing files outside the container where # such a user does not exist. -RUN groupadd --gid 10001 nonroot && \ - useradd --home-dir /home/nonroot \ - --create-home \ - --shell /bin/bash \ - --gid nonroot \ - --groups nonroot \ - --uid 10000 nonroot + +# RUN groupadd --gid 10001 nonroot && \ +# useradd --home-dir /home/nonroot \ +# --create-home \ +# --shell /bin/bash \ +# --gid nonroot \ +# --groups nonroot \ +# --uid 10000 nonroot WORKDIR /home/nonroot/zombie-net COPY javascript/packages ./packages @@ -44,7 +45,9 @@ COPY tests ./tests COPY javascript/package.json ./ COPY javascript/package-lock.json ./ RUN npm install --production -RUN chown -R nonroot. /home/nonroot +# RUN chown -R nonroot. /home/nonroot + +# RUN ls -la /home/nonroot/zombie-net/packages/cli/dist # Change `cli` permissions and link to easy call RUN chmod +x /home/nonroot/zombie-net/packages/cli/dist/cli.js @@ -52,19 +55,19 @@ RUN ln -s /home/nonroot/zombie-net/packages/cli/dist/cli.js /usr/local/bin/zombi # Dependency for run test script when run inside container RUN mkdir -p /var/log/zombie-net -RUN chown -R nonroot. /var/log/zombie-net +# RUN chown -R nonroot. /var/log/zombie-net RUN mkdir -p /etc/zombie-net -RUN chown -R nonroot. /etc/zombie-net +# RUN chown -R nonroot. /etc/zombie-net # Use the non-root user to run our application -USER nonroot +# USER nonroot # install rust -ENV RUST_VERSION=1.75.0 +ENV RUST_VERSION=1.80.0 RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain $RUST_VERSION -y ENV PATH $PATH:/home/nonroot/.cargo/bin # install nextest -RUN cargo install cargo-nextest --locked +RUN cargo install cargo-nextest --locked # Tini allows us to avoid several Docker edge cases, see https://github.com/krallin/tini. ENTRYPOINT ["tini", "--", "bash"] diff --git a/scripts/ci/run-test-env-manager.sh b/scripts/ci/run-test-env-manager.sh index 67c875ac5..960b247ff 100755 --- a/scripts/ci/run-test-env-manager.sh +++ b/scripts/ci/run-test-env-manager.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Based on https://gitlab.parity.io/parity/simnet/-/blob/master/scripts/ci/run-test-environment-manager-v2.sh diff --git a/scripts/ci/run-test-local-env-manager.sh b/scripts/ci/run-test-local-env-manager.sh index 1d32cca09..0a90eca45 100755 --- a/scripts/ci/run-test-local-env-manager.sh +++ b/scripts/ci/run-test-local-env-manager.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Based on https://gitlab.parity.io/parity/simnet/-/blob/master/scripts/ci/run-test-environment-manager-v2.sh @@ -148,8 +148,15 @@ function set_instance_env { function run_test { # RUN_IN_CONTAINER is env var that is set in the dockerfile if [[ -v RUN_IN_CONTAINER ]]; then - gcloud auth activate-service-account --key-file "${GOOGLE_CREDENTIALS}" - gcloud container clusters get-credentials parity-zombienet --zone europe-west3-b --project parity-zombienet + if [[ -v GHA_CLUSTER_SERVER_ADDR ]]; then + kubectl config set-cluster parity-zombienet --server="${GHA_CLUSTER_SERVER_ADDR}" --certificate-authority=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt + kubectl config set-credentials pod-token --token="$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)" + kubectl config set-context pod-context --cluster=parity-zombienet --user=pod-token + kubectl config use-context pod-context + else + gcloud auth activate-service-account --key-file "${GOOGLE_CREDENTIALS}" + gcloud container clusters get-credentials parity-zombienet --zone europe-west3-b --project parity-zombienet + fi; fi cd "${OUTPUT_DIR}" set -x diff --git a/tests/chaos/delay_check.sh b/tests/chaos/delay_check.sh index 2bda452f1..61083f04d 100755 --- a/tests/chaos/delay_check.sh +++ b/tests/chaos/delay_check.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash POD=$1 PORT=$2 # 9615 for prometheus diff --git a/tests/k8s/downloadPolkadot.sh b/tests/k8s/downloadPolkadot.sh index 25b2f66a0..b3e54862e 100644 --- a/tests/k8s/downloadPolkadot.sh +++ b/tests/k8s/downloadPolkadot.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -euxo pipefail diff --git a/tests/smoke/0001-custom-json.js b/tests/smoke/0001-custom-json.js new file mode 100644 index 000000000..b4002c5c8 --- /dev/null +++ b/tests/smoke/0001-custom-json.js @@ -0,0 +1,20 @@ +async function run(nodeName, networkInfo, argObject) { + let err = false; + console.log(argObject); + if (argObject.account != "alice") { + console.log("JSON err: field name"); + err = true; + } + if (argObject.nums[1] !== 1) { + console.log("JSON err: field nums"); + err = true; + } + if (argObject.bool !== true) { + console.log("JSON err: field nums"); + err = true; + } + + if(err) throw new Error('JSON should be {"account": "alice", "nums": [0,1,2,3], "bool": true}'); +} + +module.exports = { run } \ No newline at end of file diff --git a/tests/smoke/0001-smoke.zndsl b/tests/smoke/0001-smoke.zndsl index b53c6d2cd..c47e9487d 100644 --- a/tests/smoke/0001-smoke.zndsl +++ b/tests/smoke/0001-smoke.zndsl @@ -29,6 +29,8 @@ alice: system event matches "paraId(.)*[0-9]+" within 20 seconds alice: js-script ./0001-custom.js return is greater than 1 within 200 seconds alice: js-script ./0001-custom.js within 200 seconds alice: js-script ./0001-custom.js with "alice" within 200 seconds +# json argument +alice: js-script ./0001-custom-json.js with '{"account": "alice", "nums": [0,1,2,3], "bool": true}' within 200 seconds alice: run ./0001-custom.sh within 200 seconds # Histogram assertions