summaryrefslogtreecommitdiff
path: root/7d/9422b9afd90a6b9cc9150c6552b79346eb9071
blob: 430f19742f1496094c8a4bd6e66067b8efbd5a00 (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
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194]
	helo=mx.sourceforge.net)
	by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76)
	(envelope-from <mh.in.england@gmail.com>) id 1TFNWE-0002uk-Aw
	for bitcoin-development@lists.sourceforge.net;
	Sat, 22 Sep 2012 11:05:06 +0000
Received-SPF: pass (sog-mx-4.v43.ch3.sourceforge.com: domain of gmail.com
	designates 74.125.82.175 as permitted sender)
	client-ip=74.125.82.175; envelope-from=mh.in.england@gmail.com;
	helo=mail-we0-f175.google.com; 
Received: from mail-we0-f175.google.com ([74.125.82.175])
	by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128)
	(Exim 4.76) id 1TFNW9-00063b-CM
	for bitcoin-development@lists.sourceforge.net;
	Sat, 22 Sep 2012 11:05:06 +0000
Received: by weyt44 with SMTP id t44so1270630wey.34
	for <bitcoin-development@lists.sourceforge.net>;
	Sat, 22 Sep 2012 04:04:55 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.180.94.38 with SMTP id cz6mr2604765wib.10.1348311895108; Sat,
	22 Sep 2012 04:04:55 -0700 (PDT)
Sender: mh.in.england@gmail.com
Received: by 10.216.139.134 with HTTP; Sat, 22 Sep 2012 04:04:54 -0700 (PDT)
Received: by 10.216.139.134 with HTTP; Sat, 22 Sep 2012 04:04:54 -0700 (PDT)
In-Reply-To: <CAGQP0AEnkRqiEb2_COpQpLKkZfHf0fFgHmquO5oY4_Gh84k7cA@mail.gmail.com>
References: <CA+8xBpczY1DkgmHsVL8m30JaM1d+FwN_gpBhq6DFScm1nvLF5w@mail.gmail.com>
	<CAGQP0AEnkRqiEb2_COpQpLKkZfHf0fFgHmquO5oY4_Gh84k7cA@mail.gmail.com>
Date: Sat, 22 Sep 2012 13:04:54 +0200
X-Google-Sender-Auth: p5YfP-_RqOtARh9rKTgMjccEDQY
Message-ID: <CANEZrP0XGoZoz0AqKQtL-YVP=O9qZ+i9UXRgoGOqVNuFdo+Yog@mail.gmail.com>
From: Mike Hearn <mike@plan99.net>
To: =?UTF-8?B?Sm9yZ2UgVGltw7Nu?= <timon.elviejo@gmail.com>
Content-Type: multipart/alternative; boundary=f46d044271088deb9f04ca4853b5
X-Spam-Score: -1.0 (-)
X-Spam-Report: Spam Filtering performed by mx.sourceforge.net.
	See http://spamassassin.org/tag/ for more details.
	-1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for
	sender-domain
	0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider
	(mh.in.england[at]gmail.com)
	-0.0 SPF_PASS               SPF: sender matches SPF record
	1.0 HTML_MESSAGE           BODY: HTML included in message
	0.1 DKIM_SIGNED            Message has a DKIM or DK signature,
	not necessarily valid
	-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
	-0.5 AWL AWL: From: address is in the auto white-list
X-Headers-End: 1TFNW9-00063b-CM
Cc: Bitcoin Dev <bitcoin-development@lists.sourceforge.net>
Subject: Re: [Bitcoin-development] Atomic coin swapping?
X-BeenThere: bitcoin-development@lists.sourceforge.net
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <bitcoin-development.lists.sourceforge.net>
List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
	<mailto:bitcoin-development-request@lists.sourceforge.net?subject=unsubscribe>
List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum_name=bitcoin-development>
List-Post: <mailto:bitcoin-development@lists.sourceforge.net>
List-Help: <mailto:bitcoin-development-request@lists.sourceforge.net?subject=help>
List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
	<mailto:bitcoin-development-request@lists.sourceforge.net?subject=subscribe>
X-List-Received-Date: Sat, 22 Sep 2012 11:05:06 -0000

--f46d044271088deb9f04ca4853b5
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Perhaps I missing something obvious about the definition of coloured coins,
but this appears to be very simple. Just create a transaction that
transfers 300 coins and have an unsigned input connected to the coloured
output. send to the owner of the coloured output, they sign it and
broadcast.
On Sep 22, 2012 11:10 AM, "Jorge Tim=C3=B3n" <timon.elviejo@gmail.com> wrot=
e:

> I'm very interested in this. I was expecting transitive/multi-hop
> transactions (Ripple) with colored coins, and I don't understand why
> is not possible.
>
> >From https://en.bitcoin.it/wiki/Contracts
>
> ---
> SIGHASH_ALL: This is the default. It indicates that everything about
> the transaction is signed, except for the input scripts. Signing the
> input scripts as well would obviously make it impossible to construct
> a transaction, so they are always blanked out. Note, though, that
> other properties of the input, like the connected output and sequence
> numbers, are signed; it's only the scripts that are not. Intuitively,
> it means "I agree to put my money in, if everyone puts their money in
> and the outputs are this".
> ---
>
> Why "Signing the input scripts as well would obviously make it
> impossible to construct a transaction"?
> I don't understand that part. I think a new SIGHASH_* type that
> doesn't pay attention to that "obviously" is needed to achieve what we
> want.
>
> Say we want the following transaction:
>
> A 1 satoshi -> B 1 satoshi -> C 100 btc -> A
>
> It would be necessary to sign the following:
>
> Inputs: from srcA, from srcB,
> Outputs: 1 satoshi to destB, 1 satoshi to destC, 100 btc to destA
>
> "from srcC" is not really necessary.
>
> This same scheme can be used for n-hops.
>
> What am I missing?
>
> On 9/22/12, Jeff Garzik <jgarzik@exmulti.com> wrote:
> > Forum URL: https://bitcointalk.org/index.php?topic=3D112007.0
> >
> > gmaxwell was talking about colored coins[1] in IRC recently.  They are
> > potentially interesting in the context of distributed bonds[2], which
> > I am currently pursuing with pybond[3].
> >
> > Here is the problem I am trying to solve, does the crowd have an answer=
?
> >
> > 1. Alice transfers a 1-satoshi colored coin to Bob.
> > 2. Bob transfers 100 BTC to Alice.  May be restricted to 1 txout, if
> > that eases implementation details.
> > 3. Steps #1 and #2 happen as an atomic unit, all-or-none.
> > 4. Alice and Bob must both approve this atomic transfer of coins, with
> > appropriate signatures.
> >
> > Is this possible within the current bitcoin system?  As far as I can
> > see, the answer is "no" but maybe I'm missing something.
> >
> > My best guess to the answer is "possible, but requires a new SIGHASH_*
> > type"?
> >
> > [1] https://bitcointalk.org/index.php?topic=3D106449.0
> > [2] https://bitcointalk.org/index.php?topic=3D92421.0
> > [3] https://github.com/jgarzik/pybond
> >
> > --
> > Jeff Garzik
> > exMULTI, Inc.
> > jgarzik@exmulti.com
> >
> >
> -------------------------------------------------------------------------=
-----
> > How fast is your code?
> > 3 out of 4 devs don\\\'t know how their code performs in production.
> > Find out how slow your code is with AppDynamics Lite.
> > http://ad.doubleclick.net/clk;262219672;13503038;z?
> > http://info.appdynamics.com/FreeJavaPerformanceDownload.html
> > _______________________________________________
> > Bitcoin-development mailing list
> > Bitcoin-development@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/bitcoin-development
> >
>
>
> --
> Jorge Tim=C3=B3n
>
>
> -------------------------------------------------------------------------=
-----
> How fast is your code?
> 3 out of 4 devs don\\\'t know how their code performs in production.
> Find out how slow your code is with AppDynamics Lite.
> http://ad.doubleclick.net/clk;262219672;13503038;z?
> http://info.appdynamics.com/FreeJavaPerformanceDownload.html
> _______________________________________________
> Bitcoin-development mailing list
> Bitcoin-development@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bitcoin-development
>

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

<p>Perhaps I missing something obvious about the definition of coloured coi=
ns, but this appears to be very simple. Just create a transaction that tran=
sfers 300 coins and have an unsigned input connected to the coloured output=
. send to the owner of the coloured output, they sign it and broadcast.</p>

<div class=3D"gmail_quote">On Sep 22, 2012 11:10 AM, &quot;Jorge Tim=C3=B3n=
&quot; &lt;<a href=3D"mailto:timon.elviejo@gmail.com">timon.elviejo@gmail.c=
om</a>&gt; wrote:<br type=3D"attribution"><blockquote class=3D"gmail_quote"=
 style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I&#39;m very interested in this. I was expecting transitive/multi-hop<br>
transactions (Ripple) with colored coins, and I don&#39;t understand why<br=
>
is not possible.<br>
<br>
&gt;From <a href=3D"https://en.bitcoin.it/wiki/Contracts" target=3D"_blank"=
>https://en.bitcoin.it/wiki/Contracts</a><br>
<br>
---<br>
SIGHASH_ALL: This is the default. It indicates that everything about<br>
the transaction is signed, except for the input scripts. Signing the<br>
input scripts as well would obviously make it impossible to construct<br>
a transaction, so they are always blanked out. Note, though, that<br>
other properties of the input, like the connected output and sequence<br>
numbers, are signed; it&#39;s only the scripts that are not. Intuitively,<b=
r>
it means &quot;I agree to put my money in, if everyone puts their money in<=
br>
and the outputs are this&quot;.<br>
---<br>
<br>
Why &quot;Signing the input scripts as well would obviously make it<br>
impossible to construct a transaction&quot;?<br>
I don&#39;t understand that part. I think a new SIGHASH_* type that<br>
doesn&#39;t pay attention to that &quot;obviously&quot; is needed to achiev=
e what we<br>
want.<br>
<br>
Say we want the following transaction:<br>
<br>
A 1 satoshi -&gt; B 1 satoshi -&gt; C 100 btc -&gt; A<br>
<br>
It would be necessary to sign the following:<br>
<br>
Inputs: from srcA, from srcB,<br>
Outputs: 1 satoshi to destB, 1 satoshi to destC, 100 btc to destA<br>
<br>
&quot;from srcC&quot; is not really necessary.<br>
<br>
This same scheme can be used for n-hops.<br>
<br>
What am I missing?<br>
<br>
On 9/22/12, Jeff Garzik &lt;<a href=3D"mailto:jgarzik@exmulti.com">jgarzik@=
exmulti.com</a>&gt; wrote:<br>
&gt; Forum URL: <a href=3D"https://bitcointalk.org/index.php?topic=3D112007=
.0" target=3D"_blank">https://bitcointalk.org/index.php?topic=3D112007.0</a=
><br>
&gt;<br>
&gt; gmaxwell was talking about colored coins[1] in IRC recently. =C2=A0The=
y are<br>
&gt; potentially interesting in the context of distributed bonds[2], which<=
br>
&gt; I am currently pursuing with pybond[3].<br>
&gt;<br>
&gt; Here is the problem I am trying to solve, does the crowd have an answe=
r?<br>
&gt;<br>
&gt; 1. Alice transfers a 1-satoshi colored coin to Bob.<br>
&gt; 2. Bob transfers 100 BTC to Alice. =C2=A0May be restricted to 1 txout,=
 if<br>
