The absence of Elixir libraries for Cardano hinders an entire developer ecosystem from contributing to and innovating on the platform.
This is the total amount allocated to Elixir implementation of Ouroboros networking.
Develop an Elixir client library for Ouroboros networking protocols, enabling Cardano development in Elixir and on the Erlang VM (aka BEAM)
This project relies on Pallas by TxPipe and gOuroboros by Blink-Labs, whose source code will be used as a reference - in particular for the CBOR parsing alongside official documentation.
The project will be released under the Apache License 2.0 and publicly available from the start.
To develop a library in the Elixir programming language designed specifically to implement Cardanoâs Ouroboros node-to-client networking mini-protocols. This library will not only facilitate direct integration and interaction with a Cardano node but also serve as a robust foundation for developing future Elixir based projects and services. By leveraging the capabilities of Elixir and the BEAM (Erlangâs VM), this library aims to expand the developer ecosystem, enabling a wide range of technologies that compile to the BEAM to build innovative and efficient applications on the Cardano platform.
Given the lack of Elixir libraries for low-level Cardano protocols, the effort involved in adding support for each of the mini-protocol will also include developing the necessary Elixir code for CBOR parsing. This effort will also be able to be re-used by future Elixir libraries that need to work with Cardano CBOR.
This project will focus on supporting both mainnet and the Sanchonet testnet. If for any reason support for both of these networks simultaneously impose a conflict, then Sanchonet will likely be given priority given its importance for the future of Cardano unless the decision imposes a substantial delay on the delivery of this project.
This project aims to deliver significant value to the Cardano community by harnessing the strengths of Elixir, Erlang, and the BEAMâtechnologies renowned for building highly concurrent, fault-tolerant, and resilient distributed systems. These characteristics are in line with what is expected from a blockchain network, thus making Elixir an ideal language to build systems on Cardano.
Elixir is a functional, dynamic programming language that runs on the Erlang Virtual Machine. The underlying Erlang VM (known as the BEAM) was developed by Ericsson and has been battle tested for over 30 years. A few examples of services and tools built using this technology include WhatsApp, RabbitMQ, Discord and AdRoll just to name a few. These are all services known for their high availability and throughput.
There exists a substantial, yet untapped, ecosystem of Elixir developers who currently do not have the tools to build on Cardano. By providing these developers with familiar and powerful tools integrated directly with Cardano's infrastructure, this project will not only broaden the developer base but also foster innovation and fresh perspectives within the community. This expansion encourages a cross-pollination of ideas and practices from different tech backgrounds, enhancing the innovative capacity of the Cardano ecosystem.
Additionally, this project will significantly diversify the tools and technologies available to Cardano developers. By expanding the technological landscape of the Cardano ecosystem, this project will enable a broader range of developers to contribute to and benefit from the ongoing growth and success of Cardano.
And if you'd like one more reason to bet on Elixir, then allow me to quote Charles H. himself:
It's one of the sexiest languages ever written
đ„đ„đ„đ„đ„đ„đ„đ„
I have worked in the software development industry for over 15 years, with the last 7 years dedicated to consulting in Elixir. I have over 70 video courses published on Pluralsight on various technology topics including the Elixir programming language - https://app.pluralsight.com/profile/author/carlos-souza
I have validated the feasibility of this project by writing a Proof of Concept application which successfully connects to a Cardano node through a UNIX domain socket and performs a simple query using the node-to-client local state query protocol. The source code for this POC is available at https://github.com/caike/rex
My accountability can be verified through my contributions to the Cardano ecosystem. A few examples include:
1-Â Created Xogmios, an open-source Elixir client for Ogmios - https://github.com/wowica/xogmios
2 - Created an open-source Elixir-based block watcher Blocks using the aforementioned Xogmios library - https://github.com/wowica/blocks
1- Operate the JUNGLE [JNGL] Stake Pool for 2 years (> 500 blocks minted to date) - https://cexplorer.io/pool/pool1p8ap6v2k60kkav3hqcchwltxhuwpfw2qtj8txcw4scp76hdvgmc
2- Contributed with a number of open-source projects including Lucid, Aiken, Helios, Oura, Fracada dApp, Roundtable, Lucid-Evolution, Blaze and others.
3- Continuously create developer focused Cardano educational content on the following youtube channel https://youtube.com/@workwithcardano
Through my experience developing numerous Elixir applications, including Xogmios, the Elixir client for Ogmios, and contributions to other Cardano projects I have gained an understanding of the different Ouroboros n2c mini-protocols. This gives me confidence in the feasibility of this project and in the fact that I am well suited to deliver its promise.
Handshake and Local State Query
Note: The milestones of this project contain the different node-to-client mini-protocols that will be implemented. Each milestone will add support for a mini-protocol based on the currently documented specification found on https://ouroboros-network.cardano.intersectmbo.org/pdfs/network-spec/network-spec.pdf
This first milestone will include establishing a connection with an existing Cardano node using UNIX socket domain and negotiation of a protocol version. The primary focus will be the most recent 32784 protocol version. Support for older versions is likely not going to be included in the scope of this proposal.
This milestone will also include adding support for some Local State Queries. The queries are yet TBD and not all of them will be possible to cover in this proposal. The goal is to start with the necessary calls for building a transaction (the actual building of the transaction is outside of the scope of this project) such as getting protocol parameters and then move towards Conway era queries as quickly as possible such that the first version of this library can be used to build Governance tools. However, not all Conway era queries are in the scope of this proposal.
Local Tx Submission
This milestone adds support for Local Transaction Submission mini-protocol. It includes submitting a finalized transaction (signed) and interpreting whether the transaction was accepted or rejected.
Chain-Sync
This milestone adds support for the Chain Sync mini-protocol. The goal is to be able to sync with a particular point on the chain and start requesting block information such that it can be reported to upstream clients of this library. There are many scenarios needed for full support of this mini-protocol and not all of them will be included in this proposal. It is expected that most of the work in this milestone will be dedicated to parsing the CBOR for the different types of transactions. In order to reduce the scope of this proposal and keep it within budget, the initial focus will be on syncing from the start of the Babbage era and then adding support for older eras if time allows.
This final milestone will include a video presenting the library, demonstrating each one of the mini-protocols implemented in the previous milestones and talking about next steps.
Myself (Carlos Souza) will be leading this project as the lead Elixir developer.
https://www.linkedin.com/in/caike/
Milestone 1: 28% (115 hours - 25,200 ADA)
Research, development and documentation for implementing the Handshake and Local State Query mini-protocols. The existing proof of concept will be used as a starting point.
Milestone 2: 20% (80 hours - 18,000 ADA)
Research, development and documentation for implementing Local Tx Submission mini-protocol.
Milestone 3: 50% (200 hours - 45,000 ADA)
Research, development and documentation for implementing Chain Sync mini-protocol.
Milestone 4: 2% (5 hours - 1,800 ADA)
Produce a close out video presenting the result of this project and demonstrating each one of the mini-protocols implemented in the previous milestones.
This project has potential to onboard a new wave of developers to Cardano, bringing knowledge from an ecosystem with over 30 years of success in the telecommunications industry. The efficiency and robustness of Elixir and BEAM-based applications cannot be overstated, and adding this technology to the currently available libraries for building in Cardano represents tremendous value for the money.