Cardano decentralization continues: insights into our P2P deployment

Stake pools will soon be able to test automated peer-to-peer connections

11 May 2021 Marcin Szamotulski 5 mins read

Decentralization of the Cardano network is key to ensuring its long-term sustainability, resilience, and independence from centralized governing entities. Now that block production is fully decentralized, our next focus is on developing our decentralized stake pool operator (SPO) ecosystem to build reliable and effective connections between distributed nodes.

Giving the power to validate blocks and transactions to stake pool operators requires enhancements to the network software. The activation of the peer-to-peer (P2P) governor, along with the deployment of the connection manager, enabled the release of a private P2P testnet in late April. We are now assessing this engineering testnet before deploying a semi-public P2P testnet for a group of invited SPOs to help us test and tune.

In the P2P governor post, we discussed the network’s architecture and the interaction between mini protocols and the components that enable direct and automated communication between nodes. Here, we assess how the connectivity model has matured to enable automated peer connectivity and reflect on the results of the private testnet launch.

Evolution of network connectivity

When Cardano was launched, the Byron network connectivity model operated in a federated state. In that setting, IOHK maintained core and relay nodes that connected to about 200 other relays (Figure 1).

Figure 1. Byron federated network structure

With the launch of Shelley last year, Cardano started functioning in a hybrid setting. This allowed stake pools to construct their P2P network manually by connecting to core and relay nodes and also to the seven federated relays that helped maintain the network during this transitional phase (Figure 2).

Figure 2. Shelley’s initial hybrid network structure

Since March, block production has been entirely decentralized, with stake pools following manual topologies for P2P connections. This means that SPOs have been using a list of relay nodes registered across the globe to generate their configuration for connections with other peers. To provide better efficiency, it is essential to enable automated node communication without reliance on IO-run relay nodes. Thus, the networking team is now deploying the automated P2P code, which will allow pool operators to create and run a more decentralized network.

In this way, once the P2P mainnet is deployed, Cardano will be maintained solely by community-run nodes (Figure 3).

Figure 3. Final network structure with automated node communication

P2P testnet and node communication

The first stage in the P2P rollout was the launch of the private P2P testnet last month. This has been used to test the basic capabilities of the components:

  • P2P governor: manages hot, warm, and cold sets of peers and ensures that the node meets the target number of each type of peer.
  • Connection manager: creates outbound connections or registers inbound connections, tracks their state, and allows full-duplex TCP connections to be reused.
  • Server: accepts connections and performs dynamic rate limiting.
  • Inbound protocol governor: responsible for running and tracking the state of the inbound connection side. This includes tracking the state of each remote peer (cold, warm, or hot) and the state of each inbound mini-protocol.

The P2P system was deployed in a private environment and tested between eight nodes that connected to the mainnet and established communication with active SPO relay nodes; these further connected to other relays and block-producing nodes. The system enabled nodes to discover stake pool relays using the on-chain stake pool registry, which includes the DNS name or IP address of each relay.

Test results show that the nodes could arbitrarily select peers for communication, including those from the mainnet. The use of an ‘upstream’ metric enabled the discarding of the worst-performing peers and random selection of new peers for connection. This policy has been demonstrated in large-scale simulations (10,000 nodes), providing close-to-optimal results. In the live testing, the team saw many iterations of the optimization procedure. The team also observed that a range of peer connections occurred – with both nearby and far-away peers from different locations, which was inherent to all the eight nodes run in different parts of the world.

The networking and DevOps teams are now working together to improve the testnet environment, so all SPOs invited to the semi-public testnet can establish direct peer connections. This includes work on feature enhancements and testing processes to deliver the most efficient results. Thus, to introduce new targets for local root peers, the team is finalizing the tests for such related features as targets for known, established, and active peers.

We will be soon launching the semi-public P2P testnet, with the support of a small group of SPO partners to help with initial testing, before broadening this out to the wider SPO community. As ever, early feedback and ideas from our community are central to test, iterate, and improve processes as we progress towards a fully automated and decentralized P2P architecture for the Cardano mainnet.

Additional contributions from Karl Knutsson, Duncan Coutts, Neil Davies, Prashanti Naik, and Olga Hryniuk.

Runtime Verification & IELE – from interoperability to universality

KEVM and IELE will bring unparalleled levels of security, scalability and programmability to Cardano

10 May 2021 Alex Hamilton 4 mins read

 Runtime Verification & IELE – from interoperability to universality

Professor Grigore Rosu, President and CEO of start-up Runtime Verification (RV) joined us on March's edition of the Cardano360 show to share ideas and discuss the collaboration between RV and IOHK.

Our professional relationship with Grigore and RV started back in 2017, and Grigore’s credentials speak for themselves (in any language). He’s worked for NASA, DARPA, Microsoft, and has taught at the University of Illinois Urbana-Champaign, to name but a few achievements.

Grigore is also credited with the creation of the K Framework, which has been described as ‘software that simply cannot afford to fail.' Developed over 15 years, the framework’s primary purpose is to enhance security. We’ll get into this in more detail later, but first, a short history lesson.

When it comes to smart contracts, the Ethereum Virtual Machine (EVM) set many early standards, for example the creation of the ubiquitous ERC-20 smart contracts, written in Solidity. However, this system isn’t flawless. Smart contracts have known coding vulnerabilities that have caused security issues. 

IELE: Unparalleled security, scalability, and programmability

Since late 2020, Cardano developers have had a bridge to the Solidity/Ethereum community via the K Ethereum Virtual Machine (KEVM), an implementation of the EVM specified in the K framework, which allows developers to use the formal verification tools that K produces to check a contract's correctness. 

IELE takes things a step further. As discussed by Rosu on March’s Cardano360 show, IELE (named after a faerie-like creature of Romanian myth) is a virtual machine that executes smart contracts, and also provides a human-readable language for blockchain developers. IELE was designed with formal methods in mind to address security and correctness concerns inherent in writing Solidity smart contracts targeting Ethereum, easing the path to heightened levels of security, scalability, and programmability. 

IELE resembles the intermediate representation of the LLVM compiler. This enables drawing on the wealth of knowledge available in the LLVM community, specifically, the work that has gone into writing safe and effective compiler optimization passes over LLVM IR. Much of the effort put into the LLVM compiler can be ported to the IELE optimizer as well.

About LLVM

When IELE is implemented (Rosu indicated that an initial proof of concept would be available for testing around six months from now), the opportunity for development will be even wider. IELE operates more like a passport than a virtual machine, opening the doors – if not the floodgates – to a wealth of new and unique talent. Some developers may have once dismissed the idea of entering the blockchain space, as it would likely have meant learning an entirely new programming language. As a direct result of RV’s innovative approach, any developer wanting to get involved in smart contracts can write them in a language they are comfortable with, including Solidity. The resulting output would run successfully on any IELE-powered blockchain, irrespective of the source language.

What does this mean for Cardano?

This achievement will offer developers and businesses yet another incentive to migrate from Ethereum and participate in the Cardano blockchain. Openness, inclusivity, and interoperability are the foundations upon which Cardano was built. Our philosophy is – and always has been – to welcome developers from all backgrounds, to ensure Cardano’s steady evolution. Rosu has bold plans. 'IELE is the crown jewel of our research over the past decade,' he says. 'It’s the maximum you can hope for on a universal framework.'

Final thoughts

IOHK’s partnership with RV demonstrates a commitment to innovation, and to opening Cardano to as wide a development community as possible. The KEVM/IELE implementation will expand Cardano’s reach and interoperability by creating novel avenues of cooperation that will lead to the exploration of new ideas, concepts, and technological developments in the context of a ‘correct by construction’ environment. 

You can read more from Alex at Cardano community site Adapulse.

The essential Cardano list - a new resource for the community

Introducing a new central source for all things Cardano-related

30 April 2021 Niamh Ahern 4 mins read

The essential Cardano list - a new resource for the community

Today sees the publication of the Essential Cardano list – a new GitHub repository which will help you to find out everything you need to know about Cardano. Whether you want to understand what Cardano is and who our partners are, learn about our mission and roadmap, or get stuck in and build on Cardano, this is the place to start.

Inspired by GitHub's well known Awesome lists, the Essential Cardano list provides an outline of our thriving ecosystem, as well as a comprehensive list of resources to help you learn more and get started. As it grows and expands, this new list aims to become the canonical source of material for Cardano, including both official resources and community-generated materials. We are now looking for our community members to help us extend it even more by contributing their suggestions.

A central location of essential resources

We want to have a central location for all things Cardano, to bring everything together and make it easy for people to find what they need. We have provided links to all official sites, channels, and resources, as well as to a collection of material such as explainers, guides, developer resources, glossaries, primers, tutorials, and much more.

On top of that, we have identified assets developed by the community which we think provide great value and complement our own content that we produce. Our aim is that our community will now help us to grow it out and make it even better.

Navigate the Cardano ecosystem

Essential Cardano provides an outline of all the core entities, partner groups, and facets that are part of our growing ecosystem to help orientate you to understand all the existing and new relationships that are being developed.

Initially, our focus has been on curating links and references to what’s going on within our growing ecosystem. As we update the list, or additions are made by community members, the list will also grow. We also plan to add additional visual elements including infographics and ecosystem maps over time. We have included an existing ecosystem map which is currently being refreshed by our team to reflect new relationships and partnerships we have formed recently. We plan to release a May version of this map very soon, so if you would like to help us get this up to date as soon as possible, go ahead and raise a pull request with your suggestion!

We have also included all the Project Catalyst startups that currently exist so you can understand some of what is being planned for future development.

How do I contribute?

We are looking for you to help us to grow out and evolve this essential Cardano list. This list is fully open source so if you know of new content that is being produced by members of the community, new relationships that are not included, or new innovations, please let us know so that we can add them all to this list and promote them. The easiest way to do this is to raise a pull request on the repository. We’ll evaluate these regularly and provide feedback within each pull request.

Growing this list

2021 is already a very active year for growth and engagement on Cardano. Following on from yesterday's exciting announcements about our vision for Africa, and with upcoming smart contracts and other new products on the way, we expect lots of new and exciting additions. We have already included some contributions from our active Plutus Pioneers course, which are very welcome, and we anticipate many more users, developers, and enterprises jumping on board in the coming months. We are happy to see the new Cardano Q & A Stack Exchange being developed and would encourage our community members to submit their questions to help build this out. Stay tuned for announcements and updates here on our blog, social channels, and within the Essential Cardano repository itself.

Identity is the key to our vision for Africa

Decentralization and using blockchain to address real-world issues will help deliver a new future for the continent

28 April 2021 Charles Hoskinson 7 mins read

Identity is the key to our vision for Africa

Yesterday, in the #CardanoAfrica show, we laid out our bold vision for the continent – and how we’re delivering on it. Here’s how we introduced this very special event

I started Input Output in February of 2015 with a dream – to deliver economic identity to the billions of people around the world who do not have any control over their own lives. 

The reality is that people live in two different configurations; one for developed countries and one for the developing. For most people like me in the developed world, there are many things we take for granted. The fact is that it's easy for us to have an identity, passports, driving licenses. It's easy for us to travel. It's easy for us to prove our credit worthiness and get credentials. It's easy for us to borrow money, get insurance, and to process payments. For example, if someone does a service for you, you can send them something in seconds using a banking app or a mobile payment service such as Venmo. You can send them a PayPal transaction. We take this for granted and, for the most part, it's part of our daily lives.

