Skip to content

Commit

Permalink
rename to snarkify-scroll-proving-agent
Browse files Browse the repository at this point in the history
  • Loading branch information
ErdongChen61 committed Oct 31, 2024
1 parent eee3749 commit 7b210fd
Show file tree
Hide file tree
Showing 18 changed files with 57 additions and 58 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ jobs:
context: .
file: docker/Dockerfile
push: true
tags: snarkify/snarkify-scroll-proving:${{ github.ref_name }},snarkify/snarkify-scroll-proving:latest
tags: snarkify/snarkify-scroll-proving-agent:${{ github.ref_name }},snarkify/snarkify-scroll-proving-agent:latest
6 changes: 3 additions & 3 deletions .github/workflows/publish-chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:

- name: Helm registry login
run: |
helm registry login ghcr.io/snarkify/snarkify-scroll-proving/helm --username ${{ github.actor }} --password ${{ secrets.HELM_GITHUB_PASSWORD }}
helm registry login ghcr.io/snarkify/snarkify-scroll-proving-agent/helm --username ${{ github.actor }} --password ${{ secrets.HELM_GITHUB_PASSWORD }}
env:
HELM_GITHUB_PASSWORD: "${{ secrets.HELM_GITHUB_PASSWORD }}"

Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
- name: Helm registry login
run: |
helm registry login ghcr.io/snarkify/snarkify-scroll-proving/helm --username ${{ github.actor }} --password ${{ secrets.HELM_GITHUB_PASSWORD }}
helm registry login ghcr.io/snarkify/snarkify-scroll-proving-agent/helm --username ${{ github.actor }} --password ${{ secrets.HELM_GITHUB_PASSWORD }}
env:
HELM_GITHUB_PASSWORD: "${{ secrets.HELM_GITHUB_PASSWORD }}"

Expand All @@ -97,5 +97,5 @@ jobs:
helm dependencies build charts/$chart
helm package charts/$chart
export CHART_VERSION=$(grep 'version:' charts/$chart/Chart.yaml | head -n1 | awk '{ print $2 }')
helm push $chart-${CHART_VERSION}.tgz oci://ghcr.io/snarkify/snarkify-scroll-proving/helm
helm push $chart-${CHART_VERSION}.tgz oci://ghcr.io/snarkify/snarkify-scroll-proving-agent/helm
done
6 changes: 3 additions & 3 deletions .github/workflows/publish-dev-chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- 'charts/**'

env:
HELM_REGISTRY: ghcr.io/snarkify/snarkify-scroll-proving/helm/dev
HELM_REGISTRY: ghcr.io/snarkify/snarkify-scroll-proving-agent/helm/dev

jobs:
helm-chart-testing-dev:
Expand Down Expand Up @@ -34,7 +34,7 @@ jobs:

- name: Helm registry login
run: |
helm registry login ghcr.io/snarkify/snarkify-scroll-proving/helm --username ${{ github.actor }} --password ${{ secrets.HELM_GITHUB_PASSWORD }}
helm registry login ghcr.io/snarkify/snarkify-scroll-proving-agent/helm --username ${{ github.actor }} --password ${{ secrets.HELM_GITHUB_PASSWORD }}
env:
HELM_GITHUB_PASSWORD: "${{ secrets.HELM_GITHUB_PASSWORD }}"

Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
- name: Helm registry login
run: |
helm registry login ghcr.io/snarkify/snarkify-scroll-proving/helm --username ${{ github.actor }} --password ${{ secrets.HELM_GITHUB_PASSWORD }}
helm registry login ghcr.io/snarkify/snarkify-scroll-proving-agent/helm --username ${{ github.actor }} --password ${{ secrets.HELM_GITHUB_PASSWORD }}
env:
HELM_GITHUB_PASSWORD: "${{ secrets.HELM_GITHUB_PASSWORD }}"

Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "snarkify-scroll-proving"
name = "snarkify-scroll-proving-agent"
version = "0.0.1"
edition = "2021"

Expand Down
55 changes: 27 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
# Snarkify Scroll Proving
# Snarkify Scroll Proving Agent

## Introduction

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.
The Snarkify Scroll proving agent is a high-performance service client for efficient block proving for layer-2 rollups
based on the [Scroll SDK](https://scroll-sdk-init.docs.scroll.xyz/en/sdk/). With this integration, Scroll SDK chains
gain access to robust GPU-proving capabilities, allowing for the fast and effective proving of blockspaces.

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.
Snarkify specializes in ZK GPU acceleration and is a multi-time winner of the [ZPRIZE](https://www.zprize.io/blog/announcing-the-2023-zprize-winners)
ZK acceleration competition. Snarkify is the only provider that has developed an in-house GPU prover that is 1.25x more
efficient than the official GPU provers. With the in-house GPU proving capability, Snarkify offers best-in-class GPU
proving services for both Scroll Mainnet and SDK chains. On a daily basis, Snarkify serves 25% to 50% of the Scroll
Mainnet proving jobs.

## How It Works

The Snarkify Scroll Proving binary integrates with the [Scroll Proving SDK](https://github.com/scroll-tech/scroll-proving-sdk)
The Snarkify Scroll Proving agent 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.
1. Task Retrieval: The agent 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.
3. Task Completion: The agent periodically checks the task’s status on the Snarkify platform and, once complete,
submits the proof back to the coordinator.

## Getting Started

### Install Helm Chart
To deploy the binary, you’ll need Helm. Install Helm with:
To deploy the agent, you’ll need Helm. Install Helm with:
```bash
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
```
Expand Down Expand Up @@ -80,35 +80,34 @@ env:
- 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.
- serviceId: Your Scroll Proving service ID in Snarkify platform.
### Deploy Snarkify Scroll Proving
### Deploy Snarkify Scroll Proving Agent
Deploy the prover using Helm with your configuration files.
Deploy the agent using Helm with your configuration files.
```bash
export HELM_EXPERIMENTAL_OCI=1
helm install snarkify-scroll-proving-chunk oci://ghcr.io/snarkify/snarkify-scroll-proving/helm/snarkify-scroll-proving --version 0.0.1 -f chunk-config.yaml
helm install snarkify-scroll-proving-agent-chunk oci://ghcr.io/snarkify/snarkify-scroll-proving-agent/helm/snarkify-scroll-proving-agent --version 0.0.1 -f chunk-config.yaml

helm install snarkify-scroll-proving-batch oci://ghcr.io/snarkify/snarkify-scroll-proving/helm/snarkify-scroll-proving --version 0.0.1 -f batch-config.yaml
helm install snarkify-scroll-proving-agent-batch oci://ghcr.io/snarkify/snarkify-scroll-proving-agent/helm/snarkify-scroll-proving-agent --version 0.0.1 -f batch-config.yaml

helm install snarkify-scroll-proving-bundle oci://ghcr.io/snarkify/snarkify-scroll-proving/helm/snarkify-scroll-proving --version 0.0.1 -f bundle-config.yaml
helm install snarkify-scroll-proving-agent-bundle oci://ghcr.io/snarkify/snarkify-scroll-proving-agent/helm/snarkify-scroll-proving-agent --version 0.0.1 -f bundle-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
kubectl logs -l app.kubernetes.io/name=snarkify-scroll-proving-agent
```

### Uninstall the Helm Chart
```bash
helm uninstall snarkify-scroll-proving-chunk
helm uninstall snarkify-scroll-proving-batch
helm uninstall snarkify-scroll-proving-bundle
helm uninstall snarkify-scroll-proving-agent-chunk
helm uninstall snarkify-scroll-proving-agent-batch
helm uninstall snarkify-scroll-proving-agent-bundle
```

### 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.
### Community
Please connect with the team on [Telegram](https://t.me/+WRhRjNL6zixjNWUx) to learn more.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
apiVersion: v2
description: A chart for Scroll SDK to generate proofs in Snarkify platform.
name: snarkify-scroll-proving
description: A proving agent for Scroll SDK to generate proofs in Snarkify platform.
name: snarkify-scroll-proving-agent
version: 0.0.1
kubeVersion: ">=1.22.0-0"
maintainers:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# snarkify-scroll-proving
# snarkify-scroll-proving-agent

![Version: 0.0.1](https://img.shields.io/badge/Version-0.0.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

A chart for Scroll SDK to generate proofs in Snarkify platform.
A proving agent for Scroll SDK to generate proofs in Snarkify platform.

## Maintainers

Expand All @@ -24,20 +24,20 @@ Kubernetes: `>=1.22.0-0`
|-----|------|---------|-------------|
| command[0] | string | `"/bin/sh"` | |
| command[1] | string | `"-c"` | |
| command[2] | string | `"exec snarkify-scroll-proving --config /sdk_prover/config.json"` | |
| command[2] | string | `"exec snarkify-scroll-proving-agent --config /sdk_prover/config.json"` | |
| defaultProbes.custom | bool | `true` | |
| 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"` | |
| global.fullnameOverride | string | `"snarkify-scroll-proving-agent"` | |
| global.nameOverride | string | `"snarkify-scroll-proving-agent"` | |
| image.pullPolicy | string | `"Always"` | |
| image.repository | string | `"snarkify/snarkify-scroll-proving"` | |
| image.repository | string | `"snarkify/snarkify-scroll-proving-agent"` | |
| image.tag | string | `"v0.0.1"` | |
| persistence.config.enabled | bool | `true` | |
| persistence.config.mountPath | string | `"/sdk_prover/"` | |
| persistence.config.name | string | `"snarkify-scroll-proving-config"` | |
| persistence.config.name | string | `"snarkify-scroll-proving-agent-config"` | |
| persistence.config.type | string | `"configMap"` | |
| persistence.keys.accessMode | string | `"ReadWriteOnce"` | |
| persistence.keys.enabled | bool | `true` | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
entries:
common:
- apiVersion: v2
created: "2024-10-31T08:44:34.423673-07:00"
created: "2024-10-31T14:15:33.146672-07:00"
description: Function library for Helm charts
digest: 5a3fa66a5d8bcfc12029abed7a432a5275f44db7f0773d3b9f251497ad50d09c
keywords:
Expand All @@ -15,6 +15,6 @@ entries:
name: common
type: library
urls:
- ghcr.io/snarkify/snarkify-scroll-proving/helm/snarkify-scroll-proving/charts/common-1.5.1.tgz
- ghcr.io/snarkify/snarkify-scroll-proving-agent/helm/snarkify-scroll-proving-agent/charts/common-1.5.1.tgz
version: 1.5.1
generated: "2024-10-31T08:44:34.421965-07:00"
generated: "2024-10-31T14:15:33.144904-07:00"
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
global:
nameOverride: &app_name snarkify-scroll-proving
nameOverride: &app_name snarkify-scroll-proving-agent
fullnameOverride: *app_name

image:
repository: snarkify/snarkify-scroll-proving
repository: snarkify/snarkify-scroll-proving-agent
pullPolicy: Always
tag: v0.0.1

command:
- "/bin/sh"
- "-c"
- "exec snarkify-scroll-proving --config /sdk_prover/config.json"
- "exec snarkify-scroll-proving-agent --config /sdk_prover/config.json"

resources:
requests:
Expand All @@ -26,7 +26,7 @@ persistence:
enabled: true
type: configMap
mountPath: /sdk_prover/
name: snarkify-scroll-proving-config
name: snarkify-scroll-proving-agent-config
keys:
enabled: true
type: pvc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ scrollConfig: |
}
env:
serviceId: ""
serviceId: "<SERVICE_ID>"
4 changes: 2 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ RUN apt-get update && apt-get install -y libssl-dev ca-certificates && rm -rf /v
RUN update-ca-certificates

# Copy the built binary from the builder stage
COPY --from=builder /usr/src/app/target/release/snarkify-scroll-proving /usr/local/bin/snarkify-scroll-proving
COPY --from=builder /usr/src/app/target/release/snarkify-scroll-proving-agent /usr/local/bin/snarkify-scroll-proving-agent

# Set the entrypoint
ENTRYPOINT ["snarkify-scroll-proving"]
ENTRYPOINT ["snarkify-scroll-proving-agent"]
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ use std::env;
#[clap(disable_version_flag = true)]
struct Args {
/// Path to the configuration file in JSON format.
/// Regarding the JSON format, please refer to the README.md for the configuration file template in
/// https://github.com/snarkify/snarkify-scroll-proving
/// Regarding the JSON format, please refer to the README.md for the Configuration section in
/// https://github.com/snarkify/snarkify-scroll-proving-agent
#[arg(long = "config", default_value = "config.json")]
config_file: String,
}
Expand Down

0 comments on commit 7b210fd

Please sign in to comment.