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

Add support for onion errors larger than 256 bytes #2438

Closed
t-bast opened this issue Sep 27, 2022 · 0 comments · Fixed by #2441
Closed

Add support for onion errors larger than 256 bytes #2438

t-bast opened this issue Sep 27, 2022 · 0 comments · Fixed by #2441

Comments

@t-bast
Copy link
Member

t-bast commented Sep 27, 2022

When receiving an onion error, the spec says that we should verify it's no larger than 256 bytes.
But this is just a SHOULD, not a MUST, and it could be useful in the future to make this larger.
We currently don't support lengths greater than 256 byte, but this should be easy to change now on the reader side without creating any backwards-compatibility issue, and we will allow us to introduce bigger errors in the future once everyone supports reading them.

See lightning/bolts#1021 for more context.

t-bast added a commit that referenced this issue Sep 29, 2022
The specification recommends using a length of 256 for onion errors, but
it doesn't say that we should reject errors that use a different length.

We may want to start creating errors with a bigger length than 256 if we
need to transmit more data to the sender. In order to prepare for this,
we keep creating 256-bytes onion errors, but allow receiving errors of
arbitrary length.

See the specification here: lightning/bolts#1021

Fixes #2438
@t-bast t-bast closed this as completed in c385ca2 Nov 4, 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 a pull request may close this issue.

1 participant