Skip to content

Commit 26e5cdc

Browse files
committed
remove all dbs except for goleveldb + memdb
1 parent a7ff77f commit 26e5cdc

File tree

31 files changed

+11
-1692
lines changed

31 files changed

+11
-1692
lines changed

.github/dependabot.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,6 @@ updates:
2828
everything-else:
2929
patterns:
3030
- "*"
31-
exclude-patterns:
32-
# NOTE: grocksdb should be updated manually, to match the version
33-
# available on Ubuntu's latest LTS release; and updated in conjunction
34-
# with the ubuntu version on .github/workflows/db-tests.yml
35-
- "github.com/linxGnu/grocksdb"
3631
open-pull-requests-limit: 10
3732
pull-request-branch-name:
3833
separator: "-"

.github/workflows/db-tests.yml

Lines changed: 0 additions & 54 deletions
This file was deleted.

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Lint
2525
uses: golangci/golangci-lint-action@v3
2626
env:
27-
# Don't attempt to compile/resolve C packages (grocksdb, cleveldb).
27+
# Don't attempt to compile/resolve C packages.
2828
CGO_ENABLED: 0
2929
with:
3030
# sync with misc/devdeps/go.mod

.github/workflows/tm2.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
- _test.pkg.amino
5656
- _test.pkg.bft
5757
- _test.pkg.others
58-
# _test.pkg.db needs special dependencies -- see db-tests.
58+
- _test.pkg.db
5959
runs-on: ubuntu-latest
6060
timeout-minutes: 21
6161
steps:

contribs/gnodev/go.sum

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

contribs/gnokeykc/go.sum

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

go.mod

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,14 @@ require (
1818
github.com/gorilla/websocket v1.5.1
1919
github.com/gotuna/gotuna v0.6.0
2020
github.com/jaekwon/testify v1.6.1
21-
github.com/jmhodges/levigo v1.0.0
2221
github.com/libp2p/go-buffer-pool v0.1.0
23-
github.com/linxGnu/grocksdb v1.6.20
2422
github.com/mattn/go-runewidth v0.0.15
2523
github.com/pelletier/go-toml v1.9.5
2624
github.com/peterbourgon/ff/v3 v3.4.0
2725
github.com/pmezard/go-difflib v1.0.0
2826
github.com/rogpeppe/go-internal v1.11.0
2927
github.com/rs/cors v1.10.1
3028
github.com/stretchr/testify v1.8.4
31-
go.etcd.io/bbolt v1.3.8
3229
go.uber.org/multierr v1.10.0
3330
go.uber.org/zap v1.24.0
3431
go.uber.org/zap/exp v0.1.0

go.sum

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

misc/loop/go.sum

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

tm2/Makefile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,4 @@ GOTEST_FLAGS ?= -v -p 1 -timeout=30m
5050
_test.pkg.others:; go test $(GOTEST_FLAGS) `go list ./pkg/... | grep -Ev 'pkg/(amino|bft|db|iavl/benchmarks)(/|$$)'`
5151
_test.pkg.amino:; go test $(GOTEST_FLAGS) ./pkg/amino/...
5252
_test.pkg.bft:; go test $(GOTEST_FLAGS) ./pkg/bft/...
53-
54-
CGO_ENABLED ?= 0
55-
_test.pkg.db:
56-
@[ -z "$$CGO_ENABLED" ] && echo 'Disabling cgo for database tests. Use CGO_ENABLED=1 to enable it if you have the correct libs' || true
57-
CGO_ENABLED=$(CGO_ENABLED) go test $(GOTEST_FLAGS) ./pkg/db/... ./pkg/iavl/benchmarks/...
53+
_test.pkg.db:; go test $(GOTEST_FLAGS) ./pkg/db/... ./pkg/iavl/benchmarks/...

tm2/pkg/bft/config/config.go

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ var (
3131
)
3232

3333
const (
34-
levelDBName = "goleveldb"
35-
clevelDBName = "cleveldb"
36-
boltDBName = "boltdb"
34+
levelDBName = "goleveldb"
3735
)
3836

3937
const (
@@ -243,19 +241,11 @@ type BaseConfig struct {
243241
// and verifying their commits
244242
FastSyncMode bool `toml:"fast_sync" comment:"If this node is many blocks behind the tip of the chain, FastSync\n allows them to catchup quickly by downloading blocks in parallel\n and verifying their commits"`
245243

246-
// Database backend: goleveldb | cleveldb | boltdb
244+
// Database backend: goleveldb
247245
// * goleveldb (github.com/gnolang/goleveldb - most popular implementation)
248246
// - pure go
249247
// - stable
250-
// * cleveldb (uses levigo wrapper)
251-
// - fast
252-
// - requires gcc
253-
// - use cleveldb build tag (go build -tags cleveldb)
254-
// * boltdb (uses etcd's fork of bolt - go.etcd.io/bbolt)
255-
// - EXPERIMENTAL
256-
// - may be faster is some use-cases (random reads - indexer)
257-
// - use boltdb build tag (go build -tags boltdb)
258-
DBBackend string `toml:"db_backend" comment:"Database backend: goleveldb | cleveldb | boltdb\n * goleveldb (github.com/gnolang/goleveldb - most popular implementation)\n - pure go\n - stable\n * cleveldb (uses levigo wrapper)\n - fast\n - requires gcc\n - use cleveldb build tag (go build -tags cleveldb)\n * boltdb (uses etcd's fork of bolt - go.etcd.io/bbolt)\n - EXPERIMENTAL\n - may be faster is some use-cases (random reads - indexer)\n - use boltdb build tag (go build -tags boltdb)"`
248+
DBBackend string `toml:"db_backend" comment:"Database backend: goleveldb\n * goleveldb (github.com/gnolang/goleveldb - most popular implementation)\n - pure go\n - stable"`
259249

260250
// Database directory
261251
DBPath string `toml:"db_dir" comment:"Database directory"`
@@ -365,9 +355,7 @@ func (cfg BaseConfig) ValidateBasic() error {
365355
}
366356

367357
// Verify the DB backend
368-
if cfg.DBBackend != levelDBName &&
369-
cfg.DBBackend != clevelDBName &&
370-
cfg.DBBackend != boltDBName {
358+
if cfg.DBBackend != levelDBName {
371359
return errInvalidDBBackend
372360
}
373361

tm2/pkg/db/_all/all.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
// Package all imports all available databases. It is useful mostly in tests.
2-
//
3-
// cgo databases (rocksdb, cleveldb) will be excluded if CGO_ENABLED=0.
42
package all
53

64
import (
7-
// Keep in sync with list of non-cgo backends.
8-
// Add cgo backends in all_cgo.go.
9-
_ "github.com/gnolang/gno/tm2/pkg/db/boltdb"
10-
_ "github.com/gnolang/gno/tm2/pkg/db/fsdb"
115
_ "github.com/gnolang/gno/tm2/pkg/db/goleveldb"
126
_ "github.com/gnolang/gno/tm2/pkg/db/memdb"
137
)

tm2/pkg/db/_all/all_cgo.go

Lines changed: 0 additions & 10 deletions
This file was deleted.

tm2/pkg/db/_tags/boltdb.go

Lines changed: 0 additions & 5 deletions
This file was deleted.

tm2/pkg/db/_tags/cleveldb.go

Lines changed: 0 additions & 5 deletions
This file was deleted.

tm2/pkg/db/_tags/fsdb.go

Lines changed: 0 additions & 5 deletions
This file was deleted.

tm2/pkg/db/_tags/rocksdb.go

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)