Skip to content

feat: override LLMQ params #310

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Apr 16, 2025
Merged

feat: override LLMQ params #310

merged 7 commits into from
Apr 16, 2025

Conversation

shumkov
Copy link

@shumkov shumkov commented Apr 11, 2025

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?

  • Added an argument to SML classes to override LLMQ params

How Has This Been Tested?

As a part of test suite

Breaking Changes

None

Checklist:

  • 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

@shumkov shumkov self-assigned this Apr 11, 2025
@shumkov shumkov removed this from Platform team Apr 11, 2025
@shumkov shumkov moved this to In review / testing in Platform team Apr 11, 2025
@shumkov shumkov marked this pull request as ready for review April 11, 2025 17:03
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) {

@shumkov shumkov merged commit 876d0f6 into master Apr 16, 2025
2 checks passed
@github-project-automation github-project-automation bot moved this from In review / testing to Done in Platform team Apr 16, 2025
@shumkov shumkov deleted the feat/override-llmq-params branch April 16, 2025 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants