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

Remove legacy onion support, simplify internal APIs #5639

Merged

Conversation

rustyrussell
Copy link
Contributor

This is lightning/bolts#962 which should be merged by the time we release!

… var_onion_optin compulsory."

Signed-off-by: Rusty Russell <[email protected]>
We still have an "enum forward_style" for the database, where old-style
forwards can still exist.

Signed-off-by: Rusty Russell <[email protected]>
Changelog-Removed: Protocol: we no longer forward HTLCs with legacy onions.
@rustyrussell rustyrussell added this to the v22.10 milestone Sep 28, 2022
@rustyrussell rustyrussell force-pushed the guilt/no-more-legacy-onion branch from d15011c to 97a0449 Compare September 28, 2022 04:40
In particular, remove special routines to pull length: it's there,
take it and check it yourself.

Signed-off-by: Rusty Russell <[email protected]>
"sphinx_add_hop" takes a literal hop to include,
"sphinx_add_modern_hop" prepends the length.  Now we always prepend a
length, make it clear that the literal version is a shortcut:

* sphinx_add_hop -> sphinx_add_hop_has_length
* sphinx_add_modern_hop -> sphinx_add_hop

In addition, we check that length is actually correct!  This means
`createonion` can no longer create legacy or otherwise-invalid onions:
fix tests and update man page to remove legacy usage.

Signed-off-by: Rusty Russell <[email protected]>
Changelog-Changed: JSON-RPC: `createonion` no longer allows non-TLV-style payloads.
@rustyrussell rustyrussell force-pushed the guilt/no-more-legacy-onion branch from 97a0449 to 8530c4e Compare September 28, 2022 04:49
@cdecker
Copy link
Member

cdecker commented Sep 28, 2022

ACK 8530c4e

@cdecker cdecker merged commit f00cc23 into ElementsProject:master Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants