Electric-Coin-Company / zcash-swift-wallet-sdk

iOS light client Framework proof-of-concept
MIT License
36 stars 34 forks source link

During recovery-from-seed, spendable notes only have their witnesses bumped every 10 minutes #1269

Open str4d opened 1 year ago

str4d commented 1 year ago

In the steady state, the wallet will start CompactBlockProcessor every 10-30 seconds, scan the few new blocks that may have come in, reschedule itself with a timer, and then stop.

However, when recovering from seed, CompactBlockProcessor will be spending most of its time in a long Historic section, which means that enhance will go through updateChainTip to download, and updateChainTip only triggers a chain tip update every 10 minutes. This means that any notes we have that are spendable, will only have their witnesses bumped on that time interval.

Currently there is no issue here, because we don't allow spending during recover-from-seed until recovery is complete. However, if in future we implemented either reverse scanning, or allowed notes received after the recover_until height to be spent, this delay would become an issue.

daira commented 1 year ago

I think this is enhancement rather than bug, since it's an issue of latency-to-spend rather than correctness.

nuttycom commented 10 months ago

@LukasKorba I think that this is related to the error-handling behavior that you were talking about in our meeting this morning.