abortrescan #221

Closed
opened 2 years ago by duke · 3 comments
duke commented 2 years ago
Owner

https://developer.bitcoin.org/reference/rpc/abortrescan.html

Looks nice to have, in case you accidentally let an RPC kick off a full rescan on accident

https://developer.bitcoin.org/reference/rpc/abortrescan.html Looks nice to have, in case you accidentally let an RPC kick off a full rescan on accident
duke self-assigned this 2 years ago
Poster
Owner

BTC core rescan internals have diverged quite a lot from Hush rescan internals, and we have the added complication of dealing with zaddr witness caches. Should be fun.

BTC core rescan internals have diverged quite a lot from Hush rescan internals, and we have the added complication of dealing with zaddr witness caches. Should be fun.
Poster
Owner

Code is now on the abortrescan branch and includes code to stop a rescan if "hush-cli stop" is called during a rescan. It should be tested in a few different scenarios:

  • Does a rescan stop when hush-cli stop is used and log correctly to debug.log?
  • Does a partial rescan stop correctly when abortrescan is called? Does it log correctly to debug.log ?
    • If wallet received a payment between the rescan height and chain tip, can those funds still be spent by the wallet, even after an aborted rescan?
  • Does a full rescan stop correctly when abortrescan is called?
  • Does the code work correctly if abortrescan is called when there is no rescan happening?

Currently the code does not update zaddr witness caches if a rescan is aborted, because normally a witness cache would only be updated at the end of a rescan when the node has rescanned to the latest chain tip.

@jahway603 is this branch something you would be interested in testing?

Code is now on the `abortrescan` branch and includes code to stop a rescan if "hush-cli stop" is called during a rescan. It should be tested in a few different scenarios: * [ ] Does a rescan stop when `hush-cli stop` is used and log correctly to debug.log? * [ ] Does a partial rescan stop correctly when `abortrescan` is called? Does it log correctly to debug.log ? * [ ] If wallet received a payment between the rescan height and chain tip, can those funds still be spent by the wallet, even after an aborted rescan? * [ ] Does a full rescan stop correctly when `abortrescan` is called? * [ ] Does the code work correctly if `abortrescan` is called when there is no rescan happening? Currently the code does not update zaddr witness caches if a rescan is aborted, because normally a witness cache would only be updated at the end of a rescan when the node has rescanned to the latest chain tip. @jahway603 is this branch something you would be interested in testing?
duke commented 1 year ago
Poster
Owner

@jahway603 this could still use some testing if you are interested.

It's been merged, closing

@jahway603 this could still use some testing if you are interested. It's been merged, closing
duke closed this issue 1 year ago
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.