diff --git a/configure.ac b/configure.ac index c77abb6126..52fe2db6d8 100644 --- a/configure.ac +++ b/configure.ac @@ -1,8 +1,8 @@ AC_PREREQ([2.69]) dnl Don't forget to push a corresponding tag when updating any of _CLIENT_VERSION_* numbers define(_CLIENT_VERSION_MAJOR, 21) -define(_CLIENT_VERSION_MINOR, 0) -define(_CLIENT_VERSION_BUILD, 2) +define(_CLIENT_VERSION_MINOR, 1) +define(_CLIENT_VERSION_BUILD, 0) define(_CLIENT_VERSION_IS_RELEASE, true) define(_COPYRIGHT_YEAR, 2024) define(_COPYRIGHT_HOLDERS,[The %s developers]) diff --git a/doc/man/dash-cli.1 b/doc/man/dash-cli.1 index 025e7a09fe..508646ba25 100644 --- a/doc/man/dash-cli.1 +++ b/doc/man/dash-cli.1 @@ -1,7 +1,7 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH DASH-CLI "1" "July 2024" "dash-cli v21.0.0" "User Commands" +.TH DASH-CLI "1" "August 2024" "dash-cli v21.1.0" "User Commands" .SH NAME -dash-cli \- manual page for dash-cli v21.0.0 +dash-cli \- manual page for dash-cli v21.1.0 .SH SYNOPSIS .B dash-cli [\fI\,options\/\fR] \fI\, \/\fR[\fI\,params\/\fR] \fI\,Send command to Dash Core\/\fR @@ -15,7 +15,7 @@ dash-cli \- manual page for dash-cli v21.0.0 .B dash-cli [\fI\,options\/\fR] \fI\,help Get help for a command\/\fR .SH DESCRIPTION -Dash Core RPC client version v21.0.0 +Dash Core RPC client version v21.1.0 .SH OPTIONS .HP \-? diff --git a/doc/man/dash-qt.1 b/doc/man/dash-qt.1 index a17ccace6c..43a0b48486 100644 --- a/doc/man/dash-qt.1 +++ b/doc/man/dash-qt.1 @@ -1,12 +1,12 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH DASH-QT "1" "July 2024" "dash-qt v21.0.0" "User Commands" +.TH DASH-QT "1" "August 2024" "dash-qt v21.1.0" "User Commands" .SH NAME -dash-qt \- manual page for dash-qt v21.0.0 +dash-qt \- manual page for dash-qt v21.1.0 .SH SYNOPSIS .B dash-qt [\fI\,command-line options\/\fR] .SH DESCRIPTION -Dash Core version v21.0.0 +Dash Core version v21.1.0 .SH OPTIONS .HP \-? @@ -23,9 +23,9 @@ message) If this block is in the chain assume that it and its ancestors are valid and potentially skip their script verification (0 to verify all, default: -0000000000000020d5e38b6aef5bc8e430029444d7977b46f710c7d281ef1281, +000000000000001889bd33ef019065e250d32bd46911f4003d3fdd8128b5358d, testnet: -0000000386cf5061ea16404c66deb83eb67892fa4f79b9e58e5eaab097ec2bd6) +00000034bfeb926662ba547c0b8dd4ba8cbb6e0c581f4e7d1bddce8f9ca3a608) .HP \fB\-blockfilterindex=\fR .IP @@ -560,7 +560,10 @@ exists, otherwise ) \fB\-walletnotify=\fR .IP Execute command when a wallet transaction changes. %s in cmd is replaced -by TxID and %w is replaced by wallet name. %w is not currently +by TxID, %w is replaced by wallet name, %b is replaced by the +hash of the block including the transaction (set to 'unconfirmed' +if the transaction is not included) and %h is replaced by the +block height (\fB\-1\fR if not included). %w is not currently implemented on windows. On systems where %w is supported, it should NOT be quoted because this would break shell escaping used to invoke the command. diff --git a/doc/man/dash-tx.1 b/doc/man/dash-tx.1 index e5e75b188f..c0ab3a5308 100644 --- a/doc/man/dash-tx.1 +++ b/doc/man/dash-tx.1 @@ -1,7 +1,7 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH DASH-TX "1" "July 2024" "dash-tx v21.0.0" "User Commands" +.TH DASH-TX "1" "August 2024" "dash-tx v21.1.0" "User Commands" .SH NAME -dash-tx \- manual page for dash-tx v21.0.0 +dash-tx \- manual page for dash-tx v21.1.0 .SH SYNOPSIS .B dash-tx [\fI\,options\/\fR] \fI\, \/\fR[\fI\,commands\/\fR] \fI\,Update hex-encoded dash transaction\/\fR @@ -9,7 +9,7 @@ dash-tx \- manual page for dash-tx v21.0.0 .B dash-tx [\fI\,options\/\fR] \fI\,-create \/\fR[\fI\,commands\/\fR] \fI\,Create hex-encoded dash transaction\/\fR .SH DESCRIPTION -Dash Core dash\-tx utility version v21.0.0 +Dash Core dash\-tx utility version v21.1.0 .SH OPTIONS .HP \-? diff --git a/doc/man/dash-wallet.1 b/doc/man/dash-wallet.1 index 922fa1d959..24d3171533 100644 --- a/doc/man/dash-wallet.1 +++ b/doc/man/dash-wallet.1 @@ -1,9 +1,9 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH DASH-WALLET "1" "July 2024" "dash-wallet v21.0.0" "User Commands" +.TH DASH-WALLET "1" "August 2024" "dash-wallet v21.1.0" "User Commands" .SH NAME -dash-wallet \- manual page for dash-wallet v21.0.0 +dash-wallet \- manual page for dash-wallet v21.1.0 .SH DESCRIPTION -Dash Core dash\-wallet version v21.0.0 +Dash Core dash\-wallet version v21.1.0 .PP dash\-wallet is an offline tool for creating and interacting with Dash Core wallet files. By default dash\-wallet will act on wallets in the default mainnet wallet directory in the datadir. diff --git a/doc/man/dashd.1 b/doc/man/dashd.1 index 1c6b5f0556..66cbadb8b2 100644 --- a/doc/man/dashd.1 +++ b/doc/man/dashd.1 @@ -1,12 +1,12 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH DASHD "1" "July 2024" "dashd v21.0.0" "User Commands" +.TH DASHD "1" "August 2024" "dashd v21.1.0" "User Commands" .SH NAME -dashd \- manual page for dashd v21.0.0 +dashd \- manual page for dashd v21.1.0 .SH SYNOPSIS .B dashd [\fI\,options\/\fR] \fI\,Start Dash Core\/\fR .SH DESCRIPTION -Dash Core version v21.0.0 +Dash Core version v21.1.0 Copyright \(co 2014\-2024 The Dash Core developers Copyright \(co 2009\-2024 The Bitcoin Core developers .PP @@ -33,9 +33,9 @@ message) If this block is in the chain assume that it and its ancestors are valid and potentially skip their script verification (0 to verify all, default: -0000000000000020d5e38b6aef5bc8e430029444d7977b46f710c7d281ef1281, +000000000000001889bd33ef019065e250d32bd46911f4003d3fdd8128b5358d, testnet: -0000000386cf5061ea16404c66deb83eb67892fa4f79b9e58e5eaab097ec2bd6) +00000034bfeb926662ba547c0b8dd4ba8cbb6e0c581f4e7d1bddce8f9ca3a608) .HP \fB\-blockfilterindex=\fR .IP @@ -570,7 +570,10 @@ exists, otherwise ) \fB\-walletnotify=\fR .IP Execute command when a wallet transaction changes. %s in cmd is replaced -by TxID and %w is replaced by wallet name. %w is not currently +by TxID, %w is replaced by wallet name, %b is replaced by the +hash of the block including the transaction (set to 'unconfirmed' +if the transaction is not included) and %h is replaced by the +block height (\fB\-1\fR if not included). %w is not currently implemented on windows. On systems where %w is supported, it should NOT be quoted because this would break shell escaping used to invoke the command. diff --git a/doc/release-notes.md b/doc/release-notes.md index 5862304bf4..7b0ef32142 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -1,8 +1,8 @@ -# Dash Core version v21.0.2 +# Dash Core version v21.1.0 -This is a new patch release, bringing an important bugfix, as well as docker build improvements. +This is a new minor version release, bringing important bugfixes. -This release is **strongly encouraged** for all masternodes. +This release is **mandatory** for all masternodes. This release is optional but recommended for all other nodes. Please report bugs using the issue tracker at GitHub: @@ -34,21 +34,20 @@ reindex or re-sync the whole chain. # Notable changes -Transaction Retrieval Bug -------------------------- +Allow EHF Resigning +------------------- -Resolved a bug that prevented some clients (incl. Dash mobile wallets) from receiving transactions before they are mined -due to partial misclassification as block-only connections. Kudos to @HashEngineering and @knst for finding and -investigating this issue. +During implementation, the values for requestID and msgHash for EHF signing were switched. As a result, a masternode +which participated in an earlier failed attempt to form an EHF message is unable to participate in subsequent +attempts. This is because the LLMQ Signing System requires that the requestID be unique, and that a node will not +sign two different msgHash for the same requestID. See the [forum post](https://www.dash.org/forum/index.php?threads/ehf-activation-issues.55146/) +explaining it further. -Docker Images now include SBOM ------------------------------- +As there is no need to restrict double signing for EHF, we now allow signing of multiple msgHash's for a single EHF +requestID. Once a sufficient number of masternodes upgrade to v21.1, the EHF message will be automatically signed and +mined. -The [docker images](https://hub.docker.com/r/dashpay/dashd) should now provide SBOM and provenance. -SBOM and provenenance provide additional information about the build process and exact dependencies included. -See this [blog post](https://www.docker.com/blog/generate-sboms-with-buildkit/) by Docker for more information. - -# v21.0.2 Change log +# v21.1.0 Change log See detailed [set of changes][set-of-changes]. @@ -58,6 +57,8 @@ Thanks to everyone who directly contributed to this release: - Konstantin Akimov - PastaPastaPasta +- UdjinM6 +- ogabrielides As well as everyone that submitted issues, reviewed pull requests and helped debug the release candidates. @@ -66,6 +67,7 @@ debug the release candidates. These release are considered obsolete. Old release notes can be found here: +- [v21.0.2](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-21.0.2.md) released Aug/1/2024 - [v21.0.0](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-21.0.0.md) released Jul/25/2024 - [v20.1.1](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-20.1.1.md) released April/3/2024 - [v20.1.0](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-20.1.0.md) released March/5/2024 @@ -116,4 +118,4 @@ These release are considered obsolete. Old release notes can be found here: - [v0.10.x](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.10.0.md) released Sep/25/2014 - [v0.9.x](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.9.0.md) released Mar/13/2014 -[set-of-changes]: https://github.com/dashpay/dash/compare/v21.0.0...dashpay:v21.0.2 +[set-of-changes]: https://github.com/dashpay/dash/compare/v21.0.2...dashpay:v21.1.0 diff --git a/doc/release-notes/dash/release-notes-21.0.2.md b/doc/release-notes/dash/release-notes-21.0.2.md new file mode 100644 index 0000000000..5862304bf4 --- /dev/null +++ b/doc/release-notes/dash/release-notes-21.0.2.md @@ -0,0 +1,119 @@ +# Dash Core version v21.0.2 + +This is a new patch release, bringing an important bugfix, as well as docker build improvements. + +This release is **strongly encouraged** for all masternodes. +This release is optional but recommended for all other nodes. + +Please report bugs using the issue tracker at GitHub: + + + + +# Upgrading and downgrading + +## How to Upgrade + +If you are running an older version, shut it down. Wait until it has completely +shut down (which might take a few minutes for older versions), then run the +installer (on Windows) or just copy over /Applications/Dash-Qt (on Mac) or +dashd/dash-qt (on Linux). + +## Downgrade warning + +### Downgrade to a version < v21.0.0 + +Downgrading to a version older than v21.0.0 may not be supported due to changes +if you are using descriptor wallets. + +### Downgrade to a version < v19.2.0 + +Downgrading to a version older than v19.2.0 is not supported due to changes +in the evodb database. If you need to use an older version, you must either +reindex or re-sync the whole chain. + +# Notable changes + +Transaction Retrieval Bug +------------------------- + +Resolved a bug that prevented some clients (incl. Dash mobile wallets) from receiving transactions before they are mined +due to partial misclassification as block-only connections. Kudos to @HashEngineering and @knst for finding and +investigating this issue. + +Docker Images now include SBOM +------------------------------ + +The [docker images](https://hub.docker.com/r/dashpay/dashd) should now provide SBOM and provenance. +SBOM and provenenance provide additional information about the build process and exact dependencies included. +See this [blog post](https://www.docker.com/blog/generate-sboms-with-buildkit/) by Docker for more information. + +# v21.0.2 Change log + +See detailed [set of changes][set-of-changes]. + +# Credits + +Thanks to everyone who directly contributed to this release: + +- Konstantin Akimov +- PastaPastaPasta + +As well as everyone that submitted issues, reviewed pull requests and helped +debug the release candidates. + +# Older releases + +These release are considered obsolete. Old release notes can be found here: + +- [v21.0.0](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-21.0.0.md) released Jul/25/2024 +- [v20.1.1](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-20.1.1.md) released April/3/2024 +- [v20.1.0](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-20.1.0.md) released March/5/2024 +- [v20.0.4](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-20.0.4.md) released Jan/13/2024 +- [v20.0.3](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-20.0.3.md) released December/26/2023 +- [v20.0.2](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-20.0.2.md) released December/06/2023 +- [v20.0.1](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-20.0.1.md) released November/18/2023 +- [v20.0.0](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-20.0.0.md) released November/15/2023 +- [v19.3.0](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-19.3.0.md) released July/31/2023 +- [v19.2.0](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-19.2.0.md) released June/19/2023 +- [v19.1.0](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-19.1.0.md) released May/22/2023 +- [v19.0.0](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-19.0.0.md) released Apr/14/2023 +- [v18.2.2](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-18.2.2.md) released Mar/21/2023 +- [v18.2.1](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-18.2.1.md) released Jan/17/2023 +- [v18.2.0](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-18.2.0.md) released Jan/01/2023 +- [v18.1.1](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-18.1.1.md) released January/08/2023 +- [v18.1.0](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-18.1.0.md) released October/09/2022 +- [v18.0.2](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-18.0.2.md) released October/09/2022 +- [v18.0.1](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-18.0.1.md) released August/17/2022 +- [v0.17.0.3](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.17.0.3.md) released June/07/2021 +- [v0.17.0.2](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.17.0.2.md) released May/19/2021 +- [v0.16.1.1](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.16.1.1.md) released November/17/2020 +- [v0.16.1.0](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.16.1.0.md) released November/14/2020 +- [v0.16.0.1](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.16.0.1.md) released September/30/2020 +- [v0.15.0.0](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.15.0.0.md) released Febrary/18/2020 +- [v0.14.0.5](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.14.0.5.md) released December/08/2019 +- [v0.14.0.4](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.14.0.4.md) released November/22/2019 +- [v0.14.0.3](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.14.0.3.md) released August/15/2019 +- [v0.14.0.2](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.14.0.2.md) released July/4/2019 +- [v0.14.0.1](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.14.0.1.md) released May/31/2019 +- [v0.14.0](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.14.0.md) released May/22/2019 +- [v0.13.3](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.13.3.md) released Apr/04/2019 +- [v0.13.2](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.13.2.md) released Mar/15/2019 +- [v0.13.1](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.13.1.md) released Feb/9/2019 +- [v0.13.0](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.13.0.md) released Jan/14/2019 +- [v0.12.3.4](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.3.4.md) released Dec/14/2018 +- [v0.12.3.3](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.3.3.md) released Sep/19/2018 +- [v0.12.3.2](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.3.2.md) released Jul/09/2018 +- [v0.12.3.1](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.3.1.md) released Jul/03/2018 +- [v0.12.2.3](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.2.3.md) released Jan/12/2018 +- [v0.12.2.2](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.2.2.md) released Dec/17/2017 +- [v0.12.2](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.2.md) released Nov/08/2017 +- [v0.12.1](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.1.md) released Feb/06/2017 +- [v0.12.0](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.0.md) released Aug/15/2015 +- [v0.11.2](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.11.2.md) released Mar/04/2015 +- [v0.11.1](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.11.1.md) released Feb/10/2015 +- [v0.11.0](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.11.0.md) released Jan/15/2015 +- [v0.10.x](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.10.0.md) released Sep/25/2014 +- [v0.9.x](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.9.0.md) released Mar/13/2014 + +[set-of-changes]: https://github.com/dashpay/dash/compare/v21.0.0...dashpay:v21.0.2 diff --git a/src/chainparams.cpp b/src/chainparams.cpp index ce799d103f..3987252b80 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -805,7 +805,7 @@ public: consensus.DIP0003EnforcementHeight = 500; consensus.DIP0003EnforcementHash = uint256(); consensus.DIP0008Height = 432; - consensus.BRRHeight = 2500; // see block_reward_reallocation_tests + consensus.BRRHeight = 1000; // see block_reward_reallocation_tests consensus.DIP0020Height = 300; consensus.DIP0024Height = 900; consensus.DIP0024QuorumsHeight = 900; diff --git a/src/llmq/ehf_signals.cpp b/src/llmq/ehf_signals.cpp index 7dd42bf2a4..bf84b8d65a 100644 --- a/src/llmq/ehf_signals.cpp +++ b/src/llmq/ehf_signals.cpp @@ -93,7 +93,7 @@ void CEHFSignalsHandler::trySignEHFSignal(int bit, const CBlockIndex* const pind const uint256 msgHash = mnhfPayload.PrepareTx().GetHash(); WITH_LOCK(cs, ids.insert(requestId)); - sigman.AsyncSignIfMember(llmqType, shareman, requestId, msgHash); + sigman.AsyncSignIfMember(llmqType, shareman, requestId, msgHash, quorum->qc->quorumHash, false, true); } void CEHFSignalsHandler::HandleNewRecoveredSig(const CRecoveredSig& recoveredSig) diff --git a/src/llmq/instantsend.cpp b/src/llmq/instantsend.cpp index 5197384bee..f428cbe0a6 100644 --- a/src/llmq/instantsend.cpp +++ b/src/llmq/instantsend.cpp @@ -1201,6 +1201,8 @@ void CInstantSendManager::RemoveNonLockedTx(const uint256& txid, bool retryChild retryChildrenCount++; } } + // don't try to lock it anymore + WITH_LOCK(cs_pendingRetry, pendingRetryTxs.erase(txid)); if (info.tx) { for (const auto& in : info.tx->vin) { diff --git a/src/llmq/signing.cpp b/src/llmq/signing.cpp index e9cc76e350..35dae42565 100644 --- a/src/llmq/signing.cpp +++ b/src/llmq/signing.cpp @@ -876,7 +876,9 @@ void CSigningManager::UnregisterRecoveredSigsListener(CRecoveredSigsListener* l) recoveredSigsListeners.erase(itRem, recoveredSigsListeners.end()); } -bool CSigningManager::AsyncSignIfMember(Consensus::LLMQType llmqType, CSigSharesManager& shareman, const uint256& id, const uint256& msgHash, const uint256& quorumHash, bool allowReSign) +bool CSigningManager::AsyncSignIfMember(Consensus::LLMQType llmqType, CSigSharesManager& shareman, const uint256& id, + const uint256& msgHash, const uint256& quorumHash, bool allowReSign, + bool allowDiffMsgHashSigning) { if (m_mn_activeman == nullptr) return false; if (m_mn_activeman->GetProTxHash().IsNull()) return false; @@ -911,9 +913,15 @@ bool CSigningManager::AsyncSignIfMember(Consensus::LLMQType llmqType, CSigShares uint256 prevMsgHash; db.GetVoteForId(llmqType, id, prevMsgHash); if (msgHash != prevMsgHash) { - LogPrintf("CSigningManager::%s -- already voted for id=%s and msgHash=%s. Not voting on conflicting msgHash=%s\n", __func__, - id.ToString(), prevMsgHash.ToString(), msgHash.ToString()); - return false; + if (allowDiffMsgHashSigning) { + LogPrintf("CSigningManager::%s -- already voted for id=%s and msgHash=%s. Signing for different msgHash=%s\n", + __func__, id.ToString(), prevMsgHash.ToString(), msgHash.ToString()); + hasVoted = false; + } else { + LogPrintf("CSigningManager::%s -- already voted for id=%s and msgHash=%s. Not voting on conflicting msgHash=%s\n", + __func__, id.ToString(), prevMsgHash.ToString(), msgHash.ToString()); + return false; + } } else if (allowReSign) { LogPrint(BCLog::LLMQ, "CSigningManager::%s -- already voted for id=%s and msgHash=%s. Resigning!\n", __func__, id.ToString(), prevMsgHash.ToString()); diff --git a/src/llmq/signing.h b/src/llmq/signing.h index 16d24ef5c0..ae2fd48224 100644 --- a/src/llmq/signing.h +++ b/src/llmq/signing.h @@ -218,7 +218,9 @@ public: void RegisterRecoveredSigsListener(CRecoveredSigsListener* l); void UnregisterRecoveredSigsListener(CRecoveredSigsListener* l); - bool AsyncSignIfMember(Consensus::LLMQType llmqType, CSigSharesManager& shareman, const uint256& id, const uint256& msgHash, const uint256& quorumHash = uint256(), bool allowReSign = false); + bool AsyncSignIfMember(Consensus::LLMQType llmqType, CSigSharesManager& shareman, const uint256& id, + const uint256& msgHash, const uint256& quorumHash = uint256(), bool allowReSign = false, + bool allowDiffMsgHashSigning = false); bool HasRecoveredSig(Consensus::LLMQType llmqType, const uint256& id, const uint256& msgHash) const; bool HasRecoveredSigForId(Consensus::LLMQType llmqType, const uint256& id) const; bool HasRecoveredSigForSession(const uint256& signHash) const; diff --git a/src/test/block_reward_reallocation_tests.cpp b/src/test/block_reward_reallocation_tests.cpp index e8dde8cfb2..df6693bbb0 100644 --- a/src/test/block_reward_reallocation_tests.cpp +++ b/src/test/block_reward_reallocation_tests.cpp @@ -184,7 +184,7 @@ BOOST_FIXTURE_TEST_CASE(block_reward_reallocation, TestChainBRRBeforeActivationS // Creating blocks by different ways const auto pblocktemplate = BlockAssembler(m_node.chainman->ActiveChainstate(), m_node, *m_node.mempool, Params()).CreateNewBlock(coinbasePubKey); } - for ([[maybe_unused]] auto _ : irange::range(1999)) { + for ([[maybe_unused]] auto _ : irange::range(499)) { CreateAndProcessBlock({}, coinbaseKey); LOCK(cs_main); dmnman.UpdatedBlockTip(m_node.chainman->ActiveChain().Tip()); @@ -227,9 +227,9 @@ BOOST_FIXTURE_TEST_CASE(block_reward_reallocation, TestChainBRRBeforeActivationS const CAmount block_subsidy = GetBlockSubsidyInner(tip->nBits, tip->nHeight, consensus_params, isV20Active); const CAmount masternode_payment = GetMasternodePayment(tip->nHeight, block_subsidy, isV20Active); const auto pblocktemplate = BlockAssembler(m_node.chainman->ActiveChainstate(), m_node, *m_node.mempool, Params()).CreateNewBlock(coinbasePubKey); - BOOST_CHECK_EQUAL(pblocktemplate->block.vtx[0]->GetValueOut(), 122209530); + BOOST_CHECK_EQUAL(pblocktemplate->block.vtx[0]->GetValueOut(), 28847249686); BOOST_CHECK_EQUAL(pblocktemplate->voutMasternodePayments[0].nValue, masternode_payment); - BOOST_CHECK_EQUAL(pblocktemplate->voutMasternodePayments[0].nValue, 61104762); // 0.4999999755 + BOOST_CHECK_EQUAL(pblocktemplate->voutMasternodePayments[0].nValue, 14423624841); // 0.4999999999 } // Reallocation should kick-in with the superblock mined at height = 2010, @@ -258,15 +258,15 @@ BOOST_FIXTURE_TEST_CASE(block_reward_reallocation, TestChainBRRBeforeActivationS const CAmount block_subsidy = GetBlockSubsidyInner(tip->nBits, tip->nHeight, consensus_params, isV20Active); const CAmount block_subsidy_sb = GetSuperblockSubsidyInner(tip->nBits, tip->nHeight, consensus_params, isV20Active); CAmount block_subsidy_potential = block_subsidy + block_subsidy_sb; - BOOST_CHECK_EQUAL(block_subsidy_potential, 84437941); + BOOST_CHECK_EQUAL(block_subsidy_potential, 177167660); CAmount expected_block_reward = block_subsidy_potential - block_subsidy_potential / 5; const CAmount masternode_payment = GetMasternodePayment(tip->nHeight, block_subsidy, isV20Active); const auto pblocktemplate = BlockAssembler(m_node.chainman->ActiveChainstate(), m_node, *m_node.mempool, Params()).CreateNewBlock(coinbasePubKey); BOOST_CHECK_EQUAL(pblocktemplate->block.vtx[0]->GetValueOut(), expected_block_reward); - BOOST_CHECK_EQUAL(pblocktemplate->block.vtx[0]->GetValueOut(), 67550353); + BOOST_CHECK_EQUAL(pblocktemplate->block.vtx[0]->GetValueOut(), 141734128); BOOST_CHECK_EQUAL(pblocktemplate->voutMasternodePayments[0].nValue, masternode_payment); - BOOST_CHECK_EQUAL(pblocktemplate->voutMasternodePayments[0].nValue, 50662764); // 0.75 + BOOST_CHECK_EQUAL(pblocktemplate->voutMasternodePayments[0].nValue, 106300596); // 0.75 } BOOST_CHECK(!DeploymentActiveAfter(m_node.chainman->ActiveChain().Tip(), consensus_params, Consensus::DEPLOYMENT_MN_RR)); @@ -313,8 +313,8 @@ BOOST_FIXTURE_TEST_CASE(block_reward_reallocation, TestChainBRRBeforeActivationS const auto pblocktemplate = BlockAssembler(m_node.chainman->ActiveChainstate(), m_node, *m_node.mempool, Params()).CreateNewBlock(coinbasePubKey); CAmount block_subsidy_potential = block_subsidy + block_subsidy_sb; - BOOST_CHECK_EQUAL(tip->nHeight, 3858); - BOOST_CHECK_EQUAL(block_subsidy_potential, 78406660); + BOOST_CHECK_EQUAL(tip->nHeight, 2358); + BOOST_CHECK_EQUAL(block_subsidy_potential, 164512828); // Treasury is 20% since MNRewardReallocation CAmount expected_block_reward = block_subsidy_potential - block_subsidy_potential / 5; // Since MNRewardReallocation, MN reward share is 75% of the block reward diff --git a/src/version.h b/src/version.h index c170066495..38703b148a 100644 --- a/src/version.h +++ b/src/version.h @@ -11,7 +11,7 @@ */ -static const int PROTOCOL_VERSION = 70232; +static const int PROTOCOL_VERSION = 70233; //! initial proto version, to be increased after version/verack negotiation static const int INIT_PROTO_VERSION = 209; @@ -20,7 +20,7 @@ static const int INIT_PROTO_VERSION = 209; static const int MIN_PEER_PROTO_VERSION = 70215; //! minimum proto version of masternode to accept in DKGs -static const int MIN_MASTERNODE_PROTO_VERSION = 70232; +static const int MIN_MASTERNODE_PROTO_VERSION = 70233; //! protocol version is included in MNAUTH starting with this version static const int MNAUTH_NODE_VER_VERSION = 70218; diff --git a/test/functional/rpc_blockchain.py b/test/functional/rpc_blockchain.py index 8318ee0d6d..9c4eab3a37 100755 --- a/test/functional/rpc_blockchain.py +++ b/test/functional/rpc_blockchain.py @@ -152,7 +152,7 @@ class BlockchainTest(BitcoinTestFramework): 'dip0008': { 'type': 'buried', 'active': False, 'height': 432}, 'dip0020': { 'type': 'buried', 'active': False, 'height': 300}, 'dip0024': { 'type': 'buried', 'active': False, 'height': 900}, - 'realloc': { 'type': 'buried', 'active': False, 'height': 2500}, + 'realloc': { 'type': 'buried', 'active': False, 'height': 1000}, 'v19': { 'type': 'buried', 'active': False, 'height': 900}, 'v20': { 'type': 'bip9',