Start9Labs / bitcoind-startos

wrapper for building bitcoind.s9pk
Other
12 stars 19 forks source link

Add wallet rescans to Properties #59

Open kn0wmad opened 2 years ago

kn0wmad commented 2 years ago

In order to give user feedback without them going into the logs and discovering "benign" RPC errors

ProofOfKeags commented 2 years ago

what would this measure?

kn0wmad commented 2 years ago

%age of scan complete, similar to sync. @chrisguida suggested this could be a health check, although it would really only be relevant during a wallet scan. The rest of the time it's perhaps clutter

chrisguida commented 2 years ago

This could also go in properties

ProofOfKeags commented 2 years ago

What do you want to happen in if there is no wallet scan in progress? A green health check? No health check?

chrisguida commented 2 years ago

We could disable it if there's no scan in progress. Would probably want an option in the UI to hide it if it's disabled.

A better solution is probably to just put it in properties, rather than implement this as a health check.

ProofOfKeags commented 2 years ago

A better solution is probably to just put it in properties, rather than implement this as a health check.

+1

Reckless-Satoshi commented 1 year ago

Is there an action to start a wallet rescan or does it have to be triggered from CLI bitcoin-cli rescanblockchain?

I think an action like this could be created:

actions:
  # ...
  # reindex
  # delete-peers
  # ...
  rescan:
      name: "Rescan Blockchain"
      description: "Rescans the blockchain for Bitcoin Core wallet transactions. Useful when recovering old wallets on StartOS apps that depend on Bitcoin Core wallet functionalities."
      warning: The rescan will start from block zero and can take several hours to finish. 
      allowed-statuses:
        - running
      implementation:
        type: script  # something that triggers bitcoin-cli rescanblockchain
  # ...

Ideally, a parameter can be passed for the initial_blockheight or date to start the rescan (by default rescans from block 0). Extra cool if the rescan progress is shown in the UI as commented above.