Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Account scan repeating #90

Open
dannuttall opened this issue Oct 31, 2022 · 24 comments
Open

Account scan repeating #90

dannuttall opened this issue Oct 31, 2022 · 24 comments

Comments

@dannuttall
Copy link

When setting up Satstack for the first time, after it syncs, it then runs an "account scan". After reaching 100% on the account scan it just repeats. It's taking a very long time! Is this normal? Does it need to repeat for each account (there's only 4 on my ledger)? Maybe I'm just being impatient, but if it does need to repeat for each account, the instructions don't mention it so it's not obvious.

@SkanderHelali
Copy link

Ledger Live seems to add 10 accounts for every single script type to the config. So it'll run through all of them and take quite a long time.

It doesn't persist between lss launches, not sure if this is the intended behavior. It will repeat the process in its entirety with every lss service restart / reboot.

@dannuttall
Copy link
Author

It's now been running for 48 hours, each account scan repeat takes 4hrs 30mins so that's over 10 scans so I'm assuming there's an issue here.

Steps to reproduce:

  1. Running raspiblitz on a rp4 on my local network.
  2. Running Ledger Live on my desktop on the same network.
  3. Node connection from Ledger live successful.
  4. Downloaded SatStack to a folder on my desktop.
  5. Run lss via command prompt (as administrator) and the descriptor import begins.
  6. No lss.json file is created as far as I can tell (unless it's created elsewhere), so no descriptors are being saved so I'm assuming that's where the issue lies? Just guessing after reviewing issue Importing descriptors process in a loop #86

@adrienlacombe
Copy link
Contributor

hi @dannuttall if you use Ledger Live to generate the lss.json, please locate it and use it.

@dannuttall
Copy link
Author

@adrienlacombe-ledger ok I found it in the appdata folder. What do you mean by "use it"?
Looking at the json file, it lists 44 accounts. 11 beginning "wpkh", "tr", "sh" and "pkh". (not sure what they mean).
I only have the one bitcoin account in ledger live so not sure why there's so many.
Does this mean I should input 44 (or 11?) accounts into the setup before scanning for accounts?

@SkanderHelali
Copy link

@adrienlacombe-ledger Ledger Live adds 10/11 accounts for every script type in the conf regardless of how many accounts you select during setup.

And once all of them are imported after an eternity; the process has to repeat all over again with every lss restart.

@adrienlacombe
Copy link
Contributor

ok @dannuttall @SkanderHelali please edit the file manually to keep it simple, pkh is for legacy, sh for segwit, wpkh for native segwit and tr for taproot, feel free to delete what's not needed.

@dannuttall
Copy link
Author

@adrienlacombe-ledger just noticed in the readme that the "simple" way won't work if the node is behind Tor (which mine is), so I suspect that's where my issue lies, even if I delete the unnecessary stuff from the lss.json file, unless Tor is now supported via the simple route?

@adrienlacombe
Copy link
Contributor

@dannuttall good catch! No, it is not, you would need to edit the file manually as explained in the advanced part.

@plk
Copy link

plk commented Nov 6, 2022

Is someone able to explain what is supposed to happen with SatStack - I have just one TR account in lss.json and the "Account scan in progress" message reaches 100% and then just starts again with lss just spitting out endless 200 success REST calls to /blockchain/v3/explorer/status in 7 call blocks with an "Importing descriptors" message in between.

@adrienlacombe
Copy link
Contributor

is Ledger Live stating that it is synchronized successfully @plk ?

@plk
Copy link

plk commented Nov 6, 2022

@adrienlacombe-ledger - No, it just reaches 100% and starts again from 0% ... I am just now trying the manual approach using the descriptors returned from getdescriptor and a much more recent birthday value in lss.json

Or do you mean the usual green "synchronised" check at the top of the app? That's green and fine - it's the "Account scan in progress" thing in the experimental features|bitcoin full node that seems to go in a circle, confirmed by the terminal output of lss which seems to just go back to 0% and continues making the same REST calls.

@plk
Copy link

plk commented Nov 6, 2022

Update - same thing with manual getdescriptor generated lss.json. With a more recent birthday setting, it was much faster but it still got to 100% and then just started again immediately at 0%.

@adrienlacombe
Copy link
Contributor

ok, I meant the check indeed.
The REST calls are made by Ledger Live, not satstack.
If you leave aside the experimental features screen, can you add Bitcoin accounts in Ledger Live?

@plk
Copy link

plk commented Nov 6, 2022

Ah, it did finished after a few 0-100% runs and now says "Ready". My bitcoin accounts are still in LL - they were not removed but the sync sign in the "accounts" pane is a little DB icon and checkmark instead of just a checkmark - does this mean they are connected via my node or do I have to remove and re-add? According to the docs, it seems that the accounts should have been removed and I need to re-add ...

@adrienlacombe
Copy link
Contributor

No need to remove and re-add. The doc assumed you started with 0 account but in your case you should be good to go to start using LL while enjoying not doxxing your txs to Ledger :)

@plk
Copy link

plk commented Nov 6, 2022

Hmm, I removed and re-added before I saw this and it found the accounts but they report 0 balance?

@adrienlacombe
Copy link
Contributor

if the account has a positive balance it could mean that the descriptors use a different scheme and/or there are sync issues.

@plk
Copy link

plk commented Nov 6, 2022

Presumably I can switch back to the Ledger explorer anyway and re-add?

@plk
Copy link

plk commented Nov 6, 2022

Seems fine with the ledger explorer, just my node shows an empty balance for the account. I used the descriptor from the manual script output.

@adrienlacombe
Copy link
Contributor

Are you sure you are on the same scheme?

@plk
Copy link

plk commented Nov 6, 2022

By scheme you mean Segwit/Taproot etc.? I am only trying to sync the taproot account which works fine with Ledger explorers.

@adrienlacombe
Copy link
Contributor

Correct, ok, this is strange then.

@plk
Copy link

plk commented Nov 6, 2022

When I try to sync the taproot account via SatStack, I see the REST requests being made from LL but the balance remains 0. Delete, disable full-node connectivity, re-add via LL nodes - all fine. Using latest full node (22.0), SatStack and LL.

@plk
Copy link

plk commented Nov 6, 2022

I think I am a bit confused as to what is in the lss.json - Adding accounts seems to find a few (I had some Segwit etc., now empty) but there is only the taproot account in lss.json. I set the birthday in lss.json to just before this TR account was created, which I assume is correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants