diff --git a/Gopkg.lock b/Gopkg.lock index 70e747cf7..df5578510 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -61,14 +61,6 @@ revision = "346938d642f2ec3594ed81d874461961cd0faa76" version = "v1.1.0" -[[projects]] - digest = "1:fed20bf7f0da387c96d4cfc140a95572e5aba4bb984beb7de910e090ae39849b" - name = "github.com/ethereum/go-ethereum" - packages = ["crypto/secp256k1"] - pruneopts = "UT" - revision = "c942700427557e3ff6de3aaf6b916e2f056c1ec2" - version = "v1.8.23" - [[projects]] digest = "1:abeb38ade3f32a92943e5be54f55ed6d6e3b6602761d74b4aab4c9dd45c18abd" name = "github.com/fsnotify/fsnotify" @@ -110,7 +102,7 @@ version = "v1.8.0" [[projects]] - digest = "1:35621fe20f140f05a0c4ef662c26c0ab4ee50bca78aa30fe87d33120bd28165e" + digest = "1:95e1006e41c641abd2f365dfa0f1213c04da294e7cd5f0bf983af234b775db64" name = "github.com/gogo/protobuf" packages = [ "gogoproto", @@ -121,8 +113,8 @@ "types", ] pruneopts = "UT" - revision = "636bf0302bc95575d69441b25a2603156ffdddf1" - version = "v1.1.1" + revision = "ba06b47c162d49f2af050fb4c75bcbc86a159d5c" + version = "v1.2.1" [[projects]] digest = "1:17fe264ee908afc795734e8c4e63db2accabaf57326dbf21763a7d6b86096260" @@ -208,12 +200,12 @@ version = "v1.0" [[projects]] - branch = "master" - digest = "1:39b27d1381a30421f9813967a5866fba35dc1d4df43a6eefe3b7a5444cb07214" + digest = "1:a74b5a8e34ee5843cd6e65f698f3e75614f812ff170c2243425d75bc091e9af2" name = "github.com/jmhodges/levigo" packages = ["."] pruneopts = "UT" - revision = "c42d9e0ca023e2198120196f842701bb4c55d7b9" + revision = "853d788c5c416eaaee5b044570784a96c7a26975" + version = "v1.0.0" [[projects]] branch = "master" @@ -455,7 +447,8 @@ version = "v0.12.0-binance.0" [[projects]] - digest = "1:09921dbdc56888c7a8d926a35ddd829a7891d6dd3b6eb91a0eb4849f4c0348ce" + branch = "upgrade_from_0301_to_0315" + digest = "1:beb5319cdffa4643009049d90259287c683e1f824e52d267f7354b2f9c66db22" name = "github.com/tendermint/tendermint" packages = [ "abci/client", @@ -477,6 +470,7 @@ "crypto/multisig", "crypto/multisig/bitarray", "crypto/secp256k1", + "crypto/secp256k1/internal/secp256k1", "crypto/tmhash", "crypto/xsalsa20symmetric", "evidence", @@ -490,6 +484,7 @@ "libs/events", "libs/fail", "libs/flowrate", + "libs/gopool", "libs/log", "libs/pubsub", "libs/pubsub/query", @@ -513,6 +508,9 @@ "rpc/lib/server", "rpc/lib/types", "state", + "state/blockindex", + "state/blockindex/kv", + "state/blockindex/null", "state/txindex", "state/txindex/kv", "state/txindex/null", @@ -521,9 +519,8 @@ "version", ] pruneopts = "UT" - revision = "3abb98b2e97b6ef6286e6f7d4b164012fe36ec80" + revision = "9e40207ceefb39e1e6ee1a4fa7dd768a472ceba8" source = "github.com/binance-chain/bnc-tendermint" - version = "v0.30.1-binance.0" [[projects]] digest = "1:7886f86064faff6f8d08a3eb0e8c773648ff5a2e27730831e2bfbf07467f6666" diff --git a/Gopkg.toml b/Gopkg.toml index 20381b793..691a185b0 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -59,7 +59,7 @@ [[override]] name = "github.com/tendermint/tendermint" source = "github.com/binance-chain/bnc-tendermint" - version = "=v0.30.1-binance.0" + branch = "upgrade_from_0301_to_0315" ## deps without releases: diff --git a/baseapp/helpers.go b/baseapp/helpers.go index cc965316c..5708906bf 100644 --- a/baseapp/helpers.go +++ b/baseapp/helpers.go @@ -2,8 +2,6 @@ package baseapp import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/tendermint/tendermint/abci/server" - abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/crypto/tmhash" cmn "github.com/tendermint/tendermint/libs/common" ) @@ -25,28 +23,3 @@ func (app *BaseApp) Deliver(tx sdk.Tx) (result sdk.Result) { txHash := cmn.HexBytes(tmhash.Sum(nil)).String() return app.RunTx(sdk.RunTxModeDeliver, nil, tx, txHash) } - -// RunForever - BasecoinApp execution and cleanup -func RunForever(app abci.Application) { - - // Start the ABCI server - srv, err := server.NewServer("0.0.0.0:26658", "socket", app) - if err != nil { - cmn.Exit(err.Error()) - return - } - err = srv.Start() - if err != nil { - cmn.Exit(err.Error()) - return - } - - // Wait forever - cmn.TrapSignal(func() { - // Cleanup - err := srv.Stop() - if err != nil { - cmn.Exit(err.Error()) - } - }) -} diff --git a/client/lcd/root.go b/client/lcd/root.go index 10faadd1a..ba4d8335f 100644 --- a/client/lcd/root.go +++ b/client/lcd/root.go @@ -2,6 +2,7 @@ package lcd import ( "errors" + "github.com/cosmos/cosmos-sdk/server" "net" "net/http" "os" @@ -21,7 +22,6 @@ import ( "github.com/rakyll/statik/fs" "github.com/spf13/cobra" "github.com/spf13/viper" - cmn "github.com/tendermint/tendermint/libs/common" "github.com/tendermint/tendermint/libs/log" tmserver "github.com/tendermint/tendermint/rpc/lib/server" ) @@ -58,12 +58,13 @@ func ServeCommand(cdc *codec.Codec) *cobra.Command { var listener net.Listener var fingerprint string if viper.GetBool(flagInsecure) { - listener, err := tmserver.Listen(listenAddr, tmserver.Config{MaxOpenConnections: maxOpen}) + cfg := &tmserver.Config{MaxOpenConnections: maxOpen} + listener, err := tmserver.Listen(listenAddr, cfg) if err != nil { return err } go func() { - if err = tmserver.StartHTTPServer(listener, handler, logger); err != nil { + if err = tmserver.StartHTTPServer(listener, handler, logger, cfg); err != nil { panic(err) } }() @@ -91,12 +92,13 @@ func ServeCommand(cdc *codec.Codec) *cobra.Command { } defer cleanupFunc() } - listener, err := tmserver.Listen(listenAddr, tmserver.Config{MaxOpenConnections: maxOpen}) + cfg := &tmserver.Config{MaxOpenConnections: maxOpen} + listener, err := tmserver.Listen(listenAddr, cfg) if err != nil { return err } go func() { - if err = tmserver.StartHTTPServer(listener, handler, logger); err != nil { + if err = tmserver.StartHTTPAndTLSServer(listener, handler, certFile, keyFile, logger, cfg); err != nil { panic(err) } }() @@ -105,7 +107,7 @@ func ServeCommand(cdc *codec.Codec) *cobra.Command { logger.Info("REST server started") // wait forever and cleanup - cmn.TrapSignal(func() { + server.TrapSignal(func() { defer cleanupFunc() err := listener.Close() logger.Error("error closing listener", "err", err) diff --git a/client/lcd/test_helpers.go b/client/lcd/test_helpers.go index 77929dcc2..1e86ee585 100644 --- a/client/lcd/test_helpers.go +++ b/client/lcd/test_helpers.go @@ -334,12 +334,12 @@ func startTM( // // NOTE: This causes the thread to block. func startLCD(logger log.Logger, listenAddr string, cdc *codec.Codec) (net.Listener, error) { - listener, err := tmrpc.Listen(listenAddr, tmrpc.Config{}) + listener, err := tmrpc.Listen(listenAddr, &tmrpc.Config{}) if err != nil { return nil, err } - go tmrpc.StartHTTPServer(listener, createHandler(cdc), logger) + go tmrpc.StartHTTPServer(listener, createHandler(cdc), logger, &tmrpc.Config{}) return listener, nil } diff --git a/server/start.go b/server/start.go index 9012bc198..612a54a16 100644 --- a/server/start.go +++ b/server/start.go @@ -87,7 +87,7 @@ func startStandAlone(ctx *Context, appCreator AppCreator) error { } // wait forever - cmn.TrapSignal(func() { + cmn.TrapSignal(ctx.Logger, func() { // cleanup err = svr.Stop() if err != nil {