Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: account serialization overhaul (#12794)
Change `Account` to be enum and use different representations for serde and borsh ser/deser: * `SerdeAccount` is introduced for serde to maintain backward and forward compatibility. Previously `Account` struct was directly annotated to support serde, we are opting out of this. * `BorshVersionedAccount` is introduced for borsh serialization. Accounts in old format are serialized directly as `AccountV1`. Note that we continue serializing in old format when possible to avoid 16 bytes overhead of sentinel padding. `Account::SERIALIZATION_SENTINEL` hack is preserved for borsh serialization as I could not find a better way to handle backward compatibility. This is part of #12716, in a separate PR global contracts related fields will be added as part of Account.
- Loading branch information