What is Cortina and why is it important for Avalanche?
If you are a fan of Avalanche, the open-source platform for launching decentralized applications and enterprise blockchain deployments, you might have heard of Cortina, the latest network upgrade that will bring significant improvements to the platform. But what exactly is Cortina and why is it important for Avalanche? In this article, we will explain what Cortina is, how it will affect the X-Chain, and what benefits it will bring to the Avalanche ecosystem. 🚀
What is Cortina?
Cortina is the name of the upcoming network upgrade for Avalanche, which will activate on March 30th, 2023. Cortina will introduce several protocol optimizations that are not compatible with previous versions of AvalancheGo, the software that runs the Avalanche nodes. Therefore, node operators will need to upgrade their software to AvalancheGo v1.10.0 before the activation time. If they don't, their nodes will be marked as offline and they may lose their staking rewards. 😱
Cortina will also migrate the X-Chain, the exchange chain that handles the creation and exchange of digital assets on Avalanche, to run Snowman++ consensus and operate as a totally-ordered blockchain in a process called “linearization”. This means that the X-Chain will no longer use a DAG (directed acyclic graph) structure, but a linear chain of blocks, similar to the C-Chain and the P-Chain. This change will enable new features and integrations for the X-Chain, such as Avalanche Warp Messaging (AWM), complex transactions, state syncing, and broad exchange support. 🙌
How will Cortina affect the X-Chain?
The X-Chain is one of the three chains that form the primary network of Avalanche, along with the C-Chain (the contract chain that supports smart contracts and EVM compatibility) and the P-Chain (the platform chain that coordinates validators and creates subnets). The X-Chain is responsible for creating and transferring digital assets on Avalanche, such as AVAX, ERC-20 tokens, NFTs, stablecoins, etc. The X-Chain currently runs Avalanche Consensus, a leaderless, DAG-based protocol that allows for high-throughput and low-latency transactions without establishing a total ordering of activity. 🚀
However, the existing semantics of the X-Chain also prevent or complicate some features and integrations that would benefit the Avalanche ecosystem. For example:
- The X-Chain cannot interact with subnets (custom blockchains that run on top of Avalanche) because it cannot verify the BLS multi-signature of incoming messages from other subnets using AWM.
- The X-Chain cannot support complex transactions that modify shared on-chain state, such as exchanges or multisig wallets.
- The X-Chain cannot enable state syncing to the tip of the network without re-processing all historical activity.
- The X-Chain cannot be easily integrated by many legacy exchanges that are designed for totally-ordered blockchains such as Bitcoin and Ethereum.
Cortina will solve these issues by migrating the X-Chain to run Snowman++ consensus and operate as a totally-ordered blockchain in a process called “linearization”. Snowman++ is a chain-based protocol that sequences conflict-free block production without time-based slots over thousands of participants. It is already used by the C-Chain, the P-Chain, and all subnets on Avalanche. By using Snowman++, the X-Chain will be able to:
- Interact with subnets using AWM and enable cross-chain communication.
- Support novel transaction types that modify shared X-Chain state.
- Enable state syncing to join the network faster.
- Enable exchanges to support the X-Chain and its tokens.
Linearization will not affect the transaction format or the APIs used on the X-Chain, so most wallets will not need to make any changes. However, explorers will need to migrate to parsing X-Chain blocks instead of vertices (the containers for batching transactions on the X-Chain). Linearization will also be seamless and should not result in any downtime on the other chains or subnets. The X-Chain will only be briefly inaccessible during the migration process. 😎
What is Avalanche Warp Messaging (AWM)?
Avalanche Warp Messaging (AWM) is a new feature that enables native communication between any two blockchains running on different subnets on Avalanche. AWM allows for the passing and verifying of arbitrary messages, such as transfers, contract data, or any other information, without the need for a bridge. AWM is compatible with both subnets and elastic subnets, which are dynamic subnets that can scale up or down depending on the demand. 🚀
AWM works by using BLS multi-signatures, a cryptographic scheme that allows a group of validators to collectively sign a message with a single signature that can be verified by anyone who knows the public keys of the validators. AWM leverages the fact that all subnet validators must also validate the primary network via the P-Chain, which means they can access the stake weights and registered BLS public keys of any other subnet at any time. This way, subnets can communicate with each other without having to periodically update each other about changes in their validator sets. 😎
AWM is available today in both the Golang and Rust VM SDKs for use by any VM builder. Soon, this capability will be rolled out to the subnet-evm, which is a pre-built VM that supports EVM compatibility and smart contracts on subnets. This will enable subnet creators to have native cross-chain communication capabilities out-of-the-box. AWM is expected to unleash a wave of innovation and interoperability in the Avalanche ecosystem, as more developers and projects launch their own custom blockchains on subnets. 🙌
What are some use cases for AWM?
AWM opens up a world of possibilities for cross-chain communication and collaboration on Avalanche. Here are some examples of how AWM can be used:
- DeFi protocols can use AWM to exchange tokens and data between subnets, creating a more diverse and liquid market.
- Gaming platforms can use AWM to create cross-game assets and experiences that span multiple subnets.
- Enterprise deployments can use AWM to share information and transactions between different permissioned subnets.
- Social networks can use AWM to create decentralized identity and reputation systems across subnets.
- Data providers can use AWM to offer data feeds and oracles to subnets that need them.
One of the first projects to use AWM is DeFi Kingdoms, a gamified DeFi platform that combines yield farming, NFTs, and RPG elements. DeFi Kingdoms launched its own subnet on Avalanche called Kingdom Studios, which runs its own blockchain and token called JEWEL. Using AWM, DeFi Kingdoms can interact with other DeFi and gaming protocols built on other Avalanche subnets, creating a rich and immersive on-chain experience for its players. 🎮
How can I get started with AWM?
If you are interested in building your own blockchain on a subnet and using AWM to communicate with other subnets, you will need to use one of the VM SDKs provided by Avalanche. You can choose between Golang or Rust, depending on your preference and expertise. You will also need to stake AVAX tokens on the P-Chain to create your subnet and register your validators. You can find more details and tutorials on how to do this on the Avalanche documentation site. 📚
If you are not a developer but still want to explore the possibilities of AWM, you can check out some of the projects that are already using it or plan to use it in the future. For example, you can visit DeFi Kingdoms and see how they integrate their own subnet with other subnets using AWM. You can also join their Discord server and chat with their community and developers. You can also follow Avalanche on Twitter and Medium to stay updated on the latest news and announcements about AWM and other features. 📣
The Bottom Line
Cortina is a major network upgrade for Avalanche that will bring significant improvements to the platform, especially for the X-Chain. By migrating the X-Chain to run Snowman++ consensus and operate as a totally-ordered blockchain, Cortina will enable new features and integrations for the X-Chain, such as AWM, complex transactions, state syncing, and broad exchange support. 🚀
Cortina: X-Chain Linearization