Skip to content

Commit 0d8f569

Browse files
committed
zcash_client_sqlite: Disallow selection of dust notes.
At present, we don't take builder padding rules into account in the determination of whether or not we can include spends of dust notes in grace actions. It's too complex to attempt a complete fix for Zashi 1.0, but we can have a tolerable workaround for launch by just never selecting dust-valued notes. This is a temporary solution; opened #1316 to track the resolution.
1 parent 181e898 commit 0d8f569

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

zcash_client_sqlite/src/wallet/common.rs

+1
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ where
158158
INNER JOIN transactions
159159
ON transactions.id_tx = {table_prefix}_received_notes.tx
160160
WHERE {table_prefix}_received_notes.account_id = :account
161+
AND value >= 5000 -- FIXME #1016, allow selection of a dust inputs
161162
AND accounts.ufvk IS NOT NULL
162163
AND recipient_key_scope IS NOT NULL
163164
AND nf IS NOT NULL

zcash_client_sqlite/src/wallet/orchard.rs

+1
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,7 @@ pub(crate) mod tests {
596596
}
597597

598598
#[test]
599+
#[ignore] // FIXME: #1316 This requires support for dust outputs.
599600
fn zip317_spend() {
600601
testing::pool::zip317_spend::<OrchardPoolTester>()
601602
}

zcash_client_sqlite/src/wallet/sapling.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,7 @@ pub(crate) mod tests {
602602
}
603603

604604
#[test]
605+
#[ignore] // FIXME: #1316 This requires support for dust outputs.
605606
fn zip317_spend() {
606607
testing::pool::zip317_spend::<SaplingPoolTester>()
607608
}
@@ -612,9 +613,7 @@ pub(crate) mod tests {
612613
testing::pool::shield_transparent::<SaplingPoolTester>()
613614
}
614615

615-
// FIXME: This requires fixes to the test framework.
616616
#[test]
617-
#[cfg(feature = "orchard")]
618617
fn birthday_in_anchor_shard() {
619618
testing::pool::birthday_in_anchor_shard::<SaplingPoolTester>()
620619
}

0 commit comments

Comments
 (0)