Skip to content

Commit 451071e

Browse files
authored
Merge pull request #877 from bnb-chain/develop
[R4R] prepare for release v0.10.0
2 parents 160b936 + 9b61235 commit 451071e

File tree

8 files changed

+22
-1
lines changed

8 files changed

+22
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 0.10.0
4+
IMPROVEMENTS
5+
* [\#875](https://github.com/bnb-chain/node/pull/875) [DEX] Implement BEP151
6+
37
## 0.9.2
48
IMPROVEMENTS
59
* [\#865](https://github.com/bnb-chain/node/pull/865) [CI] Build state recover tool in release job

app/app.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@ func SetUpgradeConfig(upgradeConfig *config.UpgradeConfig) {
328328
upgrade.Mgr.AddUpgradeHeight(upgrade.BEP87, upgradeConfig.BEP87Height)
329329
upgrade.Mgr.AddUpgradeHeight(upgrade.FixFailAckPackage, upgradeConfig.FixFailAckPackageHeight)
330330
upgrade.Mgr.AddUpgradeHeight(upgrade.BEP128, upgradeConfig.BEP128Height)
331+
upgrade.Mgr.AddUpgradeHeight(upgrade.BEP151, upgradeConfig.BEP151Height)
331332

332333
// register store keys of upgrade
333334
upgrade.Mgr.RegisterStoreKeys(upgrade.BEP9, common.TimeLockStoreKey.Name())

app/config/config.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ FixFailAckPackageHeight = {{ .UpgradeConfig.FixFailAckPackageHeight }}
8787
EnableAccountScriptsForCrossChainTransferHeight = {{ .UpgradeConfig.EnableAccountScriptsForCrossChainTransferHeight }}
8888
# Block height of BEP128 upgrade
8989
BEP128Height = {{ .UpgradeConfig.BEP128Height }}
90+
# Block height of BEP151 upgrade
91+
BEP151Height = {{ .UpgradeConfig.BEP151Height }}
9092
9193
[query]
9294
# ABCI query interface black list, suggested value: ["custom/gov/proposals", "custom/timelock/timelocks", "custom/atomicSwap/swapcreator", "custom/atomicSwap/swaprecipient"]
@@ -526,6 +528,7 @@ type UpgradeConfig struct {
526528
FixFailAckPackageHeight int64 `mapstructure:"FixFailAckPackageHeight"`
527529
EnableAccountScriptsForCrossChainTransferHeight int64 `mapstructure:"EnableAccountScriptsForCrossChainTransferHeight"`
528530
BEP128Height int64 `mapstructure:"BEP128Height"`
531+
BEP151Height int64 `mapstructure:"BEP151Height"`
529532
}
530533

531534
func defaultUpgradeConfig() *UpgradeConfig {
@@ -546,6 +549,7 @@ func defaultUpgradeConfig() *UpgradeConfig {
546549
BEP70Height: 1,
547550
LaunchBscUpgradeHeight: 1,
548551
BEP128Height: math.MaxInt64,
552+
BEP151Height: math.MaxInt64,
549553
BEP82Height: math.MaxInt64,
550554
BEP84Height: math.MaxInt64,
551555
BEP87Height: math.MaxInt64,

asset/testnet/app.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ FixFailAckPackageHeight = 7841000
5656
EnableAccountScriptsForCrossChainTransferHeight = 7841000
5757
#Block height of BEP128 upgrade
5858
BEP128Height = 23551600
59+
#Block height of BEP151 upgrade
60+
BEP151Height = 28250000
5961

6062
[query]
6163
# ABCI query interface black list, suggested value: ["custom/gov/proposals", "custom/timelock/timelocks", "custom/atomicSwap/swapcreator", "custom/atomicSwap/swaprecipient"]

common/upgrade/upgrade.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ const (
3838
FixFailAckPackage = sdk.FixFailAckPackage
3939

4040
BEP128 = sdk.BEP128 // https://github.com/bnb-chain/BEPs/pull/128 Staking reward distribution upgrade
41+
BEP151 = "BEP151" // https://github.com/bnb-chain/BEPs/pull/151 Decommission Decentralized Exchange
4142
)
4243

4344
func UpgradeBEP10(before func(), after func()) {

plugins/dex/list/handler.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,14 @@ func NewHandler(keeper *order.DexKeeper, tokenMapper tokens.Mapper, govKeeper go
2222
return func(ctx sdk.Context, msg sdk.Msg) sdk.Result {
2323
switch msg := msg.(type) {
2424
case types.ListMsg:
25+
if sdk.IsUpgrade(upgrade.BEP151) {
26+
return sdk.ErrMsgNotSupported("ListMsg disabled in BEP-151").Result()
27+
}
2528
return handleList(ctx, keeper, tokenMapper, govKeeper, msg)
2629
case types.ListMiniMsg:
30+
if sdk.IsUpgrade(upgrade.BEP151) {
31+
return sdk.ErrMsgNotSupported("ListMiniMsg disabled in BEP-151").Result()
32+
}
2733
return handleListMini(ctx, keeper, tokenMapper, msg)
2834
default:
2935
errMsg := fmt.Sprintf("Unrecognized dex msg type: %v", reflect.TypeOf(msg).Name())

plugins/dex/order/handler.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ func NewHandler(dexKeeper *DexKeeper) sdk.Handler {
2727
return func(ctx sdk.Context, msg sdk.Msg) sdk.Result {
2828
switch msg := msg.(type) {
2929
case NewOrderMsg:
30+
if sdk.IsUpgrade(upgrade.BEP151) {
31+
return sdk.ErrMsgNotSupported("NewOrderMsg disabled in BEP-151").Result()
32+
}
3033
return handleNewOrder(ctx, dexKeeper, msg)
3134
case CancelOrderMsg:
3235
return handleCancelOrder(ctx, dexKeeper, msg)

version/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ var (
1212
Version string
1313
)
1414

15-
const NodeVersion = "v0.9.2"
15+
const NodeVersion = "v0.10.0"
1616

1717
func init() {
1818
Version = fmt.Sprintf("BNB Beacon Chain Release: %s;", NodeVersion)

0 commit comments

Comments
 (0)