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: improve x/upgrade docs #3224

Merged
merged 6 commits into from
Apr 5, 2024
Merged

Conversation

rootulp
Copy link
Collaborator

@rootulp rootulp commented Mar 29, 2024

Closes #3223

x/upgrade README format inspired by https://docs.cosmos.network/v0.50/build/spec/SPEC_MODULE

FLUPs

  1. Can we move some of the unit tests from tally_test.go to keeper_test.go?
  2. Why does ResetTally only delete versions less than the current version? Why not delete all versions in the map?

@rootulp rootulp self-assigned this Mar 29, 2024
Copy link
Contributor

coderabbitai bot commented Apr 1, 2024

Walkthrough

Walkthrough

The changes primarily focus on refining documentation, comments, and code clarity across various components related to the x/upgrade module in the Celestia codebase. Enhancements include updating descriptions for better understanding of upgrade processes, removing outdated information, and improving the structure and clarity of test cases and code comments. Additionally, modifications support the shift towards a more structured upgrade mechanism that leverages on-chain signaling alongside social consensus for network upgrades.

Changes

Files Change Summary
proto/celestia/upgrade/v1/query.proto Refining service descriptions and messages for clarity in upgrade querying process.
proto/celestia/upgrade/v1/tx.proto Refining comments in the Msg service for better understanding of upgrade processes.
specs/src/specs/params.md Removing a note about mint module parameters being non-governance modifiable.
x/upgrade/README.md Documentation updates emphasizing new upgrade mechanisms and module fork details.
x/upgrade/cli/cli_test.go, x/upgrade/cli/query.go, x/upgrade/cli/tx.go Updates to CLI messages and commands for clarity and consistency.
x/upgrade/ibc.go, x/upgrade/keeper.go, x/upgrade/module.go, x/upgrade/types/codec.go Code and comment refinements for clarity and consistency in upgrade processes.
x/upgrade/legacy_test.go, x/upgrade/tally_test.go Test case updates and refinements for better organization and clarity.

Assessment against linked issues

Objective Addressed Explanation
Improve docs for x/upgrade (#3223)
Update x/upgrade README section regarding off-chain social consensus (#3223)
Remove outdated link and replace with a merged PR link in x/upgrade README (#3223) The summary does not mention updating or replacing links in the README.
Add a link to CIP-10 in the x/upgrade README (#3223) The changes summary does not explicitly mention adding a link to CIP-10.

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/coderabbit-overrides.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.

x/upgrade/README.md Outdated Show resolved Hide resolved
@celestia-bot celestia-bot requested a review from a team April 2, 2024 14:15
@rootulp rootulp requested a review from cmwaters April 2, 2024 14:15
Copy link
Contributor

@staheri14 staheri14 left a comment

Choose a reason for hiding this comment

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

Nice additions to the docs!

@cmwaters
Copy link
Contributor

cmwaters commented Apr 5, 2024

Can we move some of the unit tests from tally_test.go to keeper_test.go?

Yeah we can if you want

Why does ResetTally only delete versions less than the current version? Why not delete all versions in the map?

I guess the one case is if you've already voted for v3 before upgrading to v2. Then you'd have to revote because it would be deleted. But this is not really an expected use case so I have nothing against deleting all the versions in the map

@rootulp
Copy link
Collaborator Author

rootulp commented Apr 5, 2024

I guess the one case is if you've already voted for v3 before upgrading to v2. Then you'd have to revote because it would be deleted. But this is not really an expected use case so I have nothing against deleting all the versions in the map

If the current app version is v1 and someone tries to vote for v3, I think it will be rejected here so I wouldn't expect the map to have votes for a version higher than v2.

@rootulp rootulp merged commit 02009bc into celestiaorg:main Apr 5, 2024
34 checks passed
@rootulp rootulp deleted the rp/docs-upgrades branch April 5, 2024 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve docs for x/upgrade
4 participants