Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comprehensive information about Cardano wire protocol #5049

Open
coot opened this issue Jan 23, 2025 · 0 comments
Open

Comprehensive information about Cardano wire protocol #5049

coot opened this issue Jan 23, 2025 · 0 comments
Labels
consensus issues related to ouroboros-consensus documentation Network Documentation related tasks PI-9 Issues / PRs related to PI-9

Comments

@coot
Copy link
Contributor

coot commented Jan 23, 2025

Problem statement

The goal is to make the Cardano wire protocol more accessible and thus easier to integrate against. Right now, we provide CDDL specifications for node-to-node and node-to-client protocols, but they are polymorphic and thus, data structures like blocks, headers, and transactions are not specified. The ledger provides CDDL specs for all data structures in all eras, which are glued by the hard fork combinator, which is informally specified in network-spec.

Requirements

We want a solution which:

  1. provides clarity for the Cardano developers,
  2. can be easily maintained and evolves as Cardano develops,
  3. can be provided reasonably, without locking too much dev time

Full CDDL Spec - not a solution

A full CDDL spec would provide clarity for developers, but we believe that satisfying 2. & 3. at the same time is not possible. Cardano is split by three largely independent components: ledger, consensus & network; the development happens mostly independently in all three areas, and this is also reflected how the code is split into three repositories: cardano-ledger, ouroboros-consensus, ouroboros-network. Two satisfy 3, one needs to check the CDDL spec against the reference implementation - something we do in ouroboros-network and cardano-ledger repositories.

Proposed solution

We propose to specify in a pseudo code (how all polymorphic type variables are instantiated, e.g. what header is in the ChainSync mini-protocol. I suspect that generating this information from the code will reveal too much low-level detail about the HFC. This gives us the opportunity to explain the HFC in this context.

Then, we shall maintain tables with links to the ledger CDDL spec for each era.

@coot coot added consensus issues related to ouroboros-consensus documentation Network Documentation related tasks labels Jan 23, 2025
@dnadales dnadales moved this to 🔖 Ready in Consensus Team Backlog Jan 23, 2025
@coot coot added the PI-9 Issues / PRs related to PI-9 label Jan 24, 2025
@ch1bo ch1bo moved this to In Progress in Cardano Blueprint Feb 11, 2025
@ch1bo ch1bo moved this from In Progress to Opportunities in Cardano Blueprint Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
consensus issues related to ouroboros-consensus documentation Network Documentation related tasks PI-9 Issues / PRs related to PI-9
Projects
Status: 🔖 Ready
Status: No status
Development

No branches or pull requests

1 participant