-
Notifications
You must be signed in to change notification settings - Fork 116
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
chain_bridge: fetch block headers over blocks when verifying proofs #660
Conversation
3c4375c
to
6013359
Compare
|
Have tested that this uses |
6013359
to
422a004
Compare
Should not merge until we get a tagged version for |
In this commit, we update the header verifier to use the new GetBlockHeader RPC when supported, and avoid fetching a full block. This improves the reliability of proof validation and universe sync for light clients.
422a004
to
8a52e70
Compare
Bumped to appropriate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 💯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! I appreciate the small diff. 👍
Fixes #315 , #613 . Depends on lightninglabs/lndclient#161 .
This makes use of the
GetBlockHeader
RPC now available in LND v0.17.1 to avoid fetching a full block during proof verification.VerifyBlock
is used in theHeaderVerifier
, which never made use of the full block. This should be safe to change for all places where aHeaderVerifier
is used, so this is added without adding a separate implementation ofHeaderVerifier
.Confirmed that the
GetBlock
calls are no longer made by runningtapd
with this PR backed by LND v0.17.1-beta-rc1 and manually syncing.