Skip to content

Commit a78c846

Browse files
chore: update documentation from cosmos-sdk/docs (#253)
1 parent 9b3c60d commit a78c846

File tree

20 files changed

+1131
-31
lines changed

20 files changed

+1131
-31
lines changed

docs/build/architecture/adr-040-storage-and-smt-state-commitments.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,6 @@ We change the storage layout of the state machine, a storage hard fork and netwo
258258

259259
## Alternative designs
260260

261-
Most of the alternative designs were evaluated in [state commitments and storage report](https://paper.dropbox.com/published/State-commitments-and-storage-review--BDvA1MLwRtOx55KRihJ5xxLbBw-KeEB7eOd11pNrZvVtqUgL3h).
262-
263261
Ethereum research published [Verkle Trie](https://dankradfeist.de/ethereum/2021/06/18/verkle-trie-for-eth1.html) - an idea of combining polynomial commitments with merkle tree in order to reduce the tree height. This concept has a very good potential, but we think it's too early to implement it. The current, SMT based design could be easily updated to the Verkle Trie once other research implement all necessary libraries. The main advantage of the design described in this ADR is the separation of state commitments from the data storage and designing a more powerful interface.
264262

265263
## Further Discussions
@@ -280,7 +278,6 @@ We were discussing use case where modules can use a support database, which is n
280278

281279
* [IAVL What's Next?](https://github.com/cosmos/cosmos-sdk/issues/7100)
282280
* [IAVL overview](https://docs.google.com/document/d/16Z_hW2rSAmoyMENO-RlAhQjAG3mSNKsQueMnKpmcBv0/edit#heading=h.yd2th7x3o1iv) of its state v0.15
283-
* [State commitments and storage report](https://paper.dropbox.com/published/State-commitments-and-storage-review--BDvA1MLwRtOx55KRihJ5xxLbBw-KeEB7eOd11pNrZvVtqUgL3h)
284281
* [Celestia (LazyLedger) SMT](https://github.com/lazyledger/smt)
285282
* Facebook Diem (Libra) SMT [design](https://developers.diem.com/papers/jellyfish-merkle-tree/2021-01-14.pdf)
286283
* [Trillian Revocation Transparency](https://github.com/google/trillian/blob/master/docs/papers/RevocationTransparency.pdf), [Trillian Verifiable Data Structures](https://github.com/google/trillian/blob/master/docs/papers/VerifiableDataStructures.pdf).

docs/build/build.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ sidebar_position: 0
44

55
# Build
66

7-
* [Building Apps](./building-apps/00-app-go.md) - The documentation in this section will guide you through the process of developing your dApp using the Cosmos SDK framework.
7+
* [Building Apps](./building-apps/00-runtime.md) - The documentation in this section will guide you through the process of developing your dApp using the Cosmos SDK framework.
88
* [Modules](./modules/README.md) - Information about the various modules available in the Cosmos SDK: Accounts, Auth, Authz, Bank, Circuit, Consensus, Distribution, Epochs, Evidence, Feegrant, Genutil, Governance, Group, Mint, NFT, Protocolpool, Slashing, Staking, Tx, Upgrade, Validate.
99
* [Migrations](./migrations/01-intro.md) - See what has been updated in each release the process of the transition between versions.
1010
* [Packages](./packages/README.md) - Explore a curated collection of pre-built modules and functionalities, streamlining the development process.

docs/build/building-apps/00-runtime.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ An application only needs to call `AppBuilder.Build` to create a fully configure
134134
https://github.com/cosmos/cosmos-sdk/blob/v0.52.0-beta.2/runtime/builder.go#L36-L80
135135
```
136136

137-
More information on building applications can be found in the [next section](./02-app-building.md).
137+
More information on building applications can be found in the [next section](./02-app-go-di.md).
138138

139139
## Best Practices
140140

docs/build/building-apps/upgrades/0.52.md

Lines changed: 554 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"label": "Upgrade Tutorials",
3+
"position": 0,
4+
"link": null
5+
}

docs/build/building-modules/06-keeper.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ https://github.com/cosmos/cosmos-sdk/blob/v0.52.0-beta.1/x/staking/keeper/keeper
4646

4747
Let us go through the different parameters:
4848

49-
* Environment is a struct that holds the necessary references to services available to the modules. This includes the [store services](../../advanced/04-store.md#store-services), the [event manager](../../learn/advanced/06-events.md) and more.
49+
* Environment is a struct that holds the necessary references to services available to the modules. This includes the [kvstore services](../../learn/advanced/02-core.md#kvstore-service), the [event manager](../../learn/advanced/02-core.md#event-service) and more.
5050
* An expected `keeper` is a `keeper` external to a module that is required by the internal `keeper` of said module. External `keeper`s are listed in the internal `keeper`'s type definition as interfaces. These interfaces are themselves defined in an `expected_keepers.go` file in the root of the module's folder. In this context, interfaces are used to reduce the number of dependencies, as well as to facilitate the maintenance of the module itself.
5151
* `cdc` is the [codec](../../learn/advanced/05-encoding.md) used to marshal and unmarshal structs to/from `[]byte`. The `cdc` can be any of `codec.BinaryCodec`, `codec.JSONCodec` or `codec.Codec` based on your requirements. It can be either a proto or amino codec as long as they implement these interfaces.
5252
* The authority listed is a module account or user account that has the right to change module level parameters. Previously this was handled by the param module, which has been deprecated.

docs/build/building-modules/16-testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ The goal of these integration tests is to test how a component interacts with ot
6161

6262
Integration tests interact with the tested module via the defined `Msg` and `Query` services. The result of the test can be verified by checking the state of the application, by checking the emitted events or the response. It is advised to combine two of these methods to verify the result of the test.
6363

64-
The SDK provides small helpers for quickly setting up an integration tests. These helpers can be found at <https://github.com/cosmos/cosmos-sdk/blob/main/testutil/integration>.
64+
The SDK provides small helpers for quickly setting up an integration tests. These helpers can be found at <https://github.com/cosmos/cosmos-sdk/blob/main/testutil>.
6565

6666
### Example
6767

docs/learn/advanced/00-baseapp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ Unconfirmed transactions are relayed to peers only if they pass `CheckTx`.
309309
`CheckTx()` can perform both _stateful_ and _stateless_ checks, but developers should strive to
310310
make the checks **lightweight** because gas fees are not charged for the resources (CPU, data load...) used during the `CheckTx`.
311311

312-
The [`Context`](../advanced/02-context.md), which includes a `GasMeter` that tracks how much gas is used during the execution of `Tx`, is initialized at the beginning of `CheckTx`. The user-provided amount of gas for `Tx` is referred to as `GasWanted`. If `GasConsumed`, the amount of gas used during execution, exceeds `GasWanted`, the execution is halted and the changes made to the cached copy of the state are not committed. Otherwise, `CheckTx` sets `GasUsed` equal to `GasConsumed` and returns it in the result. After calculating the gas and fee values, validator-nodes ensure that the user-specified `gas-prices` exceed their locally defined `min-gas-prices`.
312+
The [`Core pkg`](../advanced/02-core.md), which includes a `GasService` that tracks how much gas is used during the execution of `Tx`, is initialized at the beginning of `CheckTx`. The user-provided amount of gas for `Tx` is referred to as `GasWanted`. If `GasConsumed`, the amount of gas used during execution, exceeds `GasWanted`, the execution is halted and the changes made to the cached copy of the state are not committed. Otherwise, `CheckTx` sets `GasUsed` equal to `GasConsumed` and returns it in the result. After calculating the gas and fee values, validator-nodes ensure that the user-specified `gas-prices` exceed their locally defined `min-gas-prices`.
313313

314314
In the Cosmos SDK, after [decoding transactions](./05-encoding.md), `CheckTx()` is implemented
315315
to do the following checks:

docs/learn/advanced/04-store.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,6 @@ When methods of the parent `KVStore` are called, `GasKv.Store` automatically con
189189
https://github.com/cosmos/cosmos-sdk/blob/store/v1.1.1/store/types/gas.go#L220-L229
190190
```
191191

192-
By default, all `KVStores` are wrapped in `GasKv.Stores` when retrieved. This is done in the `KVStore()` method of the [`context`](./02-context.md):
193-
194-
```go reference
195-
https://github.com/cosmos/cosmos-sdk/blob/v0.52.0-beta.2/types/context.go#L339-L342
196-
```
197-
198192
`KVStores` can be accessed in their corresponding modules by using the [`kvStoreService` and `memStoreService`](./02-core.md#kvstore-service).
199193

200194
### `TraceKv` Store

docs/user/run-node/06-run-production.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ In the past, validators [have had issues](https://github.com/cosmos/cosmos-sdk/i
4848

4949
### Firewall
5050

51-
Nodes should not have all ports open to the public, this is a simple way to get DDOS'd. Secondly it is recommended by [CometBFT](github.com/cometbft/cometbft) to never expose ports that are not required to operate a node.
51+
Nodes should not have all ports open to the public, this is a simple way to get DDOS'd. Secondly it is recommended by [CometBFT](https://github.com/cometbft/cometbft) to never expose ports that are not required to operate a node.
5252

5353
When setting up a firewall there are a few ports that can be open when operating a Cosmos SDK node. There is the CometBFT json-RPC, prometheus, p2p, remote signer and Cosmos SDK GRPC and REST. If the node is being operated as a node that does not offer endpoints to be used for submission or querying then a max of three endpoints are needed.
5454

versioned_docs/version-0.52/build/architecture/adr-040-storage-and-smt-state-commitments.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,6 @@ We change the storage layout of the state machine, a storage hard fork and netwo
258258

259259
## Alternative designs
260260

261-
Most of the alternative designs were evaluated in [state commitments and storage report](https://paper.dropbox.com/published/State-commitments-and-storage-review--BDvA1MLwRtOx55KRihJ5xxLbBw-KeEB7eOd11pNrZvVtqUgL3h).
262-
263261
Ethereum research published [Verkle Trie](https://dankradfeist.de/ethereum/2021/06/18/verkle-trie-for-eth1.html) - an idea of combining polynomial commitments with merkle tree in order to reduce the tree height. This concept has a very good potential, but we think it's too early to implement it. The current, SMT based design could be easily updated to the Verkle Trie once other research implement all necessary libraries. The main advantage of the design described in this ADR is the separation of state commitments from the data storage and designing a more powerful interface.
264262

265263
## Further Discussions
@@ -280,7 +278,6 @@ We were discussing use case where modules can use a support database, which is n
280278

281279
* [IAVL What's Next?](https://github.com/cosmos/cosmos-sdk/issues/7100)
282280
* [IAVL overview](https://docs.google.com/document/d/16Z_hW2rSAmoyMENO-RlAhQjAG3mSNKsQueMnKpmcBv0/edit#heading=h.yd2th7x3o1iv) of its state v0.15
283-
* [State commitments and storage report](https://paper.dropbox.com/published/State-commitments-and-storage-review--BDvA1MLwRtOx55KRihJ5xxLbBw-KeEB7eOd11pNrZvVtqUgL3h)
284281
* [Celestia (LazyLedger) SMT](https://github.com/lazyledger/smt)
285282
* Facebook Diem (Libra) SMT [design](https://developers.diem.com/papers/jellyfish-merkle-tree/2021-01-14.pdf)
286283
* [Trillian Revocation Transparency](https://github.com/google/trillian/blob/master/docs/papers/RevocationTransparency.pdf), [Trillian Verifiable Data Structures](https://github.com/google/trillian/blob/master/docs/papers/VerifiableDataStructures.pdf).

versioned_docs/version-0.52/build/build.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ sidebar_position: 0
44

55
# Build
66

7-
* [Building Apps](./building-apps/00-app-go.md) - The documentation in this section will guide you through the process of developing your dApp using the Cosmos SDK framework.
8-
* [Modules](./modules/README.md) - Information about the various modules available in the Cosmos SDK: Auth, Authz, Bank, Crisis, Distribution, Evidence, Feegrant, Governance, Mint, Params, Slashing, Staking, Upgrade, NFT, Consensus, Circuit, Genutil.
7+
* [Building Apps](./building-apps/00-runtime.md) - The documentation in this section will guide you through the process of developing your dApp using the Cosmos SDK framework.
8+
* [Modules](./modules/README.md) - Information about the various modules available in the Cosmos SDK: Accounts, Auth, Authz, Bank, Circuit, Consensus, Distribution, Epochs, Evidence, Feegrant, Genutil, Governance, Group, Mint, NFT, Protocolpool, Slashing, Staking, Tx, Upgrade, Validate.
99
* [Migrations](./migrations/01-intro.md) - See what has been updated in each release the process of the transition between versions.
1010
* [Packages](./packages/README.md) - Explore a curated collection of pre-built modules and functionalities, streamlining the development process.
1111
* [Tooling](./tooling/README.md) - A suite of utilities designed to enhance the development workflow, optimizing the efficiency of Cosmos SDK-based projects.

versioned_docs/version-0.52/build/building-apps/00-runtime.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ An application only needs to call `AppBuilder.Build` to create a fully configure
134134
https://github.com/cosmos/cosmos-sdk/blob/v0.52.0-beta.2/runtime/builder.go#L36-L80
135135
```
136136

137-
More information on building applications can be found in the [next section](./02-app-building.md).
137+
More information on building applications can be found in the [next section](./02-app-go-di.md).
138138

139139
## Best Practices
140140

0 commit comments

Comments
 (0)