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

Checkpoint backfill #272

Merged
merged 13 commits into from
Feb 7, 2024
Merged

Checkpoint backfill #272

merged 13 commits into from
Feb 7, 2024

Conversation

mappum
Copy link
Contributor

@mappum mappum commented Feb 5, 2024

This PR adds a method to CheckpointQueue which takes in an iterator of previous reserve redeem scripts, reconstructs the past signatory sets (with a possible loss of precision in voting power, which is OK because the same script will still be derived from it), then uses these signatory sets to insert past checkpoints into the queue.

Additionally, a binary is added to retrieve past reserve redeem scripts from the Bitcoin blockchain.

This change will allow for the recovery mechanism in #258 to be used even for deposits to signatory sets which have been pruned - the checkpoints/sigsets can now be repopulated in a migration during a network upgrade.

@mappum mappum force-pushed the checkpoint-backfill branch from 47eb997 to d46a6ff Compare February 5, 2024 21:12
@codecov-commenter
Copy link

codecov-commenter commented Feb 5, 2024

Codecov Report

Attention: 75 lines in your changes are missing coverage. Please review.

Comparison is base (c83a9e9) 34.41% compared to head (93f44ce) 37.39%.

Files Patch % Lines
src/bin/get-reserve-scripts.rs 0.00% 62 Missing ⚠️
src/bitcoin/signatory.rs 97.12% 9 Missing ⚠️
src/bitcoin/relayer.rs 0.00% 4 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #272      +/-   ##
===========================================
+ Coverage    34.41%   37.39%   +2.97%     
===========================================
  Files           25       26       +1     
  Lines         8809     9317     +508     
===========================================
+ Hits          3032     3484     +452     
- Misses        5777     5833      +56     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mappum mappum force-pushed the checkpoint-backfill branch 2 times, most recently from f7c2298 to 7563ac3 Compare February 6, 2024 23:25
@mappum mappum enabled auto-merge February 6, 2024 23:25
@mappum mappum force-pushed the checkpoint-backfill branch from 7563ac3 to f7c2298 Compare February 7, 2024 00:28
@mappum mappum force-pushed the checkpoint-backfill branch from f7c2298 to 93f44ce Compare February 7, 2024 00:52
@mappum mappum merged commit 49f959a into develop Feb 7, 2024
9 checks passed
@mappum mappum deleted the checkpoint-backfill branch February 7, 2024 00:59
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