Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4b9fdc918f | |||
| 3c12181da3 | |||
| 801fa8676a | |||
| 9416221361 | |||
| 27e1f8125c |
@@ -6,8 +6,6 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: arc-ubuntu-22.04
|
runs-on: arc-ubuntu-22.04
|
||||||
env:
|
|
||||||
NEXT_PUBLIC_SITE_URL: https://nym.com/docs
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
working-directory: documentation/docs
|
working-directory: documentation/docs
|
||||||
@@ -15,8 +13,10 @@ jobs:
|
|||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
- name: Install Dependencies (Linux)
|
- name: Install Dependencies (Linux)
|
||||||
run: sudo apt-get update && sudo apt-get install -y build-essential curl wget libssl-dev libudev-dev squashfs-tools protobuf-compiler git python3 && sudo apt-get update --fix-missing
|
run: sudo apt-get update && sudo apt-get install -y build-essential curl wget libssl-dev libudev-dev squashfs-tools protobuf-compiler git python3 && sudo apt-get update --fix-missing
|
||||||
|
- name: Install pip3
|
||||||
|
run: sudo apt install -y python3-pip
|
||||||
- name: Install Python3 modules
|
- name: Install Python3 modules
|
||||||
run: sudo apt install -y python3-pandas python3-tabulate
|
run: sudo pip3 install pandas tabulate
|
||||||
- name: Install rsync
|
- name: Install rsync
|
||||||
run: sudo apt-get install -y rsync
|
run: sudo apt-get install -y rsync
|
||||||
- uses: rlespinasse/github-slug-action@v3.x
|
- uses: rlespinasse/github-slug-action@v3.x
|
||||||
@@ -39,12 +39,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Install project dependencies
|
- name: Install project dependencies
|
||||||
run: pnpm i
|
run: pnpm i
|
||||||
- name: Generate llms-full.txt
|
|
||||||
run: pnpm run generate:llms
|
|
||||||
- name: Build project
|
- name: Build project
|
||||||
run: pnpm run build
|
run: pnpm run build
|
||||||
- name: Generate sitemap
|
|
||||||
run: npx next-sitemap
|
|
||||||
- name: Move files to /dist/
|
- name: Move files to /dist/
|
||||||
run: ../scripts/move-to-dist.sh
|
run: ../scripts/move-to-dist.sh
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
platform: [arc-ubuntu-22.04]
|
platform: [arc-linux-latest]
|
||||||
|
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform }}
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -1,63 +0,0 @@
|
|||||||
name: ci-build-upload-network-monitor-agent
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-and-upload:
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
platform: [arc-ubuntu-22.04]
|
|
||||||
|
|
||||||
runs-on: ${{ matrix.platform }}
|
|
||||||
env:
|
|
||||||
CARGO_TERM_COLOR: always
|
|
||||||
RUSTUP_PERMIT_COPY_RENAME: 1
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v6
|
|
||||||
|
|
||||||
- name: Prepare build output directory
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
OUTPUT_DIR: ci-builds/${{ github.ref_name }}
|
|
||||||
run: |
|
|
||||||
rm -rf ci-builds || true
|
|
||||||
mkdir -p "$OUTPUT_DIR"
|
|
||||||
|
|
||||||
- name: Install Dependencies (Linux)
|
|
||||||
run: sudo apt-get update && sudo apt-get -y install libudev-dev
|
|
||||||
|
|
||||||
- name: Install Rust toolchain
|
|
||||||
uses: dtolnay/rust-toolchain@master
|
|
||||||
with:
|
|
||||||
toolchain: ${{ vars.REQUIRED_RUSTC_VERSION }}
|
|
||||||
|
|
||||||
- name: Build nym-network-monitor-agent
|
|
||||||
shell: bash
|
|
||||||
run: cargo build -p nym-network-monitor-agent --release
|
|
||||||
|
|
||||||
- name: Upload artifact
|
|
||||||
uses: actions/upload-artifact@v6
|
|
||||||
with:
|
|
||||||
name: nym-network-monitor-agent
|
|
||||||
path: target/release/nym-network-monitor-agent
|
|
||||||
retention-days: 30
|
|
||||||
|
|
||||||
- name: Prepare build output
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
OUTPUT_DIR: ci-builds/${{ github.ref_name }}
|
|
||||||
run: cp target/release/nym-network-monitor-agent "$OUTPUT_DIR"
|
|
||||||
|
|
||||||
- name: Deploy to CI www
|
|
||||||
uses: easingthemes/ssh-deploy@main
|
|
||||||
env:
|
|
||||||
SSH_PRIVATE_KEY: ${{ secrets.CI_WWW_SSH_PRIVATE_KEY }}
|
|
||||||
ARGS: "-avzr"
|
|
||||||
SOURCE: "ci-builds/"
|
|
||||||
REMOTE_HOST: ${{ secrets.CI_WWW_REMOTE_HOST }}
|
|
||||||
REMOTE_USER: ${{ secrets.CI_WWW_REMOTE_USER }}
|
|
||||||
TARGET: ${{ secrets.CI_WWW_REMOTE_TARGET }}/builds/
|
|
||||||
EXCLUDE: "/dist/, /node_modules/"
|
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
name: ci-build-vpn-api-wasm
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- 'common/**'
|
||||||
|
- 'nym-credential-proxy/**'
|
||||||
|
- '.github/workflows/ci-build-vpn-api-wasm.yml'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
wasm:
|
||||||
|
runs-on: arc-linux-latest
|
||||||
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
RUSTUP_PERMIT_COPY_RENAME: 1
|
||||||
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
|
- name: Install Rust toolchain
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
profile: minimal
|
||||||
|
toolchain: ${{ vars.REQUIRED_RUSTC_VERSION }}
|
||||||
|
target: wasm32-unknown-unknown
|
||||||
|
override: true
|
||||||
|
components: rustfmt, clippy
|
||||||
|
|
||||||
|
- name: Install wasm-pack
|
||||||
|
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
||||||
|
|
||||||
|
- name: Install wasm-opt
|
||||||
|
uses: ./.github/actions/install-wasm-opt
|
||||||
|
with:
|
||||||
|
version: '116'
|
||||||
|
|
||||||
|
- name: Install wasm-bindgen-cli
|
||||||
|
run: cargo install wasm-bindgen-cli
|
||||||
|
|
||||||
|
- name: "Build"
|
||||||
|
run: make
|
||||||
|
working-directory: nym-credential-proxy/vpn-api-lib-wasm
|
||||||
@@ -90,7 +90,7 @@ jobs:
|
|||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: clippy
|
command: clippy
|
||||||
args: --workspace --all-targets --exclude nym-gateway-probe --exclude nym-node-status-api --exclude nym-node-status-agent --exclude nym-node-status-client -- -D warnings
|
args: --workspace --all-targets --exclude nym-gateway-probe --exclude nym-node-status-api -- -D warnings
|
||||||
|
|
||||||
- name: Clippy (non-macos)
|
- name: Clippy (non-macos)
|
||||||
if: contains(matrix.os, 'linux') || contains(matrix.os, 'windows')
|
if: contains(matrix.os, 'linux') || contains(matrix.os, 'windows')
|
||||||
@@ -104,15 +104,14 @@ jobs:
|
|||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: build
|
command: build
|
||||||
args: --workspace --exclude nym-gateway-probe --exclude nym-node-status-api --exclude nym-node-status-agent --exclude nym-node-status-client
|
|
||||||
|
|
||||||
# Build Go FFI-dependent crates separately (requires Go, only available on Linux CI)
|
# only build on linux because of wg FFI bindings of its dependency (network probe)
|
||||||
- name: Build nym-node-status-api and nym-node-status-agent (linux only)
|
- name: Build nym-node-status-api (linux only)
|
||||||
if: runner.os == 'Linux'
|
if: runner.os == 'Linux'
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: build
|
command: build
|
||||||
args: -p nym-node-status-api -p nym-node-status-agent
|
args: -p nym-node-status-api
|
||||||
|
|
||||||
- name: Build all examples
|
- name: Build all examples
|
||||||
if: contains(matrix.os, 'linux')
|
if: contains(matrix.os, 'linux')
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ jobs:
|
|||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Get version from cargo.toml
|
- name: Get version from cargo.toml
|
||||||
uses: mikefarah/yq@v4.52.4
|
uses: mikefarah/yq@v4.52.2
|
||||||
id: get_version
|
id: get_version
|
||||||
with:
|
with:
|
||||||
cmd: yq -oy '.package.version' ${{ env.WORKING_DIRECTORY }}/Cargo.toml
|
cmd: yq -oy '.package.version' ${{ env.WORKING_DIRECTORY }}/Cargo.toml
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ jobs:
|
|||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Get version from cargo.toml
|
- name: Get version from cargo.toml
|
||||||
uses: mikefarah/yq@v4.52.4
|
uses: mikefarah/yq@v4.52.2
|
||||||
id: get_version
|
id: get_version
|
||||||
with:
|
with:
|
||||||
cmd: yq -oy '.package.version' ${{ env.WORKING_DIRECTORY }}/Cargo.toml
|
cmd: yq -oy '.package.version' ${{ env.WORKING_DIRECTORY }}/Cargo.toml
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ jobs:
|
|||||||
components: rustfmt, clippy
|
components: rustfmt, clippy
|
||||||
|
|
||||||
- name: Install cosmwasm-check
|
- name: Install cosmwasm-check
|
||||||
run: cargo install cosmwasm-check --locked
|
run: cargo install cosmwasm-check
|
||||||
|
|
||||||
- name: Install wasm-opt
|
- name: Install wasm-opt
|
||||||
uses: ./.github/actions/install-wasm-opt
|
uses: ./.github/actions/install-wasm-opt
|
||||||
|
|||||||
@@ -15,9 +15,6 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
publish-dry-run:
|
publish-dry-run:
|
||||||
runs-on: arc-linux-latest
|
runs-on: arc-linux-latest
|
||||||
timeout-minutes: 35
|
|
||||||
env:
|
|
||||||
RUSTUP_PERMIT_COPY_RENAME: 1
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
@@ -62,60 +59,20 @@ jobs:
|
|||||||
- name: Bump versions (local only)
|
- name: Bump versions (local only)
|
||||||
run: |
|
run: |
|
||||||
cargo workspaces version custom ${{ inputs.version }} \
|
cargo workspaces version custom ${{ inputs.version }} \
|
||||||
|
--allow-branch ${{ github.ref_name }} \
|
||||||
--no-git-commit \
|
--no-git-commit \
|
||||||
--yes
|
|
||||||
|
|
||||||
- name: Preflight publish checks
|
|
||||||
run: |
|
|
||||||
python3 tools/internal/check_publish_preflight.py
|
|
||||||
|
|
||||||
# Dry run may show cascading dependency errors because packages aren't
|
# Dry run may show cascading dependency errors because packages aren't
|
||||||
# actually uploaded - these are expected and ignored. We check for real
|
# actually uploaded - these are expected and ignored. We check for real
|
||||||
# errors like packaging failures, missing metadata, or invalid Cargo.toml.
|
# errors like packaging failures, missing metadata, or invalid Cargo.toml.
|
||||||
- name: Publish (dry run)
|
- name: Publish (dry run)
|
||||||
run: |
|
run: |
|
||||||
set +e
|
output=$(cargo workspaces publish --dry-run --allow-dirty 2>&1) || true
|
||||||
publish_status=1
|
echo "$output"
|
||||||
max_attempts=2
|
|
||||||
attempt=1
|
|
||||||
rm -f /tmp/publish-dry-run.log
|
|
||||||
|
|
||||||
while [ "$attempt" -le "$max_attempts" ]; do
|
# Check for real errors (not cascading dependency errors)
|
||||||
echo "Dry-run publish attempt ${attempt}/${max_attempts}"
|
# Cascading errors mention "crates.io index", real errors mention "Cargo.toml"
|
||||||
cargo workspaces publish --dry-run --allow-dirty 2>&1 | tee /tmp/publish-dry-run.log
|
echo "$output" | grep -i "Cargo.toml" && exit 1 || true
|
||||||
publish_status=${PIPESTATUS[0]}
|
|
||||||
|
|
||||||
if [ "$publish_status" -eq 0 ]; then
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Retry once for interruption/runner issues.
|
|
||||||
if [ "$attempt" -lt "$max_attempts" ] && \
|
|
||||||
{ [ "$publish_status" -eq 130 ] || [ "$publish_status" -eq 137 ]; }; then
|
|
||||||
echo "Publish dry-run interrupted (exit ${publish_status}), retrying in 10s..."
|
|
||||||
sleep 10
|
|
||||||
attempt=$((attempt + 1))
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
break
|
|
||||||
done
|
|
||||||
set -e
|
|
||||||
|
|
||||||
if grep -Eiq \
|
|
||||||
"failed to verify manifest|failed to parse manifest|invalid Cargo.toml|error: package .* has no (description|license|repository)" \
|
|
||||||
/tmp/publish-dry-run.log; then
|
|
||||||
echo "Detected real packaging/manifest errors"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# In dry-run mode, non-zero publish status is expected due to
|
|
||||||
# dependency-cascade failures against crates.io index.
|
|
||||||
if [ "$publish_status" -ne 0 ]; then
|
|
||||||
echo "Dry-run publish returned non-zero (${publish_status}) but no real manifest blockers were detected."
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Only expected dry-run dependency cascade errors detected (if any)."
|
|
||||||
|
|
||||||
# Show the list of packages published
|
# Show the list of packages published
|
||||||
- name: Show package versions
|
- name: Show package versions
|
||||||
|
|||||||
@@ -17,8 +17,6 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
publish:
|
publish:
|
||||||
runs-on: arc-linux-latest
|
runs-on: arc-linux-latest
|
||||||
env:
|
|
||||||
RUSTUP_PERMIT_COPY_RENAME: 1
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
|
|||||||
@@ -17,8 +17,6 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
publish:
|
publish:
|
||||||
runs-on: arc-linux-latest
|
runs-on: arc-linux-latest
|
||||||
env:
|
|
||||||
RUSTUP_PERMIT_COPY_RENAME: 1
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
|
|||||||
@@ -15,11 +15,8 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
version-bump:
|
version-bump:
|
||||||
runs-on: arc-linux-latest
|
runs-on: arc-linux-latest
|
||||||
env:
|
|
||||||
RUSTUP_PERMIT_COPY_RENAME: 1
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
pull-requests: write
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
@@ -67,20 +64,11 @@ jobs:
|
|||||||
--no-git-commit \
|
--no-git-commit \
|
||||||
--yes
|
--yes
|
||||||
|
|
||||||
- name: Create pull request
|
- name: Commit and push version bump
|
||||||
uses: peter-evans/create-pull-request@v7
|
run: |
|
||||||
with:
|
git add -A
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
git commit -m "crates release: bump version to ${{ inputs.version }}"
|
||||||
branch: "chore/bump-version-${{ inputs.version }}"
|
git push
|
||||||
base: ${{ github.ref_name }}
|
|
||||||
commit-message: "crates release: bump version to ${{ inputs.version }}"
|
|
||||||
title: "chore: bump crate versions to ${{ inputs.version }}"
|
|
||||||
body: |
|
|
||||||
Automated version bump from `${{ steps.current_version.outputs.version }}` → `${{ inputs.version }}`.
|
|
||||||
|
|
||||||
Triggered by @${{ github.actor }} via workflow dispatch.
|
|
||||||
labels: "automated, crates-version-bump"
|
|
||||||
delete-branch: true
|
|
||||||
|
|
||||||
- name: Show package versions
|
- name: Show package versions
|
||||||
run: cargo workspaces list --long
|
run: cargo workspaces list --long
|
||||||
|
|||||||
@@ -6,8 +6,6 @@ on:
|
|||||||
branches-ignore: [master]
|
branches-ignore: [master]
|
||||||
paths:
|
paths:
|
||||||
- "documentation/docs/**"
|
- "documentation/docs/**"
|
||||||
- "sdk/typescript/packages/sdk/src/**"
|
|
||||||
- "sdk/typescript/packages/mix-fetch/src/**"
|
|
||||||
- ".github/workflows/ci-docs.yml"
|
- ".github/workflows/ci-docs.yml"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -22,8 +20,10 @@ jobs:
|
|||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
- name: Install Dependencies (Linux)
|
- name: Install Dependencies (Linux)
|
||||||
run: sudo apt-get update && sudo apt-get install -y build-essential curl wget libssl-dev libudev-dev squashfs-tools protobuf-compiler git python3 && sudo apt-get update --fix-missing
|
run: sudo apt-get update && sudo apt-get install -y build-essential curl wget libssl-dev libudev-dev squashfs-tools protobuf-compiler git python3 && sudo apt-get update --fix-missing
|
||||||
|
- name: Install pip3
|
||||||
|
run: sudo apt install -y python3-pip
|
||||||
- name: Install Python3 modules
|
- name: Install Python3 modules
|
||||||
run: sudo apt install -y python3-pandas python3-tabulate
|
run: sudo pip3 install pandas tabulate
|
||||||
- name: Install rsync
|
- name: Install rsync
|
||||||
run: sudo apt-get install -y rsync
|
run: sudo apt-get install -y rsync
|
||||||
- uses: rlespinasse/github-slug-action@v3.x
|
- uses: rlespinasse/github-slug-action@v3.x
|
||||||
@@ -44,31 +44,10 @@ jobs:
|
|||||||
command: build
|
command: build
|
||||||
args: --workspace --release
|
args: --workspace --release
|
||||||
|
|
||||||
- name: Check if TypeScript SDK source changed
|
|
||||||
id: check-ts-sdk
|
|
||||||
run: |
|
|
||||||
if git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -qE '^sdk/typescript/packages/(sdk|mix-fetch)/src/'; then
|
|
||||||
echo "changed=true" >> $GITHUB_OUTPUT
|
|
||||||
else
|
|
||||||
echo "changed=false" >> $GITHUB_OUTPUT
|
|
||||||
fi
|
|
||||||
working-directory: ${{ github.workspace }}
|
|
||||||
|
|
||||||
- name: Regenerate TypeDoc API reference
|
|
||||||
if: steps.check-ts-sdk.outputs.changed == 'true'
|
|
||||||
run: |
|
|
||||||
npm install -g typedoc@0.25.13 typedoc-plugin-markdown@4.0.3
|
|
||||||
cd ${{ github.workspace }}/sdk/typescript/packages/sdk && typedoc --skipErrorChecking
|
|
||||||
cd ${{ github.workspace }}/sdk/typescript/packages/mix-fetch && typedoc --skipErrorChecking
|
|
||||||
|
|
||||||
- name: Install project dependencies
|
- name: Install project dependencies
|
||||||
run: pnpm i
|
run: pnpm i
|
||||||
- name: Generate llms-full.txt
|
|
||||||
run: pnpm run generate:llms
|
|
||||||
- name: Build project
|
- name: Build project
|
||||||
run: pnpm run build
|
run: pnpm run build
|
||||||
- name: Generate sitemap
|
|
||||||
run: npx next-sitemap
|
|
||||||
- name: Move files to /dist/
|
- name: Move files to /dist/
|
||||||
run: ../scripts/move-to-dist.sh
|
run: ../scripts/move-to-dist.sh
|
||||||
|
|
||||||
|
|||||||
@@ -1,41 +0,0 @@
|
|||||||
name: ci-nym-wallet-frontend
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- 'nym-wallet/**'
|
|
||||||
- '.github/workflows/ci-nym-wallet-frontend.yml'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
types-lint:
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v6
|
|
||||||
|
|
||||||
- uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version-file: nym-wallet/.nvmrc
|
|
||||||
cache: yarn
|
|
||||||
cache-dependency-path: yarn.lock
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: yarn install --network-timeout 100000
|
|
||||||
|
|
||||||
- name: Build TypeScript packages (wallet depends on @nymproject/types, etc.)
|
|
||||||
run: yarn build:types
|
|
||||||
|
|
||||||
- name: Build @nymproject/mui-theme and @nymproject/react (wallet imports subpaths)
|
|
||||||
run: yarn build:packages
|
|
||||||
|
|
||||||
- name: Typecheck nym-wallet
|
|
||||||
run: yarn --cwd nym-wallet tsc
|
|
||||||
|
|
||||||
- name: Lint nym-wallet
|
|
||||||
run: yarn --cwd nym-wallet lint
|
|
||||||
|
|
||||||
- name: Yarn audit (workspace lockfile; informational)
|
|
||||||
run: yarn audit --level critical
|
|
||||||
continue-on-error: true
|
|
||||||
|
|
||||||
- name: Unit tests (nym-wallet)
|
|
||||||
run: yarn --cwd nym-wallet test
|
|
||||||
@@ -41,9 +41,6 @@ jobs:
|
|||||||
sed -i.bak '1s/^/\[profile.dev\]\ndebug = false\n\n/' Cargo.toml
|
sed -i.bak '1s/^/\[profile.dev\]\ndebug = false\n\n/' Cargo.toml
|
||||||
git diff
|
git diff
|
||||||
|
|
||||||
- name: Ensure nym-wallet/dist exists for Tauri
|
|
||||||
run: mkdir -p nym-wallet/dist
|
|
||||||
|
|
||||||
- name: Build all binaries
|
- name: Build all binaries
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
@@ -74,16 +71,3 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
command: clippy
|
command: clippy
|
||||||
args: --manifest-path nym-wallet/Cargo.toml --workspace --all-features --all-targets -- -D warnings
|
args: --manifest-path nym-wallet/Cargo.toml --workspace --all-features --all-targets -- -D warnings
|
||||||
|
|
||||||
- name: Install cargo-audit
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: install
|
|
||||||
args: cargo-audit --locked
|
|
||||||
|
|
||||||
- name: Cargo audit (nym-wallet workspace)
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: audit
|
|
||||||
working-directory: nym-wallet
|
|
||||||
continue-on-error: true
|
|
||||||
|
|||||||
@@ -0,0 +1,75 @@
|
|||||||
|
name: ci-nym-wallet-storybook
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- 'nym-wallet/**'
|
||||||
|
- '.github/workflows/ci-nym-wallet-storybook.yml'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: arc-linux-latest-dind
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v6
|
||||||
|
|
||||||
|
- name: Install rsync
|
||||||
|
run: sudo apt-get install rsync
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
- uses: rlespinasse/github-slug-action@v3.x
|
||||||
|
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 20
|
||||||
|
|
||||||
|
- name: Setup yarn
|
||||||
|
run: npm install -g yarn
|
||||||
|
|
||||||
|
- name: Install Rust toolchain
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: ${{ vars.REQUIRED_RUSTC_VERSION }}
|
||||||
|
|
||||||
|
- name: Install wasm-pack
|
||||||
|
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
||||||
|
|
||||||
|
- name: Build dependencies
|
||||||
|
run: yarn && yarn build
|
||||||
|
|
||||||
|
- name: Build storybook
|
||||||
|
run: yarn storybook:build
|
||||||
|
working-directory: ./nym-wallet
|
||||||
|
|
||||||
|
- name: Deploy branch to CI www (storybook)
|
||||||
|
continue-on-error: true
|
||||||
|
uses: easingthemes/ssh-deploy@main
|
||||||
|
env:
|
||||||
|
SSH_PRIVATE_KEY: ${{ secrets.CI_WWW_SSH_PRIVATE_KEY }}
|
||||||
|
ARGS: "-rltgoDzvO --delete"
|
||||||
|
SOURCE: "nym-wallet/storybook-static/"
|
||||||
|
REMOTE_HOST: ${{ secrets.CI_WWW_REMOTE_HOST }}
|
||||||
|
REMOTE_USER: ${{ secrets.CI_WWW_REMOTE_USER }}
|
||||||
|
TARGET: ${{ secrets.CI_WWW_REMOTE_TARGET }}/wallet-${{ env.GITHUB_REF_SLUG }}
|
||||||
|
EXCLUDE: "/dist/, /node_modules/"
|
||||||
|
|
||||||
|
- name: Matrix - Node Install
|
||||||
|
run: npm install
|
||||||
|
working-directory: .github/workflows/support-files
|
||||||
|
|
||||||
|
- name: Matrix - Send Notification
|
||||||
|
env:
|
||||||
|
NYM_NOTIFICATION_KIND: nym-wallet
|
||||||
|
NYM_PROJECT_NAME: "nym-wallet"
|
||||||
|
NYM_CI_WWW_BASE: "${{ secrets.NYM_CI_WWW_BASE }}"
|
||||||
|
NYM_CI_WWW_LOCATION: "wallet-${{ env.GITHUB_REF_SLUG }}"
|
||||||
|
GIT_COMMIT_MESSAGE: "${{ github.event.head_commit.message }}"
|
||||||
|
GIT_BRANCH: "${GITHUB_REF##*/}"
|
||||||
|
IS_SUCCESS: "${{ job.status == 'success' }}"
|
||||||
|
MATRIX_SERVER: "${{ secrets.MATRIX_SERVER }}"
|
||||||
|
MATRIX_ROOM: "${{ secrets.MATRIX_ROOM }}"
|
||||||
|
MATRIX_USER_ID: "${{ secrets.MATRIX_USER_ID }}"
|
||||||
|
MATRIX_TOKEN: "${{ secrets.MATRIX_TOKEN }}"
|
||||||
|
MATRIX_DEVICE_ID: "${{ secrets.MATRIX_DEVICE_ID }}"
|
||||||
|
uses: docker://keybaseio/client:stable-node
|
||||||
|
with:
|
||||||
|
args: .github/workflows/support-files/notifications/entry_point.sh
|
||||||
@@ -8,7 +8,7 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
sonarqube:
|
sonarqube:
|
||||||
name: SonarQube
|
name: SonarQube
|
||||||
runs-on: arc-linux-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -2,14 +2,16 @@ name: nightly-build
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
- cron: '14 1 * * *'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
rust: [ stable, beta ]
|
rust: [stable, beta]
|
||||||
os: [ ubuntu-22.04, windows-latest, macos-latest ]
|
os: [ubuntu-22.04, windows-latest, macos-latest]
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
@@ -91,3 +93,38 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
command: clippy
|
command: clippy
|
||||||
args: --workspace --all-targets -- -D warnings
|
args: --workspace --all-targets -- -D warnings
|
||||||
|
|
||||||
|
notification:
|
||||||
|
needs: build
|
||||||
|
runs-on: custom-linux
|
||||||
|
steps:
|
||||||
|
- name: Collect jobs status
|
||||||
|
uses: technote-space/workflow-conclusion-action@v3
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
- name: install npm
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
if: env.WORKFLOW_CONCLUSION == 'failure'
|
||||||
|
with:
|
||||||
|
node-version: 20
|
||||||
|
- name: Matrix - Node Install
|
||||||
|
if: env.WORKFLOW_CONCLUSION == 'failure'
|
||||||
|
run: npm install
|
||||||
|
working-directory: .github/workflows/support-files
|
||||||
|
- name: Matrix - Send Notification
|
||||||
|
if: env.WORKFLOW_CONCLUSION == 'failure'
|
||||||
|
env:
|
||||||
|
NYM_NOTIFICATION_KIND: nightly
|
||||||
|
NYM_PROJECT_NAME: "Nym nightly build"
|
||||||
|
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
|
GIT_COMMIT_MESSAGE: "${{ github.event.head_commit.message }}"
|
||||||
|
GIT_BRANCH: "${GITHUB_REF##*/}"
|
||||||
|
IS_SUCCESS: "${{ env.WORKFLOW_CONCLUSION == 'success' }}"
|
||||||
|
MATRIX_SERVER: "${{ secrets.MATRIX_SERVER }}"
|
||||||
|
MATRIX_ROOM: "${{ secrets.MATRIX_ROOM_NIGHTLY }}"
|
||||||
|
MATRIX_USER_ID: "${{ secrets.MATRIX_USER_ID }}"
|
||||||
|
MATRIX_TOKEN: "${{ secrets.MATRIX_TOKEN }}"
|
||||||
|
MATRIX_DEVICE_ID: "${{ secrets.MATRIX_DEVICE_ID }}"
|
||||||
|
uses: docker://keybaseio/client:stable-node
|
||||||
|
with:
|
||||||
|
args: .github/workflows/support-files/notifications/entry_point.sh
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ ubuntu-22.04, macos-latest, windows-latest ]
|
os: [ubuntu-22.04, macos-latest, windows-latest]
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
@@ -21,7 +21,7 @@ jobs:
|
|||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Install Dependencies (Linux)
|
- name: Install Dependencies (Linux)
|
||||||
run: sudo apt-get update && sudo apt-get install -y libwebkit2gtk-4.1-dev build-essential curl wget libssl-dev libgtk-3-dev squashfs-tools libsoup-3.0-dev libjavascriptcoregtk-4.1-dev
|
run: sudo apt-get update && sudo apt-get install -y libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev squashfs-tools
|
||||||
if: matrix.os == 'ubuntu-22.04'
|
if: matrix.os == 'ubuntu-22.04'
|
||||||
|
|
||||||
- name: Install rust toolchain
|
- name: Install rust toolchain
|
||||||
@@ -55,3 +55,38 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
command: clippy
|
command: clippy
|
||||||
args: ${{ env.MANIFEST_PATH }} --workspace --all-targets -- -D warnings
|
args: ${{ env.MANIFEST_PATH }} --workspace --all-targets -- -D warnings
|
||||||
|
|
||||||
|
notification:
|
||||||
|
needs: build
|
||||||
|
runs-on: custom-linux
|
||||||
|
steps:
|
||||||
|
- name: Collect jobs status
|
||||||
|
uses: technote-space/workflow-conclusion-action@v3
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
- name: install npm
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
if: env.WORKFLOW_CONCLUSION == 'failure'
|
||||||
|
with:
|
||||||
|
node-version: 20
|
||||||
|
- name: Matrix - Node Install
|
||||||
|
if: env.WORKFLOW_CONCLUSION == 'failure'
|
||||||
|
run: npm install
|
||||||
|
working-directory: .github/workflows/support-files
|
||||||
|
- name: Matrix - Send Notification
|
||||||
|
if: env.WORKFLOW_CONCLUSION == 'failure'
|
||||||
|
env:
|
||||||
|
NYM_NOTIFICATION_KIND: nightly
|
||||||
|
NYM_PROJECT_NAME: "nym-wallet-nightly-build"
|
||||||
|
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
|
GIT_COMMIT_MESSAGE: "${{ github.event.head_commit.message }}"
|
||||||
|
GIT_BRANCH: "${GITHUB_REF##*/}"
|
||||||
|
IS_SUCCESS: "${{ env.WORKFLOW_CONCLUSION == 'success' }}"
|
||||||
|
MATRIX_SERVER: "${{ secrets.MATRIX_SERVER }}"
|
||||||
|
MATRIX_ROOM: "${{ secrets.MATRIX_ROOM_NIGHTLY }}"
|
||||||
|
MATRIX_USER_ID: "${{ secrets.MATRIX_USER_ID }}"
|
||||||
|
MATRIX_TOKEN: "${{ secrets.MATRIX_TOKEN }}"
|
||||||
|
MATRIX_DEVICE_ID: "${{ secrets.MATRIX_DEVICE_ID }}"
|
||||||
|
uses: docker://keybaseio/client:stable-node
|
||||||
|
with:
|
||||||
|
args: .github/workflows/support-files/notifications/entry_point.sh
|
||||||
|
|||||||
@@ -24,3 +24,34 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: report
|
name: report
|
||||||
path: .github/workflows/support-files/notifications/deny.message
|
path: .github/workflows/support-files/notifications/deny.message
|
||||||
|
notification:
|
||||||
|
needs: cargo-deny
|
||||||
|
runs-on: custom-linux
|
||||||
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
- name: Download report from previous job
|
||||||
|
uses: actions/download-artifact@v7
|
||||||
|
with:
|
||||||
|
name: report
|
||||||
|
path: .github/workflows/support-files/notifications
|
||||||
|
- name: install npm
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 20
|
||||||
|
- name: Matrix - Node Install
|
||||||
|
run: npm install
|
||||||
|
working-directory: .github/workflows/support-files
|
||||||
|
- name: Matrix - Send Notification
|
||||||
|
env:
|
||||||
|
NYM_NOTIFICATION_KIND: security
|
||||||
|
NYM_PROJECT_NAME: "Daily security report"
|
||||||
|
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
|
MATRIX_SERVER: "${{ secrets.MATRIX_SERVER }}"
|
||||||
|
MATRIX_ROOM: "${{ secrets.MATRIX_ROOM_AUDIT }}"
|
||||||
|
MATRIX_USER_ID: "${{ secrets.MATRIX_USER_ID }}"
|
||||||
|
MATRIX_TOKEN: "${{ secrets.MATRIX_TOKEN }}"
|
||||||
|
MATRIX_DEVICE_ID: "${{ secrets.MATRIX_DEVICE_ID }}"
|
||||||
|
uses: docker://keybaseio/client:stable-node
|
||||||
|
with:
|
||||||
|
args: .github/workflows/support-files/notifications/entry_point.sh
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
integration-tests:
|
integration-tests:
|
||||||
runs-on: arc-linux-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
API_BASE_URL: http://localhost:8000
|
API_BASE_URL: http://localhost:8000
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
check-milestone:
|
check-milestone:
|
||||||
name: Check Milestone
|
name: Check Milestone
|
||||||
runs-on: arc-linux-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- if: github.event.pull_request.milestone == null && contains( env.LABELS, 'no-milestone' ) == false
|
- if: github.event.pull_request.milestone == null && contains( env.LABELS, 'no-milestone' ) == false
|
||||||
run: exit 1
|
run: exit 1
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: arc-ubuntu-22.04
|
- os: arc-linux-latest
|
||||||
target: x86_64-unknown-linux-gnu
|
target: x86_64-unknown-linux-gnu
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ jobs:
|
|||||||
- name: Node
|
- name: Node
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 22.13.0
|
node-version: 21
|
||||||
|
|
||||||
- name: Install Rust toolchain
|
- name: Install Rust toolchain
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ jobs:
|
|||||||
- name: Node
|
- name: Node
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 22.13.0
|
node-version: 21
|
||||||
cache: 'yarn'
|
cache: 'yarn'
|
||||||
|
|
||||||
- name: Install Rust toolchain
|
- name: Install Rust toolchain
|
||||||
@@ -72,41 +72,6 @@ jobs:
|
|||||||
find target/release/bundle -type d -name "*appimage*" -o -name "*AppImage*" || echo "No AppImage directories found"
|
find target/release/bundle -type d -name "*appimage*" -o -name "*AppImage*" || echo "No AppImage directories found"
|
||||||
find target/release/bundle -name "*.AppImage" -o -name "*.appimage" || echo "No AppImage files found"
|
find target/release/bundle -name "*.AppImage" -o -name "*.appimage" || echo "No AppImage files found"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Inspect AppImage (hook + bundled graphics libs)
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
APPIMAGE_REL=$(find target/release/bundle -name '*.AppImage' | head -n 1)
|
|
||||||
if [ -z "${APPIMAGE_REL}" ]; then
|
|
||||||
echo "No AppImage under target/release/bundle"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
APPIMAGE_ABS="${GITHUB_WORKSPACE}/nym-wallet/${APPIMAGE_REL}"
|
|
||||||
chmod +x "${APPIMAGE_ABS}"
|
|
||||||
EXTRACT_DIR=$(mktemp -d)
|
|
||||||
cd "${EXTRACT_DIR}"
|
|
||||||
"${APPIMAGE_ABS}" --appimage-extract
|
|
||||||
# Tauri only stages appimage "files" under /usr/ into the AppDir; paths like /apprun-hooks/ never reach the image.
|
|
||||||
# Wayland + WEBKIT_DISABLE_DMABUF_RENDERER defaults are applied in main() instead (see configure_linux_wayland_defaults).
|
|
||||||
HOOK=$(find squashfs-root -name '99-nym-wayland.sh' 2>/dev/null | head -n 1)
|
|
||||||
if [ -n "${HOOK}" ]; then
|
|
||||||
echo "Found legacy apprun hook at ${HOOK}"
|
|
||||||
else
|
|
||||||
echo "No apprun-hooks/99-nym-wayland.sh (expected): Wayland defaults are set in-process."
|
|
||||||
fi
|
|
||||||
find squashfs-root/usr/lib -maxdepth 6 \
|
|
||||||
\( -name 'libwayland-client.so*' -o -name 'libEGL.so*' -o -name 'libgbm.so*' \) \
|
|
||||||
2>/dev/null | sort > "${GITHUB_WORKSPACE}/nym-wallet/appimage-bundled-graphics-libs.txt"
|
|
||||||
wc -l "${GITHUB_WORKSPACE}/nym-wallet/appimage-bundled-graphics-libs.txt"
|
|
||||||
head -50 "${GITHUB_WORKSPACE}/nym-wallet/appimage-bundled-graphics-libs.txt" || true
|
|
||||||
|
|
||||||
- name: Upload AppImage graphics lib inventory
|
|
||||||
uses: actions/upload-artifact@v6
|
|
||||||
with:
|
|
||||||
name: nym-wallet-appimage-lib-inventory
|
|
||||||
path: nym-wallet/appimage-bundled-graphics-libs.txt
|
|
||||||
retention-days: 30
|
|
||||||
|
|
||||||
- name: Create AppImage tarball if needed
|
- name: Create AppImage tarball if needed
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -26,9 +26,6 @@ jobs:
|
|||||||
outputs:
|
outputs:
|
||||||
release_tag: ${{ github.ref_name }}
|
release_tag: ${{ github.ref_name }}
|
||||||
|
|
||||||
env:
|
|
||||||
SIGN_WINDOWS: ${{ github.event_name == 'release' || inputs.sign }}
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
|
|
||||||
@@ -40,82 +37,48 @@ jobs:
|
|||||||
- name: Setup MSBuild.exe
|
- name: Setup MSBuild.exe
|
||||||
uses: microsoft/setup-msbuild@v2
|
uses: microsoft/setup-msbuild@v2
|
||||||
|
|
||||||
# No cache:yarn here: setup-node needs yarn on PATH to populate the cache, but this runner
|
|
||||||
# only gets yarn from the step below.
|
|
||||||
- name: Node
|
- name: Node
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 22.13.0
|
node-version: 21
|
||||||
|
|
||||||
- name: Install Yarn (classic)
|
|
||||||
shell: bash
|
|
||||||
run: npm install -g yarn@1.22.22
|
|
||||||
|
|
||||||
- name: Strip Authenticode thumbprint (avoid signtool on runner)
|
|
||||||
working-directory: nym-wallet/src-tauri
|
|
||||||
if: ${{ env.SIGN_WINDOWS == 'true' || (github.event_name == 'workflow_dispatch' && !inputs.sign) }}
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
if ! command -v yq >/dev/null 2>&1; then
|
|
||||||
echo "yq is required on this runner to edit tauri.conf.json"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
yq eval --inplace '
|
|
||||||
del(.bundle.windows.certificateThumbprint) |
|
|
||||||
del(.bundle.windows.digestAlgorithm) |
|
|
||||||
del(.bundle.windows.timestampUrl)
|
|
||||||
' tauri.conf.json
|
|
||||||
|
|
||||||
- name: Download EV CodeSignTool from ssl.com
|
- name: Download EV CodeSignTool from ssl.com
|
||||||
working-directory: nym-wallet/src-tauri
|
working-directory: nym-wallet/src-tauri
|
||||||
if: env.SIGN_WINDOWS == 'true'
|
if: ${{ inputs.sign }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
curl -L0 https://www.ssl.com/download/codesigntool-for-linux-and-macos/ -o codesigntool.zip
|
curl -L0 https://www.ssl.com/download/codesigntool-for-linux-and-macos/ -o codesigntool.zip
|
||||||
unzip codesigntool.zip
|
unzip codesigntool.zip
|
||||||
- name: Get EV certificate credential id
|
- name: Get EV certificate credential id
|
||||||
working-directory: nym-wallet/src-tauri
|
working-directory: nym-wallet/src-tauri
|
||||||
if: env.SIGN_WINDOWS == 'true'
|
if: ${{ inputs.sign }}
|
||||||
id: get_credential_ids
|
id: get_credential_ids
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "SSL_COM_CREDENTIAL_ID=$(./CodeSignTool.sh get_credential_ids -username=${{ secrets.SSL_COM_USERNAME }} -password=${{ secrets.SSL_COM_PASSWORD }} | sed -n '1!p' | sed 's/- //')" >> "$GITHUB_OUTPUT"
|
echo "SSL_COM_CREDENTIAL_ID=$(./CodeSignTool.sh get_credential_ids -username=${{ secrets.SSL_COM_USERNAME }} -password=${{ secrets.SSL_COM_PASSWORD }} | sed -n '1!p' | sed 's/- //')" >> "$GITHUB_OUTPUT"
|
||||||
- name: Add custom sign command to tauri.conf.json
|
- name: Add custom sign command to tauri.conf.json
|
||||||
working-directory: nym-wallet/src-tauri
|
working-directory: nym-wallet/src-tauri
|
||||||
if: env.SIGN_WINDOWS == 'true'
|
if: ${{ inputs.sign }}
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
|
||||||
SSL_SIGN_USER: ${{ secrets.SSL_COM_USERNAME }}
|
|
||||||
SSL_SIGN_PASS: ${{ secrets.SSL_COM_PASSWORD }}
|
|
||||||
SSL_SIGN_CRED: ${{ steps.get_credential_ids.outputs.SSL_COM_CREDENTIAL_ID }}
|
|
||||||
SSL_SIGN_TOTP: ${{ secrets.SSL_COM_TOTP_SECRET }}
|
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
yq eval --inplace '.bundle.windows +=
|
||||||
if ! command -v cygpath >/dev/null 2>&1; then
|
{
|
||||||
echo "cygpath not found; install Git for Windows or use bash from Git SDK"
|
"signCommand": {
|
||||||
exit 1
|
"cmd": "C:\Program Files\Git\bin\bash.EXE",
|
||||||
fi
|
"args": [
|
||||||
export SCRIPT_UNIX="$(cygpath -u "$GITHUB_WORKSPACE/nym-wallet/src-tauri/CodeSignTool.sh")"
|
"/c/actions-runner/_work/nym/nym/nym-wallet/src-tauri/CodeSignTool.sh",
|
||||||
yq eval --inplace '
|
"sign",
|
||||||
.bundle.windows += {
|
"-username ${{ secrets.SSL_COM_USERNAME }}",
|
||||||
"signCommand": {
|
"-password ${{ secrets.SSL_COM_PASSWORD }}",
|
||||||
"cmd": "C:/Program Files/Git/bin/bash.exe",
|
"-credential_id ${{ steps.get_credential_ids.outputs.SSL_COM_CREDENTIAL_ID }}",
|
||||||
"args": [
|
"-totp_secret ${{ secrets.SSL_COM_TOTP_SECRET }}",
|
||||||
strenv(SCRIPT_UNIX),
|
"-program_name NymWallet",
|
||||||
"sign",
|
"-input_file_path",
|
||||||
("-username " + strenv(SSL_SIGN_USER)),
|
"%1",
|
||||||
("-password " + strenv(SSL_SIGN_PASS)),
|
"-override"
|
||||||
("-credential_id " + strenv(SSL_SIGN_CRED)),
|
]
|
||||||
("-totp_secret " + strenv(SSL_SIGN_TOTP)),
|
|
||||||
"-program_name NymWallet",
|
|
||||||
"-input_file_path",
|
|
||||||
"%1",
|
|
||||||
"-override"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
' tauri.conf.json
|
}' tauri.conf.json
|
||||||
- name: Install project dependencies
|
- name: Install project dependencies
|
||||||
shell: bash
|
shell: bash
|
||||||
run: cd .. && yarn --network-timeout 100000
|
run: cd .. && yarn --network-timeout 100000
|
||||||
@@ -130,10 +93,10 @@ jobs:
|
|||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
||||||
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
||||||
SSL_COM_USERNAME: ${{ env.SIGN_WINDOWS == 'true' && secrets.SSL_COM_USERNAME }}
|
SSL_COM_USERNAME: ${{ inputs.sign && secrets.SSL_COM_USERNAME }}
|
||||||
SSL_COM_PASSWORD: ${{ env.SIGN_WINDOWS == 'true' && secrets.SSL_COM_PASSWORD }}
|
SSL_COM_PASSWORD: ${{ inputs.sign && secrets.SSL_COM_PASSWORD }}
|
||||||
SSL_COM_CREDENTIAL_ID: ${{ env.SIGN_WINDOWS == 'true' && steps.get_credential_ids.outputs.SSL_COM_CREDENTIAL_ID }}
|
SSL_COM_CREDENTIAL_ID: ${{ inputs.sign && steps.get_credential_ids.outputs.SSL_COM_CREDENTIAL_ID }}
|
||||||
SSL_COM_TOTP_SECRET: ${{ env.SIGN_WINDOWS == 'true' && secrets.SSL_COM_TOTP_SECRET }}
|
SSL_COM_TOTP_SECRET: ${{ inputs.sign && secrets.SSL_COM_TOTP_SECRET }}
|
||||||
run: |
|
run: |
|
||||||
echo "Starting build process..."
|
echo "Starting build process..."
|
||||||
yarn build
|
yarn build
|
||||||
@@ -204,4 +167,4 @@ jobs:
|
|||||||
needs: publish-tauri
|
needs: publish-tauri
|
||||||
with:
|
with:
|
||||||
release_tag: ${{ needs.publish-tauri.outputs.release_tag || github.ref_name }}
|
release_tag: ${{ needs.publish-tauri.outputs.release_tag || github.ref_name }}
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
@@ -36,9 +36,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
go-version: "1.24.6"
|
go-version: "1.24.6"
|
||||||
|
|
||||||
- name: Update root CA certificate bundle
|
|
||||||
run: ./wasm/mix-fetch/go-mix-conn/scripts/update-root-certs.sh
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: yarn
|
run: yarn
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ jobs:
|
|||||||
git config --global user.name "Lawrence Stalder"
|
git config --global user.name "Lawrence Stalder"
|
||||||
|
|
||||||
- name: Get version from cargo.toml
|
- name: Get version from cargo.toml
|
||||||
uses: mikefarah/yq@v4.52.4
|
uses: mikefarah/yq@v4.52.2
|
||||||
id: get_version
|
id: get_version
|
||||||
with:
|
with:
|
||||||
cmd: yq -oy '.package.version' ${{ env.WORKING_DIRECTORY }}/nym-credential-proxy/Cargo.toml
|
cmd: yq -oy '.package.version' ${{ env.WORKING_DIRECTORY }}/nym-credential-proxy/Cargo.toml
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ jobs:
|
|||||||
git config --global user.name "Lawrence Stalder"
|
git config --global user.name "Lawrence Stalder"
|
||||||
|
|
||||||
- name: Get version from cargo.toml
|
- name: Get version from cargo.toml
|
||||||
uses: mikefarah/yq@v4.52.4
|
uses: mikefarah/yq@v4.52.2
|
||||||
id: get_version
|
id: get_version
|
||||||
with:
|
with:
|
||||||
cmd: yq -oy '.package.version' ${{ env.WORKING_DIRECTORY }}/Cargo.toml
|
cmd: yq -oy '.package.version' ${{ env.WORKING_DIRECTORY }}/Cargo.toml
|
||||||
|
|||||||
@@ -1,61 +0,0 @@
|
|||||||
name: Build and upload Network Monitor Agent container to harbor.nymte.ch
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
release_image:
|
|
||||||
description: 'Tag image as a release (prefix with golden-)'
|
|
||||||
required: true
|
|
||||||
default: false
|
|
||||||
type: boolean
|
|
||||||
|
|
||||||
env:
|
|
||||||
WORKING_DIRECTORY: "nym-network-monitor-v3/nym-network-monitor-agent"
|
|
||||||
CONTAINER_NAME: "network-monitor-agent"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-container:
|
|
||||||
runs-on: arc-linux-latest-dind
|
|
||||||
steps:
|
|
||||||
- name: Login to Harbor
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: harbor.nymte.ch
|
|
||||||
username: ${{ secrets.HARBOR_ROBOT_USERNAME }}
|
|
||||||
password: ${{ secrets.HARBOR_ROBOT_SECRET }}
|
|
||||||
|
|
||||||
- name: Checkout repo
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
|
|
||||||
- name: Configure git identity
|
|
||||||
run: |
|
|
||||||
git config --global user.email "lawrence@nymtech.net"
|
|
||||||
git config --global user.name "Lawrence Stalder"
|
|
||||||
|
|
||||||
- name: Get version from Cargo.toml
|
|
||||||
id: get_version
|
|
||||||
run: |
|
|
||||||
VERSION=$(yq -oy '.package.version' ${{ env.WORKING_DIRECTORY }}/Cargo.toml)
|
|
||||||
echo "result=$VERSION" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Set GIT_TAG variable
|
|
||||||
run: echo "GIT_TAG=${{ env.WORKING_DIRECTORY }}-${{ steps.get_version.outputs.result }}" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Initialize RELEASE_TAG
|
|
||||||
run: echo "RELEASE_TAG=" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Set RELEASE_TAG for release
|
|
||||||
if: github.event.inputs.release_image == 'true'
|
|
||||||
run: echo "RELEASE_TAG=golden-" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Set IMAGE_NAME_AND_TAGS variable
|
|
||||||
run: echo "IMAGE_NAME_AND_TAGS=${{ env.CONTAINER_NAME }}:${{ env.RELEASE_TAG }}${{ steps.get_version.outputs.result }}" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: New env vars
|
|
||||||
run: echo "RELEASE_TAG='$RELEASE_TAG' GIT_TAG='$GIT_TAG' IMAGE_NAME_AND_TAGS='$IMAGE_NAME_AND_TAGS'"
|
|
||||||
|
|
||||||
- name: Build and push image to Harbor
|
|
||||||
run: |
|
|
||||||
docker build -f ${{ env.WORKING_DIRECTORY }}/Dockerfile . -t harbor.nymte.ch/nym/${{ env.IMAGE_NAME_AND_TAGS }}
|
|
||||||
docker push harbor.nymte.ch/nym/${{ env.CONTAINER_NAME }} --all-tags
|
|
||||||
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
name: Build and upload Network Monitor Orchestrator container to harbor.nymte.ch
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
release_image:
|
|
||||||
description: 'Tag image as a release (prefix with golden-)'
|
|
||||||
required: true
|
|
||||||
default: false
|
|
||||||
type: boolean
|
|
||||||
|
|
||||||
env:
|
|
||||||
WORKING_DIRECTORY: "nym-network-monitor-v3/nym-network-monitor-orchestrator"
|
|
||||||
CONTAINER_NAME: "network-monitor-orchestrator"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-container:
|
|
||||||
runs-on: arc-linux-latest-dind
|
|
||||||
steps:
|
|
||||||
- name: Login to Harbor
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: harbor.nymte.ch
|
|
||||||
username: ${{ secrets.HARBOR_ROBOT_USERNAME }}
|
|
||||||
password: ${{ secrets.HARBOR_ROBOT_SECRET }}
|
|
||||||
|
|
||||||
- name: Checkout repo
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
|
|
||||||
- name: Configure git identity
|
|
||||||
run: |
|
|
||||||
git config --global user.email "lawrence@nymtech.net"
|
|
||||||
git config --global user.name "Lawrence Stalder"
|
|
||||||
|
|
||||||
- name: Get version from Cargo.toml
|
|
||||||
id: get_version
|
|
||||||
run: |
|
|
||||||
VERSION=$(yq -oy '.package.version' ${{ env.WORKING_DIRECTORY }}/Cargo.toml)
|
|
||||||
echo "result=$VERSION" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Initialize RELEASE_TAG
|
|
||||||
run: echo "RELEASE_TAG=" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Set RELEASE_TAG for release
|
|
||||||
if: github.event.inputs.release_image == 'true'
|
|
||||||
run: echo "RELEASE_TAG=golden-" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Set IMAGE_NAME_AND_TAGS variable
|
|
||||||
run: echo "IMAGE_NAME_AND_TAGS=${{ env.CONTAINER_NAME }}:${{ env.RELEASE_TAG }}${{ steps.get_version.outputs.result }}" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Log image name
|
|
||||||
run: echo "RELEASE_TAG='$RELEASE_TAG' IMAGE_NAME_AND_TAGS='$IMAGE_NAME_AND_TAGS'"
|
|
||||||
|
|
||||||
- name: Build and push image to Harbor
|
|
||||||
run: |
|
|
||||||
docker build -f ${{ env.WORKING_DIRECTORY }}/Dockerfile . -t harbor.nymte.ch/nym/${{ env.IMAGE_NAME_AND_TAGS }}
|
|
||||||
docker push harbor.nymte.ch/nym/${{ env.CONTAINER_NAME }} --all-tags
|
|
||||||
@@ -26,7 +26,7 @@ jobs:
|
|||||||
git config --global user.name "Lawrence Stalder"
|
git config --global user.name "Lawrence Stalder"
|
||||||
|
|
||||||
- name: Get version from cargo.toml
|
- name: Get version from cargo.toml
|
||||||
uses: mikefarah/yq@v4.52.4
|
uses: mikefarah/yq@v4.52.2
|
||||||
id: get_version
|
id: get_version
|
||||||
with:
|
with:
|
||||||
cmd: yq -oy '.package.version' ${{ env.WORKING_DIRECTORY }}/nym-network-monitor/Cargo.toml
|
cmd: yq -oy '.package.version' ${{ env.WORKING_DIRECTORY }}/nym-network-monitor/Cargo.toml
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ jobs:
|
|||||||
git config --global user.name "Lawrence Stalder"
|
git config --global user.name "Lawrence Stalder"
|
||||||
|
|
||||||
- name: Get version from cargo.toml
|
- name: Get version from cargo.toml
|
||||||
uses: mikefarah/yq@v4.52.4
|
uses: mikefarah/yq@v4.52.2
|
||||||
id: get_version
|
id: get_version
|
||||||
with:
|
with:
|
||||||
cmd: yq -oy '.package.version' ${{ env.WORKING_DIRECTORY }}/nym-api/Cargo.toml
|
cmd: yq -oy '.package.version' ${{ env.WORKING_DIRECTORY }}/nym-api/Cargo.toml
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ jobs:
|
|||||||
git config --global user.name "Lawrence Stalder"
|
git config --global user.name "Lawrence Stalder"
|
||||||
|
|
||||||
- name: Get version from cargo.toml
|
- name: Get version from cargo.toml
|
||||||
uses: mikefarah/yq@v4.52.4
|
uses: mikefarah/yq@v4.52.2
|
||||||
id: get_version
|
id: get_version
|
||||||
with:
|
with:
|
||||||
cmd: yq -oy '.package.version' ${{ env.WORKING_DIRECTORY }}/Cargo.toml
|
cmd: yq -oy '.package.version' ${{ env.WORKING_DIRECTORY }}/Cargo.toml
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ jobs:
|
|||||||
git config --global user.name "Lawrence Stalder"
|
git config --global user.name "Lawrence Stalder"
|
||||||
|
|
||||||
- name: Get version from cargo.toml
|
- name: Get version from cargo.toml
|
||||||
uses: mikefarah/yq@v4.52.4
|
uses: mikefarah/yq@v4.52.2
|
||||||
id: get_version
|
id: get_version
|
||||||
with:
|
with:
|
||||||
cmd: yq -oy '.package.version' ${{ env.WORKING_DIRECTORY }}/Cargo.toml
|
cmd: yq -oy '.package.version' ${{ env.WORKING_DIRECTORY }}/Cargo.toml
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ jobs:
|
|||||||
git config --global user.name "Lawrence Stalder"
|
git config --global user.name "Lawrence Stalder"
|
||||||
|
|
||||||
- name: Get version from cargo.toml
|
- name: Get version from cargo.toml
|
||||||
uses: mikefarah/yq@v4.52.4
|
uses: mikefarah/yq@v4.52.2
|
||||||
id: get_version
|
id: get_version
|
||||||
with:
|
with:
|
||||||
cmd: yq -oy '.package.version' ${{ env.WORKING_DIRECTORY }}/Cargo.toml
|
cmd: yq -oy '.package.version' ${{ env.WORKING_DIRECTORY }}/Cargo.toml
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ jobs:
|
|||||||
git config --global user.name "Lawrence Stalder"
|
git config --global user.name "Lawrence Stalder"
|
||||||
|
|
||||||
- name: Get version from cargo.toml
|
- name: Get version from cargo.toml
|
||||||
uses: mikefarah/yq@v4.52.4
|
uses: mikefarah/yq@v4.52.2
|
||||||
id: get_version
|
id: get_version
|
||||||
with:
|
with:
|
||||||
cmd: yq -oy '.package.version' ${{ env.WORKING_DIRECTORY }}/Cargo.toml
|
cmd: yq -oy '.package.version' ${{ env.WORKING_DIRECTORY }}/Cargo.toml
|
||||||
|
|||||||
@@ -25,10 +25,6 @@ jobs:
|
|||||||
- name: Install cargo-workspaces
|
- name: Install cargo-workspaces
|
||||||
run: cargo install cargo-workspaces
|
run: cargo install cargo-workspaces
|
||||||
|
|
||||||
- name: Preflight publish checks
|
|
||||||
run: |
|
|
||||||
python3 tools/internal/check_publish_preflight.py
|
|
||||||
|
|
||||||
- name: Publish remaining crates
|
- name: Publish remaining crates
|
||||||
env:
|
env:
|
||||||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
||||||
|
|||||||
@@ -4,23 +4,51 @@ This is a collection of scripts and files to support GitHub Actions.
|
|||||||
|
|
||||||
## Sending Notifications
|
## Sending Notifications
|
||||||
|
|
||||||
These scripts send CI notifications to Matrix by creating messages from templates and env vars passed from GitHub
|
These scripts send CI notifications to Matrix by creating messages from templates and env vars passed from GitHub Actions.
|
||||||
Actions.
|
|
||||||
|
### Adding notifications to a GitHub Action
|
||||||
|
|
||||||
|
```
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
...
|
||||||
|
- name: Notifications - Node Install
|
||||||
|
run: npm install
|
||||||
|
working-directory: .github/workflows/support-files/notifications
|
||||||
|
- name: Notifications - Send
|
||||||
|
env:
|
||||||
|
NYM_NOTIFICATION_KIND: "my-component"
|
||||||
|
GIT_BRANCH: "${GITHUB_REF##*/}"
|
||||||
|
MATRIX_SERVER: "${{ secrets.MATRIX_SERVER }}"
|
||||||
|
MATRIX_ROOM: "${{ secrets.MATRIX_ROOM }}"
|
||||||
|
MATRIX_USER_ID: "${{ secrets.MATRIX_USER_ID }}"
|
||||||
|
MATRIX_TOKEN: "${{ secrets.MATRIX_TOKEN }}"
|
||||||
|
MATRIX_DEVICE_ID: "${{ secrets.MATRIX_DEVICE_ID }}"
|
||||||
|
IS_SUCCESS: "${{ job.status == 'success' }}"
|
||||||
|
uses: docker://keybaseio/client:stable-node
|
||||||
|
with:
|
||||||
|
args: .github/workflows/support-files/notifications/entry_point.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
Notifications are run by adding the snippet above to a GitHub Action, and:
|
||||||
|
|
||||||
|
1. Installing node packages needed at run time
|
||||||
|
2. Set the env vars as required:
|
||||||
|
- `NYM_NOTIFICATION_KIND` matches the directory in `.github/workflows/support-files/${NYM_NOTIFICATION_KIND}` to provide the templates and extra scripting in `index.js`
|
||||||
|
- Matrix credentials, room and other env vars for the status of the build and repo
|
||||||
|
3. Replacing the default entry point shell script on the `keybaseio/client:stable-node` docker image to run `.github/workflows/support-files/notifications/entry_point.sh`
|
||||||
|
|
||||||
### Running locally
|
### Running locally
|
||||||
|
|
||||||
You will need:
|
You will need:
|
||||||
|
|
||||||
- Node 16 LTS
|
- Node 16 LTS
|
||||||
- npm
|
- npm
|
||||||
|
|
||||||
Copy `.github/workflows/support-files/.env.example` to `.github/workflows/support-files/.env` and valid Matrix
|
Copy `.github/workflows/support-files/.env.example` to `.github/workflows/support-files/.env` and valid Matrix credentials.
|
||||||
credentials.
|
|
||||||
|
|
||||||
Then run `npm install` to get dependencies.
|
Then run `npm install` to get dependencies.
|
||||||
|
|
||||||
Start development mode for the notification type you want either by passing the value as an env var called
|
Start development mode for the notification type you want either by passing the value as an env var called `NYM_NOTIFICATION_KIND` or set the `.env` file values correctly.
|
||||||
`NYM_NOTIFICATION_KIND` or set the `.env` file values correctly.
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd .github/workflows/support-files
|
cd .github/workflows/support-files
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# pass exit codes out to GitHub Actions
|
||||||
|
set -euxo pipefail
|
||||||
|
|
||||||
|
# change to the directory that contains this script
|
||||||
|
cd "${0%/*}"
|
||||||
|
|
||||||
|
# run the node script
|
||||||
|
node send_message.js
|
||||||
@@ -0,0 +1,126 @@
|
|||||||
|
require('dotenv').config();
|
||||||
|
|
||||||
|
const { sendMatrixMessage } = require('./send_message_to_matrix');
|
||||||
|
|
||||||
|
let context = {
|
||||||
|
kinds: ['nym-wallet', 'ts-packages', 'network-explorer', 'nightly', 'nym-connect','security','ci-docs','cd-docs','ci-dev','cd-dev'],
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Validate that all required env and context vars are available
|
||||||
|
*/
|
||||||
|
function validateContext() {
|
||||||
|
if (!context.env.NYM_NOTIFICATION_KIND) {
|
||||||
|
throw new Error(
|
||||||
|
'Please set env var NYM_NOTIFICATION_KIND with the project kind that matches a directory in ".github/workflows/support-files"',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (!context.kinds.includes(context.env.NYM_NOTIFICATION_KIND)) {
|
||||||
|
throw new Error(`Env var NYM_NOTIFICATION_KIND is not in ${context.kinds}`);
|
||||||
|
}
|
||||||
|
if (!context.env.NYM_PROJECT_NAME) {
|
||||||
|
throw new Error(
|
||||||
|
'Please set env var NYM_PROJECT_NAME with the project name for displaying in notification messages',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (context.env.MATRIX_ROOM) {
|
||||||
|
if (!context.env.MATRIX_SERVER) {
|
||||||
|
throw new Error(
|
||||||
|
'Matrix server is not defined. Please set env var MATRIX_SERVER',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (!context.env.MATRIX_USER_ID) {
|
||||||
|
throw new Error(
|
||||||
|
'Matrix user id is not defined. Please set env var MATRIX_USER_ID',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (!context.env.MATRIX_TOKEN) {
|
||||||
|
throw new Error(
|
||||||
|
'Matrix token is not defined. Please set env var MATRIX_TOKEN',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (!context.env.MATRIX_DEVICE_ID) {
|
||||||
|
throw new Error(
|
||||||
|
'Matrix device id is not defined. Please set env var MATRIX_DEVICE_ID',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a context that will be available in the templates for rendering notifications
|
||||||
|
*/
|
||||||
|
function createTemplateContext() {
|
||||||
|
const options = { dateStyle: 'full', timeStyle: 'long' };
|
||||||
|
context.timestamp = new Date().toLocaleString(undefined, options);
|
||||||
|
|
||||||
|
// add environment to template context and validate
|
||||||
|
context.env = process.env;
|
||||||
|
try {
|
||||||
|
validateContext();
|
||||||
|
} catch (e) {
|
||||||
|
if(process.env.SHOW_DEBUG) {
|
||||||
|
// recursively print the context for easy debugging and rethrow the error
|
||||||
|
console.dir({ context }, { depth: null });
|
||||||
|
}
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
|
||||||
|
context.kind = context.env.NYM_NOTIFICATION_KIND;
|
||||||
|
|
||||||
|
if (!context.env.GIT_BRANCH_NAME) {
|
||||||
|
context.env.GIT_BRANCH_NAME = context.env.GITHUB_REF.split('/')
|
||||||
|
.slice(2)
|
||||||
|
.join('/');
|
||||||
|
}
|
||||||
|
|
||||||
|
context.status = process.env.IS_SUCCESS === 'true' ? 'success' : 'failure';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Uses the `kind` set in the context to process the context and generate a notification message
|
||||||
|
* @returns {Promise<string>} A string notification message body
|
||||||
|
*/
|
||||||
|
async function processKindScript() {
|
||||||
|
const script = require(`../${context.kind}`);
|
||||||
|
if (!script.addToContextAndValidate) {
|
||||||
|
throw new Error(
|
||||||
|
`"./${context.kind}/index.js" does not export a method called "async addToContextAndValidate(context)"`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (!script.getMessageBody) {
|
||||||
|
throw new Error(
|
||||||
|
`"./${context.kind}/index.js" does not export a method called "async getMessageBody(context)"`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// call the script to modify and validate the context
|
||||||
|
await script.addToContextAndValidate(context);
|
||||||
|
|
||||||
|
// let the script create a message body and return the result as a string for sending
|
||||||
|
return await script.getMessageBody(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The main function, as async so that await syntax is available
|
||||||
|
*/
|
||||||
|
async function main() {
|
||||||
|
createTemplateContext();
|
||||||
|
console.log(`Sending notification for kind "${context.kind}"...`);
|
||||||
|
const messageBody = await processKindScript();
|
||||||
|
if(process.env.SHOW_DEBUG) {
|
||||||
|
console.log('-----------------------------------------');
|
||||||
|
console.log(messageBody);
|
||||||
|
console.log('-----------------------------------------');
|
||||||
|
}
|
||||||
|
if(context.env.MATRIX_ROOM) {
|
||||||
|
await sendMatrixMessage(context, messageBody, context.env.MATRIX_ROOM)
|
||||||
|
}
|
||||||
|
if(context.env.MATRIX_ROOM_OF_SHAME && context.env.IS_SUCCESS !== 'true') {
|
||||||
|
// when a job fails
|
||||||
|
await sendMatrixMessage(context, messageBody, context.env.MATRIX_ROOM_OF_SHAME)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// call main function and let NodeJS handle the promise
|
||||||
|
main();
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
const sdk = require('matrix-js-sdk');
|
||||||
|
global.Olm = require('olm');
|
||||||
|
const { LocalStorage } = require('node-localstorage');
|
||||||
|
const localStorage = new LocalStorage('./scratch');
|
||||||
|
const {
|
||||||
|
LocalStorageCryptoStore,
|
||||||
|
} = require('matrix-js-sdk/lib/crypto/store/localStorage-crypto-store');
|
||||||
|
var showdown = require('showdown');
|
||||||
|
|
||||||
|
// hide all matrix client output
|
||||||
|
console.error = (error) => console.log('❌ error: ', error);
|
||||||
|
process.stderr.write = () => {};
|
||||||
|
process.stdout.write = () => {};
|
||||||
|
|
||||||
|
|
||||||
|
function createClient(context, room, message) {
|
||||||
|
const server = context.env.MATRIX_SERVER;
|
||||||
|
const token = context.env.MATRIX_TOKEN;
|
||||||
|
const deviceId = context.env.MATRIX_DEVICE_ID;
|
||||||
|
const userId = context.env.MATRIX_USER_ID;
|
||||||
|
|
||||||
|
const client = sdk.createClient({
|
||||||
|
baseUrl: server,
|
||||||
|
accessToken: token,
|
||||||
|
userId,
|
||||||
|
deviceId,
|
||||||
|
sessionStore: new sdk.WebStorageSessionStore(localStorage),
|
||||||
|
cryptoStore: new LocalStorageCryptoStore(localStorage),
|
||||||
|
});
|
||||||
|
|
||||||
|
client.on('sync', async function(state, prevState, res) {
|
||||||
|
if (state !== 'PREPARED') return;
|
||||||
|
client.setGlobalErrorOnUnknownDevices(false);
|
||||||
|
try {
|
||||||
|
await client.joinRoom(room);
|
||||||
|
await client.sendEvent(
|
||||||
|
room,
|
||||||
|
'm.room.message',
|
||||||
|
{
|
||||||
|
msgtype: 'm.text',
|
||||||
|
format: 'org.matrix.custom.html',
|
||||||
|
body: message,
|
||||||
|
formatted_body: message,
|
||||||
|
},
|
||||||
|
'',
|
||||||
|
);
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Job failed: ' + error.message);
|
||||||
|
}
|
||||||
|
client.stopClient();
|
||||||
|
process.exit(0);
|
||||||
|
});
|
||||||
|
|
||||||
|
return client;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function sendMatrixMessage(contextArg, messageAsMarkdown, roomId) {
|
||||||
|
const converter = new showdown.Converter();
|
||||||
|
const messageAsHtml = converter.makeHtml(messageAsMarkdown);
|
||||||
|
const client = createClient(contextArg, roomId, messageAsHtml);
|
||||||
|
await client.initCrypto();
|
||||||
|
await client.startClient({ initialSyncLimit: 1 });
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
sendMatrixMessage,
|
||||||
|
};
|
||||||
@@ -27,7 +27,6 @@ v6-topology.json
|
|||||||
/explorer/public/downloads/mixmining.json
|
/explorer/public/downloads/mixmining.json
|
||||||
/explorer/public/downloads/topology.json
|
/explorer/public/downloads/topology.json
|
||||||
/nym-wallet/dist/*
|
/nym-wallet/dist/*
|
||||||
/nym-wallet/appimage-bundled-graphics-libs.txt
|
|
||||||
/clients/validator/examples/nym-driver-example/current-contract.txt
|
/clients/validator/examples/nym-driver-example/current-contract.txt
|
||||||
validator-api/v4.json
|
validator-api/v4.json
|
||||||
validator-api/v6.json
|
validator-api/v6.json
|
||||||
@@ -77,4 +76,3 @@ CLAUDE.md
|
|||||||
.claude/settings.json
|
.claude/settings.json
|
||||||
|
|
||||||
/notes
|
/notes
|
||||||
/target-otel
|
|
||||||
|
|||||||
-266
@@ -4,272 +4,6 @@ Post 1.0.0 release, the changelog format is based on [Keep a Changelog](https://
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
## [2026.10-waterloo] (2026-05-27)
|
|
||||||
|
|
||||||
- Re-order default API urls for network details - Waterloo release ([#6799])
|
|
||||||
- [bugfix] IPR v8<->v9 mismatch on Waterloo ([#6772])
|
|
||||||
- Migrate to hickory 0.26.1 ([#6751])
|
|
||||||
- add workflows for NM3 ([#6729])
|
|
||||||
- credential proxy pool ([#6726])
|
|
||||||
- chore: made sphinx version threshold assertion a compile time check ([#6718])
|
|
||||||
- Feat/nmv3 updated performance calculation ([#6714])
|
|
||||||
- feat: NMv3: submission of stress testing result into nym-api ([#6709])
|
|
||||||
- feat: NMv3: Prometheus metrics for network monitor ([#6693])
|
|
||||||
- feat: NMv3: add read-only results API to orchestrator ([#6689])
|
|
||||||
- feat: NMv3: Eviction of stale testrun data ([#6685])
|
|
||||||
- feat: NMv3: Wire up testrun assignment and result submission flow ([#6680])
|
|
||||||
- feat: NMv3: Support multiple network monitor agents per host ([#6679])
|
|
||||||
- Feat/nmv3 agent announcement ([#6673])
|
|
||||||
- add node refresher for periodic scraping of bonded nym-node details ([#6626])
|
|
||||||
- Feat/nmv3 orchestrator queue ([#6597])
|
|
||||||
- feat: network monitor agent - standalone node stress-testing ([#6582])
|
|
||||||
- [feat] propagate NM agent noise keys to nym-node routing ([#6577])
|
|
||||||
- start mix stress testing topic branch ([#6575])
|
|
||||||
- Feat/nmv3 agents subscription ([#6567])
|
|
||||||
- Feat/nmv3 agents contract ([#6555])
|
|
||||||
|
|
||||||
[#6799]: https://github.com/nymtech/nym/pull/6799
|
|
||||||
[#6772]: https://github.com/nymtech/nym/pull/6772
|
|
||||||
[#6751]: https://github.com/nymtech/nym/pull/6751
|
|
||||||
[#6729]: https://github.com/nymtech/nym/pull/6729
|
|
||||||
[#6726]: https://github.com/nymtech/nym/pull/6726
|
|
||||||
[#6718]: https://github.com/nymtech/nym/pull/6718
|
|
||||||
[#6714]: https://github.com/nymtech/nym/pull/6714
|
|
||||||
[#6709]: https://github.com/nymtech/nym/pull/6709
|
|
||||||
[#6693]: https://github.com/nymtech/nym/pull/6693
|
|
||||||
[#6689]: https://github.com/nymtech/nym/pull/6689
|
|
||||||
[#6685]: https://github.com/nymtech/nym/pull/6685
|
|
||||||
[#6680]: https://github.com/nymtech/nym/pull/6680
|
|
||||||
[#6679]: https://github.com/nymtech/nym/pull/6679
|
|
||||||
[#6673]: https://github.com/nymtech/nym/pull/6673
|
|
||||||
[#6626]: https://github.com/nymtech/nym/pull/6626
|
|
||||||
[#6597]: https://github.com/nymtech/nym/pull/6597
|
|
||||||
[#6582]: https://github.com/nymtech/nym/pull/6582
|
|
||||||
[#6577]: https://github.com/nymtech/nym/pull/6577
|
|
||||||
[#6575]: https://github.com/nymtech/nym/pull/6575
|
|
||||||
[#6567]: https://github.com/nymtech/nym/pull/6567
|
|
||||||
[#6555]: https://github.com/nymtech/nym/pull/6555
|
|
||||||
|
|
||||||
## [2026.9-venaco] (2026-05-06)
|
|
||||||
|
|
||||||
- Fix for v9 IPR ([#6710])
|
|
||||||
- Only init SHARED_CLIENT if requested ([#6708])
|
|
||||||
- Fixes to crates and CI ([#6686])
|
|
||||||
- Return ipv6 addresses as well ([#6684])
|
|
||||||
- Fix invalid ticket spend ([#6683])
|
|
||||||
- Block non-public IPR/NR checks ([#6670])
|
|
||||||
|
|
||||||
[#6710]: https://github.com/nymtech/nym/pull/6710
|
|
||||||
[#6708]: https://github.com/nymtech/nym/pull/6708
|
|
||||||
[#6686]: https://github.com/nymtech/nym/pull/6686
|
|
||||||
[#6684]: https://github.com/nymtech/nym/pull/6684
|
|
||||||
[#6683]: https://github.com/nymtech/nym/pull/6683
|
|
||||||
[#6670]: https://github.com/nymtech/nym/pull/6670
|
|
||||||
|
|
||||||
## [2026.8-urda] (2026-04-20)
|
|
||||||
|
|
||||||
- Include all gateways in the returned list ([#6649])
|
|
||||||
- Optimize GW probe in NS agent ([#6636])
|
|
||||||
- Max/sdk docrs ([#6566])
|
|
||||||
- Max/sdk stream wrapper ([#6320])
|
|
||||||
|
|
||||||
[#6649]: https://github.com/nymtech/nym/pull/6649
|
|
||||||
[#6636]: https://github.com/nymtech/nym/pull/6636
|
|
||||||
[#6566]: https://github.com/nymtech/nym/pull/6566
|
|
||||||
[#6320]: https://github.com/nymtech/nym/pull/6320
|
|
||||||
|
|
||||||
## [2026.7-tola] (2026-04-07)
|
|
||||||
|
|
||||||
- Simon/ecash contract serde fix ([#6634])
|
|
||||||
- Update Fallback IP for Nym API ([#6622])
|
|
||||||
- Nym Node spam logging ([#6621])
|
|
||||||
- feat: multiple deposit prices ([#6608])
|
|
||||||
- move format_debug_bytes in common crate ([#6580])
|
|
||||||
- bugfix: make sure client keys are generated before requesting credentials ([#6579])
|
|
||||||
- Fix socks5 GW probe regression ([#6576])
|
|
||||||
- Max/lp stream framing ([#6573])
|
|
||||||
- HTTP domain rotation conditions ([#6570])
|
|
||||||
|
|
||||||
[#6634]: https://github.com/nymtech/nym/pull/6634
|
|
||||||
[#6622]: https://github.com/nymtech/nym/pull/6622
|
|
||||||
[#6621]: https://github.com/nymtech/nym/pull/6621
|
|
||||||
[#6608]: https://github.com/nymtech/nym/pull/6608
|
|
||||||
[#6580]: https://github.com/nymtech/nym/pull/6580
|
|
||||||
[#6579]: https://github.com/nymtech/nym/pull/6579
|
|
||||||
[#6576]: https://github.com/nymtech/nym/pull/6576
|
|
||||||
[#6573]: https://github.com/nymtech/nym/pull/6573
|
|
||||||
[#6570]: https://github.com/nymtech/nym/pull/6570
|
|
||||||
|
|
||||||
## [2026.6-stilton] (2026-03-25)
|
|
||||||
|
|
||||||
- lp fixes ([#6601])
|
|
||||||
- bugfix: allow deserialisation of LP data from either snake_case or lowercase ([#6586])
|
|
||||||
- bugfix: make sure to run cargo install cosmwasm-check with --locked flag during CI ([#6568])
|
|
||||||
- Add LP to NS UI ([#6562])
|
|
||||||
- feat: nyxd watcher ([#6561])
|
|
||||||
- Additional ticket for agent ([#6551])
|
|
||||||
- bugfix: make sure to use old values from metrics debug config during v12 migration (#6546) ([#6547])
|
|
||||||
- typo ([#6543])
|
|
||||||
- rng changes for a Send variant ([#6541])
|
|
||||||
- Add LP fields ([#6535])
|
|
||||||
- enable LP registration in registration client ([#6534])
|
|
||||||
- chore: rename LpMessage to LpFrame ([#6530])
|
|
||||||
- chore: LP improvements ([#6526])
|
|
||||||
- Remove dep leak of strum iterator ([#6522])
|
|
||||||
- chore: update ts-rs dep ([#6517])
|
|
||||||
- addressing LP PR comments ([#6513])
|
|
||||||
- remove redundant LP state machine in favour of in place processing ([#6512])
|
|
||||||
- chore: split up lp listener ([#6507])
|
|
||||||
- feat: enable mutual KKT exchange ([#6505])
|
|
||||||
- feat: introduce /v3/unstable/nym-nodes/semi-skimmed to aggregate LP information ([#6499])
|
|
||||||
- Max/asyncread asyncwrite nym client ([#6318])
|
|
||||||
- feat: localnet v2 ([#6277])
|
|
||||||
|
|
||||||
[#6601]: https://github.com/nymtech/nym/pull/6601
|
|
||||||
[#6586]: https://github.com/nymtech/nym/pull/6586
|
|
||||||
[#6568]: https://github.com/nymtech/nym/pull/6568
|
|
||||||
[#6562]: https://github.com/nymtech/nym/pull/6562
|
|
||||||
[#6561]: https://github.com/nymtech/nym/pull/6561
|
|
||||||
[#6551]: https://github.com/nymtech/nym/pull/6551
|
|
||||||
[#6547]: https://github.com/nymtech/nym/pull/6547
|
|
||||||
[#6543]: https://github.com/nymtech/nym/pull/6543
|
|
||||||
[#6541]: https://github.com/nymtech/nym/pull/6541
|
|
||||||
[#6535]: https://github.com/nymtech/nym/pull/6535
|
|
||||||
[#6534]: https://github.com/nymtech/nym/pull/6534
|
|
||||||
[#6530]: https://github.com/nymtech/nym/pull/6530
|
|
||||||
[#6526]: https://github.com/nymtech/nym/pull/6526
|
|
||||||
[#6522]: https://github.com/nymtech/nym/pull/6522
|
|
||||||
[#6517]: https://github.com/nymtech/nym/pull/6517
|
|
||||||
[#6513]: https://github.com/nymtech/nym/pull/6513
|
|
||||||
[#6512]: https://github.com/nymtech/nym/pull/6512
|
|
||||||
[#6507]: https://github.com/nymtech/nym/pull/6507
|
|
||||||
[#6505]: https://github.com/nymtech/nym/pull/6505
|
|
||||||
[#6499]: https://github.com/nymtech/nym/pull/6499
|
|
||||||
[#6318]: https://github.com/nymtech/nym/pull/6318
|
|
||||||
[#6277]: https://github.com/nymtech/nym/pull/6277
|
|
||||||
|
|
||||||
## [2026.5-raclette] (2026-03-10)
|
|
||||||
|
|
||||||
- bugfix: correctly populate gateway probe LP data ([#6533])
|
|
||||||
- chore: introduce additional prometheus metrics for registration times ([#6532])
|
|
||||||
- bugfix: lp information to have proper snake_case on API endpoints ([#6531])
|
|
||||||
- removed redundant LP states ([#6509])
|
|
||||||
- chore: removed all matrix notifications from github actions ([#6495])
|
|
||||||
- feat: Lewes Protocol with PSQv2 ([#6491])
|
|
||||||
- build(deps): bump minimatch from 3.1.2 to 3.1.4 in /documentation/docs ([#6486])
|
|
||||||
- build(deps): bump bn.js from 4.12.2 to 4.12.3 in /documentation/docs ([#6484])
|
|
||||||
- build(deps): bump bn.js from 4.12.2 to 4.12.3 ([#6483])
|
|
||||||
- build(deps): bump ajv from 8.17.1 to 8.18.0 in /clients/native/examples/js-examples/websocket ([#6478])
|
|
||||||
- build(deps): bump ajv from 6.12.6 to 6.14.0 in /documentation/docs ([#6477])
|
|
||||||
- build(deps): bump minimatch and glob in /documentation/scripts/post-process ([#6476])
|
|
||||||
- build(deps): bump hono from 4.11.9 to 4.12.0 ([#6475])
|
|
||||||
- build(deps): bump keccak from 0.1.5 to 0.1.6 ([#6472])
|
|
||||||
- build(deps-dev): bump qs from 6.14.1 to 6.14.2 in /clients/native/examples/js-examples/websocket ([#6466])
|
|
||||||
- build(deps): bump mikefarah/yq from 4.52.2 to 4.52.4 ([#6465])
|
|
||||||
- Otel minimal v2 ([#6464])
|
|
||||||
- build(deps): bump qs and express in /wasm/client/internal-dev ([#6461])
|
|
||||||
- bugfix: restore 'latest_measurement' field for nym-node /verloc endpoint ([#6452])
|
|
||||||
- build(deps-dev): bump webpack from 5.77.0 to 5.104.1 in /wasm/node-tester/internal-dev ([#6451])
|
|
||||||
- Max/mixfetch concurrent test ([#6417])
|
|
||||||
|
|
||||||
[#6533]: https://github.com/nymtech/nym/pull/6533
|
|
||||||
[#6532]: https://github.com/nymtech/nym/pull/6532
|
|
||||||
[#6531]: https://github.com/nymtech/nym/pull/6531
|
|
||||||
[#6509]: https://github.com/nymtech/nym/pull/6509
|
|
||||||
[#6495]: https://github.com/nymtech/nym/pull/6495
|
|
||||||
[#6491]: https://github.com/nymtech/nym/pull/6491
|
|
||||||
[#6486]: https://github.com/nymtech/nym/pull/6486
|
|
||||||
[#6484]: https://github.com/nymtech/nym/pull/6484
|
|
||||||
[#6483]: https://github.com/nymtech/nym/pull/6483
|
|
||||||
[#6478]: https://github.com/nymtech/nym/pull/6478
|
|
||||||
[#6477]: https://github.com/nymtech/nym/pull/6477
|
|
||||||
[#6476]: https://github.com/nymtech/nym/pull/6476
|
|
||||||
[#6475]: https://github.com/nymtech/nym/pull/6475
|
|
||||||
[#6472]: https://github.com/nymtech/nym/pull/6472
|
|
||||||
[#6466]: https://github.com/nymtech/nym/pull/6466
|
|
||||||
[#6465]: https://github.com/nymtech/nym/pull/6465
|
|
||||||
[#6464]: https://github.com/nymtech/nym/pull/6464
|
|
||||||
[#6461]: https://github.com/nymtech/nym/pull/6461
|
|
||||||
[#6452]: https://github.com/nymtech/nym/pull/6452
|
|
||||||
[#6451]: https://github.com/nymtech/nym/pull/6451
|
|
||||||
[#6417]: https://github.com/nymtech/nym/pull/6417
|
|
||||||
|
|
||||||
## [2026.4-quark] (2026-02-24)
|
|
||||||
|
|
||||||
- Enhance CI workflow with feature inputs ([#6462])
|
|
||||||
- Chore/revert 6433 ([#6445])
|
|
||||||
- Lp/stateless handshake ([#6437])
|
|
||||||
- build(deps-dev): bump webpack from 5.98.0 to 5.105.0 in /wasm/client/internal-dev ([#6435])
|
|
||||||
- build(deps-dev): bump webpack from 5.102.1 to 5.104.1 ([#6432])
|
|
||||||
- build(deps-dev): bump webpack from 5.98.0 to 5.105.0 in /wasm/mix-fetch/internal-dev ([#6431])
|
|
||||||
- build(deps-dev): bump webpack from 5.94.0 to 5.104.1 in /nym-credential-proxy/vpn-api-lib-wasm/internal-dev ([#6430])
|
|
||||||
- build(deps-dev): bump webpack from 5.77.0 to 5.104.1 in /wasm/zknym-lib/internal-dev ([#6429])
|
|
||||||
- build(deps-dev): bump webpack from 5.76.0 to 5.105.0 in /clients/native/examples/js-examples/websocket ([#6428])
|
|
||||||
- HTTP & DNS Improvements ([#6423])
|
|
||||||
- Endpoint for exit GW IPs ([#6418])
|
|
||||||
- build(deps): bump bytes from 1.6.0 to 1.11.1 in /contracts ([#6416])
|
|
||||||
- build(deps): bump @isaacs/brace-expansion from 5.0.0 to 5.0.1 ([#6415])
|
|
||||||
- build(deps): bump bytes from 1.11.0 to 1.11.1 ([#6414])
|
|
||||||
- build(deps): bump mikefarah/yq from 4.50.1 to 4.52.2 ([#6407])
|
|
||||||
- build(deps-dev): bump eslint from 8.57.1 to 9.26.0 ([#6405])
|
|
||||||
- Update reqwest to v0.13.1 ([#6401])
|
|
||||||
- build(deps): bump next from 15.5.9 to 16.1.5 in /documentation/docs ([#6387])
|
|
||||||
- build(deps): bump next from 15.4.10 to 16.1.5 in /nym-node-status-api/nym-node-status-ui ([#6385])
|
|
||||||
- build(deps): bump lodash from 4.17.21 to 4.17.23 ([#6369])
|
|
||||||
- build(deps): bump lodash-es from 4.17.21 to 4.17.23 ([#6360])
|
|
||||||
- build(deps-dev): bump lodash from 4.17.21 to 4.17.23 in /sdk/typescript/codegen/contract-clients ([#6359])
|
|
||||||
- build(deps): bump lodash from 4.17.21 to 4.17.23 in /sdk/typescript/packages/nodejs-client ([#6354])
|
|
||||||
- build(deps): bump lodash from 4.17.21 to 4.17.23 in /documentation/docs ([#6353])
|
|
||||||
- build(deps): bump lodash from 4.17.21 to 4.17.23 in /clients/native/examples/js-examples/websocket ([#6351])
|
|
||||||
- build(deps): bump lodash-es from 4.17.21 to 4.17.23 in /documentation/docs ([#6350])
|
|
||||||
- build(deps): bump diff from 5.2.0 to 5.2.2 in /documentation/docs ([#6345])
|
|
||||||
- Max/crates publishing tweaks ([#6343])
|
|
||||||
- build(deps): bump h3 from 1.15.4 to 1.15.5 ([#6339])
|
|
||||||
- build(deps): bump h3 from 1.15.4 to 1.15.5 in /documentation/docs ([#6332])
|
|
||||||
- build(deps): bump undici from 6.21.3 to 6.23.0 in /documentation/docs ([#6325])
|
|
||||||
- build(deps): bump rsa from 0.9.8 to 0.9.10 ([#6311])
|
|
||||||
- build(deps): bump qs and express in /wasm/mix-fetch/internal-dev ([#6308])
|
|
||||||
- build(deps): bump qs and express in /clients/native/examples/js-examples/websocket ([#6307])
|
|
||||||
- feat: introduce on-disk cache persistance for major nym-api caches ([#6302])
|
|
||||||
- Fix migrations in the Data Observatory ([#6271])
|
|
||||||
|
|
||||||
[#6462]: https://github.com/nymtech/nym/pull/6462
|
|
||||||
[#6445]: https://github.com/nymtech/nym/pull/6445
|
|
||||||
[#6437]: https://github.com/nymtech/nym/pull/6437
|
|
||||||
[#6435]: https://github.com/nymtech/nym/pull/6435
|
|
||||||
[#6432]: https://github.com/nymtech/nym/pull/6432
|
|
||||||
[#6431]: https://github.com/nymtech/nym/pull/6431
|
|
||||||
[#6430]: https://github.com/nymtech/nym/pull/6430
|
|
||||||
[#6429]: https://github.com/nymtech/nym/pull/6429
|
|
||||||
[#6428]: https://github.com/nymtech/nym/pull/6428
|
|
||||||
[#6423]: https://github.com/nymtech/nym/pull/6423
|
|
||||||
[#6418]: https://github.com/nymtech/nym/pull/6418
|
|
||||||
[#6416]: https://github.com/nymtech/nym/pull/6416
|
|
||||||
[#6415]: https://github.com/nymtech/nym/pull/6415
|
|
||||||
[#6414]: https://github.com/nymtech/nym/pull/6414
|
|
||||||
[#6407]: https://github.com/nymtech/nym/pull/6407
|
|
||||||
[#6405]: https://github.com/nymtech/nym/pull/6405
|
|
||||||
[#6401]: https://github.com/nymtech/nym/pull/6401
|
|
||||||
[#6387]: https://github.com/nymtech/nym/pull/6387
|
|
||||||
[#6385]: https://github.com/nymtech/nym/pull/6385
|
|
||||||
[#6369]: https://github.com/nymtech/nym/pull/6369
|
|
||||||
[#6360]: https://github.com/nymtech/nym/pull/6360
|
|
||||||
[#6359]: https://github.com/nymtech/nym/pull/6359
|
|
||||||
[#6354]: https://github.com/nymtech/nym/pull/6354
|
|
||||||
[#6353]: https://github.com/nymtech/nym/pull/6353
|
|
||||||
[#6351]: https://github.com/nymtech/nym/pull/6351
|
|
||||||
[#6350]: https://github.com/nymtech/nym/pull/6350
|
|
||||||
[#6345]: https://github.com/nymtech/nym/pull/6345
|
|
||||||
[#6343]: https://github.com/nymtech/nym/pull/6343
|
|
||||||
[#6339]: https://github.com/nymtech/nym/pull/6339
|
|
||||||
[#6332]: https://github.com/nymtech/nym/pull/6332
|
|
||||||
[#6325]: https://github.com/nymtech/nym/pull/6325
|
|
||||||
[#6311]: https://github.com/nymtech/nym/pull/6311
|
|
||||||
[#6308]: https://github.com/nymtech/nym/pull/6308
|
|
||||||
[#6307]: https://github.com/nymtech/nym/pull/6307
|
|
||||||
[#6302]: https://github.com/nymtech/nym/pull/6302
|
|
||||||
[#6271]: https://github.com/nymtech/nym/pull/6271
|
|
||||||
|
|
||||||
## [2026.3-parmigiano] (2026-02-10)
|
## [2026.3-parmigiano] (2026-02-10)
|
||||||
|
|
||||||
- chore: disable LP on parmigiano branch ([#6422])
|
- chore: disable LP on parmigiano branch ([#6422])
|
||||||
|
|||||||
Generated
+1722
-2500
File diff suppressed because it is too large
Load Diff
+18
-55
@@ -44,7 +44,6 @@ members = [
|
|||||||
"common/cosmwasm-smart-contracts/nym-performance-contract",
|
"common/cosmwasm-smart-contracts/nym-performance-contract",
|
||||||
"common/cosmwasm-smart-contracts/nym-pool-contract",
|
"common/cosmwasm-smart-contracts/nym-pool-contract",
|
||||||
"common/cosmwasm-smart-contracts/vesting-contract",
|
"common/cosmwasm-smart-contracts/vesting-contract",
|
||||||
"common/cosmwasm-smart-contracts/network-monitors-contract",
|
|
||||||
"common/credential-proxy",
|
"common/credential-proxy",
|
||||||
"common/credential-storage",
|
"common/credential-storage",
|
||||||
"common/credential-utils",
|
"common/credential-utils",
|
||||||
@@ -75,6 +74,7 @@ members = [
|
|||||||
"common/nym-id",
|
"common/nym-id",
|
||||||
"common/nym-kcp",
|
"common/nym-kcp",
|
||||||
"common/nym-lp",
|
"common/nym-lp",
|
||||||
|
"common/nym-lp-common",
|
||||||
"common/nym-kkt",
|
"common/nym-kkt",
|
||||||
"common/nym-metrics",
|
"common/nym-metrics",
|
||||||
"common/nym_offline_compact_ecash",
|
"common/nym_offline_compact_ecash",
|
||||||
@@ -129,6 +129,7 @@ members = [
|
|||||||
"nym-browser-extension/storage",
|
"nym-browser-extension/storage",
|
||||||
"nym-credential-proxy/nym-credential-proxy",
|
"nym-credential-proxy/nym-credential-proxy",
|
||||||
"nym-credential-proxy/nym-credential-proxy-requests",
|
"nym-credential-proxy/nym-credential-proxy-requests",
|
||||||
|
"nym-credential-proxy/vpn-api-lib-wasm",
|
||||||
"nym-data-observatory",
|
"nym-data-observatory",
|
||||||
"nym-ip-packet-client",
|
"nym-ip-packet-client",
|
||||||
"nym-network-monitor",
|
"nym-network-monitor",
|
||||||
@@ -148,7 +149,6 @@ members = [
|
|||||||
"sdk/ffi/go",
|
"sdk/ffi/go",
|
||||||
"sdk/ffi/shared",
|
"sdk/ffi/shared",
|
||||||
"sdk/rust/nym-sdk",
|
"sdk/rust/nym-sdk",
|
||||||
"smolmix/core",
|
|
||||||
"service-providers/common",
|
"service-providers/common",
|
||||||
"service-providers/ip-packet-router",
|
"service-providers/ip-packet-router",
|
||||||
"service-providers/network-requester",
|
"service-providers/network-requester",
|
||||||
@@ -159,8 +159,8 @@ members = [
|
|||||||
"tools/internal/mixnet-connectivity-check",
|
"tools/internal/mixnet-connectivity-check",
|
||||||
# "tools/internal/sdk-version-bump",
|
# "tools/internal/sdk-version-bump",
|
||||||
"tools/internal/ssl-inject",
|
"tools/internal/ssl-inject",
|
||||||
"tools/internal/localnet-orchestrator",
|
"tools/internal/testnet-manager",
|
||||||
"tools/internal/localnet-orchestrator/dkg-bypass-contract",
|
"tools/internal/testnet-manager/dkg-bypass-contract",
|
||||||
"tools/internal/validator-status-check",
|
"tools/internal/validator-status-check",
|
||||||
"tools/nym-cli",
|
"tools/nym-cli",
|
||||||
"tools/nym-id-cli",
|
"tools/nym-id-cli",
|
||||||
@@ -174,11 +174,7 @@ members = [
|
|||||||
"wasm/node-tester",
|
"wasm/node-tester",
|
||||||
"wasm/zknym-lib",
|
"wasm/zknym-lib",
|
||||||
"nym-gateway-probe",
|
"nym-gateway-probe",
|
||||||
"integration-tests",
|
"integration-tests", "common/nym-lp-transport", "common/nym-kkt-ciphersuite",
|
||||||
"common/nym-kkt-ciphersuite",
|
|
||||||
"common/nym-kkt-context",
|
|
||||||
"nym-network-monitor-v3/nym-network-monitor-orchestrator",
|
|
||||||
"nym-network-monitor-v3/nym-network-monitor-agent", "nym-network-monitor-v3/nym-network-monitor-orchestrator-requests",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
default-members = [
|
default-members = [
|
||||||
@@ -188,16 +184,14 @@ default-members = [
|
|||||||
"nym-api",
|
"nym-api",
|
||||||
"nym-credential-proxy/nym-credential-proxy",
|
"nym-credential-proxy/nym-credential-proxy",
|
||||||
"nym-node",
|
"nym-node",
|
||||||
|
"nym-node-status-api/nym-node-status-agent",
|
||||||
"nym-statistics-api",
|
"nym-statistics-api",
|
||||||
"nym-validator-rewarder",
|
"nym-validator-rewarder",
|
||||||
"nyx-chain-watcher",
|
"nyx-chain-watcher",
|
||||||
"service-providers/ip-packet-router",
|
"service-providers/ip-packet-router",
|
||||||
"service-providers/network-requester",
|
"service-providers/network-requester",
|
||||||
"tools/nymvisor",
|
"tools/nymvisor",
|
||||||
"nym-registration-client",
|
"nym-registration-client"
|
||||||
"nym-network-monitor-v3/nym-network-monitor-orchestrator",
|
|
||||||
"nym-network-monitor-v3/nym-network-monitor-agent",
|
|
||||||
"tools/internal/localnet-orchestrator"
|
|
||||||
]
|
]
|
||||||
|
|
||||||
exclude = ["contracts", "nym-wallet", "cpu-cycles"]
|
exclude = ["contracts", "nym-wallet", "cpu-cycles"]
|
||||||
@@ -209,7 +203,7 @@ homepage = "https://nymtech.net"
|
|||||||
documentation = "https://nymtech.net"
|
documentation = "https://nymtech.net"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
rust-version = "1.87.0"
|
rust-version = "1.85"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
version = "1.20.4"
|
version = "1.20.4"
|
||||||
|
|
||||||
@@ -239,7 +233,6 @@ bloomfilter = "3.0.1"
|
|||||||
bs58 = "0.5.1"
|
bs58 = "0.5.1"
|
||||||
bytecodec = "0.4.15"
|
bytecodec = "0.4.15"
|
||||||
bytes = "1.11.1"
|
bytes = "1.11.1"
|
||||||
cargo-edit = "0.13.8"
|
|
||||||
cargo_metadata = "0.19.2"
|
cargo_metadata = "0.19.2"
|
||||||
celes = "2.6.0"
|
celes = "2.6.0"
|
||||||
cfg-if = "1.0.0"
|
cfg-if = "1.0.0"
|
||||||
@@ -281,12 +274,10 @@ futures = "0.3.31"
|
|||||||
futures-util = "0.3"
|
futures-util = "0.3"
|
||||||
generic-array = "0.14.7"
|
generic-array = "0.14.7"
|
||||||
getrandom = "0.2.10"
|
getrandom = "0.2.10"
|
||||||
getrandom03 = { package = "getrandom", version = "=0.3.3" }
|
|
||||||
glob = "0.3"
|
glob = "0.3"
|
||||||
handlebars = "3.5.5"
|
handlebars = "3.5.5"
|
||||||
hex = "0.4.3"
|
hex = "0.4.3"
|
||||||
hickory-proto = "0.26.1"
|
hickory-resolver = "0.25.2"
|
||||||
hickory-resolver = "0.26.1"
|
|
||||||
hkdf = "0.12.3"
|
hkdf = "0.12.3"
|
||||||
hmac = "0.12.1"
|
hmac = "0.12.1"
|
||||||
http = "1"
|
http = "1"
|
||||||
@@ -318,10 +309,8 @@ nix = "0.30.1"
|
|||||||
notify = "5.1.0"
|
notify = "5.1.0"
|
||||||
num_enum = "0.7.5"
|
num_enum = "0.7.5"
|
||||||
once_cell = "1.21.3"
|
once_cell = "1.21.3"
|
||||||
opentelemetry = "0.31.0"
|
opentelemetry = "0.19.0"
|
||||||
opentelemetry_sdk = "0.31.0"
|
opentelemetry-jaeger = "0.18.0"
|
||||||
opentelemetry-otlp = "0.31.0"
|
|
||||||
tonic = "0.14.4"
|
|
||||||
parking_lot = "0.12.3"
|
parking_lot = "0.12.3"
|
||||||
pem = "0.8"
|
pem = "0.8"
|
||||||
petgraph = "0.6.5"
|
petgraph = "0.6.5"
|
||||||
@@ -333,20 +322,18 @@ quote = "1"
|
|||||||
rand = "0.8.5"
|
rand = "0.8.5"
|
||||||
rand09 = { package = "rand", version = "=0.9.2" }
|
rand09 = { package = "rand", version = "=0.9.2" }
|
||||||
rand_chacha = "0.3"
|
rand_chacha = "0.3"
|
||||||
rand_chacha09 = { package = "rand_chacha", version = "=0.9.0" }
|
|
||||||
rand_core = "0.6.3"
|
rand_core = "0.6.3"
|
||||||
rand_distr = "0.4"
|
rand_distr = "0.4"
|
||||||
rayon = "1.5.1"
|
rayon = "1.5.1"
|
||||||
regex = "1.10.6"
|
regex = "1.10.6"
|
||||||
reqwest = { version = "0.13.1", default-features = false }
|
reqwest = { version = "0.13.1", default-features = false }
|
||||||
rs_merkle = "1.5.0"
|
rs_merkle = "1.5.0"
|
||||||
rustls = { version = "0.23.37", default-features = false }
|
|
||||||
schemars = "0.8.22"
|
schemars = "0.8.22"
|
||||||
semver = "1.0.26"
|
semver = "1.0.26"
|
||||||
serde = "1.0.219"
|
serde = "1.0.219"
|
||||||
serde_bytes = "0.11.17"
|
serde_bytes = "0.11.17"
|
||||||
serde_derive = "1.0"
|
serde_derive = "1.0"
|
||||||
serde_json = { version = "1.0.140", features = ["float_roundtrip"] }
|
serde_json = "1.0.140"
|
||||||
serde_json_path = "0.7.2"
|
serde_json_path = "0.7.2"
|
||||||
serde_repr = "0.1"
|
serde_repr = "0.1"
|
||||||
serde_with = "3.9.0"
|
serde_with = "3.9.0"
|
||||||
@@ -354,13 +341,11 @@ serde_yaml = "0.9.25"
|
|||||||
serde_plain = "1.0.2"
|
serde_plain = "1.0.2"
|
||||||
sha2 = "0.10.3"
|
sha2 = "0.10.3"
|
||||||
si-scale = "0.2.3"
|
si-scale = "0.2.3"
|
||||||
smolmix = { version = "0.0.1", path = "smolmix/core" }
|
|
||||||
smoltcp = "0.12"
|
|
||||||
snow = "0.9.6"
|
snow = "0.9.6"
|
||||||
sphinx-packet = "=0.6.0"
|
sphinx-packet = "=0.6.0"
|
||||||
sqlx = "0.8.6"
|
sqlx = "0.8.6"
|
||||||
strum = "0.28.0"
|
strum = "0.27.2"
|
||||||
strum_macros = "0.28.0"
|
strum_macros = "0.27.2"
|
||||||
subtle-encoding = "0.5"
|
subtle-encoding = "0.5"
|
||||||
syn = "2"
|
syn = "2"
|
||||||
sysinfo = "0.37.0"
|
sysinfo = "0.37.0"
|
||||||
@@ -376,8 +361,6 @@ tokio-postgres = "0.7"
|
|||||||
tokio-stream = "0.1.17"
|
tokio-stream = "0.1.17"
|
||||||
tokio-test = "0.4.4"
|
tokio-test = "0.4.4"
|
||||||
tokio-tun = "0.11.5"
|
tokio-tun = "0.11.5"
|
||||||
tokio-rustls = "0.26"
|
|
||||||
tokio-smoltcp = "0.5"
|
|
||||||
tokio-tungstenite = { version = "0.20.1" }
|
tokio-tungstenite = { version = "0.20.1" }
|
||||||
tokio-util = "0.7.15"
|
tokio-util = "0.7.15"
|
||||||
toml = "0.8.22"
|
toml = "0.8.22"
|
||||||
@@ -385,11 +368,12 @@ tower = "0.5.2"
|
|||||||
tower-http = "0.6.6"
|
tower-http = "0.6.6"
|
||||||
tracing = "0.1.41"
|
tracing = "0.1.41"
|
||||||
tracing-log = "0.2"
|
tracing-log = "0.2"
|
||||||
tracing-opentelemetry = "0.32.1"
|
tracing-opentelemetry = "0.19.0"
|
||||||
tracing-subscriber = "0.3.20"
|
tracing-subscriber = "0.3.20"
|
||||||
|
tracing-tree = "0.2.2"
|
||||||
tracing-indicatif = "0.3.9"
|
tracing-indicatif = "0.3.9"
|
||||||
tracing-test = "0.2.5"
|
tracing-test = "0.2.5"
|
||||||
ts-rs = "12.0.1"
|
ts-rs = "10.1.0"
|
||||||
tungstenite = { version = "0.20.1", default-features = false }
|
tungstenite = { version = "0.20.1", default-features = false }
|
||||||
typed-builder = "0.23.0"
|
typed-builder = "0.23.0"
|
||||||
uniffi = "0.29.2"
|
uniffi = "0.29.2"
|
||||||
@@ -407,21 +391,6 @@ zeroize = "1.7.0"
|
|||||||
|
|
||||||
prometheus = { version = "0.14.0" }
|
prometheus = { version = "0.14.0" }
|
||||||
|
|
||||||
# recreating lioness
|
|
||||||
# we don't care about particular versions - just pull whatever is used by sphinx
|
|
||||||
lioness = "*"
|
|
||||||
arrayref = "*"
|
|
||||||
|
|
||||||
# libcrux
|
|
||||||
libcrux-kem = "0.0.7"
|
|
||||||
libcrux-ecdh = "0.0.6"
|
|
||||||
libcrux-curve25519 = "0.0.6"
|
|
||||||
libcrux-chacha20poly1305 = "0.0.7"
|
|
||||||
libcrux-psq = "0.0.8"
|
|
||||||
libcrux-ml-kem = "0.0.8"
|
|
||||||
libcrux-sha3 = "0.0.8"
|
|
||||||
libcrux-traits = "0.0.6"
|
|
||||||
|
|
||||||
# Workspace dep definitions required by crates.io publication - we need a workspace version since `cargo workspaces` doesn't work with path imports from crate manifests
|
# Workspace dep definitions required by crates.io publication - we need a workspace version since `cargo workspaces` doesn't work with path imports from crate manifests
|
||||||
nym-api-requests = { version = "1.20.4", path = "nym-api/nym-api-requests" }
|
nym-api-requests = { version = "1.20.4", path = "nym-api/nym-api-requests" }
|
||||||
nym-authenticator-requests = { version = "1.20.4", path = "common/authenticator-requests" }
|
nym-authenticator-requests = { version = "1.20.4", path = "common/authenticator-requests" }
|
||||||
@@ -456,7 +425,6 @@ nym-ecash-time = { version = "1.20.4", path = "common/ecash-time" }
|
|||||||
nym-exit-policy = { version = "1.20.4", path = "common/exit-policy" }
|
nym-exit-policy = { version = "1.20.4", path = "common/exit-policy" }
|
||||||
nym-ffi-shared = { version = "1.20.4", path = "sdk/ffi/shared" }
|
nym-ffi-shared = { version = "1.20.4", path = "sdk/ffi/shared" }
|
||||||
nym-gateway-client = { version = "1.20.4", path = "common/client-libs/gateway-client", default-features = false }
|
nym-gateway-client = { version = "1.20.4", path = "common/client-libs/gateway-client", default-features = false }
|
||||||
nym-gateway-probe = { version = "1.18.0", path = "nym-gateway-probe" }
|
|
||||||
nym-gateway-requests = { version = "1.20.4", path = "common/gateway-requests" }
|
nym-gateway-requests = { version = "1.20.4", path = "common/gateway-requests" }
|
||||||
nym-gateway-storage = { version = "1.20.4", path = "common/gateway-storage" }
|
nym-gateway-storage = { version = "1.20.4", path = "common/gateway-storage" }
|
||||||
nym-gateway-stats-storage = { version = "1.20.4", path = "common/gateway-stats-storage" }
|
nym-gateway-stats-storage = { version = "1.20.4", path = "common/gateway-stats-storage" }
|
||||||
@@ -467,10 +435,7 @@ nym-http-api-common = { version = "1.20.4", path = "common/http-api-common", def
|
|||||||
nym-id = { version = "1.20.4", path = "common/nym-id" }
|
nym-id = { version = "1.20.4", path = "common/nym-id" }
|
||||||
nym-ip-packet-client = { version = "1.20.4", path = "nym-ip-packet-client" }
|
nym-ip-packet-client = { version = "1.20.4", path = "nym-ip-packet-client" }
|
||||||
nym-ip-packet-requests = { version = "1.20.4", path = "common/ip-packet-requests" }
|
nym-ip-packet-requests = { version = "1.20.4", path = "common/ip-packet-requests" }
|
||||||
nym-lp = { version = "1.20.4", path = "common/nym-lp" }
|
nym-kkt-ciphersuite = { path = "common/nym-kkt-ciphersuite" }
|
||||||
nym-kkt = { version = "0.1.0", path = "common/nym-kkt" }
|
|
||||||
nym-kkt-ciphersuite = { version = "1.20.4", path = "common/nym-kkt-ciphersuite" }
|
|
||||||
nym-kkt-context = { version = "1.20.4", path = "common/nym-kkt-context" }
|
|
||||||
nym-metrics = { version = "1.20.4", path = "common/nym-metrics" }
|
nym-metrics = { version = "1.20.4", path = "common/nym-metrics" }
|
||||||
nym-mixnet-client = { version = "1.20.4", path = "common/client-libs/mixnet-client" }
|
nym-mixnet-client = { version = "1.20.4", path = "common/client-libs/mixnet-client" }
|
||||||
nym-mixnet-contract-common = { version = "1.20.4", path = "common/cosmwasm-smart-contracts/mixnet-contract" }
|
nym-mixnet-contract-common = { version = "1.20.4", path = "common/cosmwasm-smart-contracts/mixnet-contract" }
|
||||||
@@ -516,7 +481,6 @@ nym-types = { version = "1.20.4", path = "common/types" }
|
|||||||
nym-upgrade-mode-check = { version = "1.20.4", path = "common/upgrade-mode-check" }
|
nym-upgrade-mode-check = { version = "1.20.4", path = "common/upgrade-mode-check" }
|
||||||
nym-validator-client = { version = "1.20.4", path = "common/client-libs/validator-client", default-features = false }
|
nym-validator-client = { version = "1.20.4", path = "common/client-libs/validator-client", default-features = false }
|
||||||
nym-vesting-contract-common = { version = "1.20.4", path = "common/cosmwasm-smart-contracts/vesting-contract" }
|
nym-vesting-contract-common = { version = "1.20.4", path = "common/cosmwasm-smart-contracts/vesting-contract" }
|
||||||
nym-network-monitors-contract-common = { version = "1.20.4", path = "common/cosmwasm-smart-contracts/network-monitors-contract" }
|
|
||||||
nym-verloc = { version = "1.20.4", path = "common/verloc" }
|
nym-verloc = { version = "1.20.4", path = "common/verloc" }
|
||||||
nym-wireguard = { version = "1.20.4", path = "common/wireguard" }
|
nym-wireguard = { version = "1.20.4", path = "common/wireguard" }
|
||||||
nym-wireguard-types = { version = "1.20.4", path = "common/wireguard-types" }
|
nym-wireguard-types = { version = "1.20.4", path = "common/wireguard-types" }
|
||||||
@@ -575,7 +539,6 @@ wasm-bindgen = "0.2.99"
|
|||||||
wasm-bindgen-futures = "0.4.49"
|
wasm-bindgen-futures = "0.4.49"
|
||||||
wasm-bindgen-test = "0.3.49"
|
wasm-bindgen-test = "0.3.49"
|
||||||
wasmtimer = "0.4.1"
|
wasmtimer = "0.4.1"
|
||||||
webpki-roots = "0.26"
|
|
||||||
web-sys = "0.3.76"
|
web-sys = "0.3.76"
|
||||||
|
|
||||||
# for local development:
|
# for local development:
|
||||||
|
|||||||
@@ -104,11 +104,11 @@ $(eval $(call add_cargo_workspace,wallet,nym-wallet))
|
|||||||
sdk-wasm: sdk-wasm-build sdk-wasm-test sdk-wasm-lint
|
sdk-wasm: sdk-wasm-build sdk-wasm-test sdk-wasm-lint
|
||||||
|
|
||||||
sdk-wasm-build:
|
sdk-wasm-build:
|
||||||
# $(MAKE) -C nym-browser-extension/storage wasm-pack
|
$(MAKE) -C nym-browser-extension/storage wasm-pack
|
||||||
$(MAKE) -C wasm/client
|
$(MAKE) -C wasm/client
|
||||||
$(MAKE) -C wasm/node-tester
|
$(MAKE) -C wasm/node-tester
|
||||||
$(MAKE) -C wasm/mix-fetch
|
$(MAKE) -C wasm/mix-fetch
|
||||||
# $(MAKE) -C wasm/zknym-lib
|
$(MAKE) -C wasm/zknym-lib
|
||||||
# $(MAKE) -C wasm/full-nym-wasm
|
# $(MAKE) -C wasm/full-nym-wasm
|
||||||
|
|
||||||
# run this from npm/yarn to ensure tools are in the path, e.g. yarn build:sdk from root of repo
|
# run this from npm/yarn to ensure tools are in the path, e.g. yarn build:sdk from root of repo
|
||||||
@@ -119,14 +119,13 @@ sdk-typescript-build:
|
|||||||
yarn --cwd sdk/typescript/codegen/contract-clients build
|
yarn --cwd sdk/typescript/codegen/contract-clients build
|
||||||
|
|
||||||
# NOTE: These targets are part of the main workspace (but not as wasm32-unknown-unknown)
|
# NOTE: These targets are part of the main workspace (but not as wasm32-unknown-unknown)
|
||||||
# WASM_CRATES = extension-storage nym-client-wasm nym-node-tester-wasm zknym-lib
|
WASM_CRATES = extension-storage nym-client-wasm nym-node-tester-wasm zknym-lib
|
||||||
WASM_CRATES = nym-client-wasm nym-node-tester-wasm
|
|
||||||
|
|
||||||
sdk-wasm-test:
|
sdk-wasm-test:
|
||||||
#cargo test $(addprefix -p , $(WASM_CRATES)) --target wasm32-unknown-unknown -- -Dwarnings
|
#cargo test $(addprefix -p , $(WASM_CRATES)) --target wasm32-unknown-unknown -- -Dwarnings
|
||||||
|
|
||||||
sdk-wasm-lint:
|
sdk-wasm-lint:
|
||||||
RUSTFLAGS='--cfg getrandom_backend="wasm_js"' cargo clippy $(addprefix -p , $(WASM_CRATES)) --target wasm32-unknown-unknown -- -Dwarnings
|
cargo clippy $(addprefix -p , $(WASM_CRATES)) --target wasm32-unknown-unknown -- -Dwarnings
|
||||||
$(MAKE) -C wasm/mix-fetch check-fmt
|
$(MAKE) -C wasm/mix-fetch check-fmt
|
||||||
|
|
||||||
# Add to top-level targets
|
# Add to top-level targets
|
||||||
|
|||||||
@@ -30,11 +30,8 @@ client ───► Gateway ──┘ mix │ mix ┌─►mix ───►
|
|||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
<!-- This is broken
|
|
||||||
[](https://github.com/nymtech/nym/actions?query=branch%3Adevelop)
|
[](https://github.com/nymtech/nym/actions?query=branch%3Adevelop)
|
||||||
-->
|
|
||||||
|
|
||||||
> This project integrates with the Midnight Network
|
|
||||||
|
|
||||||
### Building
|
### Building
|
||||||
|
|
||||||
|
|||||||
@@ -1,38 +1,32 @@
|
|||||||
---
|
---
|
||||||
ansible_ssh_private_key_file: ~/.ssh/<SSH_KEY>
|
ansible_ssh_private_key_file: ~/.ssh/<SSH_KEY>
|
||||||
|
|
||||||
|
# nym_version: "v2025.21-mozzarella"
|
||||||
|
#
|
||||||
|
# NOTE:
|
||||||
|
# if you want to pin Nym to a specific version instead of using the
|
||||||
|
# latest release from GitHub in /tasks/main.yml then
|
||||||
|
# uncomment the line above and set the tag
|
||||||
|
|
||||||
cli_url: "https://github.com/nymtech/nym/releases/download/nym-binaries-{{ nym_version }}/nym-cli"
|
cli_url: "https://github.com/nymtech/nym/releases/download/nym-binaries-{{ nym_version }}/nym-cli"
|
||||||
tunnel_manager_url: "https://github.com/nymtech/nym/raw/refs/heads/develop/scripts/nym-node-setup/network-tunnel-manager.sh"
|
tunnel_manager_url: "https://github.com/nymtech/nym/raw/refs/heads/develop/scripts/nym-node-setup/network-tunnel-manager.sh"
|
||||||
quic_bridge_deployment_url: "https://raw.githubusercontent.com/nymtech/nym/refs/heads/develop/scripts/nym-node-setup/quic_bridge_deployment.sh"
|
quic_bridge_deployment_url: "https://raw.githubusercontent.com/nymtech/nym/refs/heads/develop/scripts/nym-node-setup/quic_bridge_deployment.sh"
|
||||||
|
|
||||||
###############################################################################
|
# NOTE: These values will be used globally unless overwritten per node in inventory/all
|
||||||
## GLOBAL VARS
|
|
||||||
## These values will be used globally unless overwritten per node in inventory/all
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
ansible_user: root # used for ssh, like `ssh root@nym-exit.ch-1.mynodes.net`
|
ansible_user: root # used for ssh, like `ssh root@nym-exit.ch-1.mynodes.net`
|
||||||
email: "<EMAIL>" # used in certbot, description.toml and landing page
|
email: "<EMAIL>" # used in certbot, description.toml and landing page
|
||||||
website: "<WEBSITE>" # it is used in the description.toml
|
website: "<WEBSITE>" # it is used in the description.toml
|
||||||
description: "<NODE_PUBLIC_DESCRIPTION>" # or define per node in inventory/all
|
description: "<NODE_PUBLIC_DESCRIPTION>" # or define per node in inventory/all
|
||||||
# operator_name: "<OPERATOR_NAME>" # used in landing page if provided
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
## GLOBAL VARS
|
|
||||||
## These values will be used globally unless overwritten per node in inventory/all
|
|
||||||
## Set these vars only if you want them globally for all nodes
|
|
||||||
## Per node changes in inventory/all will overwrite these global vars
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
|
# NOTE: Set these vars if you want them globally for all nodes
|
||||||
|
# Per node changes in inventory/all will overwrite these global ones:
|
||||||
|
hostname: "" # this is a fallback, keep it and setup hostname per node in inventory/all
|
||||||
# moniker: "<MONIKER>" # if not setup here not in inventory/all it get's derived from the hostname
|
# moniker: "<MONIKER>" # if not setup here not in inventory/all it get's derived from the hostname
|
||||||
# mode: <MODE> # entry-gateway/exit-gateway/mixnode
|
# mode: <MODE> # entry-gateway/exit-gateway/mixnode
|
||||||
# wireguard_enabled: <WIREGUARD_ENABLED> # true/false
|
# wireguard_enabled: <WIREGUARD_ENABLED> # true/false
|
||||||
hostname: "" # this is a fallback, keep it and setup hostname per node in inventory/all
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
## GLOBAL PACKAGES
|
|
||||||
## These will be installed during deployment
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
|
# NOTE: Possible vars to incule on landing page, etc.
|
||||||
|
# operator_name: "<OPERATOR_NAME>"
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
- tmux
|
- tmux
|
||||||
@@ -48,74 +42,3 @@ packages:
|
|||||||
- jq
|
- jq
|
||||||
- wget
|
- wget
|
||||||
- ufw
|
- ufw
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
## OPTIONAL OVERRIDES
|
|
||||||
## All values below already have defaults in the playbook/roles
|
|
||||||
## Uncomment only if you want to override them
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
## SYSTEM MAINTENANCE PLAYBOOK KNOBS
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
# To use particular version instead of Latest, provide in such form:
|
|
||||||
# nym_version: "nym-binaries-v2026.7-tola"
|
|
||||||
|
|
||||||
## NOTE:
|
|
||||||
## if you want to pin Nym to a specific version instead of using the
|
|
||||||
## latest release from GitHub in /tasks/main.yml then
|
|
||||||
## uncomment the line above and set the tag
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
## SYSTEM MAINTENANCE PLAYBOOK KNOBS
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
## JOURNALD LIMITS
|
|
||||||
|
|
||||||
# journald_system_max_use: "100M" # max persistent journal size
|
|
||||||
# journald_runtime_max_use: "50M" # max runtime journal size
|
|
||||||
# journald_system_max_file_size: "25M" # max single journal file
|
|
||||||
# journald_runtime_max_file_size: "10M" # max runtime journal file
|
|
||||||
# journald_max_retention_sec: "3day" # retention time
|
|
||||||
|
|
||||||
# journald_rate_limit_interval: "30s" # rate limit window
|
|
||||||
# journald_rate_limit_burst: "1000" # rate limit burst
|
|
||||||
|
|
||||||
|
|
||||||
## NYM-NODE LOG CONTROL
|
|
||||||
|
|
||||||
# nymnode_log_level_max: "warning" # drop INFO logs
|
|
||||||
# nymnode_rate_limit_interval: "30s" # per nym-node rate limit window
|
|
||||||
# nymnode_rate_limit_burst: "200" # per nym-node rate limit burst
|
|
||||||
|
|
||||||
|
|
||||||
## JOURNAL VACUUM TARGETS
|
|
||||||
|
|
||||||
# journal_vacuum_size: "100M"
|
|
||||||
# journal_vacuum_time: "3days"
|
|
||||||
|
|
||||||
|
|
||||||
## RSYSLOG
|
|
||||||
|
|
||||||
# disable_rsyslog: true
|
|
||||||
|
|
||||||
|
|
||||||
## FSTRIM SCHEDULE
|
|
||||||
|
|
||||||
# fstrim_every_calendar: "*:0/15" # Aggressive
|
|
||||||
# fstrim_every_calendar: "hourly" # Less aggressive
|
|
||||||
|
|
||||||
|
|
||||||
## OPTIONAL CLEANUPS
|
|
||||||
|
|
||||||
# enable_apt_cleanup: true
|
|
||||||
# enable_snap_cleanup: true
|
|
||||||
|
|
||||||
|
|
||||||
## WRITEBACK TUNING
|
|
||||||
|
|
||||||
# enable_writeback_tuning: true
|
|
||||||
# writeback_dirty_writeback_centisecs: 1500
|
|
||||||
# writeback_dirty_expire_centisecs: 6000
|
|
||||||
|
|||||||
@@ -1,38 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Restrict logging, vacuum journals, and enable periodic trim
|
|
||||||
hosts: all
|
|
||||||
become: true
|
|
||||||
gather_facts: false
|
|
||||||
|
|
||||||
# global knobs - override in inventory/group_vars/host_vars as needed
|
|
||||||
vars:
|
|
||||||
journald_system_max_use: "100M"
|
|
||||||
journald_runtime_max_use: "50M"
|
|
||||||
journald_system_max_file_size: "25M"
|
|
||||||
journald_runtime_max_file_size: "10M"
|
|
||||||
journald_max_retention_sec: "3day"
|
|
||||||
journald_rate_limit_interval: "30s"
|
|
||||||
journald_rate_limit_burst: "1000"
|
|
||||||
|
|
||||||
# per nym-node rate limit + level cap
|
|
||||||
nymnode_log_level_max: "warning"
|
|
||||||
nymnode_rate_limit_interval: "30s"
|
|
||||||
nymnode_rate_limit_burst: "200"
|
|
||||||
|
|
||||||
# journal vacuum targets
|
|
||||||
journal_vacuum_size: "100M"
|
|
||||||
journal_vacuum_time: "3days"
|
|
||||||
|
|
||||||
# fstrim cadence (note: the systemd override uses cron-like calendar)
|
|
||||||
fstrim_every_calendar: "*:0/15"
|
|
||||||
|
|
||||||
roles:
|
|
||||||
- role: journald_limits
|
|
||||||
- role: nymnode_logging
|
|
||||||
- role: rsyslog_disable
|
|
||||||
- role: journal_vacuum
|
|
||||||
- role: classic_log_cleanup
|
|
||||||
- role: apt_cleanup
|
|
||||||
- role: snap_cleanup
|
|
||||||
- role: fstrim_15min
|
|
||||||
- role: report
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Clean apt cache
|
|
||||||
command: apt-get clean
|
|
||||||
ignore_errors: true
|
|
||||||
|
|
||||||
- name: Autoremove unused packages
|
|
||||||
command: apt-get -y autoremove
|
|
||||||
ignore_errors: true
|
|
||||||
|
|
||||||
- name: Remove apt lists to reclaim space (they will be re-fetched on update)
|
|
||||||
file:
|
|
||||||
path: /var/lib/apt/lists
|
|
||||||
state: absent
|
|
||||||
ignore_errors: true
|
|
||||||
|
|
||||||
- name: Recreate apt lists directory
|
|
||||||
file:
|
|
||||||
path: /var/lib/apt/lists
|
|
||||||
state: directory
|
|
||||||
mode: "0755"
|
|
||||||
ignore_errors: true
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Remove classic /var/log files if present (optional)
|
|
||||||
file:
|
|
||||||
path: "{{ item }}"
|
|
||||||
state: absent
|
|
||||||
loop:
|
|
||||||
- /var/log/syslog
|
|
||||||
- /var/log/syslog.1
|
|
||||||
- /var/log/kern.log
|
|
||||||
- /var/log/kern.log.1
|
|
||||||
- /var/log/auth.log
|
|
||||||
- /var/log/auth.log.1
|
|
||||||
- /var/log/ufw.log
|
|
||||||
- /var/log/ufw.log.1
|
|
||||||
ignore_errors: true
|
|
||||||
|
|
||||||
# This is best-effort and may still fail if other packages' postrotate scripts assume services exist.
|
|
||||||
- name: Force logrotate (best-effort)
|
|
||||||
command: "logrotate --force /etc/logrotate.conf"
|
|
||||||
ignore_errors: true
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
---
|
|
||||||
fstrim_timer_dropin_dir: "/etc/systemd/system/fstrim.timer.d"
|
|
||||||
fstrim_every_calendar: "*:0/15"
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Ensure systemd drop-in dir for fstrim.timer exists
|
|
||||||
file:
|
|
||||||
path: "{{ fstrim_timer_dropin_dir }}"
|
|
||||||
state: directory
|
|
||||||
mode: "0755"
|
|
||||||
|
|
||||||
- name: Override fstrim.timer schedule
|
|
||||||
copy:
|
|
||||||
dest: "{{ fstrim_timer_dropin_dir }}/override.conf"
|
|
||||||
mode: "0644"
|
|
||||||
content: |
|
|
||||||
[Timer]
|
|
||||||
OnCalendar=
|
|
||||||
OnCalendar={{ fstrim_every_calendar }}
|
|
||||||
Persistent=true
|
|
||||||
RandomizedDelaySec=0
|
|
||||||
|
|
||||||
- name: Reload systemd after fstrim override
|
|
||||||
systemd:
|
|
||||||
daemon_reload: true
|
|
||||||
|
|
||||||
- name: Enable and start fstrim timer
|
|
||||||
systemd:
|
|
||||||
name: fstrim.timer
|
|
||||||
enabled: true
|
|
||||||
state: started
|
|
||||||
|
|
||||||
- name: Run fstrim now (best-effort)
|
|
||||||
command: fstrim -av
|
|
||||||
ignore_errors: true
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
---
|
|
||||||
journal_vacuum_size: "100M"
|
|
||||||
journal_vacuum_time: "3days"
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Vacuum journal to size cap (hard)
|
|
||||||
command: "journalctl --vacuum-size={{ journal_vacuum_size }}"
|
|
||||||
|
|
||||||
- name: Vacuum journal older than retention window (time)
|
|
||||||
command: "journalctl --vacuum-time={{ journal_vacuum_time }}"
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
---
|
|
||||||
journald_system_max_use: "100M"
|
|
||||||
journald_runtime_max_use: "50M"
|
|
||||||
journald_system_max_file_size: "25M"
|
|
||||||
journald_runtime_max_file_size: "10M"
|
|
||||||
journald_max_retention_sec: "3day"
|
|
||||||
journald_rate_limit_interval: "30s"
|
|
||||||
journald_rate_limit_burst: "1000"
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Restart journald
|
|
||||||
systemd:
|
|
||||||
name: systemd-journald
|
|
||||||
state: restarted
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Configure journald limits (persistent, capped, rate-limited)
|
|
||||||
copy:
|
|
||||||
dest: /etc/systemd/journald.conf
|
|
||||||
mode: "0644"
|
|
||||||
content: |
|
|
||||||
[Journal]
|
|
||||||
Storage=persistent
|
|
||||||
Compress=yes
|
|
||||||
Seal=yes
|
|
||||||
|
|
||||||
SystemMaxUse={{ journald_system_max_use }}
|
|
||||||
RuntimeMaxUse={{ journald_runtime_max_use }}
|
|
||||||
SystemMaxFileSize={{ journald_system_max_file_size }}
|
|
||||||
RuntimeMaxFileSize={{ journald_runtime_max_file_size }}
|
|
||||||
MaxRetentionSec={{ journald_max_retention_sec }}
|
|
||||||
|
|
||||||
RateLimitIntervalSec={{ journald_rate_limit_interval }}
|
|
||||||
RateLimitBurst={{ journald_rate_limit_burst }}
|
|
||||||
notify: Restart journald
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
---
|
|
||||||
nymnode_log_level_max: "warning"
|
|
||||||
nymnode_rate_limit_interval: "30s"
|
|
||||||
nymnode_rate_limit_burst: "200"
|
|
||||||
nymnode_unit_name: "nym-node" # set to "nym-node.service" if your distro expects it
|
|
||||||
nymnode_dropin_dir: "/etc/systemd/system/nym-node.service.d"
|
|
||||||
nymnode_dropin_file: "10-logging.conf"
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Ensure systemd drop-in dir for nym-node exists
|
|
||||||
file:
|
|
||||||
path: "{{ nymnode_dropin_dir }}"
|
|
||||||
state: directory
|
|
||||||
mode: "0755"
|
|
||||||
|
|
||||||
- name: Cap nym-node logs + apply per-unit rate limiting
|
|
||||||
copy:
|
|
||||||
dest: "{{ nymnode_dropin_dir }}/{{ nymnode_dropin_file }}"
|
|
||||||
mode: "0644"
|
|
||||||
content: |
|
|
||||||
[Service]
|
|
||||||
LogLevelMax={{ nymnode_log_level_max }}
|
|
||||||
LogRateLimitIntervalSec={{ nymnode_rate_limit_interval }}
|
|
||||||
LogRateLimitBurst={{ nymnode_rate_limit_burst }}
|
|
||||||
|
|
||||||
- name: Reload systemd after nym-node drop-in
|
|
||||||
systemd:
|
|
||||||
daemon_reload: true
|
|
||||||
|
|
||||||
- name: Restart nym-node to apply new logging limits (best-effort)
|
|
||||||
systemd:
|
|
||||||
name: "{{ nymnode_unit_name }}"
|
|
||||||
state: restarted
|
|
||||||
ignore_errors: true
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Show journal disk usage
|
|
||||||
command: journalctl --disk-usage
|
|
||||||
register: journal_usage
|
|
||||||
changed_when: false
|
|
||||||
|
|
||||||
- debug:
|
|
||||||
var: journal_usage.stdout
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Stop/disable rsyslog if installed (best-effort)
|
|
||||||
systemd:
|
|
||||||
name: rsyslog
|
|
||||||
state: stopped
|
|
||||||
enabled: false
|
|
||||||
ignore_errors: true
|
|
||||||
|
|
||||||
- name: Remove rsyslog logrotate stanza if present (prevents logrotate failures)
|
|
||||||
file:
|
|
||||||
path: /etc/logrotate.d/rsyslog
|
|
||||||
state: absent
|
|
||||||
ignore_errors: true
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Remove disabled snap revisions (best-effort)
|
|
||||||
shell: |
|
|
||||||
set -euo pipefail
|
|
||||||
snap list --all | awk '/disabled/{print $1, $3}' | while read -r name rev; do
|
|
||||||
snap remove "$name" --revision="$rev" || true
|
|
||||||
done
|
|
||||||
args:
|
|
||||||
executable: /bin/bash
|
|
||||||
ignore_errors: true
|
|
||||||
@@ -1,30 +1,11 @@
|
|||||||
---
|
---
|
||||||
- name: Ensure nym binaries directory exists
|
- name: Configure tunnel manager
|
||||||
file:
|
|
||||||
path: /root/nym-binaries
|
|
||||||
state: directory
|
|
||||||
mode: "0755"
|
|
||||||
tags:
|
tags:
|
||||||
- tunnel
|
|
||||||
- network_tunnel_manager
|
- network_tunnel_manager
|
||||||
- ntm
|
become: true
|
||||||
|
command:
|
||||||
- name: Download network tunnel manager
|
cmd: "/root/nym-binaries/network-tunnel-manager.sh {{ item }}"
|
||||||
get_url:
|
|
||||||
url: "{{ tunnel_manager_url }}"
|
|
||||||
dest: /root/nym-binaries/network-tunnel-manager.sh
|
|
||||||
mode: "0755"
|
|
||||||
force: yes
|
|
||||||
tags:
|
|
||||||
- tunnel
|
|
||||||
- network_tunnel_manager
|
|
||||||
- ntm
|
|
||||||
|
|
||||||
- name: Run network tunnel manager
|
|
||||||
command: "/root/nym-binaries/network-tunnel-manager.sh {{ item }}"
|
|
||||||
loop:
|
loop:
|
||||||
- complete_networking_configuration
|
- complete_networking_configuration
|
||||||
tags:
|
register: tunnel_mgr
|
||||||
- tunnel
|
failed_when: false
|
||||||
- network_tunnel_manager
|
|
||||||
- ntm
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "nym-client"
|
name = "nym-client"
|
||||||
description = "Implementation of the Nym Client"
|
version = "1.1.70"
|
||||||
version = "1.1.77"
|
|
||||||
authors = ["Dave Hrycyszyn <futurechimp@users.noreply.github.com>", "Jędrzej Stuczyński <andrew@nymtech.net>"]
|
authors = ["Dave Hrycyszyn <futurechimp@users.noreply.github.com>", "Jędrzej Stuczyński <andrew@nymtech.net>"]
|
||||||
|
description = "Implementation of the Nym Client"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license.workspace = true
|
|
||||||
rust-version = "1.85"
|
rust-version = "1.85"
|
||||||
|
license.workspace = true
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|||||||
+12
-12
@@ -513,9 +513,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/ajv": {
|
"node_modules/ajv": {
|
||||||
"version": "8.18.0",
|
"version": "8.17.1",
|
||||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.18.0.tgz",
|
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz",
|
||||||
"integrity": "sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==",
|
"integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"fast-deep-equal": "^3.1.3",
|
"fast-deep-equal": "^3.1.3",
|
||||||
"fast-uri": "^3.0.1",
|
"fast-uri": "^3.0.1",
|
||||||
@@ -3067,9 +3067,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/qs": {
|
"node_modules/qs": {
|
||||||
"version": "6.14.2",
|
"version": "6.14.1",
|
||||||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.14.2.tgz",
|
"resolved": "https://registry.npmjs.org/qs/-/qs-6.14.1.tgz",
|
||||||
"integrity": "sha512-V/yCWTTF7VJ9hIh18Ugr2zhJMP01MY7c5kh4J870L7imm6/DIzBsNLTXzMwUA3yZ5b/KBqLx8Kp3uRvd7xSe3Q==",
|
"integrity": "sha512-4EK3+xJl8Ts67nLYNwqw/dsFVnCf+qR7RgXSK9jEEm9unao3njwMDdmsdvoKBKHzxd7tCYz5e5M+SnMjdtXGQQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"side-channel": "^1.1.0"
|
"side-channel": "^1.1.0"
|
||||||
@@ -4989,9 +4989,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ajv": {
|
"ajv": {
|
||||||
"version": "8.18.0",
|
"version": "8.17.1",
|
||||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.18.0.tgz",
|
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz",
|
||||||
"integrity": "sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==",
|
"integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"fast-deep-equal": "^3.1.3",
|
"fast-deep-equal": "^3.1.3",
|
||||||
"fast-uri": "^3.0.1",
|
"fast-uri": "^3.0.1",
|
||||||
@@ -6870,9 +6870,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"qs": {
|
"qs": {
|
||||||
"version": "6.14.2",
|
"version": "6.14.1",
|
||||||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.14.2.tgz",
|
"resolved": "https://registry.npmjs.org/qs/-/qs-6.14.1.tgz",
|
||||||
"integrity": "sha512-V/yCWTTF7VJ9hIh18Ugr2zhJMP01MY7c5kh4J870L7imm6/DIzBsNLTXzMwUA3yZ5b/KBqLx8Kp3uRvd7xSe3Q==",
|
"integrity": "sha512-4EK3+xJl8Ts67nLYNwqw/dsFVnCf+qR7RgXSK9jEEm9unao3njwMDdmsdvoKBKHzxd7tCYz5e5M+SnMjdtXGQQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"side-channel": "^1.1.0"
|
"side-channel": "^1.1.0"
|
||||||
|
|||||||
@@ -1,16 +1,13 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "nym-client-websocket-requests"
|
name = "nym-client-websocket-requests"
|
||||||
description = "Request and response definitions for Nym client websocket connections"
|
|
||||||
version.workspace = true
|
version.workspace = true
|
||||||
authors = ["Jędrzej Stuczyński <andrew@nymtech.net>"]
|
authors = ["Jędrzej Stuczyński <andrew@nymtech.net>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license.workspace = true
|
license.workspace = true
|
||||||
|
description = "Request and response definitions for Nym client websocket connections"
|
||||||
repository.workspace = true
|
repository.workspace = true
|
||||||
homepage.workspace = true
|
homepage.workspace = true
|
||||||
documentation.workspace = true
|
documentation.workspace = true
|
||||||
rust-version.workspace = true
|
|
||||||
readme.workspace = true
|
|
||||||
publish = true
|
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "nym-socks5-client"
|
name = "nym-socks5-client"
|
||||||
description = "A SOCKS5 localhost proxy that converts incoming messages to Sphinx and sends them to a Nym address"
|
version = "1.1.70"
|
||||||
version = "1.1.77"
|
|
||||||
authors = ["Dave Hrycyszyn <futurechimp@users.noreply.github.com>"]
|
authors = ["Dave Hrycyszyn <futurechimp@users.noreply.github.com>"]
|
||||||
|
description = "A SOCKS5 localhost proxy that converts incoming messages to Sphinx and sends them to a Nym address"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license.workspace = true
|
|
||||||
rust-version = "1.85"
|
rust-version = "1.85"
|
||||||
|
license.workspace = true
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|||||||
@@ -1,16 +1,12 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "nym-async-file-watcher"
|
name = "nym-async-file-watcher"
|
||||||
description = "Simple file watcher that sends a notification whenever there was any change in the watched file"
|
|
||||||
version.workspace = true
|
version.workspace = true
|
||||||
authors.workspace = true
|
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
license.workspace = true
|
license.workspace = true
|
||||||
|
description = "Simple file watcher that sends a notification whenever there was any change in the watched file"
|
||||||
repository.workspace = true
|
repository.workspace = true
|
||||||
homepage.workspace = true
|
homepage.workspace = true
|
||||||
documentation.workspace = true
|
documentation.workspace = true
|
||||||
rust-version.workspace = true
|
|
||||||
readme.workspace = true
|
|
||||||
publish = true
|
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,13 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "nym-authenticator-requests"
|
name = "nym-authenticator-requests"
|
||||||
description = "Crate defining requests and responses for the Nym authenticator client"
|
|
||||||
version.workspace = true
|
version.workspace = true
|
||||||
authors.workspace = true
|
authors.workspace = true
|
||||||
edition.workspace = true
|
|
||||||
license.workspace = true
|
|
||||||
repository.workspace = true
|
repository.workspace = true
|
||||||
homepage.workspace = true
|
homepage.workspace = true
|
||||||
documentation.workspace = true
|
documentation.workspace = true
|
||||||
rust-version.workspace = true
|
edition.workspace = true
|
||||||
readme.workspace = true
|
license.workspace = true
|
||||||
publish = true
|
description = "Crate defining requests and responses for the Nym authenticator client"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
base64 = { workspace = true }
|
base64 = { workspace = true }
|
||||||
|
|||||||
@@ -1,16 +1,12 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "nym-bandwidth-controller"
|
name = "nym-bandwidth-controller"
|
||||||
description = "Crate for controlling the use of zknym credentials to ensure constant bandwidth availability for NymVPN app"
|
|
||||||
version.workspace = true
|
version.workspace = true
|
||||||
authors.workspace = true
|
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license.workspace = true
|
license.workspace = true
|
||||||
|
description = "Crate for controlling the use of zknym credentials to ensure constant bandwidth availability for NymVPN app"
|
||||||
repository.workspace = true
|
repository.workspace = true
|
||||||
homepage.workspace = true
|
homepage.workspace = true
|
||||||
documentation.workspace = true
|
documentation.workspace = true
|
||||||
rust-version.workspace = true
|
|
||||||
readme.workspace = true
|
|
||||||
publish = true
|
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ where
|
|||||||
let signing_key = ed25519::PrivateKey::new(&mut rng);
|
let signing_key = ed25519::PrivateKey::new(&mut rng);
|
||||||
let expiration = expiration.unwrap_or_else(ecash_default_expiration_date);
|
let expiration = expiration.unwrap_or_else(ecash_default_expiration_date);
|
||||||
|
|
||||||
let deposit_amount = client.get_default_deposit_amount().await?;
|
let deposit_amount = client.get_required_deposit_amount().await?;
|
||||||
info!("we'll need to deposit {deposit_amount} to obtain the ticketbook");
|
info!("we'll need to deposit {deposit_amount} to obtain the ticketbook");
|
||||||
let result = client
|
let result = client
|
||||||
.make_ticketbook_deposit(
|
.make_ticketbook_deposit(
|
||||||
|
|||||||
@@ -1,16 +1,11 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "nym-bin-common"
|
name = "nym-bin-common"
|
||||||
description = "Common code for nym binaries"
|
|
||||||
version.workspace = true
|
version.workspace = true
|
||||||
authors = { workspace = true }
|
description = "Common code for nym binaries"
|
||||||
edition = { workspace = true }
|
edition = { workspace = true }
|
||||||
|
authors = { workspace = true }
|
||||||
license = { workspace = true }
|
license = { workspace = true }
|
||||||
repository = { workspace = true }
|
repository = { workspace = true }
|
||||||
homepage.workspace = true
|
|
||||||
documentation.workspace = true
|
|
||||||
rust-version.workspace = true
|
|
||||||
readme.workspace = true
|
|
||||||
publish = true
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { workspace = true, features = ["derive"], optional = true }
|
clap = { workspace = true, features = ["derive"], optional = true }
|
||||||
@@ -24,15 +19,12 @@ serde_json = { workspace = true, optional = true }
|
|||||||
|
|
||||||
## tracing
|
## tracing
|
||||||
tracing-subscriber = { workspace = true, features = ["env-filter"], optional = true }
|
tracing-subscriber = { workspace = true, features = ["env-filter"], optional = true }
|
||||||
|
tracing-tree = { workspace = true, optional = true }
|
||||||
tracing = { workspace = true, optional = true }
|
tracing = { workspace = true, optional = true }
|
||||||
|
opentelemetry-jaeger = { workspace = true, features = ["rt-tokio", "collector_client", "isahc_collector_client"], optional = true }
|
||||||
tracing-opentelemetry = { workspace = true, optional = true }
|
tracing-opentelemetry = { workspace = true, optional = true }
|
||||||
utoipa = { workspace = true, optional = true }
|
utoipa = { workspace = true, optional = true }
|
||||||
opentelemetry = { workspace = true, features = ["trace"], optional = true }
|
opentelemetry = { workspace = true, features = ["rt-tokio"], optional = true }
|
||||||
|
|
||||||
## otel-otlp (modern OTLP export to SigNoz/any OTLP collector)
|
|
||||||
opentelemetry_sdk = { workspace = true, features = ["trace"], optional = true }
|
|
||||||
opentelemetry-otlp = { workspace = true, features = ["grpc-tonic", "trace", "tls-roots"], optional = true }
|
|
||||||
tonic = { workspace = true, optional = true }
|
|
||||||
|
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
@@ -43,15 +35,13 @@ default = []
|
|||||||
openapi = ["utoipa"]
|
openapi = ["utoipa"]
|
||||||
output_format = ["serde_json", "dep:clap"]
|
output_format = ["serde_json", "dep:clap"]
|
||||||
bin_info_schema = ["schemars"]
|
bin_info_schema = ["schemars"]
|
||||||
ip_check = []
|
basic_tracing = ["dep:tracing", "tracing-subscriber"]
|
||||||
basic_tracing = ["dep:tracing", "dep:tracing-subscriber"]
|
tracing = [
|
||||||
otel-otlp = [
|
|
||||||
"basic_tracing",
|
"basic_tracing",
|
||||||
"dep:opentelemetry",
|
"tracing-tree",
|
||||||
"dep:opentelemetry_sdk",
|
"opentelemetry-jaeger",
|
||||||
"dep:opentelemetry-otlp",
|
"tracing-opentelemetry",
|
||||||
"dep:tracing-opentelemetry",
|
"opentelemetry",
|
||||||
"dep:tonic",
|
|
||||||
]
|
]
|
||||||
clap = ["dep:clap", "dep:clap_complete", "dep:clap_complete_fig"]
|
clap = ["dep:clap", "dep:clap_complete", "dep:clap_complete_fig"]
|
||||||
models = []
|
models = []
|
||||||
|
|||||||
@@ -9,6 +9,3 @@ pub mod completions;
|
|||||||
|
|
||||||
#[cfg(feature = "output_format")]
|
#[cfg(feature = "output_format")]
|
||||||
pub mod output_format;
|
pub mod output_format;
|
||||||
|
|
||||||
#[cfg(feature = "ip_check")]
|
|
||||||
pub mod ip_check;
|
|
||||||
|
|||||||
@@ -4,9 +4,16 @@
|
|||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use std::io::IsTerminal;
|
use std::io::IsTerminal;
|
||||||
|
|
||||||
// Re-export tracing_subscriber for consumers that need to compose layers
|
#[cfg(feature = "tracing")]
|
||||||
|
pub use opentelemetry;
|
||||||
|
#[cfg(feature = "tracing")]
|
||||||
|
pub use opentelemetry_jaeger;
|
||||||
|
#[cfg(feature = "tracing")]
|
||||||
|
pub use tracing_opentelemetry;
|
||||||
#[cfg(feature = "basic_tracing")]
|
#[cfg(feature = "basic_tracing")]
|
||||||
pub use tracing_subscriber;
|
pub use tracing_subscriber;
|
||||||
|
#[cfg(feature = "tracing")]
|
||||||
|
pub use tracing_tree;
|
||||||
|
|
||||||
#[derive(Debug, Default, Copy, Clone, Deserialize, PartialEq, Eq, Serialize)]
|
#[derive(Debug, Default, Copy, Clone, Deserialize, PartialEq, Eq, Serialize)]
|
||||||
#[serde(deny_unknown_fields)]
|
#[serde(deny_unknown_fields)]
|
||||||
@@ -62,106 +69,40 @@ pub fn setup_tracing_logger() {
|
|||||||
build_tracing_logger().init()
|
build_tracing_logger().init()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Initialize an OpenTelemetry tracing layer that exports spans via OTLP/gRPC.
|
// TODO: This has to be a macro, running it as a function does not work for the file_appender for some reason
|
||||||
///
|
#[cfg(feature = "tracing")]
|
||||||
/// This produces a layer compatible with `tracing_subscriber::registry()` that
|
#[macro_export]
|
||||||
/// sends traces to any OTLP-compatible collector (SigNoz, Grafana Tempo, etc).
|
macro_rules! setup_tracing {
|
||||||
///
|
($service_name: expr) => {
|
||||||
/// Returns both the tracing layer and the [`SdkTracerProvider`] so the caller
|
use nym_bin_common::logging::tracing_subscriber::layer::SubscriberExt;
|
||||||
/// can invoke [`SdkTracerProvider::shutdown`] for graceful flush on exit.
|
use nym_bin_common::logging::tracing_subscriber::util::SubscriberInitExt;
|
||||||
///
|
|
||||||
/// # Arguments
|
|
||||||
/// * `service_name` - The service name reported to the collector (e.g. "nym-node")
|
|
||||||
/// * `endpoint` - The OTLP/gRPC collector endpoint (e.g. "http://localhost:4317"
|
|
||||||
/// or "https://ingest.eu.signoz.cloud:443" for SigNoz Cloud)
|
|
||||||
/// * `ingestion_key` - Optional SigNoz Cloud ingestion key. When provided, it is
|
|
||||||
/// sent as the `signoz-ingestion-key` gRPC metadata header on every export.
|
|
||||||
/// * `environment` - Deployment environment label (e.g. "sandbox", "mainnet", "canary").
|
|
||||||
/// Attached as the `deployment.environment` OTel resource attribute.
|
|
||||||
/// * `sample_ratio` - Trace sampling ratio in 0.0..=1.0 (e.g. 0.1 = 10% of traces).
|
|
||||||
/// Used to limit cost when exporting from many nodes; clamped to [0.0, 1.0].
|
|
||||||
/// * `export_timeout_secs` - Timeout in seconds for each OTLP export batch. Prevents
|
|
||||||
/// unbounded blocking if the collector is slow or unreachable.
|
|
||||||
#[cfg(feature = "otel-otlp")]
|
|
||||||
pub fn init_otel_layer<S>(
|
|
||||||
service_name: &str,
|
|
||||||
endpoint: &str,
|
|
||||||
ingestion_key: Option<&str>,
|
|
||||||
environment: &str,
|
|
||||||
sample_ratio: f64,
|
|
||||||
export_timeout_secs: u64,
|
|
||||||
) -> Result<
|
|
||||||
(
|
|
||||||
tracing_opentelemetry::OpenTelemetryLayer<S, opentelemetry_sdk::trace::SdkTracer>,
|
|
||||||
opentelemetry_sdk::trace::SdkTracerProvider,
|
|
||||||
),
|
|
||||||
Box<dyn std::error::Error + Send + Sync>,
|
|
||||||
>
|
|
||||||
where
|
|
||||||
S: tracing::Subscriber + for<'a> tracing_subscriber::registry::LookupSpan<'a>,
|
|
||||||
{
|
|
||||||
use opentelemetry::trace::TracerProvider as _;
|
|
||||||
use opentelemetry_otlp::WithExportConfig;
|
|
||||||
use opentelemetry_otlp::WithTonicConfig;
|
|
||||||
use opentelemetry_sdk::trace::Sampler;
|
|
||||||
use std::time::Duration;
|
|
||||||
|
|
||||||
// Validate endpoint URI early to fail with a clear message
|
let registry = nym_bin_common::logging::tracing_subscriber::Registry::default()
|
||||||
if !endpoint.starts_with("http://") && !endpoint.starts_with("https://") {
|
.with(nym_bin_common::logging::tracing_subscriber::EnvFilter::from_default_env())
|
||||||
return Err(format!(
|
.with(
|
||||||
"invalid OTLP endpoint URI: {endpoint} (must start with http:// or https://)"
|
nym_bin_common::logging::tracing_tree::HierarchicalLayer::new(4)
|
||||||
)
|
.with_targets(true)
|
||||||
.into());
|
.with_bracketed_fields(true),
|
||||||
}
|
);
|
||||||
|
|
||||||
let sample_ratio_clamped = sample_ratio.clamp(0.0, 1.0);
|
let tracer = nym_bin_common::logging::opentelemetry_jaeger::new_collector_pipeline()
|
||||||
|
.with_endpoint("http://44.199.230.10:14268/api/traces")
|
||||||
|
.with_service_name($service_name)
|
||||||
|
.with_isahc()
|
||||||
|
.with_trace_config(
|
||||||
|
nym_bin_common::logging::opentelemetry::sdk::trace::config().with_sampler(
|
||||||
|
nym_bin_common::logging::opentelemetry::sdk::trace::Sampler::TraceIdRatioBased(
|
||||||
|
0.1,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
.install_batch(nym_bin_common::logging::opentelemetry::runtime::Tokio)
|
||||||
|
.expect("Could not init tracer");
|
||||||
|
|
||||||
let mut builder = opentelemetry_otlp::SpanExporter::builder()
|
let telemetry = nym_bin_common::logging::tracing_opentelemetry::layer().with_tracer(tracer);
|
||||||
.with_tonic()
|
|
||||||
.with_endpoint(endpoint)
|
|
||||||
.with_timeout(Duration::from_secs(export_timeout_secs));
|
|
||||||
|
|
||||||
// Explicitly configure TLS when the endpoint uses HTTPS
|
registry.with(telemetry).init();
|
||||||
if endpoint.starts_with("https://") {
|
};
|
||||||
builder =
|
|
||||||
builder.with_tls_config(tonic::transport::ClientTlsConfig::new().with_native_roots());
|
|
||||||
}
|
|
||||||
|
|
||||||
if let Some(key) = ingestion_key {
|
|
||||||
let mut metadata = tonic::metadata::MetadataMap::new();
|
|
||||||
metadata.insert(
|
|
||||||
"signoz-ingestion-key",
|
|
||||||
key.parse()
|
|
||||||
.map_err(|_| "invalid ingestion key format (value redacted)")?,
|
|
||||||
);
|
|
||||||
builder = builder.with_metadata(metadata);
|
|
||||||
}
|
|
||||||
|
|
||||||
let exporter = builder
|
|
||||||
.build()
|
|
||||||
.map_err(|e| format!("failed to build OTLP exporter for endpoint {endpoint}: {e}"))?;
|
|
||||||
|
|
||||||
let tracer_provider = opentelemetry_sdk::trace::SdkTracerProvider::builder()
|
|
||||||
.with_sampler(Sampler::TraceIdRatioBased(sample_ratio_clamped))
|
|
||||||
.with_batch_exporter(exporter)
|
|
||||||
.with_resource(
|
|
||||||
opentelemetry_sdk::Resource::builder()
|
|
||||||
.with_service_name(service_name.to_owned())
|
|
||||||
.with_attribute(opentelemetry::KeyValue::new(
|
|
||||||
"deployment.environment",
|
|
||||||
environment.to_owned(),
|
|
||||||
))
|
|
||||||
.build(),
|
|
||||||
)
|
|
||||||
.build();
|
|
||||||
|
|
||||||
opentelemetry::global::set_tracer_provider(tracer_provider.clone());
|
|
||||||
let tracer = tracer_provider.tracer(service_name.to_owned());
|
|
||||||
|
|
||||||
Ok((
|
|
||||||
tracing_opentelemetry::layer().with_tracer(tracer),
|
|
||||||
tracer_provider,
|
|
||||||
))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn banner(crate_name: &str, crate_version: &str) -> String {
|
pub fn banner(crate_name: &str, crate_version: &str) -> String {
|
||||||
|
|||||||
@@ -1,16 +1,14 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "nym-client-core"
|
name = "nym-client-core"
|
||||||
description = "Crate containing core client functionality and configs, used by all other Nym client implentations"
|
|
||||||
version.workspace = true
|
version.workspace = true
|
||||||
authors = ["Dave Hrycyszyn <futurechimp@users.noreply.github.com>"]
|
authors = ["Dave Hrycyszyn <futurechimp@users.noreply.github.com>"]
|
||||||
edition = "2024"
|
edition = "2021"
|
||||||
|
rust-version = "1.85"
|
||||||
license.workspace = true
|
license.workspace = true
|
||||||
|
description = "Crate containing core client functionality and configs, used by all other Nym client implentations"
|
||||||
repository.workspace = true
|
repository.workspace = true
|
||||||
homepage.workspace = true
|
homepage.workspace = true
|
||||||
documentation.workspace = true
|
documentation.workspace = true
|
||||||
rust-version = "1.85"
|
|
||||||
readme.workspace = true
|
|
||||||
publish = true
|
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
@@ -123,10 +121,6 @@ features = ["wasm-bindgen"]
|
|||||||
workspace = true
|
workspace = true
|
||||||
features = ["full"]
|
features = ["full"]
|
||||||
|
|
||||||
[target."cfg(target_arch = \"wasm32\")".dependencies.getrandom03]
|
|
||||||
workspace = true
|
|
||||||
features = ["wasm_js"]
|
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
tempfile = { workspace = true }
|
tempfile = { workspace = true }
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,12 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "nym-client-core-config-types"
|
name = "nym-client-core-config-types"
|
||||||
description = "Low level configs and constants used by Nym clients and nodes"
|
|
||||||
version.workspace = true
|
version.workspace = true
|
||||||
authors.workspace = true
|
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license.workspace = true
|
license.workspace = true
|
||||||
|
description = "Low level configs and constants used by Nym clients and nodes"
|
||||||
repository.workspace = true
|
repository.workspace = true
|
||||||
homepage.workspace = true
|
homepage.workspace = true
|
||||||
documentation.workspace = true
|
documentation.workspace = true
|
||||||
rust-version.workspace = true
|
|
||||||
readme.workspace = true
|
|
||||||
publish = true
|
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ const DEFAULT_MIN_MIXNODE_PERFORMANCE: u8 = 50;
|
|||||||
const DEFAULT_MIN_GATEWAY_PERFORMANCE: u8 = 50;
|
const DEFAULT_MIN_GATEWAY_PERFORMANCE: u8 = 50;
|
||||||
|
|
||||||
const DEFAULT_MAX_STARTUP_GATEWAY_WAITING_PERIOD: Duration = Duration::from_secs(70 * 60); // 70min -> full epoch (1h) + a bit of overhead
|
const DEFAULT_MAX_STARTUP_GATEWAY_WAITING_PERIOD: Duration = Duration::from_secs(70 * 60); // 70min -> full epoch (1h) + a bit of overhead
|
||||||
const DEFAULT_MAX_STARTUP_TOPOLOGY_WAITING_PERIOD: Duration = Duration::from_secs(70 * 60); // 70min -> full epoch (1h) + a bit of overhead
|
|
||||||
|
|
||||||
// Set this to a high value for now, so that we don't risk sporadic timeouts that might cause
|
// Set this to a high value for now, so that we don't risk sporadic timeouts that might cause
|
||||||
// bought bandwidth tokens to not have time to be spent; Once we remove the gateway from the
|
// bought bandwidth tokens to not have time to be spent; Once we remove the gateway from the
|
||||||
@@ -556,11 +555,6 @@ pub struct Topology {
|
|||||||
#[serde(with = "humantime_serde")]
|
#[serde(with = "humantime_serde")]
|
||||||
pub max_startup_gateway_waiting_period: Duration,
|
pub max_startup_gateway_waiting_period: Duration,
|
||||||
|
|
||||||
/// Defines how long the client is going to wait on startup for minimal topology to become online,
|
|
||||||
/// before abandoning the procedure.
|
|
||||||
#[serde(with = "humantime_serde")]
|
|
||||||
pub max_startup_network_waiting_period: Duration,
|
|
||||||
|
|
||||||
/// Specifies a minimum performance of a mixnode that is used on route construction.
|
/// Specifies a minimum performance of a mixnode that is used on route construction.
|
||||||
/// This setting is only applicable when `NymApi` topology is used.
|
/// This setting is only applicable when `NymApi` topology is used.
|
||||||
pub minimum_mixnode_performance: u8,
|
pub minimum_mixnode_performance: u8,
|
||||||
@@ -589,7 +583,6 @@ impl Default for Topology {
|
|||||||
topology_resolution_timeout: DEFAULT_TOPOLOGY_RESOLUTION_TIMEOUT,
|
topology_resolution_timeout: DEFAULT_TOPOLOGY_RESOLUTION_TIMEOUT,
|
||||||
disable_refreshing: false,
|
disable_refreshing: false,
|
||||||
max_startup_gateway_waiting_period: DEFAULT_MAX_STARTUP_GATEWAY_WAITING_PERIOD,
|
max_startup_gateway_waiting_period: DEFAULT_MAX_STARTUP_GATEWAY_WAITING_PERIOD,
|
||||||
max_startup_network_waiting_period: DEFAULT_MAX_STARTUP_TOPOLOGY_WAITING_PERIOD,
|
|
||||||
minimum_mixnode_performance: DEFAULT_MIN_MIXNODE_PERFORMANCE,
|
minimum_mixnode_performance: DEFAULT_MIN_MIXNODE_PERFORMANCE,
|
||||||
minimum_gateway_performance: DEFAULT_MIN_GATEWAY_PERFORMANCE,
|
minimum_gateway_performance: DEFAULT_MIN_GATEWAY_PERFORMANCE,
|
||||||
use_extended_topology: false,
|
use_extended_topology: false,
|
||||||
|
|||||||
@@ -159,7 +159,6 @@ impl From<ConfigV6> for Config {
|
|||||||
use_extended_topology: value.debug.topology.use_extended_topology,
|
use_extended_topology: value.debug.topology.use_extended_topology,
|
||||||
ignore_egress_epoch_role: value.debug.topology.ignore_egress_epoch_role,
|
ignore_egress_epoch_role: value.debug.topology.ignore_egress_epoch_role,
|
||||||
ignore_ingress_epoch_role: value.debug.topology.ignore_ingress_epoch_role,
|
ignore_ingress_epoch_role: value.debug.topology.ignore_ingress_epoch_role,
|
||||||
..Default::default()
|
|
||||||
},
|
},
|
||||||
reply_surbs: ReplySurbs {
|
reply_surbs: ReplySurbs {
|
||||||
minimum_reply_surb_storage_threshold: value
|
minimum_reply_surb_storage_threshold: value
|
||||||
|
|||||||
@@ -1,16 +1,13 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "nym-client-core-gateways-storage"
|
name = "nym-client-core-gateways-storage"
|
||||||
description = "Functionality for Nym clients to store and retrive Gateway connections"
|
|
||||||
version.workspace = true
|
version.workspace = true
|
||||||
authors.workspace = true
|
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license.workspace = true
|
license.workspace = true
|
||||||
|
rust-version.workspace = true
|
||||||
|
description = "Functionality for Nym clients to store and retrive Gateway connections"
|
||||||
repository.workspace = true
|
repository.workspace = true
|
||||||
homepage.workspace = true
|
homepage.workspace = true
|
||||||
documentation.workspace = true
|
documentation.workspace = true
|
||||||
rust-version.workspace = true
|
|
||||||
readme.workspace = true
|
|
||||||
publish = true
|
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
|||||||
@@ -160,10 +160,7 @@ where
|
|||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
} else {
|
} else {
|
||||||
info!(
|
info!("registered with new gateway {} (under address {address}), but this will not be our default address", gateway_details.gateway_id);
|
||||||
"registered with new gateway {} (under address {address}), but this will not be our default address",
|
|
||||||
gateway_details.gateway_id
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(GatewayInfo {
|
Ok(GatewayInfo {
|
||||||
|
|||||||
@@ -4,13 +4,13 @@
|
|||||||
use super::mix_traffic::ClientRequestSender;
|
use super::mix_traffic::ClientRequestSender;
|
||||||
use super::received_buffer::ReceivedBufferMessage;
|
use super::received_buffer::ReceivedBufferMessage;
|
||||||
use super::statistics_control::StatisticsControl;
|
use super::statistics_control::StatisticsControl;
|
||||||
use crate::client::base_client::storage::MixnetClientStorage;
|
|
||||||
use crate::client::base_client::storage::helpers::store_client_keys;
|
use crate::client::base_client::storage::helpers::store_client_keys;
|
||||||
|
use crate::client::base_client::storage::MixnetClientStorage;
|
||||||
use crate::client::cover_traffic_stream::LoopCoverTrafficStream;
|
use crate::client::cover_traffic_stream::LoopCoverTrafficStream;
|
||||||
use crate::client::event_control::EventControl;
|
use crate::client::event_control::EventControl;
|
||||||
use crate::client::inbound_messages::{InputMessage, InputMessageReceiver, InputMessageSender};
|
use crate::client::inbound_messages::{InputMessage, InputMessageReceiver, InputMessageSender};
|
||||||
use crate::client::key_manager::ClientKeys;
|
|
||||||
use crate::client::key_manager::persistence::KeyStore;
|
use crate::client::key_manager::persistence::KeyStore;
|
||||||
|
use crate::client::key_manager::ClientKeys;
|
||||||
use crate::client::mix_traffic::transceiver::{GatewayReceiver, GatewayTransceiver, RemoteGateway};
|
use crate::client::mix_traffic::transceiver::{GatewayReceiver, GatewayTransceiver, RemoteGateway};
|
||||||
use crate::client::mix_traffic::{BatchMixMessageSender, MixTrafficController, MixTrafficEvent};
|
use crate::client::mix_traffic::{BatchMixMessageSender, MixTrafficController, MixTrafficEvent};
|
||||||
use crate::client::real_messages_control;
|
use crate::client::real_messages_control;
|
||||||
@@ -52,12 +52,12 @@ use nym_sphinx::addressing::nodes::NodeIdentity;
|
|||||||
use nym_sphinx::receiver::{ReconstructedMessage, SphinxMessageReceiver};
|
use nym_sphinx::receiver::{ReconstructedMessage, SphinxMessageReceiver};
|
||||||
use nym_statistics_common::clients::ClientStatsSender;
|
use nym_statistics_common::clients::ClientStatsSender;
|
||||||
use nym_statistics_common::generate_client_stats_id;
|
use nym_statistics_common::generate_client_stats_id;
|
||||||
use nym_task::ShutdownTracker;
|
|
||||||
use nym_task::connections::{ConnectionCommandReceiver, ConnectionCommandSender, LaneQueueLengths};
|
use nym_task::connections::{ConnectionCommandReceiver, ConnectionCommandSender, LaneQueueLengths};
|
||||||
use nym_topology::HardcodedTopologyProvider;
|
use nym_task::ShutdownTracker;
|
||||||
use nym_topology::provider_trait::TopologyProvider;
|
use nym_topology::provider_trait::TopologyProvider;
|
||||||
|
use nym_topology::HardcodedTopologyProvider;
|
||||||
use nym_validator_client::nym_api::NymApiClientExt;
|
use nym_validator_client::nym_api::NymApiClientExt;
|
||||||
use nym_validator_client::{UserAgent, nyxd::contract_traits::DkgQueryClient};
|
use nym_validator_client::{nyxd::contract_traits::DkgQueryClient, UserAgent};
|
||||||
use rand::prelude::SliceRandom;
|
use rand::prelude::SliceRandom;
|
||||||
use rand::rngs::OsRng;
|
use rand::rngs::OsRng;
|
||||||
use rand::thread_rng;
|
use rand::thread_rng;
|
||||||
@@ -220,7 +220,6 @@ pub struct BaseClientBuilder<C, S: MixnetClientStorage> {
|
|||||||
nym_api_urls: Option<Vec<nym_network_defaults::ApiUrl>>,
|
nym_api_urls: Option<Vec<nym_network_defaults::ApiUrl>>,
|
||||||
|
|
||||||
wait_for_gateway: bool,
|
wait_for_gateway: bool,
|
||||||
wait_for_initial_topology: bool,
|
|
||||||
custom_topology_provider: Option<Box<dyn TopologyProvider + Send + Sync>>,
|
custom_topology_provider: Option<Box<dyn TopologyProvider + Send + Sync>>,
|
||||||
custom_gateway_transceiver: Option<Box<dyn GatewayTransceiver + Send>>,
|
custom_gateway_transceiver: Option<Box<dyn GatewayTransceiver + Send>>,
|
||||||
shutdown: Option<ShutdownTracker>,
|
shutdown: Option<ShutdownTracker>,
|
||||||
@@ -251,7 +250,6 @@ where
|
|||||||
dkg_query_client,
|
dkg_query_client,
|
||||||
nym_api_urls: None,
|
nym_api_urls: None,
|
||||||
wait_for_gateway: false,
|
wait_for_gateway: false,
|
||||||
wait_for_initial_topology: false,
|
|
||||||
custom_topology_provider: None,
|
custom_topology_provider: None,
|
||||||
custom_gateway_transceiver: None,
|
custom_gateway_transceiver: None,
|
||||||
shutdown: None,
|
shutdown: None,
|
||||||
@@ -307,12 +305,6 @@ where
|
|||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
#[must_use]
|
|
||||||
pub fn with_wait_for_initial_topology(mut self, wait_for_initial_topology: bool) -> Self {
|
|
||||||
self.wait_for_initial_topology = wait_for_initial_topology;
|
|
||||||
self
|
|
||||||
}
|
|
||||||
|
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn with_topology_provider(
|
pub fn with_topology_provider(
|
||||||
mut self,
|
mut self,
|
||||||
@@ -682,7 +674,6 @@ where
|
|||||||
topology_accessor: TopologyAccessor,
|
topology_accessor: TopologyAccessor,
|
||||||
local_gateway: NodeIdentity,
|
local_gateway: NodeIdentity,
|
||||||
wait_for_gateway: bool,
|
wait_for_gateway: bool,
|
||||||
wait_for_initial_topology: bool,
|
|
||||||
shutdown_tracker: &ShutdownTracker,
|
shutdown_tracker: &ShutdownTracker,
|
||||||
) -> Result<(), ClientCoreError> {
|
) -> Result<(), ClientCoreError> {
|
||||||
let topology_refresher_config =
|
let topology_refresher_config =
|
||||||
@@ -703,46 +694,6 @@ where
|
|||||||
tracing::info!("Obtaining initial network topology");
|
tracing::info!("Obtaining initial network topology");
|
||||||
topology_refresher.try_refresh().await;
|
topology_refresher.try_refresh().await;
|
||||||
|
|
||||||
// 1. wait for the minimum topology (if applicable)
|
|
||||||
if topology_refresher
|
|
||||||
.ensure_topology_is_routable()
|
|
||||||
.await
|
|
||||||
.is_err()
|
|
||||||
&& wait_for_initial_topology
|
|
||||||
{
|
|
||||||
if let Err(err) = topology_refresher
|
|
||||||
.wait_for_initial_network(topology_config.max_startup_network_waiting_period)
|
|
||||||
.await
|
|
||||||
{
|
|
||||||
tracing::error!(
|
|
||||||
"the network did not come become online within the specified timeout: {err}"
|
|
||||||
);
|
|
||||||
return Err(err.into());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 2. wait for our gateway (if applicable)
|
|
||||||
if topology_refresher
|
|
||||||
.ensure_contains_routable_egress(local_gateway)
|
|
||||||
.await
|
|
||||||
.is_err()
|
|
||||||
&& wait_for_gateway
|
|
||||||
{
|
|
||||||
if let Err(err) = topology_refresher
|
|
||||||
.wait_for_gateway(
|
|
||||||
local_gateway,
|
|
||||||
topology_config.max_startup_gateway_waiting_period,
|
|
||||||
)
|
|
||||||
.await
|
|
||||||
{
|
|
||||||
tracing::error!(
|
|
||||||
"the gateway did not come back online within the specified timeout: {err}"
|
|
||||||
);
|
|
||||||
return Err(err.into());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 3. check if the topology is routable (in case we were NOT waiting for it)
|
|
||||||
if let Err(err) = topology_refresher.ensure_topology_is_routable().await {
|
if let Err(err) = topology_refresher.ensure_topology_is_routable().await {
|
||||||
tracing::error!(
|
tracing::error!(
|
||||||
"The current network topology seem to be insufficient to route any packets through \
|
"The current network topology seem to be insufficient to route any packets through \
|
||||||
@@ -751,15 +702,30 @@ where
|
|||||||
return Err(ClientCoreError::InsufficientNetworkTopology(err));
|
return Err(ClientCoreError::InsufficientNetworkTopology(err));
|
||||||
}
|
}
|
||||||
|
|
||||||
// 4. check if the gateway exists (in case we were NOT waiting for it)
|
let gateway_wait_timeout = if wait_for_gateway {
|
||||||
|
Some(topology_config.max_startup_gateway_waiting_period)
|
||||||
|
} else {
|
||||||
|
None
|
||||||
|
};
|
||||||
|
|
||||||
if let Err(err) = topology_refresher
|
if let Err(err) = topology_refresher
|
||||||
.ensure_contains_routable_egress(local_gateway)
|
.ensure_contains_routable_egress(local_gateway)
|
||||||
.await
|
.await
|
||||||
{
|
{
|
||||||
tracing::error!(
|
if let Some(waiting_timeout) = gateway_wait_timeout {
|
||||||
"the gateway we're supposedly connected to does not exist. We'll not be able to send any packets to ourselves: {err}"
|
if let Err(err) = topology_refresher
|
||||||
);
|
.wait_for_gateway(local_gateway, waiting_timeout)
|
||||||
return Err(err.into());
|
.await
|
||||||
|
{
|
||||||
|
tracing::error!(
|
||||||
|
"the gateway did not come back online within the specified timeout: {err}"
|
||||||
|
);
|
||||||
|
return Err(err.into());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
tracing::error!("the gateway we're supposedly connected to does not exist. We'll not be able to send any packets to ourselves: {err}");
|
||||||
|
return Err(err.into());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if !topology_config.disable_refreshing {
|
if !topology_config.disable_refreshing {
|
||||||
@@ -1058,7 +1024,6 @@ where
|
|||||||
shared_topology_accessor.clone(),
|
shared_topology_accessor.clone(),
|
||||||
self_address.gateway(),
|
self_address.gateway(),
|
||||||
self.wait_for_gateway,
|
self.wait_for_gateway,
|
||||||
self.wait_for_initial_topology,
|
|
||||||
&shutdown_tracker.clone(),
|
&shutdown_tracker.clone(),
|
||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
@@ -1230,11 +1195,9 @@ mod tests {
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
assert_eq!(network_details.nym_api_urls.as_ref().unwrap().len(), 2);
|
assert_eq!(network_details.nym_api_urls.as_ref().unwrap().len(), 2);
|
||||||
assert!(
|
assert!(network_details.nym_api_urls.as_ref().unwrap()[1]
|
||||||
network_details.nym_api_urls.as_ref().unwrap()[1]
|
.front_hosts
|
||||||
.front_hosts
|
.is_some());
|
||||||
.is_some()
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@@ -1247,13 +1210,11 @@ mod tests {
|
|||||||
|
|
||||||
assert_eq!(api_url.url, "https://nym-frontdoor.vercel.app/api/");
|
assert_eq!(api_url.url, "https://nym-frontdoor.vercel.app/api/");
|
||||||
assert_eq!(api_url.front_hosts.as_ref().unwrap().len(), 2);
|
assert_eq!(api_url.front_hosts.as_ref().unwrap().len(), 2);
|
||||||
assert!(
|
assert!(api_url
|
||||||
api_url
|
.front_hosts
|
||||||
.front_hosts
|
.as_ref()
|
||||||
.as_ref()
|
.unwrap()
|
||||||
.unwrap()
|
.contains(&"vercel.app".to_string()));
|
||||||
.contains(&"vercel.app".to_string())
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
client::replies::reply_storage::{CombinedReplyStorage, ReplyStorageBackend, fs_backend},
|
client::replies::reply_storage::{fs_backend, CombinedReplyStorage, ReplyStorageBackend},
|
||||||
config,
|
config,
|
||||||
config::Config,
|
config::Config,
|
||||||
error::ClientCoreError,
|
error::ClientCoreError,
|
||||||
@@ -10,7 +10,7 @@ use crate::{
|
|||||||
use nym_bandwidth_controller::BandwidthController;
|
use nym_bandwidth_controller::BandwidthController;
|
||||||
use nym_client_core_gateways_storage::OnDiskGatewaysDetails;
|
use nym_client_core_gateways_storage::OnDiskGatewaysDetails;
|
||||||
use nym_credential_storage::storage::Storage as CredentialStorage;
|
use nym_credential_storage::storage::Storage as CredentialStorage;
|
||||||
use nym_validator_client::{QueryHttpRpcNyxdClient, nyxd};
|
use nym_validator_client::{nyxd, QueryHttpRpcNyxdClient};
|
||||||
use std::{io, path::Path};
|
use std::{io, path::Path};
|
||||||
use time::OffsetDateTime;
|
use time::OffsetDateTime;
|
||||||
use tracing::{error, info, trace};
|
use tracing::{error, info, trace};
|
||||||
@@ -24,9 +24,7 @@ async fn setup_fresh_backend<P: AsRef<Path>>(
|
|||||||
let mut storage_backend = match fs_backend::Backend::init(db_path).await {
|
let mut storage_backend = match fs_backend::Backend::init(db_path).await {
|
||||||
Ok(backend) => backend,
|
Ok(backend) => backend,
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
error!(
|
error!("setup_fresh_backend: Failed to setup persistent storage backend for our reply needs: {err}");
|
||||||
"setup_fresh_backend: Failed to setup persistent storage backend for our reply needs: {err}"
|
|
||||||
);
|
|
||||||
return Err(ClientCoreError::SurbStorageError {
|
return Err(ClientCoreError::SurbStorageError {
|
||||||
source: Box::new(err),
|
source: Box::new(err),
|
||||||
});
|
});
|
||||||
@@ -95,9 +93,7 @@ pub async fn setup_fs_reply_surb_backend<P: AsRef<Path>>(
|
|||||||
match fs_backend::Backend::try_load(db_path).await {
|
match fs_backend::Backend::try_load(db_path).await {
|
||||||
Ok(backend) => Ok(backend),
|
Ok(backend) => Ok(backend),
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
error!(
|
error!("setup_fs_reply_surb_backend: Failed to setup persistent storage backend for our reply needs: {err}. We're going to create a fresh database instead. This behaviour might change in the future");
|
||||||
"setup_fs_reply_surb_backend: Failed to setup persistent storage backend for our reply needs: {err}. We're going to create a fresh database instead. This behaviour might change in the future"
|
|
||||||
);
|
|
||||||
archive_corrupted_database(db_path).await?;
|
archive_corrupted_database(db_path).await?;
|
||||||
setup_fresh_backend(db_path, surb_config).await
|
setup_fresh_backend(db_path, surb_config).await
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
// Copyright 2024 - Nym Technologies SA <contact@nymtech.net>
|
// Copyright 2024 - Nym Technologies SA <contact@nymtech.net>
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
use crate::client::key_manager::ClientKeys;
|
|
||||||
use crate::client::key_manager::persistence::KeyStore;
|
use crate::client::key_manager::persistence::KeyStore;
|
||||||
|
use crate::client::key_manager::ClientKeys;
|
||||||
use crate::error::ClientCoreError;
|
use crate::error::ClientCoreError;
|
||||||
use nym_client_core_gateways_storage::{
|
use nym_client_core_gateways_storage::{
|
||||||
ActiveGateway, GatewayPublishedData, GatewayRegistration, GatewaysDetailsStore,
|
ActiveGateway, GatewayPublishedData, GatewayRegistration, GatewaysDetailsStore,
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
pub mod v1_1_33 {
|
pub mod v1_1_33 {
|
||||||
use crate::config::disk_persistence::CommonClientPaths;
|
|
||||||
use crate::config::disk_persistence::old_v1_1_33::CommonClientPathsV1_1_33;
|
use crate::config::disk_persistence::old_v1_1_33::CommonClientPathsV1_1_33;
|
||||||
|
use crate::config::disk_persistence::CommonClientPaths;
|
||||||
use crate::config::old_config_v1_1_33::OldGatewayEndpointConfigV1_1_33;
|
use crate::config::old_config_v1_1_33::OldGatewayEndpointConfigV1_1_33;
|
||||||
use crate::error::ClientCoreError;
|
use crate::error::ClientCoreError;
|
||||||
|
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ use nym_sphinx::addressing::clients::Recipient;
|
|||||||
use nym_sphinx::cover::generate_loop_cover_packet;
|
use nym_sphinx::cover::generate_loop_cover_packet;
|
||||||
use nym_sphinx::params::{PacketSize, PacketType};
|
use nym_sphinx::params::{PacketSize, PacketType};
|
||||||
use nym_sphinx::utils::sample_poisson_duration;
|
use nym_sphinx::utils::sample_poisson_duration;
|
||||||
use nym_statistics_common::clients::{ClientStatsSender, packet_statistics::PacketStatisticsEvent};
|
use nym_statistics_common::clients::{packet_statistics::PacketStatisticsEvent, ClientStatsSender};
|
||||||
use rand::{CryptoRng, Rng, rngs::OsRng};
|
use rand::{rngs::OsRng, CryptoRng, Rng};
|
||||||
use std::pin::Pin;
|
use std::pin::Pin;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
@@ -20,10 +20,10 @@ use tokio::sync::mpsc::error::TrySendError;
|
|||||||
use tracing::*;
|
use tracing::*;
|
||||||
|
|
||||||
#[cfg(not(target_arch = "wasm32"))]
|
#[cfg(not(target_arch = "wasm32"))]
|
||||||
use tokio::time::{Sleep, sleep};
|
use tokio::time::{sleep, Sleep};
|
||||||
|
|
||||||
#[cfg(target_arch = "wasm32")]
|
#[cfg(target_arch = "wasm32")]
|
||||||
use wasmtimer::tokio::{Sleep, sleep};
|
use wasmtimer::tokio::{sleep, Sleep};
|
||||||
|
|
||||||
pub struct LoopCoverTrafficStream<R>
|
pub struct LoopCoverTrafficStream<R>
|
||||||
where
|
where
|
||||||
@@ -179,9 +179,7 @@ impl LoopCoverTrafficStream<OsRng> {
|
|||||||
) {
|
) {
|
||||||
Ok(topology) => topology,
|
Ok(topology) => topology,
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
warn!(
|
warn!("We're not going to send any loop cover message this time, as the current topology seem to be invalid - {err}");
|
||||||
"We're not going to send any loop cover message this time, as the current topology seem to be invalid - {err}"
|
|
||||||
);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -15,13 +15,3 @@ pub(crate) fn get_time_now() -> Instant {
|
|||||||
pub(crate) fn new_interval_stream(polling_rate: Duration) -> IntervalStream {
|
pub(crate) fn new_interval_stream(polling_rate: Duration) -> IntervalStream {
|
||||||
gloo_timers::future::IntervalStream::new(polling_rate.as_millis() as u32)
|
gloo_timers::future::IntervalStream::new(polling_rate.as_millis() as u32)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[unsafe(no_mangle)]
|
|
||||||
unsafe extern "Rust" fn __getrandom_v03_custom(
|
|
||||||
dest: *mut u8,
|
|
||||||
len: usize,
|
|
||||||
) -> Result<(), getrandom03::Error> {
|
|
||||||
let _ = dest;
|
|
||||||
let _ = len;
|
|
||||||
Err(getrandom03::Error::UNSUPPORTED)
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -13,10 +13,10 @@ use crate::config::disk_persistence::ClientKeysPaths;
|
|||||||
#[cfg(not(target_arch = "wasm32"))]
|
#[cfg(not(target_arch = "wasm32"))]
|
||||||
use nym_crypto::asymmetric::{ed25519, x25519};
|
use nym_crypto::asymmetric::{ed25519, x25519};
|
||||||
#[cfg(not(target_arch = "wasm32"))]
|
#[cfg(not(target_arch = "wasm32"))]
|
||||||
use nym_pemstore::KeyPairPath;
|
|
||||||
#[cfg(not(target_arch = "wasm32"))]
|
|
||||||
use nym_pemstore::traits::{PemStorableKey, PemStorableKeyPair};
|
use nym_pemstore::traits::{PemStorableKey, PemStorableKeyPair};
|
||||||
#[cfg(not(target_arch = "wasm32"))]
|
#[cfg(not(target_arch = "wasm32"))]
|
||||||
|
use nym_pemstore::KeyPairPath;
|
||||||
|
#[cfg(not(target_arch = "wasm32"))]
|
||||||
use nym_sphinx::acknowledgements::AckKey;
|
use nym_sphinx::acknowledgements::AckKey;
|
||||||
|
|
||||||
// we have to define it as an async trait since wasm storage is async
|
// we have to define it as an async trait since wasm storage is async
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
use async_trait::async_trait;
|
use async_trait::async_trait;
|
||||||
use nym_credential_storage::storage::Storage as CredentialStorage;
|
use nym_credential_storage::storage::Storage as CredentialStorage;
|
||||||
use nym_crypto::asymmetric::ed25519;
|
use nym_crypto::asymmetric::ed25519;
|
||||||
use nym_gateway_client::GatewayClient;
|
|
||||||
use nym_gateway_client::error::GatewayClientError;
|
use nym_gateway_client::error::GatewayClientError;
|
||||||
|
use nym_gateway_client::GatewayClient;
|
||||||
pub use nym_gateway_client::{GatewayPacketRouter, PacketRouter};
|
pub use nym_gateway_client::{GatewayPacketRouter, PacketRouter};
|
||||||
use nym_gateway_requests::ClientRequest;
|
use nym_gateway_requests::ClientRequest;
|
||||||
use nym_sphinx::forwarding::packet::MixPacket;
|
use nym_sphinx::forwarding::packet::MixPacket;
|
||||||
@@ -240,7 +240,7 @@ mod nonwasm_sealed {
|
|||||||
impl GatewaySender for LocalGateway {
|
impl GatewaySender for LocalGateway {
|
||||||
async fn send_mix_packet(&mut self, packet: MixPacket) -> Result<(), ErasedGatewayError> {
|
async fn send_mix_packet(&mut self, packet: MixPacket) -> Result<(), ErasedGatewayError> {
|
||||||
self.packet_forwarder
|
self.packet_forwarder
|
||||||
.forward_client_packet_without_delay(packet)
|
.forward_packet(packet)
|
||||||
.map_err(erase_err)
|
.map_err(erase_err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -2,13 +2,13 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
use super::action_controller::{AckActionSender, Action};
|
use super::action_controller::{AckActionSender, Action};
|
||||||
use nym_statistics_common::clients::{ClientStatsSender, packet_statistics::PacketStatisticsEvent};
|
use nym_statistics_common::clients::{packet_statistics::PacketStatisticsEvent, ClientStatsSender};
|
||||||
|
|
||||||
use futures::StreamExt;
|
use futures::StreamExt;
|
||||||
use nym_gateway_client::AcknowledgementReceiver;
|
use nym_gateway_client::AcknowledgementReceiver;
|
||||||
use nym_sphinx::{
|
use nym_sphinx::{
|
||||||
acknowledgements::{AckKey, identifier::recover_identifier},
|
acknowledgements::{identifier::recover_identifier, AckKey},
|
||||||
chunking::fragment::{COVER_FRAG_ID, FragmentIdentifier},
|
chunking::fragment::{FragmentIdentifier, COVER_FRAG_ID},
|
||||||
};
|
};
|
||||||
use nym_task::ShutdownToken;
|
use nym_task::ShutdownToken;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|||||||
+2
-2
@@ -3,11 +3,11 @@
|
|||||||
|
|
||||||
use super::PendingAcknowledgement;
|
use super::PendingAcknowledgement;
|
||||||
use crate::client::real_messages_control::acknowledgement_control::RetransmissionRequestSender;
|
use crate::client::real_messages_control::acknowledgement_control::RetransmissionRequestSender;
|
||||||
use futures::StreamExt;
|
|
||||||
use futures::channel::mpsc;
|
use futures::channel::mpsc;
|
||||||
|
use futures::StreamExt;
|
||||||
use nym_nonexhaustive_delayqueue::{Expired, NonExhaustiveDelayQueue, QueueKey};
|
use nym_nonexhaustive_delayqueue::{Expired, NonExhaustiveDelayQueue, QueueKey};
|
||||||
use nym_sphinx::Delay as SphinxDelay;
|
|
||||||
use nym_sphinx::chunking::fragment::FragmentIdentifier;
|
use nym_sphinx::chunking::fragment::FragmentIdentifier;
|
||||||
|
use nym_sphinx::Delay as SphinxDelay;
|
||||||
use nym_task::ShutdownToken;
|
use nym_task::ShutdownToken;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|||||||
+1
-1
@@ -9,8 +9,8 @@ use nym_sphinx::addressing::clients::Recipient;
|
|||||||
use nym_sphinx::anonymous_replies::requests::AnonymousSenderTag;
|
use nym_sphinx::anonymous_replies::requests::AnonymousSenderTag;
|
||||||
use nym_sphinx::forwarding::packet::MixPacket;
|
use nym_sphinx::forwarding::packet::MixPacket;
|
||||||
use nym_sphinx::params::PacketType;
|
use nym_sphinx::params::PacketType;
|
||||||
use nym_task::ShutdownToken;
|
|
||||||
use nym_task::connections::TransmissionLane;
|
use nym_task::connections::TransmissionLane;
|
||||||
|
use nym_task::ShutdownToken;
|
||||||
use rand::{CryptoRng, Rng};
|
use rand::{CryptoRng, Rng};
|
||||||
use tracing::*;
|
use tracing::*;
|
||||||
|
|
||||||
|
|||||||
@@ -16,10 +16,10 @@ use nym_gateway_client::AcknowledgementReceiver;
|
|||||||
use nym_sphinx::anonymous_replies::requests::AnonymousSenderTag;
|
use nym_sphinx::anonymous_replies::requests::AnonymousSenderTag;
|
||||||
use nym_sphinx::params::{PacketSize, PacketType};
|
use nym_sphinx::params::{PacketSize, PacketType};
|
||||||
use nym_sphinx::{
|
use nym_sphinx::{
|
||||||
Delay as SphinxDelay,
|
|
||||||
acknowledgements::AckKey,
|
acknowledgements::AckKey,
|
||||||
addressing::clients::Recipient,
|
addressing::clients::Recipient,
|
||||||
chunking::fragment::{Fragment, FragmentIdentifier},
|
chunking::fragment::{Fragment, FragmentIdentifier},
|
||||||
|
Delay as SphinxDelay,
|
||||||
};
|
};
|
||||||
use nym_statistics_common::clients::ClientStatsSender;
|
use nym_statistics_common::clients::ClientStatsSender;
|
||||||
use rand::{CryptoRng, Rng};
|
use rand::{CryptoRng, Rng};
|
||||||
|
|||||||
+2
-2
@@ -2,8 +2,8 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
use super::{
|
use super::{
|
||||||
PendingAcknowledgement, RetransmissionRequestReceiver,
|
|
||||||
action_controller::{AckActionSender, Action},
|
action_controller::{AckActionSender, Action},
|
||||||
|
PendingAcknowledgement, RetransmissionRequestReceiver,
|
||||||
};
|
};
|
||||||
use crate::client::real_messages_control::acknowledgement_control::PacketDestination;
|
use crate::client::real_messages_control::acknowledgement_control::PacketDestination;
|
||||||
use crate::client::real_messages_control::message_handler::{MessageHandler, PreparationError};
|
use crate::client::real_messages_control::message_handler::{MessageHandler, PreparationError};
|
||||||
@@ -13,7 +13,7 @@ use futures::StreamExt;
|
|||||||
use nym_sphinx::chunking::fragment::Fragment;
|
use nym_sphinx::chunking::fragment::Fragment;
|
||||||
use nym_sphinx::preparer::PreparedFragment;
|
use nym_sphinx::preparer::PreparedFragment;
|
||||||
use nym_sphinx::{addressing::clients::Recipient, params::PacketType};
|
use nym_sphinx::{addressing::clients::Recipient, params::PacketType};
|
||||||
use nym_task::{ShutdownToken, connections::TransmissionLane};
|
use nym_task::{connections::TransmissionLane, ShutdownToken};
|
||||||
use rand::{CryptoRng, Rng};
|
use rand::{CryptoRng, Rng};
|
||||||
use std::sync::{Arc, Weak};
|
use std::sync::{Arc, Weak};
|
||||||
use tracing::*;
|
use tracing::*;
|
||||||
|
|||||||
+2
-2
@@ -1,10 +1,10 @@
|
|||||||
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
|
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
use super::SentPacketNotificationReceiver;
|
|
||||||
use super::action_controller::{AckActionSender, Action};
|
use super::action_controller::{AckActionSender, Action};
|
||||||
|
use super::SentPacketNotificationReceiver;
|
||||||
use futures::StreamExt;
|
use futures::StreamExt;
|
||||||
use nym_sphinx::chunking::fragment::{COVER_FRAG_ID, FragmentIdentifier};
|
use nym_sphinx::chunking::fragment::{FragmentIdentifier, COVER_FRAG_ID};
|
||||||
use tracing::*;
|
use tracing::*;
|
||||||
|
|
||||||
/// Module responsible for starting up retransmission timers.
|
/// Module responsible for starting up retransmission timers.
|
||||||
|
|||||||
@@ -10,17 +10,17 @@ use crate::client::replies::reply_controller::MaxRetransmissions;
|
|||||||
use crate::client::replies::reply_storage::{ReceivedReplySurbsMap, SentReplyKeys, UsedSenderTags};
|
use crate::client::replies::reply_storage::{ReceivedReplySurbsMap, SentReplyKeys, UsedSenderTags};
|
||||||
use crate::client::topology_control::{TopologyAccessor, TopologyReadPermit};
|
use crate::client::topology_control::{TopologyAccessor, TopologyReadPermit};
|
||||||
use nym_client_core_surb_storage::RetrievedReplySurb;
|
use nym_client_core_surb_storage::RetrievedReplySurb;
|
||||||
use nym_sphinx::Delay;
|
|
||||||
use nym_sphinx::acknowledgements::AckKey;
|
use nym_sphinx::acknowledgements::AckKey;
|
||||||
use nym_sphinx::addressing::clients::Recipient;
|
use nym_sphinx::addressing::clients::Recipient;
|
||||||
use nym_sphinx::anonymous_replies::ReplySurbWithKeyRotation;
|
|
||||||
use nym_sphinx::anonymous_replies::requests::{AnonymousSenderTag, RepliableMessage, ReplyMessage};
|
use nym_sphinx::anonymous_replies::requests::{AnonymousSenderTag, RepliableMessage, ReplyMessage};
|
||||||
|
use nym_sphinx::anonymous_replies::ReplySurbWithKeyRotation;
|
||||||
use nym_sphinx::chunking::fragment::{Fragment, FragmentIdentifier};
|
use nym_sphinx::chunking::fragment::{Fragment, FragmentIdentifier};
|
||||||
use nym_sphinx::message::NymMessage;
|
use nym_sphinx::message::NymMessage;
|
||||||
use nym_sphinx::params::{PacketSize, PacketType};
|
use nym_sphinx::params::{PacketSize, PacketType};
|
||||||
use nym_sphinx::preparer::{MessagePreparer, PreparedFragment};
|
use nym_sphinx::preparer::{MessagePreparer, PreparedFragment};
|
||||||
use nym_task::ShutdownToken;
|
use nym_sphinx::Delay;
|
||||||
use nym_task::connections::TransmissionLane;
|
use nym_task::connections::TransmissionLane;
|
||||||
|
use nym_task::ShutdownToken;
|
||||||
use nym_topology::{NymRouteProvider, NymTopologyError};
|
use nym_topology::{NymRouteProvider, NymTopologyError};
|
||||||
use rand::{CryptoRng, Rng};
|
use rand::{CryptoRng, Rng};
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
@@ -272,9 +272,7 @@ where
|
|||||||
let primary_count = msg.required_packets(self.config.primary_packet_size);
|
let primary_count = msg.required_packets(self.config.primary_packet_size);
|
||||||
let secondary_count = msg.required_packets(secondary_packet);
|
let secondary_count = msg.required_packets(secondary_packet);
|
||||||
|
|
||||||
trace!(
|
trace!("This message would require: {primary_count} primary packets or {secondary_count} secondary packets...");
|
||||||
"This message would require: {primary_count} primary packets or {secondary_count} secondary packets..."
|
|
||||||
);
|
|
||||||
// if there would be no benefit in using the secondary packet - use the primary (duh)
|
// if there would be no benefit in using the secondary packet - use the primary (duh)
|
||||||
if primary_count <= secondary_count {
|
if primary_count <= secondary_count {
|
||||||
trace!("so choosing primary for this message");
|
trace!("so choosing primary for this message");
|
||||||
|
|||||||
@@ -25,9 +25,9 @@ use nym_gateway_client::AcknowledgementReceiver;
|
|||||||
use nym_sphinx::acknowledgements::AckKey;
|
use nym_sphinx::acknowledgements::AckKey;
|
||||||
use nym_sphinx::addressing::clients::Recipient;
|
use nym_sphinx::addressing::clients::Recipient;
|
||||||
use nym_statistics_common::clients::ClientStatsSender;
|
use nym_statistics_common::clients::ClientStatsSender;
|
||||||
use nym_task::ShutdownToken;
|
|
||||||
use nym_task::connections::{ConnectionCommandReceiver, LaneQueueLengths};
|
use nym_task::connections::{ConnectionCommandReceiver, LaneQueueLengths};
|
||||||
use rand::{CryptoRng, Rng, rngs::OsRng};
|
use nym_task::ShutdownToken;
|
||||||
|
use rand::{rngs::OsRng, CryptoRng, Rng};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
use crate::client::replies::reply_controller::key_rotation_helpers::KeyRotationConfig;
|
use crate::client::replies::reply_controller::key_rotation_helpers::KeyRotationConfig;
|
||||||
|
|||||||
@@ -17,11 +17,11 @@ use nym_sphinx::forwarding::packet::MixPacket;
|
|||||||
use nym_sphinx::params::PacketSize;
|
use nym_sphinx::params::PacketSize;
|
||||||
use nym_sphinx::preparer::PreparedFragment;
|
use nym_sphinx::preparer::PreparedFragment;
|
||||||
use nym_sphinx::utils::sample_poisson_duration;
|
use nym_sphinx::utils::sample_poisson_duration;
|
||||||
use nym_statistics_common::clients::{ClientStatsSender, packet_statistics::PacketStatisticsEvent};
|
use nym_statistics_common::clients::{packet_statistics::PacketStatisticsEvent, ClientStatsSender};
|
||||||
use nym_task::ShutdownToken;
|
|
||||||
use nym_task::connections::{
|
use nym_task::connections::{
|
||||||
ConnectionCommand, ConnectionCommandReceiver, ConnectionId, LaneQueueLengths, TransmissionLane,
|
ConnectionCommand, ConnectionCommandReceiver, ConnectionId, LaneQueueLengths, TransmissionLane,
|
||||||
};
|
};
|
||||||
|
use nym_task::ShutdownToken;
|
||||||
use rand::{CryptoRng, Rng};
|
use rand::{CryptoRng, Rng};
|
||||||
use std::pin::Pin;
|
use std::pin::Pin;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
@@ -29,11 +29,11 @@ use std::time::Duration;
|
|||||||
use tracing::*;
|
use tracing::*;
|
||||||
|
|
||||||
#[cfg(not(target_arch = "wasm32"))]
|
#[cfg(not(target_arch = "wasm32"))]
|
||||||
use tokio::time::{Sleep, sleep};
|
use tokio::time::{sleep, Sleep};
|
||||||
|
|
||||||
// use nym_wasm_utils::console_log;
|
// use nym_wasm_utils::console_log;
|
||||||
#[cfg(target_arch = "wasm32")]
|
#[cfg(target_arch = "wasm32")]
|
||||||
use wasmtimer::tokio::{Sleep, sleep};
|
use wasmtimer::tokio::{sleep, Sleep};
|
||||||
mod sending_delay_controller;
|
mod sending_delay_controller;
|
||||||
|
|
||||||
/// Configurable parameters of the `OutQueueControl`
|
/// Configurable parameters of the `OutQueueControl`
|
||||||
@@ -230,9 +230,7 @@ where
|
|||||||
let (next_message, fragment_id, packet_size) = match next_message {
|
let (next_message, fragment_id, packet_size) = match next_message {
|
||||||
StreamMessage::Cover => {
|
StreamMessage::Cover => {
|
||||||
let cover_traffic_packet_size = self.loop_cover_message_size();
|
let cover_traffic_packet_size = self.loop_cover_message_size();
|
||||||
trace!(
|
trace!("the next loop cover message will be put in a {cover_traffic_packet_size} packet");
|
||||||
"the next loop cover message will be put in a {cover_traffic_packet_size} packet"
|
|
||||||
);
|
|
||||||
|
|
||||||
// TODO for way down the line: in very rare cases (during topology update) we might have
|
// TODO for way down the line: in very rare cases (during topology update) we might have
|
||||||
// to wait a really tiny bit before actually obtaining the permit hence messing with our
|
// to wait a really tiny bit before actually obtaining the permit hence messing with our
|
||||||
@@ -246,9 +244,7 @@ where
|
|||||||
) {
|
) {
|
||||||
Ok(topology) => topology,
|
Ok(topology) => topology,
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
warn!(
|
warn!("We're not going to send any loop cover message this time, as the current topology seem to be invalid - {err}");
|
||||||
"We're not going to send any loop cover message this time, as the current topology seem to be invalid - {err}"
|
|
||||||
);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -440,7 +436,7 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(next_delay) = &mut self.next_delay {
|
if let Some(ref mut next_delay) = &mut self.next_delay {
|
||||||
// it is not yet time to return a message
|
// it is not yet time to return a message
|
||||||
if next_delay.as_mut().poll(cx).is_pending() {
|
if next_delay.as_mut().poll(cx).is_pending() {
|
||||||
return Poll::Pending;
|
return Poll::Pending;
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
|
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
use crate::client::helpers::{Instant, get_time_now};
|
use crate::client::helpers::{get_time_now, Instant};
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
// The minimum time between increasing the average delay between packets. If we hit the ceiling in
|
// The minimum time between increasing the average delay between packets. If we hit the ceiling in
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user