-
Notifications
You must be signed in to change notification settings - Fork 86
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
Introduce command-line tool to dump blocks as JSON #4335
Introduce command-line tool to dump blocks as JSON #4335
Conversation
## Usage | ||
|
||
``` | ||
Usage: block-tool [--file-in FILE | --db-directory DIR --config FILE |
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 make sense to refer to the output of block-tool -h
to avoid repeating the text here?
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.
Sort of, yes. My goal here was more to convey a sense of what this tool looks like.
Thanks for your review @dnadales and the approval! However this is just a draft in order to get early feedback from experts, I don't plan to merge this PR as-is if only because it has no tests :) I will take your approval as a sign this effort is worthwhile to pursue. |
18cf975
to
cac6382
Compare
7e1ed4a
to
481d86e
Compare
Should I do something for this to be merged? |
I'd say let's merge this, announce it to other teams, and document it in |
bors+ |
Also rename db-analyser's documentation
Co-authored-by: Damian Nadales <damian.nadales@gmail.com>
These are marked "for testing only" in the Byron source files but :shrug:
481d86e
to
ea50d92
Compare
Description
This PR introduces a command-line utility to be able to dump some random CBOR encoded block content as a more human-readable JSON data structure. It can also extract an arbitrary block from a node's immutable DB and dump its content.
The motivation for this PR came when we were troubleshooting some incident on the network with @JaredCorduan @disassembler and others and realised we did not have any tool handy to read the raw content of a block.
Early feedback from Consensus experts:
Known limitations:
It's does not cover eras prior to Alonzo,Code format does not respect ouroboros-network's conventionsChecklist
changelog.d
directory created usingscriv
. If in doubt, see the Consensus release process.interface-CHANGELOG.md