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: migrate diagrams to mermaidjs #20503

Merged
merged 4 commits into from
Jun 3, 2024
Merged

docs: migrate diagrams to mermaidjs #20503

merged 4 commits into from
Jun 3, 2024

Conversation

tac0turtle
Copy link
Member

@tac0turtle tac0turtle commented May 31, 2024

Description

Closes: #20172


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 visual representations using Mermaid flowcharts for better understanding of blockchain components, account structures, and state machine concepts.
    • Updated diagrams in beginner and introductory guides to improve clarity and illustrate relationships and interactions more effectively.

Copy link
Contributor

coderabbitai bot commented May 31, 2024

Walkthrough

Walkthrough

The recent changes involve updating the visual representations in the documentation for better clarity and understanding. Specifically, text-based diagrams have been replaced with structured flowcharts using Mermaid syntax. This update affects the depiction of blockchain node components, account structures, application-specific blockchains, and state machine concepts.

Changes

Files Change Summary
docs/learn/beginner/00-app-anatomy.md Updated blockchain node components visualization to a Mermaid flowchart.
docs/learn/beginner/03-accounts.md Replaced text-based account structure diagram with a Mermaid graph.
docs/learn/intro/01-why-app-specific.md Changed application-specific blockchain diagram to a Mermaid flowchart.
docs/learn/intro/02-sdk-app-architecture.md Enhanced state machine visual representation using Mermaid flowchart syntax.

Assessment against linked issues

Objective Addressed Explanation
Update all diagrams to use Excalidraw diagrams (#20172) The changes involve converting diagrams to Mermaid syntax, not Excalidraw.

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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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 as 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.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@tac0turtle tac0turtle marked this pull request as ready for review May 31, 2024 10:06
@tac0turtle tac0turtle requested a review from a team as a code owner May 31, 2024 10:06
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 (23)
docs/learn/beginner/01-tx-lifecycle.md (23)

Line range hint 35-35: Consider simplifying the phrase to enhance readability.

- in order to avoid underestimating
+ to avoid underestimating

Line range hint 42-42: Simplify the phrase for clarity.

- whether or not to include the transaction in their block
+ whether to include the transaction in their block

Line range hint 60-60: Consider using a more direct phrase.

- Prior to consensus, nodes continuously check incoming transactions
+ Before consensus, nodes continuously check incoming transactions

Line range hint 71-71: Add a missing preposition for grammatical correctness.

- **_Stateful_** checks validate transactions and messages based on a committed state.
+ **_Stateful_** checks validate transactions and messages based on a committed state.

Line range hint 77-77: Simplify the phrase to enhance readability.

- in order to answer queries
+ to answer queries

Line range hint 78-78: Consider simplifying the phrase.

- In order to verify a `Tx`, full-nodes call `CheckTx`
+ To verify a `Tx`, full-nodes call `CheckTx`

Line range hint 85-85: Simplify the phrase for clarity.

- in order to be processed
+ to be processed

Line range hint 105-105: Ensure the sentence is complete by adding a subject.

- `ValidateBasic` should not be used anymore.
+ The `ValidateBasic` method should not be used anymore.

Line range hint 109-109: Consider using a more precise term.

- are in practice very often used
+ are commonly used

Line range hint 111-111: Simplify the phrase for clarity.

- and revert back to the original if the execution fails.
+ and revert to the original if the execution fails.

Line range hint 116-116: Correct the verb form for grammatical accuracy.

- If a transaction embed multiple messages
+ If a transaction embeds multiple messages

Line range hint 131-131: Remove unnecessary words for conciseness.

- `mempool.cache_size` is large enough to encompass all of the transactions
+ `mempool.cache_size` is large enough to encompass all transactions

Line range hint 143-143: Remove the comma for grammatical correctness.

- still possible to be found invalid later on, because `CheckTx` does not fully validate the transaction
+ still possible to be found invalid later on because `CheckTx` does not fully validate the transaction

Line range hint 153-153: Simplify the phrase to enhance readability.

- in order to come to this agreement
+ to reach this agreement

Line range hint 155-155: Use a more modern preposition for clarity.

- One proposer amongst the validators is chosen
+ One proposer among the validators is chosen

Line range hint 192-192: Correct the punctuation for consistency.

- * **`MsgServiceRouter`:** After `CheckTx` exits, `FinalizeBlock`
+ * **`MsgServiceRouter`**: After `CheckTx` exits, `FinalizeBlock`

Line range hint 203-203: Correct the preposition for grammatical accuracy.

- `GasUsed` is set and returned in the `abci.ExecTxResult`
+ `GasUsed` is set and returned to the `abci.ExecTxResult`

Line range hint 214-214: Simplify the phrase for clarity.

- in order to validate the transactions
+ to validate the transactions

Line range hint 216-216: Simplify the phrase for clarity.

- whether or not they should commit the state changes
+ whether they should commit the state changes

Line range hint 225-225: Simplify the phrase to enhance readability.

- in order to be consistent and reflect the changes
+ to be consistent and reflect the changes

Line range hint 227-227: Add a comma for grammatical correctness.

- and it is possible for consensus to result
+ and, it is possible for consensus to result

Line range hint 228-228: Consider using a more concise phrase.

- or one with none at all
+ or an empty one

Line range hint 233-233: Correct the punctuation for grammatical accuracy.

- the transaction lifecycle of a `Tx` is over: nodes have verified its validity
+ the transaction lifecycle of a `Tx` is over; nodes have verified its validity
Review details

Configuration used: .coderabbit.yml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 6967fbd and e579593.

Files selected for processing (6)
  • docs/learn/beginner/00-app-anatomy.md (2 hunks)
  • docs/learn/beginner/01-tx-lifecycle.md (1 hunks)
  • docs/learn/beginner/03-accounts.md (1 hunks)
  • docs/learn/intro/01-why-app-specific.md (1 hunks)
  • docs/learn/intro/02-sdk-app-architecture.md (2 hunks)
  • docs/learn/intro/03-sdk-design.md (1 hunks)
Files not reviewed due to errors (1)
  • docs/learn/beginner/00-app-anatomy.md (no review received)
Additional context used
Path-based instructions (6)
docs/learn/intro/03-sdk-design.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/01-why-app-specific.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/01-tx-lifecycle.md (1)

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

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

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

LanguageTool
docs/learn/intro/03-sdk-design.md

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


[uncategorized] ~60-~60: Loose punctuation mark.
Context: .... Some core modules include: * x/auth: Used to manage accounts and signatures....


[uncategorized] ~61-~61: Loose punctuation mark.
Context: ...nage accounts and signatures. * x/bank: Used to enable tokens and token transfe...


[typographical] ~64-~64: Make sure that the comma (,) is correct. Do not use a comma before a dependent clause that starts with ‘that’.
Context: ... to the already existing modules in x/, that anyone can use in their app, the Cosmos...

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

[typographical] ~13-~13: Unpaired symbol: ‘'’ seems to be missing
Context: ... state machine will return a new state S'. ```mermaid flowchart LR A[S] ...


[typographical] ~22-~22: Unpaired symbol: ‘'’ seems to be missing
Context: ... state machine will return a new state S'. ```mermaid flowchart LR A[S] ...


[style] ~33-~33: 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...


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


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


[style] ~91-~91: 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...


[style] ~96-~96: Consider a shorter alternative to avoid wordiness.
Context: ...T needs to implement the ABCI interface in order to communicate with the underlying local C...

docs/learn/intro/01-why-app-specific.md

[style] ~41-~41: To elevate your writing, try using a synonym here.
Context: ... or fork the Bitcoin codebase which was hard to work with and customize. Virtual-ma...


[style] ~43-~43: As a shorter alternative for ‘able to’, consider using “can”.
Context: ...ine incorporates a virtual-machine that is able to interpret turing-complete programs call...


[style] ~43-~43: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase.
Context: ...rt Contracts. These Smart Contracts are very good for use cases like one-time events (e.g...


[typographical] ~59-~59: Consider adding a comma after ‘Typically’ for more clarity.
Context: ...ttps://github.com/iov-one/weave), ...). Typically the choice will be made based on the pr...


[typographical] ~72-~72: The conjunction “so that” does not require a comma.
Context: ...chain only operates a single application, so that the application does not compete with o...


[style] ~77-~77: To elevate your writing, try using a synonym here.
Context: ...essing them. ### Security Security is hard to quantify, and greatly varies from pl...


[formatting] ~77-~77: Use a comma after introducing a concessive statement.
Context: ...eatly varies from platform to platform. That said here are some important benefits an app...


[style] ~85-~85: Did you mean ‘different from’? ‘Different than’ is often considered colloquial style.
Context: ...mmunity of the application is different than the community of the underlying blockch...

docs/learn/beginner/03-accounts.md

[uncategorized] ~22-~22: Possible missing comma found.
Context: ...roved of a given message. For HD key derivation the Cosmos SDK uses a standard called [...


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


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


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


[style] ~73-~73: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...es validator operators. * ConsAddress identifies validator nodes that are participating ...


[uncategorized] ~113-~113: A comma may be missing after the conjunctive/linking adverb ‘Otherwise’.
Context: ...o associated with the x-coordinate. * Otherwise the first byte is a 0x03. This prefi...


[uncategorized] ~190-~190: Possible missing comma found.
Context: ...rivKey{&ecdsaSK{*sk}}, nil } ``` After that secp256r1Algo can be implemented. ``...

docs/learn/beginner/01-tx-lifecycle.md

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


[style] ~42-~42: Consider shortening this phrase to just ‘whether’, unless you mean ‘regardless of whether’.
Context: ...e of the two. Later, validators decide whether or not to include the transaction in their blo...


[style] ~60-~60: ‘Prior to’ might be wordy. Consider a shorter alternative.
Context: ...rd a Tx if it is found to be invalid. Prior to consensus, nodes continuously check inc...


[uncategorized] ~71-~71: Possible missing preposition found.
Context: ...the definitions. Stateful checks validate transactions and messages based on a co...


[style] ~77-~77: Consider a shorter alternative to avoid wordiness.
Context: ...need a copy of the last committed state in order to answer queries - they should not respon...


[style] ~78-~78: Consider a shorter alternative to avoid wordiness.
Context: ... using state with uncommitted changes. In order to verify a Tx, full-nodes call `CheckTx...


[style] ~85-~85: Consider a shorter alternative to avoid wordiness.
Context: ...]byte form and needs to be unmarshaled in order to be processed. Then, the [runTx`](../ad...


[style] ~105-~105: To form a complete sentence, be sure to include a subject.
Context: ...y. ::: #### Guideline ValidateBasic should not be used anymore. Message validation...


[style] ~109-~109: Consider replacing ‘often’ with a more meaningful word.
Context: ...n though optional, are in practice very often used to perform signature verification,...


[style] ~111-~111: Consider using just “revert”.
Context: ...modifying the last committed state, and revert back to the original if the execution fails....


[grammar] ~116-~116: “Transaction” is a singular noun. It appears that the verb form is incorrect.
Context: ... run on a transaction. If a transaction embed multiple messages (like some x/authz, x...


[style] ~131-~131: Consider removing “of” to be more concise
Context: ...ache_size` is large enough to encompass all of the transactions in the full mempool. If th...


[formatting] ~143-~143: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ll possible to be found invalid later on, because CheckTx does not fully validate the t...


[style] ~153-~153: Consider a shorter alternative to avoid wordiness.
Context: ...using ABCI requests to the application, in order to come to this agreement. The first step...


[style] ~155-~155: The preposition ‘amongst’ is correct, but some people think that it is old-fashioned or literary. A more frequently used alternative is the preposition “among”.
Context: ...is the block proposal. One proposer amongst the validators is chosen by the consens...


[uncategorized] ~192-~192: Loose punctuation mark.
Context: ...inistic results. * MsgServiceRouter: After CheckTx exits, `FinalizeBlock...


[grammar] ~203-~203: The usual collocation for “returned” is “to”, not “in”.
Context: ...ecution completes, GasUsed is set and returned in the abci.ExecTxResult. If execution...


[style] ~214-~214: Consider a shorter alternative to avoid wordiness.
Context: ...ous step of executing state transitions in order to validate the transactions, then sign th...


[style] ~216-~216: Consider shortening this phrase to just ‘whether’, unless you mean ‘regardless of whether’.
Context: ...te - but listen for votes to understand whether or not they should commit the state changes. ...


[style] ~225-~225: Consider a shorter alternative to avoid wordiness.
Context: ...tate and deliverState resets to nil in order to be consistent and reflect the changes. ...


[uncategorized] ~227-~227: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...cks have the same number of transactions and it is possible for consensus to result ...


[style] ~228-~228: ‘none at all’ might be wordy. Consider a shorter alternative.
Context: ... to result in a nil block or one with none at all. In a public blockchain network, it is ...


[typographical] ~233-~233: Do not use a colon (:) before a series that is introduced by a preposition (‘over’). Remove the colon or add a noun or a noun phrase after the preposition.
Context: ... the transaction lifecycle of a Tx is over: nodes have verified its validity, deliv...

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


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


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


[style] ~87-~87: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ..., and all the appropriate store keys. * Instantiate all the keeper objects def...


[style] ~90-~90: Did you mean ‘different from’? ‘Different than’ is often considered colloquial style.
Context: ...e module. Should the value be different than the predicted one, special logic define...


[style] ~90-~90: To elevate your writing, try using a synonym here.
Context: ...producing long-lasting effects that are hard to fix. * With the module manager, set ...


[style] ~93-~93: This phrase is redundant. Consider writing “started”.
Context: ...o initialize the application when it is first started. * PreBlocker: cal...


[uncategorized] ~94-~94: Loose punctuation mark.
Context: ...arted. * PreBlocker: called before BeginBlock. * [`Begin...


[uncategorized] ~95-~95: Loose punctuation mark.
Context: ...before BeginBlock. * [BeginBlocker, EndBlocker](#beginblocker-and-endbloc...


[uncategorized] ~96-~96: Loose punctuation mark.
Context: ...](../advanced/00-baseapp.md#antehandler): used to handle fees and signature verif...


[uncategorized] ~159-~159: Loose punctuation mark.
Context: ...our fields means: * InterfaceRegistry: The InterfaceRegistry is used by the ...


[uncategorized] ~162-~162: Loose punctuation mark.
Context: ...9-protobuf-state-encoding.md). * Codec: The default codec used throughout the C...


[uncategorized] ~163-~163: Loose punctuation mark.
Context: ...K uses Protobuf as Codec. * TxConfig: TxConfig defines an interface a clien...


[uncategorized] ~164-~164: Loose punctuation mark.
Context: .../advanced/01-transactions.md). * Amino: Some legacy parts of the Cosmos SDK sti...


[style] ~175-~175: Consider a shorter alternative to avoid wordiness.
Context: ...0-baseapp.md) to the appropriate module in order to be processed. This paradigm enables dev...


