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

Explore commando and lnlink options for CLN connection #991

Closed
ShahanaFarooqui opened this issue Apr 12, 2022 · 12 comments
Closed

Explore commando and lnlink options for CLN connection #991

ShahanaFarooqui opened this issue Apr 12, 2022 · 12 comments
Assignees
Labels
Core Lightning enhancement New feature or request

Comments

@ShahanaFarooqui
Copy link
Collaborator

Explore commando and lnlink options for CLN connection. Explicitly test it with:

  • Remote connection to CLN
  • Websockets
@ShahanaFarooqui
Copy link
Collaborator Author

Closing it for now, will open another issue if we decide to migrate from cl-rest to commando plugin.

@saubyk saubyk removed this from the Release v0.12.4-beta milestone May 12, 2022
@kiwiidb
Copy link

kiwiidb commented Sep 9, 2022

Testing this on testnet, we've followed all the steps, but we get stuck:

Connecting to node 032e2444c5bb14c5eb2bf8ebdfd102c162609956aa995b7c7d373ca378deedb5c7
Calling getinfo
Socket Opened!
Connection Established!

and then nothing else... we can see the websocket open in the logs of CLN:
DEBUG connectd: Websocket connection in from 10.114.0.28:44736, so the websocket connection is working in any case. Anyone got some idea what we're doing wrong?

@ShahanaFarooqui
Copy link
Collaborator Author

I can test it on my side but need more details like public ip & port.

@ShahanaFarooqui
Copy link
Collaborator Author

I tested it with my nodes and the documentation is still working. But when I tried to find pubkey 032e2444c5bb14c5eb2bf8ebdfd102c162609956aa995b7c7d373ca378deedb5c7 on the network, it is unable to find it.

@kiwiidb
Copy link

kiwiidb commented Sep 11, 2022

It's a testnet node

// Testnet Settings
 const NODE_ID = '032e2444c5bb14c5eb2bf8ebdfd102c162609956aa995b7c7d373ca378deedb5c7';
 const ADDRESS = '46.101.69.118'; //'192.168.1.11';
 const PORT = '9736';
 const RUNE = '3gxlAQcfdkUyoE_LKkjQ-zSagtq2ui6076zv0HSBhvI9MyZtZXRob2RebGlzdHxtZXRob2ReZ2V0fG1ldGhvZD1zdW1tYXJ5Jm1ldGhvZC9saXN0ZGF0YXN0b3Jl';

(I'm running the websocket interface on 9736).

@kiwiidb
Copy link

kiwiidb commented Sep 30, 2022

When I run this out of the box, I get the following output:

Connecting to node 031844beb16bf8dd8c7bc30588b8c37b36e62b71c6e812e9b6d976c0a57e151be2
Calling getinfo
Calling feerates
Calling signmessage
Calling getinfos

And then nothing else.

I've also tried it with wss://proxy.lnlink.org, which also does not seem to work.

@ShahanaFarooqui
Copy link
Collaborator Author

Hey, I am finally able to reproduce the same behaviour on my machine. I am currently debugging it. I will let you know whenever I make any progress.

@ShahanaFarooqui
Copy link
Collaborator Author

Which Core Lightning version are you on? I was successfully able to connect with CLN 0.11.1 but after upgrading it to 0.12.0 & 0.12.1, I am getting the same issue. I need some more time to install 0.11.1 on another machine and test with that again but 0.12.x might be the root cause.

@ShahanaFarooqui
Copy link
Collaborator Author

ShahanaFarooqui commented Oct 4, 2022

@kiwiidb

For v0.11.1:

  • Commando client was getting stuck at connection established even after downgrading CLN to 0.11.1.
  • However I received responses after adding bind-addr and experimental-offers options for CLN. I am not sure on how experimental-offers is helping commando client to get response but it doesn't get response if the tag is missing from the config.
  • This is the minimum config I needed to connect through commando client:
network=testnet
bind-addr=192.xyz.1.ab:19735
experimental-offers
experimental-websocket-port=5001
plugin=/.../lightning/plugins/commando/commando.py

For v0.12.1:

  • The same config, except plugin=..., is not working with CLN v0.12.1. It stops after connection established message.
  • However, after changing commando-client.js's line 58 from data.length === 81 to data.length === 83 fixed the issue.
  • experimental-offers can also be removed from the config.
network=testnet
bind-addr=192.xyz.1.ab:19735
experimental-websocket-port=5001

@ShahanaFarooqui
Copy link
Collaborator Author

@kiwiidb Please let me know if above solution resolved your issue or not, whenever you test it again.

@ShahanaFarooqui
Copy link
Collaborator Author

Updated the gist and removed sample code comments from this thread to remove redundancy.

Reference code link: https://gist.github.com/ShahanaFarooqui/1d7b4f9fc3d0657ffda4657262fce047
Note: Using commando with Vanilla JS is still work in progress. Testing, suggestions & PRs are welcome.

@kiwiidb
Copy link

kiwiidb commented Oct 18, 2022

I'll try to test it out when I find the time. However, we've moved to https://github.com/aaronbarnardsound/lnmessage as a pure JS client as we need something to run in the browser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Lightning enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants