Introduction
everyone. It is a pleasure to be a part of the last week in the 5th season of Crypto Academy. This week's lesson covered the Avalanche Blockchain which is a decentralized network that aims at improving scalability and the speed of transaction.
The Ethereum network is known for poor scalability and slow transaction speed which is a problem that the Avalanche blockchain aims at solving. In addition to this, the Avalanche blockchain is compatible with the Ethereum Virtual Machine and this is the reason why Avalanche is termed as the direct rival of Ethereum.
Avalanche blockchain was launched in 2020 by AVA Labs which was created in 2018. The project launched an ICO that raised about $12 million in July 15, 2020 which led to the launch of it's mainnet in September of the same year.
Avalanche has a processing speed of 6,500 TPS. It utilizes a consensus protocol that allows parallel computation between nodes that validates data randomly inorder to validate transactions.
Avalanche utilizes 3 blockchains which are secured on the Primary Network. These blockchains are; X-Chain, P-Chain, and C-Chain.
X-Chain
The X-Chain is the primary blockchain amongst the three Avalanche blockchains. This blockchain uses the Avalanche consensus mechanism to reach consensus in the network. X-Chain stands for Exchange Chain in full.
The X-Chain functions as a decentralized exchange on the Avalanche network where digital assets like the AVAX token can be traded. This chain gives an instance of the Avalanche Virtual Machine (AVM) which rivals the EVM in scalability.
The X-chain makes use of the JSON 2.0 RPC format and developers use AVM.MINT to mint the new smart contract assets. When a transaction is activated in the Avalanche network, the transaction fees are paid with the network's native token, AVAX.
C-Chain
The C-Chain stands for Contract Chain and it is one of the three blockchains in the Avalanche network that allows for the creation of smart contracts. The C-chain uses the snowman consensus mechanism which makes transactions faster and more scalable on the blockchain.
The C-chain offers compatibility with EVM, Ethereum Virtual Machine which allows Ethereum based Dapps to be run on the Avalanche network.
Smart contracts on the C-Chain are created using a strain of codes called the C-Chain API.
P-Chain
The P-Chain stands for Platform Chain. It is the blockchain in the Avalanche network that is responsible for coordinating validators, enabling the creation of new subnets, and tracking of active subnets.
Subnet is a dynamic group of validators that work hand in hand for the specific purpose of achieving consensus in a set of blockchains.
Exploring the Avalanche Network Platform
I opened the Avalanche network using this link. The homepage contains so many characteristics and minor info about the platform. Firstly, I observed two hyperlinks marked with "Build Now" and "Discord". At the top of the homepage are menus which include Developers, Individuals, Avalanche-X, Press, Community, and Contact.
The homepage also contains info on:
what is possible with Avalanche.
news on Avalanche and projects being built on Avalanche. Projects being built on Avalanche include Chainlink, Securitize.io, Trusttoken, etc.
comparison of Avalanche with other blockchains.
solutions that are powered by Avalanche.
Under the "Developer" menu, the following features are identified:
- A titlepage with the caption "Build Ethereum Dapps on Avalanche. Build without Limits".
- Steps on how to build on the platform.
- Reasons to build on the Avalanche platform which include fast transactions and high scalability.
- Avalanche Architecture which explains the three blockchains of the platform.
- What can be built on the platform which includes NFts, Dapps, etc.
Under the "Individuals" menu, the following features are identified.
- A caption that reads "No Future Promises. Avalanche scales today." and a hyperlink that opens a web page which shows all the projects compatible with Avalanche.
- Links to create and access Avalanche wallet.
- Exchanges and wallets that list AVAX token, and some stats on AVAX.
- Link to Avalanche Explorer.
Under "Avalanche-X" menu, the following features are identified.
- Hyperlinks to explore open grants and join the discord server are found on the title page under the caption "Apply for an Avalanche-X Grant and Fund Your Moon Shoot".
- Procedures on how to submit a general proposal and a link to do so.
Under the "Press" menu, the following features are identified.
- News on the Avalanche platform is displayed under this menu.
Under the "Community" menu, the following features are identified.
- Options to join Avalanche Hub and Avalanche social media accounts and pages.
Under the "Contact" menu, the following features are identified.
- Options to send info and receive support from Avalanche is available under this menu.
"Show the last contract verified in the C-Chain network and show the Smart Contract that was generated at that address"
Step 1: Go to the address https://snowtrace.io/ and select "Blockchain" at the top of the page.
Step 2: Click on "Verified Contracts".
Step 3: The last verified contract is the one at the top in the list and it has the contract address 0x339B71805Eb32fB176c4f8f011c2A3d17741A0b8. The contract name is JTP and the compiler is Solidity.
Step 4: Click on the contact address to view more information on the verified contract. The contact creator has the address 0x51a117860cf777502a852698cf610ead2d4e9f814aafe10960dc5c7475bd11a7.
Note
All images are gotten from https://snowtrace.io/
"Explore the last block generated in the C-Chain network"
Go to https://snowtrace.io/ and click on "View Blocks"under the Blockchain menu.
The last block generated is at the top of the list. The block number is 9173388 and it has the hash 0xe438fadfc5bd3903f1dad64c311eb5fec1148208c6cc2807a603ac98aa438ebd.
The time stamp for the block is Jan-05-2022 03:56:47 PM +UTC. It consisted of 10 transactions and the fees burned were approximately 0.055 AVAX. The difficulty for this block is 1 and the block size is 2,820 bytes. The gas used in this block has a value of 1,883,978 (23.55%).
Note
All images are gotten from https://snowtrace.io/
Avalanche Consensus Protocol
The Avalanche consensus protocol is the consensus mechanism that is utilized by the Avalanche network by making use of random probability to minimize the errors that can occur in the process of block validation.
Let's take an illustration where a gathering of people are asked to choose between sausages or eggs for breakfast. If the majority chooses eggs, then the individual who asked the question would be made to think that eggs are a better option because that's what the majority wants. Similarly, if the majority picks eggs, an individual who is unable to make a choice would be more likely to adopt the majority's preference.
The Avalanche consensus protocol works in a similar fashion in the form of Directed Acrylic Graph (DAG). Transactions are validated by a voting process where validators are made to vote for or against the process. The majority vote is accepted as consensus is reached in the network.
An individual validator can even ask other validators on their opinion in a voting session. After seeking their opinion, the validator would be likely to follow suit by making the same decision as they did. This is how consensus is reached in the network.
Snowman Consensus Protocol
The Snowman Protocol is a high performance and orderly protocol that is utilized for linear chains. It is powered by the Avalanche consensus protocol and is a good protocol for smart contracts.
The Snowman Protocol functions as the Avalanche protocol but it utilizes linear nodes because C-Chain and P-Chain required absolute ordering for consensus to be reached.
Instead of of Directed Acrylic Graph (DAG), we have a blockchain which is processed and managed by the linear nodes in the network.
Conclusion
The Avalanche Network Blockchain was created by Ava Labs and it uses 3 blockchains for its operation. These three blockchains are the X-Chain, C-Chain and P-Chain.
Avalanche aims at improving transaction speed and scalability which has been the major problem for the Ethereum blockchain. It is known as the direct rival of Ethereum because of its compatibility with the EVM.
The Avalanche platform has seen a number of successes in such a short amount of time since it's creation. With much more to offer, we can only wait and see just how far the platform would go in its growth and development.
Cc: @pelon53