Client built, what next?

I finally got the client to build from github, & I don’t know what the next steps are. I imagine I’ll have to create an init script so it starts at boot. No idea what that should contain. It’s installed to a headless server- Ubuntu 14.04 LTS.

Could use some guidance.

Thanks.
-N

The code is in a state of transition and I think you are assuming it is usable as a network, when that is coming but not the state right now. I think you need to take more time to understand where we are and what is possible, which you can do by reading the last few weeks weekly “Developer Updates” (see the Development category).

Follow these, and also note there are some individual posts on building and trying out specific libraries such as CRUST and self_encryption (see Development | Tutorials), and once you’ve done those you’ll find it easy to do the same with maidsafe_vault and maidsafe_client (which I did yesterday - though both are still incomplete and being changed every day).

Note that this is all using Rust, not C++, so you need to make sure you are working only with the Rust versions and following the build instructions for those. Where you can’t find explicit build instructions, look in the travis.yml file in each folder which is used to prepare the build environment and carry out the build under automated testing (CI).

5 Likes

So I built the wrong one? Bummer, I was feeling great that it finally built.

I should probably wait awhile longer for the beta before I try to help out, I’m mostly lost when navigating the software.

It was a major accomplishment for me to get the wrong one to work- I’m not especially good at this stuff- I rely heavily on instructions I find here & there.

Thanks for taking the time to reply to my post. :smile:

4 Likes

Well, I think you are still deserving of feeling achievement! I’m sorry for not acknowledging that. And take heart, building the new libraries isn’t as hard, unless you’re on ARM, ahem, @Ross :wink: (I’ll be in trouble now) and once you’ve done one the others are more straight forward.

[I’m sorry @Ross, you are my hero really. If I can help by all means throw a task at me, though I reserve the right to stare back blankly and say, “eh?”]

Back to building the libs… If it helps, I’ll commit to helping you when you get stuck, but if you prefer to wait for the installers which will make it real easy for everyone, no problem.

I know what you mean by being lost around the codebase, there’s very little in the way of comment in the code for me, but with Rust even this is improving as the documentation, and tests, and examples, are all being created automatically from the same source files. The github readmes have also been made more informative with well maintained to-do lists for each library, and it’s also possible to follow individual libraries more closely by watching the changes in github and Jira.

I have started to make headway here too, and even managed to submit a pull request in which I had added a comment (just graffiti, but I documented the process on the forum so anyone should be able to join in with code changes by following what I did).

There’s still a lot to get your head around to get set up with Rust (editor, syntax highlighting, Rust syntax, Rust std libraries etc), but I’ve done much leg work so can point you in the right direction, help sort out snags etc.

Don’t be afraid to ask for help in this forum. That is one of its most important functions. If people don’t respond, it’s just cos those with the knowledge are busy, not because it’s inappropriate. Before you know it though, you’ll be the one with knowledge and helping others :). I needed a lot of help from the MaidSafe team and community, most of it on here.

I suggest you start with one of the tutorial links I posted if you fancy having a try.

4 Likes

i take it when you said the wrong one you built the c++ ones. Those are archived. For the Rust one getting started is even simpler. Here are the steps:
<1> Install Rust (latest nightly perhaps) : something like $ curl -s https://static.rust-lang.org/rustup.sh | sh -s -- --channel=nightly if you are on linux should do the trick. More authentic information is here.
<2> Install git (again on linux something along the lines of sudo apt-get install git depending on distro).
<3> With those two out of the way you are almost done :smiley: … just clone the repository (maidsafe_client in this case)
<4> cargo run --example self_authentication_with_mock_routing should give you a CLI to play around with self-auth.

Repeat <3> for any maidsafe libraries you want to play with - just look into examples/ directory and tweak <4> according to the name of the example you want to see demoed.

Hope that’s helpful. Do ask questions if you have any problems regarding this getting started. Once that’s figured it’s all about tracking changes/progress :smile:

6 Likes

Thank you for these excellent instructions - I just built and tested self-auth. Now to try some of the other libraries…
The move to rust has simplified things a lot for those like me who were unsure about messing with c++. I could make it work but lacked any real clue about what was really happening.
Can you post further instructions as to how we can contribute to the continous integration, please?

2 Likes

glad those were useful !

Depending on how much you want to dive in, any or all of these would be very helpful indeed:
<1> Every crate/library has an Issue section in GitHub. Since the code could change, the examples may not reflect the changes and be outdated for a while, though unit test cases will have been updated (changes are not accepted if they break unit tests). If you find this happening, you can flag an issue and the crate maintainer would hopefully converse with you there to resolve it.
<2> If you find any issue in general with the existing code-base (in master branch) in concordance with the sprint objectives, you can flag it as an issue too. The TODO points are written for all crates if you scroll down the repository page.
<3> Much more helpful if you can make/suggest changes in the form of a Pull Request for issues you flagged in <1> & <2> above - Do make sure all existing unit tests either pass or are updated and any new code has new tests written and passing.

If the issue raised ties directly to a Jira Task Id for the sprint then that will help the task assignee to incorporate your points into development too if it fits into the realms of current sprint.

3 Likes

Thank you,
What is best practice for keeping libraries up-to date?
Something like…
git pull
cargo clean
cargo update
cargo build
cargo test
cargo run --example

I just had a failure with the latest crust but I’m wondering if the procedure I followed above is incorrect before I raise an issue.
This is on Centos 7 that worked OK 2 days ago. I will try the same upgrade on Ubuntu shortly.

or should I be doing something else?

Some of those ought to be redundant, the only thing I can see that you might need is to keep your rust compiler updated - nightly build at the moment.

Don’t forget, some crates won’t build because of a regular snafu. I think self encryption has failed for me the last couple of days.

3 Likes

On Ubuntu 15.04 64bit I reinstalled the latest nightly rust, deleted the entire crust dir and git cloned it again,
THen I ran ldconfig - to ensure libsodium is picked up - dunno if that is strictly necessary
cargo build
cargo clean - a mistake - that is not req’d
cargo test
which gave me http://pastebin.com/ajJMaKVb
the error msgs are

test connection_manager::test::network … ignored
test getifaddrs::test::test_getifaddrs … ok
thread ‘ConnectionManager beacon acceptor’ panicked at ‘Could not open bootstrap file due to No such file or directory (os error 2)’, src/bootstrap.rs:229
test tcp_connections::test::test_multiple_nodes_small_stream … ok
test tcp_connections::test::test_small_stream … ok
test test::check_rust_unit_testing_is_not_parallel … FAILED

However src/bootstrap DOES exist

willie@gagarin:~/projects/MaidSafe/crust$ ls -l src/bootstrap.rs
-rw-rw-r-- 1 willie willie 12547 Jun 10 12:22 src/bootstrap.rs
and AFAICS is in the correct place.

Well despite the alleged failures,
cargo run --example crust_peer
seems to run OK on several instances across my PC and laptop.

1 Like

@Southside try RUST_TEST_TASKS=1 RUST_TEST_THREADS=1 cargo test
which will change again when this is merged > Removed unneccessary check for `RUST_TEST_TASKS` env var. This varia… by Fraser999 · Pull Request #126 · maidsafe-archive/crust · GitHub
Hope this helps and great to see folk getting stuck in :smiley:

1 Like

willie@gagarin:~/projects/MaidSafe/crust$ RUST_TEST_TASKS=1 RUST_TEST_THREADS=1 cargo test
Running target/debug/crust-8a5584626d8ef8b0

running 13 tests
test beacon::test::test_avoid_beacon … ok
test beacon::test::test_beacon … ok
test bootstrap::test::bootstrap_crude_test … ok
test bootstrap::test::serialisation … ok
test connection_manager::test::bootstrap … NOTE: Transport connect [::1]:54912 failure due to Connection refused (os error 111)
ok
test connection_manager::test::connection_manager … ok
test connection_manager::test::connection_manager_start … ok
test connection_manager::test::network … ignored
test getifaddrs::test::test_getifaddrs … ok
test tcp_connections::test::test_multiple_nodes_small_stream … ok
test tcp_connections::test::test_small_stream … ok
test test::check_rust_unit_testing_is_not_parallel … ok
test transport::test::test_ord … ok

test result: ok. 12 passed; 0 failed; 1 ignored; 0 measured

Doc-tests crust

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured

1 Like

In other news, maidsafe_client failed on Ubuntu 15.04 64-bit with the latest git.
Full output at this paste

failures:
client::test::account_login
client::test::hybrid_encryption_decryption
client::test::root_dir_id_creation
client::user_account::test::encryption
nfs::helper::directory_helper::test::get_dir_listing
nfs::helper::directory_helper::test::update_and_versioning
nfs::helper::file_helper::test::create_read_update

test result: FAILED. 13 passed; 7 failed; 0 ignored; 0 measured

thread ‘’ panicked at ‘Some tests failed’, /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libtest/lib.rs:255

However I see there have been multiple recent updates, I have only updated
rust
crust
routing
maidsafe_client

so there may be inter-dependencies giving me false failures.
Can someone confirm if this is likely?
I dont want to be posting daft failures if I am not testing correctly…

1 Like

I have no access to a machine to verify --release just now, however I did re-run the CI which builds in debug and it looks ok > Travis CI - Test and Deploy with Confidence
Dependencies are managed in crates this is a good read > http://siciarz.net/24-days-rust-cargo-and-cratesio/

As I said I am unable to confirm this just now - I see from above you quite rightly did

git pull
cargo clean
cargo update
cargo build
cargo test

Did you follow these steps this time?

1 Like

Errr no,

just
git pull
cargo build
cargo test
cargo test --release

I’l give it the full bhoona and report back shortly.
Thanks for the dependencies link _ I’ll have a read at that /

OK I followed this workflow

git pull
cargo clean
cargo update
cargo build
cargo test
cargo test --release

I get the same failures as reported above.
I had been thinkng I should script this so I have a repeatable process. I’ll get on with that now so I iterate across each subdir in maidsafe (one per library) and do the same actions in each and log it all to one output.

Or then again, it might make more sense to explore Travis… It’s totally new to me.

idk, i just checked repeatedly and all unit tests (20) pass for me. There has been a change in routing crate though that will cause build failure of client if you happen to run cargo update for client as of now. That will hopefully be sorted today as it requires all 3 maintainers (routing, client and types) to be in sync, since the change done seems to have an impact spanning multiple crates. Will get back once there is a resolution. Also it will definitely re-trigger the CI builds and then we can verify if the tests are passing on all 3 platforms. Thanks !

Ah i’m sorry - it indeed fails in release build for whatever seems to use rust-crypto library. I have put it as an issue in the Issues section in github for maidsafe-client here . Once sorted i’ll update the Issues section. Will however perhaps be involved in the cross-crate change i mentioned above first - otherwise crates wont compile - and also few other things first. So you can continue with the debug builds in the mean time.

Thanks a ton ! :smile:

4 Likes

Cheers Spandan :smile:
Thanks @Southside we will add --release testing to our CI workflow.

3 Likes

Cool - I’ll try again later.
Rereading my posts, I realise I inadvertently mislead you due to my own inexperience. When I used “dependencies” I should have made it clear I really meant inter-relationships between the crates rather than the more correct use of dependencies of each crate on external libraries.
So I’ll wait until I see change in routing, client and types before possibly leading you on a false chase.

3 Likes