-
Notifications
You must be signed in to change notification settings - Fork 961
Configuration option to specify "fronting nodes" for routehints/blinded paths. #8490
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
base: master
Are you sure you want to change the base?
Conversation
If a plugin exits early, we will not exit with ret == plugins: return from this function and we will exit because ld->exit_code is set. Signed-off-by: Rusty Russell <[email protected]>
Signed-off-by: Rusty Russell <[email protected]> Changelog-Added: libplugin: support for options which accumulate if specified more than once ("multi": true).
Signed-off-by: Rusty Russell <[email protected]> Changelog-Added: Config: `payment-fronting-node` option to specify neighbor node(s) to use for all bolt11 invoices, bolt12 offers, invoices and invoice_requests.
We use all the fronting nodes when creating invoices. Signed-off-by: Rusty Russell <[email protected]>
This is how modern plugins do it, and it has the benefit of not requiring extra code for memleak tracking. Signed-off-by: Rusty Russell <[email protected]>
We use all the fronting nodes when creating offers. Signed-off-by: Rusty Russell <[email protected]>
… set. Signed-off-by: Rusty Russell <[email protected]>
Signed-off-by: Rusty Russell <[email protected]>
Signed-off-by: Rusty Russell <[email protected]>
The next commit makes us honor these when issuing a payment. Changelog-Added: JSON-RPC: `offer` now has a `fronting-nodes` option to specify neighbors for payer to use to fetch invoices and make payments. Signed-off-by: Rusty Russell <[email protected]>
… for invoice_request. Signed-off-by: Rusty Russell <[email protected]>
49e4d09 to
4b63d13
Compare
endothermicdev
left a comment
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.
Looks good to me pending the gossmap initialization and blackbox test typos. I'm not sure how to best prevent footguns with this feature, but I'm sure we'll find some as we go.
| # l1 -> l2 -> l3 | ||
| # \ / | ||
| # l4 | ||
| # Nodes will front for offers if they don't have an advertized address. |
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.
| # Nodes will front for offers if they don't have an advertized address. | |
| # Nodes will not front for offers if they don't have an advertized address. |
| offer_front_l2 = l4.rpc.offer("any", "frontl2", fronting_nodes=[l2.info['id']])['bolt12'] | ||
| assert only_one(l1.rpc.decode(offer_front_l2)['offer_paths'])['first_node_id'] == l2.info['id'] | ||
| offer_front_l2l3 = l4.rpc.offer("any", "frontl2l3", fronting_nodes=[l2.info['id'], l3.info['id']])['bolt12'] | ||
| assert [p['first_node_id'] for p in l1.rpc.decode(offer_front_l2)['offer_paths']] == [l2.info['id'], l3.info['id']] |
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.
| assert [p['first_node_id'] for p in l1.rpc.decode(offer_front_l2)['offer_paths']] == [l2.info['id'], l3.info['id']] | |
| assert [p['first_node_id'] for p in l1.rpc.decode(offer_front_l2l3)['offer_paths']] == [l2.info['id'], l3.info['id']] |
| return plugin_get_data(plugin, struct offers_data); | ||
| } | ||
|
|
||
| static void init_gossmap(struct plugin *plugin, |
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.
I think this still needs to be initialized on startup.
==936832== Conditional jump or move depends on uninitialised value(s)
==936832== at 0x11424D: get_gossmap (offers.c:53)
==936832== by 0x11B316: try_establish (fetchinvoice.c:605)
==936832== by 0x11B414: send_message (fetchinvoice.c:644)
==936832== by 0x11B644: invreq_done (fetchinvoice.c:784)
==936832== by 0x121C94: handle_rpc_reply (libplugin.c:1136)
==936832== by 0x121E97: rpc_read_response_one (libplugin.c:1441)
==936832== by 0x121F48: rpc_conn_read_response (libplugin.c:1465)
==936832== by 0x1CEDCF: next_plan (io.c:60)
==936832== by 0x1CF2A0: do_plan (io.c:422)
==936832== by 0x1CF35D: io_ready (io.c:439)
==936832== by 0x1D0CEC: io_loop (poll.c:455)
==936832== by 0x1235A5: plugin_main (libplugin.c:2578)
| return command_param_failed(); | ||
|
|
||
|
|
||
| /* If they don't specify explicitly, use config (if any) */ |
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.
Would it also make sense at this point to check that fronting_nodes in the rpc request are public?
Useful to force all traffic via another node.