Skip to content

Commit

Permalink
chore: rename develop to learn (backport #17821) (#17830)
Browse files Browse the repository at this point in the history
Co-authored-by: Marko <marbar3778@yahoo.com>
  • Loading branch information
mergify[bot] and tac0turtle authored Sep 21, 2023
1 parent 3d9ce99 commit cdd7d8c
Show file tree
Hide file tree
Showing 61 changed files with 92 additions and 88 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/md-link-checker.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
name: Check Markdown links
on:
schedule:
- cron: '* */24 * * *'
pull_request:
paths:
- "docs/**"
jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: cd docs && sh ./pre.sh
- uses: gaurav-nelson/github-action-markdown-link-check@1.0.15
with:
folder-path: "docs"
- run: cd docs && sh ./post.sh
4 changes: 2 additions & 2 deletions docs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +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
docs/develop/advanced/17-autocli.md
docs/learn/advanced/17-autocli.md

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

npm-debug.log*
yarn-debug.log*
yarn-error.log*
yarn-error.log*
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 cdd7d8c

Please sign in to comment.