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 module readme #1052

Merged
merged 12 commits into from
Nov 25, 2022
Merged

Conversation

rach-id
Copy link
Member

@rach-id rach-id commented Nov 22, 2022

Overview

Closes #501

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 C: QGB labels Nov 22, 2022
@rach-id rach-id self-assigned this Nov 22, 2022
x/qgb/README.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@rootulp rootulp left a comment

Choose a reason for hiding this comment

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

No blocking feedback but I think the links in the doc could use link text to make the markdownlint rule pass

x/qgb/README.md Outdated Show resolved Hide resolved
x/qgb/README.md Outdated Show resolved Hide resolved
x/qgb/README.md Outdated Show resolved Hide resolved
x/qgb/README.md Outdated Show resolved Hide resolved
x/qgb/README.md Outdated Show resolved Hide resolved
rach-id and others added 3 commits November 22, 2022 17:38
Co-authored-by: Rootul P <rootulp@gmail.com>
Co-authored-by: Rootul P <rootulp@gmail.com>
Co-authored-by: Rootul P <rootulp@gmail.com>
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.

I like keeping what used to be in the spec folder just in the main readme a ton!!

x/qgb/README.md Outdated Show resolved Hide resolved
x/qgb/README.md Outdated Show resolved Hide resolved
x/qgb/README.md Outdated Show resolved Hide resolved
x/qgb/README.md Show resolved Hide resolved
rootulp
rootulp previously approved these changes Nov 23, 2022
Copy link
Collaborator

@rootulp rootulp left a comment

Choose a reason for hiding this comment

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

:shipit:

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.

Thanks for incorporating the suggested changes earlier, I still have some nit picks tho that I think we should handle before merging. We don't have to use only the suggestions listed here, but I do think we can clean up a few minor things.

x/qgb/README.md Outdated

#### Data commitment panics

During EndBlock, if the block height corresponds to a `DataCommitmentWindow`, it will generate a new data commitment, during which, the state machine can panic, if it finds invalid state, in the following case:
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
During EndBlock, if the block height corresponds to a `DataCommitmentWindow`, it will generate a new data commitment, during which, the state machine can panic, if it finds invalid state, in the following case:
During EndBlock, if the block height corresponds to a `DataCommitmentWindow`, it will generate a new data commitment. Note that the state machine can panic if invalid state is introduced.

I would also then either remove
- An unexpected behavior happened while getting the current data commitment:
or clarify with more precise details of what could cause that. Like if the last nonce's key is missing or something not sure. Also, if we only have a single entry, I'm not sure we need a list

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'll remove the data commitment panic section because currently, the GetDataCommitment will never return an error => no panics.

x/qgb/README.md Outdated

#### Valset panics

Similar to data commitments, when checking if the state machine needs to generate a new valset, it might panic, if it finds invalid state, in the following cases:
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Similar to data commitments, when checking if the state machine needs to generate a new valset, it might panic, if it finds invalid state, in the following cases:
Note that, similar to data commitments, the state machine can panic if the required valset is not stored in the state db.

Copy link
Member Author

Choose a reason for hiding this comment

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

doesn't it make sense to keep the list? we have three cases where the state machine can panic...

x/qgb/README.md Show resolved Hide resolved
x/qgb/README.md Outdated Show resolved Hide resolved
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.

my mistake! I didn't see the other list items between the code until I rendered the file 🙈

@rach-id rach-id merged commit c92cc8d into celestiaorg:main Nov 25, 2022
@rach-id rach-id deleted the qgb_module_readme branch November 25, 2022 09:10
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.

QGB investigate the EndBlocker panics and document them
3 participants