As part of further migration support, I have a design question.
Are account versions intended to be handled using discriminators? I think that's a reasonable approach, and we already have a custom discriminator in the account attribute. Should it be updated every time as supposed migration flow?
Sometimes upgrading to the next discriminator isn't an option. In the current migration scheme, I see a potential issue where an un-migrated account could be mistaken for a new one if the discriminators match.
Are there any plans to add explicit version field to an account while preserving the discriminator? I'm imagining something like #[account(version: u8 = 1)]. (Effectively a 9-byte discriminator where the last byte is the version, but I think that's a cleaner approach.)
As part of further migration support, I have a design question.
Are account versions intended to be handled using discriminators? I think that's a reasonable approach, and we already have a custom discriminator in the account attribute. Should it be updated every time as supposed migration flow?
Sometimes upgrading to the next discriminator isn't an option. In the current migration scheme, I see a potential issue where an un-migrated account could be mistaken for a new one if the discriminators match.
Are there any plans to add explicit version field to an account while preserving the discriminator? I'm imagining something like
#[account(version: u8 = 1)]. (Effectively a 9-byte discriminator where the last byte is the version, but I think that's a cleaner approach.)