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

Heartbeat for browser contributor should be run in parallel with contributions #453

Open
kellpossible opened this issue Feb 16, 2022 · 0 comments

Comments

@kellpossible
Copy link

kellpossible commented Feb 16, 2022

Currently the heartbeat could stall if the contributions are taking a long time, or waiting a long time for an item in the queue to make the next contribution. Kind of makes the heartbeat a little useless for web contributors, because the drop check also works on contributions, and at the moment there is only one heartbeat per contribution (in lock step).
https://github.com/AleoHQ/aleo-setup/blob/master/phase1-wasm/src/contributor.rs#L42

The heartbeat should be executed in parallel to the contributions. I'm assuming the attempt_contribution() is a non-blocking async function that gets shelled out to web workers, so could use select! over the contribution loop and the heartbeat loop, closing the heartbeat loop when the contribution loop completes.

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

No branches or pull requests

1 participant