Traditionally, DevOps refer to the set of practices and philosophies that should be in place in order to deliver and maintain software solutions.
Recently the term has been scoped into different fields like machine learning (MLOps) or version control (GitOps). Following that trend, web3 engineers are starting to talk about “ChainOps”.
Before diving into blockchain specific challenges, let’s review the main elements involved when talking about DevOps in a broader sense:
- Automation: removing manual steps related to artefacts needed for the ultimate goal of serving and monitoring an application or system. This can include: new code integration, testing features, deploying infrastructure changes.
- Continuous Integration and Deployment (CI/CD): Integration refers to the the idea of merging new bits of code into an existing repository (without breaking anything). Deployment involves not only the exposure of logic through web servers and API endpoints but the intermediate steps of compiling the code into the necessary format to be run efficiently
- Monitoring: systems tend to break and behave in all sorts of unexpected way. The sooner you know that your application is working as intended or not the better you can act upon it. We’re not only interested about knowing that our services are online, but also if they are operating in the most efficient way possible, whether your optimising for lower cost or high throughput of data you’ll want to know what’s going on inside of your system.
- Scalability: allowing your system to expand or contract depending on the demand that is encountering at any given moment.
- System Resiliency: the capacity to avoid critical failure and the speed of recovery from such failure. Different strategies and tooling allow for greater resiliency: redundancy, automated integration tests, describing infrastructure as code.
- Testing: automating test is a field on it’s own and deserves entire books to explore the topic. In principle having automated test at any scale in your system will prevent the introduction of new bugs and give more confident to the developers to be more agile with the features the integrate. The details on how to implement this testing suits goes beyond the scope of this article.
- Collaboration and Communication: ultimately, human engineers are behind any system and they need clear communication and tools that enable their collaboration, specially across large systems.
DevOps for Blockchain-based applications: ChainOps for DApps
The Ethereum ecosystem has matured over the last decade and become the de facto consensus layer for many other projects. ERC-20 (for fungible tokens) and ERC-721 (for non-fungible tokens, or NFTs), have become the industry standard paving the way towards higher complexity and capabilities of decentralised technology.
Ethereum innovation proposed a new approach in terms of architecture and development life-cycle allowing for a new category of software to emerge: Decentralised Applications. These, in turn brought a whole new set of challenges in terms of DevOps. It was the dawn of ChainOps, and a it arrived with a new set of challenges:
Deployment and Continuous Integration
Smart contracts are immutable once deployed on the Ethereum blockchain. This is great for audibility and transparency, but if any bug or flaw is found in the code once is live in the network it can’t be mended with a “hotfix”. Automating the deployment of a new contract and replacing the pointers to the old one is a non trivial task. Performing any transaction on the network requires a certain fee (gas) to be spend. The feedback loop for reviewing changes and state transitions it’s also not immediate, needing longer processes running or the adoption of more sophisticated queue systems.
Testing and Quality Assurance
Due to the immutable nature of the programs (smart contracts), testing becomes paramount in order to prevent any undesired side effect or hidden vulnerability. But since the smart contracts run in a decentralised network, emulating the real life environment where these will run becomes a challenge on its own.
Infrastructure Management
Traditionally, development teams will chose to own their own servers and maintain them in-house or pick a cloud provider and host their systems in an environment maintained by a trusted third party. In the case of Ethereum (and any other blockchain-based network), “hosting” and running your DApp becomes a bit more complex. Since the actual computation happens in more that one machine, the access to the network is regulated by “Nodes”, these are specialised servers with unique hardware characteristics running specialised operating systems processes that allow the users to interface with the network in a “correct” and safe manner. Owning and maintaining a Node it’s a task that comes with more challenges that the average development team would like to worry about.
Data Management and Privacy
Unlike traditional apps, data on the blockchain is public and immutable. Each team needs to decide how to handle data in a way that respects privacy and confidentiality where necessary. Multiple approaches have arisen in the last couple of years, but there is still no standard way to handle it efficiently. A new generation of networks have come to existence in order to tackle the case of private data in a more elegant way: enter knowledge cryptography.
ChainOps for Privacy Blockchains
There is a new breed of chains designed from the grounds up to allow for stronger privacy related capabilities. They rely on relatively new cryptographic primitives like zero knowledge to provide private state on a public ledger. This enables a whole new generation of features that can be added to the traditional DApps. Two of these networks are lunching their MainNets in 2024: Aleo & Mina.
Aleo Network has been testing their network since 2021, and their MainNet will launch later this year.
Mina Network has been online since 2021, but their zkApps feature will lunch in MainNet later this year.
Privacy networks pose a different challenge in terms of application architecture and infrastructure. One of them has been how to scale access to encrypted information in a safe and responsible way.
In the case of Aleo, their main data structure is the “Record”, and these can be public or private, should the case arise for hosting information on chain than needs to remain private, users can opt for encrypting a record with their private key. In principle this is a great feature that allows for different type of applications to be build with Aleo. On the infrastructure and architecture side this present a new kind of challenges for provider wanting to enable access to Aleo network. Handling keys has always been a topic of much discussion and care in the cryptography community, and now that this technology is about to go mainstream, more developers will need to learn best practices on how to handle this cryptographic primitives.
When it comes to ChainOps for privacy networks, platforms and engineering teams are developing new solutions on how to provide access to encrypted data without compromising the privacy of their users. Fetching, indexing and deciphering records to serve the underlying data to a given application can be done in multiple ways. Some optimised for lower costs of transactions, some optimising for higher security and privacy for the end users. In practice, these approaches represent opposite directions that each team needs to weight and balance for their own use case.
With the rise of a more robust category of blockchains that enable higher privacy. We’ll also see a new generation of infrastructure providers that would help engineering teams build and deploy privacy based decentralised applications.
One of the first platforms to enable easier interactions with privacy networks is Obscura. Initially offering direct access to Aleo & Mina nodes and optimising request times through their own data availability layers.
Conclusion: A New Era of Web3 Development
In summary, ChainOps is not just an extension of traditional DevOps; it's a specialised field that addresses the unique challenges of blockchain technology.
The rise of ChainOps reflects the growing complexity and sophistication of blockchain applications, especially with the emergence of privacy-focused networks like Aleo and Mina. These developments underscore the need for tailored solutions in blockchain development operations, highlighting the importance of platforms like Obscura in facilitating these advancements.
In embracing ChainOps, the tech community is not only adapting to the changing landscape of blockchain technology but also paving the way for more secure, efficient, and innovative decentralised applications.