It took a bit longer than we might have hoped, but here we have our first public testnet of the Safe Network code layered atop libp2p.
At the moment we have 25 nodes up, with around 1gb of storage available to each of them.
Running things
The Peer Argument
Every node has what we refer to as a Multiaddr, and looks like this:
/ip4/178.128.166.245/udp/36572/quic-v1/p2p/12D3KooWPuaKwn7rFNn4oj1ABDpikVZ7scHs29ZNCHBveLHgCmak
This address includes both the protocol and identifier of the node. We can pass this address to the safe
CLI, leading it to contact that node and get a view of the network.
(And this is a real address you can use to contact the joshnet)
Using the Client
To put/get files you’ll need to use the safe
client. Which you can grab for your platform from github.
Use is fairly simple at the moment. For example, to upload a directory to the network, it looks like this:
$ safe --peer=/ip4/178.128.166.245/udp/36572/quic-v1/p2p/12D3KooWPuaKwn7rFNn4oj1ABDpikVZ7scHs29ZNCHBveLHgCmak files upload -- <dir>
And to download the same uploaded files inside the directory back:
$ safe --peer=/ip4/178.128.166.245/udp/36572/quic-v1/p2p/12D3KooWPuaKwn7rFNn4oj1ABDpikVZ7scHs29ZNCHBveLHgCmak files download
Note: Locally, uploaded file addessses are stored and then automatically downloaded with the above command, files will be put under ~/.safe/client/downloaded_files
folder.
How to share files and download them?
When you upload you will also eg, see:
Successfully stored file "testnet.exe" to 332f45ae9482a8e03b5d5579f15fd9c8806fe4a2b30da2bc6e5ebb9a98fe4095
This wee hex string allows you to easily share files (without having to have the addresses locally).
safe --peer=/ip4/178.128.166.245/udp/36572/quic-v1/p2p/12D3KooWPuaKwn7rFNn4oj1ABDpikVZ7scHs29ZNCHBveLHgCmak files download -- testnet.exe 332f45ae9482a8e03b5d5579f15fd9c8806fe4a2b30da2bc6e5ebb9a98fe4095
(here you can change the target filename to whatever you want.)
Running a Node
The node contacts an initial peer similarly to the client, by passing it in through --peer
. It also needs a directory specified for the data it stores. And it’s a good idea to keep the logs in a directory.
$ safenode --root-dir=/tmp/safenode --log-dir=/tmp/safenode --peer=/ip4/178.128.166.245/udp/36572/quic-v1/p2p/12D3KooWPuaKwn7rFNn4oj1ABDpikVZ7scHs29ZNCHBveLHgCmak
Your mileage may vary with the node. We still don’t have the full nat traversal setup in place. So it’s a try it and see situation. But all nodes should be able to join the network with relative speed (compared to the old setup), if they are capable of being dialled!
Transfers
At the moment, while some limited transfer functionality may well be possible, we’re not focusing on that at all for this testnet. There’s still some work to be done establishing genesis and faucet procedures, so we’ll be looking at that in an upcoming testnet.
Testing
All client cmds will run and output logs to a temporary file. That file location is output in the cmd itself to keep things simple.
Right now, we’re looking purely at chunk storage and longevity, as well as the ability for folk to start nodes. (It’s unclear to us how many folk might actually be able to particiapte as yet).
Data is still stored in node memory, so that may well climb over time (up to its 1gb limit). So how much we can store and how fast this goes will likely depend on folk starting more node (more so than prev testnets where things were perhaps more limited).
So let’s see how long this lasts and hopefully learn something along the way!