zkevm-chain icon indicating copy to clipboard operation
zkevm-chain copied to clipboard

prover/rpc: Add the ability to abort a running prover task

Open pinkiebell opened this issue 2 years ago • 2 comments

Context: I haven't yet looked for a way to interrupt a busy thread - especially one inside the tokyo worker pool without breaking some stuff. Because the prover code will eventually run long inside a synchronous context and I don't know yet if interrupting threads like this will lead to memory leaks or similar.

pinkiebell avatar Aug 17 '22 11:08 pinkiebell

Now that the prover is no longer in this repo after https://github.com/privacy-scaling-explorations/zkevm-circuits/pull/714 maybe this issue should be transferred to the zkevm-chain repository?

ed255 avatar Sep 07 '22 10:09 ed255

@AronisAt79 I just tested this and aborting a long running sync task isn't possible to do cleanly . Another solution is that we spawn a new process instead and piping the result back However, that will break sharing the precomputed/cached proving keys, unless we use shared memory but that involves unsafe rust as far as I know. I will look into this too,

pinkiebell avatar Nov 03 '22 12:11 pinkiebell

If we really need this someday we can spawn dedicated prover processes from within the prover daemon. Given this has some real drawbacks mentioned above, I put it in the icebox for now

pinkiebell avatar Mar 02 '23 11:03 pinkiebell