Skip to content

Commit 44d0284

Browse files
authored
Problem: ethermint is not updated (#1215)
* Problem: ethermint is not updated * Update CHANGELOG.md Signed-off-by: mmsqe <mavis@crypto.com> * fix lint --------- Signed-off-by: mmsqe <mavis@crypto.com>
1 parent 94b98ed commit 44d0284

File tree

8 files changed

+18
-11
lines changed

8 files changed

+18
-11
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+
- [#1215](https://github.com/crypto-org-chain/cronos/pull/1215) Update ethermint to fix of concurrent write in fee history.
8+
39
*October 17, 2023*
410

511
## v1.1.0-rc1

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ replace (
234234
// TODO: remove it: https://github.com/cosmos/cosmos-sdk/issues/13134
235235
github.com/dgrijalva/jwt-go => github.com/golang-jwt/jwt/v4 v4.4.2
236236
github.com/ethereum/go-ethereum => github.com/evmos/go-ethereum v1.10.26-evmos-rc1
237-
github.com/evmos/ethermint => github.com/crypto-org-chain/ethermint v0.6.1-0.20230925072753-4062d0cc2a32
237+
github.com/evmos/ethermint => github.com/crypto-org-chain/ethermint v0.6.1-0.20231019015135-65c0efeabb62
238238
// Fix upstream GHSA-h395-qcrw-5vmq and GHSA-3vp4-m3rf-835h vulnerabilities.
239239
// TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409
240240
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
@@ -484,8 +484,8 @@ github.com/crypto-org-chain/cometbft-db v0.0.0-20231011055109-57922ac52a63 h1:R1
484484
github.com/crypto-org-chain/cometbft-db v0.0.0-20231011055109-57922ac52a63/go.mod h1:rocwIfnS+kA060x64gkSIRvWB9StSppIkJuo5MWzL24=
485485
github.com/crypto-org-chain/cosmos-sdk v0.46.0-beta2.0.20231013072415-eec017435467 h1:m0/aHPIJAzi2MSP3TXzzbLTFf+koRFQiaYmerRZUtK4=
486486
github.com/crypto-org-chain/cosmos-sdk v0.46.0-beta2.0.20231013072415-eec017435467/go.mod h1:G384omH7cXgm90xXR7xpHvsKG7vdBaDuz4To6GpTHUU=
487-
github.com/crypto-org-chain/ethermint v0.6.1-0.20230925072753-4062d0cc2a32 h1:A++epzNCr3EY57dnU6UTSDwbCiPD6MjvUKHKSd/PoI8=
488-
github.com/crypto-org-chain/ethermint v0.6.1-0.20230925072753-4062d0cc2a32/go.mod h1:wnJQyK4n0vShhL+YIAUd7XCzUhgZ9fgG6yJ14n7qefo=
487+
github.com/crypto-org-chain/ethermint v0.6.1-0.20231019015135-65c0efeabb62 h1:vkDT9v2ozR3Y0AJsrs+r+bTtgs2Kll0sq3Q/ZwXDDoc=
488+
github.com/crypto-org-chain/ethermint v0.6.1-0.20231019015135-65c0efeabb62/go.mod h1:wnJQyK4n0vShhL+YIAUd7XCzUhgZ9fgG6yJ14n7qefo=
489489
github.com/crypto-org-chain/gravity-bridge/module/v2 v2.0.1-0.20230825054824-75403cd90c6e h1:rSTc35OBjjCBx47rHPWBCIHNGPbMnEj8f7fNcK2TjVI=
490490
github.com/crypto-org-chain/gravity-bridge/module/v2 v2.0.1-0.20230825054824-75403cd90c6e/go.mod h1:HBaDqlFjlaXJwVQtA7jHejyaA7xwjXI2o6pU/ccP3tE=
491491
github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4=

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-GgcReGsIIuBE2TabDYqDO9sBGogdVr9RSh4arQzdPnE="
217217
replaced = "github.com/evmos/go-ethereum"
218218
[mod."github.com/evmos/ethermint"]
219-
version = "v0.6.1-0.20230925072753-4062d0cc2a32"
220-
hash = "sha256-8zwdHROHnAVfly2PIaNAfiXfb2fWsTqePaZ58EJtjH4="
219+
version = "v0.6.1-0.20231019015135-65c0efeabb62"
220+
hash = "sha256-0fyozPeRfig2Nalb031GFSpM50jF4qx1qPDDStTubRs="
221221
replaced = "github.com/crypto-org-chain/ethermint"
222222
[mod."github.com/felixge/httpsnoop"]
223223
version = "v1.0.2"

memiavl/db.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ const (
2020
DefaultSnapshotInterval = 1000
2121
LockFileName = "LOCK"
2222
DefaultSnapshotWriterLimit = 4
23+
TmpSuffix = "-tmp"
2324
)
2425

2526
var errReadOnly = errors.New("db is read-only")
@@ -265,7 +266,7 @@ func removeTmpDirs(rootDir string) error {
265266
}
266267

267268
for _, entry := range entries {
268-
if !entry.IsDir() || !strings.HasSuffix(entry.Name(), "-tmp") {
269+
if !entry.IsDir() || !strings.HasSuffix(entry.Name(), TmpSuffix) {
269270
continue
270271
}
271272

@@ -636,7 +637,7 @@ func (db *DB) RewriteSnapshot() error {
636637
}
637638

638639
snapshotDir := snapshotName(db.lastCommitInfo.Version)
639-
tmpDir := snapshotDir + "-tmp"
640+
tmpDir := snapshotDir + TmpSuffix
640641
path := filepath.Join(db.dir, tmpDir)
641642
if err := db.MultiTree.WriteSnapshot(path, db.snapshotWriterPool); err != nil {
642643
return errors.Join(err, os.RemoveAll(path))
@@ -978,7 +979,7 @@ func traverseSnapshots(dir string, ascending bool, callback func(int64) (bool, e
978979

979980
// atomicRemoveDir is equavalent to `mv snapshot snapshot-tmp && rm -r snapshot-tmp`
980981
func atomicRemoveDir(path string) error {
981-
tmpPath := path + "-tmp"
982+
tmpPath := path + TmpSuffix
982983
if err := os.Rename(path, tmpPath); err != nil {
983984
return err
984985
}

memiavl/db_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func TestRemoveSnapshotDir(t *testing.T) {
4545
defer os.RemoveAll(dbDir)
4646

4747
snapshotDir := filepath.Join(dbDir, snapshotName(0))
48-
tmpDir := snapshotDir + "-tmp"
48+
tmpDir := snapshotDir + TmpSuffix
4949
if err := os.MkdirAll(tmpDir, os.ModePerm); err != nil {
5050
t.Fatalf("Failed to create dummy snapshot directory: %v", err)
5151
}

memiavl/import.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func NewMultiTreeImporter(dir string, height uint64) (*MultiTreeImporter, error)
3636
}
3737

3838
func (mti *MultiTreeImporter) tmpDir() string {
39-
return filepath.Join(mti.dir, mti.snapshotDir+"-tmp")
39+
return filepath.Join(mti.dir, mti.snapshotDir+TmpSuffix)
4040
}
4141

4242
func (mti *MultiTreeImporter) Add(item interface{}) error {

x/cronos/keeper/mock/ibckeeper_mock.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ func (i IbcKeeperMock) Transfer(goCtx context.Context, msg *types.MsgTransfer) (
1515
}
1616

1717
func (i IbcKeeperMock) GetDenomTrace(ctx sdk.Context, denomTraceHash tmbytes.HexBytes) (types.DenomTrace, bool) {
18-
if denomTraceHash.String() == "6B5A664BF0AF4F71B2F0BAA33141E2F1321242FBD5D19762F541EC971ACB0865" { //nolint:gosec // test only
18+
if denomTraceHash.String() == "6B5A664BF0AF4F71B2F0BAA33141E2F1321242FBD5D19762F541EC971ACB0865" {
1919
return types.DenomTrace{
2020
Path: "transfer/channel-0",
2121
BaseDenom: "basetcro",

0 commit comments

Comments
 (0)