I know I can use InitSpace
to automatically calculate space for an account.
I know InitSpace doesn't include the Anchor discriminator, so I still to add another 8 bytes for the discriminator. I can add a constant for ANCHOR_DISCRIMINATOR_SIZE:
#[constant]
pub const ANCHOR_DISCRIMINATOR_SIZE: usize = 8;
But requiring every Anchor developer to create this constant, or use magic numbers, seems very odd. Is there an inbuilt constant for Anchor discriminator size?