Onboarding new developers is easier when they have tools they can use in their favorite language.
We propose the realization of such tools in the modern language of Zig (interoperable with C/C++ codebases), which will serve as a base for performance-focused applications.
This is the total amount allocated to rewrite it in zig - cardano-ledger.
None
No dependencies.
Project will be fully open source.
The cardano-ledger can be seen as a set of rules that specifies how data on Cardano is expected to be stored and or used;
A Zig implementation would allow for one of the most efficient implementations of these rules; it would be the core dependency for any upcoming Zig project that wants to interact with the blockchain; especially through the creation of transactions.
Why Zig?
The choice of Zig as a language is mostly due to the incredible performances it can achieve (often comparable to C) with a strong focus on memory safety and best practices (errors as values, no hidden control flow, etc.);
Despite being a relatively young language (Zig development started in 2017) the characteristics of the language are allowing it to easily be adopted by the industry with lots of exciting projects, including the blazingly fast javascript runtme "Bun" with over 42k stars on GitHub.
TL;DR: adopting Zig means making sure that Cardano stays at the forefront of industry standards.
In the challange description, one of the "possible directions" specified is;
Developing common tools, frameworks, core infrastructures, or proof of concepts
which matches the idea of the proposal to create a tool that can work as a base for any other project who intends to use the library.
The final goal is to have an open-source library to be reused across the ecosystem.
As an open-source project, the most direct way would be the number of stars the project will receive on GitHub; indicative of the people interested in it.
As a library, the number of dependent projects (directly or indirectly) will be an incredibly useful metric.
So far Twitter has been mainly used to communicate the progress of the various projects.
Mainly the (personal) MicheleHarmonic account will be alongside the HarmonicLabs account where appropriate.
Twitter has proven itself a useful tool to share the progress and it will still be used.
for any unreported progress, the project itself has always been open source, and anyone interested should be able to use GitHub to stay updated; the repository can be found at: ( TODO insert link of repo )
We are already working on the implementation of the cardano-ledger in Typescript while the implementation has its use cases it is definitely inconvenient to be used in a scope where resources are limited, hence this proposal.
We will be following the upcoming era CDDL specification (conway).
The main goal of the project (and also the main deliverable) is a Zig library that defines the datatypes necessary for any application that wishes to integrate or interact with Cardano.
The proposal also includes a transaction builder higher level API (to build easily lower-level transactions).
Ideally, the transaction builder will be defined in a separate module dependent on the cardano-ledger one.
The library will define all the data-types specified in the CDDL specification (conway), alongside all the required CBOR (de)serialization.
for the seek of clarity we are reporting the major ones here as milestones (many minor types have been omitted with the goal of keeping the answer concise):
the proposal will also include the transaction builder
The process of building a transaction will include phase 1 validation ( balanced transaction ) but not phase 2 ( script execution ); as it would require a Zig implementation of the Plutus Machine;
Phase 2 validation is totally possible and will be integrated once the proposal has been completed (possibly but not necessarily under a following proposal)
As mentioned above, the main deliverable is the Zig library that defines all the necessary data-types and respective CBOR serialization/deserialization.
Everything will be open source, hence the outputs of the project will include the repository, where eventually everyone will be able to verify the work done.
The total cost of the project is estimated to be 142,132 ADA;
The amount has been calculated as follows:
The total amount of ADA allocated to the challenge is 3,158,500 ADA.
To operate with a price that is not subject to volatility over time we are assuming that corresponds to an allocation of 1,000,000 $
that would roughly correspond to a price of 1,000,000 / 3,158,500 = 0,316605984 $/ADA
or equivalently 3,158,500 / 1,000,000 = 3,1585 ADA/$
At a cost of 45 $/h (after taxes);
Since the legal entity operates in Italy we'll consider a 22% standard tax due to VAT (see source on agenzia delle entrate)
45 · (100 / (100 - 22)) =
45 · 100 / 78 =
4500 / 78 ~= 57.692 $/h
The estimated timeline for the final product is of 6 months.
assuming 6h of work a day; for 5 days a week, for 26 weeks in a 6 months period, the following should be the total cost for the project (in dollar value):
57.692 · 6 · 5 · 26 = 44999,76 $
At a rate of exchange of 3,1585 ADA/$ it becomes:
44999,76 $ · 3,1585 ADA/$ = 142131,74196 ADA
The extension of Cardano as an ecosystem to a modern programming language like Zig will allow for greater diversity and inclusivity in the developer community, allowing people with different backgrounds and educations to contribute to the protocol.
Allowing the emerging Zig language to be part of Cardano will be a great entry point for some of the greatest engineers and brilliant minds looking for innovation.
Michele (main proposer) will be mainly responsible for the implementation.
Michele is also the founder of the Harmonic Laboratories, which has been working (and is still working) on several projects on Cardano.
If necessary, and if possible, the workload will be distributed between the developers at Harmonic Laboratories.