summaryrefslogtreecommitdiff
path: root/55/9e9ff9e838c41918d869fa527ed1bc9d474113
blob: 3e71190fa47a7360fc9fdc8e52baa47563fe34b2 (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
Delivery-date: Tue, 19 Mar 2024 05:57:27 -0700
Received: from mail-oo1-f61.google.com ([209.85.161.61])
	by mail.fairlystable.org with esmtps  (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
	(Exim 4.94.2)
	(envelope-from <bitcoindev+bncBCYMD7OS6ECBBMEX42XQMGQE3HQCQUI@googlegroups.com>)
	id 1rmZ1y-0004W2-Ve
	for bitcoindev@gnusha.org; Tue, 19 Mar 2024 05:57:27 -0700
Received: by mail-oo1-f61.google.com with SMTP id 006d021491bc7-5a47e5eec78sf3655706eaf.0
        for <bitcoindev@gnusha.org>; Tue, 19 Mar 2024 05:57:26 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1710853041; cv=pass;
        d=google.com; s=arc-20160816;
        b=CldzCV0Yj4v+92QjIuM98eeEcFENnvCzY2fQdLTlXaU7wjaHFJ1vsEjdxsUj7dIECv
         yNHjMKoYJQ5mBhv20DAuEocufRqgmiT56Is4hAk73E0qw9A+TBn8dtoG+Vfj3cbz7s//
         FBI6y2NzJw9wLtEsEfEF9hbraWUmihCf2xAN/78FQpLSa5P+SyOxCaT05m9kBlWPX/6R
         uRMIHIlS1BtE52Z+MKFtcQd/pn7WTctk281MD3BN9FPomgGjAwzad/uJgbbQgDtOWhBg
         gSCycpjRYCebSUwyQO0eA6B8giMkekxBw83S5c6hHGdjvv3D3A2oFStzGxH+vYwSmdrP
         zNiw==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:content-transfer-encoding:cc:to
         :subject:message-id:date:from:in-reply-to:references:mime-version
         :sender:dkim-signature:dkim-signature;
        bh=lroUTnnqElOgiTN60KMAO505VgHEki2mZhYt8gLSSSU=;
        fh=TQkuBzjO7Gt/BxFLb8ewZ8YX2SRzZTLGSx8iMxjI/UE=;
        b=A1nN2l4kV1xuWAIVvIvsGeuZVYsG9eMrmtj+IZQHRT3CIOe8O6c9apk4WsOQtXjQ5J
         iGRMobCRh3iGI4gPalDtR7jZlkYgeO2shEtMJx8MTPG6UE0TwUGrqcr7QdmS7vPp68VN
         OizmoCE7idWTU1CQkpl7OHpVyr13K39VIMJPk72TiisUwSlHQs2EoA2InbStcPUFN9U6
         cR2CjLl24TWhMpse0tAQ/xEVGRJ2rupJpbkP1TQcLtgndjdz8fC1JNWKRDPTlJfIb6GM
         NO4fFAlDurMGibfXP5KnP2Obc34v3hpS8fdgZtqPL5fksdBr21A7rCc227qzHOZQnTep
         w11Q==;
        darn=gnusha.org
ARC-Authentication-Results: i=2; gmr-mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20230601 header.b=IO+9gZMk;
       spf=pass (google.com: domain of bnagaev@gmail.com designates 2607:f8b0:4864:20::130 as permitted sender) smtp.mailfrom=bnagaev@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=googlegroups.com; s=20230601; t=1710853041; x=1711457841; darn=gnusha.org;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:x-original-authentication-results
         :x-original-sender:content-transfer-encoding:cc:to:subject
         :message-id:date:from:in-reply-to:references:mime-version:sender
         :from:to:cc:subject:date:message-id:reply-to;
        bh=lroUTnnqElOgiTN60KMAO505VgHEki2mZhYt8gLSSSU=;
        b=uWNA445RKqxpVx361xmpLnoCRavClCjLur8NmZFYiZAwUDElb3jzJtROn3Oef9nHUt
         W177kCjK5weNgpmn1MOXLfQECwUMp36WQ6D+eP5Ns6GU5zAtqruRbQ4bHfwTWZ8rA/PX
         QIRFjagTxRcsmk1XYC/EQU3FWHAxRdR9vWTHEhGrFF5DITKHo9ybQ9m5dMjADsxfsaIQ
         BJkqIA5sVMGmXxC4Qp3C0QJN66ypijU2M7fcTtF5YJ2PojFkCy20rnwJbgOpe5WsPlyu
         pzOos128+9COAJ3Zo8l4dt/e0Iqv+DLsbwH9CvIPMPB86+nVjBoPxYH7l/3D/Y3CdF1c
         5gdA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1710853041; x=1711457841; darn=gnusha.org;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:x-original-authentication-results
         :x-original-sender:content-transfer-encoding:cc:to:subject
         :message-id:date:from:in-reply-to:references:mime-version:from:to:cc
         :subject:date:message-id:reply-to;
        bh=lroUTnnqElOgiTN60KMAO505VgHEki2mZhYt8gLSSSU=;
        b=fdTquRkQJpAvOPYr6+zlcaqrf3m5LnP9WWebgF/WgiJWJ1SQMnp8zPQ4dRpRPwJfv6
         8rO8FZ7zFFVHx+yIVezfDakMf6pjNfHkBe5At7yrNYcFTbDMph+4mQ1tdSBzP/Ka5IyS
         mUcxB9vj2ApwH0r1HdNiCWdQv472h82yUFqhgcSYtI5bWqGS+lrDkVbka8iS6mMKLAKI
         8BOfu8ZsILrApofh7aNtHh1aUfUZDFDqzFfRz5Yj9xzQJMHX0SdgSnMWltKg5+suQeKc
         cCN2ZaMddCw6fA3f3o9EKSRlYB9hl+qSxnhtHZ++uwr6OSQKmaWc7IjcqWwoHhYf4wBu
         yIbA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1710853041; x=1711457841;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:x-original-authentication-results
         :x-original-sender:content-transfer-encoding:cc:to:subject
         :message-id:date:from:in-reply-to:references:mime-version
         :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date
         :message-id:reply-to;
        bh=lroUTnnqElOgiTN60KMAO505VgHEki2mZhYt8gLSSSU=;
        b=Lt/rMXSV3jr7k1NjNwfFfqKHJ8R+H1/pVZJ+UDoCcNcqcQ4oox4B1jf4Xm1f7x4LHv
         aQl2wvZFQPU0rhwLDsqZY5+cyQw/GybA86ZFKMbyOFsxBYuUI6i2QTk3DJOcpjJKI/bR
         v2U6d2C9o9Lk1ijT+tw6aclMBQs31MYh6FumCbmo6jU3iyFSXqeVLU6iGQCqW7OER4MS
         6NNt9WGvw6AG1qROf1eQSbwO5qUcL0JIUMx8H1KoN1vchUMlbdp2XxmPfvc1gBhm6rSl
         DcIDABOVhSXuNfQ+I3ravjZeK1/48SaBaZvr0JPEk8qvaEYak1Ysc3SFPA6y1IwVPrbZ
         GW0A==
Sender: bitcoindev@googlegroups.com
X-Forwarded-Encrypted: i=2; AJvYcCWUhUovttWReB7A6PeDitQsZmbWiGbATrLj47WNxUrGa3eBu7CFv96KyxCGmAvVpvA2dIpginpbejOhokVgdU9Gz/AQ0uw=
X-Gm-Message-State: AOJu0Yyq44tspRBIbb3mU6dBQp6KfVx2eEcwOVv5nHQwiaeIL2CGdKg7
	69l8olKFfQA/shWBOBRMnPv3v+PDiCo9tFj0tSWxepf+c6QzFB2l
X-Google-Smtp-Source: AGHT+IEngIdDXvXL8zbvJ1+gKokIQCD/lKPO5kWQMugcEp2Lci8x9p4GcwUnGP6XLeOboicKepNpLg==
X-Received: by 2002:a05:6820:2714:b0:5a4:852f:4c08 with SMTP id db20-20020a056820271400b005a4852f4c08mr2141076oob.4.1710853040933;
        Tue, 19 Mar 2024 05:57:20 -0700 (PDT)
X-BeenThere: bitcoindev@googlegroups.com
Received: by 2002:a4a:6f59:0:b0:5a4:5fe2:2211 with SMTP id i25-20020a4a6f59000000b005a45fe22211ls4847836oof.1.-pod-prod-07-us;
 Tue, 19 Mar 2024 05:57:20 -0700 (PDT)
X-Received: by 2002:a05:6820:1ca9:b0:5a1:3e58:1396 with SMTP id ct41-20020a0568201ca900b005a13e581396mr139302oob.1.1710853040064;
        Tue, 19 Mar 2024 05:57:20 -0700 (PDT)
Received: by 2002:a05:6808:198a:b0:3c3:7887:cbe4 with SMTP id 5614622812f47-3c37887d296msb6e;
        Tue, 19 Mar 2024 05:38:38 -0700 (PDT)
X-Received: by 2002:a05:6a20:3d24:b0:1a3:4a22:5c5c with SMTP id y36-20020a056a203d2400b001a34a225c5cmr3061071pzi.5.1710851917844;
        Tue, 19 Mar 2024 05:38:37 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1710851917; cv=none;
        d=google.com; s=arc-20160816;
        b=UGwIl9wBPBx+jrA2BzU5Do9+cb++/LjUgAOPy8ahp/Nb8AAhDKwxncOlqyhdJ4DGF/
         tUQpjauSunBeJHCHUsdX3jeJfyjHZcWty3At9aj4Vi6El3+EI3vwqmojIAYj2u4w1Ers
         B8GDSsdcUUFUl6Cg8cIxus0FYCG/IYUevxLNdX/LgI6s/wf3nTzubKlBNZqZswR8TfZB
         ffssu11Mj0vZQUBgpwfbm30VfymLy6093n5afn8tbRrJ+p5vV8Npsk+HQ981aIkDZH/P
         K1aJ8Y6Ypz0B2YgUZcxeL+BL9nMqHXbOEBTgmxT7uhqS5wyFscXPyc+CaAJDSSFSJU59
         j2Bg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=content-transfer-encoding:cc:to:subject:message-id:date:from
         :in-reply-to:references:mime-version:dkim-signature;
        bh=uJwA1gYOcKHoHr+cgbraCyRZnf7eON12LAha6qCNgGI=;
        fh=psWP3UCtCzzPEOUoUzVM9ZZK8adYsTeWDAKCd6L5Zok=;
        b=unsHwkgi4nYfP2p85qMYN7biEJMsaihe4F2rIYsNTXF1RXLnqdXRLU2HVFb4HgDjq8
         epMvGsYi51L0v+VLm6s6IlQbFMl9bmWG9Mv7fM0c5lnTkLlN5oq3QHngI+3yCfj/HBTy
         HU2y9VOsuII0qp1FIRRlG8VakKfA5JTw7jwglxFPs3OgygPH2LF2MXtcjyuLJ6OGnzh6
         B4vE/rR13yxUDwr0qWAjUE01Xv1iD+r08gA0uLqhQYLjPkkm9ZHWkfTHVEGPvVjN47SQ
         AupQk4jYmbaFGLtzbqZD3yRssauucSNa0yWJPRra/Kg5LPBMi4xyjNFDajiLw0ULu3N+
         KX3A==;
        dara=google.com
ARC-Authentication-Results: i=1; gmr-mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20230601 header.b=IO+9gZMk;
       spf=pass (google.com: domain of bnagaev@gmail.com designates 2607:f8b0:4864:20::130 as permitted sender) smtp.mailfrom=bnagaev@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
Received: from mail-il1-x130.google.com (mail-il1-x130.google.com. [2607:f8b0:4864:20::130])
        by gmr-mx.google.com with ESMTPS id bw8-20020a056a02048800b005e430f2514esi609899pgb.0.2024.03.19.05.38.37
        for <bitcoindev@googlegroups.com>
        (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
        Tue, 19 Mar 2024 05:38:37 -0700 (PDT)
Received-SPF: pass (google.com: domain of bnagaev@gmail.com designates 2607:f8b0:4864:20::130 as permitted sender) client-ip=2607:f8b0:4864:20::130;
Received: by mail-il1-x130.google.com with SMTP id e9e14a558f8ab-3666affcb59so24784015ab.2
        for <bitcoindev@googlegroups.com>; Tue, 19 Mar 2024 05:38:37 -0700 (PDT)
X-Received: by 2002:a92:dc8d:0:b0:366:c68f:cf86 with SMTP id
 c13-20020a92dc8d000000b00366c68fcf86mr2320600iln.32.1710851917220; Tue, 19
 Mar 2024 05:38:37 -0700 (PDT)
MIME-Version: 1.0
References: <Zfg/6IZyA/iInyMx@petertodd.org>
In-Reply-To: <Zfg/6IZyA/iInyMx@petertodd.org>
From: Nagaev Boris <bnagaev@gmail.com>
Date: Tue, 19 Mar 2024 09:37:59 -0300
Message-ID: <CAFC_Vt7BE866DJGQ9EqA+DroEkDH+4U_72-RpCUfyrLHmtnZ1Q@mail.gmail.com>
Subject: Re: [bitcoindev] A Free-Relay Attack Exploiting RBF Rule #6
To: Peter Todd <pete@petertodd.org>
Cc: bitcoindev@googlegroups.com
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Original-Sender: bnagaev@gmail.com
X-Original-Authentication-Results: gmr-mx.google.com;       dkim=pass
 header.i=@gmail.com header.s=20230601 header.b=IO+9gZMk;       spf=pass
 (google.com: domain of bnagaev@gmail.com designates 2607:f8b0:4864:20::130 as
 permitted sender) smtp.mailfrom=bnagaev@gmail.com;       dmarc=pass (p=NONE
 sp=QUARANTINE dis=NONE) header.from=gmail.com
Precedence: list
Mailing-list: list bitcoindev@googlegroups.com; contact bitcoindev+owners@googlegroups.com
List-ID: <bitcoindev.googlegroups.com>
X-Google-Group-Id: 786775582512
List-Post: <https://groups.google.com/group/bitcoindev/post>, <mailto:bitcoindev@googlegroups.com>
List-Help: <https://groups.google.com/support/>, <mailto:bitcoindev+help@googlegroups.com>
List-Archive: <https://groups.google.com/group/bitcoindev
List-Subscribe: <https://groups.google.com/group/bitcoindev/subscribe>, <mailto:bitcoindev+subscribe@googlegroups.com>
List-Unsubscribe: <mailto:googlegroups-manage+786775582512+unsubscribe@googlegroups.com>,
 <https://groups.google.com/group/bitcoindev/subscribe>
X-Spam-Score: -0.5 (/)

Hi Peter,

On Mon, Mar 18, 2024 at 10:24=E2=80=AFAM Peter Todd <pete@petertodd.org> wr=
ote:
> Rule #6 creates a path dependency: the order in which replacement transac=
tions
> are received determines which transactions are ultimately accepted.

I'd like to share my thoughts regarding RBFR rules and propose something.

The proposed RBFR rule is also path-dependent. Two transactions can
conflict with each other, but their fee rates can be too close for one
of them to eliminate the other from nodes' mempools. The first
transaction a node sees is kept in its mempool.

Is it possible to have a rule that is completely path-independent? The
eviction rules are path-independent iff, for each pair of conflicting
transactions A and B, it is always known which of them should be
preferred over the other, and this relation is transitive. Having such
a property would be very beneficial in preventing any attacks on the
mempool. This property of the mempool can also be seen as the eventual
consistency of all the mempools of the nodes. A good property, isn't
it?

How can we design such a rule system?

 1. It must align with miners' incentives; otherwise, it simply won't work.
 2. And it must not open the door for DoS attacks on the mempool.

The naive approach satisfying the first requirement is a simple rule
saying "the higher the fee rate, the more preferential is the
transaction." However it does not specify what to do with two
transactions of the same fee rate and also doesn't prevent DoS
attacks. The former is easy to fix, e.g. preferring the transaction
with lower txid. (Must be formally proven though.) Let's discuss the
latter, which is a stumbling stone here.

Traditionally, the way of preventing DoS was to reject some
transactions and to stop their broadcasting at this node. What about
deprioritizing them instead? Make two priority queues of transactions
in the node: (1) to process incoming transactions and (2) to
broadcast. When a transaction is double-spent, it is deprioritized in
both queues. If an attacker sends many double-spending transactions to
DoS the mempool, not all of them are broadcast further because by the
time a transaction is ready to be broadcast, its newer version has
already evicted it; the first one is not yet broadcasted. So a node
broadcasts fewer transactions than it receives, which reduces the DoS
effect. And still, the whole system is eventually consistent; just
spammers get their transactions spread slower.

What are your thoughts on this scheme?

--
Best regards,
Boris Nagaev

--=20
You received this message because you are subscribed to the Google Groups "=
Bitcoin Development Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to bitcoindev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/=
bitcoindev/CAFC_Vt7BE866DJGQ9EqA%2BDroEkDH%2B4U_72-RpCUfyrLHmtnZ1Q%40mail.g=
mail.com.