From 91d8537681be17188966b53b0d46ac5ae54c1a5a Mon Sep 17 00:00:00 2001 From: Chris Tam Date: Tue, 26 Nov 2024 00:08:23 +0800 Subject: [PATCH 1/3] docs: Update tutorial documentation for init, build and deploy (#100) Documentation updates, closes #95. --- docs/docs/shared/build.mdx | 4 ++-- docs/docs/shared/deploy.mdx | 17 ++++++++++++++++- docs/docs/shared/init-new-bonsol.mdx | 4 ++-- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/docs/docs/shared/build.mdx b/docs/docs/shared/build.mdx index da1c180..e4aa6d1 100644 --- a/docs/docs/shared/build.mdx +++ b/docs/docs/shared/build.mdx @@ -4,7 +4,7 @@ With the Bonsol cli installed we can now build our zk program using the following command. ```bash -bonsol build -z ./path-to-your-program +bonsol build --zk-program-path ./path-to-your-program ``` This will create a manifest.json file in the root of your program directory. This manifest file contains all the information needed to deploy your program. @@ -23,4 +23,4 @@ Example manifest.json } ``` -If you run into any errors with the command you can check the [CLI Errors](/docs/reference/cli-commands#errors) section for more information. \ No newline at end of file +If you run into any errors with the command you can check the [CLI Errors](/docs/reference/cli-commands#errors) section for more information. diff --git a/docs/docs/shared/deploy.mdx b/docs/docs/shared/deploy.mdx index e3d78ba..4e14ded 100644 --- a/docs/docs/shared/deploy.mdx +++ b/docs/docs/shared/deploy.mdx @@ -22,8 +22,23 @@ bonsol deploy -m ./path-to-your-manifest.json -t {s3|shadow-drive|url} #### S3 You can upload your program to s3 and have it be accessible by the relayer network. This is the recommended way to deploy your program. +Upload your program to s3. ```bash -bonsol deploy -m ./path-to-your-manifest.json -t s3 --access-key {your access key} --secret-key {your secret key} +aws s3api create-bucket \ + --bucket {bucket_name} \ + --region {region} \ + --create-bucket-configuration LocationConstraint={region} +``` + +```bash +bonsol deploy \ + --deploy-type s3 \ + --bucket {bucket_name} \ + --access-key {access-key} \ + --secret-key {secret-key} \ + --region {region} \ + --manifest-path collatz/manifest.json \ + --storage-account s3://{bucket_name} ``` #### ShadowDrive diff --git a/docs/docs/shared/init-new-bonsol.mdx b/docs/docs/shared/init-new-bonsol.mdx index 9d91122..cdd2608 100644 --- a/docs/docs/shared/init-new-bonsol.mdx +++ b/docs/docs/shared/init-new-bonsol.mdx @@ -5,7 +5,7 @@ With the bonsol cli installed we can create a new bonsol program using the follo ```bash mkdir zkprograms cd zkprograms -bonsol init collatz +bonsol init --project-name collatz ``` This will create a new directory called `collatz` and initialize a new bonsol program in it. Your directory structure should look like this: ``` @@ -23,4 +23,4 @@ When you generate a blank bonsol program it will look like this: input_order = ["Public"] ``` This section is used when building the program to specify the types and order of the inputs. -The valid options are ["Public", "Private", "PublicProof"]. \ No newline at end of file +The valid options are ["Public", "Private", "PublicProof"]. From 0db88390935f1cefbc19cd99677334e0bc1feaa2 Mon Sep 17 00:00:00 2001 From: "[eureka@nixos]" <57543709+eureka-cpu@users.noreply.github.com> Date: Mon, 25 Nov 2024 10:08:42 -0600 Subject: [PATCH 2/3] fix: Remove version requirement for cargo-binstall from install.sh (#98) Ref #95 --- bin/install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/install.sh b/bin/install.sh index e7fd92f..8eba5d2 100644 --- a/bin/install.sh +++ b/bin/install.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -e -cargo install cargo-binstall@1.0.1 +cargo install cargo-binstall cargo binstall cargo-risczero cargo risczero install @@ -17,4 +17,4 @@ if [[ "$OSTYPE" == "linux-gnu"* ]]; then cargo install bonsol-cli --git https://github.com/anagrambuild/bonsol --features linux fi elif [[ "$OSTYPE" == "darwin"* ]]; then - cargo install bonsol-cli --git https://github.com/anagrambuild/bonsol --features mac \ No newline at end of file + cargo install bonsol-cli --git https://github.com/anagrambuild/bonsol --features mac From 5832e4769a8fadafc7d4ba617b77fa88355adb08 Mon Sep 17 00:00:00 2001 From: Robert Date: Mon, 25 Nov 2024 11:09:36 -0500 Subject: [PATCH 3/3] Helm chart updates (#96) --- charts/Chart.yaml | 2 +- charts/templates/deployment-tester.yaml | 4 +++- charts/values.yaml | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/charts/Chart.yaml b/charts/Chart.yaml index 4d8f144..cb4d0c3 100644 --- a/charts/Chart.yaml +++ b/charts/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: bonsol-node description: A Solana Verifiable compute coprocessor node type: application -version: 1.0.0 +version: 2.0.0 appVersion: "1.0.0" diff --git a/charts/templates/deployment-tester.yaml b/charts/templates/deployment-tester.yaml index 19c5e67..a344623 100644 --- a/charts/templates/deployment-tester.yaml +++ b/charts/templates/deployment-tester.yaml @@ -62,7 +62,9 @@ spec: bonsol deploy -y -m {{ include "bonsol-tester.manifestPath" . }} -t url --url $SIMPLE_IMAGE while : do - bonsol execute -f {{ include "bonsol-tester.executionReqPath" . }} -x 1000 -m 10000 -w + date '+%Y/%m/%d %H:%M:%S' + bonsol execute -f {{ include "bonsol-tester.executionReqPath" . }} -x 1000 -m 10000 + echo "Sleeping 300 seconds ..." sleep 300 done {{- end }} diff --git a/charts/values.yaml b/charts/values.yaml index f4079ce..54eb746 100644 --- a/charts/values.yaml +++ b/charts/values.yaml @@ -41,8 +41,8 @@ provernode: ## order to run the pod on Kubernetes node with GPU. ## image: - repository: ghcr.io/anagrambuild/bonsol-node@sha256 - tag: 05d33ce69b8db9cd0755fa6ff474db8b51cc680c874ff36a17de814e70e31eae + repository: ghcr.io/anagrambuild/bonsol-node + tag: cuda-main-0.2.1 pullPolicy: "IfNotPresent" imagePullSecrets: []