Blockstream / electrs

An efficient re-implementation of Electrum Server in Rust
MIT License
320 stars 131 forks source link

Electrs does not work due to rapidly consuming all available memory #90

Closed nakoshi-satamoto closed 3 months ago

nakoshi-satamoto commented 4 months ago

Even with 16 GB of RAM and at least 14 GB of RAM available, electrs rapidly consumes all RAM then causes the OS to freeze up. Even when capping the amount of RAM that the process or user can use, it still depletes all the allocated available memory and instead of being throttled, the process is just simply killed.

I am running debian. Is this an issue with debian or electrs? Has anyone ever tried to run an electrs server (I know Blockstream does), if so what do you do to run it successfully?

nakoshi-satamoto commented 4 months ago

I have interest in running an electrs server because this is the only way to use Blockstream Jade and Green privately with the Liquid network. I think it is very important for pepole to be able to run their own electrs server for privacy and sovereignty. It may be good to document what operating systems are supported, if debian is a supported OS, I am seeking guidance on how to run it successfully. Thank you

sammy007 commented 4 months ago

Are you sure you are running latest version? I had issues with leaking threads and it has been resolved lately.

sammy007 commented 4 months ago

Also, you probably could go with original electrs which does not require that much disk space as well. As to operating system, seems like trolling to me. I am running several instances on Debian host in debian docker containerz.

nakoshi-satamoto commented 4 months ago

@sammy007 The original electrs does not work with liquid though? I am wanting to use a hardware wallet for Liquid. The only possible way to do that currently is by using Blockstream's electrs fork, because Jade is the only hardware wallet that supports Liquid, and Green is the only wallet that supports Jade and Liquid. Green requires electrs backend. Running one's own elecrs instance is the only way to use Green with privacy.

Maybe it has to be ran inside of docker for resource containment? In curiosity, ave you ever ran it outside of docker? If docker works I may have to figure out how to run it in docker then.

nakoshi-satamoto commented 4 months ago

git pull returns Already up to date

I am on the latest version.

philippem commented 3 months ago
nakoshi-satamoto commented 2 months ago
  • check ulimit in the shell where you are running electrs. 16GB is a small amount for electrs with bitcoin mainnet (or liquid). Please confirm no hard or soft limits with ulimit, and increase available RAM to 32 gb if possible.

16 GB is an insane amount of RAM, most x86-64 computers do not even support more than 16 GB of RAM. Even then, non-backdoored computers which use ARM usually are limited to like 4 GB of RAM. You are saying that someone has to have a backdoored computer with an outrageous amount of resource requirements just to run an electrs server. Otherwise they are destroying all their bitcoin and liquid privacy by leaking all their associated addresses to a server ran by Blockstream, which is in effect likely also sharing that same data with the government even if unintentionally as their server is most likely hosted on "the cloud".

nakoshi-satamoto commented 2 months ago

All intel and AMD computers are backdoored with built in spy chips. I am not some paranoid "conspiracy theorist" this is a documented well known FACT. The only computers that can have the ME removed completely are those sandy bridge and ivy bridge and older. There exist NO x86-64 computer that can take more than 16 GB of RAM while also being able to have the spy chips disabled. It is absolutely insane to require 16 GB of RAM or even more than that, that is an insane amount of resources. Electrs is absolutely flawed if it cannot run on computers, or if it requires proprietary hardware with built in spy chips which goes against the freedom philosophy of Bitcoin.

nakoshi-satamoto commented 2 months ago

It is very disturbing how most wallets use electrum servers as a dependency which absolutely kills privacy for the wallet user.

Replies are just "oh, but just run your own electrs server bro!" but you admit here that is not even possible.

sammy007 commented 2 months ago

Dude, you have few options to try:

1) Run original electrs, not this fork. 2) Run blockstream's electrs fork in a light mode (option is somewhere in README)

And for fs, run it on NVMe drives. The price is almost equal to SATA SSDs and benefits are obvious. The initial index build process is pretty resource consuming.

nakoshi-satamoto commented 2 months ago

Otherwise they are destroying all their bitcoin and liquid privacy by leaking all their associated addresses to a server ran by Blockstream, which is in effect likely also sharing that same data with the government even if unintentionally as their server is most likely hosted on "the cloud".

For the record, I am not bashing on Blockstream; I am thankful for the services they run and what they do for people. My point is that if you not using your own electrs server you are using someone elses who is very likely sharing your info with government even if they don't realize it. This is not an issue with Blockstream but with anyone.

Dude, you have few options to try:

  1. Run original electrs, not this fork.
  2. Run blockstream's electrs fork in a light mode (option is somewhere in README)

And for fs, run it on NVMe drives. The price is almost equal to SATA SSDs and benefits are obvious. The initial index build process is pretty resource consuming.

  1. This fork is the only way to use a hardware wallet with Liquid (Jade). There is no other way to use a hardware wallet on Liquid.

  2. Light mode is not actually more efficient. I did try that.