User Experience for the CLIs

At the moment it’s only chunks in record storage. That will soon change though with both DBCs and registers in flight there.

@chriso will be firing into the release process very soon, so hopefully we’ll have these arm builds sorted for you in the near future :+1:

5 Likes

Meanwhile, here is some mellifluous toneage

6 Likes

Just had a less than optimal experience with the latest GH and registers…

willie@gagarin:~/projects/maidsafe/safe_network$ cargo run --release  --features local-discovery --bin safe -- register create the_new_list
    Finished release [optimized] target(s) in 0.24s
     Running `target/release/safe register create the_new_list`
Removed old logs from directory: "/tmp/safe-client"
Logging to directory: "/tmp/safe-client"
Built with git version: bbfb45f / main / bbfb45f
Instantiating a SAFE client...
⠐ 14/20 initial peers found.                                                                                                                                                 The client still does not know enough network nodes.
🔗 Connected to the Network                                                                                                                                                  Creating Register with 'the_new_list' at xorname: 29d3736472f0031333b925064d2aa5149e95689d91890ff37890838470a00392 and tag 3006
Successfully created register 'the_new_list' at 29d373(00101001).., 3006!
willie@gagarin:~/projects/maidsafe/safe_network$ cargo run --release  --features local-discovery --bin safe -- register edit the_new_list     "tennis players"
    Finished release [optimized] target(s) in 0.25s
     Running `target/release/safe register edit the_new_list 'tennis players'`
Removed old logs from directory: "/tmp/safe-client"
Logging to directory: "/tmp/safe-client"
Built with git version: bbfb45f / main / bbfb45f
Instantiating a SAFE client...
⠐ 13/20 initial peers found.                                                                                                                                                 The client still does not know enough network nodes.
🔗 Connected to the Network                                                                                                                                                  Trying to retrieve Register from 29d373(00101001).., 3006
Did not retrieve Register 'the_new_list' from all nodes in the close group! Protocol error Register not found: RegisterAddress { name: 29d373(00101001).., tag: 3006 }.
willie@gagarin:~/projects/maidsafe/safe_network$

I have a large (22Gb) directory upload running concurrently - dunno if this could be relevant. Previously uploaded and downloaded OK with this afternoon’s latest code.

EDIT: It claims to be storing the files from my big upload OK but my CPUs have been maxed out for the past 5 mins - going to kill all the nodes now.

@joshuef - do you want the logs?

1 Like

can anyone else replicate this failure?

Using the latest GitHub start with a std 25 node local testnet create a register
Then try to edit/append to it

willie@gagarin:~/projects/maidsafe/safe_network$ cargo run --release --features local-discovery  --bin safe -- register create appendable_list
    Finished release [optimized] target(s) in 0.22s
     Running `target/release/safe register create appendable_list`
Removed old logs from directory: "/tmp/safe-client"
Logging to directory: "/tmp/safe-client"
Built with git version: dc74255 / main / dc74255
Instantiating a SAFE client...
🔗 Connected to the Network                                                                                                                                                                                                        Creating Register with 'appendable_list' at xorname: 2f81195170829702a17cc7f12bf2325e88fb282ec5d8de4f38cc007ff8032f1a and tag 3006
Successfully created register 'appendable_list' at 2f8119(00101111).., 3006!
willie@gagarin:~/projects/maidsafe/safe_network$ cargo run --release --features local-discovery  --bin safe -- register  edit appendable_list "Append this. then"
    Finished release [optimized] target(s) in 0.22s
     Running `target/release/safe register edit appendable_list 'Append this. then'`
Removed old logs from directory: "/tmp/safe-client"
Logging to directory: "/tmp/safe-client"
Built with git version: dc74255 / main / dc74255
Instantiating a SAFE client...
🔗 Connected to the Network                                                                                                                                                                                                        Trying to retrieve Register from 2f8119(00101111).., 3006
Did not retrieve Register 'appendable_list' from all nodes in the close group! Protocol error Register not found: RegisterAddress { name: 2f8119(00101111).., tag: 3006 }.
1 Like

I’ll be honest, I did not expect this to work 100%
But I did not expect it to fail like this.

The latest github with a std 25 node testnet, binaries copied to /usr/local/bin

willie@gagarin:~/projects/maidsafe/safe_network$ cargo run --bin faucet --release --features local-discovery -- claim-genesis
    Finished release [optimized] target(s) in 0.22s
     Running `target/release/faucet claim-genesis`
🔗 Connected to the Network                                                                                                                              thread 'main' panicked at 'Faucet wallet shall be created successfully.: Bincode(Custom("deserialized bytes don't encode a group element"))', /home/willie/projects/maidsafe/safe_network/sn_transfers/src/dbc_genesis.rs:108:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Or have I just made a silly mistake?

1 Like

Faucet is being updated (there’s a PR waiting in the wings for review). So atm what’s in main all bets are off.

But soon enough it should be going.

Equally, w/ registers, they’ve been shifted to kad records, but how we send those msgs are being updated to match chunks, so may not be reliable now.

But they should be soon.


@southside feat: faucet server and cli DBC read by grumbach · Pull Request #486 · maidsafe/safe_network · GitHub is the PR, maybe you fancy having a wee play? Any feedback there on ux / how folk may access the faucet would be appreciated! :bowing_man:

6 Likes

That PR got merged into main yesterday.
So I pulled a few mins ago, copied binaries to /usr/local/bin and fired up a local testnet and got this

willie@gagarin:~/projects/maidsafe/safe_network$ export SAFE_PEERS=/ip4/192.168.100.100/tcp/38099/p2p/12D3KooWEjyKFPzndnbnigPzQxnome5wFVEH5gpDxvKy7XoYVt5r
willie@gagarin:~/projects/maidsafe/safe_network$ cargo run --bin faucet --release -- claim-genesis
    Finished release [optimized] target(s) in 0.23s
     Running `target/release/faucet claim-genesis`
⠐ Connecting to The SAFE Network...                                                                                                                        The client still does not know enough network nodes.
🔗 Connected to the Network                                                                                                                                thread 'main' panicked at 'Faucet wallet shall be created successfully.: Bincode(Custom("deserialized bytes don't encode a group element"))', /home/willie/projects/maidsafe/safe_network/sn_transfers/src/dbc_genesis.rs:108:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Do we have a --log-dir/–root-dir problem with the latest from GitHub?


willie@gagarin:~/projects/maidsafe/safe_network$ RUST_LOG=trace=all testnet -b -c 30 -i 1000 
2023-07-17T16:21:53.338661Z  INFO testnet: Building safenode
    Finished release [optimized] target(s) in 0.18s
2023-07-17T16:21:53.570649Z  INFO testnet: safenode built successfully
2023-07-17T16:21:53.570683Z  INFO sn_testnet: Clearing "/home/willie/.safe/node/local-test-network" for new network
2023-07-17T16:21:53.571063Z  INFO sn_testnet: Delaying for 1 seconds before launching other nodes
error: unexpected argument '--log-dir' found

  tip: a similar argument exists: '--root-dir'

Usage: safenode --root-dir <ROOT_DIR>

For more information, try '--help'.
Error: 
   0: Genesis node PeerId could not be determined: "    Finished release [optimized] target(s) in 0.20s\n     Running `target/release/examples/safenode_rpc_client '127.0.0.1:12001' info`\nError: transport error\n\nCaused by:\n   0: error trying to connect: tcp connect error: Connection refused (os error 111)\n   1: tcp connect error: Connection refused (os error 111)\n   2: Connection refused (os error 111)\n\nLocation:\n    sn_node/examples/safenode_rpc_client.rs:102:22\n"

Location:
   sn_testnet/src/lib.rs:267

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.

paging @joshuef

That’s probably an old version of testnet.

This much is true

willie@gagarin:~/projects/maidsafe/safe_network$ ls -al $(which testnet)
-rwxr-xr-x 1 willie willie 8552208 Jun 20 00:37 /home/willie/.local/bin/testnet
willie@gagarin:~/projects/maidsafe/safe_network$ rm -rf $(which testnet)
willie@gagarin:~/projects/maidsafe/safe_network$ ls -al $(which testnet)
-rwxr-xr-x 1 root root 14403024 Jul 17 16:38 /usr/local/bin/testnet

So I am getting confused with binaries in /usr/local/bin and ~/.local/bin

Time to sort out the ordering in my $PATH

Moving forward :slight_smile:

willie@gagarin:~$ RUST_LOG=trace=all faucet --peer /ip4/127.0.0.1/tcp/37615/p2p/12D3KooWC5tkRSoMQP3qLSujBMNAXJ35ULmUoFmu12N8YwNLhwSr server 
⠐ Connecting to The SAFE Network...                                                                                                                                          The client still does not know enough network nodes.
🔗 Connected to the Network                                                                                                                                                  Loading faucet...
Sending 1288490188.500000000 from genesis to faucet wallet..
Faucet wallet balance: 1288490188.500000000
Verifying the transfer from genesis...
Starting http server listening on port 8000...

well sort of…

received request! method: Get, url: "/", headers: [Header { field: HeaderField("Host"), value: "localhost:8000" }, Header { field: HeaderField("Connection"), value: "keep-alive" }, Header { field: HeaderField("sec-ch-ua"), value: "\"Not.A/Brand\";v=\"8\", \"Chromium\";v=\"114\", \"Brave\";v=\"114\"" }, Header { field: HeaderField("sec-ch-ua-mobile"), value: "?0" }, Header { field: HeaderField("sec-ch-ua-platform"), value: "\"Linux\"" }, Header { field: HeaderField("DNT"), value: "1" }, Header { field: HeaderField("Upgrade-Insecure-Requests"), value: "1" }, Header { field: HeaderField("User-Agent"), value: "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36" }, Header { field: HeaderField("Accept"), value: "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8" }, Header { field: HeaderField("Sec-GPC"), value: "1" }, Header { field: HeaderField("Accept-Language"), value: "en-US,en;q=0.9" }, Header { field: HeaderField("Sec-Fetch-Site"), value: "none" }, Header { field: HeaderField("Sec-Fetch-Mode"), value: "navigate" }, Header { field: HeaderField("Sec-Fetch-User"), value: "?1" }, Header { field: HeaderField("Sec-Fetch-Dest"), value: "document" }, Header { field: HeaderField("Accept-Encoding"), value: "gzip, deflate, br" }]
Failed to send tokens to : Failed to parse bls key
received request! method: Get, url: "/favicon.ico", headers: [Header { field: HeaderField("Host"), value: "localhost:8000" }, Header { field: HeaderField("Connection"), value: "keep-alive" }, Header { field: HeaderField("sec-ch-ua"), value: "\"Not.A/Brand\";v=\"8\", \"Chromium\";v=\"114\", \"Brave\";v=\"114\"" }, Header { field: HeaderField("DNT"), value: "1" }, Header { field: HeaderField("sec-ch-ua-mobile"), value: "?0" }, Header { field: HeaderField("User-Agent"), value: "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36" }, Header { field: HeaderField("sec-ch-ua-platform"), value: "\"Linux\"" }, Header { field: HeaderField("Accept"), value: "image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8" }, Header { field: HeaderField("Sec-GPC"), value: "1" }, Header { field: HeaderField("Accept-Language"), value: "en-US,en;q=0.9" }, Header { field: HeaderField("Sec-Fetch-Site"), value: "same-origin" }, Header { field: HeaderField("Sec-Fetch-Mode"), value: "no-cors" }, Header { field: HeaderField("Sec-Fetch-Dest"), value: "image" }, Header { field: HeaderField("Referer"), value: "http://localhost:8000/" }, Header { field: HeaderField("Accept-Encoding"), value: "gzip, deflate, br" }]
Failed to send tokens to favicon.ico: Could not decode hex string to key.

I will now go back and very carefully read again just what @joshuef wrote…

Ok after some faffing about I finally have coins in the wallet :confetti_ball:

willie@gagarin:~/projects/maidsafe/safe_network$ cat dbc_hex | cargo run   --bin safe --release  -- --peer /ip4/127.0.0.1/tcp/37615/p2p/12D3KooWC5tkRSoMQP3qLSujBMNAXJ35ULmUoFmu12N8YwNLhwSr wallet deposit --stdin
    Finished release [optimized] target(s) in 0.18s
     Running `target/release/safe --peer /ip4/127.0.0.1/tcp/37615/p2p/12D3KooWC5tkRSoMQP3qLSujBMNAXJ35ULmUoFmu12N8YwNLhwSr wallet deposit --stdin`
Built with git version: 8406324 / main / 8406324
Instantiating a SAFE client...
⠐ Connecting to The SAFE Network...                                                                                                                                          The client still does not know enough network nodes.
🔗 Connected to the Network                                                                                                                                                  Please paste your DBC below:
Successfully stored dbc to wallet dir. 
Old balance: 0.000000000
New balance: 10.000000000
1 Like
willie@gagarin:~/projects/maidsafe/safe_network$ cat dbc_hex | cargo run   --bin safe --release  -- --peer /ip4/127.0.0.1/tcp/37615/p2p/12D3KooWC5tkRSoMQP3qLSujBMNAXJ35ULmUoFmu12N8YwNLhwSr wallet deposit --stdin
    Finished release [optimized] target(s) in 0.20s
     Running `target/release/safe --peer /ip4/127.0.0.1/tcp/37615/p2p/12D3KooWC5tkRSoMQP3qLSujBMNAXJ35ULmUoFmu12N8YwNLhwSr wallet deposit --stdin`
Built with git version: 8406324 / main / 8406324
Instantiating a SAFE client...
⠐ Connecting to The SAFE Network...                                                                                                                                          The client still does not know enough network nodes.
🔗 Connected to the Network                                                                                                                                                  Please paste your DBC below:
Successfully stored dbc to wallet dir. 
Old balance: 20.000000000
New balance: 30.000000000

Im rich!!! Rich, I tell you, riches beyond the dreams of Mr A.V. Rice Esq.

Who wants a beer?

3 Likes

Anybody been poking at the latest GitHub offerings?
I will try to run a local testnet - hopefully my Pis can join in as well and see what works and what doesn’t with DBCs.

But it will need to wait until I have had my tea. Greek sausage grilled courgette and the first tatties from the garden followed by rhubarb crumble - from the garden

1 Like

Grabbed and built the latest release.

Kicked it off as recommended in the docs with


killall safenode || true && RUST_LOG=safenode,safe cargo run --bin testnet -- --clean --build-node --build-faucet --interval 100  && export SAFE_PEERS=$(rg "listening on \".+\"" ~/.safe -u | rg '/ip4.*$' -m1 -o | rg '"' -r '')

with the addition of --clean which IMHO should be in the ReadMe

All went wonderfully and I particularly appreciated the new reporting on the status of the various nodes - a bit verbose but thats what we need for now and was happy to see the message


Peer IDs and node network knowledge are as expected!

Then it built the faucet and tried to connect…

2023-08-09T15:56:30.140786Z  INFO testnet: Building the following binaries: faucet
    Finished release [optimized] target(s) in 0.15s
2023-08-09T15:56:30.336710Z  INFO testnet: Binaries built successfully
2023-08-09T15:56:30.336779Z  INFO testnet: Launching DBC faucet server
Logging to directory: "/home/willie/.local/share/safe/test_faucet/server_logs"
⠄ Connecting to The SAFE Network...                                                                                                                                          Testnet and faucet launched successfully
⠠ Connecting to The SAFE Network...                                                                                                                                          The client still does not know enough network nodes.
⡀ Connecting to The SAFE Network...                                                                                                                                          The client still does not know enough network nodes.
⠂ Connecting to The SAFE Network...

A good 5 mins passed with this msg scrolling every few secs then it finally croaked with

Unexpected error during client startup EventsReceiver(Lagged(1))
Error: Events receiver error channel lagged by 1.

Caused by:
    channel lagged by 1

Location:
    sn_node/src/bin/faucet/main.rs:61:18

Versions

willie@gagarin:~/projects/maidsafe/safe_network$ target/release/safe --version
sn_cli 0.80.37
willie@gagarin:~/projects/maidsafe/safe_network$ target/release/safenode --version
safenode cli 0.88.26

Can anyone else replicate this with this afternoons latest from GH? I built with

git pull && cargo build --release   --features local-discovery

I get the same results with the latest release this afternoon

loving the new verbosity on the latest release - thanks @devs :slight_smile:

willie@gagarin:~/projects/maidsafe/safe_network$ cargo run --release --bin safe files upload ~/trecem
    Finished release [optimized] target(s) in 0.16s
     Running `target/release/safe files upload /home/willie/trecem`
Built with git version: a5816a7 / main / a5816a7
Instantiating a SAFE client...
🔗 Connected to the Network                                                                                                                                                  Loaded wallet from "/home/willie/.local/share/safe/client/wallet" with balance Token(1000000000000000000)
Preparing (chunking) files at '/home/willie/trecem'...
Making payment for 104 Chunks that belong to 51 file/s.
Successfully made payment for 102 Chunks.
Successfully stored wallet with cached payment proofs, and new balance 999999999.999999898.
Successfully paid for storage and generated the proofs. They can now be sent to the storage nodes when uploading paid chunks.
Storing file 'scotcoin.tests.bom' of 240 bytes (1 chunk/s)..
6 Likes

The latest release is a little expensive - std home testnet

willie@gagarin:~/projects/maidsafe/safe_network$ SN_LOG=all /usr/local/bin/safe files upload ~/Videos/cooking/madhur/madhur05.avi 
Built with git version: b041beb / main / b041beb
Instantiating a SAFE client...
🔗 Connected to the Network                                                                                                                                                  Loaded wallet from "/home/willie/.local/share/safe/client/wallet" with balance Token(100000000000)
Preparing (chunking) files at '/home/willie/Videos/cooking/madhur/madhur05.avi'...
Making payment for 710 Chunks that belong to 1 file/s.
Successfully made payment of 363520 for 710 records. (At a cost per record of Token(512).)
Successfully stored wallet with cached payment proofs, and new balance 99.999636480.
Successfully paid for storage and generated the proofs. They can now be sent to the storage nodes when uploading paid chunks.
Storing file 'madhur05.avi' of 362742180 bytes (710 chunk/s)..
Successfully stored 'madhur05.avi' to a90ba97df09e4e363a816dc38feb7f69452792193288890b10c7556c197cc98c
Writing 60 bytes to "/home/willie/.local/share/safe/client/uploaded_files/file_names_2023-08-19_03-33-27"

512 tokens per chunk from the off…

Then I tried to upload just under 1 gig

willie@gagarin:~/projects/maidsafe/safe_network$ SN_LOG=all /usr/local/bin/safe files upload /fgfs/Aircraft/A320-family/
Built with git version: b041beb / main / b041beb
Instantiating a SAFE client...
🔗 Connected to the Network                                                                                                                                                  Loaded wallet from "/home/willie/.local/share/safe/client/wallet" with balance Token(99999636480)
Preparing (chunking) files at '/fgfs/Aircraft/A320-family/'...
Making payment for 4608 Chunks that belong to 976 file/s.
Error: Transfer error Not enough balance, 99.999636480 available, 1264385595.384266752 required

Caused by:
    Not enough balance, 99.999636480 available, 1264385595.384266752 required

Location:
    sn_cli/src/subcommands/wallet.rs:305:26
2 Likes

If you add more nodes, you should see the price drop quickly. That is the aim in any case. So not much space then high price, more nodes should give more space so lower price (sans bugs of course :wink: )

6 Likes

Another 20 nodes didnt help…

"/home/willie/.local/share/safe/node/12D3KooWMbgog5PXtcAXw5TjFkSEtGByViPQ5mYcLaUC6jAmSYmh/logs"
RPC Server listening on 127.0.0.1:12045
2023-08-19T11:48:08.471296Z  INFO sn_testnet: Launching node 46 of 46...
willie@gagarin:~/projects/maidsafe/safe_network$ Logging to directory: "/home/willie/.local/share/safe/node/12D3KooWE6jkYmtmBteG1z2BHFHC4YNM9ZA5yTLR6CS2VE3r4Xu4/logs"
RPC Server listening on 127.0.0.1:12046

willie@gagarin:~/projects/maidsafe/safe_network$ SN_LOG=all /usr/local/bin/safe files upload /fgfs/Aircraft/A320-family/
Built with git version: b041beb / main / b041beb
Instantiating a SAFE client...
⠈ Connecting to The SAFE Network...                                                                                                                                          ^C
willie@gagarin:~/projects/maidsafe/safe_network$ 
willie@gagarin:~/projects/maidsafe/safe_network$ export SAFE_PEERS=/ip4/127.0.0.1/tcp/36917/p2p/12D3KooWHVKSp5nMKxetTQ7rgE8YEuJrRqmiwn7wQBXBUqUy6b5C
willie@gagarin:~/projects/maidsafe/safe_network$ SN_LOG=all /usr/local/bin/safe files upload /fgfs/Aircraft/A320-family/
Built with git version: b041beb / main / b041beb
Instantiating a SAFE client...
🔗 Connected to the Network                                                                                                                                                  Loaded wallet from "/home/willie/.local/share/safe/client/wallet" with balance Token(99999636480)
Preparing (chunking) files at '/fgfs/Aircraft/A320-family/'...
Making payment for 4608 Chunks that belong to 976 file/s.
Error: Transfer error Not enough balance, 99.999636480 available, 632192797.692133376 required

Caused by:
    Not enough balance, 99.999636480 available, 632192797.692133376 required

Location:
    sn_cli/src/subcommands/wallet.rs:305:26

Away out now - I’ll poke further later.

5 Likes

Looks like it reduced, but nowhere near enough? Good testing

4 Likes