Repository navigation
feat: override LLMQ params - #310
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces an option to override default LLMQ parameters by adding an optional llmqParamsOverride argument across various classes. Key changes include:
- Adding llmqParamsOverride to payload parsing in CommitmentTxPayload.
- Propagating llmqParamsOverride in SimplifiedMNListDiff and SimplifiedMNList helper functions.
- Modifying QuorumEntry and constants to support quorum parameter overrides.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| lib/transaction/payload/commitmenttxpayload.js | Updated fromBuffer to accept and pass llmqParamsOverride to QuorumEntry.getParams. |
| lib/deterministicmnlist/SimplifiedMNListDiff.js | Added llmqParamsOverride parameter to constructors and parsing functions (fromBuffer, fromObject, fromHexString, fromJSON). |
| lib/deterministicmnlist/SimplifiedMNList.js | Propagated llmqParamsOverride through the constructor and related methods. |
| lib/deterministicmnlist/QuorumEntry.js | Revised constructor and helper methods to handle llmqParamsOverride and merged parameters using _.merge. |
| lib/constants/index.js | Defined LLMQ_TYPE_PARAMS to centralize default quorum parameters. |
Comments suppressed due to low confidence (1)
lib/deterministicmnlist/QuorumEntry.js:75
- The check 'if (arg instanceof QuorumEntry)' is repeated in the constructor. Removing the duplicate check can simplify the logic and improve clarity.
if (arg instanceof QuorumEntry) {
QuantumExplorer
previously approved these changes
Apr 16, 2025
PastaPastaPasta
added a commit
that referenced
this pull request
Oct 28, 2026
* fix: allow 32 active LLMQ_60_75 quorums again The LLMQ params table added in #310 set maximumActiveQuorumsCount for LLMQ_60_75 to 24. Core keeps 32 of them active (signingActiveQuorumCount), as 0.22 did, and every current mainnet and testnet masternode list diff carries 32, so SimplifiedMNList rejected them since 0.25.0. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix: hash Core V24 ExtAddr masternode list entries Core V24 activates ProTx version 3 (ExtAddr). Its simplified masternode list entries serialize addresses as ExtNetInfo instead of a single service, and evonodes no longer serialize platformHTTPPort. dashcore-lib still hashed them in the legacy layout, so the merkle root over any list containing a v3 entry stopped matching the coinbase and SimplifiedMNList rejected every testnet diff after the fork. Serialize v3 entries from the `addresses` object Core reports, which for ExtNetInfo is the address map itself. Take `service` and `platformHTTPPort` from it when Core omits the deprecated fields. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix: allow SML entry input without service ExtAddr entries may omit the deprecated `service` field; fromObject derives it from `addresses`. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix: take SML entry endpoint fields from the hashed addresses ExtAddr entries hash `addresses`, not `service` or `platformHTTPPort`, so a reported value that disagrees with `addresses` would pass the merkle root check and redirect getIp(). Always derive both from `addresses` for them. Legacy entries hash those fields, so keep the reported values and only fill them in from `addresses` when Core omits them. A revoked legacy evonode keeps its port but reports no addresses, so it is still rejected without the deprecated field. Copy `addresses` on input as toObject() does on output. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix: reject ExtNetInfo input Core would not accept Enforce Core's limit of four entries per purpose (MAX_ENTRIES_EXTNETINFO), and reject base32 Tor and I2P hosts with non-zero leftover bits. Without that check, two I2P strings decode to the same hashed bytes. Also type the version, type and evonode fields SMLEntry input may carry. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix: strip brackets from IPv6 addresses in getIp() ExtAddr entries may have an IPv6 core_p2p address, which Core prints as "[addr]:port". Splitting it on the first colon returned "[2001". Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue being fixed or feature implemented
We use custom quorum params for the local network in order to use only one masternode instead of 3
What was done?
How Has This Been Tested?
As a part of test suite
Breaking Changes
None
Checklist: