https://github.com/jmcph4/blocktop
A minimalist TUI block explorer for Ethereum networks
https://github.com/jmcph4/blocktop
block-explorer blockchain blockchain-indexer blockchain-indexing ethereum rust-ethereum sqlite tui
Last synced: about 1 month ago
JSON representation
A minimalist TUI block explorer for Ethereum networks
- Host: GitHub
- URL: https://github.com/jmcph4/blocktop
- Owner: jmcph4
- License: mit
- Created: 2025-01-01T01:28:01.000Z (5 months ago)
- Default Branch: master
- Last Pushed: 2025-03-06T00:07:33.000Z (3 months ago)
- Last Synced: 2025-04-13T21:38:59.884Z (about 2 months ago)
- Topics: block-explorer, blockchain, blockchain-indexer, blockchain-indexing, ethereum, rust-ethereum, sqlite, tui
- Language: Rust
- Homepage:
- Size: 1.91 MB
- Stars: 16
- Watchers: 1
- Forks: 1
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Codeowners: CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
README
# blocktop #
[](https://asciinema.org/a/698693)
Minimalist TUI block explorer for Ethereum networks.
- Gain rapid insights into chain health by viewing new canonical blocks live in a visually clear, low-latency manner
- Drill down into specific details of individual blocks and transactions
- Store chain data to a relational schema using a simple, open formatSee [FUNCTIONALITY](docs/FUNCTIONALITY.md) for the full feature list.
## Installation ##
```
$ cargo install blocktop
```**Note**: `blocktop` is alpha software is is not stable yet.
## Usage ##
```
A minimalist TUI block explorer for Ethereum blockchainsUsage: blocktop [OPTIONS]
Options:
-r, --rpc [default: wss://eth.merkle.io]
-d, --db
--headless
--list-block-hashes
-h, --help Print help
-V, --version Print version
```At the moment, `blocktop` only supports Websockets or Unix domain sockets as transports for RPC communication. `blocktop` makes use of the [free Ethereum RPC service provided by Merkle](https://merkle.io/free-eth-rpc) by default.
### TUI Mode ###
The default invocation (i.e., `blocktop`) will open the TUI and start retrieving data from the default Ethereum RPC node using an in-memory SQLite database.

#### Controls ####
| Key | Action |
| --- | --- |
| `j`, `k`, `Up`, `Down` | Scrolls lists |
| `e` | In block or transaction view, opens the block or transaction in [Etherscan](https://etherscan.io), respectively |
| `q`, `Ctrl+c` | Exits the application |
| `Esc` | Returns to the previous page or exits the application if on the main page |
| `r` | Toggles the address display mode (i.e., labelled or raw) |
| `l` | In block view, opens the block in [libMEV](https://libmev.com) |### Headless Mode ###
To invoke solely the indexer without the TUI frontend, specify the `--headless` flag. This mode is the most useful with the `RUST_LOG` environment variable configured to `info`:
```
$ RUST_LOG=info blocktop --headless
2025-01-15T05:13:06.017Z INFO blocktop::client > Websockets client initialised (endpoint: wss://eth.merkle.io/, chain: 1)
2025-01-15T05:13:06.806Z INFO blocktop::db > Wrote block 0x2d21b100f838bb2656bcd0599cbdc30048d6d1a694581c6ec781e8f58961c729 to the database
2025-01-15T05:13:08.077Z INFO blocktop::client > Websockets client initialised (endpoint: wss://eth.merkle.io/, chain: 1)
2025-01-15T05:13:19.203Z INFO blocktop::db > Wrote block 0x5850d0c1ba90da1cfe682ad29a727b841038ead07e198477869550cbb387f053 to the database
2025-01-15T05:13:26.187Z INFO blocktop::db > Wrote block 0x52a43747e20465e7407ccba6915a027457220e06399ab992409b3ace66e40301 to the database
2025-01-15T05:13:39.812Z INFO blocktop::db > Wrote block 0xf31df89a9277295916f714d78a3ccf708826951a7a6e0ac40563b18a51d14f76 to the database
```As the warning-level log line at the start of the output indicates, headless operation also benefits from specifying an on-disk database to save chain state to:
```
$ RUST_LOG=info blocktop --headless --db foobar.db
```