librustzcash icon indicating copy to clipboard operation
librustzcash copied to clipboard

`zcash_client_sqlite`: Decide whether to keep or remove `WalletWrite::remove_unmined_tx`

Open str4d opened this issue 3 years ago • 2 comments

#621 adds a WalletWrite::remove_tx API to replace wallet database mutation logic in the Android SDK (that should not be there, as it violates the wallet database contract). The logic preserves a bug from the Android SDK where transactions that have spent outputs are allowed to be deleted, and their full downstream effects are not fully unwound.

We should do one of three things before the next zcash_client_sqlite release:

  • Change WalletWrite::remove_tx to cascade and delete downstream transactions of the given transaction.
  • Change WalletWrite::remove_tx to return an error if deleting this transaction would cause other transactions to be deleted.
  • Remove WalletWrite::remove_tx.

str4d avatar Aug 29 '22 21:08 str4d

#621 has been altered to fix the bug referenced in the OP. So this issue is now just about whether we want to keep this API at all.

str4d avatar Aug 30 '22 23:08 str4d

In discussion with @str4d we agreed that this API should for the immediate time being be moved behind the unstable feature flag, but we can defer the full removal until later.

nuttycom avatar Oct 06 '22 23:10 nuttycom

According with what we discussed internally. This function is not used by either of both SDKs. And apparently from what it is described in the issue, it's not currently meeting anyone's end and it's rather an unstable function.

Being a blocker I would say we resolve to remove it and move on

pacu avatar Jan 31 '23 18:01 pacu