Skip to content

Commit

Permalink
Bump tendermint (#5)
Browse files Browse the repository at this point in the history
* bump up tendermint v0.33.4

* test: ci disable some jobs
  • Loading branch information
kfangw authored Apr 27, 2020
1 parent bad4ca7 commit 432b26d
Show file tree
Hide file tree
Showing 9 changed files with 87 additions and 41 deletions.
41 changes: 18 additions & 23 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ executors:
golang:
docker:
- image: circleci/golang:1.13
docs:
docker:
- image: tendermintdev/docker-website-deployment
environment:
AWS_REGION: us-east-1

commands:
make:
Expand Down Expand Up @@ -207,21 +202,21 @@ workflows:
- test-cover:
requires:
- setup-dependencies
- upload-coverage:
requires:
- test-cover
- build-docs:
context: docs-deployment-master
filters:
branches:
only:
- docs-theme-latest
- build-docs:
context: docs-deployment-release
filters:
branches:
only:
- master
tags:
only:
- /v.*/
# - upload-coverage:
# requires:
# - test-cover
# - build-docs:
# context: docs-deployment-master
# filters:
# branches:
# only:
# - docs-theme-latest
# - build-docs:
# context: docs-deployment-release
# filters:
# branches:
# only:
# - master
# tags:
# only:
# - /v.*/
5 changes: 3 additions & 2 deletions client/context/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"github.com/tendermint/tendermint/libs/cli"
tmlite "github.com/tendermint/tendermint/lite"
rpcclient "github.com/tendermint/tendermint/rpc/client"
"github.com/tendermint/tendermint/rpc/client/http"

"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/codec"
Expand Down Expand Up @@ -65,7 +66,7 @@ func NewCLIContextWithInputAndFrom(input io.Reader, from string) CLIContext {
if !genOnly {
nodeURI = viper.GetString(flags.FlagNode)
if nodeURI != "" {
rpc, err = rpcclient.NewHTTP(nodeURI, "/websocket")
rpc, err = http.New(nodeURI, "/websocket")
if err != nil {
fmt.Printf("failted to get client: %v\n", err)
os.Exit(1)
Expand Down Expand Up @@ -157,7 +158,7 @@ func (ctx CLIContext) WithTrustNode(trustNode bool) CLIContext {
// WithNodeURI returns a copy of the context with an updated node URI.
func (ctx CLIContext) WithNodeURI(nodeURI string) CLIContext {
ctx.NodeURI = nodeURI
client, err := rpcclient.NewHTTP(nodeURI, "/websocket")
client, err := http.New(nodeURI, "/websocket")
if err != nil {
panic(err)
}
Expand Down
4 changes: 2 additions & 2 deletions client/context/verifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/tendermint/tendermint/libs/log"
tmlite "github.com/tendermint/tendermint/lite"
tmliteproxy "github.com/tendermint/tendermint/lite/proxy"
rpcclient "github.com/tendermint/tendermint/rpc/client"
tmhttp "github.com/tendermint/tendermint/rpc/client/http"
)

const (
Expand Down Expand Up @@ -43,7 +43,7 @@ func CreateVerifier(ctx CLIContext, cacheSize int) (tmlite.Verifier, error) {
// create an RPC client based off of the RPC URI if no RPC client exists
client := ctx.Client
if client == nil {
client, err = rpcclient.NewHTTP(ctx.NodeURI, "/websocket")
client, err = tmhttp.New(ctx.NodeURI, "/websocket")
if err != nil {
return nil, err
}
Expand Down
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ require (
github.com/99designs/keyring v1.1.3
github.com/bartekn/go-bip39 v0.0.0-20171116152956-a05967ea095d
github.com/bgentry/speakeasy v0.1.0
github.com/btcsuite/btcd v0.0.0-20190115013929-ed77733ec07d
github.com/btcsuite/btcd v0.20.1-beta
github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d
github.com/cosmos/ledger-cosmos-go v0.11.1
github.com/gogo/protobuf v1.3.1
Expand All @@ -16,17 +16,17 @@ require (
github.com/pkg/errors v0.9.1
github.com/rakyll/statik v0.1.6
github.com/spf13/afero v1.2.1 // indirect
github.com/spf13/cobra v0.0.6
github.com/spf13/cobra v1.0.0
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.6.2
github.com/spf13/viper v1.6.3
github.com/stretchr/testify v1.5.1
github.com/tendermint/btcd v0.1.1
github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15
github.com/tendermint/go-amino v0.15.1
github.com/tendermint/iavl v0.13.2
github.com/tendermint/tendermint v0.33.3
github.com/tendermint/tm-db v0.5.0
github.com/tendermint/tendermint v0.33.4
github.com/tendermint/tm-db v0.5.1
gopkg.in/yaml.v2 v2.2.8
)

Expand Down
48 changes: 46 additions & 2 deletions go.sum

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion server/tm_cmds.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ func ShowValidatorCmd(ctx *Context) *cobra.Command {
UpgradeOldPrivValFile(cfg)
privValidator := pvm.LoadOrGenFilePV(
cfg.PrivValidatorKeyFile(), cfg.PrivValidatorStateFile())
valPubKey := privValidator.GetPubKey()
valPubKey, err := privValidator.GetPubKey()
if err != nil {
return err
}

if viper.GetString(cli.OutputFlag) == "json" {
return printlnJSON(valPubKey)
Expand Down
6 changes: 3 additions & 3 deletions tests/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

"github.com/stretchr/testify/require"

tmclient "github.com/tendermint/tendermint/rpc/client"
tmhttp "github.com/tendermint/tendermint/rpc/client/http"
ctypes "github.com/tendermint/tendermint/rpc/core/types"
rpcclient "github.com/tendermint/tendermint/rpc/lib/client"

Expand All @@ -29,7 +29,7 @@ func WaitForNextHeightTM(port string) {
func WaitForNextNBlocksTM(n int64, port string) {
// get the latest block and wait for n more
url := fmt.Sprintf("http://localhost:%v", port)
cl, err := tmclient.NewHTTP(url, "/websocket")
cl, err := tmhttp.New(url, "/websocket")
if err != nil {
panic(fmt.Sprintf("failed to create Tendermint HTTP client: %s", err))
}
Expand All @@ -56,7 +56,7 @@ func WaitForHeightTM(height int64, port string) {
}

func waitForHeightTM(height int64, url string) {
cl, err := tmclient.NewHTTP(url, "/websocket")
cl, err := tmhttp.New(url, "/websocket")
if err != nil {
panic(fmt.Sprintf("failed to create Tendermint HTTP client: %s", err))
}
Expand Down
4 changes: 2 additions & 2 deletions types/rest/rest.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
)

const (
DefaultPage = 1
DefaultLimit = 30 // should be consistent with tendermint/tendermint/rpc/core/pipe.go:19
DefaultPage = 1
DefaultLimit = 30 // should be consistent with tendermint/tendermint/rpc/core/pipe.go:19
TxMinHeightKey = "tx.minheight" // Inclusive minimum height filter
TxMaxHeightKey = "tx.maxheight" // Inclusive maximum height filter
)
Expand Down
5 changes: 4 additions & 1 deletion x/genutil/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ func InitializeNodeValidatorFiles(config *cfg.Config,
return nodeID, valPubKey, nil
}

valPubKey = privval.LoadOrGenFilePV(pvKeyFile, pvStateFile).GetPubKey()
valPubKey, err = privval.LoadOrGenFilePV(pvKeyFile, pvStateFile).GetPubKey()
if err != nil {
return nodeID, valPubKey, err
}

return nodeID, valPubKey, nil
}

0 comments on commit 432b26d

Please sign in to comment.