htlcswitch: allow variable length failure messages in channel state machine#7031
Closed
joostjager wants to merge 2 commits intolightningnetwork:masterfrom
Closed
htlcswitch: allow variable length failure messages in channel state machine#7031joostjager wants to merge 2 commits intolightningnetwork:masterfrom
joostjager wants to merge 2 commits intolightningnetwork:masterfrom
Conversation
6ccf5fa to
ed7dcf8
Compare
Crypt-iQ
reviewed
Nov 11, 2022
| // bytes. | ||
| failReason := pd.FailReason | ||
| if len(pd.FailReason) >= varLenFailureMarkerLen { | ||
| failReason = failReason[varLenFailureMarkerLen:] |
Collaborator
There was a problem hiding this comment.
I think this logic would also have to be in reforwardSettleFails in the switch. otherwise i think it's possible that we receive a failure reason near 65535 bytes, add 300 bytes, and then the switch reforwards the failure and the incoming link is unable to send the message given the wire constraint
Contributor
Author
There was a problem hiding this comment.
Ah yes, it should indeed. But I guess this PR is no longer relevant as we decided to only allow 256+ byte failures. Adding the marker length was intended as a solution to also support variable length short failures.
Contributor
Author
|
In #6913 (comment), we decided to simply not allow failure messages shorter than 256 bytes. Closing this for now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR shows an alternative approach to support variable length failure messages that is less invasive than #7030.
Required for #6913