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

[Feature Request]: Force the package version increment #204

Open
jolestar opened this issue Nov 11, 2022 · 5 comments
Open

[Feature Request]: Force the package version increment #204

jolestar opened this issue Nov 11, 2022 · 5 comments
Labels
enhancement New feature or request
Milestone

Comments

@jolestar
Copy link
Member

Feature Request

Describe the Feature Request

当前,Package version 只在链上记录,每次升级时,用户会在 upgrade plan 中指定 package 的版本,需要有一种机制保证这个版本是自增的,并且没有使用两阶段升级的 module,可以自动根据部署次数更新这个字段。

这样 DApp 或者其他合约可以通过这个版本号来检测合约是否有过升级,如果有过升级可以提醒开发者和用户。

Describe Preferred Solution

Describe Alternatives

Related Code

Additional Context

If the feature request is approved, would you be willing to submit a PR?
Yes / No (Help can be provided if you need assistance submitting a PR)

@jolestar jolestar added the enhancement New feature or request label Nov 11, 2022
@jolestar jolestar added this to the v13 milestone Nov 11, 2022
@pause125
Copy link
Collaborator

如果一个地址下发布多个 package 如何处理 version ?

@jolestar
Copy link
Member Author

如果一个地址下发布多个 package 如何处理 version ?

package 实际就是 modules 的集合,感觉 version 可以按照执行部署合约交易的次数计算。

@pause125
Copy link
Collaborator

如果一个地址下发布多个 package 如何处理 version ?

package 实际就是 modules 的集合,感觉 version 可以按照执行部署合约交易的次数计算。

对,链上都是以 module 为单位,并没有 package 的概念。 package 是开发者项目管理用到的概念。一个地址下面,可能有多个不同项目的 package, 这些 package 之间可以是完全没有关系。这个时候 version 不太好表达这些不同 “package” 的版本信息。

@pause125
Copy link
Collaborator

如果开发者部署一个新的 package,和链上原先的 modules 完全无关,也会导致 version 增加,似乎也不是很合理。

@jolestar
Copy link
Member Author

如果一个地址下发布多个 package 如何处理 version ?

package 实际就是 modules 的集合,感觉 version 可以按照执行部署合约交易的次数计算。

对,链上都是以 module 为单位,并没有 package 的概念。 package 是开发者项目管理用到的概念。一个地址下面,可能有多个不同项目的 package, 这些 package 之间可以是完全没有关系。这个时候 version 不太好表达这些不同 “package” 的版本信息。

因为升级的设置是以 address 为单位的,所以可以把同一个 address 地址识别为同一个应用的仓库。现在的 Version 也只有一个。如果确实是不相关的两个项目,还是建议开发者拆分开来。

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

No branches or pull requests

2 participants