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 mempool space inf loop bug #1330

Merged
merged 2 commits into from
Oct 14, 2024
Merged

Fix mempool space inf loop bug #1330

merged 2 commits into from
Oct 14, 2024

Conversation

ercecan
Copy link
Member

@ercecan ercecan commented Oct 11, 2024

Fixes bug where if mempool space returns error causes inf loop in sequencer

Copy link

codecov bot commented Oct 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.4%. Comparing base (16dac23) to head (9fb4844).
Report is 2 commits behind head on nightly.

Additional details and impacted files
Files with missing lines Coverage Δ
crates/bitcoin-da/src/service.rs 51.2% <100.0%> (-0.2%) ⬇️

... and 2 files with indirect coverage changes

@yaziciahmet
Copy link
Contributor

On a second thought, maybe this is not the right approach to fix this issue. Technically, anything within that loop can fail, db file may be corrupted, or any other rpc call to Bitcoin might fail. And all of these errors within that loop would result in an infinite loop. I don't think the best solution is to try to ignore the error or trying to replace it with a default value. But rather have some sort of exponential backoff retry mechanism within the loop, and have great logging + monitoring + alert systems.

@eyusufatik
Copy link
Member

On a second thought, maybe this is not the right approach to fix this issue. Technically, anything within that loop can fail, db file may be corrupted, or any other rpc call to Bitcoin might fail. And all of these errors within that loop would result in an infinite loop. I don't think the best solution is to try to ignore the error or trying to replace it with a default value. But rather have some sort of exponential backoff retry mechanism within the loop, and have great logging + monitoring + alert systems.

That's correct.

For the fee stuff, it's already retried whenever it's used though.

And chances of estimatesmartfee failing is very low.

@ercecan ercecan merged commit e97ead6 into nightly Oct 14, 2024
14 checks passed
@ercecan ercecan deleted the fix-mempoolspace-fee-bug branch October 14, 2024 08:31
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.

3 participants