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

[feature]: Add start_height to lnd.conf to manually set node "birthday" #8640

Open
ezracarr opened this issue Apr 10, 2024 · 1 comment
Open
Labels
enhancement Improvements to existing features / behaviour

Comments

@ezracarr
Copy link

I'm building a system that relies on remote signing nodes and watch-only nodes that are derived from those remote signers. I constitute the watch only nodes by using the wallet accounts import functionality thereby importing the xpub from the remote signer into the watch only node.

The problem I am running into is that the node sync process takes way too long because the "birthday" of the node is unknown and hence it defaults to the segwit activation block (I think).

The node proceeds to rescann a couple hundred thousand blocks which takes many hours

I would love to be able to set the node's birthday block manually within the lnd.conf file. something like
start_height=838000

Below is a snippet of the logs from the node that is taking a long time to sync. It is currently taking about 45 minutes to process 10,000 blocks.

2024-04-10 14:39:25.858 [INF] LTND: Waiting for chain backend to finish sync, start_height=838615
2024-04-10 14:39:27.201 [INF] LNWL: Started rescan from block 0000000000000000000fc00b39b775a505eb38375ebb569b7729a5e75070869b (height 646100) for 0 addresses
2024-04-10 14:45:19.409 [INF] LNWL: Started polling mempool to cache new transactions
2024-04-10 14:56:53.005 [INF] LNWL: Catching up block hashes to height 650000, this might take a while
2024-04-10 14:56:53.008 [INF] LNWL: Done catching up block hashes
2024-04-10 14:56:53.008 [INF] LNWL: Rescanned through block 0000000000000000000060e32d547b6ae2ded52aadbc6310808e4ae42b08cc6a (height 650000)
2024-04-10 15:48:24.235 [INF] LNWL: Catching up block hashes to height 660000, this might take a while
2024-04-10 15:48:24.236 [INF] LNWL: Done catching up block hashes
2024-04-10 15:48:24.237 [INF] LNWL: Rescanned through block 00000000000000000008eddcaf078f12c69a439dde30dbb5aac3d9d94e9c18f6 (height 660000)
@ezracarr ezracarr added the enhancement Improvements to existing features / behaviour label Apr 10, 2024
@guggero
Copy link
Collaborator

guggero commented Apr 11, 2024

How are you creating the initial wallet? Just a random one that you then don't use?

You should instead use lncli createwatchonly where you can pass in a wallet birthday, as described here: https://github.com/lightningnetwork/lnd/blob/b875084cbed0b2fb4fed30a184be37152ca6a5c5/docs/remote-signing.md#the-signer-node

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvements to existing features / behaviour
Projects
None yet
Development

No branches or pull requests

2 participants