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
|
Return-Path: <luke@dashjr.org>
Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
[172.17.192.35])
by mail.linuxfoundation.org (Postfix) with ESMTPS id 13E733EE
for <bitcoin-dev@lists.linuxfoundation.org>;
Thu, 29 Oct 2015 00:56:21 +0000 (UTC)
X-Greylist: from auto-whitelisted by SQLgrey-1.7.6
Received: from zinan.dashjr.org (zinan.dashjr.org [192.3.11.21])
by smtp1.linuxfoundation.org (Postfix) with ESMTP id 68D7079
for <bitcoin-dev@lists.linuxfoundation.org>;
Thu, 29 Oct 2015 00:56:20 +0000 (UTC)
Received: from ishibashi.localnet (unknown
[IPv6:2001:470:5:265:61b6:56a6:b03d:28d6])
(Authenticated sender: luke-jr)
by zinan.dashjr.org (Postfix) with ESMTPSA id C459C38A5D56;
Thu, 29 Oct 2015 00:55:54 +0000 (UTC)
X-Hashcash: 1:25:151029:j@toom.im::krgSM+jwzqbURSno:iScs
X-Hashcash: 1:25:151029:bitcoin-dev@lists.linuxfoundation.org::rofQqk4H1DbGt9zM:c6I4p
From: Luke Dashjr <luke@dashjr.org>
To: Jonathan Toomim <j@toom.im>
Date: Thu, 29 Oct 2015 00:55:53 +0000
User-Agent: KMail/1.13.7 (Linux/4.1.9-gentoo-r1; KDE/4.14.8; x86_64; ; )
References: <291B85A6-D8D4-443B-B03B-C675CBEEC662@toom.im>
<201510280713.56677.luke@dashjr.org>
<554CB626-4CCC-4607-9A1F-E583A52989A6@toom.im>
In-Reply-To: <554CB626-4CCC-4607-9A1F-E583A52989A6@toom.im>
X-PGP-Key-Fingerprint: E463 A93F 5F31 17EE DE6C 7316 BD02 9424 21F4 889F
X-PGP-Key-ID: BD02942421F4889F
X-PGP-Keyserver: hkp://pgp.mit.edu
MIME-Version: 1.0
Content-Type: Text/Plain;
charset="iso-8859-15"
Content-Transfer-Encoding: 7bit
Message-Id: <201510290055.53979.luke@dashjr.org>
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD
autolearn=ham version=3.3.1
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
smtp1.linux-foundation.org
Cc: bitcoin-dev@lists.linuxfoundation.org
Subject: Re: [bitcoin-dev] Composite priority: combining fees and
bitcoin-days into one number
X-BeenThere: bitcoin-dev@lists.linuxfoundation.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Bitcoin Development 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: Thu, 29 Oct 2015 00:56:21 -0000
On Wednesday, October 28, 2015 10:41:39 PM Jonathan Toomim wrote:
> On Oct 28, 2015, at 12:13 AM, Luke Dashjr <luke@dashjr.org> wrote:
> > On Wednesday, October 28, 2015 4:26:52 AM Jonathan Toomim via bitcoin-dev
> > wrote:
> >
> > This is all in the realm of node policy, which must be easy to
> > modify/customise in a flexible manner. So simplifying other code in a way
> > that makes the policy harder to configure is not a welcome change.
> >
> > That is, by making the code simpler, if you make custom policies (such as
> > the current default) harder, it is better to leave the main code less
> > simple.
>
> I think the only custom policy that this change would make harder to
> implement is the current default policy of 5% reserved space. Right now,
> in e.g. CreateNewBlock, you have two loops, each of which follows a
> completely different policy, plus additional code for corner cases like
> ensuring that a tx isn't added twice. If I were a miner and a mediocre
> programmer (which I actually am, on both accounts), and I wanted to change
> the mining policy, I would probably take a look at that code, groan, give
> up, and go sharpen my pickaxe instead.
Yes, I hope to improve the code significantly.
> This change could be written in an abstract way. We could define an API
> that is calibrated on the whole mempool, then has a method that takes
> transactions and returns priority scores.
Trying to communicate policies as simple numbers is significantly more
complicated for the policy-writer than what we have now.
> If someone wanted to write a reserved-space algorithm in this priority API
> scheme, then they could just set it up so that most transactions would get
> a priority score between e.g. zero and 8999, and any transactions that
> were supposed to be prioritized would get a priority level over 9000. Easy
> enough?
No, because it gets exponentially harder when there are more than two factors
involved.
Luke
|