summaryrefslogtreecommitdiff
path: root/73/b61fbc60ba1b6280fad3f9b7a6dfb0323386eb
blob: 8f529c4782a8fb8eeaf2561d601c84cb442148b0 (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
Return-Path: <mostafa.sedaghat@gmail.com>
Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])
 by lists.linuxfoundation.org (Postfix) with ESMTP id 59B46C016F
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Sun,  7 Jun 2020 07:28:19 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by whitealder.osuosl.org (Postfix) with ESMTP id 456F786CE1
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Sun,  7 Jun 2020 07:28:19 +0000 (UTC)
X-Virus-Scanned: amavisd-new at osuosl.org
Received: from whitealder.osuosl.org ([127.0.0.1])
 by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id 02Udw6gNClu6
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Sun,  7 Jun 2020 07:28:16 +0000 (UTC)
X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6
Received: from mail-ej1-f53.google.com (mail-ej1-f53.google.com
 [209.85.218.53])
 by whitealder.osuosl.org (Postfix) with ESMTPS id 2180886AF2
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Sun,  7 Jun 2020 07:28:16 +0000 (UTC)
Received: by mail-ej1-f53.google.com with SMTP id k11so14724596ejr.9
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Sun, 07 Jun 2020 00:28:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=SUhXaecUhb2F2kv4CK5Gk7nngeq1IwodnYQ2J9n4CwU=;
 b=DbHBZaP0dGQxM6h9vGHWro7E3u2rE3QHjG1Os7q7JlbtKCMhsHSbvL8ZDjEcEe2sYZ
 kfijnNZluumdkd29ZpWxEbQiX/dwrDXf1FHWvsrVnYb6/KL1/qqp0knLiCirq07Tf9MU
 ZNEO2obLflTvWrp6KcJBoV6tp3gADK1CWxFwFlvHl+0RWHI859wTSmcglvF/nwCF6+Kf
 jW4xlYJq5zBXTZ3xUvSLF0gYMrasAIcZ8wnJDYFmjTFO75lPh5/ELdcW3V38lvfp9PAW
 Xb65wKHPVim9RrUvLAUODl5H9SnmKsnes+dsirrKFzXtZX2eMBG8H7sgJTj/1DKYb60+
 texg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=SUhXaecUhb2F2kv4CK5Gk7nngeq1IwodnYQ2J9n4CwU=;
 b=p11DrDHyXGFbVQjSbyOt8eYmVtt0m8IIwJqrAbwTb/LVXBtJ1I1txaUFCP95qhvwiF
 yOwphMuzBcJdvJiYy8vWjKFVMeioF1gUhgPPbQTFsi0Dod2umHK/tgtD7T6NTY55e5QQ
 wV63/7U7+5IwuTrPhslLi+O00lO0ATMmbtID9PSSF8BcrvHrS8QuFUjltmRi6d9fhUTA
 Ot5UihY6T+UdlMXkdMWQCGvrf7wZbF4ri3UHsyVtVep+0L7t3bEskb/4KtwIpT1jFTqf
 Wi+dCz+CrP/D3b0aedYwbNheJeSpE4m0y9YA3tHidkWE+Rc8uk4m+y/yrVXm3ltdXQUY
 nfew==
X-Gm-Message-State: AOAM532yLfk8dj+Y0jREOagEr3bkz++0se7dxsazx+4ftOqjI7BbAo+C
 nPewBEI1myfBz3iC0Y1ZC3Dy5P76D+NA5JtN/qk=
X-Google-Smtp-Source: ABdhPJy4RPXt5go2iA561jczx+7PEi4zIS3lnAKJbrj3+s9wCo1bDnckOKQKGI9PvE5Um1aCCXJAD13VFHscI5IV4og=
X-Received: by 2002:a17:906:b293:: with SMTP id
 q19mr16816406ejz.412.1591514894560; 
 Sun, 07 Jun 2020 00:28:14 -0700 (PDT)
MIME-Version: 1.0
References: <CAJr8eKuFv7R-1HRft-hLFTSdpWUL2uOtkDtisL2+iPaEvvH_hA@mail.gmail.com>
 <c_8uFmqhKnoFYLB23sjYhJlKAXU5ZoCSQ2MsSgn_OePQoJKFOqIuzMjm7vhnCzevQkAwdJextCeNjA8D-f_p__-sUFSkOFMDI5_yS7k8ZM8=@protonmail.com>
In-Reply-To: <c_8uFmqhKnoFYLB23sjYhJlKAXU5ZoCSQ2MsSgn_OePQoJKFOqIuzMjm7vhnCzevQkAwdJextCeNjA8D-f_p__-sUFSkOFMDI5_yS7k8ZM8=@protonmail.com>
From: Mostafa Sedaghat joo <mostafa.sedaghat@gmail.com>
Date: Sun, 7 Jun 2020 15:27:48 +0800
Message-ID: <CAJr8eKtV=W8wLkZZP9tagnL8F3jxOv8t-J9oBCFV6MrRPDmGiw@mail.gmail.com>
To: ZmnSCPxj <ZmnSCPxj@protonmail.com>
Content-Type: multipart/alternative; boundary="000000000000f1f43605a7796f8e"
X-Mailman-Approved-At: Sun, 07 Jun 2020 14:31:23 +0000
Cc: Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
Subject: Re: [bitcoin-dev] Stamping transaction
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: Sun, 07 Jun 2020 07:28:19 -0000

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

Good day ZmnSCPxj

Thank you so much for your time to read my proposal.
About your comments, I do agree with some of them but maybe we need to
discuss more about them.
You might agree that any changes (especially a fundamental change like
stamping transactions) comes with advantages and probably some
disadvantages. I believe the advantages of stamping transactions are worth
having it.


*The main point of stamping transactions is decoupling transactions from
the block. *

*Blockchain size matters*
SegWit is a good witness that shows blockchain size matters. Nowadays, Data
storage is cheap and easy, but that doesn't mean it's a simple matter. If
you need to have a data-center to keep a copy of a blockchain, then you are
far from a decentralization system.

*A Solution*
Stamping transaction is a simple idea to keep the size of the blockchain as
small as possible. The question that I was looking to answer is how we can
decouple the transaction from the blocks.
Who cares about the transaction that happened 10 years ago. In the real
world you may go to your bank and ask them to give you transaction history.
But they probably have limits. They might say we just only keep the last 3
months in our system.

*Implementation*

> First off, the proposed mechanism can be made into a softfork by using an
unspendable `scriptPubKey` with 0 output value.
SoftFork is not possible here. Because the transaction will not be saved
inside the block (only tx hashes). Block format needs to be changed.
Therefore the block will be invalid.

> Engineering-wise, block validation now needs to memorize the last N block
hashes.
I don't think we need to memorize the last N block hashes.  We can have
something like:
```
Current_Height - Height_Of(tx.stamp) <= N
```
*Incentives*
I think Stamping transactions have nothing to do with the
incentivization mechanism.  Forgive me if I couldn't get your point.

*Mempool*
It's bad of me that I don't really know how mempool works in Bitcoin. My
assumption is that there are some junk transactions (transactions that are
valid but have very low or zero fees) inside the mempool. Stamping
transactions might help to get rid of them time to time.

Best Regards,
Mostafa


On Sun, Jun 7, 2020 at 8:40 AM ZmnSCPxj <ZmnSCPxj@protonmail.com> wrote:

> Good morning Mostafa,
>
> First off, the proposed mechanism can be made into a softfork by using an
> unspendable `scriptPubKey` with 0 output value.
>
> For example, a stamp could by convention be any 0-value output whose
> `scriptPubKey` is `<blockhash> OP_0`, which should be unspendable.
>
> Post-softfork nodes would reject blocks where some transaction is stamped
> and the stamped `<blockhash>` is not within the last N blocks.
> Pre-softfork nodes would not see anything special about the unspendable
> `scriptPubKey` and would just accept it (but would not relay such
> transactions due to standardness).
>
> Engineering-wise, block validation now needs to memorize the last N block
> hashes.
>
> The mempool design currently assumes that a transaction that enters the
> mempool is always valid unless any UTXOs it spends have been removed.
> This is important since miner block selection algorithms assume the
> mempool contains transactions that are currently valid.
> Thus, there is the additional need to drop transactions from the mempool
> if they are stamped with a block that has dropped from the stamp TTL.
>
> Another issue is incentives.
> The stamp takes up blockchain space that is paid for by the creator of the
> transaction.
> Further, the creator of the transaction gains no advantage from the
> stamped transaction; it is others who gain an advantage (the stamped
> transaction is more likely to be dropped from the mempool).
> Discounting the stamp somehow will probably make this into a hardfork.
> It might be sneaked into the witness somehow by adding it as a field
> somewhere in the new parts of Taproot (there is, a new block of data in
> Taproot that can be used for this), but note that the cost will still be
> non-zero (and users of this feature will still have a disadvantage in that
> their transactions are more likely to be dropped from the mempool).
>
> Finally, it is expected to increase bandwidth use since a dropped stamped
> transaction will probably be rebroadcast with a new stamp, so effectively
> the transaction is retransmitted again with a different stamp.
>
>
> Regards,
> ZmnSCPxj
>

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

<div dir=3D"ltr">Good day ZmnSCPxj<div><br></div><div>Thank you so much for=
 your time to read my proposal.=C2=A0</div><div>About your comments, I do a=
gree with some of them but maybe we need to discuss more about them.</div><=
div>You might agree that any changes (especially a fundamental change like =
stamping transactions) comes with advantages and probably=C2=A0some disadva=
ntages. I believe the advantages of stamping transactions are worth having =
it.</div><div><br></div><div><i style=3D"">The main point of stamping trans=
actions is decoupling transactions from the block.=C2=A0<br></i></div><div>=
<br></div><div><b>Blockchain size matters</b></div><div>SegWit is a good wi=
tness that shows blockchain size matters. Nowadays,=C2=A0Data storage is ch=
eap and easy, but that doesn&#39;t mean it&#39;s a simple matter. If you ne=
ed to have a data-center to keep a copy of a blockchain, then you are far f=
rom a decentralization system.=C2=A0</div><div><br></div><div><b>A Solution=
</b></div><div>Stamping=C2=A0transaction is a simple idea to keep the size =
of the blockchain as small as possible. The question that I was looking to =
answer is how we can decouple the transaction from the blocks.</div><div>Wh=
o cares about the transaction that happened=C2=A010 years ago. In the real =
world you may go to your bank and ask them to give you transaction=C2=A0his=
tory. But they probably have limits. They might say we just only keep the l=
ast 3 months in our system.=C2=A0</div><div><br></div><div><div><b>Implemen=
tation</b></div><div></div></div><div><br></div><div>&gt; First off, the pr=
oposed mechanism can be made into a softfork by using an unspendable `scrip=
tPubKey` with 0 output value.<br></div><div>SoftFork is not possible here. =
Because the transaction will not be saved inside the block (only tx hashes)=
. Block format needs to be changed. Therefore the block will be invalid.</d=
iv><div><br></div><div>&gt;=C2=A0Engineering-wise, block validation now nee=
ds to memorize the last N block hashes.</div><div>I don&#39;t think we need=
 to memorize the last N block hashes.=C2=A0 We can have something like:</di=
v><div>```</div><div>Current_Height - Height_Of(tx.stamp) &lt;=3D N=C2=A0</=
div><div>```</div><div><b>Incentives</b><br></div><div>I think Stamping tra=
nsactions have nothing to do with the incentivization=C2=A0mechanism.=C2=A0=
 Forgive me if I couldn&#39;t get your point.</div><div><br></div><div><b>M=
empool</b></div><div>It&#39;s bad of me that I don&#39;t really know how me=
mpool works in Bitcoin. My assumption is that there are some junk transacti=
ons (transactions that are valid but have very low or zero fees) inside the=
 mempool. Stamping transactions might help to get rid of them time to time.=
=C2=A0</div><div><br></div><div>Best Regards,</div><div>Mostafa</div><div><=
br></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gma=
il_attr">On Sun, Jun 7, 2020 at 8:40 AM ZmnSCPxj &lt;<a href=3D"mailto:ZmnS=
CPxj@protonmail.com">ZmnSCPxj@protonmail.com</a>&gt; wrote:<br></div><block=
quote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1=
px solid rgb(204,204,204);padding-left:1ex">Good morning Mostafa,<br>
<br>
First off, the proposed mechanism can be made into a softfork by using an u=
nspendable `scriptPubKey` with 0 output value.<br>
<br>
For example, a stamp could by convention be any 0-value output whose `scrip=
tPubKey` is `&lt;blockhash&gt; OP_0`, which should be unspendable.<br>
<br>
Post-softfork nodes would reject blocks where some transaction is stamped a=
nd the stamped `&lt;blockhash&gt;` is not within the last N blocks.<br>
Pre-softfork nodes would not see anything special about the unspendable `sc=
riptPubKey` and would just accept it (but would not relay such transactions=
 due to standardness).<br>
<br>
Engineering-wise, block validation now needs to memorize the last N block h=
ashes.<br>
<br>
The mempool design currently assumes that a transaction that enters the mem=
pool is always valid unless any UTXOs it spends have been removed.<br>
This is important since miner block selection algorithms assume the mempool=
 contains transactions that are currently valid.<br>
Thus, there is the additional need to drop transactions from the mempool if=
 they are stamped with a block that has dropped from the stamp TTL.<br>
<br>
Another issue is incentives.<br>
The stamp takes up blockchain space that is paid for by the creator of the =
transaction.<br>
Further, the creator of the transaction gains no advantage from the stamped=
 transaction; it is others who gain an advantage (the stamped transaction i=
s more likely to be dropped from the mempool).<br>
Discounting the stamp somehow will probably make this into a hardfork.<br>
It might be sneaked into the witness somehow by adding it as a field somewh=
ere in the new parts of Taproot (there is, a new block of data in Taproot t=
hat can be used for this), but note that the cost will still be non-zero (a=
nd users of this feature will still have a disadvantage in that their trans=
actions are more likely to be dropped from the mempool).<br>
<br>
Finally, it is expected to increase bandwidth use since a dropped stamped t=
ransaction will probably be rebroadcast with a new stamp, so effectively th=
e transaction is retransmitted again with a different stamp.<br>
<br>
<br>
Regards,<br>
ZmnSCPxj<br>
</blockquote></div>

--000000000000f1f43605a7796f8e--