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

update sp1 and risc0 #1307

Closed
wants to merge 46 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
fe0638d
bump risc0 and sp1 version
PatStiles Oct 9, 2024
6023296
add Cargo.lock files
PatStiles Oct 9, 2024
5f07c03
add newly generated proofs + scripts
PatStiles Oct 9, 2024
6e9cd4e
remove cp command in make
PatStiles Oct 9, 2024
cec8634
merge
PatStiles Oct 16, 2024
ffbaaa0
add retro-compat in operator
PatStiles Oct 16, 2024
3f7c3c7
fix test file path
PatStiles Oct 16, 2024
21eb125
rm duplicated make command
PatStiles Oct 16, 2024
3b9488c
update ci
PatStiles Oct 16, 2024
bf3bd6a
update test paths + proof regen
PatStiles Oct 16, 2024
32aebd3
change names of *.so files
PatStiles Oct 16, 2024
689d16d
fix make paths
PatStiles Oct 16, 2024
d72a55f
fix test function calls + regenerate proofs
PatStiles Oct 16, 2024
fc78d30
fix make + gitignore
PatStiles Oct 16, 2024
1af9a3a
missing fn in test
PatStiles Oct 16, 2024
a1a70e4
fix path in makefile
PatStiles Oct 16, 2024
df53f6c
add lib
PatStiles Oct 16, 2024
5fb5b8f
add lib for sp1 old
PatStiles Oct 16, 2024
dbb9fc1
fix ci paths
PatStiles Oct 16, 2024
4e4eb29
add library path definition to make build on linus
PatStiles Oct 16, 2024
9c2b55e
change make
PatStiles Oct 16, 2024
5874106
fix make
PatStiles Oct 16, 2024
f344429
makefile
PatStiles Oct 16, 2024
1296fb4
make
PatStiles Oct 16, 2024
b0ade52
fix dynamic library + naming issues
PatStiles Oct 17, 2024
70e35dc
update make commands
PatStiles Oct 17, 2024
4581d65
update sp1 version + change prompt library in `zkquiz` example to acc…
PatStiles Oct 17, 2024
0fc6511
remove old proof generators
PatStiles Oct 17, 2024
47a20ee
add old proofs for ci tests + rm binaries and ignore
PatStiles Oct 18, 2024
56e7fc5
rm dynamic libs
PatStiles Oct 18, 2024
a116ec8
fix linux build issues
MarcosNicolau Oct 18, 2024
eb3edea
move proofs to fibonacci folder
PatStiles Oct 18, 2024
6e3ac9e
remove unsent case from operator verifiers
PatStiles Oct 18, 2024
5a6f5d7
delete risc_zero dylib
PatStiles Oct 22, 2024
6559525
fix make file
PatStiles Oct 22, 2024
92cf444
ignore .so files in sp1
PatStiles Oct 22, 2024
5998e3e
add try catch to risc_zero_old
PatStiles Oct 22, 2024
71f6616
remove extern c from inner_verify_risc_zero
PatStiles Oct 22, 2024
ac2de64
sp1 bindings
PatStiles Oct 22, 2024
b7c4722
add try catch logic to operator
PatStiles Oct 22, 2024
23c0168
rm handle function for try catch in operator
PatStiles Oct 22, 2024
f383074
rm try catch of _old risc0 and sp1 bindings
PatStiles Oct 22, 2024
69f6b4e
regen batcher lock
PatStiles Oct 22, 2024
519c62b
fix typo
PatStiles Oct 23, 2024
3cb1a97
rm export from makefile
PatStiles Oct 24, 2024
a5f5ff8
update version in docs
PatStiles Oct 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/build-and-test-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ jobs:
cache: false
- name: Build SP1 bindings
run: make build_sp1_linux
- name: Build Old SP1 bindings
run: make build_sp1_linux_old
- name: Build Risc Zero go bindings
run: make build_risc_zero_linux
- name: Build Old Risc Zero go bindings
run: make build_risc_zero_linux_old
- name: Build Merkle Tree bindings
run: make build_merkle_tree_linux
- name: Build operator
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/test-risc-zero-old.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: test-risc-zero-old

on:
merge_group:
push:
branches: [main]
pull_request:
branches: ["*"]
paths:
- "operator/risc_zero_old/**"
- ".github/workflows/test-risc-zero-old.yml"

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Clear device space
run: |
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf /usr/local/.ghcup
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.22"
cache: false
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Test Old Risc Zero Rust
run: make test_risc_zero_rust_ffi_old
- name: Test Old Risc Zero go bindings
run: make test_risc_zero_go_bindings_linux_old
28 changes: 28 additions & 0 deletions .github/workflows/test-sp1-old.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: test-sp1-old

on:
merge_group:
push:
branches: [main]
pull_request:
branches: ["*"]
paths:
- 'operator/sp1_old/**'
- '.github/workflows/test-sp1-old.yml'

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22'
cache: false
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Test Old SP1 Rust
run: make test_sp1_rust_ffi_old
- name: Test Old SP1 go bindings
run: make test_sp1_go_bindings_linux_old
49 changes: 45 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ifeq ($(OS),Darwin)
endif

ifeq ($(OS),Linux)
LD_LIBRARY_PATH += $(CURDIR)/operator/risc_zero/lib
LD_LIBRARY_PATH+=$(CURDIR)/operator/risc_zero_old/lib:$(CURDIR)/operator/risc_zero/lib
endif

ifeq ($(OS),Linux)
Expand Down Expand Up @@ -534,19 +534,36 @@ test_sp1_go_bindings_linux: build_sp1_linux
# @cp -r scripts/test_files/sp1/fibonacci_proof_generator/script/sp1_fibonacci.elf scripts/test_files/sp1/
generate_sp1_fibonacci_proof:
@cd scripts/test_files/sp1/fibonacci_proof_generator/script && RUST_LOG=info cargo run --release
@mv scripts/test_files/sp1/fibonacci_proof_generator/program/elf/riscv32im-succinct-zkvm-elf scripts/test_files/sp1/sp1_fibonacci.elf
@mv scripts/test_files/sp1/fibonacci_proof_generator/script/sp1_fibonacci.proof scripts/test_files/sp1/
@echo "Fibonacci proof and ELF generated in scripts/test_files/sp1 folder"

generate_risc_zero_empty_journal_proof:
@cd scripts/test_files/risc_zero/no_public_inputs && RUST_LOG=info cargo run --release
@echo "Fibonacci proof and ELF with empty journal generated in scripts/test_files/risc_zero/no_public_inputs folder"

build_sp1_macos_old:
@cd operator/sp1_old/lib && cargo build $(RELEASE_FLAG)
@cp operator/sp1_old/lib/target/$(TARGET_REL_PATH)/libsp1_verifier_old_ffi.dylib operator/sp1_old/lib/libsp1_verifier_old.dylib

build_sp1_linux_old:
@cd operator/sp1_old/lib && cargo build $(RELEASE_FLAG)
@cp operator/sp1_old/lib/target/$(TARGET_REL_PATH)/libsp1_verifier_old_ffi.so operator/sp1_old/lib/libsp1_verifier_old.so

test_sp1_rust_ffi_old:
@echo "Testing SP1 Rust FFI source code..."
@cd operator/sp1_old/lib && RUST_MIN_STACK=83886080 cargo t --release

test_sp1_go_bindings_macos_old: build_sp1_macos_old
@echo "Testing SP1 Go bindings..."
go test ./operator/sp1_old/... -v

test_sp1_go_bindings_linux_old: build_sp1_linux_old
@echo "Testing SP1 Go bindings..."
go test ./operator/sp1_old/... -v

__RISC_ZERO_FFI__: ##
build_risc_zero_macos:
@cd operator/risc_zero/lib && cargo build $(RELEASE_FLAG)
@cp operator/risc_zero/lib/target/$(TARGET_REL_PATH)/librisc_zero_verifier_ffi.dylib operator/risc_zero/lib/librisc_zero_verifier_ffi.dylib
@cp operator/risc_zero/lib/target/$(TARGET_REL_PATH)/librisc_zero_verifier_ffi.dylib operator/risc_zero/lib/librisc_zero_verifier.dylib

build_risc_zero_linux:
@cd operator/risc_zero/lib && cargo build $(RELEASE_FLAG)
Expand All @@ -569,6 +586,26 @@ generate_risc_zero_fibonacci_proof:
RUST_LOG=info cargo run --release && \
echo "Fibonacci proof, pub input and image ID generated in scripts/test_files/risc_zero folder"

build_risc_zero_macos_old:
@cd operator/risc_zero_old/lib && cargo build $(RELEASE_FLAG)
@cp operator/risc_zero_old/lib/target/$(TARGET_REL_PATH)/librisc_zero_verifier_old_ffi.dylib operator/risc_zero_old/lib/librisc_zero_verifier_old.dylib

build_risc_zero_linux_old:
@cd operator/risc_zero_old/lib && cargo build $(RELEASE_FLAG)
@cp operator/risc_zero_old/lib/target/$(TARGET_REL_PATH)/librisc_zero_verifier_old_ffi.so operator/risc_zero_old/lib/librisc_zero_verifier_old_ffi.so

test_risc_zero_rust_ffi_old:
@echo "Testing RISC Zero Rust FFI source code..."
@cd operator/risc_zero_old/lib && cargo test --release

test_risc_zero_go_bindings_macos_old: build_risc_zero_macos_old
@echo "Testing RISC Zero Go bindings..."
go test ./operator/risc_zero_old/... -v

test_risc_zero_go_bindings_linux_old: build_risc_zero_linux_old
@echo "Testing RISC Zero Go bindings..."
go test ./operator/risc_zero_old/... -v

__MERKLE_TREE_FFI__: ##
build_merkle_tree_macos:
@cd operator/merkle_tree/lib && cargo build $(RELEASE_FLAG)
Expand Down Expand Up @@ -607,13 +644,17 @@ build_all_ffi_macos: ## Build all FFIs for macOS
@echo "Building all FFIs for macOS..."
@$(MAKE) build_sp1_macos
@$(MAKE) build_risc_zero_macos
@$(MAKE) build_sp1_macos_old
@$(MAKE) build_risc_zero_macos_old
@$(MAKE) build_merkle_tree_macos
@echo "All macOS FFIs built successfully."

build_all_ffi_linux: ## Build all FFIs for Linux
@echo "Building all FFIs for Linux..."
@$(MAKE) build_sp1_linux
@$(MAKE) build_risc_zero_linux
@$(MAKE) build_sp1_linux_old
@$(MAKE) build_risc_zero_linux_old
@$(MAKE) build_merkle_tree_linux
@echo "All Linux FFIs built successfully."

Expand Down
Loading
Loading