Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
codchen committed Feb 16, 2023
0 parents commit f498bd2
Show file tree
Hide file tree
Showing 61 changed files with 8,744 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

# Test binary, build with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

.idea
.vscode
vendor/*
7 changes: 7 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This configuration file was automatically generated by Gitpod.
# Please adjust to your needs (see https://www.gitpod.io/docs/config-gitpod-file)
# and commit this file to your remote git repository to share the goodness with others.

image: tendermintdev/docker-tm-db-testing

# this means that there's a one-click known good environment available to developers.
49 changes: 49 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
linters:
disable-all: true
enable:
- deadcode
- depguard
- dogsled
- dupl
- errcheck
- exportloopref
- goconst
- gocritic
- gofumpt
- revive
- gosec
- gosimple
- govet
- ineffassign
- lll
- misspell
- nakedret
- prealloc
- staticcheck
- stylecheck
- typecheck
- revive
- unconvert
- unused
- varcheck
- nolintlint

run:
build-tags:
- cleveldb
- rocksdb
- badgerdb
- boltdb

issues:
exclude-rules:
- path: _test\.go
linters:
- gosec
linters-settings:
maligned:
suggest-new: true
errcheck:
# report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`;
# default is false: such cases aren't reported by default.
check-blank: true
15 changes: 15 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
queue_rules:
- name: default
conditions:
- base=master
- label=S:automerge

pull_request_rules:
- name: automerge to master with label S:automerge and branch protection passing
conditions:
- base=master
- label=S:automerge
actions:
queue:
method: squash
name: default
197 changes: 197 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,197 @@
# Changelog

## Unreleased

- remove mutex from prefixdb

## 0.6.7

**2022-2-21**

- Use cosmos/rocksdb instead of techbot/rocksdb
- Add `ForceCopmact` to goleveldb database

## 0.6.6

**2021-11-08**

**Important note:** Version v0.6.5 was accidentally tagged and should be
avoided. This version is identical to v0.6.4 in package structure and API, but
has updated the version marker so that normal `go get` upgrades will not
require modifying existing use of v0.6.4.

### Version bumps (since v0.6.4)

- Bump grpc from to 1.42.0.
- Bump dgraph/badger to v2 2.2007.3.
- Bump go.etcd.io/bbolt to 1.3.6.

## 0.6.5

**2021-08-04**

**Important note**: This version was tagged by accident, and should not be
used. The tag now points to the [package-reorg
branch](https://github.com/tendermint/tm-db/tree/package-reorg) so that
any existing dependencies should not break.

## 0.6.4

**2021-02-09**

Bump protobuf to 1.3.2 and grpc to 1.35.0.

## 0.6.3

**2020-11-10**

### Improvements

- [goleveldb] [\#134](https://github.com/tendermint/tm-db/pull/134) Improve iterator performance by bounding underlying iterator range (@klim0v)

## 0.6.2

**2020-08-27**

Bump grpc, badger and goleveldb (see versions in go.mod file)

## 0.6.1

**2020-08-12**

### Improvements

- [\#115](https://github.com/tendermint/tm-db/pull/115) Add a `BadgerDB` backend with build tag `badgerdb` (@mvdan)

## 0.6.0

**2020-06-24**

### Breaking Changes

- [\#99](https://github.com/tendermint/tm-db/pull/99) Keys can no longer be `nil` or empty, and values can no longer be `nil` (@erikgrinaker)

- [\#98](https://github.com/tendermint/tm-db/pull/98) `NewDB` now returns an error instead of panicing (@erikgrinaker)

- [\#96](https://github.com/tendermint/tm-db/pull/96) `Batch.Set()`, `Delete()`, and `Close()` may now error (@erikgrinaker)

- [\#97](https://github.com/tendermint/tm-db/pull/97) `Iterator.Close()` may now error (@erikgrinaker)

- [\#97](https://github.com/tendermint/tm-db/pull/97) Many iterator panics are now exposed via `Error()` instead (@erikgrinaker)

- [\#96](https://github.com/tendermint/tm-db/pull/96) The `SetDeleter` interface has been removed (@erikgrinaker)

### Bug Fixes

- [\#97](https://github.com/tendermint/tm-db/pull/97) `RemoteDB` iterators are now correctly primed with the first item when created, without calling `Next()` (@erikgrinaker)

## 0.5.2

**2020-11-10**

### Improvements

- [goleveldb] [\#134](https://github.com/tendermint/tm-db/pull/134) Improve iterator performance by bounding underlying iterator range (@klim0v)

## 0.5.1

**2020-03-30**

### Bug Fixes

- [boltdb] [\#81](https://github.com/tendermint/tm-db/pull/81) Use correct import path go.etcd.io/bbolt

## 0.5.0

**2020-03-11**

### Breaking Changes

- [\#71](https://github.com/tendermint/tm-db/pull/71) Closed or written batches can no longer be reused, all non-`Close()` calls will panic

- [memdb] [\#74](https://github.com/tendermint/tm-db/pull/74) `Iterator()` and `ReverseIterator()` now take out database read locks for the duration of the iteration

- [memdb] [\#56](https://github.com/tendermint/tm-db/pull/56) Removed some exported methods that were mainly meant for internal use: `Mutex()`, `SetNoLock()`, `SetNoLockSync()`, `DeleteNoLock()`, and `DeleteNoLockSync()`

### Improvements

- [memdb] [\#53](https://github.com/tendermint/tm-db/pull/53) Use a B-tree for storage, which significantly improves range scan performance

- [memdb] [\#56](https://github.com/tendermint/tm-db/pull/56) Use an RWMutex for improved performance with highly concurrent read-heavy workloads

### Bug Fixes

- [boltdb] [\#69](https://github.com/tendermint/tm-db/pull/69) Properly handle blank keys in iterators

- [cleveldb] [\#65](https://github.com/tendermint/tm-db/pull/65) Fix handling of empty keys as iterator endpoints

## 0.4.1

**2020-2-26**

### Breaking Changes

- [fsdb] [\#43](https://github.com/tendermint/tm-db/pull/43) Remove FSDB

### Bug Fixes

- [boltdb] [\#45](https://github.com/tendermint/tm-db/pull/45) Bring BoltDB to adhere to the db interfaces

## 0.4

**2020-1-7**

### BREAKING CHANGES

- [\#30](https://github.com/tendermint/tm-db/pull/30) Interface Breaking, Interfaces return errors instead of panic:
- Changes to function signatures:
- DB interface:
- `Get([]byte) ([]byte, error)`
- `Has(key []byte) (bool, error)`
- `Set([]byte, []byte) error`
- `SetSync([]byte, []byte) error`
- `Delete([]byte) error`
- `DeleteSync([]byte) error`
- `Iterator(start, end []byte) (Iterator, error)`
- `ReverseIterator(start, end []byte) (Iterator, error)`
- `Close() error`
- `Print() error`
- Batch interface:
- `Write() error`
- `WriteSync() error`
- Iterator interface:
- `Error() error`

### IMPROVEMENTS

- [remotedb] [\#34](https://github.com/tendermint/tm-db/pull/34) Add proto file tests and regenerate remotedb.pb.go

## 0.3

**2019-11-18**

Special thanks to external contributors on this release:

### BREAKING CHANGES

- [\#26](https://github.com/tendermint/tm-db/pull/26/files) Rename `DBBackendtype` to `BackendType`

## 0.2

**2019-09-19**

Special thanks to external contributors on this release: @stumble

### Features

- [\#12](https://github.com/tendermint/tm-db/pull/12) Add `RocksDB` (@stumble)

## 0.1

**2019-07-16**

Special thanks to external contributors on this release:

### Initial Release

- `db`, `random.go`, `bytes.go` and `os.go` from the tendermint repo.
8 changes: 8 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Contributing

Thank you for your interest in contributing to tm-db!
This repository follows the [contribution guidelines] of tendermint and the corresponding [coding repo].
Please take a look if you are not already familiar with those.

[contribution guidelines]: https://github.com/tendermint/tendermint/blob/master/CONTRIBUTING.md
[coding repo]: https://github.com/tendermint/coding
Loading

0 comments on commit f498bd2

Please sign in to comment.