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

lnd doesn't seem to announce channels if it is the funder #5

Closed
cdecker opened this issue Oct 30, 2017 · 4 comments
Closed

lnd doesn't seem to announce channels if it is the funder #5

cdecker opened this issue Oct 30, 2017 · 4 comments

Comments

@cdecker
Copy link
Owner

cdecker commented Oct 30, 2017

Two tests are failing (test_open_channel[lnd_eclair] and test_open_channel[lnd_lightning]), due to channel_announcements not being exchanged. The tests use lnd to connect and fund a channel. It then generates some blocks to make the channel announceable and then waits for the nodes to learn about the channel.

lnd and the other endpoint exchange announce_signatures, however channel_announcements are not exchanged. The strange thing is that as long as lnd is not the funder this seems to work fine, but the gossip flow should not be asymmetrical.

Logs: test_open_channel[lnd_eclair] and test_open_channel[lnd_lightning].

@cdecker
Copy link
Owner Author

cdecker commented Oct 30, 2017

Ping @Roasbeef

@cdecker
Copy link
Owner Author

cdecker commented Nov 8, 2017

Still trying to figure this one out. It appears that lnd is not signalling that it'd like to announce the channel:

DEBUG:root:lnd: 2017-11-08 20:11:56.335 [TRC] PEER: writeMessage to 127.0.0.1:16332: (*lnwire.OpenChannel)(0xc4202f2bb0)({
DEBUG:root:lnd:  ChainHash: (chainhash.Hash) (len=32 cap=32) 0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206,
DEBUG:root:lnd:  PendingChannelID: ([32]uint8) (len=32 cap=32) {
DEBUG:root:lnd:   00000000  ee 58 c8 5a 55 69 3b b4  40 33 a1 81 35 c2 d3 aa  |.X.ZUi;.@3..5...|
DEBUG:root:lnd:   00000010  7a fa a3 10 f3 a8 52 47  05 19 6e a8 d7 34 db 2a  |z.....RG..n..4.*|
DEBUG:root:lnd:  },
DEBUG:root:lnd:  FundingAmount: (btcutil.Amount) 0.1 BTC,
DEBUG:root:lnd:  PushAmount: (lnwire.MilliSatoshi) 0 mSAT,
DEBUG:root:lnd:  DustLimit: (btcutil.Amount) 0.00000573 BTC,
DEBUG:root:lnd:  MaxValueInFlight: (lnwire.MilliSatoshi) 9900000000 mSAT,
DEBUG:root:lnd:  ChannelReserve: (btcutil.Amount) 0.001 BTC,
DEBUG:root:lnd:  HtlcMinimum: (lnwire.MilliSatoshi) 0 mSAT,
DEBUG:root:lnd:  FeePerKiloWeight: (uint32) 12000,
DEBUG:root:lnd:  CsvDelay: (uint16) 4,
DEBUG:root:lnd:  MaxAcceptedHTLCs: (uint16) 483,
DEBUG:root:lnd:  FundingKey: (*btcec.PublicKey)(0xc420630960)({
DEBUG:root:lnd:   Curve: (elliptic.Curve) <nil>,
DEBUG:root:lnd:   X: (*big.Int)(0xc420704780)(74135664635458546868568018038001799506334198678861876537022686131279435867955),
DEBUG:root:lnd:   Y: (*big.Int)(0xc4207047a0)(4351544849546092719721420911963267954793836223159638570821612462384391901234)
DEBUG:root:lnd:  }),
DEBUG:root:lnd:  RevocationPoint: (*btcec.PublicKey)(0xc420630ff0)({
DEBUG:root:lnd:   Curve: (elliptic.Curve) <nil>,
DEBUG:root:lnd:   X: (*big.Int)(0xc420705080)(64748002204666831026051091351615078266296852034294009931655728545974904958404),
DEBUG:root:lnd:   Y: (*big.Int)(0xc4207050a0)(106332330228911345743625109620675637694907063827568497443918811049874601237041)
DEBUG:root:lnd:  }),
DEBUG:root:lnd:  PaymentPoint: (*btcec.PublicKey)(0xc420631680)({
DEBUG:root:lnd:   Curve: (elliptic.Curve) <nil>,
DEBUG:root:lnd:   X: (*big.Int)(0xc420705980)(56514626295325734006369150368438922887936321702922259848422965946720936475518),
DEBUG:root:lnd:   Y: (*big.Int)(0xc4207059a0)(54707086089742517353613555738016149822781687106817332141503067837070132320125)
DEBUG:root:lnd:  }),
DEBUG:root:lnd:  DelayedPaymentPoint: (*btcec.PublicKey)(0xc420631d10)({
DEBUG:root:lnd:   Curve: (elliptic.Curve) <nil>,
DEBUG:root:lnd:   X: (*big.Int)(0xc42051e2c0)(23026028511234008495329861545013413879995068469836996810125422180133023601013),
DEBUG:root:lnd:   Y: (*big.Int)(0xc42051e2e0)(27717011557678883934658413723130025125429089502350287056645086936320820364939)
DEBUG:root:lnd:  }),
DEBUG:root:lnd:  FirstCommitmentPoint: (*btcec.PublicKey)(0xc42051f3c0)({
DEBUG:root:lnd:   Curve: (elliptic.Curve) <nil>,
DEBUG:root:lnd:   X: (*big.Int)(0xc42051f340)(69526465816636165497554629156694395698756373346207134654764666577612280462183),
DEBUG:root:lnd:   Y: (*big.Int)(0xc42051f360)(5638617287017390022985013311279617574624992553695080379978344340425798056900)
DEBUG:root:lnd:  }),
DEBUG:root:lnd:  ChannelFlags: (uint8) 0
DEBUG:root:lnd: })

Notice the ChannelFlags which should be set to 1.

@Roasbeef
Copy link
Collaborator

Roasbeef commented Nov 9, 2017

This should be resolved as of lightningnetwork/lnd@3764e5c. We'll now properly set the ChannelFlags to 1 by default.

@cdecker
Copy link
Owner Author

cdecker commented Nov 10, 2017

I can confirm that this indeed fixes the problem, great work @Roasbeef 👍

@cdecker cdecker closed this as completed Nov 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants