From e47afdcc10fb17d02553b358c861eadef826e55e Mon Sep 17 00:00:00 2001 From: dylanhuang Date: Fri, 15 Jul 2022 15:36:57 +0800 Subject: [PATCH 1/4] feat: add ci script to docker image (#878) Co-authored-by: Owen --- .github/workflows/docker-release.yml | 50 ++++++++++++++++++++++++++++ Dockerfile | 42 +++++++++++++++-------- asset/mainnet/app.toml | 2 +- asset/testnet/app.toml | 2 +- asset/testnet/config.toml | 2 +- docker-entrypoint.sh | 14 ++++++++ docs/docker.md | 27 +++++++++++++++ 7 files changed, 122 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/docker-release.yml create mode 100644 docker-entrypoint.sh create mode 100644 docs/docker.md diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml new file mode 100644 index 000000000..d20943d24 --- /dev/null +++ b/.github/workflows/docker-release.yml @@ -0,0 +1,50 @@ +name: Docker + +on: + push: + # Publish `v1.2.3` tags as releases. + tags: + - v* + +env: + IMAGE_NAME: node + +jobs: + # Push image to GitHub Packages. + push: + runs-on: ubuntu-latest + if: github.event_name == 'push' + + steps: + - uses: actions/checkout@v2 + + - name: Build image + run: | + docker build . \ + --label "org.opencontainers.image.source=${{ secrets.IMAGE_SOURCE }}" \ + --label "org.opencontainers.image.revision=$(git rev-parse HEAD)" \ + --label "org.opencontainers.image.version=$(git describe --tags --abbrev=0)" \ + --label "org.opencontainers.image.licenses=MPL-2.0" \ + -f ./Dockerfile -t "${IMAGE_NAME}" + + - name: Log into registry + run: echo "${{ secrets.PACKAGE_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin + + - name: Push image + run: | + IMAGE_ID=ghcr.io/${{ github.repository }} + + # Change all uppercase to lowercase + IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') + # Strip git ref prefix from version + VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') + # Strip "v" prefix from tag name + [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') + # Use Docker `latest` tag convention + [ "$VERSION" == "master" ] && VERSION=latest + echo IMAGE_ID=$IMAGE_ID + echo VERSION=$VERSION + docker tag $IMAGE_NAME $IMAGE_ID:$VERSION + docker tag $IMAGE_NAME $IMAGE_ID:latest + docker push $IMAGE_ID:$VERSION + docker push $IMAGE_ID:latest diff --git a/Dockerfile b/Dockerfile index d3529bbfa..49f50b6d5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ -FROM golang:1.11-alpine AS build-env +FROM golang:1.17-alpine AS build-env # Set up dependencies -ENV PACKAGES make git libc-dev bash gcc linux-headers eudev-dev curl ca-certificates ssh +ENV PACKAGES make git libc-dev bash gcc linux-headers eudev-dev curl ca-certificates # Set working directory for the build WORKDIR /go/src/github.com/bnb-chain/node @@ -9,26 +9,40 @@ WORKDIR /go/src/github.com/bnb-chain/node # Add source files COPY . . -# Add ssh key to download private deps -COPY ~/.ssh/id_rsa /root/ssh/ - # Install minimum necessary dependencies, build Cosmos SDK, remove packages RUN apk add --no-cache $PACKAGES && \ - curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh && \ - make get_vendor_deps && \ - make build-alpine && \ + make build && \ make install -# Final image -FROM alpine:edge +# # Final image +FROM alpine:3.16.0 + +# Install dependencies +RUN apk add --update ca-certificates tini bash + +ARG USER=bnbchain +ARG USER_UID=1000 +ARG USER_GID=1000 -# Install ca-certificates -RUN apk add --update ca-certificates -WORKDIR /root +ENV DEFAULT_CONFIG=/configs +ENV HOME=/data + +RUN addgroup -g ${USER_GID} ${USER} \ + && adduser -u ${USER_UID} -G ${USER} --shell /sbin/nologin --no-create-home -D ${USER} \ + && addgroup ${USER} tty +RUN mkdir -p ${HOME} ${DEFAULT_CONFIG} +WORKDIR ${HOME} # Copy over binaries from the build-env COPY --from=build-env /go/bin/bnbchaind /usr/bin/bnbchaind COPY --from=build-env /go/bin/bnbcli /usr/bin/bnbcli +COPY docker-entrypoint.sh / +COPY ./asset/ ${DEFAULT_CONFIG}/ + +RUN chown -R ${USER_UID}:${USER_GID} ${HOME} \ + && chmod +x /docker-entrypoint.sh + +USER ${USER}:${USER} # Run gaiad by default, omit entrypoint to ease using container with gaiacli -CMD ["bnbchaind"] +CMD ["/sbin/tini", "--", "/docker-entrypoint.sh"] diff --git a/asset/mainnet/app.toml b/asset/mainnet/app.toml index 0df4da2d5..72b2c1dcc 100644 --- a/asset/mainnet/app.toml +++ b/asset/mainnet/app.toml @@ -146,7 +146,7 @@ localMaxAge = 7 [log] # Write logs to console instead of file -logToConsole = false +logToConsole = true ## The below parameters take effect only when logToConsole is false # Log file root, if not set, use home path diff --git a/asset/testnet/app.toml b/asset/testnet/app.toml index f03da2109..d381ff7f5 100644 --- a/asset/testnet/app.toml +++ b/asset/testnet/app.toml @@ -169,7 +169,7 @@ kafkaVersion = "2.1.0" [log] # Write logs to console instead of file -logToConsole = false +logToConsole = true ## The below parameters take effect only when logToConsole is false # Log file root, if not set, use home path diff --git a/asset/testnet/config.toml b/asset/testnet/config.toml index 56d5bcb7a..9628fbdb9 100644 --- a/asset/testnet/config.toml +++ b/asset/testnet/config.toml @@ -99,7 +99,7 @@ with_app_stat = true [rpc] # TCP or UNIX socket address for the RPC server to listen on -laddr = "tcp://0.0.0.0:26657" +laddr = "tcp://0.0.0.0:27147" # A list of origins a cross-domain request can be executed from # Default value '[]' disables cors support diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh new file mode 100644 index 000000000..ef806ab1d --- /dev/null +++ b/docker-entrypoint.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +DEFAULT_NETWORK=("mainnet" "testnet") +NETWORK=${NETWORK:-mainnet} +HOME=${HOME:-/data} +DEFAULT_CONFIG=${DEFAULT_CONFIG:-/configs} + +if echo ${DEFAULT_NETWORK[@]} | grep -q -w "${NETWORK}" +then + mkdir -p ${HOME}/config + cp ${DEFAULT_CONFIG}/${NETWORK}/* ${HOME}/config/ +fi + +exec "bnbchaind" "start" "--home" ${HOME} "$@" \ No newline at end of file diff --git a/docs/docker.md b/docs/docker.md new file mode 100644 index 000000000..c6fa10bb4 --- /dev/null +++ b/docs/docker.md @@ -0,0 +1,27 @@ +## Docker Usage + +### Image +```sh +docker pull ghcr.io/bnb-chain/node:latest +``` + +### Env + +| env | desc | default| +|---|---|---| +| NETWORK | default network options, if `mainnet` or `testnet` is configured, the genesis file will be automatically configured | `mainnet`| +| HOME | directory for config and data | `/data` | + +### Example +1. Start a testnet full node +``` +docker run -p 27146:27146 -p 27147:27147 -e NETWORK=testnet ghcr.io/bnb-chain/node:latest +``` + +2. Start a mainnet full node with mounted volume +``` +docker run -p 27146:27146 -p 27147:27147 -v /tmp/chain/data:/data ghcr.io/bnb-chain/node:latest +``` + + + From 2724e5bc52dcec14111f3e71bcd68d6d0d7e37ea Mon Sep 17 00:00:00 2001 From: Roshan <48975233+Loverush@users.noreply.github.com> Date: Wed, 17 Aug 2022 14:49:11 +0800 Subject: [PATCH 2/4] BEP153: Native Staking Implementation (#879) --- CHANGELOG.md | 4 ++ app/app.go | 30 ++++++++++++ app/config/config.go | 4 ++ common/upgrade/upgrade.go | 1 + go.mod | 2 +- go.sum | 4 +- plugins/bridge/client/cli/tx.go | 4 +- plugins/bridge/handler.go | 2 +- plugins/bridge/keeper/keeper.go | 4 +- plugins/bridge/types/address.go | 70 ---------------------------- plugins/bridge/types/address_test.go | 23 --------- plugins/bridge/types/bind.go | 14 +++--- plugins/bridge/types/msgs.go | 24 +++++----- plugins/bridge/types/msgs_test.go | 8 ++-- plugins/bridge/types/serialize.go | 30 ++++++------ plugins/dex/list/handler_test.go | 2 + version/version.go | 2 +- 17 files changed, 88 insertions(+), 140 deletions(-) delete mode 100644 plugins/bridge/types/address.go delete mode 100644 plugins/bridge/types/address_test.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 395011183..86d8cc109 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 0.10.1 +IMPROVEMENTS +* [\#879](https://github.com/bnb-chain/node/pull/879) [Staking] Implement BEP153: Native Staking on BSC + ## 0.10.0 IMPROVEMENTS * [\#875](https://github.com/bnb-chain/node/pull/875) [DEX] Implement BEP151 diff --git a/app/app.go b/app/app.go index 8c39c1b4b..718d6ce51 100644 --- a/app/app.go +++ b/app/app.go @@ -1,6 +1,7 @@ package app import ( + "encoding/hex" "encoding/json" "fmt" "io" @@ -26,7 +27,9 @@ import ( "github.com/cosmos/cosmos-sdk/x/sidechain" "github.com/cosmos/cosmos-sdk/x/slashing" "github.com/cosmos/cosmos-sdk/x/stake" + cStake "github.com/cosmos/cosmos-sdk/x/stake/cross_stake" "github.com/cosmos/cosmos-sdk/x/stake/keeper" + sTypes "github.com/cosmos/cosmos-sdk/x/stake/types" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/crypto/tmhash" @@ -171,6 +174,8 @@ func NewBinanceChain(logger log.Logger, db dbm.DB, traceStore io.Writer, baseApp common.StakeStoreKey, common.StakeRewardStoreKey, common.TStakeStoreKey, app.CoinKeeper, app.Pool, app.ParamHub.Subspace(stake.DefaultParamspace), app.RegisterCodespace(stake.DefaultCodespace), + sdk.ChainID(app.crossChainConfig.BscIbcChainId), + app.crossChainConfig.BscChainId, ) app.ValAddrCache = NewValAddrCache(app.stakeKeeper) @@ -329,6 +334,7 @@ func SetUpgradeConfig(upgradeConfig *config.UpgradeConfig) { upgrade.Mgr.AddUpgradeHeight(upgrade.FixFailAckPackage, upgradeConfig.FixFailAckPackageHeight) upgrade.Mgr.AddUpgradeHeight(upgrade.BEP128, upgradeConfig.BEP128Height) upgrade.Mgr.AddUpgradeHeight(upgrade.BEP151, upgradeConfig.BEP151Height) + upgrade.Mgr.AddUpgradeHeight(upgrade.BEP153, upgradeConfig.BEP153Height) // register store keys of upgrade upgrade.Mgr.RegisterStoreKeys(upgrade.BEP9, common.TimeLockStoreKey.Name()) @@ -536,6 +542,30 @@ func (app *BinanceChain) initStaking() { params.RewardDistributionBatchSize = 1000 app.stakeKeeper.SetParams(newCtx, params) }) + upgrade.Mgr.RegisterBeginBlocker(sdk.BEP153, func(ctx sdk.Context) { + chainId := sdk.ChainID(ServerContext.BscIbcChainId) + app.scKeeper.SetChannelSendPermission(ctx, chainId, sTypes.CrossStakeChannelID, sdk.ChannelAllow) + stakeContractAddr := "0000000000000000000000000000000000002001" + stakeContractBytes, _ := hex.DecodeString(stakeContractAddr) + _, sdkErr := app.scKeeper.CreateNewChannelToIbc(ctx, chainId, sTypes.CrossStakeChannelID, sdk.RewardNotFromSystem, stakeContractBytes) + 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) + } + }) + + if sdk.IsUpgrade(sdk.BEP153) { + crossStakeApp := cStake.NewCrossStakeApp(app.stakeKeeper) + err := app.scKeeper.RegisterChannel(sTypes.CrossStakeChannel, sTypes.CrossStakeChannelID, crossStakeApp) + if err != nil { + panic(err) + } + } + app.stakeKeeper.SubscribeParamChange(app.ParamHub) app.stakeKeeper = app.stakeKeeper.WithHooks(app.slashKeeper.Hooks()) } diff --git a/app/config/config.go b/app/config/config.go index 5431d1c4c..149171957 100644 --- a/app/config/config.go +++ b/app/config/config.go @@ -89,6 +89,8 @@ EnableAccountScriptsForCrossChainTransferHeight = {{ .UpgradeConfig.EnableAccoun BEP128Height = {{ .UpgradeConfig.BEP128Height }} # Block height of BEP151 upgrade BEP151Height = {{ .UpgradeConfig.BEP151Height }} +# Block height of BEP153 upgrade +BEP153Height = {{ .UpgradeConfig.BEP153Height }} [query] # ABCI query interface black list, suggested value: ["custom/gov/proposals", "custom/timelock/timelocks", "custom/atomicSwap/swapcreator", "custom/atomicSwap/swaprecipient"] @@ -529,6 +531,7 @@ type UpgradeConfig struct { EnableAccountScriptsForCrossChainTransferHeight int64 `mapstructure:"EnableAccountScriptsForCrossChainTransferHeight"` BEP128Height int64 `mapstructure:"BEP128Height"` BEP151Height int64 `mapstructure:"BEP151Height"` + BEP153Height int64 `mapstructure:"BEP153Height"` } func defaultUpgradeConfig() *UpgradeConfig { @@ -550,6 +553,7 @@ func defaultUpgradeConfig() *UpgradeConfig { LaunchBscUpgradeHeight: 1, BEP128Height: math.MaxInt64, BEP151Height: math.MaxInt64, + BEP153Height: math.MaxInt64, BEP82Height: math.MaxInt64, BEP84Height: math.MaxInt64, BEP87Height: math.MaxInt64, diff --git a/common/upgrade/upgrade.go b/common/upgrade/upgrade.go index 79b429352..c9f183a0e 100644 --- a/common/upgrade/upgrade.go +++ b/common/upgrade/upgrade.go @@ -39,6 +39,7 @@ const ( 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 + BEP153 = sdk.BEP153 // https://github.com/bnb-chain/BEPs/pull/153 Native Staking ) func UpgradeBEP10(before func(), after func()) { diff --git a/go.mod b/go.mod index e382255e4..b1cdef8c0 100644 --- a/go.mod +++ b/go.mod @@ -81,7 +81,7 @@ require ( ) replace ( - github.com/cosmos/cosmos-sdk => github.com/bnb-chain/bnc-cosmos-sdk v0.25.0-binance.28 + github.com/cosmos/cosmos-sdk => github.com/bnb-chain/bnc-cosmos-sdk v0.25.1 github.com/tendermint/go-amino => github.com/bnb-chain/bnc-go-amino v0.14.1-binance.2 github.com/tendermint/iavl => github.com/bnb-chain/bnc-tendermint-iavl v0.12.0-binance.4 github.com/tendermint/tendermint => github.com/bnb-chain/bnc-tendermint v0.32.3-binance.7 diff --git a/go.sum b/go.sum index 39f966a10..67748e6e8 100644 --- a/go.sum +++ b/go.sum @@ -22,8 +22,8 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bnb-chain/bnc-cosmos-sdk v0.25.0-binance.28 h1:pTc+tGGDVYqWEYf3RAL8DgJU4eAWu33Y/0hKbMOFK9A= -github.com/bnb-chain/bnc-cosmos-sdk v0.25.0-binance.28/go.mod h1:+0MJRhSM5hb/ZvvoWOVt7LaihYM1Ax+PxnAMK/lHHUs= +github.com/bnb-chain/bnc-cosmos-sdk v0.25.1 h1:thuhSDcIwwUFYwPvtD3EPk295PeM4bZYbEJVMroQwHw= +github.com/bnb-chain/bnc-cosmos-sdk v0.25.1/go.mod h1:+0MJRhSM5hb/ZvvoWOVt7LaihYM1Ax+PxnAMK/lHHUs= github.com/bnb-chain/bnc-go-amino v0.14.1-binance.2 h1:iAlp9gqG0f2LGAauf3ZiijWlT6NI+W2r9y70HH9LI3k= github.com/bnb-chain/bnc-go-amino v0.14.1-binance.2/go.mod h1:LiCO7jev+3HwLGAiN9gpD0z+jTz95RqgSavbse55XOY= github.com/bnb-chain/bnc-tendermint v0.32.3-binance.7 h1:wJBrhLAm9P+Jjm/clTxynAZJl63xD7LatKmL5e3YzbY= diff --git a/plugins/bridge/client/cli/tx.go b/plugins/bridge/client/cli/tx.go index 6b9088c8f..c8eb09f59 100644 --- a/plugins/bridge/client/cli/tx.go +++ b/plugins/bridge/client/cli/tx.go @@ -53,7 +53,7 @@ func BindCmd(cdc *codec.Codec) *cobra.Command { expireTime := viper.GetInt64(flagExpireTime) // build message - contractAddress, err := types.NewSmartChainAddress(contractAddressStr) + contractAddress, err := sdk.NewSmartChainAddress(contractAddressStr) if err != nil { return err } @@ -133,7 +133,7 @@ func TransferOutCmd(cdc *codec.Codec) *cobra.Command { } // build message - toAddress, err := types.NewSmartChainAddress(toAddressStr) + toAddress, err := sdk.NewSmartChainAddress(toAddressStr) if err != nil { return err } diff --git a/plugins/bridge/handler.go b/plugins/bridge/handler.go index c626cb30f..6167c4e39 100644 --- a/plugins/bridge/handler.go +++ b/plugins/bridge/handler.go @@ -275,7 +275,7 @@ func handleTransferOutMsg(ctx sdk.Context, keeper Keeper, msg TransferOutMsg) sd return sdkErr.Result() } - contractAddr, err := types.NewSmartChainAddress(token.GetContractAddress()) + contractAddr, err := sdk.NewSmartChainAddress(token.GetContractAddress()) if err != nil { return types.ErrInvalidContractAddress(fmt.Sprintf("contract address is invalid, addr=%s", contractAddr)).Result() } diff --git a/plugins/bridge/keeper/keeper.go b/plugins/bridge/keeper/keeper.go index e810d3a08..eae9d85e8 100644 --- a/plugins/bridge/keeper/keeper.go +++ b/plugins/bridge/keeper/keeper.go @@ -124,7 +124,7 @@ func (k Keeper) GetBindRequest(ctx sdk.Context, symbol string) (types.BindReques return bindRequest, nil } -func (k Keeper) SetContractDecimals(ctx sdk.Context, contractAddr types.SmartChainAddress, decimals int8) { +func (k Keeper) SetContractDecimals(ctx sdk.Context, contractAddr sdk.SmartChainAddress, decimals int8) { key := types.GetContractDecimalsKey(contractAddr[:]) kvStore := ctx.KVStore(k.storeKey) @@ -136,7 +136,7 @@ func (k Keeper) SetContractDecimals(ctx sdk.Context, contractAddr types.SmartCha kvStore.Set(key, []byte{byte(decimals)}) } -func (k Keeper) GetContractDecimals(ctx sdk.Context, contractAddr types.SmartChainAddress) int8 { +func (k Keeper) GetContractDecimals(ctx sdk.Context, contractAddr sdk.SmartChainAddress) int8 { if sdk.IsUpgrade(upgrade.FixFailAckPackage) { if strings.ToLower(contractAddr.String()) == types.BNBContractAddr { return types.BNBContractDecimals diff --git a/plugins/bridge/types/address.go b/plugins/bridge/types/address.go deleted file mode 100644 index 6af7b5e0a..000000000 --- a/plugins/bridge/types/address.go +++ /dev/null @@ -1,70 +0,0 @@ -package types - -import ( - "encoding/hex" - "fmt" - "math/big" - "strings" - - sdk "github.com/cosmos/cosmos-sdk/types" -) - -const ( - SmartChainAddressLength = 20 -) - -// SmartChainAddress defines a standard smart chain address -type SmartChainAddress [SmartChainAddressLength]byte - -// NewSmartChainAddress is a constructor function for SmartChainAddress -func NewSmartChainAddress(addr string) (SmartChainAddress, error) { - addr = strings.ToLower(addr) - if len(addr) >= 2 && addr[:2] == "0x" { - addr = addr[2:] - } - if length := len(addr); length != 2*SmartChainAddressLength { - return SmartChainAddress{}, fmt.Errorf("invalid address hex length: %v != %v", length, 2*SmartChainAddressLength) - } - - bin, err := hex.DecodeString(addr) - if err != nil { - return SmartChainAddress{}, err - } - var address SmartChainAddress - address.SetBytes(bin) - return address, nil -} - -func (addr *SmartChainAddress) SetBytes(b []byte) { - if len(b) > len(addr) { - b = b[len(b)-20:] - } - copy(addr[20-len(b):], b) -} - -func (addr SmartChainAddress) IsEmpty() bool { - addrValue := big.NewInt(0) - addrValue.SetBytes(addr[:]) - - return addrValue.Cmp(big.NewInt(0)) == 0 -} - -// Route should return the name of the module -func (addr SmartChainAddress) String() string { - return sdk.HexAddress(addr[:]) -} - -// MarshalJSON marshals the smart chain address to JSON -func (addr SmartChainAddress) MarshalJSON() ([]byte, error) { - return []byte(fmt.Sprintf("\"%v\"", addr.String())), nil -} - -// UnmarshalJSON unmarshals an smart chain address -func (addr *SmartChainAddress) UnmarshalJSON(input []byte) error { - hexBytes, err := sdk.HexDecode(string(input[1 : len(input)-1])) - if err != nil { - return err - } - addr.SetBytes(hexBytes) - return nil -} diff --git a/plugins/bridge/types/address_test.go b/plugins/bridge/types/address_test.go deleted file mode 100644 index c4d1ee10e..000000000 --- a/plugins/bridge/types/address_test.go +++ /dev/null @@ -1,23 +0,0 @@ -package types - -import ( - "testing" - - "github.com/stretchr/testify/require" -) - -func TestAddress(t *testing.T) { - addrStr := "0x43121d597656E398473b992f0dF667fF0fc0791C" - address, err := NewSmartChainAddress(addrStr) - require.Nil(t, err, "err should be nil") - convertedAddrStr := address.String() - require.Equal(t, addrStr, convertedAddrStr, "address should be equal") - - addrStr = "0x43121d597656E398473b992f0dF667fF0fc0791C1" - _, err = NewSmartChainAddress(addrStr) - require.NotNil(t, err, "err should not be nil") - - addrStr = "0x43121d597656E398473b992f0dF667fF0fc0791" - _, err = NewSmartChainAddress(addrStr) - require.NotNil(t, err, "err should not be nil") -} diff --git a/plugins/bridge/types/bind.go b/plugins/bridge/types/bind.go index c96b3f126..5647f9546 100644 --- a/plugins/bridge/types/bind.go +++ b/plugins/bridge/types/bind.go @@ -3,11 +3,11 @@ package types import sdk "github.com/cosmos/cosmos-sdk/types" type BindRequest struct { - From sdk.AccAddress `json:"from"` - Symbol string `json:"symbol"` - Amount int64 `json:"amount"` - DeductedAmount int64 `json:"deducted_amount"` - ContractAddress SmartChainAddress `json:"contract_address"` - ContractDecimals int8 `json:"contract_decimals"` - ExpireTime int64 `json:"expire_time"` + From sdk.AccAddress `json:"from"` + Symbol string `json:"symbol"` + Amount int64 `json:"amount"` + DeductedAmount int64 `json:"deducted_amount"` + ContractAddress sdk.SmartChainAddress `json:"contract_address"` + ContractDecimals int8 `json:"contract_decimals"` + ExpireTime int64 `json:"expire_time"` } diff --git a/plugins/bridge/types/msgs.go b/plugins/bridge/types/msgs.go index 5582885a2..c0f616141 100644 --- a/plugins/bridge/types/msgs.go +++ b/plugins/bridge/types/msgs.go @@ -23,15 +23,15 @@ const ( var _ sdk.Msg = BindMsg{} type BindMsg struct { - From sdk.AccAddress `json:"from"` - Symbol string `json:"symbol"` - Amount int64 `json:"amount"` - ContractAddress SmartChainAddress `json:"contract_address"` - ContractDecimals int8 `json:"contract_decimals"` - ExpireTime int64 `json:"expire_time"` + From sdk.AccAddress `json:"from"` + Symbol string `json:"symbol"` + Amount int64 `json:"amount"` + ContractAddress sdk.SmartChainAddress `json:"contract_address"` + ContractDecimals int8 `json:"contract_decimals"` + ExpireTime int64 `json:"expire_time"` } -func NewBindMsg(from sdk.AccAddress, symbol string, amount int64, contractAddress SmartChainAddress, contractDecimals int8, expireTime int64) BindMsg { +func NewBindMsg(from sdk.AccAddress, symbol string, amount int64, contractAddress sdk.SmartChainAddress, contractDecimals int8, expireTime int64) BindMsg { return BindMsg{ From: from, Amount: amount, @@ -169,13 +169,13 @@ func ParseBindStatus(input string) (BindStatus, error) { var _ sdk.Msg = TransferOutMsg{} type TransferOutMsg struct { - From sdk.AccAddress `json:"from"` - To SmartChainAddress `json:"to"` - Amount sdk.Coin `json:"amount"` - ExpireTime int64 `json:"expire_time"` + From sdk.AccAddress `json:"from"` + To sdk.SmartChainAddress `json:"to"` + Amount sdk.Coin `json:"amount"` + ExpireTime int64 `json:"expire_time"` } -func NewTransferOutMsg(from sdk.AccAddress, to SmartChainAddress, amount sdk.Coin, expireTime int64) TransferOutMsg { +func NewTransferOutMsg(from sdk.AccAddress, to sdk.SmartChainAddress, amount sdk.Coin, expireTime int64) TransferOutMsg { return TransferOutMsg{ From: from, To: to, diff --git a/plugins/bridge/types/msgs_test.go b/plugins/bridge/types/msgs_test.go index 81c207f45..04c915152 100644 --- a/plugins/bridge/types/msgs_test.go +++ b/plugins/bridge/types/msgs_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/require" ) -func BytesToAddress(b []byte) SmartChainAddress { - var a SmartChainAddress +func BytesToAddress(b []byte) sdk.SmartChainAddress { + var a sdk.SmartChainAddress a.SetBytes(b) return a } @@ -17,8 +17,8 @@ func BytesToAddress(b []byte) SmartChainAddress { func TestBindMsg(t *testing.T) { _, addrs, _, _ := mock.CreateGenAccounts(1, sdk.Coins{}) - nonEmptySmartChainAddr := SmartChainAddress(BytesToAddress([]byte{1})) - emptySmartChainAddr := SmartChainAddress(BytesToAddress([]byte{0})) + nonEmptySmartChainAddr := sdk.SmartChainAddress(BytesToAddress([]byte{1})) + emptySmartChainAddr := sdk.SmartChainAddress(BytesToAddress([]byte{0})) tests := []struct { bindMsg BindMsg diff --git a/plugins/bridge/types/serialize.go b/plugins/bridge/types/serialize.go index fe44863f6..7c82fb908 100644 --- a/plugins/bridge/types/serialize.go +++ b/plugins/bridge/types/serialize.go @@ -18,7 +18,7 @@ const ( type BindSynPackage struct { PackageType BindPackageType TokenSymbol [32]byte - ContractAddr SmartChainAddress + ContractAddr sdk.SmartChainAddress TotalSupply *big.Int PeggyAmount *big.Int Decimals uint8 @@ -67,10 +67,10 @@ type ApproveBindAckPackage struct { type TransferInSynPackage struct { TokenSymbol [32]byte - ContractAddress SmartChainAddress + ContractAddress sdk.SmartChainAddress Amounts []*big.Int ReceiverAddresses []sdk.AccAddress - RefundAddresses []SmartChainAddress + RefundAddresses []sdk.SmartChainAddress ExpireTime uint64 } @@ -84,17 +84,17 @@ func DeserializeTransferInSynPackage(serializedPackage []byte) (*TransferInSynPa } type TransferInRefundPackage struct { - ContractAddr SmartChainAddress + ContractAddr sdk.SmartChainAddress RefundAmounts []*big.Int - RefundAddresses []SmartChainAddress + RefundAddresses []sdk.SmartChainAddress RefundReason RefundReason } type TransferOutSynPackage struct { TokenSymbol [32]byte - ContractAddress SmartChainAddress + ContractAddress sdk.SmartChainAddress Amount *big.Int - Recipient SmartChainAddress + Recipient sdk.SmartChainAddress RefundAddress sdk.AccAddress ExpireTime uint64 } @@ -135,8 +135,8 @@ func DeserializeTransferOutRefundPackage(serializedPackage []byte) (*TransferOut } type MirrorSynPackage struct { - MirrorSender SmartChainAddress - ContractAddr SmartChainAddress + MirrorSender sdk.SmartChainAddress + ContractAddr sdk.SmartChainAddress BEP20Name [32]byte BEP20Symbol [32]byte BEP20TotalSupply *big.Int @@ -163,8 +163,8 @@ const ( ) type MirrorAckPackage struct { - MirrorSender SmartChainAddress - ContractAddr SmartChainAddress + MirrorSender sdk.SmartChainAddress + ContractAddr sdk.SmartChainAddress Decimals uint8 BEP2Symbol [32]byte MirrorFee *big.Int @@ -178,8 +178,8 @@ const ( ) type MirrorSyncSynPackage struct { - SyncSender SmartChainAddress - ContractAddr SmartChainAddress + SyncSender sdk.SmartChainAddress + ContractAddr sdk.SmartChainAddress BEP2Symbol [32]byte BEP20TotalSupply *big.Int SyncFee *big.Int @@ -196,8 +196,8 @@ func DeserializeMirrorSyncSynPackage(serializedPackage []byte) (*MirrorSyncSynPa } type MirrorSyncAckPackage struct { - SyncSender SmartChainAddress - ContractAddr SmartChainAddress + SyncSender sdk.SmartChainAddress + ContractAddr sdk.SmartChainAddress SyncFee *big.Int ErrorCode uint8 } diff --git a/plugins/dex/list/handler_test.go b/plugins/dex/list/handler_test.go index d2b1fc7ef..1fc220b59 100644 --- a/plugins/dex/list/handler_test.go +++ b/plugins/dex/list/handler_test.go @@ -77,6 +77,8 @@ func MakeKeepers(cdc *codec.Codec) (ms sdkStore.CommitMultiStore, dexKeeper *ord stakeKey, stakeRewardKey, stakeTKey, bankKeeper, nil, paramsKeeper.Subspace(stake.DefaultParamspace), stake.DefaultCodespace, + sdk.ChainID(0), + "", ) govKeeper = gov.NewKeeper(cdc, govKey, paramsKeeper, paramsKeeper.Subspace(gov.DefaultParamSpace), diff --git a/version/version.go b/version/version.go index 56ebd3c9f..b3ff62132 100644 --- a/version/version.go +++ b/version/version.go @@ -12,7 +12,7 @@ var ( Version string ) -const NodeVersion = "v0.10.0" +const NodeVersion = "v0.10.1" func init() { Version = fmt.Sprintf("BNB Beacon Chain Release: %s;", NodeVersion) From 48e5a66fb39a5ba3f205b4cd50f786d8ebd91996 Mon Sep 17 00:00:00 2001 From: zjubfd <296179868@qq.com> Date: Wed, 17 Aug 2022 14:52:17 +0800 Subject: [PATCH 3/4] doc: fix missing changelogs --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 86d8cc109..c91235b2d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # Changelog ## 0.10.1 +FEATURES +* [\#878](https://github.com/bnb-chain/node/pull/878) [CI] Add ci script to docker image + IMPROVEMENTS * [\#879](https://github.com/bnb-chain/node/pull/879) [Staking] Implement BEP153: Native Staking on BSC From c78160b62eedb755e0de619cae8456f6589c8d3b Mon Sep 17 00:00:00 2001 From: Roshan <48975233+Loverush@users.noreply.github.com> Date: Wed, 31 Aug 2022 20:26:49 +0800 Subject: [PATCH 4/4] feat: update BEP153Height of testnet (#884) --- CHANGELOG.md | 8 +++++--- asset/testnet/app.toml | 2 ++ go.mod | 13 ++++++++++--- go.sum | 32 ++++++++++++++++++++++++++++---- version/version.go | 2 +- 5 files changed, 46 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c91235b2d..50c7d141e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,13 @@ # Changelog -## 0.10.1 +## 0.10.2 FEATURES -* [\#878](https://github.com/bnb-chain/node/pull/878) [CI] Add ci script to docker image +* [\#878](https://github.com/bnb-chain/node/pull/878) [CI] Add ci script to build docker image +* [\#879](https://github.com/bnb-chain/node/pull/879) [Staking] Implement BEP153: Native Staking on BSC +## 0.10.1 IMPROVEMENTS -* [\#879](https://github.com/bnb-chain/node/pull/879) [Staking] Implement BEP153: Native Staking on BSC +* [\#882](https://github.com/bnb-chain/node/pull/882) [DEX] Add BEP151 Mainnet Height ## 0.10.0 IMPROVEMENTS diff --git a/asset/testnet/app.toml b/asset/testnet/app.toml index d381ff7f5..f9bf66e92 100644 --- a/asset/testnet/app.toml +++ b/asset/testnet/app.toml @@ -58,6 +58,8 @@ EnableAccountScriptsForCrossChainTransferHeight = 7841000 BEP128Height = 23551600 #Block height of BEP151 upgrade BEP151Height = 28250000 +#Block height of BEP153 upgrade +BEP153Height = 30516226 [query] # ABCI query interface black list, suggested value: ["custom/gov/proposals", "custom/timelock/timelocks", "custom/atomicSwap/swapcreator", "custom/atomicSwap/swaprecipient"] diff --git a/go.mod b/go.mod index b1cdef8c0..83ab49a9e 100644 --- a/go.mod +++ b/go.mod @@ -4,6 +4,7 @@ go 1.17 require ( github.com/Shopify/sarama v1.21.0 + github.com/binance-chain/go-sdk v1.2.7 github.com/cosmos/cosmos-sdk v0.25.0 github.com/deathowl/go-metrics-prometheus v0.0.0-20200518174047-74482eab5bfb github.com/eapache/go-resiliency v1.1.0 @@ -22,7 +23,9 @@ require ( github.com/tendermint/go-amino v0.15.0 github.com/tendermint/iavl v0.12.4 github.com/tendermint/tendermint v0.32.3 + github.com/tidwall/gjson v1.14.3 go.uber.org/ratelimit v0.1.0 + golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f ) require ( @@ -30,6 +33,7 @@ require ( github.com/bartekn/go-bip39 v0.0.0-20171116152956-a05967ea095d // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/speakeasy v0.1.0 // indirect + github.com/binance-chain/ledger-cosmos-go v0.9.9-binance.1 // indirect github.com/btcsuite/btcd v0.20.1-beta // indirect github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d // indirect github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d // indirect @@ -43,7 +47,7 @@ require ( github.com/gogo/protobuf v1.3.1 // indirect github.com/golang/protobuf v1.3.2 // indirect github.com/golang/snappy v0.0.1 // indirect - github.com/gorilla/websocket v1.4.0 // indirect + github.com/gorilla/websocket v1.4.1-0.20190629185528-ae1634f6a989 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect @@ -65,10 +69,13 @@ require ( github.com/spf13/cast v1.3.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.3 // indirect - github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965 // indirect + github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d // indirect github.com/tendermint/btcd v0.1.1 // indirect + github.com/tidwall/match v1.1.1 // indirect + github.com/tidwall/pretty v1.2.0 // indirect github.com/zondax/hid v0.9.0 // indirect github.com/zondax/ledger-cosmos-go v0.9.9 // indirect + github.com/zondax/ledger-go v0.9.0 // indirect golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 // indirect golang.org/x/net v0.0.0-20191021144547-ec77196f6094 // indirect golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6 // indirect @@ -81,7 +88,7 @@ require ( ) replace ( - github.com/cosmos/cosmos-sdk => github.com/bnb-chain/bnc-cosmos-sdk v0.25.1 + github.com/cosmos/cosmos-sdk => github.com/bnb-chain/bnc-cosmos-sdk v0.25.2 github.com/tendermint/go-amino => github.com/bnb-chain/bnc-go-amino v0.14.1-binance.2 github.com/tendermint/iavl => github.com/bnb-chain/bnc-tendermint-iavl v0.12.0-binance.4 github.com/tendermint/tendermint => github.com/bnb-chain/bnc-tendermint v0.32.3-binance.7 diff --git a/go.sum b/go.sum index 67748e6e8..69dc92b7f 100644 --- a/go.sum +++ b/go.sum @@ -22,8 +22,12 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bnb-chain/bnc-cosmos-sdk v0.25.1 h1:thuhSDcIwwUFYwPvtD3EPk295PeM4bZYbEJVMroQwHw= -github.com/bnb-chain/bnc-cosmos-sdk v0.25.1/go.mod h1:+0MJRhSM5hb/ZvvoWOVt7LaihYM1Ax+PxnAMK/lHHUs= +github.com/binance-chain/go-sdk v1.2.7 h1:JB8O37BNgYCgwrYBlpFHOe/S7kGLdBmHj4gIFLc8Y80= +github.com/binance-chain/go-sdk v1.2.7/go.mod h1:WFOTNRkp3JmWEuGAmNFw+7WbK7DG8ZzEWmw4Ym4Mb0M= +github.com/binance-chain/ledger-cosmos-go v0.9.9-binance.1 h1:8mAtw1Tp/BhhTrsXmXM60H1fihcvcKLfo2ZSxShaXKw= +github.com/binance-chain/ledger-cosmos-go v0.9.9-binance.1/go.mod h1:FI6WAujuiBpoSavYreux2zTKyrUkngXDlRJczxsDK5M= +github.com/bnb-chain/bnc-cosmos-sdk v0.25.2 h1:pMGOuD95Razi8bC4alHuv+DDXSc4C29xpfgfbgetvwI= +github.com/bnb-chain/bnc-cosmos-sdk v0.25.2/go.mod h1:+0MJRhSM5hb/ZvvoWOVt7LaihYM1Ax+PxnAMK/lHHUs= github.com/bnb-chain/bnc-go-amino v0.14.1-binance.2 h1:iAlp9gqG0f2LGAauf3ZiijWlT6NI+W2r9y70HH9LI3k= github.com/bnb-chain/bnc-go-amino v0.14.1-binance.2/go.mod h1:LiCO7jev+3HwLGAiN9gpD0z+jTz95RqgSavbse55XOY= github.com/bnb-chain/bnc-tendermint v0.32.3-binance.7 h1:wJBrhLAm9P+Jjm/clTxynAZJl63xD7LatKmL5e3YzbY= @@ -113,8 +117,9 @@ github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/gorilla/mux v1.7.3 h1:gnP5JzjVOuiZD07fKKToCAOjS0yOpj/qPETTXCCS6hw= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/websocket v1.2.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.0 h1:WDFjx/TMzVgy9VdMMQi2K2Emtwi2QcUQsztZ/zLaH/Q= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.1-0.20190629185528-ae1634f6a989 h1:giknQ4mEuDFmmHSrGcbargOuLHQGtywqo4mheITex54= +github.com/gorilla/websocket v1.4.1-0.20190629185528-ae1634f6a989/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= @@ -188,6 +193,7 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.1.0 h1:BQ53HtBmfOitExawJ6LokA4x8ov/z0SYYb0+HxJfRI8= @@ -197,11 +203,13 @@ github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 h1:S/YWwWx github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.0.0-20181020173914-7e9e6cabbd39/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.6.0 h1:kRhiuYSXR3+uv2IbVbZhUxK5zVD/2pp3Gd2PpvPkpEo= github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.3 h1:CTwfnzjQ+8dS6MhHHu4YswVAD99sL2wjPqP+VkURmKE= @@ -244,12 +252,20 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/syndtr/goleveldb v0.0.0-20181105012736-f9080354173f/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0= -github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965 h1:1oFLiOyVl+W7bnBzGhf7BbIv9loSFQcieWWYIjLqcAw= github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= +github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d h1:gZZadD8H+fF+n9CmNhYL1Y0dJB+kLOmKd7FbPJLeGHs= +github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= +github.com/tendermint/btcd v0.0.0-20180816174608-e5840949ff4f/go.mod h1:DC6/m53jtQzr/NFmMNEu0rxf18/ktVoVtMrnDD5pN+U= github.com/tendermint/btcd v0.1.1 h1:0VcxPfflS2zZ3RiOAHkBiFUcPvbtRj5O7zHmcJWHV7s= github.com/tendermint/btcd v0.1.1/go.mod h1:DC6/m53jtQzr/NFmMNEu0rxf18/ktVoVtMrnDD5pN+U= github.com/tendermint/crypto v0.0.0-20190823183015-45b1026d81ae h1:AOXNM7c2Vvo45SjAgeWF8Wy+NS7/NCqzRNpUc+HPAec= github.com/tendermint/crypto v0.0.0-20190823183015-45b1026d81ae/go.mod h1:z4YtwM70uOnk8h0pjJYlj3zdYwi9l03By6iAIF5j/Pk= +github.com/tidwall/gjson v1.14.3 h1:9jvXn7olKEHU1S9vwoMGliaT8jq1vJ7IH/n9zD9Dnlw= +github.com/tidwall/gjson v1.14.3/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= +github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= +github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= +github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= @@ -257,6 +273,8 @@ github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/zondax/hid v0.9.0 h1:eiT3P6vNxAEVxXMw66eZUAAnU2zD33JBkfG/EnfAKl8= github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +github.com/zondax/ledger-go v0.9.0 h1:oTrtFqPFA4VdCPRvqMaN45mQnJxkPc0JxoVZfCoUpjI= +github.com/zondax/ledger-go v0.9.0/go.mod h1:b2vIcu3u9gJoIx4kTWuXOgzGV7FPWeUktqRqVf6feG0= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= @@ -273,7 +291,9 @@ golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -297,6 +317,7 @@ golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -313,6 +334,8 @@ golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f h1:uF6paiQQebLeSXkrTqHqz0MXhXXS1KgF41eUdBNvxK0= +golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= @@ -334,6 +357,7 @@ gopkg.in/linkedin/goavro.v1 v1.0.5 h1:BJa69CDh0awSsLUmZ9+BowBdokpduDZSM9Zk8oKHfN gopkg.in/linkedin/goavro.v1 v1.0.5/go.mod h1:Aw5GdAbizjOEl0kAMHV9iHmA8reZzW/OKuJAl4Hb9F0= gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= +gopkg.in/resty.v1 v1.10.3/go.mod h1:nrgQYbPhkRfn2BfT32NNTLfq3K9NuHRB0MsAcA9weWY= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= diff --git a/version/version.go b/version/version.go index b3ff62132..c70eb2768 100644 --- a/version/version.go +++ b/version/version.go @@ -12,7 +12,7 @@ var ( Version string ) -const NodeVersion = "v0.10.1" +const NodeVersion = "v0.10.2" func init() { Version = fmt.Sprintf("BNB Beacon Chain Release: %s;", NodeVersion)