mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-15 14:21:22 +00:00
fixes and version bump
This commit is contained in:
@ -27,7 +27,7 @@ BUG FIXES:
|
|||||||
- Graceful handling/recovery for apps that have non-determinism or fail to halt
|
- Graceful handling/recovery for apps that have non-determinism or fail to halt
|
||||||
- Graceful handling/recovery for violations of safety, or liveness
|
- Graceful handling/recovery for violations of safety, or liveness
|
||||||
|
|
||||||
## 0.13.0 (TBA)
|
## 0.13.0 (December 6, 2017)
|
||||||
|
|
||||||
BREAKING CHANGES:
|
BREAKING CHANGES:
|
||||||
- abci: update to v0.8 using gogo/protobuf; includes tx tags, vote info in RequestBeginBlock, data.Bytes everywhere, use int64, etc.
|
- abci: update to v0.8 using gogo/protobuf; includes tx tags, vote info in RequestBeginBlock, data.Bytes everywhere, use int64, etc.
|
||||||
@ -38,6 +38,7 @@ BREAKING CHANGES:
|
|||||||
- rpc/client: WaitForOneEvent takes an EventsClient instead of types.EventSwitch
|
- rpc/client: WaitForOneEvent takes an EventsClient instead of types.EventSwitch
|
||||||
- rpc/client: Add/RemoveListenerForEvent are now Subscribe/Unsubscribe
|
- rpc/client: Add/RemoveListenerForEvent are now Subscribe/Unsubscribe
|
||||||
- rpc: `/subscribe` and `/unsubscribe` take `query` arg instead of `event`
|
- rpc: `/subscribe` and `/unsubscribe` take `query` arg instead of `event`
|
||||||
|
- rpc/core/types: ResultABCIQuery wraps an abci.ResponseQuery
|
||||||
- mempool: cached transactions return an error instead of an ABCI response with BadNonce
|
- mempool: cached transactions return an error instead of an ABCI response with BadNonce
|
||||||
|
|
||||||
FEATURES:
|
FEATURES:
|
||||||
|
@ -2,9 +2,11 @@ package benchmarks
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/tendermint/go-crypto"
|
"github.com/tendermint/go-crypto"
|
||||||
"github.com/tendermint/go-wire"
|
"github.com/tendermint/go-wire"
|
||||||
|
|
||||||
proto "github.com/tendermint/tendermint/benchmarks/proto"
|
proto "github.com/tendermint/tendermint/benchmarks/proto"
|
||||||
"github.com/tendermint/tendermint/p2p"
|
"github.com/tendermint/tendermint/p2p"
|
||||||
ctypes "github.com/tendermint/tendermint/rpc/core/types"
|
ctypes "github.com/tendermint/tendermint/rpc/core/types"
|
||||||
@ -26,7 +28,7 @@ func BenchmarkEncodeStatusWire(b *testing.B) {
|
|||||||
PubKey: pubKey,
|
PubKey: pubKey,
|
||||||
LatestBlockHash: []byte("SOMEBYTES"),
|
LatestBlockHash: []byte("SOMEBYTES"),
|
||||||
LatestBlockHeight: 123,
|
LatestBlockHeight: 123,
|
||||||
LatestBlockTime: 1234,
|
LatestBlockTime: time.Unix(0, 1234),
|
||||||
}
|
}
|
||||||
b.StartTimer()
|
b.StartTimer()
|
||||||
|
|
||||||
|
4
glide.lock
generated
4
glide.lock
generated
@ -1,5 +1,5 @@
|
|||||||
hash: 09fc7f59ca6b718fe236368bb55f4801455295cfe455ea5865d544ee4dcfdc08
|
hash: 09fc7f59ca6b718fe236368bb55f4801455295cfe455ea5865d544ee4dcfdc08
|
||||||
updated: 2017-12-06T02:43:52.419328535-05:00
|
updated: 2017-12-06T03:31:34.476581624-05:00
|
||||||
imports:
|
imports:
|
||||||
- name: github.com/btcsuite/btcd
|
- name: github.com/btcsuite/btcd
|
||||||
version: 2e60448ffcc6bf78332d1fe590260095f554dd78
|
version: 2e60448ffcc6bf78332d1fe590260095f554dd78
|
||||||
@ -103,7 +103,7 @@ imports:
|
|||||||
- leveldb/table
|
- leveldb/table
|
||||||
- leveldb/util
|
- leveldb/util
|
||||||
- name: github.com/tendermint/abci
|
- name: github.com/tendermint/abci
|
||||||
version: 12dca48768bbc0ac0f345a8505166874daf1f8ec
|
version: fca2b508c185b855af1446ec4afc19bdfc7b315d
|
||||||
subpackages:
|
subpackages:
|
||||||
- client
|
- client
|
||||||
- example/code
|
- example/code
|
||||||
|
@ -32,7 +32,7 @@ func (a ABCIApp) ABCIQuery(path string, data data.Bytes) (*ctypes.ResultABCIQuer
|
|||||||
|
|
||||||
func (a ABCIApp) ABCIQueryWithOptions(path string, data data.Bytes, opts client.ABCIQueryOptions) (*ctypes.ResultABCIQuery, error) {
|
func (a ABCIApp) ABCIQueryWithOptions(path string, data data.Bytes, opts client.ABCIQueryOptions) (*ctypes.ResultABCIQuery, error) {
|
||||||
q := a.App.Query(abci.RequestQuery{data, path, opts.Height, opts.Trusted})
|
q := a.App.Query(abci.RequestQuery{data, path, opts.Height, opts.Trusted})
|
||||||
return &ctypes.ResultABCIQuery{&q}, nil
|
return &ctypes.ResultABCIQuery{q}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a ABCIApp) BroadcastTxCommit(tx types.Tx) (*ctypes.ResultBroadcastTxCommit, error) {
|
func (a ABCIApp) BroadcastTxCommit(tx types.Tx) (*ctypes.ResultBroadcastTxCommit, error) {
|
||||||
@ -91,7 +91,7 @@ func (m ABCIMock) ABCIQueryWithOptions(path string, data data.Bytes, opts client
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
resQuery := res.(abci.ResponseQuery)
|
resQuery := res.(abci.ResponseQuery)
|
||||||
return &ctypes.ResultABCIQuery{&resQuery}, nil
|
return &ctypes.ResultABCIQuery{resQuery}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m ABCIMock) BroadcastTxCommit(tx types.Tx) (*ctypes.ResultBroadcastTxCommit, error) {
|
func (m ABCIMock) BroadcastTxCommit(tx types.Tx) (*ctypes.ResultBroadcastTxCommit, error) {
|
||||||
|
@ -51,7 +51,8 @@ func TestABCIMock(t *testing.T) {
|
|||||||
assert.Equal("foobar", err.Error())
|
assert.Equal("foobar", err.Error())
|
||||||
|
|
||||||
// query always returns the response
|
// query always returns the response
|
||||||
query, err := m.ABCIQueryWithOptions("/", nil, client.ABCIQueryOptions{Trusted: true})
|
_query, err := m.ABCIQueryWithOptions("/", nil, client.ABCIQueryOptions{Trusted: true})
|
||||||
|
query := _query.Response
|
||||||
require.Nil(err)
|
require.Nil(err)
|
||||||
require.NotNil(query)
|
require.NotNil(query)
|
||||||
assert.EqualValues(key, query.Key)
|
assert.EqualValues(key, query.Key)
|
||||||
@ -173,7 +174,8 @@ func TestABCIApp(t *testing.T) {
|
|||||||
assert.True(res.DeliverTx.IsOK())
|
assert.True(res.DeliverTx.IsOK())
|
||||||
|
|
||||||
// check the key
|
// check the key
|
||||||
qres, err := m.ABCIQueryWithOptions("/key", data.Bytes(key), client.ABCIQueryOptions{Trusted: true})
|
_qres, err := m.ABCIQueryWithOptions("/key", data.Bytes(key), client.ABCIQueryOptions{Trusted: true})
|
||||||
|
qres := _qres.Response
|
||||||
require.Nil(err)
|
require.Nil(err)
|
||||||
assert.EqualValues(value, qres.Value)
|
assert.EqualValues(value, qres.Value)
|
||||||
}
|
}
|
||||||
|
@ -111,7 +111,8 @@ func TestABCIQuery(t *testing.T) {
|
|||||||
|
|
||||||
// wait before querying
|
// wait before querying
|
||||||
client.WaitForHeight(c, apph, nil)
|
client.WaitForHeight(c, apph, nil)
|
||||||
qres, err := c.ABCIQuery("/key", k)
|
res, err := c.ABCIQuery("/key", k)
|
||||||
|
qres := res.Response
|
||||||
if assert.Nil(t, err) && assert.True(t, qres.IsOK()) {
|
if assert.Nil(t, err) && assert.True(t, qres.IsOK()) {
|
||||||
assert.EqualValues(t, v, qres.Value)
|
assert.EqualValues(t, v, qres.Value)
|
||||||
}
|
}
|
||||||
@ -146,7 +147,8 @@ func TestAppCalls(t *testing.T) {
|
|||||||
if err := client.WaitForHeight(c, apph, nil); err != nil {
|
if err := client.WaitForHeight(c, apph, nil); err != nil {
|
||||||
t.Error(err)
|
t.Error(err)
|
||||||
}
|
}
|
||||||
qres, err := c.ABCIQueryWithOptions("/key", k, client.ABCIQueryOptions{Trusted: true})
|
_qres, err := c.ABCIQueryWithOptions("/key", k, client.ABCIQueryOptions{Trusted: true})
|
||||||
|
qres := _qres.Response
|
||||||
if assert.Nil(err) && assert.True(qres.IsOK()) {
|
if assert.Nil(err) && assert.True(qres.IsOK()) {
|
||||||
// assert.Equal(k, data.GetKey()) // only returned for proofs
|
// assert.Equal(k, data.GetKey()) // only returned for proofs
|
||||||
assert.EqualValues(v, qres.Value)
|
assert.EqualValues(v, qres.Value)
|
||||||
@ -194,7 +196,8 @@ func TestAppCalls(t *testing.T) {
|
|||||||
assert.Equal(block.Block.LastCommit, commit2.Commit)
|
assert.Equal(block.Block.LastCommit, commit2.Commit)
|
||||||
|
|
||||||
// and we got a proof that works!
|
// and we got a proof that works!
|
||||||
pres, err := c.ABCIQueryWithOptions("/key", k, client.ABCIQueryOptions{Trusted: false})
|
_pres, err := c.ABCIQueryWithOptions("/key", k, client.ABCIQueryOptions{Trusted: false})
|
||||||
|
pres := _pres.Response
|
||||||
if assert.Nil(err) && assert.True(pres.IsOK()) {
|
if assert.Nil(err) && assert.True(pres.IsOK()) {
|
||||||
proof, err := iavl.ReadKeyExistsProof(pres.Proof)
|
proof, err := iavl.ReadKeyExistsProof(pres.Proof)
|
||||||
if assert.Nil(err) {
|
if assert.Nil(err) {
|
||||||
|
@ -58,9 +58,7 @@ func ABCIQuery(path string, data data.Bytes, height int64, trusted bool) (*ctype
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
logger.Info("ABCIQuery", "path", path, "data", data, "result", resQuery)
|
logger.Info("ABCIQuery", "path", path, "data", data, "result", resQuery)
|
||||||
return &ctypes.ResultABCIQuery{
|
return &ctypes.ResultABCIQuery{*resQuery}, nil
|
||||||
resQuery,
|
|
||||||
}, nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get some info about the application.
|
// Get some info about the application.
|
||||||
|
@ -53,7 +53,7 @@ type ResultStatus struct {
|
|||||||
LatestBlockHash data.Bytes `json:"latest_block_hash"`
|
LatestBlockHash data.Bytes `json:"latest_block_hash"`
|
||||||
LatestAppHash data.Bytes `json:"latest_app_hash"`
|
LatestAppHash data.Bytes `json:"latest_app_hash"`
|
||||||
LatestBlockHeight int64 `json:"latest_block_height"`
|
LatestBlockHeight int64 `json:"latest_block_height"`
|
||||||
LatestBlockTime time.Time `json:"latest_block_time"` // nano
|
LatestBlockTime time.Time `json:"latest_block_time"`
|
||||||
Syncing bool `json:"syncing"`
|
Syncing bool `json:"syncing"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -129,7 +129,7 @@ type ResultABCIInfo struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type ResultABCIQuery struct {
|
type ResultABCIQuery struct {
|
||||||
*abci.ResponseQuery `json:"response"`
|
Response abci.ResponseQuery `json:"response"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ResultUnsafeFlushMempool struct{}
|
type ResultUnsafeFlushMempool struct{}
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
package version
|
package version
|
||||||
|
|
||||||
const Maj = "0"
|
const Maj = "0"
|
||||||
const Min = "12"
|
const Min = "13"
|
||||||
const Fix = "1"
|
const Fix = "0"
|
||||||
|
|
||||||
var (
|
var (
|
||||||
// Version is the current version of Tendermint
|
// Version is the current version of Tendermint
|
||||||
// Must be a string because scripts like dist.sh read this file.
|
// Must be a string because scripts like dist.sh read this file.
|
||||||
Version = "0.12.1"
|
Version = "0.13.0"
|
||||||
|
|
||||||
// GitCommit is the current HEAD set using ldflags.
|
// GitCommit is the current HEAD set using ldflags.
|
||||||
GitCommit string
|
GitCommit string
|
||||||
|
Reference in New Issue
Block a user