Skip to content

Commit 36e90bb

Browse files
authored
chore: fixes from diff review (#24595)
1 parent d12df80 commit 36e90bb

File tree

10 files changed

+8
-36
lines changed

10 files changed

+8
-36
lines changed

depinject/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Provider functions serve as the basis for the dependency tree. They are analysed
7575

7676
`depinject` supports the use of interface types as inputs to provider functions, which helps decouple dependencies between modules. This approach is particularly useful for managing complex systems with multiple modules, such as the Cosmos SDK, where dependencies need to be flexible and maintainable.
7777

78-
For example, `x/bank` expects an [AccountKeeper](https://pkg.go.dev/cosmossdk.io/x/bank/types#AccountKeeper) interface as [input to ProvideModule](https://github.com/cosmos/cosmos-sdk/tree/release/v0.50.x/x/bank/module.go#L208-L260). `SimApp` uses the implementation in `x/auth`, but the modular design allows for easy changes to the implementation if needed.
78+
For example, `x/bank` expects an [AccountKeeper](https://pkg.go.dev/github.com/cosmos/cosmos-sdk/x/bank/types#AccountKeeper) interface as [input to ProvideModule](https://github.com/cosmos/cosmos-sdk/tree/release/v0.50.x/x/bank/module.go#L208-L260). `SimApp` uses the implementation in `x/auth`, but the modular design allows for easy changes to the implementation if needed.
7979

8080
Consider the following example:
8181

@@ -177,7 +177,7 @@ When using `depinject.Inject`, the injected types must be pointers.
177177
:::
178178

179179
```go reference
180-
https://github.com/cosmos/cosmos-sdk/blob/v0.52.0-beta.2/simapp/app_di.go#L187-L206
180+
https://github.com/cosmos/cosmos-sdk/blob/v0.53.0/simapp/app_di.go#L165-L188
181181
```
182182

183183
## Debugging

docs/.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ docs/docs/tooling/03-hubl.md
2121
docs/docs/core/17-autocli.md
2222
docs/docs/packages/01-depinject.md
2323
docs/docs/packages/02-collections.md
24-
docs/user/run-node/04-rosetta.md
2524
docs/build/migrations/02-upgrading.md
2625
docs/learn/advanced/17-autocli.md
2726

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

+3-3
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/docs/build/building-modules/15-depinject.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,4 +121,4 @@ The module is now ready to be used with `depinject` by a chain developer.
121121

122122
## Integrate in an application
123123

124-
The App Wiring is done in `app_config.go` / `app.yaml` and `app_v2.go` and is explained in detail in the [overview of `app_v2.go`](../building-apps/01-app-go-di.md).
124+
The App Wiring is done in `app_config.go` / `app.yaml` and `app_di.go` and is explained in detail in the [overview of `app_di.go`](../building-apps/01-app-go-di.md).

docs/docs/build/tooling/README.md

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ This includes tools for development, operating a node, and ease of use of a Cosm
1111

1212
* [Cosmovisor](./01-cosmovisor.md)
1313
* [Confix](./02-confix.md)
14-
* [Rosetta](https://docs.cosmos.network/main/run-node/rosetta)
1514

1615
## Other Tools
1716

docs/docs/learn/advanced/12-simulation.md

+1-8
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@ failure type:
3535
inconsistencies between the stores.
3636
* `AppSimulationAfterImport`: Queues two simulations together. The first one provides the app state (_i.e_ genesis) to the second. Useful to test software upgrades or hard-forks from a live chain.
3737
* `AppStateDeterminism`: Checks that all the nodes return the same values, in the same order.
38-
* `BenchmarkInvariants`: Analysis of the performance of running all modules' invariants (_i.e_ sequentially runs a [benchmark](https://pkg.go.dev/testing/#hdr-Benchmarks) test). An invariant checks for
39-
differences between the values that are on the store and the passive tracker. Eg: total coins held by accounts vs total supply tracker.
40-
* `FullAppSimulation`: General simulation mode. Runs the chain and the specified operations for a given number of blocks. Tests that there're no `panics` on the simulation. It does also run invariant checks on every `Period` but they are not benchmarked.
38+
* `FullAppSimulation`: General simulation mode. Runs the chain and the specified operations for a given number of blocks. Tests that there're no `panics` on the simulation.
4139

4240
Each simulation must receive a set of inputs (_i.e_ flags) such as the number of
4341
blocks that the simulation is run, seed, block size, etc.
@@ -80,15 +78,10 @@ Here are some suggestions when encountering a simulation failure:
8078
by passing the `-ExportStatePath` flag to the simulator.
8179
* Use `-Verbose` logs. They could give you a better hint on all the operations
8280
involved.
83-
* Reduce the simulation `-Period`. This will run the invariants checks more
84-
frequently.
85-
* Print all the failed invariants at once with `-PrintAllInvariants`.
8681
* Try using another `-Seed`. If it can reproduce the same error and if it fails
8782
sooner, you will spend less time running the simulations.
8883
* Reduce the `-NumBlocks` . How's the app state at the height previous to the
8984
failure?
90-
* Run invariants on every operation with `-SimulateEveryOperation`. _Note_: this
91-
will slow down your simulation **a lot**.
9285
* Try adding logs to operations that are not logged. You will have to define a
9386
[Logger](https://github.com/cosmos/cosmos-sdk/blob/v0.53.0-rc.2/x/staking/keeper/keeper.go#L77-L81) on your `Keeper`.
9487

docs/post.sh

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ rm -rf docs/build/tooling/03-hubl.md
77
rm -rf docs/build/packages/01-depinject.md
88
rm -rf docs/build/packages/02-collections.md
99
rm -rf docs/learn/advaced-concepts/17-autocli.md
10-
rm -rf docs/user/run-node/04-rosetta.md
1110
rm -rf docs/build/architecture
1211
rm -rf docs/build/spec
1312
rm -rf docs/build/rfc

docs/pre.sh

-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ cat ../x/README.md | sed 's/\.\.\/docs\/build\/building-modules\/README\.md/\/bu
2525
## Add tooling documentation
2626
cp ../tools/cosmovisor/README.md ./docs/build/tooling/01-cosmovisor.md
2727
cp ../tools/confix/README.md ./docs/build/tooling/02-confix.md
28-
wget -O docs/user/run-node/04-rosetta.md https://raw.githubusercontent.com/cosmos/rosetta/main/README.md
2928

3029
## Add package documentation
3130
cp ../client/v2/README.md ./docs/learn/advanced/17-autocli.md

math/sonar-project.properties

-16
This file was deleted.

store/go.mod

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ require (
88
cosmossdk.io/math v1.5.3
99
github.com/cometbft/cometbft v0.38.17
1010
github.com/cosmos/cosmos-db v1.1.1
11+
github.com/cosmos/cosmos-proto v1.0.0-beta.5
1112
github.com/cosmos/gogoproto v1.7.0
1213
github.com/cosmos/iavl v1.2.0
1314
github.com/cosmos/ics23/go v0.11.0
@@ -26,8 +27,6 @@ require (
2627
gotest.tools/v3 v3.5.2
2728
)
2829

29-
require github.com/cosmos/cosmos-proto v1.0.0-beta.5
30-
3130
require (
3231
github.com/DataDog/zstd v1.5.6 // indirect
3332
github.com/beorn7/perks v1.0.1 // indirect

0 commit comments

Comments
 (0)