Skip to content

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

@kellpossible

Description

@kellpossible

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions