This is the Safe Network as it was supposed to be, on a kademlia network, enabled by libp2p.
killall safenode || true && RUST_LOG=safenode,safe cargo run --bin testnet -- -b --interval 100
-
Create Register with nickname 'myregister'
cargo run --release --bin safe -- --create-register myregister
-
Get Register using its nickname from the previous command
cargo run --release --bin safe -- --query-register myregister
-
Put files
cargo run --release --bin safe -- --upload-chunks ~/dir/with/files
-
Get files; copy the
XorName
of the file from the previous commandcargo run --release --bin safe -- --get-chunk xor_name
You can run the registers
example client app from multiple consoles simultaneously,
to write to the same Register on the network, identified by its nickname and
using different user names from each instance launched, e.g.:
From first console:
cargo run --release --example registers -- --user alice --reg-nickname myregister
From a second console:
cargo run --release --example registers -- --user bob --reg-nickname myregister
- Currently we've pulled in testnet bin from the main
sn
repo for ease of spinning up nodes. - Logs are output to the standard
~/.safe/node/local-test-network
dir.
- Add RPC for simplest node/net interaction (do libp2p CLIs help here?)
The elder-membership agreed, section tree backed implementation of the safe network can be found here