Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Support personal apis with different keyring backends #269

Closed
yihuang opened this issue Jul 13, 2021 · 8 comments · Fixed by #591
Closed

Support personal apis with different keyring backends #269

yihuang opened this issue Jul 13, 2021 · 8 comments · Fixed by #591
Labels
help wanted Extra attention is needed

Comments

@yihuang
Copy link
Contributor

yihuang commented Jul 13, 2021

Proposal: Support personal apis

Current behavior: limited supported

Desired behavior: fully support

Use case: web3 api compatibility

Status:

  • ImportRawKey, implemented, hangs when running at background with file backend.
  • UnlockAccount/LockAccount, not implemented
  • ListAccounts, implemented
  • SendTransaction/Sign, probably hangs when running at background with file backend
@leejw51crypto
Copy link
Contributor

leejw51crypto commented Jul 14, 2021

encrypt , decrypt too
consider embedded database or sqlite

@fedekunze
Copy link
Contributor

What's the status of this? we should prioritize this fix @yihuang @leejw51crypto

@fedekunze fedekunze added the help wanted Extra attention is needed label Aug 9, 2021
@fedekunze
Copy link
Contributor

or maybe @thomas-nguy? this should be supported on mainnet

@thomas-nguy
Copy link
Contributor

thomas-nguy commented Aug 10, 2021

linked to this issue

99designs/keyring#85

Or we can just decide to implement it as an additional layer on ethermint?

@fedekunze
Copy link
Contributor

Or we can just decide to implement it as an additional layer on ethermint?

what are you proposing exactly? override the keyring?

@yihuang
Copy link
Contributor Author

yihuang commented Sep 2, 2021

First of all, I think we can only target the file backend? for os backend, is it even possible to have a headless solution?
For the file backend, unlock could be implemented as caching the passphrase or private key in memory.
And in several places, providinging a passphrase to the API through an in-memory buffer so it doesn't read stdin.

@davcrypto
Copy link
Contributor

@tomtau @fedekunze helping on this

@davcrypto
Copy link
Contributor

davcrypto commented Sep 27, 2021

@fedekunze FilePasswordFunc for file backend has a hard dependency to cosmos-sdk which would be fixed to get input from stdin. Should ethermint has its own keyring config set up and give up this hard dependency?

Or we need to find a way to fire unlock() for file keyring (e.g. clientCtx.Keyring.List() ) once ethermind is started, but it seems hacky

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants