From 212c8fae7424a8e467ce15fefab86d54f546a957 Mon Sep 17 00:00:00 2001 From: Chris O'Neil Date: Sun, 1 Dec 2024 14:03:26 +0000 Subject: [PATCH] chore: rename binaries in line with autonomi branding The following binaries were renamed: * `safenode` -> `antnode` * `safenode-manager` -> `antctl` * `safenode_rpc_client` -> `antnode_rpc_client` As part of the PR I took the opportunity to do other things. BREAKING CHANGE: the data directories for the binaries are changed to use `autonomi` in their path rather than `safe`. Operations for the node manager's `auditor` and `faucet` subcommands were changed to panic. The whole subcommands should be removed later. The Protobuf definitions were changed from `Safe` -> `Ant`. Removed the `faucet` feature from the node manager. As many code references as possible to `safenode` or similar, were changed. --- .github/workflows/benchmark-prs.yml | 17 +- .../workflows/generate-benchmark-charts.yml | 8 +- .github/workflows/memcheck.yml | 46 +- .github/workflows/merge.yml | 122 +- .github/workflows/merge_websocket.yml | 6 +- .github/workflows/nightly-release.yml | 36 +- .github/workflows/nightly.yml | 42 +- .github/workflows/nightly_wan.yml | 8 +- .github/workflows/node_man_tests.yml | 8 +- .github/workflows/python-publish-node.yml | 40 +- Cargo.lock | 1609 ++++++++++------- Justfile | 92 +- README.md | 38 +- ant-logging/src/appender.rs | 4 +- ant-logging/src/layers.rs | 8 +- ant-logging/src/lib.rs | 25 +- ant-logging/src/metrics.rs | 10 +- ant-metrics/src/main.rs | 2 +- ant-node-manager/Cargo.toml | 7 +- ant-node-manager/README.md | 247 +-- ant-node-manager/src/add_services/config.rs | 24 +- ant-node-manager/src/add_services/mod.rs | 42 +- ant-node-manager/src/add_services/tests.rs | 806 ++++----- ant-node-manager/src/bin/cli/main.rs | 144 +- ant-node-manager/src/bin/daemon/main.rs | 30 +- ant-node-manager/src/cmd/auditor.rs | 165 +- ant-node-manager/src/cmd/daemon.rs | 6 +- ant-node-manager/src/cmd/faucet.rs | 155 +- ant-node-manager/src/cmd/local.rs | 46 +- ant-node-manager/src/cmd/mod.rs | 2 +- ant-node-manager/src/cmd/nat_detection.rs | 2 +- ant-node-manager/src/cmd/node.rs | 51 +- ant-node-manager/src/config.rs | 42 +- ant-node-manager/src/helpers.rs | 4 +- ant-node-manager/src/lib.rs | 892 +++++---- ant-node-manager/src/local.rs | 101 +- ant-node-manager/src/rpc.rs | 44 +- ant-node-manager/src/rpc_client.rs | 8 +- ant-node-manager/tests/e2e.rs | 72 +- ant-node-manager/tests/utils.rs | 2 +- ant-node-rpc-client/Cargo.toml | 2 +- ant-node-rpc-client/README.md | 8 +- ant-node-rpc-client/src/main.rs | 16 +- ant-node/Cargo.toml | 4 +- ant-node/README.md | 14 +- ant-node/pyproject.toml | 8 +- ant-node/python/example.py | 12 +- ant-node/python/safenode/core.py | 6 +- ant-node/python/setup.py | 6 +- .../src/bin/{safenode => antnode}/main.rs | 28 +- .../bin/{safenode => antnode}/rpc_service.rs | 15 +- .../bin/{safenode => antnode}/subcommands.rs | 0 ant-node/src/python.rs | 12 +- ant-node/tests/common/client.rs | 14 +- ant-node/tests/common/mod.rs | 47 +- ant-node/tests/verify_data_location.rs | 12 +- ant-node/tests/verify_routing_table.rs | 6 +- ant-protocol/README.md | 4 +- ant-protocol/build.rs | 2 +- .../antnode.proto} | 4 +- .../req_resp_types.proto | 10 +- ant-protocol/src/lib.rs | 6 +- ant-protocol/src/node.rs | 7 +- ant-protocol/src/node_rpc.rs | 8 +- ant-service-management/Cargo.toml | 2 +- ant-service-management/README.md | 2 +- ant-service-management/build.rs | 2 +- .../antctl.proto} | 9 +- .../req_resp_types.proto | 4 +- ant-service-management/src/lib.rs | 6 +- ant-service-management/src/node.rs | 12 +- ant-service-management/src/rpc.rs | 10 +- autonomi-cli/src/access/data_dir.rs | 2 +- autonomi-cli/src/opt.rs | 6 +- autonomi-cli/src/wallet/fs.rs | 2 +- autonomi/README.md | 18 +- node-launchpad/Cargo.toml | 16 +- node-launchpad/src/app.rs | 4 +- node-launchpad/src/bin/tui/main.rs | 6 +- node-launchpad/src/components/status.rs | 16 +- node-launchpad/src/components/utils.rs | 2 +- node-launchpad/src/node_mgmt.rs | 20 +- resources/rc_template.md | 12 +- resources/run_local_service_network.sh | 12 +- resources/scripts/bump_version_for_rc.sh | 8 +- resources/scripts/list-numbered-prs.py | 2 +- resources/scripts/network_churning.sh | 2 +- resources/scripts/print-versions.sh | 8 +- .../scripts/release-candidate-description.py | 8 +- .../scripts/remove-s3-binary-archives.sh | 16 +- test-utils/src/testnet.rs | 5 +- 91 files changed, 2697 insertions(+), 2779 deletions(-) rename ant-node/src/bin/{safenode => antnode}/main.rs (96%) rename ant-node/src/bin/{safenode => antnode}/rpc_service.rs (96%) rename ant-node/src/bin/{safenode => antnode}/subcommands.rs (100%) rename ant-protocol/src/{safenode_proto/safenode.proto => antnode_proto/antnode.proto} (97%) rename ant-protocol/src/{safenode_proto => antnode_proto}/req_resp_types.proto (92%) rename ant-service-management/src/{safenode_manager_proto/safenode_manager.proto => antctl_proto/antctl.proto} (79%) rename ant-service-management/src/{safenode_manager_proto => antctl_proto}/req_resp_types.proto (97%) diff --git a/.github/workflows/benchmark-prs.yml b/.github/workflows/benchmark-prs.yml index 0ddfe07a17..0d78c05c58 100644 --- a/.github/workflows/benchmark-prs.yml +++ b/.github/workflows/benchmark-prs.yml @@ -5,8 +5,8 @@ on: pull_request env: CARGO_INCREMENTAL: "0" RUST_BACKTRACE: 1 - CLIENT_DATA_PATH: /home/runner/.local/share/safe/autonomi - NODE_DATA_PATH: /home/runner/.local/share/safe/node + CLIENT_DATA_PATH: /home/runner/.local/share/autonomi/client + NODE_DATA_PATH: /home/runner/.local/share/autonomi/node jobs: benchmark-cli: @@ -43,7 +43,7 @@ jobs: # it will be better to execute bench test with `local`, # to make the measurement results reflect speed improvement or regression more accurately. - name: Build binaries - run: cargo build --release --features local --bin safenode --bin autonomi + run: cargo build --release --features local --bin antnode --bin autonomi timeout-minutes: 30 - name: Start a local network @@ -53,7 +53,7 @@ jobs: with: action: start enable-evm-testnet: true - node-path: target/release/safenode + node-path: target/release/antnode platform: ubuntu-latest build: true @@ -286,13 +286,13 @@ jobs: shell: bash run: | num_of_times=$( - rg "SwarmCmd handled in [0-9.]+ms:" $NODE_DATA_PATH/*/logs/* --glob safenode.* -c --stats | + rg "SwarmCmd handled in [0-9.]+ms:" $NODE_DATA_PATH/*/logs/* --glob antnode.* -c --stats | rg "(\d+) matches" | rg "\d+" -o ) echo "Number of long cmd handling times: $num_of_times" total_long_handling_ms=$( - rg "SwarmCmd handled in [0-9.]+ms:" $NODE_DATA_PATH/*/logs/* --glob safenode.* -o --no-line-number --no-filename | + rg "SwarmCmd handled in [0-9.]+ms:" $NODE_DATA_PATH/*/logs/* --glob antnode.* -o --no-line-number --no-filename | awk -F' |ms:' '{sum += $4} END {printf "%.0f\n", sum}' ) echo "Total cmd long handling time is: $total_long_handling_ms ms" @@ -301,13 +301,13 @@ jobs: total_long_handling=$(($total_long_handling_ms)) total_num_of_times=$(($num_of_times)) num_of_times=$( - rg "SwarmEvent handled in [0-9.]+ms:" $NODE_DATA_PATH/*/logs/* --glob safenode.* -c --stats | + rg "SwarmEvent handled in [0-9.]+ms:" $NODE_DATA_PATH/*/logs/* --glob antnode.* -c --stats | rg "(\d+) matches" | rg "\d+" -o ) echo "Number of long event handling times: $num_of_times" total_long_handling_ms=$( - rg "SwarmEvent handled in [0-9.]+ms:" $NODE_DATA_PATH/*/logs/* --glob safenode.* -o --no-line-number --no-filename | + rg "SwarmEvent handled in [0-9.]+ms:" $NODE_DATA_PATH/*/logs/* --glob antnode.* -o --no-line-number --no-filename | awk -F' |ms:' '{sum += $4} END {printf "%.0f\n", sum}' ) echo "Total event long handling time is: $total_long_handling_ms ms" @@ -377,4 +377,3 @@ jobs: alert-threshold: "200%" # Enable Job Summary for PRs summary-always: true - diff --git a/.github/workflows/generate-benchmark-charts.yml b/.github/workflows/generate-benchmark-charts.yml index d033857455..43c499133c 100644 --- a/.github/workflows/generate-benchmark-charts.yml +++ b/.github/workflows/generate-benchmark-charts.yml @@ -15,8 +15,8 @@ permissions: env: CARGO_INCREMENTAL: "0" RUST_BACKTRACE: 1 - CLIENT_DATA_PATH: /home/runner/.local/share/safe/autonomi - NODE_DATA_PATH: /home/runner/.local/share/safe/node + CLIENT_DATA_PATH: /home/runner/.local/share/autonomi/client + NODE_DATA_PATH: /home/runner/.local/share/autonomi/node jobs: benchmark-cli: @@ -46,7 +46,7 @@ jobs: run: wget https://sn-node.s3.eu-west-2.amazonaws.com/the-test-data.zip - name: Build node and cli binaries - run: cargo build --release --features local --bin safenode --bin autonomi + run: cargo build --release --features local --bin antnode --bin autonomi timeout-minutes: 30 - name: Start a local network @@ -54,7 +54,7 @@ jobs: with: action: start enable-evm-testnet: true - node-path: target/release/safenode + node-path: target/release/antnode platform: ubuntu-latest build: true sn-log: "all" diff --git a/.github/workflows/memcheck.yml b/.github/workflows/memcheck.yml index c7150884e9..bc280bf916 100644 --- a/.github/workflows/memcheck.yml +++ b/.github/workflows/memcheck.yml @@ -10,10 +10,10 @@ on: branches: ["*"] env: - SAFE_DATA_PATH: /home/runner/.local/share/safe - CLIENT_DATA_PATH: /home/runner/.local/share/safe/autonomi - NODE_DATA_PATH: /home/runner/.local/share/safe/node - RESTART_TEST_NODE_DATA_PATH: /home/runner/.local/share/safe/restart_node + ANT_DATA_PATH: /home/runner/.local/share/autonomi + CLIENT_DATA_PATH: /home/runner/.local/share/autonomi/client + NODE_DATA_PATH: /home/runner/.local/share/autonomi/node + RESTART_TEST_NODE_DATA_PATH: /home/runner/.local/share/autonomi/restart_node jobs: memory-check: @@ -36,7 +36,7 @@ jobs: run: sudo apt-get install -y ripgrep - name: Build binaries - run: cargo build --release --features local --bin safenode --bin autonomi + run: cargo build --release --features local --bin antnode --bin autonomi timeout-minutes: 30 - name: Start a local network @@ -44,7 +44,7 @@ jobs: with: action: start enable-evm-testnet: true - node-path: target/release/safenode + node-path: target/release/antnode platform: ubuntu-latest build: true @@ -55,7 +55,7 @@ jobs: - name: Start a node instance to be restarted run: | mkdir -p $RESTART_TEST_NODE_DATA_PATH - ./target/release/safenode \ + ./target/release/antnode \ --root-dir $RESTART_TEST_NODE_DATA_PATH --log-output-dest $RESTART_TEST_NODE_DATA_PATH --local --rewards-address "0x03B770D9cD32077cC0bF330c13C114a87643B124" & sleep 10 env: @@ -91,13 +91,13 @@ jobs: - name: Start a different client to upload the same file run: | pwd - ls -l $SAFE_DATA_PATH - mv $CLIENT_DATA_PATH $SAFE_DATA_PATH/client_first - ls -l $SAFE_DATA_PATH - ls -l $SAFE_DATA_PATH/client_first - ls -l $SAFE_DATA_PATH/client_first/logs - mkdir $SAFE_DATA_PATH/client - ls -l $SAFE_DATA_PATH + ls -l $ANT_DATA_PATH + mv $CLIENT_DATA_PATH $ANT_DATA_PATH/client_first + ls -l $ANT_DATA_PATH + ls -l $ANT_DATA_PATH/client_first + ls -l $ANT_DATA_PATH/client_first/logs + mkdir $ANT_DATA_PATH/client + ls -l $ANT_DATA_PATH cp ./the-test-data.zip ./the-test-data_1.zip ./target/release/autonomi --log-output-dest=data-dir file upload "./the-test-data_1.zip" > ./second_upload 2>&1 env: @@ -110,11 +110,11 @@ jobs: if: always() - name: Stop the restart node - run: kill $( cat $RESTART_TEST_NODE_DATA_PATH/safenode.pid ) + run: kill $( cat $RESTART_TEST_NODE_DATA_PATH/antnode.pid ) - name: Start the restart node again run: | - ./target/release/safenode \ + ./target/release/antnode \ --root-dir $RESTART_TEST_NODE_DATA_PATH --log-output-dest $RESTART_TEST_NODE_DATA_PATH --local --rewards-address "0x03B770D9cD32077cC0bF330c13C114a87643B124" & sleep 10 env: @@ -156,7 +156,7 @@ jobs: shell: bash timeout-minutes: 1 continue-on-error: true - run: pgrep safenode | wc -l + run: pgrep antnode | wc -l if: always() - name: Stop the local network and upload logs @@ -243,16 +243,16 @@ jobs: # # As the `rg` cmd will fail the shell directly if no entry find, # # hence not covering it. # # Be aware that if do need to looking for handlings longer than second, it shall be: - # # rg "SwarmCmd handled in [^m,µ,n]*s:" $NODE_DATA_PATH/*/logs/* --glob safenode.* -c --stats + # # rg "SwarmCmd handled in [^m,µ,n]*s:" $NODE_DATA_PATH/*/logs/* --glob antnode.* -c --stats # run: | # num_of_times=$( - # rg "SwarmCmd handled in [0-9.]+ms:" $NODE_DATA_PATH/*/logs/* --glob safenode.* -c --stats | + # rg "SwarmCmd handled in [0-9.]+ms:" $NODE_DATA_PATH/*/logs/* --glob antnode.* -c --stats | # rg "(\d+) matches" | # rg "\d+" -o # ) # echo "Number of long cmd handling times: $num_of_times" # total_long_handling_ms=$( - # rg "SwarmCmd handled in [0-9.]+ms:" $NODE_DATA_PATH/*/logs/* --glob safenode.* -o --no-line-number --no-filename | + # rg "SwarmCmd handled in [0-9.]+ms:" $NODE_DATA_PATH/*/logs/* --glob antnode.* -o --no-line-number --no-filename | # awk -F' |ms:' '{sum += $4} END {printf "%.0f\n", sum}' # ) # echo "Total cmd long handling time is: $total_long_handling_ms ms" @@ -261,13 +261,13 @@ jobs: # total_long_handling=$(($total_long_handling_ms)) # total_num_of_times=$(($num_of_times)) # num_of_times=$( - # rg "SwarmEvent handled in [0-9.]+ms:" $NODE_DATA_PATH/*/logs/* --glob safenode.* -c --stats | + # rg "SwarmEvent handled in [0-9.]+ms:" $NODE_DATA_PATH/*/logs/* --glob antnode.* -c --stats | # rg "(\d+) matches" | # rg "\d+" -o # ) # echo "Number of long event handling times: $num_of_times" # total_long_handling_ms=$( - # rg "SwarmEvent handled in [0-9.]+ms:" $NODE_DATA_PATH/*/logs/* --glob safenode.* -o --no-line-number --no-filename | + # rg "SwarmEvent handled in [0-9.]+ms:" $NODE_DATA_PATH/*/logs/* --glob antnode.* -o --no-line-number --no-filename | # awk -F' |ms:' '{sum += $4} END {printf "%.0f\n", sum}' # ) # echo "Total event long handling time is: $total_long_handling_ms ms" @@ -283,7 +283,7 @@ jobs: - name: Move restart_node log to the working directory run: | ls -l $RESTART_TEST_NODE_DATA_PATH - mv $RESTART_TEST_NODE_DATA_PATH/safenode.log ./restart_node.log + mv $RESTART_TEST_NODE_DATA_PATH/antnode.log ./restart_node.log continue-on-error: true if: always() timeout-minutes: 1 diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 1c9d34631f..503ee5212c 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -177,11 +177,11 @@ jobs: matrix: include: - os: ubuntu-latest - safe_path: /home/runner/.local/share/safe + ant_path: /home/runner/.local/share/autonomi - os: windows-latest - safe_path: C:\\Users\\runneradmin\\AppData\\Roaming\\safe + ant_path: C:\\Users\\runneradmin\\AppData\\Roaming\\autonomi - os: macos-latest - safe_path: /Users/runner/Library/Application\ Support/safe + ant_path: /Users/runner/Library/Application\ Support/autonomi steps: - uses: actions/checkout@v4 @@ -190,7 +190,7 @@ jobs: - uses: Swatinem/rust-cache@v2 - name: Build binaries - run: cargo build --release --features local --bin safenode --bin autonomi + run: cargo build --release --features local --bin antnode --bin autonomi timeout-minutes: 30 - name: Start a local network @@ -198,7 +198,7 @@ jobs: with: action: start enable-evm-testnet: true - node-path: target/release/safenode + node-path: target/release/antnode platform: ${{ matrix.os }} build: true @@ -343,25 +343,25 @@ jobs: - name: Delete current register signing key shell: bash - run: rm -rf ${{ matrix.safe_path }}/autonomi + run: rm -rf ${{ matrix.ant_path }}/client - name: Generate new register signing key - run: ./target/release/autonomi --log-output-dest=data-dir register generate-key + run: ./target/release/autonomi --log-output-dest data-dir register generate-key - name: Get Public Register (new signing key is not the owner) - run: ./target/release/autonomi --log-output-dest=data-dir register get ${{ env.PUBLIC_REGISTER_ADDRESS }} + run: ./target/release/autonomi --log-output-dest data-dir register get ${{ env.PUBLIC_REGISTER_ADDRESS }} env: SN_LOG: "v" timeout-minutes: 2 - name: Edit Public Register (new signing key is not the owner) - run: ./target/release/autonomi --log-output-dest=data-dir register edit ${{ env.PUBLIC_REGISTER_ADDRESS }} 333 + run: ./target/release/autonomi --log-output-dest data-dir register edit ${{ env.PUBLIC_REGISTER_ADDRESS }} 333 env: SN_LOG: "v" timeout-minutes: 10 - name: Get Public Register (new signing key is not the owner) - run: ./target/release/autonomi --log-output-dest=data-dir register get ${{ env.PUBLIC_REGISTER_ADDRESS }} + run: ./target/release/autonomi --log-output-dest data-dir register get ${{ env.PUBLIC_REGISTER_ADDRESS }} env: SN_LOG: "v" timeout-minutes: 2 @@ -373,25 +373,25 @@ jobs: timeout-minutes: 2 - name: file upload - run: ./target/release/autonomi --log-output-dest=data-dir file upload random.txt + run: ./target/release/autonomi --log-output-dest data-dir file upload random.txt env: SN_LOG: "v" timeout-minutes: 2 - name: create a local register - run: ./target/release/autonomi --log-output-dest=data-dir register create sample_new_register 1234 + run: ./target/release/autonomi --log-output-dest data-dir register create sample_new_register 1234 env: SN_LOG: "v" timeout-minutes: 2 - name: Estimate cost to create a vault - run: ./target/release/autonomi --log-output-dest=data-dir vault cost + run: ./target/release/autonomi --log-output-dest data-dir vault cost env: SN_LOG: "v" timeout-minutes: 2 - name: create a vault with existing user data as above - run: ./target/release/autonomi --log-output-dest=data-dir vault create + run: ./target/release/autonomi --log-output-dest data-dir vault create env: SN_LOG: "v" timeout-minutes: 2 @@ -402,9 +402,9 @@ jobs: set -e for i in {1..100}; do dd if=/dev/urandom of=random_file_$i.bin bs=1M count=1 status=none - ./target/release/autonomi --log-output-dest=data-dir file upload random_file_$i.bin --public - ./target/release/autonomi --log-output-dest=data-dir file upload random_file_$i.bin - ./target/release/autonomi --log-output-dest=data-dir register create $i random_file_$i.bin + ./target/release/autonomi --log-output-dest data-dir file upload random_file_$i.bin --public + ./target/release/autonomi --log-output-dest data-dir file upload random_file_$i.bin + ./target/release/autonomi --log-output-dest data-dir register create $i random_file_$i.bin done env: SN_LOG: "v" @@ -421,22 +421,22 @@ jobs: [System.IO.File]::WriteAllBytes($fileName, $byteArray) # Run autonomi commands - ./target/release/autonomi --log-output-dest=data-dir file upload "random_file_$i.bin" --public - ./target/release/autonomi --log-output-dest=data-dir file upload "random_file_$i.bin" - ./target/release/autonomi --log-output-dest=data-dir register create $i "random_file_$i.bin" + ./target/release/autonomi --log-output-dest data-dir file upload "random_file_$i.bin" --public + ./target/release/autonomi --log-output-dest data-dir file upload "random_file_$i.bin" + ./target/release/autonomi --log-output-dest data-dir register create $i "random_file_$i.bin" } env: SN_LOG: "v" timeout-minutes: 25 - name: sync the vault - run: ./target/release/autonomi --log-output-dest=data-dir vault sync + run: ./target/release/autonomi --log-output-dest data-dir vault sync env: SN_LOG: "v" timeout-minutes: 2 - name: load the vault from network - run: ./target/release/autonomi --log-output-dest=data-dir vault load + run: ./target/release/autonomi --log-output-dest data-dir vault load env: SN_LOG: "v" timeout-minutes: 2 @@ -453,7 +453,7 @@ jobs: NUM_OF_PRIVATE_FILES_IN_VAULT="" NUM_OF_REGISTERS_IN_VAULT="" - ./target/release/autonomi --log-output-dest=data-dir file list 2>&1 > file_list.txt + ./target/release/autonomi --log-output-dest data-dir file list 2>&1 > file_list.txt ./target/release/autonomi register list | grep register > register_list.txt @@ -463,7 +463,7 @@ jobs: # when obtaining registers we get random garbage, this is the only hack that works. NUM_OF_REGISTERS_first=${NUM_OF_REGISTERS%%[ $'\n']*} echo "NUM_OF_REGISTERS is $NUM_OF_REGISTERS_first" - ./target/release/autonomi --log-output-dest=data-dir vault load 2>&1 > vault_data.txt + ./target/release/autonomi --log-output-dest data-dir vault load 2>&1 > vault_data.txt NUM_OF_PUBLIC_FILES_IN_VAULT=`cat vault_data.txt | grep "public" | grep -o '[0-9]\+'` NUM_OF_PRIVATE_FILES_IN_VAULT=`cat vault_data.txt| grep "private" | grep -o '[0-9]\+'` @@ -488,9 +488,9 @@ jobs: shell: pwsh run: | $ErrorActionPreference = "Stop" - ./target/release/autonomi --log-output-dest=data-dir file list > file_list.txt 2>&1 + ./target/release/autonomi --log-output-dest data-dir file list > file_list.txt 2>&1 ./target/release/autonomi register list > register_list.txt 2>&1 - ./target/release/autonomi --log-output-dest=data-dir vault load > vault_data.txt 2>&1 + ./target/release/autonomi --log-output-dest data-dir vault load > vault_data.txt 2>&1 env: SN_LOG: "v" timeout-minutes: 15 @@ -567,7 +567,7 @@ jobs: time ./target/release/autonomi --log-output-dest=data-dir file upload random_1GB.bin ./target/release/autonomi --log-output-dest=data-dir vault sync rm -rf random*.bin - rm -rf ${{ matrix.safe_path }}/autonomi + rm -rf ${{ matrix.ant_path }}/autonomi env: SN_LOG: "v" timeout-minutes: 15 @@ -596,7 +596,7 @@ jobs: # - uses: Swatinem/rust-cache@v2 # - name: Build binaries - # run: cargo build --release --features=local --bin safenode + # run: cargo build --release --features=local --bin antnode # timeout-minutes: 30 # - name: Build faucet binary @@ -608,7 +608,7 @@ jobs: # with: # action: start # interval: 2000 - # node-path: target/release/safenode + # node-path: target/release/antnode # faucet-path: target/release/faucet # platform: ${{ matrix.os }} # build: true @@ -662,7 +662,7 @@ jobs: # - uses: Swatinem/rust-cache@v2 # - name: Build binaries - # run: cargo build --release --features=local --bin safenode + # run: cargo build --release --features=local --bin antnode # timeout-minutes: 30 # - name: Build faucet binary @@ -683,7 +683,7 @@ jobs: # action: start # interval: 2000 # node-count: 50 - # node-path: target/release/safenode + # node-path: target/release/antnode # faucet-path: target/release/faucet # platform: ${{ matrix.os }} # build: true @@ -728,7 +728,7 @@ jobs: # - uses: Swatinem/rust-cache@v2 # - name: Build binaries - # run: cargo build --release --features=local,distribution --bin safenode + # run: cargo build --release --features=local,distribution --bin antnode # timeout-minutes: 35 # - name: Build faucet binary @@ -748,7 +748,7 @@ jobs: # with: # action: start # interval: 2000 - # node-path: target/release/safenode + # node-path: target/release/antnode # faucet-path: target/release/faucet # platform: ${{ matrix.os }} # build: true @@ -786,14 +786,14 @@ jobs: matrix: include: - os: ubuntu-latest - node_data_path: /home/runner/.local/share/safe/node - safe_path: /home/runner/.local/share/safe + node_data_path: /home/runner/.local/share/autonomi/node + ant_path: /home/runner/.local/share/autonomi - os: windows-latest - node_data_path: C:\\Users\\runneradmin\\AppData\\Roaming\\safe\\node - safe_path: C:\\Users\\runneradmin\\AppData\\Roaming\\safe + node_data_path: C:\\Users\\runneradmin\\AppData\\Roaming\\autonomi\\node + ant_path: C:\\Users\\runneradmin\\AppData\\Roaming\\autonomi - os: macos-latest - node_data_path: /Users/runner/Library/Application Support/safe/node - safe_path: /Users/runner/Library/Application Support/safe + node_data_path: /Users/runner/Library/Application Support/autonomi/node + ant_path: /Users/runner/Library/Application Support/autonomi steps: - uses: actions/checkout@v4 @@ -802,7 +802,7 @@ jobs: - uses: Swatinem/rust-cache@v2 - name: Build binaries - run: cargo build --release --features local --bin safenode + run: cargo build --release --features local --bin antnode timeout-minutes: 30 - name: Build churn tests @@ -818,7 +818,7 @@ jobs: with: action: start enable-evm-testnet: true - node-path: target/release/safenode + node-path: target/release/antnode platform: ${{ matrix.os }} build: true @@ -919,7 +919,7 @@ jobs: shell: bash timeout-minutes: 10 run: | - if ! rg '^' "${{ matrix.safe_path }}"/*/*/logs | awk 'length($0) > 15000 { print; exit 1 }' + if ! rg '^' "${{ matrix.ant_path }}"/*/*/logs | awk 'length($0) > 15000 { print; exit 1 }' then echo "We are logging an extremely large data" exit 1 @@ -933,14 +933,14 @@ jobs: matrix: include: - os: ubuntu-latest - node_data_path: /home/runner/.local/share/safe/node - safe_path: /home/runner/.local/share/safe + node_data_path: /home/runner/.local/share/autonomi/node + ant_path: /home/runner/.local/share/autonomi - os: windows-latest - node_data_path: C:\\Users\\runneradmin\\AppData\\Roaming\\safe\\node - safe_path: C:\\Users\\runneradmin\\AppData\\Roaming\\safe + node_data_path: C:\\Users\\runneradmin\\AppData\\Roaming\\autonomi\\node + ant_path: C:\\Users\\runneradmin\\AppData\\Roaming\\autonomi - os: macos-latest - node_data_path: /Users/runner/Library/Application Support/safe/node - safe_path: /Users/runner/Library/Application Support/safe + node_data_path: /Users/runner/Library/Application Support/autonomi/node + ant_path: /Users/runner/Library/Application Support/autonomi steps: - uses: actions/checkout@v4 @@ -949,7 +949,7 @@ jobs: - uses: Swatinem/rust-cache@v2 - name: Build binaries - run: cargo build --release --features local --bin safenode + run: cargo build --release --features local --bin antnode timeout-minutes: 30 - name: Build data location and routing table tests @@ -965,7 +965,7 @@ jobs: with: action: start enable-evm-testnet: true - node-path: target/release/safenode + node-path: target/release/antnode platform: ${{ matrix.os }} build: true @@ -984,13 +984,13 @@ jobs: fi - name: Verify the routing tables of the nodes - run: cargo test --release -p ant-node --features="local" --test verify_routing_table -- --nocapture + run: cargo test --release -p ant-node --features "local" --test verify_routing_table -- --nocapture env: CARGO_TARGET_DIR: ${{ matrix.os == 'windows-latest' && './test-target' || '.' }} timeout-minutes: 5 - name: Verify the location of the data on the network - run: cargo test --release -p ant-node --features="local" --test verify_data_location -- --nocapture + run: cargo test --release -p ant-node --features "local" --test verify_data_location -- --nocapture env: CHURN_COUNT: 6 SN_LOG: "all" @@ -998,7 +998,7 @@ jobs: timeout-minutes: 25 - name: Verify the routing tables of the nodes - run: cargo test --release -p ant-node --features="local" --test verify_routing_table -- --nocapture + run: cargo test --release -p ant-node --features "local" --test verify_routing_table -- --nocapture env: CARGO_TARGET_DIR: ${{ matrix.os == 'windows-latest' && './test-target' || '.' }} timeout-minutes: 5 @@ -1050,7 +1050,7 @@ jobs: shell: bash timeout-minutes: 10 run: | - if ! rg '^' "${{ matrix.safe_path }}"/*/*/logs | awk 'length($0) > 15000 { print; exit 1 }' + if ! rg '^' "${{ matrix.ant_path }}"/*/*/logs | awk 'length($0) > 15000 { print; exit 1 }' then echo "We are logging an extremely large data" exit 1 @@ -1072,7 +1072,7 @@ jobs: # run: sudo apt-get install -y ripgrep # - name: Build binaries - # run: cargo build --release --bin safenode --bin safe + # run: cargo build --release --bin antnode --bin safe # timeout-minutes: 30 # - name: Build faucet binary @@ -1084,14 +1084,14 @@ jobs: # with: # action: start # interval: 2000 - # node-path: target/release/safenode + # node-path: target/release/antnode # faucet-path: target/release/faucet # platform: ubuntu-latest # build: true # - name: Check we're _not_ warned about using default genesis # run: | - # if rg "USING DEFAULT" "${{ matrix.safe_path }}"/*/*/logs; then + # if rg "USING DEFAULT" "${{ matrix.ant_path }}"/*/*/logs; then # exit 1 # fi # shell: bash @@ -1283,7 +1283,7 @@ jobs: ls -l - name: Build binaries - run: cargo build --release --features local --bin safenode --bin autonomi + run: cargo build --release --features local --bin antnode --bin autonomi timeout-minutes: 30 - name: Start a local network @@ -1291,7 +1291,7 @@ jobs: with: action: start enable-evm-testnet: true - node-path: target/release/safenode + node-path: target/release/antnode platform: ubuntu-latest build: true @@ -1442,7 +1442,7 @@ jobs: # df # - name: Build binaries - # run: cargo build --release --bin safenode --bin safe + # run: cargo build --release --bin antnode --bin safe # timeout-minutes: 30 # - name: Build faucet binary @@ -1454,7 +1454,7 @@ jobs: # with: # action: start # interval: 2000 - # node-path: target/release/safenode + # node-path: target/release/antnode # faucet-path: target/release/faucet # platform: ubuntu-latest # build: true diff --git a/.github/workflows/merge_websocket.yml b/.github/workflows/merge_websocket.yml index 9bfaeadff7..27d7315398 100644 --- a/.github/workflows/merge_websocket.yml +++ b/.github/workflows/merge_websocket.yml @@ -56,7 +56,7 @@ jobs: ls -l - name: Build binaries - run: cargo build --release --features local,websockets --bin safenode --bin autonomi + run: cargo build --release --features local,websockets --bin antnode --bin autonomi timeout-minutes: 30 - name: Start a local network @@ -64,7 +64,7 @@ jobs: with: action: start enable-evm-testnet: true - node-path: target/release/safenode + node-path: target/release/antnode platform: ubuntu-latest build: true sn-log: "" @@ -135,7 +135,7 @@ jobs: shell: bash timeout-minutes: 1 env: - NODE_DATA_PATH: /home/runner/.local/share/safe/node + NODE_DATA_PATH: /home/runner/.local/share/autonomi/node run: | incoming_connection_errors=$(rg "IncomingConnectionError" $NODE_DATA_PATH -c --stats | \ rg "(\d+) matches" | rg "\d+" -o) || { echo "Failed to find IncomingConnectionError error"; exit 0; } diff --git a/.github/workflows/nightly-release.yml b/.github/workflows/nightly-release.yml index 3bd80be19b..5794ced3e1 100644 --- a/.github/workflows/nightly-release.yml +++ b/.github/workflows/nightly-release.yml @@ -112,41 +112,35 @@ jobs: - name: remove latest nightly release shell: bash run: | - just delete-s3-bin "faucet" "nightly" just delete-s3-bin "nat-detection" "nightly" just delete-s3-bin "node-launchpad" "nightly" - just delete-s3-bin "safe" "nightly" - just delete-s3-bin "safenode" "nightly" - just delete-s3-bin "safenode_rpc_client" "nightly" - just delete-s3-bin "safenode-manager" "nightly" - just delete-s3-bin "safenodemand" "nightly" - just delete-s3-bin "sn_auditor" "nightly" + just delete-s3-bin "autonomi" "nightly" + just delete-s3-bin "antnode" "nightly" + just delete-s3-bin "antnode_rpc_client" "nightly" + just delete-s3-bin "antctl" "nightly" + just delete-s3-bin "antctld" "nightly" - name: upload binaries to S3 shell: bash run: | version=$(date +"%Y.%m.%d") - just package-bin "faucet" "$version" just package-bin "nat-detection" "$version" just package-bin "node-launchpad" "$version" - just package-bin "safe" "$version" - just package-bin "safenode" "$version" - just package-bin "safenode_rpc_client" "$version" - just package-bin "safenode-manager" "$version" - just package-bin "safenodemand" "$version" - just package-bin "sn_auditor" "$version" + just package-bin "autonomi" "$version" + just package-bin "antnode" "$version" + just package-bin "antnode_rpc_client" "$version" + just package-bin "antctl" "$version" + just package-bin "antctld" "$version" just upload-all-packaged-bins-to-s3 rm -rf packaged_bins - just package-bin "faucet" "nightly" just package-bin "nat-detection" "nightly" just package-bin "node-launchpad" "nightly" - just package-bin "safe" "nightly" - just package-bin "safenode" "nightly" - just package-bin "safenode_rpc_client" "nightly" - just package-bin "safenode-manager" "nightly" - just package-bin "safenodemand" "nightly" - just package-bin "sn_auditor" "nightly" + just package-bin "autonomi" "nightly" + just package-bin "antnode" "nightly" + just package-bin "antnode_rpc_client" "nightly" + just package-bin "antctl" "nightly" + just package-bin "antctld" "nightly" just upload-all-packaged-bins-to-s3 github-release: diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 5edee725ab..56ec6488d3 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -17,11 +17,11 @@ jobs: matrix: include: - os: ubuntu-latest - safe_path: /home/runner/.local/share/safe + autonomi_path: /home/runner/.local/share/autonomi - os: windows-latest - safe_path: C:\\Users\\runneradmin\\AppData\\Roaming\\safe + autonomi_path: C:\\Users\\runneradmin\\AppData\\Roaming\\autonomi - os: macos-latest - safe_path: /Users/runner/Library/Application\ Support/safe + autonomi_path: /Users/runner/Library/Application\ Support/autonomi steps: - uses: actions/checkout@v4 @@ -32,7 +32,7 @@ jobs: continue-on-error: true - name: Build binaries - run: cargo build --release --features local --bin safenode --bin autonomi + run: cargo build --release --features local --bin antnode --bin autonomi timeout-minutes: 30 - name: Start a local network @@ -40,7 +40,7 @@ jobs: with: action: start enable-evm-testnet: true - node-path: target/release/safenode + node-path: target/release/antnode platform: ${{ matrix.os }} build: true @@ -186,7 +186,7 @@ jobs: - name: Delete current register signing key shell: bash - run: rm -rf ${{ matrix.safe_path }}/autonomi + run: rm -rf ${{ matrix.autonomi_path }}/autonomi - name: Generate new register signing key run: ./target/release/autonomi --log-output-dest=data-dir register generate-key @@ -281,14 +281,14 @@ jobs: matrix: include: - os: ubuntu-latest - node_data_path: /home/runner/.local/share/safe/node - safe_path: /home/runner/.local/share/safe + node_data_path: /home/runner/.local/share/autonomi/node + autonomi_path: /home/runner/.local/share/autonomi - os: windows-latest - node_data_path: C:\\Users\\runneradmin\\AppData\\Roaming\\safe\\node - safe_path: C:\\Users\\runneradmin\\AppData\\Roaming\\safe + node_data_path: C:\\Users\\runneradmin\\AppData\\Roaming\\autonomi\\node + autonomi_path: C:\\Users\\runneradmin\\AppData\\Roaming\\autonomi - os: macos-latest - node_data_path: /Users/runner/Library/Application Support/safe/node - safe_path: /Users/runner/Library/Application Support/safe + node_data_path: /Users/runner/Library/Application Support/autonomi/node + autonomi_path: /Users/runner/Library/Application Support/autonomi steps: - uses: actions/checkout@v4 @@ -299,7 +299,7 @@ jobs: continue-on-error: true - name: Build binaries - run: cargo build --release --features local --bin safenode + run: cargo build --release --features local --bin antnode timeout-minutes: 30 - name: Build churn tests @@ -315,7 +315,7 @@ jobs: with: action: start enable-evm-testnet: true - node-path: target/release/safenode + node-path: target/release/antnode platform: ${{ matrix.os }} build: true @@ -421,7 +421,7 @@ jobs: shell: bash timeout-minutes: 10 run: | - if ! rg '^' "${{ matrix.safe_path }}"/*/*/logs | awk 'length($0) > 15000 { print; exit 1 }' + if ! rg '^' "${{ matrix.autonomi_path }}"/*/*/logs | awk 'length($0) > 15000 { print; exit 1 }' then echo "We are logging an extremely large data" exit 1 @@ -435,13 +435,13 @@ jobs: include: - os: ubuntu-latest node_data_path: /home/runner/.local/share/safe/node - safe_path: /home/runner/.local/share/safe + autonomi_path: /home/runner/.local/share/safe - os: windows-latest node_data_path: C:\\Users\\runneradmin\\AppData\\Roaming\\safe\\node - safe_path: C:\\Users\\runneradmin\\AppData\\Roaming\\safe + autonomi_path: C:\\Users\\runneradmin\\AppData\\Roaming\\safe - os: macos-latest node_data_path: /Users/runner/Library/Application Support/safe/node - safe_path: /Users/runner/Library/Application Support/safe + autonomi_path: /Users/runner/Library/Application Support/safe steps: - uses: actions/checkout@v4 @@ -452,7 +452,7 @@ jobs: continue-on-error: true - name: Build binaries - run: cargo build --release --features local --bin safenode + run: cargo build --release --features local --bin antnode timeout-minutes: 30 - name: Build data location and routing table tests @@ -468,7 +468,7 @@ jobs: with: action: start enable-evm-testnet: true - node-path: target/release/safenode + node-path: target/release/antnode platform: ${{ matrix.os }} build: true @@ -533,7 +533,7 @@ jobs: shell: bash timeout-minutes: 10 run: | - if ! rg '^' "${{ matrix.safe_path }}"/*/*/logs | awk 'length($0) > 15000 { print; exit 1 }' + if ! rg '^' "${{ matrix.autonomi_path }}"/*/*/logs | awk 'length($0) > 15000 { print; exit 1 }' then echo "We are logging an extremely large data" exit 1 diff --git a/.github/workflows/nightly_wan.yml b/.github/workflows/nightly_wan.yml index 0350f1e30d..eea61fd7bd 100644 --- a/.github/workflows/nightly_wan.yml +++ b/.github/workflows/nightly_wan.yml @@ -417,7 +417,7 @@ jobs: # echo "We are logging an extremely large data" # exit 1 # fi - # # node dir structure: ~/sn-testnet-deploy/logs/NightlyChurnTest/NightlyChurnTest-genesis/safenode1/safenode.log + # # node dir structure: ~/sn-testnet-deploy/logs/NightlyChurnTest/NightlyChurnTest-genesis/safenode1/antnode.log # #faucet dir structure: ~/sn-testnet-deploy/logs/NightlyChurnTest/NightlyChurnTest-genesis/faucet/logs/faucet.log # if ! rg '^' "${{ matrix.wan_logs_path }}"/*/*/*/ | awk 'length($0) > 15000 { print; exit 1 }' # then @@ -430,7 +430,7 @@ jobs: # then # echo "Sanity check pass for local safe path" # fi - # # node dir structure: ~/sn-testnet-deploy/logs/NightlyChurnTest/NightlyChurnTest-genesis/safenode1/safenode.log + # # node dir structure: ~/sn-testnet-deploy/logs/NightlyChurnTest/NightlyChurnTest-genesis/safenode1/antnode.log # #faucet dir structure: ~/sn-testnet-deploy/logs/NightlyChurnTest/NightlyChurnTest-genesis/faucet/logs/faucet.log # if ! rg '^' "${{ matrix.wan_logs_path }}"/*/*/*/ | awk 'length($0) > 1000 { print; exit 1 }' # then @@ -607,7 +607,7 @@ jobs: # echo "We are logging an extremely large data" # exit 1 # fi - # # node dir structure: ~/sn-testnet-deploy/logs/NightlyChurnTest/NightlyChurnTest-genesis/safenode1/safenode.log + # # node dir structure: ~/sn-testnet-deploy/logs/NightlyChurnTest/NightlyChurnTest-genesis/safenode1/antnode.log # #faucet dir structure: ~/sn-testnet-deploy/logs/NightlyChurnTest/NightlyChurnTest-genesis/faucet/logs/faucet.log # if ! rg '^' "${{ matrix.wan_logs_path }}"/*/*/*/ | awk 'length($0) > 15000 { print; exit 1 }' # then @@ -620,7 +620,7 @@ jobs: # then # echo "Sanity check pass for local safe path" # fi - # # node dir structure: ~/sn-testnet-deploy/logs/NightlyChurnTest/NightlyChurnTest-genesis/safenode1/safenode.log + # # node dir structure: ~/sn-testnet-deploy/logs/NightlyChurnTest/NightlyChurnTest-genesis/safenode1/antnode.log # #faucet dir structure: ~/sn-testnet-deploy/logs/NightlyChurnTest/NightlyChurnTest-genesis/faucet/logs/faucet.log # if ! rg '^' "${{ matrix.wan_logs_path }}"/*/*/*/ | awk 'length($0) > 1000 { print; exit 1 }' # then diff --git a/.github/workflows/node_man_tests.yml b/.github/workflows/node_man_tests.yml index d889a49cbf..2944456bf6 100644 --- a/.github/workflows/node_man_tests.yml +++ b/.github/workflows/node_man_tests.yml @@ -52,7 +52,7 @@ jobs: # - uses: Swatinem/rust-cache@v2 # - name: Build binaries - # run: cargo build --release --bin safenode --bin faucet + # run: cargo build --release --bin antnode --bin faucet # timeout-minutes: 30 # - name: Start a local network @@ -60,7 +60,7 @@ jobs: # with: # action: start # interval: 2000 - # node-path: target/release/safenode + # node-path: target/release/antnode # faucet-path: target/release/faucet # platform: ${{ matrix.os }} # build: true @@ -105,7 +105,7 @@ jobs: # - uses: Swatinem/rust-cache@v2 # - name: Build binaries - # run: cargo build --release --bin safenode --bin faucet + # run: cargo build --release --bin antnode --bin faucet # timeout-minutes: 30 # - name: Start a local network @@ -113,7 +113,7 @@ jobs: # with: # action: start # interval: 2000 - # node-path: target/release/safenode + # node-path: target/release/antnode # faucet-path: target/release/faucet # platform: ${{ matrix.os }} # build: true diff --git a/.github/workflows/python-publish-node.yml b/.github/workflows/python-publish-node.yml index c65cca0bb5..e369bd2296 100644 --- a/.github/workflows/python-publish-node.yml +++ b/.github/workflows/python-publish-node.yml @@ -30,9 +30,9 @@ jobs: components: rustfmt - name: Create Python module structure run: | - mkdir -p sn_node/python/safenode - cat > sn_node/python/safenode/__init__.py << EOL - from ._safenode import * + mkdir -p ant_node/python/antnode + cat > ant_node/python/antnode/__init__.py << EOL + from ._antnode import * __version__ = "${{ github.ref_name }}" EOL - name: Build wheels @@ -41,12 +41,12 @@ jobs: target: ${{ matrix.target }} args: --release --out dist sccache: 'true' - working-directory: ./sn_node + working-directory: ./ant_node - name: Upload wheels uses: actions/upload-artifact@v4 with: name: wheels-${{ matrix.python-version }}-${{ matrix.target }} - path: sn_node/dist/*.whl + path: ant_node/dist/*.whl if-no-files-found: error retention-days: 1 compression-level: 9 @@ -78,20 +78,20 @@ jobs: - name: Create Python module structure shell: cmd run: | - if not exist "sn_node\python\safenode" mkdir sn_node\python\safenode - echo from ._safenode import * > sn_node\python\safenode\__init__.py - echo __version__ = "${{ github.ref_name }}" >> sn_node\python\safenode\__init__.py + if not exist "ant_node\python\antnode" mkdir ant_node\python\antnode + echo from ._antnode import * > ant_node\python\antnode\__init__.py + echo __version__ = "${{ github.ref_name }}" >> ant_node\python\antnode\__init__.py - name: Build wheels uses: PyO3/maturin-action@v1 with: args: --release --out dist sccache: 'true' - working-directory: ./sn_node + working-directory: ./ant_node - name: Upload wheels uses: actions/upload-artifact@v4 with: name: wheels-${{ matrix.python-version }}-${{ matrix.target }} - path: sn_node/dist/*.whl + path: ant_node/dist/*.whl if-no-files-found: error retention-days: 1 compression-level: 9 @@ -127,9 +127,9 @@ jobs: rustup component add rustfmt - name: Create Python module structure run: | - mkdir -p sn_node/python/safenode - cat > sn_node/python/safenode/__init__.py << EOL - from ._safenode import * + mkdir -p ant_node/python/antnode + cat > ant_node/python/antnode/__init__.py << EOL + from ._antnode import * __version__ = "${{ github.ref_name }}" EOL - name: Build wheels @@ -139,7 +139,7 @@ jobs: manylinux: auto args: --release --out dist sccache: 'true' - working-directory: ./sn_node + working-directory: ./ant_node before-script-linux: | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y source $HOME/.cargo/env @@ -148,7 +148,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: wheels-${{ matrix.python-version }}-${{ matrix.target }} - path: sn_node/dist/*.whl + path: ant_node/dist/*.whl if-no-files-found: error retention-days: 1 compression-level: 9 @@ -171,9 +171,9 @@ jobs: components: rustfmt - name: Create Python module structure run: | - mkdir -p sn_node/python/safenode - cat > sn_node/python/safenode/__init__.py << EOL - from ._safenode import * + mkdir -p ant_node/python/antnode + cat > ant_node/python/antnode/__init__.py << EOL + from ._antnode import * __version__ = "${{ github.ref_name }}" EOL - name: Build sdist @@ -181,12 +181,12 @@ jobs: with: command: sdist args: --out dist - working-directory: ./sn_node + working-directory: ./ant_node - name: Upload sdist uses: actions/upload-artifact@v4 with: name: sdist - path: sn_node/dist/*.tar.gz + path: ant_node/dist/*.tar.gz if-no-files-found: error retention-days: 1 compression-level: 9 diff --git a/Cargo.lock b/Cargo.lock index e6b6e14d45..f1a3b26934 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -112,15 +112,15 @@ dependencies = [ [[package]] name = "allocator-api2" -version = "0.2.18" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" +checksum = "45862d1c77f2228b9e10bc609d5bc203d86ebc9b87ad8d5d5167a6c9abf739d9" [[package]] name = "alloy" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8cbebb817e6ada1abb27e642592a39eebc963eb0b9e78f66c467549f3903770" +checksum = "ea8ebf106e84a1c37f86244df7da0c7587e697b71a0d565cce079449b85ac6f8" dependencies = [ "alloy-consensus", "alloy-contract", @@ -141,19 +141,20 @@ dependencies = [ [[package]] name = "alloy-chains" -version = "0.1.33" +version = "0.1.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "805f7a974de5804f5c053edc6ca43b20883bdd3a733b3691200ae3a4b454a2db" +checksum = "18c5c520273946ecf715c0010b4e3503d7eba9893cd9ce6b7fff5654c4a3c470" dependencies = [ + "alloy-primitives", "num_enum", "strum", ] [[package]] name = "alloy-consensus" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdf02dfacfc815214f9b54ff50d54900ba527a68fd73e2c5637ced3460005045" +checksum = "41ed961a48297c732a5d97ee321aa8bb5009ecadbcb077d8bec90cb54e651629" dependencies = [ "alloy-eips", "alloy-primitives", @@ -167,9 +168,9 @@ dependencies = [ [[package]] name = "alloy-contract" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d45354c6946d064827d3b85041876aad9490b634f1761139934f8b1f65686b09" +checksum = "460ab80ce4bda1c80bcf96fe7460520476f2c7b734581c6567fac2708e2a60ef" dependencies = [ "alloy-dyn-abi", "alloy-json-abi", @@ -182,14 +183,14 @@ dependencies = [ "alloy-transport", "futures", "futures-util", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "alloy-core" -version = "0.8.5" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ce854562e7cafd5049189d0268d6e5cba05fe6c9cb7c6f8126a79b94800629c" +checksum = "c3d14d531c99995de71558e8e2206c27d709559ee8e5a0452b965ea82405a013" dependencies = [ "alloy-dyn-abi", "alloy-json-abi", @@ -200,9 +201,9 @@ dependencies = [ [[package]] name = "alloy-dyn-abi" -version = "0.8.5" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b499852e1d0e9b8c6db0f24c48998e647c0d5762a01090f955106a7700e4611" +checksum = "80759b3f57b3b20fa7cd8fef6479930fc95461b58ff8adea6e87e618449c8a1d" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -228,9 +229,9 @@ dependencies = [ [[package]] name = "alloy-eip7702" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c15873ee28dfe5a1aeddd762483bc7f378b465ec49bdce8165c4c46b4f55cb0a" +checksum = "64ffc577390ce50234e02d841214b3dc0bea6aaaae8e04bbf3cb82e9a45da9eb" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -240,9 +241,9 @@ dependencies = [ [[package]] name = "alloy-eips" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "769da342b6bcd945013925ef4c40763cc82f11e002c60702dba8b444bb60e5a7" +checksum = "b69e06cf9c37be824b9d26d6d101114fdde6af0c87de2828b414c05c4b3daa71" dependencies = [ "alloy-eip2930", "alloy-eip7702", @@ -258,9 +259,9 @@ dependencies = [ [[package]] name = "alloy-genesis" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c698ce0ada980b17f0323e1a28c7da8a2e9abc6dff5be9ee33d1525b28ac46b6" +checksum = "dde15e14944a88bd6a57d325e9a49b75558746fe16aaccc79713ae50a6a9574c" dependencies = [ "alloy-primitives", "alloy-serde", @@ -269,9 +270,9 @@ dependencies = [ [[package]] name = "alloy-json-abi" -version = "0.8.5" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a438d4486b5d525df3b3004188f9d5cd1d65cd30ecc41e5a3ccef6f6342e8af9" +checksum = "ac4b22b3e51cac09fd2adfcc73b55f447b4df669f983c13f7894ec82b607c63f" dependencies = [ "alloy-primitives", "alloy-sol-type-parser", @@ -281,23 +282,23 @@ dependencies = [ [[package]] name = "alloy-json-rpc" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1050e1d65524c030b17442b6546b564da51fdab7f71bd534b001ba65f2ebb16" +checksum = "af5979e0d5a7bf9c7eb79749121e8256e59021af611322aee56e77e20776b4b3" dependencies = [ "alloy-primitives", "alloy-sol-types", "serde", "serde_json", - "thiserror", + "thiserror 1.0.69", "tracing", ] [[package]] name = "alloy-network" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da34a18446a27734473af3d77eb21c5ebbdf97ea8eb65c39c0b50916bc659023" +checksum = "204237129086ce5dc17a58025e93739b01b45313841f98fa339eb1d780511e57" dependencies = [ "alloy-consensus", "alloy-eips", @@ -311,14 +312,14 @@ dependencies = [ "async-trait", "auto_impl", "futures-utils-wasm", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "alloy-network-primitives" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a968c063fcfcb937736665c865a71fc2242b68916156f5ffa41fee7b44bb695" +checksum = "514f70ee2a953db21631cd817b13a1571474ec77ddc03d47616d5e8203489fde" dependencies = [ "alloy-consensus", "alloy-eips", @@ -329,9 +330,9 @@ dependencies = [ [[package]] name = "alloy-node-bindings" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439fc6a933b9f8e8b272a8cac35dbeabaf2b2eaf9590482bebedb5782153118e" +checksum = "27444ea67d360508753022807cdd0b49a95c878924c9c5f8f32668b7d7768245" dependencies = [ "alloy-genesis", "alloy-primitives", @@ -339,25 +340,26 @@ dependencies = [ "rand 0.8.5", "serde_json", "tempfile", - "thiserror", + "thiserror 1.0.69", "tracing", "url", ] [[package]] name = "alloy-primitives" -version = "0.8.5" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "260d3ff3bff0bb84599f032a2f2c6828180b0ea0cd41fdaf44f39cef3ba41861" +checksum = "9db948902dfbae96a73c2fbf1f7abec62af034ab883e4c777c3fd29702bd6e2c" dependencies = [ "alloy-rlp", "bytes", "cfg-if", "const-hex", "derive_more", - "hashbrown 0.14.5", + "foldhash", + "hashbrown 0.15.2", "hex-literal", - "indexmap 2.5.0", + "indexmap 2.7.0", "itoa", "k256", "keccak-asm", @@ -373,9 +375,9 @@ dependencies = [ [[package]] name = "alloy-provider" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c45dbc0e3630becef9e988b69d43339f68d67e32a854e3c855bc28bd5031895b" +checksum = "4814d141ede360bb6cd1b4b064f1aab9de391e7c4d0d4d50ac89ea4bc1e25fbd" dependencies = [ "alloy-chains", "alloy-consensus", @@ -401,11 +403,11 @@ dependencies = [ "lru", "parking_lot", "pin-project", - "reqwest 0.12.7", + "reqwest 0.12.9", "schnellru", "serde", "serde_json", - "thiserror", + "thiserror 1.0.69", "tokio", "tracing", "url", @@ -414,9 +416,9 @@ dependencies = [ [[package]] name = "alloy-rlp" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26154390b1d205a4a7ac7352aa2eb4f81f391399d4e2f546fb81a2f8bb383f62" +checksum = "da0822426598f95e45dd1ea32a738dac057529a709ee645fcc516ffa4cbde08f" dependencies = [ "alloy-rlp-derive", "arrayvec", @@ -425,20 +427,20 @@ dependencies = [ [[package]] name = "alloy-rlp-derive" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d0f2d905ebd295e7effec65e5f6868d153936130ae718352771de3e7d03c75c" +checksum = "2b09cae092c27b6f1bde952653a22708691802e57bfef4a2973b80bea21efd3f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] name = "alloy-rpc-client" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "917e5504e4f8f7e39bdc322ff81589ed54c1e462240adaeb58162c2d986a5a2b" +checksum = "7fc2bd1e7403463a5f2c61e955bcc9d3072b63aa177442b0f9aa6a6d22a941e3" dependencies = [ "alloy-json-rpc", "alloy-primitives", @@ -446,7 +448,7 @@ dependencies = [ "alloy-transport-http", "futures", "pin-project", - "reqwest 0.12.7", + "reqwest 0.12.9", "serde", "serde_json", "tokio", @@ -459,9 +461,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07c7eb2dc6db1dd41e5e7bd2b98a38813854efc30e034afd90d1e420e7f3de2b" +checksum = "eea9bf1abdd506f985a53533f5ac01296bcd6102c5e139bbc5d40bc468d2c916" dependencies = [ "alloy-primitives", "alloy-rpc-types-anvil", @@ -472,9 +474,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-anvil" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2640928d9b1d43bb1cec7a0d615e10c2b407c5bd8ff1fcbe49e6318a2b62d731" +checksum = "2382fc63fb0cf3e02818d547b80cb66cc49a31f8803d0c328402b2008bc13650" dependencies = [ "alloy-primitives", "alloy-serde", @@ -483,9 +485,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-eth" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e855b0daccf2320ba415753c3fed422abe9d3ad5d77b2d6cafcc9bcf32fe387f" +checksum = "00b034779a4850b4b03f5be5ea674a1cf7d746b2da762b34d1860ab45e48ca27" dependencies = [ "alloy-consensus", "alloy-eips", @@ -502,9 +504,9 @@ dependencies = [ [[package]] name = "alloy-serde" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35c2661ca6785add8fc37aff8005439c806ffad58254c19939c6f59ac0d6596e" +checksum = "028e72eaa9703e4882344983cfe7636ce06d8cce104a78ea62fd19b46659efc4" dependencies = [ "alloy-primitives", "serde", @@ -513,23 +515,23 @@ dependencies = [ [[package]] name = "alloy-signer" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67eca011160d18a7dc6d8cdc1e8dc13e2e86c908f8e41b02aa76e429d6fe7085" +checksum = "592c185d7100258c041afac51877660c7bf6213447999787197db4842f0e938e" dependencies = [ "alloy-primitives", "async-trait", "auto_impl", "elliptic-curve 0.13.8", "k256", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "alloy-signer-local" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c54b195a6ee5a83f32e7c697b4e6b565966737ed5a2ef9176bbbb39f720d023" +checksum = "6614f02fc1d5b079b2a4a5320018317b506fd0a6d67c1fd5542a71201724986c" dependencies = [ "alloy-consensus", "alloy-network", @@ -538,47 +540,47 @@ dependencies = [ "async-trait", "k256", "rand 0.8.5", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "alloy-sol-macro" -version = "0.8.5" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68e7f6e8fe5b443f82b3f1e15abfa191128f71569148428e49449d01f6f49e8b" +checksum = "3bfd7853b65a2b4f49629ec975fee274faf6dff15ab8894c620943398ef283c0" dependencies = [ "alloy-sol-macro-expander", "alloy-sol-macro-input", "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] name = "alloy-sol-macro-expander" -version = "0.8.5" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b96ce28d2fde09abb6135f410c41fad670a3a770b6776869bd852f1df102e6f" +checksum = "82ec42f342d9a9261699f8078e57a7a4fda8aaa73c1a212ed3987080e6a9cd13" dependencies = [ "alloy-json-abi", "alloy-sol-macro-input", "const-hex", "heck 0.5.0", - "indexmap 2.5.0", + "indexmap 2.7.0", "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", "syn-solidity", "tiny-keccak", ] [[package]] name = "alloy-sol-macro-input" -version = "0.8.5" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "906746396a8296537745711630d9185746c0b50c033d5e9d18b0a6eba3d53f90" +checksum = "ed2c50e6a62ee2b4f7ab3c6d0366e5770a21cad426e109c2f40335a1b3aff3df" dependencies = [ "alloy-json-abi", "const-hex", @@ -587,15 +589,15 @@ dependencies = [ "proc-macro2", "quote", "serde_json", - "syn 2.0.77", + "syn 2.0.90", "syn-solidity", ] [[package]] name = "alloy-sol-type-parser" -version = "0.8.5" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc85178909a49c8827ffccfc9103a7ce1767ae66a801b69bdc326913870bf8e6" +checksum = "ac17c6e89a50fb4a758012e4b409d9a0ba575228e69b539fe37d7a1bd507ca4a" dependencies = [ "serde", "winnow", @@ -603,9 +605,9 @@ dependencies = [ [[package]] name = "alloy-sol-types" -version = "0.8.5" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d86a533ce22525969661b25dfe296c112d35eb6861f188fd284f8bd4bb3842ae" +checksum = "c9dc0fffe397aa17628160e16b89f704098bf3c9d74d5d369ebc239575936de5" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -616,9 +618,9 @@ dependencies = [ [[package]] name = "alloy-transport" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4a136e733f55fef0870b81e1f8f1db28e78973d1b1ae5a5df642ba39538a07" +checksum = "be77579633ebbc1266ae6fd7694f75c408beb1aeb6865d0b18f22893c265a061" dependencies = [ "alloy-json-rpc", "base64 0.22.1", @@ -626,7 +628,7 @@ dependencies = [ "futures-utils-wasm", "serde", "serde_json", - "thiserror", + "thiserror 1.0.69", "tokio", "tower 0.5.1", "tracing", @@ -637,13 +639,13 @@ dependencies = [ [[package]] name = "alloy-transport-http" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a6b358a89b6d107b92d09b61a61fbc04243942182709752c796f4b29402cead" +checksum = "91fd1a5d0827939847983b46f2f79510361f901dc82f8e3c38ac7397af142c6e" dependencies = [ "alloy-json-rpc", "alloy-transport", - "reqwest 0.12.7", + "reqwest 0.12.9", "serde_json", "tower 0.5.1", "tracing", @@ -673,9 +675,9 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "anstream" -version = "0.6.15" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" +checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" dependencies = [ "anstyle", "anstyle-parse", @@ -688,36 +690,36 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.8" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" [[package]] name = "anstyle-parse" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.4" +version = "3.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" +checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" dependencies = [ "anstyle", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -744,7 +746,7 @@ dependencies = [ "serde", "serde_json", "tempfile", - "thiserror", + "thiserror 1.0.69", "tiny-keccak", "tokio", "tracing", @@ -767,7 +769,7 @@ dependencies = [ "serde", "serde_json", "sysinfo", - "thiserror", + "thiserror 1.0.69", "tokio", "tracing", "tracing-appender", @@ -811,7 +813,7 @@ dependencies = [ "getrandom 0.2.15", "hex 0.4.3", "hkdf", - "hyper 0.14.30", + "hyper 0.14.31", "itertools 0.12.1", "lazy_static", "libp2p", @@ -826,7 +828,7 @@ dependencies = [ "sha2 0.10.8", "strum", "sysinfo", - "thiserror", + "thiserror 1.0.69", "tiny-keccak", "tokio", "tracing", @@ -875,7 +877,7 @@ dependencies = [ "pyo3", "rand 0.8.5", "rayon", - "reqwest 0.12.7", + "reqwest 0.12.9", "rmp-serde", "self_encryption", "serde", @@ -884,7 +886,7 @@ dependencies = [ "sysinfo", "tempfile", "test-utils", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-stream", "tonic 0.6.2", @@ -905,6 +907,7 @@ dependencies = [ "ant-logging", "ant-peers-acquisition", "ant-protocol", + "ant-releases", "ant-service-management", "assert_cmd", "assert_fs", @@ -923,14 +926,13 @@ dependencies = [ "predicates 3.1.2", "prost 0.9.0", "rand 0.8.5", - "reqwest 0.12.7", + "reqwest 0.12.9", "semver 1.0.23", "serde", "serde_json", "service-manager", - "sn-releases", "sysinfo", - "thiserror", + "thiserror 1.0.69", "tokio", "tonic 0.6.2", "tracing", @@ -956,7 +958,7 @@ dependencies = [ "hex 0.4.3", "libp2p", "libp2p-identity", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-stream", "tonic 0.6.2", @@ -973,8 +975,8 @@ dependencies = [ "lazy_static", "libp2p", "rand 0.8.5", - "reqwest 0.12.7", - "thiserror", + "reqwest 0.12.9", + "thiserror 1.0.69", "tokio", "tracing", "url", @@ -1002,7 +1004,7 @@ dependencies = [ "serde", "serde_json", "sha2 0.10.8", - "thiserror", + "thiserror 1.0.69", "tiny-keccak", "tonic 0.6.2", "tonic-build", @@ -1022,11 +1024,30 @@ dependencies = [ "rand 0.8.5", "rmp-serde", "serde", - "thiserror", + "thiserror 1.0.69", "tiny-keccak", "xor_name", ] +[[package]] +name = "ant-releases" +version = "0.3.1" +source = "git+https://github.com/jacderida/ant-releases.git?branch=chore-rename_binaries#9747746fbef12b63c49cdb9dbb08ecd42b18794b" +dependencies = [ + "async-trait", + "chrono", + "flate2", + "lazy_static", + "regex", + "reqwest 0.12.9", + "semver 1.0.23", + "serde_json", + "tar", + "thiserror 1.0.69", + "tokio", + "zip", +] + [[package]] name = "ant-service-management" version = "0.4.3" @@ -1045,7 +1066,7 @@ dependencies = [ "serde_json", "service-manager", "sysinfo", - "thiserror", + "thiserror 1.0.69", "tokio", "tonic 0.6.2", "tonic-build", @@ -1067,9 +1088,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.89" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" +checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" [[package]] name = "arboard" @@ -1219,6 +1240,12 @@ dependencies = [ "rand 0.8.5", ] +[[package]] +name = "arraydeque" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d902e3d592a523def97af8f317b08ce16b7ab854c1985a0c671e6f15cebc236" + [[package]] name = "arrayref" version = "0.3.9" @@ -1249,7 +1276,7 @@ dependencies = [ "nom", "num-traits", "rusticata-macros", - "thiserror", + "thiserror 1.0.69", "time", ] @@ -1261,7 +1288,7 @@ checksum = "965c2d33e53cb6b267e148a4cb0760bc01f4904c1cd4bb4002a085bb016d1490" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", "synstructure", ] @@ -1273,7 +1300,7 @@ checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -1315,9 +1342,9 @@ checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" [[package]] name = "async-io" -version = "2.3.4" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "444b0228950ee6501b3568d3c93bf1176a1fdbc3b758dcd9475046d30f4dc7e8" +checksum = "43a2b323ccce0a1d90b449fd71f2a06ca7faa7c54c2751f06c9bd851fc061059" dependencies = [ "async-lock", "cfg-if", @@ -1345,9 +1372,9 @@ dependencies = [ [[package]] name = "async-stream" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" +checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" dependencies = [ "async-stream-impl", "futures-core", @@ -1356,24 +1383,24 @@ dependencies = [ [[package]] name = "async-stream-impl" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" +checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] name = "async-trait" -version = "0.1.82" +version = "0.1.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -1419,7 +1446,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -1428,14 +1455,14 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dde43e75fd43e8a1bf86103336bc699aa8d17ad1be60c76c0bdfd4828e19b78" dependencies = [ - "autocfg 1.3.0", + "autocfg 1.4.0", ] [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "autonomi" @@ -1472,7 +1499,7 @@ dependencies = [ "sn_bls_ckd", "sn_curv", "test-utils", - "thiserror", + "thiserror 1.0.69", "tiny_http", "tokio", "tracing", @@ -1509,7 +1536,7 @@ dependencies = [ "serde", "serde_json", "tempfile", - "thiserror", + "thiserror 1.0.69", "tokio", "tracing", "walkdir", @@ -1528,7 +1555,7 @@ dependencies = [ "futures-util", "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.30", + "hyper 0.14.31", "itoa", "matchit", "memchr", @@ -1638,9 +1665,9 @@ dependencies = [ [[package]] name = "bip39" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" +checksum = "33415e24172c1b7d6066f6d999545375ab8e1d95421d6784bdfff9496f292387" dependencies = [ "bitcoin_hashes", "serde", @@ -1662,11 +1689,21 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" +[[package]] +name = "bitcoin-internals" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9425c3bf7089c983facbae04de54513cce73b41c7f9ff8c845b54e7bc64ebbfb" + [[package]] name = "bitcoin_hashes" -version = "0.11.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90064b8dee6815a6470d60bad07bbbaee885c0e12d04177138fa3291a01b7bc4" +checksum = "1930a4dabfebb8d7d9992db18ebe3ae2876f0a305fab206fd168df931ede293b" +dependencies = [ + "bitcoin-internals", + "hex-conservative", +] [[package]] name = "bitflags" @@ -1828,7 +1865,7 @@ dependencies = [ "rand 0.8.5", "rand_chacha 0.3.1", "serde", - "thiserror", + "thiserror 1.0.69", "tiny-keccak", "zeroize", ] @@ -1865,12 +1902,12 @@ dependencies = [ [[package]] name = "bstr" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40723b8fb387abc38f4f4a37c09073622e41dd12327033091ef8950659e6dc0c" +checksum = "1a68f1f47cdf0ec8ee4b941b2eee2a80cb796db73118c0dd09ac63fbe405be22" dependencies = [ "memchr", - "regex-automata 0.4.8", + "regex-automata 0.4.9", "serde", ] @@ -1894,9 +1931,9 @@ checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" [[package]] name = "bytemuck" -version = "1.18.0" +version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94bbb0ad554ad961ddc5da507a12a29b14e4ae5bda06b19f575a3e6079d2e2ae" +checksum = "8b37c88a63ffd85d15b406896cc343916d7cf57838a847b3a6f2ca5d39a5695a" [[package]] name = "byteorder" @@ -1912,9 +1949,9 @@ checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" [[package]] name = "bytes" -version = "1.7.2" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" +checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" dependencies = [ "serde", ] @@ -1966,9 +2003,9 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" +checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea" dependencies = [ "serde", ] @@ -1984,7 +2021,7 @@ dependencies = [ "semver 1.0.23", "serde", "serde_json", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -2028,9 +2065,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.21" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07b1695e2c7e8fc85310cde85aeaab7e3097f593c91d209d3f9df76c928100f0" +checksum = "f34d93e62b03caf570cccc334cbc6c2fceca82f39211051345108adcba3eebdc" dependencies = [ "jobserver", "libc", @@ -2043,6 +2080,12 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + [[package]] name = "chacha20" version = "0.9.1" @@ -2128,9 +2171,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.17" +version = "4.5.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e5a21b8495e732f1b3c364c9949b201ca7bae518c502c80256c96ad79eaf6ac" +checksum = "fb3b4b9e5a7c7514dfa52869339ee98b3156b0bfb4e8a77c4ff4babb64b1604f" dependencies = [ "clap_builder", "clap_derive", @@ -2138,9 +2181,9 @@ dependencies = [ [[package]] name = "clap-verbosity-flag" -version = "2.2.1" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63d19864d6b68464c59f7162c9914a0b569ddc2926b4a2d71afe62a9738eff53" +checksum = "34c77f67047557f62582784fd7482884697731b2932c7d37ced54bce2312e1e2" dependencies = [ "clap", "log", @@ -2148,9 +2191,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.17" +version = "4.5.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cf2dd12af7a047ad9d6da2b6b249759a22a7abc0f474c1dae1777afa4b21a73" +checksum = "b17a95aa67cc7b5ebd32aa5370189aa0d79069ef1c64ce893bd30fb24bff20ec" dependencies = [ "anstream", "anstyle", @@ -2158,26 +2201,26 @@ dependencies = [ "strsim", "terminal_size", "unicase", - "unicode-width 0.1.14", + "unicode-width 0.2.0", ] [[package]] name = "clap_derive" -version = "4.5.13" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" +checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] name = "clap_lex" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" +checksum = "afb84c814227b90d6895e01398aee0d8033c00e7466aca416fb6a8e0eb19d8a7" [[package]] name = "clipboard-win" @@ -2232,9 +2275,9 @@ dependencies = [ [[package]] name = "colorchoice" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "colored" @@ -2272,14 +2315,13 @@ dependencies = [ [[package]] name = "config" -version = "0.14.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7328b20597b53c2454f0b1919720c25c7339051c02b72b7e05409e00b14132be" +checksum = "68578f196d2a33ff61b27fae256c3164f65e36382648e30666dde05b8cc9dfdf" dependencies = [ "async-trait", "convert_case", "json5", - "lazy_static", "nom", "pathdiff", "ron", @@ -2287,7 +2329,7 @@ dependencies = [ "serde", "serde_json", "toml", - "yaml-rust", + "yaml-rust2", ] [[package]] @@ -2315,9 +2357,9 @@ dependencies = [ [[package]] name = "const-hex" -version = "1.13.1" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0121754e84117e65f9d90648ee6aa4882a6e63110307ab73967a4c5e7e69e586" +checksum = "4b0485bab839b018a8f1723fc5391819fea5f8f0f32288ef8a735fd096b6160c" dependencies = [ "cfg-if", "cpufeatures", @@ -2418,9 +2460,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.14" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" +checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" dependencies = [ "libc", ] @@ -2540,7 +2582,7 @@ checksum = "829d955a0bb380ef178a640b91779e3987da38c9aea133b20614cfed8cdea9c6" dependencies = [ "bitflags 2.6.0", "crossterm_winapi", - "mio 1.0.2", + "mio 1.0.3", "parking_lot", "rustix", "signal-hook", @@ -2610,9 +2652,9 @@ dependencies = [ [[package]] name = "csv" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac574ff4d437a7b5ad237ef331c17ccca63c46479e5b5453eb8e10bb99a759fe" +checksum = "acdc4883a9c96732e4733212c01447ebd805833b7275a73ca3ee080fd77afdaf" dependencies = [ "csv-core", "itoa", @@ -2675,29 +2717,28 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] name = "custom_debug" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14e715bf0e503e909c7076c052e39dd215202e8edeb32f1c194fd630c314d256" +checksum = "2da7d1ad9567b3e11e877f1d7a0fa0360f04162f94965fc4448fbed41a65298e" dependencies = [ "custom_debug_derive", ] [[package]] name = "custom_debug_derive" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f731440b39c73910e253cb465ec1fac97732b3c7af215639881ec0c2a38f4f69" +checksum = "a707ceda8652f6c7624f2be725652e9524c815bf3b9d55a0b2320be2303f9c11" dependencies = [ "darling", - "itertools 0.12.1", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", "synstructure", ] @@ -2722,7 +2763,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -2733,7 +2774,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -2859,7 +2900,7 @@ checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", "unicode-xid", ] @@ -2975,7 +3016,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -3121,9 +3162,9 @@ checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" [[package]] name = "encoding_rs" -version = "0.8.34" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ "cfg-if", ] @@ -3137,7 +3178,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -3158,12 +3199,12 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.9" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -3185,9 +3226,9 @@ dependencies = [ [[package]] name = "event-listener-strategy" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" +checksum = "3c3e4e0dd3673c1139bf041f3008816d9cf2946bbfac2945c09e523b8d7b05b2" dependencies = [ "event-listener", "pin-project-lite", @@ -3214,7 +3255,7 @@ dependencies = [ "rand 0.8.5", "serde", "serde_with", - "thiserror", + "thiserror 1.0.69", "tokio", "tracing", ] @@ -3263,9 +3304,9 @@ checksum = "a2a2b11eda1d40935b26cf18f6833c526845ae8c41e58d09af6adeb6f0269183" [[package]] name = "fastrand" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" +checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" [[package]] name = "fastrlp" @@ -3383,9 +3424,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.33" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253" +checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" dependencies = [ "crc32fast", "miniz_oxide 0.8.0", @@ -3406,6 +3447,12 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2" + [[package]] name = "foreign-types" version = "0.5.0" @@ -3424,7 +3471,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -3468,9 +3515,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -3493,9 +3540,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -3503,15 +3550,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -3521,15 +3568,15 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-lite" -version = "2.3.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" +checksum = "cef40d21ae2c515b51041df9ed313ed21e572df340ea58a922a0aefe7e8891a1" dependencies = [ "futures-core", "pin-project-lite", @@ -3537,13 +3584,13 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -3553,21 +3600,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f2f12607f92c69b12ed746fabf9ca4f5c482cba46679c1a75b874ed7c26adb" dependencies = [ "futures-io", - "rustls 0.23.13", + "rustls 0.23.19", "rustls-pki-types", ] [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-ticker" @@ -3592,9 +3639,9 @@ dependencies = [ [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -3723,7 +3770,7 @@ dependencies = [ "parking_lot", "signal-hook", "smallvec", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -3736,26 +3783,26 @@ dependencies = [ "gix-date", "gix-utils", "itoa", - "thiserror", + "thiserror 1.0.69", "winnow", ] [[package]] name = "gix-bitmap" -version = "0.2.11" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a371db66cbd4e13f0ed9dc4c0fea712d7276805fccc877f77e96374d317e87ae" +checksum = "d48b897b4bbc881aea994b4a5bbb340a04979d7be9089791304e04a9fbc66b53" dependencies = [ - "thiserror", + "thiserror 2.0.3", ] [[package]] name = "gix-chunk" -version = "0.4.8" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45c8751169961ba7640b513c3b24af61aa962c967aaf04116734975cd5af0c52" +checksum = "c6ffbeb3a5c0b8b84c3fe4133a6f8c82fa962f4caefe8d0762eced025d3eb4f7" dependencies = [ - "thiserror", + "thiserror 2.0.3", ] [[package]] @@ -3769,7 +3816,7 @@ dependencies = [ "gix-features", "gix-hash", "memmap2", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -3788,22 +3835,22 @@ dependencies = [ "memchr", "once_cell", "smallvec", - "thiserror", + "thiserror 1.0.69", "unicode-bom", "winnow", ] [[package]] name = "gix-config-value" -version = "0.14.8" +version = "0.14.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03f76169faa0dec598eac60f83d7fcdd739ec16596eca8fb144c88973dbe6f8c" +checksum = "49aaeef5d98390a3bcf9dbc6440b520b793d1bf3ed99317dc407b02be995b28e" dependencies = [ "bitflags 2.6.0", "bstr", "gix-path", "libc", - "thiserror", + "thiserror 2.0.3", ] [[package]] @@ -3814,7 +3861,7 @@ checksum = "9eed6931f21491ee0aeb922751bd7ec97b4b2fe8fbfedcb678e2a2dce5f3b8c0" dependencies = [ "bstr", "itoa", - "thiserror", + "thiserror 1.0.69", "time", ] @@ -3827,7 +3874,7 @@ dependencies = [ "bstr", "gix-hash", "gix-object", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -3843,7 +3890,7 @@ dependencies = [ "gix-path", "gix-ref", "gix-sec", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -3861,7 +3908,7 @@ dependencies = [ "once_cell", "prodash", "sha1_smol", - "thiserror", + "thiserror 1.0.69", "walkdir", ] @@ -3895,7 +3942,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f93d7df7366121b5018f947a04d37f034717e113dcf9ccd85c34b58e57a74d5e" dependencies = [ "faster-hex", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -3934,7 +3981,7 @@ dependencies = [ "memmap2", "rustix", "smallvec", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -3945,7 +3992,7 @@ checksum = "e3bc7fe297f1f4614774989c00ec8b1add59571dc9b024b4c00acb7dedd4e19d" dependencies = [ "gix-tempfile", "gix-utils", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -3956,7 +4003,7 @@ checksum = "999ce923619f88194171a67fb3e6d613653b8d4d6078b529b15a765da0edcc17" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -3974,7 +4021,7 @@ dependencies = [ "gix-validate", "itoa", "smallvec", - "thiserror", + "thiserror 1.0.69", "winnow", ] @@ -3995,7 +4042,7 @@ dependencies = [ "gix-quote", "parking_lot", "tempfile", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -4013,31 +4060,31 @@ dependencies = [ "gix-path", "memmap2", "smallvec", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "gix-path" -version = "0.10.11" +version = "0.10.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebfc4febd088abdcbc9f1246896e57e37b7a34f6909840045a1767c6dafac7af" +checksum = "afc292ef1a51e340aeb0e720800338c805975724c1dfbd243185452efd8645b7" dependencies = [ "bstr", "gix-trace", "home", "once_cell", - "thiserror", + "thiserror 2.0.3", ] [[package]] name = "gix-quote" -version = "0.4.12" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbff4f9b9ea3fa7a25a70ee62f545143abef624ac6aa5884344e70c8b0a1d9ff" +checksum = "64a1e282216ec2ab2816cd57e6ed88f8009e634aec47562883c05ac8a7009a63" dependencies = [ "bstr", "gix-utils", - "thiserror", + "thiserror 2.0.3", ] [[package]] @@ -4058,7 +4105,7 @@ dependencies = [ "gix-utils", "gix-validate", "memmap2", - "thiserror", + "thiserror 1.0.69", "winnow", ] @@ -4073,7 +4120,7 @@ dependencies = [ "gix-revision", "gix-validate", "smallvec", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -4089,7 +4136,7 @@ dependencies = [ "gix-object", "gix-revwalk", "gix-trace", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -4104,14 +4151,14 @@ dependencies = [ "gix-hashtable", "gix-object", "smallvec", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "gix-sec" -version = "0.10.8" +version = "0.10.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fe4d52f30a737bbece5276fab5d3a8b276dc2650df963e293d0673be34e7a5f" +checksum = "a8b876ef997a955397809a2ec398d6a45b7a55b4918f2446344330f778d14fd6" dependencies = [ "bitflags 2.6.0", "gix-path", @@ -4136,9 +4183,9 @@ dependencies = [ [[package]] name = "gix-trace" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cae0e8661c3ff92688ce1c8b8058b3efb312aba9492bbe93661a21705ab431b" +checksum = "04bdde120c29f1fc23a24d3e115aeeea3d60d8e65bab92cc5f9d90d9302eb952" [[package]] name = "gix-traverse" @@ -4154,7 +4201,7 @@ dependencies = [ "gix-object", "gix-revwalk", "smallvec", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -4167,15 +4214,15 @@ dependencies = [ "gix-features", "gix-path", "home", - "thiserror", + "thiserror 1.0.69", "url", ] [[package]] name = "gix-utils" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35192df7fd0fa112263bad8021e2df7167df4cc2a6e6d15892e1e55621d3d4dc" +checksum = "ba427e3e9599508ed98a6ddf8ed05493db114564e338e41f6a996d2e4790335f" dependencies = [ "fastrand", "unicode-normalization", @@ -4188,7 +4235,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "82c27dd34a49b1addf193c92070bcbf3beaf6e10f16a78544de6372e146a0acf" dependencies = [ "bstr", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -4206,7 +4253,7 @@ dependencies = [ "aho-corasick", "bstr", "log", - "regex-automata 0.4.8", + "regex-automata 0.4.9", "regex-syntax 0.8.5", ] @@ -4271,7 +4318,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.5.0", + "indexmap 2.7.0", "slab", "tokio", "tokio-util 0.7.12", @@ -4308,9 +4355,29 @@ checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ "ahash", "allocator-api2", +] + +[[package]] +name = "hashbrown" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", "serde", ] +[[package]] +name = "hashlink" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" +dependencies = [ + "hashbrown 0.14.5", +] + [[package]] name = "headers" version = "0.3.9" @@ -4392,6 +4459,12 @@ dependencies = [ "serde", ] +[[package]] +name = "hex-conservative" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "212ab92002354b4819390025006c897e8140934349e8635c9b077f47b4dcbd20" + [[package]] name = "hex-literal" version = "0.4.1" @@ -4422,7 +4495,7 @@ dependencies = [ "once_cell", "rand 0.8.5", "socket2", - "thiserror", + "thiserror 1.0.69", "tinyvec", "tokio", "tracing", @@ -4445,7 +4518,7 @@ dependencies = [ "rand 0.8.5", "resolv-conf", "smallvec", - "thiserror", + "thiserror 1.0.69", "tokio", "tracing", ] @@ -4556,9 +4629,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.9.4" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" [[package]] name = "httpdate" @@ -4584,9 +4657,9 @@ dependencies = [ [[package]] name = "hyper" -version = "0.14.30" +version = "0.14.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" +checksum = "8c08302e8fa335b151b788c775ff56e7a03ae64ff85c548ee820fecb70356e85" dependencies = [ "bytes", "futures-channel", @@ -4608,9 +4681,9 @@ dependencies = [ [[package]] name = "hyper" -version = "1.4.1" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +checksum = "97818827ef4f364230e16705d4706e2897df2bb60617d6ca15d598025a3c481f" dependencies = [ "bytes", "futures-channel", @@ -4633,7 +4706,7 @@ checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", "http 0.2.12", - "hyper 0.14.30", + "hyper 0.14.31", "rustls 0.21.12", "tokio", "tokio-rustls 0.24.1", @@ -4647,14 +4720,14 @@ checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" dependencies = [ "futures-util", "http 1.1.0", - "hyper 1.4.1", + "hyper 1.5.1", "hyper-util", - "rustls 0.23.13", + "rustls 0.23.19", "rustls-pki-types", "tokio", "tokio-rustls 0.26.0", "tower-service", - "webpki-roots 0.26.6", + "webpki-roots 0.26.7", ] [[package]] @@ -4663,7 +4736,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" dependencies = [ - "hyper 0.14.30", + "hyper 0.14.31", "pin-project-lite", "tokio", "tokio-io-timeout", @@ -4671,20 +4744,19 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.8" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da62f120a8a37763efb0cf8fdf264b884c7b8b9ac8660b900c8661030c00e6ba" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ "bytes", "futures-channel", "futures-util", "http 1.1.0", "http-body 1.0.1", - "hyper 1.4.1", + "hyper 1.5.1", "pin-project-lite", "socket2", "tokio", - "tower 0.4.13", "tower-service", "tracing", ] @@ -4712,6 +4784,124 @@ dependencies = [ "cc", ] +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + [[package]] name = "ident_case" version = "1.0.1" @@ -4730,12 +4920,23 @@ dependencies = [ [[package]] name = "idna" -version = "0.5.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", ] [[package]] @@ -4750,9 +4951,9 @@ dependencies = [ [[package]] name = "if-watch" -version = "3.2.0" +version = "3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6b0422c86d7ce0e97169cc42e04ae643caf278874a7a3c87b8150a220dc7e1e" +checksum = "cdf9d64cfcf380606e64f9a0bcf493616b65331199f984151a6fa11a7b3cde38" dependencies = [ "async-io", "core-foundation", @@ -4761,10 +4962,14 @@ dependencies = [ "if-addrs", "ipnet", "log", + "netlink-packet-core", + "netlink-packet-route", + "netlink-proto", + "netlink-sys", "rtnetlink", - "system-configuration", + "system-configuration 0.6.1", "tokio", - "windows 0.51.1", + "windows 0.53.0", ] [[package]] @@ -4778,7 +4983,7 @@ dependencies = [ "bytes", "futures", "http 0.2.12", - "hyper 0.14.30", + "hyper 0.14.31", "log", "rand 0.8.5", "tokio", @@ -4796,7 +5001,7 @@ dependencies = [ "globset", "log", "memchr", - "regex-automata 0.4.8", + "regex-automata 0.4.9", "same-file", "walkdir", "winapi-util", @@ -4804,9 +5009,9 @@ dependencies = [ [[package]] name = "image" -version = "0.25.4" +version = "0.25.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc144d44a31d753b02ce64093d532f55ff8dc4ebf2ffb8a63c0dda691385acae" +checksum = "cd6f44aed642f18953a158afeb30206f4d50da59fbc66ecb53c66488de73563b" dependencies = [ "bytemuck", "byteorder-lite", @@ -4826,13 +5031,13 @@ dependencies = [ [[package]] name = "impl-trait-for-tuples" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" +checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.90", ] [[package]] @@ -4847,34 +5052,34 @@ version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ - "autocfg 1.3.0", + "autocfg 1.4.0", "hashbrown 0.12.3", "serde", ] [[package]] name = "indexmap" -version = "2.5.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" +checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" dependencies = [ "equivalent", - "hashbrown 0.14.5", + "hashbrown 0.15.2", "serde", ] [[package]] name = "indicatif" -version = "0.17.8" +version = "0.17.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "763a5a8f45087d6bcea4222e7b72c291a054edf80e4ef6efd2a4979878c7bea3" +checksum = "cbf675b85ed934d3c67b5c5469701eec7db22689d0a2139d856e0925fa28b281" dependencies = [ "console", - "instant", "number_prefix", "portable-atomic", "tokio", - "unicode-width 0.1.14", + "unicode-width 0.2.0", + "web-time", ] [[package]] @@ -4895,12 +5100,16 @@ dependencies = [ [[package]] name = "instability" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b23a0c8dfe501baac4adf6ebbfa6eddf8f0c07f56b058cc1288017e32397846c" +checksum = "b829f37dead9dc39df40c2d3376c179fdfd2ac771f53f55d3c30dc096a3c0c6e" dependencies = [ + "darling", + "indoc", + "pretty_assertions", + "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -4929,9 +5138,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.10.0" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "187674a687eed5fe42285b40c6291f9a01517d415fad1c3cbc6a9f778af7fcd4" +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" [[package]] name = "is-terminal" @@ -4979,9 +5188,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" [[package]] name = "jobserver" @@ -5000,10 +5209,11 @@ checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0" [[package]] name = "js-sys" -version = "0.3.70" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" +checksum = "a865e038f7f6ed956f788f0d7d60c541fff74c7bd74272c5d4cf15c63743e705" dependencies = [ + "once_cell", "wasm-bindgen", ] @@ -5058,15 +5268,15 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.158" +version = "0.2.167" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" +checksum = "09d6582e104315a817dff97f75133544b2e094ee22447d2acf4a74e189ba06fc" [[package]] name = "libm" -version = "0.2.8" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" +checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" [[package]] name = "libp2p" @@ -5102,7 +5312,7 @@ dependencies = [ "multiaddr", "pin-project", "rw-stream-sink", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -5136,7 +5346,7 @@ dependencies = [ "quick-protobuf-codec", "rand 0.8.5", "rand_core 0.6.4", - "thiserror", + "thiserror 1.0.69", "tracing", "void", "web-time", @@ -5173,9 +5383,9 @@ dependencies = [ "rand 0.8.5", "rw-stream-sink", "smallvec", - "thiserror", + "thiserror 1.0.69", "tracing", - "unsigned-varint 0.8.0", + "unsigned-varint", "void", "web-time", ] @@ -5242,16 +5452,16 @@ dependencies = [ "quick-protobuf", "quick-protobuf-codec", "smallvec", - "thiserror", + "thiserror 1.0.69", "tracing", "void", ] [[package]] name = "libp2p-identity" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55cca1eb2bc1fd29f099f3daaab7effd01e1a54b7c577d0ed082521034d912e8" +checksum = "257b5621d159b32282eac446bed6670c39c7dc68a200a992d8f056afa0066f6d" dependencies = [ "bs58", "ed25519-dalek", @@ -5260,7 +5470,7 @@ dependencies = [ "quick-protobuf", "rand 0.8.5", "sha2 0.10.8", - "thiserror", + "thiserror 1.0.69", "tracing", "zeroize", ] @@ -5286,7 +5496,7 @@ dependencies = [ "rand 0.8.5", "sha2 0.10.8", "smallvec", - "thiserror", + "thiserror 1.0.69", "tracing", "uint", "void", @@ -5349,7 +5559,7 @@ dependencies = [ "sha2 0.10.8", "snow", "static_assertions", - "thiserror", + "thiserror 1.0.69", "tracing", "x25519-dalek", "zeroize", @@ -5371,9 +5581,9 @@ dependencies = [ "quinn", "rand 0.8.5", "ring 0.17.8", - "rustls 0.23.13", + "rustls 0.23.19", "socket2", - "thiserror", + "thiserror 1.0.69", "tokio", "tracing", ] @@ -5396,7 +5606,7 @@ dependencies = [ "quick-protobuf-codec", "rand 0.8.5", "static_assertions", - "thiserror", + "thiserror 1.0.69", "tracing", "void", "web-time", @@ -5456,7 +5666,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -5486,9 +5696,9 @@ dependencies = [ "libp2p-identity", "rcgen", "ring 0.17.8", - "rustls 0.23.13", + "rustls 0.23.19", "rustls-webpki 0.101.7", - "thiserror", + "thiserror 1.0.69", "x509-parser", "yasna", ] @@ -5522,7 +5732,7 @@ dependencies = [ "pin-project-lite", "rw-stream-sink", "soketto", - "thiserror", + "thiserror 1.0.69", "tracing", "url", "webpki-roots 0.25.4", @@ -5539,7 +5749,7 @@ dependencies = [ "libp2p-core", "parking_lot", "send_wrapper 0.6.0", - "thiserror", + "thiserror 1.0.69", "tracing", "wasm-bindgen", "web-sys", @@ -5553,10 +5763,10 @@ dependencies = [ "either", "futures", "libp2p-core", - "thiserror", + "thiserror 1.0.69", "tracing", "yamux 0.12.1", - "yamux 0.13.3", + "yamux 0.13.4", ] [[package]] @@ -5582,13 +5792,19 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +[[package]] +name = "litemap" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" + [[package]] name = "lock_api" version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ - "autocfg 1.3.0", + "autocfg 1.4.0", "scopeguard", ] @@ -5600,11 +5816,11 @@ checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "lru" -version = "0.12.4" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37ee39891760e7d94734f6f63fedc29a2e4a152f836120753a72503f09fcf904" +checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" dependencies = [ - "hashbrown 0.14.5", + "hashbrown 0.15.2", ] [[package]] @@ -5658,7 +5874,7 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" dependencies = [ - "autocfg 1.3.0", + "autocfg 1.4.0", ] [[package]] @@ -5688,9 +5904,9 @@ dependencies = [ [[package]] name = "minicov" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c71e683cd655513b99affab7d317deb690528255a0d5f717f1024093c12b169" +checksum = "f27fe9f1cc3c22e1687f9446c2083c4c5fc7f0bcf1c7a86bdbded14985895b4b" dependencies = [ "cc", "walkdir", @@ -5735,11 +5951,10 @@ dependencies = [ [[package]] name = "mio" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" +checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" dependencies = [ - "hermit-abi 0.3.9", "libc", "log", "wasi 0.11.0+wasi-snapshot-preview1", @@ -5797,7 +6012,7 @@ dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -5820,9 +6035,9 @@ dependencies = [ [[package]] name = "multiaddr" -version = "0.18.1" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b852bc02a2da5feed68cd14fa50d0774b92790a5bdbfa932a813926c8472070" +checksum = "fe6351f60b488e04c1d21bc69e56b89cb3f5e8f5d22557d6e8031bdfd79b6961" dependencies = [ "arrayref", "byteorder", @@ -5833,7 +6048,7 @@ dependencies = [ "percent-encoding", "serde", "static_assertions", - "unsigned-varint 0.7.2", + "unsigned-varint", "url", ] @@ -5850,12 +6065,12 @@ dependencies = [ [[package]] name = "multihash" -version = "0.19.1" +version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "076d548d76a0e2a0d4ab471d0b1c36c577786dfc4471242035d97a12a735c492" +checksum = "cc41f430805af9d1cf4adae4ed2149c759b877b01d909a1f40256188d09345d2" dependencies = [ "core2", - "unsigned-varint 0.7.2", + "unsigned-varint", ] [[package]] @@ -5874,7 +6089,7 @@ dependencies = [ "pin-project", "smallvec", "tracing", - "unsigned-varint 0.8.0", + "unsigned-varint", ] [[package]] @@ -5897,21 +6112,20 @@ dependencies = [ [[package]] name = "netlink-packet-core" -version = "0.4.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "345b8ab5bd4e71a2986663e88c56856699d060e78e152e6e9d7966fcd5491297" +checksum = "72724faf704479d67b388da142b186f916188505e7e0b26719019c525882eda4" dependencies = [ "anyhow", "byteorder", - "libc", "netlink-packet-utils", ] [[package]] name = "netlink-packet-route" -version = "0.12.0" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9ea4302b9759a7a88242299225ea3688e63c85ea136371bb6cf94fd674efaab" +checksum = "053998cea5a306971f88580d0829e90f270f940befd7cf928da179d4187a5a66" dependencies = [ "anyhow", "bitflags 1.3.2", @@ -5930,21 +6144,21 @@ dependencies = [ "anyhow", "byteorder", "paste", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "netlink-proto" -version = "0.10.0" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65b4b14489ab424703c092062176d52ba55485a89c076b4f9db05092b7223aa6" +checksum = "86b33524dc0968bfad349684447bfce6db937a9ac3332a1fe60c0c5a5ce63f21" dependencies = [ "bytes", "futures", "log", "netlink-packet-core", "netlink-sys", - "thiserror", + "thiserror 1.0.69", "tokio", ] @@ -5963,9 +6177,9 @@ dependencies = [ [[package]] name = "nix" -version = "0.24.3" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" +checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" dependencies = [ "bitflags 1.3.2", "cfg-if", @@ -5992,6 +6206,7 @@ dependencies = [ "ant-node-manager", "ant-peers-acquisition", "ant-protocol", + "ant-releases", "ant-service-management", "arboard", "atty", @@ -6016,11 +6231,10 @@ dependencies = [ "prometheus-parse", "ratatui", "regex", - "reqwest 0.12.7", + "reqwest 0.12.9", "serde", "serde_json", "signal-hook", - "sn-releases", "strip-ansi-escapes", "strum", "sysinfo", @@ -6083,7 +6297,7 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" dependencies = [ - "autocfg 1.3.0", + "autocfg 1.4.0", "num-integer", "num-traits", ] @@ -6120,7 +6334,7 @@ version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ - "autocfg 1.3.0", + "autocfg 1.4.0", "libm", ] @@ -6151,7 +6365,7 @@ checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -6288,9 +6502,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "oorandom" @@ -6334,7 +6548,7 @@ dependencies = [ "opentelemetry_api", "opentelemetry_sdk", "prost 0.11.9", - "thiserror", + "thiserror 1.0.69", "tokio", "tonic 0.9.2", ] @@ -6372,7 +6586,7 @@ dependencies = [ "js-sys", "once_cell", "pin-project-lite", - "thiserror", + "thiserror 1.0.69", "urlencoding", ] @@ -6394,7 +6608,7 @@ dependencies = [ "rand 0.8.5", "regex", "serde_json", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-stream", ] @@ -6416,19 +6630,19 @@ dependencies = [ [[package]] name = "ordered-multimap" -version = "0.6.0" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ed8acf08e98e744e5384c8bc63ceb0364e68a6854187221c18df61c4797690e" +checksum = "49203cdcae0030493bad186b28da2fa25645fa276a51b6fec8010d281e02ef79" dependencies = [ "dlv-list", - "hashbrown 0.13.2", + "hashbrown 0.14.5", ] [[package]] name = "os_info" -version = "3.8.2" +version = "3.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae99c7fa6dd38c7cafe1ec085e804f8f555a2f8659b0dbe03f1f9963a9b51092" +checksum = "e5ca711d8b83edbb00b44d504503cd247c9c0bd8b0fa2694f2a1a3d8165379ce" dependencies = [ "log", "serde", @@ -6507,14 +6721,14 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.6.12" +version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" +checksum = "8781a75c6205af67215f382092b6e0a4ff3734798523e69073d4bcd294ec767b" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.90", ] [[package]] @@ -6565,9 +6779,9 @@ checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "pathdiff" -version = "0.2.1" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" +checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3" [[package]] name = "pbkdf2" @@ -6599,20 +6813,20 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.13" +version = "2.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdbef9d1d47087a895abd220ed25eb4ad973a5e26f6a4367b038c25e28dfc2d9" +checksum = "879952a81a83930934cbf1786752d6dedc3b1f29e8f8fb2ad1d0a36f377cf442" dependencies = [ "memchr", - "thiserror", + "thiserror 1.0.69", "ucd-trie", ] [[package]] name = "pest_derive" -version = "2.7.13" +version = "2.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d3a6e3394ec80feb3b6393c725571754c6188490265c61aaf260810d6b95aa0" +checksum = "d214365f632b123a47fd913301e14c946c61d1c183ee245fa76eb752e59a02dd" dependencies = [ "pest", "pest_generator", @@ -6620,22 +6834,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.13" +version = "2.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94429506bde1ca69d1b5601962c73f4172ab4726571a59ea95931218cb0e930e" +checksum = "eb55586734301717aea2ac313f50b2eb8f60d2fc3dc01d190eefa2e625f60c4e" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] name = "pest_meta" -version = "2.7.13" +version = "2.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac8a071862e93690b6e34e9a5fb8e33ff3734473ac0245b27232222c4906a33f" +checksum = "b75da2a70cf4d9cb76833c990ac9cd3923c9a8905a8929789ce347c84564d03d" dependencies = [ "once_cell", "pest", @@ -6649,34 +6863,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", - "indexmap 2.5.0", + "indexmap 2.7.0", ] [[package]] name = "pin-project" -version = "1.1.5" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +checksum = "be57f64e946e500c8ee36ef6331845d40a93055567ec57e8fae13efd33759b95" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.5" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] name = "pin-utils" @@ -6706,9 +6920,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "plist" @@ -6717,7 +6931,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42cf17e9a1800f5f396bc67d193dc9411b59012a5876445ef450d449881e1016" dependencies = [ "base64 0.22.1", - "indexmap 2.5.0", + "indexmap 2.7.0", "quick-xml", "serde", "time", @@ -6766,9 +6980,9 @@ dependencies = [ [[package]] name = "polling" -version = "3.7.3" +version = "3.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc2790cd301dec6cd3b7a025e4815cf825724a51c98dccfe6a3e55f05ffb6511" +checksum = "a604568c3202727d1507653cb121dbd627a58684eb09a820fd746bee38b4442f" dependencies = [ "cfg-if", "concurrent-queue", @@ -6804,9 +7018,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.7.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265" +checksum = "280dc24453071f1b63954171985a0b0d30058d287960968b9b2aca264c8d4ee6" [[package]] name = "powerfmt" @@ -6930,14 +7144,14 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] @@ -6968,7 +7182,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -7126,7 +7340,7 @@ dependencies = [ "proc-macro2", "pyo3-macros-backend", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -7139,7 +7353,7 @@ dependencies = [ "proc-macro2", "pyo3-build-config", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -7165,8 +7379,8 @@ dependencies = [ "asynchronous-codec", "bytes", "quick-protobuf", - "thiserror", - "unsigned-varint 0.8.0", + "thiserror 1.0.69", + "unsigned-varint", ] [[package]] @@ -7191,9 +7405,9 @@ dependencies = [ [[package]] name = "quinn" -version = "0.11.5" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c7c5fdde3cdae7203427dc4f0a68fe0ed09833edc525a03456b153b79828684" +checksum = "62e96808277ec6f97351a2380e6c25114bc9e67037775464979f3037c92d05ef" dependencies = [ "bytes", "futures-io", @@ -7201,36 +7415,40 @@ dependencies = [ "quinn-proto", "quinn-udp", "rustc-hash", - "rustls 0.23.13", + "rustls 0.23.19", "socket2", - "thiserror", + "thiserror 2.0.3", "tokio", "tracing", ] [[package]] name = "quinn-proto" -version = "0.11.8" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fadfaed2cd7f389d0161bb73eeb07b7b78f8691047a6f3e73caaeae55310a4a6" +checksum = "a2fe5ef3495d7d2e377ff17b1a8ce2ee2ec2a18cde8b6ad6619d65d0701c135d" dependencies = [ "bytes", + "getrandom 0.2.15", "rand 0.8.5", "ring 0.17.8", "rustc-hash", - "rustls 0.23.13", + "rustls 0.23.19", + "rustls-pki-types", "slab", - "thiserror", + "thiserror 2.0.3", "tinyvec", "tracing", + "web-time", ] [[package]] name = "quinn-udp" -version = "0.5.5" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fe68c2e9e1a1234e218683dbdf9f9dfcb094113c5ac2b938dfcb9bab4c4140b" +checksum = "7d5a626c6807713b15cac82a6acaccd6043c9a5408c24baae07611fec3f243da" dependencies = [ + "cfg_aliases", "libc", "once_cell", "socket2", @@ -7527,9 +7745,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.4" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0884ad60e090bf1345b93da0a5de8923c93884cd03f40dfcfddd3b4bee661853" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" dependencies = [ "bitflags 2.6.0", ] @@ -7542,18 +7760,18 @@ checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ "getrandom 0.2.15", "libredox", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "regex" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.8", + "regex-automata 0.4.9", "regex-syntax 0.8.5", ] @@ -7568,9 +7786,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", @@ -7603,7 +7821,7 @@ dependencies = [ "h2", "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.30", + "hyper 0.14.31", "hyper-rustls 0.24.2", "ipnet", "js-sys", @@ -7618,7 +7836,7 @@ dependencies = [ "serde_json", "serde_urlencoded", "sync_wrapper 0.1.2", - "system-configuration", + "system-configuration 0.5.1", "tokio", "tokio-rustls 0.24.1", "tower-service", @@ -7632,9 +7850,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.12.7" +version = "0.12.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8f4955649ef5c38cc7f9e8aa41761d48fb9677197daea9984dc54f56aad5e63" +checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" dependencies = [ "base64 0.22.1", "bytes", @@ -7643,7 +7861,7 @@ dependencies = [ "http 1.1.0", "http-body 1.0.1", "http-body-util", - "hyper 1.4.1", + "hyper 1.5.1", "hyper-rustls 0.27.3", "hyper-util", "ipnet", @@ -7654,13 +7872,13 @@ dependencies = [ "percent-encoding", "pin-project-lite", "quinn", - "rustls 0.23.13", - "rustls-pemfile 2.1.3", + "rustls 0.23.19", + "rustls-pemfile 2.2.0", "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", - "sync_wrapper 1.0.1", + "sync_wrapper 1.0.2", "tokio", "tokio-rustls 0.26.0", "tower-service", @@ -7668,7 +7886,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots 0.26.6", + "webpki-roots 0.26.7", "windows-registry", ] @@ -7790,16 +8008,19 @@ dependencies = [ [[package]] name = "rtnetlink" -version = "0.10.1" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "322c53fd76a18698f1c27381d58091de3a043d356aa5bd0d510608b565f469a0" +checksum = "7a552eb82d19f38c3beed3f786bd23aa434ceb9ac43ab44419ca6d67a7e186c0" dependencies = [ "futures", "log", + "netlink-packet-core", "netlink-packet-route", + "netlink-packet-utils", "netlink-proto", - "nix 0.24.3", - "thiserror", + "netlink-sys", + "nix 0.26.4", + "thiserror 1.0.69", "tokio", ] @@ -7845,9 +8066,9 @@ checksum = "48fd7bd8a6377e15ad9d42a8ec25371b94ddc67abe7c8b9127bec79bebaaae18" [[package]] name = "rust-ini" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e2a3bcec1f113553ef1c88aae6c020a369d03d55b58de9869a0908930385091" +checksum = "3e0698206bcb8882bf2a9ecb4c1e7785db57ff052297085a6efd4fe42302068a" dependencies = [ "cfg-if", "ordered-multimap", @@ -7861,9 +8082,9 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hash" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" +checksum = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497" [[package]] name = "rustc-hex" @@ -7900,9 +8121,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.37" +version = "0.38.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" +checksum = "d7f649912bc1495e167a6edee79151c84b1bad49748cb4f1f1167f459f6224f6" dependencies = [ "bitflags 2.6.0", "errno", @@ -7938,9 +8159,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.13" +version = "0.23.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2dabaac7466917e566adb06783a81ca48944c6898a1b08b9374106dd671f4c8" +checksum = "934b404430bb06b3fae2cba809eb45a1ab1aecd64491213d7c3301b88393f8d1" dependencies = [ "once_cell", "ring 0.17.8", @@ -7961,19 +8182,21 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "2.1.3" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" dependencies = [ - "base64 0.22.1", "rustls-pki-types", ] [[package]] name = "rustls-pki-types" -version = "1.8.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" +checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" +dependencies = [ + "web-time", +] [[package]] name = "rustls-webpki" @@ -7998,9 +8221,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" +checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" [[package]] name = "rusty-fork" @@ -8150,7 +8373,7 @@ dependencies = [ "rayon", "serde", "tempfile", - "thiserror", + "thiserror 1.0.69", "tiny-keccak", "tokio", "xor_name", @@ -8176,9 +8399,9 @@ dependencies = [ [[package]] name = "semver-parser" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" +checksum = "9900206b54a3527fdc7b8a938bffd94a568bac4f4aa8113b209df75a09c0dec2" dependencies = [ "pest", ] @@ -8232,14 +8455,14 @@ checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] name = "serde_json" -version = "1.0.132" +version = "1.0.133" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" +checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" dependencies = [ "itoa", "memchr", @@ -8249,9 +8472,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.7" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" dependencies = [ "serde", ] @@ -8287,7 +8510,7 @@ dependencies = [ "chrono", "hex 0.4.3", "indexmap 1.9.3", - "indexmap 2.5.0", + "indexmap 2.7.0", "serde", "serde_derive", "serde_json", @@ -8304,7 +8527,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -8313,7 +8536,7 @@ version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.5.0", + "indexmap 2.7.0", "itoa", "ryu", "serde", @@ -8451,7 +8674,7 @@ checksum = "34db1a06d485c9142248b7a054f034b349b212551f3dfd19c94d45a754a217cd" dependencies = [ "libc", "mio 0.8.11", - "mio 1.0.2", + "mio 1.0.3", "signal-hook", ] @@ -8496,7 +8719,7 @@ version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ - "autocfg 1.3.0", + "autocfg 1.4.0", ] [[package]] @@ -8505,26 +8728,6 @@ version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" -[[package]] -name = "sn-releases" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7519b2daa6a6241938a17c034064ac38f5367355abc81cae55abf16854b0e9e4" -dependencies = [ - "async-trait", - "chrono", - "flate2", - "lazy_static", - "regex", - "reqwest 0.12.7", - "semver 1.0.23", - "serde_json", - "tar", - "thiserror", - "tokio", - "zip", -] - [[package]] name = "sn_bls_ckd" version = "0.2.1" @@ -8565,7 +8768,7 @@ dependencies = [ "sha2 0.8.2", "sha2 0.9.9", "sha3 0.9.1", - "thiserror", + "thiserror 1.0.69", "typenum", "zeroize", ] @@ -8589,9 +8792,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" dependencies = [ "libc", "windows-sys 0.52.0", @@ -8644,6 +8847,12 @@ dependencies = [ "der 0.7.9", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "static_assertions" version = "1.1.0" @@ -8684,7 +8893,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -8706,9 +8915,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.77" +version = "2.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" +checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" dependencies = [ "proc-macro2", "quote", @@ -8717,14 +8926,14 @@ dependencies = [ [[package]] name = "syn-solidity" -version = "0.8.5" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ab661c8148c2261222a4d641ad5477fd4bea79406a99056096a0b41b35617a5" +checksum = "da0523f59468a2696391f2a772edc089342aacd53c3caa2ac3264e598edf119b" dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -8735,9 +8944,9 @@ checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" [[package]] name = "sync_wrapper" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" dependencies = [ "futures-core", ] @@ -8750,7 +8959,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -8776,7 +8985,18 @@ checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" dependencies = [ "bitflags 1.3.2", "core-foundation", - "system-configuration-sys", + "system-configuration-sys 0.5.0", +] + +[[package]] +name = "system-configuration" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" +dependencies = [ + "bitflags 2.6.0", + "core-foundation", + "system-configuration-sys 0.6.0", ] [[package]] @@ -8789,6 +9009,16 @@ dependencies = [ "libc", ] +[[package]] +name = "system-configuration-sys" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "tap" version = "1.0.1" @@ -8797,9 +9027,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tar" -version = "0.4.41" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb797dad5fb5b76fcf519e702f4a589483b5ef06567f160c392832c1f5e44909" +checksum = "c65998313f8e17d0d553d28f91a0df93e4dbbbf770279c7bc21ca0f09ea1a1f6" dependencies = [ "filetime", "libc", @@ -8814,9 +9044,9 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tempfile" -version = "3.12.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" +checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" dependencies = [ "cfg-if", "fastrand", @@ -8838,12 +9068,12 @@ dependencies = [ [[package]] name = "terminal_size" -version = "0.3.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" +checksum = "5352447f921fda68cf61b4101566c0bdb5104eff6804d0678e5227580ab6a4e9" dependencies = [ "rustix", - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] @@ -8869,22 +9099,42 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.63" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c006c85c7651b3cf2ada4584faa36773bd07bac24acfb39f3c431b36d7e667aa" +dependencies = [ + "thiserror-impl 2.0.3", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ - "thiserror-impl", + "proc-macro2", + "quote", + "syn 2.0.90", ] [[package]] name = "thiserror-impl" -version = "1.0.63" +version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +checksum = "f077553d607adc1caf65430528a576c757a71ed73944b66ebb58ef2bbd243568" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -8982,6 +9232,16 @@ dependencies = [ "url", ] +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + [[package]] name = "tinytemplate" version = "1.2.1" @@ -9009,14 +9269,14 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.40.0" +version = "1.41.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" +checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33" dependencies = [ "backtrace", "bytes", "libc", - "mio 1.0.2", + "mio 1.0.3", "parking_lot", "pin-project-lite", "signal-hook-registry", @@ -9043,7 +9303,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -9073,7 +9333,7 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ - "rustls 0.23.13", + "rustls 0.23.19", "rustls-pki-types", "tokio", ] @@ -9152,11 +9412,11 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.21" +version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b072cee73c449a636ffd6f32bd8de3a9f7119139aff882f44943ce2986dc5cf" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ - "indexmap 2.5.0", + "indexmap 2.7.0", "serde", "serde_spanned", "toml_datetime", @@ -9178,7 +9438,7 @@ dependencies = [ "h2", "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.30", + "hyper 0.14.31", "hyper-timeout", "percent-encoding", "pin-project", @@ -9210,7 +9470,7 @@ dependencies = [ "h2", "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.30", + "hyper 0.14.31", "hyper-timeout", "percent-encoding", "pin-project", @@ -9283,9 +9543,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.40" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ "log", "pin-project-lite", @@ -9300,27 +9560,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3566e8ce28cc0a3fe42519fc80e6b4c943cc4c8cef275620eb8dac2d3d4e06cf" dependencies = [ "crossbeam-channel", - "thiserror", + "thiserror 1.0.69", "time", "tracing-subscriber", ] [[package]] name = "tracing-attributes" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] name = "tracing-core" -version = "0.1.32" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" dependencies = [ "once_cell", "valuable", @@ -9328,9 +9588,9 @@ dependencies = [ [[package]] name = "tracing-error" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d686ec1c0f384b1277f097b2f279a2ecc11afe8c133c1aabf036a27cb4cd206e" +checksum = "8b1581020d7a273442f5b45074a6a57d5757ad0a47dac0e9f0bd57b81936f3db" dependencies = [ "tracing", "tracing-subscriber", @@ -9386,9 +9646,9 @@ dependencies = [ [[package]] name = "tracing-serde" -version = "0.1.3" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1" +checksum = "704b1aeb7be0d0a84fc9828cae51dab5970fee5088f83d1dd7ee6f6246fc6ff1" dependencies = [ "serde", "tracing-core", @@ -9396,9 +9656,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.18" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" dependencies = [ "matchers", "nu-ansi-term", @@ -9433,7 +9693,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04659ddb06c87d233c566112c1c9c5b9e98256d9af50ec3bc9c8327f873a7568" dependencies = [ "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -9479,7 +9739,7 @@ dependencies = [ "log", "rand 0.8.5", "sha1", - "thiserror", + "thiserror 1.0.69", "url", "utf-8", ] @@ -9492,9 +9752,9 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "ucd-trie" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" +checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" [[package]] name = "uint" @@ -9516,18 +9776,15 @@ checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" [[package]] name = "unicase" -version = "2.7.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" -dependencies = [ - "version_check", -] +checksum = "7e51b68083f157f853b6379db119d1c1be0e6e4dec98101079dec41f6f5cf6df" [[package]] name = "unicode-bidi" -version = "0.3.15" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" [[package]] name = "unicode-bom" @@ -9537,9 +9794,9 @@ checksum = "7eec5d1121208364f6793f7d2e222bf75a915c19557537745b195b253dd64217" [[package]] name = "unicode-ident" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" [[package]] name = "unicode-normalization" @@ -9607,12 +9864,6 @@ version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" -[[package]] -name = "unsigned-varint" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6889a77d49f1f013504cec6bf97a2c730394adedaeb1deb5ea08949a50541105" - [[package]] name = "unsigned-varint" version = "0.8.0" @@ -9633,12 +9884,12 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.2" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", - "idna 0.5.0", + "idna 1.0.3", "percent-encoding", ] @@ -9664,6 +9915,18 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "utf8parse" version = "0.2.2" @@ -9672,9 +9935,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" +checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" dependencies = [ "getrandom 0.2.15", ] @@ -9771,7 +10034,7 @@ dependencies = [ "futures-util", "headers", "http 0.2.12", - "hyper 0.14.30", + "hyper 0.14.31", "log", "mime", "mime_guess", @@ -9803,9 +10066,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.93" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" +checksum = "d15e63b4482863c109d70a7b8706c1e364eb6ea449b201a76c5b89cedcec2d5c" dependencies = [ "cfg-if", "once_cell", @@ -9814,36 +10077,37 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.93" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" +checksum = "8d36ef12e3aaca16ddd3f67922bc63e48e953f126de60bd33ccc0101ef9998cd" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.43" +version = "0.4.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" +checksum = "9dfaf8f50e5f293737ee323940c7d8b08a66a95a419223d9f41610ca08b0833d" dependencies = [ "cfg-if", "js-sys", + "once_cell", "wasm-bindgen", "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.93" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" +checksum = "705440e08b42d3e4b36de7d66c944be628d579796b8090bfa3471478a2260051" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -9851,32 +10115,32 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.93" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" +checksum = "98c9ae5a76e46f4deecd0f0255cc223cfa18dc9b261213b8aa0c7b36f61b3f1d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.93" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" +checksum = "6ee99da9c5ba11bd675621338ef6fa52296b76b83305e9b6e5c77d4c286d6d49" [[package]] name = "wasm-bindgen-test" -version = "0.3.43" +version = "0.3.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68497a05fb21143a08a7d24fc81763384a3072ee43c44e86aad1744d6adef9d9" +checksum = "3d919bb60ebcecb9160afee6c71b43a58a4f0517a2de0054cd050d02cec08201" dependencies = [ - "console_error_panic_hook", "js-sys", "minicov", + "once_cell", "scoped-tls", "wasm-bindgen", "wasm-bindgen-futures", @@ -9885,13 +10149,13 @@ dependencies = [ [[package]] name = "wasm-bindgen-test-macro" -version = "0.3.43" +version = "0.3.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8220be1fa9e4c889b30fd207d4906657e7e90b12e0e6b0c8b8d8709f5de021" +checksum = "222ebde6ea87fbfa6bdd2e9f1fd8a91d60aee5db68792632176c4e16a74fc7d8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -9911,9 +10175,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.70" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" +checksum = "a98bc3c33f0fe7e59ad7cd041b89034fa82a7c2d4365ca538dda6cdaf513863c" dependencies = [ "js-sys", "wasm-bindgen", @@ -9947,9 +10211,9 @@ checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "webpki-roots" -version = "0.26.6" +version = "0.26.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841c67bff177718f1d4dfefde8d8f0e78f9b6589319ba88312f567fc5841a958" +checksum = "5d642ff16b7e79272ae451b7322067cdc17cadf68c23264be9d94a32319efe7e" dependencies = [ "rustls-pki-types", ] @@ -10023,39 +10287,40 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows" -version = "0.51.1" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9" +checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" dependencies = [ - "windows-core 0.51.1", - "windows-targets 0.48.5", + "windows-core 0.52.0", + "windows-targets 0.52.6", ] [[package]] name = "windows" -version = "0.52.0" +version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" +checksum = "efc5cf48f83140dcaab716eeaea345f9e93d0018fb81162753a3f76c3397b538" dependencies = [ - "windows-core 0.52.0", + "windows-core 0.53.0", "windows-targets 0.52.6", ] [[package]] name = "windows-core" -version = "0.51.1" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] [[package]] name = "windows-core" -version = "0.52.0" +version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +checksum = "9dcc5b895a6377f1ab9fa55acedab1fd5ac0db66ad1e6c7f47e28a22e446a5dd" dependencies = [ + "windows-result 0.1.2", "windows-targets 0.52.6", ] @@ -10065,11 +10330,20 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" dependencies = [ - "windows-result", + "windows-result 0.2.0", "windows-strings", "windows-targets 0.52.6", ] +[[package]] +name = "windows-result" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8" +dependencies = [ + "windows-targets 0.52.6", +] + [[package]] name = "windows-result" version = "0.2.0" @@ -10085,7 +10359,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" dependencies = [ - "windows-result", + "windows-result 0.2.0", "windows-targets 0.52.6", ] @@ -10239,9 +10513,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.18" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" dependencies = [ "memchr", ] @@ -10262,6 +10536,18 @@ version = "0.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904" +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + [[package]] name = "wyz" version = "0.5.1" @@ -10313,7 +10599,7 @@ dependencies = [ "nom", "oid-registry", "rusticata-macros", - "thiserror", + "thiserror 1.0.69", "time", ] @@ -10330,9 +10616,9 @@ dependencies = [ [[package]] name = "xml-rs" -version = "0.8.22" +version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af4e2e2f7cba5a093896c1e150fbfe177d1883e7448200efb81d40b9d339ef26" +checksum = "af310deaae937e48a26602b730250b4949e125f468f11e6990be3e5304ddd96f" [[package]] name = "xmltree" @@ -10358,12 +10644,14 @@ dependencies = [ ] [[package]] -name = "yaml-rust" -version = "0.4.5" +name = "yaml-rust2" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" +checksum = "8902160c4e6f2fb145dbe9d6760a75e3c9522d8bf796ed7047c85919ac7115f8" dependencies = [ - "linked-hash-map", + "arraydeque", + "encoding_rs", + "hashlink", ] [[package]] @@ -10383,9 +10671,9 @@ dependencies = [ [[package]] name = "yamux" -version = "0.13.3" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31b5e376a8b012bee9c423acdbb835fc34d45001cfa3106236a624e4b738028" +checksum = "17610762a1207ee816c6fadc29220904753648aba0a9ed61c7b8336e80a559c4" dependencies = [ "futures", "log", @@ -10412,6 +10700,30 @@ dependencies = [ "time", ] +[[package]] +name = "yoke" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", + "synstructure", +] + [[package]] name = "zerocopy" version = "0.7.35" @@ -10430,7 +10742,28 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", +] + +[[package]] +name = "zerofrom" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", + "synstructure", ] [[package]] @@ -10450,7 +10783,29 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", +] + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", ] [[package]] diff --git a/Justfile b/Justfile index 505fcab399..565df8e001 100644 --- a/Justfile +++ b/Justfile @@ -69,18 +69,18 @@ build-release-artifacts arch nightly="false": cross build --release --target $arch --bin nat-detection $nightly_feature cross build --release --target $arch --bin node-launchpad $nightly_feature cross build --release --features network-contacts,websockets --target $arch --bin autonomi $nightly_feature - cross build --release --features network-contacts,websockets --target $arch --bin safenode $nightly_feature - cross build --release --target $arch --bin safenode-manager $nightly_feature - cross build --release --target $arch --bin safenodemand $nightly_feature - cross build --release --target $arch --bin safenode_rpc_client $nightly_feature + cross build --release --features network-contacts,websockets --target $arch --bin antnode $nightly_feature + cross build --release --target $arch --bin antctl $nightly_feature + cross build --release --target $arch --bin antctld $nightly_feature + cross build --release --target $arch --bin antnode_rpc_client $nightly_feature else cargo build --release --target $arch --bin nat-detection $nightly_feature cargo build --release --target $arch --bin node-launchpad $nightly_feature cargo build --release --features network-contacts,websockets --target $arch --bin autonomi $nightly_feature - cargo build --release --features network-contacts,websockets --target $arch --bin safenode $nightly_feature - cargo build --release --target $arch --bin safenode-manager $nightly_feature - cargo build --release --target $arch --bin safenodemand $nightly_feature - cargo build --release --target $arch --bin safenode_rpc_client $nightly_feature + cargo build --release --features network-contacts,websockets --target $arch --bin antnode $nightly_feature + cargo build --release --target $arch --bin antctl $nightly_feature + cargo build --release --target $arch --bin antctld $nightly_feature + cargo build --release --target $arch --bin antnode_rpc_client $nightly_feature fi find target/$arch/release -maxdepth 1 -type f -exec cp '{}' artifacts \; @@ -106,8 +106,8 @@ make-artifacts-directory: cd artifacts for arch in "${architectures[@]}" ; do mkdir -p $arch/release - unzip safe_network-$arch.zip -d $arch/release - rm safe_network-$arch.zip + unzip autonomi-$arch.zip -d $arch/release + rm autonomi-$arch.zip done package-all-bins: @@ -116,10 +116,10 @@ package-all-bins: just package-bin "nat-detection" just package-bin "node-launchpad" just package-bin "autonomi" - just package-bin "safenode" - just package-bin "safenode-manager" - just package-bin "safenodemand" - just package-bin "safenode_rpc_client" + just package-bin "antnode" + just package-bin "antctl" + just package-bin "antctld" + just package-bin "antnode_rpc_client" package-bin bin version="": #!/usr/bin/env bash @@ -141,10 +141,10 @@ package-bin bin version="": "nat-detection" \ "node-launchpad" \ "autonomi" \ - "safenode" \ - "safenode-manager" \ - "safenodemand" \ - "safenode_rpc_client") + "antnode" \ + "antctl" \ + "antctld" \ + "antnode_rpc_client") crate_dir_name="" bin="{{bin}}" @@ -158,16 +158,16 @@ package-bin bin version="": autonomi) crate_dir_name="autonomi-cli" ;; - safenode) + antnode) crate_dir_name="ant-node" ;; - safenode-manager) + antctl) crate_dir_name="ant-node-manager" ;; - safenodemand) + antctld) crate_dir_name="ant-node-manager" ;; - safenode_rpc_client) + antnode_rpc_client) crate_dir_name="ant-node-rpc-client" ;; *) @@ -209,10 +209,10 @@ upload-all-packaged-bins-to-s3: nat-detection node-launchpad autonomi - safenode - safenode-manager - safenode_rpc_client - safenodemand + antnode + antctl + antnode_rpc_client + antctld ) for binary in "${binaries[@]}"; do just upload-packaged-bin-to-s3 "$binary" @@ -232,17 +232,17 @@ upload-packaged-bin-to-s3 bin_name: autonomi) bucket="autonomi-cli" ;; - safenode) - bucket="sn-node" + antnode) + bucket="antnode" ;; - safenode-manager) - bucket="sn-node-manager" + antctl) + bucket="antctl" ;; - safenodemand) - bucket="sn-node-manager" + antctld) + bucket="antctld" ;; - safenode_rpc_client) - bucket="sn-node-rpc-client" + antnode_rpc_client) + bucket="antnode-rpc-client" ;; *) echo "The {{bin_name}} binary is not supported" @@ -282,17 +282,17 @@ delete-s3-bin bin_name version: autonomi) bucket="autonomi-cli" ;; - safenode) - bucket="sn-node" + antnode) + bucket="antnode" ;; - safenode-manager) - bucket="sn-node-manager" + antctl) + bucket="antctl" ;; - safenodemand) - bucket="sn-node-manager" + antctld) + bucket="antctl" ;; - safenode_rpc_client) - bucket="sn-node-rpc-client" + antnode_rpc_client) + bucket="antnode-rpc-client" ;; *) echo "The {{bin_name}} binary is not supported" @@ -364,10 +364,10 @@ package-arch arch: nat-detection node-launchpad autonomi - safenode - safenode-manager - safenode_rpc_client - safenodemand + antnode + antctl + antnode_rpc_client + antctld ) if [[ "$architecture" == *"windows"* ]]; then diff --git a/README.md b/README.md index b33f812769..b69d7410b5 100644 --- a/README.md +++ b/README.md @@ -25,14 +25,14 @@ Libp2p.
#### Building the Node from Source -If you wish to build a version of `safenode` from source, some special consideration must be given +If you wish to build a version of `antnode` from source, some special consideration must be given if you want it to connect to the current beta network. You should build from the `stable` branch, as follows: ``` git checkout stable -cargo build --release --features=network-contacts --bin safenode +cargo build --release --features network-contacts --bin antnode ``` #### Running the Node @@ -40,7 +40,7 @@ cargo build --release --features=network-contacts --bin safenode To run a node and receive rewards, you need to specify your Ethereum address as a parameter. Rewards are paid to the specified address. ``` -cargo run --release --bin safenode --features=network-contacts -- --rewards-address +cargo run --release --bin antnode --features network-contacts -- --rewards-address ``` More options about EVM Network below. @@ -52,13 +52,13 @@ More options about EVM Network below. You should also build `safe` with the `network-contacts` and `distribution` features enabled: ``` -cargo build --release --features="network-contacts,distribution" --bin safe +cargo build --release --features "network-contacts,distribution" --bin safe ``` -For `safenode`, only the `network-contacts` feature should be required: +For `antnode`, only the `network-contacts` feature should be required: ``` -cargo build --release --features=network-contacts --bin safenode +cargo build --release --features network-contacts --bin antnode ``` #### Main Crates @@ -135,7 +135,7 @@ This creates a CSV file with the EVM network params in your data directory. `--rewards-address` _is the address where you will receive your node earnings on._ ```bash -cargo run --bin=safenode-manager --features=local -- local run --build --clean --rewards-address +cargo run --bin antctl --features local -- local run --build --clean --rewards-address ``` The EVM Network parameters are loaded from the CSV file in your data directory automatically when the `local` feature flag is enabled (`--features=local`). @@ -143,7 +143,7 @@ The EVM Network parameters are loaded from the CSV file in your data directory a ##### 4. Verify node status ```bash -cargo run --bin safenode-manager --features local -- status +cargo run --bin antctl --features local -- status ``` The node manager's `run` command starts the node processes. The `status` command should show twenty-five @@ -286,10 +286,10 @@ workspace has a client binary that can be used to run commands against these ser Run the `status` command with the `--details` flag to get the RPC port for each node: ``` -$ cargo run --bin safenode-manager -- status --details +$ cargo run --bin antctl -- status --details ... =================================== -safenode-local25 - RUNNING +antctl-local25 - RUNNING =================================== Version: 0.103.21 Peer ID: 12D3KooWJ4Yp8CjrbuUyeLDsAgMfCb3GAYMoBvJCRp1axjHr9cf8 @@ -299,7 +299,7 @@ Multiaddr: /ip4/127.0.0.1/udp/38835/quic-v1/p2p/12D3KooWJ4Yp8CjrbuUyeLDsAgMfCb3G PID: 62369 Data path: /home/<>/.local/share/safe/node/12D3KooWJ4Yp8CjrbuUyeLDsAgMfCb3GAYMoBvJCRp1axjHr9cf8 Log path: /home/<>/.local/share/safe/node/12D3KooWJ4Yp8CjrbuUyeLDsAgMfCb3GAYMoBvJCRp1axjHr9cf8/logs -Bin path: target/release/safenode +Bin path: target/release/antnode Connected peers: 24 ``` @@ -308,7 +308,7 @@ Now you can run RPC commands against any node. The `info` command will retrieve basic information about the node: ``` -$ cargo run --bin safenode_rpc_client -- 127.0.0.1:34416 info +$ cargo run --bin antnode_rpc_client -- 127.0.0.1:34416 info Node info: ========== RPC endpoint: https://127.0.0.1:34416 @@ -322,7 +322,7 @@ Time since last restart: 1614s The `netinfo` command will return connected peers and listeners: ``` -$ cargo run --bin safenode_rpc_client -- 127.0.0.1:34416 netinfo +$ cargo run --bin antnode_rpc_client -- 127.0.0.1:34416 netinfo Node's connections to the Network: Connected peers: @@ -349,13 +349,13 @@ Listener: /ip4/172.20.0.1/udp/38835/quic-v1 Node control commands: ``` -$ cargo run --bin safenode_rpc_client -- 127.0.0.1:34416 restart 5000 +$ cargo run --bin antnode_rpc_client -- 127.0.0.1:34416 restart 5000 Node successfully received the request to restart in 5s -$ cargo run --bin safenode_rpc_client -- 127.0.0.1:34416 stop 6000 +$ cargo run --bin antnode_rpc_client -- 127.0.0.1:34416 stop 6000 Node successfully received the request to stop in 6s -$ cargo run --bin safenode_rpc_client -- 127.0.0.1:34416 update 7000 +$ cargo run --bin antnode_rpc_client -- 127.0.0.1:34416 update 7000 Node successfully received the request to try to update in 7s ``` @@ -364,7 +364,7 @@ NOTE: it is preferable to use the node manager to control the node rather than R Listening to royalty payment events: ``` -$ cargo run --bin safenode_rpc_client -- 127.0.0.1:34416 transfers +$ cargo run --bin antnode_rpc_client -- 127.0.0.1:34416 transfers Listening to transfer notifications... (press Ctrl+C to exit) New transfer notification received for PublicKey(0c54..5952), containing 1 cash note/s. @@ -377,7 +377,7 @@ CashNote received with UniquePubkey(PublicKey(19ee..1580)), value: 0.000000001 The `transfers` command can provide a path for royalty payment cash notes: ``` -$ cargo run --release --bin=safenode_rpc_client -- 127.0.0.1:34416 transfers ./royalties-cash-notes +$ cargo run --release --bin antnode_rpc_client -- 127.0.0.1:34416 transfers ./royalties-cash-notes Listening to transfer notifications... (press Ctrl+C to exit) Writing cash notes to: ./royalties-cash-notes ``` @@ -390,7 +390,7 @@ corresponding to the public address of the recipient. When you're finished experimenting, tear down the network: ```bash -cargo run --bin safenode-manager -- local kill +cargo run --bin antctl -- local kill ``` ## Metrics Dashboard diff --git a/ant-logging/src/appender.rs b/ant-logging/src/appender.rs index 61e1a8b196..d36000372b 100644 --- a/ant-logging/src/appender.rs +++ b/ant-logging/src/appender.rs @@ -40,11 +40,11 @@ pub(super) fn file_rotater( let binary_name = env::current_exe() .map(|path| { path.file_stem() - .unwrap_or(OsStr::new("safe")) + .unwrap_or(OsStr::new("autonomi")) .to_string_lossy() .into_owned() }) - .unwrap_or_else(|_| "safe".to_string()); + .unwrap_or_else(|_| "autonomi".to_string()); let file_appender = FileRotateAppender::make_rotate_appender( dir, diff --git a/ant-logging/src/layers.rs b/ant-logging/src/layers.rs index 657dec6f9d..3b994d3087 100644 --- a/ant-logging/src/layers.rs +++ b/ant-logging/src/layers.rs @@ -269,10 +269,10 @@ fn get_logging_targets(logging_env_value: &str) -> Result> // bins ("autonomi_cli".to_string(), Level::TRACE), ("evm_testnet".to_string(), Level::TRACE), - ("safenode".to_string(), Level::TRACE), - ("safenode_rpc_client".to_string(), Level::TRACE), - ("safenode_manager".to_string(), Level::TRACE), - ("safenodemand".to_string(), Level::TRACE), + ("antnode".to_string(), Level::TRACE), + ("antnode_rpc_client".to_string(), Level::TRACE), + ("antctl".to_string(), Level::TRACE), + ("antctld".to_string(), Level::TRACE), // libs ("ant_build_info".to_string(), Level::TRACE), ("ant_evm".to_string(), Level::TRACE), diff --git a/ant-logging/src/lib.rs b/ant-logging/src/lib.rs index 4beabc5e76..96056f1724 100644 --- a/ant-logging/src/lib.rs +++ b/ant-logging/src/lib.rs @@ -34,27 +34,6 @@ pub enum LogOutputDest { Path(PathBuf), } -fn current_exe_name() -> String { - std::env::args() - .next() - .and_then(|arg| { - std::path::Path::new(&arg).file_name().map(|s| { - let mut name = s.to_string_lossy().to_string(); - name = name.strip_prefix("sn_").unwrap_or(&name).to_string(); - - if cfg!(windows) && name.to_lowercase().ends_with(".exe") { - name = name.strip_suffix(".exe").unwrap_or(&name).to_string(); - } - - if name == "safe" { - name = "client".to_string(); - } - name - }) - }) - .unwrap_or_else(|| "default".to_string()) -} - impl LogOutputDest { pub fn parse_from_str(val: &str) -> Result { match val { @@ -66,8 +45,8 @@ impl LogOutputDest { // Get the data directory path and append the timestamp to the log file name let dir = match dirs_next::data_dir() { Some(dir) => dir - .join("safe") - .join(current_exe_name()) + .join("autonomi") + .join("client") .join("logs") .join(format!("log_{timestamp}")), None => { diff --git a/ant-logging/src/metrics.rs b/ant-logging/src/metrics.rs index c88782c6d0..b6d99a6137 100644 --- a/ant-logging/src/metrics.rs +++ b/ant-logging/src/metrics.rs @@ -52,11 +52,11 @@ pub async fn init_metrics(pid: u32) { refresh_metrics(&mut sys, &mut networks, pid); let process = match sys.process(pid) { - Some(safenode) => { - let disk_usage = safenode.disk_usage(); + Some(antnode) => { + let disk_usage = antnode.disk_usage(); let process = ProcessMetrics { - cpu_usage_percent: safenode.cpu_usage(), - memory_used_mb: safenode.memory() / TO_MB, + cpu_usage_percent: antnode.cpu_usage(), + memory_used_mb: antnode.memory() / TO_MB, bytes_read: disk_usage.read_bytes, bytes_written: disk_usage.written_bytes, total_mb_read: disk_usage.total_read_bytes / TO_MB, @@ -65,7 +65,7 @@ pub async fn init_metrics(pid: u32) { Some(process) } None => { - // safenode with the provided Pid not found + // antnode with the provided Pid not found None } }; diff --git a/ant-metrics/src/main.rs b/ant-metrics/src/main.rs index 04ecee1edb..a7d589fd56 100644 --- a/ant-metrics/src/main.rs +++ b/ant-metrics/src/main.rs @@ -18,7 +18,7 @@ use std::{ }; use walkdir::WalkDir; -const LOG_FILENAME_PREFIX: &str = "safenode.log"; +const LOG_FILENAME_PREFIX: &str = "antnode.log"; type NodeId = String; #[derive(serde::Serialize)] diff --git a/ant-node-manager/Cargo.toml b/ant-node-manager/Cargo.toml index ca1759acf5..94857697b6 100644 --- a/ant-node-manager/Cargo.toml +++ b/ant-node-manager/Cargo.toml @@ -10,11 +10,11 @@ repository = "https://github.com/maidsafe/autonomi" version = "0.11.3" [[bin]] -name = "safenode-manager" +name = "antctl" path = "src/bin/cli/main.rs" [[bin]] -name = "safenodemand" +name = "antctld" path = "src/bin/daemon/main.rs" [features] @@ -29,7 +29,6 @@ quic = [] statemap = [] tcp = [] websockets = [] -faucet = [] [dependencies] ant-build-info = { path = "../ant-build-info", version = "0.1.19" } @@ -37,6 +36,7 @@ ant-evm = { path = "../ant-evm", version = "0.1.4" } ant-logging = { path = "../ant-logging", version = "0.2.40" } ant-peers-acquisition = { path = "../ant-peers-acquisition", version = "0.5.7" } ant-protocol = { path = "../ant-protocol", version = "0.17.15" } +ant-releases = { git = "https://github.com/jacderida/ant-releases.git", branch = "chore-rename_binaries" } ant-service-management = { path = "../ant-service-management", version = "0.4.3" } chrono = "~0.4.19" clap = { version = "4.4.6", features = ["derive", "env"] } @@ -52,7 +52,6 @@ semver = "1.0.20" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" service-manager = "0.7.0" -sn-releases = "0.2.6" sysinfo = "0.30.12" thiserror = "1.0.23" tokio = { version = "1.26", features = ["full"] } diff --git a/ant-node-manager/README.md b/ant-node-manager/README.md index 3d6b4cd40c..b937c99c94 100644 --- a/ant-node-manager/README.md +++ b/ant-node-manager/README.md @@ -1,6 +1,6 @@ -# Safenode Manager +# Antctl -Safenode Manager is a command-line application for installing, managing, and operating `safenode` as a service. +Antctl is a command-line application for installing, managing, and operating `antnode` as a service. It runs on Linux, macOS and Windows. @@ -8,14 +8,15 @@ It runs on Linux, macOS and Windows. The latest version can be installed via [safeup](https://github.com/maidsafe/safeup): ``` -safeup node-manager +safeup antctl ``` A binary can also be obtained for your platform from the releases in this repository. ## Nodes as Services -The primary use case for Safenode Manager is to setup `safenode` as a long-running background service, using the service infrastructure provided by the operating system. +The primary use case for Antctl is to setup `antnode` as a long-running background service, using +the service infrastructure provided by the operating system. On macOS and most distributions of Linux, user-mode services are supported. Traditionally, services are system-wide infrastructure that require elevated privileges to create and work with. However, @@ -29,33 +30,33 @@ The commands defined in the rest of this guide will operate on the basis of a us so will not use `sudo`. If you would like to run system-wide services, you can go through the same guide, but just prefix each command with `sudo`. -Windows does not support user-mode services at all, and therefore, the node manager must always be +Windows does not support user-mode services at all, and therefore, Antctl must always be used in an elevated, administrative session. ### Create Services First, use the `add` command to create some services: ``` -$ safenode-manager add --count 3 --peer /ip4/139.59.168.228/udp/56309/quic-v1/p2p/12D3KooWFTMtaqu24ddDSXk9v5YxnuhJmTLFRunER1CG4wZ2XLUU +$ antctl add --count 3 --peer /ip4/139.59.168.228/udp/56309/quic-v1/p2p/12D3KooWFTMtaqu24ddDSXk9v5YxnuhJmTLFRunER1CG4wZ2XLUU ``` -This downloads the latest version of the `safenode` binary and creates three services that will initially connect to the specified peer. Soon, specification of a peer will not be required. +This downloads the latest version of the `antnode` binary and creates three services that will initially connect to the specified peer. Soon, specification of a peer will not be required. -There are many arguments available for customising the service. For example, you can choose the port the node will run on, or the version of `safenode`. Run `safenode-manager add --help` to see all available options. +There are many arguments available for customising the service. For example, you can choose the port the node will run on, or the version of `antnode`. Run `antctl add --help` to see all available options. _Note_: elevated privileges are required for creating services, on all platforms. Now run the `status` command: ``` -$ safenode-manager status +$ antctl status ================================================= - Safenode Services + Antnode Services ================================================= Refreshing the node registry... Service Name Peer ID Status Connected Peers -safenode1 - ADDED - -safenode2 - ADDED - -safenode3 - ADDED - +antnode1 - ADDED - +antnode2 - ADDED - +antnode3 - ADDED - ``` We can see the services have been added, but they are not running yet. @@ -64,22 +65,22 @@ We can see the services have been added, but they are not running yet. Use the `start` command to start each service: ``` -$ safenode-manager start +$ antctl start ``` Providing no arguments will start all available services. If need be, it's possible to start services individually, using the `--service-name` argument. With the services started, run the `status` command again: ``` -$ safenode-manager status +$ antctl status ================================================= - Safenode Services + Antnode Services ================================================= Refreshing the node registry... Service Name Peer ID Status Connected Peers -safenode1 12D3KooWGQu92xCXuiK6AysbHn6kHyfXqyzNDxNGnnDTgd56eveq RUNNING 81 -safenode2 12D3KooWQGVfcwrPFvC6PyCva1cJu8NZVhdZCuPHJ4vY79yuKC3A RUNNING 82 -safenode3 12D3KooWMqRH6EF1Km61TAW9wTuv9LgDabKMY9DJSGyrxUafXP6b RUNNING 79 +antnode1 12D3KooWGQu92xCXuiK6AysbHn6kHyfXqyzNDxNGnnDTgd56eveq RUNNING 81 +antnode2 12D3KooWQGVfcwrPFvC6PyCva1cJu8NZVhdZCuPHJ4vY79yuKC3A RUNNING 82 +antnode3 12D3KooWMqRH6EF1Km61TAW9wTuv9LgDabKMY9DJSGyrxUafXP6b RUNNING 79 ``` We can see our services are running and the nodes have connections to other peers. @@ -87,20 +88,20 @@ We can see our services are running and the nodes have connections to other peer Now, run the `status` command again, but with the `--details` flag: ``` ================================================= - Safenode Services + Antnode Services ================================================= Refreshing the node registry... ============================ -safenode1 - RUNNING +antnode1 - RUNNING ============================ Version: 0.105.0 Peer ID: 12D3KooWGQu92xCXuiK6AysbHn6kHyfXqyzNDxNGnnDTgd56eveq RPC Socket: 127.0.0.1:41785 Listen Addresses: Some["/ip4/127.0.0.1/udp/34653/quic-v1/p2p/12D3KooWGQu92xCXuiK6AysbHn6kHyfXqyzNDxNGnnDTgd56eveq", "/ip4/192.168.121.7/udp/34653/quic-v1/p2p/12D3KooWGQu92xCXuiK6AysbHn6kHyfXqyzNDxNGnnDTgd56eveq"] PID: 3137 -Data path: /var/safenode-manager/services/safenode1 -Log path: /var/log/safenode/safenode1 -Bin path: /var/safenode-manager/services/safenode1/safenode +Data path: /var/antctl/services/antnode1 +Log path: /var/log/antnode/antnode1 +Bin path: /var/antctl/services/antnode1/antnode Connected peers: 10 ``` @@ -113,41 +114,41 @@ The nodes could now be left running like this, but for the purposes of this guid It's possible to run the `add` command again, as before: ``` -safenode-manager add --count 3 --peer /ip4/46.101.80.187/udp/58070/quic-v1/p2p/12D3KooWKgJQedzCxrp33u3dBD1mUZ9HTjEjgrxskEBvzoQWkRT9 +antctl add --count 3 --peer /ip4/46.101.80.187/udp/58070/quic-v1/p2p/12D3KooWKgJQedzCxrp33u3dBD1mUZ9HTjEjgrxskEBvzoQWkRT9 ``` The subsequent `status` command will show us an additional three nodes, for a total of six: ``` -$ safenode-manager status +$ antctl status ================================================= - Safenode Services + Antnode Services ================================================= Refreshing the node registry... Service Name Peer ID Status Connected Peers -safenode1 12D3KooWGQu92xCXuiK6AysbHn6kHyfXqyzNDxNGnnDTgd56eveq RUNNING 4 -safenode2 12D3KooWQGVfcwrPFvC6PyCva1cJu8NZVhdZCuPHJ4vY79yuKC3A RUNNING 4 -safenode3 12D3KooWMqRH6EF1Km61TAW9wTuv9LgDabKMY9DJSGyrxUafXP6b RUNNING 3 -safenode4 - ADDED - -safenode5 - ADDED - -safenode6 - ADDED - +antnode1 12D3KooWGQu92xCXuiK6AysbHn6kHyfXqyzNDxNGnnDTgd56eveq RUNNING 4 +antnode2 12D3KooWQGVfcwrPFvC6PyCva1cJu8NZVhdZCuPHJ4vY79yuKC3A RUNNING 4 +antnode3 12D3KooWMqRH6EF1Km61TAW9wTuv9LgDabKMY9DJSGyrxUafXP6b RUNNING 3 +antnode4 - ADDED - +antnode5 - ADDED - +antnode6 - ADDED - ``` Again, the new nodes have not been started. Run the `start` command to start them, then observe the status: ``` -$ safenode-manager status +$ antctl status ================================================= - Safenode Services + Antctl Services ================================================= Refreshing the node registry... Service Name Peer ID Status Connected Peers -safenode1 12D3KooWGQu92xCXuiK6AysbHn6kHyfXqyzNDxNGnnDTgd56eveq RUNNING 138 -safenode2 12D3KooWQGVfcwrPFvC6PyCva1cJu8NZVhdZCuPHJ4vY79yuKC3A RUNNING 177 -safenode3 12D3KooWMqRH6EF1Km61TAW9wTuv9LgDabKMY9DJSGyrxUafXP6b RUNNING 144 -safenode4 12D3KooWLH9VRAoUMj4bUjtzcKS3mqfzyc46TxBkBzvUXfV1bjaT RUNNING 2 -safenode5 12D3KooWEcbpvSSTmSyuzqP3gE9bE7uqYFatHhkJXr8PBiqmESEG RUNNING 1 -safenode6 12D3KooWBip2g5FakT1dZHdrhdmnctgKqhbRBQA5ZpvtHh4XPRXJ RUNNING 30 +antnode1 12D3KooWGQu92xCXuiK6AysbHn6kHyfXqyzNDxNGnnDTgd56eveq RUNNING 138 +antnode2 12D3KooWQGVfcwrPFvC6PyCva1cJu8NZVhdZCuPHJ4vY79yuKC3A RUNNING 177 +antnode3 12D3KooWMqRH6EF1Km61TAW9wTuv9LgDabKMY9DJSGyrxUafXP6b RUNNING 144 +antnode4 12D3KooWLH9VRAoUMj4bUjtzcKS3mqfzyc46TxBkBzvUXfV1bjaT RUNNING 2 +antnode5 12D3KooWEcbpvSSTmSyuzqP3gE9bE7uqYFatHhkJXr8PBiqmESEG RUNNING 1 +antnode6 12D3KooWBip2g5FakT1dZHdrhdmnctgKqhbRBQA5ZpvtHh4XPRXJ RUNNING 30 ``` ### Removing Nodes @@ -156,105 +157,105 @@ If for some reason we want to remove one of our nodes, we can do so using the `r Suppose we wanted to remove the 5th service. First of all, we need to stop the service. Run the following command: ``` -$ safenode-manager stop --service-name safenode5 +$ antctl stop --service-name antnode5 ``` -Observe that `safenode5` has been stopped, but the others are still running: +Observe that `antnode5` has been stopped, but the others are still running: ``` -$ safenode-manager status +$ antctl status ================================================= - Safenode Services + Antnode Services ================================================= Refreshing the node registry... Service Name Peer ID Status Connected Peers -safenode1 12D3KooWGQu92xCXuiK6AysbHn6kHyfXqyzNDxNGnnDTgd56eveq RUNNING 10 -safenode2 12D3KooWQGVfcwrPFvC6PyCva1cJu8NZVhdZCuPHJ4vY79yuKC3A RUNNING 5 -safenode3 12D3KooWMqRH6EF1Km61TAW9wTuv9LgDabKMY9DJSGyrxUafXP6b RUNNING 2 -safenode4 12D3KooWLH9VRAoUMj4bUjtzcKS3mqfzyc46TxBkBzvUXfV1bjaT RUNNING 2 -safenode5 12D3KooWEcbpvSSTmSyuzqP3gE9bE7uqYFatHhkJXr8PBiqmESEG STOPPED - -safenode6 12D3KooWBip2g5FakT1dZHdrhdmnctgKqhbRBQA5ZpvtHh4XPRXJ RUNNING 29 +antnode1 12D3KooWGQu92xCXuiK6AysbHn6kHyfXqyzNDxNGnnDTgd56eveq RUNNING 10 +antnode2 12D3KooWQGVfcwrPFvC6PyCva1cJu8NZVhdZCuPHJ4vY79yuKC3A RUNNING 5 +antnode3 12D3KooWMqRH6EF1Km61TAW9wTuv9LgDabKMY9DJSGyrxUafXP6b RUNNING 2 +antnode4 12D3KooWLH9VRAoUMj4bUjtzcKS3mqfzyc46TxBkBzvUXfV1bjaT RUNNING 2 +antnode5 12D3KooWEcbpvSSTmSyuzqP3gE9bE7uqYFatHhkJXr8PBiqmESEG STOPPED - +antnode6 12D3KooWBip2g5FakT1dZHdrhdmnctgKqhbRBQA5ZpvtHh4XPRXJ RUNNING 29 ``` Now that it's been stopped, remove it: ``` -$ safenode-manager remove --service-name safenode5 +$ antctl remove --service-name antnode5 ``` The `status` command will no longer show the service: ``` -vagrant@ubuntu2204:~$ safenode-manager status +vagrant@ubuntu2204:~$ antctl status ================================================= - Safenode Services + Antnode Services ================================================= Refreshing the node registry... Service Name Peer ID Status Connected Peers -safenode1 12D3KooWGQu92xCXuiK6AysbHn6kHyfXqyzNDxNGnnDTgd56eveq RUNNING 2 -safenode2 12D3KooWQGVfcwrPFvC6PyCva1cJu8NZVhdZCuPHJ4vY79yuKC3A RUNNING 96 -safenode3 12D3KooWMqRH6EF1Km61TAW9wTuv9LgDabKMY9DJSGyrxUafXP6b RUNNING 127 -safenode4 12D3KooWLH9VRAoUMj4bUjtzcKS3mqfzyc46TxBkBzvUXfV1bjaT RUNNING 76 -safenode6 12D3KooWBip2g5FakT1dZHdrhdmnctgKqhbRBQA5ZpvtHh4XPRXJ RUNNING 133 +antnode1 12D3KooWGQu92xCXuiK6AysbHn6kHyfXqyzNDxNGnnDTgd56eveq RUNNING 2 +antnode2 12D3KooWQGVfcwrPFvC6PyCva1cJu8NZVhdZCuPHJ4vY79yuKC3A RUNNING 96 +antnode3 12D3KooWMqRH6EF1Km61TAW9wTuv9LgDabKMY9DJSGyrxUafXP6b RUNNING 127 +antnode4 12D3KooWLH9VRAoUMj4bUjtzcKS3mqfzyc46TxBkBzvUXfV1bjaT RUNNING 76 +antnode6 12D3KooWBip2g5FakT1dZHdrhdmnctgKqhbRBQA5ZpvtHh4XPRXJ RUNNING 133 ``` However, we will still see it in the detailed view: ``` -$ safenode-manager status --details +$ antctl status --details ================================================= - Safenode Services + Antnode Services ================================================= Refreshing the node registry... ============================ -safenode5 - REMOVED +antnode5 - REMOVED ============================ Version: 0.105.0 Peer ID: 12D3KooWEcbpvSSTmSyuzqP3gE9bE7uqYFatHhkJXr8PBiqmESEG RPC Socket: 127.0.0.1:38579 Listen Addresses: Some(["/ip4/127.0.0.1/udp/58354/quic-v1/p2p/12D3KooWEcbpvSSTmSyuzqP3gE9bE7uqYFatHhkJXr8PBiqmESEG", "/ip4/192.168.121.7/udp/58354/quic-v1/p2p/12D3KooWEcbpvSSTmSyuzqP3gE9bE7uqYFatHhkJXr8PBiqmESEG"]) PID: - -Data path: /var/safenode-manager/services/safenode5 -Log path: /var/log/safenode/safenode5 -Bin path: /var/safenode-manager/services/safenode5/safenode +Data path: /var/antctl/services/antnode5 +Log path: /var/log/antnode/antnode5 +Bin path: /var/antctl/services/antnode5/antnode Connected peers: - ``` ## Upgrades -The node manager can be used to continually upgrade node services. +Antctl can be used to continually upgrade node services. Suppose we have five services: ``` -$ safenode-manager status +$ antctl status ================================================= - Safenode Services + Antnode Services ================================================= Refreshing the node registry... Service Name Peer ID Status Connected Peers -safenode1 12D3KooWKaNFPoRf8E2vsdSwBNyhWpe7csNkqwXaunNVxXGarxap RUNNING 1 -safenode2 12D3KooWNbRBR43rdFR44EAbwzBrED3jWUiWKkHD2oabw2jKZ9eF RUNNING 1 -safenode3 12D3KooWGYEuqXRhKVF2WK499oCBpkh9c6K7jy8BNSfqGosSzNZ8 RUNNING 1 -safenode4 12D3KooWS6WGnhbSfLywaepfZbbqgxTLhr66N1PXU4GVLWDBRZRF RUNNING 1 -safenode5 12D3KooWNdEYQAutzcGo26rZayew2rzE24y5VFVxTnsefNevc1Ly RUNNING 1 +antnode1 12D3KooWKaNFPoRf8E2vsdSwBNyhWpe7csNkqwXaunNVxXGarxap RUNNING 1 +antnode2 12D3KooWNbRBR43rdFR44EAbwzBrED3jWUiWKkHD2oabw2jKZ9eF RUNNING 1 +antnode3 12D3KooWGYEuqXRhKVF2WK499oCBpkh9c6K7jy8BNSfqGosSzNZ8 RUNNING 1 +antnode4 12D3KooWS6WGnhbSfLywaepfZbbqgxTLhr66N1PXU4GVLWDBRZRF RUNNING 1 +antnode5 12D3KooWNdEYQAutzcGo26rZayew2rzE24y5VFVxTnsefNevc1Ly RUNNING 1 ``` Using the `--details` flag, we can see they are not at the latest version: ``` -$ safenode-manager status --details +$ antctl status --details ================================================= - Safenode Services + Antnode Services ================================================= Refreshing the node registry... ============================ -safenode1 - RUNNING +antnode1 - RUNNING ============================ Version: 0.104.38 Peer ID: 12D3KooWKaNFPoRf8E2vsdSwBNyhWpe7csNkqwXaunNVxXGarxap RPC Socket: 127.0.0.1:37931 Listen Addresses: Some(["/ip4/127.0.0.1/udp/39890/quic-v1/p2p/12D3KooWKaNFPoRf8E2vsdSwBNyhWpe7csNkqwXaunNVxXGarxap", "/ip4/192.168.121.114/udp/39890/quic-v1/p2p/12D3KooWKaNFPoRf8E2vsdSwBNyhWpe7csNkqwXaunNVxXGarxap"]) PID: 3285 -Data path: /var/safenode-manager/services/safenode1 -Log path: /var/log/safenode/safenode1 -Bin path: /var/safenode-manager/services/safenode1/safenode +Data path: /var/antctl/services/antnode1 +Log path: /var/log/antnode/antnode1 +Bin path: /var/antctl/services/antnode1/antnode Connected peers: 0 ``` @@ -263,50 +264,50 @@ For brevity, the remaining output is snipped, but the four others are also at `0 We can use the `upgrade` command to get each service on the latest version: ``` -$ safenode-manager upgrade +$ antctl upgrade ================================================= - Upgrade Safenode Services + Upgrade Antnode Services ================================================= -Retrieving latest version of safenode... +Retrieving latest version of antnode... Latest version is 0.105.3 -Downloading safenode version 0.105.3... -Download completed: /tmp/ae310e50-d104-45bc-9619-22e1328d8c8b/safenode +Downloading antnode version 0.105.3... +Download completed: /tmp/ae310e50-d104-45bc-9619-22e1328d8c8b/antnode Refreshing the node registry... Upgrade summary: -✓ safenode1 upgraded from 0.104.38 to 0.105.3 -✓ safenode2 upgraded from 0.104.38 to 0.105.3 -✓ safenode3 upgraded from 0.104.38 to 0.105.3 -✓ safenode4 upgraded from 0.104.38 to 0.105.3 -✓ safenode5 upgraded from 0.104.38 to 0.105.3 +✓ antnode1 upgraded from 0.104.38 to 0.105.3 +✓ antnode2 upgraded from 0.104.38 to 0.105.3 +✓ antnode3 upgraded from 0.104.38 to 0.105.3 +✓ antnode4 upgraded from 0.104.38 to 0.105.3 +✓ antnode5 upgraded from 0.104.38 to 0.105.3 ``` Again, for brevity some output from the command was snipped, but the summary indicates that each service was upgraded from `0.104.38` to `0.105.3`. As with other commands, if no arguments are supplied, `upgrade` operates over all services, but it's possible to use the `--service-name` or `--peer-id` arguments to upgrade specific services. Both those arguments can be used multiple times to operate over several services. -The node manager will determine the latest version of `safenode`, download it, then for each running service, if the service is older than the latest, it will stop it, copy the new binary over the old one, and start the service again. +Antctl will determine the latest version of `antnode`, download it, then for each running service, if the service is older than the latest, it will stop it, copy the new binary over the old one, and start the service again. ### Downgrading -In some situations, it may be necessary to downgrade `safenode` to a previous version. The `upgrade` command supports this by providing `--version` and `--force` arguments. Each of those can be used to force the node manager to accept a lower version. +In some situations, it may be necessary to downgrade `antnode` to a previous version. The `upgrade` command supports this by providing `--version` and `--force` arguments. Each of those can be used to force Antctl to accept a lower version. ## Local Networks -Safenode Manager can also create local networks, which are useful for development or quick experimentation. In a local network, nodes will run as processes rather than services. Local operations are defined under the `local` subcommand. +Antctl can also create local networks, which are useful for development or quick experimentation. In a local network, nodes will run as processes rather than services. Local operations are defined under the `local` subcommand. To create a local network, use the `run` command: ``` -$ safenode-manager local run +$ antctl local run ================================================= Launching Local Network ================================================= Retrieving latest version for faucet... Downloading faucet version 0.4.3... Download completed: /tmp/4dc310dd-74ef-4dc5-af36-3bc92a882db1/faucet -Retrieving latest version for safenode... -Downloading safenode version 0.105.3... -Download completed: /tmp/f63d3ca8-2b8e-4630-9df5-a13418d5f826/safenode +Retrieving latest version for antnode... +Downloading antnode version 0.105.3... +Download completed: /tmp/f63d3ca8-2b8e-4630-9df5-a13418d5f826/antnode Launching node 1... Logging to directory: "/home/chris/.local/share/safe/node/12D3KooWPArH2XAw2sapcthNNcJRbbSuUtC3eBZrJtxi8DfcN1Yn/logs" @@ -319,37 +320,37 @@ _Note_: elevated privileges are not required for local networks. Check the output of the `status` command: ``` -$ safenode-manager status +$ antctl status ================================================= Local Network ================================================= Refreshing the node registry... Service Name Peer ID Status Connected Peers -safenode-local1 12D3KooWPArH2XAw2sapcthNNcJRbbSuUtC3eBZrJtxi8DfcN1Yn RUNNING 7 -safenode-local2 12D3KooWShWom22VhgkDX7APqSzCmXPNsfZA17Y2GSJpznunAp8M RUNNING 0 -safenode-local3 12D3KooWJwLaqsHvVaBkTHLn8Zf5hZdBaoC9pUNtgANymjF3XEmR RUNNING 0 -safenode-local4 12D3KooWP1dwBpCQa6mNY62h9LYN5w4gsTqpQfsH1789pvbNVkSQ RUNNING 0 -safenode-local5 12D3KooWADWar7uP8pgxahjcgNsvpzVdp2HxtwQoc5ytvgjjFN8r RUNNING 0 -safenode-local6 12D3KooWEvPZzdGXPFNGBR5xjt55tSTFJa9ByqLvZAWZ9uYRqYh1 RUNNING 0 -safenode-local7 12D3KooWAbLW3UfF9VdeTxtha7TMuMmFyhZGpXi9Anv9toNLQgfv RUNNING 0 -safenode-local8 12D3KooWMYhdDsp2eUjGGgqGrStGxyVzoZsui9YQH4N9B6Fh36H3 RUNNING 2 -safenode-local9 12D3KooWFMQ9rumJKjayipPgfnCP355oXcD6uzoBFZq985ij1MZP RUNNING 7 -safenode-local10 12D3KooWEN8bW2yPfBhJPG9w5xT3zkWGqA9JYY7qkgc1LmuWJshF RUNNING 0 -safenode-local11 12D3KooWSUi43YFYQxoRk8iyh7XE3SSeFvLYvANjRjSTS2CAXTwF RUNNING 0 -safenode-local12 12D3KooWNhwMVs8jBSwsfM6gD4vhwksVUaP2EMmwReNiibMqPBYT RUNNING 0 -safenode-local13 12D3KooWDqgKpbrenxeWyAAw2j45wW7tCpiHYxNnTL7tFioBCTSv RUNNING 1 -safenode-local14 12D3KooWAxzJjhxrr2QD4UwkrovVTy5PnjWCFkBPrUJdPVzdNmDP RUNNING 0 -safenode-local15 12D3KooWCE3Ccp1GEiXLU8pQdYJued5G6xAiRiarSSgXRhHwG6XJ RUNNING 7 -safenode-local16 12D3KooWRC9wjjsnUTEjP8F6pNVu4LacgPMYNP8p3WNeBcgqEGZH RUNNING 0 -safenode-local17 12D3KooWKNnLBkDXvdyPV8FALGApnZjtyuxhfzBED4boBQX8gwvD RUNNING 7 -safenode-local18 12D3KooWGvMXmnGU3s7g8XZXSExmscXfV8cqHrAQkVKicRxJrx5E RUNNING 1 -safenode-local19 12D3KooWHFzdXEiajdSbJRRLnJq56qw2pke9HvneeziuWZB7TTsD RUNNING 2 -safenode-local20 12D3KooWMWuuiPwz1mASasxDuT2QpkDFg46RjNiY6FXprFrgFAbT RUNNING 7 -safenode-local21 12D3KooWAkgCaCPMBG2gkZJRQJwfM5XYyJ66LmCSidXK6R8x2b7q RUNNING 6 -safenode-local22 12D3KooWPep6B7YfsXWdmjDtyNvm8TZ3bvmn9dZ9w9CPtssW2Wtz RUNNING 7 -safenode-local23 12D3KooWF486Rjn5DZ7VXcZi99bTabZsWNf73dnnfmpdjusdeEu9 RUNNING 0 -safenode-local24 12D3KooWLLWGzyFtB3i1WNrsdu2eW4k3gT7Wewf9D8srgb1dNwcj RUNNING 0 -safenode-local25 12D3KooWPpVim2rRHeAYTrM8mSkZjUt5SjQ4v5xPF2h7wi8H1jRj RUNNING 0 +antnode-local1 12D3KooWPArH2XAw2sapcthNNcJRbbSuUtC3eBZrJtxi8DfcN1Yn RUNNING 7 +antnode-local2 12D3KooWShWom22VhgkDX7APqSzCmXPNsfZA17Y2GSJpznunAp8M RUNNING 0 +antnode-local3 12D3KooWJwLaqsHvVaBkTHLn8Zf5hZdBaoC9pUNtgANymjF3XEmR RUNNING 0 +antnode-local4 12D3KooWP1dwBpCQa6mNY62h9LYN5w4gsTqpQfsH1789pvbNVkSQ RUNNING 0 +antnode-local5 12D3KooWADWar7uP8pgxahjcgNsvpzVdp2HxtwQoc5ytvgjjFN8r RUNNING 0 +antnode-local6 12D3KooWEvPZzdGXPFNGBR5xjt55tSTFJa9ByqLvZAWZ9uYRqYh1 RUNNING 0 +antnode-local7 12D3KooWAbLW3UfF9VdeTxtha7TMuMmFyhZGpXi9Anv9toNLQgfv RUNNING 0 +antnode-local8 12D3KooWMYhdDsp2eUjGGgqGrStGxyVzoZsui9YQH4N9B6Fh36H3 RUNNING 2 +antnode-local9 12D3KooWFMQ9rumJKjayipPgfnCP355oXcD6uzoBFZq985ij1MZP RUNNING 7 +antnode-local10 12D3KooWEN8bW2yPfBhJPG9w5xT3zkWGqA9JYY7qkgc1LmuWJshF RUNNING 0 +antnode-local11 12D3KooWSUi43YFYQxoRk8iyh7XE3SSeFvLYvANjRjSTS2CAXTwF RUNNING 0 +antnode-local12 12D3KooWNhwMVs8jBSwsfM6gD4vhwksVUaP2EMmwReNiibMqPBYT RUNNING 0 +antnode-local13 12D3KooWDqgKpbrenxeWyAAw2j45wW7tCpiHYxNnTL7tFioBCTSv RUNNING 1 +antnode-local14 12D3KooWAxzJjhxrr2QD4UwkrovVTy5PnjWCFkBPrUJdPVzdNmDP RUNNING 0 +antnode-local15 12D3KooWCE3Ccp1GEiXLU8pQdYJued5G6xAiRiarSSgXRhHwG6XJ RUNNING 7 +antnode-local16 12D3KooWRC9wjjsnUTEjP8F6pNVu4LacgPMYNP8p3WNeBcgqEGZH RUNNING 0 +antnode-local17 12D3KooWKNnLBkDXvdyPV8FALGApnZjtyuxhfzBED4boBQX8gwvD RUNNING 7 +antnode-local18 12D3KooWGvMXmnGU3s7g8XZXSExmscXfV8cqHrAQkVKicRxJrx5E RUNNING 1 +antnode-local19 12D3KooWHFzdXEiajdSbJRRLnJq56qw2pke9HvneeziuWZB7TTsD RUNNING 2 +antnode-local20 12D3KooWMWuuiPwz1mASasxDuT2QpkDFg46RjNiY6FXprFrgFAbT RUNNING 7 +antnode-local21 12D3KooWAkgCaCPMBG2gkZJRQJwfM5XYyJ66LmCSidXK6R8x2b7q RUNNING 6 +antnode-local22 12D3KooWPep6B7YfsXWdmjDtyNvm8TZ3bvmn9dZ9w9CPtssW2Wtz RUNNING 7 +antnode-local23 12D3KooWF486Rjn5DZ7VXcZi99bTabZsWNf73dnnfmpdjusdeEu9 RUNNING 0 +antnode-local24 12D3KooWLLWGzyFtB3i1WNrsdu2eW4k3gT7Wewf9D8srgb1dNwcj RUNNING 0 +antnode-local25 12D3KooWPpVim2rRHeAYTrM8mSkZjUt5SjQ4v5xPF2h7wi8H1jRj RUNNING 0 faucet - RUNNING - ``` @@ -357,7 +358,7 @@ So by default, 25 node processes have been launched, along with a faucet. The fa The most common scenario for using a local network is for development, but you can also use it to exercise a lot of features locally. For more details, please see the 'Using a Local Network' section of the [main README](https://github.com/maidsafe/safe_network/tree/node-man-readme?tab=readme-ov-file#using-a-local-network). -Once you've finished, run `safenode-manager local kill` to dispose the local network. +Once you've finished, run `antctl local kill` to dispose the local network. ## Running Integration Tests diff --git a/ant-node-manager/src/add_services/config.rs b/ant-node-manager/src/add_services/config.rs index 081ced459a..046b29d79b 100644 --- a/ant-node-manager/src/add_services/config.rs +++ b/ant-node-manager/src/add_services/config.rs @@ -69,6 +69,7 @@ impl PortRange { #[derive(Debug, PartialEq)] pub struct InstallNodeServiceCtxBuilder { + pub antnode_path: PathBuf, pub autostart: bool, pub bootstrap_peers: Vec, pub data_dir_path: PathBuf, @@ -88,7 +89,6 @@ pub struct InstallNodeServiceCtxBuilder { pub owner: Option, pub rewards_address: RewardsAddress, pub rpc_socket_addr: SocketAddr, - pub safenode_path: PathBuf, pub service_user: Option, pub upnp: bool, } @@ -180,7 +180,7 @@ impl InstallNodeServiceCtxBuilder { contents: None, environment: self.env_variables, label: label.clone(), - program: self.safenode_path.to_path_buf(), + program: self.antnode_path.to_path_buf(), username: self.service_user.clone(), working_directory: None, }) @@ -188,11 +188,13 @@ impl InstallNodeServiceCtxBuilder { } pub struct AddNodeServiceOptions { + pub antnode_dir_path: PathBuf, + pub antnode_src_path: PathBuf, pub auto_restart: bool, pub auto_set_nat_flags: bool, pub bootstrap_peers: Vec, pub count: Option, - pub delete_safenode_src: bool, + pub delete_antnode_src: bool, pub enable_metrics_server: bool, pub env_variables: Option>, pub evm_network: EvmNetwork, @@ -209,8 +211,6 @@ pub struct AddNodeServiceOptions { pub rewards_address: RewardsAddress, pub rpc_address: Option, pub rpc_port: Option, - pub safenode_src_path: PathBuf, - pub safenode_dir_path: PathBuf, pub service_data_dir_path: PathBuf, pub service_log_dir_path: PathBuf, pub upnp: bool, @@ -350,6 +350,7 @@ mod tests { fn create_default_builder() -> InstallNodeServiceCtxBuilder { InstallNodeServiceCtxBuilder { + antnode_path: PathBuf::from("/bin/antnode"), autostart: true, bootstrap_peers: vec![], data_dir_path: PathBuf::from("/data"), @@ -370,7 +371,6 @@ mod tests { rewards_address: RewardsAddress::from_str("0x03B770D9cD32077cC0bF330c13C114a87643B124") .unwrap(), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8080), - safenode_path: PathBuf::from("/bin/safenode"), service_user: None, upnp: false, } @@ -408,7 +408,7 @@ mod tests { rewards_address: RewardsAddress::from_str("0x03B770D9cD32077cC0bF330c13C114a87643B124") .unwrap(), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8080), - safenode_path: PathBuf::from("/bin/safenode"), + antnode_path: PathBuf::from("/bin/antnode"), service_user: None, upnp: false, } @@ -446,7 +446,7 @@ mod tests { rewards_address: RewardsAddress::from_str("0x03B770D9cD32077cC0bF330c13C114a87643B124") .unwrap(), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8080), - safenode_path: PathBuf::from("/bin/safenode"), + antnode_path: PathBuf::from("/bin/antnode"), service_user: None, upnp: false, } @@ -458,7 +458,7 @@ mod tests { let result = builder.build().unwrap(); assert_eq!(result.label.to_string(), "test-node"); - assert_eq!(result.program, PathBuf::from("/bin/safenode")); + assert_eq!(result.program, PathBuf::from("/bin/antnode")); assert!(result.autostart); assert_eq!(result.username, None); assert_eq!(result.working_directory, None); @@ -490,7 +490,7 @@ mod tests { let result = builder.build().unwrap(); assert_eq!(result.label.to_string(), "test-node"); - assert_eq!(result.program, PathBuf::from("/bin/safenode")); + assert_eq!(result.program, PathBuf::from("/bin/antnode")); assert!(result.autostart); assert_eq!(result.username, None); assert_eq!(result.working_directory, None); @@ -538,7 +538,7 @@ mod tests { "/ip4/127.0.0.1/tcp/8080".parse().unwrap(), "/ip4/192.168.1.1/tcp/8081".parse().unwrap(), ]; - builder.service_user = Some("safenode-user".to_string()); + builder.service_user = Some("antnode-user".to_string()); let result = builder.build().unwrap(); @@ -587,7 +587,7 @@ mod tests { .collect::>(), expected_args ); - assert_eq!(result.username, Some("safenode-user".to_string())); + assert_eq!(result.username, Some("antnode-user".to_string())); } #[test] diff --git a/ant-node-manager/src/add_services/mod.rs b/ant-node-manager/src/add_services/mod.rs index 42ac5c0771..1387a37dd4 100644 --- a/ant-node-manager/src/add_services/mod.rs +++ b/ant-node-manager/src/add_services/mod.rs @@ -15,7 +15,7 @@ use self::config::{ InstallNodeServiceCtxBuilder, }; use crate::{ - config::{create_owned_dir, get_user_safenode_data_dir}, + config::{create_owned_dir, get_user_antnode_data_dir}, helpers::{check_port_availability, get_start_port_if_applicable, increment_port_option}, VerbosityLevel, DAEMON_SERVICE_NAME, }; @@ -34,7 +34,7 @@ use std::{ net::{IpAddr, Ipv4Addr, SocketAddr}, }; -/// Install safenode as a service. +/// Install antnode as a service. /// /// This only defines the service; it does not start it. /// @@ -88,12 +88,12 @@ pub async fn add_node( None => None, }; - let safenode_file_name = options - .safenode_src_path + let antnode_file_name = options + .antnode_src_path .file_name() .ok_or_else(|| { - error!("Could not get filename from the safenode download path"); - eyre!("Could not get filename from the safenode download path") + error!("Could not get filename from the antnode download path"); + eyre!("Could not get filename from the antnode download path") })? .to_string_lossy() .to_string(); @@ -156,15 +156,15 @@ pub async fn add_node( SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), rpc_free_port) }; - let service_name = format!("safenode{node_number}"); + let service_name = format!("antnode{node_number}"); let service_data_dir_path = options.service_data_dir_path.join(service_name.clone()); - let service_safenode_path = service_data_dir_path.join(safenode_file_name.clone()); + let service_antnode_path = service_data_dir_path.join(antnode_file_name.clone()); // For a user mode service, if the user has *not* specified a custom directory and they are // using the default, e.g., ~/.local/share/safe/node/, an additional "logs" // directory needs to be appended to the path, otherwise the log files will be output at // the same directory where `secret-key` is, which is not what users expect. - let default_log_dir_path = get_user_safenode_data_dir()?; + let default_log_dir_path = get_user_antnode_data_dir()?; let service_log_dir_path = if options.user_mode && options.service_log_dir_path == default_log_dir_path { options @@ -185,10 +185,10 @@ pub async fn add_node( std::fs::create_dir_all(service_log_dir_path.clone())?; } - debug!("Copying safenode binary to {service_safenode_path:?}"); + debug!("Copying antnode binary to {service_antnode_path:?}"); std::fs::copy( - options.safenode_src_path.clone(), - service_safenode_path.clone(), + options.antnode_src_path.clone(), + service_antnode_path.clone(), )?; if options.auto_set_nat_flags { @@ -237,7 +237,7 @@ pub async fn add_node( owner: owner.clone(), rewards_address: options.rewards_address, rpc_socket_addr, - safenode_path: service_safenode_path.clone(), + antnode_path: service_antnode_path.clone(), service_user: options.user.clone(), upnp: options.upnp, } @@ -248,13 +248,14 @@ pub async fn add_node( info!("Successfully added service {service_name}"); added_service_data.push(( service_name.clone(), - service_safenode_path.to_string_lossy().into_owned(), + service_antnode_path.to_string_lossy().into_owned(), service_data_dir_path.to_string_lossy().into_owned(), service_log_dir_path.to_string_lossy().into_owned(), rpc_socket_addr, )); node_registry.nodes.push(NodeServiceData { + antnode_path: service_antnode_path, auto_restart: options.auto_restart, connected_peers: None, data_dir_path: service_data_dir_path.clone(), @@ -277,7 +278,6 @@ pub async fn add_node( owner: owner.clone(), peer_id: None, pid: None, - safenode_path: service_safenode_path, service_name, status: ServiceStatus::Added, upnp: options.upnp, @@ -301,9 +301,9 @@ pub async fn add_node( rpc_port = increment_port_option(rpc_port); } - if options.delete_safenode_src { - debug!("Deleting safenode binary file"); - std::fs::remove_file(options.safenode_src_path)?; + if options.delete_antnode_src { + debug!("Deleting antnode binary file"); + std::fs::remove_file(options.antnode_src_path)?; } if !added_service_data.is_empty() { @@ -316,7 +316,7 @@ pub async fn add_node( println!("Services Added:"); for install in added_service_data.iter() { println!(" {} {}", "✓".green(), install.0); - println!(" - Safenode path: {}", install.1); + println!(" - Antnode path: {}", install.1); println!(" - Data path: {}", install.2); println!(" - Log path: {}", install.3); println!(" - RPC port: {}", install.4); @@ -435,8 +435,8 @@ pub fn add_daemon( service_control: &dyn ServiceControl, ) -> Result<()> { if node_registry.daemon.is_some() { - error!("A safenodemand service has already been created"); - return Err(eyre!("A safenodemand service has already been created")); + error!("A antctld service has already been created"); + return Err(eyre!("A antctld service has already been created")); } debug!( diff --git a/ant-node-manager/src/add_services/tests.rs b/ant-node-manager/src/add_services/tests.rs index a2b64cf403..6d54770b79 100644 --- a/ant-node-manager/src/add_services/tests.rs +++ b/ant-node-manager/src/add_services/tests.rs @@ -37,9 +37,9 @@ use std::{ }; #[cfg(not(target_os = "windows"))] -const SAFENODE_FILE_NAME: &str = "safenode"; +const ANTNODE_FILE_NAME: &str = "antnode"; #[cfg(target_os = "windows")] -const SAFENODE_FILE_NAME: &str = "safenode.exe"; +const ANTNODE_FILE_NAME: &str = "antnode.exe"; #[cfg(not(target_os = "windows"))] const AUDITOR_FILE_NAME: &str = "sn_auditor"; #[cfg(target_os = "windows")] @@ -49,9 +49,9 @@ const FAUCET_FILE_NAME: &str = "faucet"; #[cfg(target_os = "windows")] const FAUCET_FILE_NAME: &str = "faucet.exe"; #[cfg(not(target_os = "windows"))] -const DAEMON_FILE_NAME: &str = "safenodemand"; +const DAEMON_FILE_NAME: &str = "antctld"; #[cfg(target_os = "windows")] -const DAEMON_FILE_NAME: &str = "safenodemand.exe"; +const DAEMON_FILE_NAME: &str = "antctld.exe"; mock! { pub ServiceControl {} @@ -88,8 +88,8 @@ async fn add_genesis_node_should_use_latest_version_and_add_one_service() -> Res node_data_dir.create_dir_all()?; let node_logs_dir = temp_dir.child("logs"); node_logs_dir.create_dir_all()?; - let safenode_download_path = temp_dir.child(SAFENODE_FILE_NAME); - safenode_download_path.write_binary(b"fake safenode bin")?; + let antnode_download_path = temp_dir.child(ANTNODE_FILE_NAME); + antnode_download_path.write_binary(b"fake antnode bin")?; let mut node_registry = NodeRegistry { auditor: None, @@ -113,7 +113,7 @@ async fn add_genesis_node_should_use_latest_version_and_add_one_service() -> Res let install_ctx = InstallNodeServiceCtxBuilder { autostart: false, bootstrap_peers: vec![], - data_dir_path: node_data_dir.to_path_buf().join("safenode1"), + data_dir_path: node_data_dir.to_path_buf().join("antnode1"), env_variables: None, evm_network: EvmNetwork::Custom(CustomNetwork { rpc_url_http: "http://localhost:8545".parse()?, @@ -127,21 +127,21 @@ async fn add_genesis_node_should_use_latest_version_and_add_one_service() -> Res genesis: true, home_network: false, local: true, - log_dir_path: node_logs_dir.to_path_buf().join("safenode1"), + log_dir_path: node_logs_dir.to_path_buf().join("antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, metrics_port: None, - name: "safenode1".to_string(), + name: "antnode1".to_string(), node_ip: None, node_port: None, owner: None, rewards_address: RewardsAddress::from_str("0x03B770D9cD32077cC0bF330c13C114a87643B124")?, rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: node_data_dir + antnode_path: node_data_dir .to_path_buf() - .join("safenode1") - .join(SAFENODE_FILE_NAME), + .join("antnode1") + .join(ANTNODE_FILE_NAME), service_user: Some(get_username()), upnp: false, } @@ -159,7 +159,7 @@ async fn add_genesis_node_should_use_latest_version_and_add_one_service() -> Res auto_set_nat_flags: false, bootstrap_peers: vec![], count: None, - delete_safenode_src: true, + delete_antnode_src: true, enable_metrics_server: false, env_variables: None, genesis: true, @@ -174,8 +174,8 @@ async fn add_genesis_node_should_use_latest_version_and_add_one_service() -> Res node_port: None, rpc_address: None, rpc_port: None, - safenode_dir_path: temp_dir.to_path_buf(), - safenode_src_path: safenode_download_path.to_path_buf(), + antnode_dir_path: temp_dir.to_path_buf(), + antnode_src_path: antnode_download_path.to_path_buf(), service_data_dir_path: node_data_dir.to_path_buf(), service_log_dir_path: node_logs_dir.to_path_buf(), upnp: false, @@ -201,7 +201,7 @@ async fn add_genesis_node_should_use_latest_version_and_add_one_service() -> Res ) .await?; - safenode_download_path.assert(predicate::path::missing()); + antnode_download_path.assert(predicate::path::missing()); node_data_dir.assert(predicate::path::is_dir()); node_logs_dir.assert(predicate::path::is_dir()); @@ -209,7 +209,7 @@ async fn add_genesis_node_should_use_latest_version_and_add_one_service() -> Res assert_eq!(node_registry.nodes.len(), 1); assert!(node_registry.nodes[0].genesis); assert_eq!(node_registry.nodes[0].version, latest_version); - assert_eq!(node_registry.nodes[0].service_name, "safenode1"); + assert_eq!(node_registry.nodes[0].service_name, "antnode1"); assert_eq!(node_registry.nodes[0].user, Some(get_username())); assert_eq!(node_registry.nodes[0].number, 1); assert_eq!( @@ -218,11 +218,11 @@ async fn add_genesis_node_should_use_latest_version_and_add_one_service() -> Res ); assert_eq!( node_registry.nodes[0].log_dir_path, - node_logs_dir.to_path_buf().join("safenode1") + node_logs_dir.to_path_buf().join("antnode1") ); assert_eq!( node_registry.nodes[0].data_dir_path, - node_data_dir.to_path_buf().join("safenode1") + node_data_dir.to_path_buf().join("antnode1") ); assert_matches!(node_registry.nodes[0].status, ServiceStatus::Added); assert_eq!( @@ -262,7 +262,7 @@ async fn add_genesis_node_should_return_an_error_if_there_is_already_a_genesis_n nodes: vec![NodeServiceData { auto_restart: false, connected_peers: None, - data_dir_path: PathBuf::from("/var/safenode-manager/services/safenode1"), + data_dir_path: PathBuf::from("/var/antctl/services/antnode1"), evm_network: EvmNetwork::Custom(CustomNetwork { rpc_url_http: "http://localhost:8545".parse()?, payment_token_address: RewardsAddress::from_str( @@ -276,7 +276,7 @@ async fn add_genesis_node_should_return_an_error_if_there_is_already_a_genesis_n home_network: false, listen_addr: None, local: false, - log_dir_path: PathBuf::from("/var/log/safenode/safenode1"), + log_dir_path: PathBuf::from("/var/log/antnode/antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, @@ -293,8 +293,8 @@ async fn add_genesis_node_should_return_an_error_if_there_is_already_a_genesis_n reward_balance: Some(AttoTokens::zero()), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), status: ServiceStatus::Added, - safenode_path: PathBuf::from("/var/safenode-manager/services/safenode1/safenode"), - service_name: "safenode1".to_string(), + antnode_path: PathBuf::from("/var/antctl/services/antnode1/antnode"), + service_name: "antnode1".to_string(), upnp: false, user: Some("safe".to_string()), user_mode: false, @@ -306,12 +306,12 @@ async fn add_genesis_node_should_return_an_error_if_there_is_already_a_genesis_n }; let temp_dir = assert_fs::TempDir::new()?; - let node_data_dir = temp_dir.child("safenode1"); + let node_data_dir = temp_dir.child("antnode1"); node_data_dir.create_dir_all()?; let node_logs_dir = temp_dir.child("logs"); node_logs_dir.create_dir_all()?; - let safenode_download_path = temp_dir.child(SAFENODE_FILE_NAME); - safenode_download_path.write_binary(b"fake safenode bin")?; + let antnode_download_path = temp_dir.child(ANTNODE_FILE_NAME); + antnode_download_path.write_binary(b"fake antnode bin")?; let custom_rpc_address = Ipv4Addr::new(127, 0, 0, 1); @@ -321,7 +321,7 @@ async fn add_genesis_node_should_return_an_error_if_there_is_already_a_genesis_n auto_set_nat_flags: false, bootstrap_peers: vec![], count: None, - delete_safenode_src: true, + delete_antnode_src: true, enable_metrics_server: false, env_variables: None, genesis: true, @@ -336,8 +336,8 @@ async fn add_genesis_node_should_return_an_error_if_there_is_already_a_genesis_n node_port: None, rpc_address: Some(custom_rpc_address), rpc_port: None, - safenode_dir_path: temp_dir.to_path_buf(), - safenode_src_path: safenode_download_path.to_path_buf(), + antnode_dir_path: temp_dir.to_path_buf(), + antnode_src_path: antnode_download_path.to_path_buf(), service_data_dir_path: node_data_dir.to_path_buf(), service_log_dir_path: node_logs_dir.to_path_buf(), upnp: false, @@ -391,12 +391,12 @@ async fn add_genesis_node_should_return_an_error_if_count_is_greater_than_1() -> let latest_version = "0.96.4"; let temp_dir = assert_fs::TempDir::new()?; - let node_data_dir = temp_dir.child("safenode1"); + let node_data_dir = temp_dir.child("antnode1"); node_data_dir.create_dir_all()?; let node_logs_dir = temp_dir.child("logs"); node_logs_dir.create_dir_all()?; - let safenode_download_path = temp_dir.child(SAFENODE_FILE_NAME); - safenode_download_path.write_binary(b"fake safenode bin")?; + let antnode_download_path = temp_dir.child(ANTNODE_FILE_NAME); + antnode_download_path.write_binary(b"fake antnode bin")?; let result = add_node( AddNodeServiceOptions { @@ -404,7 +404,7 @@ async fn add_genesis_node_should_return_an_error_if_count_is_greater_than_1() -> auto_set_nat_flags: false, bootstrap_peers: vec![], count: Some(3), - delete_safenode_src: true, + delete_antnode_src: true, enable_metrics_server: false, env_variables: None, genesis: true, @@ -419,8 +419,8 @@ async fn add_genesis_node_should_return_an_error_if_count_is_greater_than_1() -> node_port: None, rpc_address: None, rpc_port: None, - safenode_dir_path: temp_dir.to_path_buf(), - safenode_src_path: safenode_download_path.to_path_buf(), + antnode_dir_path: temp_dir.to_path_buf(), + antnode_src_path: antnode_download_path.to_path_buf(), service_data_dir_path: node_data_dir.to_path_buf(), service_log_dir_path: node_logs_dir.to_path_buf(), upnp: false, @@ -478,8 +478,8 @@ async fn add_node_should_use_latest_version_and_add_three_services() -> Result<( node_data_dir.create_dir_all()?; let node_logs_dir = temp_dir.child("logs"); node_logs_dir.create_dir_all()?; - let safenode_download_path = temp_dir.child(SAFENODE_FILE_NAME); - safenode_download_path.write_binary(b"fake safenode bin")?; + let antnode_download_path = temp_dir.child(ANTNODE_FILE_NAME); + antnode_download_path.write_binary(b"fake antnode bin")?; let mut seq = Sequence::new(); @@ -493,7 +493,7 @@ async fn add_node_should_use_latest_version_and_add_three_services() -> Result<( let install_ctx = InstallNodeServiceCtxBuilder { autostart: false, bootstrap_peers: vec![], - data_dir_path: node_data_dir.to_path_buf().join("safenode1"), + data_dir_path: node_data_dir.to_path_buf().join("antnode1"), env_variables: None, evm_network: EvmNetwork::Custom(CustomNetwork { rpc_url_http: "http://localhost:8545".parse()?, @@ -507,20 +507,20 @@ async fn add_node_should_use_latest_version_and_add_three_services() -> Result<( genesis: false, home_network: false, local: false, - log_dir_path: node_logs_dir.to_path_buf().join("safenode1"), + log_dir_path: node_logs_dir.to_path_buf().join("antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, metrics_port: None, - name: "safenode1".to_string(), + name: "antnode1".to_string(), node_ip: None, node_port: None, owner: None, rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: node_data_dir + antnode_path: node_data_dir .to_path_buf() - .join("safenode1") - .join(SAFENODE_FILE_NAME), + .join("antnode1") + .join(ANTNODE_FILE_NAME), rewards_address: RewardsAddress::from_str("0x03B770D9cD32077cC0bF330c13C114a87643B124")?, service_user: Some(get_username()), upnp: false, @@ -543,7 +543,7 @@ async fn add_node_should_use_latest_version_and_add_three_services() -> Result<( let install_ctx = InstallNodeServiceCtxBuilder { autostart: false, bootstrap_peers: vec![], - data_dir_path: node_data_dir.to_path_buf().join("safenode2"), + data_dir_path: node_data_dir.to_path_buf().join("antnode2"), env_variables: None, evm_network: EvmNetwork::Custom(CustomNetwork { rpc_url_http: "http://localhost:8545".parse()?, @@ -557,21 +557,21 @@ async fn add_node_should_use_latest_version_and_add_three_services() -> Result<( genesis: false, home_network: false, local: false, - log_dir_path: node_logs_dir.to_path_buf().join("safenode2"), + log_dir_path: node_logs_dir.to_path_buf().join("antnode2"), log_format: None, max_archived_log_files: None, max_log_files: None, metrics_port: None, - name: "safenode2".to_string(), + name: "antnode2".to_string(), node_ip: None, node_port: None, owner: None, rewards_address: RewardsAddress::from_str("0x03B770D9cD32077cC0bF330c13C114a87643B124")?, rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8083), - safenode_path: node_data_dir + antnode_path: node_data_dir .to_path_buf() - .join("safenode2") - .join(SAFENODE_FILE_NAME), + .join("antnode2") + .join(ANTNODE_FILE_NAME), service_user: Some(get_username()), upnp: false, } @@ -592,7 +592,7 @@ async fn add_node_should_use_latest_version_and_add_three_services() -> Result<( .in_sequence(&mut seq); let install_ctx = InstallNodeServiceCtxBuilder { autostart: false, - data_dir_path: node_data_dir.to_path_buf().join("safenode3"), + data_dir_path: node_data_dir.to_path_buf().join("antnode3"), bootstrap_peers: vec![], env_variables: None, evm_network: EvmNetwork::Custom(CustomNetwork { @@ -608,20 +608,20 @@ async fn add_node_should_use_latest_version_and_add_three_services() -> Result<( home_network: false, local: false, log_format: None, - log_dir_path: node_logs_dir.to_path_buf().join("safenode3"), + log_dir_path: node_logs_dir.to_path_buf().join("antnode3"), max_archived_log_files: None, max_log_files: None, metrics_port: None, - name: "safenode3".to_string(), + name: "antnode3".to_string(), node_ip: None, node_port: None, owner: None, rewards_address: RewardsAddress::from_str("0x03B770D9cD32077cC0bF330c13C114a87643B124")?, rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8085), - safenode_path: node_data_dir + antnode_path: node_data_dir .to_path_buf() - .join("safenode3") - .join(SAFENODE_FILE_NAME), + .join("antnode3") + .join(ANTNODE_FILE_NAME), service_user: Some(get_username()), upnp: false, } @@ -640,7 +640,7 @@ async fn add_node_should_use_latest_version_and_add_three_services() -> Result<( auto_set_nat_flags: false, bootstrap_peers: vec![], count: Some(3), - delete_safenode_src: true, + delete_antnode_src: true, enable_metrics_server: false, env_variables: None, genesis: false, @@ -655,8 +655,8 @@ async fn add_node_should_use_latest_version_and_add_three_services() -> Result<( node_port: None, rpc_address: None, rpc_port: None, - safenode_dir_path: temp_dir.to_path_buf(), - safenode_src_path: safenode_download_path.to_path_buf(), + antnode_dir_path: temp_dir.to_path_buf(), + antnode_src_path: antnode_download_path.to_path_buf(), service_data_dir_path: node_data_dir.to_path_buf(), service_log_dir_path: node_logs_dir.to_path_buf(), upnp: false, @@ -684,7 +684,7 @@ async fn add_node_should_use_latest_version_and_add_three_services() -> Result<( assert_eq!(node_registry.nodes.len(), 3); assert_eq!(node_registry.nodes[0].version, latest_version); - assert_eq!(node_registry.nodes[0].service_name, "safenode1"); + assert_eq!(node_registry.nodes[0].service_name, "antnode1"); assert_eq!(node_registry.nodes[0].user, Some(get_username())); assert_eq!(node_registry.nodes[0].number, 1); assert_eq!( @@ -693,15 +693,15 @@ async fn add_node_should_use_latest_version_and_add_three_services() -> Result<( ); assert_eq!( node_registry.nodes[0].log_dir_path, - node_logs_dir.to_path_buf().join("safenode1") + node_logs_dir.to_path_buf().join("antnode1") ); assert_eq!( node_registry.nodes[0].data_dir_path, - node_data_dir.to_path_buf().join("safenode1") + node_data_dir.to_path_buf().join("antnode1") ); assert_matches!(node_registry.nodes[0].status, ServiceStatus::Added); assert_eq!(node_registry.nodes[1].version, latest_version); - assert_eq!(node_registry.nodes[1].service_name, "safenode2"); + assert_eq!(node_registry.nodes[1].service_name, "antnode2"); assert_eq!(node_registry.nodes[1].user, Some(get_username())); assert_eq!(node_registry.nodes[1].number, 2); assert_eq!( @@ -710,15 +710,15 @@ async fn add_node_should_use_latest_version_and_add_three_services() -> Result<( ); assert_eq!( node_registry.nodes[1].log_dir_path, - node_logs_dir.to_path_buf().join("safenode2") + node_logs_dir.to_path_buf().join("antnode2") ); assert_eq!( node_registry.nodes[1].data_dir_path, - node_data_dir.to_path_buf().join("safenode2") + node_data_dir.to_path_buf().join("antnode2") ); assert_matches!(node_registry.nodes[1].status, ServiceStatus::Added); assert_eq!(node_registry.nodes[2].version, latest_version); - assert_eq!(node_registry.nodes[2].service_name, "safenode3"); + assert_eq!(node_registry.nodes[2].service_name, "antnode3"); assert_eq!(node_registry.nodes[2].user, Some(get_username())); assert_eq!(node_registry.nodes[2].number, 3); assert_eq!( @@ -727,11 +727,11 @@ async fn add_node_should_use_latest_version_and_add_three_services() -> Result<( ); assert_eq!( node_registry.nodes[2].log_dir_path, - node_logs_dir.to_path_buf().join("safenode3") + node_logs_dir.to_path_buf().join("antnode3") ); assert_eq!( node_registry.nodes[2].data_dir_path, - node_data_dir.to_path_buf().join("safenode3") + node_data_dir.to_path_buf().join("antnode3") ); assert_matches!(node_registry.nodes[2].status, ServiceStatus::Added); @@ -764,8 +764,8 @@ async fn add_node_should_update_the_bootstrap_peers_inside_node_registry() -> Re node_data_dir.create_dir_all()?; let node_logs_dir = temp_dir.child("logs"); node_logs_dir.create_dir_all()?; - let safenode_download_path = temp_dir.child(SAFENODE_FILE_NAME); - safenode_download_path.write_binary(b"fake safenode bin")?; + let antnode_download_path = temp_dir.child(ANTNODE_FILE_NAME); + antnode_download_path.write_binary(b"fake antnode bin")?; let mut seq = Sequence::new(); @@ -778,7 +778,7 @@ async fn add_node_should_update_the_bootstrap_peers_inside_node_registry() -> Re let install_ctx = InstallNodeServiceCtxBuilder { autostart: false, bootstrap_peers: new_peers.clone(), - data_dir_path: node_data_dir.to_path_buf().join("safenode1"), + data_dir_path: node_data_dir.to_path_buf().join("antnode1"), env_variables: None, evm_network: EvmNetwork::Custom(CustomNetwork { rpc_url_http: "http://localhost:8545".parse()?, @@ -792,21 +792,21 @@ async fn add_node_should_update_the_bootstrap_peers_inside_node_registry() -> Re genesis: false, home_network: false, local: false, - log_dir_path: node_logs_dir.to_path_buf().join("safenode1"), + log_dir_path: node_logs_dir.to_path_buf().join("antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, metrics_port: None, - name: "safenode1".to_string(), + name: "antnode1".to_string(), node_ip: None, node_port: None, owner: None, rewards_address: RewardsAddress::from_str("0x03B770D9cD32077cC0bF330c13C114a87643B124")?, rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 12001), - safenode_path: node_data_dir + antnode_path: node_data_dir .to_path_buf() - .join("safenode1") - .join(SAFENODE_FILE_NAME), + .join("antnode1") + .join(ANTNODE_FILE_NAME), service_user: Some(get_username()), upnp: false, } @@ -825,7 +825,7 @@ async fn add_node_should_update_the_bootstrap_peers_inside_node_registry() -> Re auto_set_nat_flags: false, bootstrap_peers: new_peers.clone(), count: None, - delete_safenode_src: true, + delete_antnode_src: true, enable_metrics_server: false, env_variables: None, local: false, @@ -840,8 +840,8 @@ async fn add_node_should_update_the_bootstrap_peers_inside_node_registry() -> Re node_port: None, rpc_address: None, rpc_port: None, - safenode_src_path: safenode_download_path.to_path_buf(), - safenode_dir_path: temp_dir.to_path_buf(), + antnode_src_path: antnode_download_path.to_path_buf(), + antnode_dir_path: temp_dir.to_path_buf(), service_data_dir_path: node_data_dir.to_path_buf(), service_log_dir_path: node_logs_dir.to_path_buf(), upnp: false, @@ -867,7 +867,7 @@ async fn add_node_should_update_the_bootstrap_peers_inside_node_registry() -> Re ) .await?; - safenode_download_path.assert(predicate::path::missing()); + antnode_download_path.assert(predicate::path::missing()); node_data_dir.assert(predicate::path::is_dir()); node_logs_dir.assert(predicate::path::is_dir()); @@ -876,7 +876,7 @@ async fn add_node_should_update_the_bootstrap_peers_inside_node_registry() -> Re assert_eq!(node_registry.nodes.len(), 1); assert_eq!(node_registry.nodes[0].version, latest_version); - assert_eq!(node_registry.nodes[0].service_name, "safenode1"); + assert_eq!(node_registry.nodes[0].service_name, "antnode1"); assert_eq!(node_registry.nodes[0].user, Some(get_username())); assert_eq!(node_registry.nodes[0].number, 1); assert_eq!( @@ -885,11 +885,11 @@ async fn add_node_should_update_the_bootstrap_peers_inside_node_registry() -> Re ); assert_eq!( node_registry.nodes[0].log_dir_path, - node_logs_dir.to_path_buf().join("safenode1") + node_logs_dir.to_path_buf().join("antnode1") ); assert_eq!( node_registry.nodes[0].data_dir_path, - node_data_dir.to_path_buf().join("safenode1") + node_data_dir.to_path_buf().join("antnode1") ); assert_matches!(node_registry.nodes[0].status, ServiceStatus::Added); @@ -924,8 +924,8 @@ async fn add_node_should_update_the_environment_variables_inside_node_registry() node_data_dir.create_dir_all()?; let node_logs_dir = temp_dir.child("logs"); node_logs_dir.create_dir_all()?; - let safenode_download_path = temp_dir.child(SAFENODE_FILE_NAME); - safenode_download_path.write_binary(b"fake safenode bin")?; + let antnode_download_path = temp_dir.child(ANTNODE_FILE_NAME); + antnode_download_path.write_binary(b"fake antnode bin")?; let mut seq = Sequence::new(); @@ -937,7 +937,7 @@ async fn add_node_should_update_the_environment_variables_inside_node_registry() let install_ctx = InstallNodeServiceCtxBuilder { autostart: false, bootstrap_peers: vec![], - data_dir_path: node_data_dir.to_path_buf().join("safenode1"), + data_dir_path: node_data_dir.to_path_buf().join("antnode1"), env_variables: env_variables.clone(), evm_network: EvmNetwork::Custom(CustomNetwork { rpc_url_http: "http://localhost:8545".parse()?, @@ -951,21 +951,21 @@ async fn add_node_should_update_the_environment_variables_inside_node_registry() genesis: false, home_network: false, local: false, - log_dir_path: node_logs_dir.to_path_buf().join("safenode1"), + log_dir_path: node_logs_dir.to_path_buf().join("antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, metrics_port: None, - name: "safenode1".to_string(), + name: "antnode1".to_string(), node_ip: None, node_port: None, owner: None, rewards_address: RewardsAddress::from_str("0x03B770D9cD32077cC0bF330c13C114a87643B124")?, rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 12001), - safenode_path: node_data_dir + antnode_path: node_data_dir .to_path_buf() - .join("safenode1") - .join(SAFENODE_FILE_NAME), + .join("antnode1") + .join(ANTNODE_FILE_NAME), service_user: Some(get_username()), upnp: false, } @@ -983,7 +983,7 @@ async fn add_node_should_update_the_environment_variables_inside_node_registry() auto_set_nat_flags: false, bootstrap_peers: vec![], count: None, - delete_safenode_src: true, + delete_antnode_src: true, enable_metrics_server: false, env_variables: env_variables.clone(), genesis: false, @@ -998,8 +998,8 @@ async fn add_node_should_update_the_environment_variables_inside_node_registry() node_port: None, rpc_address: None, rpc_port: None, - safenode_dir_path: temp_dir.to_path_buf(), - safenode_src_path: safenode_download_path.to_path_buf(), + antnode_dir_path: temp_dir.to_path_buf(), + antnode_src_path: antnode_download_path.to_path_buf(), service_data_dir_path: node_data_dir.to_path_buf(), service_log_dir_path: node_logs_dir.to_path_buf(), upnp: false, @@ -1025,7 +1025,7 @@ async fn add_node_should_update_the_environment_variables_inside_node_registry() ) .await?; - safenode_download_path.assert(predicate::path::missing()); + antnode_download_path.assert(predicate::path::missing()); node_data_dir.assert(predicate::path::is_dir()); node_logs_dir.assert(predicate::path::is_dir()); @@ -1033,7 +1033,7 @@ async fn add_node_should_update_the_environment_variables_inside_node_registry() assert_eq!(node_registry.nodes.len(), 1); assert_eq!(node_registry.nodes[0].version, latest_version); - assert_eq!(node_registry.nodes[0].service_name, "safenode1"); + assert_eq!(node_registry.nodes[0].service_name, "antnode1"); assert_eq!(node_registry.nodes[0].user, Some(get_username())); assert_eq!(node_registry.nodes[0].number, 1); assert_eq!( @@ -1042,11 +1042,11 @@ async fn add_node_should_update_the_environment_variables_inside_node_registry() ); assert_eq!( node_registry.nodes[0].log_dir_path, - node_logs_dir.to_path_buf().join("safenode1") + node_logs_dir.to_path_buf().join("antnode1") ); assert_eq!( node_registry.nodes[0].data_dir_path, - node_data_dir.to_path_buf().join("safenode1") + node_data_dir.to_path_buf().join("antnode1") ); assert_matches!(node_registry.nodes[0].status, ServiceStatus::Added); @@ -1069,7 +1069,7 @@ async fn add_new_node_should_add_another_service() -> Result<()> { nodes: vec![NodeServiceData { auto_restart: false, connected_peers: None, - data_dir_path: PathBuf::from("/var/safenode-manager/services/safenode1"), + data_dir_path: PathBuf::from("/var/antctl/services/antnode1"), evm_network: EvmNetwork::Custom(CustomNetwork { rpc_url_http: "http://localhost:8545".parse()?, payment_token_address: RewardsAddress::from_str( @@ -1083,7 +1083,7 @@ async fn add_new_node_should_add_another_service() -> Result<()> { home_network: false, listen_addr: None, local: false, - log_dir_path: PathBuf::from("/var/log/safenode/safenode1"), + log_dir_path: PathBuf::from("/var/log/antnode/antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, @@ -1099,8 +1099,8 @@ async fn add_new_node_should_add_another_service() -> Result<()> { )?, reward_balance: Some(AttoTokens::zero()), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: PathBuf::from("/var/safenode-manager/services/safenode1/safenode"), - service_name: "safenode1".to_string(), + antnode_path: PathBuf::from("/var/antctl/services/antnode1/antnode"), + service_name: "antnode1".to_string(), status: ServiceStatus::Added, upnp: false, user: Some("safe".to_string()), @@ -1112,12 +1112,12 @@ async fn add_new_node_should_add_another_service() -> Result<()> { daemon: None, }; let temp_dir = assert_fs::TempDir::new()?; - let node_data_dir = temp_dir.child("safenode1"); + let node_data_dir = temp_dir.child("antnode1"); node_data_dir.create_dir_all()?; let node_logs_dir = temp_dir.child("logs"); node_logs_dir.create_dir_all()?; - let safenode_download_path = temp_dir.child(SAFENODE_FILE_NAME); - safenode_download_path.write_binary(b"fake safenode bin")?; + let antnode_download_path = temp_dir.child(ANTNODE_FILE_NAME); + antnode_download_path.write_binary(b"fake antnode bin")?; let mut seq = Sequence::new(); mock_service_control @@ -1128,7 +1128,7 @@ async fn add_new_node_should_add_another_service() -> Result<()> { let install_ctx = InstallNodeServiceCtxBuilder { autostart: false, bootstrap_peers: vec![], - data_dir_path: node_data_dir.to_path_buf().join("safenode2"), + data_dir_path: node_data_dir.to_path_buf().join("antnode2"), env_variables: None, evm_network: EvmNetwork::Custom(CustomNetwork { rpc_url_http: "http://localhost:8545".parse()?, @@ -1142,21 +1142,21 @@ async fn add_new_node_should_add_another_service() -> Result<()> { genesis: false, home_network: false, local: false, - log_dir_path: node_logs_dir.to_path_buf().join("safenode2"), + log_dir_path: node_logs_dir.to_path_buf().join("antnode2"), log_format: None, max_archived_log_files: None, max_log_files: None, metrics_port: None, - name: "safenode2".to_string(), + name: "antnode2".to_string(), node_ip: None, node_port: None, rewards_address: RewardsAddress::from_str("0x03B770D9cD32077cC0bF330c13C114a87643B124")?, rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8083), owner: None, - safenode_path: node_data_dir + antnode_path: node_data_dir .to_path_buf() - .join("safenode2") - .join(SAFENODE_FILE_NAME), + .join("antnode2") + .join(ANTNODE_FILE_NAME), service_user: Some(get_username()), upnp: false, } @@ -1175,7 +1175,7 @@ async fn add_new_node_should_add_another_service() -> Result<()> { auto_set_nat_flags: false, bootstrap_peers: vec![], count: None, - delete_safenode_src: true, + delete_antnode_src: true, enable_metrics_server: false, env_variables: None, genesis: false, @@ -1190,8 +1190,8 @@ async fn add_new_node_should_add_another_service() -> Result<()> { node_port: None, rpc_address: None, rpc_port: None, - safenode_src_path: safenode_download_path.to_path_buf(), - safenode_dir_path: temp_dir.to_path_buf(), + antnode_src_path: antnode_download_path.to_path_buf(), + antnode_dir_path: temp_dir.to_path_buf(), service_data_dir_path: node_data_dir.to_path_buf(), service_log_dir_path: node_logs_dir.to_path_buf(), upnp: false, @@ -1219,7 +1219,7 @@ async fn add_new_node_should_add_another_service() -> Result<()> { assert_eq!(node_registry.nodes.len(), 2); assert_eq!(node_registry.nodes[1].version, latest_version); - assert_eq!(node_registry.nodes[1].service_name, "safenode2"); + assert_eq!(node_registry.nodes[1].service_name, "antnode2"); assert_eq!(node_registry.nodes[1].user, Some(get_username())); assert_eq!(node_registry.nodes[1].number, 2); assert_eq!( @@ -1228,11 +1228,11 @@ async fn add_new_node_should_add_another_service() -> Result<()> { ); assert_eq!( node_registry.nodes[1].log_dir_path, - node_logs_dir.to_path_buf().join("safenode2") + node_logs_dir.to_path_buf().join("antnode2") ); assert_eq!( node_registry.nodes[1].data_dir_path, - node_data_dir.to_path_buf().join("safenode2") + node_data_dir.to_path_buf().join("antnode2") ); assert_matches!(node_registry.nodes[0].status, ServiceStatus::Added); assert!(!node_registry.nodes[0].auto_restart); @@ -1263,8 +1263,8 @@ async fn add_node_should_use_custom_ip() -> Result<()> { node_data_dir.create_dir_all()?; let node_logs_dir = temp_dir.child("logs"); node_logs_dir.create_dir_all()?; - let safenode_download_path = temp_dir.child(SAFENODE_FILE_NAME); - safenode_download_path.write_binary(b"fake safenode bin")?; + let antnode_download_path = temp_dir.child(ANTNODE_FILE_NAME); + antnode_download_path.write_binary(b"fake antnode bin")?; let custom_ip = Ipv4Addr::new(192, 168, 1, 1); @@ -1288,7 +1288,7 @@ async fn add_node_should_use_custom_ip() -> Result<()> { OsString::from( node_data_dir .to_path_buf() - .join("safenode1") + .join("antnode1") .to_string_lossy() .to_string(), ), @@ -1296,7 +1296,7 @@ async fn add_node_should_use_custom_ip() -> Result<()> { OsString::from( node_logs_dir .to_path_buf() - .join("safenode1") + .join("antnode1") .to_string_lossy() .to_string(), ), @@ -1315,11 +1315,11 @@ async fn add_node_should_use_custom_ip() -> Result<()> { autostart: false, contents: None, environment: None, - label: "safenode1".parse()?, + label: "antnode1".parse()?, program: node_data_dir .to_path_buf() - .join("safenode1") - .join(SAFENODE_FILE_NAME), + .join("antnode1") + .join(ANTNODE_FILE_NAME), username: Some(get_username()), working_directory: None, }), @@ -1334,7 +1334,7 @@ async fn add_node_should_use_custom_ip() -> Result<()> { auto_set_nat_flags: false, bootstrap_peers: vec![], count: None, - delete_safenode_src: true, + delete_antnode_src: true, enable_metrics_server: false, env_variables: None, genesis: false, @@ -1349,8 +1349,8 @@ async fn add_node_should_use_custom_ip() -> Result<()> { node_port: None, rpc_address: None, rpc_port: None, - safenode_dir_path: temp_dir.to_path_buf(), - safenode_src_path: safenode_download_path.to_path_buf(), + antnode_dir_path: temp_dir.to_path_buf(), + antnode_src_path: antnode_download_path.to_path_buf(), service_data_dir_path: node_data_dir.to_path_buf(), service_log_dir_path: node_logs_dir.to_path_buf(), upnp: false, @@ -1376,7 +1376,7 @@ async fn add_node_should_use_custom_ip() -> Result<()> { ) .await?; - safenode_download_path.assert(predicate::path::missing()); + antnode_download_path.assert(predicate::path::missing()); node_data_dir.assert(predicate::path::is_dir()); node_logs_dir.assert(predicate::path::is_dir()); @@ -1409,8 +1409,8 @@ async fn add_node_should_use_custom_ports_for_one_service() -> Result<()> { node_data_dir.create_dir_all()?; let node_logs_dir = temp_dir.child("logs"); node_logs_dir.create_dir_all()?; - let safenode_download_path = temp_dir.child(SAFENODE_FILE_NAME); - safenode_download_path.write_binary(b"fake safenode bin")?; + let antnode_download_path = temp_dir.child(ANTNODE_FILE_NAME); + antnode_download_path.write_binary(b"fake antnode bin")?; let custom_port = 12000; @@ -1424,7 +1424,7 @@ async fn add_node_should_use_custom_ports_for_one_service() -> Result<()> { let install_ctx = InstallNodeServiceCtxBuilder { autostart: false, bootstrap_peers: vec![], - data_dir_path: node_data_dir.to_path_buf().join("safenode1"), + data_dir_path: node_data_dir.to_path_buf().join("antnode1"), env_variables: None, evm_network: EvmNetwork::Custom(CustomNetwork { rpc_url_http: "http://localhost:8545".parse()?, @@ -1438,21 +1438,21 @@ async fn add_node_should_use_custom_ports_for_one_service() -> Result<()> { genesis: false, home_network: false, local: false, - log_dir_path: node_logs_dir.to_path_buf().join("safenode1"), + log_dir_path: node_logs_dir.to_path_buf().join("antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, metrics_port: None, - name: "safenode1".to_string(), + name: "antnode1".to_string(), node_ip: None, node_port: Some(custom_port), owner: None, rewards_address: RewardsAddress::from_str("0x03B770D9cD32077cC0bF330c13C114a87643B124")?, rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 12001), - safenode_path: node_data_dir + antnode_path: node_data_dir .to_path_buf() - .join("safenode1") - .join(SAFENODE_FILE_NAME), + .join("antnode1") + .join(ANTNODE_FILE_NAME), service_user: Some(get_username()), upnp: false, } @@ -1471,7 +1471,7 @@ async fn add_node_should_use_custom_ports_for_one_service() -> Result<()> { auto_set_nat_flags: false, bootstrap_peers: vec![], count: None, - delete_safenode_src: true, + delete_antnode_src: true, enable_metrics_server: false, env_variables: None, genesis: false, @@ -1486,8 +1486,8 @@ async fn add_node_should_use_custom_ports_for_one_service() -> Result<()> { node_port: Some(PortRange::Single(custom_port)), rpc_address: None, rpc_port: None, - safenode_dir_path: temp_dir.to_path_buf(), - safenode_src_path: safenode_download_path.to_path_buf(), + antnode_dir_path: temp_dir.to_path_buf(), + antnode_src_path: antnode_download_path.to_path_buf(), service_data_dir_path: node_data_dir.to_path_buf(), service_log_dir_path: node_logs_dir.to_path_buf(), upnp: false, @@ -1513,7 +1513,7 @@ async fn add_node_should_use_custom_ports_for_one_service() -> Result<()> { ) .await?; - safenode_download_path.assert(predicate::path::missing()); + antnode_download_path.assert(predicate::path::missing()); node_data_dir.assert(predicate::path::is_dir()); node_logs_dir.assert(predicate::path::is_dir()); @@ -1546,8 +1546,8 @@ async fn add_node_should_use_a_custom_port_range() -> Result<()> { node_data_dir.create_dir_all()?; let node_logs_dir = temp_dir.child("logs"); node_logs_dir.create_dir_all()?; - let safenode_download_path = temp_dir.child(SAFENODE_FILE_NAME); - safenode_download_path.write_binary(b"fake safenode bin")?; + let antnode_download_path = temp_dir.child(ANTNODE_FILE_NAME); + antnode_download_path.write_binary(b"fake antnode bin")?; let mut seq = Sequence::new(); @@ -1569,7 +1569,7 @@ async fn add_node_should_use_a_custom_port_range() -> Result<()> { OsString::from( node_data_dir .to_path_buf() - .join("safenode1") + .join("antnode1") .to_string_lossy() .to_string(), ), @@ -1577,7 +1577,7 @@ async fn add_node_should_use_a_custom_port_range() -> Result<()> { OsString::from( node_logs_dir .to_path_buf() - .join("safenode1") + .join("antnode1") .to_string_lossy() .to_string(), ), @@ -1596,11 +1596,11 @@ async fn add_node_should_use_a_custom_port_range() -> Result<()> { autostart: false, contents: None, environment: None, - label: "safenode1".parse()?, + label: "antnode1".parse()?, program: node_data_dir .to_path_buf() - .join("safenode1") - .join(SAFENODE_FILE_NAME), + .join("antnode1") + .join(ANTNODE_FILE_NAME), username: Some(get_username()), working_directory: None, }), @@ -1627,7 +1627,7 @@ async fn add_node_should_use_a_custom_port_range() -> Result<()> { OsString::from( node_data_dir .to_path_buf() - .join("safenode2") + .join("antnode2") .to_string_lossy() .to_string(), ), @@ -1635,7 +1635,7 @@ async fn add_node_should_use_a_custom_port_range() -> Result<()> { OsString::from( node_logs_dir .to_path_buf() - .join("safenode2") + .join("antnode2") .to_string_lossy() .to_string(), ), @@ -1654,11 +1654,11 @@ async fn add_node_should_use_a_custom_port_range() -> Result<()> { autostart: false, contents: None, environment: None, - label: "safenode2".parse()?, + label: "antnode2".parse()?, program: node_data_dir .to_path_buf() - .join("safenode2") - .join(SAFENODE_FILE_NAME), + .join("antnode2") + .join(ANTNODE_FILE_NAME), username: Some(get_username()), working_directory: None, }), @@ -1685,7 +1685,7 @@ async fn add_node_should_use_a_custom_port_range() -> Result<()> { OsString::from( node_data_dir .to_path_buf() - .join("safenode3") + .join("antnode3") .to_string_lossy() .to_string(), ), @@ -1693,7 +1693,7 @@ async fn add_node_should_use_a_custom_port_range() -> Result<()> { OsString::from( node_logs_dir .to_path_buf() - .join("safenode3") + .join("antnode3") .to_string_lossy() .to_string(), ), @@ -1712,11 +1712,11 @@ async fn add_node_should_use_a_custom_port_range() -> Result<()> { autostart: false, contents: None, environment: None, - label: "safenode3".parse()?, + label: "antnode3".parse()?, program: node_data_dir .to_path_buf() - .join("safenode3") - .join(SAFENODE_FILE_NAME), + .join("antnode3") + .join(ANTNODE_FILE_NAME), username: Some(get_username()), working_directory: None, }), @@ -1731,7 +1731,7 @@ async fn add_node_should_use_a_custom_port_range() -> Result<()> { auto_set_nat_flags: false, bootstrap_peers: vec![], count: Some(3), - delete_safenode_src: true, + delete_antnode_src: true, enable_metrics_server: false, env_variables: None, genesis: false, @@ -1746,8 +1746,8 @@ async fn add_node_should_use_a_custom_port_range() -> Result<()> { node_port: Some(PortRange::Range(12000, 12002)), rpc_address: None, rpc_port: None, - safenode_dir_path: temp_dir.to_path_buf(), - safenode_src_path: safenode_download_path.to_path_buf(), + antnode_dir_path: temp_dir.to_path_buf(), + antnode_src_path: antnode_download_path.to_path_buf(), service_data_dir_path: node_data_dir.to_path_buf(), service_log_dir_path: node_logs_dir.to_path_buf(), upnp: false, @@ -1773,7 +1773,7 @@ async fn add_node_should_use_a_custom_port_range() -> Result<()> { ) .await?; - safenode_download_path.assert(predicate::path::missing()); + antnode_download_path.assert(predicate::path::missing()); node_data_dir.assert(predicate::path::is_dir()); node_logs_dir.assert(predicate::path::is_dir()); assert_eq!(node_registry.nodes.len(), 3); @@ -1797,7 +1797,7 @@ async fn add_node_should_return_an_error_if_duplicate_custom_port_is_used() -> R nodes: vec![NodeServiceData { auto_restart: false, connected_peers: None, - data_dir_path: PathBuf::from("/var/safenode-manager/services/safenode1"), + data_dir_path: PathBuf::from("/var/antctl/services/antnode1"), evm_network: EvmNetwork::Custom(CustomNetwork { rpc_url_http: "http://localhost:8545".parse()?, payment_token_address: RewardsAddress::from_str( @@ -1812,7 +1812,7 @@ async fn add_node_should_return_an_error_if_duplicate_custom_port_is_used() -> R listen_addr: None, local: false, log_format: None, - log_dir_path: PathBuf::from("/var/log/safenode/safenode1"), + log_dir_path: PathBuf::from("/var/log/antnode/antnode1"), max_archived_log_files: None, max_log_files: None, metrics_port: None, @@ -1827,8 +1827,8 @@ async fn add_node_should_return_an_error_if_duplicate_custom_port_is_used() -> R )?, reward_balance: Some(AttoTokens::zero()), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: PathBuf::from("/var/safenode-manager/services/safenode1/safenode"), - service_name: "safenode1".to_string(), + antnode_path: PathBuf::from("/var/antctl/services/antnode1/antnode"), + service_name: "antnode1".to_string(), status: ServiceStatus::Added, upnp: false, user: Some("safe".to_string()), @@ -1845,8 +1845,8 @@ async fn add_node_should_return_an_error_if_duplicate_custom_port_is_used() -> R node_data_dir.create_dir_all()?; let node_logs_dir = temp_dir.child("logs"); node_logs_dir.create_dir_all()?; - let safenode_download_path = temp_dir.child(SAFENODE_FILE_NAME); - safenode_download_path.write_binary(b"fake safenode bin")?; + let antnode_download_path = temp_dir.child(ANTNODE_FILE_NAME); + antnode_download_path.write_binary(b"fake antnode bin")?; let result = add_node( AddNodeServiceOptions { @@ -1854,7 +1854,7 @@ async fn add_node_should_return_an_error_if_duplicate_custom_port_is_used() -> R auto_set_nat_flags: false, bootstrap_peers: vec![], count: None, - delete_safenode_src: true, + delete_antnode_src: true, enable_metrics_server: false, env_variables: None, genesis: false, @@ -1869,8 +1869,8 @@ async fn add_node_should_return_an_error_if_duplicate_custom_port_is_used() -> R node_port: Some(PortRange::Single(12000)), rpc_address: None, rpc_port: None, - safenode_dir_path: temp_dir.to_path_buf(), - safenode_src_path: safenode_download_path.to_path_buf(), + antnode_dir_path: temp_dir.to_path_buf(), + antnode_src_path: antnode_download_path.to_path_buf(), service_data_dir_path: node_data_dir.to_path_buf(), service_log_dir_path: node_logs_dir.to_path_buf(), upnp: false, @@ -1918,7 +1918,7 @@ async fn add_node_should_return_an_error_if_duplicate_custom_port_in_range_is_us nodes: vec![NodeServiceData { auto_restart: false, connected_peers: None, - data_dir_path: PathBuf::from("/var/safenode-manager/services/safenode1"), + data_dir_path: PathBuf::from("/var/antctl/services/antnode1"), evm_network: EvmNetwork::Custom(CustomNetwork { rpc_url_http: "http://localhost:8545".parse()?, payment_token_address: RewardsAddress::from_str( @@ -1933,7 +1933,7 @@ async fn add_node_should_return_an_error_if_duplicate_custom_port_in_range_is_us listen_addr: None, local: false, log_format: None, - log_dir_path: PathBuf::from("/var/log/safenode/safenode1"), + log_dir_path: PathBuf::from("/var/log/antnode/antnode1"), max_archived_log_files: None, max_log_files: None, metrics_port: None, @@ -1948,8 +1948,8 @@ async fn add_node_should_return_an_error_if_duplicate_custom_port_in_range_is_us )?, reward_balance: Some(AttoTokens::zero()), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: PathBuf::from("/var/safenode-manager/services/safenode1/safenode"), - service_name: "safenode1".to_string(), + antnode_path: PathBuf::from("/var/antctl/services/antnode1/antnode"), + service_name: "antnode1".to_string(), status: ServiceStatus::Added, upnp: false, user: Some("safe".to_string()), @@ -1966,8 +1966,8 @@ async fn add_node_should_return_an_error_if_duplicate_custom_port_in_range_is_us node_data_dir.create_dir_all()?; let node_logs_dir = temp_dir.child("logs"); node_logs_dir.create_dir_all()?; - let safenode_download_path = temp_dir.child(SAFENODE_FILE_NAME); - safenode_download_path.write_binary(b"fake safenode bin")?; + let antnode_download_path = temp_dir.child(ANTNODE_FILE_NAME); + antnode_download_path.write_binary(b"fake antnode bin")?; let result = add_node( AddNodeServiceOptions { @@ -1975,7 +1975,7 @@ async fn add_node_should_return_an_error_if_duplicate_custom_port_in_range_is_us auto_set_nat_flags: false, bootstrap_peers: vec![], count: Some(3), - delete_safenode_src: true, + delete_antnode_src: true, enable_metrics_server: false, env_variables: None, genesis: false, @@ -1990,8 +1990,8 @@ async fn add_node_should_return_an_error_if_duplicate_custom_port_in_range_is_us node_port: Some(PortRange::Range(12000, 12002)), rpc_address: None, rpc_port: None, - safenode_dir_path: temp_dir.to_path_buf(), - safenode_src_path: safenode_download_path.to_path_buf(), + antnode_dir_path: temp_dir.to_path_buf(), + antnode_src_path: antnode_download_path.to_path_buf(), service_data_dir_path: node_data_dir.to_path_buf(), service_log_dir_path: node_logs_dir.to_path_buf(), upnp: false, @@ -2047,8 +2047,8 @@ async fn add_node_should_return_an_error_if_port_and_node_count_do_not_match() - node_data_dir.create_dir_all()?; let node_logs_dir = temp_dir.child("logs"); node_logs_dir.create_dir_all()?; - let safenode_download_path = temp_dir.child(SAFENODE_FILE_NAME); - safenode_download_path.write_binary(b"fake safenode bin")?; + let antnode_download_path = temp_dir.child(ANTNODE_FILE_NAME); + antnode_download_path.write_binary(b"fake antnode bin")?; let result = add_node( AddNodeServiceOptions { @@ -2056,7 +2056,7 @@ async fn add_node_should_return_an_error_if_port_and_node_count_do_not_match() - auto_set_nat_flags: false, bootstrap_peers: vec![], count: Some(2), - delete_safenode_src: true, + delete_antnode_src: true, enable_metrics_server: false, env_variables: None, genesis: false, @@ -2071,8 +2071,8 @@ async fn add_node_should_return_an_error_if_port_and_node_count_do_not_match() - node_port: Some(PortRange::Range(12000, 12002)), rpc_address: None, rpc_port: None, - safenode_src_path: safenode_download_path.to_path_buf(), - safenode_dir_path: temp_dir.to_path_buf(), + antnode_src_path: antnode_download_path.to_path_buf(), + antnode_dir_path: temp_dir.to_path_buf(), service_data_dir_path: node_data_dir.to_path_buf(), service_log_dir_path: node_logs_dir.to_path_buf(), upnp: false, @@ -2133,8 +2133,8 @@ async fn add_node_should_return_an_error_if_multiple_services_are_specified_with node_data_dir.create_dir_all()?; let node_logs_dir = temp_dir.child("logs"); node_logs_dir.create_dir_all()?; - let safenode_download_path = temp_dir.child(SAFENODE_FILE_NAME); - safenode_download_path.write_binary(b"fake safenode bin")?; + let antnode_download_path = temp_dir.child(ANTNODE_FILE_NAME); + antnode_download_path.write_binary(b"fake antnode bin")?; let result = add_node( AddNodeServiceOptions { @@ -2142,7 +2142,7 @@ async fn add_node_should_return_an_error_if_multiple_services_are_specified_with auto_set_nat_flags: false, bootstrap_peers: vec![], count: Some(2), - delete_safenode_src: true, + delete_antnode_src: true, enable_metrics_server: false, env_variables: None, genesis: false, @@ -2157,8 +2157,8 @@ async fn add_node_should_return_an_error_if_multiple_services_are_specified_with node_port: Some(PortRange::Single(12000)), rpc_address: None, rpc_port: None, - safenode_dir_path: temp_dir.to_path_buf(), - safenode_src_path: safenode_download_path.to_path_buf(), + antnode_dir_path: temp_dir.to_path_buf(), + antnode_src_path: antnode_download_path.to_path_buf(), service_data_dir_path: node_data_dir.to_path_buf(), service_log_dir_path: node_logs_dir.to_path_buf(), upnp: false, @@ -2220,8 +2220,8 @@ async fn add_node_should_set_random_ports_if_enable_metrics_server_is_true() -> node_data_dir.create_dir_all()?; let node_logs_dir = temp_dir.child("logs"); node_logs_dir.create_dir_all()?; - let safenode_download_path = temp_dir.child(SAFENODE_FILE_NAME); - safenode_download_path.write_binary(b"fake safenode bin")?; + let antnode_download_path = temp_dir.child(ANTNODE_FILE_NAME); + antnode_download_path.write_binary(b"fake antnode bin")?; let mut seq = Sequence::new(); @@ -2244,7 +2244,7 @@ async fn add_node_should_set_random_ports_if_enable_metrics_server_is_true() -> OsString::from( node_data_dir .to_path_buf() - .join("safenode1") + .join("antnode1") .to_string_lossy() .to_string(), ), @@ -2252,7 +2252,7 @@ async fn add_node_should_set_random_ports_if_enable_metrics_server_is_true() -> OsString::from( node_logs_dir .to_path_buf() - .join("safenode1") + .join("antnode1") .to_string_lossy() .to_string(), ), @@ -2271,11 +2271,11 @@ async fn add_node_should_set_random_ports_if_enable_metrics_server_is_true() -> autostart: false, contents: None, environment: None, - label: "safenode1".parse()?, + label: "antnode1".parse()?, program: node_data_dir .to_path_buf() - .join("safenode1") - .join(SAFENODE_FILE_NAME), + .join("antnode1") + .join(ANTNODE_FILE_NAME), username: Some(get_username()), working_directory: None, }), @@ -2290,7 +2290,7 @@ async fn add_node_should_set_random_ports_if_enable_metrics_server_is_true() -> auto_set_nat_flags: false, bootstrap_peers: vec![], count: None, - delete_safenode_src: true, + delete_antnode_src: true, enable_metrics_server: true, env_variables: None, genesis: false, @@ -2305,8 +2305,8 @@ async fn add_node_should_set_random_ports_if_enable_metrics_server_is_true() -> node_port: None, rpc_address: None, rpc_port: None, - safenode_dir_path: temp_dir.to_path_buf(), - safenode_src_path: safenode_download_path.to_path_buf(), + antnode_dir_path: temp_dir.to_path_buf(), + antnode_src_path: antnode_download_path.to_path_buf(), service_data_dir_path: node_data_dir.to_path_buf(), service_log_dir_path: node_logs_dir.to_path_buf(), upnp: false, @@ -2360,8 +2360,8 @@ async fn add_node_should_set_max_archived_log_files() -> Result<()> { node_data_dir.create_dir_all()?; let node_logs_dir = temp_dir.child("logs"); node_logs_dir.create_dir_all()?; - let safenode_download_path = temp_dir.child(SAFENODE_FILE_NAME); - safenode_download_path.write_binary(b"fake safenode bin")?; + let antnode_download_path = temp_dir.child(ANTNODE_FILE_NAME); + antnode_download_path.write_binary(b"fake antnode bin")?; let mut seq = Sequence::new(); @@ -2384,7 +2384,7 @@ async fn add_node_should_set_max_archived_log_files() -> Result<()> { OsString::from( node_data_dir .to_path_buf() - .join("safenode1") + .join("antnode1") .to_string_lossy() .to_string(), ), @@ -2392,7 +2392,7 @@ async fn add_node_should_set_max_archived_log_files() -> Result<()> { OsString::from( node_logs_dir .to_path_buf() - .join("safenode1") + .join("antnode1") .to_string_lossy() .to_string(), ), @@ -2411,11 +2411,11 @@ async fn add_node_should_set_max_archived_log_files() -> Result<()> { autostart: false, contents: None, environment: None, - label: "safenode1".parse()?, + label: "antnode1".parse()?, program: node_data_dir .to_path_buf() - .join("safenode1") - .join(SAFENODE_FILE_NAME), + .join("antnode1") + .join(ANTNODE_FILE_NAME), username: Some(get_username()), working_directory: None, }), @@ -2430,7 +2430,7 @@ async fn add_node_should_set_max_archived_log_files() -> Result<()> { auto_set_nat_flags: false, bootstrap_peers: vec![], count: Some(1), - delete_safenode_src: false, + delete_antnode_src: false, enable_metrics_server: false, env_variables: None, genesis: false, @@ -2445,8 +2445,8 @@ async fn add_node_should_set_max_archived_log_files() -> Result<()> { node_port: None, rpc_address: None, rpc_port: None, - safenode_dir_path: temp_dir.to_path_buf(), - safenode_src_path: safenode_download_path.to_path_buf(), + antnode_dir_path: temp_dir.to_path_buf(), + antnode_src_path: antnode_download_path.to_path_buf(), service_data_dir_path: node_data_dir.to_path_buf(), service_log_dir_path: node_logs_dir.to_path_buf(), upnp: false, @@ -2501,8 +2501,8 @@ async fn add_node_should_set_max_log_files() -> Result<()> { node_data_dir.create_dir_all()?; let node_logs_dir = temp_dir.child("logs"); node_logs_dir.create_dir_all()?; - let safenode_download_path = temp_dir.child(SAFENODE_FILE_NAME); - safenode_download_path.write_binary(b"fake safenode bin")?; + let antnode_download_path = temp_dir.child(ANTNODE_FILE_NAME); + antnode_download_path.write_binary(b"fake antnode bin")?; let mut seq = Sequence::new(); @@ -2525,7 +2525,7 @@ async fn add_node_should_set_max_log_files() -> Result<()> { OsString::from( node_data_dir .to_path_buf() - .join("safenode1") + .join("antnode1") .to_string_lossy() .to_string(), ), @@ -2533,7 +2533,7 @@ async fn add_node_should_set_max_log_files() -> Result<()> { OsString::from( node_logs_dir .to_path_buf() - .join("safenode1") + .join("antnode1") .to_string_lossy() .to_string(), ), @@ -2552,11 +2552,11 @@ async fn add_node_should_set_max_log_files() -> Result<()> { autostart: false, contents: None, environment: None, - label: "safenode1".parse()?, + label: "antnode1".parse()?, program: node_data_dir .to_path_buf() - .join("safenode1") - .join(SAFENODE_FILE_NAME), + .join("antnode1") + .join(ANTNODE_FILE_NAME), username: Some(get_username()), working_directory: None, }), @@ -2571,7 +2571,7 @@ async fn add_node_should_set_max_log_files() -> Result<()> { auto_set_nat_flags: false, bootstrap_peers: vec![], count: Some(1), - delete_safenode_src: false, + delete_antnode_src: false, enable_metrics_server: false, env_variables: None, genesis: false, @@ -2586,8 +2586,8 @@ async fn add_node_should_set_max_log_files() -> Result<()> { node_port: None, rpc_address: None, rpc_port: None, - safenode_dir_path: temp_dir.to_path_buf(), - safenode_src_path: safenode_download_path.to_path_buf(), + antnode_dir_path: temp_dir.to_path_buf(), + antnode_src_path: antnode_download_path.to_path_buf(), service_data_dir_path: node_data_dir.to_path_buf(), service_log_dir_path: node_logs_dir.to_path_buf(), upnp: false, @@ -2641,8 +2641,8 @@ async fn add_node_should_use_a_custom_port_range_for_metrics_server() -> Result< node_data_dir.create_dir_all()?; let node_logs_dir = temp_dir.child("logs"); node_logs_dir.create_dir_all()?; - let safenode_download_path = temp_dir.child(SAFENODE_FILE_NAME); - safenode_download_path.write_binary(b"fake safenode bin")?; + let antnode_download_path = temp_dir.child(ANTNODE_FILE_NAME); + antnode_download_path.write_binary(b"fake antnode bin")?; let mut seq = Sequence::new(); @@ -2664,7 +2664,7 @@ async fn add_node_should_use_a_custom_port_range_for_metrics_server() -> Result< OsString::from( node_data_dir .to_path_buf() - .join("safenode1") + .join("antnode1") .to_string_lossy() .to_string(), ), @@ -2672,7 +2672,7 @@ async fn add_node_should_use_a_custom_port_range_for_metrics_server() -> Result< OsString::from( node_logs_dir .to_path_buf() - .join("safenode1") + .join("antnode1") .to_string_lossy() .to_string(), ), @@ -2691,11 +2691,11 @@ async fn add_node_should_use_a_custom_port_range_for_metrics_server() -> Result< autostart: false, contents: None, environment: None, - label: "safenode1".parse()?, + label: "antnode1".parse()?, program: node_data_dir .to_path_buf() - .join("safenode1") - .join(SAFENODE_FILE_NAME), + .join("antnode1") + .join(ANTNODE_FILE_NAME), username: Some(get_username()), working_directory: None, }), @@ -2722,7 +2722,7 @@ async fn add_node_should_use_a_custom_port_range_for_metrics_server() -> Result< OsString::from( node_data_dir .to_path_buf() - .join("safenode2") + .join("antnode2") .to_string_lossy() .to_string(), ), @@ -2730,7 +2730,7 @@ async fn add_node_should_use_a_custom_port_range_for_metrics_server() -> Result< OsString::from( node_logs_dir .to_path_buf() - .join("safenode2") + .join("antnode2") .to_string_lossy() .to_string(), ), @@ -2749,11 +2749,11 @@ async fn add_node_should_use_a_custom_port_range_for_metrics_server() -> Result< autostart: false, contents: None, environment: None, - label: "safenode2".parse()?, + label: "antnode2".parse()?, program: node_data_dir .to_path_buf() - .join("safenode2") - .join(SAFENODE_FILE_NAME), + .join("antnode2") + .join(ANTNODE_FILE_NAME), username: Some(get_username()), working_directory: None, }), @@ -2780,7 +2780,7 @@ async fn add_node_should_use_a_custom_port_range_for_metrics_server() -> Result< OsString::from( node_data_dir .to_path_buf() - .join("safenode3") + .join("antnode3") .to_string_lossy() .to_string(), ), @@ -2788,7 +2788,7 @@ async fn add_node_should_use_a_custom_port_range_for_metrics_server() -> Result< OsString::from( node_logs_dir .to_path_buf() - .join("safenode3") + .join("antnode3") .to_string_lossy() .to_string(), ), @@ -2807,11 +2807,11 @@ async fn add_node_should_use_a_custom_port_range_for_metrics_server() -> Result< autostart: false, contents: None, environment: None, - label: "safenode3".parse()?, + label: "antnode3".parse()?, program: node_data_dir .to_path_buf() - .join("safenode3") - .join(SAFENODE_FILE_NAME), + .join("antnode3") + .join(ANTNODE_FILE_NAME), username: Some(get_username()), working_directory: None, }), @@ -2826,7 +2826,7 @@ async fn add_node_should_use_a_custom_port_range_for_metrics_server() -> Result< auto_set_nat_flags: false, bootstrap_peers: vec![], count: Some(3), - delete_safenode_src: true, + delete_antnode_src: true, enable_metrics_server: false, env_variables: None, genesis: false, @@ -2841,8 +2841,8 @@ async fn add_node_should_use_a_custom_port_range_for_metrics_server() -> Result< node_port: None, rpc_address: None, rpc_port: None, - safenode_dir_path: temp_dir.to_path_buf(), - safenode_src_path: safenode_download_path.to_path_buf(), + antnode_dir_path: temp_dir.to_path_buf(), + antnode_src_path: antnode_download_path.to_path_buf(), service_data_dir_path: node_data_dir.to_path_buf(), service_log_dir_path: node_logs_dir.to_path_buf(), upnp: false, @@ -2889,7 +2889,7 @@ async fn add_node_should_return_an_error_if_duplicate_custom_metrics_port_is_use nodes: vec![NodeServiceData { auto_restart: false, connected_peers: None, - data_dir_path: PathBuf::from("/var/safenode-manager/services/safenode1"), + data_dir_path: PathBuf::from("/var/antctl/services/antnode1"), evm_network: EvmNetwork::Custom(CustomNetwork { rpc_url_http: "http://localhost:8545".parse()?, payment_token_address: RewardsAddress::from_str( @@ -2903,7 +2903,7 @@ async fn add_node_should_return_an_error_if_duplicate_custom_metrics_port_is_use home_network: false, listen_addr: None, local: false, - log_dir_path: PathBuf::from("/var/log/safenode/safenode1"), + log_dir_path: PathBuf::from("/var/log/antnode/antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, @@ -2919,8 +2919,8 @@ async fn add_node_should_return_an_error_if_duplicate_custom_metrics_port_is_use )?, reward_balance: Some(AttoTokens::zero()), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: PathBuf::from("/var/safenode-manager/services/safenode1/safenode"), - service_name: "safenode1".to_string(), + antnode_path: PathBuf::from("/var/antctl/services/antnode1/antnode"), + service_name: "antnode1".to_string(), status: ServiceStatus::Added, upnp: false, user: Some("safe".to_string()), @@ -2937,8 +2937,8 @@ async fn add_node_should_return_an_error_if_duplicate_custom_metrics_port_is_use node_data_dir.create_dir_all()?; let node_logs_dir = temp_dir.child("logs"); node_logs_dir.create_dir_all()?; - let safenode_download_path = temp_dir.child(SAFENODE_FILE_NAME); - safenode_download_path.write_binary(b"fake safenode bin")?; + let antnode_download_path = temp_dir.child(ANTNODE_FILE_NAME); + antnode_download_path.write_binary(b"fake antnode bin")?; let result = add_node( AddNodeServiceOptions { @@ -2946,7 +2946,7 @@ async fn add_node_should_return_an_error_if_duplicate_custom_metrics_port_is_use auto_set_nat_flags: false, bootstrap_peers: vec![], count: None, - delete_safenode_src: true, + delete_antnode_src: true, enable_metrics_server: false, env_variables: None, genesis: false, @@ -2961,8 +2961,8 @@ async fn add_node_should_return_an_error_if_duplicate_custom_metrics_port_is_use node_port: None, rpc_address: None, rpc_port: None, - safenode_dir_path: temp_dir.to_path_buf(), - safenode_src_path: safenode_download_path.to_path_buf(), + antnode_dir_path: temp_dir.to_path_buf(), + antnode_src_path: antnode_download_path.to_path_buf(), service_data_dir_path: node_data_dir.to_path_buf(), service_log_dir_path: node_logs_dir.to_path_buf(), upnp: false, @@ -3011,7 +3011,7 @@ async fn add_node_should_return_an_error_if_duplicate_custom_metrics_port_in_ran nodes: vec![NodeServiceData { auto_restart: false, connected_peers: None, - data_dir_path: PathBuf::from("/var/safenode-manager/services/safenode1"), + data_dir_path: PathBuf::from("/var/antctl/services/antnode1"), evm_network: EvmNetwork::Custom(CustomNetwork { rpc_url_http: "http://localhost:8545".parse()?, payment_token_address: RewardsAddress::from_str( @@ -3025,7 +3025,7 @@ async fn add_node_should_return_an_error_if_duplicate_custom_metrics_port_in_ran home_network: false, listen_addr: None, local: false, - log_dir_path: PathBuf::from("/var/log/safenode/safenode1"), + log_dir_path: PathBuf::from("/var/log/antnode/antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, @@ -3041,8 +3041,8 @@ async fn add_node_should_return_an_error_if_duplicate_custom_metrics_port_in_ran )?, reward_balance: Some(AttoTokens::zero()), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: PathBuf::from("/var/safenode-manager/services/safenode1/safenode"), - service_name: "safenode1".to_string(), + antnode_path: PathBuf::from("/var/antctl/services/antnode1/antnode"), + service_name: "antnode1".to_string(), status: ServiceStatus::Added, upnp: false, user: Some("safe".to_string()), @@ -3059,8 +3059,8 @@ async fn add_node_should_return_an_error_if_duplicate_custom_metrics_port_in_ran node_data_dir.create_dir_all()?; let node_logs_dir = temp_dir.child("logs"); node_logs_dir.create_dir_all()?; - let safenode_download_path = temp_dir.child(SAFENODE_FILE_NAME); - safenode_download_path.write_binary(b"fake safenode bin")?; + let antnode_download_path = temp_dir.child(ANTNODE_FILE_NAME); + antnode_download_path.write_binary(b"fake antnode bin")?; let result = add_node( AddNodeServiceOptions { @@ -3068,7 +3068,7 @@ async fn add_node_should_return_an_error_if_duplicate_custom_metrics_port_in_ran auto_set_nat_flags: false, bootstrap_peers: vec![], count: Some(3), - delete_safenode_src: true, + delete_antnode_src: true, enable_metrics_server: false, env_variables: None, genesis: false, @@ -3083,8 +3083,8 @@ async fn add_node_should_return_an_error_if_duplicate_custom_metrics_port_in_ran node_port: None, rpc_address: None, rpc_port: None, - safenode_dir_path: temp_dir.to_path_buf(), - safenode_src_path: safenode_download_path.to_path_buf(), + antnode_dir_path: temp_dir.to_path_buf(), + antnode_src_path: antnode_download_path.to_path_buf(), service_data_dir_path: node_data_dir.to_path_buf(), service_log_dir_path: node_logs_dir.to_path_buf(), upnp: false, @@ -3142,8 +3142,8 @@ async fn add_node_should_use_a_custom_port_range_for_the_rpc_server() -> Result< node_data_dir.create_dir_all()?; let node_logs_dir = temp_dir.child("logs"); node_logs_dir.create_dir_all()?; - let safenode_download_path = temp_dir.child(SAFENODE_FILE_NAME); - safenode_download_path.write_binary(b"fake safenode bin")?; + let antnode_download_path = temp_dir.child(ANTNODE_FILE_NAME); + antnode_download_path.write_binary(b"fake antnode bin")?; let mut seq = Sequence::new(); @@ -3160,7 +3160,7 @@ async fn add_node_should_use_a_custom_port_range_for_the_rpc_server() -> Result< OsString::from( node_data_dir .to_path_buf() - .join("safenode1") + .join("antnode1") .to_string_lossy() .to_string(), ), @@ -3168,7 +3168,7 @@ async fn add_node_should_use_a_custom_port_range_for_the_rpc_server() -> Result< OsString::from( node_logs_dir .to_path_buf() - .join("safenode1") + .join("antnode1") .to_string_lossy() .to_string(), ), @@ -3185,11 +3185,11 @@ async fn add_node_should_use_a_custom_port_range_for_the_rpc_server() -> Result< autostart: false, contents: None, environment: None, - label: "safenode1".parse()?, + label: "antnode1".parse()?, program: node_data_dir .to_path_buf() - .join("safenode1") - .join(SAFENODE_FILE_NAME), + .join("antnode1") + .join(ANTNODE_FILE_NAME), username: Some(get_username()), working_directory: None, }), @@ -3211,7 +3211,7 @@ async fn add_node_should_use_a_custom_port_range_for_the_rpc_server() -> Result< OsString::from( node_data_dir .to_path_buf() - .join("safenode2") + .join("antnode2") .to_string_lossy() .to_string(), ), @@ -3219,7 +3219,7 @@ async fn add_node_should_use_a_custom_port_range_for_the_rpc_server() -> Result< OsString::from( node_logs_dir .to_path_buf() - .join("safenode2") + .join("antnode2") .to_string_lossy() .to_string(), ), @@ -3236,11 +3236,11 @@ async fn add_node_should_use_a_custom_port_range_for_the_rpc_server() -> Result< autostart: false, contents: None, environment: None, - label: "safenode2".parse()?, + label: "antnode2".parse()?, program: node_data_dir .to_path_buf() - .join("safenode2") - .join(SAFENODE_FILE_NAME), + .join("antnode2") + .join(ANTNODE_FILE_NAME), username: Some(get_username()), working_directory: None, }), @@ -3262,7 +3262,7 @@ async fn add_node_should_use_a_custom_port_range_for_the_rpc_server() -> Result< OsString::from( node_data_dir .to_path_buf() - .join("safenode3") + .join("antnode3") .to_string_lossy() .to_string(), ), @@ -3270,7 +3270,7 @@ async fn add_node_should_use_a_custom_port_range_for_the_rpc_server() -> Result< OsString::from( node_logs_dir .to_path_buf() - .join("safenode3") + .join("antnode3") .to_string_lossy() .to_string(), ), @@ -3287,11 +3287,11 @@ async fn add_node_should_use_a_custom_port_range_for_the_rpc_server() -> Result< autostart: false, contents: None, environment: None, - label: "safenode3".parse()?, + label: "antnode3".parse()?, program: node_data_dir .to_path_buf() - .join("safenode3") - .join(SAFENODE_FILE_NAME), + .join("antnode3") + .join(ANTNODE_FILE_NAME), username: Some(get_username()), working_directory: None, }), @@ -3306,7 +3306,7 @@ async fn add_node_should_use_a_custom_port_range_for_the_rpc_server() -> Result< auto_set_nat_flags: false, bootstrap_peers: vec![], count: Some(3), - delete_safenode_src: true, + delete_antnode_src: true, enable_metrics_server: false, env_variables: None, genesis: false, @@ -3321,8 +3321,8 @@ async fn add_node_should_use_a_custom_port_range_for_the_rpc_server() -> Result< node_port: None, rpc_address: None, rpc_port: Some(PortRange::Range(20000, 20002)), - safenode_dir_path: temp_dir.to_path_buf(), - safenode_src_path: safenode_download_path.to_path_buf(), + antnode_dir_path: temp_dir.to_path_buf(), + antnode_src_path: antnode_download_path.to_path_buf(), service_data_dir_path: node_data_dir.to_path_buf(), service_log_dir_path: node_logs_dir.to_path_buf(), upnp: false, @@ -3348,7 +3348,7 @@ async fn add_node_should_use_a_custom_port_range_for_the_rpc_server() -> Result< ) .await?; - safenode_download_path.assert(predicate::path::missing()); + antnode_download_path.assert(predicate::path::missing()); node_data_dir.assert(predicate::path::is_dir()); node_logs_dir.assert(predicate::path::is_dir()); assert_eq!(node_registry.nodes.len(), 3); @@ -3380,7 +3380,7 @@ async fn add_node_should_return_an_error_if_duplicate_custom_rpc_port_is_used() nodes: vec![NodeServiceData { auto_restart: false, connected_peers: None, - data_dir_path: PathBuf::from("/var/safenode-manager/services/safenode1"), + data_dir_path: PathBuf::from("/var/antctl/services/antnode1"), evm_network: EvmNetwork::Custom(CustomNetwork { rpc_url_http: "http://localhost:8545".parse()?, payment_token_address: RewardsAddress::from_str( @@ -3394,7 +3394,7 @@ async fn add_node_should_return_an_error_if_duplicate_custom_rpc_port_is_used() home_network: false, listen_addr: None, local: false, - log_dir_path: PathBuf::from("/var/log/safenode/safenode1"), + log_dir_path: PathBuf::from("/var/log/antnode/antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, @@ -3410,8 +3410,8 @@ async fn add_node_should_return_an_error_if_duplicate_custom_rpc_port_is_used() )?, reward_balance: Some(AttoTokens::zero()), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: PathBuf::from("/var/safenode-manager/services/safenode1/safenode"), - service_name: "safenode1".to_string(), + antnode_path: PathBuf::from("/var/antctl/services/antnode1/antnode"), + service_name: "antnode1".to_string(), status: ServiceStatus::Added, upnp: false, user: Some("safe".to_string()), @@ -3428,8 +3428,8 @@ async fn add_node_should_return_an_error_if_duplicate_custom_rpc_port_is_used() node_data_dir.create_dir_all()?; let node_logs_dir = temp_dir.child("logs"); node_logs_dir.create_dir_all()?; - let safenode_download_path = temp_dir.child(SAFENODE_FILE_NAME); - safenode_download_path.write_binary(b"fake safenode bin")?; + let antnode_download_path = temp_dir.child(ANTNODE_FILE_NAME); + antnode_download_path.write_binary(b"fake antnode bin")?; let result = add_node( AddNodeServiceOptions { @@ -3437,7 +3437,7 @@ async fn add_node_should_return_an_error_if_duplicate_custom_rpc_port_is_used() auto_set_nat_flags: false, bootstrap_peers: vec![], count: None, - delete_safenode_src: true, + delete_antnode_src: true, enable_metrics_server: false, env_variables: None, genesis: false, @@ -3452,8 +3452,8 @@ async fn add_node_should_return_an_error_if_duplicate_custom_rpc_port_is_used() node_port: None, rpc_address: None, rpc_port: Some(PortRange::Single(8081)), - safenode_dir_path: temp_dir.to_path_buf(), - safenode_src_path: safenode_download_path.to_path_buf(), + antnode_dir_path: temp_dir.to_path_buf(), + antnode_src_path: antnode_download_path.to_path_buf(), service_data_dir_path: node_data_dir.to_path_buf(), service_log_dir_path: node_logs_dir.to_path_buf(), upnp: false, @@ -3502,7 +3502,7 @@ async fn add_node_should_return_an_error_if_duplicate_custom_rpc_port_in_range_i nodes: vec![NodeServiceData { auto_restart: false, connected_peers: None, - data_dir_path: PathBuf::from("/var/safenode-manager/services/safenode1"), + data_dir_path: PathBuf::from("/var/antctl/services/antnode1"), evm_network: EvmNetwork::Custom(CustomNetwork { rpc_url_http: "http://localhost:8545".parse()?, payment_token_address: RewardsAddress::from_str( @@ -3516,7 +3516,7 @@ async fn add_node_should_return_an_error_if_duplicate_custom_rpc_port_in_range_i home_network: false, listen_addr: None, local: false, - log_dir_path: PathBuf::from("/var/log/safenode/safenode1"), + log_dir_path: PathBuf::from("/var/log/antnode/antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, @@ -3532,8 +3532,8 @@ async fn add_node_should_return_an_error_if_duplicate_custom_rpc_port_in_range_i )?, reward_balance: Some(AttoTokens::zero()), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: PathBuf::from("/var/safenode-manager/services/safenode1/safenode"), - service_name: "safenode1".to_string(), + antnode_path: PathBuf::from("/var/antctl/services/antnode1/antnode"), + service_name: "antnode1".to_string(), status: ServiceStatus::Added, upnp: false, user: Some("safe".to_string()), @@ -3550,8 +3550,8 @@ async fn add_node_should_return_an_error_if_duplicate_custom_rpc_port_in_range_i node_data_dir.create_dir_all()?; let node_logs_dir = temp_dir.child("logs"); node_logs_dir.create_dir_all()?; - let safenode_download_path = temp_dir.child(SAFENODE_FILE_NAME); - safenode_download_path.write_binary(b"fake safenode bin")?; + let antnode_download_path = temp_dir.child(ANTNODE_FILE_NAME); + antnode_download_path.write_binary(b"fake antnode bin")?; let result = add_node( AddNodeServiceOptions { @@ -3559,7 +3559,7 @@ async fn add_node_should_return_an_error_if_duplicate_custom_rpc_port_in_range_i auto_set_nat_flags: false, bootstrap_peers: vec![], count: Some(2), - delete_safenode_src: true, + delete_antnode_src: true, enable_metrics_server: false, env_variables: None, genesis: false, @@ -3574,8 +3574,8 @@ async fn add_node_should_return_an_error_if_duplicate_custom_rpc_port_in_range_i node_port: None, rpc_address: None, rpc_port: Some(PortRange::Range(8081, 8082)), - safenode_dir_path: temp_dir.to_path_buf(), - safenode_src_path: safenode_download_path.to_path_buf(), + antnode_dir_path: temp_dir.to_path_buf(), + antnode_src_path: antnode_download_path.to_path_buf(), service_data_dir_path: node_data_dir.to_path_buf(), service_log_dir_path: node_logs_dir.to_path_buf(), upnp: false, @@ -3633,8 +3633,8 @@ async fn add_node_should_disable_upnp_and_home_network_if_nat_status_is_public() node_data_dir.create_dir_all()?; let node_logs_dir = temp_dir.child("logs"); node_logs_dir.create_dir_all()?; - let safenode_download_path = temp_dir.child(SAFENODE_FILE_NAME); - safenode_download_path.write_binary(b"fake safenode bin")?; + let antnode_download_path = temp_dir.child(ANTNODE_FILE_NAME); + antnode_download_path.write_binary(b"fake antnode bin")?; let mut seq = Sequence::new(); @@ -3647,7 +3647,7 @@ async fn add_node_should_disable_upnp_and_home_network_if_nat_status_is_public() let install_ctx = InstallNodeServiceCtxBuilder { autostart: false, bootstrap_peers: vec![], - data_dir_path: node_data_dir.to_path_buf().join("safenode1"), + data_dir_path: node_data_dir.to_path_buf().join("antnode1"), env_variables: None, evm_network: EvmNetwork::Custom(CustomNetwork { rpc_url_http: "http://localhost:8545".parse()?, @@ -3661,21 +3661,21 @@ async fn add_node_should_disable_upnp_and_home_network_if_nat_status_is_public() genesis: false, home_network: false, local: false, - log_dir_path: node_logs_dir.to_path_buf().join("safenode1"), + log_dir_path: node_logs_dir.to_path_buf().join("antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, metrics_port: None, - name: "safenode1".to_string(), + name: "antnode1".to_string(), node_ip: None, node_port: None, owner: None, rewards_address: RewardsAddress::from_str("0x03B770D9cD32077cC0bF330c13C114a87643B124")?, rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 12001), - safenode_path: node_data_dir + antnode_path: node_data_dir .to_path_buf() - .join("safenode1") - .join(SAFENODE_FILE_NAME), + .join("antnode1") + .join(ANTNODE_FILE_NAME), service_user: Some(get_username()), upnp: false, } @@ -3693,7 +3693,7 @@ async fn add_node_should_disable_upnp_and_home_network_if_nat_status_is_public() auto_set_nat_flags: true, bootstrap_peers: vec![], count: None, - delete_safenode_src: true, + delete_antnode_src: true, enable_metrics_server: false, env_variables: None, local: false, @@ -3708,8 +3708,8 @@ async fn add_node_should_disable_upnp_and_home_network_if_nat_status_is_public() node_port: None, rpc_address: None, rpc_port: None, - safenode_dir_path: temp_dir.to_path_buf(), - safenode_src_path: safenode_download_path.to_path_buf(), + antnode_dir_path: temp_dir.to_path_buf(), + antnode_src_path: antnode_download_path.to_path_buf(), service_data_dir_path: node_data_dir.to_path_buf(), service_log_dir_path: node_logs_dir.to_path_buf(), upnp: true, @@ -3764,8 +3764,8 @@ async fn add_node_should_enable_upnp_if_nat_status_is_upnp() -> Result<()> { node_data_dir.create_dir_all()?; let node_logs_dir = temp_dir.child("logs"); node_logs_dir.create_dir_all()?; - let safenode_download_path = temp_dir.child(SAFENODE_FILE_NAME); - safenode_download_path.write_binary(b"fake safenode bin")?; + let antnode_download_path = temp_dir.child(ANTNODE_FILE_NAME); + antnode_download_path.write_binary(b"fake antnode bin")?; let mut seq = Sequence::new(); @@ -3778,7 +3778,7 @@ async fn add_node_should_enable_upnp_if_nat_status_is_upnp() -> Result<()> { let install_ctx = InstallNodeServiceCtxBuilder { autostart: false, bootstrap_peers: vec![], - data_dir_path: node_data_dir.to_path_buf().join("safenode1"), + data_dir_path: node_data_dir.to_path_buf().join("antnode1"), env_variables: None, evm_network: EvmNetwork::Custom(CustomNetwork { rpc_url_http: "http://localhost:8545".parse()?, @@ -3792,21 +3792,21 @@ async fn add_node_should_enable_upnp_if_nat_status_is_upnp() -> Result<()> { genesis: false, home_network: false, local: false, - log_dir_path: node_logs_dir.to_path_buf().join("safenode1"), + log_dir_path: node_logs_dir.to_path_buf().join("antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, metrics_port: None, - name: "safenode1".to_string(), + name: "antnode1".to_string(), node_ip: None, node_port: None, owner: None, rewards_address: RewardsAddress::from_str("0x03B770D9cD32077cC0bF330c13C114a87643B124")?, rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 12001), - safenode_path: node_data_dir + antnode_path: node_data_dir .to_path_buf() - .join("safenode1") - .join(SAFENODE_FILE_NAME), + .join("antnode1") + .join(ANTNODE_FILE_NAME), service_user: Some(get_username()), upnp: true, } @@ -3824,7 +3824,7 @@ async fn add_node_should_enable_upnp_if_nat_status_is_upnp() -> Result<()> { auto_set_nat_flags: true, bootstrap_peers: vec![], count: None, - delete_safenode_src: true, + delete_antnode_src: true, enable_metrics_server: false, env_variables: None, local: false, @@ -3839,8 +3839,8 @@ async fn add_node_should_enable_upnp_if_nat_status_is_upnp() -> Result<()> { node_port: None, rpc_address: None, rpc_port: None, - safenode_dir_path: temp_dir.to_path_buf(), - safenode_src_path: safenode_download_path.to_path_buf(), + antnode_dir_path: temp_dir.to_path_buf(), + antnode_src_path: antnode_download_path.to_path_buf(), service_data_dir_path: node_data_dir.to_path_buf(), service_log_dir_path: node_logs_dir.to_path_buf(), upnp: false, @@ -3895,8 +3895,8 @@ async fn add_node_should_enable_home_network_if_nat_status_is_private() -> Resul node_data_dir.create_dir_all()?; let node_logs_dir = temp_dir.child("logs"); node_logs_dir.create_dir_all()?; - let safenode_download_path = temp_dir.child(SAFENODE_FILE_NAME); - safenode_download_path.write_binary(b"fake safenode bin")?; + let antnode_download_path = temp_dir.child(ANTNODE_FILE_NAME); + antnode_download_path.write_binary(b"fake antnode bin")?; let mut seq = Sequence::new(); @@ -3909,7 +3909,7 @@ async fn add_node_should_enable_home_network_if_nat_status_is_private() -> Resul let install_ctx = InstallNodeServiceCtxBuilder { autostart: false, bootstrap_peers: vec![], - data_dir_path: node_data_dir.to_path_buf().join("safenode1"), + data_dir_path: node_data_dir.to_path_buf().join("antnode1"), env_variables: None, evm_network: EvmNetwork::Custom(CustomNetwork { rpc_url_http: "http://localhost:8545".parse()?, @@ -3923,21 +3923,21 @@ async fn add_node_should_enable_home_network_if_nat_status_is_private() -> Resul genesis: false, home_network: true, local: false, - log_dir_path: node_logs_dir.to_path_buf().join("safenode1"), + log_dir_path: node_logs_dir.to_path_buf().join("antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, metrics_port: None, - name: "safenode1".to_string(), + name: "antnode1".to_string(), node_ip: None, node_port: None, owner: None, rewards_address: RewardsAddress::from_str("0x03B770D9cD32077cC0bF330c13C114a87643B124")?, rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 12001), - safenode_path: node_data_dir + antnode_path: node_data_dir .to_path_buf() - .join("safenode1") - .join(SAFENODE_FILE_NAME), + .join("antnode1") + .join(ANTNODE_FILE_NAME), service_user: Some(get_username()), upnp: false, } @@ -3955,7 +3955,7 @@ async fn add_node_should_enable_home_network_if_nat_status_is_private() -> Resul auto_set_nat_flags: true, bootstrap_peers: vec![], count: None, - delete_safenode_src: true, + delete_antnode_src: true, enable_metrics_server: false, env_variables: None, local: false, @@ -3970,8 +3970,8 @@ async fn add_node_should_enable_home_network_if_nat_status_is_private() -> Resul node_port: None, rpc_address: None, rpc_port: None, - safenode_dir_path: temp_dir.to_path_buf(), - safenode_src_path: safenode_download_path.to_path_buf(), + antnode_dir_path: temp_dir.to_path_buf(), + antnode_src_path: antnode_download_path.to_path_buf(), service_data_dir_path: node_data_dir.to_path_buf(), service_log_dir_path: node_logs_dir.to_path_buf(), upnp: true, @@ -4027,8 +4027,8 @@ async fn add_node_should_return_an_error_if_nat_status_is_none_but_auto_set_nat_ node_data_dir.create_dir_all()?; let node_logs_dir = temp_dir.child("logs"); node_logs_dir.create_dir_all()?; - let safenode_download_path = temp_dir.child(SAFENODE_FILE_NAME); - safenode_download_path.write_binary(b"fake safenode bin")?; + let antnode_download_path = temp_dir.child(ANTNODE_FILE_NAME); + antnode_download_path.write_binary(b"fake antnode bin")?; let mut seq = Sequence::new(); @@ -4044,7 +4044,7 @@ async fn add_node_should_return_an_error_if_nat_status_is_none_but_auto_set_nat_ auto_set_nat_flags: true, bootstrap_peers: vec![], count: None, - delete_safenode_src: true, + delete_antnode_src: true, enable_metrics_server: false, env_variables: None, local: false, @@ -4059,8 +4059,8 @@ async fn add_node_should_return_an_error_if_nat_status_is_none_but_auto_set_nat_ node_port: None, rpc_address: None, rpc_port: None, - safenode_dir_path: temp_dir.to_path_buf(), - safenode_src_path: safenode_download_path.to_path_buf(), + antnode_dir_path: temp_dir.to_path_buf(), + antnode_src_path: antnode_download_path.to_path_buf(), service_data_dir_path: node_data_dir.to_path_buf(), service_log_dir_path: node_logs_dir.to_path_buf(), upnp: false, @@ -4532,7 +4532,7 @@ async fn add_daemon_should_add_a_daemon_service() -> Result<()> { autostart: true, contents: None, environment: Some(vec![("SN_LOG".to_string(), "ALL".to_string())]), - label: "safenodemand".parse()?, + label: "antctld".parse()?, program: daemon_install_path.to_path_buf(), username: Some(get_username()), working_directory: None, @@ -4563,7 +4563,7 @@ async fn add_daemon_should_add_a_daemon_service() -> Result<()> { let saved_daemon = node_registry.daemon.unwrap(); assert_eq!(saved_daemon.daemon_path, daemon_install_path.to_path_buf()); assert!(saved_daemon.pid.is_none()); - assert_eq!(saved_daemon.service_name, "safenodemand"); + assert_eq!(saved_daemon.service_name, "antctld"); assert_eq!(saved_daemon.status, ServiceStatus::Added); assert_eq!(saved_daemon.version, latest_version); @@ -4586,13 +4586,13 @@ async fn add_daemon_should_return_an_error_if_a_daemon_service_was_already_creat let mut node_registry = NodeRegistry { bootstrap_peers: vec![], daemon: Some(DaemonServiceData { - daemon_path: PathBuf::from("/usr/local/bin/safenodemand"), + daemon_path: PathBuf::from("/usr/local/bin/antctld"), endpoint: Some(SocketAddr::new( IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8080, )), pid: Some(1234), - service_name: "safenodemand".to_string(), + service_name: "antctld".to_string(), status: ServiceStatus::Running, version: latest_version.to_string(), }), @@ -4622,7 +4622,7 @@ async fn add_daemon_should_return_an_error_if_a_daemon_service_was_already_creat Ok(_) => panic!("This test should result in an error"), Err(e) => { assert_eq!( - format!("A safenodemand service has already been created"), + format!("A antctld service has already been created"), e.to_string() ) } @@ -4655,8 +4655,8 @@ async fn add_node_should_not_delete_the_source_binary_if_path_arg_is_used() -> R node_data_dir.create_dir_all()?; let node_logs_dir = temp_dir.child("logs"); node_logs_dir.create_dir_all()?; - let safenode_download_path = temp_dir.child(SAFENODE_FILE_NAME); - safenode_download_path.write_binary(b"fake safenode bin")?; + let antnode_download_path = temp_dir.child(ANTNODE_FILE_NAME); + antnode_download_path.write_binary(b"fake antnode bin")?; let mut seq = Sequence::new(); @@ -4670,7 +4670,7 @@ async fn add_node_should_not_delete_the_source_binary_if_path_arg_is_used() -> R let install_ctx = InstallNodeServiceCtxBuilder { autostart: false, bootstrap_peers: vec![], - data_dir_path: node_data_dir.to_path_buf().join("safenode1"), + data_dir_path: node_data_dir.to_path_buf().join("antnode1"), env_variables: None, evm_network: EvmNetwork::Custom(CustomNetwork { rpc_url_http: "http://localhost:8545".parse()?, @@ -4684,21 +4684,21 @@ async fn add_node_should_not_delete_the_source_binary_if_path_arg_is_used() -> R genesis: false, home_network: false, local: false, - log_dir_path: node_logs_dir.to_path_buf().join("safenode1"), + log_dir_path: node_logs_dir.to_path_buf().join("antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, metrics_port: None, - name: "safenode1".to_string(), + name: "antnode1".to_string(), node_ip: None, node_port: None, owner: None, rewards_address: RewardsAddress::from_str("0x03B770D9cD32077cC0bF330c13C114a87643B124")?, rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: node_data_dir + antnode_path: node_data_dir .to_path_buf() - .join("safenode1") - .join(SAFENODE_FILE_NAME), + .join("antnode1") + .join(ANTNODE_FILE_NAME), service_user: Some(get_username()), upnp: false, } @@ -4717,7 +4717,7 @@ async fn add_node_should_not_delete_the_source_binary_if_path_arg_is_used() -> R auto_set_nat_flags: false, bootstrap_peers: vec![], count: Some(1), - delete_safenode_src: false, + delete_antnode_src: false, enable_metrics_server: false, env_variables: None, genesis: false, @@ -4732,8 +4732,8 @@ async fn add_node_should_not_delete_the_source_binary_if_path_arg_is_used() -> R node_port: None, rpc_address: None, rpc_port: None, - safenode_dir_path: temp_dir.to_path_buf(), - safenode_src_path: safenode_download_path.to_path_buf(), + antnode_dir_path: temp_dir.to_path_buf(), + antnode_src_path: antnode_download_path.to_path_buf(), service_data_dir_path: node_data_dir.to_path_buf(), service_log_dir_path: node_logs_dir.to_path_buf(), upnp: false, @@ -4759,7 +4759,7 @@ async fn add_node_should_not_delete_the_source_binary_if_path_arg_is_used() -> R ) .await?; - safenode_download_path.assert(predicate::path::is_file()); + antnode_download_path.assert(predicate::path::is_file()); Ok(()) } @@ -4788,8 +4788,8 @@ async fn add_node_should_apply_the_home_network_flag_if_it_is_used() -> Result<( node_data_dir.create_dir_all()?; let node_logs_dir = temp_dir.child("logs"); node_logs_dir.create_dir_all()?; - let safenode_download_path = temp_dir.child(SAFENODE_FILE_NAME); - safenode_download_path.write_binary(b"fake safenode bin")?; + let antnode_download_path = temp_dir.child(ANTNODE_FILE_NAME); + antnode_download_path.write_binary(b"fake antnode bin")?; let mut seq = Sequence::new(); @@ -4803,7 +4803,7 @@ async fn add_node_should_apply_the_home_network_flag_if_it_is_used() -> Result<( let install_ctx = InstallNodeServiceCtxBuilder { autostart: false, bootstrap_peers: vec![], - data_dir_path: node_data_dir.to_path_buf().join("safenode1"), + data_dir_path: node_data_dir.to_path_buf().join("antnode1"), env_variables: None, genesis: false, home_network: true, @@ -4817,21 +4817,21 @@ async fn add_node_should_apply_the_home_network_flag_if_it_is_used() -> Result<( "0x8464135c8F25Da09e49BC8782676a84730C318bC", )?, }), - log_dir_path: node_logs_dir.to_path_buf().join("safenode1"), + log_dir_path: node_logs_dir.to_path_buf().join("antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, metrics_port: None, - name: "safenode1".to_string(), + name: "antnode1".to_string(), node_ip: None, node_port: None, owner: None, rewards_address: RewardsAddress::from_str("0x03B770D9cD32077cC0bF330c13C114a87643B124")?, rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: node_data_dir + antnode_path: node_data_dir .to_path_buf() - .join("safenode1") - .join(SAFENODE_FILE_NAME), + .join("antnode1") + .join(ANTNODE_FILE_NAME), service_user: Some(get_username()), upnp: false, } @@ -4850,7 +4850,7 @@ async fn add_node_should_apply_the_home_network_flag_if_it_is_used() -> Result<( auto_set_nat_flags: false, bootstrap_peers: vec![], count: Some(1), - delete_safenode_src: false, + delete_antnode_src: false, enable_metrics_server: false, env_variables: None, genesis: false, @@ -4865,8 +4865,8 @@ async fn add_node_should_apply_the_home_network_flag_if_it_is_used() -> Result<( node_port: None, rpc_address: None, rpc_port: None, - safenode_dir_path: temp_dir.to_path_buf(), - safenode_src_path: safenode_download_path.to_path_buf(), + antnode_dir_path: temp_dir.to_path_buf(), + antnode_src_path: antnode_download_path.to_path_buf(), service_data_dir_path: node_data_dir.to_path_buf(), service_log_dir_path: node_logs_dir.to_path_buf(), upnp: false, @@ -4921,8 +4921,8 @@ async fn add_node_should_add_the_node_in_user_mode() -> Result<()> { node_data_dir.create_dir_all()?; let node_logs_dir = temp_dir.child("logs"); node_logs_dir.create_dir_all()?; - let safenode_download_path = temp_dir.child(SAFENODE_FILE_NAME); - safenode_download_path.write_binary(b"fake safenode bin")?; + let antnode_download_path = temp_dir.child(ANTNODE_FILE_NAME); + antnode_download_path.write_binary(b"fake antnode bin")?; let mut seq = Sequence::new(); @@ -4936,7 +4936,7 @@ async fn add_node_should_add_the_node_in_user_mode() -> Result<()> { let install_ctx = InstallNodeServiceCtxBuilder { autostart: false, bootstrap_peers: vec![], - data_dir_path: node_data_dir.to_path_buf().join("safenode1"), + data_dir_path: node_data_dir.to_path_buf().join("antnode1"), env_variables: None, evm_network: EvmNetwork::Custom(CustomNetwork { rpc_url_http: "http://localhost:8545".parse()?, @@ -4950,21 +4950,21 @@ async fn add_node_should_add_the_node_in_user_mode() -> Result<()> { genesis: false, home_network: true, local: false, - log_dir_path: node_logs_dir.to_path_buf().join("safenode1"), + log_dir_path: node_logs_dir.to_path_buf().join("antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, metrics_port: None, - name: "safenode1".to_string(), + name: "antnode1".to_string(), node_ip: None, node_port: None, owner: None, rewards_address: RewardsAddress::from_str("0x03B770D9cD32077cC0bF330c13C114a87643B124")?, rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: node_data_dir + antnode_path: node_data_dir .to_path_buf() - .join("safenode1") - .join(SAFENODE_FILE_NAME), + .join("antnode1") + .join(ANTNODE_FILE_NAME), service_user: Some(get_username()), upnp: false, } @@ -4983,7 +4983,7 @@ async fn add_node_should_add_the_node_in_user_mode() -> Result<()> { auto_set_nat_flags: false, bootstrap_peers: vec![], count: Some(1), - delete_safenode_src: false, + delete_antnode_src: false, enable_metrics_server: false, env_variables: None, genesis: false, @@ -4998,8 +4998,8 @@ async fn add_node_should_add_the_node_in_user_mode() -> Result<()> { node_port: None, rpc_address: None, rpc_port: None, - safenode_dir_path: temp_dir.to_path_buf(), - safenode_src_path: safenode_download_path.to_path_buf(), + antnode_dir_path: temp_dir.to_path_buf(), + antnode_src_path: antnode_download_path.to_path_buf(), service_data_dir_path: node_data_dir.to_path_buf(), service_log_dir_path: node_logs_dir.to_path_buf(), upnp: false, @@ -5052,8 +5052,8 @@ async fn add_node_should_add_the_node_with_upnp_enabled() -> Result<()> { node_data_dir.create_dir_all()?; let node_logs_dir = temp_dir.child("logs"); node_logs_dir.create_dir_all()?; - let safenode_download_path = temp_dir.child(SAFENODE_FILE_NAME); - safenode_download_path.write_binary(b"fake safenode bin")?; + let antnode_download_path = temp_dir.child(ANTNODE_FILE_NAME); + antnode_download_path.write_binary(b"fake antnode bin")?; let mut seq = Sequence::new(); @@ -5066,7 +5066,7 @@ async fn add_node_should_add_the_node_with_upnp_enabled() -> Result<()> { let install_ctx = InstallNodeServiceCtxBuilder { autostart: false, bootstrap_peers: vec![], - data_dir_path: node_data_dir.to_path_buf().join("safenode1"), + data_dir_path: node_data_dir.to_path_buf().join("antnode1"), env_variables: None, evm_network: EvmNetwork::Custom(CustomNetwork { rpc_url_http: "http://localhost:8545".parse()?, @@ -5080,21 +5080,21 @@ async fn add_node_should_add_the_node_with_upnp_enabled() -> Result<()> { genesis: false, home_network: true, local: false, - log_dir_path: node_logs_dir.to_path_buf().join("safenode1"), + log_dir_path: node_logs_dir.to_path_buf().join("antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, metrics_port: None, - name: "safenode1".to_string(), + name: "antnode1".to_string(), node_ip: None, node_port: None, owner: None, rewards_address: RewardsAddress::from_str("0x03B770D9cD32077cC0bF330c13C114a87643B124")?, rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: node_data_dir + antnode_path: node_data_dir .to_path_buf() - .join("safenode1") - .join(SAFENODE_FILE_NAME), + .join("antnode1") + .join(ANTNODE_FILE_NAME), service_user: Some(get_username()), upnp: true, } @@ -5113,7 +5113,7 @@ async fn add_node_should_add_the_node_with_upnp_enabled() -> Result<()> { auto_set_nat_flags: false, bootstrap_peers: vec![], count: Some(1), - delete_safenode_src: false, + delete_antnode_src: false, enable_metrics_server: false, env_variables: None, genesis: false, @@ -5128,8 +5128,8 @@ async fn add_node_should_add_the_node_with_upnp_enabled() -> Result<()> { node_port: None, rpc_address: None, rpc_port: None, - safenode_dir_path: temp_dir.to_path_buf(), - safenode_src_path: safenode_download_path.to_path_buf(), + antnode_dir_path: temp_dir.to_path_buf(), + antnode_src_path: antnode_download_path.to_path_buf(), service_data_dir_path: node_data_dir.to_path_buf(), service_log_dir_path: node_logs_dir.to_path_buf(), upnp: true, @@ -5172,8 +5172,8 @@ async fn add_node_should_assign_an_owner_in_lowercase() -> Result<()> { node_data_dir.create_dir_all()?; let node_logs_dir = temp_dir.child("logs"); node_logs_dir.create_dir_all()?; - let safenode_download_path = temp_dir.child(SAFENODE_FILE_NAME); - safenode_download_path.write_binary(b"fake safenode bin")?; + let antnode_download_path = temp_dir.child(ANTNODE_FILE_NAME); + antnode_download_path.write_binary(b"fake antnode bin")?; let mut node_registry = NodeRegistry { auditor: None, @@ -5205,7 +5205,7 @@ async fn add_node_should_assign_an_owner_in_lowercase() -> Result<()> { OsString::from( node_data_dir .to_path_buf() - .join("safenode1") + .join("antnode1") .to_string_lossy() .to_string(), ), @@ -5213,7 +5213,7 @@ async fn add_node_should_assign_an_owner_in_lowercase() -> Result<()> { OsString::from( node_logs_dir .to_path_buf() - .join("safenode1") + .join("antnode1") .to_string_lossy() .to_string(), ), @@ -5232,11 +5232,11 @@ async fn add_node_should_assign_an_owner_in_lowercase() -> Result<()> { autostart: false, contents: None, environment: None, - label: "safenode1".parse()?, + label: "antnode1".parse()?, program: node_data_dir .to_path_buf() - .join("safenode1") - .join(SAFENODE_FILE_NAME), + .join("antnode1") + .join(ANTNODE_FILE_NAME), username: Some(get_username()), working_directory: None, }), @@ -5252,7 +5252,7 @@ async fn add_node_should_assign_an_owner_in_lowercase() -> Result<()> { auto_set_nat_flags: false, bootstrap_peers: vec![], count: None, - delete_safenode_src: true, + delete_antnode_src: true, enable_metrics_server: false, env_variables: None, genesis: false, @@ -5267,8 +5267,8 @@ async fn add_node_should_assign_an_owner_in_lowercase() -> Result<()> { node_port: None, rpc_address: None, rpc_port: None, - safenode_dir_path: temp_dir.to_path_buf(), - safenode_src_path: safenode_download_path.to_path_buf(), + antnode_dir_path: temp_dir.to_path_buf(), + antnode_src_path: antnode_download_path.to_path_buf(), service_data_dir_path: node_data_dir.to_path_buf(), service_log_dir_path: node_logs_dir.to_path_buf(), upnp: false, @@ -5313,8 +5313,8 @@ async fn add_node_should_auto_restart() -> Result<()> { node_data_dir.create_dir_all()?; let node_logs_dir = temp_dir.child("logs"); node_logs_dir.create_dir_all()?; - let safenode_download_path = temp_dir.child(SAFENODE_FILE_NAME); - safenode_download_path.write_binary(b"fake safenode bin")?; + let antnode_download_path = temp_dir.child(ANTNODE_FILE_NAME); + antnode_download_path.write_binary(b"fake antnode bin")?; let mut node_registry = NodeRegistry { auditor: None, @@ -5346,7 +5346,7 @@ async fn add_node_should_auto_restart() -> Result<()> { OsString::from( node_data_dir .to_path_buf() - .join("safenode1") + .join("antnode1") .to_string_lossy() .to_string(), ), @@ -5354,7 +5354,7 @@ async fn add_node_should_auto_restart() -> Result<()> { OsString::from( node_logs_dir .to_path_buf() - .join("safenode1") + .join("antnode1") .to_string_lossy() .to_string(), ), @@ -5373,11 +5373,11 @@ async fn add_node_should_auto_restart() -> Result<()> { autostart: true, contents: None, environment: None, - label: "safenode1".parse()?, + label: "antnode1".parse()?, program: node_data_dir .to_path_buf() - .join("safenode1") - .join(SAFENODE_FILE_NAME), + .join("antnode1") + .join(ANTNODE_FILE_NAME), username: Some(get_username()), working_directory: None, }), @@ -5393,7 +5393,7 @@ async fn add_node_should_auto_restart() -> Result<()> { auto_set_nat_flags: false, bootstrap_peers: vec![], count: None, - delete_safenode_src: true, + delete_antnode_src: true, enable_metrics_server: false, env_variables: None, genesis: false, @@ -5408,8 +5408,8 @@ async fn add_node_should_auto_restart() -> Result<()> { node_port: None, rpc_address: None, rpc_port: None, - safenode_dir_path: temp_dir.to_path_buf(), - safenode_src_path: safenode_download_path.to_path_buf(), + antnode_dir_path: temp_dir.to_path_buf(), + antnode_src_path: antnode_download_path.to_path_buf(), service_data_dir_path: node_data_dir.to_path_buf(), service_log_dir_path: node_logs_dir.to_path_buf(), upnp: false, diff --git a/ant-node-manager/src/bin/cli/main.rs b/ant-node-manager/src/bin/cli/main.rs index 4d1d5377d1..987fbbd007 100644 --- a/ant-node-manager/src/bin/cli/main.rs +++ b/ant-node-manager/src/bin/cli/main.rs @@ -59,9 +59,9 @@ pub(crate) struct Cmd { #[derive(Subcommand, Debug)] pub enum SubCmd { - /// Add one or more safenode services. + /// Add one or more antnode services. /// - /// By default, the latest safenode binary will be downloaded; however, it is possible to + /// By default, the latest antnode binary will be downloaded; however, it is possible to /// provide a binary either by specifying a URL, a local path, or a specific version number. /// /// On Windows, this command must run with administrative privileges. @@ -77,7 +77,7 @@ pub enum SubCmd { /// distributions, however, use Systemd, which *does* support user-mode services. #[clap(name = "add")] Add { - /// Set to automatically restart safenode services upon OS reboot. + /// Set to automatically restart antnode services upon OS reboot. /// /// If not used, any added services will *not* restart automatically when the OS reboots /// and they will need to be explicitly started again. @@ -103,20 +103,20 @@ pub enum SubCmd { /// This path is a prefix. Each installed node will have its own directory underneath it. /// /// If not provided, the default location is platform specific: - /// - Linux/macOS (system-wide): /var/safenode-manager/services - /// - Linux/macOS (user-mode): ~/.local/share/safe/node - /// - Windows: C:\ProgramData\safenode\services + /// - Linux/macOS (system-wide): /var/antctl/services + /// - Linux/macOS (user-mode): ~/.local/share/autonomi/node + /// - Windows: C:\ProgramData\antnode\services #[clap(long, verbatim_doc_comment)] data_dir_path: Option, /// Set this flag to enable the metrics server. The ports will be selected at random. /// - /// If you're passing the compiled safenode via --path, make sure to enable the open-metrics feature + /// If you're passing the compiled antnode via --path, make sure to enable the open-metrics feature /// when compiling. /// /// If you want to specify the ports, use the --metrics-port argument. #[clap(long)] enable_metrics_server: bool, - /// Provide environment variables for the safenode service. + /// Provide environment variables for the antnode service. /// /// Useful to set log levels. Variables should be comma separated without spaces. /// @@ -126,12 +126,12 @@ pub enum SubCmd { /// Specify what EVM network to use for payments. #[command(subcommand)] evm_network: EvmNetworkCommand, - /// Set this flag to use the safenode '--home-network' feature. + /// Set this flag to use the antnode '--home-network' feature. /// - /// This enables the use of safenode services from a home network with a router. + /// This enables the use of antnode services from a home network with a router. #[clap(long)] home_network: bool, - /// Set this flag to launch safenode with the --local flag. + /// Set this flag to launch antnode with the --local flag. /// /// This is useful for building a service-based local network. #[clap(long)] @@ -141,9 +141,9 @@ pub enum SubCmd { /// This path is a prefix. Each installed node will have its own directory underneath it. /// /// If not provided, the default location is platform specific: - /// - Linux/macOS (system-wide): /var/log/safenode - /// - Linux/macOS (user-mode): ~/.local/share/safe/node/*/logs - /// - Windows: C:\ProgramData\safenode\logs + /// - Linux/macOS (system-wide): /var/log/antnode + /// - Linux/macOS (user-mode): ~/.local/share/autonomi/node/*/logs + /// - Windows: C:\ProgramData\antnode\logs #[clap(long, verbatim_doc_comment)] log_dir_path: Option, /// Specify the logging format for started nodes. @@ -166,7 +166,7 @@ pub enum SubCmd { max_archived_log_files: Option, /// Specify a port for the open metrics server. /// - /// If you're passing the compiled safenode via --node-path, make sure to enable the open-metrics feature + /// If you're passing the compiled antnode via --node-path, make sure to enable the open-metrics feature /// when compiling. /// /// If not set, metrics server will not be started. Use --enable-metrics-server to start @@ -177,12 +177,12 @@ pub enum SubCmd { /// services, which in this case would be 5. The range must also go from lower to higher. #[clap(long, value_parser = PortRange::parse)] metrics_port: Option, - /// Specify the IP address for the safenode service(s). + /// Specify the IP address for the antnode service(s). /// /// If not set, we bind to all the available network interfaces. #[clap(long)] node_ip: Option, - /// Specify a port for the safenode service(s). + /// Specify a port for the antnode service(s). /// /// If not used, ports will be selected at random. /// @@ -200,7 +200,7 @@ pub enum SubCmd { /// run as normal. #[clap(long)] owner: Option, - /// Provide a path for the safenode binary to be used by the service. + /// Provide a path for the antnode binary to be used by the service. /// /// Useful for creating the service using a custom built binary. #[clap(long)] @@ -228,14 +228,14 @@ pub enum SubCmd { rpc_port: Option, /// Try to use UPnP to open a port in the home router and allow incoming connections. /// - /// This requires a safenode binary built with the 'upnp' feature. + /// This requires a antnode binary built with the 'upnp' feature. #[clap(long, default_value_t = false)] upnp: bool, - /// Provide a safenode binary using a URL. + /// Provide a antnode binary using a URL. /// /// The binary must be inside a zip or gzipped tar archive. /// - /// This option can be used to test a safenode binary that has been built from a forked + /// This option can be used to test a antnode binary that has been built from a forked /// branch and uploaded somewhere. A typical use case would be for a developer who launches /// a testnet to test some changes they have on a fork. #[clap(long, conflicts_with = "version")] @@ -247,7 +247,7 @@ pub enum SubCmd { /// On Windows this argument will have no effect. #[clap(long)] user: Option, - /// Provide a specific version of safenode to be installed. + /// Provide a specific version of antnode to be installed. /// /// The version number should be in the form X.Y.Z, with no 'v' prefix. /// @@ -279,7 +279,7 @@ pub enum SubCmd { Local(LocalSubCmd), #[clap(subcommand)] NatDetection(NatDetectionSubCmd), - /// Remove safenode service(s). + /// Remove antnode service(s). /// /// If no peer ID(s) or service name(s) are supplied, all services will be removed. /// @@ -315,7 +315,7 @@ pub enum SubCmd { #[clap(long, short)] force: bool, }, - /// Start safenode service(s). + /// Start antnode service(s). /// /// By default, each node service is started after the previous node has successfully connected to the network or /// after the 'connection-timeout' period has been reached for that node. The timeout is 300 seconds by default. @@ -368,7 +368,7 @@ pub enum SubCmd { #[clap(long, conflicts_with = "details")] json: bool, }, - /// Stop safenode service(s). + /// Stop antnode service(s). /// /// If no peer ID(s) or service name(s) are supplied, all services will be stopped. /// @@ -392,7 +392,7 @@ pub enum SubCmd { #[clap(long, conflicts_with = "peer_id")] service_name: Vec, }, - /// Upgrade safenode services. + /// Upgrade antnode services. /// /// By default, each node service is started after the previous node has successfully connected to the network or /// after the 'connection-timeout' period has been reached for that node. The timeout is 300 seconds by default. @@ -418,11 +418,11 @@ pub enum SubCmd { /// Can be useful for testing scenarios. #[clap(long)] do_not_start: bool, - /// Provide environment variables for the safenode service. + /// Provide environment variables for the antnode service. /// /// Values set when the service was added will be overridden. /// - /// Useful to set safenode's log levels. Variables should be comma separated without + /// Useful to set antnode's log levels. Variables should be comma separated without /// spaces. /// /// Example: --env SN_LOG=all,RUST_LOG=libp2p=debug @@ -442,7 +442,7 @@ pub enum SubCmd { /// Units are milliseconds. #[clap(long, conflicts_with = "connection-timeout")] interval: Option, - /// Provide a path for the safenode binary to be used by the service. + /// Provide a path for the antnode binary to be used by the service. /// /// Useful for upgrading the service using a custom built binary. #[clap(long)] @@ -577,7 +577,7 @@ pub enum AuditorSubCmd { pub enum DaemonSubCmd { /// Add a daemon service for issuing commands via RPC. /// - /// By default, the latest safenodemand binary will be downloaded; however, it is possible to + /// By default, the latest antctld binary will be downloaded; however, it is possible to /// provide a binary either by specifying a URL, a local path, or a specific version number. /// /// This command must run as the root/administrative user. @@ -794,7 +794,7 @@ pub enum LocalSubCmd { /// being managed by the node manager. #[clap(name = "join")] Join { - /// Set to build the safenode and faucet binaries. + /// Set to build the antnode and faucet binaries. /// /// This option requires the command run from the root of the safe_network repository. #[clap(long)] @@ -804,25 +804,13 @@ pub enum LocalSubCmd { count: u16, /// Set this flag to enable the metrics server. The ports will be selected at random. /// - /// If you're passing the compiled safenode via --node-path, make sure to enable the open-metrics feature flag - /// on the safenode when compiling. If you're using --build, then make sure to enable the feature flag on the - /// safenode-manager. + /// If you're passing the compiled antnode via --node-path, make sure to enable the open-metrics feature flag + /// on the antnode when compiling. If you're using --build, then make sure to enable the feature flag on + /// antctl. /// /// If you want to specify the ports, use the --metrics-port argument. #[clap(long)] enable_metrics_server: bool, - /// Path to a faucet binary - /// - /// The path and version arguments are mutually exclusive. - #[clap(long, conflicts_with = "faucet_version")] - faucet_path: Option, - /// The version of the faucet to use. - /// - /// The version number should be in the form X.Y.Z, with no 'v' prefix. - /// - /// The version and path arguments are mutually exclusive. - #[clap(long)] - faucet_version: Option, /// An interval applied between launching each node. /// /// Units are milliseconds. @@ -837,9 +825,9 @@ pub enum LocalSubCmd { log_format: Option, /// Specify a port for the open metrics server. /// - /// If you're passing the compiled safenode via --node-path, make sure to enable the open-metrics feature flag - /// on the safenode when compiling. If you're using --build, then make sure to enable the feature flag on the - /// safenode-manager. + /// If you're passing the compiled antnode via --node-path, make sure to enable the open-metrics feature flag + /// on the antnode when compiling. If you're using --build, then make sure to enable the feature flag on + /// antctl. /// /// If not set, metrics server will not be started. Use --enable-metrics-server to start /// the metrics server without specifying a port. @@ -849,14 +837,14 @@ pub enum LocalSubCmd { /// services, which in this case would be 5. The range must also go from lower to higher. #[clap(long, value_parser = PortRange::parse)] metrics_port: Option, - /// Path to a safenode binary. + /// Path to a antnode binary. /// - /// Make sure to enable the local feature flag on the safenode when compiling the binary. + /// Make sure to enable the local feature flag on the antnode when compiling the binary. /// /// The path and version arguments are mutually exclusive. #[clap(long, conflicts_with = "node_version")] node_path: Option, - /// Specify a port for the safenode service(s). + /// Specify a port for the antnode service(s). /// /// If not used, ports will be selected at random. /// @@ -865,7 +853,7 @@ pub enum LocalSubCmd { /// services, which in this case would be 5. The range must also go from lower to higher. #[clap(long, value_parser = PortRange::parse)] node_port: Option, - /// The version of safenode to use. + /// The version of antnode to use. /// /// The version number should be in the form X.Y.Z, with no 'v' prefix. /// @@ -908,14 +896,14 @@ pub enum LocalSubCmd { }, /// Run a local network. /// - /// This will run safenode processes on the current machine to form a local network. A faucet + /// This will run antnode processes on the current machine to form a local network. A faucet /// service will also run for dispensing tokens. /// - /// Paths can be supplied for safenode and faucet binaries, but otherwise, the latest versions + /// Paths can be supplied for antnode and faucet binaries, but otherwise, the latest versions /// will be downloaded. #[clap(name = "run")] Run { - /// Set to build the safenode and faucet binaries. + /// Set to build the antnode and faucet binaries. /// /// This option requires the command run from the root of the safe_network repository. #[clap(long)] @@ -928,25 +916,13 @@ pub enum LocalSubCmd { count: u16, /// Set this flag to enable the metrics server. The ports will be selected at random. /// - /// If you're passing the compiled safenode via --node-path, make sure to enable the open-metrics feature flag - /// on the safenode when compiling. If you're using --build, then make sure to enable the feature flag on the - /// safenode-manager. + /// If you're passing the compiled antnode via --node-path, make sure to enable the open-metrics feature flag + /// on the antnode when compiling. If you're using --build, then make sure to enable the feature flag on + /// antctl. /// /// If you want to specify the ports, use the --metrics-port argument. #[clap(long)] enable_metrics_server: bool, - /// Path to a faucet binary. - /// - /// The path and version arguments are mutually exclusive. - #[clap(long, conflicts_with = "faucet_version", conflicts_with = "build")] - faucet_path: Option, - /// The version of the faucet to use. - /// - /// The version number should be in the form X.Y.Z, with no 'v' prefix. - /// - /// The version and path arguments are mutually exclusive. - #[clap(long, conflicts_with = "build")] - faucet_version: Option, /// An interval applied between launching each node. /// /// Units are milliseconds. @@ -961,9 +937,9 @@ pub enum LocalSubCmd { log_format: Option, /// Specify a port for the open metrics server. /// - /// If you're passing the compiled safenode via --node-path, make sure to enable the open-metrics feature flag - /// on the safenode when compiling. If you're using --build, then make sure to enable the feature flag on the - /// safenode-manager. + /// If you're passing the compiled antnode via --node-path, make sure to enable the open-metrics feature flag + /// on the antnode when compiling. If you're using --build, then make sure to enable the feature flag on + /// antctl. /// /// If not set, metrics server will not be started. Use --enable-metrics-server to start /// the metrics server without specifying a port. @@ -973,14 +949,14 @@ pub enum LocalSubCmd { /// services, which in this case would be 5. The range must also go from lower to higher. #[clap(long, value_parser = PortRange::parse)] metrics_port: Option, - /// Path to a safenode binary + /// Path to an antnode binary /// - /// Make sure to enable the local feature flag on the safenode when compiling the binary. + /// Make sure to enable the local feature flag on the antnode when compiling the binary. /// /// The path and version arguments are mutually exclusive. #[clap(long, conflicts_with = "node_version", conflicts_with = "build")] node_path: Option, - /// Specify a port for the safenode service(s). + /// Specify a port for the antnode service(s). /// /// If not used, ports will be selected at random. /// @@ -989,7 +965,7 @@ pub enum LocalSubCmd { /// services, which in this case would be 5. The range must also go from lower to higher. #[clap(long, value_parser = PortRange::parse)] node_port: Option, - /// The version of safenode to use. + /// The version of antnode to use. /// /// The version number should be in the form X.Y.Z, with no 'v' prefix. /// @@ -1241,8 +1217,6 @@ async fn main() -> Result<()> { build, count, enable_metrics_server, - faucet_path, - faucet_version, interval, metrics_port, node_path, @@ -1266,8 +1240,6 @@ async fn main() -> Result<()> { build, count, enable_metrics_server, - faucet_path, - faucet_version, interval, metrics_port, node_path, @@ -1291,8 +1263,6 @@ async fn main() -> Result<()> { clean, count, enable_metrics_server, - faucet_path, - faucet_version, interval, log_format, metrics_port, @@ -1316,8 +1286,6 @@ async fn main() -> Result<()> { clean, count, enable_metrics_server, - faucet_path, - faucet_version, interval, metrics_port, node_path, @@ -1417,8 +1385,8 @@ fn get_log_builder(level: Level) -> Result { ("evm-testnet".to_string(), level), ("ant_peers_acquisition".to_string(), level), ("ant_node_manager".to_string(), level), - ("safenode_manager".to_string(), level), - ("safenodemand".to_string(), level), + ("antctl".to_string(), level), + ("antctld".to_string(), level), ("ant_service_management".to_string(), level), ]; let mut log_builder = LogBuilder::new(logging_targets); diff --git a/ant-node-manager/src/bin/daemon/main.rs b/ant-node-manager/src/bin/daemon/main.rs index 51758efa2c..bb375f7d84 100644 --- a/ant-node-manager/src/bin/daemon/main.rs +++ b/ant-node-manager/src/bin/daemon/main.rs @@ -12,9 +12,9 @@ extern crate tracing; use ant_logging::LogBuilder; use ant_node_manager::{config::get_node_registry_path, rpc, DAEMON_DEFAULT_PORT}; use ant_service_management::{ - safenode_manager_proto::{ + antctl_proto::{ + ant_ctl_server::{AntCtl, AntCtlServer}, get_status_response::Node, - safe_node_manager_server::{SafeNodeManager, SafeNodeManagerServer}, GetStatusRequest, GetStatusResponse, NodeServiceRestartRequest, NodeServiceRestartResponse, }, NodeRegistry, @@ -49,11 +49,11 @@ struct Args { version: bool, } -struct SafeNodeManagerDaemon {} +struct AntCtlDaemon {} // Implementing RPC interface for service defined in .proto #[tonic::async_trait] -impl SafeNodeManager for SafeNodeManagerDaemon { +impl AntCtl for AntCtlDaemon { async fn restart_node_service( &self, request: Request, @@ -109,7 +109,7 @@ impl SafeNodeManager for SafeNodeManagerDaemon { } } -impl SafeNodeManagerDaemon { +impl AntCtlDaemon { fn load_node_registry() -> Result { let node_registry_path = get_node_registry_path() .map_err(|err| eyre!("Could not obtain node registry path: {err:?}"))?; @@ -134,7 +134,7 @@ impl SafeNodeManagerDaemon { // The SafeNodeManager trait returns `Status` as its error. So the actual logic is here and we can easily map the errors // into Status inside the trait fns. -impl SafeNodeManagerDaemon {} +impl AntCtlDaemon {} #[tokio::main(flavor = "current_thread")] async fn main() -> Result<()> { @@ -164,16 +164,16 @@ async fn main() -> Result<()> { } let _log_handles = get_log_builder()?.initialize()?; - println!("Starting safenodemand"); - let service = SafeNodeManagerDaemon {}; + println!("Starting antctld"); + let service = AntCtlDaemon {}; if let Err(err) = Server::builder() - .add_service(SafeNodeManagerServer::new(service)) + .add_service(AntCtlServer::new(service)) .serve(SocketAddr::new(IpAddr::V4(args.address), args.port)) .await { - error!("Safenode Manager Daemon failed to start: {err:?}"); - println!("Safenode Manager Daemon failed to start: {err:?}"); + error!("Antctl Daemon failed to start: {err:?}"); + println!("Antctl Daemon failed to start: {err:?}"); return Err(err.into()); } @@ -183,16 +183,16 @@ async fn main() -> Result<()> { fn get_log_builder() -> Result { let logging_targets = vec![ ("ant_node_manager".to_string(), Level::TRACE), - ("safenode_manager".to_string(), Level::TRACE), - ("safenodemand".to_string(), Level::TRACE), + ("antctl".to_string(), Level::TRACE), + ("antctld".to_string(), Level::TRACE), ("ant_service_management".to_string(), Level::TRACE), ]; let timestamp = chrono::Local::now().format("%Y-%m-%d_%H-%M-%S").to_string(); let output_dest = dirs_next::data_dir() .ok_or_else(|| eyre!("Could not obtain user data directory"))? - .join("safe") - .join("safenodemand") + .join("autonomi") + .join("antctld") .join("logs") .join(format!("log_{timestamp}")); diff --git a/ant-node-manager/src/cmd/auditor.rs b/ant-node-manager/src/cmd/auditor.rs index 56812f5ae2..92061c1e20 100644 --- a/ant-node-manager/src/cmd/auditor.rs +++ b/ant-node-manager/src/cmd/auditor.rs @@ -6,91 +6,28 @@ // KIND, either express or implied. Please review the Licences for the specific language governing // permissions and limitations relating to use of the SAFE Network Software. -use super::{download_and_get_upgrade_bin_path, print_upgrade_summary}; use crate::{ - add_services::{add_auditor, config::AddAuditorServiceOptions}, config::{self, is_running_as_root}, - helpers::{download_and_extract_release, get_bin_version}, print_banner, ServiceManager, VerbosityLevel, }; use ant_peers_acquisition::PeersArgs; -use ant_service_management::{ - auditor::AuditorService, - control::{ServiceControl, ServiceController}, - NodeRegistry, UpgradeOptions, -}; +use ant_service_management::{auditor::AuditorService, control::ServiceController, NodeRegistry}; use color_eyre::{eyre::eyre, Result}; -use colored::Colorize; -use semver::Version; -use sn_releases::{ReleaseType, SafeReleaseRepoActions}; use std::path::PathBuf; #[expect(clippy::too_many_arguments)] pub async fn add( - beta_encryption_key: Option, - env_variables: Option>, - log_dir_path: Option, - peers_args: PeersArgs, - src_path: Option, - url: Option, - version: Option, - verbosity: VerbosityLevel, + _beta_encryption_key: Option, + _env_variables: Option>, + _log_dir_path: Option, + _peers_args: PeersArgs, + _src_path: Option, + _url: Option, + _version: Option, + _verbosity: VerbosityLevel, ) -> Result<()> { - if !is_running_as_root() { - error!("The auditor add command must run as the root user"); - return Err(eyre!("The add command must run as the root user")); - } - - if verbosity != VerbosityLevel::Minimal { - print_banner("Add Auditor Service"); - } - - let service_user = "safe"; - let service_manager = ServiceController {}; - service_manager.create_service_user(service_user)?; - - let service_log_dir_path = config::get_service_log_dir_path( - ReleaseType::SnAuditor, - log_dir_path, - Some(service_user.to_string()), - )?; - - let mut node_registry = NodeRegistry::load(&config::get_node_registry_path()?)?; - let release_repo = ::default_config(); - - let (auditor_src_bin_path, version) = if let Some(path) = src_path { - let version = get_bin_version(&path)?; - (path, version) - } else { - download_and_extract_release( - ReleaseType::SnAuditor, - url.clone(), - version, - &*release_repo, - verbosity, - None, - ) - .await? - }; - - info!("Adding auditor service"); - add_auditor( - AddAuditorServiceOptions { - auditor_src_bin_path, - auditor_install_bin_path: PathBuf::from("/usr/local/bin/auditor"), - beta_encryption_key, - bootstrap_peers: peers_args.get_peers().await?, - env_variables, - service_log_dir_path, - user: service_user.to_string(), - version, - }, - &mut node_registry, - &service_manager, - verbosity, - )?; - - Ok(()) + // TODO: The whole subcommand for the auditor should be removed when we have some time. + panic!("The auditor service is no longer supported"); } pub async fn start(verbosity: VerbosityLevel) -> Result<()> { @@ -148,77 +85,13 @@ pub async fn stop(verbosity: VerbosityLevel) -> Result<()> { } pub async fn upgrade( - do_not_start: bool, - force: bool, - provided_env_variables: Option>, - url: Option, - version: Option, - verbosity: VerbosityLevel, + _do_not_start: bool, + _force: bool, + _provided_env_variables: Option>, + _url: Option, + _version: Option, + _verbosity: VerbosityLevel, ) -> Result<()> { - if !is_running_as_root() { - return Err(eyre!("The upgrade command must run as the root user")); - } - - let mut node_registry = NodeRegistry::load(&config::get_node_registry_path()?)?; - if node_registry.auditor.is_none() { - println!("No auditor service has been created yet. No upgrade required."); - return Ok(()); - } - - if verbosity != VerbosityLevel::Minimal { - print_banner("Upgrade Auditor Service"); - } - info!("Upgrading the auditor service"); - - let (upgrade_bin_path, target_version) = - download_and_get_upgrade_bin_path(None, ReleaseType::SnAuditor, url, version, verbosity) - .await?; - let auditor = node_registry.auditor.as_mut().unwrap(); - debug!( - "Current version {:?}, target version {target_version:?}", - auditor.version, - ); - - if !force { - let current_version = Version::parse(&auditor.version)?; - if target_version <= current_version { - info!("The auditor is already at the latest version, do nothing."); - println!( - "{} The auditor is already at the latest version", - "✓".green() - ); - return Ok(()); - } - } - - let env_variables = if provided_env_variables.is_some() { - &provided_env_variables - } else { - &node_registry.environment_variables - }; - let options = UpgradeOptions { - auto_restart: true, - bootstrap_peers: node_registry.bootstrap_peers.clone(), - env_variables: env_variables.clone(), - force, - start_service: !do_not_start, - target_bin_path: upgrade_bin_path.clone(), - target_version: target_version.clone(), - }; - let service = AuditorService::new(auditor, Box::new(ServiceController {})); - let mut service_manager = - ServiceManager::new(service, Box::new(ServiceController {}), verbosity); - - match service_manager.upgrade(options).await { - Ok(upgrade_result) => { - info!("Upgrade the auditor service successfully"); - print_upgrade_summary(vec![("auditor".to_string(), upgrade_result)]); - node_registry.save()?; - Ok(()) - } - Err(e) => { - error!("Failed to upgrade the auditor service: {e:?}",); - Err(eyre!("Upgrade failed: {e}")) - } - } + // TODO: The whole subcommand for the auditor should be removed when we have some time. + panic!("The auditor service is no longer supported"); } diff --git a/ant-node-manager/src/cmd/daemon.rs b/ant-node-manager/src/cmd/daemon.rs index 5fc7d6c0fa..fe430cc656 100644 --- a/ant-node-manager/src/cmd/daemon.rs +++ b/ant-node-manager/src/cmd/daemon.rs @@ -12,12 +12,12 @@ use crate::{ helpers::{download_and_extract_release, get_bin_version}, print_banner, ServiceManager, VerbosityLevel, }; +use ant_releases::{ReleaseType, SafeReleaseRepoActions}; use ant_service_management::{ control::{ServiceControl, ServiceController}, DaemonService, NodeRegistry, }; use color_eyre::{eyre::eyre, Result}; -use sn_releases::{ReleaseType, SafeReleaseRepoActions}; use std::{net::Ipv4Addr, path::PathBuf}; pub async fn add( @@ -51,7 +51,7 @@ pub async fn add( (path, version) } else { download_and_extract_release( - ReleaseType::SafenodeManagerDaemon, + ReleaseType::AntCtlDaemon, url.clone(), version, &*release_repo, @@ -64,7 +64,7 @@ pub async fn add( info!("Adding daemon service"); // At the moment we don't have the option to provide a user for running the service. Since - // `safenodemand` requires manipulation of services, the user running it must either be root or + // `antctld` requires manipulation of services, the user running it must either be root or // have root access. For now we will just use the `root` user. The user option gets ignored on // Windows anyway, so there shouldn't be a cross-platform issue here. add_daemon( diff --git a/ant-node-manager/src/cmd/faucet.rs b/ant-node-manager/src/cmd/faucet.rs index f69813dabd..d598aed62b 100644 --- a/ant-node-manager/src/cmd/faucet.rs +++ b/ant-node-manager/src/cmd/faucet.rs @@ -6,90 +6,26 @@ // KIND, either express or implied. Please review the Licences for the specific language governing // permissions and limitations relating to use of the SAFE Network Software. -use super::{download_and_get_upgrade_bin_path, print_upgrade_summary}; -use crate::helpers::get_faucet_data_dir; use crate::{ - add_services::{add_faucet, config::AddFaucetServiceOptions}, config::{self, is_running_as_root}, - helpers::{download_and_extract_release, get_bin_version}, print_banner, ServiceManager, VerbosityLevel, }; use ant_peers_acquisition::PeersArgs; -use ant_service_management::{ - control::{ServiceControl, ServiceController}, - FaucetService, NodeRegistry, UpgradeOptions, -}; +use ant_service_management::{control::ServiceController, FaucetService, NodeRegistry}; use color_eyre::{eyre::eyre, Result}; -use colored::Colorize; -use semver::Version; -use sn_releases::{ReleaseType, SafeReleaseRepoActions}; use std::path::PathBuf; pub async fn add( - env_variables: Option>, - log_dir_path: Option, - peers_args: PeersArgs, - src_path: Option, - url: Option, - version: Option, - verbosity: VerbosityLevel, + _env_variables: Option>, + _log_dir_path: Option, + _peers_args: PeersArgs, + _src_path: Option, + _url: Option, + _version: Option, + _verbosity: VerbosityLevel, ) -> Result<()> { - if !is_running_as_root() { - error!("The faucet add command must run as the root user"); - return Err(eyre!("The add command must run as the root user")); - } - - if verbosity != VerbosityLevel::Minimal { - print_banner("Add Faucet Service"); - } - - let service_user = "safe"; - let service_manager = ServiceController {}; - service_manager.create_service_user(service_user)?; - - let service_log_dir_path = config::get_service_log_dir_path( - ReleaseType::Faucet, - log_dir_path, - Some(service_user.to_string()), - )?; - - let mut node_registry = NodeRegistry::load(&config::get_node_registry_path()?)?; - let release_repo = ::default_config(); - - let (faucet_src_bin_path, version) = if let Some(path) = src_path { - let version = get_bin_version(&path)?; - (path, version) - } else { - download_and_extract_release( - ReleaseType::Faucet, - url.clone(), - version, - &*release_repo, - verbosity, - None, - ) - .await? - }; - - info!("Adding faucet service"); - add_faucet( - AddFaucetServiceOptions { - bootstrap_peers: peers_args.get_peers().await?, - env_variables, - faucet_src_bin_path, - faucet_install_bin_path: PathBuf::from("/usr/local/bin/faucet"), - local: false, - service_data_dir_path: get_faucet_data_dir(), - service_log_dir_path, - user: service_user.to_string(), - version, - }, - &mut node_registry, - &service_manager, - verbosity, - )?; - - Ok(()) + // TODO: The whole subcommand for the auditor should be removed when we have some time. + panic!("The faucet service is no longer supported"); } pub async fn start(verbosity: VerbosityLevel) -> Result<()> { @@ -149,68 +85,13 @@ pub async fn stop(verbosity: VerbosityLevel) -> Result<()> { } pub async fn upgrade( - do_not_start: bool, - force: bool, - provided_env_variables: Option>, - url: Option, - version: Option, - verbosity: VerbosityLevel, + _do_not_start: bool, + _force: bool, + _provided_env_variables: Option>, + _url: Option, + _version: Option, + _verbosity: VerbosityLevel, ) -> Result<()> { - if !is_running_as_root() { - return Err(eyre!("The upgrade command must run as the root user")); - } - - let mut node_registry = NodeRegistry::load(&config::get_node_registry_path()?)?; - if node_registry.faucet.is_none() { - println!("No faucet service has been created yet. No upgrade required."); - return Ok(()); - } - - if verbosity != VerbosityLevel::Minimal { - print_banner("Upgrade Faucet Service"); - } - info!("Upgrading faucet service"); - - let (upgrade_bin_path, target_version) = - download_and_get_upgrade_bin_path(None, ReleaseType::Faucet, url, version, verbosity) - .await?; - let faucet = node_registry.faucet.as_mut().unwrap(); - - if !force { - let current_version = Version::parse(&faucet.version)?; - if target_version <= current_version { - println!( - "{} The faucet is already at the latest version", - "✓".green() - ); - return Ok(()); - } - } - - let env_variables = if provided_env_variables.is_some() { - &provided_env_variables - } else { - &node_registry.environment_variables - }; - let options = UpgradeOptions { - auto_restart: true, - bootstrap_peers: node_registry.bootstrap_peers.clone(), - env_variables: env_variables.clone(), - force, - start_service: !do_not_start, - target_bin_path: upgrade_bin_path.clone(), - target_version: target_version.clone(), - }; - let service = FaucetService::new(faucet, Box::new(ServiceController {})); - let mut service_manager = - ServiceManager::new(service, Box::new(ServiceController {}), verbosity); - - match service_manager.upgrade(options).await { - Ok(upgrade_result) => { - print_upgrade_summary(vec![("faucet".to_string(), upgrade_result)]); - node_registry.save()?; - Ok(()) - } - Err(e) => Err(eyre!("Upgrade failed: {e}")), - } + // TODO: The whole subcommand for the auditor should be removed when we have some time. + panic!("The faucet service is no longer supported"); } diff --git a/ant-node-manager/src/cmd/local.rs b/ant-node-manager/src/cmd/local.rs index 850b5a138f..6405f07282 100644 --- a/ant-node-manager/src/cmd/local.rs +++ b/ant-node-manager/src/cmd/local.rs @@ -17,19 +17,17 @@ use crate::{ use ant_evm::{EvmNetwork, RewardsAddress}; use ant_logging::LogFormat; use ant_peers_acquisition::PeersArgs; +use ant_releases::{ReleaseType, SafeReleaseRepoActions}; use ant_service_management::{ control::ServiceController, get_local_node_registry_path, NodeRegistry, }; use color_eyre::{eyre::eyre, Help, Report, Result}; -use sn_releases::{ReleaseType, SafeReleaseRepoActions}; use std::path::PathBuf; pub async fn join( build: bool, count: u16, enable_metrics_server: bool, - _faucet_path: Option, - _faucet_version: Option, interval: u64, metrics_port: Option, node_path: Option, @@ -62,21 +60,10 @@ pub async fn join( let release_repo = ::default_config(); - #[cfg(feature = "faucet")] - let faucet_bin_path = get_bin_path( - build, - _faucet_path, - ReleaseType::Faucet, - _faucet_version, - &*release_repo, - verbosity, - ) - .await?; - - let safenode_bin_path = get_bin_path( + let antnode_bin_path = get_bin_path( build, node_path, - ReleaseType::Safenode, + ReleaseType::AntNode, node_version, &*release_repo, verbosity, @@ -99,9 +86,8 @@ pub async fn join( }, }; let options = LocalNetworkOptions { + antnode_bin_path, enable_metrics_server, - #[cfg(feature = "faucet")] - faucet_bin_path, interval, join: true, metrics_port, @@ -111,7 +97,6 @@ pub async fn join( owner_prefix, peers, rpc_port, - safenode_bin_path, skip_validation, log_format, rewards_address, @@ -143,8 +128,6 @@ pub async fn run( clean: bool, count: u16, enable_metrics_server: bool, - _faucet_path: Option, - _faucet_version: Option, interval: u64, metrics_port: Option, node_path: Option, @@ -175,7 +158,7 @@ pub async fn run( ); let client_data_path = dirs_next::data_dir() .ok_or_else(|| eyre!("Could not obtain user's data directory"))? - .join("safe") + .join("autonomi") .join("client"); if client_data_path.is_dir() { std::fs::remove_dir_all(client_data_path)?; @@ -202,21 +185,10 @@ pub async fn run( let release_repo = ::default_config(); - #[cfg(feature = "faucet")] - let faucet_bin_path = get_bin_path( - build, - _faucet_path, - ReleaseType::Faucet, - _faucet_version, - &*release_repo, - verbosity, - ) - .await?; - - let safenode_bin_path = get_bin_path( + let antnode_bin_path = get_bin_path( build, node_path, - ReleaseType::Safenode, + ReleaseType::AntNode, node_version, &*release_repo, verbosity, @@ -224,9 +196,8 @@ pub async fn run( .await?; let options = LocalNetworkOptions { + antnode_bin_path, enable_metrics_server, - #[cfg(feature = "faucet")] - faucet_bin_path, join: false, interval, metrics_port, @@ -236,7 +207,6 @@ pub async fn run( owner_prefix, peers: None, rpc_port, - safenode_bin_path, skip_validation, log_format, rewards_address, diff --git a/ant-node-manager/src/cmd/mod.rs b/ant-node-manager/src/cmd/mod.rs index 8dc662da7a..96a5c48e5a 100644 --- a/ant-node-manager/src/cmd/mod.rs +++ b/ant-node-manager/src/cmd/mod.rs @@ -17,11 +17,11 @@ use crate::{ helpers::{download_and_extract_release, get_bin_version}, print_banner, VerbosityLevel, }; +use ant_releases::{ReleaseType, SafeReleaseRepoActions}; use ant_service_management::UpgradeResult; use color_eyre::{eyre::eyre, Result}; use colored::Colorize; use semver::Version; -use sn_releases::{ReleaseType, SafeReleaseRepoActions}; use std::{ path::PathBuf, process::{Command, Stdio}, diff --git a/ant-node-manager/src/cmd/nat_detection.rs b/ant-node-manager/src/cmd/nat_detection.rs index 20620c99ef..0e488e7ab3 100644 --- a/ant-node-manager/src/cmd/nat_detection.rs +++ b/ant-node-manager/src/cmd/nat_detection.rs @@ -10,11 +10,11 @@ use crate::{ config::get_node_registry_path, helpers::download_and_extract_release, VerbosityLevel, }; use ant_peers_acquisition::get_peers_from_url; +use ant_releases::{ReleaseType, SafeReleaseRepoActions}; use ant_service_management::{NatDetectionStatus, NodeRegistry}; use color_eyre::eyre::{bail, OptionExt, Result}; use libp2p::Multiaddr; use rand::seq::SliceRandom; -use sn_releases::{ReleaseType, SafeReleaseRepoActions}; use std::{ io::{BufRead, BufReader}, path::PathBuf, diff --git a/ant-node-manager/src/cmd/node.rs b/ant-node-manager/src/cmd/node.rs index 79506c74bb..8d6edf7e17 100644 --- a/ant-node-manager/src/cmd/node.rs +++ b/ant-node-manager/src/cmd/node.rs @@ -21,6 +21,7 @@ use crate::{ use ant_evm::{EvmNetwork, RewardsAddress}; use ant_logging::LogFormat; use ant_peers_acquisition::PeersArgs; +use ant_releases::{ReleaseType, SafeReleaseRepoActions}; use ant_service_management::{ control::{ServiceControl, ServiceController}, rpc::RpcClient, @@ -30,7 +31,6 @@ use color_eyre::{eyre::eyre, Help, Result}; use colored::Colorize; use libp2p_identity::PeerId; use semver::Version; -use sn_releases::{ReleaseType, SafeReleaseRepoActions}; use std::{cmp::Ordering, io::Write, net::Ipv4Addr, path::PathBuf, str::FromStr, time::Duration}; use tracing::debug; @@ -67,7 +67,7 @@ pub async fn add( let user_mode = !is_running_as_root(); if verbosity != VerbosityLevel::Minimal { - print_banner("Add Safenode Services"); + print_banner("Add Antnode Services"); println!("{} service(s) to be added", count.unwrap_or(1)); } @@ -82,21 +82,18 @@ pub async fn add( let service_data_dir_path = config::get_service_data_dir_path(data_dir_path, service_user.clone())?; - let service_log_dir_path = config::get_service_log_dir_path( - ReleaseType::Safenode, - log_dir_path, - service_user.clone(), - )?; + let service_log_dir_path = + config::get_service_log_dir_path(ReleaseType::AntNode, log_dir_path, service_user.clone())?; let mut node_registry = NodeRegistry::load(&config::get_node_registry_path()?)?; let release_repo = ::default_config(); - let (safenode_src_path, version) = if let Some(path) = src_path.clone() { + let (antnode_src_path, version) = if let Some(path) = src_path.clone() { let version = get_bin_version(&path)?; (path, version) } else { download_and_extract_release( - ReleaseType::Safenode, + ReleaseType::AntNode, url.clone(), version, &*release_repo, @@ -117,8 +114,8 @@ pub async fn add( // Thus make use of get_peers_exclude_network_contacts() instead of get_peers() to make sure we only // parse the --peers and SAFE_PEERS env var. - // If the `safenode` binary we're using has `network-contacts` enabled (which is the case for released binaries), - // it's fine if the service definition doesn't call `safenode` with a `--peer` argument. + // If the `antnode` binary we're using has `network-contacts` enabled (which is the case for released binaries), + // it's fine if the service definition doesn't call `antnode` with a `--peer` argument. let is_first = peers_args.first; let bootstrap_peers = match peers_args.get_peers_exclude_network_contacts().await { Ok(peers) => { @@ -142,7 +139,7 @@ pub async fn add( auto_set_nat_flags, bootstrap_peers, count, - delete_safenode_src: src_path.is_none(), + delete_antnode_src: src_path.is_none(), enable_metrics_server, evm_network: evm_network.unwrap_or(EvmNetwork::ArbitrumOne), env_variables, @@ -159,8 +156,8 @@ pub async fn add( rewards_address, rpc_address, rpc_port, - safenode_src_path, - safenode_dir_path: service_data_dir_path.clone(), + antnode_src_path, + antnode_dir_path: service_data_dir_path.clone(), service_data_dir_path, service_log_dir_path, upnp, @@ -223,9 +220,9 @@ pub async fn remove( verbosity: VerbosityLevel, ) -> Result<()> { if verbosity != VerbosityLevel::Minimal { - print_banner("Remove Safenode Services"); + print_banner("Remove Antnode Services"); } - info!("Removing safe node services with keep_dirs=({keep_directories}) for: {peer_ids:?}, {service_names:?}"); + info!("Removing antnode services with keep_dirs=({keep_directories}) for: {peer_ids:?}, {service_names:?}"); let mut node_registry = NodeRegistry::load(&config::get_node_registry_path()?)?; refresh_node_registry( @@ -271,12 +268,12 @@ pub async fn remove( pub async fn reset(force: bool, verbosity: VerbosityLevel) -> Result<()> { if verbosity != VerbosityLevel::Minimal { - print_banner("Reset Safenode Services"); + print_banner("Reset Antnode Services"); } - info!("Resetting all safenode services, with force={force}"); + info!("Resetting all antnode services, with force={force}"); if !force { - println!("WARNING: all safenode services, data, and logs will be removed."); + println!("WARNING: all antnode services, data, and logs will be removed."); println!("Do you wish to proceed? [y/n]"); std::io::stdout().flush()?; let mut input = String::new(); @@ -310,9 +307,9 @@ pub async fn start( verbosity: VerbosityLevel, ) -> Result<()> { if verbosity != VerbosityLevel::Minimal { - print_banner("Start Safenode Services"); + print_banner("Start Antnode Services"); } - info!("Starting safenode services for: {peer_ids:?}, {service_names:?}"); + info!("Starting antnode services for: {peer_ids:?}, {service_names:?}"); let mut node_registry = NodeRegistry::load(&config::get_node_registry_path()?)?; refresh_node_registry( @@ -383,7 +380,7 @@ pub async fn status(details: bool, fail: bool, json: bool) -> Result<()> { let mut node_registry = NodeRegistry::load(&config::get_node_registry_path()?)?; if !node_registry.nodes.is_empty() { if !json && !details { - print_banner("Safenode Services"); + print_banner("Antnode Services"); } status_report( &mut node_registry, @@ -406,9 +403,9 @@ pub async fn stop( verbosity: VerbosityLevel, ) -> Result<()> { if verbosity != VerbosityLevel::Minimal { - print_banner("Stop Safenode Services"); + print_banner("Stop Antnode Services"); } - info!("Stopping safenode services for: {peer_ids:?}, {service_names:?}"); + info!("Stopping antnode services for: {peer_ids:?}, {service_names:?}"); let mut node_registry = NodeRegistry::load(&config::get_node_registry_path()?)?; refresh_node_registry( @@ -478,15 +475,15 @@ pub async fn upgrade( let use_force = force || custom_bin_path.is_some(); if verbosity != VerbosityLevel::Minimal { - print_banner("Upgrade Safenode Services"); + print_banner("Upgrade Antnode Services"); } info!( - "Upgrading safenode services with use_force={use_force} for: {peer_ids:?}, {service_names:?}" + "Upgrading antnode services with use_force={use_force} for: {peer_ids:?}, {service_names:?}" ); let (upgrade_bin_path, target_version) = download_and_get_upgrade_bin_path( custom_bin_path.clone(), - ReleaseType::Safenode, + ReleaseType::AntNode, url, version, verbosity, diff --git a/ant-node-manager/src/config.rs b/ant-node-manager/src/config.rs index 64cb732e0a..f0c47f7ab2 100644 --- a/ant-node-manager/src/config.rs +++ b/ant-node-manager/src/config.rs @@ -6,18 +6,18 @@ // KIND, either express or implied. Please review the Licences for the specific language governing // permissions and limitations relating to use of the SAFE Network Software. +use ant_releases::ReleaseType; use color_eyre::{eyre::eyre, Result}; -use sn_releases::ReleaseType; use std::path::PathBuf; #[cfg(unix)] pub fn get_daemon_install_path() -> PathBuf { - PathBuf::from("/usr/local/bin/safenodemand") + PathBuf::from("/usr/local/bin/antctld") } #[cfg(windows)] pub fn get_daemon_install_path() -> PathBuf { - PathBuf::from("C:\\ProgramData\\safenodemand\\safenodemand.exe") + PathBuf::from("C:\\ProgramData\\antctld\\antctld.exe") } #[cfg(unix)] @@ -28,16 +28,18 @@ pub fn get_node_manager_path() -> Result { use std::os::unix::fs::PermissionsExt; let path = if is_running_as_root() { - let path = PathBuf::from("/var/safenode-manager/"); - debug!("Running as root, creating node_manager_path and setting perms if path doesn't exists: {path:?}"); + debug!("Running as root"); + let path = PathBuf::from("/var/antctl/"); + debug!("Creating antctl directory: {path:?}"); std::fs::create_dir_all(&path)?; let mut perm = std::fs::metadata(&path)?.permissions(); perm.set_mode(0o755); // set permissions to rwxr-xr-x std::fs::set_permissions(&path, perm)?; path } else { - let path = get_user_safenode_data_dir()?; - debug!("Running as non-root, node_manager_path is: {path:?}"); + debug!("Running as non-root"); + let path = get_user_antnode_data_dir()?; + debug!("antctl path: {path:?}"); path }; @@ -54,7 +56,7 @@ pub fn get_node_manager_path() -> Result { #[cfg(windows)] pub fn get_node_manager_path() -> Result { use std::path::Path; - let path = Path::new("C:\\ProgramData\\safenode-manager"); + let path = Path::new("C:\\ProgramData\\antctl"); debug!("Running as root, creating node_manager_path at: {path:?}"); if !path.exists() { @@ -70,24 +72,24 @@ pub fn get_node_registry_path() -> Result { let path = get_node_manager_path()?; let node_registry_path = path.join("node_registry.json"); if is_running_as_root() && !node_registry_path.exists() { - debug!("Running as root and node_registry_path doesn't exist, creating node_registry_path and setting perms at: {node_registry_path:?}"); + debug!("Running as root"); + debug!("Creating node registry path: {node_registry_path:?}"); std::fs::OpenOptions::new() .write(true) .create(true) .truncate(true) // Do not append to the file if it already exists. .open(node_registry_path.clone())?; - // Set the permissions of /var/safenode-manager/node_registry.json to rwxrwxrwx. The + // Set the permissions of /var/antctl/node_registry.json to rwxrwxrwx. The // `status` command updates the registry with the latest information it has on the // services at the time it runs. It's normally the case that service management status // operations do not require elevated privileges. If we want that to be the case, we // need to give all users the ability to write to the registry file. Everything else in - // the /var/safenode-manager directory and its subdirectories will still require - // elevated privileges. + // the /var/antctl directory and its subdirectories will still require elevated privileges. let mut perm = std::fs::metadata(node_registry_path.clone())?.permissions(); perm.set_mode(0o777); std::fs::set_permissions(node_registry_path.clone(), perm)?; } - debug!("Node registry path is: {node_registry_path:?}"); + debug!("Node registry path: {node_registry_path:?}"); Ok(node_registry_path) } @@ -95,7 +97,7 @@ pub fn get_node_registry_path() -> Result { #[cfg(windows)] pub fn get_node_registry_path() -> Result { use std::path::Path; - let path = Path::new("C:\\ProgramData\\safenode-manager"); + let path = Path::new("C:\\ProgramData\\antctl"); if !path.exists() { std::fs::create_dir_all(path)?; } @@ -121,11 +123,11 @@ pub fn get_service_data_dir_path( } None => { if owner.is_some() { - let path = PathBuf::from("/var/safenode-manager/services"); + let path = PathBuf::from("/var/antctl/services"); debug!("Using default path for service data dir: {path:?}"); path } else { - let path = get_user_safenode_data_dir()?; + let path = get_user_antnode_data_dir()?; debug!("Using user mode service data dir: {path:?}"); path } @@ -148,7 +150,7 @@ pub fn get_service_data_dir_path( p } None => { - let path = PathBuf::from("C:\\ProgramData\\safenode\\data"); + let path = PathBuf::from("C:\\ProgramData\\antctl\\data"); debug!("Using default path for service data dir: {path:?}"); path } @@ -179,7 +181,7 @@ pub fn get_service_log_dir_path( debug!("Using default path for service log dir: {path:?}"); path } else { - let path = get_user_safenode_data_dir()?; + let path = get_user_antnode_data_dir()?; debug!("Using user mode service log dir: {path:?}"); path } @@ -254,12 +256,12 @@ pub fn is_running_as_root() -> bool { std::fs::read_dir("C:\\Windows\\System32\\config").is_ok() } -pub fn get_user_safenode_data_dir() -> Result { +pub fn get_user_antnode_data_dir() -> Result { Ok(dirs_next::data_dir() .ok_or_else(|| { error!("Failed to get data_dir"); eyre!("Could not obtain user data directory") })? - .join("safe") + .join("autonomi") .join("node")) } diff --git a/ant-node-manager/src/helpers.rs b/ant-node-manager/src/helpers.rs index 892cb8a288..ebab173032 100644 --- a/ant-node-manager/src/helpers.rs +++ b/ant-node-manager/src/helpers.rs @@ -6,6 +6,7 @@ // KIND, either express or implied. Please review the Licences for the specific language governing // permissions and limitations relating to use of the SAFE Network Software. +use ant_releases::{get_running_platform, ArchiveType, ReleaseType, SafeReleaseRepoActions}; use ant_service_management::NodeServiceData; use color_eyre::{ eyre::{bail, eyre}, @@ -13,7 +14,6 @@ use color_eyre::{ }; use indicatif::{ProgressBar, ProgressStyle}; use semver::Version; -use sn_releases::{get_running_platform, ArchiveType, ReleaseType, SafeReleaseRepoActions}; use std::{ io::Read, path::{Path, PathBuf}, @@ -29,7 +29,7 @@ const MAX_DOWNLOAD_RETRIES: u8 = 3; // Otherwise the test instances will not be able to find the same faucet instance. pub fn get_faucet_data_dir() -> PathBuf { let mut data_dirs = dirs_next::data_dir().expect("A homedir to exist."); - data_dirs.push("safe"); + data_dirs.push("autonomi"); data_dirs.push("test_faucet"); std::fs::create_dir_all(data_dirs.as_path()) .expect("Faucet test path to be successfully created."); diff --git a/ant-node-manager/src/lib.rs b/ant-node-manager/src/lib.rs index 0b8f5a3cf5..59552b995c 100644 --- a/ant-node-manager/src/lib.rs +++ b/ant-node-manager/src/lib.rs @@ -50,7 +50,7 @@ use semver::Version; use tracing::debug; pub const DAEMON_DEFAULT_PORT: u16 = 12500; -pub const DAEMON_SERVICE_NAME: &str = "safenodemand"; +pub const DAEMON_SERVICE_NAME: &str = "antctld"; const RPC_START_UP_DELAY_MS: u64 = 3000; @@ -106,7 +106,7 @@ impl ServiceManager { // This is an attempt to see whether the service process has actually launched. You don't // always get an error from the service infrastructure. // - // There might be many different `safenode` processes running, but since each service has + // There might be many different `antnode` processes running, but since each service has // its own isolated binary, we use the binary path to uniquely identify it. match self .service_control @@ -410,7 +410,7 @@ pub async fn status_report( ); println!("Data path: {}", node.data_dir_path.to_string_lossy()); println!("Log path: {}", node.log_dir_path.to_string_lossy()); - println!("Bin path: {}", node.safenode_path.to_string_lossy()); + println!("Bin path: {}", node.antnode_path.to_string_lossy()); println!( "Connected peers: {}", node.connected_peers @@ -709,7 +709,7 @@ mod tests { mock_service_control .expect_start() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); mock_service_control @@ -719,9 +719,7 @@ mod tests { .returning(|_| ()); mock_service_control .expect_get_process_pid() - .with(eq(PathBuf::from( - "/var/safenode-manager/services/safenode1/safenode", - ))) + .with(eq(PathBuf::from("/var/antctl/services/antnode1/antnode"))) .times(1) .returning(|_| Ok(1000)); @@ -729,8 +727,8 @@ mod tests { Ok(NodeInfo { pid: 1000, peer_id: PeerId::from_str("12D3KooWS2tpXGGTmg2AHFiDh57yPQnat49YHnyqoggzXZWpqkCR")?, - data_path: PathBuf::from("/var/safenode-manager/services/safenode1"), - log_path: PathBuf::from("/var/log/safenode/safenode1"), + data_path: PathBuf::from("/var/antctl/services/antnode1"), + log_path: PathBuf::from("/var/log/antnode/antnode1"), version: "0.98.1".to_string(), uptime: std::time::Duration::from_secs(1), // the service was just started wallet_balance: 0, @@ -751,7 +749,7 @@ mod tests { let mut service_data = NodeServiceData { auto_restart: false, connected_peers: None, - data_dir_path: PathBuf::from("/var/safenode-manager/services/safenode1"), + data_dir_path: PathBuf::from("/var/antctl/services/antnode1"), evm_network: EvmNetwork::Custom(CustomNetwork { rpc_url_http: "http://localhost:8545".parse()?, payment_token_address: RewardsAddress::from_str( @@ -765,7 +763,7 @@ mod tests { home_network: false, listen_addr: None, local: false, - log_dir_path: PathBuf::from("/var/log/safenode/safenode1"), + log_dir_path: PathBuf::from("/var/log/antnode/antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, @@ -781,8 +779,8 @@ mod tests { )?, reward_balance: Some(AttoTokens::zero()), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: PathBuf::from("/var/safenode-manager/services/safenode1/safenode"), - service_name: "safenode1".to_string(), + antnode_path: PathBuf::from("/var/antctl/services/antnode1/antnode"), + service_name: "antnode1".to_string(), status: ServiceStatus::Added, upnp: false, user: Some("safe".to_string()), @@ -827,7 +825,7 @@ mod tests { mock_service_control .expect_start() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); mock_service_control @@ -837,9 +835,7 @@ mod tests { .returning(|_| ()); mock_service_control .expect_get_process_pid() - .with(eq(PathBuf::from( - "/var/safenode-manager/services/safenode1/safenode", - ))) + .with(eq(PathBuf::from("/var/antctl/services/antnode1/antnode"))) .times(1) .returning(|_| Ok(1000)); @@ -847,8 +843,8 @@ mod tests { Ok(NodeInfo { pid: 1000, peer_id: PeerId::from_str("12D3KooWS2tpXGGTmg2AHFiDh57yPQnat49YHnyqoggzXZWpqkCR")?, - data_path: PathBuf::from("/var/safenode-manager/services/safenode1"), - log_path: PathBuf::from("/var/log/safenode/safenode1"), + data_path: PathBuf::from("/var/antctl/services/antnode1"), + log_path: PathBuf::from("/var/log/antnode/antnode1"), version: "0.98.1".to_string(), uptime: std::time::Duration::from_secs(1), // the service was just started wallet_balance: 0, @@ -867,7 +863,7 @@ mod tests { let mut service_data = NodeServiceData { auto_restart: false, connected_peers: None, - data_dir_path: PathBuf::from("/var/safenode-manager/services/safenode1"), + data_dir_path: PathBuf::from("/var/antctl/services/antnode1"), evm_network: EvmNetwork::Custom(CustomNetwork { rpc_url_http: "http://localhost:8545".parse()?, payment_token_address: RewardsAddress::from_str( @@ -881,7 +877,7 @@ mod tests { home_network: false, listen_addr: None, local: false, - log_dir_path: PathBuf::from("/var/log/safenode/safenode1"), + log_dir_path: PathBuf::from("/var/log/antnode/antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, @@ -899,8 +895,8 @@ mod tests { )?, reward_balance: Some(AttoTokens::zero()), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: PathBuf::from("/var/safenode-manager/services/safenode1/safenode"), - service_name: "safenode1".to_string(), + antnode_path: PathBuf::from("/var/antctl/services/antnode1/antnode"), + service_name: "antnode1".to_string(), status: ServiceStatus::Stopped, upnp: false, user: Some("safe".to_string()), @@ -939,16 +935,14 @@ mod tests { mock_service_control .expect_get_process_pid() - .with(eq(PathBuf::from( - "/var/safenode-manager/services/safenode1/safenode", - ))) + .with(eq(PathBuf::from("/var/antctl/services/antnode1/antnode"))) .times(1) .returning(|_| Ok(100)); let mut service_data = NodeServiceData { auto_restart: false, connected_peers: None, - data_dir_path: PathBuf::from("/var/safenode-manager/services/safenode1"), + data_dir_path: PathBuf::from("/var/antctl/services/antnode1"), evm_network: EvmNetwork::Custom(CustomNetwork { rpc_url_http: "http://localhost:8545".parse()?, payment_token_address: RewardsAddress::from_str( @@ -962,7 +956,7 @@ mod tests { home_network: false, listen_addr: None, local: false, - log_dir_path: PathBuf::from("/var/log/safenode/safenode1"), + log_dir_path: PathBuf::from("/var/log/antnode/antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, @@ -980,8 +974,8 @@ mod tests { )?, reward_balance: Some(AttoTokens::zero()), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: PathBuf::from("/var/safenode-manager/services/safenode1/safenode"), - service_name: "safenode1".to_string(), + antnode_path: PathBuf::from("/var/antctl/services/antnode1/antnode"), + service_name: "antnode1".to_string(), status: ServiceStatus::Running, upnp: false, user: Some("safe".to_string()), @@ -1020,19 +1014,16 @@ mod tests { mock_service_control .expect_get_process_pid() - .with(eq(PathBuf::from( - "/var/safenode-manager/services/safenode1/safenode", - ))) + .with(eq(PathBuf::from("/var/antctl/services/antnode1/antnode"))) .times(1) .returning(|_| { Err(ServiceError::ServiceProcessNotFound( - "Could not find process at '/var/safenode-manager/services/safenode1/safenode'" - .to_string(), + "Could not find process at '/var/antctl/services/antnode1/antnode'".to_string(), )) }); mock_service_control .expect_start() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); mock_service_control @@ -1042,9 +1033,7 @@ mod tests { .returning(|_| ()); mock_service_control .expect_get_process_pid() - .with(eq(PathBuf::from( - "/var/safenode-manager/services/safenode1/safenode", - ))) + .with(eq(PathBuf::from("/var/antctl/services/antnode1/antnode"))) .times(1) .returning(|_| Ok(1000)); @@ -1052,8 +1041,8 @@ mod tests { Ok(NodeInfo { pid: 1000, peer_id: PeerId::from_str("12D3KooWS2tpXGGTmg2AHFiDh57yPQnat49YHnyqoggzXZWpqkCR")?, - data_path: PathBuf::from("/var/safenode-manager/services/safenode1"), - log_path: PathBuf::from("/var/log/safenode/safenode1"), + data_path: PathBuf::from("/var/antctl/services/antnode1"), + log_path: PathBuf::from("/var/log/antnode/antnode1"), version: "0.98.1".to_string(), uptime: std::time::Duration::from_secs(1), // the service was just started wallet_balance: 0, @@ -1072,7 +1061,7 @@ mod tests { let mut service_data = NodeServiceData { auto_restart: false, connected_peers: None, - data_dir_path: PathBuf::from("/var/safenode-manager/services/safenode1"), + data_dir_path: PathBuf::from("/var/antctl/services/antnode1"), evm_network: EvmNetwork::Custom(CustomNetwork { rpc_url_http: "http://localhost:8545".parse()?, payment_token_address: RewardsAddress::from_str( @@ -1086,7 +1075,7 @@ mod tests { home_network: false, listen_addr: None, local: false, - log_dir_path: PathBuf::from("/var/log/safenode/safenode1"), + log_dir_path: PathBuf::from("/var/log/antnode/antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, @@ -1104,8 +1093,8 @@ mod tests { )?, reward_balance: Some(AttoTokens::zero()), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: PathBuf::from("/var/safenode-manager/services/safenode1/safenode"), - service_name: "safenode1".to_string(), + antnode_path: PathBuf::from("/var/antctl/services/antnode1/antnode"), + service_name: "antnode1".to_string(), status: ServiceStatus::Running, upnp: false, user: Some("safe".to_string()), @@ -1143,7 +1132,7 @@ mod tests { mock_service_control .expect_start() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); mock_service_control @@ -1153,20 +1142,18 @@ mod tests { .returning(|_| ()); mock_service_control .expect_get_process_pid() - .with(eq(PathBuf::from( - "/var/safenode-manager/services/safenode1/safenode", - ))) + .with(eq(PathBuf::from("/var/antctl/services/antnode1/antnode"))) .times(1) .returning(|_| { Err(ServiceControlError::ServiceProcessNotFound( - "/var/safenode-manager/services/safenode1/safenode".to_string(), + "/var/antctl/services/antnode1/antnode".to_string(), )) }); let mut service_data = NodeServiceData { auto_restart: false, connected_peers: None, - data_dir_path: PathBuf::from("/var/safenode-manager/services/safenode1"), + data_dir_path: PathBuf::from("/var/antctl/services/antnode1"), evm_network: EvmNetwork::Custom(CustomNetwork { rpc_url_http: "http://localhost:8545".parse()?, payment_token_address: RewardsAddress::from_str( @@ -1180,7 +1167,7 @@ mod tests { home_network: false, listen_addr: None, local: false, - log_dir_path: PathBuf::from("/var/log/safenode/safenode1"), + log_dir_path: PathBuf::from("/var/log/antnode/antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, @@ -1196,8 +1183,8 @@ mod tests { )?, reward_balance: Some(AttoTokens::zero()), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: PathBuf::from("/var/safenode-manager/services/safenode1/safenode"), - service_name: "safenode1".to_string(), + antnode_path: PathBuf::from("/var/antctl/services/antnode1/antnode"), + service_name: "antnode1".to_string(), status: ServiceStatus::Added, upnp: false, user: Some("safe".to_string()), @@ -1230,7 +1217,7 @@ mod tests { mock_service_control .expect_start() - .with(eq("safenode1"), eq(true)) + .with(eq("antnode1"), eq(true)) .times(1) .returning(|_, _| Ok(())); mock_service_control @@ -1240,9 +1227,7 @@ mod tests { .returning(|_| ()); mock_service_control .expect_get_process_pid() - .with(eq(PathBuf::from( - "/var/safenode-manager/services/safenode1/safenode", - ))) + .with(eq(PathBuf::from("/var/antctl/services/antnode1/antnode"))) .times(1) .returning(|_| Ok(100)); @@ -1250,8 +1235,8 @@ mod tests { Ok(NodeInfo { pid: 1000, peer_id: PeerId::from_str("12D3KooWS2tpXGGTmg2AHFiDh57yPQnat49YHnyqoggzXZWpqkCR")?, - data_path: PathBuf::from("/var/safenode-manager/services/safenode1"), - log_path: PathBuf::from("/var/log/safenode/safenode1"), + data_path: PathBuf::from("/var/antctl/services/antnode1"), + log_path: PathBuf::from("/var/log/antnode/antnode1"), version: "0.98.1".to_string(), uptime: std::time::Duration::from_secs(1), // the service was just started wallet_balance: 0, @@ -1270,7 +1255,7 @@ mod tests { let mut service_data = NodeServiceData { auto_restart: false, connected_peers: None, - data_dir_path: PathBuf::from("/var/safenode-manager/services/safenode1"), + data_dir_path: PathBuf::from("/var/antctl/services/antnode1"), evm_network: EvmNetwork::Custom(CustomNetwork { rpc_url_http: "http://localhost:8545".parse()?, payment_token_address: RewardsAddress::from_str( @@ -1284,7 +1269,7 @@ mod tests { home_network: false, listen_addr: None, local: false, - log_dir_path: PathBuf::from("/var/log/safenode/safenode1"), + log_dir_path: PathBuf::from("/var/log/antnode/antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, @@ -1300,8 +1285,8 @@ mod tests { )?, reward_balance: Some(AttoTokens::zero()), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: PathBuf::from("/var/safenode-manager/services/safenode1/safenode"), - service_name: "safenode1".to_string(), + antnode_path: PathBuf::from("/var/antctl/services/antnode1/antnode"), + service_name: "antnode1".to_string(), status: ServiceStatus::Added, upnp: false, user: Some("safe".to_string()), @@ -1328,7 +1313,7 @@ mod tests { mock_service_control .expect_start() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); mock_service_control @@ -1338,9 +1323,7 @@ mod tests { .returning(|_| ()); mock_service_control .expect_get_process_pid() - .with(eq(PathBuf::from( - "/var/safenode-manager/services/safenode1/safenode", - ))) + .with(eq(PathBuf::from("/var/antctl/services/antnode1/antnode"))) .times(1) .returning(|_| Ok(1000)); mock_rpc_client @@ -1351,8 +1334,8 @@ mod tests { Ok(NodeInfo { pid: 1000, peer_id: PeerId::from_str("12D3KooWS2tpXGGTmg2AHFiDh57yPQnat49YHnyqoggzXZWpqkCR")?, - data_path: PathBuf::from("/var/safenode-manager/services/safenode1"), - log_path: PathBuf::from("/var/log/safenode/safenode1"), + data_path: PathBuf::from("/var/antctl/services/antnode1"), + log_path: PathBuf::from("/var/log/antnode/antnode1"), version: "0.98.1".to_string(), uptime: std::time::Duration::from_secs(1), // the service was just started wallet_balance: 0, @@ -1373,7 +1356,7 @@ mod tests { let mut service_data = NodeServiceData { auto_restart: false, connected_peers: None, - data_dir_path: PathBuf::from("/var/safenode-manager/services/safenode1"), + data_dir_path: PathBuf::from("/var/antctl/services/antnode1"), evm_network: EvmNetwork::Custom(CustomNetwork { rpc_url_http: "http://localhost:8545".parse()?, payment_token_address: RewardsAddress::from_str( @@ -1387,7 +1370,7 @@ mod tests { home_network: false, listen_addr: None, local: false, - log_dir_path: PathBuf::from("/var/log/safenode/safenode1"), + log_dir_path: PathBuf::from("/var/log/antnode/antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, @@ -1403,8 +1386,8 @@ mod tests { )?, reward_balance: Some(AttoTokens::zero()), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: PathBuf::from("/var/safenode-manager/services/safenode1/safenode"), - service_name: "safenode1".to_string(), + antnode_path: PathBuf::from("/var/antctl/services/antnode1/antnode"), + service_name: "antnode1".to_string(), status: ServiceStatus::Added, upnp: false, user: Some("safe".to_string()), @@ -1432,21 +1415,19 @@ mod tests { mock_service_control .expect_stop() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); mock_service_control .expect_get_process_pid() - .with(eq(PathBuf::from( - "/var/safenode-manager/services/safenode1/safenode", - ))) + .with(eq(PathBuf::from("/var/antctl/services/antnode1/antnode"))) .times(1) .returning(|_| Ok(100)); let mut service_data = NodeServiceData { auto_restart: false, connected_peers: None, - data_dir_path: PathBuf::from("/var/safenode-manager/services/safenode1"), + data_dir_path: PathBuf::from("/var/antctl/services/antnode1"), evm_network: EvmNetwork::Custom(CustomNetwork { rpc_url_http: "http://localhost:8545".parse()?, payment_token_address: RewardsAddress::from_str( @@ -1460,7 +1441,7 @@ mod tests { home_network: false, listen_addr: None, local: false, - log_dir_path: PathBuf::from("/var/log/safenode/safenode1"), + log_dir_path: PathBuf::from("/var/log/antnode/antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, @@ -1478,8 +1459,8 @@ mod tests { )?, reward_balance: Some(AttoTokens::zero()), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: PathBuf::from("/var/safenode-manager/services/safenode1/safenode"), - service_name: "safenode1".to_string(), + antnode_path: PathBuf::from("/var/antctl/services/antnode1/antnode"), + service_name: "antnode1".to_string(), status: ServiceStatus::Running, upnp: false, user: Some("safe".to_string()), @@ -1509,7 +1490,7 @@ mod tests { let mut service_data = NodeServiceData { auto_restart: false, connected_peers: None, - data_dir_path: PathBuf::from("/var/safenode-manager/services/safenode1"), + data_dir_path: PathBuf::from("/var/antctl/services/antnode1"), evm_network: EvmNetwork::Custom(CustomNetwork { rpc_url_http: "http://localhost:8545".parse()?, payment_token_address: RewardsAddress::from_str( @@ -1523,7 +1504,7 @@ mod tests { home_network: false, listen_addr: None, local: false, - log_dir_path: PathBuf::from("/var/log/safenode/safenode1"), + log_dir_path: PathBuf::from("/var/log/antnode/antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, @@ -1539,8 +1520,8 @@ mod tests { )?, reward_balance: Some(AttoTokens::zero()), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: PathBuf::from("/var/safenode-manager/services/safenode1/safenode"), - service_name: "safenode1".to_string(), + antnode_path: PathBuf::from("/var/antctl/services/antnode1/antnode"), + service_name: "antnode1".to_string(), status: ServiceStatus::Added, upnp: false, user: Some("safe".to_string()), @@ -1570,7 +1551,7 @@ mod tests { let mut service_data = NodeServiceData { auto_restart: false, connected_peers: None, - data_dir_path: PathBuf::from("/var/safenode-manager/services/safenode1"), + data_dir_path: PathBuf::from("/var/antctl/services/antnode1"), evm_network: EvmNetwork::Custom(CustomNetwork { rpc_url_http: "http://localhost:8545".parse()?, payment_token_address: RewardsAddress::from_str( @@ -1584,7 +1565,7 @@ mod tests { home_network: false, listen_addr: None, local: false, - log_dir_path: PathBuf::from("/var/log/safenode/safenode1"), + log_dir_path: PathBuf::from("/var/log/antnode/antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, @@ -1602,8 +1583,8 @@ mod tests { )?, reward_balance: Some(AttoTokens::zero()), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: PathBuf::from("/var/safenode-manager/services/safenode1/safenode"), - service_name: "safenode1".to_string(), + antnode_path: PathBuf::from("/var/antctl/services/antnode1/antnode"), + service_name: "antnode1".to_string(), status: ServiceStatus::Stopped, upnp: false, user: Some("safe".to_string()), @@ -1634,7 +1615,7 @@ mod tests { let mut service_data = NodeServiceData { auto_restart: false, connected_peers: None, - data_dir_path: PathBuf::from("/var/safenode-manager/services/safenode1"), + data_dir_path: PathBuf::from("/var/antctl/services/antnode1"), evm_network: EvmNetwork::Custom(CustomNetwork { rpc_url_http: "http://localhost:8545".parse()?, payment_token_address: RewardsAddress::from_str( @@ -1648,7 +1629,7 @@ mod tests { home_network: false, listen_addr: None, local: false, - log_dir_path: PathBuf::from("/var/log/safenode/safenode1"), + log_dir_path: PathBuf::from("/var/log/antnode/antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, @@ -1664,8 +1645,8 @@ mod tests { )?, reward_balance: Some(AttoTokens::zero()), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: PathBuf::from("/var/safenode-manager/services/safenode1/safenode"), - service_name: "safenode1".to_string(), + antnode_path: PathBuf::from("/var/antctl/services/antnode1/antnode"), + service_name: "antnode1".to_string(), status: ServiceStatus::Removed, upnp: false, user: Some("safe".to_string()), @@ -1697,21 +1678,19 @@ mod tests { mock_service_control .expect_stop() - .with(eq("safenode1"), eq(true)) + .with(eq("antnode1"), eq(true)) .times(1) .returning(|_, _| Ok(())); mock_service_control .expect_get_process_pid() - .with(eq(PathBuf::from( - "/var/safenode-manager/services/safenode1/safenode", - ))) + .with(eq(PathBuf::from("/var/antctl/services/antnode1/antnode"))) .times(1) .returning(|_| Ok(100)); let mut service_data = NodeServiceData { auto_restart: false, connected_peers: None, - data_dir_path: PathBuf::from("/var/safenode-manager/services/safenode1"), + data_dir_path: PathBuf::from("/var/antctl/services/antnode1"), evm_network: EvmNetwork::Custom(CustomNetwork { rpc_url_http: "http://localhost:8545".parse()?, payment_token_address: RewardsAddress::from_str( @@ -1725,7 +1704,7 @@ mod tests { home_network: false, listen_addr: None, local: false, - log_dir_path: PathBuf::from("/var/log/safenode/safenode1"), + log_dir_path: PathBuf::from("/var/log/antnode/antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, @@ -1743,8 +1722,8 @@ mod tests { )?, reward_balance: Some(AttoTokens::zero()), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: PathBuf::from("/var/safenode-manager/services/safenode1/safenode"), - service_name: "safenode1".to_string(), + antnode_path: PathBuf::from("/var/antctl/services/antnode1/antnode"), + service_name: "antnode1".to_string(), status: ServiceStatus::Running, upnp: false, user: None, @@ -1775,13 +1754,13 @@ mod tests { let target_version = "0.2.0"; let tmp_data_dir = assert_fs::TempDir::new()?; - let current_install_dir = tmp_data_dir.child("safenode_install"); + let current_install_dir = tmp_data_dir.child("antnode_install"); current_install_dir.create_dir_all()?; - let current_node_bin = current_install_dir.child("safenode"); - current_node_bin.write_binary(b"fake safenode binary")?; - let target_node_bin = tmp_data_dir.child("safenode"); - target_node_bin.write_binary(b"fake safenode binary")?; + let current_node_bin = current_install_dir.child("antnode"); + current_node_bin.write_binary(b"fake antnode binary")?; + let target_node_bin = tmp_data_dir.child("antnode"); + target_node_bin.write_binary(b"fake antnode binary")?; let mut mock_service_control = MockServiceControl::new(); let mut mock_rpc_client = MockRpcClient::new(); @@ -1794,14 +1773,14 @@ mod tests { .returning(|_| Ok(1000)); mock_service_control .expect_stop() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); // after binary upgrade mock_service_control .expect_uninstall() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); mock_service_control @@ -1813,7 +1792,7 @@ mod tests { // after service restart mock_service_control .expect_start() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); mock_service_control @@ -1831,8 +1810,8 @@ mod tests { Ok(NodeInfo { pid: 2000, peer_id: PeerId::from_str("12D3KooWS2tpXGGTmg2AHFiDh57yPQnat49YHnyqoggzXZWpqkCR")?, - data_path: PathBuf::from("/var/safenode-manager/services/safenode1"), - log_path: PathBuf::from("/var/log/safenode/safenode1"), + data_path: PathBuf::from("/var/antctl/services/antnode1"), + log_path: PathBuf::from("/var/log/antnode/antnode1"), version: target_version.to_string(), uptime: std::time::Duration::from_secs(1), // the service was just started wallet_balance: 0, @@ -1851,7 +1830,7 @@ mod tests { let mut service_data = NodeServiceData { auto_restart: false, connected_peers: None, - data_dir_path: PathBuf::from("/var/safenode-manager/services/safenode1"), + data_dir_path: PathBuf::from("/var/antctl/services/antnode1"), evm_network: EvmNetwork::Custom(CustomNetwork { rpc_url_http: "http://localhost:8545".parse()?, payment_token_address: RewardsAddress::from_str( @@ -1865,7 +1844,7 @@ mod tests { home_network: false, listen_addr: None, local: false, - log_dir_path: PathBuf::from("/var/log/safenode/safenode1"), + log_dir_path: PathBuf::from("/var/log/antnode/antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, @@ -1883,8 +1862,8 @@ mod tests { )?, reward_balance: Some(AttoTokens::zero()), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: current_node_bin.to_path_buf(), - service_name: "safenode1".to_string(), + antnode_path: current_node_bin.to_path_buf(), + service_name: "antnode1".to_string(), status: ServiceStatus::Running, upnp: false, user: Some("safe".to_string()), @@ -1939,13 +1918,13 @@ mod tests { let target_version = "0.1.0"; let tmp_data_dir = assert_fs::TempDir::new()?; - let current_install_dir = tmp_data_dir.child("safenode_install"); + let current_install_dir = tmp_data_dir.child("antnode_install"); current_install_dir.create_dir_all()?; - let current_node_bin = current_install_dir.child("safenode"); - current_node_bin.write_binary(b"fake safenode binary")?; - let target_node_bin = tmp_data_dir.child("safenode"); - target_node_bin.write_binary(b"fake safenode binary")?; + let current_node_bin = current_install_dir.child("antnode"); + current_node_bin.write_binary(b"fake antnode binary")?; + let target_node_bin = tmp_data_dir.child("antnode"); + target_node_bin.write_binary(b"fake antnode binary")?; let mock_service_control = MockServiceControl::new(); let mock_rpc_client = MockRpcClient::new(); @@ -1953,7 +1932,7 @@ mod tests { let mut service_data = NodeServiceData { auto_restart: false, connected_peers: None, - data_dir_path: PathBuf::from("/var/safenode-manager/services/safenode1"), + data_dir_path: PathBuf::from("/var/antctl/services/antnode1"), evm_network: EvmNetwork::Custom(CustomNetwork { rpc_url_http: "http://localhost:8545".parse()?, payment_token_address: RewardsAddress::from_str( @@ -1967,7 +1946,7 @@ mod tests { home_network: false, listen_addr: None, local: false, - log_dir_path: PathBuf::from("/var/log/safenode/safenode1"), + log_dir_path: PathBuf::from("/var/log/antnode/antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, @@ -1985,8 +1964,8 @@ mod tests { )?, reward_balance: Some(AttoTokens::zero()), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: current_node_bin.to_path_buf(), - service_name: "safenode1".to_string(), + antnode_path: current_node_bin.to_path_buf(), + service_name: "antnode1".to_string(), status: ServiceStatus::Running, upnp: false, user: Some("safe".to_string()), @@ -2024,13 +2003,13 @@ mod tests { let target_version = "0.2.0"; let tmp_data_dir = assert_fs::TempDir::new()?; - let current_install_dir = tmp_data_dir.child("safenode_install"); + let current_install_dir = tmp_data_dir.child("antnode_install"); current_install_dir.create_dir_all()?; - let current_node_bin = current_install_dir.child("safenode"); - current_node_bin.write_binary(b"fake safenode binary")?; - let target_node_bin = tmp_data_dir.child("safenode"); - target_node_bin.write_binary(b"fake safenode binary")?; + let current_node_bin = current_install_dir.child("antnode"); + current_node_bin.write_binary(b"fake antnode binary")?; + let target_node_bin = tmp_data_dir.child("antnode"); + target_node_bin.write_binary(b"fake antnode binary")?; let mut mock_service_control = MockServiceControl::new(); let mut mock_rpc_client = MockRpcClient::new(); @@ -2043,14 +2022,14 @@ mod tests { .returning(|_| Ok(1000)); mock_service_control .expect_stop() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); // after binary upgrade mock_service_control .expect_uninstall() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); mock_service_control @@ -2062,7 +2041,7 @@ mod tests { // after service restart mock_service_control .expect_start() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); mock_service_control @@ -2080,8 +2059,8 @@ mod tests { Ok(NodeInfo { pid: 2000, peer_id: PeerId::from_str("12D3KooWS2tpXGGTmg2AHFiDh57yPQnat49YHnyqoggzXZWpqkCR")?, - data_path: PathBuf::from("/var/safenode-manager/services/safenode1"), - log_path: PathBuf::from("/var/log/safenode/safenode1"), + data_path: PathBuf::from("/var/antctl/services/antnode1"), + log_path: PathBuf::from("/var/log/antnode/antnode1"), version: target_version.to_string(), uptime: std::time::Duration::from_secs(1), // the service was just started wallet_balance: 0, @@ -2100,7 +2079,7 @@ mod tests { let mut service_data = NodeServiceData { auto_restart: false, connected_peers: None, - data_dir_path: PathBuf::from("/var/safenode-manager/services/safenode1"), + data_dir_path: PathBuf::from("/var/antctl/services/antnode1"), evm_network: EvmNetwork::Custom(CustomNetwork { rpc_url_http: "http://localhost:8545".parse()?, payment_token_address: RewardsAddress::from_str( @@ -2114,7 +2093,7 @@ mod tests { home_network: false, listen_addr: None, local: false, - log_dir_path: PathBuf::from("/var/log/safenode/safenode1"), + log_dir_path: PathBuf::from("/var/log/antnode/antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, @@ -2132,8 +2111,8 @@ mod tests { )?, reward_balance: Some(AttoTokens::zero()), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: current_node_bin.to_path_buf(), - service_name: "safenode1".to_string(), + antnode_path: current_node_bin.to_path_buf(), + service_name: "antnode1".to_string(), status: ServiceStatus::Running, upnp: false, user: Some("safe".to_string()), @@ -2189,13 +2168,13 @@ mod tests { let target_version = "0.2.0"; let tmp_data_dir = assert_fs::TempDir::new()?; - let current_install_dir = tmp_data_dir.child("safenode_install"); + let current_install_dir = tmp_data_dir.child("antnode_install"); current_install_dir.create_dir_all()?; - let current_node_bin = current_install_dir.child("safenode"); - current_node_bin.write_binary(b"fake safenode binary")?; - let target_node_bin = tmp_data_dir.child("safenode"); - target_node_bin.write_binary(b"fake safenode binary")?; + let current_node_bin = current_install_dir.child("antnode"); + current_node_bin.write_binary(b"fake antnode binary")?; + let target_node_bin = tmp_data_dir.child("antnode"); + target_node_bin.write_binary(b"fake antnode binary")?; let mut mock_service_control = MockServiceControl::new(); let mut mock_rpc_client = MockRpcClient::new(); @@ -2208,14 +2187,14 @@ mod tests { .returning(|_| Ok(1000)); mock_service_control .expect_stop() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); // after binary upgrade mock_service_control .expect_uninstall() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); mock_service_control @@ -2227,7 +2206,7 @@ mod tests { // after service restart mock_service_control .expect_start() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(0) .returning(|_, _| Ok(())); mock_service_control @@ -2239,8 +2218,8 @@ mod tests { Ok(NodeInfo { pid: 2000, peer_id: PeerId::from_str("12D3KooWS2tpXGGTmg2AHFiDh57yPQnat49YHnyqoggzXZWpqkCR")?, - data_path: PathBuf::from("/var/safenode-manager/services/safenode1"), - log_path: PathBuf::from("/var/log/safenode/safenode1"), + data_path: PathBuf::from("/var/antctl/services/antnode1"), + log_path: PathBuf::from("/var/log/antnode/antnode1"), version: target_version.to_string(), uptime: std::time::Duration::from_secs(1), // the service was just started wallet_balance: 0, @@ -2259,7 +2238,7 @@ mod tests { let mut service_data = NodeServiceData { auto_restart: false, connected_peers: None, - data_dir_path: PathBuf::from("/var/safenode-manager/services/safenode1"), + data_dir_path: PathBuf::from("/var/antctl/services/antnode1"), evm_network: EvmNetwork::Custom(CustomNetwork { rpc_url_http: "http://localhost:8545".parse()?, payment_token_address: RewardsAddress::from_str( @@ -2273,7 +2252,7 @@ mod tests { home_network: false, listen_addr: None, local: false, - log_dir_path: PathBuf::from("/var/log/safenode/safenode1"), + log_dir_path: PathBuf::from("/var/log/antnode/antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, @@ -2291,8 +2270,8 @@ mod tests { )?, reward_balance: Some(AttoTokens::zero()), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: current_node_bin.to_path_buf(), - service_name: "safenode1".to_string(), + antnode_path: current_node_bin.to_path_buf(), + service_name: "antnode1".to_string(), status: ServiceStatus::Running, upnp: false, user: Some("safe".to_string()), @@ -2353,13 +2332,13 @@ mod tests { let target_version = "0.2.0"; let tmp_data_dir = assert_fs::TempDir::new()?; - let current_install_dir = tmp_data_dir.child("safenode_install"); + let current_install_dir = tmp_data_dir.child("antnode_install"); current_install_dir.create_dir_all()?; - let current_node_bin = current_install_dir.child("safenode"); - current_node_bin.write_binary(b"fake safenode binary")?; - let target_node_bin = tmp_data_dir.child("safenode"); - target_node_bin.write_binary(b"fake safenode binary")?; + let current_node_bin = current_install_dir.child("antnode"); + current_node_bin.write_binary(b"fake antnode binary")?; + let target_node_bin = tmp_data_dir.child("antnode"); + target_node_bin.write_binary(b"fake antnode binary")?; let current_node_bin_str = current_node_bin.to_path_buf().to_string_lossy().to_string(); @@ -2373,14 +2352,14 @@ mod tests { .returning(|_| Ok(1000)); mock_service_control .expect_stop() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); // after binary upgrade mock_service_control .expect_uninstall() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); mock_service_control @@ -2392,7 +2371,7 @@ mod tests { // after service restart mock_service_control .expect_start() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); mock_service_control @@ -2413,7 +2392,7 @@ mod tests { let mut service_data = NodeServiceData { auto_restart: false, connected_peers: None, - data_dir_path: PathBuf::from("/var/safenode-manager/services/safenode1"), + data_dir_path: PathBuf::from("/var/antctl/services/antnode1"), evm_network: EvmNetwork::Custom(CustomNetwork { rpc_url_http: "http://localhost:8545".parse()?, payment_token_address: RewardsAddress::from_str( @@ -2427,7 +2406,7 @@ mod tests { home_network: false, listen_addr: None, local: false, - log_dir_path: PathBuf::from("/var/log/safenode/safenode1"), + log_dir_path: PathBuf::from("/var/log/antnode/antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, @@ -2445,8 +2424,8 @@ mod tests { )?, reward_balance: Some(AttoTokens::zero()), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: current_node_bin.to_path_buf(), - service_name: "safenode1".to_string(), + antnode_path: current_node_bin.to_path_buf(), + service_name: "antnode1".to_string(), status: ServiceStatus::Running, upnp: false, user: Some("safe".to_string()), @@ -2492,13 +2471,13 @@ mod tests { let target_version = "0.2.0"; let tmp_data_dir = assert_fs::TempDir::new()?; - let current_install_dir = tmp_data_dir.child("safenode_install"); + let current_install_dir = tmp_data_dir.child("antnode_install"); current_install_dir.create_dir_all()?; - let current_node_bin = current_install_dir.child("safenode"); - current_node_bin.write_binary(b"fake safenode binary")?; - let target_node_bin = tmp_data_dir.child("safenode"); - target_node_bin.write_binary(b"fake safenode binary")?; + let current_node_bin = current_install_dir.child("antnode"); + current_node_bin.write_binary(b"fake antnode binary")?; + let target_node_bin = tmp_data_dir.child("antnode"); + target_node_bin.write_binary(b"fake antnode binary")?; let mut mock_service_control = MockServiceControl::new(); let mut mock_rpc_client = MockRpcClient::new(); @@ -2511,14 +2490,14 @@ mod tests { .returning(|_| Ok(1000)); mock_service_control .expect_stop() - .with(eq("safenode1"), eq(true)) + .with(eq("antnode1"), eq(true)) .times(1) .returning(|_, _| Ok(())); // after binary upgrade mock_service_control .expect_uninstall() - .with(eq("safenode1"), eq(true)) + .with(eq("antnode1"), eq(true)) .times(1) .returning(|_, _| Ok(())); mock_service_control @@ -2530,7 +2509,7 @@ mod tests { // after service restart mock_service_control .expect_start() - .with(eq("safenode1"), eq(true)) + .with(eq("antnode1"), eq(true)) .times(1) .returning(|_, _| Ok(())); mock_service_control @@ -2548,8 +2527,8 @@ mod tests { Ok(NodeInfo { pid: 2000, peer_id: PeerId::from_str("12D3KooWS2tpXGGTmg2AHFiDh57yPQnat49YHnyqoggzXZWpqkCR")?, - data_path: PathBuf::from("/var/safenode-manager/services/safenode1"), - log_path: PathBuf::from("/var/log/safenode/safenode1"), + data_path: PathBuf::from("/var/antctl/services/antnode1"), + log_path: PathBuf::from("/var/log/antnode/antnode1"), version: target_version.to_string(), uptime: std::time::Duration::from_secs(1), // the service was just started wallet_balance: 0, @@ -2568,7 +2547,7 @@ mod tests { let mut service_data = NodeServiceData { auto_restart: false, connected_peers: None, - data_dir_path: PathBuf::from("/var/safenode-manager/services/safenode1"), + data_dir_path: PathBuf::from("/var/antctl/services/antnode1"), evm_network: EvmNetwork::Custom(CustomNetwork { rpc_url_http: "http://localhost:8545".parse()?, payment_token_address: RewardsAddress::from_str( @@ -2582,7 +2561,7 @@ mod tests { home_network: false, listen_addr: None, local: false, - log_dir_path: PathBuf::from("/var/log/safenode/safenode1"), + log_dir_path: PathBuf::from("/var/log/antnode/antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, @@ -2600,8 +2579,8 @@ mod tests { )?, reward_balance: Some(AttoTokens::zero()), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: current_node_bin.to_path_buf(), - service_name: "safenode1".to_string(), + antnode_path: current_node_bin.to_path_buf(), + service_name: "antnode1".to_string(), status: ServiceStatus::Running, upnp: false, user: None, @@ -2657,13 +2636,13 @@ mod tests { let target_version = "0.2.0"; let tmp_data_dir = assert_fs::TempDir::new()?; - let current_install_dir = tmp_data_dir.child("safenode_install"); + let current_install_dir = tmp_data_dir.child("antnode_install"); current_install_dir.create_dir_all()?; - let current_node_bin = current_install_dir.child("safenode"); - current_node_bin.write_binary(b"fake safenode binary")?; - let target_node_bin = tmp_data_dir.child("safenode"); - target_node_bin.write_binary(b"fake safenode binary")?; + let current_node_bin = current_install_dir.child("antnode"); + current_node_bin.write_binary(b"fake antnode binary")?; + let target_node_bin = tmp_data_dir.child("antnode"); + target_node_bin.write_binary(b"fake antnode binary")?; let mut mock_service_control = MockServiceControl::new(); let mut mock_rpc_client = MockRpcClient::new(); @@ -2676,14 +2655,14 @@ mod tests { .returning(|_| Ok(1000)); mock_service_control .expect_stop() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); // after binary upgrade mock_service_control .expect_uninstall() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); mock_service_control @@ -2694,9 +2673,9 @@ mod tests { OsString::from("--rpc"), OsString::from("127.0.0.1:8081"), OsString::from("--root-dir"), - OsString::from("/var/safenode-manager/services/safenode1"), + OsString::from("/var/antctl/services/antnode1"), OsString::from("--log-output-dest"), - OsString::from("/var/log/safenode/safenode1"), + OsString::from("/var/log/antnode/antnode1"), OsString::from("--upnp"), OsString::from("--rewards-address"), OsString::from("0x03B770D9cD32077cC0bF330c13C114a87643B124"), @@ -2705,7 +2684,7 @@ mod tests { autostart: false, contents: None, environment: None, - label: "safenode1".parse()?, + label: "antnode1".parse()?, program: current_node_bin.to_path_buf(), username: Some("safe".to_string()), working_directory: None, @@ -2718,7 +2697,7 @@ mod tests { // after service restart mock_service_control .expect_start() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); mock_service_control @@ -2736,8 +2715,8 @@ mod tests { Ok(NodeInfo { pid: 2000, peer_id: PeerId::from_str("12D3KooWS2tpXGGTmg2AHFiDh57yPQnat49YHnyqoggzXZWpqkCR")?, - data_path: PathBuf::from("/var/safenode-manager/services/safenode1"), - log_path: PathBuf::from("/var/log/safenode/safenode1"), + data_path: PathBuf::from("/var/antctl/services/antnode1"), + log_path: PathBuf::from("/var/log/antnode/antnode1"), version: target_version.to_string(), uptime: std::time::Duration::from_secs(1), // the service was just started wallet_balance: 0, @@ -2756,13 +2735,13 @@ mod tests { let mut service_data = NodeServiceData { auto_restart: false, connected_peers: None, - data_dir_path: PathBuf::from("/var/safenode-manager/services/safenode1"), + data_dir_path: PathBuf::from("/var/antctl/services/antnode1"), evm_network: EvmNetwork::ArbitrumOne, genesis: false, home_network: false, listen_addr: None, local: false, - log_dir_path: PathBuf::from("/var/log/safenode/safenode1"), + log_dir_path: PathBuf::from("/var/log/antnode/antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, @@ -2780,8 +2759,8 @@ mod tests { )?, reward_balance: Some(AttoTokens::zero()), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: current_node_bin.to_path_buf(), - service_name: "safenode1".to_string(), + antnode_path: current_node_bin.to_path_buf(), + service_name: "antnode1".to_string(), status: ServiceStatus::Running, upnp: true, user: Some("safe".to_string()), @@ -2819,13 +2798,13 @@ mod tests { let target_version = "0.2.0"; let tmp_data_dir = assert_fs::TempDir::new()?; - let current_install_dir = tmp_data_dir.child("safenode_install"); + let current_install_dir = tmp_data_dir.child("antnode_install"); current_install_dir.create_dir_all()?; - let current_node_bin = current_install_dir.child("safenode"); - current_node_bin.write_binary(b"fake safenode binary")?; - let target_node_bin = tmp_data_dir.child("safenode"); - target_node_bin.write_binary(b"fake safenode binary")?; + let current_node_bin = current_install_dir.child("antnode"); + current_node_bin.write_binary(b"fake antnode binary")?; + let target_node_bin = tmp_data_dir.child("antnode"); + target_node_bin.write_binary(b"fake antnode binary")?; let mut mock_service_control = MockServiceControl::new(); let mut mock_rpc_client = MockRpcClient::new(); @@ -2838,14 +2817,14 @@ mod tests { .returning(|_| Ok(1000)); mock_service_control .expect_stop() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); // after binary upgrade mock_service_control .expect_uninstall() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); mock_service_control @@ -2856,9 +2835,9 @@ mod tests { OsString::from("--rpc"), OsString::from("127.0.0.1:8081"), OsString::from("--root-dir"), - OsString::from("/var/safenode-manager/services/safenode1"), + OsString::from("/var/antctl/services/antnode1"), OsString::from("--log-output-dest"), - OsString::from("/var/log/safenode/safenode1"), + OsString::from("/var/log/antnode/antnode1"), OsString::from("--log-format"), OsString::from("json"), OsString::from("--rewards-address"), @@ -2868,7 +2847,7 @@ mod tests { autostart: false, contents: None, environment: None, - label: "safenode1".parse()?, + label: "antnode1".parse()?, program: current_node_bin.to_path_buf(), username: Some("safe".to_string()), working_directory: None, @@ -2881,7 +2860,7 @@ mod tests { // after service restart mock_service_control .expect_start() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); mock_service_control @@ -2899,8 +2878,8 @@ mod tests { Ok(NodeInfo { pid: 2000, peer_id: PeerId::from_str("12D3KooWS2tpXGGTmg2AHFiDh57yPQnat49YHnyqoggzXZWpqkCR")?, - data_path: PathBuf::from("/var/safenode-manager/services/safenode1"), - log_path: PathBuf::from("/var/log/safenode/safenode1"), + data_path: PathBuf::from("/var/antctl/services/antnode1"), + log_path: PathBuf::from("/var/log/antnode/antnode1"), version: target_version.to_string(), uptime: std::time::Duration::from_secs(1), // the service was just started wallet_balance: 0, @@ -2919,13 +2898,13 @@ mod tests { let mut service_data = NodeServiceData { auto_restart: false, connected_peers: None, - data_dir_path: PathBuf::from("/var/safenode-manager/services/safenode1"), + data_dir_path: PathBuf::from("/var/antctl/services/antnode1"), evm_network: EvmNetwork::ArbitrumOne, genesis: false, home_network: false, listen_addr: None, local: false, - log_dir_path: PathBuf::from("/var/log/safenode/safenode1"), + log_dir_path: PathBuf::from("/var/log/antnode/antnode1"), log_format: Some(LogFormat::Json), max_archived_log_files: None, max_log_files: None, @@ -2943,8 +2922,8 @@ mod tests { )?, reward_balance: Some(AttoTokens::zero()), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: current_node_bin.to_path_buf(), - service_name: "safenode1".to_string(), + antnode_path: current_node_bin.to_path_buf(), + service_name: "antnode1".to_string(), status: ServiceStatus::Running, upnp: false, user: Some("safe".to_string()), @@ -2986,13 +2965,13 @@ mod tests { let target_version = "0.2.0"; let tmp_data_dir = assert_fs::TempDir::new()?; - let current_install_dir = tmp_data_dir.child("safenode_install"); + let current_install_dir = tmp_data_dir.child("antnode_install"); current_install_dir.create_dir_all()?; - let current_node_bin = current_install_dir.child("safenode"); - current_node_bin.write_binary(b"fake safenode binary")?; - let target_node_bin = tmp_data_dir.child("safenode"); - target_node_bin.write_binary(b"fake safenode binary")?; + let current_node_bin = current_install_dir.child("antnode"); + current_node_bin.write_binary(b"fake antnode binary")?; + let target_node_bin = tmp_data_dir.child("antnode"); + target_node_bin.write_binary(b"fake antnode binary")?; let mut mock_service_control = MockServiceControl::new(); let mut mock_rpc_client = MockRpcClient::new(); @@ -3005,14 +2984,14 @@ mod tests { .returning(|_| Ok(1000)); mock_service_control .expect_stop() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); // after binary upgrade mock_service_control .expect_uninstall() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); mock_service_control @@ -3023,9 +3002,9 @@ mod tests { OsString::from("--rpc"), OsString::from("127.0.0.1:8081"), OsString::from("--root-dir"), - OsString::from("/var/safenode-manager/services/safenode1"), + OsString::from("/var/antctl/services/antnode1"), OsString::from("--log-output-dest"), - OsString::from("/var/log/safenode/safenode1"), + OsString::from("/var/log/antnode/antnode1"), OsString::from("--home-network"), OsString::from("--rewards-address"), OsString::from("0x03B770D9cD32077cC0bF330c13C114a87643B124"), @@ -3034,7 +3013,7 @@ mod tests { autostart: false, contents: None, environment: None, - label: "safenode1".parse()?, + label: "antnode1".parse()?, program: current_node_bin.to_path_buf(), username: Some("safe".to_string()), working_directory: None, @@ -3047,7 +3026,7 @@ mod tests { // after service restart mock_service_control .expect_start() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); mock_service_control @@ -3065,8 +3044,8 @@ mod tests { Ok(NodeInfo { pid: 2000, peer_id: PeerId::from_str("12D3KooWS2tpXGGTmg2AHFiDh57yPQnat49YHnyqoggzXZWpqkCR")?, - data_path: PathBuf::from("/var/safenode-manager/services/safenode1"), - log_path: PathBuf::from("/var/log/safenode/safenode1"), + data_path: PathBuf::from("/var/antctl/services/antnode1"), + log_path: PathBuf::from("/var/log/antnode/antnode1"), version: target_version.to_string(), uptime: std::time::Duration::from_secs(1), // the service was just started wallet_balance: 0, @@ -3085,13 +3064,13 @@ mod tests { let mut service_data = NodeServiceData { auto_restart: false, connected_peers: None, - data_dir_path: PathBuf::from("/var/safenode-manager/services/safenode1"), + data_dir_path: PathBuf::from("/var/antctl/services/antnode1"), evm_network: EvmNetwork::ArbitrumOne, genesis: false, home_network: true, listen_addr: None, local: false, - log_dir_path: PathBuf::from("/var/log/safenode/safenode1"), + log_dir_path: PathBuf::from("/var/log/antnode/antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, @@ -3109,8 +3088,8 @@ mod tests { )?, reward_balance: Some(AttoTokens::zero()), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: current_node_bin.to_path_buf(), - service_name: "safenode1".to_string(), + antnode_path: current_node_bin.to_path_buf(), + service_name: "antnode1".to_string(), status: ServiceStatus::Running, upnp: false, user: Some("safe".to_string()), @@ -3148,13 +3127,13 @@ mod tests { let target_version = "0.2.0"; let tmp_data_dir = assert_fs::TempDir::new()?; - let current_install_dir = tmp_data_dir.child("safenode_install"); + let current_install_dir = tmp_data_dir.child("antnode_install"); current_install_dir.create_dir_all()?; - let current_node_bin = current_install_dir.child("safenode"); - current_node_bin.write_binary(b"fake safenode binary")?; - let target_node_bin = tmp_data_dir.child("safenode"); - target_node_bin.write_binary(b"fake safenode binary")?; + let current_node_bin = current_install_dir.child("antnode"); + current_node_bin.write_binary(b"fake antnode binary")?; + let target_node_bin = tmp_data_dir.child("antnode"); + target_node_bin.write_binary(b"fake antnode binary")?; let mut mock_service_control = MockServiceControl::new(); let mut mock_rpc_client = MockRpcClient::new(); @@ -3167,14 +3146,14 @@ mod tests { .returning(|_| Ok(1000)); mock_service_control .expect_stop() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); // after binary upgrade mock_service_control .expect_uninstall() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); mock_service_control @@ -3185,9 +3164,9 @@ mod tests { OsString::from("--rpc"), OsString::from("127.0.0.1:8081"), OsString::from("--root-dir"), - OsString::from("/var/safenode-manager/services/safenode1"), + OsString::from("/var/antctl/services/antnode1"), OsString::from("--log-output-dest"), - OsString::from("/var/log/safenode/safenode1"), + OsString::from("/var/log/antnode/antnode1"), OsString::from("--ip"), OsString::from("192.168.1.1"), OsString::from("--rewards-address"), @@ -3197,7 +3176,7 @@ mod tests { autostart: false, contents: None, environment: None, - label: "safenode1".parse()?, + label: "antnode1".parse()?, program: current_node_bin.to_path_buf(), username: Some("safe".to_string()), working_directory: None, @@ -3210,7 +3189,7 @@ mod tests { // after service restart mock_service_control .expect_start() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); mock_service_control @@ -3228,8 +3207,8 @@ mod tests { Ok(NodeInfo { pid: 2000, peer_id: PeerId::from_str("12D3KooWS2tpXGGTmg2AHFiDh57yPQnat49YHnyqoggzXZWpqkCR")?, - data_path: PathBuf::from("/var/safenode-manager/services/safenode1"), - log_path: PathBuf::from("/var/log/safenode/safenode1"), + data_path: PathBuf::from("/var/antctl/services/antnode1"), + log_path: PathBuf::from("/var/log/antnode/antnode1"), version: target_version.to_string(), uptime: std::time::Duration::from_secs(1), // the service was just started wallet_balance: 0, @@ -3248,13 +3227,13 @@ mod tests { let mut service_data = NodeServiceData { auto_restart: false, connected_peers: None, - data_dir_path: PathBuf::from("/var/safenode-manager/services/safenode1"), + data_dir_path: PathBuf::from("/var/antctl/services/antnode1"), evm_network: EvmNetwork::ArbitrumOne, genesis: false, home_network: false, listen_addr: None, local: false, - log_dir_path: PathBuf::from("/var/log/safenode/safenode1"), + log_dir_path: PathBuf::from("/var/log/antnode/antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, @@ -3272,8 +3251,8 @@ mod tests { )?, reward_balance: Some(AttoTokens::zero()), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: current_node_bin.to_path_buf(), - service_name: "safenode1".to_string(), + antnode_path: current_node_bin.to_path_buf(), + service_name: "antnode1".to_string(), status: ServiceStatus::Running, upnp: false, user: Some("safe".to_string()), @@ -3314,13 +3293,13 @@ mod tests { let target_version = "0.2.0"; let tmp_data_dir = assert_fs::TempDir::new()?; - let current_install_dir = tmp_data_dir.child("safenode_install"); + let current_install_dir = tmp_data_dir.child("antnode_install"); current_install_dir.create_dir_all()?; - let current_node_bin = current_install_dir.child("safenode"); - current_node_bin.write_binary(b"fake safenode binary")?; - let target_node_bin = tmp_data_dir.child("safenode"); - target_node_bin.write_binary(b"fake safenode binary")?; + let current_node_bin = current_install_dir.child("antnode"); + current_node_bin.write_binary(b"fake antnode binary")?; + let target_node_bin = tmp_data_dir.child("antnode"); + target_node_bin.write_binary(b"fake antnode binary")?; let mut mock_service_control = MockServiceControl::new(); let mut mock_rpc_client = MockRpcClient::new(); @@ -3333,14 +3312,14 @@ mod tests { .returning(|_| Ok(1000)); mock_service_control .expect_stop() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); // after binary upgrade mock_service_control .expect_uninstall() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); mock_service_control @@ -3351,9 +3330,9 @@ mod tests { OsString::from("--rpc"), OsString::from("127.0.0.1:8081"), OsString::from("--root-dir"), - OsString::from("/var/safenode-manager/services/safenode1"), + OsString::from("/var/antctl/services/antnode1"), OsString::from("--log-output-dest"), - OsString::from("/var/log/safenode/safenode1"), + OsString::from("/var/log/antnode/antnode1"), OsString::from("--port"), OsString::from("12000"), OsString::from("--rewards-address"), @@ -3363,7 +3342,7 @@ mod tests { autostart: false, contents: None, environment: None, - label: "safenode1".parse()?, + label: "antnode1".parse()?, program: current_node_bin.to_path_buf(), username: Some("safe".to_string()), working_directory: None, @@ -3376,7 +3355,7 @@ mod tests { // after service restart mock_service_control .expect_start() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); mock_service_control @@ -3394,8 +3373,8 @@ mod tests { Ok(NodeInfo { pid: 2000, peer_id: PeerId::from_str("12D3KooWS2tpXGGTmg2AHFiDh57yPQnat49YHnyqoggzXZWpqkCR")?, - data_path: PathBuf::from("/var/safenode-manager/services/safenode1"), - log_path: PathBuf::from("/var/log/safenode/safenode1"), + data_path: PathBuf::from("/var/antctl/services/antnode1"), + log_path: PathBuf::from("/var/log/antnode/antnode1"), version: target_version.to_string(), uptime: std::time::Duration::from_secs(1), // the service was just started wallet_balance: 0, @@ -3414,13 +3393,13 @@ mod tests { let mut service_data = NodeServiceData { auto_restart: false, connected_peers: None, - data_dir_path: PathBuf::from("/var/safenode-manager/services/safenode1"), + data_dir_path: PathBuf::from("/var/antctl/services/antnode1"), evm_network: EvmNetwork::ArbitrumOne, genesis: false, home_network: false, listen_addr: None, local: false, - log_dir_path: PathBuf::from("/var/log/safenode/safenode1"), + log_dir_path: PathBuf::from("/var/log/antnode/antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, @@ -3438,8 +3417,8 @@ mod tests { )?, reward_balance: Some(AttoTokens::zero()), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: current_node_bin.to_path_buf(), - service_name: "safenode1".to_string(), + antnode_path: current_node_bin.to_path_buf(), + service_name: "antnode1".to_string(), status: ServiceStatus::Running, upnp: false, user: Some("safe".to_string()), @@ -3477,13 +3456,13 @@ mod tests { let target_version = "0.2.0"; let tmp_data_dir = assert_fs::TempDir::new()?; - let current_install_dir = tmp_data_dir.child("safenode_install"); + let current_install_dir = tmp_data_dir.child("antnode_install"); current_install_dir.create_dir_all()?; - let current_node_bin = current_install_dir.child("safenode"); - current_node_bin.write_binary(b"fake safenode binary")?; - let target_node_bin = tmp_data_dir.child("safenode"); - target_node_bin.write_binary(b"fake safenode binary")?; + let current_node_bin = current_install_dir.child("antnode"); + current_node_bin.write_binary(b"fake antnode binary")?; + let target_node_bin = tmp_data_dir.child("antnode"); + target_node_bin.write_binary(b"fake antnode binary")?; let mut mock_service_control = MockServiceControl::new(); let mut mock_rpc_client = MockRpcClient::new(); @@ -3496,14 +3475,14 @@ mod tests { .returning(|_| Ok(1000)); mock_service_control .expect_stop() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); // after binary upgrade mock_service_control .expect_uninstall() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); mock_service_control @@ -3514,9 +3493,9 @@ mod tests { OsString::from("--rpc"), OsString::from("127.0.0.1:8081"), OsString::from("--root-dir"), - OsString::from("/var/safenode-manager/services/safenode1"), + OsString::from("/var/antctl/services/antnode1"), OsString::from("--log-output-dest"), - OsString::from("/var/log/safenode/safenode1"), + OsString::from("/var/log/antnode/antnode1"), OsString::from("--max-archived-log-files"), OsString::from("20"), OsString::from("--rewards-address"), @@ -3526,7 +3505,7 @@ mod tests { autostart: false, contents: None, environment: None, - label: "safenode1".parse()?, + label: "antnode1".parse()?, program: current_node_bin.to_path_buf(), username: Some("safe".to_string()), working_directory: None, @@ -3539,7 +3518,7 @@ mod tests { // after service restart mock_service_control .expect_start() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); mock_service_control @@ -3557,8 +3536,8 @@ mod tests { Ok(NodeInfo { pid: 2000, peer_id: PeerId::from_str("12D3KooWS2tpXGGTmg2AHFiDh57yPQnat49YHnyqoggzXZWpqkCR")?, - data_path: PathBuf::from("/var/safenode-manager/services/safenode1"), - log_path: PathBuf::from("/var/log/safenode/safenode1"), + data_path: PathBuf::from("/var/antctl/services/antnode1"), + log_path: PathBuf::from("/var/log/antnode/antnode1"), version: target_version.to_string(), uptime: std::time::Duration::from_secs(1), // the service was just started wallet_balance: 0, @@ -3577,12 +3556,12 @@ mod tests { let mut service_data = NodeServiceData { auto_restart: false, connected_peers: None, - data_dir_path: PathBuf::from("/var/safenode-manager/services/safenode1"), + data_dir_path: PathBuf::from("/var/antctl/services/antnode1"), genesis: false, home_network: false, listen_addr: None, local: false, - log_dir_path: PathBuf::from("/var/log/safenode/safenode1"), + log_dir_path: PathBuf::from("/var/log/antnode/antnode1"), log_format: None, max_archived_log_files: Some(20), max_log_files: None, @@ -3597,8 +3576,8 @@ mod tests { pid: Some(1000), reward_balance: Some(AttoTokens::zero()), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: current_node_bin.to_path_buf(), - service_name: "safenode1".to_string(), + antnode_path: current_node_bin.to_path_buf(), + service_name: "antnode1".to_string(), status: ServiceStatus::Running, upnp: false, user: Some("safe".to_string()), @@ -3643,13 +3622,13 @@ mod tests { let target_version = "0.2.0"; let tmp_data_dir = assert_fs::TempDir::new()?; - let current_install_dir = tmp_data_dir.child("safenode_install"); + let current_install_dir = tmp_data_dir.child("antnode_install"); current_install_dir.create_dir_all()?; - let current_node_bin = current_install_dir.child("safenode"); - current_node_bin.write_binary(b"fake safenode binary")?; - let target_node_bin = tmp_data_dir.child("safenode"); - target_node_bin.write_binary(b"fake safenode binary")?; + let current_node_bin = current_install_dir.child("antnode"); + current_node_bin.write_binary(b"fake antnode binary")?; + let target_node_bin = tmp_data_dir.child("antnode"); + target_node_bin.write_binary(b"fake antnode binary")?; let mut mock_service_control = MockServiceControl::new(); let mut mock_rpc_client = MockRpcClient::new(); @@ -3662,14 +3641,14 @@ mod tests { .returning(|_| Ok(1000)); mock_service_control .expect_stop() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); // after binary upgrade mock_service_control .expect_uninstall() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); mock_service_control @@ -3680,9 +3659,9 @@ mod tests { OsString::from("--rpc"), OsString::from("127.0.0.1:8081"), OsString::from("--root-dir"), - OsString::from("/var/safenode-manager/services/safenode1"), + OsString::from("/var/antctl/services/antnode1"), OsString::from("--log-output-dest"), - OsString::from("/var/log/safenode/safenode1"), + OsString::from("/var/log/antnode/antnode1"), OsString::from("--max-log-files"), OsString::from("20"), OsString::from("--rewards-address"), @@ -3692,7 +3671,7 @@ mod tests { autostart: false, contents: None, environment: None, - label: "safenode1".parse()?, + label: "antnode1".parse()?, program: current_node_bin.to_path_buf(), username: Some("safe".to_string()), working_directory: None, @@ -3705,7 +3684,7 @@ mod tests { // after service restart mock_service_control .expect_start() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); mock_service_control @@ -3723,8 +3702,8 @@ mod tests { Ok(NodeInfo { pid: 2000, peer_id: PeerId::from_str("12D3KooWS2tpXGGTmg2AHFiDh57yPQnat49YHnyqoggzXZWpqkCR")?, - data_path: PathBuf::from("/var/safenode-manager/services/safenode1"), - log_path: PathBuf::from("/var/log/safenode/safenode1"), + data_path: PathBuf::from("/var/antctl/services/antnode1"), + log_path: PathBuf::from("/var/log/antnode/antnode1"), version: target_version.to_string(), uptime: std::time::Duration::from_secs(1), // the service was just started wallet_balance: 0, @@ -3743,12 +3722,12 @@ mod tests { let mut service_data = NodeServiceData { auto_restart: false, connected_peers: None, - data_dir_path: PathBuf::from("/var/safenode-manager/services/safenode1"), + data_dir_path: PathBuf::from("/var/antctl/services/antnode1"), genesis: false, home_network: false, listen_addr: None, local: false, - log_dir_path: PathBuf::from("/var/log/safenode/safenode1"), + log_dir_path: PathBuf::from("/var/log/antnode/antnode1"), log_format: None, max_archived_log_files: None, max_log_files: Some(20), @@ -3763,8 +3742,8 @@ mod tests { pid: Some(1000), reward_balance: Some(AttoTokens::zero()), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: current_node_bin.to_path_buf(), - service_name: "safenode1".to_string(), + antnode_path: current_node_bin.to_path_buf(), + service_name: "antnode1".to_string(), status: ServiceStatus::Running, upnp: false, user: Some("safe".to_string()), @@ -3806,13 +3785,13 @@ mod tests { let target_version = "0.2.0"; let tmp_data_dir = assert_fs::TempDir::new()?; - let current_install_dir = tmp_data_dir.child("safenode_install"); + let current_install_dir = tmp_data_dir.child("antnode_install"); current_install_dir.create_dir_all()?; - let current_node_bin = current_install_dir.child("safenode"); - current_node_bin.write_binary(b"fake safenode binary")?; - let target_node_bin = tmp_data_dir.child("safenode"); - target_node_bin.write_binary(b"fake safenode binary")?; + let current_node_bin = current_install_dir.child("antnode"); + current_node_bin.write_binary(b"fake antnode binary")?; + let target_node_bin = tmp_data_dir.child("antnode"); + target_node_bin.write_binary(b"fake antnode binary")?; let mut mock_service_control = MockServiceControl::new(); let mut mock_rpc_client = MockRpcClient::new(); @@ -3825,14 +3804,14 @@ mod tests { .returning(|_| Ok(1000)); mock_service_control .expect_stop() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); // after binary upgrade mock_service_control .expect_uninstall() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); mock_service_control @@ -3843,9 +3822,9 @@ mod tests { OsString::from("--rpc"), OsString::from("127.0.0.1:8081"), OsString::from("--root-dir"), - OsString::from("/var/safenode-manager/services/safenode1"), + OsString::from("/var/antctl/services/antnode1"), OsString::from("--log-output-dest"), - OsString::from("/var/log/safenode/safenode1"), + OsString::from("/var/log/antnode/antnode1"), OsString::from("--metrics-server-port"), OsString::from("12000"), OsString::from("--rewards-address"), @@ -3855,7 +3834,7 @@ mod tests { autostart: false, contents: None, environment: None, - label: "safenode1".parse()?, + label: "antnode1".parse()?, program: current_node_bin.to_path_buf(), username: Some("safe".to_string()), working_directory: None, @@ -3868,7 +3847,7 @@ mod tests { // after service restart mock_service_control .expect_start() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); mock_service_control @@ -3886,8 +3865,8 @@ mod tests { Ok(NodeInfo { pid: 2000, peer_id: PeerId::from_str("12D3KooWS2tpXGGTmg2AHFiDh57yPQnat49YHnyqoggzXZWpqkCR")?, - data_path: PathBuf::from("/var/safenode-manager/services/safenode1"), - log_path: PathBuf::from("/var/log/safenode/safenode1"), + data_path: PathBuf::from("/var/antctl/services/antnode1"), + log_path: PathBuf::from("/var/log/antnode/antnode1"), version: target_version.to_string(), uptime: std::time::Duration::from_secs(1), // the service was just started wallet_balance: 0, @@ -3906,13 +3885,13 @@ mod tests { let mut service_data = NodeServiceData { auto_restart: false, connected_peers: None, - data_dir_path: PathBuf::from("/var/safenode-manager/services/safenode1"), + data_dir_path: PathBuf::from("/var/antctl/services/antnode1"), evm_network: EvmNetwork::ArbitrumOne, genesis: false, home_network: false, listen_addr: None, local: false, - log_dir_path: PathBuf::from("/var/log/safenode/safenode1"), + log_dir_path: PathBuf::from("/var/log/antnode/antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, @@ -3930,8 +3909,8 @@ mod tests { )?, reward_balance: Some(AttoTokens::zero()), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: current_node_bin.to_path_buf(), - service_name: "safenode1".to_string(), + antnode_path: current_node_bin.to_path_buf(), + service_name: "antnode1".to_string(), status: ServiceStatus::Running, upnp: false, user: Some("safe".to_string()), @@ -3972,13 +3951,13 @@ mod tests { let target_version = "0.2.0"; let tmp_data_dir = assert_fs::TempDir::new()?; - let current_install_dir = tmp_data_dir.child("safenode_install"); + let current_install_dir = tmp_data_dir.child("antnode_install"); current_install_dir.create_dir_all()?; - let current_node_bin = current_install_dir.child("safenode"); - current_node_bin.write_binary(b"fake safenode binary")?; - let target_node_bin = tmp_data_dir.child("safenode"); - target_node_bin.write_binary(b"fake safenode binary")?; + let current_node_bin = current_install_dir.child("antnode"); + current_node_bin.write_binary(b"fake antnode binary")?; + let target_node_bin = tmp_data_dir.child("antnode"); + target_node_bin.write_binary(b"fake antnode binary")?; let mut mock_service_control = MockServiceControl::new(); let mut mock_rpc_client = MockRpcClient::new(); @@ -3991,14 +3970,14 @@ mod tests { .returning(|_| Ok(1000)); mock_service_control .expect_stop() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); // after binary upgrade mock_service_control .expect_uninstall() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); mock_service_control @@ -4009,9 +3988,9 @@ mod tests { OsString::from("--rpc"), OsString::from("127.0.0.1:8081"), OsString::from("--root-dir"), - OsString::from("/var/safenode-manager/services/safenode1"), + OsString::from("/var/antctl/services/antnode1"), OsString::from("--log-output-dest"), - OsString::from("/var/log/safenode/safenode1"), + OsString::from("/var/log/antnode/antnode1"), OsString::from("--metrics-server-port"), OsString::from("12000"), OsString::from("--rewards-address"), @@ -4021,7 +4000,7 @@ mod tests { autostart: false, contents: None, environment: None, - label: "safenode1".parse()?, + label: "antnode1".parse()?, program: current_node_bin.to_path_buf(), username: Some("safe".to_string()), working_directory: None, @@ -4034,7 +4013,7 @@ mod tests { // after service restart mock_service_control .expect_start() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); mock_service_control @@ -4052,8 +4031,8 @@ mod tests { Ok(NodeInfo { pid: 2000, peer_id: PeerId::from_str("12D3KooWS2tpXGGTmg2AHFiDh57yPQnat49YHnyqoggzXZWpqkCR")?, - data_path: PathBuf::from("/var/safenode-manager/services/safenode1"), - log_path: PathBuf::from("/var/log/safenode/safenode1"), + data_path: PathBuf::from("/var/antctl/services/antnode1"), + log_path: PathBuf::from("/var/log/antnode/antnode1"), version: target_version.to_string(), uptime: std::time::Duration::from_secs(1), // the service was just started wallet_balance: 0, @@ -4072,13 +4051,13 @@ mod tests { let mut service_data = NodeServiceData { auto_restart: false, connected_peers: None, - data_dir_path: PathBuf::from("/var/safenode-manager/services/safenode1"), + data_dir_path: PathBuf::from("/var/antctl/services/antnode1"), evm_network: EvmNetwork::ArbitrumOne, genesis: false, home_network: false, listen_addr: None, local: false, - log_dir_path: PathBuf::from("/var/log/safenode/safenode1"), + log_dir_path: PathBuf::from("/var/log/antnode/antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, @@ -4096,8 +4075,8 @@ mod tests { )?, reward_balance: Some(AttoTokens::zero()), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: current_node_bin.to_path_buf(), - service_name: "safenode1".to_string(), + antnode_path: current_node_bin.to_path_buf(), + service_name: "antnode1".to_string(), status: ServiceStatus::Running, upnp: false, user: Some("safe".to_string()), @@ -4138,13 +4117,13 @@ mod tests { let target_version = "0.2.0"; let tmp_data_dir = assert_fs::TempDir::new()?; - let current_install_dir = tmp_data_dir.child("safenode_install"); + let current_install_dir = tmp_data_dir.child("antnode_install"); current_install_dir.create_dir_all()?; - let current_node_bin = current_install_dir.child("safenode"); - current_node_bin.write_binary(b"fake safenode binary")?; - let target_node_bin = tmp_data_dir.child("safenode"); - target_node_bin.write_binary(b"fake safenode binary")?; + let current_node_bin = current_install_dir.child("antnode"); + current_node_bin.write_binary(b"fake antnode binary")?; + let target_node_bin = tmp_data_dir.child("antnode"); + target_node_bin.write_binary(b"fake antnode binary")?; let mut mock_service_control = MockServiceControl::new(); let mut mock_rpc_client = MockRpcClient::new(); @@ -4157,14 +4136,14 @@ mod tests { .returning(|_| Ok(1000)); mock_service_control .expect_stop() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); // after binary upgrade mock_service_control .expect_uninstall() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); mock_service_control @@ -4175,9 +4154,9 @@ mod tests { OsString::from("--rpc"), OsString::from("127.0.0.1:8081"), OsString::from("--root-dir"), - OsString::from("/var/safenode-manager/services/safenode1"), + OsString::from("/var/antctl/services/antnode1"), OsString::from("--log-output-dest"), - OsString::from("/var/log/safenode/safenode1"), + OsString::from("/var/log/antnode/antnode1"), OsString::from("--owner"), OsString::from("discord_username"), OsString::from("--rewards-address"), @@ -4187,7 +4166,7 @@ mod tests { autostart: false, contents: None, environment: None, - label: "safenode1".parse()?, + label: "antnode1".parse()?, program: current_node_bin.to_path_buf(), username: Some("safe".to_string()), working_directory: None, @@ -4200,7 +4179,7 @@ mod tests { // after service restart mock_service_control .expect_start() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); mock_service_control @@ -4218,8 +4197,8 @@ mod tests { Ok(NodeInfo { pid: 2000, peer_id: PeerId::from_str("12D3KooWS2tpXGGTmg2AHFiDh57yPQnat49YHnyqoggzXZWpqkCR")?, - data_path: PathBuf::from("/var/safenode-manager/services/safenode1"), - log_path: PathBuf::from("/var/log/safenode/safenode1"), + data_path: PathBuf::from("/var/antctl/services/antnode1"), + log_path: PathBuf::from("/var/log/antnode/antnode1"), version: target_version.to_string(), uptime: std::time::Duration::from_secs(1), // the service was just started wallet_balance: 0, @@ -4238,13 +4217,13 @@ mod tests { let mut service_data = NodeServiceData { auto_restart: false, connected_peers: None, - data_dir_path: PathBuf::from("/var/safenode-manager/services/safenode1"), + data_dir_path: PathBuf::from("/var/antctl/services/antnode1"), evm_network: EvmNetwork::ArbitrumOne, genesis: false, home_network: false, listen_addr: None, local: false, - log_dir_path: PathBuf::from("/var/log/safenode/safenode1"), + log_dir_path: PathBuf::from("/var/log/antnode/antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, @@ -4262,8 +4241,8 @@ mod tests { )?, reward_balance: Some(AttoTokens::zero()), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: current_node_bin.to_path_buf(), - service_name: "safenode1".to_string(), + antnode_path: current_node_bin.to_path_buf(), + service_name: "antnode1".to_string(), status: ServiceStatus::Running, upnp: false, user: Some("safe".to_string()), @@ -4304,13 +4283,13 @@ mod tests { let target_version = "0.2.0"; let tmp_data_dir = assert_fs::TempDir::new()?; - let current_install_dir = tmp_data_dir.child("safenode_install"); + let current_install_dir = tmp_data_dir.child("antnode_install"); current_install_dir.create_dir_all()?; - let current_node_bin = current_install_dir.child("safenode"); - current_node_bin.write_binary(b"fake safenode binary")?; - let target_node_bin = tmp_data_dir.child("safenode"); - target_node_bin.write_binary(b"fake safenode binary")?; + let current_node_bin = current_install_dir.child("antnode"); + current_node_bin.write_binary(b"fake antnode binary")?; + let target_node_bin = tmp_data_dir.child("antnode"); + target_node_bin.write_binary(b"fake antnode binary")?; let mut mock_service_control = MockServiceControl::new(); let mut mock_rpc_client = MockRpcClient::new(); @@ -4323,14 +4302,14 @@ mod tests { .returning(|_| Ok(1000)); mock_service_control .expect_stop() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); // after binary upgrade mock_service_control .expect_uninstall() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); mock_service_control @@ -4341,9 +4320,9 @@ mod tests { OsString::from("--rpc"), OsString::from("127.0.0.1:8081"), OsString::from("--root-dir"), - OsString::from("/var/safenode-manager/services/safenode1"), + OsString::from("/var/antctl/services/antnode1"), OsString::from("--log-output-dest"), - OsString::from("/var/log/safenode/safenode1"), + OsString::from("/var/log/antnode/antnode1"), OsString::from("--owner"), OsString::from("discord_username"), OsString::from("--rewards-address"), @@ -4353,7 +4332,7 @@ mod tests { autostart: true, contents: None, environment: None, - label: "safenode1".parse()?, + label: "antnode1".parse()?, program: current_node_bin.to_path_buf(), username: Some("safe".to_string()), working_directory: None, @@ -4366,7 +4345,7 @@ mod tests { // after service restart mock_service_control .expect_start() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); mock_service_control @@ -4384,8 +4363,8 @@ mod tests { Ok(NodeInfo { pid: 2000, peer_id: PeerId::from_str("12D3KooWS2tpXGGTmg2AHFiDh57yPQnat49YHnyqoggzXZWpqkCR")?, - data_path: PathBuf::from("/var/safenode-manager/services/safenode1"), - log_path: PathBuf::from("/var/log/safenode/safenode1"), + data_path: PathBuf::from("/var/antctl/services/antnode1"), + log_path: PathBuf::from("/var/log/antnode/antnode1"), version: target_version.to_string(), uptime: std::time::Duration::from_secs(1), // the service was just started wallet_balance: 0, @@ -4404,13 +4383,13 @@ mod tests { let mut service_data = NodeServiceData { auto_restart: true, connected_peers: None, - data_dir_path: PathBuf::from("/var/safenode-manager/services/safenode1"), + data_dir_path: PathBuf::from("/var/antctl/services/antnode1"), evm_network: EvmNetwork::ArbitrumOne, genesis: false, home_network: false, listen_addr: None, local: false, - log_dir_path: PathBuf::from("/var/log/safenode/safenode1"), + log_dir_path: PathBuf::from("/var/log/antnode/antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, @@ -4428,8 +4407,8 @@ mod tests { )?, reward_balance: Some(AttoTokens::zero()), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: current_node_bin.to_path_buf(), - service_name: "safenode1".to_string(), + antnode_path: current_node_bin.to_path_buf(), + service_name: "antnode1".to_string(), status: ServiceStatus::Running, upnp: false, user: Some("safe".to_string()), @@ -4467,13 +4446,13 @@ mod tests { let target_version = "0.2.0"; let tmp_data_dir = assert_fs::TempDir::new()?; - let current_install_dir = tmp_data_dir.child("safenode_install"); + let current_install_dir = tmp_data_dir.child("antnode_install"); current_install_dir.create_dir_all()?; - let current_node_bin = current_install_dir.child("safenode"); - current_node_bin.write_binary(b"fake safenode binary")?; - let target_node_bin = tmp_data_dir.child("safenode"); - target_node_bin.write_binary(b"fake safenode binary")?; + let current_node_bin = current_install_dir.child("antnode"); + current_node_bin.write_binary(b"fake antnode binary")?; + let target_node_bin = tmp_data_dir.child("antnode"); + target_node_bin.write_binary(b"fake antnode binary")?; let mut mock_service_control = MockServiceControl::new(); let mut mock_rpc_client = MockRpcClient::new(); @@ -4486,14 +4465,14 @@ mod tests { .returning(|_| Ok(1000)); mock_service_control .expect_stop() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); // after binary upgrade mock_service_control .expect_uninstall() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); mock_service_control @@ -4504,9 +4483,9 @@ mod tests { OsString::from("--rpc"), OsString::from("127.0.0.1:8081"), OsString::from("--root-dir"), - OsString::from("/var/safenode-manager/services/safenode1"), + OsString::from("/var/antctl/services/antnode1"), OsString::from("--log-output-dest"), - OsString::from("/var/log/safenode/safenode1"), + OsString::from("/var/log/antnode/antnode1"), OsString::from("--owner"), OsString::from("discord_username"), OsString::from("--rewards-address"), @@ -4522,7 +4501,7 @@ mod tests { autostart: true, contents: None, environment: None, - label: "safenode1".parse()?, + label: "antnode1".parse()?, program: current_node_bin.to_path_buf(), username: Some("safe".to_string()), working_directory: None, @@ -4535,7 +4514,7 @@ mod tests { // after service restart mock_service_control .expect_start() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); mock_service_control @@ -4553,8 +4532,8 @@ mod tests { Ok(NodeInfo { pid: 2000, peer_id: PeerId::from_str("12D3KooWS2tpXGGTmg2AHFiDh57yPQnat49YHnyqoggzXZWpqkCR")?, - data_path: PathBuf::from("/var/safenode-manager/services/safenode1"), - log_path: PathBuf::from("/var/log/safenode/safenode1"), + data_path: PathBuf::from("/var/antctl/services/antnode1"), + log_path: PathBuf::from("/var/log/antnode/antnode1"), version: target_version.to_string(), uptime: std::time::Duration::from_secs(1), // the service was just started wallet_balance: 0, @@ -4573,7 +4552,7 @@ mod tests { let mut service_data = NodeServiceData { auto_restart: true, connected_peers: None, - data_dir_path: PathBuf::from("/var/safenode-manager/services/safenode1"), + data_dir_path: PathBuf::from("/var/antctl/services/antnode1"), evm_network: EvmNetwork::Custom(CustomNetwork { rpc_url_http: "http://localhost:8545".parse()?, payment_token_address: RewardsAddress::from_str( @@ -4587,7 +4566,7 @@ mod tests { home_network: false, listen_addr: None, local: false, - log_dir_path: PathBuf::from("/var/log/safenode/safenode1"), + log_dir_path: PathBuf::from("/var/log/antnode/antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, @@ -4606,8 +4585,8 @@ mod tests { reward_balance: Some(AttoTokens::zero()), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: current_node_bin.to_path_buf(), - service_name: "safenode1".to_string(), + antnode_path: current_node_bin.to_path_buf(), + service_name: "antnode1".to_string(), status: ServiceStatus::Running, upnp: false, user: Some("safe".to_string()), @@ -4645,13 +4624,13 @@ mod tests { let target_version = "0.2.0"; let tmp_data_dir = assert_fs::TempDir::new()?; - let current_install_dir = tmp_data_dir.child("safenode_install"); + let current_install_dir = tmp_data_dir.child("antnode_install"); current_install_dir.create_dir_all()?; - let current_node_bin = current_install_dir.child("safenode"); - current_node_bin.write_binary(b"fake safenode binary")?; - let target_node_bin = tmp_data_dir.child("safenode"); - target_node_bin.write_binary(b"fake safenode binary")?; + let current_node_bin = current_install_dir.child("antnode"); + current_node_bin.write_binary(b"fake antnode binary")?; + let target_node_bin = tmp_data_dir.child("antnode"); + target_node_bin.write_binary(b"fake antnode binary")?; let mut mock_service_control = MockServiceControl::new(); let mut mock_rpc_client = MockRpcClient::new(); @@ -4664,14 +4643,14 @@ mod tests { .returning(|_| Ok(1000)); mock_service_control .expect_stop() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); // after binary upgrade mock_service_control .expect_uninstall() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); mock_service_control @@ -4682,9 +4661,9 @@ mod tests { OsString::from("--rpc"), OsString::from("127.0.0.1:8081"), OsString::from("--root-dir"), - OsString::from("/var/safenode-manager/services/safenode1"), + OsString::from("/var/antctl/services/antnode1"), OsString::from("--log-output-dest"), - OsString::from("/var/log/safenode/safenode1"), + OsString::from("/var/log/antnode/antnode1"), OsString::from("--owner"), OsString::from("discord_username"), OsString::from("--rewards-address"), @@ -4700,7 +4679,7 @@ mod tests { autostart: true, contents: None, environment: None, - label: "safenode1".parse()?, + label: "antnode1".parse()?, program: current_node_bin.to_path_buf(), username: Some("safe".to_string()), working_directory: None, @@ -4713,7 +4692,7 @@ mod tests { // after service restart mock_service_control .expect_start() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); mock_service_control @@ -4731,8 +4710,8 @@ mod tests { Ok(NodeInfo { pid: 2000, peer_id: PeerId::from_str("12D3KooWS2tpXGGTmg2AHFiDh57yPQnat49YHnyqoggzXZWpqkCR")?, - data_path: PathBuf::from("/var/safenode-manager/services/safenode1"), - log_path: PathBuf::from("/var/log/safenode/safenode1"), + data_path: PathBuf::from("/var/antctl/services/antnode1"), + log_path: PathBuf::from("/var/log/antnode/antnode1"), version: target_version.to_string(), uptime: std::time::Duration::from_secs(1), // the service was just started wallet_balance: 0, @@ -4751,7 +4730,7 @@ mod tests { let mut service_data = NodeServiceData { auto_restart: true, connected_peers: None, - data_dir_path: PathBuf::from("/var/safenode-manager/services/safenode1"), + data_dir_path: PathBuf::from("/var/antctl/services/antnode1"), evm_network: EvmNetwork::Custom(CustomNetwork { rpc_url_http: "http://localhost:8545".parse()?, payment_token_address: RewardsAddress::from_str( @@ -4765,7 +4744,7 @@ mod tests { home_network: false, listen_addr: None, local: false, - log_dir_path: PathBuf::from("/var/log/safenode/safenode1"), + log_dir_path: PathBuf::from("/var/log/antnode/antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, @@ -4784,8 +4763,8 @@ mod tests { reward_balance: Some(AttoTokens::zero()), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: current_node_bin.to_path_buf(), - service_name: "safenode1".to_string(), + antnode_path: current_node_bin.to_path_buf(), + service_name: "antnode1".to_string(), status: ServiceStatus::Running, upnp: false, user: Some("safe".to_string()), @@ -4823,13 +4802,13 @@ mod tests { let target_version = "0.2.0"; let tmp_data_dir = assert_fs::TempDir::new()?; - let current_install_dir = tmp_data_dir.child("safenode_install"); + let current_install_dir = tmp_data_dir.child("antnode_install"); current_install_dir.create_dir_all()?; - let current_node_bin = current_install_dir.child("safenode"); - current_node_bin.write_binary(b"fake safenode binary")?; - let target_node_bin = tmp_data_dir.child("safenode"); - target_node_bin.write_binary(b"fake safenode binary")?; + let current_node_bin = current_install_dir.child("antnode"); + current_node_bin.write_binary(b"fake antnode binary")?; + let target_node_bin = tmp_data_dir.child("antnode"); + target_node_bin.write_binary(b"fake antnode binary")?; let mut mock_service_control = MockServiceControl::new(); let mut mock_rpc_client = MockRpcClient::new(); @@ -4842,14 +4821,14 @@ mod tests { .returning(|_| Ok(1000)); mock_service_control .expect_stop() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); // after binary upgrade mock_service_control .expect_uninstall() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); mock_service_control @@ -4860,9 +4839,9 @@ mod tests { OsString::from("--rpc"), OsString::from("127.0.0.1:8081"), OsString::from("--root-dir"), - OsString::from("/var/safenode-manager/services/safenode1"), + OsString::from("/var/antctl/services/antnode1"), OsString::from("--log-output-dest"), - OsString::from("/var/log/safenode/safenode1"), + OsString::from("/var/log/antnode/antnode1"), OsString::from("--upnp"), OsString::from("--rewards-address"), OsString::from("0x03B770D9cD32077cC0bF330c13C114a87643B124"), @@ -4871,7 +4850,7 @@ mod tests { autostart: false, contents: None, environment: None, - label: "safenode1".parse()?, + label: "antnode1".parse()?, program: current_node_bin.to_path_buf(), username: Some("safe".to_string()), working_directory: None, @@ -4884,7 +4863,7 @@ mod tests { // after service restart mock_service_control .expect_start() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); mock_service_control @@ -4905,8 +4884,8 @@ mod tests { Ok(NodeInfo { pid: 2000, peer_id: PeerId::from_str("12D3KooWS2tpXGGTmg2AHFiDh57yPQnat49YHnyqoggzXZWpqkCR")?, - data_path: PathBuf::from("/var/safenode-manager/services/safenode1"), - log_path: PathBuf::from("/var/log/safenode/safenode1"), + data_path: PathBuf::from("/var/antctl/services/antnode1"), + log_path: PathBuf::from("/var/log/antnode/antnode1"), version: target_version.to_string(), uptime: std::time::Duration::from_secs(1), // the service was just started wallet_balance: 0, @@ -4925,13 +4904,13 @@ mod tests { let mut service_data = NodeServiceData { auto_restart: false, connected_peers: None, - data_dir_path: PathBuf::from("/var/safenode-manager/services/safenode1"), + data_dir_path: PathBuf::from("/var/antctl/services/antnode1"), evm_network: EvmNetwork::ArbitrumOne, genesis: false, home_network: false, listen_addr: None, local: false, - log_dir_path: PathBuf::from("/var/log/safenode/safenode1"), + log_dir_path: PathBuf::from("/var/log/antnode/antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, @@ -4949,8 +4928,8 @@ mod tests { )?, reward_balance: Some(AttoTokens::zero()), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: current_node_bin.to_path_buf(), - service_name: "safenode1".to_string(), + antnode_path: current_node_bin.to_path_buf(), + service_name: "antnode1".to_string(), status: ServiceStatus::Running, upnp: true, user: Some("safe".to_string()), @@ -4986,17 +4965,17 @@ mod tests { #[tokio::test] async fn remove_should_remove_an_added_node() -> Result<()> { let temp_dir = assert_fs::TempDir::new()?; - let log_dir = temp_dir.child("safenode1-logs"); + let log_dir = temp_dir.child("antnode1-logs"); log_dir.create_dir_all()?; - let data_dir = temp_dir.child("safenode1-data"); + let data_dir = temp_dir.child("antnode1-data"); data_dir.create_dir_all()?; - let safenode_bin = data_dir.child("safenode"); - safenode_bin.write_binary(b"fake safenode binary")?; + let antnode_bin = data_dir.child("antnode"); + antnode_bin.write_binary(b"fake antnode binary")?; let mut mock_service_control = MockServiceControl::new(); mock_service_control .expect_uninstall() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); @@ -5033,9 +5012,9 @@ mod tests { )?, reward_balance: Some(AttoTokens::zero()), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: safenode_bin.to_path_buf(), + antnode_path: antnode_bin.to_path_buf(), status: ServiceStatus::Stopped, - service_name: "safenode1".to_string(), + service_name: "antnode1".to_string(), version: "0.98.1".to_string(), upnp: false, user: Some("safe".to_string()), @@ -5065,16 +5044,14 @@ mod tests { let mut mock_service_control = MockServiceControl::new(); mock_service_control .expect_get_process_pid() - .with(eq(PathBuf::from( - "/var/safenode-manager/services/safenode1/safenode", - ))) + .with(eq(PathBuf::from("/var/antctl/services/antnode1/antnode"))) .times(1) .returning(|_| Ok(1000)); let mut service_data = NodeServiceData { auto_restart: false, connected_peers: None, - data_dir_path: PathBuf::from("/var/safenode-manager/services/safenode1"), + data_dir_path: PathBuf::from("/var/antctl/services/antnode1"), evm_network: EvmNetwork::Custom(CustomNetwork { rpc_url_http: "http://localhost:8545".parse()?, payment_token_address: RewardsAddress::from_str( @@ -5088,7 +5065,7 @@ mod tests { home_network: false, listen_addr: None, local: false, - log_dir_path: PathBuf::from("/var/log/safenode/safenode1"), + log_dir_path: PathBuf::from("/var/log/antnode/antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, @@ -5106,8 +5083,8 @@ mod tests { )?, reward_balance: Some(AttoTokens::zero()), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: PathBuf::from("/var/safenode-manager/services/safenode1/safenode"), - service_name: "safenode1".to_string(), + antnode_path: PathBuf::from("/var/antctl/services/antnode1/antnode"), + service_name: "antnode1".to_string(), status: ServiceStatus::Running, upnp: false, user: Some("safe".to_string()), @@ -5125,7 +5102,7 @@ mod tests { match result { Ok(_) => panic!("This test should result in an error"), Err(e) => assert_eq!( - "The service(s) is already running: [\"safenode1\"]", + "The service(s) is already running: [\"antnode1\"]", e.to_string() ), } @@ -5137,31 +5114,28 @@ mod tests { async fn remove_should_return_an_error_for_a_node_that_was_marked_running_but_was_not_actually_running( ) -> Result<()> { let temp_dir = assert_fs::TempDir::new()?; - let log_dir = temp_dir.child("safenode1-logs"); + let log_dir = temp_dir.child("antnode1-logs"); log_dir.create_dir_all()?; - let data_dir = temp_dir.child("safenode1-data"); + let data_dir = temp_dir.child("antnode1-data"); data_dir.create_dir_all()?; - let safenode_bin = data_dir.child("safenode"); - safenode_bin.write_binary(b"fake safenode binary")?; + let antnode_bin = data_dir.child("antnode"); + antnode_bin.write_binary(b"fake antnode binary")?; let mut mock_service_control = MockServiceControl::new(); mock_service_control .expect_get_process_pid() - .with(eq(PathBuf::from( - "/var/safenode-manager/services/safenode1/safenode", - ))) + .with(eq(PathBuf::from("/var/antctl/services/antnode1/antnode"))) .times(1) .returning(|_| { Err(ServiceError::ServiceProcessNotFound( - "Could not find process at '/var/safenode-manager/services/safenode1/safenode'" - .to_string(), + "Could not find process at '/var/antctl/services/antnode1/antnode'".to_string(), )) }); let mut service_data = NodeServiceData { auto_restart: false, connected_peers: None, - data_dir_path: PathBuf::from("/var/safenode-manager/services/safenode1"), + data_dir_path: PathBuf::from("/var/antctl/services/antnode1"), evm_network: EvmNetwork::Custom(CustomNetwork { rpc_url_http: "http://localhost:8545".parse()?, payment_token_address: RewardsAddress::from_str( @@ -5175,7 +5149,7 @@ mod tests { home_network: false, listen_addr: None, local: false, - log_dir_path: PathBuf::from("/var/log/safenode/safenode1"), + log_dir_path: PathBuf::from("/var/log/antnode/antnode1"), log_format: None, max_archived_log_files: None, max_log_files: None, @@ -5193,8 +5167,8 @@ mod tests { )?, reward_balance: Some(AttoTokens::zero()), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: PathBuf::from("/var/safenode-manager/services/safenode1/safenode"), - service_name: "safenode1".to_string(), + antnode_path: PathBuf::from("/var/antctl/services/antnode1/antnode"), + service_name: "antnode1".to_string(), status: ServiceStatus::Running, upnp: false, user: Some("safe".to_string()), @@ -5223,17 +5197,17 @@ mod tests { #[tokio::test] async fn remove_should_remove_an_added_node_and_keep_directories() -> Result<()> { let temp_dir = assert_fs::TempDir::new()?; - let log_dir = temp_dir.child("safenode1-logs"); + let log_dir = temp_dir.child("antnode1-logs"); log_dir.create_dir_all()?; - let data_dir = temp_dir.child("safenode1-data"); + let data_dir = temp_dir.child("antnode1-data"); data_dir.create_dir_all()?; - let safenode_bin = data_dir.child("safenode"); - safenode_bin.write_binary(b"fake safenode binary")?; + let antnode_bin = data_dir.child("antnode"); + antnode_bin.write_binary(b"fake antnode binary")?; let mut mock_service_control = MockServiceControl::new(); mock_service_control .expect_uninstall() - .with(eq("safenode1"), eq(false)) + .with(eq("antnode1"), eq(false)) .times(1) .returning(|_, _| Ok(())); @@ -5270,8 +5244,8 @@ mod tests { )?, reward_balance: Some(AttoTokens::zero()), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: safenode_bin.to_path_buf(), - service_name: "safenode1".to_string(), + antnode_path: antnode_bin.to_path_buf(), + service_name: "antnode1".to_string(), status: ServiceStatus::Stopped, upnp: false, user: Some("safe".to_string()), @@ -5300,17 +5274,17 @@ mod tests { #[tokio::test] async fn remove_should_remove_a_user_mode_service() -> Result<()> { let temp_dir = assert_fs::TempDir::new()?; - let log_dir = temp_dir.child("safenode1-logs"); + let log_dir = temp_dir.child("antnode1-logs"); log_dir.create_dir_all()?; - let data_dir = temp_dir.child("safenode1-data"); + let data_dir = temp_dir.child("antnode1-data"); data_dir.create_dir_all()?; - let safenode_bin = data_dir.child("safenode"); - safenode_bin.write_binary(b"fake safenode binary")?; + let antnode_bin = data_dir.child("antnode"); + antnode_bin.write_binary(b"fake antnode binary")?; let mut mock_service_control = MockServiceControl::new(); mock_service_control .expect_uninstall() - .with(eq("safenode1"), eq(true)) + .with(eq("antnode1"), eq(true)) .times(1) .returning(|_, _| Ok(())); @@ -5347,9 +5321,9 @@ mod tests { )?, reward_balance: Some(AttoTokens::zero()), rpc_socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8081), - safenode_path: safenode_bin.to_path_buf(), + antnode_path: antnode_bin.to_path_buf(), status: ServiceStatus::Stopped, - service_name: "safenode1".to_string(), + service_name: "antnode1".to_string(), upnp: false, user: None, user_mode: true, diff --git a/ant-node-manager/src/local.rs b/ant-node-manager/src/local.rs index 9695018629..e1fa3d4290 100644 --- a/ant-node-manager/src/local.rs +++ b/ant-node-manager/src/local.rs @@ -11,13 +11,6 @@ use crate::helpers::{ check_port_availability, get_bin_version, get_start_port_if_applicable, increment_port_option, }; -#[cfg(feature = "faucet")] -use crate::helpers::get_faucet_data_dir; -#[cfg(feature = "faucet")] -use crate::helpers::get_username; -#[cfg(feature = "faucet")] -use ant_service_management::FaucetServiceData; - use ant_evm::{EvmNetwork, RewardsAddress}; use ant_logging::LogFormat; use ant_service_management::{ @@ -41,9 +34,7 @@ use sysinfo::{Pid, System}; #[cfg_attr(test, automock)] pub trait Launcher { - fn get_safenode_path(&self) -> PathBuf; - #[cfg(feature = "faucet")] - fn launch_faucet(&self, genesis_multiaddr: &Multiaddr) -> Result; + fn get_antnode_path(&self) -> PathBuf; #[allow(clippy::too_many_arguments)] fn launch_node( &self, @@ -61,40 +52,12 @@ pub trait Launcher { #[derive(Default)] pub struct LocalSafeLauncher { - #[cfg(feature = "faucet")] - pub faucet_bin_path: PathBuf, - pub safenode_bin_path: PathBuf, + pub antnode_bin_path: PathBuf, } impl Launcher for LocalSafeLauncher { - fn get_safenode_path(&self) -> PathBuf { - self.safenode_bin_path.clone() - } - - #[cfg(feature = "faucet")] - fn launch_faucet(&self, genesis_multiaddr: &Multiaddr) -> Result { - info!("Launching the faucet server..."); - debug!("Using genesis_multiaddr: {}", genesis_multiaddr.to_string()); - let args = vec![ - "--peer".to_string(), - genesis_multiaddr.to_string(), - "server".to_string(), - ]; - - #[cfg(feature = "faucet")] - debug!( - "Using faucet binary: {}", - self.faucet_bin_path.to_string_lossy() - ); - - debug!("Using args: {}", args.join(" ")); - - let child = Command::new(self.faucet_bin_path.clone()) - .args(args) - .stdout(Stdio::inherit()) - .stderr(Stdio::inherit()) - .spawn()?; - Ok(child.id()) + fn get_antnode_path(&self) -> PathBuf { + self.antnode_bin_path.clone() } fn launch_node( @@ -159,7 +122,7 @@ impl Launcher for LocalSafeLauncher { } } - Command::new(self.safenode_bin_path.clone()) + Command::new(self.antnode_bin_path.clone()) .args(args) .stdout(Stdio::inherit()) .stderr(Stdio::inherit()) @@ -197,7 +160,7 @@ pub fn kill_network(node_registry: &NodeRegistry, keep_directories: bool) -> Res let faucet_data_path = dirs_next::data_dir() .ok_or_else(|| eyre!("Could not obtain user's data directory"))? - .join("safe") + .join("autonomi") .join("test_faucet"); if faucet_data_path.is_dir() { std::fs::remove_dir_all(faucet_data_path)?; @@ -205,7 +168,7 @@ pub fn kill_network(node_registry: &NodeRegistry, keep_directories: bool) -> Res } let genesis_data_path = dirs_next::data_dir() .ok_or_else(|| eyre!("Could not obtain user's data directory"))? - .join("safe") + .join("autonomi") .join("test_genesis"); if genesis_data_path.is_dir() { debug!("Removed genesis data directory"); @@ -252,9 +215,8 @@ pub fn kill_network(node_registry: &NodeRegistry, keep_directories: bool) -> Res } pub struct LocalNetworkOptions { + pub antnode_bin_path: PathBuf, pub enable_metrics_server: bool, - #[cfg(feature = "faucet")] - pub faucet_bin_path: PathBuf, pub join: bool, pub interval: u64, pub metrics_port: Option, @@ -264,7 +226,6 @@ pub struct LocalNetworkOptions { pub owner_prefix: Option, pub peers: Option>, pub rpc_port: Option, - pub safenode_bin_path: PathBuf, pub skip_validation: bool, pub log_format: Option, pub rewards_address: RewardsAddress, @@ -295,9 +256,7 @@ pub async fn run_network( } let launcher = LocalSafeLauncher { - safenode_bin_path: options.safenode_bin_path.to_path_buf(), - #[cfg(feature = "faucet")] - faucet_bin_path: options.faucet_bin_path.to_path_buf(), + antnode_bin_path: options.antnode_bin_path.to_path_buf(), }; let mut node_port = get_start_port_if_applicable(options.node_port); @@ -348,7 +307,7 @@ pub async fn run_network( rpc_socket_addr, rewards_address: options.rewards_address, evm_network: options.evm_network.clone(), - version: get_bin_version(&launcher.get_safenode_path())?, + version: get_bin_version(&launcher.get_antnode_path())?, }, &launcher, &rpc_client, @@ -397,7 +356,7 @@ pub async fn run_network( rpc_socket_addr, rewards_address: options.rewards_address, evm_network: options.evm_network.clone(), - version: get_bin_version(&launcher.get_safenode_path())?, + version: get_bin_version(&launcher.get_antnode_path())?, }, &launcher, &rpc_client, @@ -423,24 +382,6 @@ pub async fn run_network( validate_network(node_registry, bootstrap_peers.clone()).await?; } - #[cfg(feature = "faucet")] - if !options.join { - println!("Launching the faucet server..."); - let pid = launcher.launch_faucet(&bootstrap_peers[0])?; - let version = get_bin_version(&options.faucet_bin_path)?; - let faucet = FaucetServiceData { - faucet_path: options.faucet_bin_path, - local: true, - log_dir_path: get_faucet_data_dir(), - pid: Some(pid), - service_name: "faucet".to_string(), - status: ServiceStatus::Running, - user: get_username()?, - version, - }; - node_registry.faucet = Some(faucet); - } - Ok(()) } @@ -489,6 +430,7 @@ pub async fn run_node( .collect(); Ok(NodeServiceData { + antnode_path: launcher.get_antnode_path(), auto_restart: false, connected_peers, data_dir_path: node_info.data_path, @@ -511,9 +453,8 @@ pub async fn run_node( rewards_address: run_options.rewards_address, reward_balance: None, rpc_socket_addr: run_options.rpc_socket_addr, - safenode_path: launcher.get_safenode_path(), status: ServiceStatus::Running, - service_name: format!("safenode-local{}", run_options.number), + service_name: format!("antnode-local{}", run_options.number), upnp: false, user: None, user_mode: false, @@ -640,9 +581,9 @@ mod tests { .times(1) .returning(|_| ()); mock_launcher - .expect_get_safenode_path() + .expect_get_antnode_path() .times(1) - .returning(|| PathBuf::from("/usr/local/bin/safenode")); + .returning(|| PathBuf::from("/usr/local/bin/antnode")); mock_rpc_client .expect_node_info() @@ -651,8 +592,8 @@ mod tests { Ok(NodeInfo { pid: 1000, peer_id, - data_path: PathBuf::from(format!("~/.local/share/safe/{peer_id}")), - log_path: PathBuf::from(format!("~/.local/share/safe/{peer_id}/logs")), + data_path: PathBuf::from(format!("~/.local/share/autonomi/{peer_id}")), + log_path: PathBuf::from(format!("~/.local/share/autonomi/{peer_id}/logs")), version: "0.100.12".to_string(), uptime: std::time::Duration::from_secs(1), // the service was just started wallet_balance: 0, @@ -690,20 +631,20 @@ mod tests { assert!(node.genesis); assert_eq!(node.version, "0.100.12"); - assert_eq!(node.service_name, "safenode-local1"); + assert_eq!(node.service_name, "antnode-local1"); assert_eq!( node.data_dir_path, - PathBuf::from(format!("~/.local/share/safe/{peer_id}")) + PathBuf::from(format!("~/.local/share/autonomi/{peer_id}")) ); assert_eq!( node.log_dir_path, - PathBuf::from(format!("~/.local/share/safe/{peer_id}/logs")) + PathBuf::from(format!("~/.local/share/autonomi/{peer_id}/logs")) ); assert_eq!(node.number, 1); assert_eq!(node.pid, Some(1000)); assert_eq!(node.rpc_socket_addr, rpc_socket_addr); assert_eq!(node.status, ServiceStatus::Running); - assert_eq!(node.safenode_path, PathBuf::from("/usr/local/bin/safenode")); + assert_eq!(node.antnode_path, PathBuf::from("/usr/local/bin/antnode")); Ok(()) } diff --git a/ant-node-manager/src/rpc.rs b/ant-node-manager/src/rpc.rs index d5af79dc16..5cc357c2e8 100644 --- a/ant-node-manager/src/rpc.rs +++ b/ant-node-manager/src/rpc.rs @@ -62,6 +62,7 @@ pub async fn restart_node_service( ) })?; let install_ctx = InstallNodeServiceCtxBuilder { + antnode_path: current_node_clone.antnode_path.clone(), autostart: current_node_clone.auto_restart, bootstrap_peers: node_registry.bootstrap_peers.clone(), data_dir_path: current_node_clone.data_dir_path.clone(), @@ -78,10 +79,9 @@ pub async fn restart_node_service( owner: current_node_clone.owner.clone(), name: current_node_clone.service_name.clone(), node_ip: current_node_clone.node_ip, - node_port: current_node_clone.get_safenode_port(), + node_port: current_node_clone.get_antnode_port(), rewards_address: current_node_clone.rewards_address, rpc_socket_addr: current_node_clone.rpc_socket_addr, - safenode_path: current_node_clone.safenode_path.clone(), service_user: current_node_clone.user.clone(), upnp: current_node_clone.upnp, } @@ -95,18 +95,16 @@ pub async fn restart_node_service( service_manager.start().await?; } else { debug!("Starting a new node since retain peer id is false."); - // else start a new node instance. let new_node_number = nodes_len + 1; - let new_service_name = format!("safenode{new_node_number}"); + let new_service_name = format!("antnode{new_node_number}"); - // modify the paths & copy safenode binary - // example path "log_dir_path":"/var/log/safenode/safenode18" + // example path "log_dir_path":"/var/log/antnode/antnode18" let log_dir_path = { let mut log_dir_path = current_node_clone.log_dir_path.clone(); log_dir_path.pop(); log_dir_path.join(&new_service_name) }; - // example path "data_dir_path":"/var/safenode-manager/services/safenode18" + // example path "data_dir_path":"/var/antctl/services/antnode18" let data_dir_path = { let mut data_dir_path = current_node_clone.data_dir_path.clone(); data_dir_path.pop(); @@ -144,19 +142,19 @@ pub async fn restart_node_service( current_node_clone.user ) })?; - // example path "safenode_path":"/var/safenode-manager/services/safenode18/safenode" - let safenode_path = { - debug!("Copying safenode binary"); - let mut safenode_path = current_node_clone.safenode_path.clone(); - let safenode_file_name = safenode_path + // example path "antnode_path":"/var/antctl/services/antnode18/antnode" + let antnode_path = { + debug!("Copying antnode binary"); + let mut antnode_path = current_node_clone.antnode_path.clone(); + let antnode_file_name = antnode_path .file_name() - .ok_or_eyre("Could not get filename from the current node's safenode path")? + .ok_or_eyre("Could not get filename from the current node's antnode path")? .to_string_lossy() .to_string(); - safenode_path.pop(); - safenode_path.pop(); + antnode_path.pop(); + antnode_path.pop(); - let safenode_path = safenode_path.join(&new_service_name); + let antnode_path = antnode_path.join(&new_service_name); create_owned_dir( data_dir_path.clone(), current_node_clone @@ -170,15 +168,15 @@ pub async fn restart_node_service( current_node_clone.user ) })?; - let safenode_path = safenode_path.join(safenode_file_name); + let antnode_path = antnode_path.join(antnode_file_name); - std::fs::copy(¤t_node_clone.safenode_path, &safenode_path).map_err(|err| { + std::fs::copy(¤t_node_clone.antnode_path, &antnode_path).map_err(|err| { eyre!( - "Failed to copy safenode bin from {:?} to {safenode_path:?} with err: {err}", - current_node_clone.safenode_path + "Failed to copy antnode bin from {:?} to {antnode_path:?} with err: {err}", + current_node_clone.antnode_path ) })?; - safenode_path + antnode_path }; let install_ctx = InstallNodeServiceCtxBuilder { @@ -201,7 +199,7 @@ pub async fn restart_node_service( owner: None, rewards_address: current_node_clone.rewards_address, rpc_socket_addr: current_node_clone.rpc_socket_addr, - safenode_path: safenode_path.clone(), + antnode_path: antnode_path.clone(), service_user: current_node_clone.user.clone(), upnp: current_node_clone.upnp, } @@ -211,6 +209,7 @@ pub async fn restart_node_service( })?; let mut node = NodeServiceData { + antnode_path, auto_restart: current_node_clone.auto_restart, connected_peers: None, data_dir_path, @@ -233,7 +232,6 @@ pub async fn restart_node_service( rewards_address: current_node_clone.rewards_address, reward_balance: current_node_clone.reward_balance, rpc_socket_addr: current_node_clone.rpc_socket_addr, - safenode_path, service_name: new_service_name.clone(), status: ServiceStatus::Added, upnp: current_node_clone.upnp, diff --git a/ant-node-manager/src/rpc_client.rs b/ant-node-manager/src/rpc_client.rs index c8d0bcb3c6..324a24e3e9 100644 --- a/ant-node-manager/src/rpc_client.rs +++ b/ant-node-manager/src/rpc_client.rs @@ -1,5 +1,5 @@ -use ant_service_management::safenode_manager_proto::safe_node_manager_client::SafeNodeManagerClient; -use ant_service_management::safenode_manager_proto::NodeServiceRestartRequest; +use ant_service_management::antctl_proto::ant_ctl_client::AntCtlClient; +use ant_service_management::antctl_proto::NodeServiceRestartRequest; use color_eyre::eyre::bail; use color_eyre::{eyre::eyre, Result}; use libp2p_identity::PeerId; @@ -11,7 +11,7 @@ use tonic::Request; struct DaemonRpcClient { addr: SocketAddr, - rpc: SafeNodeManagerClient, + rpc: AntCtlClient, } pub async fn restart_node( @@ -48,7 +48,7 @@ async fn get_rpc_client(socket_addr: SocketAddr) -> Result { let endpoint = format!("https://{socket_addr}"); let mut attempts = 0; loop { - if let Ok(rpc_client) = SafeNodeManagerClient::connect(endpoint.clone()).await { + if let Ok(rpc_client) = AntCtlClient::connect(endpoint.clone()).await { let rpc_client = DaemonRpcClient { addr: socket_addr, rpc: rpc_client, diff --git a/ant-node-manager/tests/e2e.rs b/ant-node-manager/tests/e2e.rs index 16378922c6..76e343060c 100644 --- a/ant-node-manager/tests/e2e.rs +++ b/ant-node-manager/tests/e2e.rs @@ -16,13 +16,13 @@ use std::path::PathBuf; /// They are intended to run on a CI-based environment with a fresh build agent because they will /// create real services and user accounts, and will not attempt to clean themselves up. /// -/// They are assuming the existence of a `safenode` binary produced by the release process, and a +/// They are assuming the existence of a `antnode` binary produced by the release process, and a /// running local network, with SAFE_PEERS set to a local node. const CI_USER: &str = "runner"; #[cfg(unix)] -const SAFENODE_BIN_NAME: &str = "safenode"; +const ANTNODE_BIN_NAME: &str = "antnode"; #[cfg(windows)] -const SAFENODE_BIN_NAME: &str = "safenode.exe"; +const ANTNODE_BIN_NAME: &str = "antnode.exe"; /// The default behaviour is for the service to run as the `safe` user, which gets created during /// the process. However, there seems to be some sort of issue with adding user accounts on the GHA @@ -30,11 +30,11 @@ const SAFENODE_BIN_NAME: &str = "safenode.exe"; /// build agent. #[test] fn cross_platform_service_install_and_control() { - let safenode_path = PathBuf::from("..") + let antnode_path = PathBuf::from("..") .join("target") .join("release") - .join(SAFENODE_BIN_NAME); - let mut cmd = Command::cargo_bin("safenode-manager").unwrap(); + .join(ANTNODE_BIN_NAME); + let mut cmd = Command::cargo_bin("antctl").unwrap(); cmd.arg("add") .arg("--local") .arg("--user") @@ -42,32 +42,32 @@ fn cross_platform_service_install_and_control() { .arg("--count") .arg("3") .arg("--path") - .arg(safenode_path.to_string_lossy().to_string()) + .arg(antnode_path.to_string_lossy().to_string()) .assert() .success(); let registry = get_status(); - assert_eq!(registry.nodes[0].service_name, "safenode1"); + assert_eq!(registry.nodes[0].service_name, "antnode1"); assert_eq!(registry.nodes[0].peer_id, None); assert_eq!(registry.nodes[0].status, ServiceStatus::Added); - assert_eq!(registry.nodes[1].service_name, "safenode2"); + assert_eq!(registry.nodes[1].service_name, "antnode2"); assert_eq!(registry.nodes[1].peer_id, None); assert_eq!(registry.nodes[1].status, ServiceStatus::Added); - assert_eq!(registry.nodes[2].service_name, "safenode3"); + assert_eq!(registry.nodes[2].service_name, "antnode3"); assert_eq!(registry.nodes[2].peer_id, None); assert_eq!(registry.nodes[2].status, ServiceStatus::Added); // Start each of the three services. - let mut cmd = Command::cargo_bin("safenode-manager").unwrap(); + let mut cmd = Command::cargo_bin("antctl").unwrap(); cmd.arg("start").assert().success(); // After `start`, all services should be running with valid peer IDs assigned. let registry = get_status(); - assert_eq!(registry.nodes[0].service_name, "safenode1"); + assert_eq!(registry.nodes[0].service_name, "antnode1"); assert_eq!(registry.nodes[0].status, ServiceStatus::Running); - assert_eq!(registry.nodes[1].service_name, "safenode2"); + assert_eq!(registry.nodes[1].service_name, "antnode2"); assert_eq!(registry.nodes[1].status, ServiceStatus::Running); - assert_eq!(registry.nodes[2].service_name, "safenode3"); + assert_eq!(registry.nodes[2].service_name, "antnode3"); assert_eq!(registry.nodes[2].status, ServiceStatus::Running); // The three peer IDs should persist throughout the rest of the test. @@ -78,39 +78,39 @@ fn cross_platform_service_install_and_control() { .collect::>>(); // Stop each of the three services. - let mut cmd = Command::cargo_bin("safenode-manager").unwrap(); + let mut cmd = Command::cargo_bin("antctl").unwrap(); cmd.arg("stop").assert().success(); // After `stop`, all services should be stopped with peer IDs retained. let registry = get_status(); - assert_eq!(registry.nodes[0].service_name, "safenode1"); + assert_eq!(registry.nodes[0].service_name, "antnode1"); assert_eq!(registry.nodes[0].status, ServiceStatus::Stopped); assert_eq!(registry.nodes[0].peer_id, peer_ids[0]); - assert_eq!(registry.nodes[1].service_name, "safenode2"); + assert_eq!(registry.nodes[1].service_name, "antnode2"); assert_eq!(registry.nodes[1].status, ServiceStatus::Stopped); assert_eq!(registry.nodes[1].peer_id, peer_ids[1]); - assert_eq!(registry.nodes[2].service_name, "safenode3"); + assert_eq!(registry.nodes[2].service_name, "antnode3"); assert_eq!(registry.nodes[2].status, ServiceStatus::Stopped); assert_eq!(registry.nodes[2].peer_id, peer_ids[2]); // Start each of the three services again. - let mut cmd = Command::cargo_bin("safenode-manager").unwrap(); + let mut cmd = Command::cargo_bin("antctl").unwrap(); cmd.arg("start").assert().success(); // Peer IDs again should be retained after restart. let registry = get_status(); - assert_eq!(registry.nodes[0].service_name, "safenode1"); + assert_eq!(registry.nodes[0].service_name, "antnode1"); assert_eq!(registry.nodes[0].status, ServiceStatus::Running); assert_eq!(registry.nodes[0].peer_id, peer_ids[0]); - assert_eq!(registry.nodes[1].service_name, "safenode2"); + assert_eq!(registry.nodes[1].service_name, "antnode2"); assert_eq!(registry.nodes[1].status, ServiceStatus::Running); assert_eq!(registry.nodes[1].peer_id, peer_ids[1]); - assert_eq!(registry.nodes[2].service_name, "safenode3"); + assert_eq!(registry.nodes[2].service_name, "antnode3"); assert_eq!(registry.nodes[2].status, ServiceStatus::Running); assert_eq!(registry.nodes[2].peer_id, peer_ids[2]); // Stop two nodes by peer ID. - let mut cmd = Command::cargo_bin("safenode-manager").unwrap(); + let mut cmd = Command::cargo_bin("antctl").unwrap(); cmd.arg("stop") .arg("--peer-id") .arg(registry.nodes[0].peer_id.unwrap().to_string()) @@ -121,18 +121,18 @@ fn cross_platform_service_install_and_control() { // Peer IDs again should be retained after restart. let registry = get_status(); - assert_eq!(registry.nodes[0].service_name, "safenode1"); + assert_eq!(registry.nodes[0].service_name, "antnode1"); assert_eq!(registry.nodes[0].status, ServiceStatus::Stopped); assert_eq!(registry.nodes[0].peer_id, peer_ids[0]); - assert_eq!(registry.nodes[1].service_name, "safenode2"); + assert_eq!(registry.nodes[1].service_name, "antnode2"); assert_eq!(registry.nodes[1].status, ServiceStatus::Running); assert_eq!(registry.nodes[1].peer_id, peer_ids[1]); - assert_eq!(registry.nodes[2].service_name, "safenode3"); + assert_eq!(registry.nodes[2].service_name, "antnode3"); assert_eq!(registry.nodes[2].status, ServiceStatus::Stopped); assert_eq!(registry.nodes[2].peer_id, peer_ids[2]); // Now restart the stopped nodes by service name. - let mut cmd = Command::cargo_bin("safenode-manager").unwrap(); + let mut cmd = Command::cargo_bin("antctl").unwrap(); cmd.arg("start") .arg("--service-name") .arg(registry.nodes[0].service_name.clone()) @@ -143,34 +143,34 @@ fn cross_platform_service_install_and_control() { // The stopped nodes should now be running again. let registry = get_status(); - assert_eq!(registry.nodes[0].service_name, "safenode1"); + assert_eq!(registry.nodes[0].service_name, "antnode1"); assert_eq!(registry.nodes[0].status, ServiceStatus::Running); assert_eq!(registry.nodes[0].peer_id, peer_ids[0]); - assert_eq!(registry.nodes[1].service_name, "safenode2"); + assert_eq!(registry.nodes[1].service_name, "antnode2"); assert_eq!(registry.nodes[1].status, ServiceStatus::Running); assert_eq!(registry.nodes[1].peer_id, peer_ids[1]); - assert_eq!(registry.nodes[2].service_name, "safenode3"); + assert_eq!(registry.nodes[2].service_name, "antnode3"); assert_eq!(registry.nodes[2].status, ServiceStatus::Running); assert_eq!(registry.nodes[2].peer_id, peer_ids[2]); // Finally, stop each of the three services. - let mut cmd = Command::cargo_bin("safenode-manager").unwrap(); + let mut cmd = Command::cargo_bin("antctl").unwrap(); cmd.arg("stop").assert().success(); // After `stop`, all services should be stopped with peer IDs retained. let registry = get_status(); - assert_eq!(registry.nodes[0].service_name, "safenode1"); + assert_eq!(registry.nodes[0].service_name, "antnode1"); assert_eq!(registry.nodes[0].status, ServiceStatus::Stopped); assert_eq!(registry.nodes[0].peer_id, peer_ids[0]); - assert_eq!(registry.nodes[1].service_name, "safenode2"); + assert_eq!(registry.nodes[1].service_name, "antnode2"); assert_eq!(registry.nodes[1].status, ServiceStatus::Stopped); assert_eq!(registry.nodes[1].peer_id, peer_ids[1]); - assert_eq!(registry.nodes[2].service_name, "safenode3"); + assert_eq!(registry.nodes[2].service_name, "antnode3"); assert_eq!(registry.nodes[2].status, ServiceStatus::Stopped); assert_eq!(registry.nodes[2].peer_id, peer_ids[2]); // Remove two nodes. - let mut cmd = Command::cargo_bin("safenode-manager").unwrap(); + let mut cmd = Command::cargo_bin("antctl").unwrap(); cmd.arg("remove") .arg("--service-name") .arg(registry.nodes[0].service_name.clone()) @@ -190,7 +190,7 @@ fn cross_platform_service_install_and_control() { } fn get_status() -> StatusSummary { - let output = Command::cargo_bin("safenode-manager") + let output = Command::cargo_bin("antctl") .unwrap() .arg("status") .arg("--json") diff --git a/ant-node-manager/tests/utils.rs b/ant-node-manager/tests/utils.rs index 2caaec81bd..c277bfc7b0 100644 --- a/ant-node-manager/tests/utils.rs +++ b/ant-node-manager/tests/utils.rs @@ -12,7 +12,7 @@ use color_eyre::{eyre::eyre, Result}; use std::process::Command; pub async fn get_service_status() -> Result { - let mut cmd = Command::cargo_bin("safenode-manager")?; + let mut cmd = Command::cargo_bin("antctl")?; let output = cmd .arg("status") .arg("--json") diff --git a/ant-node-rpc-client/Cargo.toml b/ant-node-rpc-client/Cargo.toml index 34568c8356..057ed08492 100644 --- a/ant-node-rpc-client/Cargo.toml +++ b/ant-node-rpc-client/Cargo.toml @@ -10,7 +10,7 @@ repository = "https://github.com/maidsafe/autonomi" version = "0.6.36" [[bin]] -name = "safenode_rpc_client" +name = "antnode_rpc_client" path = "src/main.rs" [features] diff --git a/ant-node-rpc-client/README.md b/ant-node-rpc-client/README.md index 5cedf7c74d..9eafd7630e 100644 --- a/ant-node-rpc-client/README.md +++ b/ant-node-rpc-client/README.md @@ -1,8 +1,8 @@ -# Safenode RPC Client +# Antnode RPC Client -This crate provides a client for the RPC protocol for interacting with `safenode`. It wraps the Protobuf-generated code and types such that users of the RPC protocol don't need to redefine that code. +This crate provides a client for the RPC protocol for interacting with `antnode`. It wraps the Protobuf-generated code and types such that users of the RPC protocol don't need to redefine that code. -It also provides a binary which is a CLI for interacting with a running `safenode` instance via the protocol. +It also provides a binary which is a CLI for interacting with a running `antnode` instance via the protocol. ## Binary Usage @@ -14,6 +14,6 @@ Run `cargo run -- ` to connect to a node. Provide the address of - `transfers`: Start listening for transfers events - `restart`: Restart the node after the specified delay - `stop`: Stop the node after the specified delay -- `update`: Update to latest `safenode` released version, and restart it +- `update`: Update to latest `antnode` released version, and restart it For more information about each command, run `cargo run -- --help`. diff --git a/ant-node-rpc-client/src/main.rs b/ant-node-rpc-client/src/main.rs index 79319fdb28..24634573d1 100644 --- a/ant-node-rpc-client/src/main.rs +++ b/ant-node-rpc-client/src/main.rs @@ -9,7 +9,7 @@ use ant_logging::{Level, LogBuilder}; use ant_node::NodeEvent; -use ant_protocol::safenode_proto::{safe_node_client::SafeNodeClient, NodeEventsRequest}; +use ant_protocol::antnode_proto::{ant_node_client::AntNodeClient, NodeEventsRequest}; use ant_service_management::rpc::{RpcActions, RpcClient}; use clap::Parser; use color_eyre::eyre::Result; @@ -68,7 +68,7 @@ enum Cmd { #[clap(default_value = "0")] delay_millis: u64, }, - /// Update to latest `safenode` released version, and restart it + /// Update to latest `antnode` released version, and restart it #[clap(name = "update")] Update { /// Delay in milliseconds before updating and restarting the node @@ -78,8 +78,8 @@ enum Cmd { /// Update the node's log levels. #[clap(name = "log")] Log { - /// Change the log level of the safenode. This accepts a comma-separated list of log levels for different modules - /// or specific keywords like "all" or "v". + /// Change the log level of antnode. This accepts a comma-separated list of log levels for + /// different modules or specific keywords like "all" or "v". /// /// Example: --level libp2p=DEBUG,tokio=INFO,all,sn_client=ERROR #[clap(name = "level", long)] @@ -91,9 +91,9 @@ enum Cmd { async fn main() -> Result<()> { // For client, default to log to std::out let logging_targets = vec![ - ("safenode".to_string(), Level::INFO), - ("ant-networking".to_string(), Level::INFO), - ("sn_node".to_string(), Level::INFO), + ("antnode".to_string(), Level::INFO), + ("ant_networking".to_string(), Level::INFO), + ("ant_node".to_string(), Level::INFO), ]; let _log_appender_guard = LogBuilder::new(logging_targets).initialize()?; @@ -177,7 +177,7 @@ pub async fn network_info(addr: SocketAddr) -> Result<()> { pub async fn node_events(addr: SocketAddr) -> Result<()> { let endpoint = format!("https://{addr}"); - let mut client = SafeNodeClient::connect(endpoint).await?; + let mut client = AntNodeClient::connect(endpoint).await?; let response = client .node_events(Request::new(NodeEventsRequest {})) .await?; diff --git a/ant-node/Cargo.toml b/ant-node/Cargo.toml index 4f778c361b..a1a5700b64 100644 --- a/ant-node/Cargo.toml +++ b/ant-node/Cargo.toml @@ -10,8 +10,8 @@ readme = "README.md" repository = "https://github.com/maidsafe/autonomi" [[bin]] -name = "safenode" -path = "src/bin/safenode/main.rs" +name = "antnode" +path = "src/bin/antnode/main.rs" [features] default = ["metrics", "upnp", "open-metrics", "encrypt-records"] diff --git a/ant-node/README.md b/ant-node/README.md index 99166551b3..1f4c0692ca 100644 --- a/ant-node/README.md +++ b/ant-node/README.md @@ -1,8 +1,8 @@ -# Safe Network Node (sn_node) +# Autonomi Node ## Overview -The `sn_node` directory provides the `safenode` binary and Python bindings for the Safe Network node implementation. This directory contains the core logic for node operations, including API definitions, error handling, event management, and data validation. +The `ant-node` directory provides the `antnode` binary and Python bindings for the Safe Network node implementation. This directory contains the core logic for node operations, including API definitions, error handling, event management, and data validation. ## Table of Contents @@ -19,7 +19,7 @@ The `sn_node` directory provides the `safenode` binary and Python bindings for t ## Installation ### Binary Installation -Follow the main project's installation guide to set up the `safenode` binary. +Follow the main project's installation guide to set up the `antnode` binary. ### Python Installation To install the Python bindings, you'll need: @@ -35,7 +35,7 @@ maturin develop ## Usage ### Binary Usage -To run the `safenode` binary, follow the instructions in the main project's usage guide. +To run the `antnode` binary, follow the instructions in the main project's usage guide. ### Python Usage @@ -44,10 +44,10 @@ The Python module provides a comprehensive interface to run and manage Safe Netw #### Basic Node Operations ```python -from safenode import SafeNode +from antnode import AntNode # Create and start a node -node = SafeNode() +node = AntNode() node.run( rewards_address="0x1234567890123456789012345678901234567890", # Your EVM wallet address evm_network="arbitrum_sepolia", # or "arbitrum_one" for mainnet @@ -98,7 +98,7 @@ logs_dir = node.get_logs_dir() data_dir = node.get_data_dir() # Get default directory for a specific peer -default_dir = SafeNode.get_default_root_dir(peer_id) +default_dir = AntNode.get_default_root_dir(peer_id) ``` #### Important Notes diff --git a/ant-node/pyproject.toml b/ant-node/pyproject.toml index 7cd3a34891..8eda49b80d 100644 --- a/ant-node/pyproject.toml +++ b/ant-node/pyproject.toml @@ -3,9 +3,9 @@ requires = ["maturin>=1.0,<2.0"] build-backend = "maturin" [project] -name = "safenode" +name = "antnode" dynamic = ["version"] -description = "SAFE Network Node" +description = "The Autonomi node binary" requires-python = ">=3.8" dependencies = [ "maturin>=1.7.4", @@ -14,8 +14,8 @@ dependencies = [ [tool.maturin] features = ["extension-module"] -module-name = "safenode._safenode" +module-name = "antnode._antnode" python-source = "python" bindings = "pyo3" manifest-path = "Cargo.toml" -sdist-include = ["python/safenode/*"] +sdist-include = ["python/antnode/*"] diff --git a/ant-node/python/example.py b/ant-node/python/example.py index 97314f40f2..472dc1fe6c 100644 --- a/ant-node/python/example.py +++ b/ant-node/python/example.py @@ -1,4 +1,4 @@ -from safenode import SafeNode +from antnode import AntNode import os def print_section(title): @@ -15,7 +15,7 @@ def demonstrate_basic_node_operations(): print_section("Basic Node Operations") # Create and start node - node = SafeNode() + node = AntNode() initial_rewards_address = "0x1234567890123456789012345678901234567890" print(f"Starting node with rewards address: {initial_rewards_address}") @@ -70,14 +70,14 @@ def demonstrate_directory_management(node, peer_id): print(f"Data directory: {data_dir}") # Get default directory for current peer - default_dir = SafeNode.get_default_root_dir(peer_id) + default_dir = AntNode.get_default_root_dir(peer_id) print(f"Default root directory for peer {peer_id}: {default_dir}") # Demonstrate custom directory - custom_dir = os.path.join(os.path.expanduser("~"), "safenode-test") + custom_dir = os.path.join(os.path.expanduser("~"), "antnode-test") print(f"\nStarting new node with custom directory: {custom_dir}") - new_node = SafeNode() + new_node = AntNode() new_node.run( rewards_address="0x1234567890123456789012345678901234567890", evm_network="arbitrum_sepolia", @@ -111,4 +111,4 @@ def main(): print(f"Example failed with error: {e}") if __name__ == "__main__": - main() \ No newline at end of file + main() diff --git a/ant-node/python/safenode/core.py b/ant-node/python/safenode/core.py index a911ffe63d..36fe95b13b 100644 --- a/ant-node/python/safenode/core.py +++ b/ant-node/python/safenode/core.py @@ -1,4 +1,4 @@ -"""Core functionality for safenode Python bindings.""" -from safenode._safenode import SafeNode +"""Core functionality for antnode Python bindings.""" +from antnode._antnode import AntNode -__all__ = ['SafeNode'] \ No newline at end of file +__all__ = ['AntNode'] diff --git a/ant-node/python/setup.py b/ant-node/python/setup.py index 89e32d6648..2b1f1a5000 100644 --- a/ant-node/python/setup.py +++ b/ant-node/python/setup.py @@ -1,8 +1,8 @@ from setuptools import setup setup( - name="safenode", - packages=["safenode"], + name="antnode", + packages=["antnode"], package_dir={"": "python"}, zip_safe=False, -) \ No newline at end of file +) diff --git a/ant-node/src/bin/safenode/main.rs b/ant-node/src/bin/antnode/main.rs similarity index 96% rename from ant-node/src/bin/safenode/main.rs rename to ant-node/src/bin/antnode/main.rs index c3472d0b6f..db0dd00203 100644 --- a/ant-node/src/bin/safenode/main.rs +++ b/ant-node/src/bin/antnode/main.rs @@ -20,7 +20,7 @@ use ant_logging::{Level, LogFormat, LogOutputDest, ReloadHandle}; use ant_node::{Marker, NodeBuilder, NodeEvent, NodeEventsReceiver}; use ant_peers_acquisition::PeersArgs; use ant_protocol::{ - node::get_safenode_root_dir, + node::get_antnode_root_dir, node_rpc::{NodeCtrl, StopResult}, version::IDENTIFY_PROTOCOL_STR, }; @@ -75,7 +75,7 @@ pub fn parse_log_output(val: &str) -> Result { // They are used for inserting line breaks when the help menu is rendered in the UI. #[derive(Parser, Debug)] #[command(disable_version_flag = true)] -#[clap(name = "safenode cli", version = env!("CARGO_PKG_VERSION"))] +#[clap(name = "antnode cli", version = env!("CARGO_PKG_VERSION"))] struct Opt { /// Specify whether the node is operating from a home network and situated behind a NAT without port forwarding /// capabilities. Setting this to true, activates hole-punching to facilitate direct connections from other nodes. @@ -281,7 +281,7 @@ fn main() -> Result<()> { ant_build_info::log_version_info(env!("CARGO_PKG_VERSION"), &IDENTIFY_PROTOCOL_STR); debug!( - "safenode built with git version: {}", + "antnode built with git version: {}", ant_build_info::git_info() ); @@ -367,7 +367,7 @@ You can check your reward balance by running: // write the PID to the root dir let pid = std::process::id(); - let pid_file = running_node.root_dir_path().join("safenode.pid"); + let pid_file = running_node.root_dir_path().join("antnode.pid"); std::fs::write(pid_file, pid.to_string().as_bytes())?; // Channel to receive node ctrl cmds from RPC service (if enabled), and events monitoring task @@ -391,7 +391,7 @@ You can check your reward balance by running: }) .await { - error!("Failed to send node control msg to safenode bin main thread: {err}"); + error!("Failed to send node control msg to antnode bin main thread: {err}"); } }); let ctrl_tx_clone_cpu = ctrl_tx.clone(); @@ -436,7 +436,7 @@ You can check your reward balance by running: }) .await { - error!("Failed to send node control msg to safenode bin main thread: {err}"); + error!("Failed to send node control msg to antnode bin main thread: {err}"); } break; } @@ -494,7 +494,7 @@ You can check your reward balance by running: } } Some(NodeCtrl::Update(_delay)) => { - // TODO: implement self-update once safenode app releases are published again + // TODO: implement self-update once antnode app releases are published again println!("No self-update supported yet."); } None => { @@ -518,9 +518,7 @@ fn monitor_node_events(mut node_events_rx: NodeEventsReceiver, ctrl_tx: mpsc::Se }) .await { - error!( - "Failed to send node control msg to safenode bin main thread: {err}" - ); + error!("Failed to send node control msg to antnode bin main thread: {err}"); break; } } @@ -532,9 +530,7 @@ fn monitor_node_events(mut node_events_rx: NodeEventsReceiver, ctrl_tx: mpsc::Se }) .await { - error!( - "Failed to send node control msg to safenode bin main thread: {err}" - ); + error!("Failed to send node control msg to antnode bin main thread: {err}"); break; } } @@ -561,13 +557,13 @@ fn init_logging(opt: &Opt, peer_id: PeerId) -> Result<(String, ReloadHandle, Opt ("ant_peers_acquisition".to_string(), Level::DEBUG), ("ant_protocol".to_string(), Level::DEBUG), ("ant_registers".to_string(), Level::DEBUG), - ("safenode".to_string(), Level::DEBUG), + ("antnode".to_string(), Level::DEBUG), ]; let output_dest = match &opt.log_output_dest { LogOutputDestArg::Stdout => LogOutputDest::Stdout, LogOutputDestArg::DataDir => { - let path = get_safenode_root_dir(peer_id)?.join("logs"); + let path = get_antnode_root_dir(peer_id)?.join("logs"); LogOutputDest::Path(path) } LogOutputDestArg::Path(path) => LogOutputDest::Path(path.clone()), @@ -671,7 +667,7 @@ fn get_root_dir_and_keypair(root_dir: &Option) -> Result<(PathBuf, Keyp libp2p::identity::ed25519::Keypair::from(secret_key.clone()).into(); let peer_id = keypair.public().to_peer_id(); - let dir = get_safenode_root_dir(peer_id)?; + let dir = get_antnode_root_dir(peer_id)?; std::fs::create_dir_all(&dir)?; let secret_key_path = dir.join("secret-key"); diff --git a/ant-node/src/bin/safenode/rpc_service.rs b/ant-node/src/bin/antnode/rpc_service.rs similarity index 96% rename from ant-node/src/bin/safenode/rpc_service.rs rename to ant-node/src/bin/antnode/rpc_service.rs index 1229bf873b..4e6404114d 100644 --- a/ant-node/src/bin/safenode/rpc_service.rs +++ b/ant-node/src/bin/antnode/rpc_service.rs @@ -8,15 +8,14 @@ use ant_logging::ReloadHandle; use ant_node::RunningNode; -use ant_protocol::node_rpc::{NodeCtrl, StopResult}; -use ant_protocol::safenode_proto::{ - k_buckets_response, - safe_node_server::{SafeNode, SafeNodeServer}, - KBucketsRequest, KBucketsResponse, NetworkInfoRequest, NetworkInfoResponse, NodeEvent, - NodeEventsRequest, NodeInfoRequest, NodeInfoResponse, RecordAddressesRequest, +use ant_protocol::antnode_proto::{ + ant_node_server::{AntNode, AntNodeServer}, + k_buckets_response, KBucketsRequest, KBucketsResponse, NetworkInfoRequest, NetworkInfoResponse, + NodeEvent, NodeEventsRequest, NodeInfoRequest, NodeInfoResponse, RecordAddressesRequest, RecordAddressesResponse, RestartRequest, RestartResponse, StopRequest, StopResponse, UpdateLogLevelRequest, UpdateLogLevelResponse, UpdateRequest, UpdateResponse, }; +use ant_protocol::node_rpc::{NodeCtrl, StopResult}; use eyre::{ErrReport, Result}; use std::{ collections::HashMap, @@ -42,7 +41,7 @@ struct SafeNodeRpcService { // Implementing RPC interface for service defined in .proto #[tonic::async_trait] -impl SafeNode for SafeNodeRpcService { +impl AntNode for SafeNodeRpcService { type NodeEventsStream = ReceiverStream>; async fn node_info( @@ -311,7 +310,7 @@ pub(crate) fn start_rpc_service( let _handle = tokio::spawn(async move { // adding our service to our server. if let Err(e) = Server::builder() - .add_service(SafeNodeServer::new(service)) + .add_service(AntNodeServer::new(service)) .serve(addr) .await { diff --git a/ant-node/src/bin/safenode/subcommands.rs b/ant-node/src/bin/antnode/subcommands.rs similarity index 100% rename from ant-node/src/bin/safenode/subcommands.rs rename to ant-node/src/bin/antnode/subcommands.rs diff --git a/ant-node/src/python.rs b/ant-node/src/python.rs index 06f15a144c..930f31b603 100644 --- a/ant-node/src/python.rs +++ b/ant-node/src/python.rs @@ -5,7 +5,7 @@ use crate::{NodeBuilder, RunningNode}; use ant_evm::{EvmNetwork, RewardsAddress}; use ant_networking::PutRecordCfg; use ant_protocol::{ - node::get_safenode_root_dir, + node::get_antnode_root_dir, storage::{ChunkAddress, RecordType}, NetworkAddress, }; @@ -26,13 +26,13 @@ use xor_name::XorName; /// Python wrapper for the Safe Network Node #[pyclass(name = "SafeNode")] -pub struct SafeNode { +pub struct AntNode { node: Arc>>, runtime: Arc>>, } #[pymethods] -impl SafeNode { +impl AntNode { #[new] fn new() -> Self { Self { @@ -427,7 +427,7 @@ impl SafeNode { None }; - let path = get_safenode_root_dir(peer_id.unwrap_or_else(|| PeerId::random())) + let path = get_antnode_root_dir(peer_id.unwrap_or_else(|| PeerId::random())) .map_err(|e| PyRuntimeError::new_err(format!("Failed to get default root dir: {e}")))?; Ok(path @@ -477,8 +477,8 @@ impl SafeNode { /// Python module initialization #[pymodule] -#[pyo3(name = "_safenode")] +#[pyo3(name = "_antnode")] fn init_module(_py: Python<'_>, m: &PyModule) -> PyResult<()> { - m.add_class::()?; + m.add_class::()?; Ok(()) } diff --git a/ant-node/tests/common/client.rs b/ant-node/tests/common/client.rs index 67f1f81ec5..df1193bbb0 100644 --- a/ant-node/tests/common/client.rs +++ b/ant-node/tests/common/client.rs @@ -7,7 +7,7 @@ // permissions and limitations relating to use of the SAFE Network Software. use ant_evm::Amount; -use ant_protocol::safenode_proto::{NodeInfoRequest, RestartRequest}; +use ant_protocol::antnode_proto::{NodeInfoRequest, RestartRequest}; use ant_service_management::{get_local_node_registry_path, NodeRegistry}; use autonomi::Client; use evmlib::wallet::Wallet; @@ -21,7 +21,7 @@ use tokio::sync::Mutex; use tonic::Request; use tracing::{debug, info}; -use crate::common::get_safenode_rpc_client; +use crate::common::get_antnode_rpc_client; /// This is a limited hard coded value as Droplet version has to contact the faucet to get the funds. /// This is limited to 10 requests to the faucet, where each request yields 100 SNT @@ -164,7 +164,7 @@ impl LocalNetwork { // Restart a local node by sending in the SafenodeRpcCmd::Restart to the node's RPC endpoint. pub async fn restart_node(rpc_endpoint: SocketAddr, retain_peer_id: bool) -> Result<()> { - let mut rpc_client = get_safenode_rpc_client(rpc_endpoint).await?; + let mut rpc_client = get_antnode_rpc_client(rpc_endpoint).await?; let response = rpc_client .node_info(Request::new(NodeInfoRequest {})) @@ -306,13 +306,13 @@ impl WanNetwork { // Ok(local_wallet) // } - // // Restart a remote safenode service by sending a RPC to the safenode manager daemon. + // // Restart a remote antnode service by sending a RPC to the antctl daemon. // pub async fn restart_node( // peer_id: &PeerId, // daemon_endpoint: SocketAddr, // retain_peer_id: bool, // ) -> Result<()> { - // let mut rpc_client = get_safenode_manager_rpc_client(daemon_endpoint).await?; + // let mut rpc_client = get_antctl_rpc_client(daemon_endpoint).await?; // let _response = rpc_client // .restart_node_service(Request::new(NodeServiceRestartRequest { @@ -322,8 +322,8 @@ impl WanNetwork { // })) // .await?; - // println!("Node restart requested to safenodemand {daemon_endpoint}"); - // info!("Node restart requested to safenodemand {daemon_endpoint}"); + // println!("Node restart requested to antctld {daemon_endpoint}"); + // info!("Node restart requested to antctld {daemon_endpoint}"); // Ok(()) // } diff --git a/ant-node/tests/common/mod.rs b/ant-node/tests/common/mod.rs index 4681fef4db..56b4fc638f 100644 --- a/ant-node/tests/common/mod.rs +++ b/ant-node/tests/common/mod.rs @@ -10,10 +10,9 @@ pub mod client; use self::client::LocalNetwork; -use ant_protocol::safenode_proto::{safe_node_client::SafeNodeClient, NodeInfoRequest}; +use ant_protocol::antnode_proto::{ant_node_client::AntNodeClient, NodeInfoRequest}; use ant_service_management::{ - get_local_node_registry_path, - safenode_manager_proto::safe_node_manager_client::SafeNodeManagerClient, NodeRegistry, + antctl_proto::ant_ctl_client::AntCtlClient, get_local_node_registry_path, NodeRegistry, }; use eyre::{bail, eyre, OptionExt, Result}; use itertools::Either; @@ -55,14 +54,14 @@ use tracing::{debug, error, warn}; // } // Connect to a RPC socket addr with retry -pub async fn get_safenode_rpc_client( +pub async fn get_antnode_rpc_client( socket_addr: SocketAddr, -) -> Result> { +) -> Result> { // get the new PeerId for the current NodeIndex let endpoint = format!("https://{socket_addr}"); let mut attempts = 0; loop { - if let Ok(rpc_client) = SafeNodeClient::connect(endpoint.clone()).await { + if let Ok(rpc_client) = AntNodeClient::connect(endpoint.clone()).await { break Ok(rpc_client); } attempts += 1; @@ -76,14 +75,14 @@ pub async fn get_safenode_rpc_client( } // Connect to a RPC socket addr with retry -pub async fn get_safenode_manager_rpc_client( +pub async fn get_antctl_rpc_client( socket_addr: SocketAddr, -) -> Result> { +) -> Result> { // get the new PeerId for the current NodeIndex let endpoint = format!("https://{socket_addr}"); let mut attempts = 0; loop { - if let Ok(rpc_client) = SafeNodeManagerClient::connect(endpoint.clone()).await { + if let Ok(rpc_client) = AntCtlClient::connect(endpoint.clone()).await { break Ok(rpc_client); } attempts += 1; @@ -101,7 +100,7 @@ pub async fn get_all_peer_ids(node_rpc_addresses: &Vec) -> Result Result> { - let safenode_rpc_endpoint = match self.inventory_file.clone() { + let antnode_rpc_endpoint = match self.inventory_file.clone() { Either::Left(inv) => { // check if we've reached the end - if loop_over && self.next_to_restart_idx > inv.safenodemand_endpoints.len() { + if loop_over && self.next_to_restart_idx > inv.antctld_endpoints.len() { self.next_to_restart_idx = 0; } - if let Some((peer_id, daemon_endpoint)) = inv - .safenodemand_endpoints - .iter() - .nth(self.next_to_restart_idx) + if let Some((peer_id, daemon_endpoint)) = + inv.antctld_endpoints.iter().nth(self.next_to_restart_idx) { self.restart(*peer_id, *daemon_endpoint, progress_on_error) .await?; - let safenode_rpc_endpoint = inv + let antnode_rpc_endpoint = inv .rpc_endpoints .get(peer_id) - .ok_or_eyre("Failed to obtain safenode rpc endpoint from inventory file")?; - Some(*safenode_rpc_endpoint) + .ok_or_eyre("Failed to obtain antnode rpc endpoint from inventory file")?; + Some(*antnode_rpc_endpoint) } else { warn!("We have restarted all the nodes in the list. Since loop_over is false, we are not restarting any nodes now."); None @@ -192,16 +189,16 @@ impl NodeRestart { self.next_to_restart_idx = 0; } - if let Some((peer_id, safenode_rpc_endpoint)) = reg + if let Some((peer_id, antnode_rpc_endpoint)) = reg .nodes .get(self.next_to_restart_idx) .map(|node| (node.peer_id, node.rpc_socket_addr)) { let peer_id = peer_id.ok_or_eyre("PeerId should be present for a local node")?; - self.restart(peer_id, safenode_rpc_endpoint, progress_on_error) + self.restart(peer_id, antnode_rpc_endpoint, progress_on_error) .await?; - Some(safenode_rpc_endpoint) + Some(antnode_rpc_endpoint) } else { warn!("We have restarted all the nodes in the list. Since loop_over is false, we are not restarting any nodes now."); None @@ -209,7 +206,7 @@ impl NodeRestart { } }; - Ok(safenode_rpc_endpoint) + Ok(antnode_rpc_endpoint) } async fn restart( @@ -237,7 +234,7 @@ impl NodeRestart { }, Either::Right(_reg) => { match LocalNetwork::restart_node(endpoint, self.retain_peer_id).await - .map_err(|err| eyre!("Failed to restart peer {peer_id:?} on safenode RPC endpoint: {endpoint:?} with err {err:?}")) { + .map_err(|err| eyre!("Failed to restart peer {peer_id:?} on antnode RPC endpoint: {endpoint:?} with err {err:?}")) { Ok(_) => { self.next_to_restart_idx += 1; }, diff --git a/ant-node/tests/verify_data_location.rs b/ant-node/tests/verify_data_location.rs index 9176e24a3f..db934a4c67 100644 --- a/ant-node/tests/verify_data_location.rs +++ b/ant-node/tests/verify_data_location.rs @@ -12,14 +12,14 @@ mod common; use ant_logging::LogBuilder; use ant_networking::{sleep, sort_peers_by_key}; use ant_protocol::{ - safenode_proto::{NodeInfoRequest, RecordAddressesRequest}, + antnode_proto::{NodeInfoRequest, RecordAddressesRequest}, NetworkAddress, PrettyPrintRecordKey, CLOSE_GROUP_SIZE, }; use autonomi::Client; use bytes::Bytes; use common::{ client::{get_all_rpc_addresses, get_client_and_funded_wallet}, - get_all_peer_ids, get_safenode_rpc_client, NodeRestart, + get_all_peer_ids, get_antnode_rpc_client, NodeRestart, }; use eyre::{eyre, Result}; use libp2p::{ @@ -116,12 +116,12 @@ async fn verify_data_location() -> Result<()> { } current_churn_count += 1; - let safenode_rpc_endpoint = match node_restart.restart_next(false, false).await? { + let antnode_rpc_endpoint = match node_restart.restart_next(false, false).await? { None => { // we have reached the end. break 'main Ok(()); } - Some(safenode_rpc_endpoint) => safenode_rpc_endpoint, + Some(antnode_rpc_endpoint) => antnode_rpc_endpoint, }; // wait for the dead peer to be removed from the RT and the replication flow to finish @@ -132,7 +132,7 @@ async fn verify_data_location() -> Result<()> { tokio::time::sleep(VERIFICATION_DELAY).await; // get the new PeerId for the current NodeIndex - let mut rpc_client = get_safenode_rpc_client(safenode_rpc_endpoint).await?; + let mut rpc_client = get_antnode_rpc_client(antnode_rpc_endpoint).await?; let response = rpc_client .node_info(Request::new(NodeInfoRequest {})) @@ -179,7 +179,7 @@ async fn get_records_and_holders(node_rpc_addresses: &[SocketAddr]) -> Result Result<()> { let mut all_failed_list = BTreeMap::new(); for (node_index, rpc_address) in node_rpc_address.iter().enumerate() { - let mut rpc_client = get_safenode_rpc_client(*rpc_address).await?; + let mut rpc_client = get_antnode_rpc_client(*rpc_address).await?; let response = rpc_client .k_buckets(Request::new(KBucketsRequest {})) diff --git a/ant-protocol/README.md b/ant-protocol/README.md index 8c494b12a3..38a8cf25bb 100644 --- a/ant-protocol/README.md +++ b/ant-protocol/README.md @@ -76,9 +76,9 @@ The `storage` module handles the storage aspects of the protocol. ## Protobuf Definitions -The `safenode_proto` directory contains the Protocol Buffers definitions for the Safe Network. +The `antnode_proto` directory contains the Protocol Buffers definitions for the Safe Network. ### Files - `req_resp_types.proto`: Definitions for request and response types. -- `safenode.proto`: Main Protocol Buffers definitions for the Safe Network. +- `antnode.proto`: Main Protocol Buffers definitions for the Safe Network. diff --git a/ant-protocol/build.rs b/ant-protocol/build.rs index 7d4e64dd13..d5d53e9508 100644 --- a/ant-protocol/build.rs +++ b/ant-protocol/build.rs @@ -7,6 +7,6 @@ // permissions and limitations relating to use of the SAFE Network Software. fn main() -> Result<(), Box> { - tonic_build::compile_protos("./src/safenode_proto/safenode.proto")?; + tonic_build::compile_protos("./src/antnode_proto/antnode.proto")?; Ok(()) } diff --git a/ant-protocol/src/safenode_proto/safenode.proto b/ant-protocol/src/antnode_proto/antnode.proto similarity index 97% rename from ant-protocol/src/safenode_proto/safenode.proto rename to ant-protocol/src/antnode_proto/antnode.proto index d6f647610d..3d49beca7d 100644 --- a/ant-protocol/src/safenode_proto/safenode.proto +++ b/ant-protocol/src/antnode_proto/antnode.proto @@ -16,12 +16,12 @@ syntax = "proto3"; // Package name -package safenode_proto; +package antnode_proto; import "req_resp_types.proto"; // Service exposed by a SAFE node for administration, infrastructure, and support purposes -service SafeNode { +service AntNode { // Returns information about this node rpc NodeInfo (NodeInfoRequest) returns (NodeInfoResponse); diff --git a/ant-protocol/src/safenode_proto/req_resp_types.proto b/ant-protocol/src/antnode_proto/req_resp_types.proto similarity index 92% rename from ant-protocol/src/safenode_proto/req_resp_types.proto rename to ant-protocol/src/antnode_proto/req_resp_types.proto index f0333e610a..0b39dd316b 100644 --- a/ant-protocol/src/safenode_proto/req_resp_types.proto +++ b/ant-protocol/src/antnode_proto/req_resp_types.proto @@ -10,9 +10,9 @@ syntax = "proto3"; // Package name -package safenode_proto; +package antnode_proto; -// Basic info about the node and safenode app +// Basic info about the node and antnode app message NodeInfoRequest {} message NodeInfoResponse { @@ -57,14 +57,14 @@ message KBucketsResponse { map kbuckets = 1; } -// Stop the safenode app +// Stop the antnode app message StopRequest { uint64 delay_millis = 1; } message StopResponse {} -// Restart the safenode app +// Restart the antnode app message RestartRequest { uint64 delay_millis = 1; bool retain_peer_id = 2; @@ -72,7 +72,7 @@ message RestartRequest { message RestartResponse {} -// Update the safenode app +// Update the antnode app message UpdateRequest { uint64 delay_millis = 1; } diff --git a/ant-protocol/src/lib.rs b/ant-protocol/src/lib.rs index 6db02f308d..4282e6c213 100644 --- a/ant-protocol/src/lib.rs +++ b/ant-protocol/src/lib.rs @@ -13,7 +13,7 @@ extern crate tracing; pub mod error; /// Messages types pub mod messages; -/// Helpers for safenode +/// Helpers for antnode pub mod node; /// RPC commands to node pub mod node_rpc; @@ -25,8 +25,8 @@ pub mod version; // this includes code generated from .proto files #[expect(clippy::unwrap_used, clippy::clone_on_ref_ptr)] #[cfg(feature = "rpc")] -pub mod safenode_proto { - tonic::include_proto!("safenode_proto"); +pub mod antnode_proto { + tonic::include_proto!("antnode_proto"); } pub use error::Error; use storage::ScratchpadAddress; diff --git a/ant-protocol/src/node.rs b/ant-protocol/src/node.rs index 34dab85ee3..f6772fe42a 100644 --- a/ant-protocol/src/node.rs +++ b/ant-protocol/src/node.rs @@ -10,13 +10,12 @@ use crate::error::{Error, Result}; use libp2p::PeerId; use std::path::PathBuf; -/// Get the default safenode root dir for the provided PeerId -pub fn get_safenode_root_dir(peer_id: PeerId) -> Result { +/// Get the default antnode root dir for the provided PeerId +pub fn get_antnode_root_dir(peer_id: PeerId) -> Result { let dir = dirs_next::data_dir() .ok_or_else(|| Error::CouldNotObtainDataDir)? - .join("safe") + .join("autonomi") .join("node") .join(peer_id.to_string()); - Ok(dir) } diff --git a/ant-protocol/src/node_rpc.rs b/ant-protocol/src/node_rpc.rs index d35ddac5b4..16bf78e767 100644 --- a/ant-protocol/src/node_rpc.rs +++ b/ant-protocol/src/node_rpc.rs @@ -10,20 +10,20 @@ use color_eyre::eyre::Error; use std::time::Duration; #[derive(Debug)] -/// To be sent to the main thread in order to stop/restart the execution of the safenode app. +/// To be sent to the main thread in order to stop/restart the execution of the antnode app. pub enum NodeCtrl { - /// Request to stop the execution of the safenode app, providing an error as a reason for it. + /// Request to stop the execution of the antnode app, providing an error as a reason for it. Stop { delay: Duration, result: StopResult, }, - /// Request to restart the execution of the safenode app, retrying to join the network, after the requested delay. + /// Request to restart the execution of the antnode app, retrying to join the network, after the requested delay. /// Set `retain_peer_id` to `true` if you want to re-use the same root dir/secret keys/PeerId. Restart { delay: Duration, retain_peer_id: bool, }, - // Request to update the safenode app, and restart it, after the requested delay. + // Request to update the antnode app, and restart it, after the requested delay. Update(Duration), } diff --git a/ant-service-management/Cargo.toml b/ant-service-management/Cargo.toml index 7b7842eb15..88e6dd313f 100644 --- a/ant-service-management/Cargo.toml +++ b/ant-service-management/Cargo.toml @@ -1,6 +1,6 @@ [package] authors = ["MaidSafe Developers "] -description = "A command-line application for installing, managing and operating `safenode` as a service." +description = "A command-line application for installing, managing and operating `antnode` as a service." edition = "2021" homepage = "https://maidsafe.net" license = "GPL-3.0" diff --git a/ant-service-management/README.md b/ant-service-management/README.md index b5827d037a..5ec63b75b7 100644 --- a/ant-service-management/README.md +++ b/ant-service-management/README.md @@ -4,7 +4,7 @@ Provides utilities for dealing with services, which are mainly used by the node ## RPC Actions -The `RpcActions` trait defines the protocol that is currently available for interacting with `safenode`: +The `RpcActions` trait defines the protocol that is currently available for interacting with `antnode`: ``` node_info: Returns information about the node, such as its peer ID and version. diff --git a/ant-service-management/build.rs b/ant-service-management/build.rs index 66db004805..597248aaf6 100644 --- a/ant-service-management/build.rs +++ b/ant-service-management/build.rs @@ -7,6 +7,6 @@ // permissions and limitations relating to use of the SAFE Network Software. fn main() -> Result<(), Box> { - tonic_build::compile_protos("./src/safenode_manager_proto/safenode_manager.proto")?; + tonic_build::compile_protos("./src/antctl_proto/antctl.proto")?; Ok(()) } diff --git a/ant-service-management/src/safenode_manager_proto/safenode_manager.proto b/ant-service-management/src/antctl_proto/antctl.proto similarity index 79% rename from ant-service-management/src/safenode_manager_proto/safenode_manager.proto rename to ant-service-management/src/antctl_proto/antctl.proto index e826144b38..ed63891f92 100644 --- a/ant-service-management/src/safenode_manager_proto/safenode_manager.proto +++ b/ant-service-management/src/antctl_proto/antctl.proto @@ -6,19 +6,18 @@ // KIND, either express or implied. Please review the Licences for the specific language governing // permissions and limitations relating to use of the SAFE Network Software. -// Protocol buffer for the safenodemand. This is used to control -// the safeodes started by the safenode-manager. +// Protocol buffer for antctld. This is used to control nodes started by antctl. // Version of protocol buffer used syntax = "proto3"; // Package name -package safenode_manager_proto; +package antctl_proto; import "req_resp_types.proto"; -service SafeNodeManager { - // Restart a running safenode service. +service AntCtl { + // Restart a running antnode service. rpc RestartNodeService (NodeServiceRestartRequest) returns (NodeServiceRestartResponse); // Get the status of the nodes managed by the Daemon diff --git a/ant-service-management/src/safenode_manager_proto/req_resp_types.proto b/ant-service-management/src/antctl_proto/req_resp_types.proto similarity index 97% rename from ant-service-management/src/safenode_manager_proto/req_resp_types.proto rename to ant-service-management/src/antctl_proto/req_resp_types.proto index bc2f3387a7..516620174a 100644 --- a/ant-service-management/src/safenode_manager_proto/req_resp_types.proto +++ b/ant-service-management/src/antctl_proto/req_resp_types.proto @@ -10,7 +10,7 @@ syntax = "proto3"; // Package name -package safenode_manager_proto; +package antctl_proto; message NodeServiceRestartRequest { bytes peer_id = 1; @@ -37,4 +37,4 @@ message GetStatusResponse { repeated Node nodes = 1; -} \ No newline at end of file +} diff --git a/ant-service-management/src/lib.rs b/ant-service-management/src/lib.rs index db32f81c34..406f608631 100644 --- a/ant-service-management/src/lib.rs +++ b/ant-service-management/src/lib.rs @@ -17,8 +17,8 @@ pub mod rpc; #[macro_use] extern crate tracing; -pub mod safenode_manager_proto { - tonic::include_proto!("safenode_manager_proto"); +pub mod antctl_proto { + tonic::include_proto!("antctl_proto"); } use async_trait::async_trait; @@ -196,7 +196,7 @@ pub fn get_local_node_registry_path() -> Result { error!("Failed to get data_dir"); Error::UserDataDirectoryNotObtainable })? - .join("safe") + .join("autonomi") .join("local_node_registry.json"); if let Some(parent) = path.parent() { std::fs::create_dir_all(parent) diff --git a/ant-service-management/src/node.rs b/ant-service-management/src/node.rs index 432681be28..e268976226 100644 --- a/ant-service-management/src/node.rs +++ b/ant-service-management/src/node.rs @@ -52,7 +52,7 @@ impl<'a> NodeService<'a> { #[async_trait] impl ServiceStateActions for NodeService<'_> { fn bin_path(&self) -> PathBuf { - self.service_data.safenode_path.clone() + self.service_data.antnode_path.clone() } fn build_upgrade_install_context(&self, options: UpgradeOptions) -> Result { @@ -151,7 +151,7 @@ impl ServiceStateActions for NodeService<'_> { contents: None, environment: options.env_variables, label: label.clone(), - program: self.service_data.safenode_path.to_path_buf(), + program: self.service_data.antnode_path.to_path_buf(), username: self.service_data.user.clone(), working_directory: None, }) @@ -219,7 +219,7 @@ impl ServiceStateActions for NodeService<'_> { for addr in &network_info.listeners { if let Some(port) = get_port_from_multiaddr(addr) { debug!( - "Found safenode port for {}: {port}", + "Found antnode port for {}: {port}", self.service_data.service_name ); self.service_data.node_port = Some(port); @@ -228,7 +228,7 @@ impl ServiceStateActions for NodeService<'_> { } if self.service_data.node_port.is_none() { - error!("Could not find safenode port"); + error!("Could not find antnode port"); error!("This will cause the node to have a different port during upgrade"); } @@ -280,6 +280,7 @@ impl ServiceStateActions for NodeService<'_> { #[derive(Clone, Debug, Serialize, Deserialize)] pub struct NodeServiceData { + pub antnode_path: PathBuf, #[serde(default)] pub auto_restart: bool, #[serde( @@ -317,7 +318,6 @@ pub struct NodeServiceData { pub rewards_address: RewardsAddress, pub reward_balance: Option, pub rpc_socket_addr: SocketAddr, - pub safenode_path: PathBuf, pub service_name: String, pub status: ServiceStatus, #[serde(default = "default_upnp")] @@ -390,7 +390,7 @@ where impl NodeServiceData { /// Returns the UDP port from our node's listen address. - pub fn get_safenode_port(&self) -> Option { + pub fn get_antnode_port(&self) -> Option { // assuming the listening addr contains /ip4/127.0.0.1/udp/56215/quic-v1/p2p/ if let Some(multi_addrs) = &self.listen_addr { println!("Listening addresses are defined"); diff --git a/ant-service-management/src/rpc.rs b/ant-service-management/src/rpc.rs index c1131b39f1..004ce39849 100644 --- a/ant-service-management/src/rpc.rs +++ b/ant-service-management/src/rpc.rs @@ -8,8 +8,8 @@ use crate::error::{Error, Result}; use ant_protocol::{ - safenode_proto::{ - safe_node_client::SafeNodeClient, NetworkInfoRequest, NodeInfoRequest, + antnode_proto::{ + ant_node_client::AntNodeClient, NetworkInfoRequest, NodeInfoRequest, RecordAddressesRequest, RestartRequest, StopRequest, UpdateLogLevelRequest, UpdateRequest, }, CLOSE_GROUP_SIZE, @@ -90,14 +90,14 @@ impl RpcClient { } // Connect to the RPC endpoint with retry - async fn connect_with_retry(&self) -> Result> { + async fn connect_with_retry(&self) -> Result> { let mut attempts = 0; loop { debug!( "Attempting connection to node RPC endpoint at {}...", self.endpoint ); - match SafeNodeClient::connect(self.endpoint.clone()).await { + match AntNodeClient::connect(self.endpoint.clone()).await { Ok(rpc_client) => { debug!("Connection successful"); break Ok(rpc_client); @@ -239,7 +239,7 @@ impl RpcActions for RpcClient { "Attempting connection to node RPC endpoint at {}...", self.endpoint ); - if let Ok(mut client) = SafeNodeClient::connect(self.endpoint.clone()).await { + if let Ok(mut client) = AntNodeClient::connect(self.endpoint.clone()).await { debug!("Connection to RPC successful"); if let Ok(response) = client .network_info(Request::new(NetworkInfoRequest {})) diff --git a/autonomi-cli/src/access/data_dir.rs b/autonomi-cli/src/access/data_dir.rs index 9233507264..3c78d3314b 100644 --- a/autonomi-cli/src/access/data_dir.rs +++ b/autonomi-cli/src/access/data_dir.rs @@ -15,8 +15,8 @@ use std::path::PathBuf; pub fn get_client_data_dir_path() -> Result { let mut home_dirs = dirs_next::data_dir() .ok_or_else(|| eyre!("Failed to obtain data dir, your OS might not be supported."))?; - home_dirs.push("safe"); home_dirs.push("autonomi"); + home_dirs.push("client"); std::fs::create_dir_all(home_dirs.as_path()) .wrap_err("Failed to create data dir") .with_suggestion(|| { diff --git a/autonomi-cli/src/opt.rs b/autonomi-cli/src/opt.rs index 3508477813..804156e4bd 100644 --- a/autonomi-cli/src/opt.rs +++ b/autonomi-cli/src/opt.rs @@ -27,9 +27,9 @@ pub(crate) struct Opt { /// `data-dir` is the default value. /// /// The data directory location is platform specific: - /// - Linux: $HOME/.local/share/safe/autonomi/logs - /// - macOS: $HOME/Library/Application Support/safe/autonomi/logs - /// - Windows: C:\Users\\AppData\Roaming\safe\autonomi\logs + /// - Linux: $HOME/.local/share/autonomi/client/logs + /// - macOS: $HOME/Library/Application Support/autonomi/client/logs + /// - Windows: C:\Users\\AppData\Roaming\autonomi\client\logs #[allow(rustdoc::invalid_html_tags)] #[clap(long, value_parser = LogOutputDest::parse_from_str, verbatim_doc_comment, default_value = "data-dir")] pub log_output_dest: LogOutputDest, diff --git a/autonomi-cli/src/wallet/fs.rs b/autonomi-cli/src/wallet/fs.rs index a467961016..39426bf5a1 100644 --- a/autonomi-cli/src/wallet/fs.rs +++ b/autonomi-cli/src/wallet/fs.rs @@ -25,8 +25,8 @@ pub static SELECTED_WALLET_ADDRESS: OnceLock = OnceLock::new(); /// Creates the wallets folder if it is missing and returns the folder path. pub(crate) fn get_client_wallet_dir_path() -> Result { let mut home_dirs = dirs_next::data_dir().ok_or(Error::WalletsFolderNotFound)?; - home_dirs.push("safe"); home_dirs.push("autonomi"); + home_dirs.push("client"); home_dirs.push("wallets"); std::fs::create_dir_all(home_dirs.as_path()).map_err(|_| Error::FailedToCreateWalletsFolder)?; diff --git a/autonomi/README.md b/autonomi/README.md index 8ffe97ca45..072fb0a732 100644 --- a/autonomi/README.md +++ b/autonomi/README.md @@ -29,15 +29,15 @@ cargo run --bin evm-testnet 3. Run a local network with the `local` feature and use the local evm node. ```sh -cargo run --bin=safenode-manager --features=local -- local run --build --clean --rewards-address evm-local +cargo run --bin antctl --features local -- local run --build --clean --rewards-address evm-local ``` 4. Then run the tests with the `local` feature and pass the EVM params again: ```sh -EVM_NETWORK=local cargo test --package=autonomi --features=local +EVM_NETWORK=local cargo test --package autonomi --features local # Or with logs -RUST_LOG=autonomi EVM_NETWORK=local cargo test --package=autonomi --features=local -- --nocapture +RUST_LOG=autonomi EVM_NETWORK=local cargo test --package autonomi --features local -- --nocapture ``` ### Using a live testnet or mainnet @@ -48,16 +48,16 @@ point it to a live network. 1. Run a local network with the `local` feature: ```sh -cargo run --bin=safenode-manager --features=local -- local run --build --clean --rewards-address evm-arbitrum-one +cargo run --bin antctl --features local -- local run --build --clean --rewards-address evm-arbitrum-one ``` 2. Then run the tests with the `local` feature. Make sure that the wallet of the private key you pass has enough gas and payment tokens on the network (in this case Arbitrum One): ```sh -EVM_NETWORK=arbitrum-one EVM_PRIVATE_KEY= cargo test --package=autonomi --features=local +EVM_NETWORK=arbitrum-one EVM_PRIVATE_KEY= cargo test --package autonomi --features local # Or with logs -RUST_LOG=autonomi EVM_NETWORK=arbitrum-one EVM_PRIVATE_KEY= cargo test --package=autonomi --features=local -- --nocapture +RUST_LOG=autonomi EVM_NETWORK=arbitrum-one EVM_PRIVATE_KEY= cargo test --package autonomi --features local -- --nocapture ``` ### WebAssembly @@ -84,7 +84,7 @@ SAFE_PEERS=/ip4//tcp//ws/p2p/ wasm-pack test --release --fire set and build the JS package: ```sh -wasm-pack build --dev --target=web autonomi --features=vault +wasm-pack build --dev --target web autonomi --features vault ``` Then cd into `autonomi/tests-js`, and use `npm` to install and serve the test html file. @@ -106,8 +106,8 @@ Build the package with the `external-signer` feature (and again with the env var Python: ```sh -wasm-pack build --dev --target=web autonomi --features=external-signer -python -m http.server --directory=autonomi 8000 +wasm-pack build --dev --target web autonomi --features external-signer +python -m http.server --directory autonomi 8000 ``` Then visit `http://127.0.0.1:8000/examples/metamask` in your (modern) browser. diff --git a/node-launchpad/Cargo.toml b/node-launchpad/Cargo.toml index 05e5eca0fc..4e488880a2 100644 --- a/node-launchpad/Cargo.toml +++ b/node-launchpad/Cargo.toml @@ -1,13 +1,13 @@ [package] authors = ["MaidSafe Developers "] -description = "Node Launchpad" +description = "TUI for running nodes on the Autonomi network" name = "node-launchpad" version = "0.4.5" edition = "2021" license = "GPL-3.0" homepage = "https://maidsafe.net" readme = "README.md" -repository = "https://github.com/maidsafe/safe_network" +repository = "https://github.com/maidsafe/autonomi" build = "build.rs" [[bin]] @@ -23,7 +23,9 @@ ant-evm = { path = "../ant-evm", version = "0.1.4" } ant-node-manager = { version = "0.11.3", path = "../ant-node-manager" } ant-peers-acquisition = { version = "0.5.7", path = "../ant-peers-acquisition" } ant-protocol = { path = "../ant-protocol", version = "0.17.15" } +ant-releases = { git = "https://github.com/jacderida/ant-releases.git", branch = "chore-rename_binaries" } ant-service-management = { version = "0.4.3", path = "../ant-service-management" } +arboard = "3.4.1" atty = "0.2.14" better-panic = "0.3.0" chrono = "~0.4.19" @@ -34,13 +36,14 @@ clap = { version = "4.4.5", features = [ "unicode", "string", "unstable-styles", -] } +]} color-eyre = "0.6.2" config = "0.14.0" crossterm = { version = "0.27.0", features = ["serde", "event-stream"] } derive_deref = "1.1.1" directories = "5.0.1" dirs-next = "~2.0.0" +faccess = "0.2.4" futures = "0.3.28" fs_extra = "1.3.0" human-panic = "1.2.0" @@ -51,16 +54,17 @@ log = "0.4.20" pretty_assertions = "1.4.0" prometheus-parse = "0.2.5" ratatui = { version = "0.29.0", features = ["serde", "macros", "unstable-widget-ref"] } +regex = "1.11.0" reqwest = { version = "0.12.2", default-features = false, features = [ "rustls-tls-manual-roots", ]} serde = { version = "1.0.188", features = ["derive"] } serde_json = "1.0.107" signal-hook = "0.3.17" -sn-releases = "~0.2.6" strip-ansi-escapes = "0.2.0" strum = { version = "0.26.1", features = ["derive"] } sysinfo = "0.30.12" +throbber-widgets-tui = "0.8.0" tokio = { version = "1.32.0", features = ["full"] } tokio-util = "0.7.9" tracing = "0.1.37" @@ -68,10 +72,6 @@ tracing-error = "0.2.0" tracing-subscriber = { version = "0.3.17", features = ["env-filter", "serde"] } tui-input = "0.8.0" which = "6.0.1" -faccess = "0.2.4" -throbber-widgets-tui = "0.8.0" -regex = "1.11.0" -arboard = "3.4.1" [build-dependencies] vergen = { version = "8.2.6", features = ["build", "git", "gitoxide", "cargo"] } diff --git a/node-launchpad/src/app.rs b/node-launchpad/src/app.rs index c1874a9c2f..40124f4d3f 100644 --- a/node-launchpad/src/app.rs +++ b/node-launchpad/src/app.rs @@ -53,7 +53,7 @@ impl App { tick_rate: f64, frame_rate: f64, peers_args: PeersArgs, - safenode_path: Option, + antnode_path: Option, app_data_path: Option, ) -> Result { // Configurations @@ -93,7 +93,7 @@ impl App { allocated_disk_space: app_data.nodes_to_start, rewards_address: app_data.discord_username.clone(), peers_args, - safenode_path, + antnode_path, data_dir_path, connection_mode, port_from: Some(port_from), diff --git a/node-launchpad/src/bin/tui/main.rs b/node-launchpad/src/bin/tui/main.rs index 9c5deb8980..f2f28af40b 100644 --- a/node-launchpad/src/bin/tui/main.rs +++ b/node-launchpad/src/bin/tui/main.rs @@ -44,11 +44,11 @@ pub struct Cli { )] pub frame_rate: f64, - /// Provide a path for the safenode binary to be used by the service. + /// Provide a path for the antnode binary to be used by the service. /// /// Useful for creating the service using a custom built binary. #[clap(long)] - safenode_path: Option, + antnode_path: Option, #[command(flatten)] pub(crate) peers: PeersArgs, @@ -128,7 +128,7 @@ async fn main() -> Result<()> { args.tick_rate, args.frame_rate, args.peers, - args.safenode_path, + args.antnode_path, None, ) .await?; diff --git a/node-launchpad/src/components/status.rs b/node-launchpad/src/components/status.rs index 6be940dca9..02e39a54ad 100644 --- a/node-launchpad/src/components/status.rs +++ b/node-launchpad/src/components/status.rs @@ -95,7 +95,7 @@ pub struct Status<'a> { // Peers to pass into nodes for startup peers_args: PeersArgs, // If path is provided, we don't fetch the binary from the network - safenode_path: Option, + antnode_path: Option, // Path where the node data is stored data_dir_path: PathBuf, // Connection mode @@ -119,7 +119,7 @@ pub struct StatusConfig { pub allocated_disk_space: usize, pub rewards_address: String, pub peers_args: PeersArgs, - pub safenode_path: Option, + pub antnode_path: Option, pub data_dir_path: PathBuf, pub connection_mode: ConnectionMode, pub port_from: Option, @@ -143,7 +143,7 @@ impl Status<'_> { nodes_to_start: config.allocated_disk_space, lock_registry: None, rewards_address: config.rewards_address, - safenode_path: config.safenode_path, + antnode_path: config.antnode_path, data_dir_path: config.data_dir_path, connection_mode: config.connection_mode, port_from: config.port_from, @@ -418,7 +418,7 @@ impl Component for Status<'_> { if we_have_nodes && has_changed { debug!("Setting lock_registry to ResettingNodes"); self.lock_registry = Some(LockRegistryState::ResettingNodes); - info!("Resetting safenode services because the Rewards Address was reset."); + info!("Resetting antnode services because the Rewards Address was reset."); let action_sender = self.get_actions_sender()?; self.node_management .send_task(NodeManagementTask::ResetNodes { @@ -430,7 +430,7 @@ impl Component for Status<'_> { Action::StoreStorageDrive(ref drive_mountpoint, ref _drive_name) => { debug!("Setting lock_registry to ResettingNodes"); self.lock_registry = Some(LockRegistryState::ResettingNodes); - info!("Resetting safenode services because the Storage Drive was changed."); + info!("Resetting antnode services because the Storage Drive was changed."); let action_sender = self.get_actions_sender()?; self.node_management .send_task(NodeManagementTask::ResetNodes { @@ -444,7 +444,7 @@ impl Component for Status<'_> { debug!("Setting lock_registry to ResettingNodes"); self.lock_registry = Some(LockRegistryState::ResettingNodes); self.connection_mode = connection_mode; - info!("Resetting safenode services because the Connection Mode range was changed."); + info!("Resetting antnode services because the Connection Mode range was changed."); let action_sender = self.get_actions_sender()?; self.node_management .send_task(NodeManagementTask::ResetNodes { @@ -457,7 +457,7 @@ impl Component for Status<'_> { self.lock_registry = Some(LockRegistryState::ResettingNodes); self.port_from = Some(port_from); self.port_to = Some(port_range); - info!("Resetting safenode services because the Port Range was changed."); + info!("Resetting antnode services because the Port Range was changed."); let action_sender = self.get_actions_sender()?; self.node_management .send_task(NodeManagementTask::ResetNodes { @@ -618,7 +618,7 @@ impl Component for Status<'_> { owner: self.rewards_address.clone(), peers_args: self.peers_args.clone(), run_nat_detection: self.should_we_run_nat_detection(), - safenode_path: self.safenode_path.clone(), + antnode_path: self.antnode_path.clone(), data_dir_path: Some(self.data_dir_path.clone()), action_sender: action_sender.clone(), connection_mode: self.connection_mode, diff --git a/node-launchpad/src/components/utils.rs b/node-launchpad/src/components/utils.rs index d56e33392a..3b1c2c9986 100644 --- a/node-launchpad/src/components/utils.rs +++ b/node-launchpad/src/components/utils.rs @@ -8,9 +8,9 @@ use crate::system; use ant_node_manager::config::get_service_log_dir_path; +use ant_releases::ReleaseType; use color_eyre::eyre::{self}; use ratatui::prelude::*; -use sn_releases::ReleaseType; /// helper function to create a centered rect using up certain percentage of the available rect `r` pub fn centered_rect(percent_x: u16, percent_y: u16, r: Rect) -> Rect { diff --git a/node-launchpad/src/node_mgmt.rs b/node-launchpad/src/node_mgmt.rs index cbafd7bd3c..955a2b9009 100644 --- a/node-launchpad/src/node_mgmt.rs +++ b/node-launchpad/src/node_mgmt.rs @@ -5,10 +5,10 @@ use ant_node_manager::{ add_services::config::PortRange, config::get_node_registry_path, VerbosityLevel, }; use ant_peers_acquisition::PeersArgs; +use ant_releases::{self, ReleaseType, SafeReleaseRepoActions}; use ant_service_management::NodeRegistry; use color_eyre::eyre::{eyre, Error}; use color_eyre::Result; -use sn_releases::{self, ReleaseType, SafeReleaseRepoActions}; use std::{path::PathBuf, str::FromStr}; use tokio::runtime::Builder; use tokio::sync::mpsc::{self, UnboundedSender}; @@ -126,7 +126,7 @@ pub struct MaintainNodesArgs { pub owner: String, pub peers_args: PeersArgs, pub run_nat_detection: bool, - pub safenode_path: Option, + pub antnode_path: Option, pub data_dir_path: Option, pub action_sender: UnboundedSender, pub connection_mode: ConnectionMode, @@ -297,7 +297,7 @@ struct NodeConfig { count: u16, data_dir_path: Option, peers_args: PeersArgs, - safenode_path: Option, + antnode_path: Option, rewards_address: String, } @@ -360,7 +360,7 @@ fn prepare_node_config(args: &MaintainNodesArgs) -> NodeConfig { count: args.count, data_dir_path: args.data_dir_path.clone(), peers_args: args.peers_args.clone(), - safenode_path: args.safenode_path.clone(), + antnode_path: args.antnode_path.clone(), rewards_address: args.rewards_address.clone(), } } @@ -373,8 +373,8 @@ fn debug_log_config(config: &NodeConfig, args: &MaintainNodesArgs) { config.count ); debug!( - " owner: {:?}, peers_args: {:?}, safenode_path: {:?}", - config.owner, config.peers_args, config.safenode_path + " owner: {:?}, peers_args: {:?}, antnode_path: {:?}", + config.owner, config.peers_args, config.antnode_path ); debug!( " data_dir_path: {:?}, connection_mode: {:?}", @@ -431,7 +431,7 @@ async fn scale_down_nodes(config: &NodeConfig, count: u16) { RewardsAddress::from_str(config.rewards_address.as_str()).unwrap(), None, None, - config.safenode_path.clone(), + config.antnode_path.clone(), None, config.upnp, None, @@ -505,7 +505,7 @@ async fn add_nodes( RewardsAddress::from_str(config.rewards_address.as_str()).unwrap(), None, None, - config.safenode_path.clone(), + config.antnode_path.clone(), None, config.upnp, None, @@ -554,8 +554,8 @@ async fn add_nodes( action_sender.clone(), Action::StatusActions(StatusActions::ErrorScalingUpNodes { raw_error: "When trying to add a node, we failed.\n\ - You may be running an old version of safenode service?\n\ - Did you whitelisted safenode and the launchpad?" + You may be running an old version of antnode service?\n\ + Did you whitelisted antnode and the launchpad?" .to_string(), }), ); diff --git a/resources/rc_template.md b/resources/rc_template.md index 9ad5f0f5b9..1ea9aa3f24 100644 --- a/resources/rc_template.md +++ b/resources/rc_template.md @@ -6,15 +6,13 @@ It should only be edited by the RC owner, i.e., the original poster. ## Binary Versions -* `faucet` __REPLACE__ * `nat-detection` __REPLACE__ * `node-launchpad` __REPLACE__ -* `safe` __REPLACE__ -* `safenode` __REPLACE__ -* `safenode-manager` __REPLACE__ -* `safenodemand` __REPLACE__ -* `sn_auditor` __REPLACE__ -* `safenode_rpc_client` __REPLACE__ +* `autonomi` __REPLACE__ +* `antnode` __REPLACE__ +* `antctl` __REPLACE__ +* `antctld` __REPLACE__ +* `antnode_rpc_client` __REPLACE__ ## Closed Pull Requests diff --git a/resources/run_local_service_network.sh b/resources/run_local_service_network.sh index 8464499651..7e70b6536e 100755 --- a/resources/run_local_service_network.sh +++ b/resources/run_local_service_network.sh @@ -9,15 +9,15 @@ if [ -z "$1" ]; then fi count=$1 -sudo safenode-manager add --first --local -sudo safenode-manager start +sudo antctl add --first --local +sudo antctl start -output=$(sudo safenode-manager status --json) +output=$(sudo antctl status --json) port=$(echo "$output" | jq -r '.[0].port') peer_id=$(echo "$output" | jq -r '.[0].peer_id') genesis_multiaddr="/ip4/127.0.0.1/tcp/${port}/p2p/${peer_id}" -sudo safenode-manager add --local --count "$count" --peer "$genesis_multiaddr" -sudo safenode-manager start -safenode-manager faucet --peer "$genesis_multiaddr" +sudo antctl add --local --count "$count" --peer "$genesis_multiaddr" +sudo antctl start +antctl faucet --peer "$genesis_multiaddr" diff --git a/resources/scripts/bump_version_for_rc.sh b/resources/scripts/bump_version_for_rc.sh index ddbe94e504..6e93d70d64 100755 --- a/resources/scripts/bump_version_for_rc.sh +++ b/resources/scripts/bump_version_for_rc.sh @@ -78,7 +78,7 @@ echo "=======================" echo "nat-detection: $(grep "^version" < nat-detection/Cargo.toml | head -n 1 | awk '{ print $3 }' | sed 's/\"//g')" echo "node-launchpad: $(grep "^version" < node-launchpad/Cargo.toml | head -n 1 | awk '{ print $3 }' | sed 's/\"//g')" echo "autonomi: $(grep "^version" < autonomi-cli/Cargo.toml | head -n 1 | awk '{ print $3 }' | sed 's/\"//g')" -echo "safenode: $(grep "^version" < ant-node/Cargo.toml | head -n 1 | awk '{ print $3 }' | sed 's/\"//g')" -echo "safenode-manager: $(grep "^version" < ant-node-manager/Cargo.toml | head -n 1 | awk '{ print $3 }' | sed 's/\"//g')" -echo "safenode_rpc_client: $(grep "^version" < ant-node-rpc-client/Cargo.toml | head -n 1 | awk '{ print $3 }' | sed 's/\"//g')" -echo "safenodemand: $(grep "^version" < ant-node-manager/Cargo.toml | head -n 1 | awk '{ print $3 }' | sed 's/\"//g')" +echo "antnode: $(grep "^version" < ant-node/Cargo.toml | head -n 1 | awk '{ print $3 }' | sed 's/\"//g')" +echo "antctl"^version" < ant-node-manager/Cargo.toml | head -n 1 | awk '{ print $3 }' | sed 's/\"//g')" +echo "antnode_rpc_client: $(grep "^version" < ant-node-rpc-client/Cargo.toml | head -n 1 | awk '{ print $3 }' | sed 's/\"//g')" +echo "antctld: $(grep "^version" < ant-node-manager/Cargo.toml | head -n 1 | awk '{ print $3 }' | sed 's/\"//g')" diff --git a/resources/scripts/list-numbered-prs.py b/resources/scripts/list-numbered-prs.py index f25a3c241f..26cfc2c2a8 100755 --- a/resources/scripts/list-numbered-prs.py +++ b/resources/scripts/list-numbered-prs.py @@ -19,7 +19,7 @@ def main(pr_numbers): raise Exception("The GITHUB_PAT_SAFE_NETWORK_PR_LIST environment variable must be set") g = Github(token) - repo = g.get_repo("maidsafe/safe_network") + repo = g.get_repo("maidsafe/autonomi") filtered_pulls = [] for pr_num in pr_numbers: diff --git a/resources/scripts/network_churning.sh b/resources/scripts/network_churning.sh index fcd1681530..e2e7f4a71e 100755 --- a/resources/scripts/network_churning.sh +++ b/resources/scripts/network_churning.sh @@ -22,6 +22,6 @@ do echo Iteration $count echo Restarting node on port $target_port - cargo run --release --bin=safenode_rpc_client -- "127.0.0.1:$target_port" restart 1 + cargo run --release --bin antnode_rpc_client -- "127.0.0.1:$target_port" restart 1 sleep 5 done diff --git a/resources/scripts/print-versions.sh b/resources/scripts/print-versions.sh index d366e3bb2d..f778c35919 100755 --- a/resources/scripts/print-versions.sh +++ b/resources/scripts/print-versions.sh @@ -19,7 +19,7 @@ echo "===================" echo "nat-detection: $(grep "^version" < nat-detection/Cargo.toml | head -n 1 | awk '{ print $3 }' | sed 's/\"//g')" echo "node-launchpad: $(grep "^version" < node-launchpad/Cargo.toml | head -n 1 | awk '{ print $3 }' | sed 's/\"//g')" echo "autonomi: $(grep "^version" < autonomi-cli/Cargo.toml | head -n 1 | awk '{ print $3 }' | sed 's/\"//g')" -echo "safenode: $(grep "^version" < ant-node/Cargo.toml | head -n 1 | awk '{ print $3 }' | sed 's/\"//g')" -echo "safenode-manager: $(grep "^version" < ant-node-manager/Cargo.toml | head -n 1 | awk '{ print $3 }' | sed 's/\"//g')" -echo "safenode_rpc_client: $(grep "^version" < ant-node-rpc-client/Cargo.toml | head -n 1 | awk '{ print $3 }' | sed 's/\"//g')" -echo "safenodemand: $(grep "^version" < ant-node-manager/Cargo.toml | head -n 1 | awk '{ print $3 }' | sed 's/\"//g')" +echo "antnode: $(grep "^version" < ant-node/Cargo.toml | head -n 1 | awk '{ print $3 }' | sed 's/\"//g')" +echo "antctl: $(grep "^version" < ant-node-manager/Cargo.toml | head -n 1 | awk '{ print $3 }' | sed 's/\"//g')" +echo "antnode_rpc_client: $(grep "^version" < ant-node-rpc-client/Cargo.toml | head -n 1 | awk '{ print $3 }' | sed 's/\"//g')" +echo "antctld: $(grep "^version" < ant-node-manager/Cargo.toml | head -n 1 | awk '{ print $3 }' | sed 's/\"//g')" diff --git a/resources/scripts/release-candidate-description.py b/resources/scripts/release-candidate-description.py index 10f23ba972..51fb0037e8 100755 --- a/resources/scripts/release-candidate-description.py +++ b/resources/scripts/release-candidate-description.py @@ -39,7 +39,7 @@ def get_pr_list(pr_numbers): raise Exception("The GITHUB_PAT_SAFE_NETWORK_PR_LIST environment variable must be set") g = Github(token) - repo = g.get_repo("maidsafe/safe_network") + repo = g.get_repo("maidsafe/autonomi") filtered_pulls = [] for pr_num in pr_numbers: @@ -70,8 +70,8 @@ def get_pr_list(pr_numbers): def main(pr_numbers): crate_binary_map = { - "ant-node": "safenode", - "ant-node-manager": "safenode-manager", + "ant-node": "antnode", + "ant-node-manager": "antctl", "autonomi-cli": "autonomi", "nat-detection": "nat-detection", "node-launchpad": "node-launchpad" @@ -82,7 +82,7 @@ def main(pr_numbers): for crate, binary in crate_binary_map.items(): version = get_crate_version(crate) if crate == "ant-node-manager": - markdown_doc.append(f"* `safenodemand`: v{version}") + markdown_doc.append(f"* `antctld`: v{version}") markdown_doc.append(f"* `{binary}`: v{version}") markdown_doc.append("\n## Merged Pull Requests\n") diff --git a/resources/scripts/remove-s3-binary-archives.sh b/resources/scripts/remove-s3-binary-archives.sh index 7f7b73d53e..bcd4373572 100755 --- a/resources/scripts/remove-s3-binary-archives.sh +++ b/resources/scripts/remove-s3-binary-archives.sh @@ -18,19 +18,19 @@ declare -A binary_crate_dir_mappings=( ["nat-detection"]="nat-detection" ["node-launchpad"]="node-launchpad" ["autonomi"]="autonomi-cli" - ["safenode"]="ant-node" - ["safenode-manager"]="ant-node-manager" - ["safenode_rpc_client"]="ant-node-rpc-client" - ["safenodemand"]="ant-node-manager" + ["antnode"]="ant-node" + ["antctl"]="ant-node-manager" + ["antnode_rpc_client"]="ant-node-rpc-client" + ["antctld"]="ant-node-manager" ) declare -A binary_s3_bucket_mappings=( ["nat-detection"]="nat-detection" ["node-launchpad"]="node-launchpad" ["autonomi"]="autonomi-cli" - ["safenode"]="sn-node" - ["safenode-manager"]="sn-node-manager" - ["safenode_rpc_client"]="sn-node-rpc-client" - ["safenodemand"]="sn-node-manager" + ["antnode"]="antnode" + ["antctl"]="antctl" + ["antnode_rpc_client"]="antnode-rpc-client" + ["antctld"]="antctl" ) for arch in "${architectures[@]}"; do diff --git a/test-utils/src/testnet.rs b/test-utils/src/testnet.rs index 199005838f..9aa7bb0418 100644 --- a/test-utils/src/testnet.rs +++ b/test-utils/src/testnet.rs @@ -44,12 +44,11 @@ pub struct DeploymentInventory { #[serde(deserialize_with = "deserialize_peer_socket_map")] pub rpc_endpoints: BTreeMap, #[serde(deserialize_with = "deserialize_peer_socket_map")] - pub safenodemand_endpoints: BTreeMap, + pub antctld_endpoints: BTreeMap, pub node_count: u16, pub ssh_user: String, pub genesis_multiaddr: String, pub peers: Vec, - pub faucet_address: String, pub uploaded_files: Vec<(String, String)>, } @@ -84,7 +83,7 @@ impl DeploymentInventory { } else { let path = dirs_next::data_dir() .ok_or_else(|| eyre!("Could not obtain data_dir"))? - .join("safe") + .join("autonomi") .join("testnet-deploy") .join(format!("{inv}-inventory.json")); if path.exists() {