Tezos Dev Guide | All you need to know

Dibyo Majumder
Jan 10 · 8 min read

What's the difference that is the main point when you look around a vast variety of Blockchain Platforms. You have a lot of options for developing Decentralized applications aka dApps. But you need to choose the correct one tallying with the specifications you want to have in your dApp specifically transaction throughput, the stability of the network and trusted Quorum.

This article will give you an intuition on why and when to use Tezos as your Dapp development network. An overview of the technology stack that will make you familiar with this blockchain protocol.

Structured as :

Difference / Uniqueness / Difference From Ethereum / Common Jargons / Resources for further reading & Forums to reach out

How it is different?

Since this is a developer guide, most of the audience are developers and with the boom of Blockchain technology, it's obvious that devs know about the big players in the game like Ethereum and Bitcoin, so comparison based explanation will be a better approach to know the uniqueness of Tezos and why it is growing exponentially in this blockchain ecosystem.

These are the few things that make tezos different from other dApp development networks. But there are other tradeoffs that are to be considered when you select a network.

I will walk through all the unique features one by one and let's see how we can make a difference!

Self-Amendment and Upgradability

Tezos can upgrade itself through an in-protocol amendment process without the need for a hard fork. This is in order to accelerate innovation, reduce the likelihood of contentious splits, and coordinate stakeholders within one network over a long period of time.

The amendment process can be broken into four discrete periods: the Proposal Period, the Exploration or “Testing” Vote Period, the Testing Period, and the Promotion Vote Period. Each of these four periods lasts eight baking cycles (i.e. 32,768 blocks or roughly 22 days, 21 hours), comprising almost exactly three months from proposal to activation.

The Tezos amendment process begins with the , during which bakers can submit proposals on-chain via the proposal operation, which takes “source”, “period” and “proposals hash” as parameters. The “source” is the baker who submits the proposal operation, the “period” specifies the specific proposal period in which the proposal was submitted, and the “proposals hash” is the hash of the tarball of concatenated .ml/.mli source files. Bakers may submit up to 20 proposals in each Proposal Period. When submitting a proposal, the baker is also submitting a vote for that proposal, equivalent to the number of rolls in its staking balance at the start of the period.

When the proposal period ends the network counts the proposal votes and the most voted proposal goes for the Exploration Vote Period.

In the , bakers may vote on the top-ranked proposal from the previous Proposal Period.

As in the Proposal Period, a baker’s vote is based on the number of rolls in its staking balance at the beginning of the Exploration Vote Period. Each baker may send a ballot operation only once during the voting period.

At the end of eight cycles, the network counts the votes. If voting participation meets the quorum (explained below) and an 80% supermajority of non-abstaining bakers approves, the proposal proceeds to the Testing Period.

If a proposal is approved by a supermajority in the Exploration Vote Period, the begins with a testnet fork that runs parallel to the main Tezos chain for 48 hours before terminating. This 48-hour constant has been set conservatively in order to reduce the risk of the network perceiving the testnet fork as the main chain.

The purpose of the Testing period is to check if it is running in a predicted manner and if it is worth an upgrade. In this phase, the testnet behavior is closely observed and allows the stakeholders to evaluate the network.

Liquid Proof-of-Stake

Consensus Algorithms one of the responsible factors which bring the network latency as well as a singularity in the distributed network. Liquid PoS aims to maintain a dynamic validator set, facilitating token holder coordination and accountable governance.

Tezos holds decentralization, coordination, and security as core priorities over scaling immediately and throughput (currently ~40 tps).

Faster block validation and finality without wastage of a large amount of computing power helps to reach a higher transaction throughput. This is one of the key features facilitating the dApp development for better UX.

Smart Contract Security and Formal Verification

Tezos and its smart contract language Michelson is made keeping security in mind. Made in a way that is less error-prone and has the capability to do immensely powerful operations and execute in Michelson.

Formal verification allows developers to mathematically prove that code performs correctly, according to its formal specification or certain properties. This is well-suited to financial smart contracts “ Knock Knock — A use case ” representing significant real-world value (e.g. tokenized assets, loans, etc.), which require guarantees that funds will not be lost or frozen due to bugs in the code.

This gives support to the financial institutions to adopt blockchain technologies and use smart-contracts for their automatization that too with the proof of safety.


The State Machine: Michelson!

Michelson is a low-level, stack-based, Turing complete programming language that boosts security. It was designed to facilitate formal verification, allowing users to prove the properties of their contracts. One of the key features of Michelson is its code is not compiled to anything,

Using a higher-level bytecode also simplifies the process of proving properties about the compiled output. Programs written in Michelson can be reasonably analyzed by SMT ( Satisfiability Modulo Theories ) solvers and formalized in ( will be explained ) without the need for more complicated techniques like separation logic.

One main advantage of Tezos is that the system is amendable. We want to start with a small core language in which we are confident and add features as good use cases are created for them.

As a whole, it provides an abstract platform for business logic, to provide a readable bytecode, and to be introspectable.

Let’s Bake!

The recipe for baking, not Cakes

You may wonder, why I am pushing cooking instructions in between an article. Well, it's important!

Baking in Tezos is how blocks are produced and validated on the Tezos blockchain.

No, it's not called mining here we blocks to add it in the Blockchain. To bake blocks, you need to take part in the Tezos Proof-of-stake system, which requires a minimum of 8,000 XTZ. The more XTZ you own, the higher your chances are at baking blocks and earning baking rewards.

You can doand earn the rewards directly but you need technical knowledge and a proper infrastructure running 24/7 in addition to 8000 XTZ that's a whole lot amount which will be locked while staking.

If someone does not have 8,000 XTZ or does not want to set up computing infrastructure to bake blocks, they may delegate their coins to a baker (aka “delegate”). Delegating lets coin holders (i.e. “delegators”) “lend” their coins to a baker (i.e. a “delegate”), giving the baker a higher probability of being selected to bake and endorse blocks. In practice, bakers usually share the additional revenue generated from the delegated tokens with the coin holder.

https://medium.com/tqtezos/lifecycle-of-an-operation-in-tezos-248c51038ec2

The difference from ethereum!

This part is the hot pick of the whole article where you came to know what are the difference and

  • In ethereum whenever you feel the need to upgrade the protocol hard-fork is needed and you can’t propose for the same. It's a long process and can be only done by a set of authorities. Yes, tezos comes with self-amendment backed by a voting process. Update Proposal can be raised by any network participant.
  • Ethereum Virtual Machine aka EVM runs bytecode which is not introspectable whereas Tezos Virtual Machine runs Michelson’s readable bytecode. It improves the debugging process.
  • Ethereum currently works on PoW consensus algorithm which has less transaction throughput and Tezos has LPoS as their consensus algorithm which has a larger gain of transaction throughput.
  • Tezos is designed for facilitating DeFi, writing more secure smart-contracts and Formal Verification methods which removes the risk of token burning and loss hence it can be used for designing financial contracts in the blockchain.
  • In Tezos you can code in your native programming language like python using SmartPy and JavaScript using Fi whereas in Ethereum you have to write code in their language like Solidity, Vyper & LLL. All the language specified are Turing complete and all Turing complete languages can be transpiled into one another

Something more you need to know: jargons used in this Blocked universe of tezos!

Implicit and Originated Accounts

In regards to baking, implicit accounts are the accounts that can participate in the baking process. An implicit account can bake with its own coins as well as the coins delegated by other people.

Originated accounts cannot bake directly, but can delegate their coins to an implicit account. Originated accounts use their manager key to specify a delegate key, allowing them to select a delegate to represent their stake in consensus.

Zero-Knowledge proof

Zero-Knowledge Proofs (ZKPs) allow data to be verified without revealing that data. They, therefore, have the potential to revolutionize the way data is collected, used and transacted with.

Each transaction has a ‘verifier’ and a ‘prover’. In a transaction using ZKPs, the prover attempts to prove something to the verifier without telling the verifier anything else about that thing.

deals with the security and anonymity with an upgrade of applying ZKP.

GADT

GADT stands for Generalized Algebraic Data Types. GADTs allow OCaml developers to describe rich relations between data constructors and the types they inhabit. Currently, the Michelson language uses GADT (Generalized Algebraic Data Types) for formal verification of types.

CoQ: Formal Proof Assistance

Coq is a formal proof management system. It provides a formal language to write mathematical definitions, executable algorithms and theorems together with an environment for semi-interactive development of machine-checked proofs.

Through a vernacular language of commands, Coq allows one to:

  • define functions or predicates that can be evaluated efficiently
  • state mathematical theorems and software specifications
  • interactively develop formal proofs of these theorems

This repository is a formalization of Michelson using the Coq interactive theorem prover: https://framagit.org/rafoo/michelson-coq.


Resources!

Tezos Wikipedia: learn.tqtezos.com

tezos.stackexchange.com/

Please visit: tezos.com/get-started/

https://tezos.com/

https://tzstats.com/

http://tezblock.io/

https://teztracker.everstake.one/mainnet

https://mininax.cryptonomic.tech/mainnet

https://tzkt.io/

https://kukai.app/

https://tezbox.com/

https://trustwallet.com/

https://edge.app/

https://magnumwallet.co/

https://atomicwallet.io/tezos-wallet

https://www.ledger.com/

https://trezor.io/

https://t.me/TezosNotifierBot

https://www.tezos.help/

https://mytezosbaker.com/

https://baking-bad.org/

https://www.tezos-nodes.com/

https://t.me/TezosAnnouncements

Tezsure

Tezsure is an innovative insurance marketplace built on Tezos blockchain and powered by AI

Dibyo Majumder

Written by

Blockchain Dev Intern | Lead @ DSC RNSIT | Cloud Study Jam Facilitator | Building DeFi

Tezsure

Tezsure

Tezsure is an innovative insurance marketplace built on Tezos blockchain and powered by AI

More From Medium

More on Blockchain from Tezsure

Related reads

Related reads

Kate Sills
Jun 5, 2018 · 8 min read

1.8K

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade