public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: Luke Dashjr <luke@dashjr.org>
To: Jonathan Toomim <j@toom.im>
Cc: bitcoin-dev@lists.linuxfoundation.org
Subject: Re: [bitcoin-dev] Composite priority: combining fees and bitcoin-days into one number
Date: Thu, 29 Oct 2015 00:55:53 +0000	[thread overview]
Message-ID: <201510290055.53979.luke@dashjr.org> (raw)
In-Reply-To: <554CB626-4CCC-4607-9A1F-E583A52989A6@toom.im>

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


      reply	other threads:[~2015-10-29  0:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-28  4:26 [bitcoin-dev] Composite priority: combining fees and bitcoin-days into one number Jonathan Toomim
2015-10-28  7:13 ` Luke Dashjr
2015-10-28 22:41   ` Jonathan Toomim
2015-10-29  0:55     ` Luke Dashjr [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201510290055.53979.luke@dashjr.org \
    --to=luke@dashjr.org \
    --cc=bitcoin-dev@lists.linuxfoundation.org \
    --cc=j@toom.im \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox