You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: depinject/README.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -75,7 +75,7 @@ Provider functions serve as the basis for the dependency tree. They are analysed
75
75
76
76
`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.
77
77
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.
79
79
80
80
Consider the following example:
81
81
@@ -177,7 +177,7 @@ When using `depinject.Inject`, the injected types must be pointers.
Copy file name to clipboardExpand all lines: docs/docs/build/building-modules/15-depinject.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -121,4 +121,4 @@ The module is now ready to be used with `depinject` by a chain developer.
121
121
122
122
## Integrate in an application
123
123
124
-
The AppWiring 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 AppWiring 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).
Copy file name to clipboardExpand all lines: docs/docs/learn/advanced/12-simulation.md
+1-8
Original file line number
Diff line number
Diff line change
@@ -35,9 +35,7 @@ failure type:
35
35
inconsistencies between the stores.
36
36
*`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.
37
37
*`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.
41
39
42
40
Each simulation must receive a set of inputs (_i.e_ flags) such as the number of
43
41
blocks that the simulation is run, seed, block size, etc.
@@ -80,15 +78,10 @@ Here are some suggestions when encountering a simulation failure:
80
78
by passing the `-ExportStatePath` flag to the simulator.
81
79
* Use `-Verbose` logs. They could give you a better hint on all the operations
82
80
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`.
86
81
* Try using another `-Seed`. If it can reproduce the same error and if it fails
87
82
sooner, you will spend less time running the simulations.
88
83
* Reduce the `-NumBlocks` . How's the app state at the height previous to the
89
84
failure?
90
-
* Run invariants on every operation with `-SimulateEveryOperation`. _Note_: this
91
-
will slow down your simulation **a lot**.
92
85
* Try adding logs to operations that are not logged. You will have to define a
93
86
[Logger](https://github.com/cosmos/cosmos-sdk/blob/v0.53.0-rc.2/x/staking/keeper/keeper.go#L77-L81) on your `Keeper`.
0 commit comments