-
Notifications
You must be signed in to change notification settings - Fork 278
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
docs: add QGB verify command docs #1287
Merged
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
601461c
docs: add QGB verify command docs
rach-id f10c8e2
Update x/qgb/README.md
rach-id 9245044
Update x/qgb/README.md
rach-id dc61ae6
chore: msg -> blob
rach-id 3106431
chore: msg -> blob
rach-id 438bcc1
Update x/qgb/README.md
rach-id de21d45
Update x/qgb/README.md
rach-id File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -118,6 +118,42 @@ if k.CheckLatestAttestationNonce(ctx) && k.GetLatestAttestationNonce(ctx)+1 != n | |
} | ||
``` | ||
|
||
## Verification command | ||
|
||
The QGB verification command is part of the `celestia-appd` binary. It allows the user to verify that a set of shares has been posted to a specific QGB contract. | ||
|
||
```shell | ||
$ celestia-appd verify --help | ||
|
||
Verifies that a transaction hash, a range of shares, or a blob referenced by its transaction hash were committed to by the QGB contract | ||
|
||
Usage: | ||
celestia-appd verify [command] | ||
|
||
Available Commands: | ||
blob Verifies that a blob, referenced by its transaction hash, in hex format, has been committed to by the QGB contract. Only supports one blob for now | ||
shares Verifies that a range of shares has been committed to by the QGB contract | ||
tx Verifies that a transaction hash, in hex format, has been committed to by the QGB contract | ||
|
||
Flags: | ||
-h, --help help for verify | ||
|
||
Global Flags: | ||
--home string directory for config and data (default "/home/midnight/.celestia-app") | ||
--log_format string The logging format (json|plain) (default "plain") | ||
--log_level string The logging level (trace|debug|info|warn|error|fatal|panic) (default "info") | ||
--trace print out full stack trace on errors | ||
|
||
Use "celestia-appd verify [command] --help" for more information about a command. | ||
|
||
``` | ||
|
||
It currently supports three sub-commands: | ||
|
||
- `blob`: Takes a transaction hash, in hex format, and verifies that the blob that has been posted using it has been committed to, by the QGB contract. It only supports one blob for now. | ||
rach-id marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- `shares`: Takes a shares range and a height, and verifies that these former have been committed to by the QGB contract. | ||
rach-id marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- `tx`: Takes a transaction hash, in hex format, and verifies that it has been committed to by the QGB contract. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above |
||
|
||
## Useful links | ||
|
||
The smart contract implementation is in [quantum-gravity-bridge](https://github.com/celestiaorg/quantum-gravity-bridge/). | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
[non-blocking] This code snippet may become out of date with the true
--help
docs so instead of copy + pasting the entire help output, I think it may be preferable to include the text that isn't the code snippet and at the bottom say something like:See the following command for more details
and then ensure that these docs make it into the appropriate
--help
docsThere 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.
What do you think is better for docs, providing the commands but without an output, or the commands + their output (that might be outdated after some time)?
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.
I personally think the latter is better, and we should just update the docs to reflect the new flags/arguments later
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.
In this scenario: providing the commands but without an output. I think this because the goal of the README is to give developers a high level overview of the QGB module. Developers aren't necessarily users of the QGB module CLI. Users of the QGB CLI should be able to get information on CLI flags via
--help
and I expect them to try that before finding this README.Also (repeated from above): the command output becomes a maintenance burden but I defer to you @sweexordious
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.
I guess we can leave it as it is for now, with the help output. And, if it becomes a burden later, we can remove it.
Thanks guys for your help 👍 👍