From eae0cbacb72c3db369069a22f345bb4c89d945d2 Mon Sep 17 00:00:00 2001 From: Odysseas Gabrielides Date: Wed, 1 Mar 2023 19:42:33 +0200 Subject: [PATCH 1/4] feat(llmq): llmq_25_67 for Platform (Testnet only) (#5225) ## Issue being fixed or feature implemented ## What was done? - Added new LLMQ type `llmq_25_67` - The above LLMQ is added only for Testnet and it is activated with v19 fork. ## How Has This Been Tested? ## Breaking Changes ## Checklist: - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation **For repository code-owners and collaborators only** - [x] I have assigned this pull request to a milestone --------- Co-authored-by: pasta --- doc/release-notes-5225.md | 10 ++++++++++ src/chainparams.cpp | 3 ++- src/llmq/params.h | 30 +++++++++++++++++++++++++++++- src/llmq/utils.cpp | 7 +++++++ 4 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 doc/release-notes-5225.md diff --git a/doc/release-notes-5225.md b/doc/release-notes-5225.md new file mode 100644 index 0000000000..9a85026015 --- /dev/null +++ b/doc/release-notes-5225.md @@ -0,0 +1,10 @@ +Testnet Breaking Changes +------------------------ + +A new testnet only LLMQ has been added. This LLMQ is of the type LLMQ_25_67; this LLMQ is only active on testnet. +This LLMQ will not remove the LLMQ_100_67 from testnet; however that quorum (likely) will not form and will perform no role. +See the [diff](https://github.com/dashpay/dash/pull/5225/files#diff-e70a38a3e8c2a63ca0494627301a5c7042141ad301193f78338d97cb1b300ff9R451-R469) for specific parameters of the LLMQ. + +This LLMQ will become active at the height of 847000. **This will be a breaking change and a hard fork for testnet** +This LLMQ is not activated with the v19 hardfork; as such testnet will experience two hardforks. One at height 847000, +and the other to be determined by the BIP9 hard fork process. diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 9e8bc8cbd4..c69a21062d 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -542,10 +542,11 @@ public: AddLLMQ(Consensus::LLMQType::LLMQ_400_60); AddLLMQ(Consensus::LLMQType::LLMQ_400_85); AddLLMQ(Consensus::LLMQType::LLMQ_100_67); + AddLLMQ(Consensus::LLMQType::LLMQ_25_67); consensus.llmqTypeChainLocks = Consensus::LLMQType::LLMQ_50_60; consensus.llmqTypeInstantSend = Consensus::LLMQType::LLMQ_50_60; consensus.llmqTypeDIP0024InstantSend = Consensus::LLMQType::LLMQ_60_75; - consensus.llmqTypePlatform = Consensus::LLMQType::LLMQ_100_67; + consensus.llmqTypePlatform = Consensus::LLMQType::LLMQ_25_67; consensus.llmqTypeMnhf = Consensus::LLMQType::LLMQ_50_60; fDefaultConsistencyChecks = false; diff --git a/src/llmq/params.h b/src/llmq/params.h index e9aed66daf..248c355310 100644 --- a/src/llmq/params.h +++ b/src/llmq/params.h @@ -19,6 +19,7 @@ enum class LLMQType : uint8_t { LLMQ_400_85 = 3, // 400 members, 340 (85%) threshold, one every 24 hours LLMQ_100_67 = 4, // 100 members, 67 (67%) threshold, one per hour LLMQ_60_75 = 5, // 60 members, 45 (75%) threshold, one every 12 hours + LLMQ_25_67 = 6, // 25 members, 67 (67%) threshold, one per hour // for testing only LLMQ_TEST = 100, // 3 members, 2 (66%) threshold, one per hour. Params might differ when -llmqtestparams is used @@ -108,7 +109,7 @@ struct LLMQParams { }; -static constexpr std::array available_llmqs = { +static constexpr std::array available_llmqs = { /** * llmq_test @@ -440,6 +441,33 @@ static constexpr std::array available_llmqs = { .recoveryMembers = 50, }, + /** + * llmq_25_67 + * This quorum is deployed on Testnet and requires + * 25 participants + * + * Used by Dash Platform + */ + LLMQParams{ + .type = LLMQType::LLMQ_25_67, + .name = "llmq_25_67", + .useRotation = false, + .size = 25, + .minSize = 22, + .threshold = 17, + + .dkgInterval = 24, // one DKG per hour + .dkgPhaseBlocks = 2, + .dkgMiningWindowStart = 10, // dkgPhaseBlocks * 5 = after finalization + .dkgMiningWindowEnd = 18, + .dkgBadVotesThreshold = 22, + + .signingActiveQuorumCount = 24, // a full day worth of LLMQs + + .keepOldConnections = 25, + .recoveryMembers = 12, + }, + }; // available_llmqs } // namespace Consensus diff --git a/src/llmq/utils.cpp b/src/llmq/utils.cpp index 552d2abb70..5e5c6417c2 100644 --- a/src/llmq/utils.cpp +++ b/src/llmq/utils.cpp @@ -24,6 +24,8 @@ #include +static constexpr int TESTNET_LLMQ_25_67_ACTIVATION_HEIGHT = 847000; + namespace llmq { @@ -954,6 +956,11 @@ bool IsQuorumTypeEnabledInternal(Consensus::LLMQType llmqType, const CQuorumMana } break; } + case Consensus::LLMQType::LLMQ_25_67: + if (pindex->nHeight < TESTNET_LLMQ_25_67_ACTIVATION_HEIGHT) { + return false; + } + break; default: throw std::runtime_error(strprintf("%s: Unknown LLMQ type %d", __func__, ToUnderlying(llmqType))); } From 0bcf96311ffcced50ded37dc9a198e7b00c881ba Mon Sep 17 00:00:00 2001 From: Odysseas Gabrielides Date: Wed, 1 Mar 2023 21:07:54 +0200 Subject: [PATCH 2/4] feat(llmq): llmq_test_dip0024 adjustments (#5229) ## Issue being fixed or feature implemented ## What was done? ## How Has This Been Tested? ## Breaking Changes After the DIP24 fork, instant locks will still be served by `llmq_test_instantsend`, since no `llmq_test_dip0024` will be formed with less than 4 nodes. ## Checklist: - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation **For repository code-owners and collaborators only** - [x] I have assigned this pull request to a milestone --- src/llmq/params.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/llmq/params.h b/src/llmq/params.h index 248c355310..2f0ac1f8eb 100644 --- a/src/llmq/params.h +++ b/src/llmq/params.h @@ -196,7 +196,7 @@ static constexpr std::array available_llmqs = { .name = "llmq_test_dip0024", .useRotation = true, .size = 4, - .minSize = 3, + .minSize = 4, .threshold = 2, .dkgInterval = 24, // DKG cycle From f63676ba5f8347a04514f7c96bd5274160138720 Mon Sep 17 00:00:00 2001 From: pasta Date: Wed, 1 Mar 2023 11:48:25 -0600 Subject: [PATCH 3/4] chore: bump version to rc.4 --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index e605170270..b8e46e702c 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ([2.69]) define(_CLIENT_VERSION_MAJOR, 19) define(_CLIENT_VERSION_MINOR, 0) define(_CLIENT_VERSION_BUILD, 0) -define(_CLIENT_VERSION_RC, 3) +define(_CLIENT_VERSION_RC, 4) define(_CLIENT_VERSION_IS_RELEASE, false) define(_COPYRIGHT_YEAR, 2023) define(_COPYRIGHT_HOLDERS,[The %s developers]) From 45da082dda0625dc8f8777c0d6690939d5eb5244 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Wed, 1 Mar 2023 22:51:36 +0300 Subject: [PATCH 4/4] fix(doc): fix `release-notes-5225.md` (#5230) ## Issue being fixed or feature implemented make linter happy, fix failures like https://gitlab.com/dashpay/dash/-/jobs/3858504407 ## What was done? drop trailing whitespace ## How Has This Been Tested? `COMMIT_RANGE=1a810ca07d..HEAD ./test/lint/lint-whitespace.sh ` fails on develop, passes on this branch ## Breaking Changes n/a ## Checklist: - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation **For repository code-owners and collaborators only** - [x] I have assigned this pull request to a milestone --- doc/release-notes-5225.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/release-notes-5225.md b/doc/release-notes-5225.md index 9a85026015..e6cdc29679 100644 --- a/doc/release-notes-5225.md +++ b/doc/release-notes-5225.md @@ -1,7 +1,7 @@ Testnet Breaking Changes ------------------------ -A new testnet only LLMQ has been added. This LLMQ is of the type LLMQ_25_67; this LLMQ is only active on testnet. +A new testnet only LLMQ has been added. This LLMQ is of the type LLMQ_25_67; this LLMQ is only active on testnet. This LLMQ will not remove the LLMQ_100_67 from testnet; however that quorum (likely) will not form and will perform no role. See the [diff](https://github.com/dashpay/dash/pull/5225/files#diff-e70a38a3e8c2a63ca0494627301a5c7042141ad301193f78338d97cb1b300ff9R451-R469) for specific parameters of the LLMQ.