Tezos 101
A few weeks ago, I started exploring Tezos, a self amending Blockchain which is unique in its own way. I’ve tried to jot down my leanings via this blog. (Suggestions and corrections welcomed!)
What is Tezos all about?
According to the Tezos website,
Tezos is a new Decentralized Blockchain that governs itself by establishing a true digital commonwealth.
A commonwealth is a group that chooses to be linked together because of their shared goals and interests. Tezos enables the token holders to make decisions and govern the platform.
Tezos uses an agonistic native-middleware called “network shell” which alows the developement of modular style self amending ledger. A generic Blockchain protocol is made of three layers,
- Network protocol
- Transaction protocol
- Consensus protocol
While in Tezos, the last two layers are interlinked and is known as the “Blockchain protocol”. The network shell that was previously mentioned facilitates the communication between the network protocol and the Blockchain protocol.
Another thing to remember is that Tezos has two types of accounts,
- Implicit
- Explicit.
Now what do they mean? Implicit accounts are the accounts that can participate in the baking process either with their own coins or with the delegated coins. While the explicit or originated accounts can’t bake directly, ergo delegate their coins to an implicit account and use their manager key to specify a delegate key which allows them to select a delegate to represent their stake in consensus.
Did I say baking, as in baking cookies?
In Tezos there is no mining, instead there is what we call as baking and people who bake are called as bakers.
Baking is what Tezos refers to as the action of signing and publishing a new block in the chain.
So how exactly is Tezos different?
- Self-Amendment and Upgradability
Tezos doesn’t need a hard-fork! It upgrades itself via in-protocol amendment process. The amendment process has four phases: 1. Proposal Period 2. Exploration or Testing Vote Period 3. Testing Period 4. Promotion Vote Period Each of these four periods lasts eight baking cycles, which is around 22 days or approximately around 32,800 block cycles.
Proposal Period, is where the bakers submit proposals on-chain. This takes around 1–8 cycles. Each baker may submit up to 20 proposals in each of the Proposal Period. While the bakers submit a proposal, they also submit a vote for that proposal.
Exploration Vote Period, the bakers vote on the top-ranked proposal from the previous Proposal Period. We need to note that 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. This period lasts for about 8 cycles.
Testing period is where the proposal that is approval with a super majority from the previous phase is considered and the phase starts by forking the testnet which runs parallel to the Tezos mainnet for about 48hrs before it terminates. Why this time frame? Because this forked testnet should not be disregarded as the mainnet. The stakeholders take a decision on closely observing this phase. This is also for 8 cycles. Promotion Phase is where bakers can vote to promote the testnet chain to the mainnet. This is also for 8 cycles. - LPoS (Liquid Proof of Stake)
This truly distinguishes Tezos from the rest. LPoS, unlike DPoS (Delegated Proof of Stake) doesn’t impose any rule on selecting the delegates, The participants have the right to do what they truly want. Tezos is a liquid proof of stake system meaning, it one to stake a certain number of Tezos token to participate in the consensus over the Blockchain. As said earlier this process of staking Tezos tokens i.e XTZ is called baking. Also the bakers can delegate their validation rights to other token holders without transferring ownership. - Smart Contracts and Formal Verification
Tezos has been coded using OCaml. The smart contract that will run on Tezos will be created using Michelson. Michelson is a strongly typed, stack-based language. It is a functional language that provides formal verification.
Formal verification essentially allows developers to mathematically prove the correctness of their smart contract code. Formal verification proves that some properties of the contract will be maintained, but does not necessarily mean that the code is 100% correct.
For example in Ethereum, the smart contracts written (either in solidity or viper) are generally converted into EVM Bytecode and later executed in the Ethereum Virtual Machine. In Tezos, this is not the norm. The Michelson code itself gets to run in the Tezos VM.
Overall Tezos is an intrusive project that is kind of over shadowed. Hoping to see Tezos and Ethereum co-existing in the near future. Happy Baking!