[style] ~204-~204: Consider a shorter alternative to avoid wordiness.
Context: ...3-L36 ``` Service methods use keeper in order to update the module state. Each module s...


[formatting] ~228-~228: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...to unmarshal them when it retrieves them, because stores only accept []bytes as value. ...


[uncategorized] ~241-~241: Possible missing preposition found.
Context: ...opriate querier the queryRoute parameter supplied. #### ...

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

181-181: Column: 1
Hard tabs


182-182: Column: 1
Hard tabs


183-183: Column: 1
Hard tabs


184-184: Column: 1
Hard tabs


185-185: Column: 1
Hard tabs


186-186: Column: 1
Hard tabs


198-198: Column: 1
Hard tabs


199-199: Column: 1
Hard tabs


200-200: Column: 1
Hard tabs


201-201: Column: 1
Hard tabs


212-212: Column: 1
Hard tabs


217-217: Column: 1
Hard tabs


218-218: Column: 1
Hard tabs


219-219: Column: 1
Hard tabs


220-220: Column: 1
Hard tabs


221-221: Column: 1
Hard tabs


223-223: Column: 1
Hard tabs


224-224: Column: 1
Hard tabs


225-225: Column: 1
Hard tabs


226-226: Column: 1
Hard tabs


227-227: Column: 1
Hard tabs


229-229: Column: 1
Hard tabs


230-230: Column: 1
Hard tabs


235-235: Column: 1
Hard tabs


236-236: Column: 1
Hard tabs


237-237: Column: 1
Hard tabs


238-238: Column: 1
Hard tabs


239-239: Column: 1
Hard tabs


240-240: Column: 1
Hard tabs


241-241: Column: 1
Hard tabs


251-251: Column: 1
Hard tabs


252-252: Column: 1
Hard tabs


253-253: Column: 1
Hard tabs


254-254: Column: 1
Hard tabs


255-255: Column: 1
Hard tabs


256-256: Column: 1
Hard tabs


13-13: Expected: 1; Actual: 2
Multiple consecutive blank lines


168-168: Expected: 1; Actual: 2
Multiple consecutive blank lines

docs/learn/beginner/01-tx-lifecycle.md

91-91: Expected: 0 or 2; Actual: 1
Trailing spaces


162-162: Expected: 0 or 2; Actual: 1
Trailing spaces


163-163: Expected: 0 or 2; Actual: 1
Trailing spaces


187-187: Expected: 0 or 2; Actual: 1
Trailing spaces

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

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


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


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


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


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


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


52-52: Expected: 0 or 2; Actual: 1
Trailing spaces


129-129: null
Fenced code blocks should have a language specified

Additional comments not posted (6)
docs/learn/intro/03-sdk-design.md (1)

42-53: The MermaidJS diagram accurately represents the transaction flow within the Cosmos SDK, enhancing the document's clarity and understanding.

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

15-19: The MermaidJS diagram provides a clear and accurate representation of the state transition process for a single transaction within the Cosmos SDK.


24-28: The MermaidJS diagram effectively illustrates the state transition process for a block of transactions, enhancing the document's educational value.

docs/learn/intro/01-why-app-specific.md (1)

15-36: The MermaidJS diagram accurately represents the architecture of an application-specific blockchain, providing a clear visual aid to complement the textual description.

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

24-42: The MermaidJS diagram effectively illustrates the hierarchical relationship between accounts, addresses, public keys, private keys, and the master private key, enhancing the document's educational value.

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

166-172: The Mermaid diagram effectively visualizes the transaction lifecycle within a block. This change aligns with the PR's objective to enhance diagrammatic representations in the documentation.

tac0turtle and others added 2 commits May 31, 2024 12:35
Co-authored-by: Facundo Medica <14063057+facundomedica@users.noreply.github.com>
docs/learn/beginner/03-accounts.md Outdated Show resolved Hide resolved
@tac0turtle tac0turtle added this pull request to the merge queue Jun 3, 2024
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 (20)
docs/learn/intro/02-sdk-app-architecture.md (1)

Line range hint 33-33: Consider replacing 'gives' with 'provides' to enhance the tone of the documentation.

- The Cosmos SDK gives developers maximum flexibility to define the state...
+ The Cosmos SDK provides developers maximum flexibility to define the state...
Tools
LanguageTool

[typographical] ~13-~13: Unpaired symbol: ‘'’ seems to be missing
Context: ... state machine will return a new state S'. ```mermaid flowchart LR A[S] ...


[typographical] ~22-~22: Unpaired symbol: ‘'’ seems to be missing
Context: ... state machine will return a new state S'. ```mermaid flowchart LR A[S] ...

docs/learn/intro/01-why-app-specific.md (8)

Line range hint 41-41: To elevate the writing, consider using 'challenging' instead of 'hard'.

- ...or fork the Bitcoin codebase which was hard to work with and customize.
+ ...or fork the Bitcoin codebase which was challenging to work with and customize.

Line range hint 43-43: For conciseness, replace 'is able to' with 'can'.

- ...virtual-machine that is able to interpret turing-complete programs called...
+ ...virtual-machine that can interpret turing-complete programs called...

Line range hint 43-43: Consider replacing 'very good' with 'effective'.

- These Smart Contracts are very good for use cases like one-time events...
+ These Smart Contracts are effective for use cases like one-time events...

Line range hint 59-59: Add a comma after 'Typically' for clarity.

- ...). Typically the choice will be made based on the programming language...
+ ...). Typically, the choice will be made based on the programming language...

Line range hint 72-72: Remove the comma after 'so that' to correct the grammar.

- ...single application, so that the application does not compete with others...
+ ...single application so that the application does not compete with others...

Line range hint 77-77: Consider using 'difficult' instead of 'hard'.

