IoTeX Mainnet Preview (Photon) Release
Hello IoTeX community! Since our last code release in August, the IoTeX team has made great strides in research, proofs of concept, and community growth. Most importantly, we have made incredible progress on technical development and are one step closer to our goal of building the most secure, usable, and performant blockchain platform in the entire industry. Today, we are proud to launch our fourth code release — Mainnet Preview “Photon” — which includes exciting new features that preview our full-feature Mainnet Alpha launch in Q1 2019:
- Sub-chain provisioning: support of two independent blockchains (root chain, sub-chain), running on separate databases in the IoTeX network
- Cross-chain communication: ability to transfer value from root chain to sub-chain, with IoTeX Wallet support across both chains
- Consensus enhancements: performance enhancements to Roll-DPoS (1,000+ TPS & 100+ node tests), and new security improvements
- IoTeX Explorer v2.0: separate IoTeX Explorer pages to visualize both root chain and sub-chain activities
- And much more!
You can see the open source code on our Github now.
Official Go implementation of the IoTeX protocol. Contribute to iotexproject/iotex-core development by creating an…
Why “Photon”? — Kenneth Lane Thompson
Photon is named after Kenneth Thompson (Photon is composed of letters from “Thompson”), following the trend of naming IoTeX’s code releases after pioneers of computer science. Earlier this month, we gave our community the chance to propose and vote for the Mainnet Preview codename. We received over 12,600 submissions and out of five finalists, Photon was the unanimous winner with 27% of total votes. Thanks to all who participated! We will announce the full winner list soon tomorrow!
Kenneth Thompson is an American computer science pioneer. He is best known for inventing several programming languages (e.g., Go, B) and operating systems (e.g., Unix) and received the Turing Award in 1983. As you may know, the IoTeX blockchain is coded in Go (co-invented by Thompson) — naming this release “Photon” is a tribute to Thompson’s work, which provides the building blocks for IoTeX to innovate today.
Photon Overview & Features
In Photon, we preview some new technological concepts that will be fully deployed in our Mainnet Alpha release in Q1 2019. IoTeX’s goal is to create a blockchain that can support all types of Internet of Things (IoT) use cases — smart cities, supply chain, wearables, autonomous vehicles, and more. Although they share common requirements (i.e., scalability, privacy, IoT device support), each use case is unique and requires a tailored approach to optimize performance and security. To accommodate this diversity, IoTeX’s utilizes a root chain / sub-chains architecture that will allow developers to create custom sub-chains using the design that best suits their DApps. Applications will seamlessly exchange value / data with other applications via cross-chain communication. This is our vision for the future of IoT — a vibrant ecosystem of fit-for-purpose and interoperable sub-chains powered by IoTeX.
Over the past two months, we have developed several in-house innovations which bring us closer to our vision for the future of IoT. The core features of Photon, which we detail in the following sections, include sub-chain provisioning, cross-chain communication, consensus (Roll-DPoS) enhancements, and IoTeX Explorer v2.0. Through exhaustive code reviews / “quality weeks”, we have greatly enhanced the stability of our smart contracts, wallet, and existing code base. Finally, we have rigorously tested the IoTeX Testnet and have achieved 1,000+ TPS (with instant finality) and successfully deployed 100+ nodes using Kubernetes. The full list of Photon features and enhancements is shown below:
Sub-chain Provisioning and Management
The root chain / sub-chain architecture is a core part of IoTeX’s blockchain design, allowing any user to create their own sub-chains with the architecture, programming language, and even consensus mechanism that best suits its purpose. For example, a privacy-focused sub-chain would benefit from a Mimblewimble architecture, while a sub-chain requiring higher throughput may utilize bigger blocks. Not only do sub-chains add flexibility for developers, but they also add scalability. You can think of sub-chains as separate blockchains running in parallel, where activity on one sub-chain does not affect throughput on other sub-chains. Their states (i.e., history of transactions) are periodically synced to the root chain, which records the state of the entire IoTeX network. With the ability to add unlimited sub-chains, the IoTeX network is practically infinitely scalable.
In Photon, we introduce our FIRST root chain / sub-chain pair, which are separate, homogeneous blockchains running on separate databases. They share some P2P networks but are otherwise independent, meaning transactions on the root chain and sub-chain are logged on separate ledgers and each will produce blocks in parallel. While sub-chains are flexible and customizable, the root chain is more rigid and performs specific roles. In the IoTeX network, one of the roles of the root chain is to record the state of each sub-chain at various points in time (blocks), which is detailed in the following diagram.
Every block of a sub-chain contains various types of transactions, including token / data transfers and smart contract executions. As with every blockchain, a block is produced and verified (“mined”) after the max block gas limit is reached. In addition, the digest of transactions of the sub-chain is recorded on the root chain for every new block created. This is accomplished by reporting a hash root (aka Hash ID in the diagram above) of the Merkle tree of transactions every time a sub-chain block is mined; put simply, a Merkle tree is a hierarchical representation of the history of a blockchain’s transactions at a certain point in time. Every new block will have a unique Merkle tree and therefore a unique Hash ID, which is sent to the root chain as a proof of what happened on the sub-chain since the last block.
Root chain transactions consist of votes for delegates, cross-chain transfers of value / data (described in the next section), and Hash IDs of various sub-chain blocks, which represent snapshots of transaction history of all sub-chains in the IoTeX network. As shown in the figure above, Block 3 of the root chain contains several cross-chain transactions (i.e., Hash ID (cross-chain)) as well as the Hash IDs of several sub-chain blocks (i.e., A, B, C, X-2, X-3). “X-2” is the state of sub-chain X-2 after its second block, “X-3” is the state of the sub-chain after its third block, and the state of sub-chains A, B, and C are also recorded. Depending on the amount of transactions generated on a sub-chain (i.e., the rate at which it produces new blocks), multiple Hash IDs of sub-chain blocks can be stored in the same root chain block.
The end result is massive scalability. With a normal blockchain architecture, all of sub-chain X’s transactions would be stored individually on the root chain. With IoTeX’s architecture, we can effectively store an entire sub-chain block as a single transaction on the root chain, enabling “100-to-1” scalability. With the ability to add unlimited number of parallel processing sub-chains, the IoTeX network will be able to support billions of IoT devices in the future.
Cross-chain Communication (CCC)
Cross-chain communication, which enables interoperability across blockchains, is a widely researched topic in the blockchain industry. Projects such as Polkadot, Cosmos, and Aion have varying approaches to building an interoperable network of blockchains. This concept of interoperable blockchains (i.e., IoTeX sub-chains) is a core component of our vision for the future of IoT. Today, IoT devices and companies operating on various cloud-based platforms (e.g., AWS, Google, Azure) cannot exchange data, which greatly restricts the value and capabilities of IoT. Enabling interoperability between unique and complex IoT industries is a core focus of IoTeX, which is why our upfront design decisions are centered around support of heterogeneous sub-chains and cross-chain communication.
In Photon, we preview cross-chain communication capabilities between the root chain and sub-chain, which are independent blockchains. Over the past months, we have researched and developed building blocks to enable two-way transfers of data and value (i.e., tokens) between root chain / sub-chains — we plan to release research papers in the coming weeks and fully deploy cross-chain communication in our Mainnet Alpha launch. For our Photon release, we preview some of these building blocks:
- Token deposits from root chain to sub-chain: transfer EIOTX tokens between independent blockchains (i.e., root chain and sub-chain) via an Explorer API call
- Upgraded IoTeX Wallet: utilize a single wallet for both root chain and sub-chain (i.e., different account addresses, same private key), with separate token balances
Creating a root chain wallet
Creating a sub-chain wallet
Record your sub-chain wallet public key
You can preview these features and test the deposit function in the new IoTeX Wallet now. Step-by-step instructions to create your own root chain and sub-chain wallet are provided above, and you can find a demo in our Photon overview video. In the coming weeks, we will launch several community reward programs to allow our community to further test this functionality and explore our root chain / sub-chains architecture.
Wallet - IoTeX
Back up your private key because you will use it to access your wallet. If you lose your private key, it cannot be…
Roll-DPoS Consensus Upgrades
In addition to adding new features, Photon also enhances the performance and security of our in-house Roll-DPoS consensus mechanism. On the performance side, we reduced block production time (i.e., latency) by 30% from 10 to 7 seconds. We also implemented time-based delegate rotation, which automatically replaces an inactive block producer with an active delegate after a configurable time limit. On the security side, we implemented distributed key generation, a major security improvement to dual key generation that was implemented in Testnet Beta “Epik”.
Thanks to several code quality sprints the IoTeX Testnet has greatly increased in stability, which has allowed us to push the boundaries of our Testnet. In a staging environment, we were able to achieve some amazing results — more than 1,000 TPS, 1 second latency, and support of 100 delegates. By the time of our Mainnet Alpha launch in Q1 2019, we expect to achieve our current peak performance results with full stability.
IoTeX Explorer v2.0
To visualize the blockchain activity of both the root chain and sub-chain, which are separate blockchains, we added an Explorer for both the root chain and the sub-chain. As our existing followers know, we recently open sourced the IoTeX Explorer to allow our community to create their own Explorers and monitor blockchain activities.
As shown above, the root chain Explorer shows the entire history of the following types of transactions: votes for delegates, cross-chain transfers of value / data, and Hash IDs representing the history of sub-chain blocks. As Roll-DPoS voting and block production is performed on the root chain, the globe graphic in the root chain Explorer visualizes which of the 22 candidates have been chosen to produce and verify blocks for the current epoch. The current Testnet uses 22 candidates, which means the network can tolerate up to 7 malicious nodes (note: PBFT can tolerate X attackers when having 3X + 1 total nodes).
As shown above, the sub-chain Explorer is similar to the root chain Explorer. However, given that voting only occurs on the root chain, the sub-chain Explorer only contains two types of transactions: transfers of value / data and smart contract executions. The other components (i.e., # of blocks, # of epochs, IFTPS, BBH) are all the same as the root chain Explorer. We encourage you to make your own cross-chain transactions between root chain and sub-chain, and locate the corresponding block / transaction ID in the root chain and sub-chain Explorers.
What can we expect in the coming months?
Photon marks the final version of the IoTeX Testnet — the countdown to our Mainnet Alpha launch in Q1 2019 has officially begun! Mainnet Alpha will be IoTeX’s biggest milestone yet, as it represents our formal transition from Testnet to Mainnet. To prepare for this important transition, the next few months will be action-packed across technical development, protocol / governance design, and thought leadership. Some exciting things to look out for over the next few months include:
- Development of new features, including privacy-enabled sub-chains and hardware
- Software development kits (SDKs) and documentation to start a Testnet node
- Fully open Testnet, where users can validate transactions, build decentralized applications (DApps), and explore the IoTeX network first-hand
- Block Producer (BP) Election Program details will be shared
- Bug bounties targeted at hackers / developers
- Research papers on sub-chains, cross-chain communication, and Roll-DPoS
- Community rewards programs to test features and promote IoTeX
- Proofs of concept and demos showcasing IoTeX in action
- And more…
Thank you to our loyal community for your continued support — we feel more inspired than ever to turn our vision of a blockchain & IoT-powered world into reality. We are one step closer to “connecting the physical world, block by block”!
Code Contributions — We Want Your Help!
The iotex-core project is open source and licensed under the Apache License 2.0. Contributions to help IoTeX reach its full potential (e.g., style/bug fixes, feature recommendations, proposals for schemes/algorithms, documentation help) are all welcomed and greatly appreciated. For code contributions, please refer to our Contribution Guidelines for more information. To report issues, please file an issue on our Github page.
Subscribe to IoTeX’s Official Channels
To learn more about IoTeX or to discuss technical aspects of our project, feel free to connect with us through any of our official channels below:
Website & Newsletter: https://iotex.io/
Telegram Announcement Channel: https://t.me/iotexchannel
Telegram Group: https://t.me/IoTeXGroup
Join us: https://iotex.io/careers
IoTeX is the world’s first privacy-centric blockchain platform that is fast, flexible, and Internet of Things (IoT) friendly. IoTeX’s global team is comprised of Ph.Ds in Cryptography, Distributed Systems, and Machine Learning, top tier engineers, and experienced ecosystem builders. Designed and optimized for IoT, IoTeX uses state-of-the-art privacy, consensus, and subchain innovations to capture the full potential of IoT. By enabling trusted data, interoperability, and M2M automation, IoTeX connects the physical and digital worlds and brings trusted machine economies to the masses.