Skip to content
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

tgrade-valset: Modify distribution list to send funds to tc-payments #182

Open
maurolacy opened this issue Sep 14, 2022 · 3 comments · Fixed by #186
Open

tgrade-valset: Modify distribution list to send funds to tc-payments #182

maurolacy opened this issue Sep 14, 2022 · 3 comments · Fixed by #186

Comments

@maurolacy
Copy link
Contributor

As the last part of https://github.com/confio/matadores-backlog-collection/issues/27#issuecomment-1245506105, we need to modify the valset distribution list to redirect the funds to the payments contract.

This requires a contract upgrade, because the current UpdateConfig mechanism does not support changing the distribution list.

This can be done in two parts:

  1. Upgrade (migrate) the contract to a new version with an updated UpdateConfig that supports changing the distribution list.
  2. Create a proposal to use UpdateConfig to update the valset distribution list with the new distribution list.

Both parts can be done during contract migration, for simplicity (only one proposal required). But in any case, changing the UpdateConfig handler to support changing the distribution list looks like a good idea. So that it can be used to change / adjust the distribution list in the future if needed.

@alpe
Copy link

alpe commented Sep 16, 2022

  1. Create a proposal to use UpdateConfig

Would this be a sudo call via gov? we don't have this in tgrade (yet)
https://github.com/confio/tgrade/blob/main/x/twasm/contract/incoming_msgs.go#L61

@maurolacy maurolacy mentioned this issue Sep 19, 2022
@maurolacy
Copy link
Contributor Author

maurolacy commented Sep 19, 2022

3. Create a proposal to use UpdateConfig

Would this be a sudo call via gov? we don't have this in tgrade (yet) https://github.com/confio/tgrade/blob/main/x/twasm/contract/incoming_msgs.go#L61

Hmm, I don't think this is needed. The OC proposals contract is the (contract, not migrate) admin of the valset contract. The UpdateConfig execution

https://github.com/confio/tgrade-contracts/blob/ef671e954365e1026d6d7ee539f3996d4393d4e1/contracts/tgrade-oc-proposals/src/contract.rs#L163-L178

sends an update config message to the valset contract. No gov proposal support in tgrade needed, AFAIK.

@maurolacy
Copy link
Contributor Author

maurolacy commented Sep 19, 2022

The only questions I have would be, if it's possible to create an update config proposal in the OC proposals UI, and if said proposal will be routed / handled properly.

Anyway, despite all that, a valset migration is required, because the current update config message does not support updating the distribution list.

Will work on that next.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants