Skip to content

fix: avoid duplicate keysign for outTx already pending#1518

Merged
lumtis merged 8 commits intodevelopfrom
avoid-duplicate-keysign-same-outtx
Jan 4, 2024
Merged

fix: avoid duplicate keysign for outTx already pending#1518
lumtis merged 8 commits intodevelopfrom
avoid-duplicate-keysign-same-outtx

Conversation

@ws4charlie
Copy link
Contributor

Description

We should skip unnecessary keysign if the tx being signed is already pending.

Closes: 1478

Type of change

  • 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 not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Include instructions and any relevant details so others can reproduce.

  • Tested CCTX in localnet
  • Tested in development environment
  • Go unit tests
  • Go integration tests
  • Tested via GitHub Actions

Checklist:

  • I have added unit tests that prove my fix feature works

@github-actions
Copy link

github-actions bot commented Jan 3, 2024

!!!WARNING!!!
nosec detected in the following files: zetaclient/zetacore_observer.go

Be very careful about using #nosec in code. It can be a quick way to suppress security warnings and move forward with development, it should be employed with caution. Suppressing warnings with #nosec can hide potentially serious vulnerabilities. Only use #nosec when you're absolutely certain that the security issue is either a false positive or has been mitigated in another way.

Only suppress a single rule (or a specific set of rules) within a section of code, while continuing to scan for other problems. To do this, you can list the rule(s) to be suppressed within the #nosec annotation, e.g: /* #nosec G401 */ or //#nosec G201 G202 G203
Broad #nosec annotations should be avoided, as they can hide other vulnerabilities. The CI will block you from merging this PR until you remove #nosec annotations that do not target specific rules.

Pay extra attention to the way #nosec is being used in the files listed above.

@github-actions github-actions bot added the nosec label Jan 3, 2024
@ws4charlie ws4charlie changed the title fix: avoid duplicate keysign for pending outTx fix: avoid duplicate keysign for outTx already pending Jan 3, 2024
Copy link
Contributor

@lumtis lumtis left a comment

Choose a reason for hiding this comment

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

The logic looks ok, left few comments

@lumtis lumtis merged commit 61935a3 into develop Jan 4, 2024
@lumtis lumtis deleted the avoid-duplicate-keysign-same-outtx branch January 4, 2024 15:23
This was referenced Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Should avoid unnecessary keysign for a same outtx nonce if the corresponding tx is already broadcasted and pending in external chain

3 participants