Skip to content

5/5: Tests and changelogs for External-IVK-only scanning#18

Closed
czarcas7ic wants to merge 1 commit into
adam/memory-backend-enhancementfrom
adam/external-ivk-scan-tests
Closed

5/5: Tests and changelogs for External-IVK-only scanning#18
czarcas7ic wants to merge 1 commit into
adam/memory-backend-enhancementfrom
adam/external-ivk-scan-tests

Conversation

@czarcas7ic
Copy link
Copy Markdown

@czarcas7ic czarcas7ic commented Apr 10, 2026

Summary

  • Add TestState::enhance_transaction() and service_enhancement_requests() helpers that mirror the production enhancement pipeline more closely
  • Store raw transaction bytes in TestState so serviceable enhancement requests are replayed from a production-like raw-transaction source instead of depending on wallet-visible raw state
  • Tighten service_enhancement_requests() so it fails on missing raw bytes for serviceable enhancement work and detects stabilized serviceable queues, while still tolerating compact-only enhancement requests that the harness cannot reconstruct
  • Tighten enhance_transaction() so bundle positions are only derived when the tx is actually present in the cached compact block; otherwise it degrades or fails cleanly instead of fabricating TxBundlePositions
  • Rewrite change-note tests to create Internal-scope notes via real spend + enhancement instead of direct injection
  • Tighten the ZIP 315 confirmation-policy assertions and the v_transactions_hides_unenhanced_txs funding-transaction check
  • Add enhancement_cascade_survives_pruning, v_transactions_hides_unenhanced_txs, and pruning_wipes_late_discovered_spend_locator tests
  • Update existing tests to call service_enhancement_requests() after generating blocks

Context

This is PR 5/5 — tests proving the full system works end-to-end. The changelog ownership was pushed down into the earlier branches during the fix round, so this final slice is now focused on test harness fidelity and end-to-end regressions.

Full stack:

  1. adam/enriched-decrypted-output — API foundations
  2. adam/sync-enhancement-pipeline — Core behavioral change
  3. adam/sqlite-enhancement-support — SQLite backend implementation
  4. adam/memory-backend-enhancement — Memory backend implementation
  5. This PR — End-to-end tests

Review focus

  • enhance_transaction() helper fidelity relative to the production store_raw_transaction path
  • The raw-transaction registry used by service_enhancement_requests() and how it distinguishes serviceable enhancement requests from compact-only ones
  • The tightened ZIP 315 and transaction-history assertions, especially on the SQLite backend

Test plan

  • cargo check -p zcash_client_backend --all-features
  • cargo test -p zcash_client_sqlite --features "sync orchard" can_spend_inputs_by_confirmations_policy
  • cargo test -p zcash_client_sqlite --features "sync orchard" v_transactions_hides_unenhanced_txs
  • cargo test -p zcash_client_sqlite --features "sync orchard" enhancement_cascade_survives_pruning
  • cargo test -p zcash_client_memory --all-features

@czarcas7ic czarcas7ic force-pushed the adam/memory-backend-enhancement branch from 4d1cac0 to 672d9e2 Compare April 10, 2026 00:10
@czarcas7ic czarcas7ic force-pushed the adam/external-ivk-scan-tests branch from 24f69e7 to f064551 Compare April 10, 2026 00:10
@czarcas7ic czarcas7ic force-pushed the adam/memory-backend-enhancement branch from 672d9e2 to efed8ea Compare April 10, 2026 00:15
@czarcas7ic czarcas7ic force-pushed the adam/external-ivk-scan-tests branch 2 times, most recently from d804c36 to 85a3f9f Compare April 10, 2026 00:26
@czarcas7ic czarcas7ic force-pushed the adam/memory-backend-enhancement branch 2 times, most recently from ffa0e46 to 24eaddb Compare April 10, 2026 00:52
@czarcas7ic czarcas7ic force-pushed the adam/external-ivk-scan-tests branch from 85a3f9f to e4776e2 Compare April 10, 2026 00:52
@czarcas7ic czarcas7ic force-pushed the adam/memory-backend-enhancement branch from 24eaddb to a3894d5 Compare April 10, 2026 00:55
@czarcas7ic czarcas7ic force-pushed the adam/external-ivk-scan-tests branch from e4776e2 to b78d82c Compare April 10, 2026 00:55
@czarcas7ic czarcas7ic force-pushed the adam/memory-backend-enhancement branch from 473bc4e to ec7a7d5 Compare April 10, 2026 02:28
@czarcas7ic czarcas7ic force-pushed the adam/external-ivk-scan-tests branch from 338e586 to 83ecd1c Compare April 10, 2026 02:28
@czarcas7ic czarcas7ic force-pushed the adam/memory-backend-enhancement branch from ec7a7d5 to d9afb68 Compare April 10, 2026 03:19
@czarcas7ic czarcas7ic force-pushed the adam/external-ivk-scan-tests branch 2 times, most recently from f5be9f0 to d649179 Compare April 10, 2026 03:48
@czarcas7ic czarcas7ic force-pushed the adam/memory-backend-enhancement branch from be777ea to 8f4571d Compare April 10, 2026 04:36
@czarcas7ic czarcas7ic force-pushed the adam/external-ivk-scan-tests branch from d649179 to aaa5506 Compare April 10, 2026 04:36
@czarcas7ic czarcas7ic force-pushed the adam/memory-backend-enhancement branch from 8f4571d to 30cfe08 Compare April 10, 2026 07:06
@czarcas7ic czarcas7ic force-pushed the adam/external-ivk-scan-tests branch 2 times, most recently from 77ea983 to 47544c5 Compare April 10, 2026 16:32
@czarcas7ic czarcas7ic force-pushed the adam/memory-backend-enhancement branch from 30cfe08 to 50464a2 Compare April 10, 2026 16:32
Switch scan_cached_blocks to External-only IVKs, halving key-agreement
work. Change notes are recovered via enhancement. Includes conditional
nullifier pruning in scan_cached_blocks and comprehensive test rewrites.

Co-Authored-By: Claude <noreply@anthropic.com>
@czarcas7ic czarcas7ic force-pushed the adam/memory-backend-enhancement branch from 50464a2 to 8975f37 Compare April 15, 2026 17:17
@czarcas7ic czarcas7ic force-pushed the adam/external-ivk-scan-tests branch from 47544c5 to abaff6d Compare April 15, 2026 17:17
@czarcas7ic czarcas7ic closed this Apr 16, 2026
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