Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: v3.0.0-rc4 #1645

Merged
merged 59 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
a892ca9
chore(deps): bump bindgen from 0.69.4 to 0.70.1
dependabot[bot] Sep 4, 2024
7724722
feat: added cuda action (#1492)
yourbuddyconner Sep 17, 2024
e3ffe8b
fix: rsp ci test (#1475)
yuwen01 Sep 17, 2024
7457d8b
revert: fix: rsp ci test (#1515)
yuwen01 Sep 17, 2024
ca95892
refactor: removed use of sudo + docker from cuda crate
yourbuddyconner Sep 18, 2024
2e8b0a8
compiler nits
yourbuddyconner Sep 18, 2024
23c9acf
fix(cuda-prover): dont discard stderr
lispc Sep 18, 2024
23c97e9
feat(sdk): send cpu cycles in network (#1521)
mattstam Sep 18, 2024
4ed9f05
refactor: removed use of sudo + docker from cuda crate (#1517)
yourbuddyconner Sep 19, 2024
14567af
fix: `copy_elf_from_output_dir` binary name (#1526)
ratankaliani Sep 20, 2024
8e82b81
feat: Add `cycle-tracking` example with multiple binaries (#1529)
ratankaliani Sep 20, 2024
25cdde5
fix: rust 1.81 toolchain build issue (#1534)
xJonathanLEI Sep 23, 2024
35eb54f
paged memory for uninitialized_memory
ctian1 Sep 21, 2024
62d7d74
cleanup
ctian1 Sep 23, 2024
faf120f
doc
ctian1 Sep 24, 2024
fca5db0
fix: uninitialized_memory hashmap issue (#1536)
ctian1 Sep 24, 2024
d461dd7
ci: test toolchain installation (#1539)
xJonathanLEI Sep 25, 2024
40f62d4
docs: substrate bn (#1540)
ratankaliani Sep 25, 2024
3bf0cd2
refactor: move `SP1PublicValues` to `sp1-primitives` (#1546)
xJonathanLEI Sep 26, 2024
29ace32
perf: remove unnecessary materializations of matrix views (#1547)
erabinov Sep 26, 2024
21655e9
chore: implement raw() for groth16 proof (#1543)
mattstam Sep 26, 2024
c9b305b
chore: replace `raw()` with `bytes()` in fibonacci example (#1549)
xJonathanLEI Sep 26, 2024
19f34b0
fix: check with `is_first` instead of `is_last` in exp reverse bits c…
erabinov Sep 27, 2024
4736a16
docs: why-use-sp1.md
lsquaredleland Sep 27, 2024
5086f7c
chore: upgrade Rust toolchain to 1.81.0 (#1559)
xJonathanLEI Sep 28, 2024
8b2fb66
docs: why-use-sp1.md (#1557)
lsquaredleland Sep 30, 2024
11b75da
fix: gnark-ffi Dockerfile caching (#1564)
xJonathanLEI Sep 30, 2024
3947eee
fix: `sp1-recursion-gnark-ffi` rebuilds unnecessarily (#1583)
xJonathanLEI Oct 2, 2024
62ff82c
chore: include all examples in the root workspace (#1566)
xJonathanLEI Oct 2, 2024
c1eabe3
chore: remove non-existent feature (#1590)
xJonathanLEI Oct 3, 2024
6861f69
chore: remove individual test workspaces (#1597)
xJonathanLEI Oct 3, 2024
5c69f3b
docs: update (#1585)
lsquaredleland Oct 3, 2024
4b8306a
chore(sdk): update prost and twirp to 0.13 (#1601)
mattstam Oct 3, 2024
4a432f2
chore: Fix typos in documentation (#1512)
cypherpepe Oct 4, 2024
10ebf6c
fix(docs): branch on patched bls12_381 (#1596)
invocamanman Oct 4, 2024
4179984
feat(cli): show clone output, --evm/--bare, faster clone
ctian1 Oct 7, 2024
1c1f84d
feat: only call entrypoint in zkvm (#1611)
xJonathanLEI Oct 7, 2024
8866fb5
update docs
ctian1 Oct 7, 2024
e15cc32
fix ci
ctian1 Oct 8, 2024
cba1d51
fix ci
ctian1 Oct 8, 2024
359ca92
fix
ctian1 Oct 8, 2024
d706145
feat(sdk): network-v2 (#1607)
mattstam Oct 8, 2024
9987854
feat: new `include_elf!` macro for importing ELF (#1620)
xJonathanLEI Oct 9, 2024
613f577
fix: build errors on custom bin target names (#1623)
xJonathanLEI Oct 9, 2024
8c0c542
feat(cli): improve `cargo prove new` (#1615)
ctian1 Oct 11, 2024
b3f4b18
fix(cuda): dont discard stderr (#1518)
ctian1 Oct 11, 2024
cec149b
chore(deps): bump bindgen from 0.69.4 to 0.70.1 (#1404)
ctian1 Oct 11, 2024
db08c62
chore(deps): bump stacker from 0.1.15 to 0.1.17 (#1464)
dependabot[bot] Oct 11, 2024
6512b56
fix(sp1-build, workflows): docker tag (#1636)
ratankaliani Oct 11, 2024
79884ff
feat: phase 1 opts + recursion circuit (#1638)
jtguibas Oct 16, 2024
53f65ca
Merge branch 'main' into dev
jtguibas Oct 16, 2024
e3db759
feat: update to 3.0.0-rc4 (#1646)
jtguibas Oct 16, 2024
3d91a90
fix: fix docs (#1632)
ylmin Oct 16, 2024
ad3a034
refactor: improve cargo build reproducibility (#1647)
jtguibas Oct 16, 2024
9bdb3ad
feat: add compiler flags to `BuildArgs` (#1637)
Daniel-Aaron-Bloom Oct 16, 2024
6cc9359
fix: remove cargo environment vars from local build (#1630)
Daniel-Aaron-Bloom Oct 16, 2024
d407bc3
fix: compatibility with mock verifier contract (#1297)
srdtrk Oct 16, 2024
3d0c989
fix(sdk): better error handling (#1643)
ctian1 Oct 16, 2024
8f1749e
chore: fix all typos (#1626)
ctian1 Oct 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
61 changes: 58 additions & 3 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ inputs:
pull_token:
description: "Token to use for private repo access"
required: true
setup_gcc:
description: "Whether to setup GCC or not"
required: false
default: 'true'
setup_aws_cli:
description: "Whether to install AWS CLI or not"
required: false
default: 'true'
runs:
using: "composite"
steps:
Expand All @@ -22,11 +30,41 @@ runs:
shell: bash
run: go version

- name: Check GCC version
id: check-gcc
shell: bash
run: |
if command -v gcc &> /dev/null; then
echo "gcc_exists=true" >> $GITHUB_OUTPUT
echo "gcc_version=$(gcc --version | head -n1 | awk '{print $NF}')" >> $GITHUB_OUTPUT
else
echo "gcc_exists=false" >> $GITHUB_OUTPUT
fi

- name: Setup GCC
uses: Dup4/actions-setup-gcc@v1
if: inputs.setup_gcc == 'true' && steps.check-gcc.outputs.gcc_exists != 'true'
with:
version: latest

- uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Install AWS CLI v2
if: inputs.setup_aws_cli == 'true'
shell: bash
run: |
if ! command -v aws &> /dev/null; then
echo "AWS CLI not found. Installing..."
python3 -m pip install --user awscli
echo "$HOME/.local/bin" >> $GITHUB_PATH
else
echo "AWS CLI is already installed."
fi
export PATH="$HOME/.local/bin:$PATH"
aws --version

- name: rust-cache
uses: actions/cache@v3
with:
Expand All @@ -37,11 +75,28 @@ runs:
~/.cargo/git/db/
target/
~/.rustup/
key: rust-1.79.0-${{ hashFiles('**/Cargo.toml') }}
restore-keys: rust-1.79.0-
key: rust-1.81.0-${{ hashFiles('**/Cargo.toml') }}
restore-keys: rust-1.81.0-

- name: Setup toolchain
id: rustc-toolchain
shell: bash
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain 1.79.0 -y
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain 1.81.0 -y
. "$HOME/.cargo/env"
echo "$HOME/.cargo/bin" >> $GITHUB_PATH

# install pkg-config and openssl
- name: Install pkg-config and openssl
shell: bash
run: |
if ! dpkg -s pkg-config libssl-dev &> /dev/null; then
echo "pkg-config and/or libssl-dev not found. Installing..."
sudo apt-get update
sudo apt-get install -y pkg-config libssl-dev
else
echo "pkg-config and libssl-dev are already installed."
fi

- name: Set up Docker
uses: docker/setup-buildx-action@v3
8 changes: 0 additions & 8 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
version: 2
updates:
- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "weekly"
target-branch: "dev"
ignore:
- dependency-name: "axum"
versions: ["> 0.7.4"]
- package-ecosystem: "docker"
directory: "/crates/cli/docker"
schedule:
Expand Down
17 changes: 17 additions & 0 deletions .github/runs-on.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
images:
nvidia-linux:
platform: "linux"
arch: "x64"
ami: "ami-0a63dc9cb9e934ba3"
owner: "421253708207"

dlami-x64:
platform: "linux"
arch: "x64"
owner: "898082745236" # AWS
name: "Deep Learning Base OSS Nvidia Driver GPU AMI (Ubuntu 22.04)*"

runners:
gpu-nvidia:
family: ["g6.4xlarge"]
image: dlami-x64
2 changes: 1 addition & 1 deletion .github/workflows/docker-gnark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ jobs:
SP1_GNARK_IMAGE: sp1-gnark
with:
command: test
toolchain: 1.79.0
toolchain: 1.81.0
args: --release -p sp1-prover -- --exact tests::test_e2e
120 changes: 61 additions & 59 deletions .github/workflows/docker-publish-gnark.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Source: https://raw.githubusercontent.com/foundry-rs/foundry/master/.github/workflows/docker-publish.yml
name: docker-gnark

on:
push:
branches:
- "main"
tags:
- "v*.*.*"
schedule:
- cron: "0 0 * * *"
# Trigger without any parameters a proactive rebuild
workflow_dispatch:
inputs:
tags:
Expand All @@ -20,83 +20,85 @@ env:
IMAGE_NAME: succinctlabs/sp1-gnark

jobs:
container:
runs-on: ubuntu-latest
# https://docs.github.com/en/actions/reference/authentication-in-a-workflow
build-amd64:
runs-on: [runs-on, runner=64cpu-linux-x64, spot=false, "run-id=${{ github.run_id }}"]
permissions:
id-token: write
packages: write
contents: read
timeout-minutes: 120
steps:
- name: Checkout repository
id: checkout
uses: actions/checkout@v4

- name: Install Docker BuildX
- name: Set up Docker BuildX
uses: docker/setup-buildx-action@v3
id: buildx
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v3
with:
install: true
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push AMD64 image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile.gnark-ffi
platforms: linux/amd64
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}-amd64
cache-from: type=gha
cache-to: type=gha,mode=max

# Login against a Docker registry except on PR
# https://github.com/docker/login-action
build-arm64:
runs-on: [runs-on, runner=64cpu-linux-arm64, spot=false, "run-id=${{ github.run_id }}"]
permissions:
id-token: write
packages: write
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker BuildX
uses: docker/setup-buildx-action@v3
- name: Log into registry ${{ env.REGISTRY }}
# Ensure this doesn't trigger on PR's
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
- name: Build and push ARM64 image
uses: docker/build-push-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
context: .
file: ./Dockerfile.gnark-ffi
platforms: linux/arm64
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}-arm64
cache-from: type=gha
cache-to: type=gha,mode=max

# Creates an additional 'latest' or 'nightly' tag
# If the job is triggered via cron schedule, tag nightly and nightly-{SHA}
# If the job is triggered via workflow dispatch and on a master branch, tag branch and latest
# Otherwise, just tag as the branch name
- name: Finalize Docker Metadata
id: docker_tagging
create-manifest:
needs: [build-amd64, build-arm64]
runs-on: ubuntu-latest
steps:
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create and push manifest
run: |
TAGS=""
if [[ "${{ github.event_name }}" == 'workflow_dispatch' ]]; then
echo "manual trigger from workflow_dispatch, assigning tag ${{ github.event.inputs.tags }}"
echo "docker_tags=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.event.inputs.tags }}" >> $GITHUB_OUTPUT
TAGS="${{ github.event.inputs.tags }}"
elif [[ "${{ github.event_name }}" == 'schedule' ]]; then
echo "cron trigger, assigning nightly tag"
echo "docker_tags=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:nightly,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:nightly-${GITHUB_SHA}" >> $GITHUB_OUTPUT
TAGS="nightly nightly-${{ github.sha }}"
else
echo "Neither scheduled nor manual release from main branch. Just tagging as branch name"
echo "docker_tags=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${GITHUB_REF##*/}" >> $GITHUB_OUTPUT
TAGS="${GITHUB_REF##*/}"
fi

# Log docker metadata to explicitly know what is being pushed
- name: Inspect Docker Metadata
run: |
echo "TAGS -> ${{ steps.docker_tagging.outputs.docker_tags }}"
echo "LABELS -> ${{ steps.meta.outputs.labels }}"

# Build and push Docker image
# https://github.com/docker/build-push-action
# https://github.com/docker/build-push-action/blob/master/docs/advanced/cache.md
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile.gnark-ffi
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.docker_tagging.outputs.docker_tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
BUILDTIME=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}
VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
REVISION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}

for TAG in $TAGS; do
docker buildx imagetools create -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:$TAG \
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}-amd64 \
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}-arm64
done
2 changes: 2 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: docker

on:
push:
branches:
- "main"
tags:
- "v*.*.*"
schedule:
Expand Down
74 changes: 72 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: test
toolchain: 1.79.0
toolchain: 1.81.0
args: --release -p sp1-sdk --features native-gnark -- test_e2e_prove_plonk --nocapture
env:
RUSTFLAGS: -Copt-level=3 -Cdebug-assertions -Coverflow-checks=y -Cdebuginfo=0 -C target-cpu=native
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: test
toolchain: 1.79.0
toolchain: 1.81.0
args: --release -p sp1-sdk -- test_e2e_prove_plonk --nocapture
env:
RUSTFLAGS: -Copt-level=3 -Cdebug-assertions -Coverflow-checks=y -Cdebuginfo=0 -C target-cpu=native
Expand Down Expand Up @@ -128,6 +128,42 @@ jobs:
cargo add sp1-sdk --path $GITHUB_WORKSPACE/crates/sdk
SP1_DEV=1 RUST_LOG=info cargo run --release

cycle-tracking:
name: Example (Cycle Tracking)
runs-on:
[
runs-on,
runner=64cpu-linux-arm64,
spot=false,
"run-id=${{ github.run_id }}",
]
env:
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Setup CI
uses: ./.github/actions/setup

- name: Install SP1 toolchain
run: |
curl -L https://sp1.succinct.xyz | bash
~/.sp1/bin/sp1up
~/.sp1/bin/cargo-prove prove --version

- name: Install SP1 CLI
run: |
cd crates/cli
cargo install --force --locked --path .
cd ~

- name: Run script
run: |
cd examples/cycle-tracking/script
cargo add sp1-sdk --path $GITHUB_WORKSPACE/crates/sdk
SP1_DEV=1 RUST_LOG=info cargo run --release

tendermint:
name: Example (Tendermint)
runs-on:
Expand Down Expand Up @@ -167,3 +203,37 @@ jobs:
cargo remove sp1-sdk
cargo add sp1-sdk --path $GITHUB_WORKSPACE/crates/sdk
SP1_DEV=1 RUST_LOG=info cargo run --release
test-cuda:
name: Test CUDA
runs-on: nvidia-gpu-linux-x64
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: rust-cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
~/.rustup/
key: rust-1.81.0-${{ hashFiles('**/Cargo.toml') }}
restore-keys: rust-1.81.0-

- name: Setup toolchain
id: rustc-toolchain
shell: bash
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain 1.81.0 -y

- name: Run script
run: |
. "$HOME/.cargo/env"
curl -L https://sp1.succinct.xyz | bash
/home/runner/.sp1/bin/sp1up
sudo apt install libssl-dev pkg-config
cd examples/fibonacci
RUST_LOG=info cargo run --release --features cuda
Loading
Loading