Skip to content

fix: prevent started process starting again#160

Merged
mpetrunic merged 4 commits intomainfrom
fix/prevent-double-process
Mar 3, 2026
Merged

fix: prevent started process starting again#160
mpetrunic merged 4 commits intomainfrom
fix/prevent-double-process

Conversation

@mpetrun5
Copy link
Collaborator

@mpetrun5 mpetrun5 commented Mar 3, 2026

Description

Related Issue Or Context

Closes: #

How Has This Been Tested? Testing details.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation

Checklist:

  • I have commented my code, particularly in hard-to-understand areas.
  • I have ensured that all acceptance criteria (or expected behavior) from issue are met
  • I have updated the documentation locally and in docs.
  • I have added tests to cover my changes.
  • I have ensured that all the checks are passing and green, I've signed the CLA bot

@github-actions
Copy link

github-actions bot commented Mar 3, 2026

Go Test coverage is 53.7 %\ ✨ ✨ ✨

MakMuftic
MakMuftic previously approved these changes Mar 3, 2026
@github-actions
Copy link

github-actions bot commented Mar 3, 2026

Go Test coverage is 53.7 %\ ✨ ✨ ✨

mpetrunic
mpetrunic previously approved these changes Mar 3, 2026
MakMuftic
MakMuftic previously approved these changes Mar 3, 2026
Copy link

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 aims to prevent ECDSA TSS processes (keygen/resharing/signing) from being started multiple times, and centralizes the coordinator’s goroutine startup logic.

Changes:

  • Added Started + mutex gating to Run() in keygen/resharing/signing, with a shared ErrProcessStarted.
  • Refactored coordinator process-start goroutine into Coordinator.startProcess.
  • Changed default signing timeout (from 30s to 8s).

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tss/ecdsa/common/base.go Adds shared ErrProcessStarted and Started/mutex fields to the common base struct.
tss/ecdsa/keygen/keygen.go Adds “already started” guard to prevent duplicate Run() execution.
tss/ecdsa/resharing/resharing.go Adds “already started” guard to prevent duplicate Run() execution.
tss/ecdsa/signing/signing.go Adds “already started” guard and changes signing timeout default.
tss/coordinator.go Uses a helper to start processes and attempts to ignore ErrProcessStarted.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mpetrun5 mpetrun5 dismissed stale reviews from MakMuftic and mpetrunic via f215f93 March 3, 2026 11:47
@github-actions
Copy link

github-actions bot commented Mar 3, 2026

Go Test coverage is 53.7 %\ ✨ ✨ ✨

@github-actions
Copy link

github-actions bot commented Mar 3, 2026

Go Test coverage is 53.7 %\ ✨ ✨ ✨

@mpetrun5 mpetrun5 requested a review from mpetrunic March 3, 2026 11:52
@mpetrunic mpetrunic merged commit 501f20a into main Mar 3, 2026
7 checks passed
@mpetrunic mpetrunic deleted the fix/prevent-double-process branch March 3, 2026 11:55
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.

4 participants