-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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 environment documentation link and description #23330
Conversation
📝 WalkthroughWalkthroughThe pull request introduces extensive modifications to the Cosmos SDK documentation, particularly the upgrading guide. Key changes include the removal of the Changes
Possibly related PRs
Suggested Labels
Suggested Reviewers
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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 using PR comments)
Other keywords and placeholders
Documentation and Community
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (4)
UPGRADING.md (4)
339-339
: Fix grammatical error in environment documentation.The sentence structure needs improvement for better clarity.
-Learn more about environment in the [core/appmodule/v2/environment.go](core/appmodule/v2/environment.go) file. +Learn more about the environment in the [core/appmodule/v2/environment.go](core/appmodule/v2/environment.go) file.
Line range hint
1-24
: Add version compatibility matrix.Consider adding a compatibility matrix at the beginning of the document to help users quickly determine the upgrade path based on their current version.
Add a section like this at the beginning:
## Version Compatibility Matrix | From Version | To Version | Upgrade Path | |-------------|------------|--------------| | v0.50.x | v0.52.x | Direct | | v0.47.x | v0.52.x | Must upgrade to v0.50.x first |
Line range hint
471-484
: Improve clarity of Vote Extensions documentation.The Vote Extensions section should provide more context about what they are and their importance.
Add an explanation paragraph before the technical details:
Vote Extensions allow validators to include additional data with their precommit votes during consensus. This feature enables advanced functionalities like threshold decryption, random beacon, and other protocols that require validators to commit to additional data during block finalization.
Line range hint
599-627
: Add missing configuration example for gRPC-Web nginx setup.The gRPC-Web section mentions using nginx as a reverse proxy but doesn't provide a configuration example.
Add a basic nginx configuration example:
Example nginx configuration for gRPC-Web: ```nginx server { listen 9090; server_name localhost; location / { proxy_pass http://localhost:1317; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $host; } }
📜 Review details
Configuration used: .coderabbit.yml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
UPGRADING.md
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
UPGRADING.md (1)
Pattern **/*.md
: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Summary
🔇 Additional comments (1)
UPGRADING.md (1)
Line range hint
628-630
: Provide database migration guidance.The database support section removes several database backends but doesn't provide specific migration guidance.
Add specific migration tools and steps for each unsupported database:
### Database Migration Tools * From LevelDB/BoltDB to GoLevelDB: Use [cosmos-db-migrate](https://github.com/cosmos/cosmos-db-migrate) * From BadgerDB to GoLevelDB: Use [badger-to-goleveldb](https://github.com/cosmos/tools/tree/master/cmd/badger-to-goleveldb) Example migration command:
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
UPGRADING.md (1)
339-339
: Enhance environment documentation with more detailsThe documentation about the Environment struct could be improved by:
- Adding examples of how to use each service (logging, event handling, etc.)
- Clarifying when a module might want to skip store creation
- Providing a link to example modules that demonstrate proper environment usage
-Learn more about environment in the [core/appmodule/v2/environment.go](core/appmodule/v2/environment.go) file. The Environment struct provides essential services to modules including logging, event handling, gas metering, header access, routing, and both KV and memory store services. Given the fields of environment, this means runtime creates a kv store service for all modules by default. It can happen that some modules do not have a store necessary (such as `x/auth/tx` for instance). In this case, the store creation should be skipped in `app_config.go`: +Learn more about environment in the [core/appmodule/v2/environment.go](core/appmodule/v2/environment.go) file. The Environment struct provides essential services to modules: + +* Logging: Structured logging with module context +* Event Handling: Emit and handle module-specific events +* Gas Metering: Track and manage gas consumption +* Header Access: Read block header information +* Routing: Message and query routing between modules +* Store Services: Both KV and memory store capabilities + +By default, runtime creates a KV store service for all modules. However, some modules (like `x/auth/tx`) don't require persistent storage. For such modules, skip store creation in `app_config.go`:
📜 Review details
Configuration used: .coderabbit.yml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
UPGRADING.md
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
UPGRADING.md (1)
Pattern **/*.md
: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Summary
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.
Actionable comments posted: 0
🧹 Nitpick comments (2)
UPGRADING.md (2)
339-339
: Fix the markdown link syntax.The markdown link syntax is incorrect. The closing square bracket and opening parenthesis should be adjacent.
-The 'Environment struct provides essential services](https://docs.cosmos.network/main/learn/advanced/core#environment) +The [Environment struct provides essential services](https://docs.cosmos.network/main/learn/advanced/core#environment)
Line range hint
339-349
: Enhance documentation clarity and formatting.The documentation about the Environment struct and store services could be improved for better readability and understanding.
-The 'Environment struct provides essential services](https://docs.cosmos.network/main/learn/advanced/core#environment) to modules including logging, event handling, gas metering, header access, routing, and both KV and memory store services. Given the fields of environment, this means runtime creates a kv store service for all modules by default. It can happen that some modules do not have a store necessary (such as `x/auth/tx` for instance). In this case, the store creation should be skipped in `app_config.go`: +The [Environment struct](https://docs.cosmos.network/main/learn/advanced/core#environment) provides essential services to modules, including: + +* Logging +* Event handling +* Gas metering +* Header access +* Routing +* KV and memory store services + +By default, runtime creates a KV store service for all modules. However, some modules (such as `x/auth/tx`) may not require a store. In such cases, store creation can be skipped in `app_config.go`:
📜 Review details
Configuration used: .coderabbit.yml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
UPGRADING.md
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
UPGRADING.md (1)
Pattern **/*.md
: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Summary
Co-authored-by: Julien Robert <[email protected]> (cherry picked from commit 1b5b338)
…3330) (#23337) Co-authored-by: GarmashAlex <[email protected]>
Closes: #XXXX (Note: Since we don't have a specific issue number, this would be filled with actual issue number if exists)
This PR improves the documentation in UPGRADING.md by replacing a TODO placeholder with comprehensive documentation about the Environment struct and its services. The changes include:
This PR adds proper documentation for the Environment struct in the
UPGRADING.md file, replacing a TODO placeholder. The added documentation
helps developers understand the essential services provided to modules
through the Environment struct, including logging, event handling,
gas metering, header access, routing, and store services.
This documentation helps developers better understand the module environment system when upgrading their applications to the latest version.
The change improves developer experience by providing clear information about the module environment system directly in the upgrade guide, making it easier for developers to understand and implement the necessary changes during upgrades.
!
in the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
Please see Pull Request Reviewer section in the contributing guide for more information on how to review a pull request.
I have...
Summary by CodeRabbit
Release Notes
This PR adds proper documentation for the Environment struct in the
UPGRADING.md file, replacing a TODO placeholder. The added documentation
helps developers understand the essential services provided to modules
through the Environment struct, including logging, event handling,
gas metering, header access, routing, and store services.
Summary by CodeRabbit
Release Notes
Breaking Changes
x/params
modulex/crisis
moduleNew Features
x/protocolpool
modulex/validate
moduleSignMode Textual
featureMigration Guidance
Developers should carefully review the upgrading documentation for detailed migration instructions.