Update 25 August, 2022

“Say hello, wave goodbye” warbled Soft Cell’s Marc Almond back in the 80s, and how prescient he was. This week we’re delighted to welcome Mo as the newest member of the MaidSafe engineering team. Mo is a computer scientist and a software developer. He achieved his Ph.D. in Computer Science at the University of Potsdam in 2020 and is interested in researching, programming, and security testing for distributed services and standard software systems.

At the same time, we’re sad to wave goodbye to @yogesh, who has been on the team for a number of years now and has really left his mark, applying his forensic problem-solving capabilities and eye for detail across all aspects of the network. Ever the professional, Yogesh’s most recent work was to make sure the ELK server was running just the way he wanted and completing all the documentation. All the best Yogesh and enjoy your new challenge.

General progress

@joshuef has reworked some of the CmdCtrl module to remove the last remaining lock outside of the Node instance itself. This has had a nice knock on in terms of code simplicity, which is always a win.

@qi_ma is now looking into a possible memory leak on a node joining as well as investigating why some messages are handled very slowly at nodes.

@roland has pretty much finished refactoring the section chain as a Merkle tree and is now updating the API to make it as ‘drop in compatible’ as possible.

And @anselme has fixed a threshold issue in sn_sdkg, the synchronous DKG crate. We now have DKG working pretty well, including with section splits. Integration of this continues!

@bochaco has spotted some issues with the register storage implementation, which meant that concurrent writes to the same data may lose some operations, and in fixing that, we’ve also spotted another issue that may have been plaguing main, whereby similar xorname registers might have been overwriting each other too. A fix is now in place for this.

Progress report

Messages and memory spikes
We were seeing a flurry of messages and surge in memory use particularly when a new node was contacting elders and asking to join.
Progress: Much improved. There are still a few situations that lead to a leak and those are debugged as we come across them. They are much less frequent now and much easier to track with the ELK dashboard.
Todo: Squashing bugs when we see spikes.

ELK dashboard
ELK (Elasticsearch, Logstash and Kibana) is a stack of open source tools for aggregating and visualising log files. Later Beats, which collects metrics from CPU and elsewhere, was added, but BELK sounds stupid so the name ELK remains.
Progress: Done. We can now monitor testnets and see what each individual node is doing. More here https://github.com/maidsafe/sn_testnet_tool/tree/main/scripts/ELK
Todo: Figure out if/how we can securely open this up for all to see.

Data handling
Getting section membership sorted was necessary for proper data handling, redistributing chunks when an adult goes offline, and gracefully handling splits.
Progress: This is done and looks much more solid.
Todo: Awaiting the completion of Membership so it can be completed. More tests are being added to shore up the underlying storage layers.

Handover
If an elder notices that the current elders are not the seven oldest nodes, then it sparks a vote on promoting the oldest adult(s) and demoting the youngest elder(s) to make way. Handover is the algorithm that controls this process.
Progress: Completed, although it is being refined with gossip – below.
Todo: Look at adding gossip as a fallback.

Membership
This is what allows elders to keep control over the adults in their section.
Progress: Membership is now integrated into sn_node and uses consensus to force the elders to agree which new nodes will be able to join the section.
Todo: Get adults to have the same view of members as elders. Many of the decisions that adults have to make, e.g. what data they are responsible for, is based on the current membership state, but currently they don’t have the same view as the elders.

Gossip
Gossip is a type of p2p protocol where a node periodically broadcasts knowledge to another node, often selected at random, and that node passes the message to another node, and so on until it becomes ‘common knowledge’.
Progress: We are introducing gossip at various places where the processes can sometimes get stuck, such as DKG rounds, membership and network splits. In the case of the latter, gossip also allows us to reconstruct the network after a catastrophic failure.
Todo: Begin implementation.

DKG
Distributed key generation is used when elders need to make decisions about membership.
Progress: DKG has been revamped with a cleaner, timer-free implementation and consensus to fix cases where DKG was inconsistently failing and retrying due to the use of timeouts when waiting for messages. Testing is showing positive results.
Todo: Fix a bug in the consensus process that sometimes prevents termination. Look at adding gossip as a fallback communication layer.

Payment flow
When the client pays for an upload it gets a receipt and the elders and adults in the sections that store the data receive some part of that payment. Payment flow is about how that distribution works.
Progress: We are working on the algorithm to manage payment flow. At the moment the thinking is to include all the beneficiaries in the receipt and have them able to claim the funds by having a DBC reissued to themselves at any time. Recipients can potentially be clients, adults and elders.
Todo: Detailed design to cover security, UX, economic incentives. Testing.

Token emissions
After the initial distribution of tokens at the inception of the network, the remaining 70% of the total supply will be created and securely distributed as a consequence of people uploading data over the long term. SNT are not created every upload, but rather when certain conditions are matched. These events must occur with a known probability, but be unpredictable as to when and where they will occur.
Progress: We are currently considering mechanisms that will reward elders, storing adults and clients while making mining by rogue nodes uneconomic.
Todo: Settle on one option and test it.

Node refactor
sn_node has been refactored to remove as many instances of multithreading as possible in order to simplify the code and remove unwanted locks.
Progress: Pretty much done. Code is vastly simpler, performance is improved and only one node lock remains around storage, which is fine. There are a few others around the backpressure feature, but that’s not used by default.
Todo: Keep monitoring performance, edge cases.

Section chain refactor
Section chain, the secure linked list that connects section keys all the way back to Genesis is being refactored as a Merkle DAG. It’s now called SectionsDAG.
Progress: Mostly done.
Todo: Complete the refactor.

Dysfunction
Regularly testing that nodes are online and taking action if they are not.
Progress: Refactored with its own test suite, awaiting progress in other areas.
Todo: Will be continually revisited as other components mature.

DBCs
Digital bearer certificates are the vehicle for transacting tokens on the Safe Network.
Progress: DBC integration and the basic functionality is largely there. Completing the basic functionality is the next step, in particular getting it working with the payment flows, which is far more solid than it was six months ago.
Todo: Improve APIs and the UX around this. Work the DBC APIs into the payment flows and testing there.

Name Resolution System and domain names
NRS maps are multimaps (registers under the hood) that contain the mapping of all the subnames to URLs for a specific topname. Each topname has its own multimap.
Progress: API was refactored to simplify the code. We’ve decided on the topname.subname (google.maps) format as the most intuitive.
Todo: Changes to NRS ordering to be implemented.

Client / UX
sn_client is the set of APIs and the command line interface (CLI) that allows devices to connect to and interact with the network.
Progress : sn_client has been refactored - fixing messaging which shows users whether they are connected or not, especially during bootstrapping.
Todo: Continuous improvement of the APIs and CLI as we move forward.


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; :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!

54 Likes

yay first here!!!

20 Likes

Love the format of this update! Filled with goodness! Thanks Team @Maidsafe!

24 Likes

Third for the second time!!!

14 Likes

Just skimmed this, been busy, a nearby skip has been extraordinarily productive :slight_smile:

Best of luck to @yogesh, sorry to lose an important member of the team, many thanks for all you have contributed over the years. I hope to make plenty use of your ELK server.

Welkommen Mo - looking forward to seeing your contributions :slight_smile: Are you working remotely from Germany or are you with us in Scotland now?

Now could this be why when I do a put -r of a directory but forget the trailing slash, then go back to try again with the slash, it will fail?

Now to read in depth, this looks like a very comprehensive round up. Thanks to all who contributed to it.

17 Likes

Nice update but does anyone else get concerned when a long term employee leaves the team?

4 Likes

I have noticed some people do but why? :man_shrugging:

I don’t know a single person who has worked for the same company all their life.
That would be weird.

Nice update :+1: adios @yogesh :wave:

15 Likes

Maybe it’s a personal perspective but if I was working on something like this project and it was near completion there is no way I could walk away now.

2 Likes

Money talks - @yogesh has proved himself as a competent Rust engineer - amongst his other skills. I imagine he would be in pretty high demand and has (reluctantly or otherwise) accepted a better offer.

12 Likes

I was thinking about Maidsafe’s 4 day week recently, more money or less hours.
I think that 4 days is pretty compelling.

What’s your choice?
Money or time.
I am fortunate to have exited the regular work week, and it will cost you dearly to take my time from me.

(None of this is in relation to yogesh, I am not speculating on what his reason for leaving was)

4 Likes

No, this is normal and healthy for the individuals and the team. Some stay longer, some shorter.

Good luck and thank you @yogesh.

Edit: I think we should avoid speculating on reasons to move because they are many and none of our business! It’s important that people feel able to leave when that’s best for them or it will create problems for everyone.

18 Likes

Churn is normal.

8 Likes

I’m curious as to why switching the order compared to the regular web is the most intuitive? My first reaction would be that it’s less intuitive to me since it’s the opposite of what I am used to and it also kinda makes you read from right to left instead of from left to right.

6 Likes

Very true and well worth emphasising especially in a relatively small team.

All the best and thanks again @yogesh

6 Likes

Welcome Mo, and thank you for all your hard work over the years @yogesh!

Now jumping back to the sidelines :wink: :pray: :ant:

10 Likes

All the best @yogesh Glad you were part of the project and hope you enjoyed your time there.

Welcome Mo @Mo999 hope you have much enjoyment working at Maidsafe.

Thanks again for the update @maidsafe and these style of updates once every so often are great to keep up with progression.

9 Likes

Thanky you @Yogesh for your hard work in MaidSafe and take care.

Great summary of progress.

10 Likes

Thx 4 the update Maidsafe devs

Thank you for all your hard work @yogesh and good luck with your new adventure.

Welcome @Mo999, always good to see a new Maidsafe dev

Can’t we have both topname.subname and subname.topname and let the end user decide, kinda like toggling light and dark theme?

Wow just wow, really love this crystal clear overview of tasks, so many moving parts… Love the progress

Keep hacking super ants

8 Likes

I want to add to the questioning of topname.subname being less confusing (sorry!)

Everyone who comes to Safe Network for the foreseeable future will already be familiar with and unconsciously expect the reverse, so I can’t see how changing that convention will be simpler for users to grasp. They also have to remember that the web and the Safe Web work differently, which means continuing confusion even years after learning the difference (“dang, I forgot this was different on Safe!”).

Maybe when you work through actual user workflows this doesn’t in fact confuse?

It might help if someone could explain the reasoning behind this because I don’t see it and it’s an important and irreversible decision.

Also, even if left to right seems simpler in isolation because Western languages flow left to right, this isn’t true for all languages. I wonder how many people in the world who would find right to left more intuitive?! Also, Western languages while written left to right don’t all parse in the same way, German for instance has different ordering to English so I’m left again wondering why topname.subname is thought to be simpler to grasp in the first place. Another counter example is UK (and European?) dates!

Is it just us programmers who assume a certain ordering convention is going to be simpler for everyone in the world, when it’s much more complicated than that?

11 Likes