Commit 6bef0dc
authored
Use official splice messages (#768)
* Use official splice messages
We replace our experimental version of `splice_init`, `splice_ack` and
`splice_locked` by their official version. We also change the TLV fields
added to `commit_sig`, `tx_add_input`, and `tx_signatures` to match the
spec version.
We only allow connecting to peers who support the official splicing
feature.
* Add `channel_reestablish` TLVs for retransmission
With splicing, we introduce new TLVs to `channel_reestablish` to let
our peer know:
- the latest `splice_locked` (or `channel_ready`) we're ready to send or
have sent before disconnecting
- whether we need a retransmission of `commit_sig` for the next funding
- whether we need a retransmission of `announcement_signatures` for the
next funding (always false for mobile wallets)
This lets us clean-up retransmission of those messages and follow the
official splicing spec.
* Update remote funding status on `channel_ready`
When we receive the initial `channel_ready`, we update the remote
funding status to be consistent with our reestablish behavior,
where we would update it when receiving `my_current_funding_locked`.1 parent 42d299a commit 6bef0dc
34 files changed
Lines changed: 457 additions & 293 deletions
File tree
- modules/core/src
- commonMain/kotlin/fr/acinq/lightning
- channel
- states
- io
- json
- wire
- commonTest
- kotlin/fr/acinq/lightning
- channel/states
- io/peer
- payment
- tests
- wire
- resources/nonreg/v4
- Closing_Local_ebb9087c
- Closing_Mutual_ebb9087c
- Closing_Remote_ebb9087c
- Closing_Revoked_ebb9087c
- Negotiating_fac54067
- Normal_77f198a3
- Normal_ebb9087c
- Normal_ff34df87
- ShuttingDown_fac54067
- WaitForChannelReady_fac54067
- WaitForFundingConfirmed_fac54067
- WaitForRemotePublishFutureCommitment_ebb9087c
Lines changed: 8 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
164 | 171 | | |
165 | 172 | | |
166 | 173 | | |
| |||
196 | 203 | | |
197 | 204 | | |
198 | 205 | | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
| |||
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
| 298 | + | |
298 | 299 | | |
299 | 300 | | |
300 | 301 | | |
301 | 302 | | |
302 | | - | |
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
| |||
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
338 | | - | |
339 | 338 | | |
340 | 339 | | |
341 | 340 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
| 205 | + | |
205 | 206 | | |
206 | 207 | | |
207 | 208 | | |
| |||
233 | 234 | | |
234 | 235 | | |
235 | 236 | | |
| 237 | + | |
236 | 238 | | |
237 | 239 | | |
238 | 240 | | |
239 | | - | |
240 | 241 | | |
241 | 242 | | |
242 | 243 | | |
| |||
Lines changed: 15 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | | - | |
171 | 170 | | |
172 | 171 | | |
173 | 172 | | |
| |||
194 | 193 | | |
195 | 194 | | |
196 | 195 | | |
197 | | - | |
| 196 | + | |
198 | 197 | | |
199 | 198 | | |
200 | 199 | | |
201 | 200 | | |
202 | 201 | | |
203 | 202 | | |
204 | 203 | | |
205 | | - | |
| 204 | + | |
206 | 205 | | |
207 | 206 | | |
208 | 207 | | |
| |||
218 | 217 | | |
219 | 218 | | |
220 | 219 | | |
221 | | - | |
222 | 220 | | |
223 | 221 | | |
224 | 222 | | |
| |||
580 | 578 | | |
581 | 579 | | |
582 | 580 | | |
583 | | - | |
584 | 581 | | |
585 | 582 | | |
586 | 583 | | |
| |||
618 | 615 | | |
619 | 616 | | |
620 | 617 | | |
621 | | - | |
| 618 | + | |
622 | 619 | | |
623 | 620 | | |
624 | 621 | | |
| |||
710 | 707 | | |
711 | 708 | | |
712 | 709 | | |
| 710 | + | |
| 711 | + | |
713 | 712 | | |
714 | 713 | | |
715 | 714 | | |
| |||
885 | 884 | | |
886 | 885 | | |
887 | 886 | | |
888 | | - | |
| 887 | + | |
889 | 888 | | |
890 | 889 | | |
891 | 890 | | |
| |||
913 | 912 | | |
914 | 913 | | |
915 | 914 | | |
916 | | - | |
917 | | - | |
918 | | - | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
919 | 921 | | |
920 | 922 | | |
921 | 923 | | |
| |||
1084 | 1086 | | |
1085 | 1087 | | |
1086 | 1088 | | |
1087 | | - | |
| 1089 | + | |
1088 | 1090 | | |
1089 | 1091 | | |
1090 | 1092 | | |
| |||
1093 | 1095 | | |
1094 | 1096 | | |
1095 | 1097 | | |
1096 | | - | |
| 1098 | + | |
1097 | 1099 | | |
1098 | | - | |
| 1100 | + | |
1099 | 1101 | | |
1100 | 1102 | | |
1101 | 1103 | | |
| |||
Lines changed: 4 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
731 | 731 | | |
732 | 732 | | |
733 | 733 | | |
734 | | - | |
| 734 | + | |
735 | 735 | | |
736 | 736 | | |
737 | 737 | | |
| |||
1106 | 1106 | | |
1107 | 1107 | | |
1108 | 1108 | | |
1109 | | - | |
1110 | | - | |
1111 | | - | |
1112 | | - | |
1113 | | - | |
| 1109 | + | |
| 1110 | + | |
1114 | 1111 | | |
1115 | 1112 | | |
1116 | 1113 | | |
| |||
1273 | 1270 | | |
1274 | 1271 | | |
1275 | 1272 | | |
1276 | | - | |
| 1273 | + | |
1277 | 1274 | | |
1278 | 1275 | | |
1279 | 1276 | | |
| |||
Lines changed: 9 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
317 | 317 | | |
318 | 318 | | |
319 | 319 | | |
320 | | - | |
| 320 | + | |
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
325 | 325 | | |
| 326 | + | |
326 | 327 | | |
327 | 328 | | |
328 | 329 | | |
329 | 330 | | |
330 | 331 | | |
331 | 332 | | |
332 | 333 | | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
| 334 | + | |
| 335 | + | |
347 | 336 | | |
348 | 337 | | |
349 | | - | |
| 338 | + | |
350 | 339 | | |
| 340 | + | |
351 | 341 | | |
352 | 342 | | |
353 | 343 | | |
| |||
378 | 368 | | |
379 | 369 | | |
380 | 370 | | |
381 | | - | |
| 371 | + | |
382 | 372 | | |
383 | 373 | | |
384 | 374 | | |
385 | 375 | | |
386 | 376 | | |
| 377 | + | |
| 378 | + | |
387 | 379 | | |
388 | 380 | | |
389 | 381 | | |
| |||
Lines changed: 8 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
935 | 935 | | |
936 | 936 | | |
937 | 937 | | |
938 | | - | |
939 | | - | |
940 | | - | |
941 | | - | |
942 | | - | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
943 | 946 | | |
944 | 947 | | |
945 | 948 | | |
| |||
0 commit comments