coincoin icon indicating copy to clipboard operation
coincoin copied to clipboard

Persistent wallet

Open robinmonjo opened this issue 7 years ago • 0 comments

Wallet (public and private keys) are in memory only. Even worst, they are generated on init of the Token.MyWallet gen_server. This is really bad because if/when the gen_server crashes, new keys are generated and all coins are lost !

  • [x] So we should first generate a wallet in the application.ex module and pass it to the gen_server from here. This would prevent a crash to generate a new wallet
  • [ ] we want to persist public keys and private keys in a file ~/.coincoin_keys. On startup if this file exist and keys can be read from it, we use these keys, otherwise we generate the keys and create this file. This must be implemented at the MyWallet module level and not the Wallet module level.
  • [ ] document key persistence and how to make it work with docker

robinmonjo avatar Nov 19 '17 22:11 robinmonjo