canister upgrade with limit change
还没有人认领这个 Issue。
评估
调研方向
Start by reviewing the Rust Storable implementation, especially Bound::Bounded and its max_size, together with the canister upgrade behavior referenced in the question. Determine whether increasing the bound preserves compatibility for existing data and state what migration or other conditions are required. Done means the upgrade-safety question has a documented, definitive answer.
由索引模型根据 Issue 内容生成。
描述
We have something that looks like below.
const MAX_VALUE_SIZE: u32 = 133;
#[derive(Serialize, Clone, Deserialize, CandidType, Debug, PartialEq, Eq)]
pub struct NeuronInfo {
// ... code
}
impl Storable for NeuronInfo {
fn to_bytes(&self) -> Cow<[u8]> {
Cow::Owned(Encode!(self).unwrap())
}
fn from_bytes(bytes: Cow<[u8]>) -> Self {
Decode!(&bytes, Self).unwrap()
}
const BOUND: Bound = Bound::Bounded {
max_size: MAX_VALUE_SIZE,
is_fixed_size: false,
};
}
is it safe to change the MAX_VALUE_SIZE ( max_size ) of a bounded type to 140 and run a canister upgrade?
- 主要语言
- Rust
- 星标
- 111
- 派生
- 39
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
dfinity/stable-structures 的其他 Issue
-
难度 5/5 一周以上 新手友好度 25/100
dfinity/stable-structures#439 ·
-
难度 3/5 1-2 天 新手友好度 35/100
dfinity/stable-structures#400 ·
-
Add StableVec::extend method可能已有人在做 @gabrielrondon 于 210 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 45/100
dfinity/stable-structures#349 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 42/100
dfinity/stable-structures#266 · 3 条评论 ·
-
难度 4/5 3-5 天 新手友好度 35/100
dfinity/stable-structures#264 · 1 条评论 ·
查看 dfinity/stable-structures 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
chipsalliance/caliptra-sw#4311 ·
维护者通常 2 天内回复
-
`image_generation`: `max_retries` is ignored for OpenAI-compatible providers (always 2 retries)可能已有人在做 @ericz7900 今天认领。 未关闭llm translation
难度 2/5 1-3 小时 新手友好度 77/100
维护者通常 1 天内回复
-
Help-Wanted Needs-Triage Package-Request
难度 2/5 1-3 小时 新手友好度 67/100
microsoft/winget-pkgs#456324 ·
维护者通常 1 天内回复
-
ai_p2
难度 2/5 1-3 小时 新手友好度 84/100
ClickHouse/ClickHouse#126833 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复