Skip to content

Commit

Permalink
Upgrade/iavl 1.1.2 (#464)
Browse files Browse the repository at this point in the history
* fix: bump iavl to 1.1.2

* fix: update go modules

* fix: replase cometbft-db with cosmos-db

* feat: prune stores in parallel

* feat: notify the waitGroup if version is not exist

* fix: call compaction

* fix: all tests

* fix: add compaction for goleveldb
  • Loading branch information
0xDevVoyager authored Jun 25, 2024
1 parent 17c04c4 commit 0b908ad
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ require (
filippo.io/edwards25519 v1.0.0 // indirect
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect
github.com/DataDog/zstd v1.5.2 // indirect
github.com/artela-network/aspect-runtime v0.4.7-rc7 // indirect
github.com/aws/aws-sdk-go v1.44.203 // indirect
github.com/beorn7/perks v1.0.1 // indirect
Expand Down Expand Up @@ -220,6 +221,7 @@ retract (
)

replace (
github.com/bytecodealliance/wasmtime-go/v20 => github.com/artela-network/wasmtime-go/v20 v20.0.2
github.com/cometbft/cometbft => ../artela-cometbft
github.com/cosmos/cosmos-db => ../cosmos-db
github.com/cosmos/iavl => ../iavl
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,8 @@ github.com/artela-network/aspect-core v0.4.7-rc7 h1:rTk5Mv1pHt+khhQwkAQZNTBYChJo
github.com/artela-network/aspect-core v0.4.7-rc7/go.mod h1:C/aJERYZ2O3yxAuP6I4gg0I/R3efZSIDt64PMw50Uwo=
github.com/artela-network/aspect-runtime v0.4.7-rc7 h1:CPqrp4Zrm3s6+EvzIvlhid9bqDLGlxWVo8Xg12rgLdY=
github.com/artela-network/aspect-runtime v0.4.7-rc7/go.mod h1:eiBT6JkElkgJNRgRXTOJu/bVS3br+GoqMDv6Gn4a0cU=
github.com/artela-network/wasmtime-go/v20 v20.0.2 h1:miyLlk3+w+5b2LdI0sMpzHiUOFv4O+MzaZjQIg0vqW8=
github.com/artela-network/wasmtime-go/v20 v20.0.2/go.mod h1:Va362hmt7aqwyb2Vu73yHbmx6NkSvGmvHOzJa2xMECQ=
github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A=
github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU=
github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
Expand All @@ -277,8 +279,6 @@ github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOF
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc=
github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA=
github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8=
github.com/bytecodealliance/wasmtime-go/v20 v20.0.0 h1:xO8EMdztxRALMRoru7WCIlr10co225tFFUoJ/Ygzdv4=
github.com/bytecodealliance/wasmtime-go/v20 v20.0.0/go.mod h1:Va362hmt7aqwyb2Vu73yHbmx6NkSvGmvHOzJa2xMECQ=
github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM=
github.com/bytedance/sonic v1.8.0 h1:ea0Xadu+sHlu7x5O3gKhRpQ1IKiMrSiHttPF0ybECuA=
github.com/bytedance/sonic v1.8.0/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U=
Expand Down
4 changes: 4 additions & 0 deletions store/iavl/store_wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ func (s *iavlStoreWrapper) NewBatchWithSize(size int) iavldbm.Batch {
return s.DB.NewBatchWithSize(size)
}

func (s *iavlStoreWrapper) Compaction() {
s.DB.Compaction()
}

func WrapIAVLDB(db dbm.DB) iavldbm.DB {
return &iavlStoreWrapper{db}
}

0 comments on commit 0b908ad

Please sign in to comment.