MaidSafe Dev Update :safe: 13th July 2015

Hey Guys,

We’ve started the current sprint (RUST-3) on Wednesday (8th July) with planning for the same ending just before. This sprint is estimated to run for four weeks. Objectives of this sprint as stated in last week’s update by @ustulation mainly includes the active RFC implementations. These RFC’s bring in vital improvements to the network making it simpler, scalable and more secure. Rust-3 sprint has been backed with good planning from all the maintainers (was a busy planning week indeed). The required tasks have been detailed and added into JIRA, JIRA Dashboard gives a quick snapshot of the sprint progress.

The progress in the first few days of the sprint has been really good. CRUST has made significant progress with the implementation of UPnP, while NFS has now been separated from maidsafe_client into it’s own maidsafe_nfs crate. Routing module is now being refactored with @dirvine watching the code closely. We expect a few of the current sprint tasks in routing to get completed as a result of this refactor. Do note a few of the tasks in this sprint are quite detailed and might not be ideal for the bounty program since they involved long discussions and impact multiple libraries. Hopefully with this change in place, future tasks should be much more digestible and suitable for code bounties :slight_smile:

Unified Structured Data has been discussed and detailed in the previous week’s update. I thought of explaining another RFC (Name-Service) which is being implemented in this sprint. The Name-Service RFC explains how a folder in the network can be made public and exposed to the world. Exposing a public folder allows users to create a variety of services on the network. Websites, CMS, Blog, File sharing system are few services that can be created.

Let’s walkthrough the steps on how to host a Website in general,

  1. Create the files to served (Website Source files)
  2. Choose domain name
  3. Host the files on a server
  4. Update the DNS record to map the hosting server

Now, let’s map the same process in the SAFE Network,

  1. Create a public directory using the NFS API, assume I created a public directory called my-website
  2. Choose a public name, say I pick as my public name. Public name can be related to the domain name for easier understanding. public name refers to the long_name field in the dns struct as detailed in the RFC.
  3. Create a DNS record with the maidsafe_dns crate (which should be ready by the end of this sprint)
  4. Update the DNS struct with the type of service, and the public folder id (id of the folder created in step 1). In our case, we will put the service to be www. The service can also be visualised like a subdomain mapping, if I had to create something like, then the service name will be blog instead of www.

With these DNS Structs we can create any kind of service as explained in the RFC (www, blog, microblog, dev)
Thus the maidsafe_dns crate would expose APIs to create a DNS record, Manage DNS records and also perform DNS lookups.

We are also planning to come up with a node.js example to showcase how files can be served from the SAFE Network probably by the end of this sprint.

This is just the beginning :smiley:

Here is the dev transcript


I realize I would pay dearly to be able to tell one day to my grandchildren that the project SAFE contains some of my code from before the “official” launch ^^

Do you have in mind to insert a few bounties with 0 story points for super low level rust coders :wink: ?


Good job team :smile:


@dallyshalla what happened with the “forum” app I think you were working on? I think it was in last week’s transscript.

am sure we can come up with a few :wink: Guys love breaking the code style guide near the end of a sprint. Fixing that is a task by itself :smile:


Yepp actually @eblanshey is onto that task.

1 Like

Oh my, this is getting exciting! So will the nodejs runtime have to run on the client who has already decrypted the files or could the server potentially be run (on public files, of course) by the node who has the .js files? Curious how the client / server model works when data is chunked about the place.

Thanks for the update @Krishna_Kumar.

In the future, wouldn’t SAFE DNS conflict with the current Internet DNS, at the search level?

Allow me to explain. Obviously, the user needs the “MaidSafe Client” in order to access the SAFE Network. But at the search level, it looks like SAFE DNS doesn’t distinguish itself from the regular DNS.

If this is true, how does a browser or search engine discern between a SAFE address and the current Internet when doing a look up function?

TOR addresses are pretty easy to identify because they have the (.onion) extension.
TOR address example… http://kbhpodhnfxl3clb4.onion/
Clinking on this link would result in a “server not found” page, unless you’re using a TOR Browser.

My standard reply would be… they wouldn’t conflict because the MaidSafe Client only looks up SAFE DNS while the browsers look up the current Internet DNS.

My follow up question is… what if browsers like (firefox) included the MaidSafe Client as an optional plugin? It should alert the user when they click on a SAFE address/link. If they did, wouldn’t they need a way discern a SAFE DNS from regular DNS?

I believe people will post their SAFE addresses on the regular Internet just like they post TOR addresses. Unfortunately, TOR looks like it doesn’t work unless you already knew to install a TOR browser.

Even if MaidSafe’s position is to keep the two DNS separated, I still think it’s helpful to distinguish a SAFE address anyway. I hope SAFE will replace HTTPS in the future. I also think there will be many more Networks, and people will try to bridge them.

1 Like

Good questions, things can get confusing. I always thought that SAFE-sites would have addresses like safe:myblog. But nobody as I (understand it now) will stop me when I actually use, and that’s where things become weird. It’s already confusing when people create website on the normal internet these days using .io and .co domain’s next to the .com and .org etc. Things will get messy! I think things within SAFEnet should be kept simple:

@username (just like Twitter) should be used to find a person, it’s wallet-address, it’s private page etc. So when you want to message me on SAFEnet it should be done with @polpolrene in the address-bar. When you want to see my personal page, you should type in @polpolrene (or just safe:polpolrene) in the address-bar of your SAFE-browser.

Please forbid the usage of .co .io .com .org or anything with a dot :stuck_out_tongue: on SAFEnet. It will confuse a lot of people, especially when they use a plugin for Firefox.


Use the URL scheme? so differentiate the two via safe: against http: or mailto:

Yep browsers intending to integrate between the different URL’s seamlessly would need to work based on the URL scheme here similar to what you’ve pointed to with the .onion extension.

This approach is what we had tried in the POC for Firefox extonsion


Yep, these examples right now would be client side only.

1 Like

Is there some kind of system foreseen to manage web fora?

Yes, people will create mirror Internet addresses on the SAFE Network. Hopefully, the SAFE URL scheme will be enough to keep things straight.

Manually typing in addresses are tricky. I rarely type “https” or even “www” into my address bar. But with SAFE added into the mix, I have to remember to type “safe:”

Would it be easier to have ".safe " as an extension instead? That also solves the problem of the .org .com .net .io conflicts. Most users automatically include the dot extension, because it’s well known that .com is different from .net, and .org. Maybe .safe can capitalize on this as well.

1 Like

Now that I think about it, because Rust is something that exists with the help of Mozilla, bridging the Safe Network with the rest of the Internet could be a lot easier if the project proves to be one of the greatest projects running on Rust.


That could be an option. But on the other hand, the SAFE-Browser could automatically add the safe: That way people will see and understand that that’s the right address, but they don’t need to type it in (only when they’re on Firefox, and using an add-on). That way it would be a alternative for http:// You’re right about the .com and people being used to it. Not that easy to solve it all and keep things simple.

I think “safe:” and “http:” are best.

Then add a browser plugin that inserts one or the other when not specified, so the user can choose to default to old web or safe web with a browser button.


I’ve been working on the forum in my spare time. As you know from our previous conversations, there are a ton of unknowns, and although a lot of progress is being made with the new RFCs and discussions of different implementations, it’s clear there are still no definitive answers that are set in stone (things can change at any time).

However, I still think that it’s possible to start building apps, even if using a basic app architecture which can later be swapped with the real thing. After doing some research, it seems that before SAFE comes out, a good tool to use for the API is Firebase. It offers a number of similarities with SAFE:

  • NoSQL stores
  • JSON to store data
  • file paths to store/retrieve data
  • Both take care of user authentication
  • Similar commands, PUT, GET, UPDATE, DELETE

Basically it looks like the SAFE network will be a decentralized Firebase on steroids :smile: So we can make a demo app whose API calls to Firebase will eventually be replaced with SAFE calls.

Here’s a preliminary data structure document I wrote to get things started:

Naturally with recent developments such as Structured Data there will be changes, but it’s a starting point. Would love to get some new ideas (or pull requests) from the community on how to make it better.

I did some basic work on the design, as well. Here’s a screenshot of the topic page: The design is inspired by another forum software, but I’ll never tell you which one :smile:

(Not sure if this post belongs in this topic. Feel free to move it elsewhere.)


I would like to type: and have the browser connect to the network that responds first. Who wins?

Most likely the traditional internet site. It’s just one connection downloading one stream of data from a single fast connection, whereas the SAFE equivalent is several slow connections bouncing all around the world from node to node fairly randomly (geographically speaking) first finding who has the chunks of the files and then actually getting the files.
I doubt it’ll be a severe reduction in speed, we’re talking a quarter of a second versus anywhere from less than a second to a worst case of around 2.8 seconds for the first piece to start downloading, but once the data IS flowing it should be comparable to the traditional server in speed due to being downloaded from such a large number of nodes. Hopefully anyway.
But as far as which network gets a response first, the traditional internet should win.

If anyone cares, the way I’m calculating the connection latency is by assuming an average latency of 200 ms per hop for both networks and remembering reading that the number of hops required to reach any node in the SAFE network is the natural logarithm of the number of nodes. So to calculate the worst case scenario for connecting to a node, I’m using the formula ceil(ln(number_of_nodes))*average_latency So for a 1 million node network at 200 ms average latency (both of which I think are reasonable numbers at that point in the network’s existence, I’m optimistic about the adoption curve :smile: ) we’re getting a worst case latency of around 2.8 seconds.
I’m also assuming we want to download the chunks in a fairly ordered way due to wanting a similar experience of the page loading (and getting decrypted) as it comes in, rather than all at once once all the chunks are downloaded and decrypted in one go.
This is however not taking into account the extra step of doing any SAFEDNS lookups which are assumed to be instant for the purposes this calculation.

1 Like

Yes that’s the part I was thinking of, which resolver replies first. I was dreaming that SAFE would respond first, but given a DNS server at the ISP…the client would need to cache the full record for SAFE to win I’m guessing