-
Notifications
You must be signed in to change notification settings - Fork 912
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
Reply to invoice_request even if we need to make explicit connection to node #7304
Reply to invoice_request even if we need to make explicit connection to node #7304
Conversation
If we don't find one searching from our random spot in the peer table, we're supposed to wrap, not crash! Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
…rs plugin. We're going to dynamically connect if we need to, to reply to incoming invoice_requests. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
You can disable this with `fetchinvoice-noconnect`. Changelog-EXPERIMENTAL: We will now reply to invoice_request messages even if reply path requires us to make an outgoing connection (LDK does this) Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
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.
test_dev_rawrequest failed (1 runs remaining out of 2).
<class 'pyln.client.lightning.RpcError'>
RPC call failed: method: dev-rawrequest, payload: {'invreq': 'lnr1qqggfst04l3nk7qvdmcsk2h3yvnayq3qqc3xu3s3rg94nj40zfsy866mhu5vxne6tcej5878k2mneuvgjy8ssqgzpg9hx6tdwpkx2gr5v4ehg93pqgkjyd3q5dv6gllh77kygly9c3kfy0d9xwyjyxsq2nq3c83u5vw4j5pqqc3xu3s3rg94nj40zfsy866mhu5vxne6tcej5878k2mneuvgjy84sggztm8vujkkncs52dh5yu8r9mekn4yzq8s9x2e05qu62gvqkh9m4m0lqsrrt73tju9xnyuhkwjfkqxc34jx35qv7zrpwqz9sha8qcccah0r57xlp8p6xzpwdykpsnhykup9k7r98wse5yekhkeyg5egmx02mcvds', 'nodeid': '022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59', 'timeout': 10}, error: {'code': -4, 'message': 'Plugin terminated before replying to RPC call.'}
Our fetchinvoice always creates a reply path which terminates at their peer, so we need a dev overrride for that. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Currently, anything which doesn't have a live channel is considered transient. We free this first under stress, and also if they're still connecting. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Requires a hack to exhaust connectd fds and make us close a transient. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
31a1c59
to
14b9750
Compare
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.
ACK 14b9750
CI memleak is unrelated to your code, looks like that it is renepay but idk
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.
Seems like I'm a little late but lgtm :)
This is vital for LDK interop! They give us a reply path which isn't an immediate peer.
So we do that. Now we have to handle the case where an attacker makes us open many connections, so we demark these in connectd as "transient" so it knows to throw them away under stress.
Closes: #7110