Skip to content

Conversation

sdaftuar
Copy link
Member

My suggestion for how to address the first three items mentioned in #8294:

  • Add size-accounting to addPackageTxs(), and use that instead of addScoreTxs() even when -blockmaxsize is in use.
  • Bugfix: prevent addPackageTxs() from selecting witness transactions before segwit activation, even if mempool policy allows witness transactions in.
  • Remove addScoreTxs(), which is no longer used anywhere.
  • Remove -blockminsize command line option, which has no effect on the mining behavior anymore.

I can drop the last two commits if we decide to go a different direction.

@sdaftuar
Copy link
Member Author

sdaftuar commented Jul 5, 2016

I added a warning if -blockminsize is given on the command line, as we discussed on IRC last week, so this PR is now ready for review.

@laanwj I left the string for the warning untranslated because we're past the string freeze for translations for 0.13.0, but I wasn't sure if that was the right thing to do? Not sure what your preference is for how we display the warning.

@jonasschnelli jonasschnelli added this to the 0.13.0 milestone Jul 7, 2016
@sipa
Copy link
Member

sipa commented Jul 11, 2016

ACK c1d61fb, that was easier than I had anticipated (I thought we'd need to add size-based accounting to the mempool, but only a per-package check is needed).

Also nice to see AddScoreTx disappear. This also means that the existing mining tests now all test the only remaining algorithm.

@@ -453,7 +453,6 @@ std::string HelpMessage(HelpMessageMode mode)

strUsage += HelpMessageGroup(_("Block creation options:"));
strUsage += HelpMessageOpt("-blockmaxcost=<n>", strprintf(_("Set maximum block cost (default: %d)"), DEFAULT_BLOCK_MAX_COST));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this done in this pull?

ACTION: rename blockmaxcost to blockmaxweight (wumpus, 19:25:14)
http://www.erisian.com.au/meetbot/bitcoin-core-dev/2016/bitcoin-core-dev.2016-07-14-19.00.html

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #8354

@laanwj laanwj merged commit c1d61fb into bitcoin:master Jul 18, 2016
laanwj added a commit that referenced this pull request Jul 18, 2016
c1d61fb Add warning if -blockminsize is used. (Suhas Daftuar)
27362dd Remove -blockminsize option (Suhas Daftuar)
d2e46e1 Remove addScoreTxs() (Suhas Daftuar)
6dd4bc2 Exclude witness transactions in addPackageTxs() pre-segwit activation (Suhas Daftuar)
f15c2cd CreateNewBlock: add support for size-accounting to addPackageTxs (Suhas Daftuar)
codablock pushed a commit to codablock/dash that referenced this pull request Dec 28, 2017
c1d61fb Add warning if -blockminsize is used. (Suhas Daftuar)
27362dd Remove -blockminsize option (Suhas Daftuar)
d2e46e1 Remove addScoreTxs() (Suhas Daftuar)
6dd4bc2 Exclude witness transactions in addPackageTxs() pre-segwit activation (Suhas Daftuar)
f15c2cd CreateNewBlock: add support for size-accounting to addPackageTxs (Suhas Daftuar)
codablock added a commit to codablock/dash that referenced this pull request Dec 28, 2017
…8295

Also remove nBlockMinSize check from addPackageTxs. Removed by SegWit
related commits in Bitcoin.
andvgal pushed a commit to energicryptocurrency/gen2-energi that referenced this pull request Jan 6, 2019
c1d61fb Add warning if -blockminsize is used. (Suhas Daftuar)
27362dd Remove -blockminsize option (Suhas Daftuar)
d2e46e1 Remove addScoreTxs() (Suhas Daftuar)
6dd4bc2 Exclude witness transactions in addPackageTxs() pre-segwit activation (Suhas Daftuar)
f15c2cd CreateNewBlock: add support for size-accounting to addPackageTxs (Suhas Daftuar)
andvgal pushed a commit to energicryptocurrency/gen2-energi that referenced this pull request Jan 6, 2019
…8295

Also remove nBlockMinSize check from addPackageTxs. Removed by SegWit
related commits in Bitcoin.
furszy added a commit to PIVX-Project/PIVX that referenced this pull request Jul 14, 2021
…priority removal

f5b2e54 Fix comparisons for integer expressions of different signedness (random-zebra)
784d8b4 [Doc] Add Mempool priority changes to release notes (random-zebra)
6163d4b Remove -blockminsize option (Suhas Daftuar)
b304fb9 Allow setting minrelaytxfee to 0 (Alex Morcos)
006136e Make boost::multi_index comparators const (Suhas Daftuar)
5858fb5 [Tests] Remove priority check for sapling txes (random-zebra)
e267d02 [Cleanup] Remove coin age priority completely (random-zebra)
4298938 [RPC] Remove priorityDelta from prioritisetransaction (random-zebra)
cd1535a [rpc] Remove priority information from mempool RPC calls (Alex Morcos)
3b4d207 [Refactor][RPC] entryToJSON/EntryDescriptionString out of mempoolToJSON (random-zebra)
142415e Fix edge case with stale fee estimates (Alex Morcos)
9f47b0f Add clarifying comments to fee estimation (Alex Morcos)
57b7922 Add extra logging to processBlock in fee estimation. (Alex Morcos)
59486ef Add IsCurrentForFeeEstimatation (Alex Morcos)
d23ebfd Pass pointers to existing CTxMemPoolEntries to fee estimation (Alex Morcos)
be5982e Always update fee estimates on new blocks. (Alex Morcos)
aa97809 rename bool to validFeeEstimate (Alex Morcos)
82aba64 Remove member variable hadNoDependencies from CTxMemPoolEntry (random-zebra)
c3758e1 Don't track transactions at all during IBD. (Alex Morcos)
9ca59ae [rpc] rawtx: Prepare fLimitFree to make it an option (MarcoFalke)
f682e75 [wallet] Set fLimitFree = true (MarcoFalke)
0221d5a [QA] Fix random failure in wallet_abandonconflict.py (random-zebra)
33c9aa1 [Trivial] Pass hash by const ref to CBlockPolicyEstimator::removeTx (random-zebra)
7be33e0 Remove extraneous LogPrint from fee estimation (Alex Morcos)
7b6e8a3 [test] Remove priority from tests (Alex Morcos)
c2ecf27 No longer allow "free" transactions (Alex Morcos)
5c577c5 [Cleanup] Remove feature_nulldummy.py unused functional test (random-zebra)
3097847 [cleanup] Remove estimatePriority and estimateSmartPriority (random-zebra)
f283e8a [debug] Change -printpriority option (Alex Morcos)
dcddcaf [Cleanup] Remove unused (always false) fAllowFree arg in GetMinRelayFee (random-zebra)
03d2ee9 [mining] Remove -blockprioritysize. (Alex Morcos)
cfaeb97 [BUG] Don't add priority txes (random-zebra)
01882da Add unit tests for ancestor feerate mining (Suhas Daftuar)
49b1a9b [Policy] Limit total SHIELD size and check spork 20 in addPackageTxs (random-zebra)
cc473ed Use ancestor-feerate based transaction selection for mining (random-zebra)
dfaf4e7 [Wallet] Remove sendfree (random-zebra)

Pull request description:

  This PR implements CPFP transaction selection mechanism, which is the simplest "fee bumping technique" (we might want to consider implementing RBF too later on).
  The algorithm in `CreateNewBlock` now selects transactions based on their feerate, inclusive of unconfirmed ancestor transactions.  This means that a low-fee transaction can become more likely to be selected if a high-fee transaction that spends its outputs is relayed: the fee burned in the "child" transaction, actually pays for the parent tx too (hence the name).

  This PR also removes completely the (already deprecated) notion of coinage-based priority and "free transactions area".

  Changes backported / adapted from:

  - bitcoin#7600 [Suhas Daftuar]
  - bitcoin#8287 [MarcoFalke]
  - bitcoin#8295 [Suhas Daftuar]
  - bitcoin#9138 [Alex Morcos]
  - bitcoin#9602 [Alex Morcos]
  - bitcoin#11847 [Suhas Daftuar]

ACKs for top commit:
  Fuzzbawls:
    utACK f5b2e54
  furszy:
    re-ACK f5b2e54 after rebase and last commit.

Tree-SHA512: aef64628008699c81735660fcbe51789b7dc9d2a670d0c695399a2821f01f5d72e46d72b5f57d7b28c0e0028b60b4d6294ee101b8038ea46d237c7b8729a79da
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants