raspiblitz / raspiblitz

Get your own Bitcoin & Lightning Node running - on a RaspberryPi with a nice LCD
MIT License
2.44k stars 520 forks source link

Optimize selfsync/validation process #750

Closed rootzoll closed 3 years ago

rootzoll commented 5 years ago

Optimization mentioned by @openoms in: https://github.com/rootzoll/raspiblitz/issues/592#issuecomment-521814812

Only concern was that, when the IBD finished the LND was restarted and waited to finish the blockchain scan until unlocked again. This added hours to have LND ready because it needed to scan the last ~5 percent of the blockchain. Ideally both bitcoin and LND sync should finish before restarting the services to put bitcoin behind Tor too or maybe wait for a manual trigger and keep in sync until looked at?

The background.sh around line 270 could not just wait for the bitcoind to have synced, but also the lncli signals sync to blockchain. I push this after v1.3 to not delay release any longer. But also I think it will run in a similar scenario. Once LND locks after restart it will fall behind and if someone is not monitoring it it can get a bigger gap.

nyxnor commented 3 years ago

Done. Pls close this.