- Security is hard to quantify, and greatly varies from platform to platform.
+ Security is difficult to quantify, and greatly varies from platform to platform.

Line range hint 77-77: Add a comma after 'That said' to improve readability.

- That said here are some important benefits an application-specific blockchain can bring...
+ That said, here are some important benefits an application-specific blockchain can bring...

Line range hint 85-85: Replace 'different than' with 'different from' for grammatical correctness.

- ...community of the application is different than the community of the underlying blockchain...
+ ...community of the application is different from the community of the underlying blockchain...
docs/learn/beginner/03-accounts.md (5)

Line range hint 69-69: Avoid repetitive sentence beginnings to enhance readability.

- * `ConsAddress` identifies validator nodes that are participating...
+ * `ConsAddress` denotes validator nodes that are participating...
Tools
LanguageTool

[uncategorized] ~22-~22: Possible missing comma found.
Context: ...roved of a given message. For HD key derivation the Cosmos SDK uses a standard called [...


Line range hint 109-109: Add a comma after 'Otherwise' for grammatical correctness.

- Otherwise the first byte is a `0x03`.
+ Otherwise, the first byte is a `0x03`.
Tools
LanguageTool

[uncategorized] ~22-~22: Possible missing comma found.
Context: ...roved of a given message. For HD key derivation the Cosmos SDK uses a standard called [...


Line range hint 153-153: Replace 'consists in' with 'consists of' for grammatical correctness.

- The interface consists in three methods where `Name()` returns the name of the algorithm...
+ The interface consists of three methods where `Name()` returns the name of the algorithm...
Tools
LanguageTool

[uncategorized] ~22-~22: Possible missing comma found.
Context: ...roved of a given message. For HD key derivation the Cosmos SDK uses a standard called [...


Line range hint 153-153: Add a comma after 'methods' for clarity.

- The interface consists of three methods where `Name()` returns the name of the algorithm...
+ The interface consists of three methods, where `Name()` returns the name of the algorithm...
Tools
LanguageTool

[uncategorized] ~22-~22: Possible missing comma found.
Context: ...roved of a given message. For HD key derivation the Cosmos SDK uses a standard called [...


Line range hint 168-168: Add a comma after 'First' for grammatical correctness.

- First a new function to create a private key from a secret number is needed...
+ First, a new function to create a private key from a secret number is needed...
Tools
LanguageTool

[uncategorized] ~22-~22: Possible missing comma found.
Context: ...roved of a given message. For HD key derivation the Cosmos SDK uses a standard called [...

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

Line range hint 65-65: Consider revising to "serialize and deserialize data structures for storage, as stores can only persist..."


Line range hint 69-69: Consider adding a comma after "purposes" for better readability.

- ...from `simapp`, the Cosmos SDK's own app used for demo and testing purposes:  
+ ...from `simapp`, the Cosmos SDK's own app used for demo and testing purposes,:

Line range hint 77-77: Consider simplifying to "must fulfill the AppCreator signature to be used in the start command."


Line range hint 87-87: Consider varying the sentence structure to avoid repetition of the word "Instantiate."

- * Instantiate all the [`keeper`](#keeper) objects defined in the application's `type` using the `NewKeeper` function of each of the application's modules. Note that keepers must be instantiated in the correct order, as the `NewKeeper` of one module might require a reference to another module's `keeper`.
+ * Create all the [`keeper`](#keeper) objects defined in the application's `type` using the `NewKeeper` function of each of the application's modules. Note that keepers must be created in the correct order, as the `NewKeeper` of one module might require a reference to another module's `keeper`.

Line range hint 90-90: Consider revising to "different from" for a more formal tone.

- ...e module. Should the value be different than the predicted one, special logic define...
+ ...e module. Should the value be different from the predicted one, special logic define...

Line range hint 93-96: Adjust the indentation of the unordered list to align with Markdown best practices.

-    * [`InitChainer`](#initchainer): used to initialize the application when it is first started.
-    * [`PreBlocker`](#preblocker): called before BeginBlock.
-    * [`BeginBlocker`, `EndBlocker`](#beginblocker-and-endblocker): called at the beginning and at the end of every block.
-    * [`anteHandler`](../advanced/00-baseapp.md#antehandler): used to handle fees and signature verification.
+  * [`InitChainer`](#initchainer): used to initialize the application when it is first started.
+  * [`PreBlocker`](#preblocker): called before BeginBlock.
+  * [`BeginBlocker`, `EndBlocker`](#beginblocker-and-endblocker): called at the beginning and at the end of every block.
+  * [`anteHandler`](../advanced/00-baseapp.md#antehandler): used to handle fees and signature verification.
Review details

Configuration used: .coderabbit.yml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between e579593 and c7ae0f8.

Files selected for processing (4)
  • docs/learn/beginner/00-app-anatomy.md (2 hunks)
  • docs/learn/beginner/03-accounts.md (1 hunks)
  • docs/learn/intro/01-why-app-specific.md (1 hunks)
  • docs/learn/intro/02-sdk-app-architecture.md (2 hunks)
Additional context used
Path-based instructions (4)
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/01-why-app-specific.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/00-app-anatomy.md (1)

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

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

[typographical] ~13-~13: Unpaired symbol: ‘'’ seems to be missing
Context: ... state machine will return a new state S'. ```mermaid flowchart LR A[S] ...


[typographical] ~22-~22: Unpaired symbol: ‘'’ seems to be missing
Context: ... state machine will return a new state S'. ```mermaid flowchart LR A[S] ...


[style] ~33-~33: 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...


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


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


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


[style] ~91-~91: 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...


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


[style] ~96-~96: Consider a shorter alternative to avoid wordiness.
Context: ...T needs to implement the ABCI interface in order to communicate with the underlying local C...

docs/learn/intro/01-why-app-specific.md

[style] ~41-~41: To elevate your writing, try using a synonym here.
Context: ... or fork the Bitcoin codebase which was hard to work with and customize. Virtual-ma...


[style] ~43-~43: As a shorter alternative for ‘able to’, consider using “can”.
Context: ...ine incorporates a virtual-machine that is able to interpret turing-complete programs call...


[style] ~43-~43: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase.
Context: ...rt Contracts. These Smart Contracts are very good for use cases like one-time events (e.g...


[typographical] ~59-~59: Consider adding a comma after ‘Typically’ for more clarity.
Context: ...ttps://github.com/iov-one/weave), ...). Typically the choice will be made based on the pr...


[typographical] ~72-~72: The conjunction “so that” does not require a comma.
Context: ...chain only operates a single application, so that the application does not compete with o...


[style] ~77-~77: To elevate your writing, try using a synonym here.
Context: ...essing them. ### Security Security is hard to quantify, and greatly varies from pl...


[formatting] ~77-~77: Use a comma after introducing a concessive statement.
Context: ...eatly varies from platform to platform. That said here are some important benefits an app...


[style] ~85-~85: Did you mean ‘different from’? ‘Different than’ is often considered colloquial style.
Context: ...mmunity of the application is different than the community of the underlying blockch...

docs/learn/beginner/03-accounts.md

[uncategorized] ~22-~22: Possible missing comma found.
Context: ...roved of a given message. For HD key derivation the Cosmos SDK uses a standard called [...


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


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


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


[style] ~69-~69: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...es validator operators. * ConsAddress identifies validator nodes that are participating ...


[uncategorized] ~109-~109: A comma may be missing after the conjunctive/linking adverb ‘Otherwise’.
Context: ...o associated with the x-coordinate. * Otherwise the first byte is a 0x03. This prefi...


[uncategorized] ~153-~153: The preposition ‘of’ seems more likely in this position.
Context: ....go#L10-L15 ``` The interface consists in three methods where Name() returns th...


[uncategorized] ~153-~153: Possible missing comma found.
Context: ...15 ``` The interface consists in three methods where Name() returns the name of the ...


[uncategorized] ~168-~168: Possible missing comma found.
Context: ...of how secp256r1 could be implemented. First a new function to create a private key ...

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


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


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


[style] ~87-~87: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ..., and all the appropriate store keys. * Instantiate all the keeper objects def...


[style] ~90-~90: Did you mean ‘different from’? ‘Different than’ is often considered colloquial style.
Context: ...e module. Should the value be different than the predicted one, special logic define...


[style] ~90-~90: To elevate your writing, try using a synonym here.
Context: ...producing long-lasting effects that are hard to fix. * With the module manager, set ...


[style] ~93-~93: This phrase is redundant. Consider writing “started”.
Context: ...o initialize the application when it is first started. * PreBlocker: cal...


[uncategorized] ~94-~94: Loose punctuation mark.
Context: ...arted. * PreBlocker: called before BeginBlock. * [`Begin...


[uncategorized] ~95-~95: Loose punctuation mark.
Context: ...before BeginBlock. * [BeginBlocker, EndBlocker](#beginblocker-and-endbloc...


[uncategorized] ~96-~96: Loose punctuation mark.
Context: ...](../advanced/00-baseapp.md#antehandler): used to handle fees and signature verif...


[uncategorized] ~159-~159: Loose punctuation mark.
Context: ...our fields means: * InterfaceRegistry: The InterfaceRegistry is used by the ...


[uncategorized] ~162-~162: Loose punctuation mark.
Context: ...9-protobuf-state-encoding.md). * Codec: The default codec used throughout the C...


[uncategorized] ~163-~163: Loose punctuation mark.
Context: ...K uses Protobuf as Codec. * TxConfig: TxConfig defines an interface a clien...


[uncategorized] ~164-~164: Loose punctuation mark.
Context: .../advanced/01-transactions.md). * Amino: Some legacy parts of the Cosmos SDK sti...


[style] ~175-~175: Consider a shorter alternative to avoid wordiness.
Context: ...0-baseapp.md) to the appropriate module in order to be processed. This paradigm enables dev...


[style] ~204-~204: Consider a shorter alternative to avoid wordiness.
Context: ...3-L36 ``` Service methods use keeper in order to update the module state. Each module s...


[formatting] ~228-~228: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...to unmarshal them when it retrieves them, because stores only accept []bytes as value. ...


[uncategorized] ~241-~241: Possible missing preposition found.
Context: ...opriate querier the queryRoute parameter supplied. #### ...

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

177-177: Column: 1
Hard tabs


178-178: Column: 1
Hard tabs


179-179: Column: 1
Hard tabs


180-180: Column: 1
Hard tabs


181-181: Column: 1
Hard tabs


182-182: Column: 1
Hard tabs


194-194: Column: 1
Hard tabs


195-195: Column: 1
Hard tabs


196-196: Column: 1
Hard tabs


197-197: Column: 1
Hard tabs


208-208: Column: 1
Hard tabs


213-213: Column: 1
Hard tabs


214-214: Column: 1
Hard tabs


215-215: Column: 1
Hard tabs


216-216: Column: 1
Hard tabs


217-217: Column: 1
Hard tabs


219-219: Column: 1
Hard tabs


220-220: Column: 1
Hard tabs


221-221: Column: 1
Hard tabs


222-222: Column: 1
Hard tabs


223-223: Column: 1
Hard tabs


225-225: Column: 1
Hard tabs


226-226: Column: 1
Hard tabs


231-231: Column: 1
Hard tabs


232-232: Column: 1
Hard tabs


233-233: Column: 1
Hard tabs


234-234: Column: 1
Hard tabs


235-235: Column: 1
Hard tabs


236-236: Column: 1
Hard tabs


237-237: Column: 1
Hard tabs


247-247: Column: 1
Hard tabs


248-248: Column: 1
Hard tabs


249-249: Column: 1
Hard tabs


250-250: Column: 1
Hard tabs


251-251: Column: 1
Hard tabs


252-252: Column: 1
Hard tabs


13-13: Expected: 1; Actual: 2
Multiple consecutive blank lines


164-164: Expected: 1; Actual: 2
Multiple consecutive blank lines

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

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


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


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


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


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


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


52-52: Expected: 0 or 2; Actual: 1
Trailing spaces


129-129: null
Fenced code blocks should have a language specified

Additional comments not posted (7)
docs/learn/intro/02-sdk-app-architecture.md (3)

17-19: The Mermaid diagram syntax is correct and visually represents the state transition clearly.


26-28: The suggestion by facundomedica to use "For each T in B: apply(T)" as the label for the arrow in the Mermaid diagram is a good improvement for clarity.


40-57: The Mermaid diagram for the Blockchain_Node structure is well-formed and accurately represents the inclusion of State-machine and CometBFT components.

docs/learn/intro/01-why-app-specific.md (1)

16-36: The Mermaid diagram correctly visualizes the structure of a Blockchain_Node with its components. Ensure that the term "Interaction" does not appear in the rendered diagram as per the previous discussion.

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

24-38: The Mermaid diagram correctly represents the hierarchical relationship between accounts, public keys, and private keys. Ensure the direction of arrows matches the logical flow of key derivation as discussed in previous comments.


22-22: Add a comma after 'message' for grammatical correctness.

- ...`PrivKey` approved of a given `message`.
+ ...`PrivKey` approved of a given `message`,

Likely invalid or redundant comment.

Tools
LanguageTool

[uncategorized] ~22-~22: Possible missing comma found.
Context: ...roved of a given message. For HD key derivation the Cosmos SDK uses a standard called [...

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

15-39: The MermaidJS diagram provides a clear and structured visual representation of the Cosmos SDK application's architecture. This is a significant improvement over the previous text-based representation.

Merged via the queue into main with commit 61da5d1 Jun 3, 2024
62 of 63 checks passed
@tac0turtle tac0turtle deleted the marko/20172 branch June 3, 2024 08:17
alpe added a commit that referenced this pull request Jun 3, 2024
* main:
  docs: add docs on permissions (#20526)
  refactor(x/gov): set environment in context for legacy proposals (#20521)
  docs: migrate diagrams to mermaidjs (#20503)
  refactor(tools/hubl): don't use nil panic (#20515)
  refactor(x/authz): set environment in context (#20502)
  build(deps): Bump github.com/spf13/viper from 1.18.2 to 1.19.0 (#20519)
  feat(x/bank): Placing SendRestriction before Deduction of Coins in SendCoins (#20517)
  chore: sonar ignore directories with their own go.mods  (#20509)
  ci: run action in merge queue (#20508)
alpe added a commit that referenced this pull request Jun 3, 2024
* main:
  refactor(x/feegrant): set environment in context (#20529)
  refactor(x/accounts)!: accounts and auth module use the same account number tracking (#20405)
  chore: remove sonar from simapp (#20528)
  docs: add docs on permissions (#20526)
  refactor(x/gov): set environment in context for legacy proposals (#20521)
  docs: migrate diagrams to mermaidjs (#20503)
  refactor(tools/hubl): don't use nil panic (#20515)
  refactor(x/authz): set environment in context (#20502)
  build(deps): Bump github.com/spf13/viper from 1.18.2 to 1.19.0 (#20519)
  feat(x/bank): Placing SendRestriction before Deduction of Coins in SendCoins (#20517)
  chore: sonar ignore directories with their own go.mods  (#20509)
  ci: run action in merge queue (#20508)
  refactor(server/v2/cometbft): update function comments (#20506)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Documentation]: Fix all diagrams to use excalidraw diagrams
4 participants