From: ZmnSCPxj <ZmnSCPxj@protonmail.com>
To: Mike Kelly <mikekelly321@gmail.com>
Cc: Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
Subject: Re: [bitcoin-dev] Purge attacks (spin on sabotage attacks)
Date: Sun, 09 Feb 2020 00:00:41 +0000 [thread overview]
Message-ID: <u0lEEiLwMX1seNC4Wz7nfizIB2zaj4HfINI9rnh0ZBPJkW02uMw-6HCWemKpz5xr8MYxkTQWpCa4ucnM5Qj82qBlgW5BnlUBd5Pv2f_Ho6A=@protonmail.com> (raw)
In-Reply-To: <CANqiZJapjRvf5p=yD2BGqYxn_zR8HBHgU=ncKDROZbWersZxBg@mail.gmail.com>
Good morning M,
> > > Nodes reject announced blocks that:
> > >
> > > * include transactions that are in contest with any in their mempool
> > > * include transactions that are in contest with any in the contest pool
> >
> > Is this intended to be a consensus rule, i.e. nodes will never accept such a block?
> >
> > Because if so, this fails the principle of Blockchain Self-Containment, i.e. consensus rules can only check what is in the blockchain.
> > The mempool (and contest pool) is not in the blockchain as it is never attested to in the blockchain.
>
> Yes, it intentionally violates that rule. It’s unclear to me right now what the consequence/cost of doing so in this specific way would be. Are you able to explain?
Violation of this principle can cause persistent chainsplits where you induce one set of nodes to see one view of reality while another set of nodes see another view.
For instance, suppose two innocent miners happen to find blocks at nearly the same time.
Unfortunately for them, one miner happened to be using "SPV" mining i.e. mining empty blocks.
From the point of view of arbitrary nodes, this is indistinguishable from a one-block purge attack as described.
Yet this happenstance occurrence now causes a chainsplit, as some number of nodes (those near to the SPV-mining miner) think that miner is innocent of wrongdoing and will support the "purged" chainsplit, whereas those near the other miner will consider that block bad and will support the other "unpurged" chainsplit.
This is an even worse consequence than any purge attack, and could happen completely by chance with no malice involved.
Always avoid violating that principle in any consensus code.
If it is not committed to in the block and is not provable using only data you provide with the block, you cannot use it safely without risking chainsplit.
(and no, banning or even disincentivizing SPV mining will not work, different nodes have different views of the mempool and temporary chainsplits can occur by chance where one chainsplit has transactions that are not confirmed in the other chainsplit, which again is just another short-term inadvertent Purge attack on the network.)
>
> > Purge attacks can still be defended against and does not require mass cooperation.
> > If there is a transaction that is economically beneficial to me, it does so by paying some Bitcoins to me.
> > If it pays Bitcoins to me, I can spend those Bitcoins in a transaction that just offers to pay mining fees and transfers it back to me (i.e. child pays for parent) to convince miners to mine the purged transaction.
> > As the Purge attack is "just" a censorship attack (i.e. a censorship of all transactions in the block under attack), the increased mining fees for the transactions being censored (i.e. offered via child-pays-for-parent in this case) is an economic counterattack on the censoring miner (i.e. it forgoes the mining fees).
>
> > With enough self-interested users, the fee offered to confirm the transactions can be substantial enough that non-censoring miners can be convinced to mine those transactions.
> > No coordination necessary, as is typical for all defenses against censorship (and the basis of the censorship-resistance of Bitcoin).
>
> The attack itself is better classified as a form of sabotage than censorship. The goal is to demonstrate the ongoing mutability of transactions beyond any inherent heuristic for “finality”. iow it is a demonstration that will damage the network’s future ability to offer settlement assurances.
>
> Trying to use Child Pays For Parent to defend in a bidding war against an opportunist attacker retrieving spent Bitcoin via RBF is a losing game for the defender. There’s no opportunity cost for the attacker, any amount retrieved is profit. The defender, on the other hand, is always losing value. This is exactly the kind of conflict and discoordination the attack is intended to induce.
Your defender, in this attack, should avoid the Sunk Cost Fallacy here.
If the defender has been so foolish as to provide a product or service based on only a *few* confirmations, like 1 or 2, then that product or service has been Sunk, and it should ignore the Sunk Cost here.
From that point of view, the attacker and the defender are simply bidding up from the *same* value, i.e. the value of the UTXO that is being removed by the purge attack.
As the same value is under contest on both sides, they are equally matched and both censoring and non-censoring miners will get the same incentive, splitting up the network into two nearly equal halves, and then chance (lucky block discovery) decides between which is the winner or the loser.
The difference here is that the chainsplit in this case is in a metastable state, and once a string of lucky block discoveries occurs, it falls into a stable state and now everybody agrees again on who won and who lost.
Your solution risks *persistent* *stable* chainsplits.
Worse, this occurrence without your solution would only happen if some miners actually attack the blockchain.
With your solution, persistent chainsplits can occur without malice, simply chance.
And as in many things in life, the only winning move is not to play.
Just wait for more than a small number of confirmations (e.g. 6 is generally considered safe), and the chance that a Purge attack on your transactions succeeds is low enough that worse force majeur (a rogue asteroid hitting your datacenter, for example) is more likely.
Regards,
ZmnSCPxj
next prev parent reply other threads:[~2020-02-09 0:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-31 13:38 [bitcoin-dev] Purge attacks (spin on sabotage attacks) ha su
2020-02-07 13:55 ` Mike Kelly
2020-02-08 2:15 ` ZmnSCPxj
2020-02-08 8:11 ` Mike Kelly
2020-02-09 0:00 ` ZmnSCPxj [this message]
2020-02-09 10:15 ` Mike Kelly
2020-02-09 23:59 ` ZmnSCPxj
2020-02-10 15:28 ` Mike Kelly
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='u0lEEiLwMX1seNC4Wz7nfizIB2zaj4HfINI9rnh0ZBPJkW02uMw-6HCWemKpz5xr8MYxkTQWpCa4ucnM5Qj82qBlgW5BnlUBd5Pv2f_Ho6A=@protonmail.com' \
--to=zmnscpxj@protonmail.com \
--cc=bitcoin-dev@lists.linuxfoundation.org \
--cc=mikekelly321@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox