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

Close proposal on membership change #157

Merged
merged 12 commits into from
Dec 8, 2020

Conversation

ethanfrey
Copy link
Member

@ethanfrey ethanfrey commented Dec 4, 2020

Based on #156 (merge that first)
Addresses #141 (just the simple solution to show hooks, need a second PR to close issue)

  • Register callback hooks in all tests
  • Implement member changed hook handler
  • Test proper handling of simple solution: If an "update group" event comes in while there is an open proposal, force close all open proposals
  • Improve implementation efficiency (don't iterate over all proposals ever made to find open proposals)

We just need to optimize the query (add secondary index to proposals map), otherwise this is ready to review

@ethanfrey ethanfrey added this to In progress in Contract development via automation Dec 4, 2020
@ethanfrey ethanfrey moved this from In progress to Review in progress in Contract development Dec 4, 2020
Base automatically changed from add-cw4-hooks to master December 6, 2020 21:07
Copy link
Contributor

@maurolacy maurolacy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm.

contracts/cw3-flex-multisig/README.md Outdated Show resolved Hide resolved
contracts/cw3-flex-multisig/src/contract.rs Show resolved Hide resolved
contracts/cw3-flex-multisig/src/contract.rs Show resolved Hide resolved
contracts/cw3-flex-multisig/src/contract.rs Outdated Show resolved Hide resolved
contracts/cw3-flex-multisig/src/contract.rs Show resolved Hide resolved
Contract development automation moved this from Review in progress to Reviewer approved Dec 7, 2020
@maurolacy
Copy link
Contributor

This is becoming complex, but at the same time, more and more useful.

It just occurred to me that it would be nice for flex multisigs to request the hook directly to their group, on creation. But, now that I think of it, this has security concerns... I wonder if this is related to the "listeners" functionality... it would require something like a "publish & subscribe" contract / functionality.

@ethanfrey
Copy link
Member Author

It just occurred to me that it would be nice for flex multisigs to request the hook directly to their group, on creation. But, now that I think of it, this has security concerns... I wonder if this is related to the "listeners" functionality... it would require something like a "publish & subscribe" contract / functionality.

Yeah, I assume an external administrator to set up all contracts. Most of these steps need admin access anyway and it is hard to write robust init scripts as contracts.

The "listener", light weight pub-sub solution that runs outside of the TX would open up a lot of doors. But that begs a lot of questions. Notably, who pays the gas and where we enforce limits

@maurolacy
Copy link
Contributor

The "listener", light weight pub-sub solution that runs outside of the TX would open up a lot of doors. But that begs a lot of questions. Notably, who pays the gas and where we enforce limits

Yes... besides gas, I can think of timeouts, retries, blacklists, whitelists, evictions / purging, priorities, ...

@ethanfrey ethanfrey force-pushed the close-proposal-on-membership-change branch from 61216a7 to 9b92138 Compare December 8, 2020 10:29
Co-authored-by: Mauro Lacy <maurolacy@users.noreply.github.com>
@ethanfrey ethanfrey force-pushed the close-proposal-on-membership-change branch from b6c9788 to e9a2300 Compare December 8, 2020 10:32
@ethanfrey ethanfrey merged commit 0a59b32 into master Dec 8, 2020
Contract development automation moved this from Reviewer approved to Done Dec 8, 2020
@ethanfrey ethanfrey deleted the close-proposal-on-membership-change branch December 8, 2020 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants