NeutronStarDAO / Proton

Social DApp base on Actor model
https://mjlwf-iqaaa-aaaan-qmtna-cai.icp0.io/
GNU General Public License v3.0
9 stars 3 forks source link

大佬,我想请问下你们如何解决派生canister的升级问题的? #3

Closed johnxiaohe closed 4 months ago

xiaoyuanxun commented 4 months ago

有更详细一点的需求吗?

johnxiaohe commented 4 months ago

就是类似于Proton中,child feed canisters 和 child post bucket canisters 的代码升级问题是如何解决的? 因为我理解这些canister 应该是通过Root feed 和Root post canister 自动创建的

xiaoyuanxun commented 4 months ago

有两种方式吧

  1. 通过root_feed 和 root_bucket来升级子feed 和 子 bucket canister。这种需要在root_feed和root_bucket中定义方法,通过调用management_canister来升级子canister
  2. 直接升级子canister。这种在创建子canister的时候,就可以给子canister的owner设置一个管理员principal,管理员principal就可以在本地直接使用dfx升级,或者用shell 脚本、rust-agent或js-agent批量升级
johnxiaohe commented 4 months ago

了解,这里wasm的blob就通过自定义方法手动传输吗?我总觉得这里好麻烦

xiaoyuanxun commented 4 months ago

对,自己传输。

可以用js-agent写个脚本读取WASM然后传上去。

johnxiaohe commented 4 months ago

感谢大佬