Page MenuHomePhabricator

miner: Remove use of CPFP in CreateNewBlock
ClosedPublic

Authored by Fabien on Feb 9 2023, 15:03.

Details

Reviewers
sdulfari
Group Reviewers
Restricted Project
Commits
rABC3899ab994eb2: miner: Remove use of CPFP in CreateNewBlock
Summary
This removes the use of CPFP during block generation. Instead, transactions
are evaluated for block inclusion on individual bases by modified fee rate.

Port of bchn#1078.

The code has been largely massaged, with 2 main differences:

  • We use CTxMempoolEntry at some places instead of the iterator, because this is what our API returns/expects.
  • The 1-time lambdas are removed to make the code easier to read (with a single exception).

There will be more cleaning up in a follow up.

Test Plan
ninja all check-all

Event Timeline

Fabien requested review of this revision.Feb 9 2023, 15:03
sdulfari added a subscriber: sdulfari.

It is difficult to provide meaningful feedback since the starting code is difficult to read and reason. This seems to move in the right direction since the logic is simplified and there are more removals than additions. The ideal state is a BlockAssembler that pulls packages "off the top" so to speak from the mempool instead of the selection business that it's doing now.

src/node/miner.cpp
314–315

The original comment is nonsensical.

This revision is now accepted and ready to land.Feb 13 2023, 23:29
This revision was automatically updated to reflect the committed changes.