The 7 Bytes That Weren't in the IDL: How #[repr(C)] Padding Breaks a Borsh Client
A single u64 added seven bytes of padding the compiler knew about and the client didn't. Here is why, and how to predict it for any #[repr(C)] struct. The failure I added one field to an instruction-a
Jul 15, 202617 min read64
![The 7 Bytes That Weren't in the IDL: How #[repr(C)] Padding Breaks a Borsh Client](https://cdn.hashnode.com/uploads/covers/601c00e01054fa16dadd5fd8/52d82ddb-8edb-4943-b525-ef2b3ca8aaaf.jpg)