From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 13E733EE for ; 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 ; 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 To: Jonathan Toomim 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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 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