Skip to content

Commit 89d8ca0

Browse files
chore: update documentation from cosmos-sdk/docs (#287)
chore: Sync docs from cosmos-sdk/docs Co-authored-by: tac0turtle <[email protected]>
1 parent 78e6e9d commit 89d8ca0

File tree

94 files changed

+1907
-684
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+1907
-684
lines changed

docs/build/abci/01-prepare-proposal.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ selected DO NOT exceed the maximum block gas (if set) and the maximum bytes prov
2929
by `req.MaxBytes`.
3030

3131
```go reference
32-
https://github.com/cosmos/cosmos-sdk/blob/v0.53.0-rc.2/baseapp/abci_utils.go
32+
https://github.com/cosmos/cosmos-sdk/blob/v0.53.0/baseapp/abci_utils.go
3333
```
3434

3535
This default implementation can be overridden by the application developer in
@@ -42,4 +42,4 @@ prepareOpt := func(app *baseapp.BaseApp) {
4242
}
4343

4444
baseAppOptions = append(baseAppOptions, prepareOpt)
45-
```
45+
```

docs/build/abci/02-process-proposal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ and `ProcessProposal` for the new proposal.
1414
Here is the implementation of the default implementation:
1515

1616
```go reference
17-
https://github.com/cosmos/cosmos-sdk/blob/v0.53.0-rc.2/baseapp/abci_utils.go#L219-L226
17+
https://github.com/cosmos/cosmos-sdk/blob/v0.53.0/baseapp/abci_utils.go#L219-L226
1818
```
1919

2020
Like `PrepareProposal`, this implementation is the default and can be modified by

docs/build/abci/03-vote-extensions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ defined in ABCI++.
88
## Extend Vote
99

1010
ABCI 2.0 (colloquially called ABCI++) allows an application to extend a pre-commit vote with arbitrary data. This process does NOT have to be deterministic, and the data returned can be unique to the
11-
validator process. The Cosmos SDK defines [`baseapp.ExtendVoteHandler`](https://github.com/cosmos/cosmos-sdk/blob/v0.53.0-rc.2/types/abci.go#L32):
11+
validator process. The Cosmos SDK defines [`baseapp.ExtendVoteHandler`](https://github.com/cosmos/cosmos-sdk/blob/v0.53.0/types/abci.go#L32):
1212

1313
```go
1414
type ExtendVoteHandler func(Context, *abci.RequestExtendVote) (*abci.ResponseExtendVote, error)

docs/build/architecture/adr-057-app-wiring.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -306,13 +306,13 @@ change to a module should be handled as follows:
306306
- the semantic major version should be incremented, and
307307
- a new semantically versioned module config protobuf type should be created.
308308

309-
For instance, if we have the SDK module for bank in the go module `cosmossdk.io/x/bank` with the module config type
309+
For instance, if we have the SDK module for bank in the go module `github.com/cosmos/cosmos-sdk/x/bank` with the module config type
310310
`cosmos.bank.module.v1.Module`, and we want to make a state machine breaking change to the module, we would:
311-
- create a new go module `cosmossdk.io/x/bank/v2`,
311+
- create a new go module `github.com/cosmos/cosmos-sdk/x/bank/v2`,
312312
- with the module config protobuf type `cosmos.bank.module.v2.Module`.
313313

314314
This _does not_ mean that we need to increment the protobuf API version for bank. Both modules can support
315-
`cosmos.bank.v1`, but `cosmossdk.io/x/bank/v2` will be a separate go module with a separate module config type.
315+
`cosmos.bank.v1`, but `github.com/cosmos/cosmos-sdk/x/bank/v2` will be a separate go module with a separate module config type.
316316

317317
This practice will eventually allow us to use appconfig to load new versions of a module via a configuration change.
318318

docs/build/architecture/adr-070-unordered-account.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- Dec 4, 2023: Initial Draft (@yihuang, @tac0turtle, @alexanderbez)
66
- Jan 30, 2024: Include section on deterministic transaction encoding
77
- Mar 18, 2025: Revise implementation to use Cosmos SDK KV Store and require unique timeouts per-address (@technicallyty)
8+
- Apr 25, 2025: Add note about rejecting unordered txs with sequence values.
89

910
## Status
1011

@@ -289,6 +290,8 @@ for _, tx := range txs {
289290
}
290291
```
291292

293+
We will reject transactions that have both sequence and unordered timeouts set. We do this to avoid assuming the intent of the user.
294+
292295
### State Management
293296

294297
The storage of unordered sequences will be facilitated using the Cosmos SDK's KV Store service.

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ type App struct {
3131
Cosmos SDK applications should embed the `*runtime.App` struct to leverage the runtime module.
3232

3333
```go reference
34-
https://github.com/cosmos/cosmos-sdk/blob/v0.53.0-rc.2/simapp/app_di.go#L60-L61
34+
https://github.com/cosmos/cosmos-sdk/blob/v0.53.0/simapp/app_di.go#L60-L61
3535
```
3636

3737
### Configuration
@@ -58,7 +58,7 @@ However it provides a flexible store key configuration through:
5858
Example configuration:
5959

6060
```go reference
61-
https://github.com/cosmos/cosmos-sdk/blob/v0.53.0-rc.2/simapp/app_config.go#L133-L138
61+
https://github.com/cosmos/cosmos-sdk/blob/v0.53.0/simapp/app_config.go#L133-L138
6262
```
6363

6464
## Key Features
@@ -76,7 +76,7 @@ Runtime has built-in support for [`depinject`-enabled modules](../building-modul
7676
Such modules can be registered through the configuration file (often named `app_config.go`), with no additional code required.
7777

7878
```go reference
79-
https://github.com/cosmos/cosmos-sdk/blob/v0.53.0-rc.2/simapp/app_config.go#L210-L216
79+
https://github.com/cosmos/cosmos-sdk/blob/v0.53.0/simapp/app_config.go#L210-L216
8080
```
8181

8282
Additionally, the runtime package facilitates manual module registration through the `RegisterModules` method. This is the primary integration point for modules not registered via configuration.
@@ -98,7 +98,7 @@ These services include `store`, `event manager`, `context`, and `logger`.
9898
Runtime ensures that services are scoped to their respective modules during the wiring process.
9999

100100
```go reference
101-
https://github.com/cosmos/cosmos-sdk/blob/v0.53.0-rc.2/runtime/module.go#L201-L235
101+
https://github.com/cosmos/cosmos-sdk/blob/v0.53.0/runtime/module.go#L201-L235
102102
```
103103

104104
Additionally, runtime provides automatic registration of other essential (i.e., gRPC routes) services available to the App:
@@ -108,15 +108,15 @@ Additionally, runtime provides automatic registration of other essential (i.e.,
108108
* Custom module services
109109

110110
```go reference
111-
https://github.com/cosmos/cosmos-sdk/blob/v0.53.0-rc.2/runtime/builder.go#L52-L54
111+
https://github.com/cosmos/cosmos-sdk/blob/v0.53.0/runtime/builder.go#L52-L54
112112
```
113113

114114
### 4. Application Building
115115

116116
The `AppBuilder` type provides a structured way to build applications:
117117

118118
```go reference
119-
https://github.com/cosmos/cosmos-sdk/blob/v0.53.0-rc.2/runtime/builder.go#L14-L19
119+
https://github.com/cosmos/cosmos-sdk/blob/v0.53.0/runtime/builder.go#L14-L19
120120
```
121121

122122
Key building steps:
@@ -130,7 +130,7 @@ Key building steps:
130130
An application only needs to call `AppBuilder.Build` to create a fully configured application (`runtime.App`).
131131

132132
```go reference
133-
https://github.com/cosmos/cosmos-sdk/blob/v0.53.0-rc.2/runtime/builder.go#L26-L57
133+
https://github.com/cosmos/cosmos-sdk/blob/v0.53.0/runtime/builder.go#L26-L57
134134
```
135135

136136
More information on building applications can be found in the [next section](./02-app-building.md).

docs/build/building-modules/01-module-manager.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Use `module.CoreAppModuleBasicAdaptor` instead for creating an `AppModuleBasic`
6161
The `AppModuleBasic` interface defines the independent methods modules need to implement.
6262

6363
```go reference
64-
https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/types/module/module.go#L56-L66
64+
https://github.com/cosmos/cosmos-sdk/blob/v0.53.0/types/module/module.go#L56-L61
6565
```
6666

6767
* `RegisterLegacyAminoCodec(*codec.LegacyAmino)`: Registers the `amino` codec for the module, which is used to marshal and unmarshal structs to/from `[]byte` in order to persist them in the module's `KVStore`.
@@ -73,7 +73,7 @@ All the `AppModuleBasic` of an application are managed by the [`BasicManager`](#
7373
### `HasName`
7474

7575
```go reference
76-
https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/types/module/module.go#L71-L73
76+
https://github.com/cosmos/cosmos-sdk/blob/v0.53.0/types/module/module.go#L66-L68
7777
```
7878

7979
* `HasName` is an interface that has a method `Name()`. This method returns the name of the module as a `string`.
@@ -87,7 +87,7 @@ For easily creating an `AppModule` that only has genesis functionalities, use `m
8787
#### `module.HasGenesisBasics`
8888

8989
```go reference
90-
https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/types/module/module.go#L76-L79
90+
https://github.com/cosmos/cosmos-sdk/blob/v0.53.0/types/module/module.go#L71-L74
9191
```
9292

9393
Let us go through the methods:
@@ -139,15 +139,15 @@ Previously the `module.AppModule` interface was containing all the methods that
139139
:::
140140

141141
```go reference
142-
https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/types/module/module.go#L195-L199
142+
https://github.com/cosmos/cosmos-sdk/blob/v0.53.0/types/module/module.go#L199-L206
143143
```
144144

145145
### `HasInvariants`
146146

147147
This interface defines one method. It allows to checks if a module can register invariants.
148148

149149
```go reference
150-
https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/types/module/module.go#L202-L205
150+
https://github.com/cosmos/cosmos-sdk/blob/v0.53.0/types/module/module.go#L211-L214
151151
```
152152

153153
* `RegisterInvariants(sdk.InvariantRegistry)`: Registers the [`invariants`](./07-invariants.md) of the module. If an invariant deviates from its predicted value, the [`InvariantRegistry`](./07-invariants.md#registry) triggers appropriate logic (most often the chain will be halted).
@@ -165,7 +165,7 @@ https://github.com/cosmos/cosmos-sdk/blob/6afece6/core/appmodule/module.go#L22-L
165165
#### `module.HasServices`
166166

167167
```go reference
168-
https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/types/module/module.go#L208-L211
168+
https://github.com/cosmos/cosmos-sdk/blob/v0.53.0/types/module/module.go#L217-L220
169169
```
170170

171171
* `RegisterServices(Configurator)`: Allows a module to register services.
@@ -175,7 +175,7 @@ https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/types/module/module.go
175175
This interface defines one method for checking a module consensus version.
176176

177177
```go reference
178-
https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/types/module/module.go#L214-L220
178+
https://github.com/cosmos/cosmos-sdk/blob/v0.53.0/types/module/module.go#L223-L229
179179
```
180180

181181
* `ConsensusVersion() uint64`: Returns the consensus version of the module.
@@ -189,7 +189,7 @@ The `HasPreBlocker` is an extension interface from `appmodule.AppModule`. All mo
189189
The `HasBeginBlocker` is an extension interface from `appmodule.AppModule`. All modules that have an `BeginBlock` method implement this interface.
190190

191191
```go reference
192-
https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/core/appmodule/module.go#L56-L63
192+
https://github.com/cosmos/cosmos-sdk/blob/v0.53.0/core/appmodule/module.go#L73-L80
193193
```
194194

195195
* `BeginBlock(context.Context) error`: This method gives module developers the option to implement logic that is automatically triggered at the beginning of each block.
@@ -199,7 +199,7 @@ https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/core/appmodule/module.
199199
The `HasEndBlocker` is an extension interface from `appmodule.AppModule`. All modules that have an `EndBlock` method implement this interface. If a module need to return validator set updates (staking), they can use `HasABCIEndBlock`
200200

201201
```go reference
202-
https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/core/appmodule/module.go#L66-L72
202+
https://github.com/cosmos/cosmos-sdk/blob/v0.53.0/core/appmodule/module.go#L83-L89
203203
```
204204

205205
* `EndBlock(context.Context) error`: This method gives module developers the option to implement logic that is automatically triggered at the end of each block.
@@ -209,7 +209,7 @@ https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/core/appmodule/module.
209209
The `HasABCIEndBlock` is an extension interface from `module.AppModule`. All modules that have an `EndBlock` which return validator set updates implement this interface.
210210

211211
```go reference
212-
https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/types/module/module.go#L222-L225
212+
https://github.com/cosmos/cosmos-sdk/blob/v0.53.0/types/module/module.go#L236-L239
213213
```
214214

215215
* `EndBlock(context.Context) ([]abci.ValidatorUpdate, error)`: This method gives module developers the option to inform the underlying consensus engine of validator set changes (e.g. the `staking` module).
@@ -219,7 +219,7 @@ https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/types/module/module.go
219219
`HasPrecommit` is an extension interface from `appmodule.AppModule`. All modules that have a `Precommit` method implement this interface.
220220

221221
```go reference
222-
https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/core/appmodule/module.go#L49-L52
222+
https://github.com/cosmos/cosmos-sdk/blob/v0.53.0/core/appmodule/module.go#L50-L53
223223
```
224224

225225
* `Precommit(context.Context)`: This method gives module developers the option to implement logic that is automatically triggered during [`Commit'](../../learn/advanced/00-baseapp.md#commit) of each block using the [`finalizeblockstate`](../../learn/advanced/00-baseapp.md#state-updates) of the block to be committed. Implement empty if no logic needs to be triggered during `Commit` of each block for this module.
@@ -229,7 +229,7 @@ https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/core/appmodule/module.
229229
`HasPrepareCheckState` is an extension interface from `appmodule.AppModule`. All modules that have a `PrepareCheckState` method implement this interface.
230230

231231
```go reference
232-
https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/core/appmodule/module.go#L49-L52
232+
https://github.com/cosmos/cosmos-sdk/blob/v0.53.0/core/appmodule/module.go#L44-L47
233233
```
234234

235235
* `PrepareCheckState(context.Context)`: This method gives module developers the option to implement logic that is automatically triggered during [`Commit'](../../learn/advanced/00-baseapp.md#commit) of each block using the [`checkState`](../../learn/advanced/00-baseapp.md#state-updates) of the next block. Implement empty if no logic needs to be triggered during `Commit` of each block for this module.
@@ -265,7 +265,7 @@ Module managers are used to manage collections of `AppModuleBasic` and `AppModul
265265
The `BasicManager` is a structure that lists all the `AppModuleBasic` of an application:
266266

267267
```go reference
268-
https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/types/module/module.go#L82
268+
https://github.com/cosmos/cosmos-sdk/blob/v0.53.0/types/module/module.go#L77
269269
```
270270

271271
It implements the following methods:
@@ -285,7 +285,7 @@ It implements the following methods:
285285
The `Manager` is a structure that holds all the `AppModule` of an application, and defines the order of execution between several key components of these modules:
286286

287287
```go reference
288-
https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/types/module/module.go#L267-L276
288+
https://github.com/cosmos/cosmos-sdk/blob/v0.53.0/types/module/module.go#L278-L288
289289
```
290290

291291
The module manager is used throughout the application whenever an action on a collection of modules is required. It implements the following methods:
@@ -314,15 +314,15 @@ The module manager is used throughout the application whenever an action on a co
314314
Here's an example of a concrete integration within an `simapp`:
315315

316316
```go reference
317-
https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/simapp/app.go#L411-L434
317+
https://github.com/cosmos/cosmos-sdk/blob/v0.53.0/simapp/app.go#L510-L533
318318
```
319319

320320
This is the same example from `runtime` (the package that powers app di):
321321

322322
```go reference
323-
https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/runtime/module.go#L61
323+
https://github.com/cosmos/cosmos-sdk/blob/v0.53.0/runtime/module.go#L63
324324
```
325325

326326
```go reference
327-
https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/runtime/module.go#L82
327+
https://github.com/cosmos/cosmos-sdk/blob/v0.53.0/runtime/module.go#L85
328328
```

0 commit comments

Comments
 (0)