-
Notifications
You must be signed in to change notification settings - Fork 608
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
remove exit fee param #4440
remove exit fee param #4440
Conversation
@@ -2,6 +2,5 @@ | |||
"weights": "5ibc/ED07A3391A112B175915CD8FAF43A2DA8E4790EDE12566649D0C2F97716B8518,5uosmo", | |||
"initial-deposit": "499404ibc/ED07A3391A112B175915CD8FAF43A2DA8E4790EDE12566649D0C2F97716B8518,500000uosmo", | |||
"swap-fee": "0.01", | |||
"exit-fee": "0.01", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e2e is failing because this is removed.
Basically, it tries to create a pool for pre-upgrade Osmosis (v14) that still has and expects this parameter.
I suggest copying this file and naming it pool1A-legacy.json
and using it in:
osmosis/tests/e2e/configurer/upgrade.go
Line 128 in ae97cec
config.PreUpgradePoolId = chainANode.CreateBalancerPool("pool1A.json", initialization.ValidatorWalletName) |
Also, please do the same for pool1B.json
. Please create an issue to track the removal of these legacy files later
string exit_fee = 2 [ | ||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", | ||
(gogoproto.moretags) = "yaml:\"exit_fee\"", | ||
(gogoproto.nullable) = false | ||
]; | ||
SmoothWeightChangeParams smooth_weight_change_params = 3 [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should be able to make this field simply as reserved
. That way, we would not need to generate v2 types and perform risky and complex migrations.
Hi @hieuvubk . Any updates on this? |
Thanks for the update. There are some known issues with e2e right now and the upgrade hander code gen in #4575 I'm going to work on resolving them this week. Let's wait until that PR is in, once it is, I can help with looking into e2e here. |
x/gamm/keeper/grpc_query.go
Outdated
totalSharesAmount := pool.GetTotalShares() | ||
if req.ShareInAmount.GTE(totalSharesAmount) || req.ShareInAmount.LTE(sdk.ZeroInt()) { | ||
return nil, sdkerrors.Wrapf(types.ErrInvalidMathApprox, "share ratio is zero or negative") | ||
} | ||
|
||
exitCoins, err := pool.CalcExitPoolCoinsFromShares(sdkCtx, req.ShareInAmount, exitFee) | ||
exitCoins, err := pool.CalcExitPoolCoinsFromShares(sdkCtx, req.ShareInAmount, sdk.ZeroDec()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we provide sdk.ZeroDec()
as an argument? Let's just remove exit fee from the API?
app/upgrades/v15/upgrades.go
Outdated
// N.B.: this is done to avoid initializing genesis for gamm module. | ||
// Otherwise, it would overwrite migrations with InitGenesis(). | ||
// See RunMigrations() for details. | ||
fromVM[gammtypes.ModuleName] = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is only needed for newly added modules
// N.B.: this is done to avoid initializing genesis for gamm module. | |
// Otherwise, it would overwrite migrations with InitGenesis(). | |
// See RunMigrations() for details. | |
fromVM[gammtypes.ModuleName] = 0 |
app/upgrades/v15/upgrades.go
Outdated
|
||
func removeExitFee(ctx sdk.Context, gammKeeper gammkeeper.Keeper, poolsWithExitFee []uint64) { | ||
for _, poolId := range poolsWithExitFee { | ||
err := gammKeeper.DeletePool(ctx, poolId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we deleting these pools? The pools should stay, only the exit fee setting is removed
The known e2e issues are now resolved in: #4575 Please try rebasing and addressing my earlier comments. Please let me know if there are issues still after |
@p0mvn Hi Roman i addressed change above, e2e passed now. Thank u |
Closes: #4371
What is the purpose of the change
Refer from #4371 , we should remove all exit fee params & remove pools with exit fee
Brief Changelog
ExitFee
in every related funcs & testsTesting and Verifying
(Please pick one of the following options)
This change is a trivial rework / code cleanup without any test coverage.
(or)
This change is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)
Documentation and Release Note
Unreleased
section inCHANGELOG.md
? (yes / no)x/<module>/spec/
) / Osmosis docs repo / not documented)