A Spotlight on Stake Pools: ZW3RK

25 April 2024 • News & Updates
Denicio Bute
Community Content Lead

A stake pool expanding the possibilities of Haskell software

With "A Spotlight on Stake Pools", the Cardano Foundation acknowledges the unique contributions of stake pool operators (SPOs) in the Cardano ecosystem. SPOs are vital to the Cardano network, managing nodes that validate transactions and produce blocks, ensuring decentralization and security. Their commitment strengthens the network and allows active participation in governance, fostering trust in the blockchain. Through each installment of the series, we delve into the perspectives and operations of different SPOs, shedding light on their individual missions and commitment to advancing open source initiatives.

In the last installment, we discussed the ABLE stake pool run by Mike Hornan which operates with a mission to improve financial accessibility for those living on the African continent. Specifically, ABLE mobilizes SPO rewards to provide African communities with educational resources and equipment financing. These initiatives make everyday work more productive by facilitating the purchase of helpful tools. ABLE is also a proud member of the Cardano Single Pool Alliance (CSPA), an organization formed by individual SPOs within the Cardano ecosystem looking to enhance decentralization and fairness by pledging to operate only one stake pool, thereby reducing centralization risks and promoting a level playing field for smaller pool operators.

We now feature the ZW3RK stake pool operated by Moritz, who has a long history working with the Glasgow Haskell Compiler (GHC) project and expertise in systems engineering. GHC is the most widely used compiler for the functional programming language Haskell. It's a free and open-source project providing a robust set of tools for developing, debugging, and optimizing Haskell applications. As a result, Moritz’s stake pool mission revolves around supporting the development of the GHC and its ecosystem while expanding the deployment possibilities of Haskell software.

The ZW3RK team contributes to GHC's Continuous Integration (CI) infrastructure with a diverse set of build machines while extending support to other Haskell projects. It also enhances cross-compilation and deployment capabilities, including aiding iOS and Android development, plus mentoring the RISC-V code generation backend in GHC. Additionally, the stakepool offers pre-built static Cardano node packages for various platforms, facilitating stake pool operators' access to Cardano blockchain services and experimenting with innovative deployment options like Synology DiskStations.

Why did you become a stake pool operator?

I got interested late in blockchains. The Bitcoin paper from 2008 has the title “A Peer-to-Peer Electronic Cash System”. And I was initially quite skeptical about the premise. The value of something is driven by its utility. The trustless premise was something I could easily get behind. But what was the value of tokens on that chain? The fluctuations and speculative nature made it rather impractical for daily use. Proof of work also seemed like a good first approximation to solve the underlying trust issues; yet bound to result in an arms race. The advent of proof of stake (and specifically Cardano) makes this—to me—much more interesting. I have been interested in small and low-power computing devices for a very long time.

As the value of any chain would be driven by the utility it can bring, I was curious about what applications we might see. I wanted to try something new. I have had a long history with the Glasgow Haskell Compiler project and have been involved in mostly backend and systems engineering items (codegen, linker, etc.). Haskell was also the language of choice by IOG to build the initial node software as well as the Plutus Smart Contract language. I wanted to see if we could leverage the Cardano network to provide the Open Source Compiler with Continuous Integration support. Can a stake pool be run to finance (a large part of) the CI infrastructure for the Glasgow Haskell Project?

What is the mission of your stake pool?

The stakepools mission is to support development of the Glasgow Haskell Compiler and the ecosystem, as well as pushing the boundaries of where Haskell software can be deployed. To this end, the stake pool currently supports the Continuous Integration infrastructure of the Glasgow Haskell Project with eight Linux build machines, two Windows build machines, five Apple silicon Mac minis, one aarch64 build machine, and hopefully soon a RISC-V build machine. These machines also partially support other Haskell projects like the Haskell Language Server, GHCup, and the github.com/haskell organization.

Part of the stakepools mission is also to further the platforms where we can use Haskell. This includes improving the cross-compilation facilities, and deployment facilities. The pool has so far supported the implementation of iOS and Android-specific needs, and was recently allowed to assist with the development and mentoring of the riscv64 code gen backend in GHC.

To utilize the result of the stake pools mission specifically for the Cardano blockchain, the stake pool has been providing pre-built static cardano node packages for various platforms (predominantly aarch64 and x86_86 based) to stake pool operators for most of the time of its existence. The pool has also provided experimental packages for Synology DiskStations; the idea here is to have a local cardano node on one's network to connect to when needed. Providing a hybrid between full and light client.

Can you give us a brief history of your stake pool?

The ZW3RK stake pool was established in February 2021 with the same mission and goal it has today. The first major milestone must have been when the pool minted its first block in March 2021. I was lucky to have a good few friends who went on this journey together with me. And most have stuck. The goal has always been to be a low fee pool and try to make the most out of the fees. As such, ZW3RK has been 1% from the beginning, and will stay that way for the foreseeable future.

Cleaning up the compilation pipeline and getting aarch64-linux static cross compiled binaries working were the next milestones. Having a reliable and working toolchain was valuable.

Over time, and as the chain grew, the pool hardware had to be upgraded a few times to accommodate the new requirements.

Next was compilation to mobile, which gave us iOS and Android native cardano-node applications. While there is little point in running these in production environments, I do run the node every once in a while on an Android phone when I find the time to hack on it; and I am looking forward to Mithril making this easier. I still think iOS and Android can provide great platforms for mobile full nodes, offering other light wallet gateways into the network.

How did the Cardano Foundation delegation impact your stake pool operation?

The Cardano Foundation has been very generous in its delegation and I'm eternally thankful for having been entrusted with this delegation. The delegation lets me focus on providing the best build and tooling support to the community. It also permits the continuous operation of the pool and the associated services provided through the pool. While the current exchange rate of ada does not allow the pool to cover all expenses, I'm hopeful that at some point it might. For now I'm happy to keep accumulating in the pool and covering the fees out of my pocket.

As the chain grows, I'll need to invest in further optimization to keep the cost down and allow most of the resources to go into providing the CI services the pool provides so far. The Cardano Foundation delegation lets me sleep better at night, knowing that I can focus on building the tools and improving the compiler.

On the flip side, without the Cardano Foundations delegation, I likely would have a harder time funding the CI resources (or at least rationalizing that the pool is generating some ada each month, and if it appreciates in value a bit, I might recover the expenses).

As I said in the beginning, I'm immensely grateful for the Cardano Foundation’s delegation, and the freedom it provides me to focus on important CI and compiler-related topics. It drives me to give my best each and every day!

Did the Cardano Foundation delegation enable you to build or improve tools, projects, or open source repositories?

The delegation from the Cardano Foundation makes it easier to justify spending time contributing to the Glasgow Haskell Compiler and improving it. This includes mostly working out kinks in cross builds (static build products are technically cross compiled on most platforms), and figuring out how to deal with tricky toolchains (e.g. androids bionic), as well as mentoring, coaching, and helping along with the RISC-V backend. After contributing the aarch64 (64bit arm) native code generator to GHC, I’d much rather coach and help someone along the way in implementing RISC-V instead. Open source lives by having multiple people knowledgeable about a topic. If only a single person knows the codebase, and how backends are built, and we fail to distribute knowledge (and workload), this ultimately leads to burnout. We've seen too much of this in the community already. It also allows me to spend time on nixpkgs, and related infrastructure.

I believe that breaking down barriers and pushing the frontiers of what we can do (bringing Haskell to multiple platforms, even more exotic ones), helps all of us. While this has no direct impact on the users of Cardano as a network, it indirectly helps everyone running Haskell programs; this most notably includes everyone who runs the cardano-node software or builds tools built with Haskell. Potentially on top of the Cardano codebase and Plutus.

How would you summarize your contributions to the Cardano ecosystem?

My primary contribution to the Cardano ecosystem has been continuously supplying the community with static builds of the cardano-node for x86_64 and aarch64. This has also led to quite a bit of tooling support around cross compilation and should allow anyone interested in using the tooling to compile any Haskell code not only to static binaries but also for mobile. Thus using Haskell on mobile (e.g. android and iOS) is viable now.

However, by building the underlying infrastructure target agnostic, we benefit from making it work for almost all targets, including WASM and JS, which are technically also cross compilation targets.

A more indirect contribution to the Cardano ecosystem has been the supply of CI infrastructure to the Glasgow Haskell Compiler, and, more recently, to the github.com/haskell org as well. This allows the compiler, as well as core components of the Haskell ecosystem, to have reliable and fast(er) CI, as well as supporting platforms like Apple silicon.

Through this, the quality of the platform that currently underpins the Cardano ecosystem is strengthened. By supporting easy onboarding tools like ghcup and haskell-langauge-server, it also makes Haskell, and its derivatives like Plutus more accessible.

As the Cardano ecosystem currently relies on the Haskell ecosystem, strengthening the foundation allows us to build better and bigger on top.

Are you currently building something that you would like to share?

I'm currently working on mobile cardano-node applications again. While I could previously get them to work on Android and iOS, the biggest hurdle was getting the chain onto the device. With the recent chain growth, this hasn't necessarily become easier, however, I believe by integrating with Mithril properly, at least the initial sync time can be cut down significantly. This then requires the infrastructure to be adapted to also support rust.

The goal here is to have a cardano-node on a mobile phone, which could then act as the local proxy for other light clients. Ultimately the Cardano network is only worth something if we can access it. In many first-world countries, with almost ubiquitous internet and enough money to spend on high-powered computers this might not seem that relevant. For areas where this is not a given, having a small, relatively cheap, single board computer (SBC) able to provide a gateway to the chain could be interesting. Using iOS and Android devices might offer a slight usability advantage over bare SBCs. In my view, resilience to power-outages (battery), resilience to network outages (cellular network), and ease of use are important.

If we can trivially provide a cardano network node to which other participants can easily connect, it increases the utility of the cardano network immensely.

I want this network to be distributed and not end up centralized with a few light client servers. To avoid this, we need simple appliances and work on the deployment story of the node.

To stay updated on ZW3RK, follow @zw3rkpool on X (formerly known as Twitter) or visit the pool website.

The Cardano Foundation encourages all new stake pools, as well as those pools with novel initiatives, to submit the single form.


You may also like

Infrastructure Survey 2024
17 April 2024
A Spotlight on Stake Pools: ABLE
15 March 2024