Last updated 10 months ago
The Cardano-C library does not have an implementation of a UPLC virtual machine that can execute UPLC scripts. So scripts cant be evaluated locally
This is the total amount allocated to Bind-friendly C Library for UPLC (Untyped Plutus Core) code execution.
Develop a high-quality, MISRA-C compliant UPLC virtual machine within the Cardano-C library to enable local execution and cost calculation of UPLC scripts.
"No Dependencies"
We plan to release the UPLC virtual machine and all related components under the Apache License 2.0.
Goal 9: Industry, Innovation, and Infrastructure - Our project supports SDG 9 by driving technological innovation and infrastructure in the digital and blockchain sphere, enhancing security and accessibility across diverse programming environments.
We propose to develop a UPLC virtual machine within the Cardano-C library. This solution will include, UPLC data types and functions, serialization to and from Flat/CBOR and a CEK UPLC evaluation machine to accurately calculate execution costs of scripts within transactions.
Perceiving the Problem:
The current Cardano-C library lacks the capability to execute UPLC scripts locally, this will allow the library to evaluate scripts in transactions and calculate Tx fees and execution budgets locally without the need to make a request to a backend.
Approach and Justification:
Our approach to integrating a UPLC virtual machine directly into the Cardano-C library is driven by the necessity for a robust, feature-complete tool that supports the diverse needs of developers. By designing the library to be easily bindable to multiple languages, we ensure that these advanced capabilities are accessible not just in C but across all platforms that interact with the library. This strategic decision amplifies the impact and utility of the Cardano-C library.
Engagement and Beneficiaries:
The project will engage mostly blockchain developers and application builders.
Demonstrating and Proving Impact:
We will measure the impact of this project through developer adoption rates and feedback from the developer community and analytics on library usage will further validate the effectiveness of this integration.
Uniqueness and Importance to Cardano:
Our solution stands out through its uncompromising focus on security and validation. In the development of the UPLC virtual machine within the Cardano-C library, we adhere strictly to MISRA C compliance, ensuring the highest standards of code safety are met. This commitment extends to achieving near-complete code coverage, supplemented by rigorous testing practices including the use of tools like Valgrind to prevent memory leaks and ensure resource management.
Moreover, we employ testing techniques such as fuzzing and utilize multiple static analysis tools to thoroughly vet the codebase for vulnerabilities and errors. These measures are critical in a domain where reliability is paramount.
Value to the Cardano Community:
The integration of a UPLC virtual machine within the Cardano-C library significantly enhances its utility and functionality, offering advanced tools that empower the community of blockchain developers. This addition not only strengthens the library's capabilities but also simplifies the complexities involved in dApp development and transaction creation for all users.
By incorporating this virtual machine, the Cardano-C library can abstract more of the underlying requirements essential for accurately building and validating transactions. Developers can rely on the library to handle the intricacies of script costs and their computations effectively.
This integration directly contributes to the growth and sophistication of the Cardano ecosystem, making it a more attractive platform for developers looking to build complex and scalable blockchain solutions.
Measuring Impact:
Our team brings a deep wealth of experience and a proven track record in software development, particularly in the areas crucial for this project. My background includes extensive work on the Cardano and developing critical components such as serialization and cryptographic modules in TypeScript and C. I have over ten years of experience in C and C++ programming, with a focus on high-stakes applications.
Alejandro Claro, is a physicist and has been working as a Software Engineer for over 20 years developing products in C/C++ in mission critical projects. His expertise extends to software engineering, architecture design, API development, embedded system and compilers.
Our UPLC virtual machine with have extensive test coverage which will give us the assurance that our implementation works and implements all core functionalities correctly, (such as script execution and cost calculations).
For budget management, we have prepared a detailed budget that allocates funds to each phase of the project. The majority of our project costs are attributed to developer salaries, which directly correlate with time invested—making it straightforward to demonstrate and manage expenditures. Moreover, our use of the Catalyst project's milestone and fund distribution system ensures that funds are allocated equitably and transparently. This system not only guarantees that funding is disbursed as project milestones are achieved but also involves regular validation and verification by project reviewers, ensuring strict adherence to budgetary guidelines and project objectives.
Requirements Gathering and Architecture Design
A: Milestone Outputs
B: Acceptance Criteria
C: Evidence of Milestone Completion
Core Development and Initial Testing
A: Milestone Outputs
B: Acceptance Criteria
C: Evidence of Milestone Completion
Advanced Features Implementation and Comprehensive Testing
A: Milestone Outputs
B: Acceptance Criteria
C: Evidence of Milestone Completion
Optimization, Final Testing, and Documentation
A: Milestone Outputs
B: Acceptance Criteria
C: Evidence of Milestone Completion
Final Adjustments and Release
A: Milestone Outputs
B: Acceptance Criteria
C: Evidence of Milestone Completion
Angel Castillo - Co-Lead Developer
Alejandro Claro - Co-Lead Developer
All ADA calculations were made with an ADA price of $0.5 per ADA.
Milestone 1: Initial Setup and Framework Development
Milestone 2: Core Development and Initial Testing
Milestone 3: Advanced Features Implementation and Comprehensive Testing
Milestone 4: Optimization, Final Testing, and Documentation
Milestone 5: Final Adjustments and Release
The costs associated with developing the UPLC virtual machine for the Cardano-C library are justified by the specialized nature of the work, the high standards required for blockchain technology, and the significant benefits it brings to the Cardano ecosystem.
The integration of a UPLC virtual machine will significantly enhance the capabilities of the Cardano-C library, making it a more robust tool for developers across the ecosystem, and via its bindings potentially to dozen of other programing languages.
Furthermore, the open-source nature of the project ensures that the developments will be freely available to the community, multiplying the return on investment as more developers leverage the new tools to create innovative applications on the Cardano platform.