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

refactor: pass around block refs #1221

Merged
merged 10 commits into from
Feb 4, 2025
Merged

refactor: pass around block refs #1221

merged 10 commits into from
Feb 4, 2025

Conversation

djordon
Copy link
Collaborator

@djordon djordon commented Jan 15, 2025

Description

Changes

  • Change the signature of a few functions in the transaction_signer module to expect a BitcoinBlockRef.
  • Remove unnecessary db look-ups since we pass the block ref around now.

Testing Information

This is a refactor, so if tests pass then we should be good.

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

@djordon djordon self-assigned this Jan 15, 2025
Base automatically changed from 1152-load-aggregate-key-dependent-signer-state-machines to main January 16, 2025 02:59
@djordon djordon changed the base branch from main to 1152-load-aggregate-key-dependent-signer-state-machines January 16, 2025 02:59
@djordon djordon force-pushed the refactor-pass-block-refs branch from da4e9f3 to 3f87d31 Compare January 16, 2025 03:01
Base automatically changed from 1152-load-aggregate-key-dependent-signer-state-machines to main January 16, 2025 03:01
@djordon djordon requested review from matteojug, AshtonStephens, Jiloc, cylewitruk and MCJOHN974 and removed request for AshtonStephens January 21, 2025 14:24
Copy link
Member

@cylewitruk cylewitruk left a comment

Choose a reason for hiding this comment

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

You know, I was actually thinking about this when doing the info endpoint since I wanted something that returned both the canonical hash/height, but opted to keep it simple and do an extra call.

What I was thinking would that it would be best if methods took an AsRef<BitcoinBlockHash> that need a block hash and we implemented that for BitcoinBlockRef and get_canonical_bitcoin_chain_tip() returns one too.

Thoughts?

@djordon djordon marked this pull request as ready for review January 23, 2025 19:04
@djordon djordon added the sbtc signer binary The sBTC Bootstrap Signer. label Jan 23, 2025
with outdated chain tips
@djordon djordon merged commit 7aafe07 into main Feb 4, 2025
8 checks passed
@djordon djordon deleted the refactor-pass-block-refs branch February 4, 2025 19:32
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.

5 participants