Skip to content

Bump zcash_voting to 0.5.8 — bundle identity persistence, HTTP runtime drop fix#46

Merged
greg0x merged 4 commits into
mainfrom
greg/voting-bundle-identity-release
May 11, 2026
Merged

Bump zcash_voting to 0.5.8 — bundle identity persistence, HTTP runtime drop fix#46
greg0x merged 4 commits into
mainfrom
greg/voting-bundle-identity-release

Conversation

@greg0x
Copy link
Copy Markdown
Contributor

@greg0x greg0x commented May 11, 2026

Why

Two release-blocking issues for the upcoming governance flow:

  • Bundle note identities can drift after setup. setup_bundles only recorded
    note positions, so if the same position later resolved to a different note,
    governance PCZT construction would silently sign over substituted inputs.
    Persisting full identity hashes and rejecting same-position substitutions
    closes that window.

  • HTTP transport panicked when dropped under Tokio. The tree-sync feature
    builds a multi-thread Tokio runtime inside HyperTransport. Dropping it
    from inside an active Tokio context (which happens during normal teardown
    on the wallet side) trips Tokio's "drop runtime in async context" panic.
    Wrapping it in a BlockingRuntime that calls shutdown_background on drop
    avoids the panic without changing call-site behavior.

Migration

Adds DB schema v8: new bundles.note_identity_hashes_blob column. Existing
rows are preserved with NULL identity hashes; the column is also part of
001_init.sql so fresh databases get it directly. Migration is idempotent
(guards on column_exists).

Tests

  • cargo test -p zcash_voting storage:: — covers the v7→v8 migration path
    and identity-hash persistence/readback.
  • cargo test -p zcash_voting --features client-tree-sync blocking_runtime_drop_does_not_panic_inside_tokio_context
    — regression test for the runtime drop panic.

@greg0x greg0x force-pushed the greg/voting-bundle-identity-release branch from 79b597d to facc4d6 Compare May 11, 2026 13:38
@greg0x greg0x marked this pull request as draft May 11, 2026 14:19
@greg0x greg0x changed the title Bump zcash_voting to 0.5.8 Bump zcash_voting to 0.5.8 — bundle identity persistence, HTTP runtime drop fix May 11, 2026
@greg0x greg0x marked this pull request as ready for review May 11, 2026 15:01
Persist bundle note identities as the core security boundary for Swift and Android consumers, and reject substituted notes across PCZT, PIR, and proof entry points.

Keep legacy position-only rows compatible while making setup/proof persistence atomic so SDK wrappers do not need sidecar transaction logic.
Comment thread zcash_voting/Cargo.toml
Comment thread zcash_voting/src/storage/migrations.rs
@greg0x greg0x force-pushed the greg/voting-bundle-identity-release branch from 1f937dc to 6654557 Compare May 11, 2026 15:18
@greg0x greg0x merged commit b9acd1c into main May 11, 2026
4 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.

2 participants