From b3a07536a54095492d023ec10199af88966c55f7 Mon Sep 17 00:00:00 2001 From: Roshan <48975233+Pythonberg1997@users.noreply.github.com> Date: Mon, 27 Mar 2023 13:27:26 +0800 Subject: [PATCH 1/2] fix: channel not registered error (#934) --- app/app.go | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/app/app.go b/app/app.go index 2a847f47c..052bd67fe 100644 --- a/app/app.go +++ b/app/app.go @@ -563,11 +563,6 @@ func (app *BinanceChain) initStaking() { if sdkErr != nil { panic(sdkErr.Error()) } - crossStakeApp := cStake.NewCrossStakeApp(app.stakeKeeper) - err := app.scKeeper.RegisterChannel(sTypes.CrossStakeChannel, sTypes.CrossStakeChannelID, crossStakeApp) - if err != nil { - panic(err) - } }) upgrade.Mgr.RegisterBeginBlocker(sdk.BEP159, func(ctx sdk.Context) { stake.MigrateValidatorDistributionAddr(ctx, app.stakeKeeper) @@ -589,12 +584,11 @@ func (app *BinanceChain) initStaking() { app.stakeKeeper.SubscribeBCParamChange(app.ParamHub) app.stakeKeeper = app.stakeKeeper.WithHooks(app.slashKeeper.Hooks()) - if sdk.IsUpgrade(sdk.BEP153) { - crossStakeApp := cStake.NewCrossStakeApp(app.stakeKeeper) - err := app.scKeeper.RegisterChannel(sTypes.CrossStakeChannel, sTypes.CrossStakeChannelID, crossStakeApp) - if err != nil { - panic(err) - } + // register cross stake channel + crossStakeApp := cStake.NewCrossStakeApp(app.stakeKeeper) + err := app.scKeeper.RegisterChannel(sTypes.CrossStakeChannel, sTypes.CrossStakeChannelID, crossStakeApp) + if err != nil { + panic(err) } } @@ -938,8 +932,8 @@ func (app *BinanceChain) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) a fees.Pool.Clear() // just clean it, no matter use it or not. pub.Pool.Clean() - //match may end with transaction failure, which is better to save into - //the EndBlock response. However, current cosmos doesn't support this. + // match may end with transaction failure, which is better to save into + // the EndBlock response. However, current cosmos doesn't support this. return abci.ResponseEndBlock{ ValidatorUpdates: validatorUpdates, Events: ctx.EventManager().ABCIEvents(), @@ -1191,7 +1185,7 @@ func (app *BinanceChain) publish(tradesToPublish []*pub.Trade, proposalsToPublis accountsToPublish, latestPriceLevels, blockFee, - app.DexKeeper.RoundOrderFees, //only use DexKeeper RoundOrderFees + app.DexKeeper.RoundOrderFees, // only use DexKeeper RoundOrderFees transferToPublish, blockToPublish) From 1f0f73a61ebe94a6f8bd272060325402346988f8 Mon Sep 17 00:00:00 2001 From: forcodedancing Date: Thu, 13 Apr 2023 18:19:18 +0800 Subject: [PATCH 2/2] feat: enable bep171 upgrade on mainnet (#936) --- CHANGELOG.md | 4 ++++ asset/mainnet/app.toml | 2 ++ version/version.go | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fa3fb1a1c..18fcc1bb5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## v0.10.10 +FEATURES +* [\#936](https://github.com/bnb-chain/node/pull/936) [BEP]: enable bep171 upgrade on mainnet #936 + ## v0.10.9 BUG FIX diff --git a/asset/mainnet/app.toml b/asset/mainnet/app.toml index fa13aa61f..b91f2b8dd 100644 --- a/asset/mainnet/app.toml +++ b/asset/mainnet/app.toml @@ -63,6 +63,8 @@ BEP153Height = 284376000 #Block height of BEP173 upgrade BEP173Height = 284376000 FixDoubleSignChainIdHeight = 9223372036854775807 +# Block height of BEP171 upgrade +BEP171Height = 310182000 [addr] # Bech32PrefixAccAddr defines the Bech32 prefix of an account's address diff --git a/version/version.go b/version/version.go index 393f20e17..133952b34 100644 --- a/version/version.go +++ b/version/version.go @@ -12,7 +12,7 @@ var ( Version string ) -const NodeVersion = "v0.10.9" +const NodeVersion = "v0.10.10" func init() { Version = fmt.Sprintf("BNB Beacon Chain Release: %s;", NodeVersion)