Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
ErdongChen61 committed Oct 31, 2024
1 parent 89e55f4 commit 53a5f58
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 34 deletions.
110 changes: 78 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,26 @@

## Introduction

The Snarkify Scroll Proving is a high-performance binary, built on [Snarkify](https://snarkify.io/), designed for efficient block proving within the [Scroll SDK](https://scroll-sdk-init.docs.scroll.xyz/en/sdk/). Leveraging Snarkify’s expertise in zero-knowledge GPU acceleration, it provides an easy-to-use, cost-effective solution for block proving.
The Snarkify Scroll Proving is a high-performance binary built on [Snarkify](https://snarkify.io/), specifically
designed for efficient block proving within the [Scroll SDK](https://scroll-sdk-init.docs.scroll.xyz/en/sdk/). With this
integration, Scroll SDK clients gain access to robust GPU-proving capabilities, allowing for the fast and effective
proving of any data or operations within their SDK chain’s blockspace. This supports their goals of decentralization and
enables faster transaction settlement.

Snarkify is the multiple winners of the [ZPRIZE](https://www.zprize.io/blog/announcing-the-2023-zprize-winners) and
specilizes in the zero-knowledge GPU acceleration. It has in-house GPU provers that are 25% more efficient than the
official Scroll GPUprovers. Leveraging Snarkify’s expertise in zero-knowledge proofs and GPU acceleration, SDK clients
can enjoy a cost-effective, end-to-end infrastructure for best-in-class GPU proving, aiming to empower innovative
solutions and enable new use cases.

## How It Works

The Snarkify Scroll Proving binary integrates with the [Scroll Proving SDK](https://github.com/scroll-tech/scroll-proving-sdk) to handle block proving in three main steps:
The Snarkify Scroll Proving binary integrates with the [Scroll Proving SDK](https://github.com/scroll-tech/scroll-proving-sdk)
to handle block proving in three main steps:

1. Task Retrieval: The binary connects to the coordinator endpoint to retrieve proving tasks and to the Geth endpoint for block trace data required for chunk tasks.
2. Proof Generation: Each task is dispatched to the Snarkify platform, where proofs are generated.
3. Task Completion: The binary periodically checks the task’s status on the Snarkify platform and, once complete, submits the proof back to the coordinator.
1. Task Retrieval: The binary connects to the coordinator endpoint to retrieve proving tasks and to the Geth endpoint for block trace data required for chunk tasks.
2. Proof Generation: Each task is dispatched to the Snarkify platform, where proofs are generated.
3. Task Completion: The binary periodically checks the task’s status on the Snarkify platform and, once complete, submits the proof back to the coordinator.

## Getting Started

Expand All @@ -24,37 +35,72 @@ curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
You’ll need an API key to authenticate. Follow the steps [here](https://docs.snarkify.io/gpu-prover-network/deploy-a-elastic-proving-service#create-an-api-key) to obtain one.

### Set Up Scroll Proving Service
Set up a Scroll Proving service and obtain its service ID. If you need assistance, contact us on [Telegram](https://t.me/+WRhRjNL6zixjNWUx).

### Deploy the Snarkify Scroll Proving Binary
After obtaining your service ID, deploy the prover using Helm. (Note: Deployment details will be updated once the Helm chart is published.)
Set up a Scroll Proving service and obtain its service ID. Please contact us on [Telegram](https://t.me/+WRhRjNL6zixjNWUx)
if you want to set up a service.

### Configuration
Configure the binary using the template below, replacing placeholders as needed:
```json
{
"prover_name_prefix": "snarkify_",
"keys_dir": "keys",
### Prepare the Configuration
Create a `config.yaml` file using the template below, replacing placeholders as needed:
```yaml
scrollConfig: |
{
"prover_name_prefix": "<Your-Prover-Name-Prefix>",
"keys_dir": "/keys",
"coordinator": {
"base_url": "<Your-Coordinator-Endpoint>",
"retry_count": 3,
"retry_wait_time_sec": 5,
"connection_timeout_sec": 60
"base_url": "<Your-Coordinator-Endpoint>",
"retry_count": 3,
"retry_wait_time_sec": 5,
"connection_timeout_sec": 60
},
"l2geth": {
"endpoint": "<Your-Geth-Endpoint>"
"endpoint": "<Your-Geth-Endpoint>"
},
"prover": {
"circuit_type": 1,
"circuit_version": "v0.13.1",
"n_workers": 1,
"cloud": {
"base_url": "https://api.snarkify.io",
"api_key": "<Your-API-Key>",
"retry_count": 3,
"retry_wait_time_sec": 5,
"connection_timeout_sec": 60
}
"circuit_type": <Your-Circuit-Type>,
"circuit_version": "v0.13.1",
"n_workers": <Your-Number-Of-Workers>,
"cloud": {
"base_url": "https://api.snarkify.io",
"api_key": "<Your-API-Key>",
"retry_count": 3,
"retry_wait_time_sec": 5,
"connection_timeout_sec": 60
}
}
}
```
}
env:
serviceId: "<Your-Service-ID>"
```
- prover_name_prefix: A prefix for your prover name, should end with an underscore.
- coordinator.base_url: Your coordinator endpoint.
- l2geth.endpoint: Your Geth endpoint.
- prover.circuit_type: The circuit type, can be 1 (Chunk), 2 (Batch) or 3 (Bundle).
- prover.n_workers: The number of workers to run in parallel.
- cloud.api_key: Your Snarkify API key.
- serviceId: Your Scroll Proving service ID.
### Deploy Snarkify Scroll Proving
Deploy the prover using Helm.
```bash
export HELM_EXPERIMENTAL_OCI=1
helm install snarkify-scroll-proving oci://ghcr.io/snarkify/snarkify-scroll-proving/helm/snarkify-scroll-proving --version 0.0.1 -f config.yaml
```

### Verify the Deployment
You can verify the deployment by checking the pods and the logs.
```bash
kubectl get pods
kubectl logs -l app.kubernetes.io/name=snarkify-scroll-proving
```

### Uninstall the Helm Chart
```bash
helm uninstall snarkify-scroll-proving
```

### Pricing
Snarkify offers affordable proving services with in-house high-performance GPU provers. Please contact us on
[Telegram](https://t.me/+WRhRjNL6zixjNWUx) for more details.
2 changes: 1 addition & 1 deletion charts/snarkify-scroll-proving/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ version: 0.0.1
kubeVersion: ">=1.22.0-0"
maintainers:
- name: snarkify
email: support@snarkify.io
email: hello@snarkify.io
dependencies:
- name: common
repository: "oci://ghcr.io/scroll-tech/scroll-sdk/helm"
Expand Down
3 changes: 2 additions & 1 deletion charts/snarkify-scroll-proving/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ A chart for Scroll SDK to generate proofs in Snarkify platform.

| Name | Email | Url |
| ---- | ------ | --- |
| snarkify | <support@snarkify.io> | |
| snarkify | <hello@snarkify.io> | |

## Requirements

Expand All @@ -29,6 +29,7 @@ Kubernetes: `>=1.22.0-0`
| defaultProbes.enabled | bool | `true` | |
| defaultProbes.spec.httpGet.path | string | `"/"` | |
| defaultProbes.spec.httpGet.port | int | `80` | |
| env.serviceId | string | `""` | |
| global.fullnameOverride | string | `"snarkify-scroll-proving"` | |
| global.nameOverride | string | `"snarkify-scroll-proving"` | |
| image.pullPolicy | string | `"Always"` | |
Expand Down

0 comments on commit 53a5f58

Please sign in to comment.