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 - running out of nonces under load #224

Merged
merged 10 commits into from
Nov 22, 2023
Merged

Conversation

agouin
Copy link
Member

@agouin agouin commented Nov 18, 2023

Account for continued nonce consumption in target

Sort by expiration when getting next nonce for signing so that soonest expiring nonces are consumed first.

Also fixed a bug with the same UUID being used for multiple sign operations (and failing for all after first) due to not locking for entire get>delete operation

@agouin agouin marked this pull request as ready for review November 19, 2023 19:38
@agouin agouin requested a review from misko9 November 19, 2023 19:39
Copy link
Contributor

@misko9 misko9 left a comment

Choose a reason for hiding this comment

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

Logic looks good, just some comments to address.

signer/cosigner_nonce_cache_test.go Outdated Show resolved Hide resolved
signer/cosigner_nonce_cache.go Show resolved Hide resolved
signer/cosigner_nonce_cache.go Outdated Show resolved Hide resolved
signer/cosigner_nonce_cache.go Outdated Show resolved Hide resolved
@misko9 misko9 self-requested a review November 21, 2023 15:58
@agouin agouin merged commit 976815f into main Nov 22, 2023
13 checks passed
@agouin agouin deleted the andrew/nonces_by_expiration branch November 22, 2023 01:56
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