cartesi / rollups

Cartesi Rollups
30 stars 12 forks source link

Improve `genScript.ts` #197

Closed guidanoli closed 1 year ago

guidanoli commented 1 year ago

📚 Context

The genScript.ts file generates the gen-proofs.sh script that is executed by the Docker image. This script is responsible for running the server manager, feeding inputs, and finishing the epoch. In between these steps, the script sleeps for some hard-coded number of seconds. This hinders the productivity of on-chain developers and also isn't guaranteed to work in every machine.

✔️ Solution

We can use the getEpochStatus entry point to ask the server manager whether a certain input was processed already or is pending. This may not only speed up the proof generation process, but is certainly safer than trusting that each step doesn't take more than some constant period of time.

guidanoli commented 1 year ago

What do you think, @gligneul? Would this work? Is there a better way?

gligneul commented 1 year ago

There isn't a better way. :cry: