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.
📚 Context
The
genScript.ts
file generates thegen-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.