If you run safenode to start a single node it does not make an entry in network_contacts. Thats why I had to faff about copying node/local-test-network/section_tree to network_contacts and renaming it.
Although I should have done safe networks add my_lan_safe ~/.safe/node/local-test-network/section_tree
Can we harmonise the use of the -j and --json flags across the range of commands?
willie@gagarin:~$ safe files put -n -j /fgfs/Scenery/EGODarea
error: Found argument '-j' which wasn't expected, or isn't valid in this context
If you tried to supply `-j` as a value rather than a flag, use `-- -j`
USAGE:
safe files put [OPTIONS] <LOCATION> [DST]
For more information try --help
willie@gagarin:~$ safe files put -n --json /fgfs/Scenery/EGODarea
[
"safe://hyryyryio6eitutpojduqk6uiiqeia186o7wofhz3zx1b1ccs6e78c3dswonra",
{}
]
And another request…
After a recursive files put on a large dir can the FilesContainer be repeated? Saves scrolling all the way up to the top to discover you have filled the terminal buffer and now you have 3Gb of files stored on the network but you are not sure just where
even when you have 10k lines in the scrollback buffer
I know I have been irrationally eager to see this working… and now it is. moving on with my life @chriso
josh@evo:~/safeup/target/release$ ./safeup client
Installing safe for x86_64-unknown-linux-musl at /home/josh/.safe/cli...
[########################################] 10.65 MiB/10.65 MiB safe 0.75.0 is now available at /home/josh/.safe/cli/safe
Modified shell profile at /home/josh/.bashrc
To make safe available in this session run 'source /home/josh/.safe/env'
josh@evo:~/safeup/target/release$ ./safeup node
Installing safenode for x86_64-unknown-linux-musl at /home/josh/.safe/node...
[########################################] 11.34 MiB/11.34 MiB safenode 0.81.0 is now available at /home/josh/.safe/node/safenode
josh@evo:~/safeup/target/release$ ./safeup testnet
Installing testnet for x86_64-unknown-linux-musl at /home/josh/.safe/node...
[########################################] 2.50 MiB/2.50 MiB testnet 0.1.4 is now available at /home/josh/.safe/node/testnet
I am still faffing with setting up a single genesis node and then copying the generated section tree to ~/.safe/network_contacts/default
Then I run testnet with -n ~/.safe/network_contacts/default
josh@evo:~/.safe/node$ ls
local-test-network safenode testnet
josh@evo:~/.safe/node$ ./testnet -c15
2023-03-28T11:03:13.507545Z INFO sn_testnet: Clearing "/home/josh/.safe/node/local-test-network" for new network
2023-03-28T11:03:13.507616Z INFO sn_testnet: Launching genesis node using address 127.0.0.1:12000...
2023-03-28T11:03:13.507651Z DEBUG sn_testnet: Running "safenode" with [
"--first",
"127.0.0.1:12000",
"--local-addr",
"0.0.0.0:12000",
"--root-dir",
"/home/josh/.safe/node/local-test-network/safenode-genesis",
"--log-dir",
"/home/josh/.safe/node/local-test-network/safenode-genesis",
]
Error:
0: No such file or directory (os error 2)
Location:
sn_testnet/src/lib.rs:38
Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
willie@gagarin:~$ testnet -c15
2023-03-28T10:57:23.817405Z INFO sn_testnet: Clearing "/home/willie/.safe/node/local-test-network" for new network
2023-03-28T10:57:23.821910Z INFO sn_testnet: Launching genesis node using address 127.0.0.1:12000...
2023-03-28T10:57:23.821964Z DEBUG sn_testnet: Running "safenode" with [
"--first",
"127.0.0.1:12000",
"--local-addr",
"0.0.0.0:12000",
"--root-dir",
"/home/willie/.safe/node/local-test-network/safenode-genesis",
"--log-dir",
"/home/willie/.safe/node/local-test-network/safenode-genesis",
]
2023-03-28T10:57:23.822207Z INFO sn_testnet: Delaying for 5 seconds before launching other nodes
Starting logging to directory: "/home/willie/.safe/node/local-test-network/safenode-genesis"
Node started
Node PID: 98637, prefix: Prefix(), name: 7af125(01111010).., age: 255, connection info: 127.0.0.1:12000
RPC Server listening on 127.0.0.1:12001
2023-03-28T10:57:28.822327Z INFO sn_testnet: Launching node 1 of 15...
2023-03-28T10:57:28.822476Z DEBUG sn_testnet: Running "safenode" with [
"--network-contacts-file",
"/home/willie/.safe/node/local-test-network/safenode-genesis/section_tree",
"--root-dir",
"/home/willie/.safe/node/local-test-network/safenode-1",
"--log-dir",
"/home/willie/.safe/node/local-test-network/safenode-1",
]
2023-03-28T10:57:28.822893Z INFO sn_testnet: Delaying for 5 seconds before launching the next node
Starting logging to directory: "/home/willie/.safe/node/local-test-network/safenode-1"
Node started
Node PID: 98678, prefix: Prefix(), name: 57e35f(01010111).., age: 5, connection info: 0.0.0.0:54750
RPC Server listening on 0.0.0.0:54751
2023-03-28T10:57:33.823419Z INFO sn_testnet: Launching node 2 of 15...
run @chriso’s safeup again with sudo so it sticks the binaries in /usr/local/bin (which IMNSHO should be the default) and see if that changes anything.
willie@gagarin:~$ safenode killall
error: Found argument 'killall' which wasn't expected, or isn't valid in this context
USAGE:
sn_node [OPTIONS]
For more information try --help
Pedant mode on : Still need to change that usage line to safenode…
@Josh The safenode binary needs to be on PATH for use with testnet, so if you’re not running safeup as root, you would need to source ~/.safe/env in your shell session, or start a new one, after you had used safeup. There is also a --node-path argument you can use to point it directly to the binary.
@Southside The whole node command has been removed from safe, so run-baby-fleming is gone. This is replaced by testnet. There’s no point in having both of them.
The killall command was never on the node, it was a subcommand of safe node. You can just run pgrep safenode | kill -9.
I’m actually looking for opinions on something regarding safeup.
My plan for it was to operate in the same way as rustup. So there will be a script that you run like curl <url> | sh, which will download the latest safeup and run it. I had thought that if it runs without any arguments, then it will run in interactive mode to prompt the user to ask which of the components they want to install. However, today, myself and @roland were discussing whether there would be any real value in the interactive UI.
So when you use the script, the default might be to run safeup client or maybe both safeup client and safeup node, and we wouldn’t bother with any interactive option.
Would welcome any thoughts or suggestions on this.
Right off the top of my head safeup client should be default, safeup node and safeup testnet are more minority interests and if you can run a testnet then you should be able to handle a few rough edges, within reason ofc