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: refuse to create new clsig if we switched to a different fork while we were signing #6502

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

UdjinM6
Copy link

@UdjinM6 UdjinM6 commented Dec 20, 2024

Issue being fixed or feature implemented

Signing is async so it's possible that our clsig is no longer relevant

What was done?

How Has This Been Tested?

Breaking Changes

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
  • I have assigned this pull request to a milestone (for repository code-owners and collaborators only)

@UdjinM6 UdjinM6 force-pushed the no_clsig_tip_changes branch from d141f1f to 9b6e7c2 Compare December 20, 2024 22:01
@UdjinM6 UdjinM6 changed the title fix: refuse to create new clsig if chain tip has changed while we were signing fix: refuse to create new clsig if we switched to a different fork while we were signing Dec 20, 2024
@UdjinM6 UdjinM6 force-pushed the no_clsig_tip_changes branch from 9b6e7c2 to 0fc0bec Compare December 20, 2024 22:35
@UdjinM6 UdjinM6 added this to the 22.1 milestone Dec 20, 2024
@@ -519,7 +519,11 @@ MessageProcessingResult CChainLocksHandler::HandleNewRecoveredSig(const llmq::CR
// already got the same or a better CLSIG through the CLSIG message
return {};
}

const auto pindex = m_chainstate.m_chain.Tip()->GetAncestor(lastSignedHeight);
Copy link
Collaborator

Choose a reason for hiding this comment

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

if we will have a new chainlock we need to switch chain here to the new one, because it is a new chain-locked tip and current tip should be refused, isn't it true?

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