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

Fixed cddl spec for tx-submission protocol #4580

Merged
merged 3 commits into from
Jun 13, 2023
Merged

Conversation

coot
Copy link
Contributor

@coot coot commented Jun 1, 2023

We should use tx rather than txId in the cddl. It only works
because we use int for both.

We should use `tx` rather than `txId` in the cddl.  It only works
because we use `int` for both.
@coot coot enabled auto-merge June 1, 2023 09:44
@coot coot added this pull request to the merge queue Jun 1, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Jun 1, 2023
@coot coot enabled auto-merge June 6, 2023 13:29
@coot coot self-assigned this Jun 9, 2023
@coot coot force-pushed the coot/fix-tx-submission-cddl branch from 8046456 to d8eedfb Compare June 13, 2023 07:49
@coot coot requested a review from bolt12 June 13, 2023 07:49
@coot
Copy link
Contributor Author

coot commented Jun 13, 2023

@bolt12 I changed this PR considerably, so please review it again.

We should use this idea in other mini-protocols / specs as well. The only question is if we should modify data structure in ouroboros-network-protocols:test or provide different data structures just for ouroboros-network-protocols:cddl?

@coot coot force-pushed the coot/fix-tx-submission-cddl branch from d8eedfb to 43586d7 Compare June 13, 2023 07:55
Copy link
Contributor

@bolt12 bolt12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, is there an open issue about this? Would be nice to track this nice improvement

@coot
Copy link
Contributor Author

coot commented Jun 13, 2023

I created the issue: #4595

@coot coot force-pushed the coot/fix-tx-submission-cddl branch from 43586d7 to 2a00a1c Compare June 13, 2023 17:03
@coot
Copy link
Contributor Author

coot commented Jun 13, 2023

I had to also fix the local-tx-submission test, so I added a proper Any type with a much more comprehensive Arbitrary instance.

@coot coot force-pushed the coot/fix-tx-submission-cddl branch 2 times, most recently from 4009b63 to dcdd47a Compare June 13, 2023 17:55
coot added 2 commits June 13, 2023 20:44
`cddl` comes with `any` definition, it can be used to indicate that the
data structures in our spec are not specified in `ouroboros-network`.
This patch introduces `Any` type which can be used for the same reason
on Haskell side.

This patch only introduces it in `TxSubmission` and `LocalTxSubmission`
mini-protocols, but we should do that for other mini-protocols too.

In this patch we modified the definition of `Tx` and `TxId` used in
`ouroboros-network-protocols:test` as well as
`ouroboros-network-protocols:cddl` components.
These are already run in `ouroboros-network-framework:test`.  Also fixed
a typo.
@coot coot force-pushed the coot/fix-tx-submission-cddl branch from dcdd47a to 2b8ded6 Compare June 13, 2023 18:44
@coot coot added this pull request to the merge queue Jun 13, 2023
Merged via the queue into master with commit 17f6cba Jun 13, 2023
@coot coot deleted the coot/fix-tx-submission-cddl branch June 13, 2023 20:10
@coot coot added the networking label Jul 6, 2023
; transactions (tx) are themselves, `ouroboros-network` is polymorphic over
; them.
txId = any
tx = any
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where can I find specification of what is expected here by the actual cardano-node implementation?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistencies between CDDL and protocol specification
3 participants