How to run a local test network

That got things working! Thank you so much! :grinning:

My knowledge of routing/crust is limited but I am gonna guess this is what is going on… I am guessing that by default, the SAFE Browser uses the number of vaults it can detect as the minimum_section_size. If I run the minimum_section_size equal to the number of active vaults everything works perfectly fine. Above this value it breaks… So it is almost like (without proper configuration) SAFE Browser sits and waits for say 4 acks (4 is the number of vaults running) but doesn’t receive them because the min_section_size is set to 2 so only 2 acks are sent. Is this on the money?

Do I need to configure a Node.js/Electron app I am building to have a abcde.routing.config too? My application exhibits the same behavior as the the browser before I included the routing.config file. Tried it and sure enough, yes is the answer. Everything seams to be working now. :grinning:

One thing I am noticing… The network really doesn’t seam to like me adding more vaults after I have written ANY data to the network (including an account). If I open two vaults, create an account, then add a third it stops responding to requests. If I start three vaults then create an account it works perfectly fine. Is this expected behavior or is something else wrong? Vaults leaving and joining seams to be a bit unstable is what I am experiencing. Maybe this is just where Maidsafe are in development though!

1 Like

You shouldn’t need any config on your application side, the information to connect to the network is already provided in the auth URI returned by the browser (unless of course your app is actually a vault app which I guess it’s not).
Thus as long as your app is being authorised by the browser that is connected to your local network, and the response is successfully received by your app, your app should be able to connect to your local network without any config file.

EDIT: I just double checked, and the min_section_size value is not passed encoded in the URI to the app (only the IP’s and the network name), thus for your case @DaBrown95 you do need the crust and routing config files as you said. Thanks a lot @Fraser for pointing this out to me. I get that if the local network was setup with min_section_size set to 8 in the vaults, then the app will be able to connect without the config, is it right @Fraser? perhaps we can consider adding this value in the uri so it becomes network agnostic?

2 Likes

Yup - that should work.

That’s not expected, but we’ve not done much any testing with min_section_size set to 2 since a network like that would be very prone to losing data during churn. I’ll try and replicate this issue over the weekend, but amongst other things, this critical event might get in the way :smiley:

2 Likes

See you at the stadium (tv) @Fraser . Good luck :wink:

2 Likes

I have not started my own local network yet so this is just my intuition talking. Maybe this is not exactly the procedure you are following, but launching only 2 or 3 vaults seems way too small for a stable consensus network. I would think that you would want at least 16, 32, 64, or even 128 vaults (Can anyone share how many there are on Alpha-2?) before adding accounts and storing data in a stable manner. The default min_section_size=8 would seem to be indicative of a stable number, and I would think your going to want at least 4 section prefixes 00,10,01,11. So if you only have 2 computers to work with try starting up 16 or 32 vaults on each before adding any data. Maybe @Fraser can clarify this for us? It might be a good experiment for you to see how many instances you can load on a single server before performance suffers… that’s one test I’ve been meaning to try.

1 Like

This is pretty intersting to hear! I had no idea that the URI could be used in this manner. I for one feel that including that piece of information in the URI could be useful. Always nice to keep things more generic. Although I do realise that for the vast majority of cases it would be ‘wasted’ bits. Thanks as always @bochaco for your insight!

Yeah possibly me having the section size this low is very unrealistic for the network, it is simply because I am worried about bottlenecking the network by running too many vaults on my machine! What have you, or others, found the maximum number of vaults you can run on a single machine? Maybe I am babying my machine a little too much…

Good stuff, Always have to make time for the truly important things in life! :wink:

I have always wondered this myself!

You are probably onto something, I am going to try this soon.

I am going to be doing this a lot over the next few weeks so I will report back my findings.

1 Like

We can guess a lower bound by looking at “SAFE Browser.crust.config”: it has 25 contacts.

This isn’t necessarily the total number because Maidsafe may expose only of subset of the vaults in the config file.

1 Like

Congratulations: SCOTLAND 22-13 ENGLAND

3 Likes