Safe Network Dev Update - December 17, 2020

Testnet

Right up until these last few minutes today we have been pulling all the parts together with the aim of running a hosted public test network. It’s not available to all right now, but it is up and running (and breaking :wink: ). We had hoped to release details to join our network tonight at least as a node only (no clients) network, but have pulled back at the last minute to resolve some issues we’ve found. We are still working on this to get that Christmas present for everyone. Keep your eyes peeled over the next few days to see how we go. We are likely to get enough stability to host a public network and open the floodgates for you to help us hammer out any further loose ends.

While we resolve the issues we’ve found, if anyone would like to launch their own local network, or even a shared network with friends, the code is all public so we invite you to do so. You’ll no doubt eventually come across some issues that we have tonight, but you’ll get a sneak preview of some exciting progress such as Section Splits, AT2 Token Payments and Accepting New Nodes When Resources Are Required.

How do I launch a local testnet on my machine?

You will be able to create a Safe on this network, log in, upload data, create keys and wallets, and all the other commands described in the CLI User Guide. This guide will take you through starting a local section, but of course it can be applied to starting/connecting to any shared section, hosted by anyone, with a few tweaks as per the afore mentioned User Guide.

First off, lets clear out some old files you may still have from a previous testnet to make sure they don’t interfere or cause confusion:

$ rm -rf ~/.safe

Now download the latest CLI binary via our install script with the following command:

$ curl -so- https://sn-api.s3.amazonaws.com/install.sh | bash

This script downloads the correct binary for your OS, installs in the correct directory and adds it to your path.

Next you should update your Authenticator daemon and Node to today’s latest releases. You can do as follows:

$ safe auth install
$ safe node install

We can now launch a network using:

$ safe node run-baby-fleming

This will launch 8 nodes on your machine: 5 adults and 3 elders.

We can also add further nodes to the network, this is achieved using safe node join as follows.

Note that you may need to set the RUST_LOG environment variable before starting your node to prevent the logs from being too verbose.

## for Linux and Mac OS
$ export RUST_LOG=sn_node=trace
## Windows (command prompt)
$ set RUST_LOG=trace
## Windows (powershell)
$ $env:RUST_LOG="sn_node=trace"

And then start the node with:

$ safe node join
Storing nodes' generated data at /Users/maidsafe/.safe/node/local-node
Starting a node to join a Safe network...
Launching with node executable from: /Users/maidsafe/.safe/node/sn_node
Node started with hardcoded contact(s): ["127.0.0.1:12000"]
Launching node...
Node logs are being stored at: /Users/maidsafe/.safe/node/local-node/sn_node.log

Your node will now launch and attempt to connect to your local network. You can keep an eye on its progress via its logs, which can be found at ~/.safe/node/local-node/sn_node.log.

Before working your way through the rest of the CLI commands remember to authenticate and create your Safe.

Enjoy having a play and, as always, do please let us know how you get on. More details and insight into the innovations included in the latest releases will be presented once we believe it is stable enough for us to host and invite you to join for a much larger scale testnet than could be hosted locally.

Known issue

There is a known issue in this release which we are still working on to fix. The first time authorising the CLI application with authd, using the $ safe auth unlock --self-auth command (please see this section of the User Guide for more info about this command), you may get an error when trying to upload a file, or write data to the network, for example this error may be returned:

[2020-12-17T20:21:06Z ERROR safe] sn_cli error: [Error] NetDataError - Failed to store Public Sequence data: Data error -> Unexpected error: Could not get history for key PublicKey::Ed25519(d802d5..) - ClientError::DataError -> Unexpected("Could not get history for key PublicKey::Ed25519(d802d5..)")

In such scenario, please just go ahead and run the same command again, to unlock a ‘Safe’ as before, and then try again with writing data to the network.

Safe Client, Nodes and qp2p

Safe Network Transfers Project Plan
Safe Client Project Plan
Safe Network Node Project Plan

A lot of work has been put into tying up the rewards flow, with the main thing being the distributed actor (section wallet) run by the Elders. Section wallet replicas are now in another section.

Additionally, a different initiating step has been added for the distributed actor, which converges with the regular AT2 flow. This allows the replicas to accumulate the signatures of the actor shares, and send it back to the actors, before they hook back onto the AT2 flow with sending in the transfer validation. This is on the verge of completion.

We’ve also been updating dependencies of the sn_api repo, as we continue making the necessary changes to this repo codebase to adapt to new sn_client APIs, fixing issues and trying to get all our automated tests to pass when they are run against a local network. We’ve made good progress on this, and we have most of the sn_api tests passing with some minor issues still to fix and some more work on the test themselves.

Some effort was also put into the CLI to get all commands to work on top of the changes in sn_api. So far we’ve been able to run most of the commands successfully against a local network, and now we also need to work on making sure the automated tests pass as they need some minor changes as well.

On the Client side we’ve cleaned up some potential bugs around the simulated-payouts, where due to the nature of those faked signatures, several messages could be returned to/from nodes, which was resulting in incorrect balances being found.

Otherwise, as some have noted on the forum, we’ve been setting up some simple scripts to aid with internal testnet creation/destruction so we can keep pushing the testnets and testing new functionality more easily.

BRB: Byzantine Reliable Broadcast

Work this week centered around integrating the new dynamic membership code with the pre-existing deterministic secure broadcast implementation. That integration is now working. Further work is being done to make the code production quality, such as minor refactoring to remove all unwrap() and panic() calls.

Useful Links


Feel free to reply below with links to translations of this dev update and moderators will add them here:

:russia: Russian; :germany: German; :spain: Spanish; :france: French; :japan: Japanese; :bulgaria: Bulgarian

As an open source project, we’re always looking for feedback, comments and community contributions - so don’t be shy, join in and let’s create the Safe Network together!

95 Likes

I don’t know what number I am, but yay!!!

I’ll call this a “soft launch :clinking_glasses:

41 Likes

Thanks so much to the entire Maidsafe team for all of your hard work! :racehorse:

34 Likes

3rd one

Testnet :star_struck:

25 Likes

image

29 Likes

Oooh yeah. Can you smell what the team is cooking? I will be playing with this over the weekend and eagerly anticipating the live one. If it is interface compatible, i.e. devs can start coding for the live one, then this is unbelievable progress. Best of the season to you all.

25 Likes

Great work!

20 Likes

Not the first but in the first 10 at least :muscle:
Now reading…

20 Likes

First… ish! :smiley:

18 Likes

Yea we called it a couple hours back. A few wee niggles and it’s not the time for a bunch of tired Engineers to go pure mental frantic at the last minute. We are there though, simple enough wee niggles. However time for everyone who want’s to play to be able to. It’s great to see what’s been pulled together here in such a short period. We decided to give what we had as we do these days.

Great community and we all deserve a chance to now see how real it all is.

63 Likes

It’s still important not to work too hard, even if you are very close. :racehorse:

Does this coming release include SAFE token? :racehorse:

17 Likes

Well done to all the team. Can’t wait to read the feedback of the techies who know what they are doing (unlike me).

18 Likes

21 Likes

Amazing work, team! Thanks for giving it your best and I’ve powered up the laptop to give the wee present a spin! It also means we’ll get to have all the fun in the dev update thread all over again soon! :sweat_smile:

24 Likes

It’s almost Xmas… anticipation is half the fun :smiley:

:christmas_tree:

23 Likes

This is exciting!

There’s so much hard-work behind this great progress. You guys rock!

27 Likes

Good call to wait a bit longer before trying to force it through. Rest and review the remaining bugs with a fresh mind and time to noodle it in the shower in the morning :grinning_face_with_smiling_eyes: .

Maybe something solid before Christmas! MaidSafe Christmas gift can be finish this test net and vacation till after Christmas for the whole team hah.

26 Likes

We are all gonna have an emotional Xmas.

Can’t believe it’s happening

29 Likes

Thanks guys
Xie Xie

11 Likes

Good call to wait. But what a Christmas present to get this year! Thanks Santa :pray::kissing_heart:

14 Likes