Skip to content

Commit

Permalink
Merge branch 'rc-2024.10.4-hotfix1'
Browse files Browse the repository at this point in the history
  • Loading branch information
jacderida committed Nov 6, 2024
2 parents fd26255 + 930cb0c commit c00a0d4
Show file tree
Hide file tree
Showing 69 changed files with 2,068 additions and 1,612 deletions.
251 changes: 120 additions & 131 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,11 @@ jobs:
timeout-minutes: 25
run: cargo test --release --package sn_node --lib

- name: Run network tests
- name: Run network tests (with encrypt-records)
timeout-minutes: 25
run: cargo test --release --package sn_networking --features="open-metrics, encrypt-records"

name: Run network tests (without encrypt-records)
timeout-minutes: 25
run: cargo test --release --package sn_networking --features="open-metrics"

Expand Down Expand Up @@ -654,19 +658,15 @@ jobs:
# platform: ${{ matrix.os }}
# build: true

# # incase the faucet is not ready yet
# - name: 30s sleep for faucet completion
# run: sleep 30

# - name: Check SAFE_PEERS was set
# shell: bash
# run: |
# if [[ -z "$SAFE_PEERS" ]]; then
# echo "The SAFE_PEERS variable has not been set"
# exit 1
# else
# echo "SAFE_PEERS has been set to $SAFE_PEERS"
# fi
# - name: Check SAFE_PEERS was set
# shell: bash
# run: |
# if [[ -z "$SAFE_PEERS" ]]; then
# echo "The SAFE_PEERS variable has not been set"
# exit 1
# else
# echo "SAFE_PEERS has been set to $SAFE_PEERS"
# fi

# - name: execute token_distribution tests
# run: cargo test --release --features=local,distribution token_distribution -- --nocapture --test-threads=1
Expand Down Expand Up @@ -917,7 +917,7 @@ jobs:
uses: maidsafe/sn-local-testnet-action@main
with:
action: stop
log_file_prefix: safe_test_logs_data_location_routing_table
log_file_prefix: safe_test_logs_data_location
platform: ${{ matrix.os }}

- name: Verify restart of nodes using rg
Expand Down Expand Up @@ -1018,15 +1018,15 @@ jobs:
# echo "SAFE_PEERS has been set to $SAFE_PEERS"
# fi

# - name: Create and fund a wallet first time
# run: |
# ~/safe --log-output-dest=data-dir wallet create --no-password
# ~/faucet --log-output-dest=data-dir send 100000000 $(~/safe --log-output-dest=data-dir wallet address | tail -n 1) | tail -n 1 1>first.txt
# echo "----------"
# cat first.txt
# env:
# SN_LOG: "all"
# timeout-minutes: 5
# - name: Create and fund a wallet first time
# run: |
# ~/safe --log-output-dest=data-dir wallet create --no-password
# ~/faucet --log-output-dest=data-dir send 100000000 $(~/safe --log-output-dest=data-dir wallet address | tail -n 1) | tail -n 1 1>first.txt
# echo "----------"
# cat first.txt
# env:
# SN_LOG: "all"
# timeout-minutes: 5

# - name: Move faucet log to the working folder
# run: |
Expand Down Expand Up @@ -1277,6 +1277,7 @@ jobs:
# runs-on: ubuntu-latest
# env:
# CLIENT_DATA_PATH: /home/runner/.local/share/safe/autonomi

# steps:
# - uses: actions/checkout@v4

Expand Down Expand Up @@ -1353,61 +1354,44 @@ jobs:
# echo "SAFE_PEERS has been set to $SAFE_PEERS"
# fi

# - name: Sleep 15s
# shell: bash
# run: sleep 15

# - name: Check faucet has been funded
# shell: bash
# run: |
# cash_note_count=$(ls -l /home/runner/.local/share/safe/test_faucet/wallet/cash_notes/ | wc -l)
# echo $cash_note_count
# if [ "$cash_note_count" -eq 0 ]; then
# echo "Error: Expected at least 1 cash note, but found $cash_note_count"
# exit 1
# fi

