2016-11-30 21:42:22 +01:00
# BOLT #1: Base Protocol
2016-11-30 21:05:50 +01:00
2016-11-30 21:42:22 +01:00
## Overview
2017-11-18 22:04:58 +01:00
2016-11-30 21:42:22 +01:00
This protocol assumes an underlying authenticated and ordered transport mechanism that takes care of framing individual messages.
2016-12-06 15:54:10 +01:00
[BOLT #8 ](08-transport.md ) specifies the canonical transport layer used in Lightning, though it can be replaced by any transport that fulfills the above guarantees.
2016-11-30 21:05:50 +01:00
2017-11-09 22:30:53 +01:00
The default TCP port is 9735. This corresponds to hexadecimal `0x2607` : the Unicode code point for LIGHTNING.< sup > [1](#reference-1)</ sup >
2016-11-30 21:05:50 +01:00
2018-02-16 02:25:04 +01:00
All data fields are unsigned big-endian unless otherwise specified.
2016-11-30 21:05:50 +01:00
2016-12-05 12:45:47 +01:00
## Table of Contents
2017-11-18 22:04:58 +01:00
copy-edit 01-messaging for appropriate grammer, punctuation, and style
Edit 01-messaging copy for clarity (minor rephrasing, punctuation),
correctness (grammar, capitalization, punctuation),
consision (minimizing wordiness, redundancy),
and consistency (document style, e.g. 1 space between sentences,
capitalization of headers, etc.)
2017-11-04 17:09:24 +01:00
* [Connection Handling and Multiplexing ](#connection-handling-and-multiplexing )
2016-12-05 12:45:47 +01:00
* [Lightning Message Format ](#lightning-message-format )
2019-04-30 04:35:56 +02:00
* [Type-Length-Value Format ](#type-length-value-format )
2016-12-05 12:47:59 +01:00
* [Setup Messages ](#setup-messages )
copy-edit 01-messaging for appropriate grammer, punctuation, and style
Edit 01-messaging copy for clarity (minor rephrasing, punctuation),
correctness (grammar, capitalization, punctuation),
consision (minimizing wordiness, redundancy),
and consistency (document style, e.g. 1 space between sentences,
capitalization of headers, etc.)
2017-11-04 17:09:24 +01:00
* [The `init` Message ](#the-init-message )
* [The `error` Message ](#the-error-message )
BOLT 1: introduce `ping` and `pong` control messages (#134)
Connections between nodes within the network may be very long lived as
payment channels have an indefinite lifetime. However, it’s likely that
for a significant portion of the life-time of a connection, no new data
will be exchanged. Additionally, on several platforms it’s possible that
Lightning clients will be put to sleep without prior warning. As a
result, we use a distinct ping message in order to probe for the
liveness of the connection on the other side, and also to keep the
established connection active.
This commit adds two new control messages to the protocol: `ping` and
`pong`. Their usage within the network is similar to the usage of such
message within other established protocols: `ping` messages specify a
number of bytes to be contained in the payload of a `pong` message, and
`pong` messages are to be sent in response to receiving a `ping` message.
Additionally, the ability for a sender to request that the receiver send
a response with a particular number of bytes enables nodes on the
network to create synthetic traffic. Such traffic can be used to
partially defend against packet and timing analysis as nodes can fake
the traffic patterns of typical exchanges, without applying any true
updates to their respective channels.
When combined with the onion routing protocol defined in BOLT#4, careful
statistically driven synthetic traffic can serve to further bolster the
privacy of participants within the network.
As a bonus, the usage of periodic `ping` message ensures frequent key
rotation between connected nodes.
[ The result is a bikeshed of every possible color! -- RR ]
2017-04-04 05:24:50 +02:00
* [Control Messages ](#control-messages )
copy-edit 01-messaging for appropriate grammer, punctuation, and style
Edit 01-messaging copy for clarity (minor rephrasing, punctuation),
correctness (grammar, capitalization, punctuation),
consision (minimizing wordiness, redundancy),
and consistency (document style, e.g. 1 space between sentences,
capitalization of headers, etc.)
2017-11-04 17:09:24 +01:00
* [The `ping` and `pong` Messages ](#the-ping-and-pong-messages )
2017-05-02 08:47:06 +02:00
* [Acknowledgments ](#acknowledgments )
2016-12-05 12:45:47 +01:00
* [References ](#references )
* [Authors ](#authors )
copy-edit 01-messaging for appropriate grammer, punctuation, and style
Edit 01-messaging copy for clarity (minor rephrasing, punctuation),
correctness (grammar, capitalization, punctuation),
consision (minimizing wordiness, redundancy),
and consistency (document style, e.g. 1 space between sentences,
capitalization of headers, etc.)
2017-11-04 17:09:24 +01:00
## Connection Handling and Multiplexing
2017-02-14 16:02:44 +01:00
2017-11-20 23:24:02 +01:00
Implementations MUST use a single connection per peer; channel messages (which include a channel ID) are multiplexed over this single connection.
2017-02-14 16:02:44 +01:00
2016-11-30 21:05:50 +01:00
## Lightning Message Format
2017-11-09 22:30:53 +01:00
After decryption, all Lightning messages are of the form:
2016-11-30 21:05:50 +01:00
2017-11-24 07:15:16 +01:00
1. `type` : a 2-byte big-endian field indicating the type of message
2017-11-20 23:24:02 +01:00
2. `payload` : a variable-length payload that comprises the remainder of
2017-11-24 07:15:16 +01:00
the message and that conforms to a format matching the `type`
2016-11-30 21:05:50 +01:00
2016-11-30 21:42:22 +01:00
The `type` field indicates how to interpret the `payload` field.
2017-11-20 23:24:02 +01:00
The format for each individual type is defined by a specification in this repository.
2017-11-10 08:23:53 +01:00
The type follows the _it's ok to be odd_ rule, so nodes MAY send _odd_ -numbered types without ascertaining that the recipient understands it.
2017-11-04 22:43:56 +01:00
2017-11-09 22:30:53 +01:00
A sending node:
2017-11-20 23:24:02 +01:00
- MUST NOT send an evenly-typed message not listed here without prior negotiation.
2017-11-09 22:30:53 +01:00
A receiving node:
2017-11-10 08:23:53 +01:00
- upon receiving a message of _odd_ , unknown type:
2017-11-10 03:55:40 +01:00
- MUST ignore the received message.
2017-11-10 08:23:53 +01:00
- upon receiving a message of _even_ , unknown type:
2017-11-10 03:55:40 +01:00
- MUST fail the channels.
2016-11-30 21:05:50 +01:00
2017-11-20 23:24:02 +01:00
The messages are grouped logically into four groups, ordered by the most significant bit that is set:
2016-12-06 15:54:10 +01:00
2017-11-24 07:15:16 +01:00
- Setup & Control (types `0` -`31`): messages related to connection setup, control, supported features, and error reporting (described below)
- Channel (types `32` -`127`): messages used to setup and tear down micropayment channels (described in [BOLT #2 ](02-peer-protocol.md ))
- Commitment (types `128` -`255`): messages related to updating the current commitment transaction, which includes adding, revoking, and settling HTLCs as well as updating fees and exchanging signatures (described in [BOLT #2 ](02-peer-protocol.md ))
2018-01-04 22:56:03 +01:00
- Routing (types `256` -`511`): messages containing node and channel announcements, as well as any active route exploration (described in [BOLT #7 ](07-routing-gossip.md ))
2016-12-06 15:54:10 +01:00
2017-11-20 23:24:02 +01:00
The size of the message is required by the transport layer to fit into a 2-byte unsigned int; therefore, the maximum possible size is 65535 bytes.
2017-11-04 22:43:56 +01:00
2017-11-14 02:48:03 +01:00
A node:
2017-11-20 23:24:02 +01:00
- MUST ignore any additional data within a message beyond the length that it expects for that type.
2017-11-10 03:55:40 +01:00
- upon receiving a known message with insufficient length for the contents:
2017-11-10 04:03:08 +01:00
- MUST fail the channels.
2018-06-26 22:48:44 +02:00
- that negotiates an option in this specification:
2017-11-14 02:48:03 +01:00
- MUST include all the fields annotated with that option.
2016-11-30 21:05:50 +01:00
### Rationale
2017-11-20 23:24:02 +01:00
By default `SHA2` and Bitcoin public keys are both encoded as
big endian, thus it would be unusual to use a different endian for
2016-11-30 21:05:50 +01:00
other fields.
Length is limited to 65535 bytes by the cryptographic wrapping, and
messages in the protocol are never more than that length anyway.
2017-11-10 08:23:53 +01:00
The _it's ok to be odd_ rule allows for future optional extensions
2017-11-09 22:30:53 +01:00
without negotiation or special coding in clients. The "ignore
2016-11-30 21:05:50 +01:00
additional data" rule similarly allows for future expansion.
2017-11-15 11:55:16 +01:00
Implementations may prefer to have message data aligned on an 8-byte
2017-11-09 22:30:53 +01:00
boundary (the largest natural alignment requirement of any type here);
2017-11-15 11:55:16 +01:00
however, adding a 6-byte padding after the type field was considered
2016-11-30 21:05:50 +01:00
wasteful: alignment may be achieved by decrypting the message into
2017-11-15 11:55:16 +01:00
a buffer with 6-bytes of pre-padding.
2016-11-30 21:05:50 +01:00
2019-04-30 04:35:56 +02:00
## Type-Length-Value Format
Throughout the protocol, a TLV (Type-Length-Value) format is used to allow for
the backwards-compatible addition of new fields to existing message types.
A `tlv_record` represents a single field, encoded in the form:
* [`varint`: `type` ]
* [`varint`: `length` ]
* [`length`: `value` ]
A `tlv_stream` is a series of (possibly zero) `tlv_record` s, represented as the
concatenation of the encoded `tlv_record` s. When used to extend existing
messages, a `tlv_stream` is typically placed after all currently defined fields.
The `type` is a varint encoded using the bitcoin CompactSize format. It
functions as a message-specific, 64-bit identifier for the `tlv_record`
determining how the contents of `value` should be decoded.
The `length` is a varint encoded using the bitcoin CompactSize format
signaling the size of `value` in bytes.
The `value` depends entirely on the `type` , and should be encoded or decoded
according to the message-specific format determined by `type` .
### Requirements
The sending node:
- MUST order `tlv_record` s in a `tlv_stream` by monotonically-increasing `type` .
- MUST minimally encode `type` and `length` .
- SHOULD NOT use redundant, variable-length encodings in a `tlv_record` .
The receiving node:
- if zero bytes remain before parsing a `type` :
- MUST stop parsing the `tlv_stream` .
- if a `type` or `length` is not minimally encoded:
- MUST fail to parse the `tlv_stream` .
- if decoded `type` s are not monotonically-increasing:
- MUST fail to parse the `tlv_stream` .
- if `type` is known:
- MUST decode the next `length` bytes using the known encoding for `type` .
- otherwise, if `type` is unknown:
- if `type` is even:
- MUST fail to parse the `tlv_stream` .
- otherwise, if `type` is odd:
- MUST discard the next `length` bytes.
### Rationale
The primary advantage in using TLV is that a reader is able to ignore new fields
that it does not understand, since each field carries the exact size of the
encoded element. Without TLV, even if a node does not wish to use a particular
field, the node is forced to add parsing logic for that field in order to
determine the offset of any fields that follow.
The monotonicity constraint ensures that all `type` s are unique and can appear
at most once. Fields that map to complex objects, e.g. vectors, maps, or
structs, should do so by defining the encoding such that the object is
serialized within a single `tlv_record` . The uniqueness constraint, among other
things, enables the following optimizations:
- canonical ordering is defined independent of the encoded `value` s.
- canonical ordering can be known at compile-time, rather that being determined
dynamically at the time of encoding.
- verifying canonical ordering requires less state and is less-expensive.
- variable-size fields can reserve their expected size up front, rather than
appending elements sequentially and incurring double-and-copy overhead.
The use of a varint for `type` and `length` permits a space savings for small
`type` s or short `value` s. This potentially leaves more space for application
data over the wire or in an onion payload.
All `type` s must appear in increasing order to create a canonical encoding of
the underlying `tlv_record` s. This is crucial when computing signatures over a
`tlv_stream` , as it ensures verifiers will be able to recompute the same message
digest as the signer. Note that the canonical ordering over the set of fields
can be enforced even if the verifier does not understand what the fields
contain.
Writers should avoid using redundant, variable-length encodings in a
`tlv_record` since this results in encoding the length twice and complicates
computing the outer length. As an example, when writing a variable length byte
array, the `value` should contain only the raw bytes and forgo an additional
internal length since the `tlv_record` already carries the number of bytes that
follow. On the other hand, if a `tlv_record` contains multiple, variable-length
elements then this would not be considered redundant, and is needed to allow the
receiver to parse individual elements from `value` .
2016-12-05 12:45:47 +01:00
## Setup Messages
copy-edit 01-messaging for appropriate grammer, punctuation, and style
Edit 01-messaging copy for clarity (minor rephrasing, punctuation),
correctness (grammar, capitalization, punctuation),
consision (minimizing wordiness, redundancy),
and consistency (document style, e.g. 1 space between sentences,
capitalization of headers, etc.)
2017-11-04 17:09:24 +01:00
### The `init` Message
2017-11-18 22:04:58 +01:00
2017-01-05 00:47:26 +01:00
Once authentication is complete, the first message reveals the features supported or required by this node, even if this is a reconnection.
2017-05-25 02:13:31 +02:00
2017-11-24 06:21:29 +01:00
[BOLT #9 ](09-features.md ) specifies lists of global and local features. Each feature is generally represented in `globalfeatures` or `localfeatures` by 2 bits. The least-significant bit is numbered 0, which is _even_ , and the next most significant bit is numbered 1, which is _odd_ .
2017-05-25 02:13:31 +02:00
2017-11-10 23:05:21 +01:00
Both fields `globalfeatures` and `localfeatures` MUST be padded to bytes with 0s.
2016-11-30 21:05:50 +01:00
1. type: 16 (`init`)
2. data:
2017-05-09 08:58:11 +02:00
* [`2`:`gflen`]
* [`gflen`:`globalfeatures`]
* [`2`:`lflen`]
* [`lflen`:`localfeatures`]
2016-11-30 21:05:50 +01:00
2017-11-15 11:55:16 +01:00
The 2-byte `gflen` and `lflen` fields indicate the number of bytes in the immediately following field.
2016-11-30 21:05:50 +01:00
2016-12-05 12:45:47 +01:00
#### Requirements
2016-11-30 21:05:50 +01:00
2017-11-04 22:43:56 +01:00
The sending node:
2017-11-10 03:55:40 +01:00
- MUST send `init` as the first Lightning message for any connection.
- MUST set feature bits as defined in [BOLT #9 ](09-features.md ).
2017-11-10 23:05:21 +01:00
- MUST set any undefined feature bits to 0.
2017-11-10 03:55:40 +01:00
- SHOULD use the minimum lengths required to represent the feature fields.
2016-11-30 21:05:50 +01:00
2017-11-05 02:53:46 +01:00
The receiving node:
2017-11-10 03:55:40 +01:00
- MUST wait to receive `init` before sending any other messages.
- MUST respond to known feature bits as specified in [BOLT #9 ](09-features.md ).
2017-12-08 04:50:04 +01:00
- upon receiving unknown _odd_ feature bits that are non-zero:
2017-11-10 03:55:40 +01:00
- MUST ignore the bit.
2017-12-08 04:50:04 +01:00
- upon receiving unknown _even_ feature bits that are non-zero:
2017-11-10 03:55:40 +01:00
- MUST fail the connection.
2016-11-30 21:05:50 +01:00
2016-12-05 12:45:47 +01:00
#### Rationale
2016-11-30 21:05:50 +01:00
2017-11-09 22:30:53 +01:00
This semantic allows both future incompatible changes and future backward compatible changes. Bits should generally be assigned in pairs, in order that optional features may later become compulsory.
2016-11-30 21:05:50 +01:00
Nodes wait for receipt of the other's features to simplify error
2017-11-20 23:24:02 +01:00
diagnosis when features are incompatible.
2016-11-30 21:05:50 +01:00
2017-11-09 22:30:53 +01:00
The feature masks are split into local features (which only affect the
2017-11-15 11:55:16 +01:00
protocol between these two nodes) and global features (which can affect
2017-11-20 23:24:02 +01:00
HTLCs and are thus also advertised to other nodes).
2016-11-30 21:05:50 +01:00
copy-edit 01-messaging for appropriate grammer, punctuation, and style
Edit 01-messaging copy for clarity (minor rephrasing, punctuation),
correctness (grammar, capitalization, punctuation),
consision (minimizing wordiness, redundancy),
and consistency (document style, e.g. 1 space between sentences,
capitalization of headers, etc.)
2017-11-04 17:09:24 +01:00
### The `error` Message
2016-11-30 21:05:50 +01:00
2017-11-09 22:30:53 +01:00
For simplicity of diagnosis, it's often useful to tell a peer that something is incorrect.
2016-11-30 21:05:50 +01:00
1. type: 17 (`error`)
2. data:
2017-05-09 08:58:11 +02:00
* [`32`:`channel_id`]
* [`2`:`len`]
* [`len`:`data`]
2016-11-30 21:05:50 +01:00
2016-11-30 21:42:22 +01:00
The 2-byte `len` field indicates the number of bytes in the immediately following field.
2016-11-30 21:05:50 +01:00
2016-12-05 12:45:47 +01:00
#### Requirements
2016-11-30 21:05:50 +01:00
2017-11-10 23:05:21 +01:00
The channel is referred to by `channel_id` , unless `channel_id` is 0 (i.e. all bytes are 0), in which case it refers to all channels.
BOLT 0,1,2,7: use txout not channel-id for demuxing. (#119)
At cost of a few extra bytes between peers, this avoids the whole "oops, we were on a chain fork" problem, and simplifies generation of temporary channel-ids (just pick a random one).
Now we move the announcement_signature exchange to at least 6 confirms, which makes re-xmit tricky; I resolved that by insisting on reconnect that we send if we haven't received, and reply to the first one.
The term "channel shortid" wasn't used anywhere, so I removed it; it's now a gossip-only thing anyway.
One subtle change: pkt_error on unknown channels is now "MUST ignore"; this section was reworked anyway, and we'll want this if the #120 goes through, where one side might have forgotten unformed channels).
Closes: #114
Suggested-by: Olaoluwa Osuntokun <laolu32@gmail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* FIXUP! Two bytes for funding-output-index.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* FIXUP! Channel-id rework, temp ids, 32 bits only.
Re-add the idea of temporary channel ids: far simpler since they're now
big enough we can just fill with noise.
Remove the alignment issues by combining txid and outnum using XOR; we
could reduce to 128 bit if we really wanted to, but we don't.
Error handling is now simple again, but while editing I changed the
behaviour for unknown channels to MUST ignore (this is important for
Change the 8-byte gossip channel id to `short-channel-id`.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* FIXUP! Minor text tweaks from Pierre-Marie and Christian
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-03-02 05:20:13 +01:00
2017-11-05 02:53:46 +01:00
The funding node:
2017-11-10 03:55:40 +01:00
- for all error messages sent before (and including) the `funding_created` message:
- MUST use `temporary_channel_id` in lieu of `channel_id` .
2017-11-05 02:53:46 +01:00
The fundee node:
2017-11-10 03:55:40 +01:00
- for all error messages sent before (and not including) the `funding_signed` message:
- MUST use `temporary_channel_id` in lieu of `channel_id` .
2017-04-28 17:00:12 +02:00
2017-11-09 22:30:53 +01:00
A sending node:
2017-11-10 03:55:40 +01:00
- when sending `error` :
- MUST fail the channel referred to by the error message.
2017-11-20 23:24:02 +01:00
- SHOULD send `error` for protocol violations or internal errors that make channels unusable or that make further communication unusable.
2018-10-05 15:02:20 +02:00
- SHOULD send `error` with the unknown `channel_id` in reply to messages of type `32` -`255` related to unknown channels.
2017-11-10 03:55:40 +01:00
- 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.
2017-11-10 23:05:21 +01:00
- when `channel_id` is 0:
2018-05-14 03:12:08 +02:00
- MUST fail all channels with the receiving node.
2017-11-15 11:55:16 +01:00
- MUST close the connection.
2017-11-10 03:55:40 +01:00
- MUST set `len` equal to the length of `data` .
2016-11-30 21:05:50 +01:00
2017-11-04 22:43:56 +01:00
The receiving node:
2017-11-10 03:55:40 +01:00
- upon receiving `error` :
2018-05-14 03:12:08 +02:00
- MUST fail the channel referred to by the error message, if that channel is with the sending node.
2017-11-10 03:55:40 +01:00
- if no existing channel is referred to by the message:
- MUST ignore the message.
- MUST truncate `len` to the remainder of the packet (if it's larger).
2017-12-05 19:02:41 +01:00
- if `data` is not composed solely of printable ASCII characters (For reference: the printable character set includes byte values 32 through 126, inclusive):
2017-11-15 11:55:16 +01:00
- SHOULD NOT print out `data` verbatim.
2016-11-30 21:05:50 +01:00
2016-12-05 12:45:47 +01:00
#### Rationale
2016-11-30 21:05:50 +01:00
2017-11-20 23:24:02 +01:00
There are unrecoverable errors that require an abort of conversations;
2017-11-09 22:30:53 +01:00
if the connection is simply dropped, then the peer may retry the
copy-edit 01-messaging for appropriate grammer, punctuation, and style
Edit 01-messaging copy for clarity (minor rephrasing, punctuation),
correctness (grammar, capitalization, punctuation),
consision (minimizing wordiness, redundancy),
and consistency (document style, e.g. 1 space between sentences,
capitalization of headers, etc.)
2017-11-04 17:09:24 +01:00
connection. It's also useful to describe protocol violations for
2017-11-09 22:30:53 +01:00
diagnosis, as this indicates that one peer has a bug.
2016-11-30 21:05:50 +01:00
It may be wise not to distinguish errors in production settings, lest
2017-11-09 22:30:53 +01:00
it leak information — hence, the optional `data` field.
2016-11-30 21:05:50 +01:00
BOLT 1: introduce `ping` and `pong` control messages (#134)
Connections between nodes within the network may be very long lived as
payment channels have an indefinite lifetime. However, it’s likely that
for a significant portion of the life-time of a connection, no new data
will be exchanged. Additionally, on several platforms it’s possible that
Lightning clients will be put to sleep without prior warning. As a
result, we use a distinct ping message in order to probe for the
liveness of the connection on the other side, and also to keep the
established connection active.
This commit adds two new control messages to the protocol: `ping` and
`pong`. Their usage within the network is similar to the usage of such
message within other established protocols: `ping` messages specify a
number of bytes to be contained in the payload of a `pong` message, and
`pong` messages are to be sent in response to receiving a `ping` message.
Additionally, the ability for a sender to request that the receiver send
a response with a particular number of bytes enables nodes on the
network to create synthetic traffic. Such traffic can be used to
partially defend against packet and timing analysis as nodes can fake
the traffic patterns of typical exchanges, without applying any true
updates to their respective channels.
When combined with the onion routing protocol defined in BOLT#4, careful
statistically driven synthetic traffic can serve to further bolster the
privacy of participants within the network.
As a bonus, the usage of periodic `ping` message ensures frequent key
rotation between connected nodes.
[ The result is a bikeshed of every possible color! -- RR ]
2017-04-04 05:24:50 +02:00
## Control Messages
copy-edit 01-messaging for appropriate grammer, punctuation, and style
Edit 01-messaging copy for clarity (minor rephrasing, punctuation),
correctness (grammar, capitalization, punctuation),
consision (minimizing wordiness, redundancy),
and consistency (document style, e.g. 1 space between sentences,
capitalization of headers, etc.)
2017-11-04 17:09:24 +01:00
### The `ping` and `pong` Messages
BOLT 1: introduce `ping` and `pong` control messages (#134)
Connections between nodes within the network may be very long lived as
payment channels have an indefinite lifetime. However, it’s likely that
for a significant portion of the life-time of a connection, no new data
will be exchanged. Additionally, on several platforms it’s possible that
Lightning clients will be put to sleep without prior warning. As a
result, we use a distinct ping message in order to probe for the
liveness of the connection on the other side, and also to keep the
established connection active.
This commit adds two new control messages to the protocol: `ping` and
`pong`. Their usage within the network is similar to the usage of such
message within other established protocols: `ping` messages specify a
number of bytes to be contained in the payload of a `pong` message, and
`pong` messages are to be sent in response to receiving a `ping` message.
Additionally, the ability for a sender to request that the receiver send
a response with a particular number of bytes enables nodes on the
network to create synthetic traffic. Such traffic can be used to
partially defend against packet and timing analysis as nodes can fake
the traffic patterns of typical exchanges, without applying any true
updates to their respective channels.
When combined with the onion routing protocol defined in BOLT#4, careful
statistically driven synthetic traffic can serve to further bolster the
privacy of participants within the network.
As a bonus, the usage of periodic `ping` message ensures frequent key
rotation between connected nodes.
[ The result is a bikeshed of every possible color! -- RR ]
2017-04-04 05:24:50 +02:00
2017-12-27 23:32:46 +01:00
In order to allow for the existence of long-lived TCP connections, at
BOLT 1: introduce `ping` and `pong` control messages (#134)
Connections between nodes within the network may be very long lived as
payment channels have an indefinite lifetime. However, it’s likely that
for a significant portion of the life-time of a connection, no new data
will be exchanged. Additionally, on several platforms it’s possible that
Lightning clients will be put to sleep without prior warning. As a
result, we use a distinct ping message in order to probe for the
liveness of the connection on the other side, and also to keep the
established connection active.
This commit adds two new control messages to the protocol: `ping` and
`pong`. Their usage within the network is similar to the usage of such
message within other established protocols: `ping` messages specify a
number of bytes to be contained in the payload of a `pong` message, and
`pong` messages are to be sent in response to receiving a `ping` message.
Additionally, the ability for a sender to request that the receiver send
a response with a particular number of bytes enables nodes on the
network to create synthetic traffic. Such traffic can be used to
partially defend against packet and timing analysis as nodes can fake
the traffic patterns of typical exchanges, without applying any true
updates to their respective channels.
When combined with the onion routing protocol defined in BOLT#4, careful
statistically driven synthetic traffic can serve to further bolster the
privacy of participants within the network.
As a bonus, the usage of periodic `ping` message ensures frequent key
rotation between connected nodes.
[ The result is a bikeshed of every possible color! -- RR ]
2017-04-04 05:24:50 +02:00
times it may be required that both ends keep alive the TCP connection at the
copy-edit 01-messaging for appropriate grammer, punctuation, and style
Edit 01-messaging copy for clarity (minor rephrasing, punctuation),
correctness (grammar, capitalization, punctuation),
consision (minimizing wordiness, redundancy),
and consistency (document style, e.g. 1 space between sentences,
capitalization of headers, etc.)
2017-11-04 17:09:24 +01:00
application level. Such messages also allow obfuscation of traffic patterns.
BOLT 1: introduce `ping` and `pong` control messages (#134)
Connections between nodes within the network may be very long lived as
payment channels have an indefinite lifetime. However, it’s likely that
for a significant portion of the life-time of a connection, no new data
will be exchanged. Additionally, on several platforms it’s possible that
Lightning clients will be put to sleep without prior warning. As a
result, we use a distinct ping message in order to probe for the
liveness of the connection on the other side, and also to keep the
established connection active.
This commit adds two new control messages to the protocol: `ping` and
`pong`. Their usage within the network is similar to the usage of such
message within other established protocols: `ping` messages specify a
number of bytes to be contained in the payload of a `pong` message, and
`pong` messages are to be sent in response to receiving a `ping` message.
Additionally, the ability for a sender to request that the receiver send
a response with a particular number of bytes enables nodes on the
network to create synthetic traffic. Such traffic can be used to
partially defend against packet and timing analysis as nodes can fake
the traffic patterns of typical exchanges, without applying any true
updates to their respective channels.
When combined with the onion routing protocol defined in BOLT#4, careful
statistically driven synthetic traffic can serve to further bolster the
privacy of participants within the network.
As a bonus, the usage of periodic `ping` message ensures frequent key
rotation between connected nodes.
[ The result is a bikeshed of every possible color! -- RR ]
2017-04-04 05:24:50 +02:00
1. type: 18 (`ping`)
copy-edit 01-messaging for appropriate grammer, punctuation, and style
Edit 01-messaging copy for clarity (minor rephrasing, punctuation),
correctness (grammar, capitalization, punctuation),
consision (minimizing wordiness, redundancy),
and consistency (document style, e.g. 1 space between sentences,
capitalization of headers, etc.)
2017-11-04 17:09:24 +01:00
2. data:
2017-05-09 08:58:11 +02:00
* [`2`:`num_pong_bytes`]
* [`2`:`byteslen`]
* [`byteslen`:`ignored`]
BOLT 1: introduce `ping` and `pong` control messages (#134)
Connections between nodes within the network may be very long lived as
payment channels have an indefinite lifetime. However, it’s likely that
for a significant portion of the life-time of a connection, no new data
will be exchanged. Additionally, on several platforms it’s possible that
Lightning clients will be put to sleep without prior warning. As a
result, we use a distinct ping message in order to probe for the
liveness of the connection on the other side, and also to keep the
established connection active.
This commit adds two new control messages to the protocol: `ping` and
`pong`. Their usage within the network is similar to the usage of such
message within other established protocols: `ping` messages specify a
number of bytes to be contained in the payload of a `pong` message, and
`pong` messages are to be sent in response to receiving a `ping` message.
Additionally, the ability for a sender to request that the receiver send
a response with a particular number of bytes enables nodes on the
network to create synthetic traffic. Such traffic can be used to
partially defend against packet and timing analysis as nodes can fake
the traffic patterns of typical exchanges, without applying any true
updates to their respective channels.
When combined with the onion routing protocol defined in BOLT#4, careful
statistically driven synthetic traffic can serve to further bolster the
privacy of participants within the network.
As a bonus, the usage of periodic `ping` message ensures frequent key
rotation between connected nodes.
[ The result is a bikeshed of every possible color! -- RR ]
2017-04-04 05:24:50 +02:00
The `pong` message is to be sent whenever a `ping` message is received. It
2017-11-09 22:30:53 +01:00
serves as a reply and also serves to keep the connection alive, while
BOLT 1: introduce `ping` and `pong` control messages (#134)
Connections between nodes within the network may be very long lived as
payment channels have an indefinite lifetime. However, it’s likely that
for a significant portion of the life-time of a connection, no new data
will be exchanged. Additionally, on several platforms it’s possible that
Lightning clients will be put to sleep without prior warning. As a
result, we use a distinct ping message in order to probe for the
liveness of the connection on the other side, and also to keep the
established connection active.
This commit adds two new control messages to the protocol: `ping` and
`pong`. Their usage within the network is similar to the usage of such
message within other established protocols: `ping` messages specify a
number of bytes to be contained in the payload of a `pong` message, and
`pong` messages are to be sent in response to receiving a `ping` message.
Additionally, the ability for a sender to request that the receiver send
a response with a particular number of bytes enables nodes on the
network to create synthetic traffic. Such traffic can be used to
partially defend against packet and timing analysis as nodes can fake
the traffic patterns of typical exchanges, without applying any true
updates to their respective channels.
When combined with the onion routing protocol defined in BOLT#4, careful
statistically driven synthetic traffic can serve to further bolster the
privacy of participants within the network.
As a bonus, the usage of periodic `ping` message ensures frequent key
rotation between connected nodes.
[ The result is a bikeshed of every possible color! -- RR ]
2017-04-04 05:24:50 +02:00
explicitly notifying the other end that the receiver is still active. Within
the received `ping` message, the sender will specify the number of bytes to be
copy-edit 01-messaging for appropriate grammer, punctuation, and style
Edit 01-messaging copy for clarity (minor rephrasing, punctuation),
correctness (grammar, capitalization, punctuation),
consision (minimizing wordiness, redundancy),
and consistency (document style, e.g. 1 space between sentences,
capitalization of headers, etc.)
2017-11-04 17:09:24 +01:00
included within the data payload of the `pong` message.
BOLT 1: introduce `ping` and `pong` control messages (#134)
Connections between nodes within the network may be very long lived as
payment channels have an indefinite lifetime. However, it’s likely that
for a significant portion of the life-time of a connection, no new data
will be exchanged. Additionally, on several platforms it’s possible that
Lightning clients will be put to sleep without prior warning. As a
result, we use a distinct ping message in order to probe for the
liveness of the connection on the other side, and also to keep the
established connection active.
This commit adds two new control messages to the protocol: `ping` and
`pong`. Their usage within the network is similar to the usage of such
message within other established protocols: `ping` messages specify a
number of bytes to be contained in the payload of a `pong` message, and
`pong` messages are to be sent in response to receiving a `ping` message.
Additionally, the ability for a sender to request that the receiver send
a response with a particular number of bytes enables nodes on the
network to create synthetic traffic. Such traffic can be used to
partially defend against packet and timing analysis as nodes can fake
the traffic patterns of typical exchanges, without applying any true
updates to their respective channels.
When combined with the onion routing protocol defined in BOLT#4, careful
statistically driven synthetic traffic can serve to further bolster the
privacy of participants within the network.
As a bonus, the usage of periodic `ping` message ensures frequent key
rotation between connected nodes.
[ The result is a bikeshed of every possible color! -- RR ]
2017-04-04 05:24:50 +02:00
1. type: 19 (`pong`)
2. data:
2017-05-09 08:58:11 +02:00
* [`2`:`byteslen`]
* [`byteslen`:`ignored`]
BOLT 1: introduce `ping` and `pong` control messages (#134)
Connections between nodes within the network may be very long lived as
payment channels have an indefinite lifetime. However, it’s likely that
for a significant portion of the life-time of a connection, no new data
will be exchanged. Additionally, on several platforms it’s possible that
Lightning clients will be put to sleep without prior warning. As a
result, we use a distinct ping message in order to probe for the
liveness of the connection on the other side, and also to keep the
established connection active.
This commit adds two new control messages to the protocol: `ping` and
`pong`. Their usage within the network is similar to the usage of such
message within other established protocols: `ping` messages specify a
number of bytes to be contained in the payload of a `pong` message, and
`pong` messages are to be sent in response to receiving a `ping` message.
Additionally, the ability for a sender to request that the receiver send
a response with a particular number of bytes enables nodes on the
network to create synthetic traffic. Such traffic can be used to
partially defend against packet and timing analysis as nodes can fake
the traffic patterns of typical exchanges, without applying any true
updates to their respective channels.
When combined with the onion routing protocol defined in BOLT#4, careful
statistically driven synthetic traffic can serve to further bolster the
privacy of participants within the network.
As a bonus, the usage of periodic `ping` message ensures frequent key
rotation between connected nodes.
[ The result is a bikeshed of every possible color! -- RR ]
2017-04-04 05:24:50 +02:00
#### Requirements
2017-11-09 22:30:53 +01:00
A node sending a `ping` message:
2017-11-15 11:55:16 +01:00
- SHOULD set `ignored` to 0s.
- MUST NOT set `ignored` to sensitive data such as secrets or portions of initialized
2017-11-05 02:53:46 +01:00
memory.
2017-11-10 03:55:40 +01:00
- if it doesn't receive a corresponding `pong` :
- MAY terminate the network connection,
2017-11-11 03:14:27 +01:00
- and MUST NOT fail the channels in this case.
2017-11-10 03:55:40 +01:00
- SHOULD NOT send `ping` messages more often than once every 30 seconds.
2017-11-09 22:30:53 +01:00
A node sending a `pong` message:
2017-11-15 11:55:16 +01:00
- SHOULD set `ignored` to 0s.
- MUST NOT set `ignored` to sensitive data such as secrets or portions of initialized
2017-11-09 22:30:53 +01:00
memory.
BOLT 1: introduce `ping` and `pong` control messages (#134)
Connections between nodes within the network may be very long lived as
payment channels have an indefinite lifetime. However, it’s likely that
for a significant portion of the life-time of a connection, no new data
will be exchanged. Additionally, on several platforms it’s possible that
Lightning clients will be put to sleep without prior warning. As a
result, we use a distinct ping message in order to probe for the
liveness of the connection on the other side, and also to keep the
established connection active.
This commit adds two new control messages to the protocol: `ping` and
`pong`. Their usage within the network is similar to the usage of such
message within other established protocols: `ping` messages specify a
number of bytes to be contained in the payload of a `pong` message, and
`pong` messages are to be sent in response to receiving a `ping` message.
Additionally, the ability for a sender to request that the receiver send
a response with a particular number of bytes enables nodes on the
network to create synthetic traffic. Such traffic can be used to
partially defend against packet and timing analysis as nodes can fake
the traffic patterns of typical exchanges, without applying any true
updates to their respective channels.
When combined with the onion routing protocol defined in BOLT#4, careful
statistically driven synthetic traffic can serve to further bolster the
privacy of participants within the network.
As a bonus, the usage of periodic `ping` message ensures frequent key
rotation between connected nodes.
[ The result is a bikeshed of every possible color! -- RR ]
2017-04-04 05:24:50 +02:00
2017-11-04 22:43:56 +01:00
A node receiving a `ping` message:
2017-11-15 11:55:16 +01:00
- SHOULD fail the channels if it has received significantly in excess of one `ping` per 30 seconds.
2017-11-10 03:55:40 +01:00
- if `num_pong_bytes` is less than 65532:
- MUST respond by sending a `pong` message, with `byteslen` equal to `num_pong_bytes` .
2017-11-10 08:23:53 +01:00
- otherwise (`num_pong_bytes` is **not** less than 65532):
2017-11-15 11:55:16 +01:00
- MUST ignore the `ping` .
BOLT 1: introduce `ping` and `pong` control messages (#134)
Connections between nodes within the network may be very long lived as
payment channels have an indefinite lifetime. However, it’s likely that
for a significant portion of the life-time of a connection, no new data
will be exchanged. Additionally, on several platforms it’s possible that
Lightning clients will be put to sleep without prior warning. As a
result, we use a distinct ping message in order to probe for the
liveness of the connection on the other side, and also to keep the
established connection active.
This commit adds two new control messages to the protocol: `ping` and
`pong`. Their usage within the network is similar to the usage of such
message within other established protocols: `ping` messages specify a
number of bytes to be contained in the payload of a `pong` message, and
`pong` messages are to be sent in response to receiving a `ping` message.
Additionally, the ability for a sender to request that the receiver send
a response with a particular number of bytes enables nodes on the
network to create synthetic traffic. Such traffic can be used to
partially defend against packet and timing analysis as nodes can fake
the traffic patterns of typical exchanges, without applying any true
updates to their respective channels.
When combined with the onion routing protocol defined in BOLT#4, careful
statistically driven synthetic traffic can serve to further bolster the
privacy of participants within the network.
As a bonus, the usage of periodic `ping` message ensures frequent key
rotation between connected nodes.
[ The result is a bikeshed of every possible color! -- RR ]
2017-04-04 05:24:50 +02:00
2017-11-04 22:43:56 +01:00
A node receiving a `pong` message:
2017-11-10 03:55:40 +01:00
- if `byteslen` does not correspond to any `ping` 's `num_pong_bytes` value it has sent:
- MAY fail the channels.
BOLT 1: introduce `ping` and `pong` control messages (#134)
Connections between nodes within the network may be very long lived as
payment channels have an indefinite lifetime. However, it’s likely that
for a significant portion of the life-time of a connection, no new data
will be exchanged. Additionally, on several platforms it’s possible that
Lightning clients will be put to sleep without prior warning. As a
result, we use a distinct ping message in order to probe for the
liveness of the connection on the other side, and also to keep the
established connection active.
This commit adds two new control messages to the protocol: `ping` and
`pong`. Their usage within the network is similar to the usage of such
message within other established protocols: `ping` messages specify a
number of bytes to be contained in the payload of a `pong` message, and
`pong` messages are to be sent in response to receiving a `ping` message.
Additionally, the ability for a sender to request that the receiver send
a response with a particular number of bytes enables nodes on the
network to create synthetic traffic. Such traffic can be used to
partially defend against packet and timing analysis as nodes can fake
the traffic patterns of typical exchanges, without applying any true
updates to their respective channels.
When combined with the onion routing protocol defined in BOLT#4, careful
statistically driven synthetic traffic can serve to further bolster the
privacy of participants within the network.
As a bonus, the usage of periodic `ping` message ensures frequent key
rotation between connected nodes.
[ The result is a bikeshed of every possible color! -- RR ]
2017-04-04 05:24:50 +02:00
### Rationale
2017-11-09 22:30:53 +01:00
The largest possible message is 65535 bytes; thus, the maximum sensible `byteslen`
is 65531 — in order to account for the type field (`pong`) and the `byteslen` itself. This allows
copy-edit 01-messaging for appropriate grammer, punctuation, and style
Edit 01-messaging copy for clarity (minor rephrasing, punctuation),
correctness (grammar, capitalization, punctuation),
consision (minimizing wordiness, redundancy),
and consistency (document style, e.g. 1 space between sentences,
capitalization of headers, etc.)
2017-11-04 17:09:24 +01:00
a convenient cutoff for `num_pong_bytes` to indicate that no reply should be sent.
2017-04-05 05:53:57 +02:00
2017-12-27 23:32:46 +01:00
Connections between nodes within the network may be long lived, as payment
2017-11-24 07:15:16 +01:00
channels have an indefinite lifetime. However, it's likely that
2017-11-20 23:24:02 +01:00
no new data will be
exchanged for a
significant portion of a connection's lifetime. Also, on several platforms it's possible that Lightning
2017-11-10 20:49:19 +01:00
clients will be put to sleep without prior warning. Hence, a
distinct `ping` message is used, in order to probe for the liveness of the connection on
2017-11-09 22:30:53 +01:00
the other side, as well as to keep the established connection active.
BOLT 1: introduce `ping` and `pong` control messages (#134)
Connections between nodes within the network may be very long lived as
payment channels have an indefinite lifetime. However, it’s likely that
for a significant portion of the life-time of a connection, no new data
will be exchanged. Additionally, on several platforms it’s possible that
Lightning clients will be put to sleep without prior warning. As a
result, we use a distinct ping message in order to probe for the
liveness of the connection on the other side, and also to keep the
established connection active.
This commit adds two new control messages to the protocol: `ping` and
`pong`. Their usage within the network is similar to the usage of such
message within other established protocols: `ping` messages specify a
number of bytes to be contained in the payload of a `pong` message, and
`pong` messages are to be sent in response to receiving a `ping` message.
Additionally, the ability for a sender to request that the receiver send
a response with a particular number of bytes enables nodes on the
network to create synthetic traffic. Such traffic can be used to
partially defend against packet and timing analysis as nodes can fake
the traffic patterns of typical exchanges, without applying any true
updates to their respective channels.
When combined with the onion routing protocol defined in BOLT#4, careful
statistically driven synthetic traffic can serve to further bolster the
privacy of participants within the network.
As a bonus, the usage of periodic `ping` message ensures frequent key
rotation between connected nodes.
[ The result is a bikeshed of every possible color! -- RR ]
2017-04-04 05:24:50 +02:00
Additionally, the ability for a sender to request that the receiver send a
response with a particular number of bytes enables nodes on the network to
create _synthetic_ traffic. Such traffic can be used to partially defend
2017-11-09 22:30:53 +01:00
against packet and timing analysis — as nodes can fake the traffic patterns of
2017-11-20 23:24:02 +01:00
typical exchanges without applying any true updates to their respective
copy-edit 01-messaging for appropriate grammer, punctuation, and style
Edit 01-messaging copy for clarity (minor rephrasing, punctuation),
correctness (grammar, capitalization, punctuation),
consision (minimizing wordiness, redundancy),
and consistency (document style, e.g. 1 space between sentences,
capitalization of headers, etc.)
2017-11-04 17:09:24 +01:00
channels.
BOLT 1: introduce `ping` and `pong` control messages (#134)
Connections between nodes within the network may be very long lived as
payment channels have an indefinite lifetime. However, it’s likely that
for a significant portion of the life-time of a connection, no new data
will be exchanged. Additionally, on several platforms it’s possible that
Lightning clients will be put to sleep without prior warning. As a
result, we use a distinct ping message in order to probe for the
liveness of the connection on the other side, and also to keep the
established connection active.
This commit adds two new control messages to the protocol: `ping` and
`pong`. Their usage within the network is similar to the usage of such
message within other established protocols: `ping` messages specify a
number of bytes to be contained in the payload of a `pong` message, and
`pong` messages are to be sent in response to receiving a `ping` message.
Additionally, the ability for a sender to request that the receiver send
a response with a particular number of bytes enables nodes on the
network to create synthetic traffic. Such traffic can be used to
partially defend against packet and timing analysis as nodes can fake
the traffic patterns of typical exchanges, without applying any true
updates to their respective channels.
When combined with the onion routing protocol defined in BOLT#4, careful
statistically driven synthetic traffic can serve to further bolster the
privacy of participants within the network.
As a bonus, the usage of periodic `ping` message ensures frequent key
rotation between connected nodes.
[ The result is a bikeshed of every possible color! -- RR ]
2017-04-04 05:24:50 +02:00
When combined with the onion routing protocol defined in
2018-01-17 07:37:58 +01:00
[BOLT #4 ](04-onion-routing.md ),
BOLT 1: introduce `ping` and `pong` control messages (#134)
Connections between nodes within the network may be very long lived as
payment channels have an indefinite lifetime. However, it’s likely that
for a significant portion of the life-time of a connection, no new data
will be exchanged. Additionally, on several platforms it’s possible that
Lightning clients will be put to sleep without prior warning. As a
result, we use a distinct ping message in order to probe for the
liveness of the connection on the other side, and also to keep the
established connection active.
This commit adds two new control messages to the protocol: `ping` and
`pong`. Their usage within the network is similar to the usage of such
message within other established protocols: `ping` messages specify a
number of bytes to be contained in the payload of a `pong` message, and
`pong` messages are to be sent in response to receiving a `ping` message.
Additionally, the ability for a sender to request that the receiver send
a response with a particular number of bytes enables nodes on the
network to create synthetic traffic. Such traffic can be used to
partially defend against packet and timing analysis as nodes can fake
the traffic patterns of typical exchanges, without applying any true
updates to their respective channels.
When combined with the onion routing protocol defined in BOLT#4, careful
statistically driven synthetic traffic can serve to further bolster the
privacy of participants within the network.
As a bonus, the usage of periodic `ping` message ensures frequent key
rotation between connected nodes.
[ The result is a bikeshed of every possible color! -- RR ]
2017-04-04 05:24:50 +02:00
careful statistically driven synthetic traffic can serve to further bolster the
privacy of participants within the network.
Limited precautions are recommended against `ping` flooding, however some
copy-edit 01-messaging for appropriate grammer, punctuation, and style
Edit 01-messaging copy for clarity (minor rephrasing, punctuation),
correctness (grammar, capitalization, punctuation),
consision (minimizing wordiness, redundancy),
and consistency (document style, e.g. 1 space between sentences,
capitalization of headers, etc.)
2017-11-04 17:09:24 +01:00
latitude is given because of network delays. Note that there are other methods
2017-11-10 08:23:53 +01:00
of incoming traffic flooding (e.g. sending _odd_ unknown message types, or padding
BOLT 1: introduce `ping` and `pong` control messages (#134)
Connections between nodes within the network may be very long lived as
payment channels have an indefinite lifetime. However, it’s likely that
for a significant portion of the life-time of a connection, no new data
will be exchanged. Additionally, on several platforms it’s possible that
Lightning clients will be put to sleep without prior warning. As a
result, we use a distinct ping message in order to probe for the
liveness of the connection on the other side, and also to keep the
established connection active.
This commit adds two new control messages to the protocol: `ping` and
`pong`. Their usage within the network is similar to the usage of such
message within other established protocols: `ping` messages specify a
number of bytes to be contained in the payload of a `pong` message, and
`pong` messages are to be sent in response to receiving a `ping` message.
Additionally, the ability for a sender to request that the receiver send
a response with a particular number of bytes enables nodes on the
network to create synthetic traffic. Such traffic can be used to
partially defend against packet and timing analysis as nodes can fake
the traffic patterns of typical exchanges, without applying any true
updates to their respective channels.
When combined with the onion routing protocol defined in BOLT#4, careful
statistically driven synthetic traffic can serve to further bolster the
privacy of participants within the network.
As a bonus, the usage of periodic `ping` message ensures frequent key
rotation between connected nodes.
[ The result is a bikeshed of every possible color! -- RR ]
2017-04-04 05:24:50 +02:00
every message maximally).
Finally, the usage of periodic `ping` messages serves to promote frequent key
2018-01-17 07:37:58 +01:00
rotations as specified within [BOLT #8 ](08-transport.md ).
BOLT 1: introduce `ping` and `pong` control messages (#134)
Connections between nodes within the network may be very long lived as
payment channels have an indefinite lifetime. However, it’s likely that
for a significant portion of the life-time of a connection, no new data
will be exchanged. Additionally, on several platforms it’s possible that
Lightning clients will be put to sleep without prior warning. As a
result, we use a distinct ping message in order to probe for the
liveness of the connection on the other side, and also to keep the
established connection active.
This commit adds two new control messages to the protocol: `ping` and
`pong`. Their usage within the network is similar to the usage of such
message within other established protocols: `ping` messages specify a
number of bytes to be contained in the payload of a `pong` message, and
`pong` messages are to be sent in response to receiving a `ping` message.
Additionally, the ability for a sender to request that the receiver send
a response with a particular number of bytes enables nodes on the
network to create synthetic traffic. Such traffic can be used to
partially defend against packet and timing analysis as nodes can fake
the traffic patterns of typical exchanges, without applying any true
updates to their respective channels.
When combined with the onion routing protocol defined in BOLT#4, careful
statistically driven synthetic traffic can serve to further bolster the
privacy of participants within the network.
As a bonus, the usage of periodic `ping` message ensures frequent key
rotation between connected nodes.
[ The result is a bikeshed of every possible color! -- RR ]
2017-04-04 05:24:50 +02:00
2017-05-02 08:47:06 +02:00
## Acknowledgments
2016-11-30 21:05:50 +01:00
2017-11-09 22:30:53 +01:00
[ TODO: (roasbeef); fin ]
2016-11-30 21:05:50 +01:00
2016-12-05 12:45:47 +01:00
## References
2017-11-18 22:04:58 +01:00
2016-12-09 15:17:11 +01:00
1. < a id = "reference-2" > http://www.unicode.org/charts/PDF/U2600.pdf</ a >
2016-11-30 21:05:50 +01:00
2016-12-05 12:45:47 +01:00
## Authors
2016-11-30 21:05:50 +01:00
2017-11-09 22:30:53 +01:00
[ FIXME: Insert Author List ]
2016-11-30 21:05:50 +01:00
![Creative Commons License ](https://i.creativecommons.org/l/by/4.0/88x31.png "License CC-BY" )
< br >
This work is licensed under a [Creative Commons Attribution 4.0 International License ](http://creativecommons.org/licenses/by/4.0/ ).