Commit 6656b70
committed
Bolt 1: Specify that extensions to existing messages must use TLV
The spec already prepared a hook to add additional information to existing
messages (additional bytes at the end of a message must be ignored).
Since we're using TLV in many places, it makes sense to use that optional
additional space at the end of each message to allow an optional tlv stream.
This requires making a few previously optional fields mandatory:
- channel_reestablish commitment points: it makes sense to always include those
regardless of whether `option_dataloss_protect` or `option_static_remotekey` are set.
- option_upfront_shutdown_script: if you're not using one, just set the length to 0.
That field is moved to a TLV record because luckily, the resulting bytes are the same.
This provides more flexibility to later remove the requirement of making this field mandatory.
No need to change the `channel_update`'s `htlc_maximum_msat` because
the `message_flags` encode its presence/absence.
It can still be either included or omitted without causing issues to the extension stream.1 parent f38f559 commit 6656b70
2 files changed
+69
-35
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| 41 | + | |
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | 47 | | |
55 | 48 | | |
56 | 49 | | |
| |||
61 | 54 | | |
62 | 55 | | |
63 | 56 | | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
68 | 60 | | |
69 | 61 | | |
70 | 62 | | |
| |||
75 | 67 | | |
76 | 68 | | |
77 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
78 | 82 | | |
79 | 83 | | |
80 | 84 | | |
| |||
85 | 89 | | |
86 | 90 | | |
87 | 91 | | |
88 | | - | |
89 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
90 | 95 | | |
91 | 96 | | |
92 | 97 | | |
| |||
896 | 901 | | |
897 | 902 | | |
898 | 903 | | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
899 | 925 | | |
900 | 926 | | |
901 | 927 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
127 | | - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
128 | 133 | | |
129 | 134 | | |
130 | 135 | | |
| |||
207 | 212 | | |
208 | 213 | | |
209 | 214 | | |
210 | | - | |
| 215 | + | |
211 | 216 | | |
212 | | - | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
213 | 220 | | |
214 | 221 | | |
215 | 222 | | |
| |||
291 | 298 | | |
292 | 299 | | |
293 | 300 | | |
294 | | - | |
295 | | - | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
296 | 308 | | |
297 | 309 | | |
298 | 310 | | |
| |||
1127 | 1139 | | |
1128 | 1140 | | |
1129 | 1141 | | |
1130 | | - | |
1131 | | - | |
| 1142 | + | |
| 1143 | + | |
1132 | 1144 | | |
1133 | 1145 | | |
1134 | 1146 | | |
1135 | 1147 | | |
1136 | 1148 | | |
1137 | 1149 | | |
1138 | 1150 | | |
1139 | | - | |
1140 | 1151 | | |
1141 | 1152 | | |
1142 | 1153 | | |
| |||
1178 | 1189 | | |
1179 | 1190 | | |
1180 | 1191 | | |
1181 | | - | |
| 1192 | + | |
1182 | 1193 | | |
1183 | | - | |
| 1194 | + | |
1184 | 1195 | | |
1185 | | - | |
1186 | | - | |
1187 | | - | |
1188 | | - | |
1189 | | - | |
1190 | | - | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
1191 | 1200 | | |
1192 | 1201 | | |
1193 | 1202 | | |
| |||
1228 | 1237 | | |
1229 | 1238 | | |
1230 | 1239 | | |
1231 | | - | |
| 1240 | + | |
1232 | 1241 | | |
1233 | | - | |
1234 | | - | |
| 1242 | + | |
1235 | 1243 | | |
1236 | 1244 | | |
1237 | 1245 | | |
| |||
0 commit comments