wizardsardine / liana

The missing safety net for your coins
https://wizardsardine.com/liana
BSD 3-Clause "New" or "Revised" License
331 stars 58 forks source link

[GUI] Add Electrum backend option to Installer & update Settings #1223

Closed jp1ac4 closed 2 months ago

jp1ac4 commented 3 months ago

Following #1222, we will need to add an Electrum option in the Installer and update the Settings page accordingly.

jp1ac4 commented 3 months ago

For the installer, we currently have this page:

image

We could either:

  1. add the Electrum option to this same page (perhaps one row per option instead of columns), or
  2. add a preceding page "Select Bitcoin backend type" with options "Bitcoin node" (which then goes to above page) & "Electrum" (a new page to enter Electrum details and check connection).

Perhaps we should opt for fewer pages/clicks, in which case (1) would be better.

edouardparis commented 3 months ago

I like the idea of having the 3 options in columns, each in a card with a title that needs to be clicked on to collapse and show the text and the button next.

nondiremanuel commented 3 months ago

Intuitively (but probably I'm missing something), I would expect to have a three steps choice:

  1. Do you want to use the remote backend (Liana Connect) or your own node? (this is the part of @edouardparis' PR)
  2. If your node, do you already have one or do you want us to install a pruned one? (basically the same choice we have now changing the wording to mention that there is also Electrum in the former option)
  3. If you have one, local bitcoind or electrum?

The choice branching would be something like:

In this case, electrum would be an option in the following page in which you put your IP and so on: image

The reason for that is that people could be confused by the fact of having two options to link to their own node at that stage.

What am I missing?

jp1ac4 commented 3 months ago

Thanks for the suggestions. It makes sense to consider how these options and the flow will link with the Liana Connect option.

  1. Do you want to use the remote backend (Liana Connect) or your own node? (this is the part of @edouardparis' PR)

I tend to think of "node" as Bitcoin Core, so I think we could change this to "or your own backend (Bitcoin node or Electrum server)".

  1. If your node, do you already have one or do you want us to install a pruned one? (basically the same choice we have now changing the wording to mention that there is also Electrum in the former option)

Changing the existing wording would be the simplest thing, but having the three cards would also be nice.

In this case, electrum would be an option in the following page in which you put your IP and so on

If we stick with the single "manage your own backend" option, then I think we could have another radio button at the top of this page to select the backend type ("Bitcoin node" or "Electrum" server) and then the contents below would change accordingly. The title of the page would be "Set up connection to the Bitcoin backend".

If we have three separate options, then we would just need to add a new page for the Electrum connection and the existing "Set up connection to Bitcoin full node" page would stay the same.

nondiremanuel commented 3 months ago

I tend to think of "node" as Bitcoin Core, so I think we could change this to "or your own backend (Bitcoin node or Electrum server)".

I think your wording is more precise. I added a proposal on this step in #970, so that we can keep the discussion about it there.

Changing the existing wording would be the simplest thing, but having the three cards would also be nice.

I tend to think that the main criteria of choice is: do you already have a node/server to connect to or do you want us to manage (and download) one for you? That's why I personally lean a little bit more towards changing the wording and adding the Electrum option in the following screen. But let's see if we can find an agreement or other arguments.

If we stick with the single "manage your own backend" option, then I think we could have another radio button at the top of this page to select the backend type ("Bitcoin node" or "Electrum" server) and then the contents below would change accordingly. The title of the page would be "Set up connection to the Bitcoin backend".

Yes, that's very similar to how I imagined it.

If we have three separate options, then we would just need to add a new page for the Electrum connection and the existing "Set up connection to Bitcoin full node" page would stay the same.

So, to recap, the options at the moment are:

  1. Change the wording of the "Bitcoin Node management" step to include Electrum but leaving the two choices. Edit the following step ( "Set up connection to the Bitcoin backend") to have a choice between local bitcoind and an electrum server, with its specific settings.
  2. Adding a third card to the "Bitcoin Node management" step. Adding a new page to setup the electrum settings, similar to what we do for the local bitcoind.

In terms of effort required, do you see any major difference between the two?

jp1ac4 commented 3 months ago

In terms of effort required, do you see any major difference between the two?

Perhaps slightly simpler to have a separate page for setting up Electrum, but either way should be similar effort.

nondiremanuel commented 3 months ago

After clarifying the previous step in the relative PR, among the two options for showing Electrum I would personally go with the first:

Change the wording of the "Bitcoin Node management" step to include Electrum but leaving the two choices. Edit the following step ( "Set up connection to the Bitcoin backend") to have a choice between local bitcoind and an electrum server, with its specific settings.

I would see the wording of the first two options (what now is the "Bitcoin Node Management" step - we should consider changing this title as well imho) something like:

  1. I already have a node Select this option if you already have a bitcoin node running locally or remotely. Liana will connect to it.
  2. I want Liana to automatically install a Bitcoin node on my device Liana will install a pruned (i.e. "compressed") node on your computer. You won't need to do anything except having some disk space available (~25GB required) and waiting for the initial synchronization with the network (it can take some days according to your internet connection speed). [the two parenthesis with the estimation space and time possibly should be shown only if the network chosen is mainnet]

The wording has to be reviewed and validated of course, but I think it makes it simpler and less redundant.

If the user selects 1, there should be two options: a. Connect to a local node on this machine -> Bitcoin Core b. Connect to a remote node (on another device) -> Electrum Server

as @darosior pointed out:

In the super-unlikely the user wants to connect to a locally running Electrum server (if so he must be technical) we can always have a redirection to the Electrum setup step there.

Other opinions or comments?

jp1ac4 commented 3 months ago

Regarding Electrum, the user could in principle enter any valid URL, e.g. a public instance. We could add some text to recommend only connecting to a self-hosted Electrum server for privacy reasons.

kloaec commented 3 months ago

definitely needs to be self hosted. It should be very clear that it's not just a recommendation, but important

darosior commented 2 months ago

Done in #1241.