From 7b210fd61cee56205b72d168b390f81a3f8df676 Mon Sep 17 00:00:00 2001 From: ErdongChen61 Date: Thu, 31 Oct 2024 14:17:38 -0700 Subject: [PATCH] rename to snarkify-scroll-proving-agent --- .github/workflows/docker-build.yml | 2 +- .github/workflows/publish-chart.yaml | 6 +- .github/workflows/publish-dev-chart.yaml | 6 +- Cargo.lock | 2 +- Cargo.toml | 2 +- README.md | 55 +++++++++--------- .../.helmignore | 0 .../Chart.yaml | 4 +- .../README.md | 14 ++--- .../charts/common-1.5.1.tgz | Bin .../index.yaml | 6 +- .../templates/common.yaml | 0 .../templates/config-file.yaml | 0 .../templates/helpers.tpl | 0 .../values.yaml | 8 +-- .../values/production.yaml | 2 +- docker/Dockerfile | 4 +- src/main.rs | 4 +- 18 files changed, 57 insertions(+), 58 deletions(-) rename charts/{snarkify-scroll-proving => snarkify-scroll-proving-agent}/.helmignore (100%) rename charts/{snarkify-scroll-proving => snarkify-scroll-proving-agent}/Chart.yaml (67%) rename charts/{snarkify-scroll-proving => snarkify-scroll-proving-agent}/README.md (85%) rename charts/{snarkify-scroll-proving => snarkify-scroll-proving-agent}/charts/common-1.5.1.tgz (100%) rename charts/{snarkify-scroll-proving => snarkify-scroll-proving-agent}/index.yaml (65%) rename charts/{snarkify-scroll-proving => snarkify-scroll-proving-agent}/templates/common.yaml (100%) rename charts/{snarkify-scroll-proving => snarkify-scroll-proving-agent}/templates/config-file.yaml (100%) rename charts/{snarkify-scroll-proving => snarkify-scroll-proving-agent}/templates/helpers.tpl (100%) rename charts/{snarkify-scroll-proving => snarkify-scroll-proving-agent}/values.yaml (86%) rename charts/{snarkify-scroll-proving => snarkify-scroll-proving-agent}/values/production.yaml (95%) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 7c65d4c..5575138 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -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 diff --git a/.github/workflows/publish-chart.yaml b/.github/workflows/publish-chart.yaml index 93d5184..115c096 100644 --- a/.github/workflows/publish-chart.yaml +++ b/.github/workflows/publish-chart.yaml @@ -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 }}" @@ -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 }}" @@ -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 \ No newline at end of file diff --git a/.github/workflows/publish-dev-chart.yaml b/.github/workflows/publish-dev-chart.yaml index 0e97681..5240779 100644 --- a/.github/workflows/publish-dev-chart.yaml +++ b/.github/workflows/publish-dev-chart.yaml @@ -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: @@ -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 }}" @@ -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 }}" diff --git a/Cargo.lock b/Cargo.lock index 0d21409..18b37c2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4295,7 +4295,7 @@ dependencies = [ ] [[package]] -name = "snarkify-scroll-proving" +name = "snarkify-scroll-proving-agent" version = "0.0.1" dependencies = [ "anyhow", diff --git a/Cargo.toml b/Cargo.toml index 02da8cb..1255cfc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "snarkify-scroll-proving" +name = "snarkify-scroll-proving-agent" version = "0.0.1" edition = "2021" diff --git a/README.md b/README.md index 5610885..d6246ed 100644 --- a/README.md +++ b/README.md @@ -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 ``` @@ -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. diff --git a/charts/snarkify-scroll-proving/.helmignore b/charts/snarkify-scroll-proving-agent/.helmignore similarity index 100% rename from charts/snarkify-scroll-proving/.helmignore rename to charts/snarkify-scroll-proving-agent/.helmignore diff --git a/charts/snarkify-scroll-proving/Chart.yaml b/charts/snarkify-scroll-proving-agent/Chart.yaml similarity index 67% rename from charts/snarkify-scroll-proving/Chart.yaml rename to charts/snarkify-scroll-proving-agent/Chart.yaml index 618e999..5b0f0b4 100644 --- a/charts/snarkify-scroll-proving/Chart.yaml +++ b/charts/snarkify-scroll-proving-agent/Chart.yaml @@ -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: diff --git a/charts/snarkify-scroll-proving/README.md b/charts/snarkify-scroll-proving-agent/README.md similarity index 85% rename from charts/snarkify-scroll-proving/README.md rename to charts/snarkify-scroll-proving-agent/README.md index 0c1049a..a077f72 100644 --- a/charts/snarkify-scroll-proving/README.md +++ b/charts/snarkify-scroll-proving-agent/README.md @@ -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 @@ -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` | | diff --git a/charts/snarkify-scroll-proving/charts/common-1.5.1.tgz b/charts/snarkify-scroll-proving-agent/charts/common-1.5.1.tgz similarity index 100% rename from charts/snarkify-scroll-proving/charts/common-1.5.1.tgz rename to charts/snarkify-scroll-proving-agent/charts/common-1.5.1.tgz diff --git a/charts/snarkify-scroll-proving/index.yaml b/charts/snarkify-scroll-proving-agent/index.yaml similarity index 65% rename from charts/snarkify-scroll-proving/index.yaml rename to charts/snarkify-scroll-proving-agent/index.yaml index 277533e..b780e76 100644 --- a/charts/snarkify-scroll-proving/index.yaml +++ b/charts/snarkify-scroll-proving-agent/index.yaml @@ -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: @@ -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" diff --git a/charts/snarkify-scroll-proving/templates/common.yaml b/charts/snarkify-scroll-proving-agent/templates/common.yaml similarity index 100% rename from charts/snarkify-scroll-proving/templates/common.yaml rename to charts/snarkify-scroll-proving-agent/templates/common.yaml diff --git a/charts/snarkify-scroll-proving/templates/config-file.yaml b/charts/snarkify-scroll-proving-agent/templates/config-file.yaml similarity index 100% rename from charts/snarkify-scroll-proving/templates/config-file.yaml rename to charts/snarkify-scroll-proving-agent/templates/config-file.yaml diff --git a/charts/snarkify-scroll-proving/templates/helpers.tpl b/charts/snarkify-scroll-proving-agent/templates/helpers.tpl similarity index 100% rename from charts/snarkify-scroll-proving/templates/helpers.tpl rename to charts/snarkify-scroll-proving-agent/templates/helpers.tpl diff --git a/charts/snarkify-scroll-proving/values.yaml b/charts/snarkify-scroll-proving-agent/values.yaml similarity index 86% rename from charts/snarkify-scroll-proving/values.yaml rename to charts/snarkify-scroll-proving-agent/values.yaml index 0b6fc07..e689e2f 100644 --- a/charts/snarkify-scroll-proving/values.yaml +++ b/charts/snarkify-scroll-proving-agent/values.yaml @@ -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: @@ -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 diff --git a/charts/snarkify-scroll-proving/values/production.yaml b/charts/snarkify-scroll-proving-agent/values/production.yaml similarity index 95% rename from charts/snarkify-scroll-proving/values/production.yaml rename to charts/snarkify-scroll-proving-agent/values/production.yaml index ec35048..48a4360 100644 --- a/charts/snarkify-scroll-proving/values/production.yaml +++ b/charts/snarkify-scroll-proving-agent/values/production.yaml @@ -26,4 +26,4 @@ scrollConfig: | } env: - serviceId: "" + serviceId: "" diff --git a/docker/Dockerfile b/docker/Dockerfile index c2e304c..3a761c2 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -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"] diff --git a/src/main.rs b/src/main.rs index 4dcffe3..af2baaa 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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, }