-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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: rewrite building module section (2/n) -- env + core services #22790
Conversation
📝 Walkthrough📝 WalkthroughWalkthroughThe pull request introduces significant updates to the documentation of the Cosmos SDK, particularly focusing on the Changes
Possibly related issues
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: 2
🧹 Outside diff range and nitpick comments (11)
docs/build/building-apps/00-runtime.md (2)
12-12
: Fix typo in "reponsible"Correct the spelling of "reponsible" to "responsible".
-Runtime is reponsible for wiring the modules together. +Runtime is responsible for wiring the modules together.
12-12
: Add explanation fordepinject
Consider adding a brief explanation or link to documentation about what
depinject
is, as it's a key concept mentioned here without context.docs/learn/advanced/02-core.md (2)
21-23
: Improve grammar and claritySeveral grammatical improvements needed:
- Add a comma after "Historically"
- Use "a" instead of "an" before "sdk.Context"
- Consider rephrasing "in many cases" for better style
-Historically the SDK has used an sdk.Context +Historically, the SDK has used a sdk.Context🧰 Tools
🪛 LanguageTool
[misspelling] ~21-~21: Use “a” instead of ‘an’ if the following word doesn’t start with a vowel sound, e.g. ‘a sentence’, ‘a university’.
Context: ...-L29 ``` Historically the SDK has used an [sdk.Context](https://docs.cosmos.netwo...(EN_A_VS_AN)
[style] ~22-~22: The phrase ‘in many cases’ is used quite frequently. Consider using a less frequent alternative to set your writing apart from others.
Context: ...is intended to replace ansdk.Context
in many cases.sdk.Context
will be deprecated in th...(IN_MANY_STYLE_CASES)
27-28
: Enhance logger documentationThe logger section could benefit from additional details about:
- Available log levels
- How module scoping works
- Best practices for logging
docs/build/building-modules/00-intro.md (2)
63-64
: Fix grammar in Core APIs sectionThere are two grammar issues to fix:
- "defined" should be "define" after "to"
- "is" should be "are" as it refers to plural "capabilities"
-Those APIs are defined in the `cosmossdk.io/core/appmodule` package, and are used to defined the module capabilities, which is used by `runtime` +Those APIs are defined in the `cosmossdk.io/core/appmodule` package, and are used to define the module capabilities, which are used by `runtime`🧰 Tools
🪛 LanguageTool
[grammar] ~64-~64: The verb after “to” should be in the base form as part of the to-infinitive. A verb can take many forms, but the base form is always used in the to-infinitive.
Context: ...ore/appmodule` package, and are used to defined the module capabilities, which is used ...(TO_NON_BASE)
65-66
: Consider expanding Core APIs documentationThe link to learn more about Core APIs could be enhanced by:
- Adding a brief overview of what developers can expect to learn
- Mentioning key APIs that are commonly used
docs/build/building-modules/06-keeper.md (1)
58-72
: Consider adding common services usage examplesWhile the section effectively explains the Environment struct and includes code references, it would be more helpful to include brief examples of commonly used services (e.g., StoreService, EventService) to provide practical context.
docs/learn/beginner/04-gas-fees.md (2)
45-47
: Enhance clarity of the gas service noteConsider rephrasing to be more precise:
-The gas.Service does not give access to all the methods of the gas meter. +The gas.Service provides limited access to the gas meter methods.🧰 Tools
🪛 LanguageTool
[style] ~46-~46: Try using a synonym here to strengthen your writing.
Context: ...tern: :::note The gas.Service does not give access to all the methods of the gas me...(GIVE_PROVIDE)
57-57
: LGTM with a minor suggestionThe explanation is technically accurate. Consider adding "per-transaction" to explicitly state when the gas meter is reset: "...the main gas meter must be set to 0 per-transaction in the..."
docs/learn/advanced/04-store.md (1)
152-152
: Consider listing manually implemented functionsWhile the explanation is accurate, it would be more helpful to explicitly list which "miscellaneous" functions are manually implemented in dbadapter.Store.
docs/build/building-modules/01-module-manager.md (1)
220-222
: Fix grammar in module function descriptionsThe phrase "each modules" is grammatically incorrect in multiple instances. It should be "each module" (singular).
Apply these corrections:
-function of each modules implementing +function of each module implementing🧰 Tools
🪛 LanguageTool
[uncategorized] ~220-~220: Loose punctuation mark.
Context: ...BeginBlock(ctx context.Context) error
: At the beginning of each block, this fu...(UNLIKELY_OPENING_PUNCTUATION)
[grammar] ~220-~220: Use a singular noun after the quantifier ‘each’, or change it to “all”.
Context: ...ock-beginblock-endblock.md) function of each modules implementing the `appmodule.HasBeginBlo...(EACH_EVERY_NNS)
[uncategorized] ~221-~221: Loose punctuation mark.
Context: ... *EndBlock(ctx context.Context) error
: At the end of each block, this function...(UNLIKELY_OPENING_PUNCTUATION)
[grammar] ~221-~221: Use a singular noun after the quantifier ‘each’, or change it to “all”.
Context: ...ock-beginblock-endblock.md) function of each modules implementing the `appmodule.HasEndBlock...(EACH_EVERY_NNS)
[uncategorized] ~222-~222: Loose punctuation mark.
Context: ...ontext) ([]abci.ValidatorUpdate, error)`: At the end of each block, this function...(UNLIKELY_OPENING_PUNCTUATION)
[grammar] ~222-~222: Use a singular noun after the quantifier ‘each’, or change it to “all”.
Context: ...ock-beginblock-endblock.md) function of each modules implementing the `module.HasABCIEndBloc...(EACH_EVERY_NNS)
📜 Review details
Configuration used: .coderabbit.yml
Review profile: CHILL
📒 Files selected for processing (8)
docs/build/building-apps/00-runtime.md
(1 hunks)docs/build/building-modules/00-intro.md
(1 hunks)docs/build/building-modules/01-module-manager.md
(1 hunks)docs/build/building-modules/05-protobuf-annotations.md
(2 hunks)docs/build/building-modules/06-keeper.md
(3 hunks)docs/learn/advanced/02-core.md
(2 hunks)docs/learn/advanced/04-store.md
(2 hunks)docs/learn/beginner/04-gas-fees.md
(2 hunks)
✅ Files skipped from review due to trivial changes (1)
- docs/build/building-modules/05-protobuf-annotations.md
🧰 Additional context used
📓 Path-based instructions (7)
docs/build/building-apps/00-runtime.md (1)
Pattern **/*.md
: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"
docs/learn/advanced/04-store.md (1)
Pattern **/*.md
: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"
docs/build/building-modules/00-intro.md (1)
Pattern **/*.md
: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"
docs/build/building-modules/06-keeper.md (1)
Pattern **/*.md
: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"
docs/learn/beginner/04-gas-fees.md (1)
Pattern **/*.md
: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"
docs/build/building-modules/01-module-manager.md (1)
Pattern **/*.md
: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"
docs/learn/advanced/02-core.md (1)
Pattern **/*.md
: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"
🪛 LanguageTool
docs/build/building-modules/00-intro.md
[grammar] ~64-~64: The verb after “to” should be in the base form as part of the to-infinitive. A verb can take many forms, but the base form is always used in the to-infinitive.
Context: ...ore/appmodule` package, and are used to defined the module capabilities, which is used ...
(TO_NON_BASE)
docs/learn/beginner/04-gas-fees.md
[style] ~46-~46: Try using a synonym here to strengthen your writing.
Context: ...tern: :::note The gas.Service does not give access to all the methods of the gas me...
(GIVE_PROVIDE)
docs/build/building-modules/01-module-manager.md
[uncategorized] ~220-~220: Loose punctuation mark.
Context: ... BeginBlock(ctx context.Context) error
: At the beginning of each block, this fu...
(UNLIKELY_OPENING_PUNCTUATION)
[grammar] ~220-~220: Use a singular noun after the quantifier ‘each’, or change it to “all”.
Context: ...ock-beginblock-endblock.md) function of each modules implementing the `appmodule.HasBeginBlo...
(EACH_EVERY_NNS)
[uncategorized] ~221-~221: Loose punctuation mark.
Context: ... * EndBlock(ctx context.Context) error
: At the end of each block, this function...
(UNLIKELY_OPENING_PUNCTUATION)
[grammar] ~221-~221: Use a singular noun after the quantifier ‘each’, or change it to “all”.
Context: ...ock-beginblock-endblock.md) function of each modules implementing the `appmodule.HasEndBlock...
(EACH_EVERY_NNS)
[uncategorized] ~222-~222: Loose punctuation mark.
Context: ...ontext) ([]abci.ValidatorUpdate, error)`: At the end of each block, this function...
(UNLIKELY_OPENING_PUNCTUATION)
[grammar] ~222-~222: Use a singular noun after the quantifier ‘each’, or change it to “all”.
Context: ...ock-beginblock-endblock.md) function of each modules implementing the `module.HasABCIEndBloc...
(EACH_EVERY_NNS)
docs/learn/advanced/02-core.md
[typographical] ~20-~20: Consider adding a comma after ‘Historically’ for more clarity.
Context: ...ppmodule/v2/environment.go#L16-L29 ``` Historically the SDK has used an [sdk.Context](https...
(RB_LY_COMMA)
[misspelling] ~21-~21: Use “a” instead of ‘an’ if the following word doesn’t start with a vowel sound, e.g. ‘a sentence’, ‘a university’.
Context: ...-L29 ``` Historically the SDK has used an [sdk.Context](https://docs.cosmos.netwo...
(EN_A_VS_AN)
[style] ~22-~22: The phrase ‘in many cases’ is used quite frequently. Consider using a less frequent alternative to set your writing apart from others.
Context: ...is intended to replace an sdk.Context
in many cases. sdk.Context
will be deprecated in th...
(IN_MANY_STYLE_CASES)
[style] ~38-~38: Consider shortening or rephrasing this to strengthen your wording.
Context: ...useful for executing code that needs to make changes to the store, but may need to be rolled ba...
(MAKE_CHANGES)
🔇 Additional comments (2)
docs/build/building-modules/06-keeper.md (1)
8-8
: LGTM!
The synopsis clearly explains the role of Keepers and how they interact with depinject and runtime.
docs/learn/advanced/04-store.md (1)
48-50
: LGTM!
The explanation of branching and cache is clear, and the reference to core documentation provides a good path for further reading.
* `EndBlock(ctx context.Context) error`: At the end of each block, this function is called from [`BaseApp`](../../learn/advanced/00-baseapp.md#endblock) and, in turn, calls the [`EndBlock`](./06-preblock-beginblock-endblock.md) function of each modules implementing the `appmodule.HasEndBlocker` interface, in the order defined in `OrderEndBlockers`. The function returns an `abci` which contains the aforementioned events, as well as validator set updates (if any). | ||
* `EndBlock(context.Context) ([]abci.ValidatorUpdate, error)`: At the end of each block, this function is called from [`BaseApp`](../../learn/advanced/00-baseapp.md#endblock) and, in turn, calls the [`EndBlock`](./06-preblock-beginblock-endblock.md) function of each modules implementing the `module.HasABCIEndBlock` interface, in the order defined in `OrderEndBlockers`. The function returns an `abci` which contains the aforementioned events, as well as validator set updates (if any). |
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.
🛠️ Refactor suggestion
Clarify the distinction between EndBlock implementations
The documentation describes two different EndBlock methods without clearly explaining their distinct purposes or when to use each one. This might confuse readers.
Consider restructuring the EndBlock documentation to clearly distinguish between:
- The basic EndBlock implementation (
error
return type) - The validator-updating EndBlock implementation (
[]abci.ValidatorUpdate, error
return type)
Add a note explaining when to use each variant, for example:
+* `EndBlock(ctx context.Context) error`: The basic implementation for modules that need end-of-block processing without validator updates.
+* `EndBlock(context.Context) ([]abci.ValidatorUpdate, error)`: Extended implementation for modules that need to update the validator set (typically used by the staking module).
Committable suggestion skipped: line range outside the PR's diff.
🧰 Tools
🪛 LanguageTool
[uncategorized] ~221-~221: Loose punctuation mark.
Context: ... * EndBlock(ctx context.Context) error
: At the end of each block, this function...
(UNLIKELY_OPENING_PUNCTUATION)
[grammar] ~221-~221: Use a singular noun after the quantifier ‘each’, or change it to “all”.
Context: ...ock-beginblock-endblock.md) function of each modules implementing the `appmodule.HasEndBlock...
(EACH_EVERY_NNS)
[uncategorized] ~222-~222: Loose punctuation mark.
Context: ...ontext) ([]abci.ValidatorUpdate, error)`: At the end of each block, this function...
(UNLIKELY_OPENING_PUNCTUATION)
[grammar] ~222-~222: Use a singular noun after the quantifier ‘each’, or change it to “all”.
Context: ...ock-beginblock-endblock.md) function of each modules implementing the `module.HasABCIEndBloc...
(EACH_EVERY_NNS)
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.
The follow up will focus on this section (building-apps)
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
🧹 Outside diff range and nitpick comments (7)
docs/learn/advanced/04-store.md (2)
48-50
: Consider using absolute links for cross-referencesThe link to the core documentation should use an absolute path for consistency with other documentation links in the SDK. This helps prevent broken links when documentation is reorganized.
-Read more about it in the [core](./02-core.md#branch-service) documentation. +Read more about it in the [core](/docs/learn/advanced/02-core.md#branch-service) documentation.
198-198
: Improve sentence structure for clarityThe sentence could be restructured to be more complete and clearer.
-`KVStores` can be accessed in their corresponding modules by using the [`kvStoreService` and `memStoreService`](./02-core.md#kvstore-service). +Modules can access their corresponding `KVStores` through the [`kvStoreService` and `memStoreService`](./02-core.md#kvstore-service).🧰 Tools
🪛 LanguageTool
[style] ~198-~198: To form a complete sentence, be sure to include a subject.
Context: ...es/context.go#L339-L342 ```KVStores
can be accessed in their corresponding modu...(MISSING_IT_THERE)
docs/learn/advanced/08-events.md (1)
101-113
: Fix grammatical issues in Default Events sectionPlease apply the following corrections:
- Fix bullet point formatting by removing extra spaces
- Correct verb agreement in the tip section
There are a few events that are automatically emitted for all messages, directly from `baseapp`. -* `message.action`: The name of the message type. -* `message.sender`: The address of the message signer. -* `message.module`: The name of the module that emitted the message. +* `message.action`: The name of the message type. +* `message.sender`: The address of the message signer. +* `message.module`: The name of the module that emitted the message. :::tip The module name is assumed by `baseapp` to be the second element of the message route: `"cosmos.bank.v1beta1.MsgSend" -> "bank"`. In case a module does not follow the standard message path, (e.g. IBC), it is advised to keep emitting the module name event. -`Baseapp` only emits that event if the module have not already done so. +`Baseapp` only emits that event if the module has not already done so. :::🧰 Tools
🪛 LanguageTool
[uncategorized] ~105-~105: Loose punctuation mark.
Context: ...ctly frombaseapp
. *message.action
: The name of the message type. * `messag...(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~106-~106: Loose punctuation mark.
Context: ... of the message type. *message.sender
: The address of the message signer. * `m...(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~107-~107: Loose punctuation mark.
Context: ...f the message signer. *message.module
: The name of the module that emitted the...(UNLIKELY_OPENING_PUNCTUATION)
[grammar] ~112-~112: “Module” is a singular noun. It appears that the verb form is incorrect.
Context: ...pp` only emits that event if the module have not already done so. ::: ## Subscribin...(PCT_SINGULAR_NOUN_PLURAL_VERB_AGREEMENT)
docs/learn/advanced/17-context.md (1)
18-20
: Improve clarity of the warning messageThe warning message about
sdk.Context
usage could be more explicit about why direct usage should be avoided and what alternatives are available.Consider revising to:
-The `sdk.Context` should not be used directly. `Runtime` is implementing the [core services](./02-core.md), which are using directly the `sdk.Context`. +The `sdk.Context` should not be used directly by application developers. Instead, use the [core services](./02-core.md) provided by the `Runtime`, which internally manages the `sdk.Context`.docs/learn/advanced/00-baseapp.md (2)
477-477
: Enhance clarity of validator descriptionThe sentence about validators is grammatically correct but could be more explicit about the voting process.
Consider revising to:
-Set the `VoteInfos` of the application, i.e. the list of validators whose _precommit_ for the previous block was included by the proposer of the current block. +Set the `VoteInfos` of the application, which contains the list of validators whose _precommit_ votes for the previous block were included by the proposer of the current block.🧰 Tools
🪛 LanguageTool
[grammar] ~477-~477: Did you mean to use ‘who’s’ here (the contracted form of ‘who’ and ‘is/has’)?
Context: ...pplication, i.e. the list of validators whose precommit for the previous block was ...(WHOSE_WHO_S)
Line range hint
456-462
: Enhance ExtendVote and VerifyVoteExtension documentationThe sections about
ExtendVote
andVerifyVoteExtension
would benefit from more detailed explanations about:
- Common use cases
- Implementation examples
- Security considerations
Consider adding expanded documentation with practical examples and security best practices for custom implementations.
Also applies to: 282-288
🧰 Tools
🪛 LanguageTool
[uncategorized] ~93-~93: Loose punctuation mark.
Context: ...ore important parameters: *voteInfos
: This parameter carries the list of vali...(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~97-~97: Loose punctuation mark.
Context: ...hing absent validators. *minGasPrices
: This parameter defines the minimum gas ...(UNLIKELY_OPENING_PUNCTUATION)
docs/build/building-modules/01-module-manager.md (1)
220-220
: Fix grammar: Use singular form after 'each'Change "function of each modules" to "function of each module".
-* `BeginBlock(ctx context.Context) error`: At the beginning of each block, this function is called from [`BaseApp`](../../learn/advanced/00-baseapp.md#beginblock) and, in turn, calls the [`BeginBlock`](./06-preblock-beginblock-endblock.md) function of each modules implementing the `appmodule.HasBeginBlocker` interface, in the order defined in `OrderBeginBlockers`. +* `BeginBlock(ctx context.Context) error`: At the beginning of each block, this function is called from [`BaseApp`](../../learn/advanced/00-baseapp.md#beginblock) and, in turn, calls the [`BeginBlock`](./06-preblock-beginblock-endblock.md) function of each module implementing the `appmodule.HasBeginBlocker` interface, in the order defined in `OrderBeginBlockers`.
📜 Review details
Configuration used: .coderabbit.yml
Review profile: CHILL
📒 Files selected for processing (7)
docs/build/building-apps/00-runtime.md
(1 hunks)docs/build/building-modules/01-module-manager.md
(1 hunks)docs/learn/advanced/00-baseapp.md
(2 hunks)docs/learn/advanced/01-transactions.md
(1 hunks)docs/learn/advanced/04-store.md
(3 hunks)docs/learn/advanced/08-events.md
(2 hunks)docs/learn/advanced/17-context.md
(2 hunks)
✅ Files skipped from review due to trivial changes (1)
- docs/learn/advanced/01-transactions.md
🚧 Files skipped from review as they are similar to previous changes (1)
- docs/build/building-apps/00-runtime.md
🧰 Additional context used
📓 Path-based instructions (5)
docs/learn/advanced/08-events.md (1)
Pattern **/*.md
: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"
docs/learn/advanced/17-context.md (1)
Pattern **/*.md
: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"
docs/learn/advanced/00-baseapp.md (1)
Pattern **/*.md
: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"
docs/build/building-modules/01-module-manager.md (1)
Pattern **/*.md
: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"
docs/learn/advanced/04-store.md (1)
Pattern **/*.md
: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"
🪛 LanguageTool
docs/learn/advanced/08-events.md
[uncategorized] ~105-~105: Loose punctuation mark.
Context: ...ctly from baseapp
. * message.action
: The name of the message type. * `messag...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~106-~106: Loose punctuation mark.
Context: ... of the message type. * message.sender
: The address of the message signer. * `m...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~107-~107: Loose punctuation mark.
Context: ...f the message signer. * message.module
: The name of the module that emitted the...
(UNLIKELY_OPENING_PUNCTUATION)
[grammar] ~112-~112: “Module” is a singular noun. It appears that the verb form is incorrect.
Context: ...pp` only emits that event if the module have not already done so. ::: ## Subscribin...
(PCT_SINGULAR_NOUN_PLURAL_VERB_AGREEMENT)
docs/learn/advanced/00-baseapp.md
[grammar] ~477-~477: Did you mean to use ‘who’s’ here (the contracted form of ‘who’ and ‘is/has’)?
Context: ...pplication, i.e. the list of validators whose precommit for the previous block was ...
(WHOSE_WHO_S)
docs/learn/advanced/04-store.md
[style] ~198-~198: To form a complete sentence, be sure to include a subject.
Context: ...es/context.go#L339-L342 ``` KVStores
can be accessed in their corresponding modu...
(MISSING_IT_THERE)
🔇 Additional comments (4)
docs/learn/advanced/04-store.md (1)
152-152
: LGTM!
Clear and accurate explanation of the dbadapter.Store implementation.
docs/learn/advanced/08-events.md (2)
80-82
: LGTM: Clear explanation of EventManager access
The documentation accurately reflects the architectural change of accessing EventManager through the event service in the Environment struct.
Line range hint 84-95
: LGTM: Well-structured examples
The documentation provides clear examples for both typed and legacy event emission, with appropriate code references.
🧰 Tools
🪛 LanguageTool
[uncategorized] ~105-~105: Loose punctuation mark.
Context: ...ctly from baseapp
. * message.action
: The name of the message type. * `messag...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~106-~106: Loose punctuation mark.
Context: ... of the message type. * message.sender
: The address of the message signer. * `m...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~107-~107: Loose punctuation mark.
Context: ...f the message signer. * message.module
: The name of the module that emitted the...
(UNLIKELY_OPENING_PUNCTUATION)
[grammar] ~112-~112: “Module” is a singular noun. It appears that the verb form is incorrect.
Context: ...pp` only emits that event if the module have not already done so. ::: ## Subscribin...
(PCT_SINGULAR_NOUN_PLURAL_VERB_AGREEMENT)
docs/build/building-modules/01-module-manager.md (1)
221-222
: 🛠️ Refactor suggestion
Improve clarity: Distinguish between EndBlock implementations
- Fix grammar: Change "function of each modules" to "function of each module" in both descriptions.
- Clarify the distinction between the two EndBlock implementations to help readers understand when to use each variant.
-* `EndBlock(ctx context.Context) error`: At the end of each block, this function is called from [`BaseApp`](../../learn/advanced/00-baseapp.md#endblock) and, in turn, calls the [`EndBlock`](./06-preblock-beginblock-endblock.md) function of each modules implementing the `appmodule.HasEndBlocker` interface, in the order defined in `OrderEndBlockers`.
-* `EndBlock(context.Context) ([]abci.ValidatorUpdate, error)`: At the end of each block, this function is called from [`BaseApp`](../../learn/advanced/00-baseapp.md#endblock) and, in turn, calls the [`EndBlock`](./06-preblock-beginblock-endblock.md) function of each modules implementing the `appmodule.HasABCIEndBlock` interface, in the order defined in `OrderEndBlockers`. Extended implementation for modules that need to update the validator set (typically used by the staking module).
+* `EndBlock(ctx context.Context) error`: At the end of each block, this function is called from [`BaseApp`](../../learn/advanced/00-baseapp.md#endblock) and, in turn, calls the [`EndBlock`](./06-preblock-beginblock-endblock.md) function of each module implementing the `appmodule.HasEndBlocker` interface, in the order defined in `OrderEndBlockers`. This is the basic implementation for modules that need end-of-block processing without validator updates.
+* `EndBlock(context.Context) ([]abci.ValidatorUpdate, error)`: At the end of each block, this function is called from [`BaseApp`](../../learn/advanced/00-baseapp.md#endblock) and, in turn, calls the [`EndBlock`](./06-preblock-beginblock-endblock.md) function of each module implementing the `appmodule.HasABCIEndBlock` interface, in the order defined in `OrderEndBlockers`. This extended implementation is specifically for modules that need to update the validator set (typically used by the staking module).
Likely invalid or redundant comment.
…22790) Co-authored-by: Akhil Kumar P <[email protected]> (cherry picked from commit 8ef35c3)
Description
ref: #21429
Next up is
runtime
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
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
runtime
package, clarifying its role and introducing new sections on module and app wiring.Logger
andEvent Service
in core documentation, improving understanding of Cosmos SDK functionalities.