-
Notifications
You must be signed in to change notification settings - Fork 592
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
feat: add SetScalingFactorController gov prop #5937
feat: add SetScalingFactorController gov prop #5937
Conversation
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 LGTM! Lets get this tested on a local osmosis instance to be sure and then we can merge, thanks!
expError error | ||
isStableSwapPool bool | ||
}{ | ||
{ |
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.
Lets add a test case where we try to use an invalid address as the controller addr
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.
the address validation happens upstream in ValidateBasic. Want me to duplicate the check here as well?
Oh and also could you please add a changelog entry as well? |
Co-authored-by: Adam Tucker <adam@osmosis.team>
Added! (sorry forgot to push it up yesterday) |
Successfully tested this locally with localosmosis and added the testing flow to the PR description |
Thanks so much for adding all the CLI commands you used! Will just need a second ACK to merge but it should be a quick ACK due to all the localosmosis logs that were added. |
x/gamm/types/codec.go
Outdated
@@ -23,6 +23,7 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { | |||
cdc.RegisterConcrete(&MsgExitSwapShareAmountIn{}, "osmosis/gamm/exit-swap-share-amount-in", nil) | |||
cdc.RegisterConcrete(&UpdateMigrationRecordsProposal{}, "osmosis/gamm/update-migration-records-proposal", nil) | |||
cdc.RegisterConcrete(&ReplaceMigrationRecordsProposal{}, "osmosis/gamm/replace-migration-records-proposal", nil) | |||
cdc.RegisterConcrete(&SetScalingFactorControllerProposal{}, "osmosis/gamm/set-scaling-factor-controller-address", nil) |
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 this is too long to work with ledgers, cc @mattverse isn't the limit 40 characters? Or does that not apply to gov props?
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.
Good catch! I think it's actually 39 characters. I'm not sure if it applies to gov props
Either way, shortened it to be safe [here]
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.
utACK
Nice job! I think we need a different amino string due to the 40 char limit from the SDK. (It really should be in the API used for registration :/ , looks like some of our existing messags there have problems :/ )
Closes: #XXX
What is the purpose of the change
Adds a gov prop to update the scaling factor controller address of a stableswap pool. This is particularly useful when migrating from a multisig controller to a CW contract controller.
Testing and Verifying
Setup
osmosisd tx gamm create-pool --pool-type stableswap --pool-file stableswapPool.json \ --from val -y --keyring-backend test --chain-id localosmosis --fees 1000uosmo
>>> osmosisd q gamm pools | grep controller scaling_factor_controller: osmo19e2mf7cywkv7zaug6nk5f87d07fxrdgrladvymh2gwv5crvm3vnsuewhh7
Update controller address with proposal.json
osmosisd tx gov vote 1 yes --from val -y --keyring-backend test --chain-id localosmosis --fees 1000uosmo
>>> osmosisd q gamm pools | grep controller scaling_factor_controller: osmo1jg7w3rt85tyj2hxky206chj23ts3nxm43gll3q
Update controller address with flags
osmosisd tx gov vote 2 yes --from val -y --keyring-backend test --chain-id localosmosis --fees 1000uosmo
>>> osmosisd q gamm pools | grep controller scaling_factor_controller: osmo13zfmpc7lr97ud4sg335wxt3e4x9x8zr7crvqyu
Adjust Scaling Factor
not scaling factor governor
osmosisd q gamm pools | grep scaling_factors -A 2
Error Cases
Documentation and Release Note
Unreleased
section ofCHANGELOG.md
?Where is the change documented?
x/{module}/README.md
)