diff --git a/CHANGELOG.md b/CHANGELOG.md index 9db04f131..06f9f08e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,11 @@ # Changelog -## 0.8.3 (develop branch) +## 0.8.3 (May 14th, 2018) FEATURES: + - [db/remotedb] New DB type using an external CLevelDB process via + GRPC - [autofile] logjack command for piping stdin to a rotating file - [common] ASCIITrim() diff --git a/Makefile b/Makefile index 41e5f1291..efef45996 100644 --- a/Makefile +++ b/Makefile @@ -72,12 +72,12 @@ gen_certs: clean_certs certstrap init --common-name "tendermint.com" --passphrase "" certstrap request-cert -ip "::" --passphrase "" certstrap sign "::" --CA "tendermint.com" --passphrase "" - mv out/::.crt out/::.key remotedb + mv out/::.crt out/::.key db/remotedb clean_certs: ## Cleaning TLS testing certificates... rm -rf out - rm -f remotedb/::.crt remotedb/::.key + rm -f db/remotedb/::.crt db/remotedb/::.key test: gen_certs go test -tags gcc $(shell go list ./... | grep -v vendor) @@ -135,4 +135,4 @@ metalinter_all: .PHONY: check protoc build check_tools get_tools get_protoc update_tools get_vendor_deps test fmt metalinter metalinter_all gen_certs clean_certs grpc_dbserver: - protoc -I proto/ proto/defs.proto --go_out=plugins=grpc:proto + protoc -I db/remotedb/proto/ db/remotedb/proto/defs.proto --go_out=plugins=grpc:db/remotedb/proto diff --git a/remotedb/doc.go b/db/remotedb/doc.go similarity index 100% rename from remotedb/doc.go rename to db/remotedb/doc.go diff --git a/grpcdb/client.go b/db/remotedb/grpcdb/client.go similarity index 92% rename from grpcdb/client.go rename to db/remotedb/grpcdb/client.go index bae38b1c5..86aa12c7f 100644 --- a/grpcdb/client.go +++ b/db/remotedb/grpcdb/client.go @@ -4,7 +4,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/credentials" - protodb "github.com/tendermint/tmlibs/proto" + protodb "github.com/tendermint/tmlibs/db/remotedb/proto" ) // Security defines how the client will talk to the gRPC server. diff --git a/grpcdb/doc.go b/db/remotedb/grpcdb/doc.go similarity index 100% rename from grpcdb/doc.go rename to db/remotedb/grpcdb/doc.go diff --git a/grpcdb/example_test.go b/db/remotedb/grpcdb/example_test.go similarity index 90% rename from grpcdb/example_test.go rename to db/remotedb/grpcdb/example_test.go index 5a9c6eed9..827a1cf36 100644 --- a/grpcdb/example_test.go +++ b/db/remotedb/grpcdb/example_test.go @@ -5,8 +5,8 @@ import ( "context" "log" - grpcdb "github.com/tendermint/tmlibs/grpcdb" - protodb "github.com/tendermint/tmlibs/proto" + grpcdb "github.com/tendermint/tmlibs/db/remotedb/grpcdb" + protodb "github.com/tendermint/tmlibs/db/remotedb/proto" ) func Example() { diff --git a/grpcdb/server.go b/db/remotedb/grpcdb/server.go similarity index 98% rename from grpcdb/server.go rename to db/remotedb/grpcdb/server.go index d4cfe4433..8320c0517 100644 --- a/grpcdb/server.go +++ b/db/remotedb/grpcdb/server.go @@ -10,7 +10,7 @@ import ( "google.golang.org/grpc/credentials" "github.com/tendermint/tmlibs/db" - protodb "github.com/tendermint/tmlibs/proto" + protodb "github.com/tendermint/tmlibs/db/remotedb/proto" ) // ListenAndServe is a blocking function that sets up a gRPC based diff --git a/proto/defs.pb.go b/db/remotedb/proto/defs.pb.go similarity index 100% rename from proto/defs.pb.go rename to db/remotedb/proto/defs.pb.go diff --git a/proto/defs.proto b/db/remotedb/proto/defs.proto similarity index 100% rename from proto/defs.proto rename to db/remotedb/proto/defs.proto diff --git a/remotedb/remotedb.go b/db/remotedb/remotedb.go similarity index 98% rename from remotedb/remotedb.go rename to db/remotedb/remotedb.go index f6e4d9c17..5332bd68e 100644 --- a/remotedb/remotedb.go +++ b/db/remotedb/remotedb.go @@ -5,8 +5,8 @@ import ( "fmt" "github.com/tendermint/tmlibs/db" - "github.com/tendermint/tmlibs/grpcdb" - protodb "github.com/tendermint/tmlibs/proto" + "github.com/tendermint/tmlibs/db/remotedb/grpcdb" + protodb "github.com/tendermint/tmlibs/db/remotedb/proto" ) type RemoteDB struct { diff --git a/remotedb/remotedb_test.go b/db/remotedb/remotedb_test.go similarity index 90% rename from remotedb/remotedb_test.go rename to db/remotedb/remotedb_test.go index cbe9d9095..b126a9012 100644 --- a/remotedb/remotedb_test.go +++ b/db/remotedb/remotedb_test.go @@ -2,12 +2,13 @@ package remotedb_test import ( "net" + "os" "testing" "github.com/stretchr/testify/require" - "github.com/tendermint/tmlibs/grpcdb" - "github.com/tendermint/tmlibs/remotedb" + "github.com/tendermint/tmlibs/db/remotedb" + "github.com/tendermint/tmlibs/db/remotedb/grpcdb" ) func TestRemoteDB(t *testing.T) { @@ -26,7 +27,14 @@ func TestRemoteDB(t *testing.T) { client, err := remotedb.NewRemoteDB(ln.Addr().String(), cert) require.Nil(t, err, "expecting a successful client creation") - require.Nil(t, client.InitRemote(&remotedb.Init{Name: "test-remote-db", Type: "leveldb"})) + dbName := "test-remote-db" + require.Nil(t, client.InitRemote(&remotedb.Init{Name: dbName, Type: "leveldb"})) + defer func() { + err := os.RemoveAll(dbName + ".db") + if err != nil { + panic(err) + } + }() k1 := []byte("key-1") v1 := client.Get(k1) diff --git a/version/version.go b/version/version.go index 107f5cf3a..40472c9a9 100644 --- a/version/version.go +++ b/version/version.go @@ -1,3 +1,3 @@ package version -const Version = "0.8.2" +const Version = "0.8.3"