Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ rust_decimal = { version = "1", default-features = false, features = ["c-repr"]
# - The "static" feature is required for the "compression" default feature of arti-client.
xz2 = { version = "0.1", features = ["static"] }

zcash_voting = "0.2.3"
zcash_voting = "0.3.0"
voting-circuits = { version = "0.4.1", features = ["share-reveal"] }
zcash_keys = { version = "0.13", features = ["orchard"] }
incrementalmerkletree = { version = "0.8", default-features = false }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,7 @@ extension VotingRustBackend {
notes: [VotingNoteInfo],
pirEndpoints: [String],
expectedSnapshotHeight: UInt64,
networkId: UInt32,
pirResolver: PirSnapshotResolver = PirSnapshotResolver()
) async throws -> VotingDelegationPirPrecomputeResult {
let pirServerUrl = try await pirResolver.resolve(
Expand All @@ -572,7 +573,8 @@ extension VotingRustBackend {
notesBuf.baseAddress,
UInt(notesBuf.count),
urlBuf.baseAddress,
UInt(urlBuf.count)
UInt(urlBuf.count),
networkId
)
}
}
Expand Down
9 changes: 8 additions & 1 deletion rust/src/voting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1454,6 +1454,7 @@ pub unsafe extern "C" fn zcashlc_voting_precompute_delegation_pir(
notes_json_len: usize,
pir_server_url: *const u8,
pir_server_url_len: usize,
network_id: u32,
) -> *mut crate::ffi::BoxedSlice {
let db = AssertUnwindSafe(db);
let res = catch_panic(|| {
Expand All @@ -1467,7 +1468,13 @@ pub unsafe extern "C" fn zcashlc_voting_precompute_delegation_pir(

let result = handle
.db
.precompute_delegation_pir(&round_id_str, bundle_index, &core_notes, &pir_url)
.precompute_delegation_pir(
&round_id_str,
bundle_index,
&core_notes,
&pir_url,
network_id,
)
.map_err(|e| anyhow!("precompute_delegation_pir failed: {}", e))?;

let json_result: JsonDelegationPirPrecomputeResult = result.into();
Expand Down
Loading