Well we finally made it to the end of the rust-3 sprint and personally it seems like a long time ago in a galaxy far, far away when we initially set out our original deliverables for this sprint, so let’s refresh our memories, what were the objectives of this sprint? @Spandan outlined them here and as you can see this sprint over-ran slightly, just a tad, a tiny amount, a smidgon …. err ok time wise we were way off So it is with a certain level of trepidation that I can report that we met our objectives. Why the anxiety? Well like you guys I follow the chat in the forum, listen to the podcasts, etc and my personal impression from this is that some in the community are expecting a big TA-DA! We made a huge amount of progress in this sprint and this can either be measured in the current state of the libraries and what we are now able to do with them or the collective exhaustion of the Dev team - for me personally the end goal has never felt so close, it really is now within all of our grasp.
Since the move to Rust we have focused on incremental progress and this is working for us, but rather than go through all the challenges (and there were a few) we encountered and how the team overcame them, I am going to focus on what you the community can now get your hands on and play with. So I am going to cover the safe_vault binary for Linux and OS X (Windows to follow soon), the DNS example and Firefox plugin.
Firstly, the safe_vault binary for Linux and OS X, for just now we shall be limiting usage of the binary to creating a vault network locally. Currently we do have a safe_vault testnet up (and down) and running. In the near future functionality to join this network will be made available via the installers but for just now we have restricted this access. As @dirvine mentioned in this topic yesterday the reasons we do not want people connecting to droplets from home right now are:
- It will work for any individual
- It will also allow poisoning of the close groups with one way connectible nodes (no NAT traversal)
- We are about to implement network to node connections and these will be the only way a node can join the network (when the network can see the node, not necessarily vice versa)
tl;dr At the moment connecting to the testnet from behind a firewall will cause imbalance in the network and until we add in a function to ensure the network can access the node from the network and not from the node’s perspective alone (i.e. if the node can connect to us we don’t care - we need to be able to connect to it), we are restricting access to Devs to allow analysis and debugging.
If you go here you can download the safe_vault_linux
or safe_vault_osx
binaries (as I said Windows to follow) and I will walk you through the steps to create a locally running SAFE Network and once the restrictions outlined above are removed the installers shall be released out into the wild and everyone will be able to join the global SAFE Network, but for just now you can add vaults to your local machine and with logging switched on sit back and watch the magic happening. OK magic is maybe going a little far but you can watch a small local SAFE Network forming on your own machine and run various examples against this network. OK so lets join some vaults to create your local network and we shall do this with logging on - otherwise it is a pretty dull spectator sport. Open 3 new tabs or windows in your terminal of choice and run the following commands; we shall issue the commands as if it is a Linux system we are using, however for OS X just swap the safe_vault_linux
with safe_vault_osx
:
cd <LOCATION YOU DOWNLOADED BINARY>
chmod 755 safe_vault_linux
RUST_LOG=info ./safe_vault_linux
Start 3 other terminal windows or tabs and navigate to the safe_vault_linux
binary and run RUST_LOG=info ./safe_vault_linux
in each session, if you want to see more output, change info
to debug
. You now have a safe_vault
network running on your local machine
OK so this seems cool, but what can I actually do with my network? Time to introduce the safe_dns
example. As the github page states this is an application to demonstrate uploading files of a static website to the SAFE Network. This example showcases features from the safe_nfs
and safe_dns
crates. Download the example here - if you are using Linux or OS X and do not want to start a local safe_vault
network you can still try this out by downloading the example which uses mock routing
which emulates a network for you. Let’s carry on as if you have already created a local SAFE Network on Linux. Choose > safe_dns_example-network-linux.zip
and extract the contents of the zip file and open the directory > safe_dns_example-linux-x64
> click and launch the safe_dns_example
executable. You will be presented with:
Complete the Service and Public name text boxes and click Done.
You now have some choices - you can either drag a folder and upload your existing website to the SAFE Network or use a template to create a new site. Yeah… drag an existing website! When this was demo’d last week it blew me away - I think it is fair to say that the SAFE Network will not be a ghost town in terms of real and engaging content from the outset; I really love this feature. This time though I am going to use the Template option.
Click on My Page
and alter the text and click > Publish
Your content is now stored in the vaults on your local network.
Once you have content running on the SAFE Network you will want this content to be easily accessible. You can do this via the safe_firefox_addon, this allows access to the SAFE Network from the Firefox browser. You can download the addon here - same as before with mock and real network as well as currently being limited to OS X and Linux.
Just now the addon has a few known limitations:
- Windows not supported
- Can serve files up to 1GB only
- Browser crash right clicking on the browser and selecting - View Page Source
- If the public name is not available, then the browser becomes unresponsive.
Must force quit the browser and start again. - On OSX, when the browser is closed the browser crashes occasionally
These are noted and as is our current methodology the next iteration shall be an improvement on the last.
Installation and usage:
I am going to carry on with my Linux example using my local SAFE Network and download and install the safe_addon-0.0.1-network-linux.xpi addon. Once installed I type safe:www.ross
in the address bar and….
My page is retrieved from my local safe_vault
network and I guess there is no need to say this but I will anyway because I like to hear it - all of this just scales from your local SAFE Network to the global one - once we have completed our analysis and debugging. I often hear David describing development as “fast and furious” and actually just now that is an understatement; get ready for the ride!
This is part I of this weeks update find part II here
Transcript of weekly catch-up > https://docs.google.com/document/d/1WlOdmTzCvNtkqu6khzmc6zX8C2C7SNCsbrstemgoQMg