From 10243c8e4aaccf3e18f6364467d716988de0d912 Mon Sep 17 00:00:00 2001 From: zhangzhiqiang <745124335@qq.com> Date: Mon, 2 Sep 2019 11:04:06 +0800 Subject: [PATCH 1/4] don't update gov param when network not equal mainnet --- app/v1/gov/keeper.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/v1/gov/keeper.go b/app/v1/gov/keeper.go index efdd53a3f..de9cd3b90 100644 --- a/app/v1/gov/keeper.go +++ b/app/v1/gov/keeper.go @@ -832,5 +832,8 @@ func (keeper Keeper) HasReachedTheMaxProposalNum(ctx sdk.Context, p ProposalLeve } func (keeper Keeper) Init(ctx sdk.Context) { + if sdk.NetworkType != sdk.Mainnet { + return + } keeper.SetParamSet(ctx, DefaultParams()) } From eb5d4348d4e4919c5f64a00bb54966c36d380939 Mon Sep 17 00:00:00 2001 From: chengwenxi Date: Tue, 3 Sep 2019 14:08:41 +0800 Subject: [PATCH 2/4] fix protocol loading on replay-last-block --- app/app.go | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/app/app.go b/app/app.go index 878ed6bea..923d250a3 100644 --- a/app/app.go +++ b/app/app.go @@ -9,8 +9,8 @@ import ( "strings" "github.com/irisnet/irishub/app/protocol" - "github.com/irisnet/irishub/app/v0" - "github.com/irisnet/irishub/app/v1" + v0 "github.com/irisnet/irishub/app/v0" + v1 "github.com/irisnet/irishub/app/v1" "github.com/irisnet/irishub/codec" "github.com/irisnet/irishub/modules/auth" "github.com/irisnet/irishub/store" @@ -61,13 +61,6 @@ func NewIrisApp(logger log.Logger, db dbm.DB, config *cfg.InstrumentationConfig, if viper.GetBool(FlagReplay) { lastHeight := Replay(app.Logger) err = app.LoadVersion(lastHeight, protocol.KeyMain, true) - - // If reset to another protocol version, should reload Protocol and reset txDecoder - loaded, current := app.Engine.LoadCurrentProtocol(app.GetKVStore(protocol.KeyMain)) - if !loaded { - cmn.Exit(fmt.Sprintf("Your software doesn't support the required protocol (version %d)!", current)) - } - app.BaseApp.txDecoder = auth.DefaultTxDecoder(app.Engine.GetCurrentProtocol().GetCodec()) } else { err = app.LoadLatestVersion(protocol.KeyMain) } // app is now sealed From 103bd8d93dc08372c61e7a61fd3c3b96e6cccf15 Mon Sep 17 00:00:00 2001 From: chengwenxi Date: Tue, 10 Sep 2019 15:08:00 +0800 Subject: [PATCH 3/4] release v0.15.2 --- CHANGELOG.md | 8 ++++++++ lite/swagger-ui/swagger.yaml | 2 +- version/version.go | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 70a79053b..6201f5ac0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.15.2 + +*Sep 11th, 2019* + +### Application +* [\#1940](https://github.com/irisnet/irishub/pull/1940) Do not update gov params when network not equal mainnet +* [\#1945](https://github.com/irisnet/irishub/pull/1945) Fix protocol loading on replay-last-block + ## 0.15.1 *Aug 22th, 2019* diff --git a/lite/swagger-ui/swagger.yaml b/lite/swagger-ui/swagger.yaml index 741bad98c..4b1c16afc 100644 --- a/lite/swagger-ui/swagger.yaml +++ b/lite/swagger-ui/swagger.yaml @@ -4,7 +4,7 @@ info: description: >- A REST interface for state queries, transaction generation and broadcast. - version: "0.15.1" + version: "0.15.2" title: IRISLCD Swagger-UI termsOfService: 'https://www.irisnet.org' contact: diff --git a/version/version.go b/version/version.go index c8c46ee8e..f919590a5 100644 --- a/version/version.go +++ b/version/version.go @@ -10,7 +10,7 @@ import ( // Version - Iris Version const ProtocolVersion = 1 -const Version = "0.15.1" +const Version = "0.15.2" // GitCommit set by build flags var GitCommit = "" From f3e3c99bd5acf749a4add7896ab906872f836fef Mon Sep 17 00:00:00 2001 From: chengwenxi Date: Wed, 11 Sep 2019 17:35:54 +0800 Subject: [PATCH 4/4] update latest version to v0.15.2 --- docs/software/How-to-install-irishub.md | 4 ++-- docs/zh/software/How-to-install-irishub.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/software/How-to-install-irishub.md b/docs/software/How-to-install-irishub.md index 52b8627ed..0ddd5bbe0 100644 --- a/docs/software/How-to-install-irishub.md +++ b/docs/software/How-to-install-irishub.md @@ -2,10 +2,10 @@ ## Latest Version -The Latest version of IRIShub is [v0.15.1](https://github.com/irisnet/irishub/releases/latest) +The Latest version of IRIShub is [v0.15.2](https://github.com/irisnet/irishub/releases/latest) ::: tip -Please replace below with v0.15.1 +Please replace below with v0.15.2 ::: ## Configure Your Server diff --git a/docs/zh/software/How-to-install-irishub.md b/docs/zh/software/How-to-install-irishub.md index 2ca017b35..5b2f61546 100644 --- a/docs/zh/software/How-to-install-irishub.md +++ b/docs/zh/software/How-to-install-irishub.md @@ -2,10 +2,10 @@ ## 最新版本 -当前IRIShub最新版本为 [v0.15.1](https://github.com/irisnet/irishub/releases/latest) +当前IRIShub最新版本为 [v0.15.2](https://github.com/irisnet/irishub/releases/latest) ::: tip -请将下文中的 替换为 v0.15.1 +请将下文中的 替换为 v0.15.2 ::: ## 服务器配置要求