not approved
gOuroboros: Cardano Ouroboros protocol server support in Golang
Current Project Status
Unfunded
Amount
Received
₳0
Amount
Requested
₳185,000
Percentage
Received
0.00%
Solution

We will continue developing the gOuroboros open source Golang library for speaking the Ouroboros protocol with a Cardano node and reading the ledger data structures, including server side messages

Problem

The Cardano ecosystem lacks a robust Golang library for communicating with a Cardano node at the protocol level and ledger, excluding a large pool of developers from participation

Feasibility
Value for money
Impact / Alignment

Blink Labs

3 members

gOuroboros: Cardano Ouroboros protocol server support in Golang

Please describe your proposed solution.

The gOuroboros library provides the building blocks for communicating with a Cardano Node as a client in Golang. Our previously funded proposal from Catalyst Fund 9 led to the development of the client side of the protocol.

This proposal intends to complete the loop and support the NtC and NtN server side. Server side support for the Ouroboros protocol will allow the library to be used to build active participants in the network. The capability to decode the messages into usable transaction types opens up the ability to build software which can perform actions based on certain events being observed on the network, such as blockchain indexers or trading bots.

How does your proposed solution address the challenge and what benefits will this bring to the Cardano ecosystem?

Golang is an extremely popular programming language. GitHub Language Statistics from GitHut 2.0 (code: <https://github.com/madnight/githut>) show that in Q1 2023, the number of pull requests on Golang repositories grew 10.423% and Haskell repositories grew only 0.201% (source: https://madnight.github.io/githut/#/pull_requests/2023/1/Go,Haskell) while the number of repository stars on Golang repositories grew 12.107% and Haskell repositories grew only 0.238% (source: <https://madnight.github.io/githut/#/stars/2023/1/Go,Haskell>). The Golang developer community is over 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.

Creating a Golang library for interacting with Cardano nodes and reading the ledger will allow tapping into a much larger pool of developers than the existing Haskell libraries generally allow. This will also lower the barrier for entry into the Cardano ecosystem.

The gOuroboros library provides low level primitives for Golang to communicate the Cardano on-the-wire language. This is the basic building block for creating both client and server applications in Go.

How do you intend to measure the success of your project?

As our goal is feature completion and open source code, our measure for success will be when the gOuroboros library supports all of the client and server side operations of all NtC (node-to-client) and NtN (node-to-node) mini-protocols and allows for reading basic ledger information and all transaction attributes.

Please describe your plans to share the outputs and results of your project?

The gOuroboros library is open source and developed in public. Each individual piece of work is submitted publicly to the gOuroboros repository and can be viewed by anyone.

Progress is tracked through GitHub Issues and a GitHub Projects Kanban board (https://github.com/orgs/blinklabs-io/projects/8). Our engineering team has weekly meetings on status updates. Discord is used for day to day communication and engaging contributors.

Several of Blink Labs projects use gOuroboros for communication and data processing of Cardano network and ledger primitives. This includes open source projects on GitHub by Blink Labs, such as nview and tx-submit-api, and closed source partner implementations such as Maestro's dApp Platform.

What is your capability to deliver your project with high levels of trust and accountability?

Blink Labs has decades of experience delivering open source software. We have a proven track record of delivery and have successfully completed two previous Catalyst Fund 9 proposals. Our work is open source and public for all to view. Our team is highly cohesive and have worked together for years, allowing us to provide accurate time and cost estimates to our work. The gOuroboros project has been in constant development for 18 months, both with and without funding. Funding allows us to dedicate engineering time to an open source project, rapidly accelerating its development.

What are the main goals for the project and how will you validate if your approach is feasible?

Our goal is for gOuroboros to be the building block upon which a Golang ecosystem on Cardano can thrive. To accomplish this goal, we will build the gOuroboros library functionality to support a diverse capability set, allowing for creation of an entire ecosystem of downstream projects.

Completion of the server side capabilities of gOuroboros will enable this. We have broken this into 4 deliverable milestones to reach this goal.

  1. Client completion and automated testing
  2. Era support
  3. Transaction attributes
  4. Server support

Blink Labs will create GitHub issues for the individual items of work and will track those items using a project Kanban board on GitHub.

Please provide a detailed breakdown of your project’s milestones and each of the main tasks or activities to reach the milestone plus the expected timeline for the delivery.

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

GitHub: <https://github.com/blinklabs-io/gouroboros>

This library will provide a Golang analog for the Haskell ouroboros-network and cardano-ledger libraries. It will support reading the ledger and the Ouroboros protocol with multiplexing over a single connection using a muxer, a handshake with protocol version negotiation, and various mini-protocols with their messages and state machines as documented in the Ouroboros network spec (<https://input-output-hk.github.io/ouroboros-network/pdfs/network-spec/network-spec.pdf>).

This proposal covers the completion of support for the client side of all documented NtN (node-to-node) protocols, basic server side support for all documented NtC (node-to-client) and NtN protocols, support for all transaction attributes (certificates, minting, protocol parameter updates, etc.), and support for additional queries. This will allow someone to write a client in Golang that allows communicating with a Cardano node via UNIX socket or TCP to perform operations such as submitting transactions, syncing blocks from the chain, querying the local state of a node, or exchanging peer information.

Milestone 1 will cover the client side of the various NtN (node-to-node) and NtC (node-to-client) mini-protocols. This will include:

  • TxSubmission protocol client support
  • PeerSharing protocol client support
  • Additional tests for the Handshake protocol client
  • Additional tests for the KeepAlive protocol client
  • Additional tests for the ChainSync protocol client
  • Additional tests for the BlockFetch protocol client
  • Additional tests for the LocalTxSubmission protocol client
  • Additional tests for the LocalStateQuery protocol client
  • Additional tests for the LocalTxMonitor protocol client
  • Support for additional LocalStateQuery protocol queries and responses

Milestone 2 will cover completing support for the various eras. This will include:

  • Byron era transaction input and output support
  • Conway era block and transaction support
  • Shelley protocol params support
  • Allegra protocol params support
  • Mary protocol params support
  • Alonzo protocol params support
  • Babbage protocol params support

Milestone 3 will cover completing support for all transaction attributes. This includes:

  • Fees
  • TTL
  • Certificates
  • Staking reward withdrawals
  • Protocol parameter updates
  • Auxiliary data hash
  • Validity interval start
  • Mint operations
  • Script data hash
  • Collateral inputs
  • Required signers
  • Collateral return
  • Total collateral
  • Reference inputs
  • Voting procedures (new in Conway)
  • Proposal procedures (new in Conway)

Milestone 4 will cover the server side of the various NtC (node-to-client) and NtN (node-to-node) protocols. This will include:

  • Handshake server side support
  • KeepAlive server side support
  • ChainSync server side support
  • BlockFetch server side support
  • TxSubmission server side support
  • PeerSharing server side support
  • LocalTxSubmission server side support
  • LocalTxMonitor server side support
  • LocalStateQuery server side support

The time budget for each milestone is 1 month, so the project should be completed after 4 months.

Please describe the deliverables, outputs and intended outcomes of each milestone.

The milestones as laid out are tracks of work. These will sometimes be worked in parallel, and as an actively used open source project, there will be software releases created on demand as new features are added, allowing them to be used in downstream projects.

For every milestone, the tasks within it will be completed. Each work item is merged into the main software project, which includes documentation generation and publishing on pkg.go.dev, the primary developer documentation site for Go language apps.

The gOuroboros project uses GitHub issues for tracking individual items of work and the work scoped in this proposal will be tracked in a Kanban board within GitHub Projects (https://github.com/orgs/blinklabs-io/projects/8/views/1).

Please provide a detailed budget breakdown of the proposed work and resources.

Funding will primarily pay for engineering time. There is also a small piece set aside for paying administrative staff for project management.

The project budget is 46250 ADA per month to pay for Engineering (40000) and Project Management (6250). Each milestone corresponds to a month, and time is allocated to take approximately 75 percent of a full time software engineer or 120 hours and approximately 10 hours of project management.

No additional funding is necessary for third party products or services.

Who is in the project team and what are their roles?

The project development will be completed by the Blink Labs engineering team. Our team includes Principal / Staff Engineers, with more than 40 years combined experience. This project will be primarily assigned to Aurora Gaffney (https://github.com/agaffney) for development completion, with Chris Gianelloni (https://github.com/wolf31o2) providing code review, documentation, and support.

Blink Labs has previously completed two Catalyst Fund 9 proposals:

Additional Blink Labs staff may be used for administrative functions, such as project management and community reporting.

How does the cost of the project represent value for money for the Cardano ecosystem?

Costs are estimated on a 333.33 ADA per hour rate for a senior golang blockchain software engineer working remotely within the United States (~ $192k USD annually) and 150 ADA per hour rate for a project manager working remotely (~ $86k USD annually)

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