summaryrefslogtreecommitdiff
path: root/b0/d018976bc5cddf51b741905a511443a48e23b7
blob: 5d29a3b4f1a03777770b32bb672008dd0007a203 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
Return-Path: <joost.jager@gmail.com>
Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137])
 by lists.linuxfoundation.org (Postfix) with ESMTP id 565B1C002A
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Tue, 23 May 2023 07:19:57 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by smtp4.osuosl.org (Postfix) with ESMTP id 236FA407D7
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Tue, 23 May 2023 07:19:57 +0000 (UTC)
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 236FA407D7
Authentication-Results: smtp4.osuosl.org;
 dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com
 header.a=rsa-sha256 header.s=20221208 header.b=ogGAsZ/t
X-Virus-Scanned: amavisd-new at osuosl.org
X-Spam-Flag: NO
X-Spam-Score: -2.098
X-Spam-Level: 
X-Spam-Status: No, score=-2.098 tagged_above=-999 required=5
 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
 DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from smtp4.osuosl.org ([127.0.0.1])
 by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id XTFbGYxOqoDf
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Tue, 23 May 2023 07:19:55 +0000 (UTC)
X-Greylist: whitelisted by SQLgrey-1.8.0
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 67F34402A7
Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com
 [IPv6:2a00:1450:4864:20::632])
 by smtp4.osuosl.org (Postfix) with ESMTPS id 67F34402A7
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Tue, 23 May 2023 07:19:55 +0000 (UTC)
Received: by mail-ej1-x632.google.com with SMTP id
 a640c23a62f3a-96fe88cd2fcso362187466b.1
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Tue, 23 May 2023 00:19:55 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20221208; t=1684826393; x=1687418393;
 h=to:subject:message-id:date:from:mime-version:from:to:cc:subject
 :date:message-id:reply-to;
 bh=81hHE503ZwMWue148JQRj7jtj2fIS3TZga0jHEnV9aE=;
 b=ogGAsZ/tw6TEle7VZj5cJWuCiqZNBa7LP+JjcUCiDZMByM1E6imIwRGzbLvnCkdWT6
 e0tFNrlvXrJiu0+Nn2tRID2Jp/ENZMv/XmlLgzktwSuVJz9nepeQEDc8wzAFM5TI0z30
 SlSL9MM0K1fpi9/MnbB+zGa7bZ8z1vMO3zjqPCwDDR24G/RtIhaczFm6MqEvXp6AJWdI
 Sz+Vii8T23Nj4ZcdTNQAesVC2F1uR/dFfZEmKrNNiwhfSGE0Vs5g4j2Wp98Na15wKPXo
 UcMnj7l0OishthbiEqIdDbHdnElFLHVZu6a1AJobABVFVBKl9G/xpGwitZJ4CBVuhcxa
 IrlA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1684826393; x=1687418393;
 h=to:subject:message-id:date:from:mime-version:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=81hHE503ZwMWue148JQRj7jtj2fIS3TZga0jHEnV9aE=;
 b=C+/r22S/8BbD/r71FYON+Rx5x2YJ5WWah1cwIZ3iKz6+pKsvHX1ufONIiTy5D3XsU2
 9Bzo6LFjUDsmy2zpAEBVz3243iRofpdugHg9t9n2J76KdDMYCn6Cag/JyEChKH5jquFz
 RmRhqpEscAau9vvd3M+aMpqD2mSgwxy6rcULk9U/W7JPnHsMgeDt2ASlFPu0lk3s5T5X
 RG3QMXg/re4CVNJDfkN5fE+PzsanVAndZgxLsLdgqaXnssS8j+GqIH/lig/7BPt9WyOG
 zhwvqtKpxaJBOG91e9u+jDTryATkmljj8I/Caiz+El50iwanCVIRU8tNluI0my2rxgO6
 fgxw==
X-Gm-Message-State: AC+VfDylWCwB9xqVuyEbILkZppxhETtj4VtcZ9YYUw4NutuT0jCobByQ
 THsEOKkLf5tUWlDuEwH2HfnewZrn17jJbdzt/ELayGvkJw8=
X-Google-Smtp-Source: ACHHUZ6+csLryBL40AjiSuoKBAWlssHwAX4148P9Wp4mvtn1UY7DTZRyr9ZqHQmip0ZGBG1Nlvq3zNxXfvNd3i9INtU=
X-Received: by 2002:a17:907:31ce:b0:96a:6723:da48 with SMTP id
 xf14-20020a17090731ce00b0096a6723da48mr10369972ejb.75.1684826393021; Tue, 23
 May 2023 00:19:53 -0700 (PDT)
MIME-Version: 1.0
From: Joost Jager <joost.jager@gmail.com>
Date: Tue, 23 May 2023 09:19:17 +0200
Message-ID: <CAJBJmV932eeuiBzo_EMxJ1iU=Gave9=PC3U7seVoBXUFsu_GUA@mail.gmail.com>
To: bitcoin-dev@lists.linuxfoundation.org
Content-Type: multipart/alternative; boundary="000000000000aa120905fc57362f"
X-Mailman-Approved-At: Tue, 23 May 2023 09:58:53 +0000
Subject: [bitcoin-dev] Bitcoin Transaction Relay over Nostr
X-BeenThere: bitcoin-dev@lists.linuxfoundation.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Bitcoin Protocol Discussion <bitcoin-dev.lists.linuxfoundation.org>
List-Unsubscribe: <https://lists.linuxfoundation.org/mailman/options/bitcoin-dev>, 
 <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=unsubscribe>
List-Archive: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/>
List-Post: <mailto:bitcoin-dev@lists.linuxfoundation.org>
List-Help: <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=help>
List-Subscribe: <https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev>, 
 <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=subscribe>
X-List-Received-Date: Tue, 23 May 2023 07:19:57 -0000

--000000000000aa120905fc57362f
Content-Type: text/plain; charset="UTF-8"

Hi,


I write to get your thoughts on an alternative approach for Bitcoin
transaction relay, addressing some of the limitations in the current
peer-to-peer transaction relay system. To the best of my knowledge, the
credit for the original concept goes to Ben Carman. I felt it would be
beneficial to share the idea on this list to garner wider perspectives and
feedback.


The existing peer-to-peer (P2P) transaction relay system comes with a set
of limitations that may negatively impact applications, notably those like
Lightning that make extensive use of pre-signed transactions. A key
limitation lies in the system's inability to relay transaction packages.
This constraint can lead to HTLCs expiring before being swept, thereby
risking fund losses. In addition, the P2P system falls short in supporting
non-standard transactions, despite an established demand for such
transactions in the marketplace.


Nostr, an open and decentralized network of relays for public and ephemeral
messages between pseudonymous entities, could help address these
shortcomings. With the standards defined in NIP-89 [1], it becomes possible
to broadcast arbitrary Bitcoin transaction packages, overcoming one of the
key hurdles in the current relay system.


In this proposed alternative relay mechanism, miners would listen for these
broadcasted transaction packages and insert the packages into their local
mempool. They can take advantage of the `submitpackage` RPC, limited to
safe topologies only - specifically child and direct parents, tree only
[2]. This feature could serve as an interim solution for package relay
until it becomes available through the traditional P2P method.


A notable advantage of this approach is that it delegates the
responsibility of dealing with Denial-of-Service (DoS) threats to the
relays themselves. They could, for example, require a payment to mitigate
such concerns. There are in fact paid nostr relays already in operation.
This partitioning would result in a clear separation between the Bitcoin
transaction layer and DoS protection, introducing more flexibility in the
system and potentially boosting its resilience.


Implementing Nostr as a relay mechanism also has the potential to
democratize access to miner mempools, thus leveling the playing field in
the Bitcoin network. In the current state, those with direct connections or
certain privileges can more readily submit transactions to miners, perhaps
even through means as informal as email.


I have been working on a prototype of this concept (based on [3]) and have
captured its workings in a demonstration video [4].


Joost


[1] https://github.com/nostr-protocol/nips/pull/476

[2] https://github.com/bitcoin/bitcoin/pull/27609#issuecomment-1544414801

[3] https://github.com/benthecarman/nostr-tx-broadcast

[4] https://twitter.com/joostjgr/status/1658487013237211155

--000000000000aa120905fc57362f
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">





<p class=3D"gmail-p1" style=3D"margin:0px;font-variant-numeric:normal;font-=
variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;=
font-feature-settings:normal;font-stretch:normal;font-size:13px;line-height=
:normal;font-family:&quot;Helvetica Neue&quot;">Hi,</p>
<p class=3D"gmail-p2" style=3D"margin:0px;font-variant-numeric:normal;font-=
variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;=
font-feature-settings:normal;font-stretch:normal;font-size:13px;line-height=
:normal;font-family:&quot;Helvetica Neue&quot;;min-height:15px"><br></p>
<p class=3D"gmail-p1" style=3D"margin:0px;font-variant-numeric:normal;font-=
variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;=
font-feature-settings:normal;font-stretch:normal;font-size:13px;line-height=
:normal;font-family:&quot;Helvetica Neue&quot;">I write to get your thought=
s on an alternative approach for Bitcoin transaction relay, addressing some=
 of the limitations in the current peer-to-peer transaction relay system. T=
o the best of my knowledge, the credit for the original concept goes to Ben=
 Carman. I felt it would be beneficial to share the idea on this list to ga=
rner wider perspectives and feedback.</p>
<p class=3D"gmail-p2" style=3D"margin:0px;font-variant-numeric:normal;font-=
variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;=
font-feature-settings:normal;font-stretch:normal;font-size:13px;line-height=
:normal;font-family:&quot;Helvetica Neue&quot;;min-height:15px"><br></p>
<p class=3D"gmail-p1" style=3D"margin:0px;font-variant-numeric:normal;font-=
variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;=
font-feature-settings:normal;font-stretch:normal;font-size:13px;line-height=
:normal;font-family:&quot;Helvetica Neue&quot;">The existing peer-to-peer (=
P2P) transaction relay system comes with a set of limitations that may nega=
tively impact applications, notably those like Lightning that make extensiv=
e use of pre-signed transactions. A key limitation lies in the system&#39;s=
 inability to relay transaction packages. This constraint can lead to HTLCs=
 expiring before being swept, thereby risking fund losses. In addition, the=
 P2P system falls short in supporting non-standard transactions, despite an=
 established demand for such transactions in the marketplace.</p>
<p class=3D"gmail-p2" style=3D"margin:0px;font-variant-numeric:normal;font-=
variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;=
font-feature-settings:normal;font-stretch:normal;font-size:13px;line-height=
:normal;font-family:&quot;Helvetica Neue&quot;;min-height:15px"><br></p>
<p class=3D"gmail-p1" style=3D"margin:0px;font-variant-numeric:normal;font-=
variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;=
font-feature-settings:normal;font-stretch:normal;font-size:13px;line-height=
:normal;font-family:&quot;Helvetica Neue&quot;">Nostr, an open and decentra=
lized network of relays for public and ephemeral messages between pseudonym=
ous entities, could help address these shortcomings. With the standards def=
ined in NIP-89 [1], it becomes possible to broadcast arbitrary Bitcoin tran=
saction packages, overcoming one of the key hurdles in the current relay sy=
stem.</p>
<p class=3D"gmail-p2" style=3D"margin:0px;font-variant-numeric:normal;font-=
variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;=
font-feature-settings:normal;font-stretch:normal;font-size:13px;line-height=
:normal;font-family:&quot;Helvetica Neue&quot;;min-height:15px"><br></p>
<p class=3D"gmail-p1" style=3D"margin:0px;font-variant-numeric:normal;font-=
variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;=
font-feature-settings:normal;font-stretch:normal;font-size:13px;line-height=
:normal;font-family:&quot;Helvetica Neue&quot;">In this proposed alternativ=
e relay mechanism, miners would listen for these broadcasted transaction pa=
ckages and insert the packages into their local mempool. They can take adva=
ntage of the `submitpackage` RPC, limited to safe topologies only - specifi=
cally child and direct parents, tree only [2]. This feature could serve as =
an interim solution for package relay until it becomes available through th=
e traditional P2P method.</p>
<p class=3D"gmail-p2" style=3D"margin:0px;font-variant-numeric:normal;font-=
variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;=
font-feature-settings:normal;font-stretch:normal;font-size:13px;line-height=
:normal;font-family:&quot;Helvetica Neue&quot;;min-height:15px"><br></p>
<p class=3D"gmail-p1" style=3D"margin:0px;font-variant-numeric:normal;font-=
variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;=
font-feature-settings:normal;font-stretch:normal;font-size:13px;line-height=
:normal;font-family:&quot;Helvetica Neue&quot;">A notable advantage of this=
 approach is that it delegates the responsibility of dealing with Denial-of=
