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: adds documentation to proofs package #3245

Merged
merged 44 commits into from
Apr 8, 2024

Conversation

rach-id
Copy link
Member

@rach-id rach-id commented Apr 2, 2024

Overview

Adds documentation to the proofs package.

Closes #3120 and #1313

@rach-id rach-id added the documentation Improvements or additions to documentation label Apr 2, 2024
@rach-id rach-id self-assigned this Apr 2, 2024
@celestia-bot celestia-bot requested a review from a team April 2, 2024 23:18
Copy link
Contributor

coderabbitai bot commented Apr 2, 2024

Warning

Rate Limit Exceeded

@rach-id has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 14 minutes and 54 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.
Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.
Please see our FAQ for further information.

Commits Files that changed from the base of the PR and between 8891754 and 9b58805.

Walkthrough

This update provides documentation for the Celestia app's proof package, explaining proof queries for transactions and blobs in the Celestia network. It covers share commitment generation, inclusion proofs, Celestia square layout, and data root computation, ensuring data integrity through proof generation and verification.

Changes

File(s) Change Summary
pkg/proof/README.md Added documentation explaining proof queries for Celestia transactions and blobs, covering share commitment generation, inclusion proofs, Celestia square layout, and data root computation.

Assessment against linked issues

Objective Addressed Explanation
Docs for proof package (#3120)
Add a README (#3120)
Add a Go package comment (#3120) The summary does not mention the addition of a Go package comment, which was part of the proposal for issue #3120.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

Note: Auto-reply has been disabled for this repository by the repository owner. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

pkg/proof/README.md Outdated Show resolved Hide resolved
pkg/proof/README.md Outdated Show resolved Hide resolved
pkg/proof/README.md Outdated Show resolved Hide resolved
pkg/proof/README.md Outdated Show resolved Hide resolved
pkg/proof/README.md Outdated Show resolved Hide resolved
rach-id and others added 5 commits April 3, 2024 10:06
pkg/proof/README.md Outdated Show resolved Hide resolved
pkg/proof/README.md Outdated Show resolved Hide resolved
pkg/proof/README.md Outdated Show resolved Hide resolved
pkg/proof/README.md Outdated Show resolved Hide resolved
pkg/proof/README.md Outdated Show resolved Hide resolved
Comment on lines 102 to 104
when constructing the square.
This means
that it is possible to prove the inclusion of a blob to a set of row roots using the generated *share commitment*.
Copy link
Collaborator

Choose a reason for hiding this comment

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

what is structural wrapping?

@celestia-bot celestia-bot requested a review from a team April 3, 2024 19:02
evan-forbes
evan-forbes previously approved these changes Apr 4, 2024
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.

a few minor things left that I do think we could benefit from changing, but none that are blocking

pkg/proof/README.md Outdated Show resolved Hide resolved
pkg/proof/README.md Outdated Show resolved Hide resolved
pkg/proof/README.md Outdated Show resolved Hide resolved
pkg/proof/README.md Outdated Show resolved Hide resolved
@rach-id rach-id enabled auto-merge (squash) April 5, 2024 10:07
evan-forbes
evan-forbes previously approved these changes Apr 5, 2024
@rootulp rootulp self-requested a review April 5, 2024 14:28
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.

This still results in markdownlint errors for me:

$ make lint
--> Running golangci-lint
--> Running markdownlint
pkg/proof/README.md:5 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2]
pkg/proof/README.md:20:32 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1]
pkg/proof/README.md:82:161 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1]
pkg/proof/README.md:89:62 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1]
pkg/proof/README.md:135:56 MD026/no-trailing-punctuation Trailing punctuation in heading [Punctuation: ':']
pkg/proof/README.md:138:109 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1]
pkg/proof/README.md:149:102 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1]
pkg/proof/README.md:198:194 MD047/single-trailing-newline Files should end with a single newline character
make: *** [lint] Error 1

[blocking] fix markdowlint issues
[not blocking but nice] remove all the random unnecessary new lines

pkg/proof/README.md Outdated Show resolved Hide resolved
pkg/proof/README.md Outdated Show resolved Hide resolved
pkg/proof/README.md Outdated Show resolved Hide resolved
Comment on lines 102 to 104
when constructing the square.
This means
that it is possible to prove the inclusion of a blob to a set of row roots using the generated *share commitment*.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we disable that feature, it makes this content difficult to read. Also why did it add a newline after "means" here:

This means
that it is possible to prove the inclusion of a blob to a set of row roots using the generated *share commitment*.

@rootulp
Copy link
Collaborator

rootulp commented Apr 5, 2024

@rach-id does this PR close #2622 or #1313?

pkg/proof/README.md Outdated Show resolved Hide resolved
pkg/proof/README.md Outdated Show resolved Hide resolved
@rach-id rach-id linked an issue Apr 8, 2024 that may be closed by this pull request
@rach-id
Copy link
Member Author

rach-id commented Apr 8, 2024

@rootulp Removed new lines. Now each sentence is in a new line. Re-review please when you have time

pkg/proof/README.md Show resolved Hide resolved
pkg/proof/README.md Show resolved Hide resolved
pkg/proof/README.md Show resolved Hide resolved
pkg/proof/README.md Show resolved Hide resolved
pkg/proof/README.md Show resolved Hide resolved
@rootulp rootulp self-requested a review April 8, 2024 14:15
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.

Thanks for persisting through several rounds of feedback. TBH this still results in markdownlint issues for me:

$ make lint
--> Running golangci-lint
--> Running markdownlint
pkg/proof/README.md:11:256 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1]
pkg/proof/README.md:14:32 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1]
pkg/proof/README.md:21:190 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1]
pkg/proof/README.md:63:239 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1]
pkg/proof/README.md:69:127 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1]
pkg/proof/README.md:78:126 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1]
pkg/proof/README.md:88:224 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1]
pkg/proof/README.md:106:56 MD026/no-trailing-punctuation Trailing punctuation in heading [Punctuation: ':']
pkg/proof/README.md:109:109 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1]
pkg/proof/README.md:119:102 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1]
make: *** [lint] Error 1

but given CI isn't complaining, maybe it's unique to me? I have the same version of markdownlint installed locally as the one in CI. Ref: https://github.com/rach-id/celestia-app/blob/9b5880517a00316cc52874d0e500205257ee1acc/.github/workflows/markdown-linter.yml#L18

$ markdownlint --version
0.39.0

@rach-id rach-id merged commit b234def into celestiaorg:main Apr 8, 2024
33 checks passed
@rach-id
Copy link
Member Author

rach-id commented Apr 8, 2024

@rootulp Let's create an issue for that

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.

Docs for proof package Document the share inclusion proofs
3 participants