Skip to content

Conversation

@heksan-ui
Copy link
Contributor

@heksan-ui heksan-ui commented Aug 11, 2025

Description

  • Corrected subject-verb agreement and article usage
  • Fixed punctuation and sentence structure issues
  • Improved clarity of technical explanations
  • Updated 8 documentation files for better readability

Summary by CodeRabbit

  • Documentation
    • Improved grammar, clarity, and formatting across multiple module-building guides and tooling docs.
    • Added a Buf Workspace section explaining repository-level workspaces and clarified proto layout wording.
    • Updated guidance to note BeginBlocker/EndBlocker can emit events via the context’s EventManager.
    • Fixed code fence delimiters and minor wording in flags, simulator, and testing sections.
    • Consolidated/removal of an extraneous note about amino annotations and corrected example backticks.
    • Various small phrasing corrections (e.g., “endpoints,” “based on,” pluralization).

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 11, 2025

📝 Walkthrough

Walkthrough

Documentation-only updates across multiple build docs: grammar, wording, and formatting corrections; one note replaced about BeginBlocker/EndBlocker event emission; added a Buf “Workspace” subsection and minor clarifications in tooling docs. No code, interfaces, or public APIs are modified.

Changes

Cohort / File(s) Change Summary
Building Modules docs — grammar/wording fixes
docs/.../building-modules/05-protobuf-annotations.md, docs/.../building-modules/06-keeper.md, docs/.../building-modules/08-genesis.md, docs/.../building-modules/11-structure.md, docs/.../building-modules/14-simulator.md, docs/.../building-modules/15-depinject.md, docs/.../building-modules/16-testing.md, docs/.../building-modules/17-preblock.md
Grammar/readability edits, minor phrasing corrections, and minor formatting fixes; no functional changes.
BeginBlock/EndBlock doc update
docs/.../building-modules/06-beginblock-endblock.md
Grammar fix; replaced note about triggering state-transitions with note on emitting events via ctx.EventManager.
Module interfaces formatting fix
docs/.../building-modules/09-module-interfaces.md
Markdown code fence delimitation corrected for a URL block.
Tooling — Buf and proto docs
docs/.../tooling/00-protobuf.md
Added Buf “Workspace” subsection; multiple small grammar/clarity fixes (proto layout, swagger endpoints, buf.lock wording).
Packages README
docs/.../packages/README.md
Single grammar correction (“can be used”).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~7 minutes

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. 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 explain this code block.
  • 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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration 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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

🔭 Outside diff range comments (1)
docs/docs/build/building-modules/05-protobuf-annotations.md (1)

69-75: Fix incorrect example: show method/field/message variants.
The block repeats method_added_in three times; it should demonstrate the three distinct annotations discussed above.

-```proto
-option (cosmos_proto.method_added_in) = "cosmos-sdk v0.50.1";
-option (cosmos_proto.method_added_in) = "x/epochs v1.0.0";
-option (cosmos_proto.method_added_in) = "simapp v24.0.0";
-```
+```proto
+option (cosmos_proto.method_added_in)  = "cosmos-sdk v0.50.1";
+option (cosmos_proto.field_added_in)   = "x/epochs v1.0.0";
+option (cosmos_proto.message_added_in) = "simapp v24.0.0";
+```
🧹 Nitpick comments (14)
docs/docs/build/building-modules/15-depinject.md (1)

39-39: Tighten phrasing: “is able to decide” → “can decide”

Shorter and equally clear.

-  Taking `group` as an example, a chain developer is able to decide, thanks to `uint64 max_metadata_len`, what the maximum metadata length allowed for a group proposal is.
+  Taking `group` as an example, a chain developer can decide, thanks to `uint64 max_metadata_len`, what the maximum metadata length allowed for a group proposal is.
docs/docs/build/building-modules/16-testing.md (2)

10-10: Use “similarly” for concision

Reads more naturally.

-It is advised, as a chain developer, to test your application and modules in a similar way to the SDK.
+As a chain developer, test your application and modules similarly to the SDK.

49-49: Optional: more direct voice

Consider addressing the reader directly.

-We can then create unit tests using the newly created `Keeper` instance.
+You can then create unit tests using the newly created `Keeper` instance.
docs/docs/build/building-modules/08-genesis.md (2)

20-20: Tighten wording; avoid repeated “defined”.
Current sentence repeats “defined” and is a bit clunky.

-The subset of the genesis state defined by a given module is generally defined in a `genesis.proto` file ([more info](../../learn/advanced/05-encoding.md#gogoproto) on how to define protobuf messages). The struct defining the module's subset of the genesis state is usually called `GenesisState` and contains all the module-related values that need to be initialized during the genesis process.
+A module’s subset of the genesis state is generally specified in a `genesis.proto` file ([more info](../../learn/advanced/05-encoding.md#gogoproto) on how to define protobuf messages). The struct for this subset is usually called `GenesisState` and contains all module-related values that must be initialized during genesis.

32-32: Clarify and de-redundify: “method is a function”; pluralize “values”.
Also keeps the sentence concise.

-The `DefaultGenesis()` method is a simple function that calls the constructor function for `GenesisState` with the default value for each parameter. See an example from the `auth` module:
+The `DefaultGenesis()` function constructs a `GenesisState` with default values for each parameter. See an example from the `auth` module:
docs/docs/build/building-modules/06-beginblock-endblock.md (2)

21-21: Improve accuracy and grammar (ABCI++ names; simplify “prior to”).
Use the proper ABCI++ method names and tighten the phrasing.

-In 0.47.0, Prepare and Process Proposal were added that allow app developers to do arbitrary work at those phases, but they do not influence the work that will be done in BeginBlock. If an application requires `BeginBlock` to execute prior to any sort of work is done then this is not possible today (0.50.0). 
+In v0.47, `PrepareProposal` and `ProcessProposal` were added, allowing app developers to perform arbitrary work during those phases, but they do not affect what happens in `BeginBlock`. As of v0.50, requiring `BeginBlock` to execute before any work is done is not supported.

[ suggest_nitpick ]


28-30: Unify bullet phrasing; prefer “state transitions”; reference EventManager consistently.
Minor editorial pass for consistency and clarity.

-* They generally use the [`keeper`](./06-keeper.md) and [`ctx`](../../learn/advanced/02-context.md) to retrieve information about the latest state.
-* If needed, they use the `keeper` and `ctx` to trigger state-transitions.
-* If needed, they can emit [`events`](../../learn/advanced/08-events.md) via the `ctx`'s `EventManager`.
+* Generally use the [`keeper`](./06-keeper.md) and [`ctx`](../../learn/advanced/02-context.md) to read the latest state.
+* When needed, trigger state transitions via the `keeper` and `ctx`.
+* When needed, emit [`events`](../../learn/advanced/08-events.md) via `ctx.EventManager`.
docs/docs/build/building-modules/05-protobuf-annotations.md (4)

59-59: Name the option explicitly; fix grammar.
It’s the option that tools consume, not “the implement interface”.

-The implement interface is used to provide information to client tooling like [telescope](https://github.com/cosmology-tech/telescope) on how to encode and decode protobuf messages. 
+The `implements_interface` option provides information to client tooling (for example, [Telescope](https://github.com/cosmology-tech/telescope)) on how to encode and decode protobuf messages.

79-82: Avoid contradiction: codec removed vs. “provide information to the codec”.
Clarify that annotations exist for Amino-compatible JSON in clients; new modules need not use them.

-The amino codec was removed in `v0.50+`, this means there is no need to register `legacyAminoCodec`. To replace the amino codec, Amino protobuf annotations are used to provide information to the amino codec on how to encode and decode protobuf messages. 
-
-Amino annotations are only used for backwards compatibility with amino. New modules are not required to use amino annotations.
+The Amino codec was removed in `v0.50+`, so there is no need to register `legacyAminoCodec`. For backward compatibility, use Amino protobuf annotations to guide Amino‑compatible JSON encoding/decoding in clients.
+
+Amino annotations exist only for backward compatibility; new modules are not required to use them.

87-91: Trim wordiness (“in order for them to”).

-Name specifies the amino name that would show up for the user in order for them to see which message they are signing.
+Name specifies the Amino name that appears to users so they can see which message they are signing.

99-103: Trim wordiness; mirror “Name” phrasing.

-Field name specifies the amino name that would show up for the user in order for them to see which field they are signing.
+Field_Name specifies the Amino name that appears to users so they can see which field they are signing.
docs/docs/build/tooling/00-protobuf.md (3)

25-25: Minor grammar/style: apostrophe, capitalization, article.

-[Buf](https://buf.build) is a protobuf tool that abstracts the need to use the complicated `protoc` toolchain on top of various other things that ensure you are using protobuf in accordance with the majority of the ecosystem. Within the cosmos-sdk repository there are a few files that have a buf prefix. Lets start with the top level and then dive into the various directories. 
+[Buf](https://buf.build) is a protobuf tool that abstracts the need to use the complicated `protoc` toolchain, and it helps ensure your usage aligns with the broader ecosystem. Within the Cosmos SDK repository, there are a few files with a Buf prefix. Let's start at the top level and then dive into the various directories.

81-81: Tighten terminology: queries/messages; Query/Msg services.

-`buf.gen.swagger.yaml` generates the swagger documentation for the query and messages of the chain. This will only define the REST API endpoints that were defined in the query and msg servers. You can find examples of this [here](https://github.com/cosmos/cosmos-sdk/blob/main/proto/cosmos/bank/v1beta1/query.proto#L19)
+`buf.gen.swagger.yaml` generates Swagger documentation for the chain’s queries and messages. It only defines REST API endpoints exposed by the Query and Msg services. You can find examples [here](https://github.com/cosmos/cosmos-sdk/blob/main/proto/cosmos/bank/v1beta1/query.proto#L19).

93-93: Clarify intent of buf.lock guidance.
Make it explicit you shouldn’t copy the SDK’s lock file.

-This is an autogenerated file based on the dependencies required by the `.gen` files. There is no need to copy the current one. If you depend on cosmos-sdk proto definitions a new entry for the Cosmos SDK will need to be provided. The dependency you will need to use is `buf.build/cosmos/cosmos-sdk`.
+This is an autogenerated file based on the dependencies required by the `.gen` files. You don’t need to copy the Cosmos SDK’s lock file; generate your own. If you depend on Cosmos SDK proto definitions, ensure an entry for `buf.build/cosmos/cosmos-sdk` is present.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Knowledge Base: Disabled due to Reviews > Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between a656211 and 47aea45.

📒 Files selected for processing (12)
  • docs/docs/build/building-modules/05-protobuf-annotations.md (4 hunks)
  • docs/docs/build/building-modules/06-beginblock-endblock.md (1 hunks)
  • docs/docs/build/building-modules/06-keeper.md (1 hunks)
  • docs/docs/build/building-modules/08-genesis.md (2 hunks)
  • docs/docs/build/building-modules/09-module-interfaces.md (1 hunks)
  • docs/docs/build/building-modules/11-structure.md (1 hunks)
  • docs/docs/build/building-modules/14-simulator.md (1 hunks)
  • docs/docs/build/building-modules/15-depinject.md (1 hunks)
  • docs/docs/build/building-modules/16-testing.md (2 hunks)
  • docs/docs/build/building-modules/17-preblock.md (1 hunks)
  • docs/docs/build/packages/README.md (1 hunks)
  • docs/docs/build/tooling/00-protobuf.md (4 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/docs/build/building-modules/16-testing.md

[style] ~10-~10: Consider replacing this phrase with the adverb “similarly” to avoid wordiness.
Context: ...r, to test your application and modules in a similar way to the SDK. The rationale behind testi...

(IN_A_X_MANNER)

docs/docs/build/building-modules/15-depinject.md

[style] ~39-~39: As a shorter alternative for ‘able to’, consider using “can”.
Context: ...groupas an example, a chain developer is able to decide, thanks touint64 max_metadata_...

(BE_ABLE_TO)

docs/docs/build/building-modules/05-protobuf-annotations.md

[style] ~87-~87: ‘in order for them to’ might be wordy. Consider a shorter alternative.
Context: ...no name that would show up for the user in order for them to see which message they are signing. ``...

(EN_WORDINESS_PREMIUM_IN_ORDER_FOR_THEM_TO)


[style] ~99-~99: ‘in order for them to’ might be wordy. Consider a shorter alternative.
Context: ...no name that would show up for the user in order for them to see which field they are signing. ```p...

(EN_WORDINESS_PREMIUM_IN_ORDER_FOR_THEM_TO)

docs/docs/build/building-modules/06-beginblock-endblock.md

[style] ~21-~21: ‘prior to’ might be wordy. Consider a shorter alternative.
Context: ...cation requires BeginBlock to execute prior to any sort of work is done then this is n...

(EN_WORDINESS_PREMIUM_PRIOR_TO)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Summary
🔇 Additional comments (8)
docs/docs/build/building-modules/06-keeper.md (1)

19-19: LGTM: improved plurality/readability

Pluralizing “developer” to “developers” reads better. No further edits needed here.

docs/docs/build/building-modules/11-structure.md (1)

85-85: LGTM: clearer phrasing

“Learn more about how to write module specs” is clearer. Good change.

docs/docs/build/building-modules/09-module-interfaces.md (1)

135-136: LGTM: code fence formatting fixed

Properly closing the fenced block improves Markdown rendering.

docs/docs/build/building-modules/14-simulator.md (1)

75-75: LGTM: correct spelling (“unmarshals”)

Accurate term for converting bytes to a struct.

docs/docs/build/building-modules/17-preblock.md (1)

24-24: LGTM: pluralization matches semantics

“consensus parameters” (plural) is correct in this context.

docs/docs/build/packages/README.md (1)

7-7: LGTM: grammar fix

“can be used” is correct here. Thanks.

docs/docs/build/building-modules/06-beginblock-endblock.md (1)

25-25: Subject–verb agreement fix looks good.
No further action.

docs/docs/build/tooling/00-protobuf.md (1)

53-53: LGTM on clarity fix.
“The above diagram shows …” reads correctly.

@aljo242 aljo242 enabled auto-merge August 11, 2025 19:23
@aljo242 aljo242 added this pull request to the merge queue Aug 11, 2025
Merged via the queue into cosmos:main with commit 85fa0ae Aug 11, 2025
38 of 39 checks passed
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.

2 participants