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

Bitcoin full node via Electrum Server 🌕 #2737

Closed
7 tasks
matejzak opened this issue Oct 23, 2020 · 23 comments · Fixed by #4500
Closed
7 tasks

Bitcoin full node via Electrum Server 🌕 #2737

matejzak opened this issue Oct 23, 2020 · 23 comments · Fixed by #4500

Comments

@matejzak
Copy link

matejzak commented Oct 23, 2020

Design: to be added
Spec: Notion


Tech Spec

Main objective

Add support into blockchain-link for Electrum Server. This way the user will have the ability to opt-out from our Blockbook backends and set Electrum server address which they may have running on their personal Bitcoin node. Note that we will support Bitcoin only (no altcoins).

Blockchain-link

As mentioned the main part of this task is to add a new backend to blockchain-link. We will either add a new dependency that @prusnak listed below or write it ourselves. I have a small preference to write it ourselves because a) we want to be careful about adding new dependencies b) the projects do not seem very well maintained. I believe the best approach is to get inspired heavily by the libs (if the license allows it) but have it in the blockchain-link directly. But the decision is yours.

CLI option

We should also not forget about adding a CLI option to launch Suite against the Electrum server directly, otherwise some info might leak to our blockbooks once Suite is started. This needs to be discussed as it might not be needed after #3729?

Modify Bitcoin settings

User wishing to set their own Electrum server will go to Settings -> Coins -> Bitcoin's Advanced settings where they will be able to replace Blockbook URL with an Electrum server. @matejzak will prepare design for this.

Useful links

  • There are number of public Electrum servers. For example listed here.
  • I have personally tried electrum.blockstream.info:50002:s. If you would like to run Electrum against such server you can do that by running electrum --oneserver --server="electrum.blockstream.info:50002:s".

Next steps

  • Prepare design for settings
  • Discuss support in blockchain-link
  • Add support to blockchain-link
  • Document support in blockchain-link
  • Add CLI option (if agreed upon)
  • Add the option to settings
  • Document the feature as a whole
@matejzak matejzak added the Suite label Oct 23, 2020
@matejzak matejzak added this to January 13th in Trezor · Suite · Roadmap 🔥 Oct 23, 2020
@matejzak matejzak changed the title Bitcoin full node Bitcoin full node 🌕 Oct 23, 2020
@matejzak matejzak moved this from January 13 (👋 2021) to February 10 in Trezor · Suite · Roadmap 🔥 Nov 26, 2020
@prusnak
Copy link
Member

prusnak commented Dec 28, 2020

Is this an issue covering adding an option to use custom full node (instead of nodes of Satoshi Labs)?

You can already use custom node when you run Blockbook.

This issue is about possibility to connect to Bitcoin Core directly (or at least to Electrum server, which has lower system requirements than Blockbook)

@matejzak matejzak moved this from February 10 to March 10 in Trezor · Suite · Roadmap 🔥 Jan 5, 2021
@josibake
Copy link

josibake commented Jan 5, 2021

Do you have a high level idea on how this will work? specifically, I am running a full node on a raspi with electRS and use electrum desktop as my wallet, connected to my full node. I'd like to use Trezor Suite instead and I'm hoping I can keep the same full node setup and just point Trezor Suite at it once this is implemented.

@prusnak
Copy link
Member

prusnak commented Jan 6, 2021

We are evaluating this and it indeed seems that connecting to Electrum API is probably the best way forward as this is what most of people have in mind when they say "full node".

Electrum APIs in JS:

@matejzak matejzak added this to 🎯 To do in February 10 💘 via automation Jan 6, 2021
@matejzak matejzak removed this from 🎯 To do in February 10 💘 Jan 6, 2021
@matejzak matejzak moved this from March 10 to April 14 in Trezor · Suite · Roadmap 🔥 Jan 11, 2021
@samuel-emrys
Copy link

@prusnak for what it's worth, I'd be interested in integration with bitcoin core more than electrum.

@matejzak matejzak moved this from April 14 to May 13 in Trezor · Suite · Roadmap 🔥 Mar 3, 2021
@matejzak matejzak moved this from May 13 to June 9 in Trezor · Suite · Roadmap 🔥 Mar 11, 2021
@matejzak matejzak moved this from June 9 to .. Upcoming 🔮 in Trezor · Suite · Roadmap 🔥 Apr 20, 2021
@matejzak matejzak moved this from .. Upcoming 🔮 to July 14 in Trezor · Suite · Roadmap 🔥 Apr 20, 2021
@matejzak matejzak moved this from July 14 to August 11 in Trezor · Suite · Roadmap 🔥 May 6, 2021
@tsusanka tsusanka changed the title Bitcoin full node 🌕 Bitcoin full node via Electrum Server 🌕 May 28, 2021
@tsusanka
Copy link
Contributor

@prusnak feel free to check my Tech Spec draft in the original post.

@matejzak matejzak moved this from August 11 to July 14 in Trezor · Suite · Roadmap 🔥 Jun 2, 2021
@matejzak matejzak moved this from July 14 to August 11 in Trezor · Suite · Roadmap 🔥 Jun 10, 2021
@matejzak matejzak added this to 🎯 To do in Suite · August 11 🍎 via automation Jun 10, 2021
@matejzak matejzak moved this from 🎯 To do to 🏃‍♀️ In progress in Suite · August 11 🍎 Jul 8, 2021
@prusnak
Copy link
Member

prusnak commented Dec 4, 2021

Unfortunately without pagination there's no way to actually measure progress.

Progress does not have to be a progress bar with percent. Progress can be shown also as a rotating wheel or just a text "please wait, I am doing something" :-)

@tsusanka
Copy link
Contributor

tsusanka commented Dec 6, 2021

We have discussed next steps with @marekrjpolak in more detail:

Product (@matejzak):

  • Create design for Settings - option to add Electrum server (maybe it is the same input as the one for blockbook 🤷)
  • Improve onboarding - option for connecting Electrum server (nice to have, we can roll this out without this as we'll have the CLI --option)
  • Check and finalise design for "modal loading"
  • Create design for signalising that we are using custom backend in the upper menu (similar to how we display that you are using Tor). Note that this might have three states: 1. fully on our blockbook servers 2. fully on custom servers 3. mix of 1 and 2 (using Bitcoin via Electrum server but other coins via our blockbook instances).

Code (@marekrjpolak):

  • Add support for Taproot
  • Send info to @matejzak what kind of info we may show in the loader
  • Check what we are caching but let's not worry about advanced caching to files (cache only during runtime)
  • Discuss Coingecko vs Blockbook:
    • There is a small problem with fetching (historic) fiat rates. We have replaced Blockbook with Electrum server so we do not have the needed data. There are two options:
      1. Hide historic fiat rates and use Coingecko for these users. Note that this has huge implications into the design such as hiding the dashboard, some tool tips etc.
      2. Extrapolate the "fiat rates" logic from blockchain-link into separate module/package/whatever and get fiat rates from Blockbook. This is probably the right solution, although a bit more time consuming.

.. and review obviously.

@Kixunil
Copy link

Kixunil commented Dec 6, 2021

FYI regarding Electrum servers Taproot should be no-op because the Electrum protocol already hashes whole script_verify and doesn't care what's inside.

@tsusanka tsusanka linked a pull request Dec 7, 2021 that will close this issue
@tsusanka
Copy link
Contributor

tsusanka commented Dec 7, 2021

Btw some numbers from testing this on the PR (commit 5348af3) on my "small testing seed" (cca 10 transactions):

  • About 12 seconds from choosing Standard wallet to the dashboard loaded up properly on our internal company server. Tor OFF.
  • About 22 seconds from choosing Standard wallet to the dashboard loaded up properly on my personal raspberry pi running Umbrel. Tor OFF.
  • About 33 seconds from choosing Standard wallet to the dashboard loaded up properly on my personal raspberry pi running Umbrel. Tor ON.

@melroy89

This comment has been minimized.

@tsusanka
Copy link
Contributor

Discuss Coingecko vs Blockbook:

To recap this: we will keep communicating with Blockbook for fiat rates and we will extend this blockbook REST endpoint with batching option. @martinboehm will look into it, it should be an easy one :).

@hynek-jina hynek-jina removed this from 🔎 Needs review in January 19 ☕️ Jan 11, 2022
@hynek-jina hynek-jina added this to 🎯 To do in February 16 ⛷ via automation Jan 11, 2022
@hynek-jina hynek-jina moved this from 🎯 To do to 🏃‍♀️ In progress in February 16 ⛷ Jan 13, 2022
February 16 ⛷ automation moved this from 🏃‍♀️ In progress to 🤝 Needs QA Feb 1, 2022
@tsusanka tsusanka reopened this Feb 2, 2022
@tsusanka
Copy link
Contributor

tsusanka commented Feb 2, 2022

Some product work still needs to be done.

@tsusanka tsusanka assigned matejzak and unassigned karliatto and marekrjpolak Feb 2, 2022
@hynek-jina hynek-jina removed this from 🤝 Needs QA in February 16 ⛷ Feb 3, 2022
@hynek-jina hynek-jina added this to 🎯 To do in March 16 🌱 via automation Feb 3, 2022
@hynek-jina hynek-jina moved this from 🎯 To do to 🏃‍♀️ In progress in March 16 🌱 Feb 3, 2022
@bosomt
Copy link
Contributor

bosomt commented Feb 7, 2022

Can you please add update of context help in Sessings/Crypro to tasks/next steps ?

obrazek

@matejkriz matejkriz moved this from 🏃‍♀️ In progress to 🤝 Needs QA in March 16 🌱 Mar 3, 2022
@ondracja ondracja moved this from 🤝 Needs QA to ✅ Approved in March 16 🌱 Mar 9, 2022
@hynek-jina
Copy link
Contributor

Follow-up issues are tracked in separate Milestone

@tsusanka
Copy link
Contributor

Wooohooo, great job everyone 🎉 🎉 🎉 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
March 16 🌱
✅ Approved
Trezor · Suite · Roadmap 🔥
Being implemented 💪
Development

Successfully merging a pull request may close this issue.