Skip to content

Commit

Permalink
more programs
Browse files Browse the repository at this point in the history
  • Loading branch information
umadayal committed Sep 30, 2024
1 parent c73bf81 commit bfa254e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ jobs:
strategy:
matrix:
s3_folder:
- s3://sp1-testing-suite/fibonacci-17k
- fibonacci-17k
- ssz-withdrawals
- tendermint
- rsp-20526624
steps:
- name: Checkout sources
uses: actions/checkout@v4
Expand All @@ -46,8 +49,8 @@ jobs:
- name: Copy files from S3
run: |
mkdir -p workdir
aws s3 cp ${{ matrix.s3_folder }}/program.bin workdir/program.bin
aws s3 cp ${{ matrix.s3_folder }}/stdin.bin workdir/stdin.bin
aws s3 cp s3://sp1-testing-suite/${{ matrix.s3_folder }}/program.bin workdir/program.bin
aws s3 cp s3://sp1-testing-suite/${{ matrix.s3_folder }}/stdin.bin workdir/stdin.bin
- name: Run sp1-perf
uses: actions-rs/cargo@v1
with:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ pgo-data.profdata
# Proofs
**/proof-with-pis.bin
**/proof-with-io.bin
**/program.bin
**/stdin.bin

# Benchmark
benchmark.csv
Expand Down
11 changes: 11 additions & 0 deletions crates/sdk/src/action.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,17 @@ impl<'a> Prove<'a> {
let proof_opts = ProofOpts { sp1_prover_opts: opts, timeout };
let context = context_builder.build();

// Dump the program and stdin to files for debugging if `SP1_DUMP` is set.
if std::env::var("SP1_DUMP")
.map(|v| v == "1" || v.to_lowercase() == "true")
.unwrap_or(false)
{
let program = pk.elf.clone();
std::fs::write("program.bin", program).unwrap();
let stdin = bincode::serialize(&stdin).unwrap();
std::fs::write("stdin.bin", stdin.clone()).unwrap();
}

prover.prove(pk, stdin, proof_opts, context, kind)
}

Expand Down

0 comments on commit bfa254e

Please sign in to comment.