Cardano: IOG Developer Answers Questions on Hydra Heads Including Their Use Cases

On Wednesday (March 16), one member of the Hydra team at IO Global (aka “IOG”, formerly known as “IOHK”) answered questions about Hydra Heads, which — according to IOG’s Matthias Benkort — “make for a strong foundation to build a scalability layer for Cardano.”

The Introduction of Hydra

On 26 March 2020, Greek cryptographer and computer scientist Professor Aggelos Kiayias, who is the Chief Science Oficer at IOG, published a blog post titled “Enter the Hydra: Scaling Distributed Ledgers, the Evidence-Based Way”.

Here is how he introduced Hydra:

Scalability is the greatest challenge to blockchain adoption. By applying a principled, evidence-based approach, we have arrived at a solution for Cardano and networks similar to it: Hydra. Hydra is the culmination of extensive research, and a decisive step in enabling decentralized networks to securely scale to global requirements.

Professor Kiayias then gave the “30,000-feet view” description of Hydra:

Hydra is an off-chain scalability architecture for distributed ledgers, which addresses all three of the scalability challenges mentioned above: high transaction throughput, low latency, and minimal storage per node. While Hydra is being designed in conjunction with the Ouroboros protocol and the Cardano ledger, it may be employed over other systems as well, provided they share the necessary salient characteristics with Cardano.

Despite being an integrated system aimed at solving one problem – scalability – Hydra consists of several subprotocols. This is necessary as the Cardano ecosystem itself is heterogenous and consists of multiple entities with differing technical capabilities: the system supports block producers with associated stake pools, high-throughput wallets as used by exchanges, but also end-users with a wide variety of computational performance and availability characteristics. It is unrealistic to expect that a one-shoe-fits-all, single-protocol approach is sufficient to provide overall scalability for such a diverse set of network participants.

The Hydra scalability architecture can be divided into four components: the head protocol, the tail protocol, the cross-head-and-tail communication protocol, as well as a set of supporting protocols for routing, reconfiguration, and virtualization. The centerpiece is the ‘head’ protocol, which enables a set of high-performance and high-availability participants (such as stake pools) to very quickly process large numbers of transactions with minimal storage requirements by way of a multiparty state channel – a concept that generalizes two-party payment channels as implemented in the context of the Lightning network.

It is complemented by the ‘tail’ protocol, which enables those high-performance participants to provide scalability for large numbers of end-users who may use the system from low-power devices, such as mobile phones, and who may be offline for extended periods of time. While heads and tails can already communicate via the Cardano mainchain, the cross-head-and-tail communication protocol provides an efficient off–chain variant of this functionality. All this is tied together by routing and configuration management, while virtualisation facilitates faster communication generalizing head and tail communication.

And this was his overview of the Hydra head protocol:

The Hydra head protocol is the first component of the Hydra architecture to be publicly released. It allows a set of participants to create an off-chain state channel (called a head) wherein they can run smart contracts (or process simpler transactions) among each other without interaction with the underlying blockchain in the optimistic case where all head participants adhere to the protocol. The state channel offers very fast settlement and high transaction throughput; furthermore, it requires very little storage, as the off-chain transaction history can be deleted as soon as its resulting state has been secured via an off–chain ‘snapshot’ operation.

He also talked a little about Hydra’s potential based on simulation results:

We see that a single Hydra head achieves up to roughly 1,000 TPS, so by running 1,000 heads in parallel (for example, one for each stake pool of the Shelley release), we should achieve a million TPS.

Sebastian Nagel Provides an Update on Hydra in September 2021

On 17 September 2021, Sebastian Nagel, a software engineering lead at IOG, published a blog post titled “Hydra – Cardano’s Solution for Ultimate Layer 2 Scalability”, in which he talked about IOG’s proof-of-concept for the Hydra Head protocol:

We have already implemented the basic Hydra Head protocol as a proof of concept hydra-node. A developer preview will be ready by the time of the upcoming Cardano Summit. This will enable developers (or anyone interested) to run one or more hydra-nodes online, opening a Hydra Head with a limited number of participants, and feeding transactions to it. Users can expect to see a working prototype over a dedicated testnet, plus early benchmarking figures and documentation in this GitHub repository. There likely will not be any user-facing components (wallets, user interface, etc.) available just yet...

“In the short term, we will keep developing the hydra-node and the Hydra Head protocol until it becomes a solid and stable foundation for the community (and us!) to build real-world applications. These new apps will benefit from fast settling and low-to-no-cost transactions. We are also actively developing other key features, including the support of multiple heads per node, persistence, and Head protocol extensions.”

As for the medium term, he had this to say:

In the medium term, say 6-12 months, progress will greatly depend on the results of our research and experimentation, plus feedback from the developer community. We are researching ways to interconnect multiple Hydra Heads to increase the “reach” of our layer 2 solution, for example, and also testing different methods to make it easier to integrate and use Hydra. One of the most exciting visions for the long term is the development of ‘Virtual Heads’ by running the Hydra Head protocol inside Hydra Heads, thus fully utilizing the isomorphism of our Layer 2 solution. Herein lies true, theoretical limitless scalability.

Matthias Benkort Provides an Update on Hydra in February 2022

On 3 February 2022, Matthias Benkort, a member of the Hydra enginnering team at IOG, published a blog post titled “Implementing Hydra Heads: The First Step Towards the Full Hydra Vision”, in which he talked about his team’s current progress, their approach, and their “near and long-term roadmap.”

Here was Benkort’s short explanation of a Hydra Head:

A Hydra Head is a provably secure isomorphic state channel. Simply put, it is an off-chain mini-ledger between a restricted set of participants, which works similarly (albeit significantly quicker) to the on-chain main ledger.

He then used this poker analogy:

Think of Heads as ‘private poker tables’ where participants bring their own chips to play the game. Participants can play for as long as they want. If someone doesn’t play, then the game doesn’t progress. Yet, participants are still free to walk away with their chips. If they do so, the game ends with the current wealth distribution.

The dealer at the table (the on-chain script) ensures that people play by the rules and don’t cheat. In the end, there are as many chips out as there were chips in, but they may have been redistributed during the course of the game. While the final result is known outside of the table, the history of all actions that happened during the game is only known to the participants.

As for their roadmap, here is what Benkort had to say:

This is why we are developing Hydra Head as an open-source GitHub project, starting with an early proof of concept last year. Aiming for a regular and frequent release cadence, we released our initial developer preview in September (0.1.0) followed by a second iteration (0.2.0) before Christmas. The next increment (0.3.0) is coming up in February. We follow semantic versioning and each of those pre-releases (0.x.0) adds features that will be available to our partners and early adopters to test out on private and public Cardano testnet(s).

Charles Hoskinson Congratulates the Hydra Team

On Tuesday (March 15), IOG Co-Founder and CEO Charles Hoskinson congratulated the Hydra team for achieving the important milestone of opening the first Hydra Head on the public testnet of Cardano:

IOG Developer “KtorZ” Answers Questions About Hydra Heads in March 2022

Yesterday, one member of the Hydra team kindly took to Twitter to explain what a Hydra Head and went on to answer questions from the crypto community:

When asked about use cases, he wrote:

Oracles, games, pay-per-use API, private payment channels, off-chain conflict resolutions, copyright management…

As for the question “Can hydra heads communicate with each other (like with lightning network)?”, he replied:

Not _yet_ and not in the immediate future. This is however definitely on our roadmap! We gotta start somewhere however, so we’ll get there, one step at the time.

He also pointed out that anyone can create their own Hydra head and that although the changes coming in the next hard fork enhance Hydra’s functionality, it is still able to work (with limitations) without them:

Hydra does not change the layer 1 ledger rules no; it has its own rules. A head would typically use the same rules, but some customization is possible… it means that anyone can create its own Hydra head indeed. That’s the point! There’s no one global head…

As for, does it require a hard-fork; yes and no. Hydra can work without hard-fork, but with limitations. Since it’s a DApp though, it also benefits from all the good stuff coming for Plutus (reference inputs, reference scripts, inline datums, protocol params updates…)!

Disclaimer

The views and opinions expressed by the author, or any people mentioned in this article, are for informational purposes only, and they do not constitute financial, investment, or other advice. Investing in or trading cryptoassets comes with a risk of financial loss.

Source: Read Full Article