-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
The current stable release of singularity treats wallets and actors as equivalent. This caused issues when offline wallet creation was added, because those wallets did not have ActorIDs (used as PK on the wallets table) until they hit the chain, which was resolved using a complex migration to change to SERIAL PKs and rebuild the join tables/FKs etc.
A more conceptually sound treament would be to re-position the current wallets table as actors (entities associated with a deal) and separate the private keys and related fields (i.e. credentials for signing) into a separate wallets type.
This has a number of advantages:
- clear separation of concerns
- makes the implementation of features like feat: Add standalone wallet tracking for deal monitoring without private keys #550 trivial
- allows using a secure keystore if desired, DB backups do not leak private keys if so
- sets us up nicely for integration with smart contract based dealmaking
- does not require brittle migrations of existing installs or pulling in new migration libraries
I would propose making this schema change first, then re-implementing the functionality in 2ba6325 on top
Metadata
Metadata
Assignees
Labels
No labels