For future records, a full list of modifications required to run a local network on Test 12C (ie vaults 0.13.1)
Test 12C
The diffs below are git diffs - any line starting with a minus sign is to be removed, any line starting with a plus sign is to be added.
language versions
$ rustc --version
rustc 1.16.0 (30cf806ef 2017-03-10)
$ cargo --version
cargo-0.17.0-nightly (f9e5481 2017-03-03)
$ node --version
v6.0.0
$ npm --version
3.8.6
safe_vault
git checkout 0.13.1
src/bin/safe_vault.rs
remove linting for unused
and warnings
L27
- unknown_crate_types, warnings)]
+ unknown_crate_types)]
L33
- unknown_lints, unsafe_code, unused, unused_allocation, unused_attributes,
+ unknown_lints, unsafe_code, unused_allocation, unused_attributes,
src/lib.rs
remove linting for unused
and warnings
L201
- unknown_crate_types, warnings)]
+ unknown_crate_types)]
L205
- unknown_lints, unsafe_code, unused, unused_allocation, unused_attributes,
+ unknown_lints, unsafe_code, unused_allocation, unused_attributes,
Cargo.toml
use local copy of routing
L24
-routing = "~0.28.2"
+routing = { path = "/home/user/maidsafe/routing" }
src/personas/maid_manager.rs
remove account limits
L34
-const DEFAULT_ACCOUNT_SIZE: u64 = 500;
+const DEFAULT_ACCOUNT_SIZE: u64 = 500000000;
routing
git checkout 0.28.2
Cargo.toml
use local copy of crust
L13
-crust = "~0.22.0"
+crust = { path = "/home/user/maidsafe/crust" }
src/states/node.rs
Remove proof of work check for peers on local network
L1326
let (difficulty, target_size) = if self.crust_service.is_peer_hard_coded(&peer_id) ||
+ self.crust_service.has_peers_on_lan() ||
self.peer_mgr.get_joining_node(&peer_id).is_some() {
(0, 1)
} else {
Do not disconnect based on whitelist (@tfa this hasn’t been mentioned anywhere else yet, and was the missing piece of the puzzle for me to reliably bootstrap my pine64 network)
L398-406
- if !self.crust_service.is_peer_whitelisted(&peer_id) {
+ if !self.crust_service.is_peer_whitelisted(&peer_id) && false {
debug!("{:?} Received ConnectSuccess, but {:?} is not whitelisted.",
L1261
- if !client_restriction && !self.crust_service.is_peer_whitelisted(&peer_id) {
+ if !client_restriction && !self.crust_service.is_peer_whitelisted(&peer_id) && false {
warn!("{:?} Client is not whitelisted, so dropping connection.",
src/states/bootstrapping.rs
Fix FailedExternalReachability
L67
- let _ = self.crust_service.start_bootstrap(HashSet::new(), CrustUser::Node);
+ let _ = self.crust_service.start_bootstrap(HashSet::new(), CrustUser::Client);
L133
- let crust_user = if self.client_restriction {
- CrustUser::Client
- } else {
- CrustUser::Node
- };
let _ = self.crust_service
- .start_bootstrap(self.bootstrap_blacklist.clone(), crust_user);
+ .start_bootstrap(self.bootstrap_blacklist.clone(), CrustUser::Client);
src/node.rs
Allow peers on lan
L116
- self.deny_other_local_nodes && crust_service.has_peers_on_lan() {
+ self.deny_other_local_nodes && crust_service.has_peers_on_lan() && false {
crust
In theory this shouldn’t need to be local since there are no modifications, but I found it wouldn’t work without using the local copy.
git checkout 0.22.0
src/lib.rs
remove linting for warnings
and deprecated
L29-L30
- unknown_crate_types, warnings)]
-#![deny(deprecated, improper_ctypes, missing_docs,
+ unknown_crate_types)]
+#![deny(improper_ctypes, missing_docs,
safe_client_libs
Required for safe_launcher
git checkout 0.22.3
Cargo.toml
use local copy of routing
L21
-routing = "~0.28.2"
+routing = { path = "/home/user/maidsafe/routing" }
src/lib.rs
remove linting for warnings
and unused
L29
- unknown_crate_types, warnings)]
+ unknown_crate_types)]
L33
- unknown_lints, unsafe_code, unused, unused_allocation, unused_attributes,
+ unknown_lints, unsafe_code, unused_allocation, unused_attributes,
safe_launcher
git checkout 0.10.2
No code modifications required.
Copy the custom binary libsafe_core generated from safe_client_libs to app/ffi/
demo_app
demo app is v0.6.2 which is in git tag 0.10.1 of safe_examples repo
git checkout 0.10.1
demo_app/config/env_[production|test|development]
Remove upload limits on filesize
L3-L4
- "isFileUploadSizeRestricted": true,
- "maxFileUploadSize": 25000000
+ "isFileUploadSizeRestricted": false,
+ "maxFileUploadSize": 25000000000000