Conversation
|
|
||
| [primary-prover.sindri-prover] | ||
| proving-request-timeout = "5m" | ||
| proving-timeout = "10m" |
There was a problem hiding this comment.
As you are running tests, you may notice that the proving-timeout you supply in your config does not match the exact time the Sindri client times out (especially if you are aggressive and put 1 minute or less). This is expected. For efficiency reasons, the Sindri client will hold a connection for some time while awaiting a proof job to complete. (The timeout delay will not go above a few minutes.)
| "circuitType": "sp1", | ||
| "provingScheme": "plonk", | ||
| "sp1Version": "4.0.0", |
There was a problem hiding this comment.
These three fields should be fixed while you pin to Sp1 v4.0.0, but the other fields (name and elfPath) are flexible. As mentioned in the PR description name is fully up to your team. The elfPath provides the relative path from this Sindri manifest to the compiled ELF.
| if proof_response.status == JobStatus::Failed { | ||
| return Err(Error::ProverFailed( | ||
| proof_response.error.flatten().unwrap_or( | ||
| "Sindri job was marked as failed. No error message was provided." | ||
| .to_string(), | ||
| ), | ||
| )); | ||
| } |
There was a problem hiding this comment.
While errors related to authorization or some other configuration issue are caught by the map_err above, there may be cases where the Sindri proof request is made and a job is run successfully, but the result is not a valid Sp1 proof. (For instance if you map an input to the wrong ELF)
|
Closing in favor of #274 |
Description
This adds Sindri as a serverless, scalable GPU proving option for agglayer.
New feature (non-breaking change which adds functionality)
In order to evaluate this PR and use the
SindriExecutor, you will need a Sindri account and an api key.Deploying a build
The arguments for a proof on Sindri's platform differ from both local and Sp1 Network. Mainly, you will register/deploy an ELF in a separate preparation phase. Then when you want to request a proof, you will refer to that ELF by an identifier rather than passing the executable.
Makefile.elf.tomlhas been edited to show how you can use the Sindri rust CLI as a means to upload the most recent ELF build. The following command will upload the most recent contents ofcrates/aggchain-proof-programto Sindri:This will associate that ELF to your own personal account. We could discuss "public projects" which would make the same ELF available to any user of Sindri's API + Agglayer if you are interested.
Prover Config
A Sindri prover config has two familiar fields:
proving-request-timeoutandproving-timeout. The new fields are associated to mapping proof requests to a deployed ELF:The
project-namedescribes what you decide to call your Sp1 program. Incrates/aggchain-proof-program, the new filesindri.jsoncalls itpessimistic-proof. Just make sure that thenamefield in your Sindri manifest corresponds toproject-namein your Prover config.The
project-tagfield provides version control. While this PR does not supply any tags inMakefile.elf.toml, we demonstrate how you could add that information. When no other tag is supplied, every ELF deployment will use the taglatestwhich will overwrite the previous deployment.PR Checklist:
SindriExecutormore naturally fit in sindri-rust)PR Creator Note
This PR shows how to deploy the
aggchain-proof-programELF to Sindri, but I was not able to run an end-to-end test for that particular program. I believeaggkit-proveris still under construction - supplyingSindriExecutoras the primary prover seemed to require more tweaks than I felt comfortable makingHowever, I was able to run a satisfying hodge-podge test by:
pessimistic-proof-programto Sindrikurtosis-cdkwith the local agglayer image (and appropriate template changes for a Sindri prover config)lxlyfrom the e2e repoHappy to share more details about how to spin that up