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

Bump font weight docs website and fix link #5391

Merged
merged 254 commits into from
Dec 11, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
254 commits
Select commit Hold shift + click to select a range
4a86564
working
gamarin2 May 24, 2019
a9e303c
querier
gamarin2 May 28, 2019
0913fb6
working
gamarin2 Jun 3, 2019
167104c
merg
gamarin2 Jun 3, 2019
6346e8b
workiiiing
gamarin2 Jun 5, 2019
23f8f78
finish
gamarin2 Jun 5, 2019
9c2fd4e
add dep and makefile
gamarin2 Jun 5, 2019
9baaed7
Apply suggestions from code review
gamarin2 Jun 5, 2019
45f5654
typo
gamarin2 Jun 5, 2019
265ed8e
typo
gamarin2 Jun 5, 2019
0a83404
Apply suggestions from code review
gamarin2 Jun 6, 2019
5f883fd
refactor for new module interface
gamarin2 Jun 10, 2019
b06fafc
pull
gamarin2 Jun 10, 2019
dde15ae
karoly review
gamarin2 Jun 11, 2019
da2514f
Apply suggestions from code review
gamarin2 Jun 11, 2019
56c3f5b
encoding
gamarin2 Jun 11, 2019
4f7c6b4
working on baseapp doc
gamarin2 Jun 17, 2019
e37310f
baseapp work
gamarin2 Jun 27, 2019
92a0db9
reorg
gamarin2 Jun 27, 2019
94664fe
almost there
gamarin2 Jul 5, 2019
2624fec
finish first draft
gamarin2 Jul 5, 2019
9aedc16
Merge branch 'master' into gamarin/baseapp
gamarin2 Jul 5, 2019
3496625
remove old files
gamarin2 Jul 5, 2019
c90c997
module doc start
gamarin2 Jul 10, 2019
1239fcb
finish intro
gamarin2 Jul 11, 2019
a2e24e8
working
gamarin2 Jul 15, 2019
0f1b61d
workinnn
gamarin2 Jul 18, 2019
c5bb538
add transactions into core
glozow Jul 18, 2019
3c7d388
hans comments
glozow Jul 25, 2019
41e922c
add transactions into core
glozow Jul 18, 2019
37a2f11
final edits
glozow Aug 8, 2019
c3623e9
working
gamarin2 Aug 8, 2019
1e70aaf
gautier comments
glozow Aug 10, 2019
e8f59d2
merge
gamarin2 Aug 20, 2019
81cf8e6
clean
gamarin2 Aug 20, 2019
a6788cd
working
gamarin2 Aug 20, 2019
16d78da
consolidate intro
gamarin2 May 20, 2019
66dd675
querier
gamarin2 May 28, 2019
6d1df2e
workiiiing
gamarin2 Jun 5, 2019
afbaba5
refactor for new module interface
gamarin2 Jun 10, 2019
a039341
karoly review
gamarin2 Jun 11, 2019
dc97fb5
working on baseapp doc
gamarin2 Jun 17, 2019
24570fe
baseapp work
gamarin2 Jun 27, 2019
2c412ec
reorg
gamarin2 Jun 27, 2019
f783f03
almost there
gamarin2 Jul 5, 2019
653ada2
finish first draft
gamarin2 Jul 5, 2019
0fc3c9a
remove old files
gamarin2 Jul 5, 2019
7b1f376
finish intro
gamarin2 Jul 11, 2019
023c31e
workinnn
gamarin2 Jul 18, 2019
033af57
initial commit after rebase
glozow Jul 20, 2019
f342f3a
query-lifecycle and started modules-interfaces
glozow Jul 20, 2019
f766dc2
query-lifecycle first draft done
glozow Jul 21, 2019
45fb5f1
module interfaces first draft
glozow Jul 23, 2019
a77f607
rest and intro skeletons
glozow Jul 26, 2019
0284332
rest and intro done
glozow Jul 26, 2019
54ced86
small edits and links
glozow Jul 26, 2019
e3d819e
comments
glozow Jul 31, 2019
4f040c4
revisions
glozow Aug 2, 2019
0be9410
cli.md comments
glozow Aug 12, 2019
62e1da2
comments
glozow Aug 14, 2019
8faeacb
minor edits
glozow Aug 14, 2019
936afcc
better flow for query lifecycle
glozow Aug 20, 2019
93a9fab
add transactions into core
glozow Jul 18, 2019
54ee067
hans comments
glozow Jul 25, 2019
de0aebf
add transactions into core
glozow Jul 18, 2019
e6123bd
merge
glozow Aug 20, 2019
207132c
checkout master-docs files
glozow Aug 21, 2019
cf60c92
deleted some
glozow Aug 21, 2019
8f9c36c
remove modules readme
glozow Aug 21, 2019
38c9ab9
cli.md comments
glozow Aug 28, 2019
19fee81
comments
glozow Aug 28, 2019
c685c34
module-interfaces comments
glozow Aug 28, 2019
cef7b4c
Merge PR #4857: Add Context concept doc
glozow Aug 28, 2019
d96abfd
working
gamarin2 Sep 9, 2019
f38fd48
working
gamarin2 Sep 9, 2019
c7ddc70
finish messages and queries
gamarin2 Sep 10, 2019
f7b6fc3
handler
gamarin2 Sep 10, 2019
8b1ac72
querier
gamarin2 Sep 10, 2019
6f39d98
last comments!
glozow Sep 10, 2019
02bfe22
punctuation
glozow Sep 10, 2019
5162d2e
querier2
gamarin2 Sep 10, 2019
a33f0db
Merge pull request #4704 from cosmos/gloria/transactions-doc
gamarin2 Sep 10, 2019
25fdbf2
consolidate intro
gamarin2 May 20, 2019
a6bd71e
querier
gamarin2 May 28, 2019
2101a75
workiiiing
gamarin2 Jun 5, 2019
8ee9c4a
refactor for new module interface
gamarin2 Jun 10, 2019
cefe24d
karoly review
gamarin2 Jun 11, 2019
c3bdae6
working on baseapp doc
gamarin2 Jun 17, 2019
919ced4
baseapp work
gamarin2 Jun 27, 2019
a8a06b1
reorg
gamarin2 Jun 27, 2019
6bfd175
almost there
gamarin2 Jul 5, 2019
8c6c26b
finish first draft
gamarin2 Jul 5, 2019
96d0441
remove old files
gamarin2 Jul 5, 2019
082ef4c
finish intro
gamarin2 Jul 11, 2019
00e88d8
workinnn
gamarin2 Jul 18, 2019
996e47d
initial commit after rebase
glozow Jul 20, 2019
5b10675
query-lifecycle and started modules-interfaces
glozow Jul 20, 2019
b6e4e17
query-lifecycle first draft done
glozow Jul 21, 2019
a708cc2
module interfaces first draft
glozow Jul 23, 2019
9affd0f
rest and intro skeletons
glozow Jul 26, 2019
cf13f00
rest and intro done
glozow Jul 26, 2019
d64ce4c
small edits and links
glozow Jul 26, 2019
cab3c2e
comments
glozow Jul 31, 2019
2ec8d94
revisions
glozow Aug 2, 2019
f53347f
cli.md comments
glozow Aug 12, 2019
d861ad7
comments
glozow Aug 14, 2019
a154691
minor edits
glozow Aug 14, 2019
3c7d671
better flow for query lifecycle
glozow Aug 20, 2019
463bffa
checkout master-docs files
glozow Aug 21, 2019
5b24d33
deleted some
glozow Aug 21, 2019
e96b166
remove modules readme
glozow Aug 21, 2019
0444f02
cli.md comments
glozow Aug 28, 2019
70fd35c
comments
glozow Aug 28, 2019
ee08a01
module-interfaces comments
glozow Aug 28, 2019
6343e60
Merge branch 'gloria/interfaces-docs' of github.com:cosmos/cosmos-sdk…
jackzampolin Sep 11, 2019
b4d1657
keeper
gamarin2 Sep 12, 2019
190c5d3
genesis
gamarin2 Sep 12, 2019
d2a2d91
finish
gamarin2 Sep 13, 2019
f3d307a
Merge branch 'master-docs' into gamarin/building-modules
gamarin2 Sep 13, 2019
c09597f
Apply suggestions from code review
gamarin2 Sep 16, 2019
e20c6d3
hans review
gamarin2 Sep 16, 2019
628ad72
Update docs/core/baseapp.md
gamarin2 Sep 16, 2019
9fa66e4
working
gamarin2 Sep 17, 2019
6914e0d
last comment
glozow Sep 17, 2019
47c9a28
Merge pull request #4755 from cosmos/gloria/interfaces-docs
gamarin2 Sep 17, 2019
036f418
workin
gamarin2 Sep 17, 2019
7392275
Merge branch 'master-docs' into gamarin/finish-docs
gamarin2 Sep 17, 2019
01e79c8
Apply suggestions from code review
fedekunze Oct 1, 2019
c151b31
encoding and node
gamarin2 Oct 4, 2019
5ef23b0
almost finish store
gamarin2 Oct 11, 2019
a8c51b7
merge
gamarin2 Oct 11, 2019
bc6afa6
merge
gamarin2 Oct 11, 2019
c44e476
Merge branch 'gamarin/building-modules' of https://github.com/cosmos/…
gamarin2 Oct 11, 2019
1d5d907
merge
gamarin2 Oct 11, 2019
7af02f8
finish docs
gamarin2 Oct 11, 2019
2b419e9
fixes
gamarin2 Oct 11, 2019
d3a168a
Merge pull request #5037 from cosmos/gamarin/building-modules
gamarin2 Oct 11, 2019
6ee28c4
fede comments + permalinks
gamarin2 Oct 18, 2019
e13a4bc
hans review
gamarin2 Oct 21, 2019
1cc5c19
add more permalinks
gamarin2 Oct 23, 2019
6d67876
Merge pull request #5186 from cosmos/gamarin/finish-docs
gamarin2 Oct 23, 2019
0d4e30c
update docs theme version (#5239)
fadeev Oct 24, 2019
6291948
merge master
gamarin2 Oct 27, 2019
fb63c07
R4R: Docs Cleanup (#5246)
gamarin2 Oct 28, 2019
834e14b
fix links
gamarin2 Nov 2, 2019
2b418b5
remove dup
gamarin2 Nov 2, 2019
4521f3c
remove dup
gamarin2 Nov 2, 2019
b97e615
remove dup
gamarin2 Nov 2, 2019
f1cc432
remove dup
gamarin2 Nov 2, 2019
f1ea40c
remove dup
gamarin2 Nov 2, 2019
5e4d9e9
fix links
gamarin2 Nov 2, 2019
0103f64
add subscribe events
gamarin2 Nov 5, 2019
72b821a
refine rest
gamarin2 Nov 5, 2019
3e55e78
index page
fadeev Nov 7, 2019
1b4ce52
sidebar
fadeev Nov 7, 2019
f0286af
theme version
fadeev Nov 7, 2019
1216369
theme version
fadeev Nov 7, 2019
1427288
testing netlify
fadeev Nov 7, 2019
fa048b8
theme version
fadeev Nov 7, 2019
9b32df7
tooltip example
fadeev Nov 8, 2019
f958a9b
version
fadeev Nov 9, 2019
eef7f62
testing code embedding
fadeev Nov 10, 2019
699d1f1
reverting back
fadeev Nov 10, 2019
885b2f8
theme version
fadeev Nov 10, 2019
dcdb101
version
fadeev Nov 10, 2019
e0b216f
version
fadeev Nov 10, 2019
3716b05
version
fadeev Nov 11, 2019
30dae64
readme and version
fadeev Nov 12, 2019
483d597
cleanup
gamarin2 Nov 13, 2019
77fc987
Merge branch 'master-docs' into docs-theme-latest
gamarin2 Nov 13, 2019
deffa90
redo app anatomy
gamarin2 Nov 13, 2019
e71cc65
Merge branch 'master-docs' into docs-theme-latest
gamarin2 Nov 13, 2019
aae2d9f
modules readme, theme version
fadeev Nov 13, 2019
14623ca
theme version
fadeev Nov 13, 2019
604e414
fix modules list
fadeev Nov 13, 2019
9505e33
theme version
fadeev Nov 14, 2019
50d8538
new snippets
gamarin2 Nov 15, 2019
dd2fc20
Merge branch 'master-docs' into docs-theme-latest
gamarin2 Nov 15, 2019
47d3115
modules readme
fadeev Nov 16, 2019
2d3d229
Merge branch 'docs-theme-latest' of https://github.com/cosmos/cosmos-…
fadeev Nov 16, 2019
d088829
update docs readme
gamarin2 Nov 18, 2019
6de6087
modify synopsis
gamarin2 Nov 18, 2019
7d62116
version
fadeev Nov 19, 2019
376c8dd
Merge branch 'master-docs' into docs-theme-latest
fadeev Nov 19, 2019
67bcf80
fix yaml
fadeev Nov 19, 2019
990a4d4
version
fadeev Nov 19, 2019
dbedb92
version
fadeev Nov 19, 2019
150566f
version
fadeev Nov 19, 2019
1a8278f
version
fadeev Nov 19, 2019
29956aa
version
fadeev Nov 20, 2019
5a4d439
version
fadeev Nov 21, 2019
cc57ed4
version
fadeev Nov 21, 2019
132aa27
version
fadeev Nov 21, 2019
d152ffe
version
fadeev Nov 22, 2019
90b184c
version
fadeev Nov 23, 2019
6aabc5a
add hide banner
gamarin2 Nov 25, 2019
01cd19b
version
fadeev Nov 25, 2019
2fa42e1
version
fadeev Nov 28, 2019
2a6cd2b
Merge branch 'master-docs' into docs-theme-latest
fadeev Dec 2, 2019
0ada884
version
fadeev Dec 2, 2019
d63bf84
small fixes
gamarin2 Dec 2, 2019
9dd99f1
modules readme, version
fadeev Dec 6, 2019
f388057
remove hotkeys dep, version
fadeev Dec 6, 2019
097d05e
version
fadeev Dec 6, 2019
a7d5523
version
fadeev Dec 6, 2019
f4e319d
version
fadeev Dec 6, 2019
a664b8d
version
fadeev Dec 8, 2019
786e719
version
fadeev Dec 9, 2019
c1c13a3
version
fadeev Dec 9, 2019
efe58c9
version
fadeev Dec 9, 2019
e3d62d8
slight notice
gamarin2 Dec 9, 2019
55dcc49
fix links and hide
gamarin2 Dec 9, 2019
565101d
permalinks
gamarin2 Dec 9, 2019
f7a7f26
small clean
gamarin2 Dec 9, 2019
ebf8fbf
Merge branch 'master-docs' into docs-theme-latest
gamarin2 Dec 9, 2019
40a56dd
merge
gamarin2 Dec 9, 2019
c03aaee
version
fadeev Dec 9, 2019
1fc0701
Merge branch 'docs-theme-latest' of https://github.com/cosmos/cosmos-…
fadeev Dec 9, 2019
d70bfa5
resolve conflicts, add google analytics
fadeev Dec 9, 2019
c705394
fix merge remants
gamarin2 Dec 9, 2019
2004b3f
version
fadeev Dec 10, 2019
cfba835
changelog 1/2
gamarin2 Dec 10, 2019
d34481b
Changelog: docs UI
fadeev Dec 10, 2019
2a52470
version
fadeev Dec 10, 2019
0ca6a8b
remove merge conflicts
fadeev Dec 10, 2019
1031cc4
remove merge conflicts
fadeev Dec 10, 2019
d6027cf
Code: Update link for Contributing to the docs to docs_readme
fadeev Dec 11, 2019
7f73d49
HTML/CSS: Update layout of homepage footer to match new layout in Figma
fadeev Dec 11, 2019
a0a89a6
version
fadeev Dec 11, 2019
10b625b
Merge branch 'master' into master-docs
gamarin2 Dec 11, 2019
69af384
final modifs
gamarin2 Dec 11, 2019
4d9fff0
merge
gamarin2 Dec 11, 2019
93252f2
modules, version
fadeev Dec 11, 2019
d7d0198
Merge branch 'docs-theme-latest' of https://github.com/cosmos/cosmos-…
fadeev Dec 11, 2019
53f2cff
modules readme
fadeev Dec 11, 2019
81ee608
link to module list from homepage
fadeev Dec 11, 2019
4f9bd1c
version
fadeev Dec 11, 2019
e11a866
building modules link
fadeev Dec 11, 2019
7a7cb12
version
fadeev Dec 11, 2019
211040f
version
fadeev Dec 11, 2019
c4898f5
fonts
fadeev Dec 11, 2019
68f6c4f
version
fadeev Dec 11, 2019
f775771
version
fadeev Dec 11, 2019
9897728
fix link
gamarin2 Dec 11, 2019
287307a
merge conflicts
fadeev Dec 11, 2019
05d8b28
fix package.json
fadeev Dec 11, 2019
e5cc921
Merge branch 'master' into docs-theme-latest
alexanderbez Dec 11, 2019
8b57449
links in explore sdk section
fadeev Dec 11, 2019
05b0d86
Merge branch 'docs-theme-latest' of https://github.com/cosmos/cosmos-…
fadeev Dec 11, 2019
19e85ed
core concepts
fadeev Dec 11, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
finish intro
  • Loading branch information
gamarin2 committed Jul 11, 2019
commit 1239fcbed5959eea314315251b575e481f3d4b72
5 changes: 0 additions & 5 deletions docs/building-modules.md/module-interfaces.md

This file was deleted.

31 changes: 0 additions & 31 deletions docs/building-modules.md/modules.md

This file was deleted.

File renamed without changes.
File renamed without changes.
95 changes: 95 additions & 0 deletions docs/building-modules/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# Introduction to SDK Modules

## Pre-requisite Reading

- [Anatomy of an SDK application](../basics/app-anatomy.md)
- [Lifecycle of an SDK transaction](../basics/tx-lifecycle.md)

## Synopsis

Modules define most of the logic of any SDK application. Developers compose module together to build their custom application-specific blockchains. This document outlines the basic concepts behind SDK modules and how to approach module management.

- [Role of Modules in an SDK application](#role-of-modules-in-an-sdk-application)
- [How to Approach Building Modules as a Developer](#how-to-approach-building-modules-as-a-developer)
- [Application Module Interface](#application-module-interface)
- [Module Manager](#module-manager)

## Role of Modules in an SDK Application

The Cosmos SDK can be thought as the Ruby-on-Rails of blockchain development. It comes with a core that provides the basic functionalities every blockchain application need, like a boilerplate implementation of the ABCI to communicate with the underlying consensus engine, a multistore to persist state, a server to form a full-node and interfaces to handle queries.

On top of this core, the 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 SDK modules, making it increasingly easier to build complex blockchain applications.

SDK Modules can be seen as little state-machines within the state-machine. They generally define a subset of the state using one ore multiple `KVStore` in the [main multistore](../core/store.md), as well as a subset of [`message` types](./message.md). These `message`s are routed by one of the main component of SDK core, [`baseapp`](../core/baseapp.md), to the [`handler`](./handler.md) of the module that define them.

```
+
|
| Transaction relayed from the full-node's consensus engine
| to the node's application via DeliverTx
|
|
|
+---------------------v--------------------------+
| APPLICATION |
| |
| Using baseapp's methods: Decode the Tx, |
| extract and route the message(s) |
| |
+---------------------+--------------------------+
|
|
|
+---------------------------+
|
|
|
| Message routed to the correct
| module to be processed
|
|
+----------------+ +---------------+ +----------------+ +------v----------+
| | | | | | | |
| AUTH MODULE | | BANK MODULE | | STAKING MODULE | | GOV MODULE |
| | | | | | | |
| | | | | | | Handles message,|
| | | | | | | Updates state |
| | | | | | | |
+----------------+ +---------------+ +----------------+ +------+----------+
|
|
|
|
+--------------------------+
|
| Return result to the underlying consensus engine (e.g. Tendermint)
| (0=Ok, 1=Err)
v
```

As a result of this architecture, building an SDK application usually revolves around writing modules to implement the specialized logic of the application, and composing them with existing modules to complete the application. Developers will generally work on modules that implement logic needed for their specific use case that do not exist yet, and will use existing modules for more generic functionalities like staking, accounts or token management.

## How to Approach Building Modules as a Developer

While there is no definitive guidelines for writing modules, here are some important design principles developers should keep in mind when building them:

- **Composability**: 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`](./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 concern 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](../core/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 module to be malicious. That is why module developers need to carefully think not only about how their module interracts with other modules, and 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`](./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 SDK Module

Modules generally share the same core components:

- Custom [`message` types](./message.md) to trigger state-transitions.
- A [`handler`](./handler.md) used to process messages when they are routed to the module by [`baseapp`](../core/baseapp.md#message-routing).
- A [`keeper`](./keeper.md), used to access the module's store(s) and update the state.
- A [`querier`](./querier.md), used to process user queries when they are routed to the module by [`baseapp`](../core/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 `module` interface in order to be managed by the [`module manager`](./module-manager.md).

## Next

Read more on the [`module interface` and the `module manager`](./module-manager.md)

File renamed without changes.
5 changes: 5 additions & 0 deletions docs/building-modules/module-interfaces.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Module Manager

## Application Module Interface

## Module Manager
6 changes: 6 additions & 0 deletions docs/building-modules/modules-manager.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Module Manager

## Application Module Interface

## Module Manager

File renamed without changes.
8 changes: 4 additions & 4 deletions docs/core/baseapp.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ This document describes `baseapp`, the abstraction that implements most of the c
`baseapp` is an abstraction that implements the core of an SDK application, namely:

- The [Application-Blockchain Interface](#abci), for the state-machine to communicate with the underlying consensus engine (e.g. Tendermint).
- A [Router](#routing), to route [messages](./tx-msgs.md) and [queries](./querier.md) to the appropriate [module](../building-modules/modules.md).
- A [Router](#routing), to route [messages](./tx-msgs.md) and [queries](./querier.md) to the appropriate [module](../building-modules/intro.md).
- Different [states](#states), as the state-machine can have different parallel states updated based on the ABCI message received.

The goal of `baseapp` is to provide a boilerplate SDK application that developers can easily extend to build their own custom application. Usually, developers will create a custom type for their application, like so:
Expand Down Expand Up @@ -175,13 +175,13 @@ When messages and queries are received by the application, they must be routed t

Messages need to be routed after they are extracted from transactions, which are sent from the underlying Tendermint engine via the [`CheckTx`](#checktx) and [`DeliverTx`](#delivertx) ABCI messages. To do so, `baseapp` holds a [`router`](https://github.com/cosmos/cosmos-sdk/blob/master/baseapp/router.go) which maps `paths` (`string`) to the appropriate module [`handler`](./handler.md). Usually, the `path` is the name of the module.

The application's `router` is initilalized with all the routes using the application's [module manager](./modules.md#module-manager), which itself is initialized with all the application's modules in the application's [constructor](../basics/app-anatomy.md#app-constructor).
The application's `router` is initilalized with all the routes using the application's [module manager](../building-modules/module-manager.md), which itself is initialized with all the application's modules in the application's [constructor](../basics/app-anatomy.md#app-constructor).

### Query Routing

Similar to messages, queries need to be routed to the appropriate module's [querier](./querier.md). To do so, `baseapp` holds a [`query router`](https://github.com/cosmos/cosmos-sdk/blob/master/baseapp/queryrouter.go), which maps `paths` (`string`) to the appropriate module [`querier`](./querier.md). Usually, the `path` is the name of the module.

Just like the `router`, the `query router` is initilalized with all the query routes using the application's [module manager](./modules.md#module-manager), which itself is initialized with all the application's modules in the application's [constructor](../basics/app-anatomy.md#app-constructor).
Just like the `router`, the `query router` is initilalized with all the query routes using the application's [module manager](../building-modules/module-manager.md), which itself is initialized with all the application's modules in the application's [constructor](../basics/app-anatomy.md#app-constructor).

## Main ABCI Messages

Expand Down Expand Up @@ -274,7 +274,7 @@ The `AnteHandler` is theoretically optional, but still a very important componen

`RunMsgs` is called from `RunTx` with `runTxModeCheck` as parameter to check the existence of a route for each message the transaction, and with `runTxModeDeliver` to actually process the `message`s.

First, it retreives the `message`'s `route` using the `Msg.Route()` method. Then, using the application's [`router`](#routing) and the `route`, it checks for the existence of a `handler`. At this point, if `mode == runTxModeCheck`, `RunMsgs` returns. If instead `mode == runTxModeDeliver`, the [`handler`](../building-modules.md#handler) function for the message is executed, before `RunMsgs` returns.
First, it retreives the `message`'s `route` using the `Msg.Route()` method. Then, using the application's [`router`](#routing) and the `route`, it checks for the existence of a `handler`. At this point, if `mode == runTxModeCheck`, `RunMsgs` returns. If instead `mode == runTxModeDeliver`, the [`handler`](../building-modules/handler.md) function for the message is executed, before `RunMsgs` returns.

## Other ABCI Messages

Expand Down