<p>These days, high end electrum servers directly read blk.dat files straight from Bitcoin Core's blocks folder in the process of creating their initial internal indexes. I guess they also do in the course of their lifespan to keep indexes in sync, but unsure about that.</p>
<p>First things first, I've just read <a href="https://bitcoin.stackexchange.com/questions/58844/how-block-explorer-technology-works">here</a> that it is bad practice for technical reasons.</p>
<p>Also, Bitcoin Core makes sure those files are readable ONLY by its own user. Thus, the only solution I found to sync those electrum servers is to run them with that same user. Giving rights to those pieces of software to modify block files seems a bit awkward, to say the least.</p>
<p>This concerns me a bit. Many projects need those bitcoin addresses indexes, thus, I guess most of them accept that compromise. I think the best option would be for electrum servers to NOT use those files. Though, the reality we have to live with is that they DO as we speak.</p>
<p>Although the best solution might be for electrum servers to stick to RPC calls, I doubt they will for performance reasons, I guess. Then, why doesn't Bitcoin Core include a configuration switch to at least allow readonly access to those files?</p>

CC BY-SA 4.0
2024-02-21T17:10:50.337Z
If your question is essentially just a feature request for Bitcoin Core, it should be filed here: https://github.com/bitcoin/bitcoin/issues
Vojtěch Strnad
CC BY-SA 4.0
2024-02-21T17:12:08.360Z
I am here to discuss about it with bitcoiners at large
RooSoft
CC BY-SA 4.0
2024-02-21T17:14:26.340Z
I guess that if the feature isn't available in 2024, there might be a good reason for it... then, maybe electrum server developers might chime in and explain why these apps apparently have to run in the context of Bitcoin Core's user so they can sync their databases.
RooSoft
CC BY-SA 4.0
2024-02-21T17:30:03.150Z
Hey RooSoft, this site is a Q&A platform, unfortunately it does not work well for discussions. Could you perhaps touch up your post to highlight what _question_ you would like to get answers for?
Murch
CC BY-SA 4.0
2024-02-21T17:31:15.417Z
Well, I want to know how high profile bitcoin services deal with this problem.
RooSoft
<bitcoin-core><json-rpc><block><synchronization><electrum-server>
High end electrum servers directly reading blk.dat files
RooSoft
# High end electrum servers directly reading blk.dat files

(Asked by: username_0 on 2024-02-21)

These days, high end electrum servers directly read blk.dat files straight from Bitcoin Core's blocks folder in the process of creating their initial internal indexes. I guess they also do in the course of their lifespan to keep indexes in sync, but unsure about that.

First things first, I've just read [here](https://bitcoin.stackexchange.com/questions/58844/how-block-explorer-technology-works) that it is bad practice for technical reasons.

Also, Bitcoin Core makes sure those files are readable ONLY by its own user. Thus, the only solution I found to sync those electrum servers is to run them with that same user. Giving rights to those pieces of software to modify block files seems a bit awkward, to say the least.

This concerns me a bit. Many projects need those bitcoin addresses indexes, thus, I guess most of them accept that compromise. I think the best option would be for electrum servers to NOT use those files. Though, the reality we have to live with is that they DO as we speak.

Although the best solution might be for electrum servers to stick to RPC calls, I doubt they will for performance reasons, I guess. Then, why doesn't Bitcoin Core include a configuration switch to at least allow readonly access to those files?

**Tags:** bitcoin-core, json-rpc, block, synchronization, electrum-server

> **Comments:**
> **username_1**: If your question is essentially just a feature request for Bitcoin Core, it should be filed here: https://github.com/bitcoin/bitcoin/issues  
> **username_0**: I am here to discuss about it with bitcoiners at large  
> **username_0**: I guess that if the feature isn't available in 2024, there might be a good reason for it... then, maybe electrum server developers might chime in and explain why these apps apparently have to run in the context of Bitcoin Core's user so they can sync their databases.  
> **username_2**: Hey username_0, this site is a Q&A platform, unfortunately it does not work well for discussions. Could you perhaps touch up your post to highlight what _question_ you would like to get answers for?  
> **username_0**: Well, I want to know how high profile bitcoin services deal with this problem.  

---

## 0 answers

