romanz / electrs

An efficient re-implementation of Electrum Server in Rust
MIT License
1.02k stars 373 forks source link

Feature: Separate daemon + rocksdb from electrs interface #1030

Open caniko opened 2 months ago

caniko commented 2 months ago

Is your feature request related to a problem? Please describe. I am considering forking the repository, but I only need the backend: The bitcoind daemon and rocksdb schema + configuration. electrs is monolithic, it shouldn't be.

Describe the solution you'd like A package focused entirely on the bitcoind daemon, and its storage. Currently, the only storage option is rocksdb; however, there could be other ones. The new package could be electrs-daemon.

Describe alternatives you've considered Just forking, and removing the components that I don't need.

Additional context None.

antonilol commented 2 months ago

+1 related to #765 but that pr in inactive (sent a message a year ago but no development since then there)

rust trait are really good for this, would be cool if you could choose your own storage backend (like started on in the linked pr) and choose the interface (electrum rpc, or something else?)

caniko commented 2 months ago

@antonilol, you could even have no interface, and have your workers open rocksdb directly. RocksDB supports concurrent reads, most on disk KVs do.

This is related in the way that it is a nice way to decouple the two entities/apps. One that deals with keeping an updated database, and the other as the electrum interface.

romanz commented 1 month ago

Concept ACK :)

I'll be happy to help with the design and review of this idea.

romanz commented 1 month ago

(and sorry for the delayed response...)