Skip to content

feat(zcash_client_sqlite): Retain stable witness data during truncation #2276

@nullcopy

Description

@nullcopy

There are scenarios where a the wallet may need to rescan the chain, even though it has account(s) with known spendable notes.

For example, consider a wallet which already has one (account A) and imports a new account (account B). The wallet will need to re-scan from the birthday height of B to discover its notes/balances. Currently, the truncation process applies to both accounts, resulting in the witness data corresponding to account A's notes being forgotten until it is regenerated during the re-scan. Ideally, account A's notes would still be spendable (e.g. still have the witness data) even during the re-scan, so that the user can still use A while re-scanning for B.

Possible solution: Exclude 'stable' witness data from truncation
Essentially, add a flag to mark notes as 'stable' once they've been confirmed up to the pruning depth. Then, modify pruning to exclude removal of witness data corresponding to those 'stable' notes.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions