SAFE Network - Test 12b (Network offline, end of test)

@polpolrene Glad the vault is ticking along well there; our in-house tests are looking promising too at the moment :slight_smile:

Regarding the network size estimation, we recently made a change which could help with this. The format of the nodeā€™s name in the log messages will now also include its section prefix too. The new format will look like

Node(abcdef..(10101))

The name is abcdef.. and (once the vault is relocated on joining) wonā€™t change for the lifetime of the vault. The sectionā€™s name is defined by the prefix 10101 and it can change over time. We use hex notation for the name and binary for the prefix.

When the network only has one section, i.e. when weā€™re starting the seed nodes, the prefix is empty, so our example node would show Node(abcdef..()). As the network fills, that section splits into 0 and 1 and our node will end up in 1 because its name begins with a which is 1010. As the splits continue with more nodes joining, our node will be a member of section 10, then 101, then 1010, and so on.

So the point is, that to get a very rough calculation of network size you can use your vaultā€™s name at any point to do this.

On average, sections will have

1.5 * (min_section_size + SPLIT_BUFFER)

vaults where the min_section_size is the Vaultā€™s GROUP_SIZE (currently 8) and SPLIT_BUFFER is 1. So the average section will have 13.5 vaults.

The number of bits in your vaultā€™s section prefix can be used to estimate the number of sections in the network:

2 ^ prefix.bit_count()

So for prefix 10101 we can estimate that there are 2 ^ 5 (i.e. 32) sections, meaning there are roughly 432 vaults.

I canā€™t emphasise enough how rough this calculation is! Anyway, running this wee snippet, here are the results:

Prefix length:  0 bits => network size very roughly     13 nodes
Prefix length:  1 bits => network size very roughly     27 nodes
Prefix length:  2 bits => network size very roughly     54 nodes
Prefix length:  3 bits => network size very roughly    108 nodes
Prefix length:  4 bits => network size very roughly    216 nodes
Prefix length:  5 bits => network size very roughly    432 nodes
Prefix length:  6 bits => network size very roughly    864 nodes
Prefix length:  7 bits => network size very roughly   1728 nodes
Prefix length:  8 bits => network size very roughly   3456 nodes
Prefix length:  9 bits => network size very roughly   6912 nodes
Prefix length: 10 bits => network size very roughly  13824 nodes
Prefix length: 11 bits => network size very roughly  27648 nodes
Prefix length: 12 bits => network size very roughly  55296 nodes
Prefix length: 13 bits => network size very roughly 110592 nodes
Prefix length: 14 bits => network size very roughly 221184 nodes
Prefix length: 15 bits => network size very roughly 442368 nodes
Prefix length: 16 bits => network size very roughly 884736 nodes
16 Likes

I think I get it. The last line of output of my vault is:

Update on RoutingTableResponse completed. Prefixes: {Prefix(000), Prefix(010), Prefix(0110), Prefix(0111), Prefix(110)}

So since the largest prefix is 4 bits in length, the network size would be very roughly 216 nodes. Correct?

1 Like

Is the second one private ? If you have uploaded private folder/data instead of public one for the site then withiout logging in thereā€™s no way your folder/data will be readable.

3 Likes

I uploaded it to public, I am sure, but Iā€™ll redownlaod the demo app and check.

Edit: Yes itā€™s in public and the DNS links to the right directory.

Remapped DNS, same problem when logged out.

Yes, more or less :slight_smile:

I was suggesting to only use one prefix (your own vaultā€™s - which will be more obvious in the next testnetā€™s output), and assuming that all other sections have the same length prefixes. In this case you can make the calculation slightly more accurate since we can see that there are three sections with prefix length 3 and two with length 4.

So if you want, you can calculate the network size using a prefix length of 3.4 rather than 4, yielding about 143 nodes.

Itā€™s still a rough estimate though!

3 Likes

Hey @polpolrene, how are you doing that math?
I uploaded ~ 15.5MB and the launcher is showing me 107/500 PUTs, so it seems each account can upload ~ 5 * 15MB = ~ 75MB, right? were you able to upload more than 75MB on each of your 4 accounts?

EDIT: hmmm, is it maybe because Iā€™m not storing full SDs (Iā€™m using the demo app) whilst you are uploading SDs which make use of their full 1MiB capacity giving you 500MiB stored with 500PUTs, is this the case?

1 Like

Bah, away from home for this.

Good luck with the test, and great work on the turnaround time. I am literally salivating to experiment with the network.

1 Like

hurrah!!!

we can all start to be involved and enthusiastic again, sweet!!

vault running in data centre in poland on 185.16.37.149

rup :wink:

4 Likes

The version used in the internal package was not updated, that is the reason for the mismatch of the zip file naming and what is seen on the UI.

Can you confirm that you were using the same version of the demo app? If you also have an older version of the demo app, can you please open that one once, you might be able to see the uploaded files.

3 Likes

vault operating on

port 5483 tcp
port 5484 udp

??

just want to confirm before firewallingā€¦

rup

1 Like

Yes, I just take a 2 GB movie, use winrar to split it to 23 MB. parts. Move these parts to different maps filling each one with around 480 MB. of data. Then I choose 1 map to upload per account.

2 Likes

Hi Krishna,

I was using the same version of the demo app 0.6.2

So is the launcher really 0.10.1 but the UI says 0.10.0? or has the launcher not been updated for OSX?

I have been using the same account details for all the test networks. I had uploaded file to the test 12 network. When the 12b network was posted I downloaded the new launcher and used the same details. When logging in the files were not there which I could understand because this was a new network. So I uploaded new files to the 12b network and all looked good. I then logged out and logged back in a few minutes later with the same account details and the files had gone?

I havenā€™t got an older demo app to try. Is it the launcher that determines which network is joined?

It would be even more accurate and more user friendly to display in the log the average of the number of nodes as computed from each section in the RT.

To be the precise the RT contains a set of sections, each with a size Si (number of nodes in the section) and a prefix length Ni. It would be useful to display the average of the Si * 2 ^ Ni values. And to show the potential imprecision also display the min and max of these values and the number of these values (the last one is the prefix length + 1, but it is clearer to state it explicitly).

In conclusion, it should be easy to add a line from time to time like the following one:

Estimated number of nodes in the network: xxx, min: yyy, max: zzz (computed from n samples).
4 Likes

yes in the launcher config file you first find the

{
ā€œhard_coded_contactsā€: [
ā€œ178.62.23.138:5483ā€,
ā€œ178.62.27.173:5483ā€,
[ā€¦]

and after that

[ā€¦]

ā€œnetwork_nameā€: ā€œtest_network_12_bā€
}

that config file determines which network is joined (and where to find the bootstrap-nodes)

Damnit ! I am not home tonight ! Canā€™t give it a try before tomorrowā€¦
It seems to work nicely from what I read here :slight_smile:
So exciting to see things taking good shape !!

4 Likes

Looks like you have done it correct and needs to be investigated. Thanks for reporting :slight_smile:

Correct, launcher determines the network you join.

2 Likes

Yes 5483 is ur tcp listener for connections and 5484 is udp for service discovery.

1 Like

So Iā€™m trying a quick and dirty way of including the API as per the beaker-plugin-safe-app, using the same package.json setup.

Iā€™m including this in an electron app and itā€™s throwing uppp:

Uncaught Error: Dynamic Linking Error: dlopen(<appdir>/node_modules/safe-app/src/native/libsafe_app.dylib, 10): image not found
    at new DynamicLibrary

Is this something youā€™ve come up against? Or am I going too far with whatā€™s available right now?

The testnet is still using the browser release from you repo @joshuef. And for building the safe_browser I just saw that we have to build the beaker plugins for authenticator and safe_app must be built and moved manually. Testing the same now. Will update the README once the test works fine at my end

1 Like

Up and running Windows 10 Enterprise.
No errors after port forwarding.
EDIT: Pretty good upload to private data as well.

2 Likes