Skip to content

Commit

Permalink
chore: rename binaries in line with autonomi branding
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jacderida committed Dec 1, 2024
1 parent 84ae04c commit 212c8fa
Show file tree
Hide file tree
Showing 91 changed files with 2,697 additions and 2,779 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/benchmark-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -377,4 +377,3 @@ jobs:
alert-threshold: "200%"
# Enable Job Summary for PRs
summary-always: true

8 changes: 4 additions & 4 deletions .github/workflows/generate-benchmark-charts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -46,15 +46,15 @@ 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
uses: maidsafe/ant-local-testnet-action@main
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"
Expand Down
46 changes: 23 additions & 23 deletions .github/workflows/memcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -36,15 +36,15 @@ 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
uses: maidsafe/ant-local-testnet-action@main
with:
action: start
enable-evm-testnet: true
node-path: target/release/safenode
node-path: target/release/antnode
platform: ubuntu-latest
build: true

Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -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
Expand Down
Loading

0 comments on commit 212c8fa

Please sign in to comment.