completed
Cardano Submit API in Golang
Current Project Status
Complete
Amount
Received
$5,000
Amount
Requested
$5,000
Percentage
Received
100.00%
Solution

Develop a Golang Cardano transaction submit API service alternative implementation, written using patterns and terms common to Golang as a fully functional example for the Golang developer community

Problem

Cardano currently falls short on attracting developers from the Golang community for writing off-chain code due to its reputation as being Haskell only

Impact / Alignment
Feasibility
Auditability

Blink Labs

4 members

Cardano Submit API in Golang

Please describe your proposed solution.

Cardano Submit API is used to allow submission of a transaction on Cardano to a Cardano node using HTTP, without understanding the underlying Cardano protocols. This is useful in the creation of everything from DEXes and dApps to light wallets.

The Cardano ecosystem has a strong preference for Haskell as a development language for its low level software implementations. This use of functional programming and provably correct code is great for a blockchain. However, most applications running on a blockchain are simply clients to the blockchain and inherit much of the security from the chain. Creating higher level applications in multiple languages increases the ecosystem diversity and attracts developers from different talent backgrounds.

Our team will create a Golang implementation of the Cardano Submit API version 3.1.0 as specified in the Swagger document published by IOHK. This implementation will utilize common Golang project structure and layout and will be written in a way which is familiar to Golang developers while introducing the developer to Cardano. The code, comments, and documentation will be written to appeal to developers familiar with Golang programming and should require minimal prior understanding of Cardano. This code will incorporate the libada library created by Bitrue as well as the Golang implementation of Ouroboros network library created by CloudStruct.

Please describe how your proposed solution will address the Challenge that you have submitted it in.

Golang is an extremely popular programming language. GitHub Language Statistics from GitHut 2.0 (code: <https://github.com/madnight/githut>) show that in Q4 2021, the number of pull requests on Golang repositories grew 8.161% and Haskell repositories grew 0.180% (source: https://madnight.github.io/githut/#/pull_requests/2021/4/Go,Haskell) while the number of repository stars on Golang repositories grew 11.763% and Haskell repositories grew 0.178% (source: <https://madnight.github.io/githut/#/stars/2021/4/Go,Haskell>). The Golang developer community is approximately 4x the size of the Haskell developer community, based on the number of Github repos with code for each. Since it’s hard to judge community size, we’re using these numbers as a proxy. We hope to bridge the gap between Golang developers and the Cardano blockchain and attract more developers to Cardano.

Creation of an alternative implementation of an existing service while utilizing existing library components from the ecosystem provides a larger surface area for developer integrations for off-chain code necessary for transaction submission in complex scenarios such as lending and DeFi. Use of a more popular programming language and integration with existing libraries will provide this. Along with this, we will provide deeper support for alternative operating systems, such as FreeBSD, and alternative architectures, such as ARM.

What are the main risks that could prevent you from delivering the project successfully and please explain how you will mitigate each risk?

The main challenge will be creating robustness in the error handling around the various conditions outside the happy path. This risk will be mitigated by performing additional validation in the service before submitting to a Cardano node and thorough testing.

Another risk would be changes in the underlying transaction format introducing incompatibility with the payload decoding, coming in Vasil or future hard fork combinator events. We propose to mitigate this risks through battle testing the software on testnet and mainnet, utilizing partnerships and replacing our own Submit API services.

Please provide a detailed plan, including timeline and key milestones for delivering your proposal.

The initial project has already been created and is released under the Apache 2.0 license.

GitHub: https://github.com/cloudstruct/go-cardano-submit-api

Our Cardano Submit API service will expose an API (Application Programming Interface) which will allow submission of signed Cardano transactions as a CBOR-encoded binary payload over an HTTP protocol interface. This transaction will be decoded and parsed and communicated to a Cardano full node (running cardano-node software) for inclusion in the blockchain.

Milestone 1 was the creation of a minimally viable product, which works under test conditions.

  • Creation of the framework and communication with cardano-node over NtC
  • Creation of container images (Docker image)
  • Creation of metrics endpoint
  • Creation of debug endpoint
  • Testnet testing

Milestone 2 is the focus of this proposal.

  • Improved metrics for increased observability and insight
  • Transaction validation before submission
  • Error handling
  • Use libada for Output and Address decoding
  • Documentation on service usage and development
  • Mainnet scalability and reliability testing

Chris Gianelloni will be the primary engineer on this proposal work.

Please provide a detailed budget breakdown.

Milestone 1 has been completed without any funding. This took approximately 30 engineering hours to complete.

Milestone 2 completion is estimated to take 20 engineering hours to deliver.

This estimate is multiplied by a rate of $100 USD/hour. We are asking for compensation for both the already completed milestone and the in progress milestone. Prior work can be verified as already delivered, providing assurance that we can continue to deliver. No additional head count is needed for this proposal.

Total budget is 5000 USD.

Please provide details of the people who will work on the project.

The project development will be completed by the CloudStruct engineering team. Our team includes Principal / Staff Engineers, with more than 60 years combined experience. This project will be assigned to Chris Gianelloni (<https://github.com/wolf31o2>) for development completion, with Andrew Gaffney (<https://github.com/agaffney>) and Jason Witkowski (<https://github.com/jwitko>) providing code review and support, along with testing partner stake pool operator Boris, from Psilobyte stake pool (PSB) and founding member of the Cardano FreeBSD community.

If you are funded, will you return to Catalyst in a later round for further funding? Please explain why / why not.

This project will be feature complete.

We will be participating in later rounds for additional projects. We believe in the Cardano blockchain technology and community and want to see it continue to grow.

Please describe what you will measure to track your project's progress, and how will you measure these?

Progress is tracked through GitHub Issues and a GitHub Projects Kanban board (<https://github.com/orgs/cloudstruct/projects/6/views/1>). Our engineering team has weekly meetings on status updates.

What does success for this project look like?

Success for the project for the funding period would include release of a stable 1.0 version after completion of Milestone 2, support for Linux, FreeBSD, and MacOS, and at least ARM64 and AMD64 architectures.

Please provide information on whether this proposal is a continuation of a previously funded project in Catalyst or an entirely new one.

This is a new proposal and the first round of the Catalyst Fund project in which we are applying.

close

Playlist

  • EP2: epoch_length

    Authored by: Darlington Kofa

    3m 24s
    Darlington Kofa
  • EP1: 'd' parameter

    Authored by: Darlington Kofa

    4m 3s
    Darlington Kofa
  • EP3: key_deposit

    Authored by: Darlington Kofa

    3m 48s
    Darlington Kofa
  • EP4: epoch_no

    Authored by: Darlington Kofa

    2m 16s
    Darlington Kofa
  • EP5: max_block_size

    Authored by: Darlington Kofa

    3m 14s
    Darlington Kofa
  • EP6: pool_deposit

    Authored by: Darlington Kofa

    3m 19s
    Darlington Kofa
  • EP7: max_tx_size

    Authored by: Darlington Kofa

    4m 59s
    Darlington Kofa
0:00
/
~0:00