Skip to content

Commit

Permalink
feat: added sha2-prover sp1 program
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyas-londhe committed Nov 28, 2024
1 parent ac07c66 commit 57e7858
Show file tree
Hide file tree
Showing 29 changed files with 17,029 additions and 0 deletions.
40 changes: 40 additions & 0 deletions packages/sha2-prover/.github/workflows/foundry-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Foundry Test

on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:

env:
FOUNDRY_PROFILE: ci

jobs:
check:
strategy:
fail-fast: true

name: Foundry project
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Run Forge build
run: |
cd contracts
forge --version
forge build --sizes
id: build

- name: Run Forge tests
run: |
cd contracts
forge test -vvv
id: test
39 changes: 39 additions & 0 deletions packages/sha2-prover/.github/workflows/prove.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build Program

on:
workflow_dispatch:
push:
branches: [main]
pull_request:

env:
FOUNDRY_PROFILE: ci

jobs:
check:
strategy:
fail-fast: true

name: Build
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Install rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.81.0

- name: Install SP1 toolchain
run: |
curl -L https://sp1.succinct.xyz | bash
~/.sp1/bin/sp1up
~/.sp1/bin/cargo-prove prove --version
- name: Build SP1 program
run: |
cd program
~/.sp1/bin/cargo-prove prove build
19 changes: 19 additions & 0 deletions packages/sha2-prover/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Cargo build
**/target

# Cargo config
.cargo

# Profile-guided optimization
/tmp
pgo-data.profdata

# MacOS nuisances
.DS_Store

# Proofs
**/proof-with-pis.json
**/proof-with-io.json

# Env
.env
8 changes: 8 additions & 0 deletions packages/sha2-prover/.gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[submodule "contracts/lib/forge-std"]
path = contracts/lib/forge-std
url = https://github.com/foundry-rs/forge-std
tag = v1.8.2
[submodule "contracts/lib/sp1-contracts"]
path = contracts/lib/sp1-contracts
url = https://github.com/succinctlabs/sp1-contracts
tag = v3.0.0
Loading

0 comments on commit 57e7858

Please sign in to comment.