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: make sbtc funding on devnet more robust #1702

Merged
merged 5 commits into from
Feb 28, 2025

Conversation

hugocaillard
Copy link
Collaborator

Description

The previous logic was picking an arbitrary bitcoin block as an argument to pass to the mint call.
It was very likely that whatever this height was, it was skipped (because a lot of bitcoin blocks are skipped around epoch 3.0 switch).
The PR just takes the latest bitcoin block, instead of an arbitrary one

@hugocaillard hugocaillard enabled auto-merge (squash) February 28, 2025 15:05
Copy link

codecov bot commented Feb 28, 2025

Codecov Report

Attention: Patch coverage is 82.60870% with 8 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...omponents/stacks-network/src/chains_coordinator.rs 81.08% 7 Missing ⚠️
components/stacks-rpc-client/src/rpc_client.rs 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@@ -817,14 +815,23 @@ fn fund_genesis_account(

let _ = hiro_system_kit::thread_named("sBTC funding handler").spawn(move || {
while !boot_completed_moved.load(Ordering::SeqCst) {
std::thread::sleep(std::time::Duration::from_secs(1));
std::thread::sleep(std::time::Duration::from_secs(3));
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is probably not bullet prof, but I found 3 seconds to work reliably

tippenein
tippenein previously approved these changes Feb 28, 2025
Copy link
Collaborator

@tippenein tippenein left a comment

Choose a reason for hiding this comment

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

lgtm

@hugocaillard hugocaillard merged commit 675119a into main Feb 28, 2025
20 of 23 checks passed
@hugocaillard hugocaillard deleted the fix/sbtc-devnet-more-robust branch February 28, 2025 17:34
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