Merge pull request #4607 from humbleDasher/dec042021

Backport 17015, 16397, 15459
This commit is contained in:
PastaPastaPasta 2021-12-17 11:04:02 -06:00 committed by GitHub
commit d9c994a100
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 32 additions and 10 deletions

View File

@ -21,7 +21,7 @@ Before every minor and major release:
Before every major release: Before every major release:
* Update hardcoded [seeds](/contrib/seeds/README.md). TODO: Give example PR for Dash * 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 * 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 <window_block_count> <window_last_block_hash>` with the `window_block_count` and `window_last_block_hash` from your output. [this pull request](https://github.com/bitcoin/bitcoin/pull/12270) 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 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 * 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
@ -274,3 +274,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. - Create a [new GitHub release](https://github.com/dashpay/dash/releases/new) with a link to the archived release notes.
- Celebrate - 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.

View File

@ -145,7 +145,7 @@ void AddressBookTests::addressBookTests()
// and fails to handle returned nulls // and fails to handle returned nulls
// (https://bugreports.qt.io/browse/QTBUG-49686). // (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 " 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; return;
} }
#endif #endif

View File

@ -62,7 +62,7 @@ void AppTests::appTests()
// and fails to handle returned nulls // and fails to handle returned nulls
// (https://bugreports.qt.io/browse/QTBUG-49686). // (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 " 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; return;
} }
#endif #endif

View File

@ -65,9 +65,9 @@ int main(int argc, char *argv[])
// platform ("xcb", "windows", or "cocoa") so tests can't unintentionally // platform ("xcb", "windows", or "cocoa") so tests can't unintentionally
// interfere with any background GUIs and don't require extra resources. // interfere with any background GUIs and don't require extra resources.
#if defined(WIN32) #if defined(WIN32)
_putenv_s("QT_QPA_PLATFORM", "minimal"); if (getenv("QT_QPA_PLATFORM") == nullptr) _putenv_s("QT_QPA_PLATFORM", "minimal");
#else #else
setenv("QT_QPA_PLATFORM", "minimal", 0); setenv("QT_QPA_PLATFORM", "minimal", /* overwrite */ 0);
#endif #endif
// Don't remove this, it's needed to access // Don't remove this, it's needed to access

View File

@ -96,9 +96,9 @@ QModelIndex FindTx(const QAbstractItemModel& model, const uint256& txid)
// //
// This also requires overriding the default minimal Qt platform: // This also requires overriding the default minimal Qt platform:
// //
// src/qt/test/test_dash-qt -platform xcb # Linux // QT_QPA_PLATFORM=xcb src/qt/test/test_dash-qt # Linux
// src/qt/test/test_dash-qt -platform windows # Windows // QT_QPA_PLATFORM=windows src/qt/test/test_dash-qt # Windows
// src/qt/test/test_dash-qt -platform cocoa # macOS // QT_QPA_PLATFORM=cocoa src/qt/test/test_dash-qt # macOS
void TestGUI() void TestGUI()
{ {
// Set up wallet and chain with 105 blocks (5 mature blocks for spending). // 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 // and fails to handle returned nulls
// (https://bugreports.qt.io/browse/QTBUG-49686). // (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 " 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; return;
} }
#endif #endif

View File

@ -3352,7 +3352,9 @@ static UniValue fundrawtransaction(const JSONRPCRequest& request)
{ {
{"changeAddress", RPCArg::Type::STR, /* default */ "pool address", "The dash address to receive the change"}, {"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"}, {"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"}, {"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"}, {"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" {"subtractFeeFromOutputs", RPCArg::Type::ARR, /* default */ "empty array", "A json array of integers.\n"