Triton job queue and program outputs

It seems to me that the queue implementation is incapable/oblivious of a program output (I guess because it isn’t needed in the core programs). On the other hand the queue seems to me as a best way to run a sporadic program for the sake of a stand-alone proof.

What would you say: should the queue be developed to have the outputs, should programs be ran outside of a core, or is there better approaches to this?

background

The job_queue module is written as a general-purpose queue for executing jobs of any kind one after the other.

It has zero dependencies on other types in neptune-core, triton-vm, etc. It could and should be its own crate on crates.io, as it could very well be used by other projects. Or failing that, it should be made into a sub-crate within the neptune-core workspace. This was not done originally simply because the workspace did not exist yet.

Making the job_queue aware of any neptune/triton specific types would be contrary to the original design, and imho a mistake.

your question

What would you say: should the queue be developed to have the outputs, should programs be ran outside of a core, or is there better approaches to this?

I’m having difficulty understanding what problem you are proposing to solve.

Presently the job_queue is used by a single type of job: generating a triton-vm proof. Any code that needs a proof submits a job to the queue and .awaits the result. It can then do with the result as it pleases.

Thank you for removing the confusion in my mind. I guess I got a wrong impression when I had less knowledge, and that stuck. If I can await for https://docs.rs/neptune-cash/latest/neptune_cash/api/export/struct.Claim.html then I can get a proof with an output!

I think you got the right idea, skaunov. But just to be sure: You can run a program and get the output from that execution, without producing a proof.

right. In fact the prover-job does this before it starts generating a proof, just to determine the program’s complexity and determine if the device is capable of proof generation. @skaunov you can have a look at:

ProverJob::check_if_allowed() in src/protocol/proof_abstractions/tasm/prover_job.rs