Docs: hide frontmatter, bugfixes (#5413)

* encoding

* working on baseapp doc

* baseapp work

* reorg

* almost there

* finish first draft

* remove old files

* module doc start

* finish intro

* working

* workinnn

* add transactions into core

* hans comments

* add transactions into core

* working

* gautier comments

* clean

* working

* consolidate intro

* querier

* workiiiing

* refactor for new module interface

* karoly review

* working on baseapp doc

* baseapp work

* reorg

* almost there

* finish first draft

* remove old files

* finish intro

* workinnn

* initial commit after rebase

* query-lifecycle and started modules-interfaces

* query-lifecycle first draft done

* module interfaces first draft

* rest and intro skeletons

* rest and intro done

* small edits and links

* comments

* revisions

* cli.md comments

* comments

* minor edits

* better flow for query lifecycle

* add transactions into core

* hans comments

* add transactions into core

* checkout master-docs files

* deleted some

* remove modules readme

* cli.md comments

* comments

* module-interfaces comments

* Merge PR #4857: Add Context concept doc

* working

* working

* finish messages and queries

* handler

* querier

* last comments!

* punctuation

* querier2

* consolidate intro

* querier

* workiiiing

* refactor for new module interface

* karoly review

* working on baseapp doc

* baseapp work

* reorg

* almost there

* finish first draft

* remove old files

* finish intro

* workinnn

* initial commit after rebase

* query-lifecycle and started modules-interfaces

* query-lifecycle first draft done

* module interfaces first draft

* rest and intro skeletons

* rest and intro done

* small edits and links

* comments

* revisions

* cli.md comments

* comments

* minor edits

* better flow for query lifecycle

* checkout master-docs files

* deleted some

* remove modules readme

* cli.md comments

* comments

* module-interfaces comments

* keeper

* genesis

* finish

* Apply suggestions from code review

Co-Authored-By: Hans Schoenburg <hschoenburg@users.noreply.github.com>

* hans review

* Update docs/core/baseapp.md

Co-Authored-By: Hans Schoenburg <hschoenburg@users.noreply.github.com>

* working

* last comment

* workin

* Apply suggestions from code review

* encoding and node

* almost finish store

* finish docs

* fixes

* fede comments + permalinks

* hans review

* add more permalinks

* update docs theme version (#5239)

* R4R: Docs Cleanup (#5246)

* start

* work

* work

* work

* remove table of content

* links intro

* fix links

* remove junk

* cleanup

* cleanup

* work

* finish cleanup

* addback readmes

* remove nft

* fix links

* remove dup

* remove dup

* remove dup

* remove dup

* remove dup

* fix links

* add subscribe events

* refine rest

* index page

* sidebar

* theme version

* theme version

* testing netlify

* theme version

* tooltip example

* version

* testing code embedding

* reverting back

* theme version

* version

* version

* version

* readme and version

* cleanup

* redo app anatomy

* modules readme, theme version

* theme version

* fix modules list

* theme version

* new snippets

* modules readme

* update docs readme

* modify synopsis

* version

* fix yaml

* version

* version

* version

* version

* version

* version

* version

* version

* version

* version

* add hide banner

* version

* version

* version

* small fixes

* modules readme, version

* remove hotkeys dep, version

* version

* version

* version

* version

* version

* version

* version

* slight notice

* fix links and hide

* permalinks

* small clean

* version

* resolve conflicts, add google analytics

* fix merge remants

* version

* changelog 1/2

* Changelog: docs UI

* version

* remove merge conflicts

* Code: Update link for Contributing to the docs to docs_readme

* HTML/CSS: Update layout of homepage footer to match new layout in Figma

* version

* final modifs

* modules, version

* modules readme

* link to module list from homepage

* version

* building modules link

* version

* version

* fonts

* version

* version

* fix link

* fix package.json

* links in explore sdk section

* core concepts

* version

* change delimeters for frontmatter

* frontmatter in comments

* version

* temp add tiny-cookie

* fixed link issues

* fixed styling issues, copy

* hide frontmatter

* hide frontmatter

* layout fixes, padded ascii diagram

* fira sans font for code
This commit is contained in:
Denis Fadeev
2019-12-17 08:44:44 -03:00
committed by Federico Kunze
co-authored by Hans Schoenburg
parent 98acd941e7
commit 13378bd2cf
118 changed files with 605 additions and 489 deletions
+5 -1
View File
@@ -123,7 +123,7 @@ module.exports = {
}
],
smallprint:
"The development of the Cosmos project is led primarily by Tendermint Inc., the for-profit entity which also maintains this website. Funding for this development comes primarily from the Interchain Foundation, a Swiss non-profit.",
"This website is maintained by Tendermint Inc. The contents and opinions of this website are those of Tendermint Inc.",
links: [
{
title: "Documentation",
@@ -135,6 +135,10 @@ module.exports = {
{
title: "Cosmos Hub",
url: "https://hub.cosmos.network/"
},
{
title: "Tendermint Core",
url: "https://docs.tendermint.com/"
}
]
},
+5 -4
View File
@@ -1,5 +1,5 @@
---
layout: index
<!--
layout: homepage
title: Cosmos SDK Documentation
description: Cosmos SDK is the worlds most popular framework for building application-specific blockchains.
features:
@@ -48,14 +48,15 @@ stack:
color: "#BA3FD9"
label: hub
url: http://hub.cosmos.network
- title: Tendermint
- title: Tendermint Core
desc: The leading BFT engine for building blockchains, powering Cosmos SDK.
color: "#00BB00"
label: core
url: http://docs.tendermint.com
footer:
newsletter: false
---
aside: false
-->
# Cosmos SDK Documentation
+2 -2
View File
@@ -1,8 +1,8 @@
---
<!--
order: false
parent:
order: 2
---
-->
# Basics
+2 -2
View File
@@ -1,7 +1,7 @@
---
<!--
order: 3
synopsis: This document describes the in-built accounts system of the Cosmos SDK.
---
-->
# Accounts
+2 -2
View File
@@ -1,7 +1,7 @@
---
<!--
order: 1
synopsis: "This document describes the core parts of a Cosmos SDK application. Throughout the document, a placeholder application named `app` will be used."
---
-->
# Anatomy of an SDK Application
+2 -2
View File
@@ -1,7 +1,7 @@
---
<!--
order: 4
synopsis: This document describes the default strategies to handle gas and fees within a Cosmos SDK application.
---
-->
# Gas and Fees
+2 -2
View File
@@ -1,7 +1,7 @@
---
<!--
order: 2
synopsis: "This document describes the lifecycle of a transaction from creation to committed state changes. Transaction definition is described in a [different doc](../core/transactions.md). The transaction will be referred to as `Tx`."
---
-->
# Transaction Lifecycle
+2 -2
View File
@@ -1,8 +1,8 @@
---
<!--
order: false
parent:
order: 4
---
-->
# Building Modules
+2 -2
View File
@@ -1,7 +1,7 @@
---
<!--
order: 6
synopsis: "`BeginBlocker` and `EndBlocker` are optional methods module developers can implement in their module. They will be triggered at the beginning and at the end of each block respectively, when the [`BeginBlock`](../core/baseapp.md#beginblock) and [`EndBlock`](../core/baseapp.md#endblock) ABCI messages are received from the underlying consensus engine."
---
-->
# BeginBlocker and EndBlocker
+2 -2
View File
@@ -1,7 +1,7 @@
---
<!--
order: 9
synopsis: Modules generally handle a subset of the state and, as such, they need to define the related subset of the genesis file as well as methods to initialize, verify and export it.
---
-->
# Module Genesis
+2 -2
View File
@@ -1,7 +1,7 @@
---
<!--
order: 4
synopsis: "A `Handler` designates a function that processes [`message`s](./messages-and-queries.md#messages). `Handler`s are specific to the module in which they are defined, and only process `message`s defined within the said module. They are called from `baseapp` during [`DeliverTx`](../core/baseapp.md#delivertx)."
---
-->
# Handlers
+2 -2
View File
@@ -1,7 +1,7 @@
---
<!--
order: 1
synopsis: Modules define most of the logic of SDK applications. Developers compose module together using the Cosmos SDK to build their custom application-specific blockchains. This document outlines the basic concepts behind SDK modules and how to approach module management.
---
-->
# Introduction to SDK Modules
+2 -2
View File
@@ -1,7 +1,7 @@
---
<!--
order: 8
synopsis: "An invariant is a property of the application that should always be true. In the context of the Cosmos SDK, an `Invariant` is a function that checks for a particular invariant. These functions are useful to detect bugs early on and act upon them to limit their potential consequences (e.g. by halting the chain). They are also useful in the development process of the application to detect bugs via simulations."
---
-->
# Invariants
+2 -2
View File
@@ -1,7 +1,7 @@
---
<!--
order: 7
synopsis: "`Keeper`s refer to a Cosmos SDK abstraction whose role is to manage access to the subset of the state defined by various modules. `Keeper`s are module-specific, i.e. the subset of state defined by a module can only be accessed by a `keeper` defined in said module. If a module needs to access the subset of state defined by another module, a reference to the second module's internal `keeper` needs to be passed to the first one. This is done in `app.go` during the instantiation of module keepers."
---
-->
# Keepers
@@ -1,7 +1,7 @@
---
<!--
order: 3
synopsis: "`Message`s and `Queries` are the two primary objects handled by modules. Most of the core components defined in a module, like `handler`s, `keeper`s and `querier`s, exist to process `message`s and `queries`."
---
-->
# Messages and Queries
+2 -2
View File
@@ -1,7 +1,7 @@
---
<!--
order: 11
synopsis: This document details how to build CLI and REST interfaces for a module. Examples from various SDK modules are included.
---
-->
# Module Interfaces
+2 -3
View File
@@ -1,8 +1,7 @@
---
<!--
order: 2
synopsis: "Cosmos SDK modules need to implement the [`AppModule` interfaces](#application-module-interfaces), in order to be managed by the application's [module manager](#module-manager). The module manager plays an important role in [`message` and `query` routing](../core/baseapp.md#routing), and allows application developers to set the order of execution of a variety of functions like [`BeginBlocker` and `EndBlocker`](../basics/app-anatomy.md#begingblocker-and-endblocker)."
---
-->
# Module Manager
+2 -2
View File
@@ -1,7 +1,7 @@
---
<!--
order: 5
synopsis: "A `Querier` designates a function that processes [`queries`](./messages-and-queries.md#queries). `querier`s are specific to the module in which they are defined, and only process `queries` defined within said module. They are called from `baseapp`'s [`Query` method](../core/baseapp.md#query)."
---
-->
# Queriers
+2 -2
View File
@@ -1,7 +1,7 @@
---
<!--
order: 12
synopsis: This document outlines the recommended structure of Cosmos SDK modules. These ideas are meant to be applied as suggestions. Application developers are encouraged to improve upon and contribute to module structure and development design.
---
-->
# Recommended Folder Structure
+2 -2
View File
@@ -1,8 +1,8 @@
---
<!--
order: false
parent:
order: 3
---
-->
# Core Concepts
+2 -2
View File
@@ -1,7 +1,7 @@
---
<!--
order: 1
synopsis: This document describes `BaseApp`, the abstraction that implements the core functionalities of an SDK application.
---
-->
# Baseapp
+2 -2
View File
@@ -1,7 +1,7 @@
---
<!--
order: 3
synopsis: The `context` is a data structure intended to be passed from function to function that carries information about the current state of the application. It holds a cached copy of the entire state as well as useful objects and information like `gasMeter`, `block height`, `consensus parameters` and more.
---
-->
# Context
+2 -2
View File
@@ -1,7 +1,7 @@
---
<!--
order: 6
synopsis: The `codec` is used everywhere in the Cosmos SDK to encode and decode structs and interfaces. The specific codec used in the Cosmos SDK is called `go-amino`
---
-->
# Encoding
+2 -2
View File
@@ -1,7 +1,7 @@
---
<!--
order: 7
synopsis: "`Event`s are objects that contain information about the execution of the application. They are mainly used by service providers like block explorers and wallet to track the execution of various messages and index transactions."
---
-->
# Events
+2 -2
View File
@@ -1,7 +1,7 @@
---
<!--
order: 4
synopsis: The main endpoint of an SDK application is the daemon client, otherwise known as the full-node client. The full-node runs the state-machine, starting from a genesis file. It connects to peers running the same client in order to receive and relay transactions, block proposals and signatures. The full-node is constituted of the application, defined with the Cosmos SDK, and of a consensus engine connected to the application via the ABCI.
---
-->
# Node Client (Daemon)
+2 -2
View File
@@ -1,6 +1,6 @@
---
<!--
order: 8
---
-->
# Object-Capability Model
+2 -2
View File
@@ -1,7 +1,7 @@
---
<!--
order: 5
synopsis: A store is a data structure that holds the state of the application.
---
-->
# Store
+2 -2
View File
@@ -1,7 +1,7 @@
---
<!--
order: 2
synopsis: "`Transactions` are objects created by end-users to trigger state changes in the application."
---
-->
# Transactions
+2 -2
View File
@@ -1,8 +1,8 @@
---
<!--
order: false
parent:
order: 5
---
-->
# Interfaces
+2 -2
View File
@@ -1,7 +1,7 @@
---
<!--
order: 3
synopsis: "This document describes how to create a commmand-line interface (CLI) for an [**application**](../basics/app-anatomy.md). A separate document for implementing a CLI for an SDK [**module**](../building-modules/intro.md) can be found [here](#../building-modules/module-interfaces.md#cli)."
---
-->
# Command-Line Interface
+2 -2
View File
@@ -1,7 +1,7 @@
---
<!--
order: 1
synopsis: Typically, SDK applications include interfaces to let end-users interact with the application. This document introduces the different types of interfaces for SDK applications.
---
-->
# Interfaces
+2 -2
View File
@@ -1,7 +1,7 @@
---
<!--
order: 2
synopsis: "This document describes the lifecycle of a query in a SDK application, from the user interface to application stores and back. The query will be referred to as `Query`."
---
-->
# Query Lifecycle
+2 -2
View File
@@ -1,7 +1,7 @@
---
<!--
order: 4
synopsis: "This document describes how to create a REST interface for an SDK **application**. A separate document for creating a [**module**](../building-modules/intro.md) REST interface can be found [here](#../module-interfaces.md#rest)."
---
-->
# REST Interface
+2 -2
View File
@@ -1,8 +1,8 @@
---
<!--
order: false
parent:
order: 1
---
-->
# Introduction
+2 -2
View File
@@ -1,6 +1,6 @@
---
<!--
order: 1
---
-->
# High-level Overview
+17 -17
View File
@@ -1,6 +1,6 @@
---
<!--
order: 3
---
-->
# Blockchain Architecture
@@ -65,21 +65,21 @@ The Tendermint [consensus algorithm](https://tendermint.com/docs/introduction/wh
Tendermint passes transactions to the application through an interface called the [ABCI](https://tendermint.com/docs/spec/abci/), which the application must implement.
```
+---------------------+
| |
| Application |
| |
+--------+---+--------+
^ |
| | ABCI
| v
+--------+---+--------+
| |
| |
| Tendermint |
| |
| |
+---------------------+
+---------------------+
| |
| Application |
| |
+--------+---+--------+
^ |
| | ABCI
| v
+--------+---+--------+
| |
| |
| Tendermint |
| |
| |
+---------------------+
```
Note that **Tendermint only handles transaction bytes**. It has no knowledge of what these bytes mean. All Tendermint does is order these transaction bytes deterministically. Tendermint passes the bytes to the application via the ABCI, and expects a return code to inform it if the messages contained in the transactions were successfully processed or not.
+2 -2
View File
@@ -1,6 +1,6 @@
---
<!--
order: 4
---
-->
# Main Components of the Cosmos SDK
+2 -2
View File
@@ -1,7 +1,7 @@
---
<!--
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
+345 -234
View File
File diff suppressed because it is too large Load Diff
+5 -3
View File
@@ -5,7 +5,7 @@
"main": "index.js",
"scripts": {
"preserve": "./pre.sh",
"serve": "trap 'exit 0' SIGINT; vuepress dev",
"serve": "trap 'exit 0' SIGINT; vuepress dev --no-cache",
"postserve": "./post.sh",
"prebuild": "./pre.sh",
"build": "trap 'exit 0' SIGINT; vuepress build --no-cache",
@@ -15,6 +15,8 @@
"license": "ISC",
"dependencies": {
"@vuepress/plugin-google-analytics": "^1.2.0",
"vuepress-theme-cosmos": "^1.0.105"
"tiny-cookie": "^2.3.1",
"vuepress-plugin-smooth-scroll": "0.0.9",
"vuepress-theme-cosmos": "^1.0.113"
}
}
}
+2 -2
View File
@@ -1,7 +1,7 @@
---
<!--
parent:
order: false
---
-->
# Using the SDK