Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
erhant authored Oct 24, 2024
0 parents commit ff601d8
Show file tree
Hide file tree
Showing 32 changed files with 14,318 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# 'mock' for generating mock proofs locally, 'local' for generating proofs locally, 'network' for generating proofs using the proving network.
SP1_PROVER=local
# If using the proving network, set to your whitelisted private key. For more information, see:
# https://docs.succinct.xyz/prover-network/setup.html#key-setup
SP1_PRIVATE_KEY=
40 changes: 40 additions & 0 deletions .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 .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 .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 .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
37 changes: 37 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"rust-analyzer.linkedProjects": [
"program/Cargo.toml",
"script/Cargo.toml"
],
"rust-analyzer.check.overrideCommand": [
"cargo",
"clippy",
"--workspace",
"--message-format=json",
"--all-features",
"--all-targets",
"--",
"-A",
"incomplete-features"
],
"rust-analyzer.runnables.extraEnv": {
"RUST_LOG": "debug",
"RUSTFLAGS": "-Ctarget-cpu=native"
},
"rust-analyzer.runnables.extraArgs": [
"--release",
"+nightly"
],
"rust-analyzer.diagnostics.disabled": [
"unresolved-proc-macro"
],
"editor.rulers": [
100
],
"editor.inlineSuggest.enabled": true,
"[rust]": {
"editor.defaultFormatter": "rust-lang.rust-analyzer",
"editor.formatOnSave": true,
"editor.hover.enabled": true
},
}
Loading

0 comments on commit ff601d8

Please sign in to comment.