Skip to content

feat: Explorer tab with block browser and mempool browsing#16

Draft
ajtowns wants to merge 3 commits into
janb84:mainfrom
ajtowns:202603-explorer
Draft

feat: Explorer tab with block browser and mempool browsing#16
ajtowns wants to merge 3 commits into
janb84:mainfrom
ajtowns:202603-explorer

Conversation

@ajtowns
Copy link
Copy Markdown
Contributor

@ajtowns ajtowns commented Mar 21, 2026

Converts the "mempool" tab into a "block explorer" tab, with the ability to browse transactions in blocks and the mempool.

(Heavily vibecoded)

@ajtowns ajtowns force-pushed the 202603-explorer branch 3 times, most recently from 57630ad to c716b31 Compare March 22, 2026 05:57
@ajtowns
Copy link
Copy Markdown
Contributor Author

ajtowns commented Mar 23, 2026

(Querying the full mempool and blocks at verbosity level 3 for fee info can be slow. Performance seemed fine to me, but might warrant some consideration)

ajtowns added 3 commits March 24, 2026 14:19
When fetching the coinbase for a block, specify the blockhash so it
doesn't need txindex to identify a miner.
Extend TxSearchState with a per-block transaction list (TxListEntry)
and a mempool flag.

Add perform_block_search() using getblock verbosity 3 to fetch full tx
objects with prevout values, enabling fee calculation without extra RPC
calls.

Add perform_mempool_search() using verbose getrawmempool, with cluster
mempool chunk feerate support and sorting by mining priority.

Also accept an optional blockhash hint in perform_tx_search() so
confirmed tx lookups work without txindex, and bump sat/vB display
precision from 1 to 2 decimal places.
Rename the Mempool tab to Explorer and add an interactive block/mempool
browser with three panes:

 1. Block selector: a "Mempool" column alongside the existing
    animated recent-block columns. Left/Right navigates, Down focuses.
 2. Summary pane: mempool stats when the mempool column is selected,
    or full block details (hash, time, difficulty, miner, etc.) when
    a block is selected.
 3. Transaction list: scrollable list of txs sorted by feerate (for
    mempool) or in block order. Shows index, feerate (sat/vB), and
    txid. Up/Down navigates, Enter drills down into the existing tx
    overlay, PageUp/PageDown for fast scrolling.

Mempool data auto-refreshes every 30 seconds while browsing, with
selection preservation across refreshes. Block data is fetched on
demand and cached.
@ajtowns
Copy link
Copy Markdown
Contributor Author

ajtowns commented Mar 24, 2026

Rebased. Add a commit so miner field gets populated for searched blocks even without txindex.

@janb84
Copy link
Copy Markdown
Owner

janb84 commented Mar 24, 2026

To be honest, i'm kinda torn about this one. I really like certain aspects but it's also a lot of information.

I would like to push back this change for when we have config file (to not completely replace the mempool tab).

@ajtowns
Copy link
Copy Markdown
Contributor Author

ajtowns commented Mar 25, 2026

Could have an "advanced" mode toggle that makes more information available, and when it's off, just show the mempool summary, blocks animation thing, no individual transactions, and not allow navigating?

Could also look at things like bitcoin/bitcoin#8550 (which proposed a graph of mempool size/minfee over time) or just having a graph of the mempool current feerate diagram (getmempoolfeeratediagram), which might imply having separate tabs for mempool info vs recent block info.

@ajtowns ajtowns marked this pull request as draft April 9, 2026 16:30
@ajtowns
Copy link
Copy Markdown
Contributor Author

ajtowns commented Apr 9, 2026

I would like to push back this change for when we have config file (to not completely replace the mempool tab).

Presumably this should become a lua-based tab; if the ability to do (a) display the blocks graph, (b) select blocks, (c) display a summary vs a table; and (d) select txs and pop up an overlay window were exposed to lua.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants