Skip to content

Commit bddbcdb

Browse files
authored
Merge pull request #26 from dunxen/add-2419
Add 2419
2 parents c16274e + be9c443 commit bddbcdb

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed
File renamed without changes.

_posts/2023-11-10-#2419.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
layout: pr
3+
date: 2023-11-10
4+
title: "Interactive Transaction Construction"
5+
pr: 2419
6+
authors: [jurvis]
7+
components: ["InteractiveTxConstructor", "splicing", "dual-funding"]
8+
host: dunxen
9+
status: upcoming
10+
commit:
11+
---
12+
13+
## Notes
14+
15+
* The interactive transaction construction protocol, outlined in [lightning/bolts#851], allows parties to collaboratively
16+
construct a bitcoin transaction by exchanging inputs and outputs for that transaction. It finds its first practical use
17+
in the dual-funding protocol where both parties A and B can contribute to the value of the channel during establishment.
18+
An example interactive transaction construction session (from the spec) could look like the following:
19+
20+
+-------+ +-------+
21+
| |--(1)- tx_add_input ---->| |
22+
| |<-(2)- tx_complete ------| |
23+
| |--(3)- tx_add_output --->| |
24+
| |<-(4)- tx_complete ------| |
25+
| |--(5)- tx_add_input ---->| |
26+
| A |<-(6)- tx_add_input -----| B |
27+
| |--(7)- tx_remove_output >| |
28+
| |<-(8)- tx_add_output ----| |
29+
| |--(9)- tx_complete ----->| |
30+
| |<-(10) tx_complete ------| |
31+
+-------+ +-------+
32+
33+
* Splicing also makes use of the interactive transaction construction protocol for constructing splice-in and splice-out transactions.
34+
* This PR implements the interactive transaction construction protocol as a type-safe state machine.
35+
36+
## Questions
37+
1. Did you review the PR? [Concept ACK, approach ACK, tested ACK, or NACK](https://github.com/lightningdevkit/rust-lightning/blob/master/CONTRIBUTING.md#peer-review)?
38+
1. What is the `SerialId` of an input or output and how is it chosen in this implementation? What is the `SerialId` parity constraint and why is it used?
39+
1. Why are the number of inputs and outputs for the constructed transaction limited to 252 each?
40+
1. If we already have the limit for inputs and outputs above, why do we place a limit of 4096 on received `TxAddInput` and `TxAddOutput` messages?
41+
1. How are the state transitions defined using the `define_state_transitions` macro and what is the purpose of doing so in this way? How does it help holders
42+
of an `InteractiveTxConstructor`?
43+
1. What transaction fees are paid by the non-initiator of the interactive construction protocol?
44+
45+
[lightning/bolts#851]: https://github.com/lightning/bolts/pull/851

0 commit comments

Comments
 (0)