diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 4502495d68f3..5a3d148ec652 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -6,18 +6,31 @@ module.exports = { permalinkSymbol: "" } }, + head: [ + [ + "link", + { + rel: "stylesheet", + type: "text/css", + href: "https://cloud.typography.com/6138116/7255612/css/fonts.css" + } + ], + ], locales: { - '/': { - lang: 'en-US' + "/": { + lang: "en-US" + }, + kr: { + lang: "kr" }, - 'kr': { + kr: { lang: "kr" }, - 'cn': { - lang: 'cn' + cn: { + lang: "cn" }, - 'ru': { - lang: 'ru' + ru: { + lang: "ru" } }, base: process.env.VUEPRESS_BASE || "/", @@ -35,7 +48,7 @@ module.exports = { title: "Modules", directory: true, path: "/modules" - }, + } ] }, { @@ -81,7 +94,7 @@ module.exports = { logo: "/logo-bw.svg", textLink: { text: "cosmos.network", - url: "https://cosmos.network" + url: "/" }, services: [ { @@ -147,7 +160,8 @@ module.exports = { children: [ { title: "Contributing to the docs", - url: "https://github.com/cosmos/cosmos-sdk/tree/master/docs" + url: + "https://github.com/cosmos/cosmos-sdk/blob/master/docs/DOCS_README.md" }, { title: "Source code on GitHub", @@ -164,6 +178,12 @@ module.exports = { { ga: "UA-51029217-12" } + ], + [ + "sitemap", + { + hostname: "https://docs.cosmos.network" + } ] - ], + ] }; diff --git a/docs/README.md b/docs/README.md index 56df7df3c43b..e3346e2013e9 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,7 +1,7 @@ --- layout: index -title: Documentation -description: The Cosmos-SDK is a framework for building blockchain applications in Golang. It is being used to build Gaia, the first implementation of the Cosmos Hub. +title: Cosmos SDK Documentation +description: Cosmos SDK is the world’s most popular framework for building application-specific blockchains. features: - cta: Read title: Introduction to Cosmos SDK @@ -27,7 +27,7 @@ sections: icon: basics url: /basics - title: SDK Core - desc: Read about the core concepts like `baseapp`, the store, or the server. + desc: Read about the core concepts like `baseapp`, the store, or the server. icon: core url: /core - title: Building Modules @@ -41,15 +41,15 @@ sections: - title: Modules desc: Explore existing modules to build your application with. icon: specifications - url: /modules + url: /modules/ stack: - title: Cosmos Hub - desc: Short description about Cosmos Hub, no longer than a few of lines. + desc: The first of thousands of interconnected blockchains on the Cosmos Network. color: "#BA3FD9" label: hub url: http://hub.cosmos.network - title: Tendermint - desc: Short description about Tendermint, no longer than a few of lines. + desc: The leading BFT engine for building blockchains, powering Cosmos SDK. color: "#00BB00" label: core url: http://docs.tendermint.com @@ -66,14 +66,14 @@ footer: ## Reference -- **[Basics](./basics/)**: Documentation on the basic concepts of the Cosmos SDK, like the standard anatomy of an application, the transaction lifecycle and accounts management. -- **[Core](./core/)**: Documentation on the core concepts of the Cosmos SDK, like `baseapp`, the `store` or the `server`. -- **[Building Modules](./building-modules/)**: Important concepts for module developers like `message`s, `keeper`s, `handler`s and `querier`s. -- **[Interfaces](./interfaces/)**: Documentation on building interfaces for Cosmos SDK applications. +- **[Basics](./basics/)**: Documentation on the basic concepts of the Cosmos SDK, like the standard anatomy of an application, the transaction lifecycle and accounts management. +- **[Core](./core/)**: Documentation on the core concepts of the Cosmos SDK, like `baseapp`, the `store` or the `server`. +- **[Building Modules](./building-modules/)**: Important concepts for module developers like `message`s, `keeper`s, `handler`s and `querier`s. +- **[Interfaces](./interfaces/)**: Documentation on building interfaces for Cosmos SDK applications. ## Other Resources -- **[Module Directory](../x/)**: Module implementations and their respective documentation. +- **[Module Directory](../x/)**: Module implementations and their respective documentation. - **[Specifications](./spec/)**: Specifications of modules and other parts of the Cosmos SDK. - **[SDK API Reference](https://godoc.org/github.com/cosmos/cosmos-sdk)**: Godocs of the Cosmos SDK. - **[REST API spec](https://cosmos.network/rpc/)**: List of endpoints to interact with a `gaia` full-node through REST. @@ -92,5 +92,3 @@ Contact us for information about funding an implementation in another language. See [this file](https://github.com/cosmos/cosmos-sdk/blob/master/docs/DOCS_README.md) for details of the build process and considerations when making changes. - - diff --git a/docs/building-modules/README.md b/docs/building-modules/README.md index 732485c74477..5257e5aa2080 100644 --- a/docs/building-modules/README.md +++ b/docs/building-modules/README.md @@ -6,7 +6,7 @@ parent: # Building Modules -This repository contains documentation on concepts developers need to know in order to build modules for Cosmos SDK applications. +This repository contains documentation on concepts developers need to know in order to build modules for Cosmos SDK applications. 1. [Introduction to Cosmos SDK Modules](./intro.md) 2. [`AppModule` Interface and Module Manager](./module-manager.md) @@ -19,4 +19,3 @@ This repository contains documentation on concepts developers need to know in or 9. [Genesis](./genesis.md) 10. [Module Interfaces](./module-interfaces.md) 11. [Standard Module Structure](./structure.md) - diff --git a/docs/intro/sdk-design.md b/docs/intro/sdk-design.md index 0b4f9689f6ed..51cab8c1b336 100644 --- a/docs/intro/sdk-design.md +++ b/docs/intro/sdk-design.md @@ -4,13 +4,13 @@ order: 4 # Main Components of the Cosmos SDK -The Cosmos SDK is a framework that facilitates the development of secure state-machines on top of Tendermint. At its core, the SDK is a boilerplate implementation of the [ABCI](./sdk-app-architecture.md#abci) in Golang. It comes with a [`multistore`](../core/store.md#multistore) to persist data and a [`router`](../core/baseapp.md#routing) to handle transactions. +The Cosmos SDK is a framework that facilitates the development of secure state-machines on top of Tendermint. At its core, the SDK is a boilerplate implementation of the [ABCI](./sdk-app-architecture.md#abci) in Golang. It comes with a [`multistore`](../core/store.md#multistore) to persist data and a [`router`](../core/baseapp.md#routing) to handle transactions. Here is a simplified view of how transactions are handled by an application built on top of the Cosmos SDK when transferred from Tendermint via `DeliverTx`: -1. Decode `transactions` received from the Tendermint consensus engine (remember that Tendermint only deals with `[]bytes`). +1. Decode `transactions` received from the Tendermint consensus engine (remember that Tendermint only deals with `[]bytes`). 2. Extract `messages` from `transactions` and do basic sanity checks. -3. Route each message to the appropriate module so that it can be processed. +3. Route each message to the appropriate module so that it can be processed. 4. Commit state changes. ## `baseapp` @@ -25,7 +25,7 @@ For more on `baseapp`, please click [here](../core/baseapp.md). ## Multistore - The Cosmos SDK provides a [`multistore`](../core/store.md#multisotre) for persisting state. The multistore allows developers to declare any number of [`KVStores`](../core/store.md#base-layer-kvstores). These `KVStores` only accept the `[]byte` type as value and therefore any custom structure needs to be marshalled using [a codec](../core/encoding.md) before being stored. +The Cosmos SDK provides a [`multistore`](../core/store.md#multisotre) for persisting state. The multistore allows developers to declare any number of [`KVStores`](../core/store.md#base-layer-kvstores). These `KVStores` only accept the `[]byte` type as value and therefore any custom structure needs to be marshalled using [a codec](../core/encoding.md) before being stored. The multistore abstraction is used to divide the state in distinct compartments, each managed by its own module. For more on the multistore, click [here](../core/store.md#multistore) @@ -38,9 +38,9 @@ Here is a simplified view of how a transaction is processed by the application o ``` + | - | Transaction relayed from the full-node's Tendermint engine + | Transaction relayed from the full-node's Tendermint engine | to the node's application via DeliverTx - | + | | | +---------------------v--------------------------+ @@ -88,9 +88,8 @@ SDK modules are defined in the `x/` folder of the SDK. Some core modules include - `x/bank`: Used to enable tokens and token transfers. - `x/staking` + `x/slashing`: Used to build Proof-Of-Stake blockchains. -In addition to the already existing modules in `x/`, that anyone can use in their app, the SDK lets you build your own custom modules. You can check an [example of that in the tutorial](https://cosmos.network/docs/tutorial/keeper.html). +In addition to the already existing modules in `x/`, that anyone can use in their app, the SDK lets you build your own custom modules. You can check an [example of that in the tutorial](https://cosmos.network/docs/tutorial/keeper.html). ## Next {hide} Learn more about the [anatomy of an SDK application](../basics/app-anatomy.md) {hide} - diff --git a/docs/intro/why-app-specific.md b/docs/intro/why-app-specific.md index cd37b562126c..b6d88f1176a2 100644 --- a/docs/intro/why-app-specific.md +++ b/docs/intro/why-app-specific.md @@ -1,11 +1,10 @@ --- order: 2 +synopsis: This document explains what application-specific blockchains are, and why developers would want to build one as opposed to writing Smart Contracts. --- # Application-Specific Blockchains -This document explains what application-specific blockchains are, and why developers would want to build one as opposed to writing Smart Contracts. - ## What are application-specific blockchains? Application-specific blockchains are blockchains customized to operate a single application. Instead of building a decentralised application on top of an underlying blockchain like Ethereum, developers build their own blockchain from the ground up. This means building a full-node client, a light-client, and all the necessary interfaces (CLI, REST, ...) to interract with the nodes. diff --git a/docs/package-lock.json b/docs/package-lock.json index 1100a982c2a5..f6c622dc2111 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -877,9 +877,9 @@ "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==" }, "@types/node": { - "version": "12.12.15", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.15.tgz", - "integrity": "sha512-Pv+vWicyFd07Hw/SmNnTUguqrHgDfMtjabvD9sQyxeqbpCEg8CmViLBaVPHtNsoBgZECrRf5/pgV6FJIBrGSjw==" + "version": "12.12.17", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.17.tgz", + "integrity": "sha512-Is+l3mcHvs47sKy+afn2O1rV4ldZFU7W8101cNlOd+MRbjM4Onida8jSZnJdTe/0Pcf25g9BNIUsuugmE6puHA==" }, "@types/q": { "version": "1.5.2", @@ -1135,8 +1135,7 @@ "@vuepress/plugin-google-analytics": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@vuepress/plugin-google-analytics/-/plugin-google-analytics-1.2.0.tgz", - "integrity": "sha512-0zol5D4Efb5GKel7ADO/s65MLtKSLnOEGkeWzuipkWomSQPzP7TJ3+/RcYBnGdyBFHd1BSpTUHGK0b/IGwM3UA==", - "dev": true + "integrity": "sha512-0zol5D4Efb5GKel7ADO/s65MLtKSLnOEGkeWzuipkWomSQPzP7TJ3+/RcYBnGdyBFHd1BSpTUHGK0b/IGwM3UA==" }, "@vuepress/plugin-last-updated": { "version": "1.2.0", @@ -2593,9 +2592,9 @@ "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" }, "copy-webpack-plugin": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-5.0.5.tgz", - "integrity": "sha512-7N68eIoQTyudAuxkfPT7HzGoQ+TsmArN/I3HFwG+lVE3FNzqvZKIiaxtYh4o3BIznioxUvx9j26+Rtsc9htQUQ==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-5.1.0.tgz", + "integrity": "sha512-0sNrj/Sx7/cWA0k7CVQa0sdA/dzCybqSb0+GbhKuQdOlAvnAwgC2osmbAFOAfha7ZXnreoQmCq5oDjG3gP4VHw==", "requires": { "cacache": "^12.0.3", "find-cache-dir": "^2.1.0", @@ -2607,7 +2606,7 @@ "normalize-path": "^3.0.0", "p-limit": "^2.2.1", "schema-utils": "^1.0.0", - "serialize-javascript": "^2.1.0", + "serialize-javascript": "^2.1.2", "webpack-log": "^2.0.0" }, "dependencies": { @@ -8490,15 +8489,15 @@ } }, "terser-webpack-plugin": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.2.tgz", - "integrity": "sha512-fdEb91kR2l+BVgES77N/NTXWZlpX6vX+pYPjnX5grcDYBF2CMnzJiXX4NNlna4l04lvCW39lZ+O/jSvUhHH/ew==", + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.3.tgz", + "integrity": "sha512-QMxecFz/gHQwteWwSo5nTc6UaICqN1bMedC5sMtUc7y3Ha3Q8y6ZO0iCR8pq4RJC8Hjf0FEPEHZqcMB/+DFCrA==", "requires": { "cacache": "^12.0.2", "find-cache-dir": "^2.1.0", "is-wsl": "^1.1.0", "schema-utils": "^1.0.0", - "serialize-javascript": "^2.1.1", + "serialize-javascript": "^2.1.2", "source-map": "^0.6.1", "terser": "^4.1.2", "webpack-sources": "^1.4.0", @@ -9164,9 +9163,9 @@ } }, "vuepress-theme-cosmos": { - "version": "1.0.93", - "resolved": "https://registry.npmjs.org/vuepress-theme-cosmos/-/vuepress-theme-cosmos-1.0.93.tgz", - "integrity": "sha512-P8I8RSydfW/cetx0ruYegeDPuX3PkD/M9I8F7LX54rnA9wPrTM4fLo3fl2MYJmY9jh9uStVLGx95IlHqxtwsOA==", + "version": "1.0.103", + "resolved": "https://registry.npmjs.org/vuepress-theme-cosmos/-/vuepress-theme-cosmos-1.0.103.tgz", + "integrity": "sha512-vp/5gTySDgjIaO9xLFeTrj241slW1aNG8GhUHtWPOir07SYQ6iOVSncMvHgUlNs4uSha+/EMIpn8Pg4FF8VSLQ==", "requires": { "@cosmos-ui/vue": "^0.5.16", "@vuepress/plugin-last-updated": "^1.2.0", diff --git a/docs/package.json b/docs/package.json index a8d32367076f..d9ea55727e9d 100644 --- a/docs/package.json +++ b/docs/package.json @@ -14,6 +14,7 @@ "author": "", "license": "ISC", "dependencies": { - "vuepress-theme-cosmos": "^1.0.93" + "@vuepress/plugin-google-analytics": "^1.2.0", + "vuepress-theme-cosmos": "^1.0.103" } } diff --git a/docs/post.sh b/docs/post.sh index 5d8c7ed48737..2662dd1a31f1 100755 --- a/docs/post.sh +++ b/docs/post.sh @@ -1,3 +1,3 @@ #!/usr/bin/env bash -rm -rf modules \ No newline at end of file +rm -rf modules diff --git a/docs/pre.sh b/docs/pre.sh index a71ac0b65d5e..47e4329fbf5c 100755 --- a/docs/pre.sh +++ b/docs/pre.sh @@ -9,4 +9,4 @@ for D in ../x/*; do fi done -cp ../x/README.md modules/ \ No newline at end of file +cat ../x/README.md | sed 's/\.\/x/\/modules/g' | sed 's/spec\/README.md//g' | sed 's/\.\.\/docs\/building-modules\/README\.md/\/building-modules\/intro\.html/g' > ./modules/README.md \ No newline at end of file diff --git a/x/README.md b/x/README.md index a38c7ab3dd31..117075d62a54 100644 --- a/x/README.md +++ b/x/README.md @@ -11,12 +11,11 @@ Here are some production-grade modules that can be used in Cosmos SDK applicatio - [Bank](./x/bank/spec/README.md) - Token transfer functionalities. - [Governance](./x/gov/spec/README.md) - On-chain proposals and voting. - [Staking](./x/staking/spec/README.md) - Proof-of-stake layer for public blockchains. -- [Slashing](.x/slashing/spec/README.md) - Validator punishment mechanisms. -- [Distribution](.x/distribution/spec/README.md) - Fee distribution, and staking token provision distribution. +- [Slashing](./x/slashing/spec/README.md) - Validator punishment mechanisms. +- [Distribution](./x/distribution/spec/README.md) - Fee distribution, and staking token provision distribution. - [Crisis](./x/crisis/spec/README.md) - Halting the blockchain under certain circumstances (e.g. if an invariant is broken). - [Mint](./x/mint/spec/README.md) - Creation of new units of staking token. - [Params](./x/params/spec/README.md) - Globally available parameter store. - [Supply](./x/supply/spec/README.md) - Total token supply of the chain. To learn more about the process of building modules, visit the [building modules reference documentation](../docs/building-modules/README.md). - diff --git a/x/auth/spec/01_concepts.md b/x/auth/spec/01_concepts.md index 6d428d5b079c..1794b1d4fa6e 100644 --- a/x/auth/spec/01_concepts.md +++ b/x/auth/spec/01_concepts.md @@ -1,3 +1,7 @@ +--- +order: 1 +--- + # Concepts ## Gas & Fees diff --git a/x/auth/spec/02_state.md b/x/auth/spec/02_state.md index 203192ac669c..92c030e3f6d2 100644 --- a/x/auth/spec/02_state.md +++ b/x/auth/spec/02_state.md @@ -1,3 +1,7 @@ +--- +order: 2 +--- + # State ## Accounts diff --git a/x/auth/spec/03_messages.md b/x/auth/spec/03_messages.md index 878f9192d613..b4b64ef07e31 100644 --- a/x/auth/spec/03_messages.md +++ b/x/auth/spec/03_messages.md @@ -1,3 +1,7 @@ +--- +order: 3 +--- + # Messages TODO make this file conform to typical messages spec diff --git a/x/auth/spec/03_types.md b/x/auth/spec/03_types.md index 106e1412c1e7..efd0637dbc6b 100644 --- a/x/auth/spec/03_types.md +++ b/x/auth/spec/03_types.md @@ -1,3 +1,7 @@ +--- +order: 4 +--- + # Types Besides accounts (specified in [State](state.md)), the types exposed by the auth module diff --git a/x/auth/spec/04_keepers.md b/x/auth/spec/04_keepers.md index 3eeb0a2530b9..b56dbe0fd0ed 100644 --- a/x/auth/spec/04_keepers.md +++ b/x/auth/spec/04_keepers.md @@ -1,3 +1,7 @@ +--- +order: 5 +--- + # Keepers The auth module only exposes one keeper, the account keeper, which can be used to read and write accounts. diff --git a/x/auth/spec/05_vesting.md b/x/auth/spec/05_vesting.md index 26974ada5c6e..81de8fff3868 100644 --- a/x/auth/spec/05_vesting.md +++ b/x/auth/spec/05_vesting.md @@ -1,3 +1,7 @@ +--- +order: 6 +--- + # Vesting - [Vesting](#vesting) diff --git a/x/auth/spec/07_params.md b/x/auth/spec/07_params.md index b5d9ad9c20dc..a3983eb657d6 100644 --- a/x/auth/spec/07_params.md +++ b/x/auth/spec/07_params.md @@ -1,3 +1,7 @@ +--- +order: 7 +--- + # Parameters The auth module contains the following parameters: diff --git a/x/auth/spec/README.md b/x/auth/spec/README.md index 8dd0a2dd2209..b6627bfe9561 100644 --- a/x/auth/spec/README.md +++ b/x/auth/spec/README.md @@ -1,3 +1,10 @@ +--- +order: 0 +title: "Auth Overview" +parent: + title: "auth" +--- + # `auth` ## Abstract diff --git a/x/bank/spec/01_state.md b/x/bank/spec/01_state.md index b3421b607b30..67050c46112d 100644 --- a/x/bank/spec/01_state.md +++ b/x/bank/spec/01_state.md @@ -1,3 +1,7 @@ +--- +order: 1 +--- + # State Presently, the bank module has no inherent state — it simply reads and writes accounts using the `AccountKeeper` from the `auth` module. diff --git a/x/bank/spec/02_keepers.md b/x/bank/spec/02_keepers.md index 7624c70a5555..45a42e618eb7 100644 --- a/x/bank/spec/02_keepers.md +++ b/x/bank/spec/02_keepers.md @@ -1,3 +1,7 @@ +--- +order: 2 +--- + # Keepers The bank module provides three different exported keeper interfaces which can be passed to other modules which need to read or update account balances. Modules should use the least-permissive interface which provides the functionality they require. diff --git a/x/bank/spec/03_messages.md b/x/bank/spec/03_messages.md index 30c3db2b6c0b..dbdb8e7df0cd 100644 --- a/x/bank/spec/03_messages.md +++ b/x/bank/spec/03_messages.md @@ -1,3 +1,7 @@ +--- +order: 3 +--- + # Messages ## MsgSend diff --git a/x/bank/spec/04_events.md b/x/bank/spec/04_events.md index a7fac11947c8..c5794b7daa06 100644 --- a/x/bank/spec/04_events.md +++ b/x/bank/spec/04_events.md @@ -1,3 +1,7 @@ +--- +order: 4 +--- + # Events The bank module emits the following events: diff --git a/x/bank/spec/05_params.md b/x/bank/spec/05_params.md index d68fad95e987..cd99570fe629 100644 --- a/x/bank/spec/05_params.md +++ b/x/bank/spec/05_params.md @@ -1,3 +1,7 @@ +--- +order: 5 +--- + # Parameters The bank module contains the following parameters: diff --git a/x/bank/spec/README.md b/x/bank/spec/README.md index 1f5ad958a915..9ddad6ea6e9c 100644 --- a/x/bank/spec/README.md +++ b/x/bank/spec/README.md @@ -1,3 +1,10 @@ +--- +order: 0 +title: Bank Overview +parent: + title: "bank" +--- + # `bank` ## Abstract diff --git a/x/crisis/spec/01_state.md b/x/crisis/spec/01_state.md index 1b454ff5afde..9163934cad90 100644 --- a/x/crisis/spec/01_state.md +++ b/x/crisis/spec/01_state.md @@ -1,3 +1,7 @@ +--- +order: 1 +--- + # State ## ConstantFee diff --git a/x/crisis/spec/02_messages.md b/x/crisis/spec/02_messages.md index f6169d2b7cc5..916fba3a24ba 100644 --- a/x/crisis/spec/02_messages.md +++ b/x/crisis/spec/02_messages.md @@ -1,3 +1,7 @@ +--- +order: 2 +--- + # Messages In this section we describe the processing of the crisis messages and the diff --git a/x/crisis/spec/03_events.md b/x/crisis/spec/03_events.md index f645e823b715..92f231c83f66 100644 --- a/x/crisis/spec/03_events.md +++ b/x/crisis/spec/03_events.md @@ -1,3 +1,7 @@ +--- +order: 3 +--- + # Events The crisis module emits the following events: diff --git a/x/crisis/spec/04_params.md b/x/crisis/spec/04_params.md index 19ccc364829c..663ba62d0da7 100644 --- a/x/crisis/spec/04_params.md +++ b/x/crisis/spec/04_params.md @@ -1,3 +1,7 @@ +--- +order: 4 +--- + # Parameters The crisis module contains the following parameters: diff --git a/x/crisis/spec/README.md b/x/crisis/spec/README.md index 48847155135a..73bba46b4eb5 100644 --- a/x/crisis/spec/README.md +++ b/x/crisis/spec/README.md @@ -1,3 +1,10 @@ +--- +order: 0 +title: Crisis Overview +parent: + title: "crisis" +--- + # `crisis` ## Overview diff --git a/x/distribution/spec/01_concepts.md b/x/distribution/spec/01_concepts.md index 38485dcdaf72..720821bb1f62 100644 --- a/x/distribution/spec/01_concepts.md +++ b/x/distribution/spec/01_concepts.md @@ -1,3 +1,7 @@ +--- +order: 1 +--- + # Concepts ## Reference Counting in F1 Fee Distribution diff --git a/x/distribution/spec/02_state.md b/x/distribution/spec/02_state.md index 46832a27b579..2f9629c98b2b 100644 --- a/x/distribution/spec/02_state.md +++ b/x/distribution/spec/02_state.md @@ -1,3 +1,7 @@ +--- +order: 2 +--- + # State ## FeePool diff --git a/x/distribution/spec/03_end_block.md b/x/distribution/spec/03_end_block.md index f5e62a5d8bfc..ffc315b000ce 100644 --- a/x/distribution/spec/03_end_block.md +++ b/x/distribution/spec/03_end_block.md @@ -1,3 +1,7 @@ +--- +order: 3 +--- + # End Block At each `EndBlock`, the fees received are transferred to the distribution `ModuleAccount`, as it's the account the one who keeps track of the flow of coins in (as in this case) and out the module. The fees are also allocated to the proposer, community fund and global pool. When the validator is the proposer of the round, that validator (and their delegators) receives between 1% and 5% of fee rewards, the reserve community tax is then charged, then the remainder is distributed proportionally by voting power to all bonded validators independent of whether they voted (social distribution). Note the social distribution is applied to proposer validator in addition to the proposer reward. diff --git a/x/distribution/spec/04_messages.md b/x/distribution/spec/04_messages.md index 54650fffe78c..45b0877f1f8b 100644 --- a/x/distribution/spec/04_messages.md +++ b/x/distribution/spec/04_messages.md @@ -1,3 +1,7 @@ +--- +order: 4 +--- + # Messages ## MsgWithdrawDelegationRewardsAll diff --git a/x/distribution/spec/05_hooks.md b/x/distribution/spec/05_hooks.md index fac39fb89db9..cf066872cd61 100644 --- a/x/distribution/spec/05_hooks.md +++ b/x/distribution/spec/05_hooks.md @@ -1,3 +1,7 @@ +--- +order: 5 +--- + # Hooks ## Create or modify delegation distribution diff --git a/x/distribution/spec/06_events.md b/x/distribution/spec/06_events.md index 08a22b660f56..303283b32ce1 100644 --- a/x/distribution/spec/06_events.md +++ b/x/distribution/spec/06_events.md @@ -1,3 +1,7 @@ +--- +order: 6 +--- + # Events The distribution module emits the following events: diff --git a/x/distribution/spec/07_params.md b/x/distribution/spec/07_params.md index 563c2c4270c0..4daa7e0cacb9 100644 --- a/x/distribution/spec/07_params.md +++ b/x/distribution/spec/07_params.md @@ -1,3 +1,7 @@ +--- +order: 7 +--- + # Parameters The distribution module contains the following parameters: diff --git a/x/distribution/spec/README.md b/x/distribution/spec/README.md index 7540bcd8997f..c710934bb78b 100644 --- a/x/distribution/spec/README.md +++ b/x/distribution/spec/README.md @@ -1,3 +1,10 @@ +--- +order: 0 +title: Distribution Overview +parent: + title: "distribution" +--- + # `distribution` ## Overview diff --git a/x/evidence/spec/01_concepts.md b/x/evidence/spec/01_concepts.md index b71f493f2dde..d1cb158f1e0b 100644 --- a/x/evidence/spec/01_concepts.md +++ b/x/evidence/spec/01_concepts.md @@ -1,3 +1,7 @@ +--- +order: 1 +--- + # Concepts ## Evidence diff --git a/x/evidence/spec/02_state.md b/x/evidence/spec/02_state.md index 163743a7c829..7541d1d21cfa 100644 --- a/x/evidence/spec/02_state.md +++ b/x/evidence/spec/02_state.md @@ -1,3 +1,7 @@ +--- +order: 2 +--- + # State Currently the `x/evidence` module only stores valid submitted `Evidence` in state. diff --git a/x/evidence/spec/03_messages.md b/x/evidence/spec/03_messages.md index 84b8a844e951..9be381e65b87 100644 --- a/x/evidence/spec/03_messages.md +++ b/x/evidence/spec/03_messages.md @@ -1,3 +1,7 @@ +--- +order: 3 +--- + # Messages ## MsgSubmitEvidence diff --git a/x/evidence/spec/04_events.md b/x/evidence/spec/04_events.md index 1994f2398f6a..d1c701b21e32 100644 --- a/x/evidence/spec/04_events.md +++ b/x/evidence/spec/04_events.md @@ -1,3 +1,7 @@ +--- +order: 4 +--- + # Events The `x/evidence` module emits the following events: diff --git a/x/evidence/spec/05_params.md b/x/evidence/spec/05_params.md index ff30153725c1..d33005e5c474 100644 --- a/x/evidence/spec/05_params.md +++ b/x/evidence/spec/05_params.md @@ -1,3 +1,7 @@ +--- +order: 5 +--- + # Parameters The evidence module contains the following parameters: diff --git a/x/evidence/spec/06_begin_block.md b/x/evidence/spec/06_begin_block.md index 312e2b0e6d3d..b9a53d116d8c 100644 --- a/x/evidence/spec/06_begin_block.md +++ b/x/evidence/spec/06_begin_block.md @@ -1,3 +1,7 @@ +--- +order: 6 +--- + # BeginBlock ## Evidence Handling diff --git a/x/evidence/spec/README.md b/x/evidence/spec/README.md index 9313dc7616ad..b04f704caa95 100644 --- a/x/evidence/spec/README.md +++ b/x/evidence/spec/README.md @@ -1,4 +1,11 @@ -# Evidence Module Specification +--- +order: 0 +title: Evidence Overview +parent: + title: "evidence" +--- + +# `evidence` ## Table of Contents diff --git a/x/gov/spec/01_concepts.md b/x/gov/spec/01_concepts.md index 71b0bb87c71e..cb6210e2786e 100644 --- a/x/gov/spec/01_concepts.md +++ b/x/gov/spec/01_concepts.md @@ -1,3 +1,7 @@ +--- +order: 1 +--- + # Concepts *Disclaimer: This is work in progress. Mechanisms are susceptible to change.* diff --git a/x/gov/spec/02_state.md b/x/gov/spec/02_state.md index d9e44dbba3ee..d647929816aa 100644 --- a/x/gov/spec/02_state.md +++ b/x/gov/spec/02_state.md @@ -1,3 +1,7 @@ +--- +order: 2 +--- + # State ## Parameters and base types diff --git a/x/gov/spec/03_messages.md b/x/gov/spec/03_messages.md index cf6c405e3d65..1df329807934 100644 --- a/x/gov/spec/03_messages.md +++ b/x/gov/spec/03_messages.md @@ -1,3 +1,7 @@ +--- +order: 3 +--- + # Messages ## Proposal Submission diff --git a/x/gov/spec/04_events.md b/x/gov/spec/04_events.md index b2dd73490d94..b2f749db1b19 100644 --- a/x/gov/spec/04_events.md +++ b/x/gov/spec/04_events.md @@ -1,3 +1,7 @@ +--- +order: 4 +--- + # Events The governance module emits the following events: diff --git a/x/gov/spec/05_future_improvements.md b/x/gov/spec/05_future_improvements.md index 51ae179254d9..96af61e84168 100644 --- a/x/gov/spec/05_future_improvements.md +++ b/x/gov/spec/05_future_improvements.md @@ -1,3 +1,7 @@ +--- +order: 5 +--- + # Future Improvements The current documentation only describes the minimum viable product for the diff --git a/x/gov/spec/06_params.md b/x/gov/spec/06_params.md index 4d24d03dfadf..db146b9a854a 100644 --- a/x/gov/spec/06_params.md +++ b/x/gov/spec/06_params.md @@ -1,3 +1,7 @@ +--- +order: 6 +--- + # Parameters The governance module contains the following parameters: diff --git a/x/gov/spec/README.md b/x/gov/spec/README.md index 8276fa72ba2a..846158540858 100644 --- a/x/gov/spec/README.md +++ b/x/gov/spec/README.md @@ -1,3 +1,10 @@ +--- +order: 0 +title: Gov Overview +parent: + title: "gov" +--- + # `gov` ## Abstract diff --git a/x/mint/spec/01_concepts.md b/x/mint/spec/01_concepts.md index 14b2c6abd499..6d952b3d183a 100644 --- a/x/mint/spec/01_concepts.md +++ b/x/mint/spec/01_concepts.md @@ -1,3 +1,8 @@ +--- +order: 0 +title: Overview +--- + # Concepts ## The Minting Mechanism diff --git a/x/mint/spec/02_state.md b/x/mint/spec/02_state.md index 19e6f38ea8c2..f59a146d78d0 100644 --- a/x/mint/spec/02_state.md +++ b/x/mint/spec/02_state.md @@ -1,3 +1,7 @@ +--- +order: 2 +--- + # State ## Minter diff --git a/x/mint/spec/03_begin_block.md b/x/mint/spec/03_begin_block.md index 427c0142ef9e..c2e27ec2a453 100644 --- a/x/mint/spec/03_begin_block.md +++ b/x/mint/spec/03_begin_block.md @@ -1,3 +1,7 @@ +--- +order: 3 +--- + # Begin-Block Minting parameters are recalculated and inflation diff --git a/x/mint/spec/04_params.md b/x/mint/spec/04_params.md index c743045e3846..f87766c4e908 100644 --- a/x/mint/spec/04_params.md +++ b/x/mint/spec/04_params.md @@ -1,3 +1,7 @@ +--- +order: 4 +--- + # Parameters The minting module contains the following parameters: diff --git a/x/mint/spec/05_events.md b/x/mint/spec/05_events.md index a98d8db73d01..c7191eebb132 100644 --- a/x/mint/spec/05_events.md +++ b/x/mint/spec/05_events.md @@ -1,3 +1,7 @@ +--- +order: 5 +--- + # Events The minting module emits the following events: diff --git a/x/mint/spec/README.md b/x/mint/spec/README.md index b4d9a1ddc86b..f8fda23588fb 100644 --- a/x/mint/spec/README.md +++ b/x/mint/spec/README.md @@ -1,3 +1,10 @@ +--- +order: 0 +title: Mint Overview +parent: + title: "mint" +--- + # `mint` ## Contents diff --git a/x/params/spec/01_keeper.md b/x/params/spec/01_keeper.md index 5cfd42caff99..5a257b568188 100644 --- a/x/params/spec/01_keeper.md +++ b/x/params/spec/01_keeper.md @@ -1,3 +1,7 @@ +--- +order: 1 +--- + # Keeper In the app initialization stage, `Keeper.Subspace(Paramspace)` is passed to the user modules, and the subspaces are stored in `Keeper.spaces`. Later it can be retrieved with `Keeper.GetSubspace`, so the keepers holding `Keeper` can access to any subspace. For example, Gov module can take `Keeper` as its argument and modify parameter of any subspace when a `ParameterChangeProposal` is accepted. diff --git a/x/params/spec/02_subspace.md b/x/params/spec/02_subspace.md index 9c2245e0f872..feb395430c80 100644 --- a/x/params/spec/02_subspace.md +++ b/x/params/spec/02_subspace.md @@ -1,3 +1,7 @@ +--- +order: 2 +--- + # Subspace `Subspace` is a prefixed subspace of the parameter store. Each module who use the parameter store will take a `Subspace`, not the `Keeper`, to isolate permission to access. diff --git a/x/params/spec/README.md b/x/params/spec/README.md index 503e6b51d24d..6d8934aa9b0d 100644 --- a/x/params/spec/README.md +++ b/x/params/spec/README.md @@ -1,3 +1,10 @@ +--- +order: 0 +title: Params Overview +parent: + title: "params" +--- + # `params` ## Abstract diff --git a/x/slashing/spec/01_concepts.md b/x/slashing/spec/01_concepts.md index b453cd0452fd..62eca44d8e2b 100644 --- a/x/slashing/spec/01_concepts.md +++ b/x/slashing/spec/01_concepts.md @@ -1,3 +1,7 @@ +--- +order: 1 +--- + # Concepts ## States diff --git a/x/slashing/spec/02_state.md b/x/slashing/spec/02_state.md index 3ef5d108ea43..dbe7055e70d0 100644 --- a/x/slashing/spec/02_state.md +++ b/x/slashing/spec/02_state.md @@ -1,3 +1,7 @@ +--- +order: 2 +--- + # State ## Signing Info (Liveness) diff --git a/x/slashing/spec/03_messages.md b/x/slashing/spec/03_messages.md index ca19c892a901..160c2a332338 100644 --- a/x/slashing/spec/03_messages.md +++ b/x/slashing/spec/03_messages.md @@ -1,3 +1,7 @@ +--- +order: 3 +--- + # Messages In this section we describe the processing of messages for the `slashing` module. diff --git a/x/slashing/spec/04_begin_block.md b/x/slashing/spec/04_begin_block.md index f99aa0d8a50f..17e6d39525fb 100644 --- a/x/slashing/spec/04_begin_block.md +++ b/x/slashing/spec/04_begin_block.md @@ -1,3 +1,7 @@ +--- +order: 4 +--- + # BeginBlock ## Liveness Tracking diff --git a/x/slashing/spec/05_hooks.md b/x/slashing/spec/05_hooks.md index 4963142eefbf..cfb8eabf8658 100644 --- a/x/slashing/spec/05_hooks.md +++ b/x/slashing/spec/05_hooks.md @@ -1,8 +1,12 @@ -## Hooks +--- +order: 5 +--- + +# Hooks In this section we describe the "hooks" - slashing module code that runs when other events happen. -### Validator Bonded +## Validator Bonded Upon successful first-time bonding of a new validator, we create a new `ValidatorSigningInfo` structure for the now-bonded validator, which `StartHeight` of the current block. diff --git a/x/slashing/spec/06_events.md b/x/slashing/spec/06_events.md index 8d4e616c76cd..a56b70c06091 100644 --- a/x/slashing/spec/06_events.md +++ b/x/slashing/spec/06_events.md @@ -1,3 +1,7 @@ +--- +order: 6 +--- + # Tags The slashing module emits the following events/tags: diff --git a/x/slashing/spec/07_tombstone.md b/x/slashing/spec/07_tombstone.md index d6ba47d5f62f..23d4babeeca7 100644 --- a/x/slashing/spec/07_tombstone.md +++ b/x/slashing/spec/07_tombstone.md @@ -1,3 +1,7 @@ +--- +order: 7 +--- + # Staking Tombstone ## Abstract diff --git a/x/slashing/spec/08_params.md b/x/slashing/spec/08_params.md index c68188eb4b7c..1ecb815013a4 100644 --- a/x/slashing/spec/08_params.md +++ b/x/slashing/spec/08_params.md @@ -1,3 +1,7 @@ +--- +order: 8 +--- + # Parameters The slashing module contains the following parameters: diff --git a/x/slashing/spec/README.md b/x/slashing/spec/README.md index c70dc220f16d..07e36acfc185 100644 --- a/x/slashing/spec/README.md +++ b/x/slashing/spec/README.md @@ -1,3 +1,10 @@ +--- +order: 20 +title: Slashing Overview +parent: + title: "slashing" +--- + # `slashing` ## Abstract diff --git a/x/staking/spec/01_state.md b/x/staking/spec/01_state.md index dbf9410ceb2f..890d6925118d 100644 --- a/x/staking/spec/01_state.md +++ b/x/staking/spec/01_state.md @@ -1,3 +1,7 @@ +--- +order: 1 +--- + # State ## LastTotalPower diff --git a/x/staking/spec/02_state_transitions.md b/x/staking/spec/02_state_transitions.md index 76f086f5ebb5..634f5ac85308 100644 --- a/x/staking/spec/02_state_transitions.md +++ b/x/staking/spec/02_state_transitions.md @@ -1,3 +1,7 @@ +--- +order: 2 +--- + # State Transitions This document describes the state transition operations pertaining to: diff --git a/x/staking/spec/03_messages.md b/x/staking/spec/03_messages.md index f20e386f9743..2f9a71521f14 100644 --- a/x/staking/spec/03_messages.md +++ b/x/staking/spec/03_messages.md @@ -1,3 +1,7 @@ +--- +order: 3 +--- + # Messages In this section we describe the processing of the staking messages and the corresponding updates to the state. All created/modified state objects specified by each message are defined within the [state](./02_state.md) section. diff --git a/x/staking/spec/04_end_block.md b/x/staking/spec/04_end_block.md index 9508d9d57591..d42b26704e9e 100644 --- a/x/staking/spec/04_end_block.md +++ b/x/staking/spec/04_end_block.md @@ -1,3 +1,7 @@ +--- +order: 4 +--- + # End-Block Each abci end block call, the operations to update queues and validator set diff --git a/x/staking/spec/05_hooks.md b/x/staking/spec/05_hooks.md index e3c87d7c57fc..10e084e2a5f0 100644 --- a/x/staking/spec/05_hooks.md +++ b/x/staking/spec/05_hooks.md @@ -1,3 +1,7 @@ +--- +order: 5 +--- + # Hooks Other modules may register operations to execute when a certain event has diff --git a/x/staking/spec/06_events.md b/x/staking/spec/06_events.md index 85b498bc372e..5994af5fa3a6 100644 --- a/x/staking/spec/06_events.md +++ b/x/staking/spec/06_events.md @@ -1,3 +1,7 @@ +--- +order: 6 +--- + # Events The staking module emits the following events: diff --git a/x/staking/spec/07_params.md b/x/staking/spec/07_params.md index df44952b49fe..4fdd5ca124e4 100644 --- a/x/staking/spec/07_params.md +++ b/x/staking/spec/07_params.md @@ -1,3 +1,7 @@ +--- +order: 7 +--- + # Parameters The staking module contains the following parameters: diff --git a/x/staking/spec/README.md b/x/staking/spec/README.md index 9e4a9a99e677..c889d06841be 100644 --- a/x/staking/spec/README.md +++ b/x/staking/spec/README.md @@ -1,3 +1,10 @@ +--- +order: 0 +title: Staking Overview +parent: + title: "staking" +--- + # `staking` ## Abstract diff --git a/x/supply/spec/01_concepts.md b/x/supply/spec/01_concepts.md index 69ab038afefd..4cd86bce2dc7 100644 --- a/x/supply/spec/01_concepts.md +++ b/x/supply/spec/01_concepts.md @@ -1,3 +1,7 @@ +--- +order: 1 +--- + # Concepts ## Supply diff --git a/x/supply/spec/02_state.md b/x/supply/spec/02_state.md index d414d5c9414c..65ca6b57aa5f 100644 --- a/x/supply/spec/02_state.md +++ b/x/supply/spec/02_state.md @@ -1,3 +1,7 @@ +--- +order: 2 +--- + # State ## Supply diff --git a/x/supply/spec/03_future_improvements.md b/x/supply/spec/03_future_improvements.md index 5582740f38b8..b4fc078b1ba7 100644 --- a/x/supply/spec/03_future_improvements.md +++ b/x/supply/spec/03_future_improvements.md @@ -1,3 +1,7 @@ +--- +order: 3 +--- + # Future improvements The current supply module only keeps track of the total supply of coins held in the network. diff --git a/x/supply/spec/README.md b/x/supply/spec/README.md index d9ef2b1075d9..833ac1529017 100644 --- a/x/supply/spec/README.md +++ b/x/supply/spec/README.md @@ -1,3 +1,10 @@ +--- +order: 0 +title: Supply Overview +parent: + title: "supply" +--- + # `supply` ## Contents diff --git a/x/upgrade/spec/01_concepts.md b/x/upgrade/spec/01_concepts.md index 2b93738f65af..b5e5c2208c27 100644 --- a/x/upgrade/spec/01_concepts.md +++ b/x/upgrade/spec/01_concepts.md @@ -1,3 +1,7 @@ +--- +order: 1 +--- + # Concepts ## Plan diff --git a/x/upgrade/spec/02_state.md b/x/upgrade/spec/02_state.md index ad2650053854..585e6f0c4c33 100644 --- a/x/upgrade/spec/02_state.md +++ b/x/upgrade/spec/02_state.md @@ -1,3 +1,7 @@ +--- +order: 2 +--- + # State The internal state of the `x/upgrade` module is relatively minimal and simple. The diff --git a/x/upgrade/spec/03_events.md b/x/upgrade/spec/03_events.md index bbfcdddfa69e..7e86d08dae40 100644 --- a/x/upgrade/spec/03_events.md +++ b/x/upgrade/spec/03_events.md @@ -1,3 +1,7 @@ +--- +order: 3 +--- + # Events The `x/upgrade` does not emit any events by itself. Any and all proposal related diff --git a/x/upgrade/spec/README.md b/x/upgrade/spec/README.md index cbe7b5a3bc35..94d352a25bb3 100644 --- a/x/upgrade/spec/README.md +++ b/x/upgrade/spec/README.md @@ -1,4 +1,11 @@ -# Upgrade Module Specification +--- +order: 0 +title: Upgrade Overview +parent: + title: "upgrade" +--- + +# `upgrade` ## Abstract