stable-structures
stable-structures copied to clipboard
canister upgrade with limit change
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?