Closed TimoGlastra closed 1 year ago
I think it looks good, not too familiar with the storage internals.
You mentioned Indy::Schema
twice where the second one misses the point about the private parts and to my knowledge there are no private parts, as that would mean that you cannot reuse someone else's schema, right?
Re Indy::CredentialDefinition
, I think it would be good to split the private parts from the public parts. We will likely fetch the public parts a lot for issuance and such and not directly work with the private parts all that much (I assume). When we fetch the public parts from the wallet, it would be good not to load the private parts into memory.
Re Indy::Credential
, I have never heard of an indy-isms
, what is that?
Relevant repo currently being worked on: https://github.com/Indicio-tech/acapy-wallet-upgrade
Related to: https://github.com/hyperledger/aries-framework-javascript/issues/1164
Can be based on: andrewwhitehead/acapy-wallet-upgrade@main/bin/askar-upgrade.py (raw)
We need to create a migration script that allows to update an Indy based wallet to an Aries Askar based wallet.
In this issue only focus on the upgrade of an SQLite based Indy SDK to an SQLite based Aries Askar wallet. We'll likely make it a separate addon (TBD) because it requires an sqlite execution environment which is different per platform.
The steps (taken from the acapy upgrade script) are:
Updates
Once the wallet database has been transformed to an Askar compliant interface there's still records that use the Indy SDK style context structure. All records that aren't created by AFJ, but internal by the Indy SDK (e.g. the private parts of a credential definition) need to be fetched, transformed to an storage record and the re-saved.
Using storage records for all those objects means that from now on the storage storage is completely separated from the rest of the codebase (i.e. you can swap out askar and it will work fine)
The updates that need to happen (may be missing things):
Indy::Key
records and store them as Askar key instancesIndy::MasterSecret
records and store them in anAnonCredsMasterSecret
record (https://github.com/hyperledger/aries-framework-javascript/issues/1164)Indy::Did
records, extract the key and store it as an Askar key object.DidRecord
will exist, but for some there won't this means the case where a public did was created will break. On mobile devices this isn't common, so we'll skip this edge case for now. We may want to instruct users that they need to re-register the did (by storing a did record) for all dids that existed in the indy-sdk and are actually registered on the ledger. We've also used createDid for e.g. peer to peer connections and connectionless exchanges.Indy::Did
recordIndy::Schema
records and store them in the existingAnonCredsSchemaRecord
. the schema structure should be updated to match the new AnonCreds specificationIndy::Schema
records and store them in the existingAnonCredsSchemaRecord
. the schema structure should be updated to match the new AnonCreds specificationIndy::CredentialDefinition
records.AnonCredsCredentialRecord
. The structure should be updated to remove indy-isms and adhere to the anoncreds spec.