diff --git a/.gitignore b/.gitignore index c99f73ecc..433484e57 100644 --- a/.gitignore +++ b/.gitignore @@ -11,7 +11,7 @@ # Build bin -build +_build vendor .vendor-new build diff --git a/app/app.go b/app/app.go index 9a80ed1e7..6b30b6431 100644 --- a/app/app.go +++ b/app/app.go @@ -626,6 +626,11 @@ func (app *TerraApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) a } } + // trigger SetModuleVersionMap in upgrade keeper at the VersionMapEnableHeight + if ctx.BlockHeight() == core.VersionMapEnableHeight { + app.UpgradeKeeper.SetModuleVersionMap(ctx, app.mm.GetVersionMap()) + } + return app.mm.BeginBlock(ctx, req) } @@ -640,7 +645,6 @@ func (app *TerraApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abc if err := tmjson.Unmarshal(req.AppStateBytes, &genesisState); err != nil { panic(err) } - return app.mm.InitGenesis(ctx, app.appCodec, genesisState) } diff --git a/custom/auth/client/utils/feeutils.go b/custom/auth/client/utils/feeutils.go index 4e5470a5f..028d9e951 100644 --- a/custom/auth/client/utils/feeutils.go +++ b/custom/auth/client/utils/feeutils.go @@ -15,8 +15,6 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth/legacy/legacytx" "github.com/cosmos/cosmos-sdk/x/authz" - core "github.com/terra-money/core/types" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" marketexported "github.com/terra-money/core/x/market/exported" @@ -265,10 +263,6 @@ func computeTax(clientCtx client.Context, taxRate sdk.Dec, principal sdk.Coins) for _, coin := range principal { - if coin.Denom == core.MicroLunaDenom { - continue - } - taxCap, err := queryTaxCap(clientCtx, coin.Denom) if err != nil { return nil, err diff --git a/go.mod b/go.mod index ea3754ce3..14f8e1961 100644 --- a/go.mod +++ b/go.mod @@ -123,10 +123,10 @@ require ( replace ( github.com/99designs/keyring => github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76 github.com/confio/ics23/go => github.com/cosmos/cosmos-sdk/ics23/go v0.8.0 - github.com/cosmos/cosmos-sdk => github.com/terra-rebels/cosmos-sdk v0.44.6-0.20221016182956-c5c6f52d0a59 + github.com/cosmos/cosmos-sdk => github.com/classic-terra/cosmos-sdk v0.44.6-0.20221016182956-c5c6f52d0a59 github.com/cosmos/ledger-cosmos-go => github.com/terra-money/ledger-terra-go v0.11.2 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 github.com/tecbot/gorocksdb => github.com/cosmos/gorocksdb v1.2.0 - github.com/tendermint/tendermint => github.com/terra-money/tendermint v0.34.14-terra.2 + github.com/tendermint/tendermint => github.com/terra-money/tendermint v0.34.14-terra.3 google.golang.org/grpc => google.golang.org/grpc v1.33.2 ) diff --git a/go.sum b/go.sum index 0b2556664..857bfcd0f 100644 --- a/go.sum +++ b/go.sum @@ -165,6 +165,8 @@ github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMn github.com/cilium/ebpf v0.6.2/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= +github.com/classic-terra/cosmos-sdk v0.44.6-0.20221016182956-c5c6f52d0a59 h1:aEO8kp0lD+AIqZlyJxA5w6WHg/qMTZnzG7c2BGN1Od0= +github.com/classic-terra/cosmos-sdk v0.44.6-0.20221016182956-c5c6f52d0a59/go.mod h1:pTH1UR4ZKkchlqIeNIc4U2v9aB36Jdl28iui7pZsluU= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/cloudflare/cloudflare-go v0.10.2-0.20190916151808-a80f83b9add9/go.mod h1:1MxXX1Ux4x6mqPmjkUgTP1CdXIBXKX7T+Jk9Gxrmx+U= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= @@ -865,10 +867,8 @@ github.com/tendermint/tm-db v0.6.6 h1:EzhaOfR0bdKyATqcd5PNeyeq8r+V4bRPHBfyFdD9kG github.com/tendermint/tm-db v0.6.6/go.mod h1:wP8d49A85B7/erz/r4YbKssKw6ylsO/hKtFk7E1aWZI= github.com/terra-money/ledger-terra-go v0.11.2 h1:BVXZl+OhJOri6vFNjjVaTabRLApw9MuG7mxWL4V718c= github.com/terra-money/ledger-terra-go v0.11.2/go.mod h1:ClJ2XMj1ptcnONzKH+GhVPi7Y8pXIT+UzJ0TNt0tfZE= -github.com/terra-money/tendermint v0.34.14-terra.2 h1:UYDDCI001ZNhs+aX09HjKVldUcz084q3RwLHUOSSZQU= -github.com/terra-money/tendermint v0.34.14-terra.2/go.mod h1:FrwVm3TvsVicI9Z7FlucHV6Znfd5KBc/Lpp69cCwtk0= -github.com/terra-rebels/cosmos-sdk v0.44.6-0.20221016182956-c5c6f52d0a59 h1:62KT/h2dpx3wM3Tev3srYaUnVfMqsXuFg/cYtfS3mA4= -github.com/terra-rebels/cosmos-sdk v0.44.6-0.20221016182956-c5c6f52d0a59/go.mod h1:pTH1UR4ZKkchlqIeNIc4U2v9aB36Jdl28iui7pZsluU= +github.com/terra-money/tendermint v0.34.14-terra.3 h1:6ZKViOBESN3/2csQ8jWHmALdeGMUp7citxh7drtBicI= +github.com/terra-money/tendermint v0.34.14-terra.3/go.mod h1:FrwVm3TvsVicI9Z7FlucHV6Znfd5KBc/Lpp69cCwtk0= github.com/tidwall/gjson v1.6.7/go.mod h1:zeFuBCIqD4sN/gmqBzZ4j7Jd6UcA2Fc56x7QFsv+8fI= github.com/tidwall/match v1.0.3/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.0.2/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= diff --git a/types/alias.go b/types/alias.go index 6a1b1ff7e..a3c7b83a3 100644 --- a/types/alias.go +++ b/types/alias.go @@ -12,34 +12,35 @@ import ( ) const ( - MicroLunaDenom = assets.MicroLunaDenom - MicroUSDDenom = assets.MicroUSDDenom - MicroKRWDenom = assets.MicroKRWDenom - MicroSDRDenom = assets.MicroSDRDenom - MicroCNYDenom = assets.MicroCNYDenom - MicroJPYDenom = assets.MicroJPYDenom - MicroEURDenom = assets.MicroEURDenom - MicroGBPDenom = assets.MicroGBPDenom - MicroMNTDenom = assets.MicroMNTDenom - MicroUnit = assets.MicroUnit - BlocksPerMinute = util.BlocksPerMinute - BlocksPerHour = util.BlocksPerHour - BlocksPerDay = util.BlocksPerDay - BlocksPerWeek = util.BlocksPerWeek - BlocksPerMonth = util.BlocksPerMonth - BlocksPerYear = util.BlocksPerYear - CoinType = util.CoinType - FullFundraiserPath = util.FullFundraiserPath - Bech32PrefixAccAddr = util.Bech32PrefixAccAddr - Bech32PrefixAccPub = util.Bech32PrefixAccPub - Bech32PrefixValAddr = util.Bech32PrefixValAddr - Bech32PrefixValPub = util.Bech32PrefixValPub - Bech32PrefixConsAddr = util.Bech32PrefixConsAddr - Bech32PrefixConsPub = util.Bech32PrefixConsPub - ColumbusChainID = "columbus-5" - BombayChainID = "bombay-12" - SwapDisableForkHeight = fork.SwapDisableForkHeight - SwapEnableForkHeight = fork.SwapEnableForkHeight + MicroLunaDenom = assets.MicroLunaDenom + MicroUSDDenom = assets.MicroUSDDenom + MicroKRWDenom = assets.MicroKRWDenom + MicroSDRDenom = assets.MicroSDRDenom + MicroCNYDenom = assets.MicroCNYDenom + MicroJPYDenom = assets.MicroJPYDenom + MicroEURDenom = assets.MicroEURDenom + MicroGBPDenom = assets.MicroGBPDenom + MicroMNTDenom = assets.MicroMNTDenom + MicroUnit = assets.MicroUnit + BlocksPerMinute = util.BlocksPerMinute + BlocksPerHour = util.BlocksPerHour + BlocksPerDay = util.BlocksPerDay + BlocksPerWeek = util.BlocksPerWeek + BlocksPerMonth = util.BlocksPerMonth + BlocksPerYear = util.BlocksPerYear + CoinType = util.CoinType + FullFundraiserPath = util.FullFundraiserPath + Bech32PrefixAccAddr = util.Bech32PrefixAccAddr + Bech32PrefixAccPub = util.Bech32PrefixAccPub + Bech32PrefixValAddr = util.Bech32PrefixValAddr + Bech32PrefixValPub = util.Bech32PrefixValPub + Bech32PrefixConsAddr = util.Bech32PrefixConsAddr + Bech32PrefixConsPub = util.Bech32PrefixConsPub + ColumbusChainID = "columbus-5" + BombayChainID = "bombay-12" + SwapDisableForkHeight = fork.SwapDisableForkHeight + SwapEnableForkHeight = fork.SwapEnableForkHeight + VersionMapEnableHeight = fork.VersionMapEnableHeight ) // functions aliases diff --git a/types/fork/height.go b/types/fork/height.go index 6b120d17f..75606cb94 100644 --- a/types/fork/height.go +++ b/types/fork/height.go @@ -2,5 +2,9 @@ package fork // SwapDisableForkHeight - make min spread to 100% to disable swap const SwapDisableForkHeight = 7607790 + // SwapEnableForkHeight - renable IBC only, block height is approximately December 5th, 2022 const SwapEnableForkHeight = 10542500 + +// VersionMapEnableHeight - set the version map to enable software upgrades, approximately February 14, 2023 +const VersionMapEnableHeight = 11543150