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

re-introduce sleep(0) calls when deriving keys #18225

Closed
wants to merge 2 commits into from

Conversation

arvidn
Copy link
Contributor

@arvidn arvidn commented Jun 21, 2024

(and computing puzzle hashes) in wallet_state_manager

Purpose:

#17991 reorganized a loop that derived keys and computed puzzle hashes. The original loop had an await sleep(0) which was removed. This is believed to cause sync issues on hardware that's slow enough to cause this task to block too long.

This PR reintroduces the sleep(0), but since the two inner loops were hoisted out of the outer loop, there are now 3 places we may need to yield.

Current Behavior:

Deriving keys and computing puzzle hashes are done in a task that's not interrupted, blocking other tasks, potentially causing them to time-out.

New Behavior:

Deriving keys and computing puzzle hashes are done in a task that's allowed to be interrupted, so that other tasks also get a chance to run, avoiding time-outs.

Testing Notes:

@arvidn arvidn added the Fixed Required label for PR that categorizes merge commit message as "Fixed" for changelog label Jun 21, 2024
@arvidn arvidn marked this pull request as ready for review June 21, 2024 15:48
@arvidn arvidn requested a review from a team as a code owner June 21, 2024 15:48
@arvidn arvidn requested a review from wjblanke June 21, 2024 15:48
@emlowe emlowe changed the base branch from release/2.4.0 to release/2.4.1 June 21, 2024 17:36
@emlowe emlowe marked this pull request as draft June 21, 2024 20:22
@arvidn arvidn closed this Jun 22, 2024
@arvidn arvidn deleted the fix-wallet-sync-blocking-task branch June 22, 2024 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed Required label for PR that categorizes merge commit message as "Fixed" for changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant