diff --git a/CHANGELOG.md b/CHANGELOG.md index ff8861a5f..27d5656b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## TBA +## 0.22.5 + +*July 23th, 2018* + BREAKING CHANGES: - [crypto] Refactor `tendermint/crypto` into many subpackages - [libs/common] remove exponentially distributed random numbers @@ -9,10 +13,13 @@ BREAKING CHANGES: IMPROVEMENTS: - [abci, libs/common] Generated gogoproto static marshaller methods - [config] Increase default send/recv rates to 5 mB/s +- [p2p] allow persistent peers to be private BUG FIXES - [mempool] fixed a race condition when `create_empty_blocks=false` where a transaction is published at an old height. +- [p2p] dial external IP setup by `persistent_peers`, not internal NAT IP +- [rpc] make `/status` RPC endpoint resistant to consensus halt ## 0.22.4 @@ -28,7 +35,8 @@ FEATURES: BUG FIXES: - [tools/tm-bench] Various fixes - [consensus] Wait for WAL to stop on shutdown -- [abci] Fix #1891, pending requests cannot hang when abci server dies. Previously a crash in BeginBlock could leave tendermint in broken state. +- [abci] Fix #1891, pending requests cannot hang when abci server dies. + Previously a crash in BeginBlock could leave tendermint in broken state. ## 0.22.3 diff --git a/crypto/armor/armor.go b/crypto/armor/armor.go index 4146048ad..c15d070e6 100644 --- a/crypto/armor/armor.go +++ b/crypto/armor/armor.go @@ -1,4 +1,4 @@ -package crypto +package armor import ( "bytes" diff --git a/crypto/armor/armor_test.go b/crypto/armor/armor_test.go index 5eae87c00..4aa23b211 100644 --- a/crypto/armor/armor_test.go +++ b/crypto/armor/armor_test.go @@ -1,4 +1,4 @@ -package crypto +package armor import ( "testing" diff --git a/crypto/encoding/amino/amino.go b/crypto/encoding/amino/amino.go index c393a3fa7..2b5e15b4f 100644 --- a/crypto/encoding/amino/amino.go +++ b/crypto/encoding/amino/amino.go @@ -1,4 +1,4 @@ -package crypto +package cryptoAmino import ( amino "github.com/tendermint/go-amino" diff --git a/crypto/encoding/amino/encode_test.go b/crypto/encoding/amino/encode_test.go index 74812aa62..e01206089 100644 --- a/crypto/encoding/amino/encode_test.go +++ b/crypto/encoding/amino/encode_test.go @@ -1,4 +1,4 @@ -package crypto +package cryptoAmino import ( "os" diff --git a/crypto/xsalsa20Symmetric/symmetric.go b/crypto/xsalsa20symmetric/symmetric.go similarity index 98% rename from crypto/xsalsa20Symmetric/symmetric.go rename to crypto/xsalsa20symmetric/symmetric.go index c7cd56752..d2369675d 100644 --- a/crypto/xsalsa20Symmetric/symmetric.go +++ b/crypto/xsalsa20symmetric/symmetric.go @@ -1,4 +1,4 @@ -package crypto +package xsalsa20symmetric import ( "errors" diff --git a/crypto/xsalsa20Symmetric/symmetric_test.go b/crypto/xsalsa20symmetric/symmetric_test.go similarity index 97% rename from crypto/xsalsa20Symmetric/symmetric_test.go rename to crypto/xsalsa20symmetric/symmetric_test.go index 704049e37..d955307ea 100644 --- a/crypto/xsalsa20Symmetric/symmetric_test.go +++ b/crypto/xsalsa20symmetric/symmetric_test.go @@ -1,4 +1,4 @@ -package crypto +package xsalsa20symmetric import ( "testing" diff --git a/mempool/mempool.go b/mempool/mempool.go index 9f591bf90..e1ed4f260 100644 --- a/mempool/mempool.go +++ b/mempool/mempool.go @@ -78,7 +78,7 @@ type Mempool struct { recheckCursor *clist.CElement // next expected response recheckEnd *clist.CElement // re-checking stops here notifiedTxsAvailable bool - txsAvailable chan bool // fires once for each height, when the mempool is not empty + txsAvailable chan struct{} // fires once for each height, when the mempool is not empty // Keep a cache of already-seen txs. // This reduces the pressure on the proxyApp. @@ -130,7 +130,7 @@ func NewMempool( // ensuring it will trigger once every height when transactions are available. // NOTE: not thread safe - should only be called once, on startup func (mem *Mempool) EnableTxsAvailable() { - mem.txsAvailable = make(chan bool, 1) + mem.txsAvailable = make(chan struct{}, 1) } // SetLogger sets the Logger. @@ -348,7 +348,7 @@ func (mem *Mempool) resCbRecheck(req *abci.Request, res *abci.Response) { // TxsAvailable returns a channel which fires once for every height, // and only when transactions are available in the mempool. // NOTE: the returned channel may be nil if EnableTxsAvailable was not called. -func (mem *Mempool) TxsAvailable() <-chan bool { +func (mem *Mempool) TxsAvailable() <-chan struct{} { return mem.txsAvailable } @@ -360,7 +360,7 @@ func (mem *Mempool) notifyTxsAvailable() { // channel cap is 1, so this will send once mem.notifiedTxsAvailable = true select { - case mem.txsAvailable <- true: + case mem.txsAvailable <- struct{}{}: default: } } diff --git a/mempool/mempool_test.go b/mempool/mempool_test.go index b09bdf0ea..acaa17eec 100644 --- a/mempool/mempool_test.go +++ b/mempool/mempool_test.go @@ -38,7 +38,7 @@ func newMempoolWithApp(cc proxy.ClientCreator) *Mempool { return mempool } -func ensureNoFire(t *testing.T, ch <-chan bool, timeoutMS int) { +func ensureNoFire(t *testing.T, ch <-chan struct{}, timeoutMS int) { timer := time.NewTimer(time.Duration(timeoutMS) * time.Millisecond) select { case <-ch: @@ -47,7 +47,7 @@ func ensureNoFire(t *testing.T, ch <-chan bool, timeoutMS int) { } } -func ensureFire(t *testing.T, ch <-chan bool, timeoutMS int) { +func ensureFire(t *testing.T, ch <-chan struct{}, timeoutMS int) { timer := time.NewTimer(time.Duration(timeoutMS) * time.Millisecond) select { case <-ch: diff --git a/p2p/switch.go b/p2p/switch.go index 77c64fca8..636ca6d8e 100644 --- a/p2p/switch.go +++ b/p2p/switch.go @@ -283,7 +283,9 @@ func (sw *Switch) StopPeerForError(peer Peer, reason interface{}) { if peer.IsPersistent() { addr := peer.OriginalAddr() if addr == nil { - panic(fmt.Sprintf("persistent peer %v with no original address", peer)) + // FIXME: persistent peers can't be inbound right now. + // self-reported address for inbound persistent peers + addr = peer.NodeInfo().NetAddress() } go sw.reconnectToPeer(addr) } diff --git a/state/services.go b/state/services.go index 228a449f1..c51fa9752 100644 --- a/state/services.go +++ b/state/services.go @@ -27,7 +27,7 @@ type Mempool interface { Flush() FlushAppConn() error - TxsAvailable() <-chan bool + TxsAvailable() <-chan struct{} EnableTxsAvailable() } @@ -43,7 +43,7 @@ func (m MockMempool) Reap(n int) types.Txs { retur func (m MockMempool) Update(height int64, txs types.Txs) error { return nil } func (m MockMempool) Flush() {} func (m MockMempool) FlushAppConn() error { return nil } -func (m MockMempool) TxsAvailable() <-chan bool { return make(chan bool) } +func (m MockMempool) TxsAvailable() <-chan struct{} { return make(chan struct{}) } func (m MockMempool) EnableTxsAvailable() {} //------------------------------------------------------ diff --git a/version/version.go b/version/version.go index 165f25829..706264372 100644 --- a/version/version.go +++ b/version/version.go @@ -4,13 +4,13 @@ package version const ( Maj = "0" Min = "22" - Fix = "4" + Fix = "5" ) var ( // Version is the current version of Tendermint // Must be a string because scripts like dist.sh read this file. - Version = "0.22.4" + Version = "0.22.5" // GitCommit is the current HEAD set using ldflags. GitCommit string