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: update learn/beginner docs #22191

Merged
merged 1 commit into from
Oct 9, 2024
Merged

Conversation

JulianToledano
Copy link
Contributor

@JulianToledano JulianToledano commented Oct 9, 2024

Description

Ref:
#21429


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

  • included the correct type prefix in the PR title, you can find examples of the prefixes below:
  • confirmed ! in the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • reviewed "Files changed" and left comments if necessary
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • updated the relevant documentation or specification, including comments for documenting Go code
  • confirmed all CI checks have passed

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

  • confirmed the correct type prefix in the PR title
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic, API design and naming, documentation is accurate, tests and test coverage

Summary by CodeRabbit

  • Documentation
    • Enhanced clarity and updated references across several documents regarding app anatomy, transaction lifecycle, query lifecycle, accounts, and gas fees.
    • Improved explanations of transaction creation, processing, and query handling.
    • Updated URLs and method signatures to reflect the latest Cosmos SDK version.
    • Corrected grammatical errors and refined language for better readability.

@JulianToledano JulianToledano added the backport/v0.52.x PR scheduled for inclusion in the v0.52's next stable release label Oct 9, 2024
@JulianToledano JulianToledano requested a review from a team as a code owner October 9, 2024 12:33
Copy link
Contributor

coderabbitai bot commented Oct 9, 2024

📝 Walkthrough

Walkthrough

The pull request includes comprehensive updates to several documentation files related to the Cosmos SDK. Key changes involve clarifying descriptions, correcting links, and updating version references. Specific sections detailing lifecycle methods, transaction processing, query handling, and account management have been refined for better readability and accuracy. Additionally, minor grammatical adjustments have been made throughout the documents to enhance overall presentation.

Changes

File Path Change Summary
docs/learn/beginner/00-app-anatomy.md Updated URLs to reflect the latest Cosmos SDK versions, refined descriptions of lifecycle methods, and improved clarity in Msg and gRPC Query services.
docs/learn/beginner/01-tx-lifecycle.md Replaced --timeout-height flag with --timeout-timestamp, expanded transaction creation details, and clarified transaction processing structure.
docs/learn/beginner/02-query-lifecycle.md Enhanced clarity in query lifecycle explanations, updated command-line interface descriptions, and refined gRPC query client creation details.
docs/learn/beginner/03-accounts.md Corrected terminology, updated references to Cosmos SDK version, and refined descriptions of Keyring methods and address types.
docs/learn/beginner/04-gas-fees.md Focused on grammatical corrections and enhancing clarity in the explanation of gas usage and the AnteHandler.

Possibly related PRs

Suggested reviewers

  • julienrbrt
  • tac0turtle
  • sontrinh16

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:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • 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 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 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.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @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 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.

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: 2

🧹 Outside diff range and nitpick comments (19)
docs/learn/beginner/02-query-lifecycle.md (5)

86-93: Improved clarity in CLI explanation.

The changes in this section enhance the explanation of how users can create queries using the CLI. The command structure is now more clearly presented, and the role of the application developer is better explained.

Consider adding a brief explanation of what simd stands for, as it might not be immediately clear to beginners.

🧰 Tools
🪛 LanguageTool

[style] ~89-~89: ‘Prior to’ might be wordy. Consider a shorter alternative.
Context: ...ve the full-node, and write the output. Prior to being relayed to a full-node, the query...

(EN_WORDINESS_PREMIUM_PRIOR_TO)


[style] ~93-~93: Consider removing “of” to be more concise
Context: ...the user has created a CLI command with all of the data they wish to include in their quer...

(ALL_OF_THE)


Line range hint 93-102: Updated encoding explanation and code reference.

The changes in this section provide a more accurate description of the encoding process and update the code reference to the latest SDK version. This ensures that the documentation remains current and aligned with the codebase.

Consider adding a brief explanation of why encoding to []byte is necessary, as it might not be immediately obvious to beginners why this step is required.

🧰 Tools
🪛 LanguageTool

[style] ~89-~89: ‘Prior to’ might be wordy. Consider a shorter alternative.
Context: ...ve the full-node, and write the output. Prior to being relayed to a full-node, the query...

(EN_WORDINESS_PREMIUM_PRIOR_TO)


[style] ~93-~93: Consider removing “of” to be more concise
Context: ...the user has created a CLI command with all of the data they wish to include in their quer...

(ALL_OF_THE)


107-115: Updated gRPC Query Client Creation with AutoCLI information.

The changes in this section reflect the introduction of AutoCLI, which is a significant improvement in the SDK. The explanation clearly states how AutoCLI simplifies the process of exposing module queries through the CLI.

Consider adding a brief explanation or link to more information about AutoCLI for readers who might want to learn more about this feature.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~115-~115: Although a hyphen is possible, it is not necessary in a compound modifier in which the first word is an adverb that ends in ‘ly’.
Context: ...ed node and relay queries. It takes the fully-qualified service method name as a path (e.g. `/c...

(HYPHENATED_LY_ADVERB_ADJECTIVE)


Line range hint 120-146: Improved explanation of Application Query Handling.

The updates in this section provide a more detailed and accurate explanation of how baseapp processes queries and routes them to the appropriate module. This clarification enhances the overall understanding of the query lifecycle.

Consider adding a brief explanation of what baseapp is and its role in the Cosmos SDK architecture, as it might not be immediately clear to beginners.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~115-~115: Although a hyphen is possible, it is not necessary in a compound modifier in which the first word is an adverb that ends in ‘ly’.
Context: ...ed node and relay queries. It takes the fully-qualified service method name as a path (e.g. `/c...

(HYPHENATED_LY_ADVERB_ADJECTIVE)


Line range hint 1-146: Overall improvement in documentation clarity and accuracy.

The changes made throughout this document significantly enhance its clarity, accuracy, and alignment with the current Cosmos SDK version. The explanations are more concise and easier to understand, particularly for beginners.

For consistency, consider adding brief introductions to key concepts (like baseapp, AutoCLI, etc.) when they are first mentioned, or provide links to their respective documentation pages.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~115-~115: Although a hyphen is possible, it is not necessary in a compound modifier in which the first word is an adverb that ends in ‘ly’.
Context: ...ed node and relay queries. It takes the fully-qualified service method name as a path (e.g. `/c...

(HYPHENATED_LY_ADVERB_ADJECTIVE)

docs/learn/beginner/03-accounts.md (6)

20-20: Approved: Enhanced explanation of public key and address relationship

The expanded description provides valuable information about the different types of addresses that can be derived from a public key. This clarification enhances the reader's understanding of the relationship between public keys and addresses in the Cosmos SDK.

Consider adding a brief example or link to further documentation about these address types for readers who might want more detailed information.


86-89: Approved: Enhanced explanation of address formatting and encoding

The expanded description of address formatting and the role of the address codec provides valuable information for understanding how addresses are handled in the Cosmos SDK. The addition of the code reference illustrates the concept effectively.

Consider adding a brief explanation of what the code example does, to help readers who might not be familiar with Go or the specific implementation details.


113-117: Approved: Updated public key usage information and added formatting example

The changes provide more accurate information about the usage of public keys in transactions and add a valuable code reference illustrating how public keys are formatted for user interactions using Protobuf JSON.

Consider adding a brief explanation of the ProtoMarshalJSON function and its purpose in the context of public key formatting to provide more context for readers.


156-162: Approved: Enhanced guidance on implementing and integrating new key types

The additional information about implementing new key types, including the code reference for required functions and the updated instructions for adding the algorithm to the list of supported algos, provides comprehensive guidance for developers. This will be particularly helpful for those looking to extend the keyring functionality.

Consider adding a brief example or link to an existing implementation (like the mentioned secp256k1 implementation) to provide a concrete reference for developers.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~161-~161: A comma might be missing here.
Context: ...pto/keyring/keyring_other.go#L17). For simplicity the implementation of a new key type sh...

(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)


241-256: Approved: Added comprehensive example for implementing secp256r1 algorithm

The new section on implementing the secp256r1 algorithm provides an excellent, concrete example of how to add a new key type to the Cosmos SDK. The code examples and explanations are clear and follow the previously described steps, making it easier for developers to understand the process.

To further enhance this section, consider adding a note about any performance implications or security considerations when using secp256r1 compared to the default secp256k1. This would help developers make informed decisions when choosing which algorithm to use.


51-53: Minor formatting and punctuation improvements

  1. Lines 51-53: Consider removing the extra spaces before the bullet points to maintain consistent formatting with the rest of the document.
  2. Line 161: Consider adding a comma after "For simplicity" to improve readability.

These minor changes will enhance the overall consistency and readability of the document.

Also applies to: 161-161

🧰 Tools
🪛 LanguageTool

[uncategorized] ~51-~51: Loose punctuation mark.
Context: ...ating digital signatures: * secp256k1, as implemented in the [Cosmos SDK's `cr...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~52-~52: Loose punctuation mark.
Context: ...s/secp256k1/secp256k1.go). * secp256r1, as implemented in the [Cosmos SDK's `cr...

(UNLIKELY_OPENING_PUNCTUATION)


[typographical] ~52-~52: Two consecutive commas
Context: ...beta.2/crypto/keys/secp256r1/pubkey.go), * tm-ed25519, as implemented in the [Cosmos SDK `cryp...

(DOUBLE_PUNCTUATION)

docs/learn/beginner/01-tx-lifecycle.md (4)

36-37: Approved: Flag update and description added

The change from --timeout-height to --timeout-timestamp is accurate and well-described. This update improves the documentation by providing users with the correct flag for specifying transaction timeouts.

Consider adding a brief example of how to use the --timeout-timestamp flag to further clarify its usage for beginners.


Line range hint 111-135: Approved: Comprehensive explanation of transaction validation

The new section on transaction validation is a valuable addition to the documentation. It clearly explains the differences between stateless and stateful checks, and accurately describes the role of the AnteHandler. This information will help developers better understand the transaction lifecycle.

Consider adding a brief example of a stateless check and a stateful check to further illustrate the difference for beginners.


140-143: Approved: Important deprecation warning added

The addition of the deprecation warning for ValidateBasic is crucial information for developers. It correctly directs them to use Msg services for message validation and provides a reference to RFC 001 for more details.

Consider adding a brief example or link to documentation showing how to validate messages in Msg services to help developers transition from ValidateBasic.


Line range hint 1-24: Approved: Comprehensive improvements to transaction lifecycle documentation

The overall changes to this document significantly enhance its educational value. The additions and updates provide a more comprehensive and accurate description of the transaction lifecycle in the Cosmos SDK. The language is clear and appropriate for the target audience of beginners.

Consider adding a simple diagram or flowchart illustrating the transaction lifecycle to provide a visual aid for readers. This could help reinforce the concepts explained in the text.

🧰 Tools
🪛 LanguageTool

[style] ~33-~33: Consider a shorter alternative to avoid wordiness.
Context: ...optional) can be used to scale gas up in order to avoid underestimating. For example, use...

(IN_ORDER_TO_PREMIUM)

docs/learn/beginner/00-app-anatomy.md (4)

Line range hint 72-91: Great updates to the Constructor Function section!

The URL updates to newer versions ensure the documentation stays current. The expanded explanation of the constructor function, especially regarding the module manager's role, significantly improves clarity.

Consider adding a brief note about the importance of the order in which these initialization steps occur, as it might be crucial for developers to understand.

🧰 Tools
🪛 LanguageTool

[style] ~65-~65: Consider a shorter alternative to avoid wordiness.
Context: ...rialize and deserialize data structures in order to store them, as stores can only persist ...

(IN_ORDER_TO_PREMIUM)


[uncategorized] ~69-~69: Possible missing comma found.
Context: ...ion from simapp, the Cosmos SDK's own app used for demo and testing purposes: ``...

(AI_HYDRA_LEO_MISSING_COMMA)


[style] ~77-~77: Consider a shorter alternative to avoid wordiness.
Context: ...must fulfill the AppCreator signature in order to be used in the [start command](../adv...

(IN_ORDER_TO_PREMIUM)


Line range hint 118-134: Excellent addition of the PreBlocker section!

This new section provides crucial information about the PreBlocker lifecycle method, its execution order, and its unique ability to modify consensus parameters. The included code snippet is particularly helpful for implementation understanding.

Consider adding a brief example or use case where modifying consensus parameters might be beneficial, to help readers better grasp the practical applications of this feature.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~101-~101: You might be missing the article “an” here.
Context: ... for the first time. See an example of application constructor from simapp: ```go refer...

(AI_EN_LECTOR_MISSING_DETERMINER_AN)


Line range hint 136-145: Great updates to the BeginBlocker and EndBlocker section!

The revised explanation provides a more accurate description of when these functions are called in relation to the CometBFT consensus engine. The addition of the URL reference to the latest codebase version is helpful for developers seeking a concrete implementation.

Consider adding a brief note about the potential impact of these functions on block processing time, as their execution is not constrained by gas limits.


Line range hint 150-169: Excellent improvements to the Register Codec section!

The expanded explanation of the EncodingConfig structure and its components, especially the detailed information about the InterfaceRegistry and its role in handling Protobuf Any types, significantly enhances the documentation. The addition of the URL reference to the latest codebase version is helpful for developers seeking a concrete implementation.

Consider adding a brief note about the importance of proper codec configuration for interoperability between modules and with external clients.

📜 Review details

Configuration used: .coderabbit.yml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 3220aab and c6f7c2f.

📒 Files selected for processing (5)
  • docs/learn/beginner/00-app-anatomy.md (8 hunks)
  • docs/learn/beginner/01-tx-lifecycle.md (5 hunks)
  • docs/learn/beginner/02-query-lifecycle.md (3 hunks)
  • docs/learn/beginner/03-accounts.md (10 hunks)
  • docs/learn/beginner/04-gas-fees.md (2 hunks)
🧰 Additional context used
📓 Path-based instructions (5)
docs/learn/beginner/00-app-anatomy.md (1)

Pattern **/*.md: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"

docs/learn/beginner/01-tx-lifecycle.md (1)

Pattern **/*.md: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"

docs/learn/beginner/02-query-lifecycle.md (1)

Pattern **/*.md: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"

docs/learn/beginner/03-accounts.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"

🪛 LanguageTool
docs/learn/beginner/00-app-anatomy.md

[style] ~65-~65: Consider a shorter alternative to avoid wordiness.
Context: ...rialize and deserialize data structures in order to store them, as stores can only persist ...

(IN_ORDER_TO_PREMIUM)


[uncategorized] ~69-~69: Possible missing comma found.
Context: ...ion from simapp, the Cosmos SDK's own app used for demo and testing purposes: ``...

(AI_HYDRA_LEO_MISSING_COMMA)


[style] ~77-~77: Consider a shorter alternative to avoid wordiness.
Context: ...must fulfill the AppCreator signature in order to be used in the [start command](../adv...

(IN_ORDER_TO_PREMIUM)

docs/learn/beginner/02-query-lifecycle.md

[style] ~89-~89: ‘Prior to’ might be wordy. Consider a shorter alternative.
Context: ...ve the full-node, and write the output. Prior to being relayed to a full-node, the query...

(EN_WORDINESS_PREMIUM_PRIOR_TO)


[style] ~93-~93: Consider removing “of” to be more concise
Context: ...the user has created a CLI command with all of the data they wish to include in their quer...

(ALL_OF_THE)


[uncategorized] ~115-~115: Although a hyphen is possible, it is not necessary in a compound modifier in which the first word is an adverb that ends in ‘ly’.
Context: ...ed node and relay queries. It takes the fully-qualified service method name as a path (e.g. `/c...

(HYPHENATED_LY_ADVERB_ADJECTIVE)

docs/learn/beginner/03-accounts.md

[uncategorized] ~51-~51: Loose punctuation mark.
Context: ...ating digital signatures: * secp256k1, as implemented in the [Cosmos SDK's `cr...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~52-~52: Loose punctuation mark.
Context: ...s/secp256k1/secp256k1.go). * secp256r1, as implemented in the [Cosmos SDK's `cr...

(UNLIKELY_OPENING_PUNCTUATION)


[typographical] ~52-~52: Two consecutive commas
Context: ...beta.2/crypto/keys/secp256r1/pubkey.go), * tm-ed25519, as implemented in the [Cosmos SDK `cryp...

(DOUBLE_PUNCTUATION)


[uncategorized] ~161-~161: A comma might be missing here.
Context: ...pto/keyring/keyring_other.go#L17). For simplicity the implementation of a new key type sh...

(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)

docs/learn/beginner/04-gas-fees.md

[uncategorized] ~97-~97: ‘Amount of’ should usually only be used with uncountable or mass nouns. Consider using “number” if this is not the case.
Context: ...nsactions that do not provide a minimum amount of fees. This ensures that the mempool ...

(AMOUNTOF_TO_NUMBEROF)

🪛 Markdownlint
docs/learn/beginner/03-accounts.md

140-140: Expected: 4; Actual: 2
Unordered list indentation

(MD007, ul-indent)


141-141: Expected: 4; Actual: 2
Unordered list indentation

(MD007, ul-indent)

🔇 Additional comments (20)
docs/learn/beginner/04-gas-fees.md (5)

19-22: Improved clarity and grammar in the introduction

The changes in these lines enhance the document's clarity and grammatical accuracy. The specification that gas is consumed during reads and writes to the store provides a more precise explanation. Additionally, the correction from "end-user" to "end-users" in the second bullet point improves grammatical consistency.


87-87: Updated transaction interface link

The link to the transaction interface has been updated to reference the newer version (v0.52.0-beta.2). This change helps maintain the accuracy of the documentation.

Please verify that this is the most recent stable version of the SDK and that the link is correct.


93-93: Updated protobuf definition link

The link to the protobuf definition for the default transaction type has been updated to reference the newer version (v0.52.0-beta.2). This change helps maintain the accuracy of the documentation.

Please verify that this is the most recent stable version of the SDK and that the link is correct.


97-97: Improved clarity and grammar in gas price verification explanation

The changes in this line enhance the document's clarity and grammatical accuracy. The text now explicitly states that gas prices are verified during CheckTx, providing more precise information. Additionally, the grammar has been corrected from "is" to "are" to maintain proper subject-verb agreement.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~97-~97: ‘Amount of’ should usually only be used with uncountable or mass nouns. Consider using “number” if this is not the case.
Context: ...nsactions that do not provide a minimum amount of fees. This ensures that the mempool ...

(AMOUNTOF_TO_NUMBEROF)


101-101: Corrected comparison operator

The comparison operator has been updated from "=<" to "<=" in the explanation of the relationship between GasUsed and GasWanted. This change correctly represents the mathematical notation for "less than or equal to", improving the accuracy of the documentation.

docs/learn/beginner/02-query-lifecycle.md (2)

120-120: Clarified nature of queries in RPC section.

The addition of the explanation that queries are not part of consensus and are not broadcasted to the network is an important clarification. This helps users understand the fundamental difference between queries and transactions in the Cosmos SDK.


146-146: Refined explanation of Response handling.

The updates in this section provide a clearer explanation of how query responses are handled and outputted by the CLI. The updated code reference ensures that the documentation remains in sync with the current SDK version.

docs/learn/beginner/03-accounts.md (7)

8-8: Approved: Improved terminology

The change from "in-built" to "built-in" is correct and improves the accuracy of the documentation.


65-65: Approved: Clarified address types and their uses

The expanded description of address types provides valuable context about the different addresses used in the Cosmos SDK. This addition helps readers understand the specific purposes of AccAddress, ValAddress, and ConsAddress, which is crucial for grasping the account system in Cosmos SDK.


74-74: Approved: Updated SDK version in GitHub link

The SDK version reference in the GitHub link has been correctly updated to v0.52.0-beta.2, maintaining consistency with the earlier version updates in the document.


100-103: Approved: Improved explanation of public keys and added interface reference

The updated description of public keys, including information about the cryptotypes.PubKey interface, provides valuable technical details for developers working with the Cosmos SDK. The addition of the code reference effectively illustrates the PubKey interface structure.


125-125: Approved: Updated SDK version in GitHub link

The SDK version reference in the GitHub link has been correctly updated to v0.52.0-beta.2, maintaining consistency with the earlier version updates in the document.


135-138: Approved: Updated SDK version and improved NewAccount method description

The SDK version reference has been correctly updated to v0.52.0-beta.2. The description of the NewAccount method has been improved to accurately reflect that accounts are persisted on the selected backend, rather than specifically on disk. This change provides a more precise explanation of the account creation process.


147-150: Approved: Improved explanation of creating new key types

The updated description of creating a new key type provides clearer instructions for implementing the keyring.SignatureAlgo interface. The addition of the code reference effectively illustrates the structure of the interface that needs to be implemented. These changes will be helpful for developers looking to extend the keyring functionality with new key types.

docs/learn/beginner/01-tx-lifecycle.md (3)

52-53: Approved: Updated transaction creation methods

The change from "Ledger Nano S" to "any Ledger device" is a good improvement. It makes the documentation more inclusive and future-proof by not limiting the description to a specific Ledger model.


136-137: Approved: Clarification of ValidateBasic usage

The update to the ValidateBasic description is accurate and provides more detailed information about when this method is called. Mentioning both CheckTx and DeliverTx transactions gives a more complete picture of the validation process.


165-167: Approved: Enhanced module execution description

The updated description of module execution is more comprehensive and accurate. It correctly mentions both state modifications and event emissions, which are crucial aspects of module execution in the Cosmos SDK.

docs/learn/beginner/00-app-anatomy.md (3)

62-67: Excellent improvements to the Node Client section!

The expanded explanation of the application type components provides a more comprehensive overview. The additions of appCodec, legacyAmino codec, and module manager details enhance the reader's understanding of the application structure.

🧰 Tools
🪛 LanguageTool

[style] ~65-~65: Consider a shorter alternative to avoid wordiness.
Context: ...rialize and deserialize data structures in order to store them, as stores can only persist ...

(IN_ORDER_TO_PREMIUM)


109-116: Excellent clarification of the InitChainer section!

The expanded explanation of the InitChainer's role and its interaction with the module manager enhances the reader's understanding. The addition of the URL reference to the latest codebase version is particularly helpful for developers who want to see a concrete implementation.


200-201: Good update to the Msg Services section!

The addition of the URL reference to the latest codebase version ensures that readers have access to the most current implementation of the Msg service example.

Comment on lines +140 to +141
* `secp256k1`
* `ed25519`
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

Discrepancy Found in Supported Key Types

The documentation removed secp256r1 from the list of supported key types, but it is still present in the codebase.

  • Found references to secp256r1 in multiple files within the crypto/ directory.
🔗 Analysis chain

Approved: Updated list of supported key types

The list of supported key types has been updated, removing secp256r1. This change likely reflects the current state of supported key types in the latest SDK version.

To ensure this change is accurate and consistent with the SDK implementation, please run the following script:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify supported key types in the SDK

# Search for key type declarations in the crypto package
rg -t go 'const.*PubKeyType' crypto/
rg -t go 'var.*SignatureAlgo' crypto/keyring/

# Check for any remaining references to secp256r1 in the crypto package
rg -t go 'secp256r1' crypto/

Length of output: 3469

🧰 Tools
🪛 Markdownlint

140-140: Expected: 4; Actual: 2
Unordered list indentation

(MD007, ul-indent)


141-141: Expected: 4; Actual: 2
Unordered list indentation

(MD007, ul-indent)

Comment on lines +51 to +53
* `secp256k1`, as implemented in the [Cosmos SDK's `crypto/keys/secp256k1` package](https://github.com/cosmos/cosmos-sdk/blob/v0.52.0-beta.2/crypto/keys/secp256k1/secp256k1.go).
* `secp256r1`, as implemented in the [Cosmos SDK's `crypto/keys/secp256r1` package](https://github.com/cosmos/cosmos-sdk/blob/v0.52.0-beta.2/crypto/keys/secp256r1/pubkey.go),
* `tm-ed25519`, as implemented in the [Cosmos SDK `crypto/keys/ed25519` package](https://github.com/cosmos/cosmos-sdk/blob/v0.52.0-beta.2/crypto/keys/ed25519/ed25519.go). This scheme is supported only for the consensus validation.
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

Outdated SDK Version References Found

The following documentation files still reference the outdated SDK version v0.50.0-alpha.0. Please update these references to v0.52.0-beta.2 to ensure consistency across the documentation:

  • docs/learn/beginner/04-gas-fees.md
  • docs/learn/advanced/06-grpc_rest.md
  • docs/learn/advanced/10-ocap.md
  • docs/learn/advanced/11-runtx_middleware.md
  • docs/learn/advanced/12-simulation.md
  • docs/learn/advanced/08-events.md
  • docs/learn/advanced/07-cli.md
  • docs/learn/advanced/04-store.md
  • docs/build/building-modules/02-messages-and-queries.md
  • docs/build/building-modules/15-depinject.md
  • docs/build/building-modules/16-testing.md
  • docs/build/building-modules/12-errors.md
  • docs/build/building-modules/08-genesis.md
  • docs/build/building-modules/13-upgrade.md
  • docs/build/building-modules/09-module-interfaces.md
  • docs/build/building-modules/04-query-services.md
  • docs/build/building-modules/03-msg-services.md
  • docs/build/building-modules/01-module-manager.md
  • docs/build/building-apps/01-app-go-di.md
  • docs/build/building-apps/00-app-go.md
  • docs/learn/beginner/03-accounts.md (already updated)
  • docs/learn/beginner/02-query-lifecycle.md
  • docs/learn/beginner/00-app-anatomy.md

Please ensure all these references are updated to reflect the latest SDK version v0.52.0-beta.2.

🔗 Analysis chain

Approved: Updated SDK version references

The changes correctly update the SDK version references from v0.50.0-alpha.0 to v0.52.0-beta.2, ensuring that the documentation reflects the latest version. The GitHub links have been appropriately updated to match the new version.

To ensure consistency across the documentation, please run the following script to check for any remaining outdated version references:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for outdated SDK version references in markdown files

# Search for old version references
rg -t md 'v0\.50\.0-alpha\.0' docs/
rg -t md 'v0\.51\.0' docs/

# Search for new version references to confirm updates
rg -t md 'v0\.52\.0-beta\.2' docs/

Length of output: 28083

🧰 Tools
🪛 LanguageTool

[uncategorized] ~51-~51: Loose punctuation mark.
Context: ...ating digital signatures: * secp256k1, as implemented in the [Cosmos SDK's `cr...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~52-~52: Loose punctuation mark.
Context: ...s/secp256k1/secp256k1.go). * secp256r1, as implemented in the [Cosmos SDK's `cr...

(UNLIKELY_OPENING_PUNCTUATION)


[typographical] ~52-~52: Two consecutive commas
Context: ...beta.2/crypto/keys/secp256r1/pubkey.go), * tm-ed25519, as implemented in the [Cosmos SDK `cryp...

(DOUBLE_PUNCTUATION)

@julienrbrt julienrbrt added this pull request to the merge queue Oct 9, 2024
Merged via the queue into main with commit fc9ca8e Oct 9, 2024
77 checks passed
@julienrbrt julienrbrt deleted the julian/learn-beginner-v0.52 branch October 9, 2024 19:22
mergify bot pushed a commit that referenced this pull request Oct 9, 2024
julienrbrt pushed a commit that referenced this pull request Oct 9, 2024
Co-authored-by: Julián Toledano <JulianToledano@users.noreply.github.com>
@coderabbitai coderabbitai bot mentioned this pull request Oct 14, 2024
12 tasks
This was referenced Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/v0.52.x PR scheduled for inclusion in the v0.52's next stable release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants