8 releases

0.1.7 Apr 6, 2024
0.1.6 Aug 24, 2023
0.1.5 May 23, 2023
0.1.4 Jan 20, 2023

#7 in #testnet

Download history 23/week @ 2024-07-01

365 downloads per month

MIT license

280KB
4K SLoC

Fast Bitcoin Block Explorer

A light Bitcoin block explorer without address indexing, using only a bitcoin core instance without RPC credentials (unauthenticated REST interface).

Runs live on mainnet, testnet and signet @ http://fbbe.info

Locally can run on regtest.

Running locally

Supposing to have rust installed >= 1.66.0 and a synced bitcoin core on mainnet with txindex=1 and rest=1 do:

git clone https://github.com/RCasatta/fbbe
cd fbbe
cargo run --release

browse: http://localhost:3000/

CSS

After changing custom.css use a minifier:

yui-compressor custom.css > custom.min.css.rs

Docker

There are 2 ways to build and run with docker, the standard way with a Dockerfile is easier but produce a bigger docker image, the second one produce a smaller image but requires nix.

with Dockerfile

docker build . -f ./docker/Dockerfile -t fbbe
docker run -it -p 3000:3000 -e BITCOIND_ADDR=172.17.0.1:8332 -e LOCAL_ADDR=0.0.0.0:3000 fbbe

with Nix

nix --experimental-features 'nix-command flakes' build .#dockerImage
./result | docker load
docker run -it -p 3000:3000 -e BITCOIND_ADDR=172.17.0.1:8332 -e LOCAL_ADDR=0.0.0.0:3000 xenoky/fbbe:latest

Mainnet test cases

  • Block with most tx 00000000000000001080e6de32add416cd6cda29f35ec9bce694fea4b964c7be

  • max inputs per tx 52539a56b1eb890504b775171923430f0355eb836a57134ba598170a2f8980c1

  • max outputs per tx dd9f6bbf80ab36b722ca95d93268667a3ea6938288e0d4cf0e7d2e28a7a91ab3

Memory tracking

To allow running the explorer on low-resource devices the memory usage must be kept low.

Heaptrack

Better results with debug symbols even in release mode, if not already specified in Cargo.toml use env var CARGO_PROFILE_RELEASE_DEBUG=true.

heaptrack works by tracking memory management syscall, after installing the tool use:

cargo build --release
timeout 10m heaptrack ./target/release/fbbe # in this example the tracker runs for 10 minutes
heaptrack_gui heaptrack.fbbe.105581.zst # file created by the previous command

Dependencies

~59MB
~1M SLoC