← All work

Open-source adaptation · 2022 to 2023

Adapting a Bitcoin explorer to a different blockchain.

stxmempool started from mempool.space, an open-source explorer built around Bitcoin. I worked for the recipient of a Stacks ecosystem grant and was, in practice, the only engineer on the Stacks-specific work.

Role
Implementation engineer for the Stacks-specific work
Engagement
Paid project through WDD4 Services
Status
Completed as paid grant work

The problem

Stacks differs from Bitcoin in ways that go deeper than changing API endpoints: other transaction types, its own address format, a different execution-cost model, and less information available in the mempool.

What I did

  1. Studied a large, mature codebase well enough to change its frontend, backend, data processing and visualizations without breaking what already worked.
  2. Fetched the extra information confirmed transactions carry, because the mempool alone did not have it.
  3. Batched requests to stay inside the API's rate limits.

What I built

  1. Stacks-specific retrieval and processing of blockchain and mempool data, historical block indexing, persistence, REST endpoints and WebSocket updates.
  2. Projected-block data and handling of blockchain reorganizations.
  3. Explorer views for blocks, transactions, addresses, the mempool and projected blocks, with WebGL and ECharts visualizations, including one for the several dimensions of Stacks execution costs.

Where it stands

~15,000lines added over the upstream fork
~145files changed
1engineer on the Stacks-specific work

The project was completed as paid grant-related work. More ambitious experiments around mining and projected-block prediction were explored and not finished as production features.

I was not an employee of Stacks; I worked for the grant recipient.

Stack

  • TypeScript
  • Node.js
  • Angular
  • RxJS
  • Express
  • WebSockets
  • MariaDB
  • Stacks and Hiro APIs
  • Bitcoin Core RPC
  • ECharts
  • WebGL

Tell me what's still being done by hand.

A 30-minute call. No pitch deck. Bring the spreadsheet, and we'll start with why.

Book a call