coral-xyz/anchor-book

Add a chapter that explains the space used by borsh serialization in an easier-to-understand way than borsh.io does

paul-schaaf opened this issue · 1 comments

Add a chapter that explains the space used by borsh serialization in an easier-to-understand way than borsh.io does

whats most important for users of anchor/anchor beginners is how much space each type takes so instead of this

Screenshot 2022-03-22 at 12 36 47

we should just say

u8 -> 1,
u16 -> 2

and instead of this

Screenshot 2022-03-22 at 12 37 49

we should have this

Option<T> -> 1 + <Space that T takes>