Skip to content

Commit

Permalink
chore: rename develop to learn (#17821)
Browse files Browse the repository at this point in the history
(cherry picked from commit 2efafee)

# Conflicts:
#	.github/workflows/md-link-checker.yml
#	docs/.gitignore
#	docs/develop/advanced/00-baseapp.md
#	docs/develop/advanced/01-transactions.md
#	docs/develop/advanced/02-context.md
#	docs/develop/advanced/03-node.md
#	docs/develop/advanced/04-store.md
#	docs/develop/advanced/05-encoding.md
#	docs/develop/advanced/06-grpc_rest.md
#	docs/develop/advanced/07-cli.md
#	docs/develop/advanced/08-events.md
#	docs/develop/advanced/09-telemetry.md
#	docs/develop/advanced/10-ocap.md
#	docs/develop/advanced/11-runtx_middleware.md
#	docs/develop/advanced/12-simulation.md
#	docs/develop/advanced/13-proto-docs.md
#	docs/develop/advanced/15-upgrade.md
#	docs/develop/advanced/16-config.md
#	docs/develop/advanced/_category_.json
#	docs/develop/advanced/baseapp_state-begin_block.png
#	docs/develop/advanced/baseapp_state-checktx.png
#	docs/develop/advanced/baseapp_state-commit.png
#	docs/develop/advanced/baseapp_state-deliver_tx.png
#	docs/develop/advanced/baseapp_state-initchain.png
#	docs/develop/advanced/baseapp_state-prepareproposal.png
#	docs/develop/advanced/baseapp_state-processproposal.png
#	docs/develop/advanced/baseapp_state.png
#	docs/develop/beginner/00-app-anatomy.md
#	docs/develop/beginner/01-tx-lifecycle.md
#	docs/develop/beginner/02-query-lifecycle.md
#	docs/develop/beginner/03-accounts.md
#	docs/develop/beginner/04-gas-fees.md
#	docs/develop/beginner/_category_.json
#	docs/develop/intro/00-overview.md
#	docs/develop/intro/01-why-app-specific.md
#	docs/develop/intro/02-sdk-app-architecture.md
#	docs/develop/intro/03-sdk-design.md
#	docs/develop/intro/_category_.json
#	docs/docs/build/building-modules/06-keeper.md
#	docs/docs/develop/advanced/00-baseapp.md
#	docs/docs/develop/advanced/01-transactions.md
#	docs/docs/develop/advanced/02-context.md
#	docs/docs/develop/advanced/03-node.md
#	docs/docs/develop/advanced/04-store.md
#	docs/docs/develop/advanced/05-encoding.md
#	docs/docs/develop/advanced/06-grpc_rest.md
#	docs/docs/develop/advanced/07-cli.md
#	docs/docs/develop/advanced/08-events.md
#	docs/docs/develop/advanced/09-telemetry.md
#	docs/docs/develop/advanced/10-ocap.md
#	docs/docs/develop/advanced/11-runtx_middleware.md
#	docs/docs/develop/advanced/12-simulation.md
#	docs/docs/develop/advanced/13-proto-docs.md
#	docs/docs/develop/advanced/15-upgrade.md
#	docs/docs/develop/advanced/16-config.md
#	docs/docs/develop/advanced/_category_.json
#	docs/docs/develop/advanced/baseapp_state-begin_block.png
#	docs/docs/develop/advanced/baseapp_state-checktx.png
#	docs/docs/develop/advanced/baseapp_state-commit.png
#	docs/docs/develop/advanced/baseapp_state-deliver_tx.png
#	docs/docs/develop/advanced/baseapp_state-initchain.png
#	docs/docs/develop/advanced/baseapp_state-prepareproposal.png
#	docs/docs/develop/advanced/baseapp_state-processproposal.png
#	docs/docs/develop/advanced/baseapp_state.png
#	docs/docs/develop/beginner/00-app-anatomy.md
#	docs/docs/develop/beginner/01-tx-lifecycle.md
#	docs/docs/develop/beginner/02-query-lifecycle.md
#	docs/docs/develop/beginner/03-accounts.md
#	docs/docs/develop/beginner/04-gas-fees.md
#	docs/docs/develop/beginner/_category_.json
#	docs/docs/develop/intro/00-what-is-sdk.md
#	docs/docs/develop/intro/01-why-app-specific.md
#	docs/docs/develop/intro/02-sdk-app-architecture.md
#	docs/docs/develop/intro/03-sdk-design.md
#	docs/docs/develop/intro/_category_.json
#	docs/learn/advanced/00-baseapp.md
#	docs/learn/advanced/01-transactions.md
#	docs/learn/advanced/02-context.md
#	docs/learn/advanced/03-node.md
#	docs/learn/advanced/04-store.md
#	docs/learn/advanced/05-encoding.md
#	docs/learn/advanced/06-grpc_rest.md
#	docs/learn/advanced/07-cli.md
#	docs/learn/advanced/08-events.md
#	docs/learn/advanced/09-telemetry.md
#	docs/learn/advanced/10-ocap.md
#	docs/learn/advanced/11-runtx_middleware.md
#	docs/learn/advanced/12-simulation.md
#	docs/learn/advanced/13-proto-docs.md
#	docs/learn/advanced/15-upgrade.md
#	docs/learn/advanced/16-config.md
#	docs/learn/advanced/_category_.json
#	docs/learn/advanced/baseapp_state-begin_block.png
#	docs/learn/advanced/baseapp_state-checktx.png
#	docs/learn/advanced/baseapp_state-commit.png
#	docs/learn/advanced/baseapp_state-deliver_tx.png
#	docs/learn/advanced/baseapp_state-initchain.png
#	docs/learn/advanced/baseapp_state-prepareproposal.png
#	docs/learn/advanced/baseapp_state-processproposal.png
#	docs/learn/advanced/baseapp_state.png
#	docs/learn/beginner/00-app-anatomy.md
#	docs/learn/beginner/01-tx-lifecycle.md
#	docs/learn/beginner/02-query-lifecycle.md
#	docs/learn/beginner/03-accounts.md
#	docs/learn/beginner/04-gas-fees.md
#	docs/learn/beginner/_category_.json
#	docs/learn/intro/00-overview.md
#	docs/learn/intro/01-why-app-specific.md
#	docs/learn/intro/02-sdk-app-architecture.md
#	docs/learn/intro/03-sdk-design.md
#	docs/learn/intro/_category_.json
#	docs/post.sh
#	docs/pre.sh
  • Loading branch information
tac0turtle authored and mergify[bot] committed Sep 21, 2023
1 parent 3d9ce99 commit 0b800f7
Show file tree
Hide file tree
Showing 60 changed files with 4,074 additions and 77 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/md-link-checker.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
name: Check Markdown links
on:
schedule:
- cron: '* */24 * * *'
pull_request:
paths:
- "docs/**"
jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
<<<<<<< HEAD
- uses: actions/checkout@v3
=======
- uses: actions/checkout@v4
- run: cd docs && sh ./pre.sh
>>>>>>> 2efafee65 (chore: rename develop to learn (#17821))
- uses: gaurav-nelson/[email protected]
with:
folder-path: "docs"
- run: cd docs && sh ./post.sh
6 changes: 5 additions & 1 deletion docs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ docs/docs/packages/02-collections.md
docs/docs/packages/03-orm.md
docs/user/run-node/04-rosetta.md
docs/build/migrations/02-upgrading.md
<<<<<<< HEAD
docs/develop/advanced/17-autocli.md

# Misc
Expand All @@ -35,4 +36,7 @@ docs/develop/advanced/17-autocli.md

npm-debug.log*
yarn-debug.log*
yarn-error.log*
yarn-error.log*
=======
docs/learn/advanced/17-autocli.md
>>>>>>> 2efafee65 (chore: rename develop to learn (#17821))
2 changes: 1 addition & 1 deletion docs/architecture/adr-033-protobuf-inter-module-comm.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ service definitions defined in [ADR 021](./adr-021-protobuf-query-encoding.md) a

## Context

In the current Cosmos SDK documentation on the [Object-Capability Model](../../develop/advanced/10-ocap.md), it is stated that:
In the current Cosmos SDK documentation on the [Object-Capability Model](../../learn/advanced/10-ocap.md), it is stated that:

> We assume that a thriving ecosystem of Cosmos SDK modules that are easy to compose into a blockchain application will contain faulty or malicious modules.
Expand Down
8 changes: 4 additions & 4 deletions docs/docs/Introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ Cosmos SDK is the world’s most popular framework for building application-spec

Read all about the SDK or dive straight into the code with tutorials.

* [**Introductions to the Cosmos SDK**](develop/intro/00-overview.md) - Learn about all the parts of the Cosmos SDK.
* [**Introductions to the Cosmos SDK**](learn/intro/00-overview.md) - Learn about all the parts of the Cosmos SDK.
* [**SDK Tutorials**](https://tutorials.cosmos.network) - Build a complete blockchain application from scratch.

## Explore the SDK

Get familiar with the SDK and explore its main concepts.

* [**Introduction**](develop/intro/00-overview.md) - High-level overview of the Cosmos SDK.
* [**Basics**](develop/beginner/00-app-anatomy.md) - Anatomy of a blockchain, transaction lifecycle, accounts and more.
* [**Core Concepts**](develop/advanced/00-baseapp.md) - Read about the core concepts like baseapp, the store, or the server.
* [**Introduction**](learn/intro/00-overview.md) - High-level overview of the Cosmos SDK.
* [**Basics**](learn/beginner/00-app-anatomy.md) - Anatomy of a blockchain, transaction lifecycle, accounts and more.
* [**Core Concepts**](learn/advanced/00-baseapp.md) - Read about the core concepts like baseapp, the store, or the server.
* [**Building Modules**](build/building-modules/00-intro.md) - Discover how to build modules for the Cosmos SDK.
* [**Running a Node**](user/run-node/00-keyring.md) - Running and interacting with nodes using the CLI and API.
* [**Modules**](build/modules) - Explore existing modules to build your application with.
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/build/building-apps/02-app-mempool.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Notably it introduces the `PrepareProposal` and `ProcessProposal` steps of ABCI+

:::note Pre-requisite Readings

* [BaseApp](../../develop/advanced/00-baseapp.md)
* [BaseApp](../../learn/advanced/00-baseapp.md)

:::

Expand Down
14 changes: 7 additions & 7 deletions docs/docs/build/building-modules/00-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ Modules define most of the logic of Cosmos SDK applications. Developers compose

:::note Pre-requisite Readings

* [Anatomy of a Cosmos SDK application](../../develop/beginner/00-app-anatomy.md)
* [Lifecycle of a Cosmos SDK transaction](../../develop/beginner/01-tx-lifecycle.md)
* [Anatomy of a Cosmos SDK application](../../learn/beginner/00-app-anatomy.md)
* [Lifecycle of a Cosmos SDK transaction](../../learn/beginner/01-tx-lifecycle.md)

:::

## Role of Modules in a Cosmos SDK Application

The Cosmos SDK can be thought of as the Ruby-on-Rails of blockchain development. It comes with a core that provides the basic functionalities every blockchain application needs, like a [boilerplate implementation of the ABCI](../../develop/advanced/00-baseapp.md) to communicate with the underlying consensus engine, a [`multistore`](../../develop/advanced/04-store.md#multistore) to persist state, a [server](../../develop/advanced/03-node.md) to form a full-node and [interfaces](./09-module-interfaces.md) to handle queries.
The Cosmos SDK can be thought of as the Ruby-on-Rails of blockchain development. It comes with a core that provides the basic functionalities every blockchain application needs, like a [boilerplate implementation of the ABCI](../../learn/advanced/00-baseapp.md) to communicate with the underlying consensus engine, a [`multistore`](../../learn/advanced/04-store.md#multistore) to persist state, a [server](../../learn/advanced/03-node.md) to form a full-node and [interfaces](./09-module-interfaces.md) to handle queries.

On top of this core, the Cosmos SDK enables developers to build modules that implement the business logic of their application. In other words, SDK modules implement the bulk of the logic of applications, while the core does the wiring and enables modules to be composed together. The end goal is to build a robust ecosystem of open-source Cosmos SDK modules, making it increasingly easier to build complex blockchain applications.

Cosmos SDK modules can be seen as little state-machines within the state-machine. They generally define a subset of the state using one or more `KVStore`s in the [main multistore](../../develop/advanced/04-store.md), as well as a subset of [message types](./02-messages-and-queries.md#messages). These messages are routed by one of the main components of Cosmos SDK core, [`BaseApp`](../../develop/advanced/00-baseapp.md), to a module Protobuf [`Msg` service](./03-msg-services.md) that defines them.
Cosmos SDK modules can be seen as little state-machines within the state-machine. They generally define a subset of the state using one or more `KVStore`s in the [main multistore](../../learn/advanced/04-store.md), as well as a subset of [message types](./02-messages-and-queries.md#messages). These messages are routed by one of the main components of Cosmos SDK core, [`BaseApp`](../../learn/advanced/00-baseapp.md), to a module Protobuf [`Msg` service](./03-msg-services.md) that defines them.

```text
+
Expand Down Expand Up @@ -75,16 +75,16 @@ As a result of this architecture, building a Cosmos SDK application usually revo
While there are no definitive guidelines for writing modules, here are some important design principles developers should keep in mind when building them:

* **Composability**: Cosmos SDK applications are almost always composed of multiple modules. This means developers need to carefully consider the integration of their module not only with the core of the Cosmos SDK, but also with other modules. The former is achieved by following standard design patterns outlined [here](#main-components-of-sdk-modules), while the latter is achieved by properly exposing the store(s) of the module via the [`keeper`](./06-keeper.md).
* **Specialization**: A direct consequence of the **composability** feature is that modules should be **specialized**. Developers should carefully establish the scope of their module and not batch multiple functionalities into the same module. This separation of concerns enables modules to be re-used in other projects and improves the upgradability of the application. **Specialization** also plays an important role in the [object-capabilities model](../../develop/advanced/10-ocap.md) of the Cosmos SDK.
* **Specialization**: A direct consequence of the **composability** feature is that modules should be **specialized**. Developers should carefully establish the scope of their module and not batch multiple functionalities into the same module. This separation of concerns enables modules to be re-used in other projects and improves the upgradability of the application. **Specialization** also plays an important role in the [object-capabilities model](../../learn/advanced/10-ocap.md) of the Cosmos SDK.
* **Capabilities**: Most modules need to read and/or write to the store(s) of other modules. However, in an open-source environment, it is possible for some modules to be malicious. That is why module developers need to carefully think not only about how their module interacts with other modules, but also about how to give access to the module's store(s). The Cosmos SDK takes a capabilities-oriented approach to inter-module security. This means that each store defined by a module is accessed by a `key`, which is held by the module's [`keeper`](./06-keeper.md). This `keeper` defines how to access the store(s) and under what conditions. Access to the module's store(s) is done by passing a reference to the module's `keeper`.

## Main Components of Cosmos SDK Modules

Modules are by convention defined in the `./x/` subfolder (e.g. the `bank` module will be defined in the `./x/bank` folder). They generally share the same core components:

* A [`keeper`](./06-keeper.md), used to access the module's store(s) and update the state.
* A [`Msg` service](./02-messages-and-queries.md#messages), used to process messages when they are routed to the module by [`BaseApp`](../../develop/advanced/00-baseapp.md#message-routing) and trigger state-transitions.
* A [query service](./04-query-services.md), used to process user queries when they are routed to the module by [`BaseApp`](../../develop/advanced/00-baseapp.md#query-routing).
* A [`Msg` service](./02-messages-and-queries.md#messages), used to process messages when they are routed to the module by [`BaseApp`](../../learn/advanced/00-baseapp.md#message-routing) and trigger state-transitions.
* A [query service](./04-query-services.md), used to process user queries when they are routed to the module by [`BaseApp`](../../learn/advanced/00-baseapp.md#query-routing).
* Interfaces, for end users to query the subset of the state defined by the module and create `message`s of the custom types defined in the module.

In addition to these components, modules implement the `AppModule` interface in order to be managed by the [`module manager`](./01-module-manager.md).
Expand Down
Loading

0 comments on commit 0b800f7

Please sign in to comment.