Skip to content

Commit

Permalink
Merge pull request #2472 from RolandSherwin/data_dir_loc
Browse files Browse the repository at this point in the history
fix: use the correct autonomi data dir path
  • Loading branch information
RolandSherwin authored Dec 2, 2024
2 parents 16b2e62 + 5128597 commit 60913ec
Show file tree
Hide file tree
Showing 17 changed files with 101 additions and 105 deletions.
42 changes: 21 additions & 21 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1134,7 +1134,7 @@ jobs:
# mv $SAFE_DATA_PATH/test_faucet/logs/faucet.log ./faucet_log.log
# env:
# SN_LOG: "all"
# SAFE_DATA_PATH: /home/runner/.local/share/safe
# SAFE_DATA_PATH: /home/runner/.local/share/autonomi
# continue-on-error: true
# if: always()
# timeout-minutes: 1
Expand All @@ -1150,10 +1150,10 @@ jobs:
# - name: Cleanup prior faucet and cashnotes
# run: |
# ls -l /home/runner/.local/share
# ls -l /home/runner/.local/share/safe
# rm -rf /home/runner/.local/share/safe/test_faucet
# rm -rf /home/runner/.local/share/safe/test_genesis
# rm -rf /home/runner/.local/share/safe/autonomi
# ls -l /home/runner/.local/share/autonomi
# rm -rf /home/runner/.local/share/autonomi/test_faucet
# rm -rf /home/runner/.local/share/autonomi/test_genesis
# rm -rf /home/runner/.local/share/autonomi/autonomi
# env:
# SN_LOG: "all"
# timeout-minutes: 5
Expand Down Expand Up @@ -1191,10 +1191,10 @@ jobs:
# - name: Create and fund a wallet with different keypair
# run: |
# ls -l /home/runner/.local/share
# ls -l /home/runner/.local/share/safe
# rm -rf /home/runner/.local/share/safe/test_faucet
# rm -rf /home/runner/.local/share/safe/test_genesis
# rm -rf /home/runner/.local/share/safe/autonomi
# ls -l /home/runner/.local/share/autonomi
# rm -rf /home/runner/.local/share/autonomi/test_faucet
# rm -rf /home/runner/.local/share/autonomi/test_genesis
# rm -rf /home/runner/.local/share/autonomi/autonomi
# ~/safe --log-output-dest=data-dir wallet create --no-password
# if GENESIS_PK=a9925296499299fdbf4412509d342a92e015f5b996e9acd1d2ab7f2326e3ad05934326efdc345345a95e973ac1bb6637 GENESIS_SK=40f6bbc870355c68138ac70b450b6425af02b49874df3f141b7018378ceaac66 nohup ~/faucet --log-output-dest=data-dir send 100000000 $(~/safe --log-output-dest=data-dir wallet address | tail -n 1); then
# echo "Faucet with different genesis key not rejected!"
Expand All @@ -1213,10 +1213,10 @@ jobs:
# - name: Start up a faucet in server mode
# run: |
# ls -l /home/runner/.local/share
# ls -l /home/runner/.local/share/safe
# rm -rf /home/runner/.local/share/safe/test_faucet
# rm -rf /home/runner/.local/share/safe/test_genesis
# rm -rf /home/runner/.local/share/safe/autonomi
# ls -l /home/runner/.local/share/autonomi
# rm -rf /home/runner/.local/share/autonomi/test_faucet
# rm -rf /home/runner/.local/share/autonomi/test_genesis
# rm -rf /home/runner/.local/share/autonomi/autonomi
# target/release/faucet server &
# sleep 60
# env:
Expand All @@ -1232,7 +1232,7 @@ jobs:
# exit 1
# fi
# env:
# NODE_DATA_PATH: /home/runner/.local/share/safe/node
# NODE_DATA_PATH: /home/runner/.local/share/autonomi/node
# timeout-minutes: 1

# - name: Stop the local network and upload logs
Expand Down Expand Up @@ -1361,7 +1361,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; }
Expand Down Expand Up @@ -1391,7 +1391,7 @@ jobs:
# name: Replication bench with heavy upload
# runs-on: ubuntu-latest
# env:
# CLIENT_DATA_PATH: /home/runner/.local/share/safe/autonomi
# CLIENT_DATA_PATH: /home/runner/.local/share/autonomi/client

# steps:
# - uses: actions/checkout@v4
Expand Down Expand Up @@ -1505,7 +1505,7 @@ jobs:
# exit 1
# fi
# env:
# CLIENT_DATA_PATH: /home/runner/.local/share/safe/client
# CLIENT_DATA_PATH: /home/runner/.local/share/autonomi/client
# timeout-minutes: 10

# - name: Wait for certain period
Expand Down Expand Up @@ -1538,7 +1538,7 @@ jobs:
# exit 1
# fi
# env:
# CLIENT_DATA_PATH: /home/runner/.local/share/safe/client
# CLIENT_DATA_PATH: /home/runner/.local/share/autonomi/client
# timeout-minutes: 10

# - name: Wait for certain period
Expand All @@ -1561,8 +1561,8 @@ jobs:
# ./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
# SAFE_DATA_PATH: /home/runner/.local/share/autonomi
# CLIENT_DATA_PATH: /home/runner/.local/share/autonomi/client
# timeout-minutes: 25

# - name: Use second client to upload third file
Expand Down Expand Up @@ -1592,7 +1592,7 @@ jobs:
# exit 1
# fi
# env:
# CLIENT_DATA_PATH: /home/runner/.local/share/safe/client
# CLIENT_DATA_PATH: /home/runner/.local/share/autonomi/client
# timeout-minutes: 10

# - name: Stop the local network and upload logs
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -434,14 +434,14 @@ jobs:
matrix:
include:
- os: ubuntu-latest
node_data_path: /home/runner/.local/share/safe/node
autonomi_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
autonomi_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
autonomi_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

Expand Down
42 changes: 21 additions & 21 deletions .github/workflows/nightly_wan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
set -e
# read the inventory file
inventory_path=/home/runner/.local/share/safe/testnet-deploy/${{ env.NETWORK_NAME }}-inventory.json
inventory_path=/home/runner/.local/share/autonomi/testnet-deploy/${{ env.NETWORK_NAME }}-inventory.json
echo "Inventory Path: $inventory_path"
faucet_address=$(jq -r '.faucet_address' $inventory_path)
cargo run --bin safe --release -- wallet get-faucet ${faucet_address}
Expand Down Expand Up @@ -128,9 +128,9 @@ jobs:
with:
name: local_logs_NightlyE2E
path: |
~/.local/share/safe/node/*/logs/*.log*
~/.local/share/safe/*/*/*.log*
~/.local/share/safe/autonomi/logs/*/*.log*
~/.local/share/autonomi/node/*/logs/*.log*
~/.local/share/autonomi/*/*/*.log*
~/.local/share/autonomi/autonomi/logs/*/*.log*
- name: destroy network
if: always()
Expand Down Expand Up @@ -222,9 +222,9 @@ jobs:
# with:
# name: local_logs_NightlySpendTest
# path: |
# ~/.local/share/safe/node/*/logs/*.log*
# ~/.local/share/safe/*/*/*.log*
# ~/.local/share/safe/autonomi/logs/*/*.log*
# ~/.local/share/autonomi/node/*/logs/*.log*
# ~/.local/share/autonomi/*/*/*.log*
# ~/.local/share/autonomi/autonomi/logs/*/*.log*

# - name: destroy network
# uses: maidsafe/sn-testnet-control-action/destroy-network@main
Expand All @@ -248,13 +248,13 @@ jobs:
# include:
# - os: ubuntu-latest
# wan_logs_path: /home/runner/sn-testnet-deploy/logs
# local_safe_path: /home/runner/.local/share/safe
# local_safe_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
# # safe_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
# # safe_path: /Users/runner/Library/Application Support/autonomi
# steps:
# - uses: actions/checkout@v4
#
Expand Down Expand Up @@ -336,9 +336,9 @@ jobs:
# with:
# name: local_logs_NightlyChurnTest
# path: |
# ~/.local/share/safe/node/*/logs/*.log*
# ~/.local/share/safe/*/*/*.log*
# ~/.local/share/safe/autonomi/logs/*/*.log*
# ~/.local/share/autonomi/node/*/logs/*.log*
# ~/.local/share/autonomi/*/*/*.log*
# ~/.local/share/autonomi/autonomi/logs/*/*.log*
#
# - name: Stop the WAN network
# if: always()
Expand Down Expand Up @@ -453,13 +453,13 @@ jobs:
# include:
# - os: ubuntu-latest
# wan_logs_path: /home/runner/sn-testnet-deploy/logs
# local_safe_path: /home/runner/.local/share/safe
# local_safe_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
# # - 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
# # safe_path: /Users/runner/Library/Application Support/autonomi
# steps:
# - uses: actions/checkout@v4
#
Expand Down Expand Up @@ -542,9 +542,9 @@ jobs:
# with:
# name: local_logs_NightlyDataLocationTest
# path: |
# ~/.local/share/safe/node/*/logs/*.log*
# ~/.local/share/safe/*/*/*.log*
# ~/.local/share/safe/autonomi/logs/*/*.log*
# ~/.local/share/autonomi/node/*/logs/*.log*
# ~/.local/share/autonomi/*/*/*.log*
# ~/.local/share/autonomi/autonomi/logs/*/*.log*
#
# - name: Stop the WAN network
# if: always()
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/nightly_wan_churn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
- name: Obtain the funds from the faucet
run: |
# read the inventory file
inventory_path=/home/runner/.local/share/safe/testnet-deploy/NightlyChurnE2E-inventory.json
inventory_path=/home/runner/.local/share/autonomi/testnet-deploy/NightlyChurnE2E-inventory.json
echo "Inventory Path: $inventory_path"
faucet_address=$(jq -r '.faucet_address' $inventory_path)
cargo run --bin safe --release -- wallet get-faucet ${faucet_address}
Expand Down Expand Up @@ -125,9 +125,9 @@ jobs:
with:
name: local_logs_NightlyChurnE2E
path: |
~/.local/share/safe/node/*/logs/*.log*
~/.local/share/safe/*/*/*.log*
~/.local/share/safe/autonomi/logs/*/*.log*
~/.local/share/autonomi/node/*/logs/*.log*
~/.local/share/autonomi/*/*/*.log*
~/.local/share/autonomi/autonomi/logs/*/*.log*
- name: Stop the WAN network
if: always()
Expand Down
54 changes: 25 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ Libp2p.<br>

### For Users

- [CLI](https://github.com/maidsafe/safe_network/blob/main/autonomi-cli/README.md) The Command Line
- [CLI](https://github.com/maidsafe/autonomi/blob/main/autonomi-cli/README.md) The Command Line
Interface, allowing users to interact with the network from their terminal.
- [Node](https://github.com/maidsafe//safe_network/blob/main/sn_node/README.md) The backbone of the
safe network. Nodes can be run on commodity hardware and provide storage space and validation of
- [Node](https://github.com/maidsafe/autonomi/blob/main/ant-node/README.md) The backbone of the
Autonomi network. Nodes can be run on commodity hardware and provide storage space and validation of
transactions to the network.
- Web App: Coming Soon!

Expand Down Expand Up @@ -49,34 +49,30 @@ More options about EVM Network below.

#### Build

You should also build `safe` with the `network-contacts` and `distribution` features enabled:

```
cargo build --release --features "network-contacts,distribution" --bin safe
```

For `antnode`, only the `network-contacts` feature should be required:
You can build `autonomi` and `antnode` with the `network-contacts` feature:

```
cargo build --release --features network-contacts --bin autonomi
cargo build --release --features network-contacts --bin antnode
```


#### Main Crates

- [Autonomi API](https://github.com/maidsafe/safe_network/blob/main/autonomi/README.md) The client APIs
- [Autonomi API](https://github.com/maidsafe/autonomi/blob/main/autonomi/README.md) The client APIs
allowing use of the Autonomi Network to users and developers.
- [Autonomi CLI](https://github.com/maidsafe/safe_network/blob/main/autonomi-cli/README.md) The Command Line
- [Autonomi CLI](https://github.com/maidsafe/autonomi/blob/main/autonomi-cli/README.md) The Command Line
Interface, allowing users to interact with the network from their terminal.
- [Node](https://github.com/maidsafe/safe_network/blob/main/sn_node/README.md) The backbone of the
- [Node](https://github.com/maidsafe/autonomi/blob/main/ant-node/README.md) The backbone of the
autonomi network. Nodes can be run on commodity hardware and run the Network.
- [Node Manager](https://github.com/maidsafe/safe_network/blob/main/ant_node_manager/README.md) Use
- [Node Manager](https://github.com/maidsafe/autonomi/blob/main/ant-node-manager/README.md) Use
to create a local network for development and testing.
- [Node RPC](https://github.com/maidsafe/safe_network/blob/main/ant-node-rpc-client/README.md) The
- [Node RPC](https://github.com/maidsafe/autonomi/blob/main/ant-node-rpc-client/README.md) The
RPC server used by the nodes to expose API calls to the outside world.

#### Transport Protocols and Architectures

The Safe Network uses `quic` as the default transport protocol.
The Autonomi Network uses `quic` as the default transport protocol.

The `websockets` feature is available for the `ant-networking` crate, and above, and will allow for
tcp over websockets.
Expand All @@ -91,19 +87,19 @@ WASM support for the autonomi API is currently under active development. More do

### For the Technical

- [Logging](https://github.com/maidsafe/safe_network/blob/main/ant_logging/README.md) The
generalised logging crate used by the safe network (backed by the tracing crate).
- [Metrics](https://github.com/maidsafe/safe_network/blob/main/metrics/README.md) The metrics crate
used by the safe network.
- [Networking](https://github.com/maidsafe/safe_network/blob/main/ant-networking/README.md) The
- [Logging](https://github.com/maidsafe/autonomi/blob/main/ant-logging/README.md) The
generalised logging crate used by the autonomi network (backed by the tracing crate).
- [Metrics](https://github.com/maidsafe/autonomi/blob/main/ant-metrics/README.md) The metrics crate
used by the autonomi network.
- [Networking](https://github.com/maidsafe/autonomi/blob/main/ant-networking/README.md) The
networking layer, built atop libp2p which allows nodes and clients to communicate.
- [Protocol](https://github.com/maidsafe/safe_network/blob/main/ant_protocol/README.md) The protocol
used by the safe network.
- [Registers](https://github.com/maidsafe/safe_network/blob/main/ant-registers/README.md) The
- [Protocol](https://github.com/maidsafe/autonomi/blob/main/ant-protocol/README.md) The protocol
used by the autonomi network.
- [Registers](https://github.com/maidsafe/autonomi/blob/main/ant-registers/README.md) The
registers crate, used for the Register CRDT data type on the network.
- [Peers Acquisition](https://github.com/maidsafe/safe_network/blob/main/ant_peers_acquisition/README.md)
- [Peers Acquisition](https://github.com/maidsafe/autonomi/blob/main/ant-peers-acquisition/README.md)
The peers acquisition crate, or: how the network layer discovers bootstrap peers.
- [Build Info](https://github.com/maidsafe/safe_network/blob/main/ant-build-info/README.md) Small
- [Build Info](https://github.com/maidsafe/autonomi/blob/main/ant-build-info/README.md) Small
helper used to get the build/commit versioning info for debug purposes.

### Using a Local Network
Expand Down Expand Up @@ -297,8 +293,8 @@ Port: 38835
RPC Port: 34416
Multiaddr: /ip4/127.0.0.1/udp/38835/quic-v1/p2p/12D3KooWJ4Yp8CjrbuUyeLDsAgMfCb3GAYMoBvJCRp1axjHr9cf8
PID: 62369
Data path: /home/<<user_directory>>/.local/share/safe/node/12D3KooWJ4Yp8CjrbuUyeLDsAgMfCb3GAYMoBvJCRp1axjHr9cf8
Log path: /home/<<user_directory>>/.local/share/safe/node/12D3KooWJ4Yp8CjrbuUyeLDsAgMfCb3GAYMoBvJCRp1axjHr9cf8/logs
Data path: /home/<<user_directory>>/.local/share/autonomi/node/12D3KooWJ4Yp8CjrbuUyeLDsAgMfCb3GAYMoBvJCRp1axjHr9cf8
Log path: /home/<<user_directory>>/.local/share/autonomi/node/12D3KooWJ4Yp8CjrbuUyeLDsAgMfCb3GAYMoBvJCRp1axjHr9cf8/logs
Bin path: target/release/antnode
Connected peers: 24
```
Expand All @@ -313,7 +309,7 @@ Node info:
==========
RPC endpoint: https://127.0.0.1:34416
Peer Id: 12D3KooWJ4Yp8CjrbuUyeLDsAgMfCb3GAYMoBvJCRp1axjHr9cf8
Logs dir: /home/<<user_directory>>/.local/share/safe/node/12D3KooWJ4Yp8CjrbuUyeLDsAgMfCb3GAYMoBvJCRp1axjHr9cf8/logs
Logs dir: /home/<<user_directory>>/.local/share/autonomi/node/12D3KooWJ4Yp8CjrbuUyeLDsAgMfCb3GAYMoBvJCRp1axjHr9cf8/logs
PID: 62369
Binary version: 0.103.21
Time since last restart: 1614s
Expand Down
2 changes: 1 addition & 1 deletion ant-logging/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,8 @@ impl LogBuilder {
// Get the current timestamp and format it to be human readable
let timestamp = chrono::Local::now().format("%Y-%m-%d_%H-%M-%S").to_string();
let path = dir
.join("safe")
.join("autonomi")
.join("client")
.join("logs")
.join(format!("log_{timestamp}"));
LogOutputDest::Path(path)
Expand Down
2 changes: 1 addition & 1 deletion ant-metrics/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ struct Labels {
fn main() -> Result<()> {
let default_log_dir = dirs_next::data_dir()
.ok_or_else(|| eyre!("could not obtain data directory path".to_string()))?
.join("safe")
.join("autonomi")
.join("node");

let matches = command!()
Expand Down
2 changes: 1 addition & 1 deletion ant-node-manager/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ 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"
Logging to directory: "/home/chris/.local/share/autonomi/node/12D3KooWPArH2XAw2sapcthNNcJRbbSuUtC3eBZrJtxi8DfcN1Yn/logs"
Node started
Expand Down
Loading

0 comments on commit 60913ec

Please sign in to comment.