diff options
-rwxr-xr-x | ci/test/04_install.sh | 2 | ||||
-rwxr-xr-x | contrib/seeds/makeseeds.py | 4 | ||||
-rw-r--r-- | doc/release-notes-16524.md | 8 | ||||
-rw-r--r-- | doc/release-process.md | 20 | ||||
-rw-r--r-- | src/bitcoind.cpp | 2 | ||||
-rw-r--r-- | src/qt/bitcoin.cpp | 2 | ||||
-rw-r--r-- | src/util/threadnames.cpp | 5 | ||||
-rw-r--r-- | src/util/threadnames.h | 5 | ||||
-rw-r--r-- | src/wallet/init.cpp | 3 | ||||
-rw-r--r-- | src/wallet/wallet.cpp | 5 | ||||
-rw-r--r-- | src/wallet/wallet.h | 4 | ||||
-rw-r--r-- | test/functional/test_framework/util.py | 1 |
12 files changed, 41 insertions, 20 deletions
diff --git a/ci/test/04_install.sh b/ci/test/04_install.sh index 54d7a9b814..4459d6f4ce 100755 --- a/ci/test/04_install.sh +++ b/ci/test/04_install.sh @@ -46,5 +46,5 @@ DOCKER_EXEC free -m -h DOCKER_EXEC echo "Number of CPUs \(nproc\): $(nproc)" ${CI_RETRY_EXE} DOCKER_EXEC apt-get update -${CI_RETRY_EXE} DOCKER_EXEC apt-get install --no-install-recommends --no-upgrade -qq $PACKAGES $DOCKER_PACKAGES +${CI_RETRY_EXE} DOCKER_EXEC apt-get install --no-install-recommends --no-upgrade -y $PACKAGES $DOCKER_PACKAGES diff --git a/contrib/seeds/makeseeds.py b/contrib/seeds/makeseeds.py index 2f7697e0b1..ec589d4c02 100755 --- a/contrib/seeds/makeseeds.py +++ b/contrib/seeds/makeseeds.py @@ -123,7 +123,7 @@ def filtermultiport(ips): def lookup_asn(net, ip): ''' - Look up the asn for an IP (4 or 6) address by querying cymry.com, or None + Look up the asn for an IP (4 or 6) address by querying cymru.com, or None if it could not be found. ''' try: @@ -187,7 +187,7 @@ def main(): # Skip entries with invalid address. ips = [ip for ip in ips if ip is not None] print('%s Skip entries with invalid address' % (ip_stats(ips)), file=sys.stderr) - # Skip duplicattes (in case multiple seeds files were concatenated) + # Skip duplicates (in case multiple seeds files were concatenated) ips = dedup(ips) print('%s After removing duplicates' % (ip_stats(ips)), file=sys.stderr) # Skip entries from suspicious hosts. diff --git a/doc/release-notes-16524.md b/doc/release-notes-16524.md new file mode 100644 index 0000000000..11c2f60c38 --- /dev/null +++ b/doc/release-notes-16524.md @@ -0,0 +1,8 @@ + +Low-level changes +================= + +Tests +--- + +- `-fallbackfee` was 0 (disabled) by default for the main chain, but 20000 by default for the test chains. Now it is 0 by default for all chains. Testnet and regtest users will have to add fallbackfee=20000 to their configuration if they weren't setting it and they want it to keep working like before. (#16524) diff --git a/doc/release-process.md b/doc/release-process.md index 551bde78a3..2c3c4e3869 100644 --- a/doc/release-process.md +++ b/doc/release-process.md @@ -14,19 +14,9 @@ Release Process * Update [bips.md](bips.md) to account for changes since the last release (don't forget to bump the version number on the first line). * Update version in `configure.ac` (don't forget to set `CLIENT_VERSION_RC` to `0`). * Write release notes (see "Write the release notes" below). -* Update `src/chainparams.cpp` nMinimumChainWork with information from the getblockchaininfo rpc. -* Update `src/chainparams.cpp` defaultAssumeValid with information from the getblockhash rpc. - - The selected value must not be orphaned so it may be useful to set the value two blocks back from the tip. - - Testnet should be set some tens of thousands back from the tip due to reorgs there. - - This update should be reviewed with a reindex-chainstate with assumevalid=0 to catch any defect - that causes rejection of blocks in the past history. ### Before every major release -* Update hardcoded [seeds](/contrib/seeds/README.md), see [this pull request](https://github.com/bitcoin/bitcoin/pull/7415) for an example. -* Update [`src/chainparams.cpp`](/src/chainparams.cpp) m_assumed_blockchain_size and m_assumed_chain_state_size with the current size plus some overhead (see [this](#how-to-calculate-m_assumed_blockchain_size-and-m_assumed_chain_state_size) for information on how to calculate them). -* Update `src/chainparams.cpp` chainTxData with statistics about the transaction count and rate. Use the output of the RPC `getchaintxstats`, see - [this pull request](https://github.com/bitcoin/bitcoin/pull/17002) for an example. Reviewers can verify the results by running `getchaintxstats <window_block_count> <window_last_block_hash>` with the `window_block_count` and `window_last_block_hash` from your output. * On both the master branch and the new release branch: - update `CLIENT_VERSION_MINOR` in [`configure.ac`](../configure.ac) - update `CLIENT_VERSION_MINOR`, `PACKAGE_VERSION`, and `PACKAGE_STRING` in [`build_msvc/bitcoin_config.h`](/build_msvc/bitcoin_config.h) @@ -36,6 +26,16 @@ Release Process #### Before branch-off +* Update hardcoded [seeds](/contrib/seeds/README.md), see [this pull request](https://github.com/bitcoin/bitcoin/pull/7415) for an example. +* Update [`src/chainparams.cpp`](/src/chainparams.cpp) m_assumed_blockchain_size and m_assumed_chain_state_size with the current size plus some overhead (see [this](#how-to-calculate-m_assumed_blockchain_size-and-m_assumed_chain_state_size) for information on how to calculate them). +* Update `src/chainparams.cpp` chainTxData with statistics about the transaction count and rate. Use the output of the RPC `getchaintxstats`, see + [this pull request](https://github.com/bitcoin/bitcoin/pull/17002) for an example. Reviewers can verify the results by running `getchaintxstats <window_block_count> <window_last_block_hash>` with the `window_block_count` and `window_last_block_hash` from your output. +* Update `src/chainparams.cpp` nMinimumChainWork with information from the getblockchaininfo rpc. +* Update `src/chainparams.cpp` defaultAssumeValid with information from the getblockhash rpc. + - The selected value must not be orphaned so it may be useful to set the value two blocks back from the tip. + - Testnet should be set some tens of thousands back from the tip due to reorgs there. + - This update should be reviewed with a reindex-chainstate with assumevalid=0 to catch any defect + that causes rejection of blocks in the past history. - Clear the release notes and move them to the wiki (see "Write the release notes" below). #### After branch-off (on master) diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp index 615b955f6e..17989a4214 100644 --- a/src/bitcoind.cpp +++ b/src/bitcoind.cpp @@ -45,7 +45,7 @@ static bool AppInit(int argc, char* argv[]) bool fRet = false; - util::ThreadRename("init"); + util::ThreadSetInternalName("init"); // // Parameters diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index ec6075c8fb..86f4dc91a1 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -416,7 +416,7 @@ int GuiMain(int argc, char* argv[]) std::tie(argc, argv) = winArgs.get(); #endif SetupEnvironment(); - util::ThreadRename("main"); + util::ThreadSetInternalName("main"); std::unique_ptr<interfaces::Node> node = interfaces::MakeNode(); diff --git a/src/util/threadnames.cpp b/src/util/threadnames.cpp index c25e9ed661..168f9325d0 100644 --- a/src/util/threadnames.cpp +++ b/src/util/threadnames.cpp @@ -60,3 +60,8 @@ void util::ThreadRename(std::string&& name) SetThreadName(("b-" + name).c_str()); SetInternalName(std::move(name)); } + +void util::ThreadSetInternalName(std::string&& name) +{ + SetInternalName(std::move(name)); +} diff --git a/src/util/threadnames.h b/src/util/threadnames.h index aaf07b9bf8..69a1b55bfe 100644 --- a/src/util/threadnames.h +++ b/src/util/threadnames.h @@ -10,8 +10,13 @@ namespace util { //! Rename a thread both in terms of an internal (in-memory) name as well //! as its system thread name. +//! @note Do not call this for the main thread, as this will interfere with +//! UNIX utilities such as top and killall. Use ThreadSetInternalName instead. void ThreadRename(std::string&&); +//! Set the internal (in-memory) name of the current thread only. +void ThreadSetInternalName(std::string&&); + //! Get the thread's internal (in-memory) name; used e.g. for identification in //! logging. const std::string& ThreadGetInternalName(); diff --git a/src/wallet/init.cpp b/src/wallet/init.cpp index e766deadb7..43b6ead028 100644 --- a/src/wallet/init.cpp +++ b/src/wallet/init.cpp @@ -41,7 +41,8 @@ void WalletInit::AddWalletOptions() const gArgs.AddArg("-discardfee=<amt>", strprintf("The fee rate (in %s/kB) that indicates your tolerance for discarding change by adding it to the fee (default: %s). " "Note: An output is discarded if it is dust at this rate, but we will always discard up to the dust relay fee and a discard fee above that is limited by the fee estimate for the longest target", CURRENCY_UNIT, FormatMoney(DEFAULT_DISCARD_FEE)), ArgsManager::ALLOW_ANY, OptionsCategory::WALLET); - gArgs.AddArg("-fallbackfee=<amt>", strprintf("A fee rate (in %s/kB) that will be used when fee estimation has insufficient data (default: %s)", + + gArgs.AddArg("-fallbackfee=<amt>", strprintf("A fee rate (in %s/kB) that will be used when fee estimation has insufficient data. 0 to entirely disable the fallbackfee feature. (default: %s)", CURRENCY_UNIT, FormatMoney(DEFAULT_FALLBACK_FEE)), ArgsManager::ALLOW_ANY, OptionsCategory::WALLET); gArgs.AddArg("-keypool=<n>", strprintf("Set key pool size to <n> (default: %u)", DEFAULT_KEYPOOL_SIZE), ArgsManager::ALLOW_ANY, OptionsCategory::WALLET); gArgs.AddArg("-maxtxfee=<amt>", strprintf("Maximum total fees (in %s) to use in a single wallet transaction; setting this too low may abort large transactions (default: %s)", diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 23f61602d2..09f08220db 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -4421,7 +4421,6 @@ std::shared_ptr<CWallet> CWallet::CreateWalletFromFile(interfaces::Chain& chain, walletInstance->m_min_fee = CFeeRate(n); } - walletInstance->m_allow_fallback_fee = Params().IsTestChain(); if (gArgs.IsArgSet("-fallbackfee")) { CAmount nFeePerK = 0; if (!ParseMoney(gArgs.GetArg("-fallbackfee", ""), nFeePerK)) { @@ -4433,8 +4432,10 @@ std::shared_ptr<CWallet> CWallet::CreateWalletFromFile(interfaces::Chain& chain, _("This is the transaction fee you may pay when fee estimates are not available.").translated); } walletInstance->m_fallback_fee = CFeeRate(nFeePerK); - walletInstance->m_allow_fallback_fee = nFeePerK != 0; //disable fallback fee in case value was set to 0, enable if non-null value } + // Disable fallback fee in case value was set to 0, enable if non-null value + walletInstance->m_allow_fallback_fee = walletInstance->m_fallback_fee.GetFeePerK() != 0; + if (gArgs.IsArgSet("-discardfee")) { CAmount nFeePerK = 0; if (!ParseMoney(gArgs.GetArg("-discardfee", ""), nFeePerK)) { diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 9fc089126d..006775e83b 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -63,7 +63,7 @@ static const unsigned int DEFAULT_KEYPOOL_SIZE = 1000; //! -paytxfee default constexpr CAmount DEFAULT_PAY_TX_FEE = 0; //! -fallbackfee default -static const CAmount DEFAULT_FALLBACK_FEE = 20000; +static const CAmount DEFAULT_FALLBACK_FEE = 0; //! -discardfee default static const CAmount DEFAULT_DISCARD_FEE = 10000; //! -mintxfee default @@ -1167,7 +1167,7 @@ public: unsigned int m_confirm_target{DEFAULT_TX_CONFIRM_TARGET}; bool m_spend_zero_conf_change{DEFAULT_SPEND_ZEROCONF_CHANGE}; bool m_signal_rbf{DEFAULT_WALLET_RBF}; - bool m_allow_fallback_fee{true}; //!< will be defined via chainparams + bool m_allow_fallback_fee{true}; //!< will be false if -fallbackfee=0 CFeeRate m_min_fee{DEFAULT_TRANSACTION_MINFEE}; //!< Override with -mintxfee /** * If fee estimation does not have enough data to provide estimates, use this fee instead. diff --git a/test/functional/test_framework/util.py b/test/functional/test_framework/util.py index 598e87558b..2bed8c3231 100644 --- a/test/functional/test_framework/util.py +++ b/test/functional/test_framework/util.py @@ -307,6 +307,7 @@ def initialize_datadir(dirname, n, chain): f.write("[{}]\n".format(chain_name_conf_section)) f.write("port=" + str(p2p_port(n)) + "\n") f.write("rpcport=" + str(rpc_port(n)) + "\n") + f.write("fallbackfee=0.0002\n") f.write("server=1\n") f.write("keypool=1\n") f.write("discover=0\n") |