We can save space if we remove identifiers from storage values. For example, Storage<AccountId, Account> is really Storage<AccountId, (AccountId, Metadata)>. It also prevents accidentally leaving the world in an inconsistent state by mutating the identifier in the value separately from the key.
We can save space if we remove identifiers from storage values. For example,
Storage<AccountId, Account>
is reallyStorage<AccountId, (AccountId, Metadata)>
. It also prevents accidentally leaving the world in an inconsistent state by mutating the identifier in the value separately from the key.This could look like the following:
I encountered a problem with queries while trying this: predicates don't seem to support inputs with lifetimes.
Would this be worth pursuing?