What is Tezos and How to install a Tezos node ?

Tezos is a decentralized blockchain that governs itself by establishing a true digital commonwealth and facilitates formal verification, a technique which mathematically proves the correctness of the code governing transactions and boosts the security of the most sensitive or financially weighted smart contracts.

At the simplest level, It is a decentralized ledger and smart contract platform built on top of the blockchain with consensus mechanism.The main difference from other platform falls in governance, smart contracts, consensus and general philosophy.

Governance – Protocol upgrades are formally proposed and deployed to the blockchain based on the voting of stakeholders. This approach provides a strong incentive to contribute efforts towards core development of the Tezos blockchain and further decentralizes the maintenance of the network.

Smart contracts – Possesses a rich, turing complete, smart contract language which can create covenants around its tokens. The base language, Michelson is statically typed and purely functional and offers maps, sets, lists, cryptographic primitives, and arbitrary precision integers.The language itself looks like a mix between Forth and Lisp and a reference is available here.

Consensus –  Tezos node is launching with a delegated proof-of-stake consensus protocol. It works by letting every stakeholder designate to create blocks and receive rewards randomly and in proportion to their holdings. This means that even a very small holder can have a chance to create a block and receive a reward.Though the system is delegated, every token holder can participate as a delegate regardless of the amount they hold.

[contact_sales title=”Would like to build a blockchain application?” desc=”Get in touch with our expert Blockchain consultants today to know more.” btn_text=”Get Advice” url=”https://accubits.com/contact/”]

How to run the tezos node?

In this tutorial, I’ll show you step by step on how to get started by learning to use the command line to run your own private blockchain for testing.

Prerequisite:

  • Ubuntu 16.04 Virtual Machine
  • Basic experience working on Linux command line

Update Ubuntu installation with the latest packages

sudo apt-get update
sudo apt-get -y upgrade

Install OCaml compiler

Tezos is programmed in OCaml and it is strongly typed & offers a powerful type inference system. So for running the node, we need an OCaml compiler with version 4.0.4 and its dependent libraries.

The best way to install all dependencies is by first installing OPAM, the OCaml package manager.

add-apt-repository ppa:avsm/ppa
apt-get update 

Install OCaml 4.04 version using release package.

wget http://caml.inria.fr/pub/distrib/ocaml-4.04/ocaml-4.04.2.tar.gz
tar -zxvf file_name.tar.gz
cd ocaml_folder_name/
./configure

make install
apt-get install ocaml-native-compilers camlp4-extra opam

Clone Tezos project from GitHub

After the compiler installation, we need to clone the project into the root folder.

git clone https://github.com/tezos/tezos.git
cd tezos/

Create a new switch alias for Tezos and install the dependencies

A switch is the necessary component of the project so it doesn’t conflict with other projects. It’s your own version of the OPAM configuration, including the OCaml compiler, all packages, and package manager configuration related to your project.

opam switch tezos --alias-of 4.04.0
opam init
Activate the new switch:
eval `opam config env`

wget http://launchpadlibrarian.net/283262471/libsodium18_1.0.11-1_amd64.deb;
wget http://launchpadlibrarian.net/283262467/libsodium-dev_1.0.11-1_amd64.deb;
sudo dpkg -i *.deb; 
sudo apt-get -f install; 
Install Tezos dependencies:
make build-deps

Compile the project:

make

It will produce three binaries:

  • tezos-node: the tezos daemon itself;
  • tezos-client: a minimal command-line client;
  • tezos-protocol-compiler: a protocol compiler used for developing a new version of the economic protocol.

Running the Tezos node in sandbox mode

To run a single instance of a node in sandbox mode:

./tezos-node run --sandbox --rpc-addr localhost:8732

References

https://medium.com/tezos/a-quick-tour-of-the-tezos-code-base-and-the-state-of-its-development-c4e5fcb34b8a

[contact_sales title=”Didn’t get what you are looking for ?” desc=”Get in touch with our expert AI consultants today to know more.” btn_text=”Get Advice” url=”https://accubits.com/contact/”]

Written by

Rahul A R

Rahul A R is a technologist and full-stack developer who specializes in Blockchain technologies and Cryptocurrencies. Though he’s worked within numerous privacy and security sectors, Rahul’s recent emphasis has been on solutions built on Ethereum, Tezos, smart contracts, and smart signatures, in particular, decentralized self-sovereign identity. He’s Helped clients, from start-ups to Fortune 500 companies, across North America and Asia, develop their blockchain strategy and build several decentralized applications using blockchains and smart contracts

More from Rahul A R →