Skip to content

Commit

Permalink
Merge pull request #332 from bnb-chain/develop
Browse files Browse the repository at this point in the history
release: prepare for the release v0.26.1
  • Loading branch information
unclezoro authored Mar 23, 2023
2 parents 259050b + 23ab621 commit 60c3aa4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

##v0.26.1
* [sdk] [\#331] (https://github.com/bnb-chain/bnc-cosmos-sdk/pull/331) fix: fix the bug introduced by fixing the testnet syncing issue

##v0.26.0
* [sec] [\#328](https://github.com/bnb-chain/bnc-cosmos-sdk/pull/328) sec: implement security enhancements (#328)

Expand Down
7 changes: 6 additions & 1 deletion x/stake/keeper/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,12 @@ func (k Keeper) SetParams(ctx sdk.Context, params types.Params) {
k.paramstore.Set(ctx, types.KeyMaxValidators, params.MaxValidators)
k.paramstore.Set(ctx, types.KeyBondDenom, params.BondDenom)
if sdk.IsUpgrade(sdk.LaunchBscUpgrade) {
if ctx.ChainID() == sdk.ChainIdGanges {
// the reason for this logic is:
// 1. when the testnet is set up, the config of `MaxValidators` and `MinSelfDelegation` is different from the default value in code
// 2. the first fix has a bug that the overwrite of the configs happens after the bsc upgrade instead of only taking effect block 1
// 3. so this is why the check `ctx.BlockHeight() == 1 || ctx.BlockHeight() == 37501781` is added to fix the bug. 37501781 is the height
// when the first proposal executed after the first fix
if ctx.ChainID() == sdk.ChainIdGanges && (ctx.BlockHeight() == 1 || ctx.BlockHeight() == 37501781) {
k.paramstore.Set(ctx, types.KeyMaxValidators, uint16(11))
k.paramstore.Set(ctx, types.KeyMinSelfDelegation, int64(5000000000000))
k.paramstore.Set(ctx, types.KeyMinDelegationChange, params.MinDelegationChange)
Expand Down

0 comments on commit 60c3aa4

Please sign in to comment.