Commit Graph

593 Commits

Author SHA1 Message Date
Jeremiah Andrews cb08d28d40 Reverse iterators (#224)
with passing tests
2018-06-24 19:37:32 -07:00
Jae Kwon fb7ec62b29 Fix comment 2018-06-13 23:45:44 -07:00
Jae Kwon 21726a6853 Add ColoredBytes() and update DebugDB 2018-06-13 23:45:44 -07:00
Jae Kwon 1b1c4cd94d Reduce Errors T/Cause/Message into single Data 2018-06-13 23:45:44 -07:00
Dev Ojha 0c98d10b4f
Merge pull request #222 from tendermint/dev/bech32_err_msg
Bech32: Wrap error messages
2018-06-11 10:20:51 -07:00
ValarDragon 1d66e34dc8 Bech32: Wrap error messages 2018-06-09 16:22:52 -07:00
Ethan Buchman 640af0205d
Merge pull request #219 from tendermint/include-group-close-in-tests
[autofile] include call to group#Close in tests
2018-06-06 20:46:39 -07:00
Anton Kaliaev f0c44d1bd0
[autofile] include call to group#Close in tests 2018-06-06 11:52:59 +04:00
Ethan Buchman 8bbe43aa33 update changelog 2018-06-05 21:53:09 -07:00
Ethan Buchman a7e049a228 Merge branch 'master' into develop 2018-06-05 21:39:23 -07:00
Ethan Buchman 692f1d86a6
Merge pull request #218 from tendermint/release/v0.8.4
Release/v0.8.4
2018-06-05 17:11:19 -07:00
Ethan Buchman 22541b881d changelog and version 2018-06-05 17:12:33 -07:00
Anton Kaliaev e0985bf566 flush on stop & function to close group
as opposite to OpenGroup
2018-06-05 17:11:06 -07:00
Zaki Manian 44f1bdb0d5 Bech32 (#216)
* Add support for regular bech32 to tmlibs

* Add bech32 to gopkg.toml
2018-06-01 13:56:00 +04:00
Ethan Buchman e0acf357bb
Merge pull request #214 from tendermint/bucky/no-gogo
no gogo proto
2018-05-30 08:30:54 -04:00
Ethan Buchman d24a30858e no gogo proto 2018-05-24 00:10:35 -04:00
Ethan Buchman c3b72ea708
Merge pull request #210 from tendermint/bucky/tmhash
tmhash
2018-05-22 12:09:52 -04:00
Ethan Buchman d468cee107 Merge branch 'master' into develop 2018-05-21 21:40:07 -04:00
Ethan Buchman d970af8724
Merge pull request #212 from tendermint/release/v0.8.3
Release/v0.8.3
2018-05-21 21:30:52 -04:00
Ethan Buchman 06cffa6acb changelog and version 2018-05-21 21:38:02 -04:00
Ethan Buchman d72de8ba68 fix test 2018-05-21 20:26:54 -04:00
Ethan Buchman d82699bf43 tmhash 2018-05-21 20:15:32 -04:00
Ethan Buchman 4fb515fa08
Merge pull request #208 from tendermint/bucky/remotedb
Move remotedb under db
2018-05-21 17:36:18 -04:00
Ethan Buchman f27c358a8a revert protobuf recompile 2018-05-21 17:37:53 -04:00
Zach 31c0c9555e
Merge pull request #209 from tendermint/tm-847
events and pubsub were moved to tendermint core
2018-05-16 08:49:23 -04:00
Anton Kaliaev 4a77eda368
events and pubsub were moved to tendermint core
Refs https://github.com/tendermint/tendermint/issues/847
2018-05-16 12:57:08 +04:00
Ethan Buchman 468be0f8d6 mv remotedb, proto, grpcdb all under db/remotedb 2018-05-14 15:49:00 -04:00
Ethan Buchman 45caff1a20 changelog and version 2018-05-14 15:21:29 -04:00
Jae Kwon a8fcf45624 Change defaults to 100M and 10G respectively 2018-05-10 20:58:28 -07:00
Jae Kwon 2e41756b55 Add logjack command 2018-05-10 20:43:50 -07:00
Christopher Goes 67faf556ed
Merge pull request #162 from tendermint/db-gRPC
DB as a service: remove database deployment with API
2018-05-10 18:46:05 +02:00
Christopher Goes 20be8c75e5
Tweak testcases 2018-05-08 17:13:13 +02:00
Christopher Goes 0b6d101c77
Implement batch operations 2018-05-08 16:38:39 +02:00
Christopher Goes 45514a6013
Address PR comments 2018-05-08 15:47:06 +02:00
Christopher Goes 39e1567d0a
Add iterator tests 2018-05-08 00:53:33 +02:00
Christopher Goes 55f4ccd4fc
CI fix 2018-05-07 23:28:41 +02:00
Christopher Goes 2cca5a7a4c
Implement TLS/SSL 2018-05-07 23:16:06 +02:00
Christopher Goes bf16d6453c
Address PR comments 2018-05-07 22:12:26 +02:00
Emmanuel T Odeke 5d12e1eb46
remotedb: a client package implementing the db.DB interface
Simplified the abstractions to remotedb, a package that
allows clients to use whatever database they can in client
code without having to switch out their code e.g
```go
client, err := remotedb.NewInsecure(":9888")
...
// Just like they'd initialize locally
in := &remotedb.Init{
  Name: "test-remote-db",
  Type: "leveldb",
  Dir: "/tmp/dbs",
}

if err := client.InitRemote(in); err != nil {
    log.Fatalf("Failed to initialize the database")
}

v1 := client.Get(k1)
client.Set(k9, dog)

for itr := client.Iterator(a1, z1); itr.Valid(); itr.Next() {
  k, v := itr.Key(), itr.Value()
  dom := itr.Domain()
  ...
}
```
2018-05-07 22:00:38 +02:00
Emmanuel T Odeke 1260b75f63
grpcdb: Better readability for docs and constructor names
* Added some docs for NewClient, BindServer, *server.Init
* Security level clarified, whether "secure" for https
or "insecure" for non-https gRPC connections.
2018-05-07 22:00:38 +02:00
Emmanuel T Odeke 11bee6194a
DB as a service
Fixes https://github.com/tendermint/tendermint/issues/1162

Databases as a service!

Can now access Databases as a remote service
via gRPC for performance and easy deployment.

The caveat is that each service is stateful in regards to
the DB i.e. each unique service uses only one unique DB
but nonetheless multiple clients can access it.

A full standalone example

```go
package main

import (
  "bytes"
  "context"
  "log"

  grpcdb "github.com/tendermint/tmlibs/grpcdb"
  protodb "github.com/tendermint/tmlibs/proto"
)

func main() {
  addr := ":8998"
  go func() {
    if err := grpcdb.BindRemoteDBServer(addr); err != nil {
      log.Fatalf("BindRemoteDBServer: %v", err)
    }
  }()

  client, err := grpcdb.NewClient(addr, false)
  if err != nil {
    log.Fatalf("Failed to create grpcDB client: %v", err)
  }

  ctx := context.Background()
  // 1. Initialize the DB
  in := &protodb.Init{
    Type: "leveldb",
    Name: "grpc-uno-test",
    Dir:  ".",
  }
  if _, err := client.Init(ctx, in); err != nil {
    log.Fatalf("Init error: %v", err)
  }

  // 2. Now it can be used!
  query1 := &protodb.Entity{Key: []byte("Project"), Value:
[]byte("Tmlibs-on-gRPC")}
  if _, err := client.SetSync(ctx, query1); err != nil {
    log.Fatalf("SetSync err: %v", err)
  }

  query2 := &protodb.Entity{Key: []byte("Project")}
  read, err := client.Get(ctx, query2)
  if err != nil {
    log.Fatalf("Get err: %v", err)
  }
  if g, w := read.Value, []byte("Tmlibs-on-gRPC"); !bytes.Equal(g, w) {
    log.Fatalf("got= (%q ==> % X)\nwant=(%q ==> % X)", g, g, w, w)
  }
}
```
2018-05-07 22:00:33 +02:00
Jae Kwon cc5f287c47 Add developer branch 0.8.3 to CHANGELOG 2018-04-23 02:36:49 -07:00
Jae Kwon 9b2a8f07a3 [common] Add ASCIITrim 2018-04-23 01:32:18 -07:00
Anton Kaliaev d94e312673 add MarshalJSON and UnmarshalJSON to BitArray (#200)
See CHANGELOG
2018-04-23 00:16:05 -07:00
Jae Kwon 8fa4211bbd
Fixes TestParallelAbort nondeterministic failure #201 (#202) 2018-04-23 00:07:03 -07:00
Jae Kwon e328006bfe
Jae/fixprefixdb (#199)
* Fix PrefixDB Iterator
* PrefixDB Iterator/ReverseIterator fixes
* Bump version 0.8.2
* Update CHANGELOG.md about DebugDB
* Keep invalid source to be closed
* Use prefixBatch instead of memBatch
2018-04-21 04:25:45 -07:00
Ethan Buchman 357648b8d6 Merge branch 'master' into develop 2018-04-09 16:03:08 +03:00
Ethan Buchman 50ad19541d
Merge pull request #198 from tendermint/release/v0.8.1
Release/v0.8.1
2018-04-09 15:47:27 +03:00
Ethan Buchman 0f92a01737 changelog dates 2018-04-09 15:51:54 +03:00
Thomas Corbière 75345c2046 Use an interface for tags. (#195)
* Use an interface for tags.

* rename TagSet to TagMap.

* add documentation to TagMap.
2018-04-09 14:36:40 +02:00