use tmlibs

This commit is contained in:
Ethan Buchman 2017-04-21 18:12:54 -04:00
parent fa451fc55c
commit d1926bcad1
73 changed files with 101 additions and 101 deletions

View File

@ -144,7 +144,7 @@ IMPROVEMENTS:
- Less verbose logging
- Better test coverage (37% -> 49%)
- Canonical SignBytes for signable types
- Write-Ahead Log for Mempool and Consensus via go-autofile
- Write-Ahead Log for Mempool and Consensus via tmlibs/autofile
- Better in-process testing for the consensus reactor and byzantine faults
- Better crash/restart testing for individual nodes at preset failure points, and of networks at arbitrary points
- Better abstraction over timeout mechanics

View File

@ -1,7 +1,7 @@
package benchmarks
import (
. "github.com/tendermint/go-common"
. "github.com/tendermint/tmlibs/common"
"testing"
)

View File

@ -4,7 +4,7 @@ import (
"os"
"testing"
. "github.com/tendermint/go-common"
. "github.com/tendermint/tmlibs/common"
)
func BenchmarkFileWrite(b *testing.B) {

View File

@ -7,7 +7,7 @@ import (
"fmt"
"github.com/gorilla/websocket"
. "github.com/tendermint/go-common"
. "github.com/tendermint/tmlibs/common"
"github.com/tendermint/go-rpc/client"
"github.com/tendermint/go-rpc/types"
"github.com/tendermint/go-wire"

View File

@ -1,7 +1,7 @@
package blockchain
import (
"github.com/tendermint/go-logger"
"github.com/tendermint/tmlibs/logger"
)
var log = logger.New("module", "blockchain")

View File

@ -5,8 +5,8 @@ import (
"sync"
"time"
. "github.com/tendermint/go-common"
flow "github.com/tendermint/go-flowrate/flowrate"
. "github.com/tendermint/tmlibs/common"
flow "github.com/tendermint/tmlibs/flowrate"
"github.com/tendermint/tendermint/types"
)

View File

@ -5,7 +5,7 @@ import (
"testing"
"time"
. "github.com/tendermint/go-common"
. "github.com/tendermint/tmlibs/common"
"github.com/tendermint/tendermint/types"
)

View File

@ -6,7 +6,7 @@ import (
"reflect"
"time"
cmn "github.com/tendermint/go-common"
cmn "github.com/tendermint/tmlibs/common"
cfg "github.com/tendermint/go-config"
"github.com/tendermint/go-p2p"
"github.com/tendermint/go-wire"

View File

@ -7,8 +7,8 @@ import (
"io"
"sync"
. "github.com/tendermint/go-common"
dbm "github.com/tendermint/go-db"
. "github.com/tendermint/tmlibs/common"
dbm "github.com/tendermint/tmlibs/db"
"github.com/tendermint/go-wire"
"github.com/tendermint/tendermint/types"
)

View File

@ -5,7 +5,7 @@ import (
"github.com/spf13/cobra"
cmn "github.com/tendermint/go-common"
cmn "github.com/tendermint/tmlibs/common"
"github.com/tendermint/tendermint/types"
)

View File

@ -3,7 +3,7 @@ package commands
import (
"github.com/spf13/cobra"
"github.com/tendermint/go-logger"
"github.com/tendermint/tmlibs/logger"
tmcfg "github.com/tendermint/tendermint/config/tendermint"
)

View File

@ -6,7 +6,7 @@ import (
"github.com/spf13/cobra"
. "github.com/tendermint/go-common"
. "github.com/tendermint/tmlibs/common"
"github.com/tendermint/tendermint/node"
"github.com/tendermint/tendermint/types"
)

View File

@ -7,7 +7,7 @@ import (
"github.com/spf13/cobra"
cmn "github.com/tendermint/go-common"
cmn "github.com/tendermint/tmlibs/common"
"github.com/tendermint/tendermint/types"
)

View File

@ -5,7 +5,7 @@ import (
"path"
"strings"
. "github.com/tendermint/go-common"
. "github.com/tendermint/tmlibs/common"
cfg "github.com/tendermint/go-config"
)

View File

@ -7,9 +7,9 @@ import (
"path"
"strings"
. "github.com/tendermint/go-common"
. "github.com/tendermint/tmlibs/common"
cfg "github.com/tendermint/go-config"
"github.com/tendermint/go-logger"
"github.com/tendermint/tmlibs/logger"
)
func init() {

View File

@ -7,9 +7,9 @@ import (
"github.com/tendermint/tendermint/config/tendermint_test"
. "github.com/tendermint/go-common"
. "github.com/tendermint/tmlibs/common"
cfg "github.com/tendermint/go-config"
"github.com/tendermint/go-events"
"github.com/tendermint/tmlibs/events"
"github.com/tendermint/go-p2p"
"github.com/tendermint/tendermint/types"
)

View File

@ -13,9 +13,9 @@ import (
abcicli "github.com/tendermint/abci/client"
abci "github.com/tendermint/abci/types"
. "github.com/tendermint/go-common"
. "github.com/tendermint/tmlibs/common"
cfg "github.com/tendermint/go-config"
dbm "github.com/tendermint/go-db"
dbm "github.com/tendermint/tmlibs/db"
"github.com/tendermint/go-p2p"
bc "github.com/tendermint/tendermint/blockchain"
"github.com/tendermint/tendermint/config/tendermint_test"

View File

@ -4,7 +4,7 @@ import (
"strings"
"sync"
. "github.com/tendermint/go-common"
. "github.com/tendermint/tmlibs/common"
"github.com/tendermint/tendermint/types"
)

View File

@ -3,7 +3,7 @@ package consensus
import (
"testing"
. "github.com/tendermint/go-common"
. "github.com/tendermint/tmlibs/common"
"github.com/tendermint/tendermint/config/tendermint_test"
"github.com/tendermint/tendermint/types"
)

View File

@ -1,7 +1,7 @@
package consensus
import (
"github.com/tendermint/go-logger"
"github.com/tendermint/tmlibs/logger"
)
var log = logger.New("module", "consensus")

View File

@ -9,7 +9,7 @@ import (
"github.com/tendermint/tendermint/config/tendermint_test"
"github.com/tendermint/tendermint/types"
. "github.com/tendermint/go-common"
. "github.com/tendermint/tmlibs/common"
)
func init() {

View File

@ -8,7 +8,7 @@ import (
"sync"
"time"
. "github.com/tendermint/go-common"
. "github.com/tendermint/tmlibs/common"
"github.com/tendermint/go-p2p"
"github.com/tendermint/go-wire"
sm "github.com/tendermint/tendermint/state"

View File

@ -8,7 +8,7 @@ import (
"github.com/tendermint/tendermint/config/tendermint_test"
"github.com/tendermint/go-events"
"github.com/tendermint/tmlibs/events"
"github.com/tendermint/go-p2p"
"github.com/tendermint/tendermint/types"
"github.com/tendermint/abci/example/dummy"

View File

@ -11,8 +11,8 @@ import (
"time"
abci "github.com/tendermint/abci/types"
auto "github.com/tendermint/go-autofile"
. "github.com/tendermint/go-common"
auto "github.com/tendermint/tmlibs/autofile"
. "github.com/tendermint/tmlibs/common"
cfg "github.com/tendermint/go-config"
"github.com/tendermint/go-wire"

View File

@ -8,9 +8,9 @@ import (
"strconv"
"strings"
. "github.com/tendermint/go-common"
. "github.com/tendermint/tmlibs/common"
cfg "github.com/tendermint/go-config"
dbm "github.com/tendermint/go-db"
dbm "github.com/tendermint/tmlibs/db"
bc "github.com/tendermint/tendermint/blockchain"
mempl "github.com/tendermint/tendermint/mempool"
"github.com/tendermint/tendermint/proxy"

View File

@ -15,10 +15,10 @@ import (
"github.com/tendermint/tendermint/config/tendermint_test"
"github.com/tendermint/abci/example/dummy"
cmn "github.com/tendermint/go-common"
cmn "github.com/tendermint/tmlibs/common"
cfg "github.com/tendermint/go-config"
"github.com/tendermint/go-crypto"
dbm "github.com/tendermint/go-db"
dbm "github.com/tendermint/tmlibs/db"
"github.com/tendermint/go-wire"
"github.com/tendermint/tendermint/proxy"
sm "github.com/tendermint/tendermint/state"

View File

@ -11,7 +11,7 @@ import (
"github.com/ebuchman/fail-test"
. "github.com/tendermint/go-common"
. "github.com/tendermint/tmlibs/common"
cfg "github.com/tendermint/go-config"
"github.com/tendermint/go-wire"
"github.com/tendermint/tendermint/proxy"

View File

@ -6,7 +6,7 @@ import (
"testing"
"time"
. "github.com/tendermint/go-common"
. "github.com/tendermint/tmlibs/common"
"github.com/tendermint/tendermint/config/tendermint_test"
"github.com/tendermint/tendermint/types"
)

View File

@ -3,7 +3,7 @@ package consensus
import (
"time"
. "github.com/tendermint/go-common"
. "github.com/tendermint/tmlibs/common"
)
var (

View File

@ -1,7 +1,7 @@
package consensus
import (
. "github.com/tendermint/go-common"
. "github.com/tendermint/tmlibs/common"
)
// kind of arbitrary

View File

@ -3,8 +3,8 @@ package consensus
import (
"time"
auto "github.com/tendermint/go-autofile"
. "github.com/tendermint/go-common"
auto "github.com/tendermint/tmlibs/autofile"
. "github.com/tendermint/tmlibs/common"
"github.com/tendermint/go-wire"
"github.com/tendermint/tendermint/types"
)

View File

@ -2,7 +2,7 @@
To allow the efficient creation of an ABCi app, tendermint wishes to provide a reference implemention of a key-value store that provides merkle proofs of the data. These proofs then quickly allow the ABCi app to provide an apphash to the consensus engine, as well as a full proof to any client.
This engine is currently implemented in `go-merkle` with `merkleeyes` providing a language-agnostic binding via ABCi. It uses `go-db` bindings internally to persist data to leveldb.
This engine is currently implemented in `go-merkle` with `merkleeyes` providing a language-agnostic binding via ABCi. It uses `tmlibs/db` bindings internally to persist data to leveldb.
What are some of the requirements of this store:

12
glide.lock generated
View File

@ -78,11 +78,11 @@ imports:
subpackages:
- edwards25519
- extra25519
- name: github.com/tendermint/go-autofile
- name: github.com/tendermint/tmlibs/autofile
version: 48b17de82914e1ec2f134ce823ba426337d2c518
- name: github.com/tendermint/go-clist
- name: github.com/tendermint/tmlibs/clist
version: 3baa390bbaf7634251c42ad69a8682e7e3990552
- name: github.com/tendermint/go-common
- name: github.com/tendermint/tmlibs/common
version: f9e3db037330c8a8d61d3966de8473eaf01154fa
subpackages:
- test
@ -92,15 +92,15 @@ imports:
version: 9b95da8fa4187f6799558d89b271dc8ab6485615
- name: github.com/tendermint/go-data
version: e7fcc6d081ec8518912fcdc103188275f83a3ee5
- name: github.com/tendermint/go-db
- name: github.com/tendermint/tmlibs/db
version: 9643f60bc2578693844aacf380a7c32e4c029fee
- name: github.com/tendermint/go-events
- name: github.com/tendermint/tmlibs/events
version: f8ffbfb2be3483e9e7927495590a727f51c0c11f
- name: github.com/tendermint/go-flowrate
version: a20c98e61957faa93b4014fbd902f20ab9317a6a
subpackages:
- flowrate
- name: github.com/tendermint/go-logger
- name: github.com/tendermint/tmlibs/logger
version: cefb3a45c0bf3c493a04e9bcd9b1540528be59f2
- name: github.com/tendermint/go-merkle
version: 714d4d04557fd068a7c2a1748241ce8428015a96

View File

@ -1,10 +1,10 @@
package: github.com/tendermint/tendermint
import:
- package: github.com/tendermint/go-autofile
- package: github.com/tendermint/tmlibs/autofile
version: develop
- package: github.com/tendermint/go-clist
- package: github.com/tendermint/tmlibs/clist
version: develop
- package: github.com/tendermint/go-common
- package: github.com/tendermint/tmlibs/common
version: develop
- package: github.com/tendermint/go-config
version: develop
@ -12,11 +12,11 @@ import:
version: develop
- package: github.com/tendermint/go-data
version: develop
- package: github.com/tendermint/go-db
- package: github.com/tendermint/tmlibs/db
version: develop
- package: github.com/tendermint/go-events
- package: github.com/tendermint/tmlibs/events
version: develop
- package: github.com/tendermint/go-logger
- package: github.com/tendermint/tmlibs/logger
version: develop
- package: github.com/tendermint/go-merkle
version: develop

View File

@ -1,7 +1,7 @@
package mempool
import (
"github.com/tendermint/go-logger"
"github.com/tendermint/tmlibs/logger"
)
var log = logger.New("module", "mempool")

View File

@ -8,9 +8,9 @@ import (
"time"
abci "github.com/tendermint/abci/types"
auto "github.com/tendermint/go-autofile"
"github.com/tendermint/go-clist"
. "github.com/tendermint/go-common"
auto "github.com/tendermint/tmlibs/autofile"
"github.com/tendermint/tmlibs/clist"
. "github.com/tendermint/tmlibs/common"
cfg "github.com/tendermint/go-config"
"github.com/tendermint/tendermint/proxy"
"github.com/tendermint/tendermint/types"

View File

@ -7,7 +7,7 @@ import (
"time"
abci "github.com/tendermint/abci/types"
"github.com/tendermint/go-clist"
"github.com/tendermint/tmlibs/clist"
cfg "github.com/tendermint/go-config"
"github.com/tendermint/go-p2p"
"github.com/tendermint/go-wire"

View File

@ -1,7 +1,7 @@
package node
import (
"github.com/tendermint/go-logger"
"github.com/tendermint/tmlibs/logger"
)
var log = logger.New("module", "node")

View File

@ -8,10 +8,10 @@ import (
"strings"
abci "github.com/tendermint/abci/types"
cmn "github.com/tendermint/go-common"
cmn "github.com/tendermint/tmlibs/common"
cfg "github.com/tendermint/go-config"
crypto "github.com/tendermint/go-crypto"
dbm "github.com/tendermint/go-db"
dbm "github.com/tendermint/tmlibs/db"
p2p "github.com/tendermint/go-p2p"
rpc "github.com/tendermint/go-rpc"
rpcserver "github.com/tendermint/go-rpc/server"

View File

@ -4,7 +4,7 @@ import (
"strings"
"testing"
. "github.com/tendermint/go-common"
. "github.com/tendermint/tmlibs/common"
abcicli "github.com/tendermint/abci/client"
"github.com/tendermint/abci/example/dummy"
"github.com/tendermint/abci/server"

View File

@ -1,7 +1,7 @@
package proxy
import (
"github.com/tendermint/go-logger"
"github.com/tendermint/tmlibs/logger"
)
var log = logger.New("module", "proxy")

View File

@ -1,7 +1,7 @@
package proxy
import (
cmn "github.com/tendermint/go-common"
cmn "github.com/tendermint/tmlibs/common"
cfg "github.com/tendermint/go-config"
)

View File

@ -4,8 +4,8 @@ import (
"time"
"github.com/pkg/errors"
cmn "github.com/tendermint/go-common"
events "github.com/tendermint/go-events"
cmn "github.com/tendermint/tmlibs/common"
events "github.com/tendermint/tmlibs/events"
"github.com/tendermint/tendermint/types"
)

View File

@ -5,7 +5,7 @@ import (
"github.com/pkg/errors"
data "github.com/tendermint/go-data"
events "github.com/tendermint/go-events"
events "github.com/tendermint/tmlibs/events"
"github.com/tendermint/go-rpc/client"
wire "github.com/tendermint/go-wire"
ctypes "github.com/tendermint/tendermint/rpc/tendermint/core/types"
@ -198,7 +198,7 @@ type WSEvents struct {
// used to maintain counts of actively listened events
// so we can properly subscribe/unsubscribe
// FIXME: thread-safety???
// FIXME: reuse code from go-events???
// FIXME: reuse code from tmlibs/events???
evtCount map[string]int // count how many time each event is subscribed
listeners map[string][]string // keep track of which events each listener is listening to
}

View File

@ -2,7 +2,7 @@ package core
import (
"fmt"
. "github.com/tendermint/go-common"
. "github.com/tendermint/tmlibs/common"
ctypes "github.com/tendermint/tendermint/rpc/tendermint/core/types"
"github.com/tendermint/tendermint/types"
)

View File

@ -8,7 +8,7 @@ import (
"google.golang.org/grpc"
. "github.com/tendermint/go-common"
. "github.com/tendermint/tmlibs/common"
)
// Start the grpcServer in a go routine

View File

@ -11,7 +11,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
abci "github.com/tendermint/abci/types"
. "github.com/tendermint/go-common"
. "github.com/tendermint/tmlibs/common"
rpc "github.com/tendermint/go-rpc/client"
"github.com/tendermint/tendermint/rpc/tendermint/core"
ctypes "github.com/tendermint/tendermint/rpc/tendermint/core/types"

View File

@ -10,7 +10,7 @@ import (
"time"
"github.com/stretchr/testify/require"
logger "github.com/tendermint/go-logger"
logger "github.com/tendermint/tmlibs/logger"
wire "github.com/tendermint/go-wire"
abci "github.com/tendermint/abci/types"

View File

@ -1,7 +1,7 @@
package state
import (
. "github.com/tendermint/go-common"
. "github.com/tendermint/tmlibs/common"
)
type (

View File

@ -6,7 +6,7 @@ import (
fail "github.com/ebuchman/fail-test"
abci "github.com/tendermint/abci/types"
. "github.com/tendermint/go-common"
. "github.com/tendermint/tmlibs/common"
crypto "github.com/tendermint/go-crypto"
"github.com/tendermint/tendermint/proxy"
"github.com/tendermint/tendermint/state/txindex"

View File

@ -7,7 +7,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/tendermint/abci/example/dummy"
crypto "github.com/tendermint/go-crypto"
dbm "github.com/tendermint/go-db"
dbm "github.com/tendermint/tmlibs/db"
cfg "github.com/tendermint/tendermint/config/tendermint_test"
"github.com/tendermint/tendermint/mempool"
"github.com/tendermint/tendermint/proxy"

View File

@ -1,7 +1,7 @@
package state
import (
"github.com/tendermint/go-logger"
"github.com/tendermint/tmlibs/logger"
)
var log = logger.New("module", "state")

View File

@ -7,9 +7,9 @@ import (
"time"
abci "github.com/tendermint/abci/types"
. "github.com/tendermint/go-common"
. "github.com/tendermint/tmlibs/common"
cfg "github.com/tendermint/go-config"
dbm "github.com/tendermint/go-db"
dbm "github.com/tendermint/tmlibs/db"
"github.com/tendermint/go-wire"
"github.com/tendermint/tendermint/state/txindex"
"github.com/tendermint/tendermint/state/txindex/null"

View File

@ -7,7 +7,7 @@ import (
"github.com/stretchr/testify/assert"
abci "github.com/tendermint/abci/types"
"github.com/tendermint/go-crypto"
dbm "github.com/tendermint/go-db"
dbm "github.com/tendermint/tmlibs/db"
"github.com/tendermint/tendermint/config/tendermint_test"
)

View File

@ -4,7 +4,7 @@ import (
"bytes"
"fmt"
db "github.com/tendermint/go-db"
db "github.com/tendermint/tmlibs/db"
"github.com/tendermint/go-wire"
"github.com/tendermint/tendermint/state/txindex"
"github.com/tendermint/tendermint/types"

View File

@ -8,7 +8,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
abci "github.com/tendermint/abci/types"
db "github.com/tendermint/go-db"
db "github.com/tendermint/tmlibs/db"
"github.com/tendermint/tendermint/state/txindex"
"github.com/tendermint/tendermint/types"
)

View File

@ -14,7 +14,7 @@ fi
# some libs are tested with go, others with make
# TODO: should be all make (post repo merge)
LIBS_GO_TEST=(go-clist go-common go-config go-crypto go-db go-events go-merkle go-p2p)
LIBS_GO_TEST=(tmlibs/clist tmlibs/common go-config go-crypto tmlibs/db tmlibs/events go-merkle go-p2p)
LIBS_MAKE_TEST=(go-rpc go-wire abci)
for lib in "${LIBS_GO_TEST[@]}"; do

View File

@ -8,7 +8,7 @@ import (
"strings"
"time"
. "github.com/tendermint/go-common"
. "github.com/tendermint/tmlibs/common"
"github.com/tendermint/go-merkle"
"github.com/tendermint/go-wire"
)

View File

@ -3,8 +3,8 @@ package types
import (
// for registering TMEventData as events.EventData
abci "github.com/tendermint/abci/types"
. "github.com/tendermint/go-common"
"github.com/tendermint/go-events"
. "github.com/tendermint/tmlibs/common"
"github.com/tendermint/tmlibs/events"
"github.com/tendermint/go-wire"
)

View File

@ -4,7 +4,7 @@ import (
"encoding/json"
"time"
. "github.com/tendermint/go-common"
. "github.com/tendermint/tmlibs/common"
"github.com/tendermint/go-crypto"
)

View File

@ -1,7 +1,7 @@
package types
import (
"github.com/tendermint/go-logger"
"github.com/tendermint/tmlibs/logger"
)
var log = logger.New("module", "types")

View File

@ -9,7 +9,7 @@ import (
"golang.org/x/crypto/ripemd160"
. "github.com/tendermint/go-common"
. "github.com/tendermint/tmlibs/common"
"github.com/tendermint/go-merkle"
"github.com/tendermint/go-wire"
)

View File

@ -5,7 +5,7 @@ import (
"io/ioutil"
"testing"
. "github.com/tendermint/go-common"
. "github.com/tendermint/tmlibs/common"
)
const (

View File

@ -9,7 +9,7 @@ import (
"os"
"sync"
. "github.com/tendermint/go-common"
. "github.com/tendermint/tmlibs/common"
"github.com/tendermint/go-crypto"
data "github.com/tendermint/go-data"
)

View File

@ -5,7 +5,7 @@ import (
"fmt"
"io"
//. "github.com/tendermint/go-common"
//. "github.com/tendermint/tmlibs/common"
"github.com/tendermint/go-crypto"
"github.com/tendermint/go-wire"
)

View File

@ -4,7 +4,7 @@ import (
"bytes"
"io"
. "github.com/tendermint/go-common"
. "github.com/tendermint/tmlibs/common"
"github.com/tendermint/go-merkle"
)

View File

@ -5,8 +5,8 @@ import (
"testing"
"github.com/stretchr/testify/assert"
cmn "github.com/tendermint/go-common"
ctest "github.com/tendermint/go-common/test"
cmn "github.com/tendermint/tmlibs/common"
ctest "github.com/tendermint/tmlibs/common/test"
wire "github.com/tendermint/go-wire"
)

View File

@ -5,7 +5,7 @@ import (
"fmt"
"io"
. "github.com/tendermint/go-common"
. "github.com/tendermint/tmlibs/common"
"github.com/tendermint/go-crypto"
"github.com/tendermint/go-wire"
)

View File

@ -6,7 +6,7 @@ import (
"sort"
"strings"
cmn "github.com/tendermint/go-common"
cmn "github.com/tendermint/tmlibs/common"
"github.com/tendermint/go-merkle"
"github.com/tendermint/go-wire"
)

View File

@ -5,7 +5,7 @@ import (
"strings"
"testing"
cmn "github.com/tendermint/go-common"
cmn "github.com/tendermint/tmlibs/common"
"github.com/tendermint/go-crypto"
)

View File

@ -5,7 +5,7 @@ import (
"fmt"
"io"
. "github.com/tendermint/go-common"
. "github.com/tendermint/tmlibs/common"
"github.com/tendermint/go-crypto"
"github.com/tendermint/go-wire"
)

View File

@ -6,7 +6,7 @@ import (
"strings"
"sync"
. "github.com/tendermint/go-common"
. "github.com/tendermint/tmlibs/common"
)
/*

View File

@ -3,8 +3,8 @@ package types
import (
"bytes"
. "github.com/tendermint/go-common"
. "github.com/tendermint/go-common/test"
. "github.com/tendermint/tmlibs/common"
. "github.com/tendermint/tmlibs/common/test"
"github.com/tendermint/go-crypto"
"testing"