A tale of Game of Zones: IRISnet

IRISnet
IRISnet Blog
Published in
9 min readJun 16, 2020

The IRISnet team’s story of hustle, dedication, and community.

This article is authored by Daniela Pavin

Often people would ask me, “why are you, out of the hundreds of blockchains in crypto, so particularly passionate about Cosmos Network?”

While the reasons are countless, there are two main reasons that come to mind:

First, the Cosmos ecosystem has always pioneered in the conception and implementation of cutting-edge ideas and technologies.

The success of Game of Stakes, the first proof-of-stake adversarial testnet in the crypto space, quickly taught hundreds of new Cosmonauts how to use the tools available in the Cosmos ecosystem. This led to a successful and seamless launch of the Cosmos Hub in March of the same year.

The success of Game of Stakes was fully recreated in Game of Zones, an incentivized testnet intended to test the limits of IBC and discover its strengths and weaknesses ahead of launching it into production. Cosmonauts from all over the world participated in the three-phase challenge, bringing results that few expected.

Which brings us to the second point: the people involved.

Let’s be honest, when this much prize is at stake, many would have done things at any cost to have an edge over their competitors. But in Game of Zones, 150 teams not only gave their best in terms of energy and commitment, but also in helping, collaborating, supporting, and celebrating each other to excel.

This is Cosmos: an international ecosystem of some of the best-in-class operators of proof-of-stake blockchains that day after day made their knowledge available to all of us Cosmonauts.

So whenever somebody asks me what I love about Cosmos network, I’m always ready to answer: the genius, the courage, and the humanity of those who are part of it.

And amongst the many teams that participated, one particularly stood out to perfectly embody the Cosmos spirit. That team is IRISnet.

Pre-Game of Zones

Even before the start of Game of Zones was announced, the IRISnet team spent time to thoroughly analyze the IBC module and the Relayer in order to prepare for the competition that would soon follow.

In doing so, not only did the team discover an inaccuracy in the Relayer implementation, but also discovered three major bugs which were documented and submitted as useful material for the Game of Zones Bug Bounty.

Here is a summary of the anomalies detected by the IRISnet team:

  • Consensus bug This bug caused the loss of memory data after a Gaia daemon restart, causing a consensus failure. It should be noted that the bug was found near end of Phase 1a. To which the team alerted the organizers. This led to the decision to repeat Phase 1 (named Phase 1b) after the problem was finally solved.
    You can read more about this in Tess Rinearson|Interchain GmbH’s blogpost.
  • ICS-20 Event bug When multiple messages were contained in a single transaction, the event data would be abnormal. Specifically, the events in subsequent messages would include those of the previous messages, leading to the data being excessively large and causing a number of problems such as the relayer not being able to pick up the proper data packet via query.
  • Unordered channel bug ICS20 packets sent through an irregular channel can be retransmitted repeatedly, causing more tokens minted on the counterparty chain than are available on the source chain.

In addition, although it was not required, the IRISnet team proposed a draft of an interchain incentive mechanism, which they considered extremely important for the development of the IBC ecosystem.

Beyond discovering critical bugs that existed in the codebase, the team also provided the community with concrete tools to let the Cosmonauts experience what the future of Cosmos Network post-IBC has in store for them such as the IBC implementation of Rainbow Wallet and the GoZ State Visualizer.

Well, we can say the boys didn’t sit on their hands!

Phase 1a

After carefully studying the competition rules set by Cosmos Devs, the IRISnet team has effectively developed automatic tools and monitoring procedures, mostly following these points:

  • They started their own private transmission node instead of using a public one.
  • The automatic program would then try again independently in case of a failed transaction.
  • At the same time, the real-time monitoring system also included a series of alarms, so that devs could intervene manually and in a prompt manner in case of need.

Despite the fact that in Phase 1a, as mentioned above, a consensus bug led to significant instability of the Game of Zones Hub, the team was able to effectively deal with the problems occurred.

IRISnet ranked third in Phase 1a of Game of Zones, winning the Challenge Reward.

Phase 1b

With the resolution of the Consensus Bug, Phase 1b of the GoZ seemed to start with the best of premises.

It wasn’t long before the IRISnet team, driven by what happened in Phase 1a, decided to go even deeper into the ICS-20 Event Bug.

This led to the core developers discovering an even more critical bug than the consensus failure bug that plagued Phase 1a. The bug was likely to be able to affect the results of the GoZ Hub. Going above and beyond, the team found other issues with memory overflow, node stop, and query timeout.

This could have resulted in a malicious hacker to successfully conduct an attack on the various channels at any stage of the competition.

After having pointed out to the organizers that the bug was still present on the Hub, IRISnet wanted to give a concrete demonstration of it using it for an attack on the public nodes after Phase 1b ended, effectively shutting down the Game of Zones hub.

Confirming the excellent results maintained by the team during both Phases 1a and 1b, IRISnet won the GoZ Liveness Reward.

Phase 2

The main focus of the second phase of Game of Zones was throughput.

Essentially, this meant that the team that was able to relay the most amount of packets with their relayer key on the GoZ Hub and the Game of Zones network wins this round.

To achieve this, developers worked to improve and optimize the relayer, mostly focusing on the following aspects:

  • Implement automated batch sending of cross-chain transactions
  • Implement automated batch relaying packets
  • Improve query efficiency by using multi-GoRoutine in relaying packets
  • Add handling of exception such as timeout and transaction failure
  • Fix the issue that made impossible to get the proof of the packets created in the latest block

While the official ranking of Phase 2 has not yet been released, according to the unofficial P2P Validator Leaderboard, the IRISnet team ranked fourth out of a total of 150 teams.

Phase 3

The main objective for Phase 3 was to stress test the security model of IBC, and the winner will be the team that executed the best confusion or deception attacks against other zones.

During this phase, the team implemented a deceptive relay between the GOZ Hub and Iris Hub and simulated a series of abnormal scenarios that illustrate the consequences and effects.

A demonstration of the procedures carried out to achieve this result can be found here.

The IRISnet team contributed substantially to the improvement of the Cosmos SDK and the Relayer by identifying key inconsistencies. They submitted two pull requests that address the issues (1 & 2)

For phase three, as for phase two, the official ranking is not yet available, but I am pleased to announce that the IRISnet team has won the “Most Innovative/Deceptive State Machine” award!
Really deserved, congratulations guys!

The complete list of winners can be found in the replay of the Game of Zones Closing Ceremony hosted by Jessy Irwin, Jack Zampolin and Zaki Manian.

Final considerations by the IRISnet team

To bring this summary to a close, I wanted to conduct a small interview with the IRISnet team to see what this competition meant to them.

Daniela: The team submitted constant code revisions, pull requests, updates of the Visualizer and even an IBC version of the Rainbow wallet. How did the team manage to simultaneously work on so many things during Game of Zones?

IRISnet Devs: In order to work effectively in each of these fields you mentioned, our team was split into 3 teams (Adversarial competition, Rainbow-GoZ Wallet, and GoZ Network State Visualizer). Thanks to this, each of us has been able to focus on our work and put all of ourselves into the task without interruption and in a completely autonomous way.

Daniela: Game of Zones, like the Game of Stake a year ago, is designed to test not only the code but also the teams participating in the competition. It seems obvious that this competition led to impressive technical improvements in a very short time, many creative use cases and incubated teams that are now familiar with using the IBC module and running the relayer.

What are your thoughts on this? Which things did you find the most challenging and what was the most exciting thing about the competition?

IRISnet Devs: Game of Zones is a global game that lasts for 3 weeks. Participants come from different time zones and there may be various temporary situations happening in this game, so it requires us to highly focus our attention, to keep thinking. It’s definitely a huge challenge.

Because the amount of data and the load carried by each node of GoZ Hub is very large, ensuring that our program can run stably was a huge challenge.

At the same time, in order to compete with various excellent teams, we needed to find ways to optimize our tools to obtain a better ranking. This was a very exciting challenge for us. If you want to see in-depth the tools we used during the competition, we have made open source our command-line tool!

Daniela: All the work and time invested have only one ambitious final goal: the advent of IBC. What are your final thoughts about Game of Zones and what do you think is the next step forward?

IRISnet Devs: Game of Zones was a very good opportunity to participate in learning to use the IBC protocol and the relayer. In the competition, we competed with many excellent teams. We saw many excellent strategies and ideas and learned a lot.

We do hope Game of Zones will build a solid foundation for the establishment and improvement of the whole Cosmos ecosystem.

Conclusion

Thanks to the IRISnet Team, who kindly summarized the key events, the history, and the work behind their participation in the Game of Zones.

Despite being very reserved and humble about their achievements, I must acknowledge their willingness to put in the extra effort and strive for excellence even in situations that may be unexpected.

Congratulations to IRISnet and all the teams who participated in the Game of Zones, bringing talent, innovation and squad spirit!
In this competition the real victory, the one given by the commitment to a common goal, belongs to all of us!

Official Channels

•Email: contact@irisnet.org
Website
Forum
English Telegram
Chinese Telegram
Korean Telegram
Italian Telegram
France Telegram
Twitter
Medium
Youtube
•WeChat subscription: irisnetwork
•WeChat group: irisnetwork2018

--

--

IRISnet
IRISnet Blog

Built with Cosmos-SDK, IRISHUB enables cross-chain interoperability while providing modules to support distributed business systems.