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

CLN interoperability: "unable to start peer: invalid remote features: missing feature dependency: 45" #6802

Closed
C-Otto opened this issue Aug 6, 2022 · 11 comments · Fixed by #6809

Comments

@C-Otto
Copy link
Contributor

C-Otto commented Aug 6, 2022

Background

I'm running 115b041 which is a very recent commit in master (somewhere between 0.15.0 and 0.15.1). Somewhere after 0.15.0 the issue surfaced, which seems to be limited to CLN peers. As I'm still able to connect to "zero fee routing | CLN" (038fe1bd966b5cb0545963490c631eaa1924e2c4c0ea4e7dcb5d4582a1e7f2f1a5, @zerofeerouting), I guess that this issue is limited to some CLN versions.

Your environment

  • version of lnd: 115b041
  • which operating system (uname -a on *Nix): Linux server 5.10.0-13-amd64 #1 SMP Debian 5.10.106-1 (2022-03-17) x86_64 GNU/Linux
  • version of btcd, bitcoind, or other backend: bitcoind v23
  • any other relevant environment details: db.prune-revocation=true

Steps to reproduce

Connect to any of the following peers:

  • 024271a1be2d7a3e2a276b241257be734d843885d252f50575e4c7db2691aedd3a - "running v.0.12"
  • 027b0575bc6a9a6a371f306e01916b34522a3bc2e9ce7490ebfea6815465734e98
  • 02fe6a27ddcb2dd9fa8479fe1d52549b5932079a493b51f1409fa2c5878f1bc07c - running "the development tip of cln"
  • 03a465772d45616bf6c8450a69191db8f3cf8cca19ff92138735fd5f1d436fe4dc

Expected behaviour

Connection

Actual behaviour

[INF] PEER: Peer(PUBKEY): disconnecting PUBKEY@IP:PORT, reason: unable to start peer: invalid remote features: missing feature dependency: 45

@C-Otto
Copy link
Contributor Author

C-Otto commented Aug 6, 2022

With git bisect I get this commit introducing the issue:
a6c62eb

@Crypt-iQ any idea?

@C-Otto
Copy link
Contributor Author

C-Otto commented Aug 6, 2022

Looks like a CLN bug to me, see linked issue.

@positiveblue
Copy link
Collaborator

@C-Otto I think you are right, ScidAliasOptional (47) depends on ExplicitChannelTypeOptional (45) and ZeroConfOptional (51) on ScidAliasOptional (47).

@C-Otto
Copy link
Contributor Author

C-Otto commented Aug 6, 2022

According to https://github.com/lightning/bolts/blob/master/09-features.md 46/47 does not have any dependency.

@positiveblue
Copy link
Collaborator

positiveblue commented Aug 6, 2022

That's true. It looks like the nodes would be able to negotiate if the channel that they are opening is zero conf or not based on the mindepth and not the channel_type @Crypt-iQ

@C-Otto
Copy link
Contributor Author

C-Otto commented Aug 6, 2022

See comments for deps.go in #5955 (I can't link to them)

@positiveblue positiveblue self-assigned this Aug 7, 2022
@Crypt-iQ
Copy link
Collaborator

Crypt-iQ commented Aug 8, 2022

The problem here is the feature bit 47 doesn't depend on the feature bit 45, but the channel type 47 that requires feature bit 47 does depend on channel type 45 which requires feature bit 45

@C-Otto
Copy link
Contributor Author

C-Otto commented Aug 8, 2022

So lnd shouldn't include the 47->45 dependency for connections, just for new channels?

@Crypt-iQ
Copy link
Collaborator

Crypt-iQ commented Aug 8, 2022

I think the dependency can be removed and everything should just work

@C-Otto
Copy link
Contributor Author

C-Otto commented Aug 8, 2022

Without the dependency I'm now able to connect to 024271a1be2d7a3e2a276b241257be734d843885d252f50575e4c7db2691aedd3a (and others).

positiveblue added a commit to positiveblue/lnd that referenced this issue Aug 8, 2022
…eOptional`

The [spec](https://github.com/lightning/bolts/blob/master/09-features.md)
does not specify a dependency between `ScidAliasOptional` (47) and
`ExplicitChannelTypeOptional` (45).

This bug lead to some connectivity issues with peers not setting the
45 feature bit while setting the 47.

The issue [6802](lightningnetwork#6802) is
an example of this.
@Roasbeef
Copy link
Member

Roasbeef commented Aug 8, 2022

The above PR should resolve things for now. However, we always want to use the explicit channel type stuff for zero conf negotiation. As a result, if the other peer doesn't support it, we'll fail out on the RPC level. Looks like CLN will start to set the feature bit now (given they actually understand/implement it): ElementsProject/lightning#5455. With that in, everything "should just work" now.

Roasbeef pushed a commit to Roasbeef/lnd that referenced this issue Aug 13, 2022
…eOptional`

The [spec](https://github.com/lightning/bolts/blob/master/09-features.md)
does not specify a dependency between `ScidAliasOptional` (47) and
`ExplicitChannelTypeOptional` (45).

This bug lead to some connectivity issues with peers not setting the
45 feature bit while setting the 47.

The issue [6802](lightningnetwork#6802) is
an example of this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants