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

Variable size for trampoline onion #2810

Merged
merged 2 commits into from Jan 15, 2024
Merged

Conversation

thomash-acinq
Copy link
Member

The size of trampoline onions was fixed at 400 bytes. We remove this limit, allowing larger trampoline onions when necessary. For backward compatibility, anything that used to fit in a 400 bytes onion still uses a 400 bytes onion (even if it could fit in less). Payments with large metadata that would fail because of the 400 bytes limit are now possible and the onion uses exactly the size that's needed, nothing more, nothing less. The size of the trampoline onion is still constrained by the size of the standard onion (1300 bytes).

The size of trampoline onions was fixed at 400 bytes. We remove this limit, allowing larger trampoline onions when necessary.
For backward compatibility, anything that used to fit in a 400 bytes onion still uses a 400 bytes onion (even if it could fit in less).
Payments with large metadata that would fail because of the 400 bytes limit are now possible and the onion uses exactly the size that's needed, nothing more, nothing less.
The size of the trampoline onion is still constrained by the size of the standard onion (1300 bytes).
We don't need to keep creating 400-bytes trampoline payloads, as nobody
is using eclair to _send_ trampoline payments, only to relay them, and
at that stage it is backwards-compatible to support smaller and bigger
onion sizes.
Copy link
Member

@t-bast t-bast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@thomash-acinq thomash-acinq merged commit 5fb9fef into master Jan 15, 2024
1 check passed
@thomash-acinq thomash-acinq deleted the variable-size-trampoline branch January 15, 2024 10:09
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.

None yet

2 participants