Step-by-step
Enable ZK mining within Bento
Please see Enabling ZK Mining.
Start Proving
Provers are now ready to run proving workloads with ZK mining enabled; this can be done by running a prover on the Boundless marketplace or elsewhere.For each proving job, R0VM will automatically generate work proofs. These work proofs track the total amount of proving work done (in cycles). Each epoch, provers will need to submit their accumulated work to the PoVW accounting smart contract. If provers DO NOT submit work each epoch, they will not receive any rewards for that epoch.To do this, provers must use the Boundless CLI and run the following three commands,
prepare-mining, submit-mining and claim-mining-rewards.Create and Update the State File
Before running The setup wizard will configure the rewards module (RPC URL, staking address, reward address) and create a new state file at a path you specify. It also stores the state file location in your config so that subsequent commands can find it automatically.The resultant state file keeps track of all work done so far for one reward address. Each reward address should have exactly one state file associated with it. Submitting work for a rewards address requires all previously submitted receipts to be included in the state file. The same state file must be used for submitting any additional work done by the associated rewards address. If two state files have the same rewards address, they will conflict during
prepare-mining, provers must first create a state file using the interactive setup wizard:submit-mining because they will have different Merkle tree states.Once the state file is created via setup, provers can aggregate work proofs by running:prepare-mining aggregates all work proofs from Bento and stores the combined proof to the state file. This uses Bento to generate the aggregated work proof; therefore, make sure to have Bento running locally or specify a valid Bento API URL endpoint via --work-receipt-bento-api-url. This process is entirely local (i.e. it does not send any transaction).You can also pass --state-file ${STATE_FILE_LOCATION} explicitly if needed. If the state file location changes, make sure to update it by running boundless rewards setup again.Submit the aggregated work proof onchain
After running
prepare-mining, provers are ready to submit onchain with:submit-mining also requires Bento for proving (see submit.rs). Therefore, make sure to have Bento running locally or specify a valid Bento API URL endpoint via --bento-api-url.