Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[R4R] prepare for release v0.10.0 #877

Merged
merged 2 commits into from
Jul 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.10.0
IMPROVEMENTS
* [\#875](https://github.com/bnb-chain/node/pull/875) [DEX] Implement BEP151

## 0.9.2
IMPROVEMENTS
* [\#865](https://github.com/bnb-chain/node/pull/865) [CI] Build state recover tool in release job
Expand Down
1 change: 1 addition & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ func SetUpgradeConfig(upgradeConfig *config.UpgradeConfig) {
upgrade.Mgr.AddUpgradeHeight(upgrade.BEP87, upgradeConfig.BEP87Height)
upgrade.Mgr.AddUpgradeHeight(upgrade.FixFailAckPackage, upgradeConfig.FixFailAckPackageHeight)
upgrade.Mgr.AddUpgradeHeight(upgrade.BEP128, upgradeConfig.BEP128Height)
upgrade.Mgr.AddUpgradeHeight(upgrade.BEP151, upgradeConfig.BEP151Height)

// register store keys of upgrade
upgrade.Mgr.RegisterStoreKeys(upgrade.BEP9, common.TimeLockStoreKey.Name())
Expand Down
4 changes: 4 additions & 0 deletions app/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ FixFailAckPackageHeight = {{ .UpgradeConfig.FixFailAckPackageHeight }}
EnableAccountScriptsForCrossChainTransferHeight = {{ .UpgradeConfig.EnableAccountScriptsForCrossChainTransferHeight }}
# Block height of BEP128 upgrade
BEP128Height = {{ .UpgradeConfig.BEP128Height }}
# Block height of BEP151 upgrade
BEP151Height = {{ .UpgradeConfig.BEP151Height }}

[query]
# ABCI query interface black list, suggested value: ["custom/gov/proposals", "custom/timelock/timelocks", "custom/atomicSwap/swapcreator", "custom/atomicSwap/swaprecipient"]
Expand Down Expand Up @@ -526,6 +528,7 @@ type UpgradeConfig struct {
FixFailAckPackageHeight int64 `mapstructure:"FixFailAckPackageHeight"`
EnableAccountScriptsForCrossChainTransferHeight int64 `mapstructure:"EnableAccountScriptsForCrossChainTransferHeight"`
BEP128Height int64 `mapstructure:"BEP128Height"`
BEP151Height int64 `mapstructure:"BEP151Height"`
}

func defaultUpgradeConfig() *UpgradeConfig {
Expand All @@ -546,6 +549,7 @@ func defaultUpgradeConfig() *UpgradeConfig {
BEP70Height: 1,
LaunchBscUpgradeHeight: 1,
BEP128Height: math.MaxInt64,
BEP151Height: math.MaxInt64,
BEP82Height: math.MaxInt64,
BEP84Height: math.MaxInt64,
BEP87Height: math.MaxInt64,
Expand Down
2 changes: 2 additions & 0 deletions asset/testnet/app.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ FixFailAckPackageHeight = 7841000
EnableAccountScriptsForCrossChainTransferHeight = 7841000
#Block height of BEP128 upgrade
BEP128Height = 23551600
#Block height of BEP151 upgrade
BEP151Height = 28250000

[query]
# ABCI query interface black list, suggested value: ["custom/gov/proposals", "custom/timelock/timelocks", "custom/atomicSwap/swapcreator", "custom/atomicSwap/swaprecipient"]
Expand Down
1 change: 1 addition & 0 deletions common/upgrade/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const (
FixFailAckPackage = sdk.FixFailAckPackage

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

func UpgradeBEP10(before func(), after func()) {
Expand Down
6 changes: 6 additions & 0 deletions plugins/dex/list/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,14 @@ func NewHandler(keeper *order.DexKeeper, tokenMapper tokens.Mapper, govKeeper go
return func(ctx sdk.Context, msg sdk.Msg) sdk.Result {
switch msg := msg.(type) {
case types.ListMsg:
if sdk.IsUpgrade(upgrade.BEP151) {
return sdk.ErrMsgNotSupported("ListMsg disabled in BEP-151").Result()
}
return handleList(ctx, keeper, tokenMapper, govKeeper, msg)
case types.ListMiniMsg:
if sdk.IsUpgrade(upgrade.BEP151) {
return sdk.ErrMsgNotSupported("ListMiniMsg disabled in BEP-151").Result()
}
return handleListMini(ctx, keeper, tokenMapper, msg)
default:
errMsg := fmt.Sprintf("Unrecognized dex msg type: %v", reflect.TypeOf(msg).Name())
Expand Down
3 changes: 3 additions & 0 deletions plugins/dex/order/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ func NewHandler(dexKeeper *DexKeeper) sdk.Handler {
return func(ctx sdk.Context, msg sdk.Msg) sdk.Result {
switch msg := msg.(type) {
case NewOrderMsg:
if sdk.IsUpgrade(upgrade.BEP151) {
return sdk.ErrMsgNotSupported("NewOrderMsg disabled in BEP-151").Result()
}
return handleNewOrder(ctx, dexKeeper, msg)
case CancelOrderMsg:
return handleCancelOrder(ctx, dexKeeper, msg)
Expand Down
2 changes: 1 addition & 1 deletion version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var (
Version string
)

const NodeVersion = "v0.9.2"
const NodeVersion = "v0.10.0"

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