- [mempool] [\#2882](https://github.com/tendermint/tendermint/issues/2882) Add txs from Update to cache
- [mempool] [\#2891](https://github.com/tendermint/tendermint/issues/2891) Remove local int64 counter from being stored in every tx
- [node] [\#2866](https://github.com/tendermint/tendermint/issues/2866) Add ability to instantiate IPCVal (@joe-bowman)
### BUG FIXES:
- [blockchain] [\#2731](https://github.com/tendermint/tendermint/issues/2731) Retry both blocks if either is bad to avoid getting stuck during fast sync (@goolAdapter)
- [consensus] [\#2893](https://github.com/tendermint/tendermint/issues/2893) Use genDoc.Validators instead of state.NextValidators on replay when appHeight==0 (@james-ray)
- [log] [\#2868](https://github.com/tendermint/tendermint/issues/2868) Fix `module=main` setting overriding all others
- NOTE: this changes the default logging behaviour to be much less verbose.
Set `log_level="info"` to restore the previous behaviour.
- [rpc] [\#2808](https://github.com/tendermint/tendermint/issues/2808) Fix `accum` field in `/validators` by calling `IncrementAccum` if necessary
- [rpc] [\#2811](https://github.com/tendermint/tendermint/issues/2811) Allow integer IDs in JSON-RPC requests (@tomtau)
- [txindex/kv] [\#2759](https://github.com/tendermint/tendermint/issues/2759) Fix tx.height range queries
- [txindex/kv] [\#2775](https://github.com/tendermint/tendermint/issues/2775) Order tx results by index if height is the same
- [txindex/kv] [\#2908](https://github.com/tendermint/tendermint/issues/2908) Don't return false positives when searching for a prefix of a tag value
redoChannel chan p2p.ID //redo may send multi-time; peerId is used to identify repeat
}
}
```
```
Pool is core data structure that stores last executed block (`height`), assignment of requests to peers (`requesters`), current height for each peer and number of pending requests for each peer (`peers`), maximum peer height, etc.
Pool is a core data structure that stores last executed block (`height`), assignment of requests to peers (`requesters`), current height for each peer and number of pending requests for each peer (`peers`), maximum peer height, etc.
```go
```go
type Pool {
type Pool {
mtx Mutex
requesters map[int64]*Requester
height int64
peers map[p2p.ID]*Peer
maxPeerHeight int64
numPending int32
store BlockStore
requestsChannel chan<-BlockRequest
errorsChannel chan<-peerError
mtx Mutex
requesters map[int64]*Requester
height int64
peers map[p2p.ID]*Peer
maxPeerHeight int64
numPending int32
store BlockStore
requestsChannel chan<-BlockRequest
errorsChannel chan<-peerError
}
}
```
```
@ -90,11 +90,11 @@ Peer data structure stores for each peer current `height` and number of pending
```go
```go
type Peer struct {
type Peer struct {
id p2p.ID
height int64
numPending int32
timeout *time.Timer
didTimeout bool
id p2p.ID
height int64
numPending int32
timeout *time.Timer
didTimeout bool
}
}
```
```
@ -169,11 +169,11 @@ Requester task is responsible for fetching a single block at position `height`.
```go
```go
fetchBlock(height, pool):
fetchBlock(height, pool):
while true do
while true do {
peerID = nil
peerID = nil
block = nil
block = nil
peer = pickAvailablePeer(height)
peer = pickAvailablePeer(height)
peerId = peer.id
peerID = peer.id
enqueue BlockRequest(height, peerID) to pool.requestsChannel
enqueue BlockRequest(height, peerID) to pool.requestsChannel
redo = false
redo = false
@ -181,12 +181,15 @@ fetchBlock(height, pool):
select {
select {
upon receiving Quit message do
upon receiving Quit message do
return
return
upon receiving message on redoChannel do
mtx.Lock()
pool.numPending++
redo = true
mtx.UnLock()
upon receiving redo message with id on redoChannel do
if peerID == id {
mtx.Lock()
pool.numPending++
redo = true
mtx.UnLock()
}
}
}
}
pickAvailablePeer(height):
pickAvailablePeer(height):
selectedPeer = nil
selectedPeer = nil
@ -244,7 +247,7 @@ createRequesters(pool):
main(pool):
main(pool):
create trySyncTicker with interval trySyncIntervalMS
create trySyncTicker with interval trySyncIntervalMS
create statusUpdateTicker with interval statusUpdateIntervalSeconds
create statusUpdateTicker with interval statusUpdateIntervalSeconds
create switchToConsensusTicker with interbal switchToConsensusIntervalSeconds
create switchToConsensusTicker with interval switchToConsensusIntervalSeconds