mirror of
https://github.com/lightning/bolts.git
synced 2024-11-19 10:00:04 +01:00
Remove padding within node_announcement address data
This optional padding makes it very difficulty to deserialize node_announcements into internal structs for storage and then reconstruct the original node_announcement, plus are unused on the network today and no known implementations construct node_announcement messages with them.
This commit is contained in:
parent
2b253f7a61
commit
8516beb2c4
@ -238,7 +238,6 @@ appropriate number of bytes for that type.
|
|||||||
|
|
||||||
The following `address descriptor` types are defined:
|
The following `address descriptor` types are defined:
|
||||||
|
|
||||||
* `0`: padding; data = none (length 0)
|
|
||||||
* `1`: ipv4; data = `[4:ipv4_addr][2:port]` (length 6)
|
* `1`: ipv4; data = `[4:ipv4_addr][2:port]` (length 6)
|
||||||
* `2`: ipv6; data = `[16:ipv6_addr][2:port]` (length 18)
|
* `2`: ipv6; data = `[16:ipv6_addr][2:port]` (length 18)
|
||||||
* `3`: Tor v2 onion service; data = `[10:onion_addr][2:port]` (length 12)
|
* `3`: Tor v2 onion service; data = `[10:onion_addr][2:port]` (length 12)
|
||||||
@ -268,8 +267,8 @@ The origin node:
|
|||||||
- SHOULD fill `addresses` with an address descriptor for each public network
|
- SHOULD fill `addresses` with an address descriptor for each public network
|
||||||
address that expects incoming connections.
|
address that expects incoming connections.
|
||||||
- MUST set `addrlen` to the number of bytes in `addresses`.
|
- MUST set `addrlen` to the number of bytes in `addresses`.
|
||||||
- MUST place non-zero typed address descriptors in ascending order.
|
- MUST place address descriptors in ascending order.
|
||||||
- MAY place any number of zero-typed address descriptors anywhere.
|
- SHOULD NOT place any zero-typed address descriptors anywhere.
|
||||||
- SHOULD use placement only for aligning fields that follow `addresses`.
|
- SHOULD use placement only for aligning fields that follow `addresses`.
|
||||||
- MUST NOT create a `type 1` OR `type 2` address descriptor with `port` equal
|
- MUST NOT create a `type 1` OR `type 2` address descriptor with `port` equal
|
||||||
to 0.
|
to 0.
|
||||||
|
Loading…
Reference in New Issue
Block a user