# - name: Create and fund a wallet to pay for files storage
# run: |
# ./target/release/safe --log-output-dest=data-dir wallet create --no-password
# ./target/release/faucet --log-output-dest=data-dir send 100000000 $(./target/release/safe --log-output-dest=data-dir wallet address | tail -n 1) | tail -n 1 > transfer_hex
# ./target/release/safe --log-output-dest=data-dir wallet receive --file transfer_hex
# env:
# SN_LOG: "all"
# timeout-minutes: 5
# - name: Create and fund a wallet to pay for files storage
# run: |
# ./target/release/safe --log-output-dest=data-dir wallet create --no-password
# ./target/release/faucet --log-output-dest=data-dir send 100000000 $(./target/release/safe --log-output-dest=data-dir wallet address | tail -n 1) | tail -n 1 > transfer_hex
# ./target/release/safe --log-output-dest=data-dir wallet receive --file transfer_hex
# env:
# SN_LOG: "all"
# timeout-minutes: 5

# - name: Start a client to upload first file
# run: ./target/release/safe --log-output-dest=data-dir files upload "./test_data_1.tar.gz" --retry-strategy quick
# env:
# SN_LOG: "all"
# timeout-minutes: 5

# - name: Check current directories
# run: |
# pwd
# ls $CLIENT_DATA_PATH/ -l
# ls $CLIENT_DATA_PATH/wallet -l
# ls $CLIENT_DATA_PATH/wallet/cash_notes -l
# timeout-minutes: 1

# - name: Ensure no leftover cash_notes and payment files
# run: |
# expected_cash_notes_files="1"
# expected_payment_files="0"
# cash_note_files=$(ls $CLIENT_DATA_PATH/wallet/cash_notes | wc -l)
# echo "Find $cash_note_files cash_note files"
# if [ $expected_cash_notes_files -lt $cash_note_files ]; then
# echo "Got too many cash_note files leftover: $cash_note_files"
# exit 1
# fi
# ls $CLIENT_DATA_PATH/wallet/payments -l
# payment_files=$(ls $CLIENT_DATA_PATH/wallet/payments | wc -l)
# if [ $expected_payment_files -lt $payment_files ]; then
# echo "Got too many payment files leftover: $payment_files"
# exit 1
# fi

# timeout-minutes: 10
# - name: Ensure no leftover cash_notes and payment files
# run: |
# expected_cash_notes_files="1"
# expected_payment_files="0"
# pwd
# ls $CLIENT_DATA_PATH/ -l
# ls $CLIENT_DATA_PATH/wallet -l
# ls $CLIENT_DATA_PATH/wallet/cash_notes -l
# cash_note_files=$(ls $CLIENT_DATA_PATH/wallet/cash_notes | wc -l)
# echo "Find $cash_note_files cash_note files"
# if [ $expected_cash_notes_files -lt $cash_note_files ]; then
# echo "Got too many cash_note files leftover: $cash_note_files"
# exit 1
# fi
# ls $CLIENT_DATA_PATH/wallet/payments -l
# payment_files=$(ls $CLIENT_DATA_PATH/wallet/payments | wc -l)
# if [ $expected_payment_files -lt $payment_files ]; then
# echo "Got too many payment files leftover: $payment_files"
# exit 1
# fi
# env:
# CLIENT_DATA_PATH: /home/runner/.local/share/safe/client
# timeout-minutes: 10

# - name: Wait for certain period
# run: sleep 300
Expand All @@ -1419,77 +1403,82 @@ jobs:
# SN_LOG: "all"
# timeout-minutes: 10

# - name: Ensure no leftover cash_notes and payment files
# run: |
# expected_cash_notes_files="1"
# expected_payment_files="0"
# pwd
# ls $CLIENT_DATA_PATH/ -l
# ls $CLIENT_DATA_PATH/wallet -l
# ls $CLIENT_DATA_PATH/wallet/cash_notes -l
# cash_note_files=$(find $CLIENT_DATA_PATH/wallet/cash_notes -type f | wc -l)
# if (( $(echo "$cash_note_files > $expected_cash_notes_files" | bc -l) )); then
# echo "Got too many cash_note files leftover: $cash_note_files when we expected $expected_cash_notes_files"
# exit 1
# fi
# ls $CLIENT_DATA_PATH/wallet/payments -l
# payment_files=$(find $CLIENT_DATA_PATH/wallet/payments -type f | wc -l)
# if (( $(echo "$payment_files > $expected_payment_files" | bc -l) )); then
# echo "Got too many payment files leftover: $payment_files"
# exit 1
# fi
# timeout-minutes: 10
# - name: Ensure no leftover cash_notes and payment files
# run: |
# expected_cash_notes_files="1"
# expected_payment_files="0"
# pwd
# ls $CLIENT_DATA_PATH/ -l
# ls $CLIENT_DATA_PATH/wallet -l
# ls $CLIENT_DATA_PATH/wallet/cash_notes -l
# cash_note_files=$(find $CLIENT_DATA_PATH/wallet/cash_notes -type f | wc -l)
# if (( $(echo "$cash_note_files > $expected_cash_notes_files" | bc -l) )); then
# echo "Got too many cash_note files leftover: $cash_note_files when we expected $expected_cash_notes_files"
# exit 1
# fi
# ls $CLIENT_DATA_PATH/wallet/payments -l
# payment_files=$(find $CLIENT_DATA_PATH/wallet/payments -type f | wc -l)
# if (( $(echo "$payment_files > $expected_payment_files" | bc -l) )); then
# echo "Got too many payment files leftover: $payment_files"
# exit 1
# fi
# env:
# CLIENT_DATA_PATH: /home/runner/.local/share/safe/client
# timeout-minutes: 10

# - name: Wait for certain period
# run: sleep 300
# timeout-minutes: 6

# # Start a different client to avoid local wallet slow down with more payments handled.
# - name: Start a different client
# run: |
# pwd
# mv $CLIENT_DATA_PATH $SAFE_DATA_PATH/client_first
# ls -l $SAFE_DATA_PATH
# ls -l $SAFE_DATA_PATH/client_first
# mkdir $SAFE_DATA_PATH/client
# ls -l $SAFE_DATA_PATH
# mv $SAFE_DATA_PATH/client_first/logs $CLIENT_DATA_PATH/logs
# ls -l $CLIENT_DATA_PATH
# ./target/release/safe --log-output-dest=data-dir wallet create --no-password
# ./target/release/faucet --log-output-dest=data-dir send 100000000 $(./target/release/safe --log-output-dest=data-dir wallet address | tail -n 1) | tail -n 1 > transfer_hex
# ./target/release/safe --log-output-dest=data-dir wallet receive --file transfer_hex
# env:
# SN_LOG: "all"
# SAFE_DATA_PATH: /home/runner/.local/share/safe
# timeout-minutes: 25
# # Start a different client to avoid local wallet slow down with more payments handled.
# - name: Start a different client
# run: |
# pwd
# mv $CLIENT_DATA_PATH $SAFE_DATA_PATH/client_first
# ls -l $SAFE_DATA_PATH
# ls -l $SAFE_DATA_PATH/client_first
# mkdir $SAFE_DATA_PATH/client
# ls -l $SAFE_DATA_PATH
# mv $SAFE_DATA_PATH/client_first/logs $CLIENT_DATA_PATH/logs
# ls -l $CLIENT_DATA_PATH
# ./target/release/safe --log-output-dest=data-dir wallet create --no-password
# ./target/release/faucet --log-output-dest=data-dir send 100000000 $(./target/release/safe --log-output-dest=data-dir wallet address | tail -n 1) | tail -n 1 > transfer_hex
# ./target/release/safe --log-output-dest=data-dir wallet receive --file transfer_hex
# env:
# SN_LOG: "all"
# SAFE_DATA_PATH: /home/runner/.local/share/safe
# CLIENT_DATA_PATH: /home/runner/.local/share/safe/client
# timeout-minutes: 25

# - name: Use second client to upload third file
# run: ./target/release/safe --log-output-dest=data-dir files upload "./test_data_3.tar.gz" --retry-strategy quick
# env:
# SN_LOG: "all"
# timeout-minutes: 10

# - name: Ensure no leftover cash_notes and payment files
# run: |
# expected_cash_notes_files="1"
# expected_payment_files="0"
# pwd
# ls $CLIENT_DATA_PATH/ -l
# ls $CLIENT_DATA_PATH/wallet -l
# ls $CLIENT_DATA_PATH/wallet/cash_notes -l
# cash_note_files=$(ls $CLIENT_DATA_PATH/wallet/cash_notes | wc -l)
# echo "Find $cash_note_files cash_note files"
# if [ $expected_cash_notes_files -lt $cash_note_files ]; then
# echo "Got too many cash_note files leftover: $cash_note_files"
# exit 1
# fi
# ls $CLIENT_DATA_PATH/wallet/payments -l
# payment_files=$(ls $CLIENT_DATA_PATH/wallet/payments | wc -l)
# if [ $expected_payment_files -lt $payment_files ]; then
# echo "Got too many payment files leftover: $payment_files"
# exit 1
# fi
# timeout-minutes: 10
# - name: Ensure no leftover cash_notes and payment files
# run: |
# expected_cash_notes_files="1"
# expected_payment_files="0"
# pwd
# ls $CLIENT_DATA_PATH/ -l
# ls $CLIENT_DATA_PATH/wallet -l
# ls $CLIENT_DATA_PATH/wallet/cash_notes -l
# cash_note_files=$(ls $CLIENT_DATA_PATH/wallet/cash_notes | wc -l)
# echo "Find $cash_note_files cash_note files"
# if [ $expected_cash_notes_files -lt $cash_note_files ]; then
# echo "Got too many cash_note files leftover: $cash_note_files"
# exit 1
# fi
# ls $CLIENT_DATA_PATH/wallet/payments -l
# payment_files=$(ls $CLIENT_DATA_PATH/wallet/payments | wc -l)
# if [ $expected_payment_files -lt $payment_files ]; then
# echo "Got too many payment files leftover: $payment_files"
# exit 1
# fi
# env:
# CLIENT_DATA_PATH: /home/runner/.local/share/safe/client
# timeout-minutes: 10

# - name: Stop the local network and upload logs
# if: always()
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ jobs:

- name: Run network tests
timeout-minutes: 25
run: cargo test --release --package sn_networking --features="open-metrics"
run: cargo test --release --package sn_networking --features="open-metrics, encrypt-records"

- name: Run protocol tests
timeout-minutes: 25
Expand Down
49 changes: 49 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,55 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

*When editing this file, please respect a line length of 100.*

## 2024-11-06

### Network

#### Added

- Remove outdated record copies that cannot be decrypted. This is used when a node is restarted.

#### Changed

- The node will only restart at the end of its process if it has explicitly been requested in the
RPC restart command. This removes the potential for creation of undesired new processes.
- Range search optimization to reduce resource usage.
- Trigger record_store pruning earlier. The threshold lowered from 90% to 10% to improve the disk
usage efficiency.

#### Fixed

- Derive node-side record encryption details from the node's keypair. This ensures data is retained
in a restart.

### Client

#### Changed

- When paying for quotes through the API, the contract allowance will be set to ~infinite instead of
the specific amount needed. This is to reduce the amount of approval transactions needed for doing
quote payments.

### Node Manager

#### Fixed

- The `--rewards-address` argument is retained on an upgrade

### Launchpad

#### Added

- Support for upgrading nodes version
- Support for Ctrl+V on rewards address
- More error handling
- Use 5 minute interval between upgrades

#### Changed

- Help screen after beta
- New Ratatui version 0.29.0

## 2024-10-28

## Autonomi API/CLI
Expand Down
Loading

0 comments on commit c00a0d4

Please sign in to comment.