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

docs: add QGB verify command docs #1287

Merged
merged 7 commits into from
Jan 31, 2023
Merged

Conversation

rach-id
Copy link
Member

@rach-id rach-id commented Jan 24, 2023

Overview

Closes #1254

We could add more documentation after executing the command to give an example output, but I guess it's better to do it after we have mocked QGB deployed so that we have the same output as users.

Checklist

  • New and updated code has appropriate documentation
  • New and updated code has new and/or updated testing
  • Required CI checks are passing
  • Visual proof for any user facing features like CLI or documentation updates
  • Linked issues closed with keywords

@rach-id rach-id added documentation Improvements or additions to documentation x/qgb labels Jan 24, 2023
@rach-id rach-id self-assigned this Jan 24, 2023
@MSevey MSevey requested a review from a team January 24, 2023 17:06
x/qgb/README.md Outdated Show resolved Hide resolved
x/qgb/README.md Outdated Show resolved Hide resolved
x/qgb/README.md Outdated

It currently supports three sub-commands:

- `msg`: Takes a transaction hash, in hex format, and verifies that the message that has been posted using it has been committed to, by the QGB contract. It only supports one message for now.
Copy link
Collaborator

Choose a reason for hiding this comment

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

[question] how is this different from the tx subcommand? Does it verify that the blob shares associated with a BlobTx were committed to? If so should this use blob instead of msg?

Copy link
Member Author

Choose a reason for hiding this comment

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

the tx verifies that the transaction carrying the blob was committed to, in the tx namespace.

If so should this use blob instead of msg

100%, thanks a lot for spotting these. I prepared these PRs before the renaming and I missed renaming some places, will change now.

Copy link
Member Author

Choose a reason for hiding this comment

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

#1289 updating the command too

rach-id and others added 2 commits January 24, 2023 19:02
Co-authored-by: Rootul P <rootulp@gmail.com>
Co-authored-by: Rootul P <rootulp@gmail.com>
@MSevey MSevey requested a review from a team January 24, 2023 18:03
rootulp
rootulp previously approved these changes Jan 24, 2023
x/qgb/README.md Outdated Show resolved Hide resolved
x/qgb/README.md Outdated Show resolved Hide resolved
rach-id and others added 2 commits January 24, 2023 22:29
Co-authored-by: Rootul P <rootulp@gmail.com>
Co-authored-by: Rootul P <rootulp@gmail.com>
@MSevey MSevey requested a review from a team January 24, 2023 21:29
@rach-id rach-id requested a review from rootulp January 24, 2023 21:45
Comment on lines +125 to +126
```shell
$ celestia-appd verify --help
Copy link
Collaborator

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

celestia-appd verify --help

and then ensure that these docs make it into the appropriate --help docs

Copy link
Member Author

@rach-id rach-id Jan 24, 2023

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)?

Copy link
Contributor

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

Copy link
Collaborator

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)?

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

Copy link
Member Author

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 👍 👍

Comment on lines +125 to +126
```shell
$ celestia-appd verify --help
Copy link
Contributor

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


It currently supports three sub-commands:

- `blob`: Takes a transaction hash, in hex format, and verifies that the blob paid for by the transaction has been committed to by the QGB contract. It only supports one blob for now.
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this specify that a prefix is needed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Which prefix? A transaction hash in hex format is something like: 7826D5310CD007F82B918359D74A853B4ECB6633E9F231C5477B7F21D68D642D if I am not missing something

Copy link
Contributor

Choose a reason for hiding this comment

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

Nvm, I was wrong. Maybe we should still specify that no prefix is required


- `blob`: Takes a transaction hash, in hex format, and verifies that the blob paid for by the transaction has been committed to by the QGB contract. It only supports one blob for now.
- `shares`: Takes a range of shares and a height, and verifies that these shares have been committed to by the QGB contract.
- `tx`: Takes a transaction hash, in hex format, and verifies that it has been committed to by the QGB contract.
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above

Copy link
Member

@evan-forbes evan-forbes left a comment

Choose a reason for hiding this comment

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

nice, 👍

might also want to link to nmt/rsmt2d/specs, and eventually a diagram would likely be useful to show precising what inclusion proofs are being used for which proof since we're using two or three different proofs

x/qgb/README.md Show resolved Hide resolved
@evan-forbes
Copy link
Member

is this mergable @sweexordious ?

@rach-id
Copy link
Member Author

rach-id commented Jan 31, 2023

:shipit:

@rach-id rach-id merged commit 381b8ef into celestiaorg:main Jan 31, 2023
@rach-id rach-id deleted the qgb_verify_docs branch January 31, 2023 23:29
evan-forbes pushed a commit that referenced this pull request Feb 27, 2023
## Overview
Closes #1254

We could add more documentation after executing the command to give an
example output, but I guess it's better to do it after we have mocked
QGB deployed so that we have the same output as users.

## Checklist

<!-- 
Please complete the checklist to ensure that the PR is ready to be
reviewed.

IMPORTANT:
PRs should be left in Draft until the below checklist is completed.
-->

- [ ] New and updated code has appropriate documentation
- [ ] New and updated code has new and/or updated testing
- [ ] Required CI checks are passing
- [ ] Visual proof for any user facing features like CLI or
documentation updates
- [ ] Linked issues closed with keywords

---------

Co-authored-by: Rootul P <rootulp@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document QGB verify command usage
4 participants