Skip to content

Commit 6e032fd

Browse files
committed
update memival,store,versondb
related prs crypto-org-chain/cronos#1684 crypto-org-chain/cronos#1685 crypto-org-chain/cronos#1688 (not include versionDB.SetSkipVersionZero(true) in app.go) crypto-org-chain/cronos#1751 crypto-org-chain/cronos#1759 (notice not include cronos storeloader and upgrades) crypto-org-chain/cronos#1780
1 parent 9742a73 commit 6e032fd

File tree

3 files changed

+30
-15
lines changed

3 files changed

+30
-15
lines changed

app/app.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,11 @@ func New(
758758
app.qms = qms.(RootMultiStore)
759759
}
760760

761+
var qmsVersion int64
762+
if app.qms != nil {
763+
qmsVersion = app.qms.LatestVersion()
764+
}
765+
761766
// initialize BaseApp
762767
app.SetInitChainer(app.InitChainer)
763768
app.SetPreBlocker(app.PreBlocker)
@@ -803,6 +808,16 @@ func New(
803808
tmos.Exit(err.Error())
804809
}
805810

811+
if qmsVersion > 0 {
812+
// it should not happen since we constrained the loaded iavl version to not exceed the versiondb version,
813+
// still keep the check for safety.
814+
iavlVersion := app.LastBlockHeight()
815+
if qmsVersion < iavlVersion {
816+
// try to prevent gap being created in versiondb
817+
tmos.Exit(fmt.Sprintf("versiondb version %d lag behind iavl version %d", qmsVersion, iavlVersion))
818+
}
819+
}
820+
806821
if app.qms != nil {
807822
v1 := app.qms.LatestVersion()
808823
v2 := app.LastBlockHeight()

go.mod

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ require (
2727
github.com/cosmos/ibc-go/modules/capability v1.0.1
2828
github.com/cosmos/ibc-go/v8 v8.7.0
2929
github.com/cosmos/rosetta v0.50.3-1
30-
github.com/crypto-org-chain/cronos/store v0.0.5-0.20240716081818-7f581a697f6d
31-
github.com/crypto-org-chain/cronos/versiondb v0.0.0-20240716081818-7f581a697f6d
30+
github.com/crypto-org-chain/cronos/store v0.0.5-0.20250409015923-3701cc2d7cf8
31+
github.com/crypto-org-chain/cronos/versiondb v0.0.0-20250409015923-3701cc2d7cf8
3232
github.com/golang/protobuf v1.5.4
3333
github.com/google/renameio v1.0.0
3434
github.com/gorilla/mux v1.8.1
3535
github.com/grpc-ecosystem/grpc-gateway v1.16.0
3636
github.com/hashicorp/go-metrics v0.5.3
3737
github.com/imdario/mergo v0.3.13
38-
github.com/linxGnu/grocksdb v1.9.2
38+
github.com/linxGnu/grocksdb v1.9.10-0.20250331012329-9d5f074653d1
3939
github.com/spf13/cast v1.7.1
4040
github.com/spf13/cobra v1.8.1
4141
github.com/spf13/pflag v1.0.5
@@ -87,7 +87,7 @@ require (
8787
github.com/cosmos/rosetta-sdk-go v0.10.0 // indirect
8888
github.com/creachadair/atomicfile v0.3.1 // indirect
8989
github.com/creachadair/tomledit v0.0.24 // indirect
90-
github.com/crypto-org-chain/cronos/memiavl v0.0.5-0.20231225065237-42f2597fca49 // indirect
90+
github.com/crypto-org-chain/cronos/memiavl v0.0.5-0.20250409015923-3701cc2d7cf8 // indirect
9191
github.com/danieljoos/wincred v1.1.2 // indirect
9292
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
9393
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect
@@ -221,9 +221,9 @@ require (
221221
)
222222

223223
replace (
224-
github.com/crypto-org-chain/cronos/memiavl => github.com/crypto-org-chain/cronos/memiavl v0.0.5-0.20241028093154-0f94930c27ce
225-
github.com/crypto-org-chain/cronos/store => github.com/crypto-org-chain/cronos/store v0.0.5-0.20241028093154-0f94930c27ce
226-
github.com/crypto-org-chain/cronos/versiondb => github.com/crypto-org-chain/cronos/versiondb v0.0.0-20241028093154-0f94930c27ce
224+
github.com/crypto-org-chain/cronos/memiavl => github.com/crypto-org-chain/cronos/memiavl v0.0.5-0.20250409015923-3701cc2d7cf8
225+
github.com/crypto-org-chain/cronos/store => github.com/crypto-org-chain/cronos/store v0.0.5-0.20250409015923-3701cc2d7cf8
226+
github.com/crypto-org-chain/cronos/versiondb => github.com/crypto-org-chain/cronos/versiondb v0.0.0-20250409015923-3701cc2d7cf8
227227
)
228228

229229
replace (

go.sum

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -455,12 +455,12 @@ github.com/creachadair/tomledit v0.0.24 h1:5Xjr25R2esu1rKCbQEmjZYlrhFkDspoAbAKb6
455455
github.com/creachadair/tomledit v0.0.24/go.mod h1:9qHbShRWQzSCcn617cMzg4eab1vbLCOjOshAWSzWr8U=
456456
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
457457
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
458-
github.com/crypto-org-chain/cronos/memiavl v0.0.5-0.20241028093154-0f94930c27ce h1:yRF9Zsk4fzVBhBQEjkA4oE+Q3Q/Kgaj/UX4gK+xwaAs=
459-
github.com/crypto-org-chain/cronos/memiavl v0.0.5-0.20241028093154-0f94930c27ce/go.mod h1:IyRvgFKOQPC/Qdx543PGl6WgeDOU+hWdv+xLz3stotc=
460-
github.com/crypto-org-chain/cronos/store v0.0.5-0.20241028093154-0f94930c27ce h1:g6ltW2J6W10pp8poYCfjUwVkzHy2izh7/71EvUXRgjM=
461-
github.com/crypto-org-chain/cronos/store v0.0.5-0.20241028093154-0f94930c27ce/go.mod h1:p+VxW2n9j8ojLreWScnqoDHyxGPRjI0ytkMMG5xh9o0=
462-
github.com/crypto-org-chain/cronos/versiondb v0.0.0-20241028093154-0f94930c27ce h1:d2TZ+oXM6+qpQhM0800lUKrK5p/BmcDXUi1/Xo2LIho=
463-
github.com/crypto-org-chain/cronos/versiondb v0.0.0-20241028093154-0f94930c27ce/go.mod h1:Y1uyFhZn/8jZkZfr3W/alzrO3DfcfWPuA3UwCM0Ah0g=
458+
github.com/crypto-org-chain/cronos/memiavl v0.0.5-0.20250409015923-3701cc2d7cf8 h1:HxE64dMQ/jjJbPzm3ZlVaOF+5jcMOo+F0JtFTFdBRC0=
459+
github.com/crypto-org-chain/cronos/memiavl v0.0.5-0.20250409015923-3701cc2d7cf8/go.mod h1:V5uYJTUfFmRQzo2PjqSVnEqUR2M68tJTJr8Y1GjpkdM=
460+
github.com/crypto-org-chain/cronos/store v0.0.5-0.20250409015923-3701cc2d7cf8 h1:WT2Fg0kMtgn/NNYRqKbsvLU6fpHHxUezUqkiI1Cbj3U=
461+
github.com/crypto-org-chain/cronos/store v0.0.5-0.20250409015923-3701cc2d7cf8/go.mod h1:V3ghu49oCqjJdsalwZiHZ0zzRzcB/d0fWlZId+cR5h4=
462+
github.com/crypto-org-chain/cronos/versiondb v0.0.0-20250409015923-3701cc2d7cf8 h1:v+lHWq+af/cvK4VxU1SUqZhOrWiDmqoa3FQ6ntL9G1U=
463+
github.com/crypto-org-chain/cronos/versiondb v0.0.0-20250409015923-3701cc2d7cf8/go.mod h1:RYy4Qwt9CMVymh/vAevFgia3F3XOPrVoIhCiwyFMkhI=
464464
github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4=
465465
github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0=
466466
github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0=
@@ -935,8 +935,8 @@ github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw=
935935
github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
936936
github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM=
937937
github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4=
938-
github.com/linxGnu/grocksdb v1.9.2 h1:O3mzvO0wuzQ9mtlHbDrShixyVjVbmuqTjFrzlf43wZ8=
939-
github.com/linxGnu/grocksdb v1.9.2/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA=
938+
github.com/linxGnu/grocksdb v1.9.10-0.20250331012329-9d5f074653d1 h1:vN+8kgA6qUlVUiU9qs5h0LqObXInjdnzM8XxLPUpF3g=
939+
github.com/linxGnu/grocksdb v1.9.10-0.20250331012329-9d5f074653d1/go.mod h1:C3CNe9UYc9hlEM2pC82AqiGS3LRW537u9LFV4wIZuHk=
940940
github.com/lucasjones/reggen v0.0.0-20180717132126-cdb49ff09d77/go.mod h1:5ELEyG+X8f+meRWHuqUOewBOhvHkl7M76pdGEansxW4=
941941
github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ=
942942
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=

0 commit comments

Comments
 (0)