HomePhabricator

feefilter: Compute the absolute fee rather than stored rate to match mempool…

Description

feefilter: Compute the absolute fee rather than stored rate to match mempool acceptance logic

Summary:
Under certain circumstances the mempool will accept things, then not relay to any peers because the computed feerate is insufficient. Use the rounding-down behavior in GetFee to match both mempool acceptance and wallet logic, with minimal changes.

Description of the issue:

Currently fee filter and mempool/wallet will disagree on the sufficiency of minrelay fee transactions when the min relay rate is not % 1000 = 0. The wallet and mempool will allow a transaction to be created and entered into mempool, but then peers that have the same rate as a fee filter will not receive the transaction because of the undershooting that occurs in GetFee.

This is a backport of Core PR16507

It includes following commits:
https://github.com/bitcoin/bitcoin/pull/16507/commits/8e59af55aaf1b196575084bce2448af02d97d745
https://github.com/bitcoin/bitcoin/pull/16507/commits/eb7b78165966f2c79da71b993c4c4d793e37297f

The ignored commit is not relevant because the CFeeRate constructor is already explicit, in Bitcoin ABC. See D3313 for why this is the case. Thus the backport is completed.

Test Plan: ninja all check-all

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, deadalnix

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, deadalnix

Subscribers: deadalnix

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

Details

Provenance
Gregory Sanders <gsanders87@gmail.com>Authored on Oct 26 2020, 20:34
PiRKCommitted on Oct 26 2020, 20:34
abc-botPushed on Oct 26 2020, 20:40
Reviewer
Restricted Owners Package
Differential Revision
D8110: feefilter: Compute the absolute fee rather than stored rate to match mempool acceptance logic
Parents
rABC614642a768be: Move a release note that belongs in the 0.22.6 release
Branches
Unknown
Tags
Unknown