But when you live in the developing world, things are very different. It's very difficult to globalize. It's difficult to prove claims, whether you're producing something with fair trade or in a sustainable way. It's difficult for people to receive money and send money. Remittance transactions carry a fee amounting to between 8% and 15% of the value of the transfer. When a person wants to borrow money, if it's even possible, micro-finance transactions can have interest rates as high as 85%, according to the World Bank.

The reason for these high fees is not avarice, or racism, or some evil in the global order. Rather, it's because of systems. Some countries enjoy financial infrastructure that is superior to other systems. The problem is that the legacy systems we have are fundamentally incompatible with total globalization, without admitting total centralization behind one standard, such as the American way or the Chinese way.

The world can move beyond that. This is the 21st century, a century with the iPhone, a century with the internet and the World Wide Web, a century where information can move almost instantaneously. As a consequence, we have the potential to create a better way of governing. We no longer need central entities. We no longer need central governments. Just like the internet, the things that process our payments, establish our contractual relationships, hoist up our identity, prove our property ownership, and permit the gears of commerce to work, can be done through the very same decentralized technology that has enabled innovations such as Bitcoin, Ethereum, and Cardano.

We started Input Output based on first principles. We started with science. We built research labs around the world, hiring dozens of PhDs and we have since written more than a hundred papers, many of which have been tested through the wonderful crucible of academic peer review. Citation after citation later, conference after conference later, journal after journal later, we've built a corpus of scientific knowledge that has allowed us to understand how to build systems that can scale not just to millions, but to billions of users. These systems can preserve a fundamental truth, that we are all equal and we all deserve access to the same marketplaces.

Whether you're a tech billionaire or a shepherd from Senegal, you should receive equal treatment and consideration. You should be given equal access to markets and merit should be the differentiator, not geography or genetics.

We have built great protocols like Cardano. It's not just about promises any more, this technology is now about delivery.

For four years, our people have lived in Ethiopia and have traveled across Africa to Rwanda, Uganda, Tanzania, Nigeria, Kenya, and South Africa. No matter where the winds would take them, the promises and commitments and dreams were the same. We wanted to spread our vision of changing the way the world works by pushing power to the edges and allowing people to be their own bank, allowing people to have their own identity.

The first fruit of our labors is the deal with Ethiopia’s Ministry of Education. This will involve five million students using Atala Prism technology integrated with the Cardano blockchain. Every one of these students will have a digital identity – a DID. That DID carries with it information – metadata – that will travel with them throughout their academic life, and follow them into the economic world. When these millions of students graduate, as they go into the economy, eventually this infrastructure can be used for buying property, for payments, for voting and all other matters of their economic life.

What's beautiful about this deal is, is that it's extensible. Our priorities and goals are aligned with the vision, priorities and goals of the Ethiopian government. Last year, the government set out its National Digital Transformation Strategy – Ethiopia 2025. This is a bold vision to digitize the country, including a national identity system. It is our belief that the work we have done here with Prism and Cardano for these five million students will inevitably grow to be an inspiration, and perhaps the system, for 107 million Ethiopians, allowing them for the first time to globalize on equal terms with the United States, the European Union, China and other powerful economies.

In addition, this system has the potential to go far beyond identity. We believe it can help people find jobs, because it can verify their credentials, helping them prove their skills. The system can be used for a litany of activities, establishing people as credible actors who have earned the right to have a job.

That's just Ethiopia. We also have partners in Tanzania, World Mobile, and partners across the continent. Every one of them has hopes and dreams about how to apply this technology. The magic of Cardano is that, like Bitcoin, it's permissionless. It does not require someone to register or license something. It does not require someone to ask to use it. Rather, it's an open platform.

And while these projects have been spearheaded by Input Output Global and our partners, they serve as an inspiration for countless entrepreneurs in Africa. They can realize their dreams, their businesses. Whether it’s a decentralized Uber, or securitizing a small company, or a new way of representing resources in trade and commerce, the result would be a piece of infrastructure accessible to all, open for everyone on the continent, to help others achieve their dreams.

Our industry has created a lot of really cool innovations. NFTs, DeFi, security token offerings, and ICOs, and most of these things have been based upon promises of a new world. I believe that over the next five years, as this technology rolls out across all of Africa and many other parts of the world, such as Southeast Asia, Central Asia, and Eastern Europe, that these promises can be transformed into new business models.

Thousands of innovations are possible with blockchain infrastructure. Whether you use it to vote, to find the capital that you need as an entrepreneur to thrive, to take care of those you love, or for estate planning so that your desires and your beliefs can transcend even your own death. All of these things are possible with the technology we've constructed, built with formal methods and advanced programming languages like Haskell, and validated by peer review.

Getting here has been hard, and it’s only been possible with the help of thousands of people. So let’s celebrate them too as we mark this first step in fulfilling the dream of giving people in Africa control over their own lives. 

For more on our work on the continent, visit our new Cardano Africa website

Blockchain finally comes of age with the world’s biggest blockchain deployment

Technology rollout to 5 million Ethiopian students and their teachers brings a new unique solution to improve educational outcomes and futures

27 April 2021 John O'Connor 3 mins read

Blockchain finally comes of age with the world’s biggest blockchain deployment

Today we have announced an exciting new partnership with the Ethiopian Government to implement a national, blockchain-based student and teacher ID and attainment recording system to digitally verify grades, remotely monitor school performance, and boost education and employment nationwide.

We’ll deliver this using our identity solution – Atala PRISM, built on Cardano, which will enable authorities to create tamper-proof records of educational performance across 3,500 schools, 5 million students, and 750,000 teachers to pinpoint the locations and causes of educational under-achievement and allocate educational resources effectively.

This will provide all students with blockchain-verified digital qualifications to reduce fraudulent university and job applications, and increase social mobility by allowing employers to verify all applicants’ grades without third-party agencies.

Tamper-proof data management

The blockchain-based national identity system is at the heart of Digital Ethiopia 2025 – the country’s Digital Transformation strategy. The government recently issued a national identity standard and the Atala PRISM blockchain ID will be the first system to issue IDs based on this standard. The strategy seeks to drive the country’s transformation through the digitalization of sectors such as agriculture, manufacturing, and tourism. As part of this, Ethiopia is also examining the wider adoption of our Atala products, which include the PRISM platform, for everything from blockchain-based ‘track-and-trace’ of smallholder agricultural supply chains to digital IDs for transport or healthcare. We are already in discussions around the use of blockchain-based digital identity for two other multi-million user applications.

Educational endeavor

The use of Cardano will allow for accurate tracking of individual grades, behavior, attendance, and educational attainment across all kindergartens, elementary schools, and general secondary schools. Teachers will also use the system to manage schedules or transfers, and report behavior or dropouts. The project could ultimately be extended to universities where degrees are also digitally verified on the Cardano blockchain, allowing employers to easily validate the authenticity of applicants' educational credentials.

The Ethiopian government is providing five million teachers and students with tablets and a dedicated internet network, giving all students instant access to their academic records. This will open up higher education and employment opportunities for the 80% of Ethiopia’s population living in rural regions. Student IDs will be paired with data from Learning Management Systems and harnessed by machine learning algorithms to drive personalized tuition, a dynamic curriculum, and data-driven policies and funding.

We have long recognized that developing countries could uniquely benefit from blockchain technology because of their lack of embedded, legacy digital systems and the fact that blockchains are lower cost than cumbersome infrastructure. Hence, we are already working with other governments on using blockchain to digitize public services, including a project with Georgia’s Ministry of Education pioneering the use of its Atala products to underpin a blockchain-based system for verifying graduate degrees. In 2019, we also ran a pioneering all-female software development training program focusing on blockchain solutions.

Our partnership announcement with the Ethiopian government is a groundbreaking first step in our mission to help drive decentralized digital transformation in Africa. Make sure to join us for our #CardanoAfrica show on the 29th of April to find out more about our wider work on the continent, including several other new partner announcements.