summaryrefslogtreecommitdiff
path: root/cd/b0463707814315255e1065242e147bab1de9c2
blob: ff240b0ea9d6cb21ed467654ec95d9ff64f65772 (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
Return-Path: <antoine.riard@gmail.com>
Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])
 by lists.linuxfoundation.org (Postfix) with ESMTP id B9DE3C013A
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Wed, 10 Feb 2021 13:13:53 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by fraxinus.osuosl.org (Postfix) with ESMTP id AD55085641
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Wed, 10 Feb 2021 13:13:53 +0000 (UTC)
X-Virus-Scanned: amavisd-new at osuosl.org
Received: from fraxinus.osuosl.org ([127.0.0.1])
 by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id w4TwHwpACt05
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Wed, 10 Feb 2021 13:13:47 +0000 (UTC)
X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6
Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com
 [209.85.221.52])
 by fraxinus.osuosl.org (Postfix) with ESMTPS id 06D3E8623B
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Wed, 10 Feb 2021 13:13:47 +0000 (UTC)
Received: by mail-wr1-f52.google.com with SMTP id u14so2511787wri.3
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Wed, 10 Feb 2021 05:13:46 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:from:date:message-id:subject:to;
 bh=1ATbcOnAUtzz5yAO/5oYVWyZaQrUCTPVp/6PJ1YMFHs=;
 b=c615QD5tWvep6ospVV3aR09cx/CMVKa9GwLnb4KXrt0jh//QZq6GlD+wyq1HQS6ihu
 47ENEBv93E7hZ0PZPvmPGwtyY+le5w7f1mR4CE3X31wo67aADVy5OtUgfHN/3VR9BCff
 wIl1wHdooG/qDSvquxirsJDpmEhhm3H/UgM2nhIWtyFqqIpLMUlb/R2VDcvUN5Vgtb5j
 fWIoExZvZKiNglPaiT95qL6OTfh7Jh7CVYsd3lmAOSaToyiBpdKE1vX8LbGjnqQXLANR
 aaqOtrv2bYcmAyb7s3sIoNsFN1qvIFcbjmU4Zm3aiK/4Cw2XheUXeI3kA01s+i/b2IE3
 KXuQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=1ATbcOnAUtzz5yAO/5oYVWyZaQrUCTPVp/6PJ1YMFHs=;
 b=GhGRISYFHmxkI96QAdRt91reNZ2xq6gURX0qHd+wzniUomc4OUzSDvEhe6lvELOHfp
 M2ON5377s3L5R0AGkLVESYtH8Qh3M/G3Ad340gbPBuhWuCuNwEZq4IkOHspaXAWhqqDt
 fqK0T41XYiLGbW2NKzxscR/2ZiQTzGZ/wH7fSYrMAbnbRh6zOdPVQBHvABpOsAxyphrK
 0ryFwH8x0eTm+4G9Ho+23uz5Olf8V4DkTLB3zIQNVpqulVkfkWbo534MI+6JrAhmgeCG
 XB0RIbbPcW0llnbH0uY428Tu1EnRGtC9a8VTM/OJlxEp5/xneoYOMCJkw5SupQxG2mib
 d+nA==
X-Gm-Message-State: AOAM533+qOD/3l20btv66qor/jn5dppznYnCXK9BTdb28PpW7UNcc9VA
 Qv1ERtmOC3vrkMAl7+sB7gVCy6sqPej+mCDlGYk5/7L/K9k=
X-Google-Smtp-Source: ABdhPJw/1ju9vRydgNVyQbSQQprN4Ucr1e3f9V+I74PfhLwQMLO/wdfsYlDL4pSDfnJ/ucG+ZzLWbCu3u8FcuEYPteQ=
X-Received: by 2002:a05:6000:f:: with SMTP id
 h15mr3704394wrx.148.1612962825288; 
 Wed, 10 Feb 2021 05:13:45 -0800 (PST)
MIME-Version: 1.0
From: Antoine Riard <antoine.riard@gmail.com>
Date: Wed, 10 Feb 2021 08:13:34 -0500
Message-ID: <CALZpt+E6UqB5cew145PO2qiEMsELJ-TuGyE5PBL04T1tESiOiQ@mail.gmail.com>
To: Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
Content-Type: multipart/alternative; boundary="0000000000003cc08005bafb2c86"
X-Mailman-Approved-At: Wed, 10 Feb 2021 14:19:50 +0000
Subject: [bitcoin-dev] Proposal to stop processing of unrequested
	transactions in Bitcoin Core
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: Wed, 10 Feb 2021 13:13:53 -0000

--0000000000003cc08005bafb2c86
Content-Type: text/plain; charset="UTF-8"

Hi,

I'm proposing to stop the processing of unrequested transactions in Bitcoin
Core 22.0+ at TX message reception. An unrequested transaction is one
defined by which a "getdata" message for its specific identifier (either
txid or wtxid) has not been previously issued by the node [0].

This change is motivated by reducing the CPU DoS surface of Bitcoin Core
around mempool acceptance. Currently, an attacker can open multiple inbound
connections to a node and send expensive to validate, junk transactions.
Once the canonical INV/GETDATA sequence is enforced on the network, a
further protection would be to deprioritize bandwidth and validation
resources allocation, or even to wither connections with such DoSy peers. A
permissioned peer (PF_RELAY) will still be able to bypass such restrictions.

Raw TX message processing has always been tolerated by Core and as such
some Bitcoin clients aren't bothering with an INV/GETDATA sequence. Such
change will break their tx-relay capabilities on the p2p network and
require adaptation from them. Given deployment time of any release, I hope
it provides a window time wide enough before the old tx-processing behavior
becomes the minority.

Eager to gather feedback on this proposal, especially if such change is
deemed as too much constraining or fast on any Bitcoin software.

Cheers,
Antoine

[0] See https://github.com/bitcoin/bitcoin/pull/20277

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

<div dir=3D"ltr"><div>Hi,<br><br>I&#39;m proposing to stop the processing o=
f unrequested transactions in Bitcoin Core 22.0+ at TX message reception. A=
n unrequested transaction is one defined by which a &quot;getdata&quot; mes=
sage for its specific identifier (either txid or wtxid) has not been previo=
usly issued by the node [0].<br><br>This change is motivated by reducing th=
e CPU DoS surface of Bitcoin Core around mempool acceptance. Currently, an =
attacker can open multiple inbound connections to a node and send expensive=
 to validate, junk transactions. Once the canonical INV/GETDATA sequence is=
 enforced on the network, a further protection would be to deprioritize ban=
dwidth and validation resources allocation, or even to wither connections w=
ith such DoSy peers. A permissioned peer (PF_RELAY) will still be able to b=
ypass such restrictions.<br><br>Raw TX message processing has always been t=
olerated by Core and as such some Bitcoin clients aren&#39;t bothering with=
 an INV/GETDATA sequence. Such change will break their tx-relay capabilitie=
s on the p2p network and require adaptation from them. Given deployment tim=
e of any release, I hope it provides a window time wide enough before the o=
ld tx-processing behavior becomes the minority.<br><br>Eager to gather feed=
back on this proposal, especially if such change is deemed as too much cons=
training or fast on any Bitcoin software.<br><br>Cheers,<br>Antoine<br><br>=
[0] See <a href=3D"https://github.com/bitcoin/bitcoin/pull/20277">https://g=
ithub.com/bitcoin/bitcoin/pull/20277</a><br></div></div>

--0000000000003cc08005bafb2c86--