Avalanche Blockchain - Crypto Academy / S5W8 - Homework post for pelon53.

pelon53 week 8 s5.png

Hey guys,

I welcome you'll to the 8th week of the SteemitCryptoAcademy course by Professor @pelon53 . In this course, I will run a comprehensive review on Avalanche Blockchain..

All images used in this post unless otherwise stated are not mine and were extracted from Avax Network, snowtrace, for the purpose of this assignment.

Question 1

Explain X-Chain, C-Chain, and P- chain in detail

Untitled-902.gif

The avalanche blockchain is a unique ecosystem that runs on three individual network systems, that is, the avalanche blockchain itself is made up of three other distinct networks which are responsible for the different activities of the blockchain as a whole. These include the X-chain, C-chain, and P-chain, in this segment I will explain in detail what they are.

X-CHAIN

The X-chain is the first chain on the avalanche blockchain and it simply means the exchange chain, it is on the X-chain that users can create assets on the avalanche blockchain and also exchange or trade avalanche token (AVAX) with other digital assets. The X-chain has its own address (that begins with ‘X’) and it is this address that we use to send and also receive AVAX token from any other exchange platform or wallet into our own wallet and vice versa. The X-chain is the dedicated network that is used to send, receive and store the AVAX token first before such tokens are then used for specific tasks such as staking or smart contracts execution. The X-chain is built on the Avalanche consensus mechanism.

C-CHAIN

This is the second network on the avalanche blockchain, the C-chain means contract chain as it handles every blockchain operation that has to do with smart contracts creation and execution. Users can utilize the C-chain to build their smart contracts, NFTs, and various decentralized applications (Dapps) on the avalanche network. The C-chain is an EVM compliant chain, this means that it uses the Ethereum Virtual Machine to build its smart contracts and Dapps. As such, existing Dapps, NFTS, and smart contracts on the Ethereum network can be easily bridged or migrated onto the avalanche blockchain to enjoy its scalability and speed without having to be recreated afresh, while also maintaining their Erc-20 characteristics, this makes it easier for existing DeFi platform owners and developers to migrate to the avalanche blockchain system for better speed and scalability, the C-chain address starts with (ox) the same as Ethereum. The C-chain uses the “snowman consensus protocol” to operate, the snowman consensus protocol will be discussed later on in this presentation.

P-CHAIN

The platform chain is the third chain on the avalanche blockchain, the P-chain is the default subnet on the avalanche blockchain that keeps track of the activities of the network validators and co-ordinates their actions, the P-chain being the default subnet, manages all other subnet on the network, the other subnets as well also validates the P-chain hence creating a truly decentralised ecosystem. The P-chain is responsible for coordinating staking activities among validating nodes and operates with the snowman consensus mechanism also.

Untitled-902.gif

Question 2

** Explore the Avax Network platform. Screenshots required.**

Untitled-902.gif

Having looked at the various blockchain linked to the avalanche network, I will take us on a brief tour of the avax network platform, where we will explore the various components of the platform with the aid of screenshots.

At first, we visit the avax network platform website which is http://www.avax.network, we are greeted with the homepage which looks like this.

image.png

On the homepage, we see the qualities that make the avalanche network exceptional, boldly displayed. The high speed, low transaction cost, and the eco-friendly nature of the blockchain, at the top of the page, highlighted in the black box are the different sections of the website, where a user can use to interact and learn more about the avax network.

When I clicked on the ‘Developers’ section, it took me to another section of the site, with an interface like the one below

image.png

On this developer platform, we can observe various links with which a developer can start building their new products or even bridge their existing ones from Ethereum to avax network, there is the option to ‘run a validator’, or even ‘mint a new token’. Also, the various advantage a user stands to get for migrating to the avax network is highlighted. Such as its reliable security, fast rate of the transaction, high scalability, and the ease of bridging Ethereum apps, amongst others.

Returning to the homepage, when we scroll further down, we come across a section that compares the avax network to other existing blockchain networks such as Bitcoin, Ethereum, and the famous Polkadot network, in this section we see how Avalanche network beats all of them hands down.

image.png

In the comparison table above, Avalanche network has a faster transaction throughput of 4,500 transactions being completed per second, also a lesser finality time of just 2 seconds, it is also more energy-efficient and utilizes more validators. These facts help to further show the strength and innovation of the avax network in the blockchain world.

