Snarkify
  • 🏗️GPU Prover Network
    • Introduction
    • Deploy a Elastic Prover
      • Integrate Elastic Prover SDK
    • Snakrify CLI
      • Installation
      • Authentication
      • Service Initialization
      • Build & Deployment
      • Proof Generation
      • Team Management
      • GPU Shell Management
    • Advanced Topics
      • Webhook
  • 🏚️High-Performance ZKP
    • zkEVM Halo2 GPU Prover
      • MSM
      • NTT
      • Quotient Polynomial Evaluation
      • KZG Multiopen
      • Polynomial Inversion
      • Permutation Generation
    • ZPrize
  • 🐺Sirius Folding
    • Introduction
    • Quickstart
    • Examples
      • Fold a Summation Circuit
      • Fold a Fibonacci Circuit
      • Fold a Halo2 Circuit
      • Fold the zkevm-circuits
    • Terminologies
    • Sirius Folding APIs
      • `StepCircuit` trait
      • `PublicParams` Struct
      • `IVC` struct
  • LInks
    • Github
    • Telegram Group
    • snarkify.io
Powered by GitBook
On this page
  • Deploy a Elastic Prover
  • Issue a Proof Generation Request
  • Create an API key
  • Issue a Proof Generation Request
  • Query results
  • What's Next
  1. GPU Prover Network

Deploy a Elastic Prover

In this tutorial, we'll show you how to deploy a template Poseidon Hash prover service on Snarkify Network.

PreviousIntroductionNextIntegrate Elastic Prover SDK

Last updated 6 months ago

Deploy a Elastic Prover

  1. Log in with your GitHub account.

  2. For first time users, we have prepared a demo prover for you to try it out. Just Click Try It First to get started. You will be redirected to github for some configurations if this is the first service on your team.

  1. Once the configuration is done, you can continue to deploy the demo prover. You can simply use the default values and directly click Deploy .🚀

Deploying a demo prover will clone the template repository into your github account first, don't get surprised : )

  1. The service will be rendered Unready for about 5 minutes while our backend pipeline is actively building and deploying your code. Grab some coffee :).

  1. Once the deployment succeeds, the service status will become Ready , and an Endpoint will be generated and shown. Note the Endpoint of your deployed service, and we will need it to issue a proof generation request to your prover.

  1. Alternatively, you can also deploy your own prover implementation on the Snarkify Network. Please checkout Integrate Elastic Prover SDK.

Issue a Proof Generation Request

In this section, we will show you how to issue a proof generation request to your prover and how to query the generated proof from the command line.

Create an API key

  • Go to the "Access Keys" tab, click the Create Key button, and give it a good name.

  • Upon clicking the Create button, your key will be generated and shown. Please save your access key securely, as the key will only be shown once.

Issue a Proof Generation Request

Get your endpoint and access key ready, and type the following command in your terminal.

ENDPOINT=<your_endpoint_url>
ACCESS_KEY=<your_access_key>

Use the following curl command to issue your proof generation request against the demo prover:

curl --request POST $ENDPOINT \
--header "x-api-key: $ACCESS_KEY" \
--header "Content-Type: application/json" \
--data-raw '{
    "input": {
        "private_input": [0, 1, 2, 3, 4],
        "public_input": "20304616028358001435806807494046171997958789835068077254356069730773893150537"
    }
}
'

Requests are processed asynchronously by your prover service. You will receive a confirmation response with a PENDING state like the following,

{
    "service_id": "0872ccea325846ee9dd6f697b9af1863",
    "task_id": "ec5e67fecbab4f66b5c4a1551105e795",
    "service_name": "poseidon",
    "creator_id": "5a5fd35f890349aea7ac9dc17d97d32b",
    "result": null,
    "state": "PENDING",
    "input": "{\"private_input\": [0, 1, 2, 3, 4], \"public_input\": \"13037709793114148810823325920380362524528554380279235267325741570708489436263\"}",
    "started": null,
    "finished": null,
    "created": "2023-11-04T03:14:25"
}

Please note the task_id for the next step.

Query results

From Command Line

Get your task ID and access key ready, and type the following command in your terminal.

TASK_ID=<your_task_id>
ACCESS_KEY=<your_access_key>

The proof generation result can be queried with the following command,

curl --request GET "https://api.snarkify.io/v1/tasks/$TASK_ID" \
--header "x-api-key: $ACCESS_KEY"

Then you will see the task information like below once the task is processed:

{
    "service_id": "aa143bd5b48647569720096ab7493cd2",
    "task_id": "4b1fd782a0f44f499a88a8cab31f066f",
    "service_name": "poseidon",
    "creator_id": "e95d87b33f8f45ea9e1f845eca18031d",
    "result": "\"nc/6L2N4Jo1DU1SQ5IsVJ4EnqYo0pJBr1Zfv/Reez2LvtaFnHc/GzVpb2EBfAQhWBbk3OJNr5CBgS7TIJEtpQvPzw4PokhbAsvBsS6oK5Nu/zvJwVS4xrWgHD3uPT3ZWO7/U4n6YzZHBwgSN1bAK4ofFGQl7czSsS52ROInTJyVM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n4sdug9JFw0mj5ChBpyjSlZIQA/jj/p1pOEuOErZ7wCWHaiYL1C7rK4ag5+cNr0LR1ER5O4P/zKVookId/m03cXQRc+83SatpTGH4fb6yDJNpFI9zgHqu4XzmpLM45WRGffhCqzyBuSppY0S6/sD8ISO8Hqs7NaiSHxMFVegF81lV6y/dx4nYdsFVRyEy8QwUbCArOnGo5cMEBKkRxA6FV4q1jvTx661HoVlZTVXLAo0SYF09V4JBvJIgTYy/E/QDTOb/WQFgPM8FaS0VOiyfj0xIQV1Bi2DVRtFP5eWLtzEYIRD+/BuI2abL+tGaRQ/SJmBhy2493gBXBrW/ISxdg2KZ1UxnhegBJOT7vImz2UsdBBj71BOni2oTA21oWTSFtOrXp4nuOjwT8tH+FarKu89QD0svTzabKDbtexD/xDS9LcpKYZ5DydKjMzFbKg9ARii6n7feSnTerZdN+ip1994wl13EfCIZM1cG66OQ6888IK7UlPvZN+9r+bMXiO+6AwH1us4SEhaGmVgSbYH5iCkQfR+rzR1k0crPCsAsquUg5xnS4USskd3SMZxGBzyL0HB8JDzvzGYFIIePw/vAwvaFLrdHGwTUEDkeWN4Iir5QiBTc4ajpCnrzkVfMMwRg81HGFoOuSfQOHrUBYysCxzLcgFlz/63SClAh9CJCUzogHaLTuvn+zltCYGQ1FsjxhV1i+ZXb6wK9fXC55YVMHQGH+ve/1PFik6ta0gJoBSlKnI9BaGK/2BU6C2r8cZWxm2WtEN0jMIBvxfejgyx+0vMlc\"",
    "state": "SUCCESS",
    "input": "{\"private_input\": [0, 1, 2, 3, 4], \"public_input\": \"20304616028358001435806807494046171997958789835068077254356069730773893150537\"}",
    "started": "2023-11-10T02:08:22",
    "finished": "2023-11-10T02:08:23",
    "created": "2023-11-10T02:08:22"
}

From Cloud Console

Alternatively, you can also check your task history through our UI:

  1. click the setting button

  1. Go to the Task Hisotry page

What's Next

Following this to make your own ZK circuits cloud-ready with the snarkify-sdk.

🏗️
tutorial
Snarkify Console