Skip to content

feat(zcash): add transaction pages with shielded bundles and fee lookup - #409

Merged
MatiasOS merged 4 commits into
issue-398-zcash-blocksfrom
issue-398-zcash-transactions
Nov 21, 2026
Merged

MatiasOS merged 4 commits into
issue-398-zcash-blocksfrom
issue-398-zcash-transactions

Conversation

@MatiasOS

@MatiasOS MatiasOS commented Sep 14, 2026 •

Copy link
Copy Markdown
Member

Description

Adds the Zcash transactions list (/zec/txs) and transaction detail (/zec/tx/:filter) pages, plus their tzec equivalents.

The transaction page handles three things that make Zcash different from Bitcoin:

  • Shielded bundles: Sapling spends and outputs, Orchard and Ironwood actions, and Sprout JoinSplits. Each bundle shows which way its value balance moved.
  • Fully shielded transactions: when vin and vout are both empty, the page explains that amounts and parties are encrypted. It doesn't render empty input and output columns.
  • Fees: computed from the transparent value balance: inputs, plus value leaving the shielded pools, minus outputs.
    • Zebra doesn't return the values of transparent inputs.
    • For transactions with transparent inputs, a "Look up input values" button fetches the previous transactions on demand, up to 10.

The transactions list pages client-side within a single block, which costs one getblock call. Newer/older block navigation works out the chain tip from the block's confirmations, so it needs no extra call.

Related Issue

Part of #398. Stacked on #408.

Type of Change

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

Changes Made

  • New components: ZcashTransactionsPage, ZcashTransactionPage, ZcashTransactionDisplay and ZcashShieldedBundles.
  • A countPreviousTransactions util, with a unit test.
  • A shared labels.ts holding the typed i18n keys for pools and transaction kinds. The existing dashboard and block components now use it too.
  • Routes and lazy exports for zec|tzec/txs and zec|tzec/tx/:filter.
  • zcash locale strings and tooltips.zcash.tx in all 5 locales.
  • A hermetic e2e spec at e2e/tests/shared/mocked/zcash-transactions.spec.ts. The shared RPC mock now also serves transactions:
    • a synthetic transparent transaction
    • previous transactions for input lookups

Screenshots (if applicable)

Checked locally against mocked RPC data:

  • a fully shielded transaction
  • a transparent transaction after its input lookup
  • the capped shielding transaction
  • the transactions list
  • a 400px-wide layout

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

  • Fees on real mainnet transactions:
    • 36a167f6…, which is Ironwood only: 0.0001 ZEC.
    • c973d2f1…, which uses Sapling and Ironwood: 0.0002 ZEC.
    • 717b54c3… has 15 transparent inputs, so the lookup stops at 10 and the page says so.
  • Caching: when the persistent cache is enabled, resolved input values are cached with a confirmed transaction. A later visit shows the fee without new lookups.
  • Tests (before the review follow-up):
    • npm run test:run: 151 passing.
    • Hermetic Zcash e2e specs: 9 passing.

Review follow-up

  • Input lookups stay on their transaction. The lookup is aborted when the page moves to another transaction and its late results are dropped. Before, starting a lookup and following an input link brought the old transaction back when the lookup finished.
  • Resume. A failed lookup keeps the inputs it resolved; the fee row says how far it got, and Retry resumes.
  • Over the lookup cap no lookup is offered: it couldn't complete the fee and would spend ten calls.
  • Caching. Transactions are cached once 100 blocks deep; cached confirmations show as "N+".
  • Fees use the coinbase | unknown | known result. The kind badge, pool chips, output value and skeletons come from the shared cells; the label-key refactor that was here moved down to feat(network): add Zcash network dashboard #407 and feat(zcash): add blocks list and block detail pages #408.
  • Plural forms for confirmations, JoinSplits, actions and inputs.
  • E2E: coinbase, Sprout and Orchard-deshielding pages, a definitive answer next to a rate-limited endpoint, and a lookup that finishes after navigating away.

Tests after the follow-up

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

@MatiasOS
MatiasOS added this pull request to stack #414 September 15, 2026 00:17
@MatiasOS
MatiasOS force-pushed the issue-398-zcash-transactions branch from 1197a6b to 101c623 Compare November 20, 2026 22:11
@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

🚀 Preview: https://pr-409--openscan.netlify.app
📝 Commit: dcbff1d1d3b1064593efd25c01d7f0d4a9e29763

Fully shielded transactions explain that amounts are encrypted instead of rendering empty input and output columns. Fees come from value balances; transparent input values, which Zebra omits, are looked up on demand for at most 10 previous transactions.
- The input lookup is aborted when the page moves to another
  transaction, and its late results are dropped, so it can no longer
  bring the previous transaction back.
- A failed lookup keeps the inputs it resolved; Retry resumes from them
  and the fee row says how far it got.
- Over the lookup cap no lookup is offered: it couldn't complete the
  fee and would spend ten calls on a rate-limited gateway.
- Transactions are cached only once 100 blocks deep; cached
  confirmations show as a lower bound ("N+").
- Fees use the coinbase | unknown | known result; the kind badge, pool
  chips, output value and skeletons come from the shared cells.
- Pages read their network from useZcashNetworkFromPath, abort on
  navigation, and the loader retry re-runs the fetch.
- Plural forms for confirmations, JoinSplits, actions and inputs.
- E2E: coinbase, Sprout, Orchard deshielding, a definitive answer next
  to a rate-limited endpoint, and a lookup that finishes late.
@MatiasOS
MatiasOS force-pushed the issue-398-zcash-transactions branch from 101c623 to dcbff1d Compare November 20, 2026 23:44
@MatiasOS MatiasOS mentioned this pull request Nov 20, 2026
8 of 12 tasks
@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