Scrolling down through the website, we come to a section where the blockchain solutions that avax has to offer are clearly spelled out for the user to see and appreciate, also the various ways the network can be used in the DeFi space, and ways various institutions and government bodies can adopt the avax network is also spelled out. Going through this section will help us to better appreciate the innovation that the avax network is bringing to the crypto space.

image.png

  • Finally we arrive at the end of the homepage

image.png

Here, the various social media avalanche communities are listed with their links and below it, are links to the different sections of the website. Also, I observed there is a heart-warming endnote which I highlight with the black box, it says “made with love for builders everywhere”.

Untitled-902.gif

Question 3

Show the last verified contract in the C-Chain network and show the Smart Contract that was generated at that address. Screenshots required.

Untitled-902.gif

We can explore the C-chain network by using the Snowtrace block explorer upon which the C-chain runs. We click the snowtrace link which takes us to the explorer website shown below.

image.png

  • On the site we observe a lot of information being displayed about ongoing activities on the network, I moved my mouse to the blockchain and a list of the available options dropped down since I am tasked with showing us the last verified contract, I will be clicking on the “verified contracts” link, highlighted in the black box.

image.png

  • This takes us to the verified contacts page, where the most recent smart contracts created on the C-chain are displayed, with their addresses, names, and other details, because we are here to explore the most recent smart contract verified on the avax network, I will click on the first smart contract on the list with the name “stakinghelper”.

image.png

  • On the next page displayed, we can see details of the smart contract that was generated with that address, in the box highlighted, the contract source code is marked as verified which shows the smart contract has been verified by the avax network. Also, details of the smart contract such as the balance of avax token present in the smart contract which is currently zero, its name, compiler version, and other settings can be seen, also the contract creator address can be seen and further investigation about the creator address can be carried out by clicking on the address. In the black circle is the “read contract” where details of the smart contract generated can be read and further explored. I will click on it to see what it entails.

image.png

Clicking on the read contract, the next page shows two different aspects of the smart contract which are the normal exchange of token transactions recorded in the “Time” address and the staking activities on the smart contract recorded in the “Staking” session.

With this we have seen the last recorded contract that was verified on the C-chain blockchain and the smart contract that was generated from it, also we have seen the transaction and staking activities that happen on the smart contract.

Untitled-902.gif

Question 4

Explore the last block generated in the C-Chain network. Screenshots required.

Untitled-902.gif

Earlier, we discussed how the C-chain is used to create smart contracts and also carry out transactions on the avax network, when a transaction occurs on a blockchain they are recorded in “blocks” which are immutable after their finality. We will now be exploring the recent block of transactions generated on the C-chain. First, we go to the page through snowtrace.io

image.png

  • On the homepage we place our mouse on the blockchain link and select the ‘view blocks’ option from the drop-down list. The next page that comes up shows us the latest blocks that are being generated on the avax network

image.png

The latest block generated in the network was created about 7 seconds ago, (as at the time of writing this task), and here we can see details about the block such as;

  • Block number: this is the number the block occupies in the whole blocks generated so far on the C-chain network which is 9208250

  • Age: this shows how long the block has been in existence and when it was created, the latest block was created just 7 seconds ago.

  • Txn: shows the amount of transaction that is present in the block, the highlighted block contains 17 transactions each.

  • Hash: this is the cryptic address with which the block created can be identified.

  • Gas: here we see the gas limit and the gas used for creating the transaction, the gas limit is the maximum amount of gas that can be used to create a block, the gas limit is usually 8,000,000 for this particular block we see the C-chain used 1,799,029 which is about 22.5% of the total limit, which is quite conservative.

  • Burned Avax: on the avax network, the gas fee for transactions are paid with the avax token (which is the native token of the blockchain), however a unique feature of the avax network is that all gas fees in form of avax token are automatically burned, this helps to continuously reduce the total supply and also increase the token price value. For this block transaction, the total avax generated and burned is 0.0560822365 AVAX.

When we click on the block additional information about the block generated can be seen also.

image.png

Details about the transaction block are spelled out here clearly, which we have looked at already. However, additional information about the block is available in the “click to see more” link highlighted with the black box. When we click on this we are shown the next set of the information below.

image.png

Here additional information about the block is shown, and details such as the hash, the parent hash (which is the block from which this current one is generated), nonce, and others also.

Untitled-902.gif

Question 5

Explain in detail the Avalanche consensus protocol and the Snowman consensus protocol.

Untitled-902.gif

Having explained the various networks on the avalanche blockchain, also we explored the latest blocks and contracts formed on the C-chain, we will now be discussed in detail the Avalanche Consensus protocol and the Snowman Consensus Protocol, which are the two basic consensus protocols on which the Avax network is built and operates with. First, we must understand that a consensus protocol is a unique approach the nodes on the network employ to communicate and reach an agreement or consensus about the transactions that are performed, it is when a consensus is reached that a transaction block is formed. Therefore, it is very important for a blockchain to find an efficient and effective way of going about this amongst its nodes.

The Avax network, uses two main protocols which will be explained in detail below.

AVALANCHE CONSENSUS PROTOCOL

The avalanche consensus protocol is birthed from the classical consensus protocol and the Nakamoto consensus protocol that Bitcoin runs on, it is deemed as the perfect offspring of both consensus ideas because it combines the strength of both protocols while eliminating the inherent weaknesses found in them to create a unique, highly scalable and fast protocol that the blockchain world has never seen before, indeed it is the next big thing.

Delving into the technicalities of the avalanche consensus protocol, we see that the protocol operates through a repeated voting system to arrive at consensus amongst its validators, for instance in a room full of validators that have to arrive at an agreement about a particular transaction, the protocol starts by first selecting a sample of the available validators ask for their votes and achieve consensus among the first when an agreement is reached among the first sub-group the process is then spread to the rest of the validators present and repeated among them so that at the end of the day consensus is achieved among the whole validating group and finality of the transacting block is reached.

However, in the case that a particular sub-group is in conflict and an agreement cannot be reached, then honest validators will come around such set of nodes and create a feedback loop till a consensus is invariably reached among the validators. This way there is a high probability that every transaction will eventually reach finality with the avalanche protocol.]

Untitled-902.gif

STAGES OF OPERATION
Avalanche consensus protocol follows four main stages before it achieves consensus, these protocol designs are;
SLUSH: the slush is the first stage of the consensus operation, the avalanche model is made up of a lot of nodes, each one of these nodes is classified based on certain colors that represent three states ‘neutral’, ‘true’, and ‘false’. Each node is started without a color or in a neutral state, it is then faced with a transaction where it will have to vote whether the transaction is true or false, each decision carries a specific color, once the decision is made by the node the nodes then assume the color of the decision and then goes ahead to query a sampled number of other random nodes around it if the nodes queried are without a color that is they are in a neutral state, they will automatically assume the decision of the initial node that queried them along with its color. Also if the majority of the nodes being queried already have a color or decision that is different from the initial node, the initial node will flip to their color or change its decision to theirs, however, if the majority of the nodes have the same color or decision like the initial node then the initial node will stay the same. Multiple rounds of querying will keep occurring till every node is on the same color or has made the same decision, hence arriving at a consensus. This is the first part of the avalanche protocol.

Untitled-902.gif

SNOWFLAKE: this is the second part of the protocol that augments the slush process, it does this by acting as a sort of counter that ticks when a slush query returns with the same color or decision and it resets when the node flips its color or changes its decision. When the counter reaches a high enough number, it will lock in and no longer flip with further slush queries, the snowflake acts as a timer to the slush query process and its locking mechanism signals the end of the query process. The snowflake memory is short and only lasts till the nodes flip to another color or the snowflake locks in at its maximum count.

Untitled-902.gif

SNOWBALL

This is the third part of the consensus protocol, snowball builds on snowflake effort by adding a state of confidence to the node, snowball has a confidence counter which has a long memory and changes its color or decision based on the confidence of past queries, rather than based on the colors of each node, this means the snowball changes it color based on the confidence assigned to each query and not just on their colors alone. This leads to the fourth process avalanche.

AVALANCHE
This is the fourth and final stage of the protocol where all the processes are tied up. Here, the confirmed transaction is birthed into a data structure as a block and becomes a verified transaction on the blockchain.

Untitled-902.gif

UNIQUE FEATURES OF AVALANCHE CONSENSUS PROTOCOL

Having looked at the inner workings of the avalanche consensus protocol we will now look at the characteristics that make it unique and relevant in today’s blockchain world, we will look at five of such features.

Decentralization: one key feature of the avalanche protocol that makes it powerful is its decentralization model, it has been termed ‘super-decentralized’ by some blockchain experts because of its permission-less and leader-less nature, the avalanche protocol does not need a leader to coordinate blockchain activities among the validating nodes, as each node automatically conform to the system playing its own part and there is no leader that can restrict or kick out any participating validator neither can they be denied entry to join the process, so far the general entry criteria has been meet. This is unlike the classical consensus protocols where there is always a leader or a group of leaders that regulate the activities of the network and the system can end up becoming like an oligarchy where a few rules the many.

Quick Finality: the avalanche network is one of the fastest blockchain networks out there in terms of the finality rate. Finality is the speed with which consensus is achieved among the voting participants on a network. The avalanche network achieves a finality of approximately 2 seconds, this is the fastest any protocol has been able to achieve in blockchain technology.

High Throughput: the avalanche network is a transaction beast, built to carry out a high amount of transactions that other blockchains can only dream about. Avalanche protocol can carry up to 1000-10000 transaction per second, this is amazing because very few blockchains comes close to this feat. The avalanche protocol transaction capability has positioned it for implementation in the mainstream finance sector. As it is capable of high loads of transactions with an infinitesimal low margin of error.

High Scalability: avalanche network also solves a major blockchain problem which is high scalability, the avalanche network can easily scale up its capacity to accommodate high transactions without experiencing lag or delay that other blockchains like Ethereum experience whenever the transaction traffic is high, the avalanche network can scale up anywhere from 10 thousand nodes to as high as 10 million nodes functioning at the same time, and creating transaction blocks without any lag or delay. Indeed the avalanche consensus protocol is the all-around answer to all of blockchain’s dilemmas.

Green And Eco-friendly: based on the world’s need to cut down on the environmentally harmful energy sources we currently use, the avalanche consensus protocol is a viable alternative to the proof of work protocol that Bitcoin uses. According to available data, Bitcoin mining process consumes half of all the world’s data centers energy at the moment, and it keeps increasing as more nodes join the network. This is unsustainable and has been a huge turnoff for potential investors and governments' adoption of cryptocurrency. However, the avalanche consensus protocol is a certain game-changer, in that validators do not need mining equipment to become a node in the network, only a certain amount of avax token has to be staked on the network to guarantee entry into the system and the whole process can be easily carried out from a cell phone.

Untitled-902.gif

SNOWMAN CONSENSUS PROTOCOL

The snowman consensus protocol is the second protocol of the avax network, while the avalanche protocol runs the transactions that occur on the X-chain, the snowman protocol is the blockchain upon which the C-chain and P-chain are built. Basically, the snowman protocol runs the activity of the C-chain and P-chain. The snowman consensus protocol is basically the same as the already explained avalanche consensus protocol, and they have the same characteristics in the way they work and the advantages they offer to the blockchain world. Howbeit, the snowman consensus protocol differs slightly in the way it operates to create new blocks.

Snowman protocol functions in a linear pattern unlike the avalanche protocol which functions with a parallel line of block creation and computation, so while the avalanche consensus uses a DAG (Directed Acrylic Graph) to create its blocks, the snowman protocol uses a liner vertical model for the sequential ordering of its transaction blocks, this means while the avalanche protocol with the DAG model is good for carrying out transactions on the X-chain, it cannot be used to create smart contracts, hence the modification that births the snowman consensus protocol. The snowman protocol uses a vertical sequential ordering of blocks that allows for the creation of smart contracts and the implementation of other Ethereum based Dapps. The snowman consensus protocol shares the same characteristics and advantages as the avalanche consensus protocol also.

Untitled-902.gif

CONCLUSION

Untitled-902.gif

It has indeed been a splendid season of learning on the Steemit Crypto Academy and especially in the classes organised by professor @pelon53 where I have learnt different aspect of the crypto currency world. In this session I have learnt about the Avalanche blockchain, and the consensus protocol it works with, I also explored the avax network platform and explored the latest block and contract created on the avalanche blockchain.

In the process of writing this task I came across a lot of materials that helped my knowledge about the avax network, also the lecture helped to introduce me to the subject as it was succinct and on point. Thank you very much for your time and effort in imparting us with adequate knowledge such as this, I wish you a prosperous new year ahead.

Untitled-902.gif

*Special thanks to Professor @pelon53 *

Untitled-902.gif

Sort:  
Loading...
 3 years ago 

Wow you wrote excellently bro, nice one

Coin Marketplace

STEEM 0.21
TRX 0.20
JST 0.033
BTC 97309.89
ETH 3288.22
USDT 1.00
SBD 2.99