-
Notifications
You must be signed in to change notification settings - Fork 902
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
Onion Updates to Match Latest Spec (and test vectors!) #4921
Onion Updates to Match Latest Spec (and test vectors!) #4921
Conversation
441a175
to
ec64fd6
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.
LGTM, Github action point me out an error, where I don't know if there are any better solutions than the ones that I proposed in the comment.
Anyway, it is only a comments
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 here the mistake it is the space and not the end line, if I'm not wrong python have 2 end-line conventions between function.
So, in this case, looks good the change, but I think in the file there is a space " "
fde2140
to
e480712
Compare
Rebase to fix flakes... |
I think we have a list part to migrate in the new spec version, that it is Lines 3284 to 3301 in 35c6f90
|
This PR is compatible with ACINQ/eclair@59b4035, eclair and c-lightning can send and relay messages to each other. |
Yes. While HTLCs with blinded routing are not completely specced, they're pretty obvious. I'll see if it's better to implement or just disable for now... |
e480712
to
491e8d9
Compare
Not all plugins depended on their headers. Keep it simple: all plugins depend on all plugin headers. Signed-off-by: Rusty Russell <[email protected]>
Temporarily disable sendpay_blinding test which uses obsolete onionmsg; there's still some debate on the PR about how blinded HTLCs will work. Changelog-EXPERIMENTAL: onionmessage: removed support for v0.10.1 onion messages. Signed-off-by: Rusty Russell <[email protected]>
Yes, we changed the spec again. Hopefully for the last time! Signed-off-by: Rusty Russell <[email protected]>
This is from 6e99c5feaf60cb797507d181fe583224309318e9 We renamed the enctlv field to encrypted_recipient_data in the spec, and the new onion_message is message 513. We don't handle it until the next patch. Two renames: 1. blinding_seed -> blinding_point. 2. enctlv -> encrypted_recipient_data. We don't do a compat cycle for our JSON APIs for these experimental features only used by our own plugins, we just rename. Signed-off-by: Rusty Russell <[email protected]>
…dpath" RPC. Signed-off-by: Rusty Russell <[email protected]>
It's very similar to the previous, but there are a few changes: 1. The enctlv fields are numbered differently. 2. The message itself is a different number. The onionmsg_path type is the same, however, so we keep that constant at least. The result is a lot of cut & paste, but we will delete the old one next release. Signed-off-by: Rusty Russell <[email protected]>
And wire it through to the hook; update the plugins to recognize modern vs obs2 onions. Signed-off-by: Rusty Russell <[email protected]>
Signed-off-by: Rusty Russell <[email protected]>
Signed-off-by: Rusty Russell <[email protected]>
…st vector. And include the final destination enctlv. Signed-off-by: Rusty Russell <[email protected]>
This builds on the enctlv vectors, but actually goes all the way to creating a modern onionmessage. Thanks to Thomas H for corrections! Signed-off-by: Rusty Russell <[email protected]>
As noted by Joost. Signed-off-by: Rusty Russell <[email protected]>
As of 2b923a0367c5f9154fcec706e3302cc4658dd889. Recurrence quotes need to be marked separately, since they're no longer in offers main bolt. Signed-off-by: Rusty Russell <[email protected]>
We also move recurrence fields into a separate spec patch. Signed-off-by: Rusty Russell <[email protected]>
Signed-off-by: Rusty Russell <[email protected]>
This has been here for a while: self_id hangs around while we're calling the hook, but now it triggers sometimes. ``` E ValueError: E Node errors: E Global errors: E - Node /tmp/ltests-3mcyp67u/test_dev_rawrequest_1/lightning-1/ has memory leaks: [ E { E "backtrace": [ E "ccan/ccan/tal/tal.c:442 (tal_alloc_)", E "gossipd/gossipd_wiregen.c:528 (fromwire_gossipd_got_onionmsg_to_us)", E "lightningd/onion_message.c:152 (handle_onionmsg_to_us)", E "lightningd/gossip_control.c:137 (gossip_msg)", E "lightningd/subd.c:548 (sd_msg_read)", E "ccan/ccan/io/io.c:59 (next_plan)", E "ccan/ccan/io/io.c:407 (do_plan)", E "ccan/ccan/io/io.c:417 (io_ready)", E "ccan/ccan/io/poll.c:453 (io_loop)", E "lightningd/io_loop_with_timers.c:21 (io_loop_with_timers)", E "lightningd/lightningd.c:1164 (main)" E ], E "label": "gossipd/gossipd_wiregen.c:528:struct secret", E "parents": [ E "lightningd/onion_message.c:149:struct onion_message_hook_payload", E "lightningd/plugin_hook.c:81:struct hook_instance *[]" E ], E "value": "0x55cf3cbc9458" E } E ] ```
491e8d9
to
afb91fd
Compare
Re-rebased on master. |
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 afb91fd
Once again, we support old and new onions. First I remove the old-old spec versions. Then I rename the new to obs2. Then add the new ones. Then make sure we send and receive both OK.
This should comply with the latest route blinding lightning/bolts#765 and onion message lightning/bolts#759 proposals.
Thanks to @t-bast and @thomash-acinq and @joostjager for all the feedback!