Alephium Stack on GKE

Alephium is the first operational sharded blockchain that brings scalability, ETH-inspired smart contracts and dApps capabilities to Bitcoin’s proven core technologies while ensuring better performance and improved energy efficiency. Alephium is one of those rare gems in the crypto space that has solid innovations, high code quality and great mindset for decentralization.

The project comes with a docker setup that helps to run the entire stack, including the full node, block explorer (frontend & backend), GPU miner, as well as monitoring (prometheus & grafana). This is especially convenient if you want to experiment with the entire stack on your local machine. For more details, please consult the documentation.

It might also be a good idea to run the Alephium full stack on K8S cluster. Here are some of the potential benefits:

  • Expose Alephium stack to the public
  • Mine with the rented GPUs in the cloud
  • Develop against remote Alephium stack locally
  • Run applications that depends on Alephium full node in production
  • Scale different components of the Alephium stack depending on your use case
  • Leverage managed service such as CloudSQL for Postgres
  • Ease of operation if you are already familiar with K8S

I have setup the Alephium stack on GKE, mined some ALPHs and and exposed the following sites:

It’s comforting to be able to monitor the status of your full node wherever you are:

Alephium Overview

It is also pretty easy to develop against the remote Alephium locally, e.g.

# Port forward alephium from Kubernetes cluster
➜ kubectl port-forward svc/alephium 12973
Forwarding from 127.0.0.1:12973 -> 12973
Forwarding from [::1]:12973 -> 12973

# Curl locally
➜ curl localhost:12973/infos/self-clique
{"cliqueId":"03764042ab3c875481e5eed6d7a59027a7232582c189e1c266f57b62591ae0d8e0","networkId":1,"numZerosAtLeastInHash":18,"nodes":[{"address":"127.0.0.1","restPort":12973,"wsPort":11973,"minerApiPort":10973}],"selfReady":true,"synced":true,"groupNumPerBroker":4,"groups":4}

The code for setting everything up is open sourced in the alephium-stack repo. Checkout the README.md for more details. Happy Hacking! :fire::fire::fire:

Written on January 9, 2022