Last updated 2 months ago
Cardano-Transaction-Library (CTL) went from prototype to production quickly, and the codebase requires several improvements, as well as updates and support.
Proposed changes:
This is the total amount allocated to MLabs - Cardano-Transaction-Library Evolution. 5 out of 5 milestones are completed.
1/5
Updates, tidying the codebase
Cost: ₳ 40,714
Delivery: Month 1 - Nov 2023
2/5
Separating CIP-30 interface code
Cost: ₳ 27,142
Delivery: Month 2 - Dec 2023
3/5
Splitting the codebase
Cost: ₳ 45,238
Delivery: Month 3 - Jan 2024
4/5
Usability improvements
Cost: ₳ 67,857
Delivery: Month 4 - Feb 2024
5/5
Addressing feedback and future support
Cost: ₳ 45,239
Delivery: Month 6 - Apr 2024
Vladimir Kalnitsky (@klntsky)
Dzmitry Shuiski
No dependencies.
Project will be fully open source.
Problem
This proposal aims to deal with multiple CTL-related tasks at once.
1) The user-facing constraints interface that is used in CTL as a way to define transactions is not very consistent, due to the fact that it hasn’t been planned out beforehand. We started with a close copy of Plutus interface and were adding features on request from the users - as a result we ended up with an interface that is unnecessarily complicated and is based on design decisions that only make sense for Plutus, but not CTL as offchain library.
https://github.com/Plutonomicon/cardano-transaction-lib/issues/1482
2) We don’t need “plutus domain” types in the core library. Historically, we decided to provide Cardano domain types and Plutus domain types separately, just like it is done in the Haskell ecosystem, to make it easier to adapt code from Haskell to PureScript. It looks like we don’t need Plutus domain types most of the time – they are only useful for interop with Plutus language via PlutusData encoders/decoders.
3) The codebase is a monolith. Some parts could be replaced with new libraries that were written after CTL has been established, and some others could be moved to new standalone repositories.
4) Internal developer surveys have shown us that library error messages are hard to read and reason about, and functionality for working with time on Cardano (validity intervals) is not convenient to use.
Solution
1) Re-write the constraints interface. Notable needed changes include:
2) Moving plutus domain types either to another package or to a set of modules that stand aside and are not used in the main APIs of the library. Cardano domain types should be used for core APIs.
3) The following parts can be moved to external packages, because they can provide value on their own.
The following libraries could be added to CTL as dependencies:
4)
Market
This proposal will affect existing Cardano projects that use CTL, including, but not limited to:
Intended Fund – Fund10: Developer Ecosystem – The Evolution
How do we equip and support developers with tools and working infrastructure? How do we make Cardano their first choice when it comes to building dApps, innovating and collaborating?
What does this proposal entail?
This proposal directly addresses some problems CTL currently has, resolving these problems would attract more developers by providing more confidence in the tech stack.
Success can be measured by willingness of library users to update to a newer version. Inability of the users to update can be considered a failure.
MLabs maintains a social presence on Twitter and in Plutonomicon Discord, where updates could be posted.
MLabs has proven itself as a company employing many Haskell and PureScript software developers and delivering several Catalyst-funded projects in the past.
The main goals are:
The feasibility of our approaches to achieving these goals will be evaluated by project managers and technical leadership of the project.
1st month
Dependency and tooling updates. Adding purescript-cip30 as dependency and adapting wallet interaction code.
2nd-3rd month
Adding purescript-cardano-serialization-lib as dependency, removing old manually-written cardano-serialization-lib wrapper code. Separating parts of CTL codebase into new packages.
4th month
Re-defining the constraints interface. Improving error handling and re-thinking time-related APIs. Publishing a new major version.
5th-6th month
Maintaining the library and addressing feedback.
1st month
A number of merged pull requests that implement:
2nd - 3rd month
A number of merged pull requests that implement:
New repositories:
4th month
A new major version is released, with a new implementation of the constraints interface that addresses the problems stated above.
Every error type is given a function that shows its human readable description, which is used when errors are thrown. Time-related APIs are improved either as proposed in https://github.com/Plutonomicon/cardano-transaction-lib/issues/1517 or in some other way.
Months 5-6+
Updating the library dependencies whenever there is a new version, collecting feedback and addressing possible discovered bugs.
Total hours: 500
Subtotal: 500 hours @95/hour = $47,500 USD
Total (@ rate $0.21 USD / ADA): 226190 ADA
**In the interest of full transparency, please note we have applied a conservative USD/ADA exchange rate in pricing this proposal. This is to ensure our operations remain stable regardless of market conditions. Although we firmly believe the future of Cardano is bright, we recognize the price of ADA and all cryptocurrencies is inherently volatile. Our financial obligations are denominated in fiat. Most importantly, this includes the salary of our engineers whose hard work makes projects like this possible.
In the unlikely scenario of severe negative price movement beyond our forecasted rate, it is possible that MLabs may need to temporarily suspend work on this proposal until the market recovers. Rest assured, this decision would be made solely to protect our business's long-term viability and never taken lightly.
We appreciate your understanding and support, and we are excited to see what we can achieve together.
Maintaining CTL provides immense value to the ecosystem because several existing projects depend on CTL for their essential functionality. Continuing CTL development efforts would contribute to the whole Cardano ecosystem on PureScript.
NB: Monthly reporting was deprecated from January 2024 and replaced fully by the Milestones Program framework. Learn more here
MLabs
MLabs has quickly become one of the premier development firms in the Cardano Ecosystem. We are an IOG Plutus Partner and work regularly with IOG to develop the Cardano blockchain and ecosystem. Our team is composed of talented developers who have helped build community projects such as:
• Liqwid
• SundaeSwap
• Minswap
• Optim
• Many others
Through our work with early-stage projects, we have one of the largest groups of Haskell/Plutus developers in the community.
Website: https://mlabs.city/
Core Team
Vladimir Kalnitsky - Tech Leadership
Vladimir is a software developer with a number of contributions to the PureScript ecosystem and solid experience with Haskell. During his undergraduate years, Vladimir focused on functional programming and type theory. Vladimir is more of a 'hacker' than a scientist, but he still values formal reasoning about code and well-founded software development practices.
Dzmitry Shuiski - Haskell and PureScript Development
Dzmitry is an experienced software engineer, currently developing solutions using functional programming techniques, mostly using PureScript and Haskell. Coming from a background of iOS App Development, he is well versed in various aspects of developing robust and user-centric systems. Dzmitry has made considerable contributions to CTL in the past and is now primarily focused on Cardano dApp development. He is currently pursuing a degree in Software Engineering and Management at the Graz University of Technology to deepen his knowledge in more fundamental disciplines.