-Service (DoS) threats to the relays themselves. They could, for example, r=
equire a payment to mitigate such concerns. There are in fact paid nostr re=
lays already in operation. This partitioning would result in a clear separa=
tion between the Bitcoin transaction layer and DoS protection, introducing =
more flexibility in the system and potentially boosting its resilience.</p>
<p class=3D"gmail-p2" style=3D"margin:0px;font-variant-numeric:normal;font-=
variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;=
font-feature-settings:normal;font-stretch:normal;font-size:13px;line-height=
:normal;font-family:&quot;Helvetica Neue&quot;;min-height:15px"><br></p>
<p class=3D"gmail-p1" style=3D"margin:0px;font-variant-numeric:normal;font-=
variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;=
font-feature-settings:normal;font-stretch:normal;font-size:13px;line-height=
:normal;font-family:&quot;Helvetica Neue&quot;">Implementing Nostr as a rel=
ay mechanism also has the potential to democratize access to miner mempools=
, thus leveling the playing field in the Bitcoin network. In the current st=
ate, those with direct connections or certain privileges can more readily s=
ubmit transactions to miners, perhaps even through means as informal as ema=
il.</p>
<p class=3D"gmail-p2" style=3D"margin:0px;font-variant-numeric:normal;font-=
variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;=
font-feature-settings:normal;font-stretch:normal;font-size:13px;line-height=
:normal;font-family:&quot;Helvetica Neue&quot;;min-height:15px"><br></p>
<p class=3D"gmail-p1" style=3D"margin:0px;font-variant-numeric:normal;font-=
variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;=
font-feature-settings:normal;font-stretch:normal;font-size:13px;line-height=
:normal;font-family:&quot;Helvetica Neue&quot;">I have been working on a pr=
ototype of this concept (based on [3]) and have captured its workings in a =
demonstration video [4].</p>
<p class=3D"gmail-p2" style=3D"margin:0px;font-variant-numeric:normal;font-=
variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;=
font-feature-settings:normal;font-stretch:normal;font-size:13px;line-height=
:normal;font-family:&quot;Helvetica Neue&quot;;min-height:15px"><br></p>
<p class=3D"gmail-p1" style=3D"margin:0px;font-variant-numeric:normal;font-=
variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;=
font-feature-settings:normal;font-stretch:normal;font-size:13px;line-height=
:normal;font-family:&quot;Helvetica Neue&quot;">Joost</p>
<p class=3D"gmail-p2" style=3D"margin:0px;font-variant-numeric:normal;font-=
variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;=
font-feature-settings:normal;font-stretch:normal;font-size:13px;line-height=
:normal;font-family:&quot;Helvetica Neue&quot;;min-height:15px"><br></p>
<p class=3D"gmail-p1" style=3D"margin:0px;font-variant-numeric:normal;font-=
variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;=
font-feature-settings:normal;font-stretch:normal;font-size:13px;line-height=
:normal;font-family:&quot;Helvetica Neue&quot;">[1] <a href=3D"https://gith=
ub.com/nostr-protocol/nips/pull/476">https://github.com/nostr-protocol/nips=
/pull/476</a></p>
<p class=3D"gmail-p3" style=3D"margin:0px;font-variant-numeric:normal;font-=
variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;=
font-feature-settings:normal;font-stretch:normal;font-size:13px;line-height=
:normal;font-family:&quot;Helvetica Neue&quot;;color:rgb(220,161,13)"><span=
 class=3D"gmail-s1" style=3D"color:rgb(0,0,0)">[2] <a href=3D"https://githu=
b.com/bitcoin/bitcoin/pull/27609#issuecomment-1544414801">https://github.co=
m/bitcoin/bitcoin/pull/27609#issuecomment-1544414801</a></span></p>
<p class=3D"gmail-p1" style=3D"margin:0px;font-variant-numeric:normal;font-=
variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;=
font-feature-settings:normal;font-stretch:normal;font-size:13px;line-height=
:normal;font-family:&quot;Helvetica Neue&quot;">[3] <a href=3D"https://gith=
ub.com/benthecarman/nostr-tx-broadcast">https://github.com/benthecarman/nos=
tr-tx-broadcast</a></p>
<p class=3D"gmail-p3" style=3D"margin:0px;font-variant-numeric:normal;font-=
variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;=
font-feature-settings:normal;font-stretch:normal;font-size:13px;line-height=
:normal;font-family:&quot;Helvetica Neue&quot;;color:rgb(220,161,13)"><span=
 class=3D"gmail-s1" style=3D"color:rgb(0,0,0)">[4] <a href=3D"https://twitt=
er.com/joostjgr/status/1658487013237211155">https://twitter.com/joostjgr/st=
atus/1658487013237211155</a></span></p></div>

--000000000000aa120905fc57362f--