Giter VIP home page Giter VIP logo

fbbe's Introduction

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

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

fbbe's People

Contributors

rcasatta avatar st3b1t avatar smartm0use avatar

Stargazers

Massimiliano avatar Inline Assembly avatar ordinalOS avatar Bro Cyclone avatar Nicolas Marshall avatar s1cs avatar Sitt Guruvanich avatar Daki Carnhof avatar  avatar Giovanni avatar ⚡️2FakTor⚡️ avatar  avatar Stone Gao avatar  avatar Manuel Polo avatar thunderbiscuit avatar  avatar  avatar Alessandro Arnodo avatar Stefano Pellegrini avatar Darío Clavijo avatar Yuki Kishimoto avatar Fanis Michalakis avatar Javed Khan avatar @RandyMcMillan avatar Daniela Brozzoni avatar Jean Lucas avatar Roman Zeyde avatar

Watchers

 avatar Kostas Georgiou avatar  avatar Daki Carnhof avatar

fbbe's Issues

bitcoind url by environment var

it would be extremely useful for various types of integration to be able to define bitcoind host/port with an environment variable
example: BITCOIND_REST_URL=http://192.168.1.2:8332/rest

Human-readable hashes

Hi! Here is an idea of how it could look like.

0000 0000 0000 0000
0000 0abf 4866 8496
2860 c537 850b 5750
0680 46fd 7460 956c

In HTML one would generate different span elements so that CSS adds spaces and line breaks, but on select&copy it behaves like it was - a full line of SHA256 hash.

For an example in POSIX shell, see http://anyone.eu.org/bitcoin.txt where also zeroes are transcoded to dots.

Fake address page

url /a
just check it's right for the network
maybe show address qrcode
explain why it doesn't show txs
maybe link to other block explorers?

redirect /a -> /address

Full rbf

Use full rbf bitcoin node so that replaced tx are seen

Purging tx from mempool fee rate

From node Mempool min fee (BTC) it's difficult to understand which is the fee in sat/vb where the node is purging transaction, add also/instead this measure

Usd value at transaction time

Without dealing with external data source, it's possible to estimate the bitcoin price at past dates using the algorithm powering
https://utxo.live/oracle/

Would be nice to use it to show USD value of outputs at the date of the transaction

Attempting to run locally on regtest

Hey Riccardo! This looks like a cool explorer. I figured I'd give it a go locally to see if I can use it when doing small local testing of different things.

Not sure why but it hangs for me with the following message: bitcoind is still loading, waiting...

My bitcoin daemon is definitely up and running (I can mine blocks and whatnot). Let me know if you have any idea what the problem could be!

fbbe on  master is 📦 v0.1.3 via 🦀 v1.64.0
❯ cargo run -- --network regtest
    Finished dev [unoptimized + debuginfo] target(s) in 0.10s
     Running `target/debug/fbbe --network regtest`
[2023-01-18T01:27:17Z INFO  fbbe::globals] networks [Regtest]
[2023-01-18T01:27:17Z INFO  fbbe::globals] bitcoind_addr 127.0.0.1:18443
[2023-01-18T01:27:17Z WARN  fbbe] bitcoind is still loading, waiting...
[2023-01-18T01:27:27Z WARN  fbbe] bitcoind is still loading, waiting...
[2023-01-18T01:27:37Z WARN  fbbe] bitcoind is still loading, waiting...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.