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: docs/migrations/v0.4.0_to_v0.5.0.md
+93-59Lines changed: 93 additions & 59 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,9 +77,35 @@ following list includes references within `evmd` that have been moved.
77
77
78
78
### Mempool
79
79
80
-
#### Minimal setups: nothing to change
80
+
#### Custom initializer
81
81
82
-
If you use the default mempool wiring (no custom pools), your existing code continues to work. If `BlockGasLimit` is 0, it defaults to `100_000_000`. If `BroadCastTxFn` is not set, it's also set to a default value.
82
+
The mempool configuration can now be handled by a helper function. If you prefer to use the configuration from `app.toml` and CLI flags, you can refactor your mempool setup:
-**After**: Using helper function (optional). See https://github.com/cosmos/evm/blob/42e1141c9b00432020e69945e565f60f80ab501d/evmd/mempool.go for the reference implementation
panic(fmt.Sprintf("failed to configure EVM mempool: %s", err.Error()))
100
+
}
101
+
```
102
+
103
+
The helper function reads configuration from `appOpts` or applies defaults if omitted. Note that `NewExperimentalEVMMempool` now takes an additional `cosmosPoolMaxTx` parameter, with a recommended default value being `4096` or `0` (uncapped).
104
+
105
+
106
+
#### Simple config migration
107
+
108
+
If `BlockGasLimit` is 0, it defaults to `100_000_000`. If `BroadCastTxFn` is not set, it's also set to a default value.
83
109
84
110
```go
85
111
mempoolConfig:= &evmmempool.EVMMempoolConfig{
@@ -183,40 +209,35 @@ These options can also be set via CLI flags:
183
209
184
210
A new flag `--mempool.max-txs` allows limiting the maximum number of transactions in the Cosmos mempool. Set to 0 or -1 for unbounded (default: 0).
185
211
186
-
##### Simplified Mempool Setup
187
-
188
-
The mempool configuration can now be handled by a helper function. If you prefer to use the configuration from `app.toml` and CLI flags, you can refactor your mempool setup:
212
+
The function signature for `NewExperimentalEVMMempool` also changed to add a cosmosPoolMaxTx field:
panic(fmt.Sprintf("failed to configure EVM mempool: %s", err.Error()))
206
-
}
207
225
```
208
226
209
-
The helper function reads configuration from `appOpts` and applies defaults where needed. Note that `NewExperimentalEVMMempool` now takes an additional `cosmosPoolMaxTx` parameter.
210
-
211
-
### Default Precompiles
227
+
#### EVM Chain ID
212
228
213
-
Default precompiles have been moved to `/evm/precompiles/types/defaults.go` and the function name was
214
-
changed to `DefaultStaticPrecompiles`. The function signature has also changed, and now takes pointers
215
-
as inputs for the `Erc20Keeper` and `TransferKeeper`. Finally, the `WithStaticPrecompiles` builder
216
-
function can now happen *alongside the keeper instantiation*, and not after. The new wiring is shown below:
229
+
The EVM chain ID is now retrieved directly from `appOpts` instead of being passed as a parameter. In `app.go`, the chain ID is obtained using:
0 commit comments