mining: Break compatibility with existing IPC mining clients#34568
mining: Break compatibility with existing IPC mining clients#34568sedited merged 9 commits intobitcoin:masterfrom
Conversation
There should be no change in behavior Co-authored-by: Sjors Provoost <sjors@sprovoost.nl>
Allow `expected_stderr` option passed to `wait_until_stopped` and `is_node_stopped` helper functions to be a regex pattern instead of just a fixed string. Allow `expected_ret_code` be list of possible exit codes instead of a single error code to handle the case where exit codes vary depending on OS and libc.
libmultiprocess currently handles uncaught exceptions from IPC methods badly when an `mp.Context` parameter is passed and the IPC call executes on an a worker thread, with the uncaught exception leading to a std::terminate call. bitcoin-core/libmultiprocess#218 was created to fix this, but before that change is available, update an IPC test which can trigger this behavior to handle it and recover when mp.Context parameters are added in the an upcoming commit. Having this workaround makes the test a little more complicated and less strict but reduces dependencies between pending PRs so they don't need to be reviewed or merged in a particular order.
This commit only declares constants without using them. They will be applied in seperate commit since changing struct default field values in cap'n proto is not backwards compatible.
This change copies default option values from the C++ mining interface to the Cap'n Proto interface. Currently, no capnp default values are set, so they are implicitly all false or 0, which is inconvenient for the rust and python clients and inconsistent with the C++ client. Warning: This is an intermediate, review-only commit. Binaries built from it should not be distributed or used to connect to other clients or servers. It makes incompatible changes to the `mining.capnp` schema without updating the `Init.makeMining` version, causing binaries to advertise support for a schema they do not actually implement. Mixed versions may therefore exchange garbage requests/responses instead of producing clear errors. The final commit in this series bumps the mining interface number to ensure mismatches are detected. git-bisect-skip: yes
This change removes deprecated methods from the ipc mining interface. Warning: This is an intermediate, review-only commit. Binaries built from it should not be distributed or used to connect to other clients or servers. It makes incompatible changes to the `mining.capnp` schema without updating the `Init.makeMining` version, causing binaries to advertise support for a schema they do not actually implement. Mixed versions may therefore exchange garbage requests/responses instead of producing clear errors. The final commit in this series bumps the mining interface number to ensure mismatches are detected. git-bisect-skip: yes
…le schema change) Adding a context parameter ensures that these methods are run in their own thread and don't block other calls. They were missing for: - createNewBlock() - checkBlock() The missing parameters were first pointed out by plebhash in bitcoin#33575 (comment) and adding them should prevent possible performance problems and lockups, especially with bitcoin#34184 which can make the createNewBlock method block for a long time before returning. It would be straightforward to make this change in a backward compatible way (bitcoin#34184 (comment)) but nice to not need to go through the trouble. Warning: This is an intermediate, review-only commit. Binaries built from it should not be distributed or used to connect to other clients or servers. It makes incompatible changes to the `mining.capnp` schema without updating the `Init.makeMining` version, causing binaries to advertise support for a schema they do not actually implement. Mixed versions may therefore exchange garbage requests/responses instead of producing clear errors. The final commit in this series bumps the mining interface number to ensure mismatches are detected. git-bisect-skip: yes Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
This increments the field number of the `Init.makeMining` method and makes the old `makeMining` method return an error, so existing IPC mining clients not using the latest schema file will get an error and not be able to access the Mining interface. Normally, there shouldn't be a need to break compatibility this way, but the mining interface has evolved a lot since it was first introduced, with old clients using the original methods less stable and performant than newer clients. So now is a good time to introduce a cutoff, drop deprecated methods, and stop supporting old clients which can't function as well. Bumping the field number is also an opportunity to make other improvements that would be awkward to implement compatibly, so a few of these were implemented in commits immediately preceding this one. Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please copy-paste ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
|
🚧 At least one of the CI tasks failed. HintsTry to run the tests locally, according to the documentation. However, a CI failure may still
Leave a comment here, if you need help tracking down a confusing failure. |
|
Concept ACK Thanks, maybe split out a separate commit that drops the deprecated methods (first). If #34184 lands first, I would suggest adding a separate commit to switch its default to |
|
Updated e555eb8 -> 7730911 ( |
|
Can you try absorbing eaa1209 from #34184? It creates a non-trivial issue that distracts from the cooldown PR core: #34184 (comment) |
Yeah commit was definitely too big and is spilt up now. I do feel like it is good to make backwards incompatible changes atomically, so you can check out any commit in bitcoin core history and build This would mean practically that you should never change a default value without bumping the mining interface number in the same commit, which should be a reasonable rule to follow.
Can do this but I think I'm missing something. if you think |
It would create a lot of churn which makes review in that PR more difficult. I'd rather churn in a refactor PR like this. |
I think all the changes there are incorporated here. That commit was my starting point for this PR. But let me know if anything is missing |
Is that true? If it's an entirely new parameter I'd think it would just require adding Another thing I was wondering about is if this PR should get rid of the |
|
I prefer to keep |
All of the tests (functional, unit, fuzz, bench) have to opt out of cooldown. Though I haven't tried to see how big the actual diff is. Update: it's a big diff, though perhaps can be shortened because not all tests will break if use cooldown. diffdiff --git a/src/interfaces/mining.h b/src/interfaces/mining.h
index 14327c01c0..2c7aac7b0f 100644
--- a/src/interfaces/mining.h
+++ b/src/interfaces/mining.h
@@ -151,11 +151,11 @@ public:
* tip to catch up. Recommended, except for regtest and
* signets with only one miner.
* @retval BlockTemplate a block template.
* @retval std::nullptr if the node is shut down or interrupt() is called.
*/
- virtual std::unique_ptr<BlockTemplate> createNewBlock(const node::BlockCreateOptions& options = {}, bool cooldown = false) = 0;
+ virtual std::unique_ptr<BlockTemplate> createNewBlock(const node::BlockCreateOptions& options = {}, bool cooldown = true) = 0;
/**
* Interrupts createNewBlock and waitTipChanged.
*/
virtual void interrupt() = 0;
diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp
index ee80b90324..d8a9690481 100644
--- a/src/rpc/mining.cpp
+++ b/src/rpc/mining.cpp
@@ -163,11 +163,11 @@ static bool GenerateBlock(ChainstateManager& chainman, CBlock&& block, uint64_t&
static UniValue generateBlocks(ChainstateManager& chainman, Mining& miner, const CScript& coinbase_output_script, int nGenerate, uint64_t nMaxTries)
{
UniValue blockHashes(UniValue::VARR);
while (nGenerate > 0 && !chainman.m_interrupt) {
- std::unique_ptr<BlockTemplate> block_template(miner.createNewBlock({ .coinbase_output_script = coinbase_output_script, .include_dummy_extranonce = true }));
+ std::unique_ptr<BlockTemplate> block_template(miner.createNewBlock({ .coinbase_output_script = coinbase_output_script, .include_dummy_extranonce = true }, /*cooldown=*/false));
CHECK_NONFATAL(block_template);
std::shared_ptr<const CBlock> block_out;
if (!GenerateBlock(chainman, block_template->getBlock(), nMaxTries, block_out, /*process_new_block=*/true)) {
break;
@@ -374,11 +374,11 @@ static RPCHelpMan generateblock()
ChainstateManager& chainman = EnsureChainman(node);
{
LOCK(chainman.GetMutex());
{
- std::unique_ptr<BlockTemplate> block_template{miner.createNewBlock({.use_mempool = false, .coinbase_output_script = coinbase_output_script, .include_dummy_extranonce = true})};
+ std::unique_ptr<BlockTemplate> block_template{miner.createNewBlock({.use_mempool = false, .coinbase_output_script = coinbase_output_script, .include_dummy_extranonce = true}, /*cooldown=*/false)};
CHECK_NONFATAL(block_template);
block = block_template->getBlock();
}
@@ -869,11 +869,11 @@ static RPCHelpMan getblocktemplate()
nTransactionsUpdatedLast = mempool.GetTransactionsUpdated();
CBlockIndex* pindexPrevNew = chainman.m_blockman.LookupBlockIndex(tip);
time_start = GetTime();
// Create new block
- block_template = miner.createNewBlock({.include_dummy_extranonce = true});
+ block_template = miner.createNewBlock({.include_dummy_extranonce = true}, /*cooldown=*/false);
CHECK_NONFATAL(block_template);
// Need to update only after we know createNewBlock succeeded
pindexPrev = pindexPrevNew;
diff --git a/src/test/miner_tests.cpp b/src/test/miner_tests.cpp
index 3b4beebeff..7f05e4e9d8 100644
--- a/src/test/miner_tests.cpp
+++ b/src/test/miner_tests.cpp
@@ -120,55 +120,55 @@ void MinerTestingSetup::TestPackageSelection(const CScript& scriptPubKey, const
LOCK(tx_mempool.cs);
BOOST_CHECK(tx_mempool.size() == 0);
// Block template should only have a coinbase when there's nothing in the mempool
- std::unique_ptr<BlockTemplate> block_template = mining->createNewBlock(options);
+ std::unique_ptr<BlockTemplate> block_template = mining->createNewBlock(options, /*cooldown=*/false);
BOOST_REQUIRE(block_template);
CBlock block{block_template->getBlock()};
BOOST_REQUIRE_EQUAL(block.vtx.size(), 1U);
// waitNext() on an empty mempool should return nullptr because there is no better template
auto should_be_nullptr = block_template->waitNext({.timeout = MillisecondsDouble{0}, .fee_threshold = 1});
BOOST_REQUIRE(should_be_nullptr == nullptr);
// Unless fee_threshold is 0
block_template = block_template->waitNext({.timeout = MillisecondsDouble{0}, .fee_threshold = 0});
BOOST_REQUIRE(block_template);
// Test the ancestor feerate transaction selection.
TestMemPoolEntryHelper entry;
// Test that a medium fee transaction will be selected after a higher fee
// rate package with a low fee rate parent.
CMutableTransaction tx;
tx.vin.resize(1);
tx.vin[0].scriptSig = CScript() << OP_1;
tx.vin[0].prevout.hash = txFirst[0]->GetHash();
tx.vin[0].prevout.n = 0;
tx.vout.resize(1);
tx.vout[0].nValue = 5000000000LL - 1000;
// This tx has a low fee: 1000 satoshis
Txid hashParentTx = tx.GetHash(); // save this txid for later use
const auto parent_tx{entry.Fee(1000).Time(Now<NodeSeconds>()).SpendsCoinbase(true).FromTx(tx)};
TryAddToMempool(tx_mempool, parent_tx);
// This tx has a medium fee: 10000 satoshis
tx.vin[0].prevout.hash = txFirst[1]->GetHash();
tx.vout[0].nValue = 5000000000LL - 10000;
Txid hashMediumFeeTx = tx.GetHash();
const auto medium_fee_tx{entry.Fee(10000).Time(Now<NodeSeconds>()).SpendsCoinbase(true).FromTx(tx)};
TryAddToMempool(tx_mempool, medium_fee_tx);
// This tx has a high fee, but depends on the first transaction
tx.vin[0].prevout.hash = hashParentTx;
tx.vout[0].nValue = 5000000000LL - 1000 - 50000; // 50k satoshi fee
Txid hashHighFeeTx = tx.GetHash();
const auto high_fee_tx{entry.Fee(50000).Time(Now<NodeSeconds>()).SpendsCoinbase(false).FromTx(tx)};
TryAddToMempool(tx_mempool, high_fee_tx);
- block_template = mining->createNewBlock(options);
+ block_template = mining->createNewBlock(options, /*cooldown=*/false);
BOOST_REQUIRE(block_template);
block = block_template->getBlock();
BOOST_REQUIRE_EQUAL(block.vtx.size(), 4U);
BOOST_CHECK(block.vtx[1]->GetHash() == hashParentTx);
BOOST_CHECK(block.vtx[2]->GetHash() == hashHighFeeTx);
@@ -251,26 +251,26 @@ void MinerTestingSetup::TestPackageSelection(const CScript& scriptPubKey, const
tx.vout.resize(1);
feeToUse = blockMinFeeRate.GetFee(freeTxSize);
tx.vout[0].nValue = 5000000000LL - 100000000 - feeToUse;
Txid hashLowFeeTx2 = tx.GetHash();
TryAddToMempool(tx_mempool, entry.Fee(feeToUse).SpendsCoinbase(false).FromTx(tx));
- block_template = mining->createNewBlock(options);
+ block_template = mining->createNewBlock(options, /*cooldown=*/false);
BOOST_REQUIRE(block_template);
block = block_template->getBlock();
// Verify that this tx isn't selected.
for (size_t i=0; i<block.vtx.size(); ++i) {
BOOST_CHECK(block.vtx[i]->GetHash() != hashFreeTx2);
BOOST_CHECK(block.vtx[i]->GetHash() != hashLowFeeTx2);
}
// This tx will be mineable, and should cause hashLowFeeTx2 to be selected
// as well.
tx.vin[0].prevout.n = 1;
tx.vout[0].nValue = 100000000 - 10000; // 10k satoshi fee
TryAddToMempool(tx_mempool, entry.Fee(10000).FromTx(tx));
- block_template = mining->createNewBlock(options);
+ block_template = mining->createNewBlock(options, /*cooldown=*/false);
BOOST_REQUIRE(block_template);
block = block_template->getBlock();
BOOST_REQUIRE_EQUAL(block.vtx.size(), 9U);
BOOST_CHECK(block.vtx[8]->GetHash() == hashLowFeeTx2);
}
@@ -340,195 +340,195 @@ void MinerTestingSetup::TestBasicMining(const CScript& scriptPubKey, const std::
{
CTxMemPool& tx_mempool{MakeMempool()};
LOCK(tx_mempool.cs);
// Just to make sure we can still make simple blocks
- auto block_template{mining->createNewBlock(options)};
+ auto block_template{mining->createNewBlock(options, /*cooldown=*/false)};
BOOST_REQUIRE(block_template);
CBlock block{block_template->getBlock()};
auto txs = CreateBigSigOpsCluster(txFirst[0]);
int64_t legacy_sigops = 0;
for (auto& t : txs) {
// If we don't set the number of sigops in the CTxMemPoolEntry,
// template creation fails during sanity checks.
TryAddToMempool(tx_mempool, entry.Fee(LOWFEE).Time(Now<NodeSeconds>()).SpendsCoinbase(true).FromTx(t));
legacy_sigops += GetLegacySigOpCount(*t);
BOOST_CHECK(tx_mempool.GetIter(t->GetHash()).has_value());
}
assert(tx_mempool.mapTx.size() == 51);
assert(legacy_sigops == 20001);
- BOOST_CHECK_EXCEPTION(mining->createNewBlock(options), std::runtime_error, HasReason("bad-blk-sigops"));
+ BOOST_CHECK_EXCEPTION(mining->createNewBlock(options, /*cooldown=*/false), std::runtime_error, HasReason("bad-blk-sigops"));
}
{
CTxMemPool& tx_mempool{MakeMempool()};
LOCK(tx_mempool.cs);
// Check that the mempool is empty.
assert(tx_mempool.mapTx.empty());
// Just to make sure we can still make simple blocks
- auto block_template{mining->createNewBlock(options)};
+ auto block_template{mining->createNewBlock(options, /*cooldown=*/false)};
BOOST_REQUIRE(block_template);
CBlock block{block_template->getBlock()};
auto txs = CreateBigSigOpsCluster(txFirst[0]);
int64_t legacy_sigops = 0;
for (auto& t : txs) {
TryAddToMempool(tx_mempool, entry.Fee(LOWFEE).Time(Now<NodeSeconds>()).SpendsCoinbase(true).SigOpsCost(GetLegacySigOpCount(*t)*WITNESS_SCALE_FACTOR).FromTx(t));
legacy_sigops += GetLegacySigOpCount(*t);
BOOST_CHECK(tx_mempool.GetIter(t->GetHash()).has_value());
}
assert(tx_mempool.mapTx.size() == 51);
assert(legacy_sigops == 20001);
- BOOST_REQUIRE(mining->createNewBlock(options));
+ BOOST_REQUIRE(mining->createNewBlock(options, /*cooldown=*/false));
}
{
CTxMemPool& tx_mempool{MakeMempool()};
LOCK(tx_mempool.cs);
// block size > limit
tx.vin.resize(1);
tx.vout.resize(1);
tx.vout[0].nValue = BLOCKSUBSIDY;
// 36 * (520char + DROP) + OP_1 = 18757 bytes
std::vector<unsigned char> vchData(520);
for (unsigned int i = 0; i < 18; ++i) {
tx.vin[0].scriptSig << vchData << OP_DROP;
tx.vout[0].scriptPubKey << vchData << OP_DROP;
}
tx.vin[0].scriptSig << OP_1;
tx.vout[0].scriptPubKey << OP_1;
tx.vin[0].prevout.hash = txFirst[0]->GetHash();
tx.vin[0].prevout.n = 0;
tx.vout[0].nValue = BLOCKSUBSIDY;
for (unsigned int i = 0; i < 63; ++i) {
tx.vout[0].nValue -= LOWFEE;
hash = tx.GetHash();
bool spendsCoinbase = i == 0; // only first tx spends coinbase
TryAddToMempool(tx_mempool, entry.Fee(LOWFEE).Time(Now<NodeSeconds>()).SpendsCoinbase(spendsCoinbase).FromTx(tx));
BOOST_CHECK(tx_mempool.GetIter(hash).has_value());
tx.vin[0].prevout.hash = hash;
}
- BOOST_REQUIRE(mining->createNewBlock(options));
+ BOOST_REQUIRE(mining->createNewBlock(options, /*cooldown=*/false));
}
{
CTxMemPool& tx_mempool{MakeMempool()};
LOCK(tx_mempool.cs);
// orphan in tx_mempool, template creation fails
hash = tx.GetHash();
TryAddToMempool(tx_mempool, entry.Fee(LOWFEE).Time(Now<NodeSeconds>()).FromTx(tx));
- BOOST_CHECK_EXCEPTION(mining->createNewBlock(options), std::runtime_error, HasReason("bad-txns-inputs-missingorspent"));
+ BOOST_CHECK_EXCEPTION(mining->createNewBlock(options, /*cooldown=*/false), std::runtime_error, HasReason("bad-txns-inputs-missingorspent"));
}
{
CTxMemPool& tx_mempool{MakeMempool()};
LOCK(tx_mempool.cs);
// child with higher feerate than parent
tx.vin[0].scriptSig = CScript() << OP_1;
tx.vin[0].prevout.hash = txFirst[1]->GetHash();
tx.vout[0].nValue = BLOCKSUBSIDY - HIGHFEE;
hash = tx.GetHash();
TryAddToMempool(tx_mempool, entry.Fee(HIGHFEE).Time(Now<NodeSeconds>()).SpendsCoinbase(true).FromTx(tx));
tx.vin[0].prevout.hash = hash;
tx.vin.resize(2);
tx.vin[1].scriptSig = CScript() << OP_1;
tx.vin[1].prevout.hash = txFirst[0]->GetHash();
tx.vin[1].prevout.n = 0;
tx.vout[0].nValue = tx.vout[0].nValue + BLOCKSUBSIDY - HIGHERFEE; // First txn output + fresh coinbase - new txn fee
hash = tx.GetHash();
TryAddToMempool(tx_mempool, entry.Fee(HIGHERFEE).Time(Now<NodeSeconds>()).SpendsCoinbase(true).FromTx(tx));
- BOOST_REQUIRE(mining->createNewBlock(options));
+ BOOST_REQUIRE(mining->createNewBlock(options, /*cooldown=*/false));
}
{
CTxMemPool& tx_mempool{MakeMempool()};
LOCK(tx_mempool.cs);
// coinbase in tx_mempool, template creation fails
tx.vin.resize(1);
tx.vin[0].prevout.SetNull();
tx.vin[0].scriptSig = CScript() << OP_0 << OP_1;
tx.vout[0].nValue = 0;
hash = tx.GetHash();
// give it a fee so it'll get mined
TryAddToMempool(tx_mempool, entry.Fee(LOWFEE).Time(Now<NodeSeconds>()).SpendsCoinbase(false).FromTx(tx));
// Should throw bad-cb-multiple
- BOOST_CHECK_EXCEPTION(mining->createNewBlock(options), std::runtime_error, HasReason("bad-cb-multiple"));
+ BOOST_CHECK_EXCEPTION(mining->createNewBlock(options, /*cooldown=*/false), std::runtime_error, HasReason("bad-cb-multiple"));
}
{
CTxMemPool& tx_mempool{MakeMempool()};
LOCK(tx_mempool.cs);
// double spend txn pair in tx_mempool, template creation fails
tx.vin[0].prevout.hash = txFirst[0]->GetHash();
tx.vin[0].scriptSig = CScript() << OP_1;
tx.vout[0].nValue = BLOCKSUBSIDY - HIGHFEE;
tx.vout[0].scriptPubKey = CScript() << OP_1;
hash = tx.GetHash();
TryAddToMempool(tx_mempool, entry.Fee(HIGHFEE).Time(Now<NodeSeconds>()).SpendsCoinbase(true).FromTx(tx));
tx.vout[0].scriptPubKey = CScript() << OP_2;
hash = tx.GetHash();
TryAddToMempool(tx_mempool, entry.Fee(HIGHFEE).Time(Now<NodeSeconds>()).SpendsCoinbase(true).FromTx(tx));
- BOOST_CHECK_EXCEPTION(mining->createNewBlock(options), std::runtime_error, HasReason("bad-txns-inputs-missingorspent"));
+ BOOST_CHECK_EXCEPTION(mining->createNewBlock(options, /*cooldown=*/false), std::runtime_error, HasReason("bad-txns-inputs-missingorspent"));
}
{
CTxMemPool& tx_mempool{MakeMempool()};
LOCK(tx_mempool.cs);
// subsidy changing
int nHeight = m_node.chainman->ActiveChain().Height();
// Create an actual 209999-long block chain (without valid blocks).
while (m_node.chainman->ActiveChain().Tip()->nHeight < 209999) {
CBlockIndex* prev = m_node.chainman->ActiveChain().Tip();
CBlockIndex* next = new CBlockIndex();
next->phashBlock = new uint256(m_rng.rand256());
m_node.chainman->ActiveChainstate().CoinsTip().SetBestBlock(next->GetBlockHash());
next->pprev = prev;
next->nHeight = prev->nHeight + 1;
next->BuildSkip();
m_node.chainman->ActiveChain().SetTip(*next);
}
- BOOST_REQUIRE(mining->createNewBlock(options));
+ BOOST_REQUIRE(mining->createNewBlock(options, /*cooldown=*/false));
// Extend to a 210000-long block chain.
while (m_node.chainman->ActiveChain().Tip()->nHeight < 210000) {
CBlockIndex* prev = m_node.chainman->ActiveChain().Tip();
CBlockIndex* next = new CBlockIndex();
next->phashBlock = new uint256(m_rng.rand256());
m_node.chainman->ActiveChainstate().CoinsTip().SetBestBlock(next->GetBlockHash());
next->pprev = prev;
next->nHeight = prev->nHeight + 1;
next->BuildSkip();
m_node.chainman->ActiveChain().SetTip(*next);
}
- BOOST_REQUIRE(mining->createNewBlock(options));
+ BOOST_REQUIRE(mining->createNewBlock(options, /*cooldown=*/false));
// invalid p2sh txn in tx_mempool, template creation fails
tx.vin[0].prevout.hash = txFirst[0]->GetHash();
tx.vin[0].prevout.n = 0;
tx.vin[0].scriptSig = CScript() << OP_1;
tx.vout[0].nValue = BLOCKSUBSIDY - LOWFEE;
CScript script = CScript() << OP_0;
tx.vout[0].scriptPubKey = GetScriptForDestination(ScriptHash(script));
hash = tx.GetHash();
TryAddToMempool(tx_mempool, entry.Fee(LOWFEE).Time(Now<NodeSeconds>()).SpendsCoinbase(true).FromTx(tx));
tx.vin[0].prevout.hash = hash;
tx.vin[0].scriptSig = CScript() << std::vector<unsigned char>(script.begin(), script.end());
tx.vout[0].nValue -= LOWFEE;
hash = tx.GetHash();
TryAddToMempool(tx_mempool, entry.Fee(LOWFEE).Time(Now<NodeSeconds>()).SpendsCoinbase(false).FromTx(tx));
- BOOST_CHECK_EXCEPTION(mining->createNewBlock(options), std::runtime_error, HasReason("block-script-verify-flag-failed"));
+ BOOST_CHECK_EXCEPTION(mining->createNewBlock(options, /*cooldown=*/false), std::runtime_error, HasReason("block-script-verify-flag-failed"));
// Delete the dummy blocks again.
while (m_node.chainman->ActiveChain().Tip()->nHeight > nHeight) {
CBlockIndex* del = m_node.chainman->ActiveChain().Tip();
m_node.chainman->ActiveChain().SetTip(*Assert(del->pprev));
@@ -630,28 +630,28 @@ void MinerTestingSetup::TestBasicMining(const CScript& scriptPubKey, const std::
tx.vin[0].nSequence = CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG;
BOOST_CHECK(TestSequenceLocks(CTransaction{tx}, tx_mempool)); // Sequence locks pass
tx.vin[0].nSequence = CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG | 1;
BOOST_CHECK(!TestSequenceLocks(CTransaction{tx}, tx_mempool)); // Sequence locks fail
- auto block_template = mining->createNewBlock(options);
+ auto block_template = mining->createNewBlock(options, /*cooldown=*/false);
BOOST_REQUIRE(block_template);
// None of the of the absolute height/time locked tx should have made
// it into the template because we still check IsFinalTx in CreateNewBlock,
// but relative locked txs will if inconsistently added to mempool.
// For now these will still generate a valid template until BIP68 soft fork
CBlock block{block_template->getBlock()};
BOOST_CHECK_EQUAL(block.vtx.size(), 3U);
// However if we advance height by 1 and time by SEQUENCE_LOCK_TIME, all of them should be mined
for (int i = 0; i < CBlockIndex::nMedianTimeSpan; ++i) {
CBlockIndex* ancestor{Assert(m_node.chainman->ActiveChain().Tip()->GetAncestor(m_node.chainman->ActiveChain().Tip()->nHeight - i))};
ancestor->nTime += SEQUENCE_LOCK_TIME; // Trick the MedianTimePast
}
m_node.chainman->ActiveChain().Tip()->nHeight++;
SetMockTime(m_node.chainman->ActiveChain().Tip()->GetMedianTimePast() + 1);
- block_template = mining->createNewBlock(options);
+ block_template = mining->createNewBlock(options, /*cooldown=*/false);
BOOST_REQUIRE(block_template);
block = block_template->getBlock();
BOOST_CHECK_EQUAL(block.vtx.size(), 5U);
}
@@ -723,92 +723,92 @@ void MinerTestingSetup::TestPrioritisedMining(const CScript& scriptPubKey, const
tx.vin[0].prevout.hash = hashFreeChild;
tx.vout[0].nValue = 5000000000LL; // 0 fee
Txid hashFreeGrandchild = tx.GetHash();
TryAddToMempool(tx_mempool, entry.Fee(0).SpendsCoinbase(false).FromTx(tx));
- auto block_template = mining->createNewBlock(options);
+ auto block_template = mining->createNewBlock(options, /*cooldown=*/false);
BOOST_REQUIRE(block_template);
CBlock block{block_template->getBlock()};
BOOST_REQUIRE_EQUAL(block.vtx.size(), 6U);
BOOST_CHECK(block.vtx[1]->GetHash() == hashFreeParent);
BOOST_CHECK(block.vtx[2]->GetHash() == hashFreePrioritisedTx);
BOOST_CHECK(block.vtx[3]->GetHash() == hashParentTx);
BOOST_CHECK(block.vtx[4]->GetHash() == hashPrioritsedChild);
BOOST_CHECK(block.vtx[5]->GetHash() == hashFreeChild);
for (size_t i=0; i<block.vtx.size(); ++i) {
// The FreeParent and FreeChild's prioritisations should not impact the child.
BOOST_CHECK(block.vtx[i]->GetHash() != hashFreeGrandchild);
// De-prioritised transaction should not be included.
BOOST_CHECK(block.vtx[i]->GetHash() != hashMediumFeeTx);
}
}
// NOTE: These tests rely on CreateNewBlock doing its own self-validation!
BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
{
auto mining{MakeMining()};
BOOST_REQUIRE(mining);
// Note that by default, these tests run with size accounting enabled.
CScript scriptPubKey = CScript() << "04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f"_hex << OP_CHECKSIG;
BlockAssembler::Options options;
options.coinbase_output_script = scriptPubKey;
options.include_dummy_extranonce = true;
// Create and check a simple template
- std::unique_ptr<BlockTemplate> block_template = mining->createNewBlock(options);
+ std::unique_ptr<BlockTemplate> block_template = mining->createNewBlock(options, /*cooldown=*/false);
BOOST_REQUIRE(block_template);
{
CBlock block{block_template->getBlock()};
{
std::string reason;
std::string debug;
BOOST_REQUIRE(!mining->checkBlock(block, {.check_pow = false}, reason, debug));
BOOST_REQUIRE_EQUAL(reason, "bad-txnmrklroot");
BOOST_REQUIRE_EQUAL(debug, "hashMerkleRoot mismatch");
}
block.hashMerkleRoot = BlockMerkleRoot(block);
{
std::string reason;
std::string debug;
BOOST_REQUIRE(mining->checkBlock(block, {.check_pow = false}, reason, debug));
BOOST_REQUIRE_EQUAL(reason, "");
BOOST_REQUIRE_EQUAL(debug, "");
}
{
// A block template does not have proof-of-work, but it might pass
// verification by coincidence. Grind the nonce if needed:
while (CheckProofOfWork(block.GetHash(), block.nBits, Assert(m_node.chainman)->GetParams().GetConsensus())) {
block.nNonce++;
}
std::string reason;
std::string debug;
BOOST_REQUIRE(!mining->checkBlock(block, {.check_pow = true}, reason, debug));
BOOST_REQUIRE_EQUAL(reason, "high-hash");
BOOST_REQUIRE_EQUAL(debug, "proof of work failed");
}
}
// We can't make transactions until we have inputs
// Therefore, load 110 blocks :)
static_assert(std::size(BLOCKINFO) == 110, "Should have 110 blocks to import");
int baseheight = 0;
std::vector<CTransactionRef> txFirst;
for (const auto& bi : BLOCKINFO) {
const int current_height{mining->getTip()->height};
/**
* Simple block creation, nothing special yet.
* If current_height is odd, block_template will have already been
* set at the end of the previous loop.
*/
if (current_height % 2 == 0) {
- block_template = mining->createNewBlock(options);
+ block_template = mining->createNewBlock(options, /*cooldown=*/false);
BOOST_REQUIRE(block_template);
}
CBlock block{block_template->getBlock()};
CMutableTransaction txCoinbase(*block.vtx[0]);
diff --git a/src/test/testnet4_miner_tests.cpp b/src/test/testnet4_miner_tests.cpp
index 33e028a5c9..614d2fd63a 100644
--- a/src/test/testnet4_miner_tests.cpp
+++ b/src/test/testnet4_miner_tests.cpp
@@ -40,11 +40,11 @@ BOOST_AUTO_TEST_CASE(MiningInterface)
// Set node time a few minutes past the testnet4 genesis block
const int64_t genesis_time{WITH_LOCK(cs_main, return m_node.chainman->ActiveChain().Tip()->GetBlockTime())};
SetMockTime(genesis_time + 3 * 60);
- block_template = mining->createNewBlock(options);
+ block_template = mining->createNewBlock(options, /*cooldown=*/false);
BOOST_REQUIRE(block_template);
// The template should use the mocked system time
BOOST_REQUIRE_EQUAL(block_template->getBlockHeader().nTime, genesis_time + 3 * 60); |
ryanofsky
left a comment
There was a problem hiding this comment.
Updated 7730911 -> dfea324 (pr/mbreak.2 -> pr/mbreak.3, compare) cleaning up some more constant usages and splitting out a test workaround into its own commit
|
Looks like one of the intermediate commits broke @maflcko it would be handy if the each-commit job repeated the current commit at the end of its log. |
There was a problem hiding this comment.
Code review dfea324
Would be nice to further split fc60bd4:
- bump version, with deprecation test
- drop deprecated methods
- add missing
context :Proxy.Context - set defaults
I do feel like it is good to make backwards incompatible changes atomically, so you can check out any commit in bitcoin core history and build bitcoin-node binary and check out any other commit in bitcoin core history and use the schema files to build an external client, and IPC calls made by that client will succeed or fail but they will never send corrupt parameters & return values.
I think it's sufficient that each release behaves this way, not individual commits.
| static_assert(ipc::capnp::messages::MAX_MONEY == MAX_MONEY); | ||
| static_assert(ipc::capnp::messages::MAX_DOUBLE == std::numeric_limits<double>::max()); | ||
| static_assert(ipc::capnp::messages::DEFAULT_BLOCK_RESERVED_WEIGHT == DEFAULT_BLOCK_RESERVED_WEIGHT); | ||
| static_assert(ipc::capnp::messages::DEFAULT_COINBASE_OUTPUT_MAX_ADDITIONAL_SIGOPS == DEFAULT_COINBASE_OUTPUT_MAX_ADDITIONAL_SIGOPS); |
There was a problem hiding this comment.
In 766edec ipc: Declare constants in mining.capnp for default field values: nice, makes it easy to keep these constants in sync
| $Proxy.includeTypes("ipc/capnp/mining-types.h"); | ||
|
|
||
| const maxMoney :Int64 = 2100000000000000; | ||
| const maxDouble :Float64 = 1.7976931348623157e308; |
There was a problem hiding this comment.
In 766edec ipc: Declare constants in mining.capnp for default field values: maybe make it a nice round 3 trillion milliseconds (~95 years, const century)? Or 32 trillion for a millennium.
There was a problem hiding this comment.
re: #34568 (comment)
In 766edec ipc: Declare constants in mining.capnp for default field values: maybe make it a nice round 3 trillion milliseconds (~95 years,
const century)? Or 32 trillion for a millennium.
Yes could switch to something rounder, this is just keeping the c++ and capnproto values the same.
| opts = self.capnp_modules['mining'].BlockCreateOptions() | ||
| opts.useMempool = True | ||
| opts.blockReservedWeight = 4000 | ||
| opts.coinbaseOutputMaxAdditionalSigops = 0 |
There was a problem hiding this comment.
In abd9a2f ipc mining: provide default option values (incompatible schema change): review note: changing this from 0 to the new default 400 is harmless. Ditto for blockReservedWeight.
Using defaults also improves test readability. When custom value shows up, it's now clear that it's relevant to the test.
We have a few options here with different tradeoffs:
This PR is taking approach (3) but we can also delete methods more proactively with (2). I'd like to avoid approach (1) since I don't think I don't think benefits outweigh the costs. Also should note that the change here removing deprecated methods is only a small part of this PR (just commit e2770e2). The bigger part of this PR is making minor schema improvements (context arguments, default option values) we've been putting off but have more of a reason to implement now because of #34184. |
|
@ryanofsky Thanks for clarifying here. |
ryanofsky
left a comment
There was a problem hiding this comment.
Updated 8437219 -> f700609 (pr/mbreak.5 -> pr/mbreak.6, compare) dropping GenerateCoinbaseCommitment return value and improving commit messages
|
ACK f700609 |
enirox001
left a comment
There was a problem hiding this comment.
ACK f700609
Built the PR and verified the breaking change by connecting an existing Rust SV2 client (using the old schema) to the updated node. The client was rejected gracefully with the expected error (Old mining interface (@2) not supported) and the node remained stable, confirming the version bump logic works safely.
nano nit:
The comment in src/node/types.h for BlockCreateOptions states clients "cannot leave this field unset." With the new defaults in mining.capnp, this is no longer true and should be updated.
|
Concept ACK |
| if (!block_template->getCoinbaseCommitment().empty()) { | ||
| result.pushKV("default_witness_commitment", HexStr(block_template->getCoinbaseCommitment())); | ||
| if (auto coinbase{block_template->getCoinbaseTx()}; coinbase.required_outputs.size() > 0) { | ||
| CHECK_NONFATAL(coinbase.required_outputs.size() == 1); // Only one output is currently expected |
There was a problem hiding this comment.
In "rpc refactor: stop using deprecated getCoinbaseCommitment method" df53a3e
This comment doesn't add any value here, not a fan :).
The CHECK_NON_FATAL made that obvious; a better comment should explain why we expect 1 output or why it's not fatal to continue.
There was a problem hiding this comment.
re: #34568 (comment)
This comment doesn't add any value here, not a fan :).
Agree comment could be better, I just added it because I wanted to be clear this is a "not currently expected to happen" check, not a "this should never happen" check. The designs of the mining API and segwit explicitly allow and anticipate this happening, it's just that the RPC code may need to change if it does.
Thinking about this more though, it would probably be best to generalize the code a little and drop this check. Instead of assuming there is only one output this code could use the GetWitnessCommitmentIndex logic to find the right output and return it. It'd be a slightly bigger change but would be a nice followup.
|
|
||
| def run_test(self): | ||
| self.miniwallet = MiniWallet(self.nodes[0]) | ||
| self.default_block_create_options = self.capnp_modules['mining'].BlockCreateOptions( |
|
Thanks for the reviews! Will leave this PR as-is for now but some nice followups have been suggested:
|
| /** Default for -blockmaxweight, which controls the range of block weights the mining code will create **/ | ||
| static constexpr unsigned int DEFAULT_BLOCK_MAX_WEIGHT{MAX_BLOCK_WEIGHT}; | ||
| /** Default for -blockreservedweight **/ | ||
| static constexpr unsigned int DEFAULT_BLOCK_RESERVED_WEIGHT{8000}; | ||
| /** Default sigops cost to reserve for coinbase transaction outputs when creating block templates. */ | ||
| static constexpr unsigned int DEFAULT_COINBASE_OUTPUT_MAX_ADDITIONAL_SIGOPS{400}; | ||
| /** This accounts for the block header, var_int encoding of the transaction count and a minimally viable | ||
| * coinbase transaction. It adds an additional safety margin, because even with a thorough understanding | ||
| * of block serialization, it's easy to make a costly mistake when trying to squeeze every last byte. | ||
| * 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{1}; | ||
| /** The maximum weight for transactions we're willing to relay/mine */ |
There was a problem hiding this comment.
Just a question: Why are all these constants in a policy-related file as opposed to e.g. miner.h or its own header?
There was a problem hiding this comment.
Hmm, the constant they are indeed Bitcoin Core mining defaults, which are whats recommended and seperate from consensus, hence they can be termed as mining policy?
see related discussion #31384 (comment)
Right now, policy/policy.h encapsulates both mempool policy, mempool, validation, relay and mining policy.
Are you suggesting they be split? It seems beyond the scope of this PR IMO?
There was a problem hiding this comment.
re: #34568 (comment)
Just a question: Why are all these constants in a policy-related file as opposed to e.g. miner.h or its own header?
I also thought this was strange, but you could think of them as a mining policy analogous to normal mempool policy as Abubakar suggests. Since this only adds one constant, this seemed the best place for it to go, but if there are preferences or suggestions for where else these should go, it could be nice to move them. Could do this in a PR with other suggested followups #34568 (comment)
There was a problem hiding this comment.
Could also be a followup for #33966. I considered moving mining "policy" things away from policy as well there, but didn't.
…9c7364ac567 d9c7364ac567 Merge bitcoin/bitcoin#34141: miniscript: Use Func and Expr when parsing keys, hashes, and locktimes 6c8d628b74aa Merge bitcoin-core/gui#931: Release: Update `src/qt/locale/bitcoin_en.xlf` after string freeze fa194fca8e7b Merge bitcoin/bitcoin#34622: test: assert_debug_log timeouts follow-up d907d65acd13 Merge bitcoin/bitcoin#29770: index: Check all necessary block data is available before starting to sync ce6898f9a803 Merge bitcoin/bitcoin#34605: build: define CMAKE_COMPILE_WARNING_AS_ERROR as a cache option a2fd558760ab Merge bitcoin/bitcoin#34572: cmake: Fix NetBSD-specific workaround for Boost ef987683dc51 qt: Update src/qt/locale/bitcoin_en.xlf after string freeze cb3473a6804f Merge bitcoin/bitcoin#34568: mining: Break compatibility with existing IPC mining clients 641a1954f7ae Merge bitcoin/bitcoin#34633: Revert "ci: Treat SHA1 LLVM signing key as warning" 3574905cecec Revert "ci: Treat SHA1 LLVM signing key as warning" 1a54886b639a Merge bitcoin/bitcoin#24539: Add a "tx output spender" index fa4424fd98b6 test: Fixup assert_debug_log timeouts in feature_config_args.py faed837f274a test: Add missing syncwithvalidationinterfacequeue ee2065fdeaca Merge bitcoin/bitcoin#34165: coins: don't mutate main cache when connecting block 96bec216ec34 Merge bitcoin/bitcoin#34549: net: reduce log level for PCP/NAT-PMP NOT_AUTHORIZED failures 76de2f8e55f3 Merge bitcoin/bitcoin#34571: test: Fix intermittent issues in feature_assumevalid.py c808dfbbdcea Merge bitcoin/bitcoin#34329: rpc,net: Add private broadcast RPCs 739f75c0980e Merge bitcoin/bitcoin#33512: coins: use dirty entry count for flush warnings and disk space checks 02c83fef8431 Merge bitcoin/bitcoin#34577: http: fix submission during shutdown race 0b96b9c600e0 Minimize mempool lock, sync txo spender index only when and if needed d0998cbe348e Merge bitcoin/bitcoin#33199: fees: enable `CBlockPolicyEstimator` return sub 1 sat/vb fee rate estimates 37e449dcc72c Merge bitcoin/bitcoin#34512: rpc: add coinbase_tx field to getblock 097c18239b58 Merge bitcoin/bitcoin#34385: subprocess: Fix `-Wunused-private-field` when building with clang-cl on Windows 910bd1c964b6 Merge bitcoin/bitcoin#34582: rpc: Properly parse -rpcworkqueue/-rpcthreads e0463b4e8c25 rpc: add coinbase_tx field to getblock 5a8a427610ed Merge bitcoin/bitcoin#32745: scripted-diff: Update DeriveType enum values to mention ranged derivations 3d82ec5bdd01 Add a "tx output spender" index 8ee24d764a28 Merge bitcoin/bitcoin#34604: guix: remove double export of `TZ` 4933d1fbbada Merge bitcoin/bitcoin#28792: build: Embedded ASMap [3/3]: Build binary dump header file 6d482b22de15 Merge bitcoin/bitcoin#32138: wallet, rpc: remove settxfee and paytxfee 726b3663cc8e http: properly respond to HTTP request during shutdown 241ad5853bca Merge bitcoin-core/gui#929: Use plurals where necessary a849b7e1ff35 Merge bitcoin-core/gui#928: Replace three dots with ellipsis 9e4567b17a28 Merge bitcoin/bitcoin#34581: test: Set assert_debug_log timeout to 0 655b9d12ee17 Merge bitcoin/bitcoin#32950: validation: remove BLOCK_FAILED_CHILD 2706758dc38c Merge bitcoin/bitcoin#34349: util: Remove brittle and confusing sp::Popen(std::string) 59e10a5463dc Merge bitcoin/bitcoin#34023: Optimized SFL cluster linearization 59d24bd5dd2a threadpool: make Submit return Expected instead of throwing fb3e1bf9c977 test: check LoadBlockIndex correctly recomputes invalidity flags 29740c06ac53 validation: remove BLOCK_FAILED_MASK b5b2956bda32 validation: reset BLOCK_FAILED_CHILD to BLOCK_FAILED_VALID when loading from disk 37bc20785278 validation: stop using BLOCK_FAILED_CHILD 120c631e1689 refactor: use clearer variables in InvalidateBlock() fa4cb96bdec2 test: Set assert_debug_log timeout to 0 c2fcf2506973 clusterlin: inline GetReachable into Deactivate (optimization) d90f98ab4aaa clusterlin: inline UpdateChunk into (De)Activate (optimization) b684f954bbfc clusterlin: unidirectional MakeTopological initially (optimization) 1daa600c1ca8 clusterlin: track suboptimal chunks (optimization) 63b06d5523f1 clusterlin: keep track of active children (optimization) ae16485aa94d clusterlin: special-case self-merges (optimization) 3221f1a074e7 clusterlin: make MergeSequence take SetIdx (simplification) 7194de3f7c53 clusterlin: precompute reachable sets (optimization) 6f898dbb8bfa clusterlin: simplify PickMergeCandidate (optimization) dcf458ffb99c clusterlin: split up OptimizeStep (refactor) cbd684a4713d clusterlin: abstract out functions from MergeStep (refactor) b75574a6531e clusterlin: improve TxData::dep_top_idx type (optimization) 73cbd15d4572 clusterlin: get rid of DepData (optimization) 7c6f63a8a9dc clusterlin: pool SetInfos (preparation) 20e2f3e96df3 scripted-diff: rename _rep -> _idx in SFL 268fcb6a53ec clusterlin: add more Assumes and sanity checks (tests) d69c9f56ea96 clusterlin: count chunk deps without loop (optimization) f66fa69ce008 clusterlin: split tx/chunk dep counting (preparation) 900e45977889 clusterlin: avoid depgraph argument in SanityCheck (cleanup) 666b37970f15 clusterlin: fix type to count dependencies a7c29df0e5ac Merge bitcoin/bitcoin#34552: fees: refactor: separate feerate format from fee estimate mode 231dd04b8dcb build: define CMAKE_COMPILE_WARNING_AS_ERROR as a cache option fa48d421636c test: Stricter unit test fa626bd14341 util: Remove brittle and confusing sp::Popen(std::string) fd06157d1465 test: Add coverage for restarted node without any block sync 3d7ab7ecb7df rpc, test: Address feedback from #29668 312919c9dd5d test: Indices can not start based on block data without undo data a9a3b29dd687 index: Check availability of undo data for indices c8c9c1e61759 Merge bitcoin/bitcoin#34383: ci: remove commit count limit from `test-each-commit` and fail fast 62e378584e77 guix: don't export TZ twice badcf1c68dbf guix: fix typo in guix-codesign 8a050b9cb68a Merge bitcoin/bitcoin#34575: test: Avoid empty errmsg in JSONRPCException 746d8cddc191 qt: Use plurals where necessary fa5672dcafa1 refactor: [gui] Use SettingTo<int64_t> over deprecated SettingToInt 35e6444fdc40 Merge bitcoin/bitcoin#34570: doc: update Windows MSVC build guide to utilize winget to install build requirements d159b103987f doc: update Windows MSVC build guide to utilize WinGet to install apps afea2af13913 net: reduce log level for PCP/NAT-PMP NOT_AUTHORIZED failures fac3ecaf69d6 rpc: Properly parse -rpcworkqueue/-rpcthreads faee36f63b5f util: Add SettingTo<Int>() and GetArg<Int>() 6df4a045f797 qt: Replace three dots with ellipsis 211111b8048d test: Avoid empty errmsg in JSONRPCException b65ff0e5a1fd Merge bitcoin/bitcoin#34548: ci: Add and use ci-windows-cross.py helper 03e5f063b5c0 Merge bitcoin/bitcoin#34559: ci: split vcpkg tools cache into restore/save 84e826ddc1cf Merge bitcoin/bitcoin#34511: test: fully reset the state of CConnman in tests 309c51d89dfc Merge bitcoin/bitcoin#34546: kernel: Avoid duplicating symbols in the kernel library 24f93c9af7f6 release note 331a5279d277 wallet, rpc:remove settxfee and paytxfee eafd530d2032 kernel: avoid potential duplicate object in shared library/binary 24c3b4701003 build: add kernel-specific warnings cae6d895f8a8 fuzz: add target for CoinsViewOverlay 86eda88c8e48 fuzz: move backend mutating block to end of coins_view 89824fb27b22 fuzz: pass coins_view_cache to TestCoinsView in coins_view 73e99a596655 coins: don't mutate main cache when connecting block 67c0d1798e61 coins: introduce CoinsViewOverlay 69b01af0eb90 coins: add PeekCoin() f700609e8ada doc: Release notes for mining IPC interface bump 79c934b51cdc cmake: Fix NetBSD-specific workaround for Boost fa90d44a2283 test: Fix intermittent issues in feature_assumevalid.py 07b924775e4f Merge bitcoin/bitcoin#34427: lint: Flatten lint image entry points 9453c153612a ipc mining: break compatibility with existing clients (version bump) 70de5cc2d205 ipc mining: pass missing context to BlockTemplate methods (incompatible schema change) 2278f017afad ipc mining: remove deprecated methods (incompatible schema change) c6638fa7c5e9 ipc mining: provide default option values (incompatible schema change) a4603ac77412 ipc mining: declare constants for default field values ff995b50cf9e ipc test: add workaround to block_reserved_weight exception test b970cdf20fce test framework: expand expected_stderr, expected_ret_code options df53a3e5ec87 rpc refactor: stop using deprecated getCoinbaseCommitment method 0b4cd08fcd22 Merge bitcoin/bitcoin#33965: mining: fix -blockreservedweight shadows IPC option 2a1d0db7994e doc: Mention private broadcast RPCs in release notes c3378be10b0a test: Cover abortprivatebroadcast in p2p_private_broadcast 557260ca14ac rpc: Add abortprivatebroadcast 15dff452eb61 test: Cover getprivatebroadcastinfo in p2p_private_broadcast 996f20c18af0 rpc: Add getprivatebroadcastinfo 5e64982541f3 net: Add PrivateBroadcast::GetBroadcastInfo 55c49ff8f4b1 Merge bitcoin/bitcoin#34143: build: Prevent system header fallback and include path pollution c134b1a4bc35 Merge bitcoin/bitcoin#34257: txgraph: deterministic optimal transaction order 4a05825a3f39 Merge bitcoin/bitcoin#33689: http: replace WorkQueue and single threads handling for ThreadPool c1355493e2c2 refactor: fees: split fee rate format from fee estimate mode c413cf12c5c6 ci: Split vcpkg tools cache into restore/save 337fef9f2f68 Merge bitcoin/bitcoin#34554: build: avoid exporting secp256k1 symbols 922ebf96ed66 refactor: move-only: move `FeeEstimateMode` enum to `util/fees.h` cb1798000c25 Merge bitcoin/bitcoin#33861: build: Bump VS minimum supported version to 18.3 7640863a0fbe Merge bitcoin/bitcoin#34555: doc: archive release notes for v29.3 d29bc5e6dd71 doc: archive release notes for v29.3 fd625d84ae9e Merge bitcoin/bitcoin#34539: test: Fixup TODO comment in feature_dbcrash.py; remove unnecessary sleep 6777314310bc Merge bitcoin/bitcoin#34551: ci: Extend diff context for clang-format 452c743951fa refactor: Remove workaround for resolved MSVC bug 7164a0cab650 build: Bump VS minimum supported version to 18.3 2ccfdb582b64 build: avoid exporting secp256k1 symbols fa8c89511d83 Fixup TODO comment in feature_dbcrash.py; remove unnecessary sleep f8d2f30bf37d ci: Extend diff context for clang-format 91a8e9b549e9 Merge bitcoin-core/gui#807: refactor: interfaces, make 'createTransaction' less error-prone 573bb542be80 net: Store recipient node address in private broadcast fa13b13239e5 ci: [refactor] Use pathlib over os.path fa2719ab1ba2 ci: [refactor] Move run_unit_tests to ci-windows-cross.py fa99ba5f14d4 ci: Set PREVIOUS_RELEASES_DIR env var in ci-windows-cross.py fa4a1cab6c17 ci: Move run_functional_tests into ci-windows-cross.py 1111108685ec ci: [refactor] Move pyzmq install and get_previous_releases into ci-windows-cross.py fac9c7bd6635 ci: [refactor] Move config.ini rewrite to ci-windows-cross.py faf738946668 ci: Move check_manifests step to ci-windows-cross.py fa674d55df57 ci: [refactor] Move print_version step into ci-windows-cross.py helper 6f113cb1847c txgraph: use fallback order to sort chunks (feature) 0a3351947e73 txgraph: use fallback order when linearizing (feature) fba004a3df02 txgraph: pass fallback_order to TxGraph (preparation) 941c432a4637 txgraph test: subclass TxGraph::Ref like mempool does (preparation) 39d0052cbf47 clusterlin: make optimal linearizations deterministic (feature) 8bfbba32077c txgraph: sort distinct-cluster chunks by equal-feerate-prefix size (feature) e0bc73ba9270 clusterlin: sort tx in chunk by feerate and size (feature) 6c1bcb2c7c1a txgraph: clear cluster's chunk index in ~Ref (preparation) 7427c7d09830 txgraph: update chunk index on Compact (preparation) 3ddafceb9afd txgraph: initialize Ref in AddTransaction (preparation) 64294c89094d Merge bitcoin/bitcoin#34500: ci: Print verbose Windows CI build failure 5f6bfa3649c3 Merge bitcoin/bitcoin#34057: test: add tests for cluster chunks 6ca7782db9b4 Merge bitcoin/bitcoin#34523: doc: Clarify why performance-move-const-arg.CheckTriviallyCopyableMove=false 44afed4cd970 Merge bitcoin/bitcoin#34524: refactor: [rpc] Remove confusing and brittle integral casts (take 2) 3764746404a8 Merge bitcoin/bitcoin#34241: test: Check that interrupt results in EXIT_SUCCESS 18f11695c755 validation: don't update BLOCK_FAILED_VALID to BLOCK_FAILED_CHILD in InvalidateBlock acefdce08311 Merge bitcoin/bitcoin#34469: consensus/test/doc: cover errors in `CheckTxInputs` with unit tests 7e5e0b20ea3e Merge bitcoin/bitcoin#32773: cmake: Create subdirectories in build tree in advance fa90277d22e1 ci: Use ubuntu-slim for [meta] runners fa9627af9f89 ci: Rely on cmake --preset toolchain file fa3f89acaa7a ci: Add check_manifests to ci-windows.py 1111079a16b9 ci: Add run_tests step to ci-windows.py 6d625af2831b Merge bitcoin/bitcoin#32621: contrib: utxo_to_sqlite.py: add option to store txid/spk as BLOBs afb1bc120ecc validation: Use dirty entry count in flush warnings and disk space checks b413491a1cdd coins: Keep track of number of dirty entries in `CCoinsViewCache` 7e52b1b945c4 fuzz: call `EmplaceCoinInternalDANGER` as well in `SimulationTest` 8f0e1f6540be Merge bitcoin/bitcoin#34465: refactor: separate log generation from log handling b2805eec35ce Merge bitcoin/bitcoin#34528: test: Fix intermittent failure in `feature_assumevalid.py` by ensuring invalid block was processed before checking debug.log 72030efd4b83 Merge bitcoin/bitcoin#34525: Release: Prepare "Open Transifex translations for v31.0" step fe0b1513a7c5 test: add a test for txgraph staging ef253a9d3d16 test: add block builder tests for txgraph 4a1ac31e97c2 test: add a chunk test for txgraph b623fab1ba87 mining: enforce minimum reserved weight for IPC d3e49528d479 mining: fix -blockreservedweight shadows IPC option 418b7995ddfb test: have mining template helpers return None 54bd49c7e3c7 Merge bitcoin/bitcoin#34452: test: split interface_ipc.py 3b39a8aeb4c6 Merge bitcoin/bitcoin#34483: refactor: Use SpanReader over DataStream 6f68e0c8b760 Merge bitcoin/bitcoin#34181: refactor: [p2p] Make ProcessMessage private again, Use references when non-null 4c0d4f6f93f3 refactor: interfaces, make 'createTransaction' less error-prone e2c3ec9bf412 refactor: move CreatedTransactionResult to types.h 45372175c35b gui: remove AmountWithFeeExceedsBalance error special case d88997b809db Merge bitcoin/bitcoin#34299: wallet: remove PreSelectedInputs and re-activate "AmountWithFeeExceedsBalance" error b73a62f667d0 test: Ensure invalid block was processed before checking debug.log 633d1831199a test: misc interface_ipc_mining.py improvements 52ccd9215e67 test: split interface_ipc_mining.py into subtests 4e49fa2a6884 test: add interface_ipc_mining.py 01a1ae889e5a test: move IPC helpers to ipc_util.py 28160c1e3dc1 Merge bitcoin/bitcoin#34421: ci: add Chimera Linux LTO config 576f89202798 qt: Update the `src/qt/locale/bitcoin_en.xlf` translation source file 4b9f5beafe9e Update Transifex slug for 31.x 46e1288df2b4 Merge bitcoin/bitcoin#34498: iwyu: Fix patch to prefer `<cstdint>` fa6801366d76 refactor: [rpc] Remove confusing and brittle integral casts (take 2) d79249d2799e ci: add chimera Linux LTO CI job 48161f6a0503 wallet: introduce "tx amount exceeds balance when fees are included" error b7fa609ed175 wallet: remove PreSelectedInputs 7819da2c1643 walllet: use CoinsResult instead of PreSelectedInputs 0cd309c75e58 Merge bitcoin/bitcoin#34492: ci: Drop valgrind fuzz from GHA matrix fa561682ce40 ci: [refactor] Add .github/ci-windows.py prepare_tests step fa3e607c6dfb ci: Print verbose Windows CI build failure 4444808dd3a7 ci: [refactor] Add .github/ci-windows.py build step fabdd4e82342 ci: Refactor Windows CI into script fa88ac3f4f9b doc: Clarify why performance-move-const-arg.CheckTriviallyCopyableMove=false fa0677d13119 refactor: Use SpanReader over DataStream e5474079f179 wallet: introduce GetAppropriateTotal() in CoinsResult d8ea921d0140 wallet: correctly reserve in CoinsResult::All() 7072d825e39d wallet: ensure COutput added in set are unique fefa3be782ea wallet: fix, make 'total_effective_amount' optional actually optional 9ec1ae0e98c0 Merge bitcoin/bitcoin#34437: rpc: `uptime` should begin on application start d692e0722813 Merge bitcoin/bitcoin#32894: FUZZ: Test that BnB finds best solution 28d860788286 Merge bitcoin/bitcoin#34504: build: replace `WERROR` with `CMAKE_COMPILE_WARNING_AS_ERROR` ad1940a006b6 Merge bitcoin/bitcoin#34517: drop my key from trusted-keys 322c4ec4422a build: replace WERROR with CMAKE_COMPILE_WARNING_AS_ERROR 65134c7e5f99 depends: Prefix include path for headers-only `systemtap` package 94a692b6aa09 cmake: Add missed `USDT::headers` b5375c44ed16 depends: Prefix include path for headers-only `boost` package d73378ffcca2 cmake: Add missed `Boost::headers` eb97250421d3 Merge bitcoin/bitcoin#34496: build: don't pass on boost dependency to kernel consumers 9d7694729481 Merge bitcoin/bitcoin#34464: Change BlockRequestAllowed() to take ref (minor refactor) 8966352df3fc doc: add release notes 704a09fe7187 test: ensure fee estimator provide fee rate estimate < 1 s/vb 243e48cf4933 fees: delete unused dummy field fc4fbda42af1 fees: bump fees file version b54dedcc8563 fees: reduce `MIN_BUCKET_FEERATE` to 100 2cb7e99deee1 test: also reset CConnman::m_private_broadcast in tests 41b9b76cce6a Merge bitcoin/bitcoin#34510: doc: fix broken bpftrace installation link 91b7c874e2b1 test: add ConnmanTestMsg convenience method Reset() 42ee31e80c99 doc: fix broken bpftrace installation link 54d039305823 FUZZ: Test that BnB finds best solution eb510f8678ba ci: fail fast in test-each-commit script 04c4d710087b ci: remove commit count limit from `test-each-commit` 4ae00e9a7183 Merge bitcoin/bitcoin#32636: Split `CWallet::Create()` into `CreateNew` and `LoadExisting` d4bc620ad8cf Merge bitcoin/bitcoin#34488: refactor: Small style and test fixups for bitcoinkernel eb3dbbaf30fc Merge bitcoin/bitcoin#34493: contrib: Remove valgrind suppression for bug 472219 1e64aeaaecc2 Merge bitcoin/bitcoin#34295: test: Improve STRICTENC/DERSIG unit tests b65a3d80093b iwyu: Fix patch to prefer `<cstdint>` a50d0b6720f3 build: don't pass on boost dependency to kernel consumers 3532e242134e Merge bitcoin/bitcoin#32748: fees: fix noisy flushing log fad9dd1a8891 test: kernel test fixups fabb58d42dc2 test: Use clang-tidy named args for create_chainman fa51594c5c0f refactor: Small style fixups in src/kernel/bitcoinkernel.cpp fa33acec89f0 Revert "valgrind: add suppression for bug 472219" 24699fec8422 doc: Add initial asmap data documentation bab085d282b1 ci: Use without embedded asmap build option in one ci job e53934422a29 doc: Expand documentation on asmap feature and tooling 6244212a5532 init, net: Implement usage of binary-embedded asmap data 6202b50fb900 build: Generate ip_asn.dat.h during build process 634cd60dc8f6 build: Add embedded asmap data faa4ab113cc9 ci: Drop valgrind fuzz from GHA matrix 02b5f6078d65 fees: make flushes log debug only b58eebf1520f Merge bitcoin/bitcoin#34470: Bump leveldb subtree and remove UB workaround in CI 8bb277c12373 Merge bitcoin/bitcoin#34481: Update secp256k1 subtree to latest master a4941132d311 Merge bitcoin/bitcoin#34461: ci: Print verbose build error message in test-each-commit fad7d86d8d17 ci: Remove unused workaround after leveldb subtree bump fabced56f650 Bump leveldb subtree be35408c5ad7 Merge bitcoin/bitcoin#34474: ci: update ccache to improve hitrate 2f2952c5f2e3 Squashed 'src/leveldb/' changes from cad64b151d..ab6c84e6f3 7528d18796a2 ci: show more verbose ccache stats 47c9297172b0 Merge bitcoin/bitcoin#32420: mining, ipc: omit dummy extraNonce from coinbase 4b53cbd69220 test: Test for musig() in various miniscript expressions ec0f47b15cb3 miniscript: Using Func and Expr when parsing keys, hashes, and locktimes 6fd780d4fbc4 descriptors: Increment key_exp_index in ParsePubkey(Inner) b12281bd86e2 miniscript: Use a reference to key_exp_index in KeyParser ce4c66eb7c5e test: Test that key expression indexes match key count 8c03318387f6 consensus/doc: explain `GetValueOut()` precondition 82ef92c8d006 consensus/doc: explain unreachable `bad-txns-fee-outofrange` check fad3eb395645 refactor: Use SpanReader over DataStream fa06e26764bb refactor: [qt] Use SpanReader to avoid two vector copies fabd4d2e2e3c refactor: Avoid UB in SpanReader::ignore 37cc2a2d953c logging: use util/log.h where possible 8799eb74406e Merge bitcoin/bitcoin#33878: refactor, docs: Embedded ASMap [2/3]: Refactor asmap internals and add documentation bb8e9e7c4c8d logging: Move message formatting to util/log.h 001f0a428e3a move-only: Move logging macros to util/log.h 94c0adf4e857 move-onlyish: Move logging levels to util/log.h 56d113cab034 move-only: move logging categories to logging/categories.h f5233f7e9827 move-only: Move SourceLocation to util/log.h fa20bc2ec275 refactor: Use empty() over eof() in the streams interface fa879db73528 test: Read debug log for self-checking comment d405713197f8 ci: use Alpine 3.23 1cee0e4cd3af ci: detect apk usage generally 1ed3de5a6d97 Update secp256k1 subtree to latest master 9d4c9b00356e Squashed 'src/secp256k1/' changes from 14e56970cb..57315a6985 9f8764c814ea Merge bitcoin/bitcoin#34475: ci: Treat SHA1 LLVM signing key as warning 3c8f5e48f710 ci: Treat SHA1 LLVM signing key as warning 5cb4cf9b428e Merge bitcoin/bitcoin#34036: contrib: update macOS SDK to Xcode-26.1.1-17B100 41034a032f0f Merge bitcoin/bitcoin#34396: fuzz: pull the latest FuzzedDataProvider.h from upstream 580e9eefe39f ci: bump CCACHE_MAXSIZE to 2G ff095839285d Merge bitcoin/bitcoin#34432: test: Turn ElapseSteady into SteadyClockContext 81e67d9aa134 Merge bitcoin/bitcoin#34179: refactor: Enable transparent lookup for setBlockIndexCandidates to remove const_cast ec70bead5e1e Merge bitcoin/bitcoin#34433: script: remove unused `SCRIPT_ERR_LAST` 08547ee1b06d Merge bitcoin/bitcoin#34443: validation: follow-up nits for lock-free `IsInitialBlockDownload()` 881ab4fc82fe support multiple block status checks in CheckBlockDataAvailability 232a2bce90a9 consensus/test: add out-of-range output unit tests for `CTransaction::GetValueOut` aa87aae14f9e consensus/test: add `MoneyRange` unit tests for `CheckTxInputs` 8bb77f348ef3 Merge bitcoin/bitcoin#34455: ci, iwyu: Fix warnings in `src/univalue` and treat them as errors 1bf384222323 ci, iwyu: Fix warnings in `src/univalue` and treat them as errors 3d180d3c7f1f Merge bitcoin/bitcoin#34462: util: Drop *BSD headers in `batchpriority.cpp` 1eed88a3ec65 Merge bitcoin/bitcoin#34460: iwyu: Update mappings 101daa41636a Merge bitcoin/bitcoin#34338: ci, iwyu: Fix warnings in `src/zmq` and treat them as errors dfb93646093f fuzz: pull latest FuzzedDataProvider.h from upstream 705705e5b195 Merge bitcoin/bitcoin#33701: test: add case where `TOTAL_TRIES` is exceeded yet solution remains 88f802983571 Merge bitcoin/bitcoin#34100: doc: Use multipath descriptors in descriptors.md and linked test 5ad94cf6b7eb Merge bitcoin/bitcoin#34381: script: return proper error for `CScriptNum` errors 4f85b05131bf Merge bitcoin/bitcoin#31713: miniscript refactor: Remove unique_ptr-indirection 1f8f7d477ae0 Change BlockRequestAllowed() to take ref 5d2707307e27 Merge bitcoin/bitcoin#34454: wallet: Rename `RecordType::DELETE` to `RecordType::DELETE_FLAG` 38fd85c676a0 http: replace WorkQueue and threads handling for ThreadPool c323f882ed38 fuzz: add test case for threadpool c528dd5f8ccc util: introduce general purpose thread pool 07af50f7896a util: Drop *BSD headers in `batchpriority.cpp` 4dfb6eef70d7 test: Add DERSIG tests to script_tests 884978f3894a test: Fix a STRICTENC test in script_tests 527e8ca7b545 test: Remove outdated comment in script_tests 516be10bb56d wallet: Rename `RecordType::DELETE` to `RecordType::DELETE_FLAG` bbbb78a4f28f ci: Print verbose build error message in test-each-commit 2222dadabbbd ci: [refactor] Allow overwriting check option in run helper 9c839aa9e3db iwyu: Document mappings for libc symbols 91824646c58a iwyu: Add temporary mapping to work around upstream bug 37de7d19107c iwyu: Drop backported mapping 01651324f4e5 Merge bitcoin/bitcoin#34434: miniscript: correct and_v() properties c7cf2b8f3aae Merge bitcoin/bitcoin#34445: fuzz: Use `__AFL_SHM_ID` for naming test directories 0d1d393877a7 Merge bitcoin/bitcoin#34429: test: Check that redundant verack message is ignored 23a2e3354edf Merge bitcoin/bitcoin#34453: ci: Always print low ccache hit rate notice 5401e673d561 Merge bitcoin/bitcoin#33604: p2p: Allow block downloads from peers without snapshot block after assumeutxo validation 6750744eb32d Merge bitcoin/bitcoin#34164: validation: add reusable coins view for ConnectBlock 4e4fa0199ee2 Merge bitcoin/bitcoin#33680: validation: do not wipe utxo cache for stats/scans/snapshots fad2876ec330 ci: Always print low ccache hit rate notice e67a676df9af fix: uptime RPC returns 0 on first call a89e1618dd8c contrib: update macOS SDK to Xcode-26.1.1-17B100 57a778ed2526 depends: use -Xclang -fno-cxx-modules in macOS cross build 3e0fd0e4ddd8 refactor: rename will_reuse_cache to reallocate_cache 44b4ee194d3b validation: reuse same CCoinsViewCache for every ConnectBlock call 8fb6043231ea coins: introduce CCoinsViewCache::ResetGuard 041758f5eda5 coins: use hashBlock setter internally for CCoinsViewCache methods 8dd9200fc9b0 coins: add Reset on CCoinsViewCache efcbf794484e ci, iwyu: Fix warnings in `src/zmq` and treat them as errors d3e681bc0675 fuzz: Use `__AFL_SHM_ID` for naming test directories f7e0c3d3d370 Merge bitcoin/bitcoin#34346: test: use IP_PORTRANGE_HIGH on FreeBSD for dynamic port allocation eeb4d2814803 validation: follow-up nits for lock-free `IsInitialBlockDownload()` 1c2f164d3486 Merge bitcoin/bitcoin#34253: validation: cache tip recency for lock-free `IsInitialBlockDownload()` 8cdf1dcca0ce Merge bitcoin/bitcoin#34373: refactor: Remove remaining std::bind, check via clang-tidy facb2aab26df test: Turn ElapseSteady into SteadyClockContext 6354b4fd7fe8 tests: log node JSON-RPC errors during test setup 45930a79412d http-server: guard against crashes from unhandled exceptions a6cdc3ec9b56 Merge bitcoin/bitcoin#34303: test: addrman: test self-announcement time penalty handling 75ec9001ced9 Merge bitcoin/bitcoin#34207: coins/refactor: enforce `GetCoin()` returns only unspent coins 4fab35cf88c0 miniscript: correct and_v() properties 51abf7d15b1d script: remove unused SCRIPT_ERR_LAST f2b8acc0edb6 remove glozow from trusted keys cd1af852fa5d Merge bitcoin/bitcoin#34358: wallet: fix removeprunedfunds bug with conflicting transactions 2dd5e7bb38da Merge bitcoin/bitcoin#34409: test: use `ModuleNotFoundError` in `interface_ipc.py` d3e8c459e776 Merge bitcoin/bitcoin#34417: log: Print warning about privacy-sensitive log info unconditionally d9851f9a7c1c Merge bitcoin/bitcoin#33472: guix: documented shasum gathering command a7460b992884 Merge bitcoin/bitcoin#34098: test: [move-only] Move lint functions into modules 8f9ad534a5a5 Merge bitcoin/bitcoin#34352: ci, iwyu: Fix warnings in `src/primitives` and treat them as errors faba426b3b66 lint: Flatten lint image entry points 1111fff91c76 lint: Add missing --platform=linux to docker build command feb74a9372be Merge bitcoin/bitcoin#34430: ci: mount git directory as writable in linter fad042235bd6 refactor: Remove remaining std::bind, check via clang-tidy c8abac994122 ci: mount .git dir rw d9e651f9954f Merge bitcoin/bitcoin#33622: docs: add doc comment for SRD selection algorithm cb128bcedb58 Merge bitcoin/bitcoin#34408: ci: remove gnu-getopt usage 6ae96ed60745 Merge bitcoin/bitcoin#34276: Remove empty caption from user interface (noui, gui) fafdae46ff0b test: Check that redundant verack message is ignored 289d60f5ab76 Merge bitcoin/bitcoin#34161: refactor: avoid possible UB from `std::distance` for `nullptr` args 1d3243806da6 Merge bitcoin/bitcoin#34391: lint: upgrade lint scripts for worktrees d931b54d138f Merge bitcoin/bitcoin#34412: Update secp256k1 subtree to latest master 3400db80401d doc: add missing param description to SRD c0e6556e4f51 Merge bitcoin/bitcoin#34413: doc: Remove outdated -fdebug-prefix-map section in dev notes 9260b20ef175 Merge bitcoin/bitcoin#33962: refactor: replace manual promise with SyncWithValidationInterfaceQueue ddae1b4efa56 ci: remove gnu-getopt usage fa43897c1d14 doc: Fix LLM nits in net_processing.cpp bbbba0fd4b87 scripted-diff: Use references when nullptr is not possible fac541546604 refactor: Separate peer/maybe_peer in ProcessMessages and SendMessages fac529188e0d refactor: Pass Peer& to ProcessMessage fa376095a01c refactor: Pass CNode& to ProcessMessages and SendMessages fada8380148c refactor: Make ProcessMessage private again fa80cd3ceed4 test: [refactor] Avoid calling private ProcessMessage() function d511adb664ed [miner] omit dummy extraNonce via IPC bf3b5d6d069a test: clarify getCoinbaseRawTx() comparison 78df9003d634 [doc] Update comments on dummy extraNonces in tests e770392084aa test: addrman: test self-announcement time penalty handling 27aeeff63014 Merge bitcoin/bitcoin#34328: rpc: make `uptime` monotonic across NTP jumps 5aeaa71c77ac lint: pass args from lint.py to cargo run in container c17a2adb8dc0 lint: upgrade lint scripts for worktrees fa9c92d7b639 log: Print warning about privacy-sensitive log info unconditionally f970cb39fb64 Merge bitcoin/bitcoin#34267: net: avoid unconditional `privatebroadcast` logging (+ warn for debug logs) 8593d965191e Merge bitcoin/bitcoin#33067: test: refactor ValidWitnessMalleatedTx class to helper function 2fccbea3c8a0 Squashed 'src/secp256k1/' changes from d543c0d917..14e56970cb 26fbe10873e7 Update secp256k1 subtree to latest master 34a5ecadd720 Merge bitcoin/bitcoin#34397: doc: fix arg name hints so bugprone can validate them fa2e1b85dd6b build: Remove outdated comment about -ffile-prefix-map fa06cd4ba730 doc: Remove outdated -fdebug-prefix-map section in dev notes ab649ce45945 guix: documented shasum gathering command 1cc58d3a0c65 Merge bitcoin/bitcoin#34281: build: Temporarily remove confusing and brittle `-fdebug-prefix-map` 905dfdee86d6 test: use ModuleNotFoundError in interface_ipc.py 2778eb46647a Merge bitcoin/bitcoin#34337: fuzz: Return chrono point from ConsumeTime(), Add ConsumeDuration() d70fb8a5754f Merge bitcoin/bitcoin#34351: util: Remove `FilterHeaderHasher` 6472ba06c36a Merge bitcoin/bitcoin#34388: doc: Explain that low-effort pull requests may be closed 1f60ca360eb8 wallet: fix removeprunedfunds bug with conflicting transactions 5f66fca633c8 Merge bitcoin-core/gui#920: Set peer version and subversion to N/A when not available or detecting 02240a7698e3 Merge bitcoin/bitcoin#34390: test: allow overriding `tar` in `get_previous_releases.py` 7d9e1a810239 test: Verify peer usage after assumeutxo validation completes 3bd98b45084d refactor: use transparent comparator for setBlockIndexCandidates lookups a73a3ec5532d doc: fix invalid arg name hints for bugprone validation eeee3755f8c4 fuzz: Return chrono point from ConsumeTime(), Add ConsumeDuration() 1b36bf0c5d71 subprocess: Fix `-Wunused-private-field` for `Child` class on Windows 9f2b338bc018 subprocess: Fix `-Wunused-private-field` for `Popen` class on Windows fa15a8d2d03b doc: Explain that low-effort pull requests may be closed be2b48b9f3e5 test: allow overriding tar in get_previous_releases db2effaca4cf scripted-diff: refactor: CWallet::Create() -> CreateNew() 27e021ebc0dd wallet: Correctly log stats for encrypted messages. d8bec61be233 wallet: remove loading logic from CWallet::Create f35acc893fb3 refactor: wallet: Factor out `WriteVersion()` from `PopulateWalletFromDB()` e12ff8aca049 test: wallet: Split create and load 70dbc79b09ac wallet: Use CWallet::LoadExisting() for loading existing wallets. ae66e0116462 wallet: Create separate function for wallet load bc69070416c6 refactor: Wallet stats logging in its own function a9d64cd49c69 wallet: Remove redundant birth time update b4a49cc7275e wallet: Move argument parsing to before DB load b15a94a618c5 refactor: Split out wallet argument loading 6f7b4323cb46 test: remove UNKNOWN_ERROR from script_tests bd31a92d6716 script: use SCRIPT_ERR_SCRIPTNUM for CScriptNum errors 0ca4dcd78665 script: add SCRIPT_ERR_SCRIPTNUM error 2845f10a2be0 test: extend FreeBSD ephemeral port range fix to P2P listeners 3f5211cba8e7 test: remove child_one/child_two (w)txid variables 7cfe790820cf test: replace ValidWitnessMalleatedTx class with function 4fec726c4d35 refactor: Simplify Interpret asmap function 79e97d45c16f doc: Add more extensive docs to asmap implementation cf4943fdcdd1 refactor: Use span instead of vector for data in util/asmap 385c34a05261 refactor: Unify asmap version calculation and naming fa41fc6a1a7d refactor: Operate on bytes instead of bits in Asmap code 964c44cdcd6b test(miniscript): Prove avoidance of stack overflow 198bbaee4959 refactor(miniscript): Destroy nodes one full subs-vector at a time 50cab8570e8f refactor(miniscript): Remove NodeRef & MakeNodeRef() 15fb34de41cb refactor(miniscript): Remove superfluous unique_ptr-indirection e55b23c170eb refactor(miniscript): Remove Node::subs mutability c6f798b22247 refactor(miniscript): Make fields non-const & private 22e4115312b9 doc(miniscript): Remove mention of shared pointers 34bed0ed8c44 test: use IP_PORTRANGE_HIGH on FreeBSD for dynamic port allocation ccf9172ab3bb util: Remove `FilterHeaderHasher` fdc9fe2da6a8 ci, iwyu: Fix warnings in `src/primitives` and treat them as errors 477c5504e05f coins: replace `std::distance` with unambiguous pointer subtraction 81675a781f3a test: use pre-generated chain 14f99cfe53f0 rpc: make `uptime` monotonic across NTP jumps a9440b1595be util: add `TicksSeconds` a02c4a82d88a refactor: Move -walletbroadcast setting init 411caf72815b wallet: refactor: PopulateWalletFromDB use switch statement. a48e23f566cc refactor: wallet: move error handling to PopulateWalletFromDB() faa5a9ebad15 fuzz: Use min option in ConsumeTime 0972785fd723 wallet: Delete unnecessary PopulateWalletFromDB() calls f0a046094e4c scripted-diff: refactor: CWallet::LoadWallet->PopulateWalletFromDB fad7bd9ba3ee noui: Remove always empty caption while formatting fa8ebeb33232 refactor: [gui] Document that the title is always empty for node message fafe71b743a0 refactor: Remove empty caption from ThreadSafeMessageBox fa8d0088e76d refactor: Remove empty caption from ThreadSafeQuestion fa37928536e0 build: Temporarily remove confusing and brittle -fdebug-prefix-map b39291f4cde0 doc: fix `-logips` description to clarify that non-debug logs can also contain IP addresses c7028d3368e9 init: log that additional logs may contain privacy-sensitive information 31b771a9425d net: move `privatebroadcast` logs to debug category fa16b275fa94 test: Check that interrupt results in EXIT_SUCCESS fab7c7f56c1d test: Split large init_stress_test into two smaller functions fa0195499ca6 refactor: [gui] Use lambdas over std::bind eeee1e341fa5 refactor: Remove trailing semicolon after ADD_SIGNALS_DECL_WRAPPER 557b41a38ccf validation: make `IsInitialBlockDownload()` lock-free b9c0ab3b75a1 chain: add `CChain::IsTipRecent` helper 8d531c6210eb validation: invert `m_cached_finished_ibd` to `m_cached_is_ibd` 8be54e3b1967 test: cover IBD exit conditions 2ee7f9b25905 coins: assume `GetCoin` only returns unspent coins eec551aaf1df fuzz: keep `coinscache_sim` backend free of spent coins 3e4155fcefe0 test: do not return spent coins from `CCoinsViewTest::GetCoin` ee1e40f58000 txdb: assert `CCoinsViewDB::GetCoin` only returns unspent coins fa578d9434fd lint: [move-only] Move python related lints to lint_py.rs fa392c31e7b9 lint: [move-only] Move repo related lints to lint_repo_hygiene.rs fab0cfa987c9 lint: [move-only] Move cpp related lints to lint_cpp.rs fa3e48e3fd4d lint: [move-only] Move docs related lints to lint_docs.rs fad09e77dbe5 lint: [move-only] Move text related lints to text_format.rs faf40c2f848d lint: [move-only] Move util functions to util.rs c6ca2b85a3e6 validation: do not wipe utxo cache for stats/scans/snapshots 7099e93d0a80 refactor: rename `FlushStateMode::ALWAYS` to `FORCE_FLUSH` b261100e7169 [qt] Set peer version and subversion to N/A when not available or detecting 552bc82b1796 doc: Use multipath descriptors in descriptors.md and linked test 0067abe15329 p2p: Allow block downloads from peers without snapshot block after assumeutxo validation e71c4df16851 refactor: replace manual promise with SyncWithValidationInterfaceQueue b189a3455744 test: add case where `TOTAL_TRIES` is exceeded yet solution remains 76dae5d6911b cmake: Replace recursive globbing with explicit globbing in folders a099655f2e1b scripted-diff: Update `DeriveType` enum values to mention ranged derivations 88d909257104 cmake: Create subdirectories in build tree in advance 7378f27b4fb5 test: run utxo-to-sqlite script test with spk/txid format option combinations b30fca7498c9 contrib: utxo_to_sqlite.py: add options to store txid/spk as BLOBs git-subtree-dir: libbitcoinkernel-sys/bitcoin git-subtree-split: d9c7364ac56781a16c7224b2c7a6db9db97f17d8
…9c7364ac567 d9c7364ac567 Merge bitcoin/bitcoin#34141: miniscript: Use Func and Expr when parsing keys, hashes, and locktimes 6c8d628b74aa Merge bitcoin-core/gui#931: Release: Update `src/qt/locale/bitcoin_en.xlf` after string freeze fa194fca8e7b Merge bitcoin/bitcoin#34622: test: assert_debug_log timeouts follow-up d907d65acd13 Merge bitcoin/bitcoin#29770: index: Check all necessary block data is available before starting to sync ce6898f9a803 Merge bitcoin/bitcoin#34605: build: define CMAKE_COMPILE_WARNING_AS_ERROR as a cache option a2fd558760ab Merge bitcoin/bitcoin#34572: cmake: Fix NetBSD-specific workaround for Boost ef987683dc51 qt: Update src/qt/locale/bitcoin_en.xlf after string freeze cb3473a6804f Merge bitcoin/bitcoin#34568: mining: Break compatibility with existing IPC mining clients 641a1954f7ae Merge bitcoin/bitcoin#34633: Revert "ci: Treat SHA1 LLVM signing key as warning" 3574905cecec Revert "ci: Treat SHA1 LLVM signing key as warning" 1a54886b639a Merge bitcoin/bitcoin#24539: Add a "tx output spender" index fa4424fd98b6 test: Fixup assert_debug_log timeouts in feature_config_args.py faed837f274a test: Add missing syncwithvalidationinterfacequeue ee2065fdeaca Merge bitcoin/bitcoin#34165: coins: don't mutate main cache when connecting block 96bec216ec34 Merge bitcoin/bitcoin#34549: net: reduce log level for PCP/NAT-PMP NOT_AUTHORIZED failures 76de2f8e55f3 Merge bitcoin/bitcoin#34571: test: Fix intermittent issues in feature_assumevalid.py c808dfbbdcea Merge bitcoin/bitcoin#34329: rpc,net: Add private broadcast RPCs 739f75c0980e Merge bitcoin/bitcoin#33512: coins: use dirty entry count for flush warnings and disk space checks 02c83fef8431 Merge bitcoin/bitcoin#34577: http: fix submission during shutdown race 0b96b9c600e0 Minimize mempool lock, sync txo spender index only when and if needed d0998cbe348e Merge bitcoin/bitcoin#33199: fees: enable `CBlockPolicyEstimator` return sub 1 sat/vb fee rate estimates 37e449dcc72c Merge bitcoin/bitcoin#34512: rpc: add coinbase_tx field to getblock 097c18239b58 Merge bitcoin/bitcoin#34385: subprocess: Fix `-Wunused-private-field` when building with clang-cl on Windows 910bd1c964b6 Merge bitcoin/bitcoin#34582: rpc: Properly parse -rpcworkqueue/-rpcthreads e0463b4e8c25 rpc: add coinbase_tx field to getblock 5a8a427610ed Merge bitcoin/bitcoin#32745: scripted-diff: Update DeriveType enum values to mention ranged derivations 3d82ec5bdd01 Add a "tx output spender" index 8ee24d764a28 Merge bitcoin/bitcoin#34604: guix: remove double export of `TZ` 4933d1fbbada Merge bitcoin/bitcoin#28792: build: Embedded ASMap [3/3]: Build binary dump header file 6d482b22de15 Merge bitcoin/bitcoin#32138: wallet, rpc: remove settxfee and paytxfee 726b3663cc8e http: properly respond to HTTP request during shutdown 241ad5853bca Merge bitcoin-core/gui#929: Use plurals where necessary a849b7e1ff35 Merge bitcoin-core/gui#928: Replace three dots with ellipsis 9e4567b17a28 Merge bitcoin/bitcoin#34581: test: Set assert_debug_log timeout to 0 655b9d12ee17 Merge bitcoin/bitcoin#32950: validation: remove BLOCK_FAILED_CHILD 2706758dc38c Merge bitcoin/bitcoin#34349: util: Remove brittle and confusing sp::Popen(std::string) 59e10a5463dc Merge bitcoin/bitcoin#34023: Optimized SFL cluster linearization 59d24bd5dd2a threadpool: make Submit return Expected instead of throwing fb3e1bf9c977 test: check LoadBlockIndex correctly recomputes invalidity flags 29740c06ac53 validation: remove BLOCK_FAILED_MASK b5b2956bda32 validation: reset BLOCK_FAILED_CHILD to BLOCK_FAILED_VALID when loading from disk 37bc20785278 validation: stop using BLOCK_FAILED_CHILD 120c631e1689 refactor: use clearer variables in InvalidateBlock() fa4cb96bdec2 test: Set assert_debug_log timeout to 0 c2fcf2506973 clusterlin: inline GetReachable into Deactivate (optimization) d90f98ab4aaa clusterlin: inline UpdateChunk into (De)Activate (optimization) b684f954bbfc clusterlin: unidirectional MakeTopological initially (optimization) 1daa600c1ca8 clusterlin: track suboptimal chunks (optimization) 63b06d5523f1 clusterlin: keep track of active children (optimization) ae16485aa94d clusterlin: special-case self-merges (optimization) 3221f1a074e7 clusterlin: make MergeSequence take SetIdx (simplification) 7194de3f7c53 clusterlin: precompute reachable sets (optimization) 6f898dbb8bfa clusterlin: simplify PickMergeCandidate (optimization) dcf458ffb99c clusterlin: split up OptimizeStep (refactor) cbd684a4713d clusterlin: abstract out functions from MergeStep (refactor) b75574a6531e clusterlin: improve TxData::dep_top_idx type (optimization) 73cbd15d4572 clusterlin: get rid of DepData (optimization) 7c6f63a8a9dc clusterlin: pool SetInfos (preparation) 20e2f3e96df3 scripted-diff: rename _rep -> _idx in SFL 268fcb6a53ec clusterlin: add more Assumes and sanity checks (tests) d69c9f56ea96 clusterlin: count chunk deps without loop (optimization) f66fa69ce008 clusterlin: split tx/chunk dep counting (preparation) 900e45977889 clusterlin: avoid depgraph argument in SanityCheck (cleanup) 666b37970f15 clusterlin: fix type to count dependencies a7c29df0e5ac Merge bitcoin/bitcoin#34552: fees: refactor: separate feerate format from fee estimate mode 231dd04b8dcb build: define CMAKE_COMPILE_WARNING_AS_ERROR as a cache option fa48d421636c test: Stricter unit test fa626bd14341 util: Remove brittle and confusing sp::Popen(std::string) fd06157d1465 test: Add coverage for restarted node without any block sync 3d7ab7ecb7df rpc, test: Address feedback from #29668 312919c9dd5d test: Indices can not start based on block data without undo data a9a3b29dd687 index: Check availability of undo data for indices c8c9c1e61759 Merge bitcoin/bitcoin#34383: ci: remove commit count limit from `test-each-commit` and fail fast 62e378584e77 guix: don't export TZ twice badcf1c68dbf guix: fix typo in guix-codesign 8a050b9cb68a Merge bitcoin/bitcoin#34575: test: Avoid empty errmsg in JSONRPCException 746d8cddc191 qt: Use plurals where necessary fa5672dcafa1 refactor: [gui] Use SettingTo<int64_t> over deprecated SettingToInt 35e6444fdc40 Merge bitcoin/bitcoin#34570: doc: update Windows MSVC build guide to utilize winget to install build requirements d159b103987f doc: update Windows MSVC build guide to utilize WinGet to install apps afea2af13913 net: reduce log level for PCP/NAT-PMP NOT_AUTHORIZED failures fac3ecaf69d6 rpc: Properly parse -rpcworkqueue/-rpcthreads faee36f63b5f util: Add SettingTo<Int>() and GetArg<Int>() 6df4a045f797 qt: Replace three dots with ellipsis 211111b8048d test: Avoid empty errmsg in JSONRPCException b65ff0e5a1fd Merge bitcoin/bitcoin#34548: ci: Add and use ci-windows-cross.py helper 03e5f063b5c0 Merge bitcoin/bitcoin#34559: ci: split vcpkg tools cache into restore/save 84e826ddc1cf Merge bitcoin/bitcoin#34511: test: fully reset the state of CConnman in tests 309c51d89dfc Merge bitcoin/bitcoin#34546: kernel: Avoid duplicating symbols in the kernel library 24f93c9af7f6 release note 331a5279d277 wallet, rpc:remove settxfee and paytxfee eafd530d2032 kernel: avoid potential duplicate object in shared library/binary 24c3b4701003 build: add kernel-specific warnings cae6d895f8a8 fuzz: add target for CoinsViewOverlay 86eda88c8e48 fuzz: move backend mutating block to end of coins_view 89824fb27b22 fuzz: pass coins_view_cache to TestCoinsView in coins_view 73e99a596655 coins: don't mutate main cache when connecting block 67c0d1798e61 coins: introduce CoinsViewOverlay 69b01af0eb90 coins: add PeekCoin() f700609e8ada doc: Release notes for mining IPC interface bump 79c934b51cdc cmake: Fix NetBSD-specific workaround for Boost fa90d44a2283 test: Fix intermittent issues in feature_assumevalid.py 07b924775e4f Merge bitcoin/bitcoin#34427: lint: Flatten lint image entry points 9453c153612a ipc mining: break compatibility with existing clients (version bump) 70de5cc2d205 ipc mining: pass missing context to BlockTemplate methods (incompatible schema change) 2278f017afad ipc mining: remove deprecated methods (incompatible schema change) c6638fa7c5e9 ipc mining: provide default option values (incompatible schema change) a4603ac77412 ipc mining: declare constants for default field values ff995b50cf9e ipc test: add workaround to block_reserved_weight exception test b970cdf20fce test framework: expand expected_stderr, expected_ret_code options df53a3e5ec87 rpc refactor: stop using deprecated getCoinbaseCommitment method 0b4cd08fcd22 Merge bitcoin/bitcoin#33965: mining: fix -blockreservedweight shadows IPC option 2a1d0db7994e doc: Mention private broadcast RPCs in release notes c3378be10b0a test: Cover abortprivatebroadcast in p2p_private_broadcast 557260ca14ac rpc: Add abortprivatebroadcast 15dff452eb61 test: Cover getprivatebroadcastinfo in p2p_private_broadcast 996f20c18af0 rpc: Add getprivatebroadcastinfo 5e64982541f3 net: Add PrivateBroadcast::GetBroadcastInfo 55c49ff8f4b1 Merge bitcoin/bitcoin#34143: build: Prevent system header fallback and include path pollution c134b1a4bc35 Merge bitcoin/bitcoin#34257: txgraph: deterministic optimal transaction order 4a05825a3f39 Merge bitcoin/bitcoin#33689: http: replace WorkQueue and single threads handling for ThreadPool c1355493e2c2 refactor: fees: split fee rate format from fee estimate mode c413cf12c5c6 ci: Split vcpkg tools cache into restore/save 337fef9f2f68 Merge bitcoin/bitcoin#34554: build: avoid exporting secp256k1 symbols 922ebf96ed66 refactor: move-only: move `FeeEstimateMode` enum to `util/fees.h` cb1798000c25 Merge bitcoin/bitcoin#33861: build: Bump VS minimum supported version to 18.3 7640863a0fbe Merge bitcoin/bitcoin#34555: doc: archive release notes for v29.3 d29bc5e6dd71 doc: archive release notes for v29.3 fd625d84ae9e Merge bitcoin/bitcoin#34539: test: Fixup TODO comment in feature_dbcrash.py; remove unnecessary sleep 6777314310bc Merge bitcoin/bitcoin#34551: ci: Extend diff context for clang-format 452c743951fa refactor: Remove workaround for resolved MSVC bug 7164a0cab650 build: Bump VS minimum supported version to 18.3 2ccfdb582b64 build: avoid exporting secp256k1 symbols fa8c89511d83 Fixup TODO comment in feature_dbcrash.py; remove unnecessary sleep f8d2f30bf37d ci: Extend diff context for clang-format 91a8e9b549e9 Merge bitcoin-core/gui#807: refactor: interfaces, make 'createTransaction' less error-prone 573bb542be80 net: Store recipient node address in private broadcast fa13b13239e5 ci: [refactor] Use pathlib over os.path fa2719ab1ba2 ci: [refactor] Move run_unit_tests to ci-windows-cross.py fa99ba5f14d4 ci: Set PREVIOUS_RELEASES_DIR env var in ci-windows-cross.py fa4a1cab6c17 ci: Move run_functional_tests into ci-windows-cross.py 1111108685ec ci: [refactor] Move pyzmq install and get_previous_releases into ci-windows-cross.py fac9c7bd6635 ci: [refactor] Move config.ini rewrite to ci-windows-cross.py faf738946668 ci: Move check_manifests step to ci-windows-cross.py fa674d55df57 ci: [refactor] Move print_version step into ci-windows-cross.py helper 6f113cb1847c txgraph: use fallback order to sort chunks (feature) 0a3351947e73 txgraph: use fallback order when linearizing (feature) fba004a3df02 txgraph: pass fallback_order to TxGraph (preparation) 941c432a4637 txgraph test: subclass TxGraph::Ref like mempool does (preparation) 39d0052cbf47 clusterlin: make optimal linearizations deterministic (feature) 8bfbba32077c txgraph: sort distinct-cluster chunks by equal-feerate-prefix size (feature) e0bc73ba9270 clusterlin: sort tx in chunk by feerate and size (feature) 6c1bcb2c7c1a txgraph: clear cluster's chunk index in ~Ref (preparation) 7427c7d09830 txgraph: update chunk index on Compact (preparation) 3ddafceb9afd txgraph: initialize Ref in AddTransaction (preparation) 64294c89094d Merge bitcoin/bitcoin#34500: ci: Print verbose Windows CI build failure 5f6bfa3649c3 Merge bitcoin/bitcoin#34057: test: add tests for cluster chunks 6ca7782db9b4 Merge bitcoin/bitcoin#34523: doc: Clarify why performance-move-const-arg.CheckTriviallyCopyableMove=false 44afed4cd970 Merge bitcoin/bitcoin#34524: refactor: [rpc] Remove confusing and brittle integral casts (take 2) 3764746404a8 Merge bitcoin/bitcoin#34241: test: Check that interrupt results in EXIT_SUCCESS 18f11695c755 validation: don't update BLOCK_FAILED_VALID to BLOCK_FAILED_CHILD in InvalidateBlock acefdce08311 Merge bitcoin/bitcoin#34469: consensus/test/doc: cover errors in `CheckTxInputs` with unit tests 7e5e0b20ea3e Merge bitcoin/bitcoin#32773: cmake: Create subdirectories in build tree in advance fa90277d22e1 ci: Use ubuntu-slim for [meta] runners fa9627af9f89 ci: Rely on cmake --preset toolchain file fa3f89acaa7a ci: Add check_manifests to ci-windows.py 1111079a16b9 ci: Add run_tests step to ci-windows.py 6d625af2831b Merge bitcoin/bitcoin#32621: contrib: utxo_to_sqlite.py: add option to store txid/spk as BLOBs afb1bc120ecc validation: Use dirty entry count in flush warnings and disk space checks b413491a1cdd coins: Keep track of number of dirty entries in `CCoinsViewCache` 7e52b1b945c4 fuzz: call `EmplaceCoinInternalDANGER` as well in `SimulationTest` 8f0e1f6540be Merge bitcoin/bitcoin#34465: refactor: separate log generation from log handling b2805eec35ce Merge bitcoin/bitcoin#34528: test: Fix intermittent failure in `feature_assumevalid.py` by ensuring invalid block was processed before checking debug.log 72030efd4b83 Merge bitcoin/bitcoin#34525: Release: Prepare "Open Transifex translations for v31.0" step fe0b1513a7c5 test: add a test for txgraph staging ef253a9d3d16 test: add block builder tests for txgraph 4a1ac31e97c2 test: add a chunk test for txgraph b623fab1ba87 mining: enforce minimum reserved weight for IPC d3e49528d479 mining: fix -blockreservedweight shadows IPC option 418b7995ddfb test: have mining template helpers return None 54bd49c7e3c7 Merge bitcoin/bitcoin#34452: test: split interface_ipc.py 3b39a8aeb4c6 Merge bitcoin/bitcoin#34483: refactor: Use SpanReader over DataStream 6f68e0c8b760 Merge bitcoin/bitcoin#34181: refactor: [p2p] Make ProcessMessage private again, Use references when non-null 4c0d4f6f93f3 refactor: interfaces, make 'createTransaction' less error-prone e2c3ec9bf412 refactor: move CreatedTransactionResult to types.h 45372175c35b gui: remove AmountWithFeeExceedsBalance error special case d88997b809db Merge bitcoin/bitcoin#34299: wallet: remove PreSelectedInputs and re-activate "AmountWithFeeExceedsBalance" error b73a62f667d0 test: Ensure invalid block was processed before checking debug.log 633d1831199a test: misc interface_ipc_mining.py improvements 52ccd9215e67 test: split interface_ipc_mining.py into subtests 4e49fa2a6884 test: add interface_ipc_mining.py 01a1ae889e5a test: move IPC helpers to ipc_util.py 28160c1e3dc1 Merge bitcoin/bitcoin#34421: ci: add Chimera Linux LTO config 576f89202798 qt: Update the `src/qt/locale/bitcoin_en.xlf` translation source file 4b9f5beafe9e Update Transifex slug for 31.x 46e1288df2b4 Merge bitcoin/bitcoin#34498: iwyu: Fix patch to prefer `<cstdint>` fa6801366d76 refactor: [rpc] Remove confusing and brittle integral casts (take 2) d79249d2799e ci: add chimera Linux LTO CI job 48161f6a0503 wallet: introduce "tx amount exceeds balance when fees are included" error b7fa609ed175 wallet: remove PreSelectedInputs 7819da2c1643 walllet: use CoinsResult instead of PreSelectedInputs 0cd309c75e58 Merge bitcoin/bitcoin#34492: ci: Drop valgrind fuzz from GHA matrix fa561682ce40 ci: [refactor] Add .github/ci-windows.py prepare_tests step fa3e607c6dfb ci: Print verbose Windows CI build failure 4444808dd3a7 ci: [refactor] Add .github/ci-windows.py build step fabdd4e82342 ci: Refactor Windows CI into script fa88ac3f4f9b doc: Clarify why performance-move-const-arg.CheckTriviallyCopyableMove=false fa0677d13119 refactor: Use SpanReader over DataStream e5474079f179 wallet: introduce GetAppropriateTotal() in CoinsResult d8ea921d0140 wallet: correctly reserve in CoinsResult::All() 7072d825e39d wallet: ensure COutput added in set are unique fefa3be782ea wallet: fix, make 'total_effective_amount' optional actually optional 9ec1ae0e98c0 Merge bitcoin/bitcoin#34437: rpc: `uptime` should begin on application start d692e0722813 Merge bitcoin/bitcoin#32894: FUZZ: Test that BnB finds best solution 28d860788286 Merge bitcoin/bitcoin#34504: build: replace `WERROR` with `CMAKE_COMPILE_WARNING_AS_ERROR` ad1940a006b6 Merge bitcoin/bitcoin#34517: drop my key from trusted-keys 322c4ec4422a build: replace WERROR with CMAKE_COMPILE_WARNING_AS_ERROR 65134c7e5f99 depends: Prefix include path for headers-only `systemtap` package 94a692b6aa09 cmake: Add missed `USDT::headers` b5375c44ed16 depends: Prefix include path for headers-only `boost` package d73378ffcca2 cmake: Add missed `Boost::headers` eb97250421d3 Merge bitcoin/bitcoin#34496: build: don't pass on boost dependency to kernel consumers 9d7694729481 Merge bitcoin/bitcoin#34464: Change BlockRequestAllowed() to take ref (minor refactor) 8966352df3fc doc: add release notes 704a09fe7187 test: ensure fee estimator provide fee rate estimate < 1 s/vb 243e48cf4933 fees: delete unused dummy field fc4fbda42af1 fees: bump fees file version b54dedcc8563 fees: reduce `MIN_BUCKET_FEERATE` to 100 2cb7e99deee1 test: also reset CConnman::m_private_broadcast in tests 41b9b76cce6a Merge bitcoin/bitcoin#34510: doc: fix broken bpftrace installation link 91b7c874e2b1 test: add ConnmanTestMsg convenience method Reset() 42ee31e80c99 doc: fix broken bpftrace installation link 54d039305823 FUZZ: Test that BnB finds best solution eb510f8678ba ci: fail fast in test-each-commit script 04c4d710087b ci: remove commit count limit from `test-each-commit` 4ae00e9a7183 Merge bitcoin/bitcoin#32636: Split `CWallet::Create()` into `CreateNew` and `LoadExisting` d4bc620ad8cf Merge bitcoin/bitcoin#34488: refactor: Small style and test fixups for bitcoinkernel eb3dbbaf30fc Merge bitcoin/bitcoin#34493: contrib: Remove valgrind suppression for bug 472219 1e64aeaaecc2 Merge bitcoin/bitcoin#34295: test: Improve STRICTENC/DERSIG unit tests b65a3d80093b iwyu: Fix patch to prefer `<cstdint>` a50d0b6720f3 build: don't pass on boost dependency to kernel consumers 3532e242134e Merge bitcoin/bitcoin#32748: fees: fix noisy flushing log fad9dd1a8891 test: kernel test fixups fabb58d42dc2 test: Use clang-tidy named args for create_chainman fa51594c5c0f refactor: Small style fixups in src/kernel/bitcoinkernel.cpp fa33acec89f0 Revert "valgrind: add suppression for bug 472219" 24699fec8422 doc: Add initial asmap data documentation bab085d282b1 ci: Use without embedded asmap build option in one ci job e53934422a29 doc: Expand documentation on asmap feature and tooling 6244212a5532 init, net: Implement usage of binary-embedded asmap data 6202b50fb900 build: Generate ip_asn.dat.h during build process 634cd60dc8f6 build: Add embedded asmap data faa4ab113cc9 ci: Drop valgrind fuzz from GHA matrix 02b5f6078d65 fees: make flushes log debug only b58eebf1520f Merge bitcoin/bitcoin#34470: Bump leveldb subtree and remove UB workaround in CI 8bb277c12373 Merge bitcoin/bitcoin#34481: Update secp256k1 subtree to latest master a4941132d311 Merge bitcoin/bitcoin#34461: ci: Print verbose build error message in test-each-commit fad7d86d8d17 ci: Remove unused workaround after leveldb subtree bump fabced56f650 Bump leveldb subtree be35408c5ad7 Merge bitcoin/bitcoin#34474: ci: update ccache to improve hitrate 2f2952c5f2e3 Squashed 'src/leveldb/' changes from cad64b151d..ab6c84e6f3 7528d18796a2 ci: show more verbose ccache stats 47c9297172b0 Merge bitcoin/bitcoin#32420: mining, ipc: omit dummy extraNonce from coinbase 4b53cbd69220 test: Test for musig() in various miniscript expressions ec0f47b15cb3 miniscript: Using Func and Expr when parsing keys, hashes, and locktimes 6fd780d4fbc4 descriptors: Increment key_exp_index in ParsePubkey(Inner) b12281bd86e2 miniscript: Use a reference to key_exp_index in KeyParser ce4c66eb7c5e test: Test that key expression indexes match key count 8c03318387f6 consensus/doc: explain `GetValueOut()` precondition 82ef92c8d006 consensus/doc: explain unreachable `bad-txns-fee-outofrange` check fad3eb395645 refactor: Use SpanReader over DataStream fa06e26764bb refactor: [qt] Use SpanReader to avoid two vector copies fabd4d2e2e3c refactor: Avoid UB in SpanReader::ignore 37cc2a2d953c logging: use util/log.h where possible 8799eb74406e Merge bitcoin/bitcoin#33878: refactor, docs: Embedded ASMap [2/3]: Refactor asmap internals and add documentation bb8e9e7c4c8d logging: Move message formatting to util/log.h 001f0a428e3a move-only: Move logging macros to util/log.h 94c0adf4e857 move-onlyish: Move logging levels to util/log.h 56d113cab034 move-only: move logging categories to logging/categories.h f5233f7e9827 move-only: Move SourceLocation to util/log.h fa20bc2ec275 refactor: Use empty() over eof() in the streams interface fa879db73528 test: Read debug log for self-checking comment d405713197f8 ci: use Alpine 3.23 1cee0e4cd3af ci: detect apk usage generally 1ed3de5a6d97 Update secp256k1 subtree to latest master 9d4c9b00356e Squashed 'src/secp256k1/' changes from 14e56970cb..57315a6985 9f8764c814ea Merge bitcoin/bitcoin#34475: ci: Treat SHA1 LLVM signing key as warning 3c8f5e48f710 ci: Treat SHA1 LLVM signing key as warning 5cb4cf9b428e Merge bitcoin/bitcoin#34036: contrib: update macOS SDK to Xcode-26.1.1-17B100 41034a032f0f Merge bitcoin/bitcoin#34396: fuzz: pull the latest FuzzedDataProvider.h from upstream 580e9eefe39f ci: bump CCACHE_MAXSIZE to 2G ff095839285d Merge bitcoin/bitcoin#34432: test: Turn ElapseSteady into SteadyClockContext 81e67d9aa134 Merge bitcoin/bitcoin#34179: refactor: Enable transparent lookup for setBlockIndexCandidates to remove const_cast ec70bead5e1e Merge bitcoin/bitcoin#34433: script: remove unused `SCRIPT_ERR_LAST` 08547ee1b06d Merge bitcoin/bitcoin#34443: validation: follow-up nits for lock-free `IsInitialBlockDownload()` 881ab4fc82fe support multiple block status checks in CheckBlockDataAvailability 232a2bce90a9 consensus/test: add out-of-range output unit tests for `CTransaction::GetValueOut` aa87aae14f9e consensus/test: add `MoneyRange` unit tests for `CheckTxInputs` 8bb77f348ef3 Merge bitcoin/bitcoin#34455: ci, iwyu: Fix warnings in `src/univalue` and treat them as errors 1bf384222323 ci, iwyu: Fix warnings in `src/univalue` and treat them as errors 3d180d3c7f1f Merge bitcoin/bitcoin#34462: util: Drop *BSD headers in `batchpriority.cpp` 1eed88a3ec65 Merge bitcoin/bitcoin#34460: iwyu: Update mappings 101daa41636a Merge bitcoin/bitcoin#34338: ci, iwyu: Fix warnings in `src/zmq` and treat them as errors dfb93646093f fuzz: pull latest FuzzedDataProvider.h from upstream 705705e5b195 Merge bitcoin/bitcoin#33701: test: add case where `TOTAL_TRIES` is exceeded yet solution remains 88f802983571 Merge bitcoin/bitcoin#34100: doc: Use multipath descriptors in descriptors.md and linked test 5ad94cf6b7eb Merge bitcoin/bitcoin#34381: script: return proper error for `CScriptNum` errors 4f85b05131bf Merge bitcoin/bitcoin#31713: miniscript refactor: Remove unique_ptr-indirection 1f8f7d477ae0 Change BlockRequestAllowed() to take ref 5d2707307e27 Merge bitcoin/bitcoin#34454: wallet: Rename `RecordType::DELETE` to `RecordType::DELETE_FLAG` 38fd85c676a0 http: replace WorkQueue and threads handling for ThreadPool c323f882ed38 fuzz: add test case for threadpool c528dd5f8ccc util: introduce general purpose thread pool 07af50f7896a util: Drop *BSD headers in `batchpriority.cpp` 4dfb6eef70d7 test: Add DERSIG tests to script_tests 884978f3894a test: Fix a STRICTENC test in script_tests 527e8ca7b545 test: Remove outdated comment in script_tests 516be10bb56d wallet: Rename `RecordType::DELETE` to `RecordType::DELETE_FLAG` bbbb78a4f28f ci: Print verbose build error message in test-each-commit 2222dadabbbd ci: [refactor] Allow overwriting check option in run helper 9c839aa9e3db iwyu: Document mappings for libc symbols 91824646c58a iwyu: Add temporary mapping to work around upstream bug 37de7d19107c iwyu: Drop backported mapping 01651324f4e5 Merge bitcoin/bitcoin#34434: miniscript: correct and_v() properties c7cf2b8f3aae Merge bitcoin/bitcoin#34445: fuzz: Use `__AFL_SHM_ID` for naming test directories 0d1d393877a7 Merge bitcoin/bitcoin#34429: test: Check that redundant verack message is ignored 23a2e3354edf Merge bitcoin/bitcoin#34453: ci: Always print low ccache hit rate notice 5401e673d561 Merge bitcoin/bitcoin#33604: p2p: Allow block downloads from peers without snapshot block after assumeutxo validation 6750744eb32d Merge bitcoin/bitcoin#34164: validation: add reusable coins view for ConnectBlock 4e4fa0199ee2 Merge bitcoin/bitcoin#33680: validation: do not wipe utxo cache for stats/scans/snapshots fad2876ec330 ci: Always print low ccache hit rate notice e67a676df9af fix: uptime RPC returns 0 on first call a89e1618dd8c contrib: update macOS SDK to Xcode-26.1.1-17B100 57a778ed2526 depends: use -Xclang -fno-cxx-modules in macOS cross build 3e0fd0e4ddd8 refactor: rename will_reuse_cache to reallocate_cache 44b4ee194d3b validation: reuse same CCoinsViewCache for every ConnectBlock call 8fb6043231ea coins: introduce CCoinsViewCache::ResetGuard 041758f5eda5 coins: use hashBlock setter internally for CCoinsViewCache methods 8dd9200fc9b0 coins: add Reset on CCoinsViewCache efcbf794484e ci, iwyu: Fix warnings in `src/zmq` and treat them as errors d3e681bc0675 fuzz: Use `__AFL_SHM_ID` for naming test directories f7e0c3d3d370 Merge bitcoin/bitcoin#34346: test: use IP_PORTRANGE_HIGH on FreeBSD for dynamic port allocation eeb4d2814803 validation: follow-up nits for lock-free `IsInitialBlockDownload()` 1c2f164d3486 Merge bitcoin/bitcoin#34253: validation: cache tip recency for lock-free `IsInitialBlockDownload()` 8cdf1dcca0ce Merge bitcoin/bitcoin#34373: refactor: Remove remaining std::bind, check via clang-tidy facb2aab26df test: Turn ElapseSteady into SteadyClockContext 6354b4fd7fe8 tests: log node JSON-RPC errors during test setup 45930a79412d http-server: guard against crashes from unhandled exceptions a6cdc3ec9b56 Merge bitcoin/bitcoin#34303: test: addrman: test self-announcement time penalty handling 75ec9001ced9 Merge bitcoin/bitcoin#34207: coins/refactor: enforce `GetCoin()` returns only unspent coins 4fab35cf88c0 miniscript: correct and_v() properties 51abf7d15b1d script: remove unused SCRIPT_ERR_LAST f2b8acc0edb6 remove glozow from trusted keys cd1af852fa5d Merge bitcoin/bitcoin#34358: wallet: fix removeprunedfunds bug with conflicting transactions 2dd5e7bb38da Merge bitcoin/bitcoin#34409: test: use `ModuleNotFoundError` in `interface_ipc.py` d3e8c459e776 Merge bitcoin/bitcoin#34417: log: Print warning about privacy-sensitive log info unconditionally d9851f9a7c1c Merge bitcoin/bitcoin#33472: guix: documented shasum gathering command a7460b992884 Merge bitcoin/bitcoin#34098: test: [move-only] Move lint functions into modules 8f9ad534a5a5 Merge bitcoin/bitcoin#34352: ci, iwyu: Fix warnings in `src/primitives` and treat them as errors faba426b3b66 lint: Flatten lint image entry points 1111fff91c76 lint: Add missing --platform=linux to docker build command feb74a9372be Merge bitcoin/bitcoin#34430: ci: mount git directory as writable in linter fad042235bd6 refactor: Remove remaining std::bind, check via clang-tidy c8abac994122 ci: mount .git dir rw d9e651f9954f Merge bitcoin/bitcoin#33622: docs: add doc comment for SRD selection algorithm cb128bcedb58 Merge bitcoin/bitcoin#34408: ci: remove gnu-getopt usage 6ae96ed60745 Merge bitcoin/bitcoin#34276: Remove empty caption from user interface (noui, gui) fafdae46ff0b test: Check that redundant verack message is ignored 289d60f5ab76 Merge bitcoin/bitcoin#34161: refactor: avoid possible UB from `std::distance` for `nullptr` args 1d3243806da6 Merge bitcoin/bitcoin#34391: lint: upgrade lint scripts for worktrees d931b54d138f Merge bitcoin/bitcoin#34412: Update secp256k1 subtree to latest master 3400db80401d doc: add missing param description to SRD c0e6556e4f51 Merge bitcoin/bitcoin#34413: doc: Remove outdated -fdebug-prefix-map section in dev notes 9260b20ef175 Merge bitcoin/bitcoin#33962: refactor: replace manual promise with SyncWithValidationInterfaceQueue ddae1b4efa56 ci: remove gnu-getopt usage fa43897c1d14 doc: Fix LLM nits in net_processing.cpp bbbba0fd4b87 scripted-diff: Use references when nullptr is not possible fac541546604 refactor: Separate peer/maybe_peer in ProcessMessages and SendMessages fac529188e0d refactor: Pass Peer& to ProcessMessage fa376095a01c refactor: Pass CNode& to ProcessMessages and SendMessages fada8380148c refactor: Make ProcessMessage private again fa80cd3ceed4 test: [refactor] Avoid calling private ProcessMessage() function d511adb664ed [miner] omit dummy extraNonce via IPC bf3b5d6d069a test: clarify getCoinbaseRawTx() comparison 78df9003d634 [doc] Update comments on dummy extraNonces in tests e770392084aa test: addrman: test self-announcement time penalty handling 27aeeff63014 Merge bitcoin/bitcoin#34328: rpc: make `uptime` monotonic across NTP jumps 5aeaa71c77ac lint: pass args from lint.py to cargo run in container c17a2adb8dc0 lint: upgrade lint scripts for worktrees fa9c92d7b639 log: Print warning about privacy-sensitive log info unconditionally f970cb39fb64 Merge bitcoin/bitcoin#34267: net: avoid unconditional `privatebroadcast` logging (+ warn for debug logs) 8593d965191e Merge bitcoin/bitcoin#33067: test: refactor ValidWitnessMalleatedTx class to helper function 2fccbea3c8a0 Squashed 'src/secp256k1/' changes from d543c0d917..14e56970cb 26fbe10873e7 Update secp256k1 subtree to latest master 34a5ecadd720 Merge bitcoin/bitcoin#34397: doc: fix arg name hints so bugprone can validate them fa2e1b85dd6b build: Remove outdated comment about -ffile-prefix-map fa06cd4ba730 doc: Remove outdated -fdebug-prefix-map section in dev notes ab649ce45945 guix: documented shasum gathering command 1cc58d3a0c65 Merge bitcoin/bitcoin#34281: build: Temporarily remove confusing and brittle `-fdebug-prefix-map` 905dfdee86d6 test: use ModuleNotFoundError in interface_ipc.py 2778eb46647a Merge bitcoin/bitcoin#34337: fuzz: Return chrono point from ConsumeTime(), Add ConsumeDuration() d70fb8a5754f Merge bitcoin/bitcoin#34351: util: Remove `FilterHeaderHasher` 6472ba06c36a Merge bitcoin/bitcoin#34388: doc: Explain that low-effort pull requests may be closed 1f60ca360eb8 wallet: fix removeprunedfunds bug with conflicting transactions 5f66fca633c8 Merge bitcoin-core/gui#920: Set peer version and subversion to N/A when not available or detecting 02240a7698e3 Merge bitcoin/bitcoin#34390: test: allow overriding `tar` in `get_previous_releases.py` 7d9e1a810239 test: Verify peer usage after assumeutxo validation completes 3bd98b45084d refactor: use transparent comparator for setBlockIndexCandidates lookups a73a3ec5532d doc: fix invalid arg name hints for bugprone validation eeee3755f8c4 fuzz: Return chrono point from ConsumeTime(), Add ConsumeDuration() 1b36bf0c5d71 subprocess: Fix `-Wunused-private-field` for `Child` class on Windows 9f2b338bc018 subprocess: Fix `-Wunused-private-field` for `Popen` class on Windows fa15a8d2d03b doc: Explain that low-effort pull requests may be closed be2b48b9f3e5 test: allow overriding tar in get_previous_releases db2effaca4cf scripted-diff: refactor: CWallet::Create() -> CreateNew() 27e021ebc0dd wallet: Correctly log stats for encrypted messages. d8bec61be233 wallet: remove loading logic from CWallet::Create f35acc893fb3 refactor: wallet: Factor out `WriteVersion()` from `PopulateWalletFromDB()` e12ff8aca049 test: wallet: Split create and load 70dbc79b09ac wallet: Use CWallet::LoadExisting() for loading existing wallets. ae66e0116462 wallet: Create separate function for wallet load bc69070416c6 refactor: Wallet stats logging in its own function a9d64cd49c69 wallet: Remove redundant birth time update b4a49cc7275e wallet: Move argument parsing to before DB load b15a94a618c5 refactor: Split out wallet argument loading 6f7b4323cb46 test: remove UNKNOWN_ERROR from script_tests bd31a92d6716 script: use SCRIPT_ERR_SCRIPTNUM for CScriptNum errors 0ca4dcd78665 script: add SCRIPT_ERR_SCRIPTNUM error 2845f10a2be0 test: extend FreeBSD ephemeral port range fix to P2P listeners 3f5211cba8e7 test: remove child_one/child_two (w)txid variables 7cfe790820cf test: replace ValidWitnessMalleatedTx class with function 4fec726c4d35 refactor: Simplify Interpret asmap function 79e97d45c16f doc: Add more extensive docs to asmap implementation cf4943fdcdd1 refactor: Use span instead of vector for data in util/asmap 385c34a05261 refactor: Unify asmap version calculation and naming fa41fc6a1a7d refactor: Operate on bytes instead of bits in Asmap code 964c44cdcd6b test(miniscript): Prove avoidance of stack overflow 198bbaee4959 refactor(miniscript): Destroy nodes one full subs-vector at a time 50cab8570e8f refactor(miniscript): Remove NodeRef & MakeNodeRef() 15fb34de41cb refactor(miniscript): Remove superfluous unique_ptr-indirection e55b23c170eb refactor(miniscript): Remove Node::subs mutability c6f798b22247 refactor(miniscript): Make fields non-const & private 22e4115312b9 doc(miniscript): Remove mention of shared pointers 34bed0ed8c44 test: use IP_PORTRANGE_HIGH on FreeBSD for dynamic port allocation ccf9172ab3bb util: Remove `FilterHeaderHasher` fdc9fe2da6a8 ci, iwyu: Fix warnings in `src/primitives` and treat them as errors 477c5504e05f coins: replace `std::distance` with unambiguous pointer subtraction 81675a781f3a test: use pre-generated chain 14f99cfe53f0 rpc: make `uptime` monotonic across NTP jumps a9440b1595be util: add `TicksSeconds` a02c4a82d88a refactor: Move -walletbroadcast setting init 411caf72815b wallet: refactor: PopulateWalletFromDB use switch statement. a48e23f566cc refactor: wallet: move error handling to PopulateWalletFromDB() faa5a9ebad15 fuzz: Use min option in ConsumeTime 0972785fd723 wallet: Delete unnecessary PopulateWalletFromDB() calls f0a046094e4c scripted-diff: refactor: CWallet::LoadWallet->PopulateWalletFromDB fad7bd9ba3ee noui: Remove always empty caption while formatting fa8ebeb33232 refactor: [gui] Document that the title is always empty for node message fafe71b743a0 refactor: Remove empty caption from ThreadSafeMessageBox fa8d0088e76d refactor: Remove empty caption from ThreadSafeQuestion fa37928536e0 build: Temporarily remove confusing and brittle -fdebug-prefix-map b39291f4cde0 doc: fix `-logips` description to clarify that non-debug logs can also contain IP addresses c7028d3368e9 init: log that additional logs may contain privacy-sensitive information 31b771a9425d net: move `privatebroadcast` logs to debug category fa16b275fa94 test: Check that interrupt results in EXIT_SUCCESS fab7c7f56c1d test: Split large init_stress_test into two smaller functions fa0195499ca6 refactor: [gui] Use lambdas over std::bind eeee1e341fa5 refactor: Remove trailing semicolon after ADD_SIGNALS_DECL_WRAPPER 557b41a38ccf validation: make `IsInitialBlockDownload()` lock-free b9c0ab3b75a1 chain: add `CChain::IsTipRecent` helper 8d531c6210eb validation: invert `m_cached_finished_ibd` to `m_cached_is_ibd` 8be54e3b1967 test: cover IBD exit conditions 2ee7f9b25905 coins: assume `GetCoin` only returns unspent coins eec551aaf1df fuzz: keep `coinscache_sim` backend free of spent coins 3e4155fcefe0 test: do not return spent coins from `CCoinsViewTest::GetCoin` ee1e40f58000 txdb: assert `CCoinsViewDB::GetCoin` only returns unspent coins fa578d9434fd lint: [move-only] Move python related lints to lint_py.rs fa392c31e7b9 lint: [move-only] Move repo related lints to lint_repo_hygiene.rs fab0cfa987c9 lint: [move-only] Move cpp related lints to lint_cpp.rs fa3e48e3fd4d lint: [move-only] Move docs related lints to lint_docs.rs fad09e77dbe5 lint: [move-only] Move text related lints to text_format.rs faf40c2f848d lint: [move-only] Move util functions to util.rs c6ca2b85a3e6 validation: do not wipe utxo cache for stats/scans/snapshots 7099e93d0a80 refactor: rename `FlushStateMode::ALWAYS` to `FORCE_FLUSH` b261100e7169 [qt] Set peer version and subversion to N/A when not available or detecting 552bc82b1796 doc: Use multipath descriptors in descriptors.md and linked test 0067abe15329 p2p: Allow block downloads from peers without snapshot block after assumeutxo validation e71c4df16851 refactor: replace manual promise with SyncWithValidationInterfaceQueue b189a3455744 test: add case where `TOTAL_TRIES` is exceeded yet solution remains 76dae5d6911b cmake: Replace recursive globbing with explicit globbing in folders a099655f2e1b scripted-diff: Update `DeriveType` enum values to mention ranged derivations 88d909257104 cmake: Create subdirectories in build tree in advance 7378f27b4fb5 test: run utxo-to-sqlite script test with spk/txid format option combinations b30fca7498c9 contrib: utxo_to_sqlite.py: add options to store txid/spk as BLOBs git-subtree-dir: libbitcoinkernel-sys/bitcoin git-subtree-split: d9c7364ac56781a16c7224b2c7a6db9db97f17d8
| # This bug is fixed with | ||
| # https://github.com/bitcoin-core/libmultiprocess/pull/218 |
There was a problem hiding this comment.
In commit "ipc test: add workaround to block_reserved_weight exception test" (ff995b5)
I did some more work on bitcoin-core/libmultiprocess#218 and this comment is false. I thought that PR added code to catch uncaught exceptions from IPC server methods running on asynchronous threads, but it actually never did that. The code which does do that was added in bitcoin-core/libmultiprocess#240 commit bitcoin-core/libmultiprocess@c4762c7. That commit was only supposed to be a refactoring, but because it moved a kj::runCatchingExceptions call one level up the stack it fixed this problem inadvertently.
…ter IBD fcaec25 doc: release note for IPC cooldown and interrupt (Sjors Provoost) 1e82fa4 mining: add interrupt() (Sjors Provoost) a11297a mining: add cooldown argument to createNewBlock() (Sjors Provoost) Pull request description: As reported in #33994, connected mining clients will receive a flood of new templates if the node is still going through IBD or catching up on the last 24 hours. This PR fixes that using an _optional_ cooldown mechanism, only applied to `createNewBlock()`. First, cooldown waits for IBD. Then, as the tip keeps moving forward, it waits a few seconds to see if the tip updated. If so, it restarts the timer and waits again. The trade-offs for this mechanism are explained below. Because this PR changes `createNewBlock()` from a method that returns quickly to one that can block for minutes, we rely on #34568 to fix a bug in our `.capnp` definition, adding the missing `context` to `createNewBlock` (and `checkBlock`). The second commit then adds an `interrupt()` method so that clients can cleanly disconnect. --- ## Rationale The cooldown argument is optional, and not used by internal non-IPC code, for two reasons: 1. The mechanism wreaks havoc on the functional test suite, which would require very careful mock time handling to work around. But that's pointless, because only IPC clients need it. 2. It needs to be optional for IPC clients too, because in some situations, like a signet with only one miner, waiting for IBD can mean being stuck forever. The reason it's only applied to `createNewBlock()` is that this is the first method called by clients; `waitNext()` is a method on the interface returned by `createNewBlock()`, at which point the cooldown is done. After IBD, we wait N seconds if the header is N blocks ahead of the tip, with a minimum of 3 and a maximum of 20 seconds. The minimum waiting time is short enough that it shouldn't be annoying or confusing for someone manually starting up a client. While the maximum should be harmless if it happens spuriously (which it shouldn't). If the minimum wait is too short, clients get a burst of templates, as observed in the original issue. We can't entirely rule this out without a lot of additional complexity (like scanning our own log file for heuristics). This PR should make it a lot less likely, and thanks to the IBD wait also limit it to one day worth of blocks (`-maxtipage`). Some test runs on an M4 MacBook Pro, where I had a node catch up on the last few days worth of blocks: <img width="872" height="972" alt="Schermafbeelding 2026-02-04 om 18 21 17" src="https://github.com/user-attachments/assets/7902a0f2-0e0b-4604-9688-cec2da073261" /> As the chart shows, sometimes it takes longer than 3 seconds. But it turns out that in all those cases there were quite a few headers ahead of the tip. It also demonstrates that it's important to first wait for IBD, because it's less likely a random tip update takes longer than 20 seconds. - modified sv2-apps: https://github.com/Sjors/sv2-apps/tree/2026/02/cooldown - test script: https://gist.github.com/Sjors/feb6122c97acc2b9e6d66b168614609c#file-run_mainnet_pool_loop-zsh - chart script: https://gist.github.com/Sjors/feb6122c97acc2b9e6d66b168614609c#file-tip_interval_charts-py ACKs for top commit: ryanofsky: Code review ACK fcaec25. Only changes since last review were removing two cooldown arguments from the mining IPC test to simplify it enirox001: ACK fcaec25 Tree-SHA512: 08b75470f7c5c80a583a2fdb918fad145e7d5377309e5c599f67fc0d0e3139d09881067ba50c74114f117e69da17ee50666838259491691c031b1feaf050853f
This PR increments the field number of the
Init.makeMiningmethod and makes the oldmakeMiningmethod return an error, so IPC mining clients not using the latest schema file will get an error and not be able to access the Mining interface.Normally, there shouldn't be a need to break compatibility this way, but the mining interface has evolved a lot since it was first introduced, with old clients using the original methods less stable and performant than newer clients. So now is a good time to introduce a cutoff, drop deprecated methods, and stop supporting old clients which can't function as well.
Bumping the field number is also an opportunity to make other improvements that would be awkward to implement compatibly:
More details about these changes are in the commit messages.