Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jp1ac4 opened this issue Aug 8, 2024 · 10 comments
Closed

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

jp1ac4 opened this issue Aug 8, 2024 · 10 comments
Assignees
Labels
Enhancement Improving an existing functionality GUI gui related
Milestone

Comments

@jp1ac4
Copy link
Collaborator

jp1ac4 commented Aug 8, 2024

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

@jp1ac4
Copy link
Collaborator Author

jp1ac4 commented Aug 8, 2024

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
Copy link
Member

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 nondiremanuel moved this to To be discussed / defined in Liana General Aug 8, 2024
@nondiremanuel nondiremanuel added this to the v7 - Liana milestone Aug 8, 2024
@nondiremanuel nondiremanuel added GUI gui related Enhancement Improving an existing functionality labels Aug 8, 2024
@nondiremanuel
Copy link
Collaborator

nondiremanuel commented Aug 8, 2024

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:

  • Liana Connect [Default]
  • My own Node
    • Connect to an existing Node
      • Connect to my local Bitcoin Core
      • Connect to Electrum
    • Download a pruned liana-managed one

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
Copy link
Collaborator Author

jp1ac4 commented Aug 9, 2024

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
Copy link
Collaborator

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
Copy link
Collaborator Author

jp1ac4 commented Aug 9, 2024

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
Copy link
Collaborator

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
Copy link
Collaborator Author

jp1ac4 commented Aug 13, 2024

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
Copy link
Collaborator

kloaec commented Aug 22, 2024

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

darosior added a commit that referenced this issue Sep 6, 2024
819eb92 gui(settings): allow to change node type (Michael Mallan)
2381227 gui(settings): view & edit Electrum settings (Michael Mallan)
b570039 gui(settings): rename Bitcoin Core to Node (Michael Mallan)
db20ae4 gui(installer): reduce empty space height (Michael Mallan)
0993905 gui(installer): update wording to include Electrum (Michael Mallan)
f40af57 gui(installer): split long string and run cargo fmt (Michael Mallan)
0f09be1 gui(installer): don't change values while waiting for ping result (Michael Mallan)
c93aa88 gui(installer): add electrum node option (Michael Mallan)
341e446 gui(installer): allow for different node types (Michael Mallan)
83172c7 gui(installer): add general node definition (Michael Mallan)
046b54e gui(installer): define bitcoind from general node struct (Michael Mallan)
c5d9d00 gui: move bitcoind to new node module (Michael Mallan)
4536eff gui(installer): extract logic for try ping bitcoind (Michael Mallan)
ef44cf3 gui(installer): add module for node step (Michael Mallan)
f74f071 gui: upgrade liana dependency (jp1ac4)

Pull request description:

  This is for #1223.

  For now, it's possible to edit the node's settings but not to change node type.

  Remaining tasks:

  - [x] Revert Cargo.toml once #1222 is merged.
  - [x] Update wording as per #1223 (comment).

ACKs for top commit:
  pythcoiner:
    ACK 819eb92

Tree-SHA512: 362a14d32c2e13ba286d252d9f8a1106d63e5c40198776653b0623b433435329663126307e17da017fdbbd8a8ad273b703cc3ba54fd13fa5a0afd7dd9179089a
@darosior
Copy link
Member

darosior commented Sep 6, 2024

Done in #1241.

@darosior darosior moved this from In Progress to Done in Liana General Sep 6, 2024
@darosior darosior closed this as completed Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Improving an existing functionality GUI gui related
Projects
Status: Done
Development

No branches or pull requests

5 participants