Skip to content

Commit eccfb82

Browse files
authored
feat: use cronos store and rocksdb v9.11.2 (#1200)
* feat: use cronos-store and rocksdb 9.11.2 * update gomod2nix.toml update cronos-store use go_1_24 update nix/sources.json add nix_path update nix/testenv.nix add poetry-lock ci use nixpksg 25.05 nix/rocksdb.nix * fmt nix * remove poetry.lock * revert poetry * update gomod2nix.toml * update nix/rocksdb.nix * add changelog * update rocksdb.nix * fix link * remove nix_path * revert remove nix_path * nix_path use nixos-25.05 * update poetry2nix * fix merge * update go.mod * update gomod2nix.toml
1 parent f73aab5 commit eccfb82

File tree

18 files changed

+107
-100
lines changed

18 files changed

+107
-100
lines changed

.github/workflows/nix.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
submodules: true
2626
- uses: cachix/install-nix-action@fc6e360bedc9ee72d75e701397f0bb30dce77568 # v31.2
2727
with:
28+
nix_path: nixpkgs=channel:nixos-25.05
2829
extra_nix_config: |
2930
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
3031
- uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad # v16
@@ -42,6 +43,7 @@ jobs:
4243
submodules: true
4344
- uses: cachix/install-nix-action@fc6e360bedc9ee72d75e701397f0bb30dce77568 # v31.2
4445
with:
46+
nix_path: nixpkgs=channel:nixos-25.05
4547
extra_nix_config: |
4648
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
4749
- uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad # v16
@@ -106,6 +108,7 @@ jobs:
106108
submodules: true
107109
- uses: cachix/install-nix-action@fc6e360bedc9ee72d75e701397f0bb30dce77568 # v31.2
108110
with:
111+
nix_path: nixpkgs=channel:nixos-25.05
109112
extra_nix_config: |
110113
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
111114
- uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad # v16
@@ -141,6 +144,7 @@ jobs:
141144
submodules: true
142145
- uses: cachix/install-nix-action@fc6e360bedc9ee72d75e701397f0bb30dce77568 # v31.2
143146
with:
147+
nix_path: nixpkgs=channel:nixos-25.05
144148
extra_nix_config: |
145149
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
146150
- uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad # v16
@@ -176,6 +180,7 @@ jobs:
176180
submodules: true
177181
- uses: cachix/install-nix-action@fc6e360bedc9ee72d75e701397f0bb30dce77568 # v31.2
178182
with:
183+
nix_path: nixpkgs=channel:nixos-25.05
179184
extra_nix_config: |
180185
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
181186
- uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad # v16
@@ -211,6 +216,7 @@ jobs:
211216
submodules: true
212217
- uses: cachix/install-nix-action@fc6e360bedc9ee72d75e701397f0bb30dce77568 # v31.2
213218
with:
219+
nix_path: nixpkgs=channel:nixos-25.05
214220
extra_nix_config: |
215221
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
216222
- uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad # v16
@@ -246,6 +252,7 @@ jobs:
246252
submodules: true
247253
- uses: cachix/install-nix-action@fc6e360bedc9ee72d75e701397f0bb30dce77568 # v31.2
248254
with:
255+
nix_path: nixpkgs=channel:nixos-25.05
249256
extra_nix_config: |
250257
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
251258
- uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad # v16
@@ -281,6 +288,7 @@ jobs:
281288
submodules: true
282289
- uses: cachix/install-nix-action@fc6e360bedc9ee72d75e701397f0bb30dce77568 # v31.2
283290
with:
291+
nix_path: nixpkgs=channel:nixos-25.05
284292
extra_nix_config: |
285293
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
286294
- uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad # v16
@@ -316,6 +324,7 @@ jobs:
316324
submodules: true
317325
- uses: cachix/install-nix-action@fc6e360bedc9ee72d75e701397f0bb30dce77568 # v31.2
318326
with:
327+
nix_path: nixpkgs=channel:nixos-25.05
319328
extra_nix_config: |
320329
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
321330
- uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad # v16
@@ -352,6 +361,7 @@ jobs:
352361
submodules: true
353362
- uses: cachix/install-nix-action@fc6e360bedc9ee72d75e701397f0bb30dce77568 # v31.2
354363
with:
364+
nix_path: nixpkgs=channel:nixos-25.05
355365
extra_nix_config: |
356366
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
357367
- uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad # v16

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
- [#1185](https://github.com/crypto-org-chain/chain-main/pull/1185) Error deleting legacy versions bug.
2121
- [#1189](https://github.com/crypto-org-chain/chain-main/pull/1189) versiondb interface missmatch.
2222
- [#1196](https://github.com/crypto-org-chain/chain-main/pull/1196) ci: use golangci-lint run --fix.
23+
- [#1200](https://github.com/crypto-org-chain/chain-main/pull/1200) feat: use cronos store and rocksdb v9.11.2.
2324

2425

2526
*July 9, 2025*

app/app.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ import (
4848
supply "github.com/crypto-org-chain/chain-main/v8/x/supply"
4949
supplykeeper "github.com/crypto-org-chain/chain-main/v8/x/supply/keeper"
5050
supplytypes "github.com/crypto-org-chain/chain-main/v8/x/supply/types"
51-
memiavlstore "github.com/crypto-org-chain/cronos/store"
52-
memiavlrootmulti "github.com/crypto-org-chain/cronos/store/rootmulti"
51+
memiavlstore "github.com/crypto-org-chain/cronos-store/store"
52+
memiavlrootmulti "github.com/crypto-org-chain/cronos-store/store/rootmulti"
5353
"github.com/gorilla/mux"
5454
"github.com/spf13/cast"
5555

@@ -269,7 +269,8 @@ func New(
269269

270270
homePath := cast.ToString(appOpts.Get(flags.FlagHome))
271271
cacheSize := cast.ToInt(appOpts.Get(memiavlstore.FlagCacheSize))
272-
baseAppOptions = memiavlstore.SetupMemIAVL(logger, homePath, appOpts, false, false, cacheSize, baseAppOptions)
272+
chainId := cast.ToString(appOpts.Get(flags.FlagChainID))
273+
baseAppOptions = memiavlstore.SetupMemIAVL(logger, homePath, appOpts, false, false, cacheSize, chainId, baseAppOptions)
273274
// NOTE we use custom transaction decoder that supports the sdk.Tx interface instead of sdk.StdTx
274275
// Setup Mempool and Proposal Handlers
275276
baseAppOptions = append(baseAppOptions, func(app *baseapp.BaseApp) {

app/versiondb.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import (
77
"os"
88
"path/filepath"
99

10-
"github.com/crypto-org-chain/cronos/versiondb"
11-
"github.com/crypto-org-chain/cronos/versiondb/tsrocksdb"
10+
"github.com/crypto-org-chain/cronos-store/versiondb"
11+
"github.com/crypto-org-chain/cronos-store/versiondb/tsrocksdb"
1212

1313
storetypes "cosmossdk.io/store/types"
1414
)

cmd/chain-maind/app/app.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
"github.com/crypto-org-chain/chain-main/v8/app/params"
1717
"github.com/crypto-org-chain/chain-main/v8/config"
1818
chainmaincli "github.com/crypto-org-chain/chain-main/v8/x/chainmain/client/cli"
19-
memiavlcfg "github.com/crypto-org-chain/cronos/store/config"
19+
memiavlcfg "github.com/crypto-org-chain/cronos-store/store/config"
2020
"github.com/imdario/mergo"
2121
"github.com/spf13/cast"
2222
"github.com/spf13/cobra"

cmd/chain-maind/app/versiondb.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88

99
"github.com/crypto-org-chain/chain-main/v8/app"
1010
"github.com/crypto-org-chain/chain-main/v8/cmd/chain-maind/opendb"
11-
versiondbclient "github.com/crypto-org-chain/cronos/versiondb/client"
11+
versiondbclient "github.com/crypto-org-chain/cronos-store/versiondb/client"
1212
"github.com/spf13/cobra"
1313
)
1414

default.nix

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ in
4040
buildGoApplication rec {
4141
pname = "chain-maind";
4242
version = "v7.0.0";
43-
go = buildPackages.go_1_23;
43+
go = buildPackages.go_1_24;
4444
src = lib.cleanSourceWith {
4545
name = "src";
4646
src = lib.sourceByRegex ./. src_regexes;
@@ -58,20 +58,19 @@ buildGoApplication rec {
5858
else
5959
"-lrocksdb -pthread -lstdc++ -ldl"
6060
);
61-
tags =
62-
[
63-
"cgo"
64-
"ledger"
65-
"!test_ledger_mock"
66-
"!ledger_mock"
67-
(if ledger_zemu then "ledger_zemu" else "!ledger_zemu")
68-
network
69-
]
70-
++ lib.optionals (rocksdb != null) [
71-
"rocksdb"
72-
"grocksdb_no_link"
73-
]
74-
++ lib.optionals nativeByteOrder [ "nativebyteorder" ];
61+
tags = [
62+
"cgo"
63+
"ledger"
64+
"!test_ledger_mock"
65+
"!ledger_mock"
66+
(if ledger_zemu then "ledger_zemu" else "!ledger_zemu")
67+
network
68+
]
69+
++ lib.optionals (rocksdb != null) [
70+
"rocksdb"
71+
"grocksdb_no_link"
72+
]
73+
++ lib.optionals nativeByteOrder [ "nativebyteorder" ];
7574
ldflags = ''
7675
-X github.com/cosmos/cosmos-sdk/version.Name=crypto-org-chain
7776
-X github.com/cosmos/cosmos-sdk/version.AppName=${pname}

flake.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
inputs = {
3-
nixpkgs.url = "github:NixOS/nixpkgs/release-24.11";
3+
nixpkgs.url = "github:NixOS/nixpkgs/release-25.05";
44
flake-utils.url = "github:numtide/flake-utils";
55
nix-bundle-exe = {
66
url = "github:3noch/nix-bundle-exe";

go.mod

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ require (
2424
github.com/cosmos/gogoproto v1.7.0
2525
github.com/cosmos/ibc-go/v10 v10.1.1
2626
github.com/cosmos/rosetta v0.50.3-1
27-
github.com/crypto-org-chain/cronos/store v0.0.5-0.20240716081818-7f581a697f6d
28-
github.com/crypto-org-chain/cronos/versiondb v0.0.0-20240716081818-7f581a697f6d
27+
github.com/crypto-org-chain/cronos-store/store v0.0.0-20250912125026-c998a90e2881
28+
github.com/crypto-org-chain/cronos-store/versiondb v0.0.0-20250912125026-c998a90e2881
2929
github.com/golang/protobuf v1.5.4
3030
github.com/google/renameio v1.0.0
3131
github.com/gorilla/mux v1.8.1
3232
github.com/grpc-ecosystem/grpc-gateway v1.16.0
3333
github.com/hashicorp/go-metrics v0.5.3 // indirect
3434
github.com/imdario/mergo v0.3.13
35-
github.com/linxGnu/grocksdb v1.9.2
35+
github.com/linxGnu/grocksdb v1.9.10-0.20250331012329-9d5f074653d1
3636
github.com/spf13/cast v1.7.1
3737
github.com/spf13/cobra v1.9.1
3838
github.com/spf13/pflag v1.0.6
@@ -80,13 +80,12 @@ require (
8080
github.com/cosmos/go-bip39 v1.0.0 // indirect
8181
github.com/cosmos/gogogateway v1.2.0 // indirect
8282
github.com/cosmos/iavl v1.2.2 // indirect
83-
github.com/cosmos/ibc-go/modules/capability v1.0.0 // indirect
8483
github.com/cosmos/ics23/go v0.11.0 // indirect
8584
github.com/cosmos/ledger-cosmos-go v0.14.0 // indirect
8685
github.com/cosmos/rosetta-sdk-go v0.10.0 // indirect
8786
github.com/creachadair/atomicfile v0.3.1 // indirect
8887
github.com/creachadair/tomledit v0.0.24 // indirect
89-
github.com/crypto-org-chain/cronos/memiavl v0.0.5-0.20231225065237-42f2597fca49 // indirect
88+
github.com/crypto-org-chain/cronos-store/memiavl v0.0.4 // indirect
9089
github.com/danieljoos/wincred v1.2.1 // indirect
9190
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
9291
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 // indirect
@@ -222,11 +221,7 @@ require (
222221
sigs.k8s.io/yaml v1.4.0 // indirect
223222
)
224223

225-
replace (
226-
github.com/crypto-org-chain/cronos/memiavl => github.com/crypto-org-chain/cronos/memiavl v0.0.5-0.20241028093154-0f94930c27ce
227-
github.com/crypto-org-chain/cronos/store => github.com/crypto-org-chain/cronos/store v0.0.5-0.20241028093154-0f94930c27ce
228-
github.com/crypto-org-chain/cronos/versiondb => github.com/crypto-org-chain/cronos/versiondb v0.0.0-20241028093154-0f94930c27ce
229-
)
224+
replace github.com/crypto-org-chain/cronos-store/memiavl => github.com/crypto-org-chain/cronos-store/memiavl v0.0.0-20250912125026-c998a90e2881
230225

231226
replace (
232227
// use cosmos fork of keyring

0 commit comments

Comments
 (0)