Skip to content

Align CompactTxStreamer responses with lightwalletd#1067

Open
pacu wants to merge 3 commits intozingolabs:devfrom
pacu:lightwalletd-compact-block-parity
Open

Align CompactTxStreamer responses with lightwalletd#1067
pacu wants to merge 3 commits intozingolabs:devfrom
pacu:lightwalletd-compact-block-parity

Conversation

@pacu
Copy link
Copy Markdown
Contributor

@pacu pacu commented Apr 27, 2026

Note: this is a draft PR since the protoVersion part is yet to be defined.

Fixes:

Summary

Align Zaino CompactTxStreamer compact block responses with lightwalletd for the fields covered by the strict integration-tests gRPC comparison suite.

This PR:

  • returns all pool data for single-block GetBlock responses
  • matches lightwalletd protoVersion values in compact blocks
  • clears transparent vin/vout in GetBlockNullifiers
  • delegates tree-state lookups to the backing validator
  • falls back to the backing validator when a serviceable recent compact block is absent from the local non-finalized snapshot/finalized DB

Verification

  • cargo build --release --bin zainod
  • timeout 600s uv run ./qa/zcash/grpc_comparison_tests.py from zcash/integration-tests

Closes #1066

@pacu pacu requested a review from idky137 April 27, 2026 17:54
@pacu pacu marked this pull request as ready for review April 28, 2026 17:53
@pacu pacu force-pushed the lightwalletd-compact-block-parity branch from c5b27c8 to 88899ec Compare April 28, 2026 18:36
pacu added 3 commits April 28, 2026 15:37
Align Zaino's CompactTxStreamer responses with lightwalletd for single-block lookups.

GetBlock and GetBlockNullifiers now request all pool data, compact blocks use lightwalletd's protoVersion value, nullifier responses clear transparent inputs and outputs, and tree-state RPCs are delegated to the backing validator so they are not limited by the local cache view.
Teach the chain index to reconstruct compact blocks from the backing validator when a serviceable non-finalized height is absent from the local snapshot/finalized DB.

This matches lightwalletd's validator-backed behavior for recently loaded chains and prevents GetBlock/GetBlockRange from reporting database holes while Zaino's local cache is still catching up.
Restore local chain-index tree-state lookup as the primary path, and only fall back to the backing validator when the local data cannot serve the request.

This keeps Zaino's local-data semantics while preserving the boot/cache-miss behavior needed for lightwalletd parity in the gRPC comparison test.
@pacu pacu force-pushed the lightwalletd-compact-block-parity branch from 88899ec to e09ff2e Compare April 28, 2026 18:37
@pacu
Copy link
Copy Markdown
Contributor Author

pacu commented Apr 28, 2026

This branch succeeds against this branch of integration tests zcash/integration-tests#84

@zancas
Copy link
Copy Markdown
Member

zancas commented Apr 28, 2026

Can you please run:

makers container-test && makers integration-test --profile stable

There might be flakes that need more than one run in the integration tests.. stable.....

@pacu
Copy link
Copy Markdown
Contributor Author

pacu commented Apr 28, 2026

Can you please run:

makers container-test && makers integration-test --profile stable

There might be flakes that need more than one run in the integration tests.. stable.....

I found some errors within the containerized setup which I'm fixing

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.

Align Zaino CompactTxStreamer responses with lightwalletd

2 participants