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(drive-abci)!: masternode identities unique keys #1459

Merged
merged 5 commits into from
Oct 9, 2023

Conversation

QuantumExplorer
Copy link
Member

@QuantumExplorer QuantumExplorer commented Oct 7, 2023

Issue being fixed or feature implemented

Masternode operator keys were being added to the unique tree lookup. If a masternode would go offline and then come back online then the key would be re-inserted as unique and the system would break.

What was done?

Masternode operator keys are no longer considered unique in the system. Also if a unique operator key was already taken by an identity it can still be used by a masternode as to prevent users from breaking Platform.

How Has This Been Tested?

Ran tests.

Breaking Changes

This is a breaking chance as masternode operator keys are no longer added to the unique tree lookup.

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

@QuantumExplorer QuantumExplorer changed the title fix: masternode identities unique keys fix (drive-abci)!: masternode identities unique keys Oct 9, 2023
@QuantumExplorer QuantumExplorer changed the title fix (drive-abci)!: masternode identities unique keys fix(drive-abci)!: masternode identities unique keys Oct 9, 2023
@QuantumExplorer QuantumExplorer changed the base branch from v0.25-dev to v1.0-dev October 9, 2023 08:52
@shumkov shumkov added this to the v1.0.0 milestone Oct 9, 2023
@QuantumExplorer QuantumExplorer marked this pull request as ready for review October 9, 2023 11:35
shumkov
shumkov previously approved these changes Oct 9, 2023
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.

Good catch! We probably could make it a little bit better by moving masternode-specific logic outside of the generic add_new_idenity method using a separate Drive operation or perform the re-enable logic (if the tree already exists) in the masternode identities module before we actually add a new identity.

@QuantumExplorer QuantumExplorer merged commit 8e08630 into v1.0-dev Oct 9, 2023
19 checks passed
@QuantumExplorer QuantumExplorer deleted the fix/masternodeIdentitiesUniqueKeys branch October 9, 2023 14:15
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.

2 participants