So far Cardano relies on a single implementation of the protocol (node); this is concerning under many points of view and is not something that can be solved directly by the founding entities.
We propose to implement a client cardano-node in typescript; opening the development of the protocol to typescript developers.
This is the total amount allocated to cardano-node typescript implementation.
None
No dependencies.
Project will be fully open source.
to date, the entirety of Cardano depends (directly or indirectly) on the existence and maintenance of the input-output-hk/cardano-node repository.
This may by some be seen as an aspect in which Cardano is centralized, on top of as a single point of failure for Cardano as a protocol.
Other ecosystems are aware of the above risks and Ethereum as an example counts 9 different node implementations between execution clients and consensus clients, of which 5 are consensus clients.
With this proposal, we want to actively start moving the protocol to a more diversified and resilient network.
Here we propose a path to an implementation of an alternative node implementation (hopefully the first of many) written in Typescript.
The choice of Typescript as a language is discussed in the section below, highlighting the potential benefits this implementation would have on Cardano.
The major benefits have been mentioned above, we'll highlight them here quickly.
A new node implementation will:
on top of that, the choice of Typescript as a language comes with additional benefits too:
1) A great number of developers are able to understand and work with Typescript
a typescript implementation would allow those developers to further contribute to the development of the protocol.
2) open the possibility of light clients
Most of the code (exceptions for the storage logic) will be designed to work in any javascript runtime
it will be possible then to reuse this code for an in-browser light node implementation.
The description of the challenge includes "technical standard" as a possible proposal to submit; with the goal of improving the protocol performance and security; which is the same goal that in principle client (node) diversity aims to solve (or at least mitigate).
So far Twitter has been mainly used to communicate the progress of the various projects.
Mainly the HarmonicLabs account will be alongside the (personal) MicheleHarmonic 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 )
The main proposer (Michele Nuzzi) has already implemented and delivered Cardano-specific software that requires a low-level understanding of the protocol.
namely the open-source project plu-ts and others such as cardano-ledger-ts and ouroboros-miniprotocols-ts
most of the source code above will also turn useful for the implementation of the node as discussed, some proposals are active to support the development of the above modules too.
It is also in the main proposer's best interest to hire qualified engineers before the start of the project in order to maximize the quality and the outcome of the project
NOTE: hiring qualified members is NOT considered a "milestone" of the project but it will be a necessity fulfilled BEFORE the start of it, and conditionally to the proposal being founded.
The main goal of the project is to produce a new client node implementation for the Cardano protocol.
Following the feedback received by the community the main goal of the proposal will be to have a client node implementation, leaving the possibility for a block-producer node for a future proposal.
A node implementation can be divided into 3-4 components
each of the above can be seen as a milestone to complete, but it can be further divided into minor (implementation-specific) goals, which will be discussed in the section below.
Network
The network component is responsible to communicate with other nodes in the protocol;
the implementation of the network component is already under development; the source code can be found at HarmonicLabs/ouroboros-miniprotocols-ts.
the development of the networking stack is part of this proposal.
Consensus
The consensus component is responsible for choosing the active chain of the protocol; it is ultimately what determines the security of the protocol.
Unfortunately, the consensus component is the least documented and highly abstracted.
The path to implement the consensus component is to first implement a concrete instance within the node implementation itself, and later (eventually) abstract it to be Cardano-independent as per specification (this is similar to the approach taken by the Haskell implementation's team).
Ledger
Ledgers' responsibility is to ensure the data on the blockchains (transactions, blocks, etc...) is valid and well-formed.
The latest ledger implementation already exists and can be found at HarmonicLabs/cardano-ledger-ts.
The node however is responsible for validating all the data on the blockchain; not only the latest.
For this reason, is part of this proposal the implementation of all the missing previous eras and respective ledgers.
Plutus
Since Alonzo, validating the data that goes on the blockchain also includes Plutus script execution.
This part is already vastly implemented thanks to the plu-ts project ( which has an active proposal in this found to help sustain the development ).
in particular, the HarmonicLabs/plutus-machine module will be used for the plutus validation.
As discussed above we'll break down the project in 4 sections: network, consensus, ledger, plutus.
Network
as per specification (The Shelley Networking Protocol) consists
Consensus
as specified in the ouroboros-consensus report (The Cardano Consensus and Storage Layer) by consensus we not only mean "the logic adopted by the node to decide which chain is legit" but in this part of the project is also included all the serialization and storage fo the long term history of the chain (immutable DB), the part of the chain subject to change (volatile DB) and the ledger state (aka valid UTxOs & family)
consensus therefore requires:
Ledger
the ledger layer is responsible for validating the data that the network layer passes around and that the consensus layer uses for the consensus logic.
the consensus layer supports many different ledgers, general support for the lates ledger adoped is present in the HarmonicLabs/cardano-ledger-ts repository; however the node needs to support all of the ledgers we ever had.
for performance and clarity in the code, we feel each of the ledgers should not be abstracted, and each one should have a concrete implementation; hence the steps:
Plutus
all regarding plutus has already been implemented in typescript and that is thanks to plu-ts; so here we can just reuse what has been produced; we would also suggest you have a look at the plu-ts proposal to guarantee healthy development of the project.
The main deliverable is the cardano-node implementation itself;
this also implies modifications and additions to various existing repos; such as HarmonicLabs/ouroboros-miniprotocols-ts and HarmonicLabs/cardano-ledger-ts.
As specified, the entirety of the project will be open source; all the metrics offered by GitHub itself can be used to measure the progress of the project.
The total amount required for the project is 1,389,696 ADA.
The amount has been calculated as follows:
The total amount of ADA allocated to the challenge is 8,685,600 ADA.
To operate with a price that is not subject to volatility over time we are assuming that corresponds to an allocation of 2,500,000 $
that would roughly correspond to a price of 2,500,000 / 8,685,600 = 0,287832735 $/ADA
or equivalently 8,685,600 / 2,500,000 = 3,47424 ADA/$
Ideally, a team of at least 3 engineers should be actively working on the project (qualified engineers will be recruited before the start of the project; therefore this isn't a milestone)
We feel a wage of 50 $/h after taxes is fair for the experience required for such project;
Since the hiring entity operates in Italy we'll consider a 22% standard tax due to VAT (see source on agenzia delle entrate)
50 · (100 / (100 - 22)) =
50 · 100 / 78 =
5000 / 78 ~= 64,102564103 $/h
The estimated timeline for the final product is of one year.
assuming 8h of work a day; for 5 days a week, for 52 weeks a year, the following should be the yearly cost of a single engineer involved in the project:
64,102564103 · 8 · 5 · 52 = 133,333.333334 $
multiplied by 3, which is the number of expected people actively working on it, we should have the final cost of the project in dollar value:
133,333.333334 · 3 ~= 400,000.00 $
which, at a rate of 3,47424 ADA per $, results in a final amount of:
400,000.00 $ · 3,47424 ADA/$ = 1,389,696 ADA
The problem we are trying to solve is big and highly specialized.
We are aware that the price of the proposal is not usual, on the other hand, the proposal itself differs from the vast majority of the ones Catalyst has ever seen; in any case, we tried our best to keep the price reasonable especially considering on the impact the project will have.
The alternative node implementation would immensely help Cardano both from a regulatory perspective and from a protocol security and resilience perspective.
The main proposer will be actively working on the proposal.
Michele (twitter: MicheleHarmonic) has a deep understanding of the Cardano protocol and most of the implementation details required for many projects; most of them are publicly verifiable through the Harmonic Labs' GitHub (Michele's company, dedicated to Cardano dApps & infrastructure development)
Before the start of the project, at least two new figures will be needed in order to start.
Harmonic Laboratories S.R.L. constantly receives applications from largely qualified engineers to work on the company's project; despite that so far Harmonic Labs hasn't had the capability to hire any of them, hence the reason for the missing profiles of the two required figures.
The figures to be hired would have to satisfy the following (minimum) requirements:
nice to have for the applicants are: