Skip to content

Commit

Permalink
Close some TODOs & add more context to remaining ones
Browse files Browse the repository at this point in the history
  • Loading branch information
ysv committed Nov 3, 2023
1 parent 97367ac commit f53528d
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 18 deletions.
4 changes: 2 additions & 2 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ var (
distr.AppModuleBasic{},
gov.NewAppModuleBasic(
[]govclient.ProposalHandler{
// TODO: Remove once IBC migrates to the new mechanism
// TODO(v4): Remove once IBC upgrades to the new param management mechanism. Check ibc-go/modules/core/02-client/types/params.go
paramsclient.ProposalHandler,
ibcclientclient.UpdateClientProposalHandler,
ibcclientclient.UpgradeProposalHandler,
Expand Down Expand Up @@ -531,7 +531,7 @@ func New(
// See: https://docs.cosmos.network/main/modules/gov#proposal-messages
govRouter := govv1beta1.NewRouter()
govRouter.AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler).
// TODO: Remove once IBC upgrades to the new mechanism
// TODO(v4): Remove once IBC upgrades to the new param management mechanism. Check ibc-go/modules/core/02-client/types/params.go
AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)).
AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper))

Expand Down
10 changes: 2 additions & 8 deletions app/upgrade/v3/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,6 @@ func New(

// wasm:
wasmtypes.ModuleName: wasmtypes.ParamKeyTable(), //nolint:staticcheck

// coreum:
// TODO(migration-away-from-x/params): Add migration of params for Coreum modules. Skipping them for now.
}

// https://github.com/cosmos/cosmos-sdk/pull/12363/files
Expand All @@ -113,7 +110,6 @@ func New(
subspace := subspace

if lo.Contains([]string{
// TODO(migration-away-from-x/params): Add migration of params for Coreum modules. Skipping them for now.
feemodeltypes.ModuleName,
assetfttypes.ModuleName,
assetnfttypes.ModuleName,
Expand Down Expand Up @@ -170,8 +166,7 @@ func New(
params.AllowedClients = append(params.AllowedClients, ibccoreexported.Localhost)
ibcClientKeeper.SetParams(ctx, params)

// TODO(new-gov-params): Discuss new values for the following params with the team and set here & inside genesis.v3.json.
// min_initial_deposit_ratio, burn_vote_quorum, burn_proposal_deposit_prevote, burn_vote_veto
// Set values for new params: min_initial_deposit_ratio, burn_vote_quorum, burn_proposal_deposit_prevote, burn_vote_veto
govParams := govKeeper.GetParams(ctx)
govParams.MinInitialDepositRatio = sdk.NewDec(50).Quo(sdk.NewDec(100)).String()
govParams.BurnVoteQuorum = false
Expand All @@ -181,8 +176,7 @@ func New(
return nil, err
}

// TODO(new-staking-params): Discuss new values for the following params with the team and set here & inside genesis.v3.json.
// min_commission_rate
// Set value for new param min_commission_rate
stakingParams := stakingKeeper.GetParams(ctx)
stakingParams.MinCommissionRate = sdk.ZeroDec()
err = stakingKeeper.SetParams(ctx, stakingParams)
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ replace (
// cosmos keyring
github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0
// dgrijalva/jwt-go is deprecated and doesn't receive security updates.
// TODO: remove it: https://github.com/cosmos/cosmos-sdk/issues/13134
// TODO(v4): remove it: https://github.com/cosmos/cosmos-sdk/issues/13134
github.com/dgrijalva/jwt-go => github.com/golang-jwt/jwt/v4 v4.4.2
// Fix upstream GHSA-h395-qcrw-5vmq vulnerability.
// TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409
// TODO(v4) Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409
github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.0
// https://github.com/cosmos/cosmos-sdk/issues/14949
// pin the version of goleveldb to v1.0.1-0.20210819022825-2ae1ddf74ef7 required by SDK v47 upgrade guide.
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ replace (
github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0
github.com/CoreumFoundation/coreum/v3 => ../
// dgrijalva/jwt-go is deprecated and doesn't receive security updates.
// TODO: remove it: https://github.com/cosmos/cosmos-sdk/issues/13134
// TODO(v4): remove it: https://github.com/cosmos/cosmos-sdk/issues/13134
github.com/dgrijalva/jwt-go => github.com/golang-jwt/jwt/v4 v4.4.2
// Fix upstream GHSA-h395-qcrw-5vmq vulnerability.
// TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409
// TODO(v4): Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409
github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.0
// https://github.com/cosmos/cosmos-sdk/issues/14949
// pin the version of goleveldb to v1.0.1-0.20210819022825-2ae1ddf74ef7 required by SDK v47 upgrade guide.
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/modules/wasm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1603,7 +1603,7 @@ func TestWASMNonFungibleTokenInContract(t *testing.T) {
}

// TestWASMBankSendContractWithMultipleFundsAttached tests sending multiple ft funds and core token to smart contract.
// TODO: remove this test after this task is implemented. https://app.clickup.com/t/86857vqra
// TODO(v4): remove this test after this task is implemented. https://app.clickup.com/t/86857vqra
func TestWASMBankSendContractWithMultipleFundsAttached(t *testing.T) {
t.Parallel()

Expand Down
2 changes: 1 addition & 1 deletion pkg/client/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ func AwaitNextBlocks(
if res.SdkBlock != nil {
currentHeight = res.SdkBlock.Header.Height
} else {
// TODO: Remove this in v4 version of cored. Now it is needed because we might still use it in integration tests together with v2 cored binary.
// TODO(v4): Remove this in v4 version of cored. Now it is needed because we might still use it in integration tests together with v2 cored binary.
currentHeight = res.Block.Header.Height //nolint:staticcheck // Yes, we know that this is deprecated
}

Expand Down
2 changes: 1 addition & 1 deletion testutil/integration/chain_ibc.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (c ChainContext) ExecuteTimingOutIBCTransfer(
if latestBlockRes.SdkBlock != nil {
headerTime = latestBlockRes.GetSdkBlock().GetHeader().Time
} else {
// TODO: remove this "if condition" once all the connected chains have migrated to cosmos sdk v0.47.
// TODO(v4): remove this "if condition" once all the connected chains have migrated to cosmos sdk v0.47.
// Block is deprecated in favor of SdkBlock.
headerTime = latestBlockRes.GetBlock().GetHeader().Time
}
Expand Down
2 changes: 1 addition & 1 deletion x/deterministicgas/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func DefaultConfig() Config {
MsgToMsgURL(&assetfttypes.MsgGloballyFreeze{}): constantGasFunc(5_000),
MsgToMsgURL(&assetfttypes.MsgGloballyUnfreeze{}): constantGasFunc(5_000),
MsgToMsgURL(&assetfttypes.MsgSetWhitelistedLimit{}): constantGasFunc(9_000),
// TODO: Reestimate when next token upgrade is prepared
// Once we add a new token upgrade MsgUpgradeTokenV2 we should remove this one and re-estimate gas.
MsgToMsgURL(&assetfttypes.MsgUpgradeTokenV1{}): constantGasFunc(25_000),

// asset/nft
Expand Down
2 changes: 2 additions & 0 deletions x/nft/module/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ func (AppModuleBasic) GetTxCmd() *cobra.Command {
type AppModule struct {
AppModuleBasic
keeper keeper.Keeper
// TODO(v4): To be removed together with module.
// This todo comes from cosmos-sdk code and will be remove together with nft module once we drop back-compatibility.
// TODO accountKeeper,bankKeeper will be replaced by query service
accountKeeper nft.AccountKeeper
bankKeeper nft.BankKeeper
Expand Down

0 comments on commit f53528d

Please sign in to comment.