You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@shesek noticed while testing bdk with bwt for #88 that we are using listunspent instead of get_history. This may be unnecessary if we are also calling get_history and could cause utxo set to be out of sync with transactions. This issue is to explore why we're using listunspent and to change to use get_history to determine utxo set if that is determined to be a better approach.
The text was updated successfully, but these errors were encountered:
Thinking about it now, one reason we might want to use listunspent would be for a "fast sync" option that doesn't sync the full history but only the utxo set. We have flags to declare what a Blockchain backend can do (like "can sync the full history", "can fetch any tx given the txid", etc), so that would fit nicely into it.
@afilini Yes, this makes sense. This would also work nicely with a bitcoind backend, which could provide a "fast sync" mode with scantxoutset, which is both faster compared to a full rescan and is pruning-compatible.
But I would still expect the existing "slow sync" mode not to use listunspent. Am I correct in understanding that this is the only place that calls listunspent, to remove utxos that exists locally but are no longer returned by the server? Are there known cases where this wouldn't already remove the spent txos, or is this a safe guard "just in case"?
I don't think there's really any particular reason to have it in the full sync, IIRC that piece of code went through a few iterations and that's probably just a leftover that is not really doing anything useful 😅
@shesek noticed while testing
bdk
withbwt
for #88 that we are usinglistunspent
instead ofget_history
. This may be unnecessary if we are also callingget_history
and could cause utxo set to be out of sync with transactions. This issue is to explore why we're usinglistunspent
and to change to useget_history
to determine utxo set if that is determined to be a better approach.The text was updated successfully, but these errors were encountered: