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

v0.25.0-binance.24 Release #249

Merged
merged 12 commits into from
Jan 18, 2021
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

##v0.25.0-binance.24
* [sdk] [\#248](https://github.com/binance-chain/bnc-cosmos-sdk/pull/248) owner transfer
* [sdk] Allow tx send (generate-only) to actually work offline #4234
* [store] (iavl) #5276 Fix potential race condition in iavlIterator#Close.
* [sdk] [\#247](https://github.com/binance-chain/bnc-cosmos-sdk/pull/247) Fix failack payload
* [sdk] [\#251](https://github.com/binance-chain/bnc-cosmos-sdk/pull/251) change minimum length to 2
* [sdk] [\#252](https://github.com/binance-chain/bnc-cosmos-sdk/pull/252) Fix Fee compatibility issue



## v0.25.0 binance.20

* [sdk] [\#163](https://github.com/binance-chain/bnc-cosmos-sdk/pull/163) Tss for project team
Expand Down
4 changes: 1 addition & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ require (
github.com/ipfs/go-log v0.0.1
github.com/mattn/go-isatty v0.0.10
github.com/mitchellh/go-homedir v1.1.0
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.1 // indirect
github.com/pelletier/go-toml v1.4.0
github.com/pkg/errors v0.8.1
github.com/prometheus/client_golang v1.1.0
Expand All @@ -37,7 +35,7 @@ require (
replace (
github.com/tendermint/go-amino => github.com/binance-chain/bnc-go-amino v0.14.1-binance.2
github.com/tendermint/iavl => github.com/binance-chain/bnc-tendermint-iavl v0.12.0-binance.4
github.com/tendermint/tendermint => github.com/binance-chain/bnc-tendermint v0.32.3-binance.3
github.com/tendermint/tendermint => github.com/binance-chain/bnc-tendermint v0.32.3-binance.5
github.com/zondax/ledger-cosmos-go => github.com/binance-chain/ledger-cosmos-go v0.9.9-binance.3
golang.org/x/crypto => github.com/tendermint/crypto v0.0.0-20190823183015-45b1026d81ae
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQ
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
github.com/binance-chain/bnc-go-amino v0.14.1-binance.2 h1:XcbcfisVItk92UKoGbtNT8nbcfadj3H3ayuM2srAfVs=
github.com/binance-chain/bnc-go-amino v0.14.1-binance.2/go.mod h1:yaElUUxWtv/TC/ldGtlKAvS1vKwokxgJ1d97I+6is80=
github.com/binance-chain/bnc-tendermint v0.32.3-binance.3 h1:b8SqtWmtHPhPQ2ADzUgO9sr+ChKL9ho4dTorBjGAAyY=
github.com/binance-chain/bnc-tendermint v0.32.3-binance.3/go.mod h1:kN5dNxE8voFtDqx2HjbM8sBIH5cUuMtLg0XEHjqzUiY=
github.com/binance-chain/bnc-tendermint v0.32.3-binance.5 h1:t+gCaAoN3PLMFFayY8EtUkEftir9a0DM9uK2DR6ZCwU=
github.com/binance-chain/bnc-tendermint v0.32.3-binance.5/go.mod h1:kN5dNxE8voFtDqx2HjbM8sBIH5cUuMtLg0XEHjqzUiY=
github.com/binance-chain/bnc-tendermint-iavl v0.12.0-binance.4 h1:BhaV2iiGWfRC6iB8HHOYJeUDwtQMB2pUA4ah+KCbBhI=
github.com/binance-chain/bnc-tendermint-iavl v0.12.0-binance.4/go.mod h1:Zmh8GRdNJB8DULIOBar3JCZp6tSpcvM1NGKfE9U2EzA=
github.com/binance-chain/ledger-cosmos-go v0.9.9-binance.3 h1:FFpFbkzlP2HUyxQCm0eoU6mkfgMNynfqZRbeWqlaLdQ=
Expand Down
6 changes: 5 additions & 1 deletion store/iavlstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -381,9 +381,13 @@ func (iter *iavlIterator) Value() []byte {
return val
}

// Implements Iterator.
// Close closes the IAVL iterator by closing the quit channel and waiting for
// the iterCh to finish/close.
func (iter *iavlIterator) Close() {
close(iter.quitCh)
// wait iterCh to close
for range iter.iterCh {
}
}

//----------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions types/coin.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,11 @@ func (coins Coins) Sort() Coins {
// Parsing

var (
// Denominations can be 3 ~ 10 characters long (8 + .B suffix).
// Denominations can be 2 ~ 10 characters long (8 + .B suffix).
// Extra token symbol tx hash suffix can be 2 ~ 6 characters long.
reAmt = `[[:digit:]]+`
reSpc = `\:`
reDnm = `[[:alnum:]]{3,8}(\.[[:alpha:]])?(-[0-9A-Z]{2,6})?`
reDnm = `[[:alnum:]]{2,8}(\.[[:alpha:]])?(-[0-9A-Z]{2,6})?`
reCoin = regexp.MustCompile(fmt.Sprintf(`^(%s)%s(%s)$`, reAmt, reSpc, reDnm))
)

Expand Down
1 change: 1 addition & 0 deletions types/coin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ func TestParse(t *testing.T) {
{"98:bar , 1:foo ", true, Coins{{"bar", 98}, {"foo", one}}},
{" 55:bling\n", true, Coins{{"bling", 55}}},
{"2:foo, 97:bar", true, Coins{{"bar", 97}, {"foo", 2}}},
{"10:ba-1BC", true, Coins{{"ba-1BC", 10}}},
{"5:mycoin,", false, nil}, // no empty coins in a list
{"2:3foo, 97:bar", true, Coins{{"3foo", 2}, {"bar", 97}}}, // 3foo is invalid coin name
{"11me:coin, 12you:coin", false, nil}, // no spaces in coin names
Expand Down
2 changes: 2 additions & 0 deletions types/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ const (
BEP3 = "BEP3" // https://github.com/binance-chain/BEPs/pull/30
BEP8 = "BEP8" // Mini-BEP2 token
LaunchBscUpgrade = "LaunchBscUpgrade"
BEP82 = "BEP82" // https://github.com/binance-chain/BEPs/pull/82
FixFailAckPackage = "FixFailAckPackage"
)

var MainNetConfig = UpgradeConfig{
Expand Down
4 changes: 0 additions & 4 deletions x/bank/client/cli/sendtx.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ func SendTxCmd(cdc *codec.Codec) *cobra.Command {
WithCodec(cdc).
WithAccountDecoder(authcmd.GetAccountDecoder(cdc))

if err := cliCtx.EnsureAccountExists(); err != nil {
return err
}

toStr := viper.GetString(flagTo)

to, err := sdk.AccAddressFromBech32(toStr)
Expand Down
6 changes: 6 additions & 0 deletions x/gov/client/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ func NormalizeProposalType(proposalType string) string {
return "CreateValidator"
case "RemoveValidator", "remove_validator":
return "RemoveValidator"
case "SCParamsChange", "sc_params_change":
return "SCParamsChange"
case "CSCParamsChange", "csc_params_change":
return "CSCParamsChange"
case "ManageChanPermission", "manage_chan_permission":
return "ManageChanPermission"
}
return ""
}
Expand Down
16 changes: 12 additions & 4 deletions x/oracle/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,19 @@ func handlePackage(ctx sdk.Context, oracleKeeper Keeper, chainId sdk.ChainID, pa
var sendSequence int64 = -1
if packageType == sdk.SynCrossChainPackageType {
if crash {
sendSeq, err := oracleKeeper.IbcKeeper.CreateRawIBCPackageById(ctx, chainId,
pack.ChannelId, sdk.FailAckCrossChainPackageType, pack.Payload)
if err != nil {
var ibcErr sdk.Error
var sendSeq uint64
if sdk.IsUpgrade(sdk.FixFailAckPackage) && len(pack.Payload) >= sTypes.PackageHeaderLength {
sendSeq, ibcErr = oracleKeeper.IbcKeeper.CreateRawIBCPackageById(ctx, chainId,
pack.ChannelId, sdk.FailAckCrossChainPackageType, pack.Payload[sTypes.PackageHeaderLength:])
} else {
logger.Error("found payload without header", "channelID", pack.ChannelId, "sequence", pack.Sequence, "payload", hex.EncodeToString(pack.Payload))
sendSeq, ibcErr = oracleKeeper.IbcKeeper.CreateRawIBCPackageById(ctx, chainId,
pack.ChannelId, sdk.FailAckCrossChainPackageType, pack.Payload)
}
if ibcErr != nil {
logger.Error("failed to write FailAckCrossChainPackage", "err", err)
return sdk.Event{}, err
return sdk.Event{}, ibcErr
}
sendSequence = int64(sendSeq)
} else {
Expand Down
31 changes: 16 additions & 15 deletions x/paramHub/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,20 @@ import (

const (
// Operate fee
ProposeFee = 10e8
DepositFee = 125e3
SideProposeFee = 10e8
SideDepositFee = 125e3
SideVoteFee = 1e8
ListingFee = 2000e8
IssueFee = 1000e8
MintFee = 200e8
BurnFee = 1e8
FreezeFee = 1e6
TimeLockFee = 1e6
TimeUnlockFee = 1e6
TimeRelockFee = 1e6
ProposeFee = 10e8
DepositFee = 125e3
SideProposeFee = 10e8
SideDepositFee = 125e3
SideVoteFee = 1e8
ListingFee = 2000e8
IssueFee = 1000e8
MintFee = 200e8
BurnFee = 1e8
FreezeFee = 1e6
TimeLockFee = 1e6
TimeUnlockFee = 1e6
TimeRelockFee = 1e6
TransferOwnershipFee = 1e6

SetAccountFlagsFee = 1e8

Expand Down Expand Up @@ -67,9 +68,9 @@ const (

//MiniToken fee
TinyIssueFee = 2e8
MiniIssueFee = 4e8
MiniIssueFee = 3e8
MiniSetUriFee = 37500
MiniListingFee = 10e8
MiniListingFee = 8e8
)

var DefaultGenesisState = param.GenesisState{
Expand Down
7 changes: 7 additions & 0 deletions x/paramHub/hub.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ func RegisterUpgradeBeginBlocker(paramHub *ParamHub) {
}
paramHub.UpdateFeeParams(ctx, miniTokenFeeParams)
})
sdk.UpgradeMgr.RegisterBeginBlocker(sdk.BEP82, func(ctx sdk.Context) {
updateFeeParams := []param.FeeParam{
&param.FixedFeeParams{MsgType: "transferOwnership", Fee: TransferOwnershipFee, FeeFor: sdk.FeeForProposer},
}
paramHub.UpdateFeeParams(ctx, updateFeeParams)
})
}

func EndBreatheBlock(ctx sdk.Context, paramHub *ParamHub) {
Expand Down Expand Up @@ -112,6 +118,7 @@ func init() {
"timeLock": fees.FixedFeeCalculatorGen,
"timeUnlock": fees.FixedFeeCalculatorGen,
"timeRelock": fees.FixedFeeCalculatorGen,
"transferOwnership": fees.FixedFeeCalculatorGen,
"send": bank.TransferFeeCalculatorGen,
"HTLT": fees.FixedFeeCalculatorGen,
"depositHTLT": fees.FixedFeeCalculatorGen,
Expand Down
1 change: 1 addition & 0 deletions x/paramHub/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ var (
"tokensBurn": {},
"setAccountFlags": {},
"tokensFreeze": {},
"transferOwnership": {},
"create_validator": {},
"remove_validator": {},
"timeLock": {},
Expand Down