summaryrefslogtreecommitdiff
path: root/53/f074f4980073e984260359f9d8945318c37b38
blob: 49189783624d894aabbdadc91bc56e3534d74f3d (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
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
Delivery-date: Sat, 24 Feb 2024 10:48:20 -0800
Received: from mail-oo1-f55.google.com ([209.85.161.55])
	by mail.fairlystable.org with esmtps  (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
	(Exim 4.94.2)
	(envelope-from <bitcoindev+bncBDRYHVHZTUGRB3PT5CXAMGQEBRTBM6Y@googlegroups.com>)
	id 1rdx4O-0005Ji-8I
	for bitcoindev@gnusha.org; Sat, 24 Feb 2024 10:48:20 -0800
Received: by mail-oo1-f55.google.com with SMTP id 006d021491bc7-59fb0151416sf1484100eaf.2
        for <bitcoindev@gnusha.org>; Sat, 24 Feb 2024 10:48:20 -0800 (PST)
ARC-Seal: i=2; a=rsa-sha256; t=1708800494; cv=pass;
        d=google.com; s=arc-20160816;
        b=R/qDJo4ljJG37hXkLwYTzy3WkEf4QT5FYohlhzdNBE7JRpm6sgGS4QFYNLY1BmTgny
         LA1+PBR0DXji4zPVfuHSRtoQ+tYSrFBKEc/dCrEHwzEE6QCduiATaAySdoU88LMJ0hlF
         /RNj4gbWdsHfKtMjG6naGalFiXzdpneMYwJ2TWvsYY+w3WE1AybQYYJFRHpCt00x6U0C
         ZqXNXTz+VSDrosccVM8SMO/JIYrJDyC1Euu3cnyl9nMRcEa4uFRFsGwf0EXH4xyhiYQu
         diDAKoi0ZEaILJDaTRUHW2UY1MjeYKgAMPOiPIvQp65UPhFuLH2oc8EOI4tbcAGkb8lj
         N9HQ==
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:in-reply-to:content-disposition
         :mime-version:references:message-id:subject:cc:to:from:date
         :feedback-id:sender:dkim-signature;
        bh=5dmfJWBufQI+JcohlIj+dyI6gEt4gP3KaOJ8BXLrD8M=;
        fh=DEUIuKd55de0N4v7B71T45/5d1DPvdvLufezs/x9Y9w=;
        b=cmwvOQdLa2BtyjuP9VZIEylgWijmVRCFwFndFFPbsYJB3wqwne/KBVasQ/I2I0IqEZ
         kQytvVIN0rx9V04yd5vM/fTnBjqdSQjhTdRJlzzEmrplPH7X1D+zBZhRS+0Zgwjibq8w
         BSAtH2gTimCR+cCawL+l0Nk2KBWONrP8O/OmepozH7L5E7gCM61UK9+qexqvxQo/ZQba
         MbNEHc+9OL1DZRGGqJZczDdDwk7eEYUMgjnaNTBO5hPHZhznrxmtbPANbNiTu4RyE0Fa
         zEAYwVT61iGwGQY/8nx7gsSeFHqnnI4t3Kp6KH56XWAUVsgpKwlBQ8gm/nk81OR48SZg
         jeEg==;
        darn=gnusha.org
ARC-Authentication-Results: i=2; gmr-mx.google.com;
       dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=ShBSBdHT;
       spf=pass (google.com: domain of pete@petertodd.org designates 66.111.4.26 as permitted sender) smtp.mailfrom=pete@petertodd.org
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=googlegroups.com; s=20230601; t=1708800494; x=1709405294; 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:in-reply-to:content-disposition:mime-version
         :references:message-id:subject:cc:to:from:date:feedback-id:sender
         :from:to:cc:subject:date:message-id:reply-to;
        bh=5dmfJWBufQI+JcohlIj+dyI6gEt4gP3KaOJ8BXLrD8M=;
        b=OeDHaeLrtIX5F9c6Iigp4HjJlzjGnTevT8FOEAPo/PZi1M6SYDpJqMV9RIpH7b0Irj
         HF7uFE6ysQWh2p2PYnAJzdP3ylERrcIW7xmKzng28xCzAnhjQXQGygZQD3XbqnKQppx5
         9mBL9yM/c5XcOvmzuS0cYfbe8GVgFs8iy1QuOMYl7ahZXko8YdDl5U5kltPv6jO15W6K
         ybaVdRHH7rQV3ec1Mhe6cXWNQsDpjn3/2p6G3RmGlOpqDbqhzvg+W29ijfypr6OJEJ7X
         /dNNSghy1oPl4lPnUT5lQfMICQKehxb2KgNN4AgXoLD4mRykDQo87sy4SjcJ/9tEGqtl
         BOcA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1708800494; x=1709405294;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:x-original-authentication-results
         :x-original-sender:in-reply-to:content-disposition:mime-version
         :references:message-id:subject:cc:to:from:date:feedback-id
         :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date
         :message-id:reply-to;
        bh=5dmfJWBufQI+JcohlIj+dyI6gEt4gP3KaOJ8BXLrD8M=;
        b=aKgCROxp+0Izhep3kbXO3fQgqExckIMhNFu2Eh4wucAwPi0MLO+Avw3j8gBLtAlOje
         xZRmnFAA7Z1Tf+uaCa2WDeujAd0e7k7QyhbAHq09iSyxpP2vj2mhueR7od0KOYUJONDh
         hM7bEVHrkcC8Gq6RJYPtxzWO4O/M72GcHOufwo1sIZUxPvYiiaIbydWeZifoOAGNoCpQ
         Vg9tHaihXTJJqTMzFf3GSRNO4mbo1VYzgiJ33fZCjdJ2mg+zGUydveFByWrBOgfoy8EC
         OiZOY2kxQ9NCI8BOLshryxFASDD2wucn8tOXFJV/6azaayOYOdB8VOnxQmSaHLh22+af
         ryLw==
Sender: bitcoindev@googlegroups.com
X-Forwarded-Encrypted: i=2; AJvYcCVtl97NjN0lR1/L8PlzFxgACuTCUZP/G7I5pVm5GJJXCIJcyj4o5y/+j2kAevSCha77iFTx468xGYMlJbtwtWi7rQIYnNk=
X-Gm-Message-State: AOJu0YzQMtrRXVIl+uZvx2MwBR1lb5YPSQmrrOlW9oePgcuedfKfuhrB
	rtsQPEHL9a+tl1EQLipkmUHym47VZ28zkZc6hf9jgcgUVnWbFl9x
X-Google-Smtp-Source: AGHT+IEzQ5h35S3CTUNpYm7dGguNj3rXkNyh1uYikGzT+WC07EQtYrfYLn0cDr7zj+gMZteS2VqZIw==
X-Received: by 2002:a4a:9294:0:b0:5a0:4012:e5cc with SMTP id i20-20020a4a9294000000b005a04012e5ccmr2466403ooh.7.1708800494251;
        Sat, 24 Feb 2024 10:48:14 -0800 (PST)
X-BeenThere: bitcoindev@googlegroups.com
Received: by 2002:a4a:4bc7:0:b0:598:c9ef:f0fe with SMTP id q190-20020a4a4bc7000000b00598c9eff0fels1513780ooa.0.-pod-prod-06-us;
 Sat, 24 Feb 2024 10:48:13 -0800 (PST)
X-Received: by 2002:a05:6830:310f:b0:6e4:881b:fcca with SMTP id b15-20020a056830310f00b006e4881bfccamr77779ots.5.1708800493426;
        Sat, 24 Feb 2024 10:48:13 -0800 (PST)
Received: by 2002:a05:6808:2106:b0:3c1:8467:2237 with SMTP id 5614622812f47-3c188bf025dmsb6e;
        Sat, 24 Feb 2024 10:45:47 -0800 (PST)
X-Received: by 2002:a17:90a:a417:b0:29a:6f66:db with SMTP id y23-20020a17090aa41700b0029a6f6600dbmr2654782pjp.5.1708800346523;
        Sat, 24 Feb 2024 10:45:46 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1708800346; cv=none;
        d=google.com; s=arc-20160816;
        b=lgbzG946JCEQqEs1qoqUoBWQ0rDVIlpqXL5eUgSotKjGpNo73pqMuyhcwmgkRDW+1t
         k2kVSmW3hn8rS4OBmX655lSCsVz55eacjjErNN97dO4ZcNnVezlc/iJFxPe8lP4RSsnM
         IJebOL2842NkCdQo0H3DSgIBgVCmWKeaCd2/rWe9SpoqMFyW7DvHKdF/DfTLgurQk191
         5gCLDSyk290A719c6gdAl+vqiFxgqNtn2pqZYsznsGJ/qeAzroB9nN7eg5nzEZGWMZBy
         9Mnp/6ezvUIJ22qG2wiTEsCUtonChVQ3jJD1QFgjEgRvfsNQiG2NIinZ8BS7kvtPPATR
         0aSg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=in-reply-to:content-disposition:mime-version:references:message-id
         :subject:cc:to:from:date:feedback-id:dkim-signature;
        bh=xumxlMntpEIlDvW6oa98ssKnXom9lGYCn7o4WrsSLKE=;
        fh=Zedq5pd0qyqVsmfgG+8/Y9cUOZXbXVTvFM2iZX29U/g=;
        b=jqFo+t9Er2JgzQ1p3Ck2OtkVbkiTxg4t6qgSfLtEDaMLJji06pD7jIWygDdqp388Pa
         sgzSjrMCKlsReRA5mniC0VzrsqBdz6YkrCyIP11wd3tnsN9tnThSNBHAkcx3rK8u9SmA
         UDcFIhf89QIeGiDJ/6P63fqV8RQWly8lQXnam/+CuexBIWhW2NDdJCTllBCB/MU59Fgi
         luCszLoc9wE0noC3qteI6U7ZPrvNCxJiLyek1CIcmTXfxkpi1KZ04Q/1MlfZHD08TNZE
         vO6AjC11ZiygqQOhdGO3CALBZYhpQMXADKCuT8btu1vkeBr9T/SYFwaSsmzAaN44H/km
         9QLw==;
        dara=google.com
ARC-Authentication-Results: i=1; gmr-mx.google.com;
       dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=ShBSBdHT;
       spf=pass (google.com: domain of pete@petertodd.org designates 66.111.4.26 as permitted sender) smtp.mailfrom=pete@petertodd.org
Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com. [66.111.4.26])
        by gmr-mx.google.com with ESMTPS id w17-20020a17090a8a1100b00299907bd50esi296130pjn.2.2024.02.24.10.45.46
        for <bitcoindev@googlegroups.com>
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Sat, 24 Feb 2024 10:45:46 -0800 (PST)
Received-SPF: pass (google.com: domain of pete@petertodd.org designates 66.111.4.26 as permitted sender) client-ip=66.111.4.26;
Received: from compute5.internal (compute5.nyi.internal [10.202.2.45])
	by mailout.nyi.internal (Postfix) with ESMTP id 8A52E5C004B;
	Sat, 24 Feb 2024 13:45:45 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162])
  by compute5.internal (MEProxy); Sat, 24 Feb 2024 13:45:45 -0500
X-ME-Sender: <xms:WTnaZR9hr7NqVQ3LQIFScth_TdEgdlJG7lKvTuxEMMIWJaJ3fPFvAg>
    <xme:WTnaZVtQeMWQjsN1dOQmyb1lMtkCx5n0xNJDBs9ASjdlvBES0BgeSrrVBqx5wUXRf
    _dAPC984z4y0ywO5Aw>
X-ME-Received: <xmr:WTnaZfBQsCFK_abIegmsGvPjObhe3jqAtKokc0g1iPRKnlt1wLL62mcinQ>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfeekgdduudeiucetufdoteggodetrfdotf
    fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
    uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
    cujfgurhepfffhvfevuffkfhggtggujgesghdtreertddtvdenucfhrhhomheprfgvthgv
    rhcuvfhougguuceophgvthgvsehpvghtvghrthhouggurdhorhhgqeenucggtffrrghtth
    gvrhhnpedttdegtdffteeukeffhfffkeekiefhteduvdetjeeujeffgeevgefhudetjefh
    veenucffohhmrghinhepghhithhhuhgsrdgtohhmpdhpvghtvghrthhouggurdhorhhgne
    cuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphgvthgv
    sehpvghtvghrthhouggurdhorhhg
X-ME-Proxy: <xmx:WTnaZVeC7cIlaO9asUaUcUUGkxMxwHAnlCCIiNz1NdigWNpz9GkFFA>
    <xmx:WTnaZWNtsjgSZcElwYOLYLsaOImf408dJYBj5vrRnqRnwqyg4aGHsQ>
    <xmx:WTnaZXkhaqQmjDHFtw2SQiNSrLX8vLzjuCgqsFRKsP7CpvFNC4PyKA>
    <xmx:WTnaZTrtBMH_He_j1Ge8og4eo8qmsA1PtqEZosFRlHqMw0eIKkhT1Q>
Feedback-ID: i525146e8:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat,
 24 Feb 2024 13:45:45 -0500 (EST)
Received: by localhost (Postfix, from userid 1000)
	id 372025F87E; Sat, 24 Feb 2024 18:45:41 +0000 (UTC)
Date: Sat, 24 Feb 2024 18:45:41 +0000
From: Peter Todd <pete@petertodd.org>
To: Nagaev Boris <bnagaev@gmail.com>
Cc: bitcoindev@googlegroups.com
Subject: Re: [bitcoindev] Over Half of Replace-by-Fee-Rate Replacements Are Mined
Message-ID: <Zdo5VZIu3gU5wVQM@petertodd.org>
References: <ZdoSP+Z/f17TYOD+@petertodd.org>
 <CAFC_Vt5TSjGVk58o5G8aW4Jt4aJyDQvR9yE4eLvtB1t+m1jrYg@mail.gmail.com>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha512;
	protocol="application/pgp-signature"; boundary="BMq109yhr1Ol0UB7"
Content-Disposition: inline
In-Reply-To: <CAFC_Vt5TSjGVk58o5G8aW4Jt4aJyDQvR9yE4eLvtB1t+m1jrYg@mail.gmail.com>
X-Original-Sender: pete@petertodd.org
X-Original-Authentication-Results: gmr-mx.google.com;       dkim=pass
 header.i=@messagingengine.com header.s=fm1 header.b=ShBSBdHT;       spf=pass
 (google.com: domain of pete@petertodd.org designates 66.111.4.26 as permitted
 sender) smtp.mailfrom=pete@petertodd.org
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.8 (/)


--BMq109yhr1Ol0UB7
Content-Type: text/plain; charset="UTF-8"
Content-Disposition: inline

On Sat, Feb 24, 2024 at 02:55:26PM -0300, Nagaev Boris wrote:
> > I recently released a [prototype Libre Relay fork](https://github.com/petertodd/bitcoin/tree/libre-relay-v26.0) of Bitcoin Core v26.0, that among
> > other things, implements [Pure Replace-By-Fee-Rate](/2024/one-shot-replace-by-fee-rate#pure-replace-by-fee-rate) (RBFR)
> > with a 2x ratio. This means that transactions will be replaced if the fee-rate
> > of the new transaction is at least 2x higher than the old transaction(s), even
> > if the absolute fee is lower.
> 
> I like the idea of pure replacement by fee rate, but I'm not sure
> about the 2x coefficient. I'm afraid it can result in overpaying.
> 
> What is the purpose of the 2x coefficient? Is it needed to prevent DoS
> by continuously increasing feerate by a fraction of a percent? Isn't
> 1.1x enough to prevent this DoS vector? A rise from 100 sats/byte to
> 110 sats/byte is easier to bear, then a rise from 100 to 200,
> especially if the next block feerate is 105.

The coefficient is a trade-off between overpaying and DoS attack cost. The
smaller the coefficient, the more replacements that can be done:

2^10    = 1024
1.5^10  = 58
1.25^10 = 9.3
1.1^10  = 2.6

I picked 2x for the prototype because it's:

1) A safe default that makes DoS attacks _very_ expensive.
2) Low enough that the primary purpose of preventing pinning attacks still
   works.
3) High enough to be clearly incentive compatible for miners.
4) A ratio that's easy to implement with addition.

The last reason is kinda funny... CFeeRate in Bitcoin Core v26.0 doesn't
support multiplication or division operations. So I implemented the 2x ratio by
just adding a fee-rate to itself.

Personally, I think 1.25 would be a reasonable ratio. But I wanted to release a
conservative version first to minimize the impact of DoS attacks.

-- 
https://petertodd.org 'peter'[:-1]@petertodd.org

-- 
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 email to bitcoindev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bitcoindev/Zdo5VZIu3gU5wVQM%40petertodd.org.

--BMq109yhr1Ol0UB7
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEE0RcYcKRzsEwFZ3N5Lly11TVRLzcFAmXaOVIACgkQLly11TVR
LzdCYg/9EfIMUPK2Z6TJwODCedxxx4V0NcwYnhMaMFT9c8jgx5HnvaDvuddotG7D
1AIEpN7hRvv7rLQdzTdpYSBp3BuPaKGvPaAaSQFJ9cI1jMxlDbSHHWtslH+GeLvS
+NWHR/DQhhhEVLjt7JWeDWSyvaJuc1ZrCSQPrs9tJBy6XQIKSs2cq+VcSE0T4fpa
tcU/PgXt9guN0VnQ2i/osSeSf8azdz4gKPluoTydJKXVLAAru1jQeMhIwWvqt5e/
J806F6T6IfMuTFY2e9sNhx7r/0phzLq42tIAGH+PBeXnNqX69Ne//7Qzn6Q9NoFX
o1/p/Nobt64yf9NJLvvQb9f1dbLKPTe3DReQTmB0a4f24hM+l2cHtTOlZcAaSdtt
sPeg5xJLWZ+eTWpQlpUMk1v0DgZS/mUbZedU68L7qJdENvJYJ/tJ0VVDmii9xBpJ
zgoDtjQtawsdy8y/M4cvZM+kYzTZyE8f+Q2GxSNdAOEo+5YmULIhKY5/XWtszj/I
DrsoNe9YTf6yW0X7V/rNKd/8FxnBxHNn1Go2hi3TMeTyDgl6N60lm8IFlR6S0F4E
4L5E5a8Ge+kbI5cxRf6c4YmDqXTiiEUyJeW6SO3XfqPIpijQdUTAVgl93tJMmHI4
BC68Z4pIqkh8QrBztVd/AsdQyOj2UgizXgChaHU7O+ZbTsjefxQ=
=BkdP
-----END PGP SIGNATURE-----

--BMq109yhr1Ol0UB7--