Mina Minute: ChainSafe Systems

Along with the =Nil Foundation, ChainSafe are among the most prominent ecosystem partners to Mina Protocol. They are currently working on implementing everything in Mina Protocol to Rust from Mina’s original Ocaml implementation.

Their recent 3 day online eventCSCON[1] was a roaring success and featured Mina Foundation community manager Christine Yip and Mina designer, Kate El-Bizri.

As the project continues to move forward we aim to hear from some of the developers at ChainSafe to find out even more of the more technical aspects of their work. The below answers are from the ChainSafe Mina-rs team, featuring Lerna, Rahul, Hsin, and Tim.


What was the motivation behind holding CSCON[1]?

As a fairly new entrant to web3, we have been incredibly blessed to become friends (and work closely) with many of the top foundation teams, like the Mina Foundation. This exposes us to domain experts at the protocol-level and at higher-levels like design and community-building. The CSCON events are meant to bring together these diverse voices in a shared space where we can learn, grow, hold discourse, and celebrate our successes. Hence, our tagline for this year was “Makers, meet each other”. Since CSCON events are generally held at the end of the year, they serve as a good point for retrospection. Similarly, it is also an excellent opportunity for speakers to reflect on the coming year.

Are there plans to make CSCON[1] a regular event?
CSCON is already an annual event! We started CSCON last year with CSCON[0] – a bit of programmer humour there, heh.

Were you surprised by the interest in the talks? 

Yes, the Mina community especially showed out for the Mina speakers, which was awesome to see.
There were a couple of talks that stood out as favourites:

  • Kate El-Bizri on design – designing for web3 is not an often broached topic, so this was particularly interesting to hear insights on Mina’s branding and more generally branding in web3
  • Alex Muller on product-thinking in web3 – Alex is a veteran of product-thinking, and his talk on product in web3 and how we can iterate over web2 was fascinating
  • Scott Moore on public goods – his slides were AWESOME and the Q&A was an outstanding conversation
  • Kaitlin Beegle on governance – Kaitlin is an outstanding speaker, and her command over protocol governance is evident in her presentation
  • Ethan Buchman on city states – Ethan is a veteran of CSCON and both his talks have been phenomenal with lots of interesting historical tidbits – highly recommended!
  • Joseph Lubin & Aidan Hyman fireside – This is Aidan’s 2nd fireside with the co-founder of Ethereum – their conversation covered a lot of interesting ground
  • Too many to name tbqh

You can watch all of the videos on their YouTube channel HERE

How did the project with Mina come about? 
Lerna: We were initially consulting on Mina’s libp2p component and then we submitted a proposal to build an alternative implementation when Mina posted an RFP.

With regards to Mina Protocol, can you explain in a simple way what your current work is and how this will benefit / affect Mina? 
Lerna (Mina-rs PM): As I mentioned in our presentation, we are looking to reimplement everything in Rust from Mina’s OCaml reference implementation. Rust is a much more popular and dev friendly language. It is also great to work with for in-browser environments, which we intend to also have. We are also only building non block-producing nodes. Let’s dive into what all this means a bit more.

When we talk about “reimplementation”, it means to increase network resiliency – in other words 1) make it more robust to attacks on any one single client implementation, and 2) since Rust is a popular, developer-friendly language, the more people that can read and comprehend the codebase, the better it is for contributions. Our initial grant work is for building out non-validator nodes (non block producing nodes). This will help when the time comes to build out the validator nodes since the groundwork will be laid out by us.

Rahul (Mina-rs Team Lead): We are building Mina-rs to be capable of running on commodity hardware, and even in embedded platforms and in-browser environments via WebAssembly. Since Rust is a safe systems programming language known for its detection of memory safety issues at compile time, it makes it a great choice for a node implementation. It also has great tooling which can support syncing Mina nodes run in the browser to the larger network.

Do you have an estimated time for completion of the work?
Tim: Soon™ – software engineering work can be incredibly challenging to predict for. We don’t want to over promise/under deliver!

Do you have plans for other projects with Mina after the completion of this project?
Tim: Not currently, but there’s always something around the corner with ChainSafe and Mina 🙂

What would you say to someone looking to get into the blockchain / developing / engineering side of things, where and what should they study first?
Lerna (Mina-rs PM): For engineers.. Rust would be a great asset to have. If it’s specific to Mina, I’d say learning Rust and reading as much as possible on Mina’s github and their website about the project. The zero knowledge proofs make this project uniquely complex in terms of tech.

Rahul (Mina-rs Team Lead): Learning blockchain development very much overlaps with the profile of a distributed systems engineer and a bit of backend engineering chops. You should also know the basics of cryptography. Reading about existing blockchain implementations such as Bitcoin or Ethereum will greatly help. You should also read about peer to peer systems, public key cryptography, serialization protocols, distributed systems, and network protocols. I know, it’s a lot of reading!

Hsin (Mina-rs Developer): Reading API documents is very important when we need to use them. To have domain knowledge in Blockchain. I would consider the Udacity Blockchain Developer Nanodegree Program https://www.udacity.com/course/blockchain-developer-nanodegree–nd1309. For me, it was one of the best resources with real-world lectures, and something I would consider studying first.

Tim: All of the above are excellent engineering resources. If you want something a bit more beginner friendly that will inculcate you with the ethos of Web3 and decentralized technology, I highly recommend this set of curated resources by ChainSafe VP of PM’s Amer Ameen called the “Blockchain Onboarding” page [blockchain.amer.cc]. You will find YouTube videos, articles, slide decks, and everything in between.

For me, understanding web3 started at the most fundamental level first, including “what is money” and “how does a blockchain work”. From this basis, you can really start going down the rabbit hole. There’s a lot of abstractions and weird jargon, but if you are committed, I promise it’s not so challenging! Ofcourse, ChainSafe’s Medium blog is a great resource. We have plenty of good articles on our Mina implementation and you can find that here: https://medium.com/chainsafe-systems/tagged/mina

What has been the most challenging part of the work so far?
Lerna (Mina-rs PM): Challenges have mainly been the complexity that comes with such a succinct blockchain and the OCaml language. From what the devs tell me, it’s not easy to understand OCaml and it takes some getting use to. For one, Mina’s data structure in OCaml is incredibly complex (ChainSafe’s Willem Olding wrote a great blog post about this). Second, our first completed milestone “Serialization” was an arduous undertaking. We went through a lot of challenges with such a complex type that had to be *byte perfect* to work. If the serialization was off by even one little bit, the round trip tests would fail.

Rahul (Mina-rs Team Lead): The most challenging part of the work we’ve felt so far is figuring out the implementation details in the OCaml code and implementing the Rust counterparts. This is a time consuming part as we don’t have a proper spec for the components. There are also challenges in terms of defining a product feature set that we aim to run in the browser. This however is being fleshed out by the O1 labs team.

Hsin (Mina-rs Developer): I was originally a C++ Developer and only started my journey to learn rust 3-5 days before my interview with ChainSafe. Like Lerna and Rahul, I found myself having to scramble to learn OCaml, which in itself is a huge challenge. Another challenge is the depth of knowledge in the blockchain field you have to quickly accustom to like the Byzantine General’s problem (Consensus algorithms) such as proof of stake, proof of work and Delegated Byzantine Fault Tolerance…etc., and distributed Peer-to-Peer Networks. These are only the basics!

Look out for more from Chainsafe too, in the meantime grab our newsletter and never miss a thing https://bit.ly/minasubscribe

Scroll to Top