Skip to content

docs: sync example tutorials from cosmos/example - #342

Merged
evanorti merged 2 commits into
mainfrom
docs-sync/example-20260825-145044
Aug 25, 2026
Merged

docs: sync example tutorials from cosmos/example#342
evanorti merged 2 commits into
mainfrom
docs-sync/example-20260825-145044

Conversation

@evanorti

Copy link
Copy Markdown
Contributor

Auto-synced from cosmos/example. Transforms docs/.md to sdk/next/tutorials/example/.mdx. Do not edit these files directly — edit the source in cosmos/example and let the sync bot update them.

@evanorti evanorti added the docs-sync Automated docs sync PR label Aug 25, 2026
@mintlify

mintlify Bot commented Aug 25, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
cosmos-docs 🟢 Ready View Preview Aug 25, 2026, 2:53 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@greptile-apps

greptile-apps Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This sync expands the example tutorials with accurate asynchronous transaction-broadcast guidance and a governance-based parameter-update walkthrough.

  • Documents the initial transaction acknowledgement and the follow-up transaction query.
  • Replaces the invalid direct parameter-update example with proposal submission and voting instructions.
  • Adds a local workflow intended to shorten governance voting periods for testing.

Confidence Score: 4/5

The PR should not merge until the local governance setup also shortens expedited_voting_period, because the documented restart otherwise fails genesis validation.

The transaction guidance and proposal flow are coherent, but the new 20-second voting-period instructions create an invalid governance genesis configuration that prevents readers from starting the example chain.

Files Needing Attention: sdk/next/tutorials/example/05-run-and-test.mdx

Important Files Changed

Filename Overview
sdk/next/tutorials/example/03-build-a-module.mdx Clarifies that the immediate broadcast result reflects validation rather than block execution and directs readers to query the committed transaction.
sdk/next/tutorials/example/05-run-and-test.mdx Adds the governance proposal workflow, but its shortened-period setup leaves an incompatible expedited voting period that prevents node startup.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Submit counter transaction] --> B[CheckTx acknowledgement]
  B --> C[Query transaction after inclusion]
  D[Create MsgUpdateParams proposal] --> E[Submit deposit]
  E --> F[Vote]
  F --> G[Governance executes parameter update]
Loading

Reviews (1): Last reviewed commit: "docs: sync example tutorials from cosmos..." | Re-trigger Greptile

Comment on lines +181 to +183
# 2. Lower the voting period in the generated genesis
# app_state.gov.params.voting_period, for example "20s"
vi ~/.exampleapp/config/genesis.json

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Invalid governance genesis periods

When a reader lowers only voting_period to 20s, the default expedited_voting_period remains longer than the regular period, causing governance genesis validation to fail and preventing exampled start from launching the chain.

Suggested change
# 2. Lower the voting period in the generated genesis
# app_state.gov.params.voting_period, for example "20s"
vi ~/.exampleapp/config/genesis.json
# 2. Lower both governance voting periods in the generated genesis
# app_state.gov.params.voting_period, for example "20s"
# app_state.gov.params.expedited_voting_period must be shorter, for example "10s"
vi ~/.exampleapp/config/genesis.json

Knowledge Base Used: Cosmos SDK application development

@evanorti

Copy link
Copy Markdown
Contributor Author

Sync updated: cosmos/example was updated before this PR merged. Branch has been refreshed, please re-review.

@evanorti
evanorti merged commit 9a38803 into main Aug 25, 2026
3 checks passed
@evanorti
evanorti deleted the docs-sync/example-20260825-145044 branch August 25, 2026 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-sync Automated docs sync PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant