How to run a local testnet for app development (Linux)?

@dallyshalla have you tried this? I saw @dirvine’s comment about it and think it would be very useful to have a “how to” but don’t want to struggle through it if someone has already figured it out. I’m assuming David means we can use the published safe_vault - but not sure if we can run multiple on one machine (I only have one!) because he mentioned “LAN” or if we’d need multiple machines.

Just remembering, I think he also said wait until Monday, so I better be patient! :slight_smile:

3 Likes

Something I will look into sometime this evening @happybeing.

1 Like

@happybeing, I thought about it further; how many nodes we would need; I’d certainly contribute some $$ towards a droplet network that we can keep stable @dirvine, what is a minimum machines on Digitalocean we can use to spin up a network; if it’s not toooo much configuring and can help let us know; @happybeing is that interesting? we can put some $ toward maintaining the network we can use to test apps that will be stable.

Also true, can catch up with other tasks in between the tests. so unless dead simple setting up a parallel DO network, @dirvine no worries

I don’t have the time to dedicate to much development but would consider contributing to help other developers. I think we need something stable to test against or we’re going to be held back again. Let’s see what David suggests.

1 Like

IF you run several vaults (say 9) on one machine then it’s easy to develop apps etc. If you create a directory per vault then start them up (the first one will beacon and the rest will bootstrap to it) then you will have a small developer network.

Each directory allows all the vaults to have their own config files etc. So this is the easy way.

We are flat out on rolling releases and tests, so a separate testnet may be an option for us to keep running. Lets see the next test though, it may prove an awful lot more.

9 Likes

It’s the evening now; I am looking at the config file; . Should I replace all:

{
“tcp_acceptors”: [
“139.59.174.123:5483”
],
“utp_custom_listeners”: ,
“udp_mapper_servers”: ,
“tcp_mapper_servers”:
},

with 192.168.0.x:1980
where x is 1-6

then is there any modification to:

“udp_mapper_servers”: [
“162.243.228.81:40953”,
“128.199.185.249:54098”,
“178.62.82.189:58616”
],
“tcp_mapper_servers”: [
“162.243.228.81:39590”,
“128.199.185.249:44473”,
“178.62.82.189:46782”
]

that would need to be done?

I was thinking why not set up a community run test network. And let the dev’s focus on what they need to.

I set up a node 162.243.8.228:4546 if any one wants to try :slight_smile:

The config file looks like this:

{
“hard_coded_contacts”: [
],
“tcp_acceptor_port”: 4546,
“utp_acceptor_port”: null,
“enable_tcp”: true,
“enable_utp”: false,
“service_discovery_port”: null,
“bootstrap_cache_name”: null,
“udp_mapper_servers”: [
],
“tcp_mapper_servers”: [
]
}

But I cant connect to it from the launcher. The vault sees something coming in but it gives me this error:
ERROR 13:49:24.130570747 [crust::connection connection.rs:803] Error receiving from PeerId(050d…): Error { repr: Custom(Custom { kind: InvalidData, error: StringError(“Deserialisation failure”) }) }

2 Likes

I would need to go on testing for my rust project,
I’d be willing to add some ressources to a community driven testnet - I don’t have moneyz to pay for some nodes hosting, but I have a few machines at home that can work.
I suppose the vault code as it is right now is maybe not ready for that, though.
Also, how do we make sure that the test newtork we run is “sealed” off the maidsafe one ?

1 Like

Based on what you wrote, I cleared all contacts and put just the forwarded port… and I get an error like this:

~/Desktop/devnet/2/safe_vault-v0.6.0-linux-x64$ ./safe_vault
ERROR 10:58:34.257042035 [crust::connection connection.rs:489] Connected to ourselves
WARN 10:58:34.257088945 [crust::connection connection.rs:163] TCP direct connect failed: Connected to ourselves.
ERROR 10:58:34.258242139 [crust::connection connection.rs:489] Connected to ourselves
WARN 10:58:34.258275874 [crust::connection connection.rs:163] TCP direct connect failed: Connected to ourselves.
ERROR 10:58:34.258372143 [crust::connection connection.rs:489] Invalid crust msg on tcp accept: Deserialisation failure
WARN 10:58:34.258658478 [crust::connection connection.rs:163] TCP direct connect failed: Connection refused (os error 111)
WARN 10:58:34.259189448 [crust::connection connection.rs:163] TCP direct connect failed: Connection refused (os error 111)
WARN 10:58:34.259202926 [crust::bootstrap bootstrap.rs:121] Error connecting to bootstrap peer: Connection refused (os error 111)
ERROR 10:58:34.259430513 [crust::service service.rs:298] Failed to start listening for peers.

from the first console window:

~/Desktop/devnet/1/safe_vault-v0.6.0-linux-x64$ ./safe_vault
ERROR 10:58:34.257706633 [crust::connection connection.rs:489] Invalid crust msg on tcp accept: Deserialisation failure

@nice might have a point in that the code is not ready for this. I’m also seeing a lot different errors when I’m trying to set it up

Brief idea: maybe use the very first node without any config (ips) set, and the second and following bootstrap to the first one.

Or use the first two (pointing at each other and starting at the ‘same’ time or right after another) with different localhost ipv4 addresses and ports from the 127.0.0.0/8 range and the third and subsequent ones bootstrapping from those two initial nodes.

2 Likes

Yes right of course… use local host IPs…

WIth a null acceptor port?

1 Like

Not a networking expert yet, though have plenty to do app side; if someone with time and experience trying I’ll certainly try too going to … dive back to other tasks as mentioned earlier…

btw @geir I put your ip into the hardcoded it gave me this:

WARN 11:50:26.081077095 [crust::connection connection.rs:163] TCP direct connect failed: No route to host (os error 113)
WARN 11:50:26.081127443 [crust::bootstrap bootstrap.rs:121] Error connecting to bootstrap peer: No route to host (os error 113)

do you have a conenction with me?

Hum does not look like it but I have some new error messages :slight_smile:
ERROR 14:52:08.454791363 [crust::connection connection.rs:489] Direct Connection not possible on advertised tcp port - Error { repr: Os { code: 110, message: “Connection timed out” } }

I closed the console… and just now restarted it any new messages?

hehe I just did to. It’s running again now, but cant connect to it from my local machine :frowning:

Just got something. I assume this was you @dallyshalla

ERROR 14:55:34.044612580 [crust::connection connection.rs:489] Direct Connection not possible on advertised tcp port - Error { repr: Os { code: 113, message: “No route to host” } }
ERROR 14:57:58.534616746 [crust::connection connection.rs:489] Direct Connection not possible on advertised tcp port - Error { repr: Os { code: 110, message: “Connection timed out” } }

I just restarted the console, anymore? restarted 3 times now in a row

yes new errors are comming in:
ERROR 15:00:49.286637706 [crust::connection connection.rs:489] Direct Connection not possible on advertised tcp port - Error { repr: Os { code: 110, message: “Connection timed out” } }
ERROR 15:04:30.982588059 [crust::connection connection.rs:489] Direct Connection not possible on advertised tcp port - Error { repr: Os { code: 110, message: “Connection timed out” } }

But still no established connetions in netstat

Running 9 vaults in my machine would be the best for me short term - as I want to conserve my mobile bandwidth.

So @dallyshalla please let me know if you get that config file question sorted.

Having a real testnet available would be good, but I could live without it until MaidSafe get things more stable.

Monday will be a much better day to do this. You don’t want to see all the changes we made on Thursday to vaults and just now sorting all bugs etc. we found. It will help a lot to wait a day or two.

7 Likes