-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Remove coin age priority and free transactions - implementation #9602
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Concept ACK for removing it from the wallet. This will cause less headache when reviewing/reworking coin selection. |
Needs rebase. |
concept ACK, light utACK |
concept ACK. |
Concept ACK. Needs rebase. |
This removes the option from the wallet to not pay a fee on "small" transactions which spend "old" inputs. This code is no longer worth keeping around, as almost all miners prefer not to include transactions which pay no fee at all.
The RPC calls were already deprecated.
Remove ability of mining code to fill part of a block with transactions sorted by coin age.
-printpriority output is now changed to only show the fee rate and hash of transactions included in a block by the mining code.
Unused everywhere now except one test.
The prioritisetransaction API can always be used if a transaction needs to be submitted that bypasses minRelayTxFee.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Code review ACK, will test.
Left a few non-blocking nits for you to consider; I think they would be fine to address/discuss in future PRs if you preferred.
@@ -456,7 +456,7 @@ std::string HelpMessage(HelpMessageMode mode) | |||
strUsage += HelpMessageOpt("-printtoconsole", _("Send trace/debug info to console instead of debug.log file")); | |||
if (showDebug) | |||
{ | |||
strUsage += HelpMessageOpt("-printpriority", strprintf("Log transaction priority and fee per kB when mining blocks (default: %u)", DEFAULT_PRINTPRIORITY)); | |||
strUsage += HelpMessageOpt("-printpriority", strprintf("Log transaction fee per kB when mining blocks (default: %u)", DEFAULT_PRINTPRIORITY)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with backwards compatibility for a while but can we start to move to a better option name for this feature, and log that the old name is deprecated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree with @sdaftuar . Commit at jnewbery@b83daf9 adds -printfee
option. Feel free to pull into this PR if you want it, or I'll open another PR after this gets merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I always interpreted this as print the priority as in the sort order for mining. I have no problem changing it, but I'll leave that for another PR if people want it.
mempool.ApplyDeltas(iter->GetTx().GetHash(), dPriority, dummy); | ||
LogPrintf("priority %.1f fee %s txid %s\n", | ||
dPriority, | ||
LogPrintf("fee %s txid %s\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: if we're changing this anyway how about we switch "fee" -> "feerate"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
meh. It's pretty obvious that this is feerate from context:
2017-03-03 14:19:33 fee 0.00005913 BTC/kB txid 3bbae9e9e8299f6335b5e99912cb6717df794212477a92fb425c2b5993d3bdc7
2017-03-03 14:19:33 fee 0.00004437 BTC/kB txid a3c976f58b52b8ab29eda3c434cb21d1d3ba1d30136b329a51ba4a3f493e6adf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed anyway
src/init.cpp
Outdated
// cost to you of processing a transaction. | ||
if (IsArgSet("-minrelaytxfee")) | ||
{ | ||
CAmount n = 0; | ||
if (!ParseMoney(GetArg("-minrelaytxfee", ""), n) || 0 == n) | ||
if (!ParseMoney(GetArg("-minrelaytxfee", ""), n)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: add the curly braces for this if
while you're at it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK a1ac40b
- Changes make sense, though I think this might been have been easier to review if it consisted of a just few minimal commits that update the behavior, followed by a single larger commit that removes dead code without changing behavior.
- I didn't understand what you mean about potentially bypassing the mempool min fee in the event of mempool limiting. Could you say more about how this would work, what would be the advantages / disadvantages? Also, in the comment that "fLimitFree is now only set for transactions we are trying to reaccept to the mempool," assuming you meant "set false" not "set".
- Re: prioritisetransaction, one risk of reducing the number of arguments is that at some point in the future, somebody adds a new argument, and then old code calling the RPC with priority may appear to work but silently be broken. You could keep the priority_delta arg and require it to be null or 0 to prevent this. But I think getting rid of the argument is nice if you don't think it's likely someone will add a new prioritisetransaction argument in the future.
src/wallet/wallet.cpp
Outdated
@@ -3842,9 +3842,6 @@ bool CWallet::ParameterInteraction() | |||
bSpendZeroConfChange = GetBoolArg("-spendzeroconfchange", DEFAULT_SPEND_ZEROCONF_CHANGE); | |||
fWalletRbf = GetBoolArg("-walletrbf", DEFAULT_WALLET_RBF); | |||
|
|||
if (GetBoolArg("-sendfreetransactions", false)) | |||
InitWarning("The argument -sendfreetransactions is no longer supported."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK a1ac40b |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may also wish to update the comment above paytxfee in contrib/debian/examples/bitcoin.conf
src/wallet/wallet.cpp
Outdated
if (fSendFreeTransactions && GetArg("-limitfreerelay", DEFAULT_LIMITFREERELAY) <= 0) | ||
return InitError("Creation of free transactions with their relay disabled is not supported."); | ||
if (GetBoolArg("-sendfreetransactions", false)) | ||
InitWarning("The argument -sendfreetransactions is no longer supported."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this should be translated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was added in #9391 whose commit was included here, but then removed by the end of this PR. Would have been cleaner to take it out of the first commit, but I'm going to aim for less history churn here, it doesn't hurt anything...
@@ -1853,7 +1853,7 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr | |||
LogPrint("mempool", " invalid orphan tx %s\n", orphanHash.ToString()); | |||
} | |||
// Has inputs but not accepted to mempool | |||
// Probably non-standard or insufficient fee/priority | |||
// Probably non-standard or insufficient fee |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit message here is wrong...
it mentions that you dont enforce minRelayTxFee on sendrawtransaciton but the previous commit removed that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will fix
src/txmempool.cpp
Outdated
@@ -930,18 +929,17 @@ void CTxMemPool::PrioritiseTransaction(const uint256& hash, double dPriorityDelt | |||
} | |||
} | |||
} | |||
LogPrintf("PrioritiseTransaction: %s priority += %f, fee += %d\n", hash.ToString(), dPriorityDelta, FormatMoney(nFeeDelta)); | |||
LogPrintf("PrioritiseTransaction: %s fee += %d\n", hash.ToString(), FormatMoney(nFeeDelta)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FormatMoney returns std::string, this should be %s %s.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
contrib/debian/examples/bitcoin.conf
Outdated
@@ -118,9 +118,6 @@ | |||
|
|||
# Transaction Fee Changes in 0.10.0 | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd also lose the 'Transaction Fee Changes in 0.10.0' in the line above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
@@ -977,12 +977,12 @@ bool AppInitParameterInteraction() | |||
// If you are mining, be careful setting this: | |||
// if you set it to zero then | |||
// a transaction spammer can cheaply fill blocks using | |||
// 1-satoshi-fee transactions. It should be set above the real | |||
// 0-fee transactions. It should be set above the real |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider also changing the first sentence in this comment: Fee-per-kilobyte amount considered the same as "free"
doesn't make much sense now that we don't relay free transactions by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, on second thoughts, perhaps change the comment entirely. If you are mining, be careful setting this: if you set it to zero then a transaction spammer can cheaply fill blocks using 0-fee transactions.
is not really true, since CNB will fill blocks based on feerate. I think the risk we're trying to mitigate with -minrelaytxfee is spammers filling nodes' mempools with cheap transactions. Is that right? If so, can we update the comment?
src/txmempool.cpp
Outdated
@@ -914,7 +914,7 @@ void CTxMemPool::PrioritiseTransaction(const uint256& hash, const CAmount& nFeeD | |||
} | |||
} | |||
} | |||
LogPrintf("PrioritiseTransaction: %s fee += %d\n", hash.ToString(), FormatMoney(nFeeDelta)); | |||
LogPrintf("PrioritiseTransaction: %s feerate += %s\n", hash.ToString(), FormatMoney(nFeeDelta)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
…implementation b421e6d Update example bitcoin.conf (Alex Morcos) 7d4e950 Allow setting minrelaytxfee to 0 (Alex Morcos) 359e8a0 [cleanup] Remove coin age priority completely. (Alex Morcos) f9b9371 [rpc] Remove priorityDelta from prioritisetransaction (Alex Morcos) 49be7e1 [rpc] Remove priority information from mempool RPC calls (Alex Morcos) 0315888 [test] Remove priority from tests (Alex Morcos) f838005 No longer allow "free" transactions (Alex Morcos) ad727f4 [rpc] sendrawtransaction no longer bypasses minRelayTxFee (Alex Morcos) fe282ac [cleanup] Remove estimatePriority and estimateSmartPriority (Alex Morcos) 400b151 [debug] Change -printpriority option (Alex Morcos) 272b25a [mining] Remove -blockprioritysize. (Alex Morcos) 12839cd [rpc] Remove estimatepriority and estimatesmartpriority. (Alex Morcos) ddf58c7 wallet: Remove sendfree (MarcoFalke) Tree-SHA512: a9a4499405923ce794ef18f9e334dbbd59dfc73a3dc2df6f85cc9c62af6f353ec2eed9c2d5e58e904f918d0d7ab738f403dd4939d9bc2276136864fe63710782
…implementation b421e6d Update example bitcoin.conf (Alex Morcos) 7d4e950 Allow setting minrelaytxfee to 0 (Alex Morcos) 359e8a0 [cleanup] Remove coin age priority completely. (Alex Morcos) f9b9371 [rpc] Remove priorityDelta from prioritisetransaction (Alex Morcos) 49be7e1 [rpc] Remove priority information from mempool RPC calls (Alex Morcos) 0315888 [test] Remove priority from tests (Alex Morcos) f838005 No longer allow "free" transactions (Alex Morcos) ad727f4 [rpc] sendrawtransaction no longer bypasses minRelayTxFee (Alex Morcos) fe282ac [cleanup] Remove estimatePriority and estimateSmartPriority (Alex Morcos) 400b151 [debug] Change -printpriority option (Alex Morcos) 272b25a [mining] Remove -blockprioritysize. (Alex Morcos) 12839cd [rpc] Remove estimatepriority and estimatesmartpriority. (Alex Morcos) ddf58c7 wallet: Remove sendfree (MarcoFalke) Tree-SHA512: a9a4499405923ce794ef18f9e334dbbd59dfc73a3dc2df6f85cc9c62af6f353ec2eed9c2d5e58e904f918d0d7ab738f403dd4939d9bc2276136864fe63710782
…implementation b421e6d Update example bitcoin.conf (Alex Morcos) 7d4e950 Allow setting minrelaytxfee to 0 (Alex Morcos) 359e8a0 [cleanup] Remove coin age priority completely. (Alex Morcos) f9b9371 [rpc] Remove priorityDelta from prioritisetransaction (Alex Morcos) 49be7e1 [rpc] Remove priority information from mempool RPC calls (Alex Morcos) 0315888 [test] Remove priority from tests (Alex Morcos) f838005 No longer allow "free" transactions (Alex Morcos) ad727f4 [rpc] sendrawtransaction no longer bypasses minRelayTxFee (Alex Morcos) fe282ac [cleanup] Remove estimatePriority and estimateSmartPriority (Alex Morcos) 400b151 [debug] Change -printpriority option (Alex Morcos) 272b25a [mining] Remove -blockprioritysize. (Alex Morcos) 12839cd [rpc] Remove estimatepriority and estimatesmartpriority. (Alex Morcos) ddf58c7 wallet: Remove sendfree (MarcoFalke) Tree-SHA512: a9a4499405923ce794ef18f9e334dbbd59dfc73a3dc2df6f85cc9c62af6f353ec2eed9c2d5e58e904f918d0d7ab738f403dd4939d9bc2276136864fe63710782
…implementation b421e6d Update example bitcoin.conf (Alex Morcos) 7d4e950 Allow setting minrelaytxfee to 0 (Alex Morcos) 359e8a0 [cleanup] Remove coin age priority completely. (Alex Morcos) f9b9371 [rpc] Remove priorityDelta from prioritisetransaction (Alex Morcos) 49be7e1 [rpc] Remove priority information from mempool RPC calls (Alex Morcos) 0315888 [test] Remove priority from tests (Alex Morcos) f838005 No longer allow "free" transactions (Alex Morcos) ad727f4 [rpc] sendrawtransaction no longer bypasses minRelayTxFee (Alex Morcos) fe282ac [cleanup] Remove estimatePriority and estimateSmartPriority (Alex Morcos) 400b151 [debug] Change -printpriority option (Alex Morcos) 272b25a [mining] Remove -blockprioritysize. (Alex Morcos) 12839cd [rpc] Remove estimatepriority and estimatesmartpriority. (Alex Morcos) ddf58c7 wallet: Remove sendfree (MarcoFalke) Tree-SHA512: a9a4499405923ce794ef18f9e334dbbd59dfc73a3dc2df6f85cc9c62af6f353ec2eed9c2d5e58e904f918d0d7ab738f403dd4939d9bc2276136864fe63710782
…implementation b421e6d Update example bitcoin.conf (Alex Morcos) 7d4e950 Allow setting minrelaytxfee to 0 (Alex Morcos) 359e8a0 [cleanup] Remove coin age priority completely. (Alex Morcos) f9b9371 [rpc] Remove priorityDelta from prioritisetransaction (Alex Morcos) 49be7e1 [rpc] Remove priority information from mempool RPC calls (Alex Morcos) 0315888 [test] Remove priority from tests (Alex Morcos) f838005 No longer allow "free" transactions (Alex Morcos) ad727f4 [rpc] sendrawtransaction no longer bypasses minRelayTxFee (Alex Morcos) fe282ac [cleanup] Remove estimatePriority and estimateSmartPriority (Alex Morcos) 400b151 [debug] Change -printpriority option (Alex Morcos) 272b25a [mining] Remove -blockprioritysize. (Alex Morcos) 12839cd [rpc] Remove estimatepriority and estimatesmartpriority. (Alex Morcos) ddf58c7 wallet: Remove sendfree (MarcoFalke) Tree-SHA512: a9a4499405923ce794ef18f9e334dbbd59dfc73a3dc2df6f85cc9c62af6f353ec2eed9c2d5e58e904f918d0d7ab738f403dd4939d9bc2276136864fe63710782
…implementation b421e6d Update example bitcoin.conf (Alex Morcos) 7d4e950 Allow setting minrelaytxfee to 0 (Alex Morcos) 359e8a0 [cleanup] Remove coin age priority completely. (Alex Morcos) f9b9371 [rpc] Remove priorityDelta from prioritisetransaction (Alex Morcos) 49be7e1 [rpc] Remove priority information from mempool RPC calls (Alex Morcos) 0315888 [test] Remove priority from tests (Alex Morcos) f838005 No longer allow "free" transactions (Alex Morcos) ad727f4 [rpc] sendrawtransaction no longer bypasses minRelayTxFee (Alex Morcos) fe282ac [cleanup] Remove estimatePriority and estimateSmartPriority (Alex Morcos) 400b151 [debug] Change -printpriority option (Alex Morcos) 272b25a [mining] Remove -blockprioritysize. (Alex Morcos) 12839cd [rpc] Remove estimatepriority and estimatesmartpriority. (Alex Morcos) ddf58c7 wallet: Remove sendfree (MarcoFalke) Tree-SHA512: a9a4499405923ce794ef18f9e334dbbd59dfc73a3dc2df6f85cc9c62af6f353ec2eed9c2d5e58e904f918d0d7ab738f403dd4939d9bc2276136864fe63710782 Signed-off-by: Pasta <Pasta@dash.org>
…implementation b421e6d Update example bitcoin.conf (Alex Morcos) 7d4e950 Allow setting minrelaytxfee to 0 (Alex Morcos) 359e8a0 [cleanup] Remove coin age priority completely. (Alex Morcos) f9b9371 [rpc] Remove priorityDelta from prioritisetransaction (Alex Morcos) 49be7e1 [rpc] Remove priority information from mempool RPC calls (Alex Morcos) 0315888 [test] Remove priority from tests (Alex Morcos) f838005 No longer allow "free" transactions (Alex Morcos) ad727f4 [rpc] sendrawtransaction no longer bypasses minRelayTxFee (Alex Morcos) fe282ac [cleanup] Remove estimatePriority and estimateSmartPriority (Alex Morcos) 400b151 [debug] Change -printpriority option (Alex Morcos) 272b25a [mining] Remove -blockprioritysize. (Alex Morcos) 12839cd [rpc] Remove estimatepriority and estimatesmartpriority. (Alex Morcos) ddf58c7 wallet: Remove sendfree (MarcoFalke) Tree-SHA512: a9a4499405923ce794ef18f9e334dbbd59dfc73a3dc2df6f85cc9c62af6f353ec2eed9c2d5e58e904f918d0d7ab738f403dd4939d9bc2276136864fe63710782 Signed-off-by: Pasta <Pasta@dash.org> Fix backport and fix dash specific priority code
…implementation (#2768) b421e6d Update example bitcoin.conf (Alex Morcos) 7d4e950 Allow setting minrelaytxfee to 0 (Alex Morcos) 359e8a0 [cleanup] Remove coin age priority completely. (Alex Morcos) f9b9371 [rpc] Remove priorityDelta from prioritisetransaction (Alex Morcos) 49be7e1 [rpc] Remove priority information from mempool RPC calls (Alex Morcos) 0315888 [test] Remove priority from tests (Alex Morcos) f838005 No longer allow "free" transactions (Alex Morcos) ad727f4 [rpc] sendrawtransaction no longer bypasses minRelayTxFee (Alex Morcos) fe282ac [cleanup] Remove estimatePriority and estimateSmartPriority (Alex Morcos) 400b151 [debug] Change -printpriority option (Alex Morcos) 272b25a [mining] Remove -blockprioritysize. (Alex Morcos) 12839cd [rpc] Remove estimatepriority and estimatesmartpriority. (Alex Morcos) ddf58c7 wallet: Remove sendfree (MarcoFalke) Tree-SHA512: a9a4499405923ce794ef18f9e334dbbd59dfc73a3dc2df6f85cc9c62af6f353ec2eed9c2d5e58e904f918d0d7ab738f403dd4939d9bc2276136864fe63710782 Signed-off-by: Pasta <Pasta@dash.org> Fix backport and fix dash specific priority code
bf64c3c Ignore transactions added to mempool during a reorg for fee estimation purposes. (Alex Morcos) 04f78ab Do not reject based on mempool min fee when bypass_limits is set. (Alex Morcos) fd849e1 Change AcceptToMemoryPool function signature (Alex Morcos) Pull request description: First commit just removes default arguments from `AcceptToMemoryPool` and consolidates two arguments, it does not change behavior. Second commit finally fixes the fact that we're not meant to reject based on mempool min fee when adding a transaction from a disconnected block during a reorg as mentioned [here](bitcoin#9602 (comment)) Third commit makes fee estimation ignore transactions added from a disconnected block during a reorg. I think this was another source of fee estimates returning estimates below 1000 sat/kB as in bitcoin#11303. Tree-SHA512: 30925ca8b341915bb214f1d2590b36b7931f2e125b7660150e38ae70338f00db5aa7f1608546dddb181446924177eb7cf62ea8bd2583068acc074d6c3f86bc0c
bf64c3c Ignore transactions added to mempool during a reorg for fee estimation purposes. (Alex Morcos) 04f78ab Do not reject based on mempool min fee when bypass_limits is set. (Alex Morcos) fd849e1 Change AcceptToMemoryPool function signature (Alex Morcos) Pull request description: First commit just removes default arguments from `AcceptToMemoryPool` and consolidates two arguments, it does not change behavior. Second commit finally fixes the fact that we're not meant to reject based on mempool min fee when adding a transaction from a disconnected block during a reorg as mentioned [here](bitcoin#9602 (comment)) Third commit makes fee estimation ignore transactions added from a disconnected block during a reorg. I think this was another source of fee estimates returning estimates below 1000 sat/kB as in bitcoin#11303. Tree-SHA512: 30925ca8b341915bb214f1d2590b36b7931f2e125b7660150e38ae70338f00db5aa7f1608546dddb181446924177eb7cf62ea8bd2583068acc074d6c3f86bc0c
bf64c3c Ignore transactions added to mempool during a reorg for fee estimation purposes. (Alex Morcos) 04f78ab Do not reject based on mempool min fee when bypass_limits is set. (Alex Morcos) fd849e1 Change AcceptToMemoryPool function signature (Alex Morcos) Pull request description: First commit just removes default arguments from `AcceptToMemoryPool` and consolidates two arguments, it does not change behavior. Second commit finally fixes the fact that we're not meant to reject based on mempool min fee when adding a transaction from a disconnected block during a reorg as mentioned [here](bitcoin#9602 (comment)) Third commit makes fee estimation ignore transactions added from a disconnected block during a reorg. I think this was another source of fee estimates returning estimates below 1000 sat/kB as in bitcoin#11303. Tree-SHA512: 30925ca8b341915bb214f1d2590b36b7931f2e125b7660150e38ae70338f00db5aa7f1608546dddb181446924177eb7cf62ea8bd2583068acc074d6c3f86bc0c fix 11309 Signed-off-by: Pasta <pasta@dashboost.org>
bf64c3c Ignore transactions added to mempool during a reorg for fee estimation purposes. (Alex Morcos) 04f78ab Do not reject based on mempool min fee when bypass_limits is set. (Alex Morcos) fd849e1 Change AcceptToMemoryPool function signature (Alex Morcos) Pull request description: First commit just removes default arguments from `AcceptToMemoryPool` and consolidates two arguments, it does not change behavior. Second commit finally fixes the fact that we're not meant to reject based on mempool min fee when adding a transaction from a disconnected block during a reorg as mentioned [here](bitcoin#9602 (comment)) Third commit makes fee estimation ignore transactions added from a disconnected block during a reorg. I think this was another source of fee estimates returning estimates below 1000 sat/kB as in bitcoin#11303. Tree-SHA512: 30925ca8b341915bb214f1d2590b36b7931f2e125b7660150e38ae70338f00db5aa7f1608546dddb181446924177eb7cf62ea8bd2583068acc074d6c3f86bc0c fix 11309 Signed-off-by: Pasta <pasta@dashboost.org> fix & Signed-off-by: Pasta <pasta@dashboost.org>
bf64c3c Ignore transactions added to mempool during a reorg for fee estimation purposes. (Alex Morcos) 04f78ab Do not reject based on mempool min fee when bypass_limits is set. (Alex Morcos) fd849e1 Change AcceptToMemoryPool function signature (Alex Morcos) Pull request description: First commit just removes default arguments from `AcceptToMemoryPool` and consolidates two arguments, it does not change behavior. Second commit finally fixes the fact that we're not meant to reject based on mempool min fee when adding a transaction from a disconnected block during a reorg as mentioned [here](bitcoin#9602 (comment)) Third commit makes fee estimation ignore transactions added from a disconnected block during a reorg. I think this was another source of fee estimates returning estimates below 1000 sat/kB as in bitcoin#11303. Tree-SHA512: 30925ca8b341915bb214f1d2590b36b7931f2e125b7660150e38ae70338f00db5aa7f1608546dddb181446924177eb7cf62ea8bd2583068acc074d6c3f86bc0c fix 11309 Signed-off-by: Pasta <pasta@dashboost.org> fix & Signed-off-by: Pasta <pasta@dashboost.org>
…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
Please see #9601 for all non-technical discussion.
Includes #9391 as the first commit
Please tag 0.15
This PR removes all coin age priority functionality from the codebase.
Some remaining open questions:
prioritisetransaction
RPC API is broken. Should we instead try to implement backwards compatible support, or is it fair to break it? Previously it required exactly 3 arguments, now it requires exactly 2, so it will not result in unintended consequences.sendrawtransaction
to no longer bypass minRelayTxFee by setting fLimitFree to false.prioritisetransaction
can always be used to achieve the same effect. This seems an improvement in behavior, but isn't required (although the prioritise_transaction.py RPC test would need to be fixed if we don't include this).setfalse for transactions we are trying to reaccept to the mempool from a disconnected block. Should it also be used to bypass the mempool min fee in the event of mempool limiting. I think yes, but can be left for a separate PR. (EDIT for clarification: currently if mempool limiting is active, even if fLimitFree is set false, transactions which don't pass the mempool min fee set by the last evicted transaction will still not be accepted to the mempool. It is probably preferable that they are accepted and then the mempool will be limited again post acceptance and either there will have been room for them, they will be evicted, or they will be part of a more expensive package and something else will be evicted.)-minrelaytxfee
to 0. This isn't necessary, but seemed better to me especially now other ways to accept transactions without fee have been removed.Fixes #9601
Fixes #6675
Fixes #2673 (thanks @MarcoFalke)