Skip to content

Add tlv stream to onion failures#2455

Merged
t-bast merged 4 commits intomasterfrom
onion-error-tlv-stream
Jan 6, 2023
Merged

Add tlv stream to onion failures#2455
t-bast merged 4 commits intomasterfrom
onion-error-tlv-stream

Conversation

@t-bast
Copy link
Member

@t-bast t-bast commented Oct 11, 2022

Extend every onion failure with an optional tlv stream, as specified here: lightning/bolts#1021

I have verified cross-compatibility with lnd (lightningnetwork/lnd#6967) in both directions (reading and writing a tlv stream) and the spec PR has been merged, so this is ready to integrate.

@t-bast t-bast force-pushed the onion-error-tlv-stream branch from 2c57857 to 9bbe335 Compare October 11, 2022 14:48
t-bast referenced this pull request Nov 7, 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 force-pushed the onion-error-tlv-stream branch from 9bbe335 to 755ad64 Compare November 22, 2022 12:58
@t-bast t-bast force-pushed the onion-error-tlv-stream branch from 755ad64 to 9167012 Compare December 16, 2022 10:36
Extend every onion failure with an optional tlv stream.

See the specification here: lightning/bolts#1021
@t-bast t-bast force-pushed the onion-error-tlv-stream branch from 9167012 to f67f23c Compare January 3, 2023 14:47
@t-bast t-bast marked this pull request as ready for review January 3, 2023 14:47
@t-bast t-bast requested a review from pm47 January 3, 2023 14:47
@t-bast t-bast requested a review from pm47 January 5, 2023 16:10
@t-bast t-bast merged commit c9c5638 into master Jan 6, 2023
@t-bast t-bast deleted the onion-error-tlv-stream branch January 6, 2023 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants