User Experience for the CLIs

I’ll add that text in, but don’t think I’ll update anything else. By definition safenode --help will always be up-to-date.

1 Like

I don’t really know how this --wallet-id argument works. That may need special treatment if it’s something that has to be unique for each node that was launched with testnet, and would then most likely be an argument that was added to testnet. I’m not sure. I would need to understand more about it.

2 Likes

-c --node-count for testnet

Dont worry about it - just nit picking that the -w flag will only work for a single node

Im sure it will all get sorted soon.
I am going to poke at it and launch a lot of nodes individually so I can look at the wallets of the elders to see if the 1nSNT fee is deposited correctly.
I doubt it will yet TBH.

So my moan above is likely doubly ireelevant :slight_smile:

1 Like

It’s fine. If it’s something we can accommodate, I’d be happy to look at it.

2 Likes

Its triply irelevant… Forget I mentioned it

the --wallet flag could only be relevant to testnet if it was used to add extra nodes to an existing network.

No normal user will be going anywhere near that anytime soon.

In other news 100 Tx took 4m8s to complete on a 20 node testnet.
Actually subtract 20*2 secs from that cos that run inculded setting up the nodes as well

so about 2.1s/Tx using an incredibly inefficient script that issues a DBC, writes it to a file then reads the file again and deposits it, Then it calls two balance queries. Arguably thats a total of 4 safe client ops per Tx …

Wallet at "safe://hyryynywq3ftr7difbjsp8susqhqcpbi97qwobtqc3jdudo711f9wcj5ogcb6o" has a total balance of 4525518463.999999300 safecoins
Wallet at "safe://hyryynyz47jn6c7fxzah4an1bc8qdz314p5o5xrndpq3sqwuyhwkf9d375rb6o" has a total balance of 5656.000000000 safecoins

real	4m8.141s
user	1m44.215s
sys	0m15.621s
3 Likes

Don’t dismiss user error as the issue :slight_smile:

1 Like

AFAICS, having grepped the source for safeup, this is still an aspiration, not a feature.

safeup only occurs in posts by @chriso, not as yet in code

It will happen, just not right now :slight_smile:

@chriso
Can you think of any good reason not to copy/move target/release/testnet to /usr/local/bin/ alongside safe and safenode ?

No that’s fine, in fact, safeup will install it there.

Just bear in the mind that if you use the --build-node argument, you need to do so from the safe_network code repository.

1 Like

So what’s the actual status of safeup?
Im guessing it exists mostly in your mind and notes right now cos I cant see see any refs in the source… But Ive been wrong before and I will be wrong again.

safeup is in its own repository:

The only command implemented at the moment is client, but I will be moving on soon to work on the rest of it.

2 Likes

well that explains why I got no joy grepping GitHub - maidsafe/safe_network :slight_smile:

I did

willie@gagarin:~/projects/maidsafe$ git clone https://github.com/maidsafe/safeup.git

willie@gagarin:~/projects/maidsafe$ cd safeup/
willie@gagarin:~/projects/maidsafe/safeup$ cargo build --release

got a warning but no error

 Compiling reqwest v0.11.15
   Compiling safeup v0.1.0 (/home/willie/projects/maidsafe/safeup)
warning: variant `Node` is never constructed
  --> src/install.rs:23:5
   |
21 | pub enum AssetType {
   |          --------- variant in this enum
22 |     Client,
23 |     Node,
   |     ^^^^
   |
   = note: `#[warn(dead_code)]` on by default

warning: `safeup` (bin "safeup") generated 1 warning
    Finished release [optimized] target(s) in 22.63s

then…


willie@gagarin:~/projects/maidsafe/safeup$ target/release/safeup --help
Usage: safeup [COMMAND]

Commands:
  client  Install the latest version of safe
  help    Print this message or the help of the given subcommand(s)

Options:
  -h, --help     Print help
  -V, --version  Print version
willie@gagarin:~/projects/maidsafe/safeup$ target/release/safeup client
Installing safe for x86_64-unknown-linux-musl at "/home/willie/.safe/cli"...
Error: Release has no client asset for platform x86_64-unknown-linux-musl

Location:
    src/github.rs:82:13

and the same error when I used sudo target/release/safeup client

1 Like

I got a weird error last night when running testnet with the --interval flag.
Nodes were started with 0ms interval between them.
In fact the only way I could get the nodes to start “normally” was by running test with no arguments other than -vvv
I also failed to get 30 testnet nodes to --join with a single genesis node I started earlier.

No screenshots cos overnight my box locked up with an nvidia bug and a complete reboot was my only way out.
I will try to recreate this later tonight

TBH I get the impression that there is too much up in the air at the moment to get much useful testing done and these errors I find may be just distracting for the team.

A delay between nodes starting is a requirement at the moment. That’s an issue with the network, not with testnet.

As for the joining, it depends what you mean with that. If you’ve also done that with no delay that’s probably the reason why it failed.

2 Likes

I’ve lost all the "evidence " so I will need to try to recreate.

Meantime with the absolute latest and all/most of the features I get this

willie@gagarin:~/projects/maidsafe/safe_network$ cd ~/projects/maidsafe/safe_network && git pull && cargo build --release --features statemap,otlp,build-bin,data-network,rpc-service,verify-nodes && sudo cp target/release/safenode target/release/safe target/release/testnet /usr/local/bin
Already up-to-date.
  Downloaded tonic v0.8.3
  Downloaded sync_wrapper v0.1.2
  Downloaded prost-derive v0.11.8
  Downloaded prost v0.11.8
  Downloaded tonic-build v0.8.4
  Downloaded matchit v0.7.0
  Downloaded prost-types v0.11.8
  Downloaded prost-build v0.11.8
  Downloaded prettyplease v0.1.24
  Downloaded axum-core v0.3.3
  Downloaded axum v0.6.11
  Downloaded 11 crates (466.6 KB) in 1.66s
   Compiling prost-derive v0.11.8
   Compiling prettyplease v0.1.24
   Compiling axum-core v0.3.3
   Compiling axum v0.6.11
   Compiling matchit v0.7.0
   Compiling sync_wrapper v0.1.2
   Compiling prost v0.11.8
   Compiling prost-types v0.11.8
   Compiling prost-build v0.11.8
   Compiling tonic-build v0.8.4
   Compiling sn_testnet v0.1.4 (/home/willie/projects/maidsafe/safe_network/sn_testnet)
   Compiling sn_node v0.80.3 (/home/willie/projects/maidsafe/safe_network/sn_node)
error: failed to run custom build command for `sn_testnet v0.1.4 (/home/willie/projects/maidsafe/safe_network/sn_testnet)`

Caused by:
  process didn't exit successfully: `/home/willie/projects/maidsafe/safe_network/target/release/build/sn_testnet-9816d20227f761b1/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-changed=../sn_interface/proto/safenode/safenode.proto
  cargo:rerun-if-changed=../sn_interface/proto/safenode

  --- stderr
  thread 'main' panicked at 'Could not find `protoc` installation and this build crate cannot proceed without
      this knowledge. If `protoc` is installed and this crate had trouble finding
      it, you can set the `PROTOC` environment variable with the specific path to your
      installed `protoc` binary.If you're on debian, try `apt-get install protobuf-compiler` or download it from https://github.com/protocolbuffers/protobuf/releases

  For more information: https://docs.rs/prost-build/#sourcing-protoc
  ', /home/willie/.cargo/registry/src/github.com-1ecc6299db9ec823/prost-build-0.11.8/src/lib.rs:1434:10
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...

THats not immediately obvious - my command was

cd ~/projects/maidsafe/safe_network && git pull && cargo build --release --features statemap,otlp,build-bin,data-network,rpc-service,verify-nodes && sudo cp target/release/safenode target/release/safe target/release/testnet /usr/local/bin

And Im trying again after actually reading the error

sudo apt-get install protobuf-compiler

and it compiles OK so maybe you want to highlight that new dependency?

1 Like

Is there meant to be a client binary in the releases? safeup client if so where is this mysterious asset :slight_smile:
Release has no client asset
I even tried to build my own :upside_down_face:… fix me please!

2 Likes

Ok give me 5 mins to get a coffe

3 Likes

assuming you are on x86 linux

wget https://github.com/maidsafe/safe_network/releases/download/0.1.0-0.20.10-0.15.5-0.6.4-0.82.5-0.80.4-0.80.4-0.74.2-0.1.4/safenode-0.80.4-x86_64-unknown-linux-musl.zip

wget https://github.com/maidsafe/safe_network/releases/download/0.1.0-0.20.10-0.15.5-0.6.4-0.82.5-0.80.4-0.80.4-0.74.2-0.1.4/testnet-0.1.4-x86_64-unknown-linux-musl.zip

Download these, unzip and sudo cp safe safenode /usr/local/bin

1 Like