Skip to content

feat(zcash): add blocks list and block detail pages - #408

Merged
MatiasOS merged 6 commits into
issue-398-zcash-dashboardfrom
issue-398-zcash-blocks
Nov 21, 2026
Merged

MatiasOS merged 6 commits into
issue-398-zcash-dashboardfrom
issue-398-zcash-blocks

Conversation

@MatiasOS

@MatiasOS MatiasOS commented Sep 14, 2026 •

Copy link
Copy Markdown
Member

Description

Adds the Zcash blocks list (/zec/blocks) and block detail (/zec/block/:filter) pages, plus their tzec equivalents.

  • Blocks list: costs one getblock call per block. Rows fill in as each call returns, so the page stays usable on rate-limited gateways. Pagination uses ?fromBlock, the same as Bitcoin.
  • Block page: everything comes from a single getblock(height, 2) call. It shows:
    • Zcash-specific header fields: the hex nonce, the Equihash solution, block commitments, the final Sapling and Orchard roots, and note commitment tree sizes (including Ironwood).
    • Coinbase outputs.
    • The number of shielded transactions in each pool.
    • The value pools after this block.

Related Issue

Part of #398. Stacked on #407.

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Refactoring
  • Performance improvement
  • Other (please describe):

Changes Made

  • ZcashBlocksPage, ZcashBlockPage and ZcashBlockDisplay.
  • ZcashValuePools now takes the pools directly, so the block page can reuse it.
  • Routes and lazy exports for zec|tzec/blocks and zec|tzec/block/:filter.
  • zcash locale strings and tooltips.zcash.block in all 5 locales.
  • Styles for the pool chips, coinbase outputs and the Equihash solution row.
  • A hermetic e2e spec at e2e/tests/shared/mocked/zcash-blocks.spec.ts.

Screenshots (if applicable)

Checked locally against mocked RPC data at desktop width and at 400px.

Checklist

  • I have run npm run format:fix and npm run lint:fix
  • I have run npm run typecheck with no errors
  • I have run tests with npm run test:run
  • I have tested my changes locally
  • I have updated documentation if needed
  • My code follows the project's architecture patterns

Additional Notes

  • There are no per-block fee totals. Zebra doesn't return transparent input values, so a block total would need a lookup for every input. Per-transaction fees are handled on the transaction page, in the next PR.
  • The coinbase address, transaction and address links point to pages that later PRs in the stack add.
  • In dev, React StrictMode can send the block request twice. The e2e spec therefore checks which blocks are requested rather than how many requests are made.
  • Tests (before the review follow-up):
    • npm run test:run: 150 passing.
    • Hermetic Zcash e2e specs (dashboard and blocks): 4 passing.

Review follow-up

  • Block Reward adds the shielded coinbase value, so a block mined to a Sapling or Orchard address no longer shows only the funding streams.
  • Blocks list. One streamed summaries call; it aborts on page or network change, and blocks that fail are listed with a Retry instead of disappearing.
  • Block details reuse FieldLabel (which honours the knowledge level), LongString for the Equihash solution, the shared pool chip and the typed label keys.
  • Caching. The tip block is no longer cached (its next-block link and confirmations still change). Cached blocks show their confirmations as a lower bound ("N+").
  • Loader. LoaderWithTimeout is localized (it had hardcoded English). Zcash pages wait out the rate-limit retry window (50s), and Retry re-runs the fetch instead of reloading the page.
  • Plural forms for confirmations, transaction counts and the page summary.
  • E2E: a pre-NU5 block without Orchard fields, paging down to genesis, and a failed block retried.

Tests after the follow-up

  • npm run test:run: 198 passing.
  • Hermetic Zcash e2e specs at this PR: 9 passed, no retries.

@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

🚀 Preview: https://pr-408--openscan.netlify.app
📝 Commit: 074300ac4ef2a15c345a4b6b88c145c7f9399b8f

Block details come from a single getblock call and surface Zcash header fields (hex nonce, Equihash solution, commitment roots, note commitment tree sizes), coinbase outputs, per-pool shielded transaction counts and value pools after the block.
- Block Reward adds the shielded coinbase value, so blocks mined to a
  Sapling or Orchard address no longer show only funding streams.
- The blocks list makes one streamed summaries call, aborts on page or
  network change, and lists blocks that fail as rows with a retry.
- Block details reuse FieldLabel (honouring the knowledge level),
  LongString for the Equihash solution, the shared pool chip and the
  typed pool label keys.
- The tip block is no longer cached; cached blocks show their
  confirmations as a lower bound ("N+").
- The loader waits out the rate-limit retry window and its Retry
  re-runs the fetch instead of reloading the page.
- Plural forms for confirmations, transaction counts and the page
  summary.
- E2E: a pre-NU5 block, paging to genesis, and a failed block retried.
@MatiasOS
MatiasOS force-pushed the issue-398-zcash-blocks branch from 401591d to 074300a Compare November 20, 2026 23:44
@MatiasOS
MatiasOS merged commit 7ae49ff into dev Nov 21, 2026
7 checks passed
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.

1 participant