Skip to content

Commit

Permalink
revert: fix: rsp ci test (#1515)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuwen01 authored Sep 17, 2024
1 parent e3ffe8b commit 7457d8b
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 94 deletions.
47 changes: 1 addition & 46 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:
- "crates/**"
- "Cargo.toml"
- ".github/workflows/**"
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down Expand Up @@ -168,7 +167,6 @@ 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
Expand Down Expand Up @@ -202,47 +200,4 @@ jobs:
/home/runner/.sp1/bin/sp1up
sudo apt install libssl-dev pkg-config
cd examples/fibonacci
RUST_LOG=info cargo run --release --features cuda
rsp-low-memory:
name: Example (RSP Low Memory)
strategy:
matrix:
mem_limit: [16, 32, 64]
runs-on:
[
runs-on,
"ram=${{ matrix.mem_limit }}",
family=c7a,
image=ubuntu22-full-x64,
"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/rsp/program
cargo add sp1-zkvm --path $GITHUB_WORKSPACE/crates/zkvm/entrypoint
cd ../script
cargo remove sp1-sdk
cargo add sp1-sdk --path $GITHUB_WORKSPACE/crates/sdk
SP1_DEV=1 RUST_LOG=info RUSTFLAGS="-C target-cpu=native" cargo run --release -- --prove
RUST_LOG=info cargo run --release --features cuda
45 changes: 1 addition & 44 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -312,47 +312,4 @@ jobs:
cd ../script
cargo remove sp1-sdk
cargo add sp1-sdk --path $GITHUB_WORKSPACE/crates/sdk
SP1_DEV=1 RUST_LOG=info cargo run --release
rsp-low-memory:
name: Example (RSP Low Memory)
strategy:
matrix:
mem_limit: [16, 32, 64]
runs-on:
[
runs-on,
"ram=${{ matrix.mem_limit }}",
family=c7a,
image=ubuntu22-full-x64,
"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/rsp/program
cargo add sp1-zkvm --path $GITHUB_WORKSPACE/crates/zkvm/entrypoint
cd ../script
cargo remove sp1-sdk
cargo add sp1-sdk --path $GITHUB_WORKSPACE/crates/sdk
SP1_DEV=1 RUST_LOG=info RUSTFLAGS="-C target-cpu=native" cargo run --release -- --prove
SP1_DEV=1 RUST_LOG=info cargo run --release
4 changes: 2 additions & 2 deletions examples/rsp/program/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![no_main]
sp1_zkvm::entrypoint!(main);

use rsp_client_executor::{io::ClientExecutorInput, ClientExecutor, OptimismVariant};
use rsp_client_executor::{io::ClientExecutorInput, ClientExecutor, EthereumVariant};

pub fn main() {
// Read the input.
Expand All @@ -10,7 +10,7 @@ pub fn main() {

// Execute the block.
let executor = ClientExecutor;
let header = executor.execute::<OptimismVariant>(input).expect("failed to execute client");
let header = executor.execute::<EthereumVariant>(input).expect("failed to execute client");
let block_hash = header.hash_slow();

// Commit the block hash.
Expand Down
Binary file added examples/rsp/script/input/1/20526624.bin
Binary file not shown.
Binary file removed examples/rsp/script/input/10/122853660.bin
Binary file not shown.
4 changes: 2 additions & 2 deletions examples/rsp/script/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use clap::Parser;
use reth_primitives::B256;
use rsp_client_executor::{io::ClientExecutorInput, CHAIN_ID_OP_MAINNET};
use rsp_client_executor::{io::ClientExecutorInput, CHAIN_ID_ETH_MAINNET};
use std::path::PathBuf;

use sp1_sdk::{utils, ProverClient, SP1Stdin};
Expand Down Expand Up @@ -28,7 +28,7 @@ fn main() {
let args = Args::parse();

// Load the input from the cache.
let client_input = load_input_from_cache(CHAIN_ID_OP_MAINNET, 122853660);
let client_input = load_input_from_cache(CHAIN_ID_ETH_MAINNET, 20526624);

// Generate the proof.
let client = ProverClient::new();
Expand Down

0 comments on commit 7457d8b

Please sign in to comment.