Details on Executor Working Process

  1. Job Record: This is a crucial component for the Executor. It provides information about available jobs. The Executor’s goal is to identify the most profitable job opportunities from the Job Record. Since multiple Executors might start the same job simultaneously, there’s a competition aspect involved. The first Executor to submit a job gets the reward for completing it.

  2. Job Header: Once the Executor selects a job from the Job Record, they obtain the Job Header. This contains essential metadata about the job. It acts as a pointer to the actual task details, which are stored off-chain in the peer-to-peer network.

  3. Job Body: The Job Body comprises all the necessary information required for executing the task, including the Cairo program and public inputs. This information is fetched from the peer-to-peer network. The Executor transforms the Job Body into the Job Witness by executing the task locally.

  4. Job Witness: This is the output generated by executing the task locally. It serves as proof of correct execution of the program. The Executor’s main objective is to submit this Job Witness to the StarkNet Registry promptly, so they can claim the reward for completing the job before another Executor does. It’s a race against time to submit the Job Witness and secure the reward.