nucypher / nucypher

Threshold Access Control (TACo) runtimes for the Threshold Network
GNU Affero General Public License v3.0
696 stars 273 forks source link

Extract Signer from nucypher.blockchain.eth.Client #1630

Closed cygnusv closed 4 years ago

cygnusv commented 4 years ago

TL;DR:

Over the last months, we have been increasingly aware of the limitations of requiring a full blockchain client running in local. Even light nodes are not light enough and very error-prone.

An alternative that we've discussed many times is to implement some sort of "wallet" or "signer", while using an external blockchain client (e.g., a self-managed but remote ethereum node, or directly, providers like Infura). However, we've been reluctant to "get our hands dirty" with implementing a wallet ourselves (which, IMHO, it's a wise position).

Our recent experience with incentivized testnet has shifted the balance towards facilitating lives of node operators and stakers, and implement some kind of light-weight signing functionality (see @KPrasch's awesome PoC in #1629) that can be combined with external blockchain clients.

When it comes to engineer a solution that accommodates this functionality, I think we need to solve a problem on the scope of our current blockchain client interface (i.e., nucypher.blockchain.eth.client.Web3Client). The problem is that our current clients are meant to be used both as a blockchain clients (e.g., executing calls, sending TXs, etc) and as signers (e.g., signing TXs, unlocking accounts, etc). My proposal is to extract the signing API from the client to a separate Signer interface.

That would have many advantages:

Assuming we go down this road, I personally vote for at least implementing support for Clef, for several reasons:

cygnusv commented 4 years ago

Closed by #1664