bolt04: add explicit requirement for final nodes to reject short_channel_id #1303
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.
Final nodes should reject payments that include
short_channel_idin their payload, as this field is only meaningful for forwarding nodes. While BOLT 4 specifies that writers MUST NOT includeshort_channel_idfor the final node, it doesn't explicitly require final nodes to return an error when this field is present.Current spec (writer requirements):
Current spec (reader requirements):
This ambiguity has led to implementation inconsistencies:
This inconsistency was discovered through differential fuzzing (bitcoinfuzz), where the same onion was rejected by LND and rust-lightning but accepted by Core Lightning.
This PR adds an explicit requirement for final nodes to return an error if
short_channel_idis present in the payload, making the validation requirements consistent with the writer requirements.