alpenlabs / strata

Rust implementation of the Strata protocol
https://docs.stratabtc.org
Apache License 2.0
23 stars 1 forks source link

writer: Add retries with exponential backoff when signing fails #452

Closed bewakes closed 1 week ago

bewakes commented 1 week ago

Description

This PR adds an exponential backoff based retry when creating/signing of blob inscriptions fails. Currently, the task would fail whenever the inscription failed. Now it fails only if max retries exceeds.

Type of Change

Checklist

Related Issues

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 8.00000% with 23 lines in your changes missing coverage. Please review.

Project coverage is 56.89%. Comparing base (a14d926) to head (920fd47). Report is 31 commits behind head on releases/0.1.0.

Files with missing lines Patch % Lines
crates/btcio/src/writer/task.rs 0.00% 23 Missing :warning:
@@                Coverage Diff                 @@
##           releases/0.1.0     #452      +/-   ##
==================================================
- Coverage           57.16%   56.89%   -0.28%     
==================================================
  Files                 256      263       +7     
  Lines               27048    28014     +966     
==================================================
+ Hits                15462    15938     +476     
- Misses              11586    12076     +490     
Files with missing lines Coverage Δ
crates/btcio/src/writer/builder.rs 98.06% <ø> (-0.01%) :arrow_down:
crates/btcio/src/writer/signer.rs 96.66% <100.00%> (+1.28%) :arrow_up:
crates/btcio/src/writer/task.rs 30.85% <0.00%> (-2.75%) :arrow_down:

... and 28 files with indirect coverage changes