-
Notifications
You must be signed in to change notification settings - Fork 721
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
Add CBOR pretty print and validation commands to cardano-cli
#545
Conversation
0789dfc
to
df16374
Compare
70c17e2
to
d4333b6
Compare
d4333b6
to
305931a
Compare
305931a
to
e8fc296
Compare
d049daa
to
2c81333
Compare
97: Update `cborg` dependency to include pretty printing fix r=Jimbo4350 a=Jimbo4350 Required for IntersectMBO/cardano-node#545 Pretty printing fix: well-typed/cborg#223 Co-authored-by: Jordan Millar <[email protected]>
2c81333
to
675ffc2
Compare
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.
This looks ok, but I think we should consider the following:
What we're doing in this patch is adding two intertwined features: validating the parsing of a byron block or tx, and pretty-printing a CBOR file. These things can be separate. We can parse any syntactically valid CBOR file completely generically (as a CBOR Term
) without needing to know if it is a tx or a block or a CBOR representation of a cat.
So perhaps we should split this into a command to read and print any CBOR file, and separatly a command to validate a byron tx, or a byron block etc.
66b2e5b
to
70a41c5
Compare
cardano-cli
cardano-cli
70a41c5
to
4aa2a93
Compare
4aa2a93
to
4c8f8f3
Compare
bors r+ |
Merge conflict |
2f77d86
to
4bace2d
Compare
…a blocks, delegation certificates, txs and update proposals.
4bace2d
to
40d6974
Compare
bors r+ |
Build succeeded |
Issue
Add command to decode cbor #503
This PR adds two commands to
cardano-cli
, apretty-print-cbor
command which pretty prints a given CBOR encoded file and avalidate-cbor
command which validates the CBOR encoding of a given file. Thevalidate-cbor
command currently supports Byron era blocks, delegation certificates, txs and update proposals.Required: Update
cborg
dependency to include pretty printing fix cardano-prelude#97Required: Update
pprint
to handle allTokens
well-typed/cborg#223checklist
This PR contains all the work required to resolve the linked issue.
This PR results in breaking changes to upstream dependencies.
The work contained has sufficient documentation to describe what it does and how to do it.
The work has sufficient tests and/or testing.
I have committed clear and descriptive commits. Be considerate as somebody else will have to read these.
I have added the appropriate labels to this PR.