This change adds support to interrupting and stopping the proof generation via a new RPC call that simply sets the AtomicBool on the service to true, resulting in the proof generation to be cancelled the same as in a shutdown.
It might be useful to add a thread join on the handle the same way that the shutdown is doing, wdyt @poszu?
This doesn't help with cancelling the proof generation via FFI (which I think can still be used by the post go tool). I tried to also add that but got lost in the go->c->rust rabbit-hole (tried to inject a callback that would provide a bool from the go-code in order to stop the execution, the same way that is done currently with the AtomicBool).
Thanks for reviewing @poszu. How would you envision persisting the "paused" state? on the post-rs side? e.g. in some folder that corresponds to the challenge? or returning it to the caller somehow?
This change adds support to interrupting and stopping the proof generation via a new RPC call that simply sets the
AtomicBool
on the service totrue
, resulting in the proof generation to be cancelled the same as in a shutdown.It might be useful to add a thread join on the handle the same way that the shutdown is doing, wdyt @poszu?
This doesn't help with cancelling the proof generation via FFI (which I think can still be used by the
post
go tool). I tried to also add that but got lost in the go->c->rust rabbit-hole (tried to inject a callback that would provide abool
from the go-code in order to stop the execution, the same way that is done currently with theAtomicBool
).Closes #81 Depends on https://github.com/spacemeshos/api/pull/366/files