-
Notifications
You must be signed in to change notification settings - Fork 4
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
[Improvement] Replace plugin operation #13
Comments
Related: #22, which proposes removal of injected hooks. |
Great question! Installation conflicts on validation functions will go away, but execution function conflicts will still result in a revert (unless we choose to address that too, which could be interesting). If what you were alluding to was how #4 by itself solves the problem of swapping ownership plugins, yes #4 will enable that by allowing the new ownership plugin to be installed prior to the removal of the old ownership plugin.
|
A following question about this: If during the hot swapping process, the removal and reinstallation of dependencies occur, and the data of dependents might be deleted due to the onUnInstall function. Is there any plan to create a feature that allows distinguishing between cases where the |
I need to do some more exploration for this, but ideally replacing a plugin leaves dependents untouched (bypassing the dependency checks within It could be worth thinking about something like what you've described, where you can conditionally "reinstall" dependencies to update their data. |
One point that should be considered is the data that plugin stores in the replacement process. If the replacement happens, the data in the previous plugin will be removed. Therefore, users should be able to migrate some data to the new plugin. One of the possible solutions is to introduce a new function like |
I think something like this makes sense, though we should think about how the existing data will be supplied to the new plugin. We probably don't want to supply that data as a user defined argument to the Also, while the migration of data makes sense in the context of upgrading or downgrading a plugin across different versions of it, it may not be appropriate when wanting to replace a plugin with a similar plugin from a different author (e.g., attempting to switch ownership plugins for the purposes of updating the validation functions used by its dependents). Assuming #4 is solved, we should think about how this operation should work and whether |
Considering various cases that One possible solution is to bring the idea of semantic versioning 2.0.0, which is a common solution for package managers. So we can divide plugin versions into three sections: Major / Minor / Patch version. Major one means there are breaking changes like updating the main logics or interfaces of certain functions, so it must not be allowed in However, there can be an edge case: A malicious Wonder how you guys think about this, and please share your thoughts on this! |
I made a pull request addressing this, but it was not enough to handle the full functionalities mentioned in this issue. I'd like to share the ongoing issues / considerations and our thoughts in this comment:
I'd like to hear any thoughts on |
I may spend some time exploring having the account store plugin-related storage instead of the plugin itself, similar to @yoavw 's idea of "per-plugin storage": https://ethereum-magicians.org/t/erc-6900-modular-smart-contract-accounts-and-plugins/13885/23#per-plugin-storage-8. Reasons:
|
executeBatch
relies on some fragile assumptions for how the account should behave. If we introduce a standardizedreplacePlugin
method, these issues can be avoided. The current blocker has been the handling of dependencies and injected hooks, which add significant overhead to what the replace plugin operation needs to do to prevent inconsistent account state. Addressing [Improvement] User-supplied install config #9 could make a replace plugin operation feasible.The text was updated successfully, but these errors were encountered: