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

Remove ErrSynchronizingChain #7039

Merged
merged 1 commit into from Oct 31, 2022
Merged

Conversation

TonyGiorgio
Copy link
Contributor

Change Description

This fixes #7034 where an LND node reveals that is it vulnerable to chain tip sync problems such as #7002, which may be exploited by those with existing channels with the node by broadcasting a previous channel state. It would be better if other actors do not know if a node is synced or not.

Steps to Test

  1. Be out of sync
  2. Attempt to open channel with out of sync node
  3. See what error is returned on the wire (should now be funding failed due to internal error)

@guggero guggero requested a review from Crypt-iQ October 17, 2022 08:11
@lightninglabs-deploy
Copy link

@Crypt-iQ: review reminder

Copy link
Collaborator

@yyforyongyu yyforyongyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! Could you rebase it? We've added several new linters rules and new itests, kinda wanna see if they'd be affected.

@TonyGiorgio
Copy link
Contributor Author

Rebased. Let me know if there's any errors to fix. I noticed the CI hasn't been healthy for awhile so I can't tell if there's something I need to fix.

Copy link
Collaborator

@yyforyongyu yyforyongyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool missing a release note, and the git commit message needs to be changed according to the contribution guidelines, otherwise LGTM👍

funding/manager.go Show resolved Hide resolved
@TonyGiorgio
Copy link
Contributor Author

I think that should do it, let me know if the release note comment should be any different.

Copy link
Collaborator

@yyforyongyu yyforyongyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM🙏

// ErrChanTooLarge is returned by a remote peer that receives a
// FundingOpen request for a channel that is above their current
// soft-limit.
ErrChanTooLarge FundingError = 3
ErrChanTooLarge FundingError = 2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Crypt-iQ so even though this is declared in the lnwire package, this constant is never used on the wire? So changing the number shouldn't have any side effects? I guess we only created the type for internal handling then...

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes its not used on the wire

@guggero guggero merged commit 84401f6 into lightningnetwork:master Oct 31, 2022
@TonyGiorgio TonyGiorgio deleted the sync-7034 branch November 1, 2022 18:33
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.

[feature]: Remove ErrSynchronizingChain from returned error whitelist
5 participants