https://github.com/overtorment/electrumz
Minimalistic Electrum server implementation that indexes and serves only chainstate data (aka UTXO)
https://github.com/overtorment/electrumz
bitcoin electrum electrum-server
Last synced: 3 months ago
JSON representation
Minimalistic Electrum server implementation that indexes and serves only chainstate data (aka UTXO)
- Host: GitHub
- URL: https://github.com/overtorment/electrumz
- Owner: Overtorment
- Created: 2025-09-26T20:35:53.000Z (4 months ago)
- Default Branch: master
- Last Pushed: 2025-09-27T21:42:48.000Z (4 months ago)
- Last Synced: 2025-09-27T23:35:32.278Z (4 months ago)
- Topics: bitcoin, electrum, electrum-server
- Language: TypeScript
- Homepage:
- Size: 23.4 KB
- Stars: 7
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
ElectrumZ
=========
Minimalistic Electrum server implementation that indexes and serves only chainstate data (aka UTXO)
Pros:
* takes way less disk space, ~20 Gb
* fast to index: all done in less than an hour
* works: you can see your balance, and get data to construct spending transactions
Cons:
* cant serve historic data: will show only your recent transactions (the ones that have unspent outputs to you)
* because of the above, cant be used to import seeds in wallets from scratch: not all funds might be detected (might need huge gap_limit)
* doesnt work with mempool, so cant tell anything about unconfirmed transactions or do fee estimation based on mempool
* must be initially synced on the same machine where Bitcoin Core is (to access utxo dump)
### With that data it can implement following RPC methods:
* `blockchain.scripthash.get_balance`
* `blockchain.scripthash.get_history` (**limited data**)
* `blockchain.scripthash.listunspent`
### Following methods will be proxied to Bitcoin Core:
* `blockchain.transaction.broadcast`
* `blockchain.transaction.get`
How it works:
-------------
1. Ask Bitcoin Core to dump UTXO set on disk (i.e. `bitcoin-cli dumptxoutset ~/utxos.dat latest`)
1. Parse `.dat` file into empty sqlite database
1. Add indexes
1. Ready to serve!
1. Launch worker that watches for new blocks and updates UTXOs in sqlite database
TODO
----
* [x] add worker to catch up after initial data ingestion (delete spent utxos, add new utxos)
* [ ] implement missing less-important JSON-RPC methods
* [ ] add TLS & Websocket servers
* [ ] handle reorgs
For reference
------------
* https://electrum-protocol.readthedocs.io/en/latest/protocol-methods.html
* https://github.com/bitcoin/bitcoin/blob/master/contrib/utxo-tools/utxo_to_sqlite.py