Skip to content

Commit a300760

Browse files
mmsqeHuangYi
andauthored
Problem: ethermint is outdated (#1363)
* Problem: ethermint is outdated * changelog --------- Co-authored-by: HuangYi <huang@crypto.com>
1 parent 10b8eeb commit a300760

File tree

7 files changed

+17
-13
lines changed

7 files changed

+17
-13
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## UNRELEASED
4+
5+
### Bug Fixes
6+
7+
- [#1363](https://github.com/crypto-org-chain/cronos/pull/1363) Update ethermint to fix a panic on overflow and patch gasUsed in the RPC API.
8+
39
*March 26, 2024*
410

511
## v1.1.1

app/app.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import (
1515

1616
autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
1717
reflectionv1 "cosmossdk.io/api/cosmos/reflection/v1"
18-
appparams "cosmossdk.io/simapp/params"
1918
runtimeservices "github.com/cosmos/cosmos-sdk/runtime/services"
2019
"golang.org/x/exp/slices"
2120

@@ -376,7 +375,7 @@ type App struct {
376375
// NewSimApp returns a reference to an initialized SimApp.
377376
func New(
378377
logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest, skipGravity bool, skipUpgradeHeights map[int64]bool,
379-
homePath string, invCheckPeriod uint, encodingConfig appparams.EncodingConfig,
378+
homePath string, invCheckPeriod uint, encodingConfig ethermint.EncodingConfig,
380379
// this line is used by starport scaffolding # stargate/app/newArgument
381380
appOpts servertypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp),
382381
) *App {

app/encoding.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
package app
22

33
import (
4-
"cosmossdk.io/simapp/params"
54
evmenc "github.com/evmos/ethermint/encoding"
5+
ethermint "github.com/evmos/ethermint/types"
66
)
77

88
// MakeEncodingConfig creates the EncodingConfig for cronos chain
9-
func MakeEncodingConfig() params.EncodingConfig {
9+
func MakeEncodingConfig() ethermint.EncodingConfig {
1010
return evmenc.MakeConfig(ModuleBasics)
1111
}

cmd/cronosd/cmd/root.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"io"
66
"os"
77

8-
"cosmossdk.io/simapp/params"
98
"github.com/cosmos/cosmos-sdk/server"
109
"github.com/cosmos/cosmos-sdk/types/module"
1110

@@ -56,7 +55,7 @@ const SkipGravity = true
5655

5756
// NewRootCmd creates a new root command for simd. It is called once in the
5857
// main function.
59-
func NewRootCmd() (*cobra.Command, params.EncodingConfig) {
58+
func NewRootCmd() (*cobra.Command, ethermint.EncodingConfig) {
6059
// Set config for prefixes
6160
app.SetConfig()
6261

@@ -110,7 +109,7 @@ func NewRootCmd() (*cobra.Command, params.EncodingConfig) {
110109
return rootCmd, encodingConfig
111110
}
112111

113-
func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) {
112+
func initRootCmd(rootCmd *cobra.Command, encodingConfig ethermint.EncodingConfig) {
114113
cfg := sdk.GetConfig()
115114
cfg.Seal()
116115

@@ -235,7 +234,7 @@ func initAppConfig() (string, interface{}) {
235234
}
236235

237236
type appCreator struct {
238-
encCfg params.EncodingConfig
237+
encCfg ethermint.EncodingConfig
239238
}
240239

241240
// newApp is an AppCreator

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ replace (
239239
// TODO: remove it: https://github.com/cosmos/cosmos-sdk/issues/13134
240240
github.com/dgrijalva/jwt-go => github.com/golang-jwt/jwt/v4 v4.4.2
241241
github.com/ethereum/go-ethereum => github.com/crypto-org-chain/go-ethereum v1.10.20-0.20231207063621-43cf32d91c3e
242-
github.com/evmos/ethermint => github.com/crypto-org-chain/ethermint v0.6.1-0.20240305041633-5b153a460e7a
242+
github.com/evmos/ethermint => github.com/crypto-org-chain/ethermint v0.6.1-0.20240326012741-6263a240556c
243243
// Fix upstream GHSA-h395-qcrw-5vmq and GHSA-3vp4-m3rf-835h vulnerabilities.
244244
// TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409
245245
github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -488,8 +488,8 @@ github.com/crypto-org-chain/cometbft-db v0.0.0-20231011055109-57922ac52a63 h1:R1
488488
github.com/crypto-org-chain/cometbft-db v0.0.0-20231011055109-57922ac52a63/go.mod h1:rocwIfnS+kA060x64gkSIRvWB9StSppIkJuo5MWzL24=
489489
github.com/crypto-org-chain/cosmos-sdk v0.46.0-beta2.0.20240228013111-9bd1e035ed1d h1:ihUBUAEwQYHZEqf7lXrJithNCUJTjB8q3oSQA6Nevco=
490490
github.com/crypto-org-chain/cosmos-sdk v0.46.0-beta2.0.20240228013111-9bd1e035ed1d/go.mod h1:cmAawe8FV/52oPKbgeHLt4UpNkrNu8R5KD+kw0kxJFc=
491-
github.com/crypto-org-chain/ethermint v0.6.1-0.20240305041633-5b153a460e7a h1:on3vlgLb4BdkojU5Umbh6bvXVtGc/s+jFLkGHG4f8Mk=
492-
github.com/crypto-org-chain/ethermint v0.6.1-0.20240305041633-5b153a460e7a/go.mod h1:T3Tkhw8XMu8rYObcXpeTqGUaKogS+DKsGPD3ulHN/mg=
491+
github.com/crypto-org-chain/ethermint v0.6.1-0.20240326012741-6263a240556c h1:3VKwgmkb/CnjHT8v6bwMl70ferUVLcrefEpQc9Q8/F0=
492+
github.com/crypto-org-chain/ethermint v0.6.1-0.20240326012741-6263a240556c/go.mod h1:zJYmx1D+tDggzvXmdJ0/I62TeIykdCMfJBjBxOcniAU=
493493
github.com/crypto-org-chain/go-ethereum v1.10.20-0.20231207063621-43cf32d91c3e h1:vnyepPQ/m25+19xcTuBUdRxmltZ/EjVWNqEjhg7Ummk=
494494
github.com/crypto-org-chain/go-ethereum v1.10.20-0.20231207063621-43cf32d91c3e/go.mod h1:+a8pUj1tOyJ2RinsNQD4326YS+leSoKGiG/uVVb0x6Y=
495495
github.com/crypto-org-chain/gravity-bridge/module/v2 v2.0.1-0.20230825054824-75403cd90c6e h1:rSTc35OBjjCBx47rHPWBCIHNGPbMnEj8f7fNcK2TjVI=

gomod2nix.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ schema = 3
216216
hash = "sha256-lDIqRLUrXYCb9mmFBY/+WW+ee69+IkxOgqjHVyo4ij0="
217217
replaced = "github.com/crypto-org-chain/go-ethereum"
218218
[mod."github.com/evmos/ethermint"]
219-
version = "v0.6.1-0.20240305041633-5b153a460e7a"
220-
hash = "sha256-7g+DEeJ3iKzCMircdljYiy6uQNJNwEky7gJ+ZuA6CB4="
219+
version = "v0.6.1-0.20240326012741-6263a240556c"
220+
hash = "sha256-MgvJ9Z0zl+oZtMmbSAlqaibQvzKqEvM1016uF9GEHXI="
221221
replaced = "github.com/crypto-org-chain/ethermint"
222222
[mod."github.com/felixge/httpsnoop"]
223223
version = "v1.0.2"

0 commit comments

Comments
 (0)