From dd37d5f947c19302c1eaf232909b36cb4ada7106 Mon Sep 17 00:00:00 2001 From: fanquake Date: Wed, 2 Oct 2019 07:30:28 +0800 Subject: [PATCH 1/3] Merge #17015: qa: Explain QT_QPA_PLATFORM for gui tests fa06bb607da2d3e35723661156d873c8eac1fa50 qa: Do not force overwrite of QT_QPA_PLATFORM on windows for gui tests (MarcoFalke) faccf5f9c899c40d4da5792629d0714249a4616b doc: Explain QT_QPA_PLATFORM for gui tests (MarcoFalke) Pull request description: Closes #17013 ACKs for top commit: promag: ACK fa06bb607da2d3e35723661156d873c8eac1fa50. jonasschnelli: ACK fa06bb60 ryanofsky: utACK fa06bb607da2d3e35723661156d873c8eac1fa50 fanquake: ACK fa06bb607da2d3e35723661156d873c8eac1fa50 - tested on macOS using `QT_QPA_PLATFORM=cocoa src/qt/test/test_bitcoin-qt`. Tree-SHA512: f257159f6e66b2df7e870ac832ae9ef09eea173c8b7cd766458f87cf22f94681c81dcc54dea030dbc97eab5e3ae5132a4ffe8a343431a4e40f7ee29dc808dcb1 --- src/qt/test/addressbooktests.cpp | 2 +- src/qt/test/apptests.cpp | 2 +- src/qt/test/test_main.cpp | 4 ++-- src/qt/test/wallettests.cpp | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/qt/test/addressbooktests.cpp b/src/qt/test/addressbooktests.cpp index bb8d9f5763..d6cc9cb6b6 100644 --- a/src/qt/test/addressbooktests.cpp +++ b/src/qt/test/addressbooktests.cpp @@ -145,7 +145,7 @@ void AddressBookTests::addressBookTests() // and fails to handle returned nulls // (https://bugreports.qt.io/browse/QTBUG-49686). QWARN("Skipping AddressBookTests on mac build with 'minimal' platform set due to Qt bugs. To run AppTests, invoke " - "with 'test_dash-qt -platform cocoa' on mac, or else use a linux or windows build."); + "with 'QT_QPA_PLATFORM=cocoa test_dash-qt' on mac, or else use a linux or windows build."); return; } #endif diff --git a/src/qt/test/apptests.cpp b/src/qt/test/apptests.cpp index a14cc41ac3..3c59b12f70 100644 --- a/src/qt/test/apptests.cpp +++ b/src/qt/test/apptests.cpp @@ -62,7 +62,7 @@ void AppTests::appTests() // and fails to handle returned nulls // (https://bugreports.qt.io/browse/QTBUG-49686). QWARN("Skipping AppTests on mac build with 'minimal' platform set due to Qt bugs. To run AppTests, invoke " - "with 'test_dash-qt -platform cocoa' on mac, or else use a linux or windows build."); + "with 'QT_QPA_PLATFORM=cocoa test_dash-qt' on mac, or else use a linux or windows build."); return; } #endif diff --git a/src/qt/test/test_main.cpp b/src/qt/test/test_main.cpp index c0482d6758..2b92221356 100644 --- a/src/qt/test/test_main.cpp +++ b/src/qt/test/test_main.cpp @@ -59,9 +59,9 @@ int main(int argc, char *argv[]) // platform ("xcb", "windows", or "cocoa") so tests can't unintentionally // interfere with any background GUIs and don't require extra resources. #if defined(WIN32) - _putenv_s("QT_QPA_PLATFORM", "minimal"); + if (getenv("QT_QPA_PLATFORM") == nullptr) _putenv_s("QT_QPA_PLATFORM", "minimal"); #else - setenv("QT_QPA_PLATFORM", "minimal", 0); + setenv("QT_QPA_PLATFORM", "minimal", /* overwrite */ 0); #endif // Don't remove this, it's needed to access diff --git a/src/qt/test/wallettests.cpp b/src/qt/test/wallettests.cpp index 6c0af1f47a..8e4c35e92d 100644 --- a/src/qt/test/wallettests.cpp +++ b/src/qt/test/wallettests.cpp @@ -96,9 +96,9 @@ QModelIndex FindTx(const QAbstractItemModel& model, const uint256& txid) // // This also requires overriding the default minimal Qt platform: // -// src/qt/test/test_dash-qt -platform xcb # Linux -// src/qt/test/test_dash-qt -platform windows # Windows -// src/qt/test/test_dash-qt -platform cocoa # macOS +// QT_QPA_PLATFORM=xcb src/qt/test/test_dash-qt # Linux +// QT_QPA_PLATFORM=windows src/qt/test/test_dash-qt # Windows +// QT_QPA_PLATFORM=cocoa src/qt/test/test_dash-qt # macOS void TestGUI() { // Set up wallet and chain with 105 blocks (5 mature blocks for spending). @@ -224,7 +224,7 @@ void WalletTests::walletTests() // and fails to handle returned nulls // (https://bugreports.qt.io/browse/QTBUG-49686). QWARN("Skipping WalletTests on mac build with 'minimal' platform set due to Qt bugs. To run AppTests, invoke " - "with 'test_dash-qt -platform cocoa' on mac, or else use a linux or windows build."); + "with 'QT_QPA_PLATFORM=cocoa test_dash-qt' on mac, or else use a linux or windows build."); return; } #endif From 3d642e293b58da8faab42a0fc8a0c6456920d21c Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Mon, 30 Sep 2019 11:52:53 +0200 Subject: [PATCH 2/3] Merge #16397: doc: Clarify includeWatching for fundrawtransaction 80031045fc6435ef4eb5dd1aee773d938c57a0fd Clarify includeWatching for fundrawtransaction (Steven Roose) Pull request description: Might be sufficient to solve https://github.com/bitcoin/bitcoin/issues/16396, https://github.com/bitcoin/bitcoin/issues/7879 and https://github.com/bitcoin/bitcoin/issues/14405. ACKs for top commit: Sjors: ACK 8003104. This will always be confusing, but at least it gives a bunch more clues for the user to google. Tree-SHA512: 9b8002c259c50f93d89fc5574105aae6152858d8d45c07b4c3d5b7023adafe73c7a98a290874ff3fbbb7dfad2ac1bdf4acb8769a2a1c14e38484922f44e84e54 --- src/wallet/rpcwallet.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 41fddaa13f..4729d3f64e 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -3395,7 +3395,9 @@ static UniValue fundrawtransaction(const JSONRPCRequest& request) { {"changeAddress", RPCArg::Type::STR, /* default */ "pool address", "The dash address to receive the change"}, {"changePosition", RPCArg::Type::NUM, /* default */ "random", "The index of the change output"}, - {"includeWatching", RPCArg::Type::BOOL, /* default */ "false", "Also select inputs which are watch only"}, + {"includeWatching", RPCArg::Type::BOOL, /* default */ "false", "Also select inputs which are watch only.\n" + "Only solvable inputs can be used. Watch-only destinations are solvable if the public key and/or output script was imported,\n" + "e.g. with 'importpubkey' or 'importmulti' with the 'pubkeys' or 'desc' field."}, {"lockUnspents", RPCArg::Type::BOOL, /* default */ "false", "Lock selected unspent outputs"}, {"feeRate", RPCArg::Type::AMOUNT, /* default */ "not set: makes wallet determine the fee", "Set a specific fee rate in " + CURRENCY_UNIT + "/kB"}, {"subtractFeeFromOutputs", RPCArg::Type::ARR, /* default */ "empty array", "A json array of integers.\n" From 91310cf78a2f295dd642445d15d4de598766bf86 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Mon, 30 Sep 2019 14:40:13 +0200 Subject: [PATCH 3/3] Merge #15459: doc: add how to calculate blockchain and chainstate size variables to release process eb4c43e49f625895670866b89bb56ca641c4eeb7 doc: documents how to calculate m_assumed_blockchain_size and m_assumed_chain_state_size on the release process. (marcoagner) Pull request description: Regarding [this](https://github.com/bitcoin/bitcoin/pull/15183#issuecomment-463133734) on https://github.com/bitcoin/bitcoin/pull/15183. Added an "Additional information" section for this which seems reasonable to me but may not be the best place for this. Also, let me know if anything else should be documented here (like more details). ACKs for top commit: laanwj: ACK eb4c43e49f625895670866b89bb56ca641c4eeb7 Tree-SHA512: 7e6fc46740daa01dd9be5a8da7846e7a9f7fa866bf31fdc2cb252f90c698cfd6ef954f9588f7abcebda2355ec2b2a380635e14a164e53e77d38abefa3e2cc698 --- doc/release-process.md | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/doc/release-process.md b/doc/release-process.md index 3bb9014fbf..0b206fcfd5 100644 --- a/doc/release-process.md +++ b/doc/release-process.md @@ -21,7 +21,7 @@ Before every minor and major release: Before every major release: * Update hardcoded [seeds](/contrib/seeds/README.md). TODO: Give example PR for Dash -* Update [`src/chainparams.cpp`](/src/chainparams.cpp) m_assumed_blockchain_size and m_assumed_chain_state_size with the current size plus some overhead. +* 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/12270) for an example. Reviewers can verify the results by running `getchaintxstats ` with the `window_block_count` and `window_last_block_hash` from your output. * Update version of `contrib/gitian-descriptors/*.yml`: usually one'd want to do this on master after branching off the release - but be sure to at least do it before a new major release @@ -276,3 +276,23 @@ Note: check that SHA256SUMS itself doesn't end up in SHA256SUMS, which is a spur - Create a [new GitHub release](https://github.com/dashpay/dash/releases/new) with a link to the archived release notes. - Celebrate + +### Additional information + +#### How to calculate `m_assumed_blockchain_size` and `m_assumed_chain_state_size` + +Both variables are used as a guideline for how much space the user needs on their drive in total, not just strictly for the blockchain. +Note that all values should be taken from a **fully synced** node and have an overhead of 5-10% added on top of its base value. + +To calculate `m_assumed_blockchain_size`: +- For `mainnet` -> Take the size of the Dash Core data directory, excluding `/regtest` and `/testnet3` directories. +- For `testnet` -> Take the size of the `/testnet3` directory. + + +To calculate `m_assumed_chain_state_size`: +- For `mainnet` -> Take the size of the `/chainstate` directory. +- For `testnet` -> Take the size of the `/testnet3/chainstate` directory. + +Notes: +- When taking the size for `m_assumed_blockchain_size`, there's no need to exclude the `/chainstate` directory since it's a guideline value and an overhead will be added anyway. +- The expected overhead for growth may change over time, so it may not be the same value as last release; pay attention to that when changing the variables.