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

Fix MN activation when the node received the mnb before initialize the MN. #2402

Merged
merged 1 commit into from
Jun 24, 2021

Conversation

furszy
Copy link

@furszy furszy commented May 26, 2021

If the node already has the MN stored and the activation process is triggered (via the startup flag or the RPC command), the node's activeMasternode will get stalled waiting until (1) the MN list gets cleaned/refreshed and someone else in the network sends the MN again or (2) until someone else enable the MN (which is not possible as this node is being enabled solely to send the ping to enable the MN..)

This is the reason why someone in the past added the activeMasternode::EnableHotColdMasterNode call inside the mnb message receive (which now is redundant), to force the activation as the MN enablement process was totally stalled.

@furszy furszy self-assigned this May 26, 2021
@furszy furszy added this to the 6.0.0 milestone May 26, 2021
@random-zebra
Copy link

Concept ACK.
Although the remote node should complete mnsync before checking, as it might have stale data at startup.

This is the reason why someone in the past added the activeMasternode::EnableHotColdMasterNode call inside the mnb message receive (which now is redundant), to force the activation as the MN enablement process was totally stalled.

I think there might be more to this.
For example, suppose that the controller sends a new mnb for the same masternode (same IP, same key) but referencing a different collateral utxo. This way the remote node can update its vin without having to be restarted.

…e MN.

If the node already has the MN stored and the activation process is triggered, the node's activeMasternode will be stalled waiting until (1) the MN list gets cleaned/refreshed and someone else in the network sends the MN again or (2) until someone else enables the MN (which is not possible as this node solely existence reason is sending the ping to enable the node..)
@furszy
Copy link
Author

furszy commented May 27, 2021

true, added a tier two sync status check before enable the MN in the init process. Once it's synced, the ManageStatus function will automatically enable it. And if it's already synced, like it usually happen with the on-demand MN init, it will start it right away.

Copy link

@random-zebra random-zebra left a comment

Choose a reason for hiding this comment

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

ACK 6a43186

@furszy furszy merged commit bf4fe3e into PIVX-Project:master Jun 24, 2021
Fuzzbawls added a commit that referenced this pull request Jun 27, 2021
…mnb before initialize the MN

f862e62 Fix MN activation when the node received the mnb before initialize the MN. (furszy)

Pull request description:

  Backports #2402 to the 5.2 branch for a subsequent minor version v5.2.1 / v5.2.0.1 release.

ACKs for top commit:
  random-zebra:
    utACK f862e62
  Fuzzbawls:
    utACK f862e62

Tree-SHA512: 899b39eaa9343aea6924d3249d894d7a1b06a24e997d791936e75e3ab15516fec94641e502af2824ccd63b41635a1af428aa34777b2f04643a34e209d0150034
@furszy furszy deleted the 2021_fix_MN_activation branch November 29, 2022 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants