maurel

@m.aurel

[Tutorial#1] Tezos Alphanet on Win10

Tezos Client on Windows 10 using the Linux Subsystem the complete Guide

About Tezos

“You can’t build a great building on a weak foundation. You must have a solid foundation if you’re going to have a strong superstructure.” — Gordon B. Hinckley

This quote is not referring to the Tezos Foundation, but to the solid code base that has been build by the Tezos team. As a professional software developer and cryptocurrency investor I´m surprised how Tezos´competitors managed to reach top 20 regarding the market cap with only whitepapers and promises to deliver. So I´ve had a look on their papers and codebase and compared it with Tezos. Only to find out that Tezos is light-years ahead in the development progress, code quality and professional work. Unfortunately the dispute with the foundation, lack of marketing and communication lead to a breach of confidence within the community. I´m really looking forward to the beta and hope that DLS, Tezos foundation and the community can bridge the existing divide.

So this is not a typical “About” chapter, if you are not familiar with Tezos you may have a look on the excellent story written by Linda Xie here.

So what is this story about?

In this story I will give you, as an Windows 10 user, an step-by-step introduction on how you can build the Tezos alphanet client. This story may be the opener in a series of Tezos tutorials which aims for beginners to form your own opinion on Tezos.

#1 Windows Subsystem for Linux and Ubuntu

As far as I know it is not yet possible to run the Tezos client without Linux, so first thing we have to do is to install the Windows Subsystem for Linux to install our distribution (I´ve picked Ubuntu for this tutorial). So follow this instruction to set up the Windows Subsystem and the Ubuntu shell.

#2 Missing packages

After you have successfully installed your Ubuntu shell we will have to install git, OCaml, OPAM and the correct version of libsodium. As this story is also for beginners: Installing missing packages is very easy, as most Linux distributions come up with a package manager that will let you easily do that.

So open up your Ubuntu shell and type in these commands:

sudo apt-get update
sudo apt-get install git -y
sudo apt-get install ocaml -y
sudo apt-get install opam -y

This four lines will install git, the OCaml compiler and the OCaml Package Manager (OPAM). “sudo” will ask you for your password to get the privilege to install the packages and “-y” will suppress the confirmation question.

Before we can clone and build the Tezos client we have to update the libsodium package to a newer version (1.0.11) as stated here.

Depending on your processor architecture please select a corresponding version from here and here. In the tutorial I´ve selected the 64 bit version.

There are several ways to update the lib I´ve done it the following:

wget http://archive.ubuntu.com/ubuntu/pool/main/libs/libsodium/libsodium18_1.0.11-1_amd64.deb
sudo apt install ./libsodium18_1.0.11-1_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/main/libs/libsodium/libsodium-dev_1.0.11-1_amd64.deb
sudo apt install ./libsodium-dev_1.0.11-1_amd64.deb

#3 Get the source

Now that all packages are installed we can clone the source from the alphanet branch.

Note: I want my tezos client under C:\dev\tezos\ so, the following command is optional.

cd /mnt/c/dev

Now we can simply clone from the Tezos repository:

git clone https://gitlab.com/tezos/tezos.git --branch alphanet

#4 Build it!

If you know what you are doing you can now follow the guide here. If you want to continue the step-by-step tutorial continue reading.

You continue reading? Good, now we access the cloned folder and setup OPAM:

cd tezos
opam init
opam update
opam switch "tezos" --alias-of 4.04.2

OPAM init may ask for permission to modify files. Press “y”. While setting up OPAM and compiling you can start reading the Alphanet Introduction by Tezos.

After we set up OPAM, we activate the switch and compile the client:

eval `opam config env`
make build-deps
make

Congratulation you´ve just build the Tezos Alphanet Client on Windows! If you have any problems compiling it, it might be a linker problem regarding the external dependencies. Google the problem maybe there is already a fix for the branch which has not been merged yet.

The next story may be about utilizing the Alphanet. It can be found here.

Addition:

As Andreas Hassmann stated out you can also use Docker instead. You can find an instruction here: http://wiki.tezoscommunity.com/JoinAlphanetWindows

Topics of interest

More Related Stories