Skip to content

Align CompactTxStreamer responses with lightwalletd#1067

Merged
pacu merged 8 commits into
zingolabs:devfrom
pacu:lightwalletd-compact-block-parity
May 28, 2026
Merged

Align CompactTxStreamer responses with lightwalletd#1067
pacu merged 8 commits into
zingolabs:devfrom
pacu:lightwalletd-compact-block-parity

Conversation

@pacu

@pacu pacu commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

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

pacu commented Apr 28, 2026

Copy link
Copy Markdown
Contributor Author

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

@zancas

zancas commented Apr 28, 2026

Copy link
Copy Markdown
Member

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

pacu commented Apr 28, 2026

Copy link
Copy Markdown
Contributor Author

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

Comment thread packages/zaino-state/src/chain_index.rs
@zancas
zancas self-requested a review May 26, 2026 17:48
idky137
idky137 previously approved these changes May 27, 2026
@pacu
pacu requested review from AloeareV and idky137 May 27, 2026 17:51
@pacu
pacu merged commit f5e031e into zingolabs:dev May 28, 2026
3 of 4 checks passed
zancas added a commit that referenced this pull request Jun 18, 2026
… split

Bump the three crates that changed since 0.3.1 but were never re-versioned: zaino-common 0.1.1->0.2.0, zaino-proto 0.1.1->0.1.2, zaino-serve 0.2.0->0.3.0.

Promote each crate's Unreleased changelog to a dated 2026-06-17 release section and fill gaps: NU6.2 support (zaino-common, zaino-fetch, root), the zaino-serve JSON-RPC handlers plus breaking trait/spawn changes, the zaino-proto compact-block vin/vout parity fix (#1067), and the get_address_utxos fan-out bound (#974).

Untangle the root CHANGELOG into three distinct lineages: move the lightwallet wire-protocol history (v0.1.0..v0.4.0) to packages/zaino-proto/lightwallet-protocol/CHANGELOG.md, lift stray zaino_fetch crate deprecations into the workspace 0.2.0 entry, backfill the missing workspace 0.3.0 and 0.3.1 root entries, and normalize the root lineage to v-less tags.

Also includes a cargo-fmt-only reformat of transparent_address_history.rs (line-wrapping, no logic change).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
zancas added a commit that referenced this pull request Jun 18, 2026
… split

Bump the three crates that changed since 0.3.1 but were never re-versioned: zaino-common 0.1.1->0.2.0, zaino-proto 0.1.1->0.1.2, zaino-serve 0.2.0->0.3.0. zaino-common is a minor (not patch) bump because the new public ActivationHeights::nu6_2 field is breaking for struct-literal construction of the non-#[non_exhaustive] struct, mirroring the 0.3.0 ZainodConfig.donation_address precedent; the changelog marks it Breaking.

Keep the version sources in sync: update the root [workspace.dependencies] pins (zaino-common 0.2.0, zaino-proto 0.1.2, zaino-serve 0.3.0) and regenerate Cargo.lock. Without the pin update, zaino-serve's ^0.2.0 requirement could not resolve the bumped 0.3.0 crate in a registry-resolved build of internal consumers such as zainod.

Promote each crate's Unreleased changelog to a dated 2026-06-17 release section and fill gaps: NU6.2 support (zaino-common, zaino-fetch, root), the zaino-serve JSON-RPC handlers plus breaking trait/spawn changes, the zaino-proto compact-block vin/vout parity fix (#1067), and the get_address_utxos fan-out bound (#974).

Untangle the root CHANGELOG into three distinct lineages: move the lightwallet wire-protocol history (v0.1.0..v0.4.0) to packages/zaino-proto/lightwallet-protocol/CHANGELOG.md, lift stray zaino_fetch crate deprecations into the workspace 0.2.0 entry, backfill the missing workspace 0.3.0 and 0.3.1 root entries, and normalize the root lineage to v-less tags.

Also includes a cargo-fmt-only reformat of transparent_address_history.rs (line-wrapping, no logic change).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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

4 participants