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/intro #22046

Merged
merged 2 commits into from
Oct 3, 2024
Merged

docs: update learn/intro #22046

merged 2 commits into from
Oct 3, 2024

Conversation

JulianToledano
Copy link
Contributor

@JulianToledano JulianToledano commented Oct 2, 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 consistency across several documents related to the Cosmos SDK.
    • Updated links and examples to reflect current resources and use cases.
    • Improved explanations of blockchain architecture, including execution, settlement, and consensus layers.
    • Added relevant links for further information, such as the Inter-Blockchain Communication (IBC) protocol.
    • Minor grammatical adjustments for better readability and professionalism.

@JulianToledano JulianToledano requested a review from a team as a code owner October 2, 2024 12:20
Copy link
Contributor

coderabbitai bot commented Oct 2, 2024

📝 Walkthrough

Walkthrough

The pull request includes multiple updates to documentation files within the Cosmos SDK. Key changes involve enhancing clarity, consistency, and grammatical accuracy across several documents. Notable adjustments include updating links for CometBFT, refining explanations of blockchain architecture components, and improving readability through rephrasing and punctuation. The documents affected include 00-overview.md, 02-sdk-app-architecture.md, 03-sdk-design.md, and learn.md, with a focus on ensuring that the information is current and well-structured.

Changes

File Path Change Summary
docs/learn/intro/00-overview.md Updated links for CometBFT, refined phrasing for clarity, and updated examples of application-specific blockchains.
docs/learn/intro/02-sdk-app-architecture.md Expanded introduction, clarified execution and settlement layers, updated consensus layer information, and enhanced data availability explanations.
docs/learn/intro/03-sdk-design.md Refined introduction, updated reference link for simapp, and improved clarity in sections on baseapp, Multistore, and Modules.
docs/learn/learn.md Added commas for improved readability and grammatical correctness; no structural changes made.

Possibly related issues

  • [Documentation]: Blockchain architecture #20176: The changes in this PR address the need for updates to the blockchain architecture documentation, specifically enhancing clarity and accuracy, which aligns with the objectives of the mentioned issue.

Possibly related PRs

  • docs: fix broken links #21751: This PR updates links in the UPGRADING.md file, relevant due to its focus on link updates similar to those in this PR.
  • docs: update tooling link #21973: This PR updates tooling links in the documentation, aligning with the main PR's focus on improving links and ensuring documentation accuracy.
  • fix: update go module link #22003: This PR updates a Go module link in the CONTRIBUTING.md file, similar to the main PR's updates to links in documentation for clarity and accuracy.
  • docs: update go module link #22037: This PR also updates a Go module link in the documentation, reinforcing the main PR's theme of ensuring that links are current and relevant.

Suggested labels

Type: ADR

Suggested reviewers

  • julienrbrt
  • sontrinh16
  • tac0turtle

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

🧹 Outside diff range and nitpick comments (12)
docs/learn/intro/03-sdk-design.md (1)

64-66: Improved consistency and clarity in Modules section

The standardization of "Proof-of-Stake" terminology and the rewording of the custom modules paragraph enhance the consistency and clarity of the document. These changes make the information more accessible to users.

Consider adding a brief example or link to documentation about creating custom modules to further assist users interested in extending the Cosmos SDK.

docs/learn/intro/00-overview.md (3)

18-18: Improved clarity with concise analogy

The revised sentence effectively uses the Lego kit analogy to explain the SDK's flexibility. It's more concise and clearer than the previous version.

Consider adding a brief introductory phrase to smooth the transition:

-You can think of the SDK as a lego kit. You can choose to build the basic house from the instructions, or you can choose to modify your house and add more floors, more doors, more windows. The choice is yours.
+To illustrate, you can think of the SDK as a Lego kit. You can choose to build the basic house from the instructions, or you can choose to modify your house and add more floors, more doors, more windows. The choice is yours.

30-30: Comprehensive explanation of modularity with minor grammatical suggestion

The paragraph effectively explains the concept of modularity in blockchain development and how the Cosmos SDK enables it. The examples provided are clear and relevant.

Add a comma after "For example" for better readability:

-Today, there is a lot of talk around modularity and discussions between monolithic and modular. Originally, the Cosmos SDK was built with a vision of modularity in mind. Modularity is derived from splitting a blockchain into customizable layers of execution, consensus, settlement and data availability, which is what the Cosmos SDK enables. This means that developers can plug and play, making their blockchain customizable by using different software for different layers. For example you can choose to build a vanilla chain and use the Cosmos SDK with CometBFT. CometBFT will be your consensus layer and the chain itself would be the settlement and execution layer. Another route could be to use the SDK with Rollkit and [Celestia](https://celestia.org/) as your consensus and data availability layer. The benefit of modularity is that you can customize your chain to your specific use case.
+Today, there is a lot of talk around modularity and discussions between monolithic and modular. Originally, the Cosmos SDK was built with a vision of modularity in mind. Modularity is derived from splitting a blockchain into customizable layers of execution, consensus, settlement and data availability, which is what the Cosmos SDK enables. This means that developers can plug and play, making their blockchain customizable by using different software for different layers. For example, you can choose to build a vanilla chain and use the Cosmos SDK with CometBFT. CometBFT will be your consensus layer and the chain itself would be the settlement and execution layer. Another route could be to use the SDK with Rollkit and [Celestia](https://celestia.org/) as your consensus and data availability layer. The benefit of modularity is that you can customize your chain to your specific use case.

36-37: Informative points with minor suggestions for improvement

These bullet points effectively highlight the flexibility and strength of the Cosmos SDK, particularly in terms of consensus layer customization and the use of CometBFT.

Consider the following minor improvements:

  1. Add a period at the end of the first bullet point for consistency.
  2. Rephrase the beginning of the second bullet point for clarity.
-* It allows you to plug and play and customize your consensus layer. As mentioned above, you can use Rollkit and Celestia as your consensus and data availability layer. This offers a lot of flexibility and customization
-* Previously the default consensus engine available within the Cosmos SDK is [CometBFT](https://cometbft.com/). CometBFT is the most (and only) mature BFT consensus engine in existence. It is widely used across the industry and is considered the gold standard consensus engine for building Proof-of-Stake systems.
+* It allows you to plug and play and customize your consensus layer. As mentioned above, you can use Rollkit and Celestia as your consensus and data availability layer. This offers a lot of flexibility and customization.
+* The default consensus engine previously available within the Cosmos SDK is [CometBFT](https://cometbft.com/). CometBFT is the most (and only) mature BFT consensus engine in existence. It is widely used across the industry and is considered the gold standard consensus engine for building Proof-of-Stake systems.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~37-~37: Possible missing comma found.
Context: ...ot of flexibility and customization. * Previously the default consensus engine available ...

(AI_HYDRA_LEO_MISSING_COMMA)


[style] ~37-~37: ‘in existence’ might be wordy. Consider a shorter alternative.
Context: ... (and only) mature BFT consensus engine in existence. It is widely used across the industry ...

(EN_WORDINESS_PREMIUM_IN_EXISTENCE)

docs/learn/intro/02-sdk-app-architecture.md (8)

Line range hint 1-24: Excellent introduction and visual representation!

The expanded introduction provides a comprehensive overview of blockchain architecture, effectively setting the stage for the detailed explanations that follow. The inclusion of the mermaid diagram is particularly helpful in visualizing the modular SDK blockchain architecture.

Consider adding a brief legend or description below the mermaid diagram to explain what each layer represents. This would further enhance the reader's understanding of the architecture at a glance.

🧰 Tools
🪛 LanguageTool

[style] ~59-~59: Consider replacing ‘gives’ with a different word to let your writing stand out.
Context: ...h the same final state. The Cosmos SDK gives developers maximum flexibility to define the state...

(GIVE_TIME_STYLE)


Line range hint 26-57: Great improvements to the Execution Layer explanation!

The expanded content and added diagrams significantly enhance the explanation of the state machine concept. The mermaid diagrams effectively illustrate state transitions and block processing, making these concepts more accessible to readers.

In the explanation of deterministic state machines (line 57), consider adding a brief mention of why determinism is crucial in a blockchain context. For example, you could add: "This determinism is essential for maintaining consensus across all nodes in the network."

🧰 Tools
🪛 LanguageTool

[style] ~59-~59: Consider replacing ‘gives’ with a different word to let your writing stand out.
Context: ...h the same final state. The Cosmos SDK gives developers maximum flexibility to define the state...

(GIVE_TIME_STYLE)


Line range hint 59-65: Excellent addition of the Settlement Layer section!

This new section provides crucial information about the role of the Settlement Layer in blockchain architecture. The explanation of externalization and the introduction of concepts like fraud proofs and validity proofs add significant value to the documentation.

To enhance clarity, consider adding a brief example or use case that illustrates when and why one might choose to externalize the settlement layer. This could help readers better understand the practical implications of this architectural choice.

🧰 Tools
🪛 LanguageTool

[style] ~59-~59: Consider replacing ‘gives’ with a different word to let your writing stand out.
Context: ...h the same final state. The Cosmos SDK gives developers maximum flexibility to define the state...

(GIVE_TIME_STYLE)


Line range hint 67-118: Great updates to the Consensus Layer section!

The revisions to this section effectively communicate the recent changes in the Cosmos SDK, particularly the shift towards allowing users to integrate their own consensus engines. The detailed explanation of CometBFT's consensus process provides valuable insights for developers.

To make this section even more comprehensive, consider adding a brief mention of the trade-offs or considerations developers should keep in mind when choosing between different consensus engines. This could help readers understand the implications of this newfound flexibility.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~120-~120: Loose punctuation mark.
Context: ...rtant messages of the ABCI: * CheckTx: When a transaction is received by Comet...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~120-~120: Possible missing comma found.
Context: ... used to execute a series of validation steps such as checking for sufficient fees an...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~121-~121: Loose punctuation mark.
Context: ...n included in a block yet. * DeliverTx: When a [valid block](https://docs.comet...

(UNLIKELY_OPENING_PUNCTUATION)


[style] ~121-~121: Consider a shorter alternative to avoid wordiness.
Context: ...ssed to the application via DeliverTx in order to be processed. It is during this stage t...

(IN_ORDER_TO_PREMIUM)


[uncategorized] ~122-~122: Possible missing comma found.
Context: ...omatic execution of logic. Proceed with caution though, as computationally expensive lo...

(AI_HYDRA_LEO_MISSING_COMMA)


Line range hint 120-134: Clear and informative explanation of ABCI!

This section provides a concise yet comprehensive overview of the Application Blockchain Interface (ABCI) and its key messages. The explanations of CheckTx, DeliverTx, BeginBlock, and EndBlock are particularly helpful for understanding the interaction between CometBFT and the application.

To enhance clarity, consider adding a brief sentence explaining why ABCI is important in the context of the Cosmos SDK. For example: "ABCI is crucial as it allows the Cosmos SDK to be consensus-agnostic, enabling developers to use different consensus engines with their applications."

🧰 Tools
🪛 LanguageTool

[uncategorized] ~120-~120: Loose punctuation mark.
Context: ...rtant messages of the ABCI: * CheckTx: When a transaction is received by Comet...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~120-~120: Possible missing comma found.
Context: ... used to execute a series of validation steps such as checking for sufficient fees an...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~121-~121: Loose punctuation mark.
Context: ...n included in a block yet. * DeliverTx: When a [valid block](https://docs.comet...

(UNLIKELY_OPENING_PUNCTUATION)


[style] ~121-~121: Consider a shorter alternative to avoid wordiness.
Context: ...ssed to the application via DeliverTx in order to be processed. It is during this stage t...

(IN_ORDER_TO_PREMIUM)


[uncategorized] ~122-~122: Possible missing comma found.
Context: ...omatic execution of logic. Proceed with caution though, as computationally expensive lo...

(AI_HYDRA_LEO_MISSING_COMMA)


136-137: Excellent addition of the Data Availability Layer section!

This new section provides crucial information about the role of the Data Availability (DA) Layer in blockchain architecture. The example using Rollkit and Celestia effectively illustrates the concepts in a practical context, and the explanation of the transaction validation process is clear and informative.

To enhance clarity, consider adding a brief explanation of why data availability is particularly important in the context of rollups or layer-2 solutions. This could help readers better understand the significance of this layer in modern blockchain architectures.


Line range hint 139-141: Concise and informative explanation of the Interoperability Layer!

This section effectively communicates the importance of interoperability in blockchain ecosystems and highlights the role of the Inter-Blockchain Communication (IBC) protocol in achieving this. The link to the IBC documentation is a valuable addition for readers seeking more information.

To make this section even more informative, consider adding a brief example or use case that illustrates the benefits of interoperability in practice. This could help readers better understand the real-world implications of this architectural layer.

🧰 Tools
🪛 LanguageTool

[formatting] ~138-~138: Consider inserting a comma after an introductory phrase for better readability.
Context: ...hancing their functionality and reach. In this case we have separated the layers even furth...

(IN_THAT_CASE_COMMA)


[grammar] ~139-~139: The word “make-up” is a noun. The verb is spelled with a space.
Context: ...o really illustrate the components that make-up the blockchain architecture and it is i...

(NOUN_VERB_CONFUSION)


[uncategorized] ~139-~139: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...that make-up the blockchain architecture and it is important to note that the Cosmos...

(COMMA_COMPOUND_SENTENCE)


Line range hint 120-141: Address minor grammatical and punctuation issues

Please consider the following corrections based on the static analysis hints:

  1. Line 120: Add a space after the colon before the bullet point.
  2. Line 139: Change "make-up" to "make up" as it's being used as a verb.
  3. Line 139: Add a comma before "and" in the compound sentence: "...that make up the blockchain architecture, and it is important to note that..."

These minor corrections will improve the overall readability and grammatical correctness of the document.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~120-~120: Loose punctuation mark.
Context: ...rtant messages of the ABCI: * CheckTx: When a transaction is received by Comet...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~120-~120: Possible missing comma found.
Context: ... used to execute a series of validation steps such as checking for sufficient fees an...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~121-~121: Loose punctuation mark.
Context: ...n included in a block yet. * DeliverTx: When a [valid block](https://docs.comet...

(UNLIKELY_OPENING_PUNCTUATION)


[style] ~121-~121: Consider a shorter alternative to avoid wordiness.
Context: ...ssed to the application via DeliverTx in order to be processed. It is during this stage t...

(IN_ORDER_TO_PREMIUM)


[uncategorized] ~122-~122: Possible missing comma found.
Context: ...omatic execution of logic. Proceed with caution though, as computationally expensive lo...

(AI_HYDRA_LEO_MISSING_COMMA)

📜 Review details

Configuration used: .coderabbit.yml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 5c4f4ac and 4d40bab.

📒 Files selected for processing (4)
  • docs/learn/intro/00-overview.md (2 hunks)
  • docs/learn/intro/02-sdk-app-architecture.md (3 hunks)
  • docs/learn/intro/03-sdk-design.md (3 hunks)
  • docs/learn/learn.md (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • docs/learn/learn.md
🧰 Additional context used
📓 Path-based instructions (3)
docs/learn/intro/00-overview.md (1)

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

docs/learn/intro/02-sdk-app-architecture.md (1)

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

docs/learn/intro/03-sdk-design.md (1)

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

🪛 LanguageTool
docs/learn/intro/00-overview.md

[style] ~16-~16: Consider an alternative adjective to strengthen your wording.
Context: ... of interactions between modules. For a deeper look at capabilities, jump to [Object-C...

(DEEP_PROFOUND)


[uncategorized] ~37-~37: Possible missing comma found.
Context: ...ot of flexibility and customization. * Previously the default consensus engine available ...

(AI_HYDRA_LEO_MISSING_COMMA)


[style] ~37-~37: ‘in existence’ might be wordy. Consider a shorter alternative.
Context: ... (and only) mature BFT consensus engine in existence. It is widely used across the industry ...

(EN_WORDINESS_PREMIUM_IN_EXISTENCE)

docs/learn/intro/02-sdk-app-architecture.md

[uncategorized] ~120-~120: Loose punctuation mark.
Context: ...rtant messages of the ABCI: * CheckTx: When a transaction is received by Comet...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~120-~120: Possible missing comma found.
Context: ... used to execute a series of validation steps such as checking for sufficient fees an...

(AI_HYDRA_LEO_MISSING_COMMA)


[grammar] ~139-~139: The word “make-up” is a noun. The verb is spelled with a space.
Context: ...o really illustrate the components that make-up the blockchain architecture and it is i...

(NOUN_VERB_CONFUSION)


[uncategorized] ~139-~139: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...that make-up the blockchain architecture and it is important to note that the Cosmos...

(COMMA_COMPOUND_SENTENCE)

🔇 Additional comments (5)
docs/learn/intro/03-sdk-design.md (3)

Line range hint 1-24: Improved clarity in introduction and transaction handling description

The changes in this section enhance the readability and clarity of the introduction and transaction handling process. The emphasis on the framework's role in developing secure state machines on CometBFT is well-articulated, and the transaction handling steps are presented with improved phrasing.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~28-~28: Possible missing comma found.
Context: ...ween the store and the extensible state machine while defining as little about the stat...

(AI_HYDRA_LEO_MISSING_COMMA)


36-36: Minor grammatical improvement

The addition of a period at the end of the sentence in the Multistore section improves the document's professionalism. This change enhances readability without altering the technical content.


25-25: Updated reference link to latest version

The reference link has been updated to point to the latest version (v0.52.0-beta.1) of the simapp implementation. This change ensures that users are directed to the most current example.

Please verify that the link is correct and accessible:

✅ Verification successful

Link Verification Successful

The updated reference link (v0.52.0-beta.1 simapp implementation) is accessible and correct.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Verify the updated GitHub link
curl -I https://github.com/cosmos/cosmos-sdk/blob/v0.52.0-beta.1/simapp/app.go

Length of output: 5015

docs/learn/intro/00-overview.md (2)

12-12: LGTM: Clear explanation of modularity

The added sentence effectively explains the modular approach of the Cosmos SDK, highlighting the flexibility in choosing consensus engines. The examples provided (CometBFT and Rollkit) are relevant and the links are correct.


40-40: Updated and relevant examples provided

The list of blockchain projects built using the Cosmos SDK has been appropriately updated to reflect current, prominent examples. This change keeps the documentation relevant and showcases the diverse applications of the Cosmos SDK.

@julienrbrt julienrbrt added the backport/v0.52.x PR scheduled for inclusion in the v0.52's next stable release label Oct 2, 2024
@tac0turtle tac0turtle added this pull request to the merge queue Oct 3, 2024
Merged via the queue into main with commit adb4c5a Oct 3, 2024
74 of 75 checks passed
@tac0turtle tac0turtle deleted the julian/learn-intro-0.52 branch October 3, 2024 10:50
mergify bot pushed a commit that referenced this pull request Oct 3, 2024
(cherry picked from commit adb4c5a)
@mergify mergify bot mentioned this pull request Oct 3, 2024
12 tasks
julienrbrt pushed a commit that referenced this pull request Oct 3, 2024
@coderabbitai coderabbitai bot mentioned this pull request Oct 14, 2024
12 tasks
@coderabbitai coderabbitai bot mentioned this pull request Nov 4, 2024
12 tasks
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.

4 participants