snarkOS icon indicating copy to clipboard operation
snarkOS copied to clipboard

Ensure the operator is connected to the prover before sending work

Open jules opened this issue 4 years ago • 3 comments

This avoids an infinite loop in which a worker continually asks for work but cant get it back from the pool as it is not properly connected.

jules avatar Feb 09 '22 04:02 jules

Other than the fact that I agree that we should instead have something like https://github.com/AleoHQ/snarkOS/issues/1554 in place, this workaround should be adjusted as follows:

  1. the first few early returns in Peers::update should send Err(<some meaningful error>) to the Sender in connection_result, so we can actually know if we weren't already connected or if there's some other connection attempt error
  2. instead of ignoring the result of the corresponding Receiver (let _ = handler.await;), we should check whether we succeeded at connecting, were already connected or if there was an error and potentially act differently if ultimately we're not connected after all

ljedrz avatar Feb 09 '22 07:02 ljedrz

The CI jobs should succeed once https://github.com/AleoHQ/snarkOS/pull/1625 is merged and this PR is rebased on top of it.

ljedrz avatar Feb 09 '22 20:02 ljedrz

Admin: Please respond with "build this" in order to build this PR.

aleo-svc-exp avatar Aug 01 '22 23:08 aleo-svc-exp