[miner] lower default -blockmintxfee to 1sat/kvB
What changed, and why it matters
This change lowers the default minimum fee a Bitcoin miner requires to include a transaction in a block from 1000 satoshis per kilovbyte to 1 satoshi per kilovbyte. The intent is to let miners include any transaction already accepted by their mempool, rather than having a separate, stricter block-inclusion rule. It is a policy/configuration change, not a cryptographic or consensus bug, and it does not bypass mempool rules.
No security action required. Operators and miners should review whether the new default matches their economic policy; those wanting a higher block minimum can still set -blockmintxfee explicitly.
Security signals we found
Default mining policy parameter changed
No consensus or validation logic modified
Mempool admission policy (minrelaytxfee) remains the gatekeeper
No bounds checking, memory safety, or cryptographic code touched
Evidence from the diff
The commit changes DEFAULT_BLOCK_MIN_TX_FEE from 1000 to 1 sat/kvB in src/policy/policy.h and updates tests accordingly. The rationale is that since coin-age priority was removed, block assembly is fee-only, so a separate minimum feerate for block inclusion is redundant and can cause the node to waste mempool resources by accepting transactions it then refuses to mine. The mempool’s minrelaytxfee still controls which transactions enter the mempool. Tests are adjusted to avoid fee-rounding-to-zero issues and to include 1000 sat/kvB as an explicit non-default test case.
Changed components
src/policy/policy.hsrc/test/miner_tests.cpptest/functional/mining_basic.pyInspect captured patch +7 / −3
diff --git a/src/policy/policy.h b/src/policy/policy.h
index ad787630..bccd0866 100644
--- a/src/policy/policy.h
+++ b/src/policy/policy.h
@@ -29,7 +29,7 @@ static constexpr unsigned int DEFAULT_BLOCK_RESERVED_WEIGHT{8000};
* Setting a lower value is prevented at startup. */
static constexpr unsigned int MINIMUM_BLOCK_RESERVED_WEIGHT{2000};
/** Default for -blockmintxfee, which sets the minimum feerate for a transaction in blocks created by mining code **/
-static constexpr unsigned int DEFAULT_BLOCK_MIN_TX_FEE{1000};
+static constexpr unsigned int DEFAULT_BLOCK_MIN_TX_FEE{1};
/** The maximum weight for transactions we're willing to relay/mine */
static constexpr int32_t MAX_STANDARD_TX_WEIGHT{400000};
/** The minimum non-witness size for transactions we're willing to relay/mine: one larger than 64 */
diff --git a/src/test/miner_tests.cpp b/src/test/miner_tests.cpp
index 9207f1bf..cf0d103b 100644
--- a/src/test/miner_tests.cpp
+++ b/src/test/miner_tests.cpp
@@ -12,6 +12,7 @@
#include <node/miner.h>
#include <policy/policy.h>
#include <test/util/random.h>
+#include <test/util/transaction_utils.h>
#include <test/util/txmempool.h>
#include <txmempool.h>
#include <uint256.h>
@@ -216,6 +217,9 @@ void MinerTestingSetup::TestPackageSelection(const CScript& scriptPubKey, const
tx.vout.resize(2);
tx.vout[0].nValue = 5000000000LL - 100000000;
tx.vout[1].nValue = 100000000; // 1BTC output
+ // Increase size to avoid rounding errors: when the feerate is extremely small (i.e. 1sat/kvB), evaluating the fee
+ // at a smaller transaction size gives us a rounded value of 0.
+ BulkTransaction(tx, 4000);
Txid hashFreeTx2 = tx.GetHash();
AddToMempool(tx_mempool, entry.Fee(0).SpendsCoinbase(true).FromTx(tx));
diff --git a/test/functional/mining_basic.py b/test/functional/mining_basic.py
index 6707f4b0..4683919d 100755
--- a/test/functional/mining_basic.py
+++ b/test/functional/mining_basic.py
@@ -55,7 +55,7 @@ MAX_FUTURE_BLOCK_TIME = 2 * 3600
MAX_TIMEWARP = 600
VERSIONBITS_TOP_BITS = 0x20000000
VERSIONBITS_DEPLOYMENT_TESTDUMMY_BIT = 28
-DEFAULT_BLOCK_MIN_TX_FEE = 1000 # default `-blockmintxfee` setting [sat/kvB]
+DEFAULT_BLOCK_MIN_TX_FEE = 1 # default `-blockmintxfee` setting [sat/kvB]
class MiningTest(BitcoinTestFramework):
def set_test_params(self):
@@ -144,7 +144,7 @@ class MiningTest(BitcoinTestFramework):
node = self.nodes[0]
# test default (no parameter), zero and a bunch of arbitrary blockmintxfee rates [sat/kvB]
- for blockmintxfee_sat_kvb in (DEFAULT_BLOCK_MIN_TX_FEE, 0, 1, 5, 10, 50, 100, 500, 2500, 5000, 21000, 333333, 2500000):
+ for blockmintxfee_sat_kvb in (DEFAULT_BLOCK_MIN_TX_FEE, 0, 5, 10, 50, 100, 500, 1000, 2500, 5000, 21000, 333333, 2500000):
blockmintxfee_btc_kvb = blockmintxfee_sat_kvb / Decimal(COIN)
if blockmintxfee_sat_kvb == DEFAULT_BLOCK_MIN_TX_FEE:
self.log.info(f"-> Default -blockmintxfee setting ({blockmintxfee_sat_kvb} sat/kvB)...")
Why this scored 21/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.