Skip to content

Commit

Permalink
fixup! BOLT 1: Restore all-zero error semantics
Browse files Browse the repository at this point in the history
Whitespace, and make it clear you can send all-zero.
  • Loading branch information
rustyrussell committed Jan 3, 2022
1 parent 0dc1745 commit 119dffc
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions 01-messaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -339,21 +339,25 @@ A sending node:
- SHOULD send `error` with the unknown `channel_id` in reply to messages of type `32`-`255` related to unknown channels.
- when sending `error`:
- MUST fail the channel(s) referred to by the error message.
- MAY set `channel_id` to all zero to indicate all channels.
- when sending `warning`:
- MAY set `channel_id` to all zero if the warning is not related to a specific channel.
- MAY set `channel_id` to all zero if the warning is not related to a specific channel.
- MAY close the connection after sending.
- 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 `funding_created`, `funding_signed`, `closing_signed`, or `commitment_signed` message.

The receiving node:
- upon receiving `error`:
- MUST fail the channel referred to by `channel_id`, if that channel is with the sending node.
- if `channel_id` is all zero:
- MUST fail all channels with the sending node.
- otherwise:
- MUST fail the channel referred to by `channel_id`, if that channel is with the sending node.
- upon receiving `warning`:
- SHOULD log the message for later diagnosis.
- MAY disconnect.
- MAY reconnect after some delay to retry.
- MAY attempt `shutdown` if permitted at this point.
- MAY disconnect.
- MAY reconnect after some delay to retry.
- MAY attempt `shutdown` if permitted at this point.
- if no existing channel is referred to by `channel_id`:
- MUST ignore the message.
- if `data` is not composed solely of printable ASCII characters (For reference: the printable character set includes byte values 32 through 126, inclusive):
Expand Down

0 comments on commit 119dffc

Please sign in to comment.