&gt; that eases implementation details.<br>
&gt; 3. Steps #1 and #2 happen as an atomic unit, all-or-none.<br>
&gt; 4. Alice and Bob must both approve this atomic transfer of coins, with=
<br>
&gt; appropriate signatures.<br>
&gt;<br>
&gt; Is this possible within the current bitcoin system? =C2=A0As far as I =
can<br>
&gt; see, the answer is &quot;no&quot; but maybe I&#39;m missing something.=
<br>
&gt;<br>
&gt; My best guess to the answer is &quot;possible, but requires a new SIGH=
ASH_*<br>
&gt; type&quot;?<br>
&gt;<br>
&gt; [1] <a href=3D"https://bitcointalk.org/index.php?topic=3D106449.0" tar=
get=3D"_blank">https://bitcointalk.org/index.php?topic=3D106449.0</a><br>
&gt; [2] <a href=3D"https://bitcointalk.org/index.php?topic=3D92421.0" targ=
et=3D"_blank">https://bitcointalk.org/index.php?topic=3D92421.0</a><br>
&gt; [3] <a href=3D"https://github.com/jgarzik/pybond" target=3D"_blank">ht=
tps://github.com/jgarzik/pybond</a><br>
&gt;<br>
&gt; --<br>
&gt; Jeff Garzik<br>
&gt; exMULTI, Inc.<br>
&gt; <a href=3D"mailto:jgarzik@exmulti.com">jgarzik@exmulti.com</a><br>
&gt;<br>
&gt; ----------------------------------------------------------------------=
--------<br>
&gt; How fast is your code?<br>
&gt; 3 out of 4 devs don\\\&#39;t know how their code performs in productio=
n.<br>
&gt; Find out how slow your code is with AppDynamics Lite.<br>
&gt; <a href=3D"http://ad.doubleclick.net/clk;262219672;13503038;z" target=
=3D"_blank">http://ad.doubleclick.net/clk;262219672;13503038;z</a>?<br>
&gt; <a href=3D"http://info.appdynamics.com/FreeJavaPerformanceDownload.htm=
l" target=3D"_blank">http://info.appdynamics.com/FreeJavaPerformanceDownloa=
d.html</a><br>
&gt; _______________________________________________<br>
&gt; Bitcoin-development mailing list<br>
&gt; <a href=3D"mailto:Bitcoin-development@lists.sourceforge.net">Bitcoin-d=
evelopment@lists.sourceforge.net</a><br>
&gt; <a href=3D"https://lists.sourceforge.net/lists/listinfo/bitcoin-develo=
pment" target=3D"_blank">https://lists.sourceforge.net/lists/listinfo/bitco=
in-development</a><br>
&gt;<br>
<br>
<br>
--<br>
Jorge Tim=C3=B3n<br>
<br>
---------------------------------------------------------------------------=
---<br>
How fast is your code?<br>
3 out of 4 devs don\\\&#39;t know how their code performs in production.<br=
>
Find out how slow your code is with AppDynamics Lite.<br>
<a href=3D"http://ad.doubleclick.net/clk;262219672;13503038;z" target=3D"_b=
lank">http://ad.doubleclick.net/clk;262219672;13503038;z</a>?<br>
<a href=3D"http://info.appdynamics.com/FreeJavaPerformanceDownload.html" ta=
rget=3D"_blank">http://info.appdynamics.com/FreeJavaPerformanceDownload.htm=
l</a><br>
_______________________________________________<br>
Bitcoin-development mailing list<br>
<a href=3D"mailto:Bitcoin-development@lists.sourceforge.net">Bitcoin-develo=
pment@lists.sourceforge.net</a><br>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/bitcoin-development=
" target=3D"_blank">https://lists.sourceforge.net/lists/listinfo/bitcoin-de=
velopment</a><br>
</blockquote></div>

--f46d044271088deb9f04ca4853b5--