https://github.com/pragmaxim-com/bitcoin-explorer
Bitcoin explorer
https://github.com/pragmaxim-com/bitcoin-explorer
axum bitcoin blockchain redb rust
Last synced: about 1 month ago
JSON representation
Bitcoin explorer
- Host: GitHub
- URL: https://github.com/pragmaxim-com/bitcoin-explorer
- Owner: pragmaxim-com
- License: gpl-3.0
- Created: 2025-06-27T15:49:26.000Z (12 months ago)
- Default Branch: master
- Last Pushed: 2025-08-02T12:12:01.000Z (10 months ago)
- Last Synced: 2025-08-02T14:22:31.208Z (10 months ago)
- Topics: axum, bitcoin, blockchain, redb, rust
- Language: Rust
- Homepage:
- Size: 36.1 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Bitcoin Explorer
Bitcoin explorer on top of [redbit](https://github.com/pragmaxim-com/redbit) and [chain-syncer](https://github.com/pragmaxim-com/chain-syncer)
It uses tiny `block_height/tx_index/utxo_index/[asset_index]` dictionary pointers to big hashes, ie. not a single hash is duplicated,
which allows for much better space efficiency and syncing speed with local node and an SSD.
Chain tip is "eventually consistent" through fork competition, ie. forks get settled eventually and superseded forks are deleted from DB.
### Installation (Debian/Ubuntu)
```
sudo apt-get install rustup
```
### Usage
Run bitcoin node locally, rpc at port 8332 can be changed in `config/bitcoin.toml`, for example:
```
cat ~/snap/bitcoin-core/common/.bitcoin/bitcoin.conf | grep rpc
rpcthreads=40
rpcworkqueue=512
rpcuser=foo
rpcpassword=bar
rpcallowip=10.0.1.0/24
rpcport=8332
rpcbind=0.0.0.0
bitcoin-core.daemon -daemon
```
Then check if node is running and synced:
```
bitcoin-core.cli getblockchaininfo
tail -f ~/snap/bitcoin-core/common/.bitcoin/debug.log
```
export secrets or set them in `.env` file :
```
export BITCOIN__API_USERNAME="foo"
export BITCOIN__API_PASSWORD="bar"
```
Then :
```
cargo run
```
Indexing might crash especially on laptops with Node running locally and not being synced yet.
In that case, set `fetching_parallelism = "low"` to not put the Node and Laptop under heavy pressure.
### Rest API
http://localhost:8000/swagger-ui/
Querying currently times out during historical indexing. So use it only at the chain tip sync phase
or when indexing is disabled `indexer.enable = false` and we only run http server to query over existing data.
### UI
See [redbit-ui](https://github.com/pragmaxim-com/redbit-ui)