Skip to content

Fix error message when signing with duplicate tx_id (Issue #60)#63

Merged
anhthii merged 2 commits intofystack:masterfrom
Azzurriii:master
Jul 30, 2025
Merged

Fix error message when signing with duplicate tx_id (Issue #60)#63
anhthii merged 2 commits intofystack:masterfrom
Azzurriii:master

Conversation

@Azzurriii
Copy link
Contributor

Enhance error handling and improve the detection of duplicate signing requests in the event processing system regarding the Issue #60 . Include adding a new error code for duplicate sessions and updating the logic to handle duplicate signing requests.

  • pkg/event/types.go: Added a new case in the GetErrorCodeFromError function to return ErrorCodeSessionDuplicate when the error string contains "duplicate". This improves the granularity of error categorization.

  • pkg/eventconsumer/event_consumer.go: Enhanced the consumeTxSigningEvent function to handle duplicate signing requests. If a duplicate session is detected, an error message is logged, and the signing session error is handled explicitly using the handleSigningSessionError method. This ensures better tracking and management of duplicate requests.

Testing

Sent duplicate signing requests with the same tx_id.
Verified that the mpcium logs the duplicate and the client receives the error event in onSignResult
image
image

@anhthii
Copy link
Contributor

anhthii commented Jul 30, 2025

@Azzurriii Thanks for the PR

image In the error reason, I noticed "Duplicate signing request detected" two times

@Azzurriii
Copy link
Contributor Author

Hey @anhthii, in those two instances of 'Duplicate signing request detected', one is an error message and the other is part of the context. You can see that in the log of mpcium
image

@anhthii
Copy link
Contributor

anhthii commented Jul 30, 2025

thanks @Azzurriii , LGTM.

@anhthii anhthii merged commit a5dd337 into fystack:master Jul 30, 2025
19 checks passed
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

Comments