Rewrite accounts and transactions: store pubkeys instead of addresses in order to avoid unnecessary derivations.