Skip to content

Commit

Permalink
Update Tendermint and bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
danil-lashin committed Oct 24, 2018
1 parent 7cbb2d9 commit 8ea94d8
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 49 deletions.
39 changes: 14 additions & 25 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@

[[constraint]]
name = "github.com/danil-lashin/iavl"
branch = "master"
branch = "develop"

[[constraint]]
name = "github.com/tendermint/tendermint"
version = "=v0.25.1-rc0"
branch = "develop"

[[constraint]]
branch = "v1"
Expand Down
2 changes: 1 addition & 1 deletion api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ var (

const (
SimultReqLimit = 100
LimitPerClient = 100
LimitPerClient = 300
LimitWindow = 1 * time.Minute
)

Expand Down
4 changes: 1 addition & 3 deletions api/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,7 @@ func Block(w http.ResponseWriter, r *http.Request) {

precommits, _ := cdc.MarshalJSON(block.Block.LastCommit.Precommits)

encodedBlock, _ := cdc.MarshalBinary(block)

size := len(encodedBlock)
size := len(cdc.MustMarshalBinaryLengthPrefixed(block))

var eventsRaw []byte

Expand Down
16 changes: 8 additions & 8 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
tmConfig "github.com/tendermint/tendermint/config"
"os"
"path/filepath"
"time"
)

var (
Expand Down Expand Up @@ -57,17 +58,16 @@ func DefaultConfig() *Config {
cfg.Mempool.CacheSize = 100000
cfg.Mempool.WalPath = "tmdata/mempool.wal"
cfg.Mempool.Recheck = true
cfg.Mempool.RecheckEmpty = true
cfg.Mempool.Size = 10000

cfg.Consensus.WalPath = "tmdata/cs.wal/wal"
cfg.Consensus.TimeoutPropose = 2000
cfg.Consensus.TimeoutProposeDelta = 500
cfg.Consensus.TimeoutPrevote = 1000
cfg.Consensus.TimeoutPrevoteDelta = 500
cfg.Consensus.TimeoutPrecommit = 1000
cfg.Consensus.TimeoutPrecommitDelta = 500
cfg.Consensus.TimeoutCommit = 4500
cfg.Consensus.TimeoutPropose = 2 * time.Second
cfg.Consensus.TimeoutProposeDelta = 500 * time.Millisecond
cfg.Consensus.TimeoutPrevote = 1 * time.Second
cfg.Consensus.TimeoutPrevoteDelta = 500 * time.Millisecond
cfg.Consensus.TimeoutPrecommit = 1 * time.Second
cfg.Consensus.TimeoutPrecommitDelta = 500 * time.Millisecond
cfg.Consensus.TimeoutCommit = 4500 * time.Millisecond

cfg.PrivValidator = "config/priv_validator.json"

Expand Down
3 changes: 1 addition & 2 deletions config/toml.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ addr_book_file = "{{ js .P2P.AddrBook }}"
addr_book_strict = {{ .P2P.AddrBookStrict }}
# Time to wait before flushing messages out on the connection, in ms
flush_throttle_timeout = {{ .P2P.FlushThrottleTimeout }}
flush_throttle_timeout = "{{ .P2P.FlushThrottleTimeout }}"
# Maximum number of inbound peers
max_num_inbound_peers = {{ .P2P.MaxNumInboundPeers }}
Expand Down Expand Up @@ -191,7 +191,6 @@ private_peer_ids = "{{ .P2P.PrivatePeerIDs }}"
[mempool]
recheck = {{ .Mempool.Recheck }}
recheck_empty = {{ .Mempool.RecheckEmpty }}
broadcast = {{ .Mempool.Broadcast }}
wal_dir = "{{ js .Mempool.WalPath }}"
Expand Down
4 changes: 2 additions & 2 deletions core/minter/minter.go
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ func (app *Blockchain) getCurrentValidators() abciTypes.ValidatorUpdates {

var vals abciTypes.ValidatorUpdates

err := cdc.UnmarshalBinary(result, &vals)
err := cdc.UnmarshalBinaryLengthPrefixed(result, &vals)

if err != nil {
panic(err)
Expand All @@ -388,7 +388,7 @@ func (app *Blockchain) getCurrentValidators() abciTypes.ValidatorUpdates {
}

func (app *Blockchain) saveCurrentValidators(vals abciTypes.ValidatorUpdates) {
data, err := cdc.MarshalBinary(vals)
data, err := cdc.MarshalBinaryLengthPrefixed(vals)

if err != nil {
panic(err)
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: "3.4"
services:
minter:
image: minterteam/minter:0.5.2
image: minterteam/minter:0.6.0
volumes:
- ~/.minter:/minter
ports:
Expand Down
4 changes: 2 additions & 2 deletions eventsdb/eventsdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func (db *EventsDB) FlushEvents(height int64) error {
}

events := db.getEvents(height)
bytes, err := cdc.MarshalBinary(events)
bytes, err := cdc.MarshalBinaryLengthPrefixed(events)

if err != nil {
return err
Expand All @@ -135,7 +135,7 @@ func (db *EventsDB) LoadEvents(height int64) Events {
}

var decoded Events
err := cdc.UnmarshalBinary(data, &decoded)
err := cdc.UnmarshalBinaryLengthPrefixed(data, &decoded)

if err != nil {
panic(err)
Expand Down
6 changes: 3 additions & 3 deletions version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ package version
// Version components
const (
Maj = "0"
Min = "5"
Fix = "2"
Min = "6"
Fix = "0"
)

var (
// Must be a string because scripts like dist.sh read this file.
Version = "0.5.2"
Version = "0.6.0"

// GitCommit is the current HEAD set using ldflags.
GitCommit string
Expand Down

0 comments on commit 8ea94d8

Please sign in to comment.