From 11dea595044c72cb556b1df6b4234082a375dffa Mon Sep 17 00:00:00 2001 From: niftynei Date: Thu, 9 Nov 2023 22:27:30 -0600 Subject: [PATCH] tx-abort: port over meaning of the `data` field from `warning` `tx_abort`'s structure comes from the `warning`/`error` messages, but we failed to port over the rationale/rules for the `data` field. Suggested-By: @morehouse --- 02-peer-protocol.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/02-peer-protocol.md b/02-peer-protocol.md index b9faa7c..0c02a41 100644 --- a/02-peer-protocol.md +++ b/02-peer-protocol.md @@ -533,6 +533,10 @@ they may obtain incoming liquidity at no cost). A sending node: - MUST NOT have already transmitted `tx_signatures` - SHOULD forget the current negotiation and reset their state. + - MAY send an empty `data` field. + - when failure was caused by an invalid signature check: + - SHOULD include the raw, hex-encoded transaction in reply to a + `tx_signatures` or `commitment_signed` message. A receiving node: - if they have already sent `tx_signatures` to the peer: @@ -542,6 +546,10 @@ A receiving node: - SHOULD forget the current negotiation and reset their state. - if they have not sent `tx_abort`: - MUST echo back `tx_abort` + - if `data` is not composed solely of printable ASCII characters (For + reference: the printable character set includes byte values 32 through + 126, inclusive): + - SHOULD NOT print out `data` verbatim. #### Rationale