Safe Network Dev Update - December 10, 2020

3 Likes

awwh such a cute bunny.

1 Like

It has a high resolution, you can print it directly on a T-shirt :dragon:

1 Like

Keep it simple - ignore deities and “nobility”

Good
Better
Best

1 Like

dolphin, whales, so everybody can become a Safe Network whale!

3 Likes

1 Like

Just use numbers, it is the simplest way.

Level 1
Level 2
Level 3. :racehorse:

1 Like

Except that when you cite the level number there is no clear understanding of what is the minimum, what is the maximum, without delving into the nomenclature itself. Infant, adult and elder is more self-explanatory.

4 Likes

If you know there are n levels, you will know the minimum level (1) and the maximum (n).

How do you know “elder” is the maximum level? What if there is a “jedi” or “emperor” level you don’t know about? How do you know “infant” is the lowest level? What if there is a “newborn” level? You pretty much have to know and memorize all of the levels. If you do that then it makes no difference which way you do it.

As the system evolves, there might be a reason to change the number of levels. That’s easier to do with numbers too.

When one speaks of an “elder” the uninitiated can be fairly sure there are not hundreds (or even thousands) of levels beyond “elder”. It would be assumed to be at or near the top of the hierarchy.
If one were to mention “level 2” or “level 3” that certainty would not exist.

1 Like

I’d suggest thats a bridge we will cross when/if we come to it. I am happy enough the devs will be up to that task when it comes and will not waste brain cycles on what is a reatively minor point. I am also happy that if if DOES become a big(gish) deal, Jim Collinson will have it under control.

4 Likes

Yes this is a minor thing that I’m sure the devs will get right. If they are using the system they should design the system for their own convenience.

:secretariat415:

2 Likes

Thank you for the heavy work team MaidSafe! Never give up!

I add the translation into Bulgarian in the first post :dragon:

8 Likes

@dirvine Sorry, for being so late - if the following is already solved, you can happily ignore this. :wink:

This week we’ve been trying to track down the source of a stack overflow issue which has surfaced in sn_node . It initially seems there is no specific source, but that stack usage has simply grown over time. This was originally only happening on Windows, where we discovered the default stack size is 1 megabyte, which is low when compared to Ubuntu, which has 8 MB. Lowering the stack size on Ubuntu does allow us to replicate this, which is good. So with that, we’ve been investigating this further and options to prevent this from happening.

I haven’t found an issue in the sn_node repo and no PR and this bug wasn’t mentioned in the current Dev Update, December 17, so I don’t know, if you could already fix it or not.

Without knowing any details, I just want to throw out some ideas that might solve this stack overflow issue (going from “possibly simplest” solution to “more advanced/difficult/probably unlikely” solution):

Spawning a new thread with explicit stack size:

use std::thread;

let builder = thread::Builder::new().stack_size(32 * 1024);

Within this thread you can then execute the logic that is requiring the bigger stack.


Stacker

Stacker is an external crate (but is maintained under the rust-lang org) that can help implement recursive algorithms that “go very deep”.
From their README (formatting by me):

A stack-growth library for Rust. Enables annotating fixed points in programs where the stack may want to grow larger. Spills over to the heap if the stack has hit its limit.


Using async/await directly on big temporary values

In some cases async/await can cause increased stack size when used with temporary values, due to the state-machine that is generated by the compiler. There is a talk (on YouTube) by Tyler Mandry on RustFest Barcelona 2019 (with exact time stamp - explanation is approx. 2 mins long) where he shows this and ways to mitigate it.


In the end I just want to say thank you to the whole Maidsafe team for all their hard work! :heart:
Although you might not see me posting a lot in this forum, I can guarantee you that I read every Dev Update with great excitement! :hugs:
I hope you have some great and relaxing holidays. :sparkles:

17 Likes

These are all potential fixes, we went for increasing stack size and the issue vanished, however we have some other issues. We will go to tokio V1 soon and that will also help. The stack overflow is gone for now though.

11 Likes

https://github.com/maidsafe/sn_routing/pull/2269

8 Likes