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

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

ok thanks I’ll take the node down and wait :slight_smile:

2 Likes

This sounds wise and the promess of a nice sunday off the screens and out in the wild

3 Likes

But for impatient people (like me): I am successful at running a local network of 12 nodes on a Cygwin/Windows machine with current master branches, but I had to change 2 referenced versions in Cargo.toml of safe_core crate:

  • lru_time_cache changed from “~0.3.0” to “~0.2.7” (I think 0.3.0 is bugged: Duration::new(std::u64::MAX, std::u32::MAX) seems to generate an arithmetic operation overflow)
  • routing changed from “~0.16.2” to “~0.17.0” (so that safe_core and safe_vault share a common routing code).

Please also note that you don’t have to create any config file and you have to wait several seconds between 2 consecutive vaults.

With this network I am able to create acounts and manage immutable data. But I am still not able to manage structured data (same error “failed to fill whole buffer” mentioned by @bluebird and me one week ago).

5 Likes

Glad to hear about it, and nice going @tfa; seems like will wait up till gates are open again

For your information:

I found the bug, corrected it and made a PR which was accepted by Maidsafe.

My error was that I was using methods of routing crate to create SDs but I was reading them with get_data method of safe_core crate. This means we can manage SDs:

  • either at the raw level by using primitives of routing crate

  • or at a higher level by using methods of safe_core crate

but we have to be careful if we mix the two levels.

3 Likes

@tfa so you are able to manage structured data on this test net you set up locally on your desktop?

1 Like

Yes, i am.

I have been able to do it since a long ago. My problem was that at one time Maidsafe changed safe_core interface by modifying the pub use list. So my code didn’t compile anymore and I had to adapt it. But doing so I used some primitives of routing instead of safe_core and didn’t realize it. It took me several weeks before I analyzed the code more seriously and found the problem.