Skip to content
This repository has been archived by the owner on May 13, 2022. It is now read-only.

Commit

Permalink
Merge pull request #510 from eris-ltd/feature-tendermint_0.8.0
Browse files Browse the repository at this point in the history
Upgrade Tendermint to 0.8.0
  • Loading branch information
benjaminbollen authored Feb 24, 2017
2 parents 32dd82d + 8af5ac0 commit 469895a
Show file tree
Hide file tree
Showing 29 changed files with 217 additions and 700 deletions.
10 changes: 7 additions & 3 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ deployment:
- docker push quay.io/eris/db
# push the updated documentation
- docs/build.sh
develop:
branch: develop
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS quay.io
# build docker image and tag the image with the version
- tests/build_tool.sh
- docker push quay.io/eris/db
master:
branch: master
commands:
Expand All @@ -77,6 +84,3 @@ deployment:
- docker push quay.io/eris/db
# push the updated documentation
- docs/build.sh



16 changes: 8 additions & 8 deletions config/templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const separatorChainConsensus = `
const sectionChainConsensus = ` [chain.consensus]
# consensus defines the module to use for consensus and
# this will define the peer-to-peer consensus network;
# accepted values are ("noops", "tmsp",) "tendermint"
# accepted values are ("noops", "abci",) "tendermint"
name = "{{.Name}}"
# version is the major and minor semantic version;
# the version will be asserted on
Expand Down Expand Up @@ -181,17 +181,17 @@ const separatorModules = `
`

// TODO: [ben] make configurable
const sectionTmsp = `
const sectionabci = `
################################################################################
##
## Tendermint Socket Protocol (TMSP)
## Tendermint Socket Protocol (abci)
## version 0.6.0
##
## TMSP expects a tendermint consensus process to run and connect to Eris-DB
## abci expects a tendermint consensus process to run and connect to Eris-DB
##
################################################################################
[tmsp]
[abci]
# listener address for accepting tendermint socket protocol connections
listener = "tcp://0.0.0.0:46658"
Expand All @@ -202,7 +202,7 @@ const sectionTendermint = `
################################################################################
##
## Tendermint
## version 0.6.0
## version 0.6
##
## in-process execution of Tendermint consensus engine
##
Expand Down Expand Up @@ -241,7 +241,7 @@ private_validator_file = "priv_validator.json"
# NOTE: value is ignored when run in-process as RPC is
# handled by [servers.tendermint]
rpc_laddr = "0.0.0.0:46657"
# proxy application address - used for tmsp connections,
# proxy application address - used for abci connections,
# and this port should not be exposed for in-process Tendermint
proxy_app = "tcp://127.0.0.1:46658"
Expand Down Expand Up @@ -297,7 +297,7 @@ const sectionErisMint = `
################################################################################
##
## Eris-Mint
## version 0.16.0
## version 0.16
##
## The original Ethereum virtual machine with IAVL merkle trees
## and tendermint/go-wire encoding
Expand Down
3 changes: 0 additions & 3 deletions consensus/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ package consensus
import (
// noops "github.com/eris-ltd/eris-db/consensus/noops"
tendermint "github.com/eris-ltd/eris-db/consensus/tendermint"
tmsp "github.com/eris-ltd/eris-db/consensus/tmsp"
)

//------------------------------------------------------------------------------
Expand All @@ -29,8 +28,6 @@ func AssertValidConsensusModule(name, minorVersionString string) bool {
// noops should not have any external interfaces that can change
// over iterations
return true
case "tmsp":
return minorVersionString == tmsp.GetTmspVersion().GetMinorVersionString()
case "tendermint":
return minorVersionString == tendermint.GetTendermintVersion().GetMinorVersionString()
case "bigchaindb":
Expand Down
17 changes: 14 additions & 3 deletions consensus/tendermint/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ func GetTendermintConfig(loadedConfig *viper.Viper) *TendermintConfig {
//------------------------------------------------------------------------------
// Tendermint defaults

//
// Contract
//

func (tmintConfig *TendermintConfig) AssertTendermintDefaults(chainId, workDir,
dataDir, rootDir string) {

Expand All @@ -64,17 +68,21 @@ func (tmintConfig *TendermintConfig) AssertTendermintDefaults(chainId, workDir,
tmintConfig.SetDefault("fast_sync", true)
tmintConfig.SetDefault("skip_upnp", false)
tmintConfig.SetDefault("addrbook_file", path.Join(rootDir, "addrbook.json"))
tmintConfig.SetDefault("addrbook_strict", true) // disable to allow connections locally
tmintConfig.SetDefault("pex_reactor", false) // enable for peer exchange
tmintConfig.SetDefault("priv_validator_file", path.Join(rootDir, "priv_validator.json"))
tmintConfig.SetDefault("db_backend", "leveldb")
tmintConfig.SetDefault("db_dir", dataDir)
tmintConfig.SetDefault("log_level", "info")
tmintConfig.SetDefault("rpc_laddr", "")
tmintConfig.SetDefault("prof_laddr", "")
tmintConfig.SetDefault("revision_file", path.Join(workDir, "revision"))
tmintConfig.SetDefault("cswal", path.Join(dataDir, "cswal"))
tmintConfig.SetDefault("cswal_light", false)
tmintConfig.SetDefault("cs_wal_dir", path.Join(dataDir, "cs.wal"))
tmintConfig.SetDefault("cs_wal_light", false)
tmintConfig.SetDefault("filter_peers", false)

tmintConfig.SetDefault("block_size", 10000)
tmintConfig.SetDefault("block_size", 10000) // max number of txs
tmintConfig.SetDefault("block_part_size", 65536) // part size 64K
tmintConfig.SetDefault("disable_data_hash", false)
tmintConfig.SetDefault("timeout_propose", 3000)
tmintConfig.SetDefault("timeout_propose_delta", 500)
Expand All @@ -83,9 +91,12 @@ func (tmintConfig *TendermintConfig) AssertTendermintDefaults(chainId, workDir,
tmintConfig.SetDefault("timeout_precommit", 1000)
tmintConfig.SetDefault("timeout_precommit_delta", 500)
tmintConfig.SetDefault("timeout_commit", 1000)
// make progress asap (no `timeout_commit`) on full precommit votes
tmintConfig.SetDefault("skip_timeout_commit", false)
tmintConfig.SetDefault("mempool_recheck", true)
tmintConfig.SetDefault("mempool_recheck_empty", true)
tmintConfig.SetDefault("mempool_broadcast", true)
tmintConfig.SetDefault("mempool_wal_dir", path.Join(dataDir, "mempool.wal"))
}

//------------------------------------------------------------------------------
Expand Down
Loading

0 comments on commit 469895a

Please sign in to comment.