Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem: production rocksdb configuration is not optimal #813

Merged
merged 11 commits into from
Jan 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 1 addition & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ GOPATH ?= $(shell $(GO) env GOPATH)
BINDIR ?= ~/go/bin
NETWORK ?= mainnet
LEDGER_ENABLED ?= true
# RocksDB is a native dependency, so we don't assume the library is installed.
# Instead, it must be explicitly enabled and we warn when it is not.
ENABLE_ROCKSDB ?= false
PROJECT_NAME = $(shell git remote get-url origin | xargs basename -s .git)

TESTNET_FLAGS ?=
Expand Down Expand Up @@ -47,13 +44,6 @@ ifeq ($(LEDGER_ENABLED),true)
endif
endif

ifeq ($(ENABLE_ROCKSDB),true)
BUILD_TAGS += rocksdb_build
test_tags += rocksdb_build
else
$(warning RocksDB support is disabled; to build and test with RocksDB support, set ENABLE_ROCKSDB=true)
endif

# DB backend selection
ifeq (cleveldb,$(findstring cleveldb,$(COSMOS_BUILD_OPTIONS)))
BUILD_TAGS += gcc
Expand All @@ -63,11 +53,8 @@ ifeq (badgerdb,$(findstring badgerdb,$(COSMOS_BUILD_OPTIONS)))
endif
# handle rocksdb
ifeq (rocksdb,$(findstring rocksdb,$(COSMOS_BUILD_OPTIONS)))
ifneq ($(ENABLE_ROCKSDB),true)
$(error Cannot use RocksDB backend unless ENABLE_ROCKSDB=true)
endif
CGO_ENABLED=1
BUILD_TAGS += rocksdb
BUILD_TAGS += rocksdb grocksdb_clean_link
endif
# handle boltdb
ifeq (boltdb,$(findstring boltdb,$(COSMOS_BUILD_OPTIONS)))
Expand Down
15 changes: 15 additions & 0 deletions cmd/cronosd/cmd/open_db.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//go:build !rocksdb
// +build !rocksdb

package cmd

import (
"path/filepath"

dbm "github.com/tendermint/tm-db"
)

func openDB(rootDir string, backendType dbm.BackendType) (dbm.DB, error) {
dataDir := filepath.Join(rootDir, "data")
return dbm.NewDB("application", backendType, dataDir)
}
74 changes: 74 additions & 0 deletions cmd/cronosd/cmd/open_db_rocksdb.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
//go:build rocksdb
// +build rocksdb

package cmd

import (
"path/filepath"
"runtime"

"github.com/linxGnu/grocksdb"
dbm "github.com/tendermint/tm-db"
)

func openDB(rootDir string, backendType dbm.BackendType) (dbm.DB, error) {
dataDir := filepath.Join(rootDir, "data")
if backendType == dbm.RocksDBBackend {
// customize rocksdb options
db, err := grocksdb.OpenDb(newRocksdbOptions(), filepath.Join(dataDir, "application.db"))
if err != nil {
return nil, err
}
ro := grocksdb.NewDefaultReadOptions()
wo := grocksdb.NewDefaultWriteOptions()
woSync := grocksdb.NewDefaultWriteOptions()
woSync.SetSync(true)
return dbm.NewRocksDBWithRawDB(db, ro, wo, woSync), nil
} else {
return dbm.NewDB("application", backendType, dataDir)
}
}

func newRocksdbOptions() *grocksdb.Options {
opts := grocksdb.NewDefaultOptions()
opts.SetCreateIfMissing(true)
opts.IncreaseParallelism(runtime.NumCPU())
opts.OptimizeLevelStyleCompaction(512 * 1024 * 1024)
opts.SetTargetFileSizeMultiplier(2)

// block based table options
bbto := grocksdb.NewDefaultBlockBasedTableOptions()

// 1G block cache
bbto.SetBlockCache(grocksdb.NewLRUCache(1 << 30))

// larger block means smaller index and better compression ratio.
bbto.SetBlockSize(32 * 1024)

// http://rocksdb.org/blog/2021/12/29/ribbon-filter.html
bbto.SetFilterPolicy(grocksdb.NewRibbonHybridFilterPolicy(9.9, 1))

// partition index
// http://rocksdb.org/blog/2017/05/12/partitioned-index-filter.html
bbto.SetIndexType(grocksdb.KTwoLevelIndexSearchIndexType)
bbto.SetPartitionFilters(true)

// hash index is better for iavl tree which mostly do point lookup.
bbto.SetDataBlockIndexType(grocksdb.KDataBlockIndexTypeBinarySearchAndHash)

opts.SetBlockBasedTableFactory(bbto)

// in iavl tree, we almost always query existing keys
opts.SetOptimizeFiltersForHits(true)

// heavier compression option at bottommost level,
// 110k dict bytes is default in zstd library,
// train bytes is recommended to be set at 100x dict bytes.
opts.SetBottommostCompression(grocksdb.ZSTDCompression)
compressOpts := grocksdb.NewDefaultCompressionOptions()
compressOpts.MaxDictBytes = 110 * 1024
compressOpts.Level = 12
opts.SetBottommostCompressionOptions(compressOpts, true)
opts.SetBottommostCompressionOptionsZstdMaxTrainBytes(compressOpts.MaxDictBytes*100, true)
return opts
}
7 changes: 6 additions & 1 deletion cmd/cronosd/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,12 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) {
// this line is used by starport scaffolding # stargate/root/commands
)

ethermintserver.AddCommands(rootCmd, app.DefaultNodeHome, a.newApp, a.appExport, addModuleInitFlags)
opts := ethermintserver.StartOptions{
AppCreator: a.newApp,
DefaultNodeHome: app.DefaultNodeHome,
DBOpener: openDB,
}
ethermintserver.AddCommands(rootCmd, opts, a.appExport, addModuleInitFlags)
experimental.AddCommands(rootCmd)

// add keybase, auxiliary RPC, query, and tx child commands
Expand Down
2 changes: 1 addition & 1 deletion default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ let
version = "v1.0.1";
pname = "cronosd";
tags = [ "ledger" "netgo" network ]
++ lib.lists.optionals (rocksdb != null) [ "rocksdb" "rocksdb_build" ];
++ lib.lists.optionals (rocksdb != null) [ "rocksdb" "grocksdb_clean_link" ];
ldflags = lib.concatStringsSep "\n" ([
"-X github.com/cosmos/cosmos-sdk/version.Name=cronos"
"-X github.com/cosmos/cosmos-sdk/version.AppName=${pname}"
Expand Down
20 changes: 1 addition & 19 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 3 additions & 11 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,9 @@
inputs.nixpkgs.follows = "nixpkgs";
inputs.utils.follows = "flake-utils";
};
rocksdb-src = {
url = "github:facebook/rocksdb/v6.29.5";
flake = false;
};
};

outputs = { self, nixpkgs, nix-bundle-exe, gomod2nix, flake-utils, rocksdb-src }:
outputs = { self, nixpkgs, nix-bundle-exe, gomod2nix, flake-utils }:
let
rev = self.shortRev or "dirty";
mkApp = drv: {
Expand Down Expand Up @@ -58,7 +54,7 @@
}
)
) // {
overlay = final: prev: {
overlay = final: _: {
bundle-exe = import nix-bundle-exe { pkgs = final; };
# make-tarball don't follow symbolic links to avoid duplicate file, the bundle should have no external references.
# reset the ownership and permissions to make the extract result more normal.
Expand All @@ -67,11 +63,7 @@
--owner=0 --group=0 --mode=u+rw,uga+r --hard-dereference . \
| "${gzip}/bin/gzip" -9 > $out
'';
rocksdb = (prev.rocksdb.override { enableJemalloc = true; }).overrideAttrs (old: rec {
pname = "rocksdb";
version = "6.29.5";
src = rocksdb-src;
});
rocksdb = final.callPackage ./nix/rocksdb.nix { enableJemalloc = true; };
} // (with final;
let
matrix = lib.cartesianProductOfSets {
Expand Down
9 changes: 7 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ require (
github.com/golang/protobuf v1.5.2
github.com/gorilla/mux v1.8.0
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/linxGnu/grocksdb v1.7.10
github.com/peggyjv/gravity-bridge/module/v2 v2.0.0-20220420162017-838c0d25e974
github.com/rakyll/statik v0.1.7
github.com/spf13/cast v1.5.0
Expand Down Expand Up @@ -59,7 +60,6 @@ require (
github.com/cosmos/btcutil v1.0.5 // indirect
github.com/cosmos/cosmos-proto v1.0.0-alpha8 // indirect
github.com/cosmos/go-bip39 v1.0.0 // indirect
github.com/cosmos/gorocksdb v1.2.0 // indirect
github.com/cosmos/iavl v0.19.4 // indirect
github.com/cosmos/ledger-cosmos-go v0.12.1 // indirect
github.com/creachadair/taskgroup v0.3.2 // indirect
Expand Down Expand Up @@ -193,16 +193,21 @@ replace (
github.com/confio/ics23/go => github.com/confio/ics23/go v0.9.0
github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.46.7
github.com/ethereum/go-ethereum => github.com/crypto-org-chain/go-ethereum v1.10.19-deepcopy-jumptable
github.com/evmos/ethermint => github.com/crypto-org-chain/ethermint v0.20.1-cronos
github.com/evmos/ethermint => github.com/yihuang/ethermint v0.6.1-0.20230118154933-386780367ed1

// Fix upstream GHSA-h395-qcrw-5vmq vulnerability.
// TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409
github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.7.0
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1

// https://github.com/linxGnu/grocksdb/pull/100
github.com/linxGnu/grocksdb => github.com/yihuang/grocksdb v1.7.11-0.20230112025116-f41883a71db3

// TODO: remove when gravity update dependencies
github.com/peggyjv/gravity-bridge/module/v2 => github.com/crypto-org-chain/gravity-bridge/module/v2 v2.0.1-0.20220815102151-48275db7e1ee
github.com/tendermint/tendermint => github.com/tendermint/tendermint v0.34.24-0.20221110131553-ec471ba27efd
// https://github.com/crypto-org-chain/tm-db/tree/release/v0.6.x
github.com/tendermint/tm-db => github.com/crypto-org-chain/tm-db v0.6.8-0.20230118040049-14dc6b00a5b3

// TODO: remove after fixed https://github.com/cosmos/cosmos-sdk/issues/11364
github.com/zondax/hid => github.com/zondax/hid v0.9.0
Expand Down
15 changes: 6 additions & 9 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,6 @@ github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXy
github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY=
github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw=
github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU=
github.com/cosmos/gorocksdb v1.2.0 h1:d0l3jJG8M4hBouIZq0mDUHZ+zjOx044J3nGRskwTb4Y=
github.com/cosmos/gorocksdb v1.2.0/go.mod h1:aaKvKItm514hKfNJpUJXnnOWeBnk2GL4+Qw9NHizILw=
github.com/cosmos/iavl v0.19.0/go.mod h1:l5h9pAB3m5fihB3pXVgwYqdY8aBsMagqz7T0MUjxZeA=
github.com/cosmos/iavl v0.19.4 h1:t82sN+Y0WeqxDLJRSpNd8YFX5URIrT+p8n6oJbJ2Dok=
Expand All @@ -770,12 +769,12 @@ github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7Do
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/cristalhq/acmd v0.8.1/go.mod h1:LG5oa43pE/BbxtfMoImHCQN++0Su7dzipdgBjMCBVDQ=
github.com/crypto-org-chain/ethermint v0.20.1-cronos h1:tZpuLhdW40Ue/Gb5yz3wGn2jRIZrwO82bJQWqL2kRP4=
github.com/crypto-org-chain/ethermint v0.20.1-cronos/go.mod h1:slhuvGjkZaRJCapuHaKVIraxRgI7C70yEznP2YokfkA=
github.com/crypto-org-chain/go-ethereum v1.10.19-deepcopy-jumptable h1:VQLW0R8t9DcC/HvQZO1i0mIWjJfAezhI8lLUCholP0M=
github.com/crypto-org-chain/go-ethereum v1.10.19-deepcopy-jumptable/go.mod h1:IJBNMtzKcNHPtllYihy6BL2IgK1u+32JriaTbdt4v+w=
github.com/crypto-org-chain/gravity-bridge/module/v2 v2.0.1-0.20220815102151-48275db7e1ee h1:qzkim8QAf6AdRKlAPgLU5nI7S9JoefLDI76PmJeOTgk=
github.com/crypto-org-chain/gravity-bridge/module/v2 v2.0.1-0.20220815102151-48275db7e1ee/go.mod h1:w/nb6f8UbrqqevKYQm/r+qjRl4WgxRlTC+l9dQ1wDfg=
github.com/crypto-org-chain/tm-db v0.6.8-0.20230118040049-14dc6b00a5b3 h1:msHkCjNEUSqknqzjBCQscfxVm1ifyxoRBb0goZKqGCU=
github.com/crypto-org-chain/tm-db v0.6.8-0.20230118040049-14dc6b00a5b3/go.mod h1:JOMwkZce6XmnsAfSRa3VSA/e2tV1R2y7lqljiw5STlQ=
github.com/curioswitch/go-reassign v0.2.0/go.mod h1:x6OpXuWvgfQaMGks2BZybTngWjT84hqJfKoO8Tt/Roc=
github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4=
github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4=
Expand Down Expand Up @@ -910,11 +909,8 @@ github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLi
github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c h1:8ISkoahWXwZR41ois5lSJBSVw4D0OV19Ht/JSTzvSv0=
github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64=
github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A=
github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg=
github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 h1:7HZCaLC5+BZpmbhCOZJ293Lz68O7PYrF2EzeiFMwCLk=
github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
Expand Down Expand Up @@ -2256,9 +2252,6 @@ github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2l
github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME=
github.com/tendermint/tendermint v0.34.24-0.20221110131553-ec471ba27efd h1:ZW2cpDGoeOufAu1lrF+OwQaYBLoCqB7YpmZvdkrrepk=
github.com/tendermint/tendermint v0.34.24-0.20221110131553-ec471ba27efd/go.mod h1:rXVrl4OYzmIa1I91av3iLv2HS0fGSiucyW9J4aMTpKI=
github.com/tendermint/tm-db v0.6.6/go.mod h1:wP8d49A85B7/erz/r4YbKssKw6ylsO/hKtFk7E1aWZI=
github.com/tendermint/tm-db v0.6.7 h1:fE00Cbl0jayAoqlExN6oyQJ7fR/ZtoVOmvPJ//+shu8=
github.com/tendermint/tm-db v0.6.7/go.mod h1:byQDzFkZV1syXr/ReXS808NxA2xvyuuVgXOJ/088L6I=
github.com/tenntenn/modver v1.0.1/go.mod h1:bePIyQPb7UeioSRkw3Q0XeMhYZSMx9B8ePqg6SAMGH0=
github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3/go.mod h1:ON8b8w4BN/kE1EOhwT0o+d62W65a6aPw1nouo9LMgyY=
github.com/tetafro/godot v0.3.7/go.mod h1:/7NLHhv08H1+8DNj0MElpAACw1ajsCuf3TKNQxA5S+0=
Expand Down Expand Up @@ -2373,6 +2366,10 @@ github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:
github.com/yagipy/maintidx v1.0.0/go.mod h1:0qNf/I/CCZXSMhsRsrEPDZ+DkekpKLXAJfsTACwgXLk=
github.com/ybbus/jsonrpc v2.1.2+incompatible/go.mod h1:XJrh1eMSzdIYFbM08flv0wp5G35eRniyeGut1z+LSiE=
github.com/yeya24/promlinter v0.2.0/go.mod h1:u54lkmBOZrpEbQQ6gox2zWKKLKu2SGe+2KOiextY+IA=
github.com/yihuang/ethermint v0.6.1-0.20230118154933-386780367ed1 h1:q8HLYW+EnrXHBnxFAgVFg2nNFzix9qYP4XY2IRvGdwQ=
github.com/yihuang/ethermint v0.6.1-0.20230118154933-386780367ed1/go.mod h1:slhuvGjkZaRJCapuHaKVIraxRgI7C70yEznP2YokfkA=
github.com/yihuang/grocksdb v1.7.11-0.20230112025116-f41883a71db3 h1:tLZ8PYj0WknvIkjIBrNn2CkN0MtnVHWkH6b0LE8eYPA=
github.com/yihuang/grocksdb v1.7.11-0.20230112025116-f41883a71db3/go.mod h1:0hTf+iA+GOr0jDX4CgIYyJZxqOH9XlBh6KVj8+zmF34=
github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg=
github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM=
github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc=
Expand Down
18 changes: 10 additions & 8 deletions gomod2nix.toml
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,6 @@ schema = 3
[mod."github.com/cosmos/go-bip39"]
version = "v1.0.0"
hash = "sha256-Qm2aC2vaS8tjtMUbHmlBSagOSqbduEEDwc51qvQaBmA="
[mod."github.com/cosmos/gorocksdb"]
version = "v1.2.0"
hash = "sha256-209TcVuXc5s/TcOvNlaQ1HEJAUDTEK3nxPhs+d8TEcY="
[mod."github.com/cosmos/iavl"]
version = "v0.19.4"
hash = "sha256-EmpRZ48pjPFq/fIHneut9Vyo5QJATfb3ZO7KzWnqs9g="
Expand Down Expand Up @@ -163,9 +160,9 @@ schema = 3
hash = "sha256-QKuYnEXXrnHPPHk/Xc9ocez2Jheo/0IOOa1IQaMH61c="
replaced = "github.com/crypto-org-chain/go-ethereum"
[mod."github.com/evmos/ethermint"]
version = "v0.20.1-cronos"
hash = "sha256-RiLFMtsFI8HosauqQh7Je//pfQG/J9A2wV5hLt+3uGg="
replaced = "github.com/crypto-org-chain/ethermint"
version = "v0.6.1-0.20230118154933-386780367ed1"
hash = "sha256-eizwzT6b3P8dKbJ3E8L+s7gmUJAA2QtUqTGbXyfsb84="
replaced = "github.com/yihuang/ethermint"
[mod."github.com/felixge/httpsnoop"]
version = "v1.0.2"
hash = "sha256-hj6FZQ1fDAV+1wGIViAt8XaAkWZ1I5vJzgjIJa7XRBA="
Expand Down Expand Up @@ -320,6 +317,10 @@ schema = 3
[mod."github.com/libp2p/go-buffer-pool"]
version = "v0.1.0"
hash = "sha256-wQqGTtRWsfR9n0O/SXHVgECebbnNmHddxJIbG63OJBQ="
[mod."github.com/linxGnu/grocksdb"]
version = "v1.7.11-0.20230112025116-f41883a71db3"
hash = "sha256-2npDCIiGRLPKMc6LciCTMMZj0jXeXLwNaMmquf9F9oI="
replaced = "github.com/yihuang/grocksdb"
[mod."github.com/magiconair/properties"]
version = "v1.8.6"
hash = "sha256-xToSfpuePctkTdhJtsuKIEkXwfMZbnkFT98ahIfd4wY="
Expand Down Expand Up @@ -461,8 +462,9 @@ schema = 3
hash = "sha256-wdkMisD8IPwZJ0mbtVg9J6A+R/zYkpVK7e47OR53BCU="
replaced = "github.com/tendermint/tendermint"
[mod."github.com/tendermint/tm-db"]
version = "v0.6.7"
hash = "sha256-hl/3RrBrpkk2zA6dmrNlIYKs1/GfqegSscDSkA5Pjlo="
version = "v0.6.8-0.20230118040049-14dc6b00a5b3"
hash = "sha256-kCe9nqzVgG+7ynuvYAGAOTCPESBnV28dDvRuAtsssbw="
replaced = "github.com/crypto-org-chain/tm-db"
[mod."github.com/tklauser/go-sysconf"]
version = "v0.3.10"
hash = "sha256-Zf2NsgM9+HeM949vCce4HQtSbfUiFpeiQ716yKcFyx4="
Expand Down
10 changes: 3 additions & 7 deletions nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import sources.nixpkgs {
buildGoModule = pkgs.buildGo117Module;
};
flake-compat = import sources.flake-compat;
chain-maind = pkgs.callPackage sources.chain-main { };
chain-maind = pkgs.callPackage sources.chain-main { rocksdb = null; };
}) # update to a version that supports eip-1559
(import "${sources.gomod2nix}/overlay.nix")
(pkgs: _:
Expand Down Expand Up @@ -51,12 +51,8 @@ import sources.nixpkgs {
hermes = pkgs.callPackage ./hermes.nix { src = sources.ibc-rs; };
})
(_: pkgs: { test-env = import ./testenv.nix { inherit pkgs; }; })
(_: pkgs: {
rocksdb = (pkgs.rocksdb.override { enableJemalloc = true; }).overrideAttrs (old: rec {
pname = "rocksdb";
version = "6.29.5";
src = sources.rocksdb;
});
(final: _: {
rocksdb = final.callPackage ./rocksdb.nix { enableJemalloc = true; };
})
(_: pkgs: {
cosmovisor = pkgs.buildGo117Module rec {
Expand Down
Loading