Skip to content

Commit

Permalink
Final updates for new docs website (cosmos#5388)
Browse files Browse the repository at this point in the history
* consolidate intro

* start anatomy of sdk app

* wokring

* working

* querier

* working

* workiiiing

* finish

* add dep and makefile

* Apply suggestions from code review

Co-Authored-By: Alessio Treglia <quadrispro@ubuntu.com>

* typo

* typo

* Apply suggestions from code review

Co-Authored-By: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-Authored-By: Alessio Treglia <quadrispro@ubuntu.com>
Co-Authored-By: frog power 4000 <rigel.rozanski@gmail.com>

* refactor for new module interface

* karoly review

* Apply suggestions from code review

Co-Authored-By: Karoly Albert Szabo <szabo.karoly.a@gmail.com>
Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* 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 cosmos#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 (cosmos#5239)

* R4R: Docs Cleanup (cosmos#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

* Update post.sh
  • Loading branch information
gamarin2 authored and xiangjianmeng committed Dec 18, 2019
1 parent 078c053 commit dfc5585
Show file tree
Hide file tree
Showing 85 changed files with 413 additions and 62 deletions.
42 changes: 31 additions & 11 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 || "/",
Expand All @@ -35,7 +48,7 @@ module.exports = {
title: "Modules",
directory: true,
path: "/modules"
},
}
]
},
{
Expand Down Expand Up @@ -81,7 +94,7 @@ module.exports = {
logo: "/logo-bw.svg",
textLink: {
text: "cosmos.network",
url: "https://cosmos.network"
url: "/"
},
services: [
{
Expand Down Expand Up @@ -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",
Expand All @@ -164,6 +178,12 @@ module.exports = {
{
ga: "UA-51029217-12"
}
],
[
"sitemap",
{
hostname: "https://docs.cosmos.network"
}
]
],
]
};
24 changes: 11 additions & 13 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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.
Expand All @@ -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.


3 changes: 1 addition & 2 deletions docs/building-modules/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)

15 changes: 7 additions & 8 deletions docs/intro/sdk-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand All @@ -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)

Expand All @@ -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--------------------------+
Expand Down Expand Up @@ -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}

3 changes: 1 addition & 2 deletions docs/intro/why-app-specific.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
31 changes: 15 additions & 16 deletions docs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
2 changes: 1 addition & 1 deletion docs/post.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash

rm -rf modules
rm -rf modules
2 changes: 1 addition & 1 deletion docs/pre.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ for D in ../x/*; do
fi
done

cp ../x/README.md modules/
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
5 changes: 2 additions & 3 deletions x/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

4 changes: 4 additions & 0 deletions x/auth/spec/01_concepts.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
order: 1
---

# Concepts

## Gas & Fees
Expand Down
4 changes: 4 additions & 0 deletions x/auth/spec/02_state.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
order: 2
---

# State

## Accounts
Expand Down
4 changes: 4 additions & 0 deletions x/auth/spec/03_messages.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
order: 3
---

# Messages

TODO make this file conform to typical messages spec
Expand Down
4 changes: 4 additions & 0 deletions x/auth/spec/03_types.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
order: 4
---

# Types

Besides accounts (specified in [State](state.md)), the types exposed by the auth module
Expand Down
4 changes: 4 additions & 0 deletions x/auth/spec/04_keepers.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 4 additions & 0 deletions x/auth/spec/05_vesting.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
order: 6
---

# Vesting

- [Vesting](#vesting)
Expand Down
4 changes: 4 additions & 0 deletions x/auth/spec/07_params.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
order: 7
---

# Parameters

The auth module contains the following parameters:
Expand Down
Loading

0 comments on commit dfc5585

Please sign in to comment.