HomePhabricator

remove priority free transactions mechanism (currently off by default)

Description

remove priority free transactions mechanism (currently off by default)

Summary:
Currently we have a dual mechanism where:

  • free transactions can be admitted into mempool, with some limit per time. (by default, limitfreerelay=0 so no free transactions are allowed, except in some special circumstances)
  • restrict free-ness to only high-priority transactions. (on by default: relaypriority=1)

The default behaviour is that transactions below 1 sat/byte will be
rejected when transactions come in over the p2p layer, but in some other
cases they will be admitted. Although this mechanism was "disabled" by default,
it caused an unfortunate bug where high priority, low-fee transactions could
be accepted if submitted via RPC command sendrawtransaction. This is a
problem as they can't be successfully relayed since peers do not relay low
fee, and many light wallets rely on sendrawtransaction.

In order to reduce maintenance burden, let's just remove these mechanisms
altogether.

Note, in core the corresponding pr was PR9602, which was much larger.
(and some of this has already been done in D1360)
This Diff performs only *part* of the removal that was done in PR9602.
After this diff, we still have priority transactions for mining, which
affects which txs are mined first (during congestion). It is probably
worth removing that too but that can be a separate Diff.

Also note, this includes the bugfix from PR11309 so reorgs will put
low-fee transactions back into mempool (but all other checks are still
performed). We currently roughly have this functionality
(fLimitFree=false for reorg) and it's good behaviour to keep (and
abc-p2p-compactblocks relies on this, for instance).

Depends on D4744

Test Plan:

make check
test_runner.py --extended

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D4745

Details

Provenance
Mark Lundeberg <markblundeberg@users.noreply.github.com>Authored on Dec 17 2019, 04:25
markblundebergPushed on Dec 18 2019, 01:58
Reviewer
Restricted Project
Differential Revision
D4745: remove priority free transactions mechanism (currently off by default)
Parents
rSTAGING44710ee13c6c: fix some tests that rely on free transactions being submittable via RPC
Branches
Unknown
Tags
Unknown