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

Feature Request: Let electrs and esplora be self-hosted by users (not currently possible) #489

Open
nakoshi-satamoto opened this issue Mar 25, 2024 · 2 comments

Comments

@nakoshi-satamoto
Copy link

I did not see a way to open an issue on the Blockstream electrs fork. So I am opening it here as it is a dependency of Esplora.

My computer has 16 GB of RAM. Even if I'm only using a few GB of RAM before trying to sync electrs for the liquid network, it quickly consumes all of my RAM casuing both liquid and electrs to crash. Right now it is impossible to actually get electrs to work due to the memory leak or resource depletion. I happen to be on a computer with intel ME stripped out (impossible to do after sandy and ivy bridge) so I am able to handle 16 GB of RAM. However, most freedom computers which do not include backdoors in the CPU (like intel or AMD) actually are limited to 4GB of RAM. Does electrs (and blockstream green of which electrs is a dependency of to use it privately) actually require use of backdoored computers to use? I'd think that even 16 GB of RAM would have been enough. But we should also keep in mind the computers that are capped at 4 GB of RAM.

Is it possible to limit the amount of RAM used by electrs to prevent it from consuming all system resources and crashing? 16 GB of RAM is ALOT and should in itself be enough.

@nakoshi-satamoto
Copy link
Author

nakoshi-satamoto commented Mar 27, 2024

I used this command to create an environment that has a cap on RAM utilization from which I run electrs. This in theory makes it throttled at 4 GB of RAM usage and terminates if it reaches 5 GB of RAM usage with throttling unsuccessful.

systemd-run --scope --user -p MemoryHigh=4096M -p MemoryMax=5000M -- /bin/bash

Electrs no longer temrinates from resource depletion, but now electrs is encountering a new problem


TRACE downloading 100000 block headers
TRACE downloading 100000 block headers
TRACE downloading 100000 block headers
TRACE downloading 100000 block headers
TRACE downloading 100000 block headers
TRACE downloading 100000 block headers
TRACE downloading 100000 block headers
TRACE downloading 100000 block headers
TRACE downloading 100000 block headers
TRACE downloading 100000 block headers
TRACE downloading 100000 block headers
TRACE downloading 100000 block headers


TRACE downloading 100000 block headers
WARN reconnecting to bitcoind: disconnected from daemon while sending
TRACE downloading 100000 block headers



TRACE downloading 100000 block headers
WARN reconnecting to bitcoind: disconnected from daemon while sending
WARN reconnecting to bitcoind: expected 293690505 bytes, got 218120077
WARN reconnecting to bitcoind: expected 293690505 bytes, got 213925773


WARN reconnecting to bitcoind: expected 293690505 bytes, got 211206029
WARN reconnecting to bitcoind: expected 293690505 bytes, got 209256333
WARN reconnecting to bitcoind: expected 293690505 bytes, got 210648973
WARN reconnecting to bitcoind: expected 293690505 bytes, got 207863693
WARN reconnecting to bitcoind: expected 293690505 bytes, got 213614477

If anyone can advise me on how I can run electrs please let me know. Thank you

@nakoshi-satamoto
Copy link
Author

nakoshi-satamoto commented Mar 27, 2024

actually my mentioned potential solution for resource throttling does not actually work because I think that electrs just simply stops doing anything when it reaches the memory limit.

Currently it seems as if elects does not work. Has anyone been successful in running electrs?

There is a big benefit in people being able to run their own esplora and electrs server so that they can maintain privacy of their wallets.. Although Blockstream is not evil; the problem is that I am suspect that Blockstream uses "the cloud" for hosting. Google Cloud? This means that US intelligence agencies could in theory be able to see all addresses that are correlated with each other. US intelligence agencies and google (which is a spying partner with the US federal gov) is able to see all data stored and within memory (virtual RAM) of any server hosted on "the cloud".

Esplora and Electrs should be able to have the option for users to run their own instance. Maybe this can be changed to a feature request to support self-hosted as an option.

@nakoshi-satamoto nakoshi-satamoto changed the title Blockstream Electrs: Does not work due to rapidly depleting all system resources Feature Request: Let electrs and esplora be self-hosted by users (not currently possible) Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant