-
Notifications
You must be signed in to change notification settings - Fork 26
Add CDDLs #1422
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
base: main
Are you sure you want to change the base?
Conversation
Very nice! See cardano-scaling/cardano-blueprint#25 for an issue that aims to use these to create an api reference. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a lot of work, but it's great that we finally have CDDLs for all these things. Also this module system looks quite good!
|
||
getCBOR.query = [9, shelleyQuery] | ||
|
||
;# include getSystemStart as getSystemStart |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean that we need to provide ./consensus
as an include path to cddlc
? Would it be possible to say consensus/getSystemStart
here and it would just work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do check the cddlc.sh
script in this PR, it shows how one would run cddlc. You can run it to see the results.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to say consensus/getSystemStart here and it would just work?
No, I don't think that works. I seem to recall I tried and was not able to use it.
unsafeIndefiniteSafeZone = [1] | ||
genesisWindow = word64 | ||
|
||
;# import base |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use qualified or explicit imports? Then it would be more clear which rules come from this library. For example we could have eraStart = base.bound
ouroboros-consensus-cardano/cddl/node-to-client/localstatequery/consensus/getSystemStart.cddl
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jasagredo I se you added this tool. How should I try using this? How do you imagine the developer experience overall?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now this tool gets all the contents of the CDDLs but it does nothing with them. I am using it locally to debug the CBOR validator I'm trying to implement in cuddle.
Description
Add CDDL definitions for types that Consensus emits.