From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 59B46C016F for ; 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 ; 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 ; 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 ; Sun, 7 Jun 2020 07:28:16 +0000 (UTC) Received: by mail-ej1-f53.google.com with SMTP id k11so14724596ejr.9 for ; 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: In-Reply-To: From: Mostafa Sedaghat joo Date: Sun, 7 Jun 2020 15:27:48 +0800 Message-ID: To: ZmnSCPxj Content-Type: multipart/alternative; boundary="000000000000f1f43605a7796f8e" X-Mailman-Approved-At: Sun, 07 Jun 2020 14:31:23 +0000 Cc: Bitcoin Protocol Discussion 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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 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 ` OP_0`, which should be unspendable. > > Post-softfork nodes would reject blocks where some transaction is stamped > and the stamped `` 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
Good day ZmnSCPxj

Thank you so much for= your time to read my proposal.=C2=A0
About your comments, I do a= gree with some of them but maybe we need to discuss more about them.
<= 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.

The main point of stamping trans= actions is decoupling transactions from the block.=C2=A0
=
Blockchain size matters
SegWit is a good wi= tness that shows blockchain size matters. Nowadays,=C2=A0Data storage is ch= eap and easy, but that doesn't mean it'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

A Solution=
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.
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

Implemen= tation

> First off, the pr= oposed mechanism can be made into a softfork by using an unspendable `scrip= tPubKey` 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.

>=C2=A0Engineering-wise, block validation now nee= ds to memorize the last N block hashes.
I don't think we need= to memorize the last N block hashes.=C2=A0 We can have something like:
```
Current_Height - Height_Of(tx.stamp) <=3D N=C2=A0
```
Incentives
I think Stamping tra= nsactions have nothing to do with the incentivization=C2=A0mechanism.=C2=A0= Forgive me if I couldn't get your point.

M= empool
It's bad of me that I don'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

Best Regards,
Mostafa
<= br>

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 u= nspendable `scriptPubKey` with 0 output value.

For example, a stamp could by convention be any 0-value output whose `scrip= tPubKey` is `<blockhash> OP_0`, which should be unspendable.

Post-softfork nodes would reject blocks where some transaction is stamped a= nd the stamped `<blockhash>` is not within the last N blocks.
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).

Engineering-wise, block validation now needs to memorize the last N block h= ashes.

The mempool design currently assumes that a transaction that enters the mem= pool 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 i= s 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 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).

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.


Regards,
ZmnSCPxj
--000000000000f1f43605a7796f8e--