From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Z2JhN-0005Zv-0Q for bitcoin-development@lists.sourceforge.net; Tue, 09 Jun 2015 13:36:13 +0000 Received-SPF: pass (sog-mx-3.v43.ch3.sourceforge.com: domain of gmail.com designates 209.85.215.49 as permitted sender) client-ip=209.85.215.49; envelope-from=gavinandresen@gmail.com; helo=mail-la0-f49.google.com; Received: from mail-la0-f49.google.com ([209.85.215.49]) by sog-mx-3.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1Z2JhL-0000nO-5N for bitcoin-development@lists.sourceforge.net; Tue, 09 Jun 2015 13:36:12 +0000 Received: by labko7 with SMTP id ko7so12462327lab.2 for ; Tue, 09 Jun 2015 06:36:04 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.112.93.230 with SMTP id cx6mr22560722lbb.65.1433856964828; Tue, 09 Jun 2015 06:36:04 -0700 (PDT) Received: by 10.25.90.75 with HTTP; Tue, 9 Jun 2015 06:36:04 -0700 (PDT) In-Reply-To: References: <5574E39C.3090904@thinlink.com> Date: Tue, 9 Jun 2015 09:36:04 -0400 Message-ID: From: Gavin Andresen To: Loi Luu Content-Type: multipart/alternative; boundary=001a113497c20c263b051815d7d7 X-Spam-Score: -0.6 (/) 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 (gavinandresen[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 1.0 HTML_MESSAGE BODY: HTML included in message -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 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 X-Headers-End: 1Z2JhL-0000nO-5N Cc: Bitcoin Dev Subject: Re: [Bitcoin-development] New attack identified and potential solution described: Dropped-transaction spam attack against the block size limit X-BeenThere: bitcoin-development@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2015 13:36:13 -0000 --001a113497c20c263b051815d7d7 Content-Type: text/plain; charset=UTF-8 How about this for mitigating this potential attack: 1. Limit the memory pool to some reasonable number of blocks-worth of transactions (e.g. 11) 2. If evicting transactions from the memory pool, prefer to evict transactions that are part of long chains of unconfirmed transactions. 3. Allow blocks to grow in size in times of high transaction demand. The combination of (1) and (2) means an attacker needs to prepare lots of confirmed inputs to pull off the attack. By itself that means they MUST pay transaction fees. (3) further mitigates the attack because it allows miners to just absorb fees that the attacker is throwing at miners. On Tue, Jun 9, 2015 at 5:33 AM, Loi Luu wrote: > The proposed fix is to add a new rule on how >> fees are handled. Some amount of every fee should be considered as burned >> and can never be spent. I will propose 50% of the fee here, but there may >> be better numbers that can be discovered prior to putting this into place. >> If we'd like miners to continue to collect the same fees after this >> change, >> we can suggest the default fee per transaction to be doubled > > > I would propose another practical rule rather than burning 50% of the fee. > For example, you can > credit 50% of the transaction fee to the next block. Thus, the attacker > cannot perform > the attack with 0-fee any more, yet you don't have to double the price of > the TX fee for the fix. > > Thanks, > Loi Luu. > > On Tue, Jun 9, 2015 at 4:07 AM, Raystonn . wrote: > >> When implemented, the block size limit was put in place to prevent the >> potential for a massive block to be used as an attack to benefit the miner >> of that block. The theory goes that such a massive block would enrich its >> miner by delaying other miners who are now busy downloading and validating >> that huge block. The original miner of that large-block would be free to >> continue hashing the next block, giving it an advantage. >> >> Unfortunately, this block size limit opened a different attack. Prior to >> the limit, any attempt to spam the network by anyone other than someone >> mining their own transactions would have been economically unfeasible. As >> every transaction would have a fee, there would have been a real cost for >> every minute of spam. The end result would have been a transfer of wealth >> from spammer to Bitcoin miners, which would have harmed the spammers and >> encouraged further mining of Bitcoin, a very antifragile outcome. >> >> But now we have the block size limit. Things are very different with this >> feature in place. The beginning of a spam attack on the Bitcoin network >> will incur transaction fees, just like before. But if spam continues at a >> rate exceeding the block size limit long enough for transactions to be >> dropped from mempools, the vast majority of spam transaction fees will >> never >> have to be paid. In fact, as real users gain in desperation and pay >> higher >> fees to get their transactions through in a timely manner, the spammers >> will >> adjust their fees to minimize the cost of the attack and maximize >> effectiveness. Using this method, they keep their fees at a point that >> causes most of the spam transactions to be dropped without confirmation >> (free spam), while forcing a floor for transaction fees. Thus, while spam >> could be used by attackers to disable the network entirely, by paying >> high-enough fees to actually fill the blocks with spam, it can also be >> used >> by a single entity to force a transaction fee floor. Real users will be >> forced to pay a transaction fee higher than the majority of the spam to >> get >> their transactions confirmed. So this is an effective means for a >> minority >> of miners to force higher fees through spam attacks, even in the face of >> benevolent miners who would not support a higher fee floor by policy. >> Miners would simply have no way to fix this, as they can only put in the >> transactions that will fit under the block size limit. >> >> In the face of such a spam attack, Bitcoin's credibility and usability >> would >> be severely undermined. The block size limit enables this attack, and I >> now >> argue for its removal. But we can't just remove it and ignore the problem >> that it was intended to address. We need a new fix for the large-block >> problem described in the first paragraph that does not suffer from the >> dropped-transaction spam-attack problem that is enabled by the block size >> limit today. My proposal is likely to be controversial, and I'm very much >> open to hearing other better proposals. >> >> Large blocks created by a miner as a means to spam other miners out of >> competition is a problem because miners do not pay fees for their own >> transactions when they mine them. They collect the fees they pay. This >> breaks the economic barrier keeping people from spamming the network, as >> the >> spamming is essentially free. The proposed fix is to add a new rule on >> how >> fees are handled. Some amount of every fee should be considered as burned >> and can never be spent. I will propose 50% of the fee here, but there may >> be better numbers that can be discovered prior to putting this into place. >> If we'd like miners to continue to collect the same fees after this >> change, >> we can suggest the default fee per transaction to be doubled. Half of >> every >> fee would be burned and disappear forever, effectively distributing the >> value of those bitcoins across the entire money supply. The other half >> would be collected by the miner of the block as is done today. This >> solution would mean large blocks would cost a significant number of >> bitcoin >> to create, even when all of the transactions are created by the miner of >> that block. For this to work, we'd need to ensure a minimum fee is paid >> for >> most of the transactions in every block, and the new transaction fee rule >> is >> in place. Then the block size limit can be removed. >> >> Raystonn >> >> >> >> ------------------------------------------------------------------------------ >> _______________________________________________ >> Bitcoin-development mailing list >> Bitcoin-development@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/bitcoin-development >> > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Bitcoin-development mailing list > Bitcoin-development@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bitcoin-development > > -- -- Gavin Andresen --001a113497c20c263b051815d7d7 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
How about this for mitigating this potential attack:
<= br>
1. Limit the memory pool to some reasonable number of blocks-= worth of transactions (e.g. 11)
2. If evicting transactions from = the memory pool, prefer to evict transactions that are part of long chains = of unconfirmed transactions.
3. Allow blocks to grow in size in t= imes of high transaction demand.

The combination o= f (1) and (2) means an attacker needs to prepare lots of confirmed inputs t= o pull off the attack. By itself that means they MUST pay transaction fees.=

(3) further mitigates the attack because it allow= s miners to just absorb fees that the attacker is throwing at miners.
=


On Tue, Jun 9, 2015 at 5:33 AM, Loi Luu <loi.luuthe@gmail.com= > wrote:
The proposed fix is to add a new rule on howfees are handled.=C2=A0 Some amount of every fee should be considered as = burned
and can never be spent.=C2=A0 I will propose 50% of the fee here,= but there may
be better numbers that can be discovered prior to putting= this into place.
If we'd like miners to continue to collect the sam= e fees after this change,
we can suggest the default fee per transaction= to be doubled

I would propose another practical rule rather than b= urning 50% of the fee. For example, you can
credit 50% of the transaction fee to the next block. Thus, the attacker ca= nnot perform
the attack with 0-fee any more= , yet you don't have to double the price of the TX fee for the fix.

Thanks,
Loi Luu.

On Tue, Jun 9, 2015 at 4:07 AM, Raystonn . <= span dir=3D"ltr"><raystonn@hotmail.com> wrote:
When imp= lemented, the block size limit was put in place to prevent the
potential for a massive block to be used as an attack to benefit the miner<= br> of that block.=C2=A0 The theory goes that such a massive block would enrich= its
miner by delaying other miners who are now busy downloading and validating<= br> that huge block.=C2=A0 The original miner of that large-block would be free= to
continue hashing the next block, giving it an advantage.

Unfortunately, this block size limit opened a different attack.=C2=A0 Prior= to
the limit, any attempt to spam the network by anyone other than someone
mining their own transactions would have been economically unfeasible.=C2= =A0 As
every transaction would have a fee, there would have been a real cost for every minute of spam.=C2=A0 The end result would have been a transfer of we= alth
from spammer to Bitcoin miners, which would have harmed the spammers and encouraged further mining of Bitcoin, a very antifragile outcome.

But now we have the block size limit.=C2=A0 Things are very different with = this
feature in place.=C2=A0 The beginning of a spam attack on the Bitcoin netwo= rk
will incur transaction fees, just like before.=C2=A0 But if spam continues = at a
rate exceeding the block size limit long enough for transactions to be
dropped from mempools, the vast majority of spam transaction fees will neve= r
have to be paid.=C2=A0 In fact, as real users gain in desperation and pay h= igher
fees to get their transactions through in a timely manner, the spammers wil= l
adjust their fees to minimize the cost of the attack and maximize
effectiveness.=C2=A0 Using this method, they keep their fees at a point tha= t
causes most of the spam transactions to be dropped without confirmation
(free spam), while forcing a floor for transaction fees.=C2=A0 Thus, while = spam
could be used by attackers to disable the network entirely, by paying
high-enough fees to actually fill the blocks with spam, it can also be used=
by a single entity to force a transaction fee floor.=C2=A0 Real users will = be
forced to pay a transaction fee higher than the majority of the spam to get=
their transactions confirmed.=C2=A0 So this is an effective means for a min= ority
of miners to force higher fees through spam attacks, even in the face of benevolent miners who would not support a higher fee floor by policy.
Miners would simply have no way to fix this, as they can only put in the transactions that will fit under the block size limit.

In the face of such a spam attack, Bitcoin's credibility and usability = would
be severely undermined.=C2=A0 The block size limit enables this attack, and= I now
argue for its removal.=C2=A0 But we can't just remove it and ignore the= problem
that it was intended to address.=C2=A0 We need a new fix for the large-bloc= k
problem described in the first paragraph that does not suffer from the
dropped-transaction spam-attack problem that is enabled by the block size limit today.=C2=A0 My proposal is likely to be controversial, and I'm v= ery much
open to hearing other better proposals.

Large blocks created by a miner as a means to spam other miners out of
competition is a problem because miners do not pay fees for their own
transactions when they mine them.=C2=A0 They collect the fees they pay.=C2= =A0 This
breaks the economic barrier keeping people from spamming the network, as th= e
spamming is essentially free.=C2=A0 The proposed fix is to add a new rule o= n how
fees are handled.=C2=A0 Some amount of every fee should be considered as bu= rned
and can never be spent.=C2=A0 I will propose 50% of the fee here, but there= may
be better numbers that can be discovered prior to putting this into place.<= br> If we'd like miners to continue to collect the same fees after this cha= nge,
we can suggest the default fee per transaction to be doubled.=C2=A0 Half of= every
fee would be burned and disappear forever, effectively distributing the
value of those bitcoins across the entire money supply.=C2=A0 The other hal= f
would be collected by the miner of the block as is done today.=C2=A0 This solution would mean large blocks would cost a significant number of bitcoin=
to create, even when all of the transactions are created by the miner of that block.=C2=A0 For this to work, we'd need to ensure a minimum fee i= s paid for
most of the transactions in every block, and the new transaction fee rule i= s
in place.=C2=A0 Then the block size limit can be removed.

Raystonn


---------------------------------------------------------------------------= ---
_______________________________________________
Bitcoin-development mailing list
Bitcoin-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bitcoin-de= velopment


-----------------------------------------------------------------------= -------

_______________________________________________
Bitcoin-development mailing list
Bitcoin-develo= pment@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bitcoin-de= velopment




--
--
Gavin Andresen
--001a113497c20c263b051815d7d7--