Skip to content
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

feat(dashmate): check for DKG before stopping node #1683

Merged
merged 27 commits into from May 14, 2024

Conversation

pshenmic
Copy link
Collaborator

@pshenmic pshenmic commented Jan 30, 2024

Issue being fixed or feature implemented

#1648

When node is participating in DKG exchange process, it is dangerous to restart the node, because it can result to the PoSe ban.
Recently, Dash Core v20.1 was released that include a quorum dkginfo RPC call, that shows if nodes is exchanging DKG or will in the upcoming blocks.

This PR adds a check for that before stopping node.

What was done?

  • Added a check for masternodes for a potential DKG exchange happen soon during dashmate stop command (reduce PoSE bans)
  • Implemented an --safe flag for dashmate stop command, that will wait until DKG window passes and flawlessly stops your node

How Has This Been Tested?

Locally with dashmate in testnet and local setups

Breaking Changes

No

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 added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

@pshenmic pshenmic added this to the v1.0.0 milestone Jan 30, 2024
@pshenmic pshenmic marked this pull request as draft January 30, 2024 19:43
@pshenmic pshenmic requested a review from shumkov March 14, 2024 15:28
@pshenmic pshenmic marked this pull request as ready for review May 5, 2024 10:03
@pshenmic pshenmic requested a review from shumkov May 8, 2024 04:16
Copy link
Member

@shumkov shumkov left a comment

Choose a reason for hiding this comment

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

👍

@pshenmic pshenmic merged commit e1a6191 into v1.0-dev May 14, 2024
21 checks passed
@pshenmic pshenmic deleted the feat/dashmate-dkg-check branch May 14, 2024 22:22
@qwizzie
Copy link

qwizzie commented May 15, 2024

Nice job.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants