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

"Local Tx-Submission" mini-protocol CDDL #115

Open
scarmuega opened this issue Jun 10, 2022 · 6 comments
Open

"Local Tx-Submission" mini-protocol CDDL #115

scarmuega opened this issue Jun 10, 2022 · 6 comments
Labels
help wanted Extra attention is needed node-spec Related to upstream Cardano node

Comments

@scarmuega
Copy link
Member

Pallas aims to provide an implementation of each of the mini-protocols described in the Ouroboros network spec. We rely on the CDDL definitions to implement the CBOR wire-format required by each protocol.

Most of the wire-format is fully defined by the spec, except for certain messages which are specific to the ledger implementation. In particular, the "Local Tx-Submission" mini-protocol specification skips the definitions for the rejection reason message.

We've tried reverse-engineering the Haskell code to infer the CBOR structures, but it's a hard and error-prone process. On top of that, each cardano-node version might potentially change / augment these definitions.

We need to build / acquire a CDDL document that describes the missing structures of the "Local Tx-Submission" mini-protocol to facilitate the development of the corresponding Pallas implementation.

@scarmuega scarmuega added help wanted Extra attention is needed node-spec Related to upstream Cardano node labels Jun 10, 2022
@cleanerm5
Copy link

Hi @scarmuega

not sure if this helps but the rejectReason is defined in here as int. This does of course not define the semantics if that is what you are looking for.

@scarmuega
Copy link
Member Author

Thanks @cleanerm5. I think that the CDDL definition in that file is serving as a placeholder for running tests over the spec. It seems that the "reason" struct is ledger-specific, so it takes a different shape when implemented at the cardano-node level.

@junderw
Copy link

junderw commented Oct 2, 2022

Is this a limitation of the protocol itself? Does there need to be discussion on standardizing the CDDL?

@scarmuega
Copy link
Member Author

@junderw not a limitation of the protocol, just lack of documentation AFAIK.

The formal spec of the Ouroboros protocol is generic over certain constructs, this is by design. The goal AFAIK, is to allow different blockchains to implement the same consensus protocol with a certain level of flexibility at the implementation-level.

What we're lacking is a spec (eg: CDDL) of the specific constructs that Cardano uses for the implementation of the Ouroboros protocol.

@junderw
Copy link

junderw commented Oct 2, 2022

I wonder if discussing this on popular technical forums in the community or asking recent committers of cardano-node like @deepfire, @newhoggy, or @Jimbo4350 might help?

It seems like there's only a few missing pieces and if lack of documentation is the problem, asking someone who is familiar with the primary implementation should solve the problem with a simple answer fairly quickly.

Currently the Local Tx-Submission is the only missing piece that we currently require to use websockets + ogmios to implement in our Rust-based application, and I would be interested in helping if needed.

The question to those familiar with cardano-node and its implementation is, "What is the CDDL spec of Local Tx-Submission for cardano-node and how does it differ from this one?"

@kettlebell
Copy link

I've made progress on this task with #495

@scarmuega scarmuega moved this to 🆕 New in Development Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed node-spec Related to upstream Cardano node
Projects
Status: No status
Development

No branches or pull requests

4 participants