-
Notifications
You must be signed in to change notification settings - Fork 312
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
wallet_esplora_async
returns error 429 while scanning
#1120
Comments
Last month, Aug 2023, I was playing with BDK alpha-1 and I had this problem with blockstream, see realeinherjar/sweepr#11. A safe solution is to add a 250ms delay between as suggested in Blockstream/esplora#449. Additionally, a candidate solution for the You can use |
Why do we panic? I'd expect it to return an error. @realeinherjar I guess this solution won't work for the blocking client which can also trigger this. How long does it take after getting But in conclusion I think we should just slow down on |
I don't like to hardcode wait time, if I have a personal Esplora server that I can DoS with API calls I should be able to do so. Hence, we should expose the API with an extra argument Here's where it happens in bdk/crates/esplora/src/blocking_ext.rs Lines 213 to 239 in 59fc1b3
and bdk/crates/esplora/src/async_ext.rs Lines 225 to 249 in 59fc1b3
|
The specs for |
Im seeing a 429 as well using the swift-bdk library.
I assume this is the same issue as above? Im simply doing this:
|
Yes, especially when using blockstream.... |
Will bitcoindevkit/rust-esplora-client#58 make it easier to handle these in a more graceful way or do we need full parsing of the returned messages as proposed in bitcoindevkit/rust-esplora-client#47? |
I plan to work on this as well.
|
No Error: HttpResponse { status: 429, message: "Test", headers: ["server", "date", "content-type", "content-length", "access-control-allow-origin", "via", "alt-svc"] } Ignore the |
Yep, this is preventing me from launching on mainnet, let me know how I can assist :) |
One thing that I was struggling was to get the time to retry-after in the 429 response. |
Have we tried just reducing the number of parallel requests on |
wallet_esplora_async
returns an error while scanningwallet_esplora_async
returns error 429 while scanning
I tested reducing concurrency to 1 thread a few months ago and still got the 429. Thinking an exponential backoff might be better? |
FYI LWK is just waiting |
fixed by bitcoindevkit/rust-esplora-client#98 |
Still need to publish 0.10.0 version of |
Describe the bug
Running
wallet_esplora_async
we panic due toblockstream.info
replying with error code 429 to us (too many requests)To Reproduce
cargo run
inbdk/example-crates/wallet_esplora_async
produces the following:Build environment
The text was updated successfully, but these errors were encountered: