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: UPGRADING.md
+25-4
Original file line number
Diff line number
Diff line change
@@ -69,20 +69,41 @@ for more info.
69
69
70
70
#### Set PreBlocker
71
71
72
-
**Users using `depinject` / app v2 do not need any changes, this is abstracted for them.**
72
+
A `SetPreBlocker` method has been added to BaseApp. This is essential for BaseApp to run `PreBlock` which runs before begin blocker other modules, and allows to modify consensus parameters, and the changes are visible to the following state machine logics.
73
+
Read more about other use cases [here](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-068-preblock.md).
74
+
75
+
`depinject` / app v2 users need to add `x/upgrade` in their `app_config.go` / `app.yml`:
73
76
74
77
```diff
75
-
+ app.SetPreBlocker(app.PreBlocker)
78
+
+ PreBlockers: []string{
79
+
+ upgradetypes.ModuleName,
80
+
+ },
81
+
BeginBlockers: []string{
82
+
- upgradetypes.ModuleName,
83
+
minttypes.ModuleName,
84
+
}
76
85
```
77
86
87
+
When using (legacy) application wiring, the following must be added to `app.go`:
BaseApp added `SetPreBlocker` for apps. This is essential for BaseApp to run `PreBlock` which runs before begin blocker other modules, and allows to modify consensus parameters, and the changes are visible to the following state machine logics.
85
-
86
107
#### Events
87
108
88
109
The log section of `abci.TxResult` is not populated in the case of successful
0 commit comments