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: always use 32-bit math for determining coordinator index #1029

Conversation

cylewitruk
Copy link
Member

Description

Closes: #985

Changes

Changes the coordinator_public_key() function of the coordinator to always use 32-bit math instead of usize (which can either be 32- or 64-bit) when determining the current coordinator's public key from bitcoin block hash.

Testing Information

All existing tests pass.

Checklist:

  • I have performed a self-review of my code
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@cylewitruk cylewitruk added the sbtc signer binary The sBTC Bootstrap Signer. label Dec 4, 2024
@cylewitruk cylewitruk added this to the sBTC Release Ready milestone Dec 4, 2024
@cylewitruk cylewitruk self-assigned this Dec 4, 2024
Copy link
Collaborator

@djordon djordon left a comment

Choose a reason for hiding this comment

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

Looks good ✅

@cylewitruk cylewitruk merged commit 672d465 into main Dec 6, 2024
4 checks passed
@cylewitruk cylewitruk deleted the 985-feature-partial-use-of-usize-can-cause-state-divergence-between-signers branch December 6, 2024 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sbtc signer binary The sBTC Bootstrap Signer.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Feature]: (Partial) Use of usize can cause state divergence between signers
3 participants