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

bitcoind RPC: Skip validating header chain for newly setup nodes #414

Closed

Conversation

tnull
Copy link
Collaborator

@tnull tnull commented Dec 2, 2024

When we just setup a new node, all chain listeners will still be synced up to the genesis hash. In order to allow for faster startup, we skip validating the entirety of the header chain by continuing with the current best block polled from bitcoind.

Note that this doesn't noticeably change our security model as we're trusting the chain data source, for example to not censor us, anyways. And, we're of course still validating the PoW for the best block we're polling.

When we just setup a new node, all chain listeners will still be synced
up to the genesis hash. In order to allow for faster startup, we skip
validating the entirety of the header chain by continuing with the
current best block polled from `bitcoind`.

Note that this doesn't noticeably change our security model as we're
trusting the chain data source, for example to not censor us, anyways.
And, we're of course still validating the PoW for the best block we're
polling.
@tnull tnull requested a review from jkczyz December 2, 2024 14:44
@tnull
Copy link
Collaborator Author

tnull commented Dec 2, 2024

Hmm, nevermind. I think this currently doesn't work. At least AFAICT there is no way to skip header validation after the fact, i.e., once the ChannelManager had been initialized with the genesis hash. And of course, we can't poll during/prior to initialization in the builder as we don't have a runtime available.

One way to consider shortening the header validation would be to eventually introducing checkpoints, i.e., initialize the listeners with a more recent best block on mainnet.

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

Successfully merging this pull request may close these issues.

1 participant